Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[优化] type: 'line' & smooth: true 的展示待优化 #4556

Closed
lin-credible opened this issue Nov 25, 2016 · 5 comments
Closed

[优化] type: 'line' & smooth: true 的展示待优化 #4556

lin-credible opened this issue Nov 25, 2016 · 5 comments

Comments

@lin-credible
Copy link

问题简述 (One-line summary)

type: 'line' & smooth: true: 一切如图

echarts_line

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version): echarts 3
  • 浏览器类型和版本 (Browser version): newest version of firefox & chrome
  • 操作系统类型和版本 (OS Version): windows 10 & OS X EI Captian

重现步骤 (Steps to reproduce)

  1. 准备好对应数据即可

y值: 0, 0, 6000, 6000, 6000, 0, 0 ...... 0, 0, 2000, 2000, 2000, 0, 0 (制造这样的波峰波谷即可看到效果)

期望结果 (Expected behaviour)

可能哪里有问题 (What went wrong)

smooth的算法待优化,从当前效果的展示来看,value越大,平滑度越小,但是有时候视图数据量很小,这种误差效果太明显,严重影响体验。

ECharts配置项 (ECharts option)

主要看 series

option = {
    ...
    series: [
                    {
                        type: 'line',
                        smooth: true,
                        symbol: 'emptyCircle',
                        symbolSize: 8,
                        lineStyle: {
                            normal: {
                                width: 2.5,
                                color: '#4a90e2'
                            }
                        },
                      ...
                  }
               ]
}

其他信息 (Other comments)

smooth: true:
smooth_true

smooth: false:
smooth_false

@lin-credible lin-credible changed the title type: 'line' & smooth: true 的展示待优化 [优化] type: 'line' & smooth: true 的展示待优化 Nov 25, 2016
@pissang
Copy link
Contributor

pissang commented Nov 25, 2016

因为平滑后还能保证整个曲线的最大值最小值跟之前是一样的,不能出现类似小于 0 大于 100 的情况

@lin-credible
Copy link
Author

lin-credible commented Nov 25, 2016

@pissang 我接受这种解释,另外,这样的视图生产环境 (不是特定场景的话) 重现的几率很低!不过关于这种平滑效果的优化,是否有更优的处理?比如highcharts的平滑效果:链接
screen shot 2016-11-25 at 11 30 22

@pissang
Copy link
Contributor

pissang commented Nov 25, 2016

@lin-credible 谢谢建议,我们会尝试优化下

@Ovilia Ovilia added the stale Inactive for a long time. Will be closed in 7 days. label Jul 30, 2019
@stale stale bot closed this as completed Aug 7, 2019
@pissang pissang reopened this Aug 11, 2020
@stale
Copy link

stale bot commented Aug 11, 2020

This issue is marked to be stale and is going to be closed within a week. If you think it shouldn't be closed, please leave a comment.

@stale stale bot removed the stale Inactive for a long time. Will be closed in 7 days. label Aug 11, 2020
@plainheart
Copy link
Member

Closed by #13314

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants