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

折线图用setOption更新时会遗留之前的数据 #4356

Closed
huangqiz opened this issue Oct 29, 2016 · 3 comments
Closed

折线图用setOption更新时会遗留之前的数据 #4356

huangqiz opened this issue Oct 29, 2016 · 3 comments
Labels
stale Inactive for a long time. Will be closed in 7 days.

Comments

@huangqiz
Copy link

问题简述 (One-line summary)

对于折线图,有时使用setOption设置新的seriesData时会有,旧的一些曲线仍然会显示在图标上

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version): 3.2.3
  • 浏览器类型和版本 (Browser version): Chrome 53.0.2785.143
  • 操作系统类型和版本 (OS Version): Win10

重现步骤 (Steps to reproduce)

  1. 使用option1(附件option1.txt)绘制折线图(setOption(option1))
  2. 使用option2(附件option2.txt)绘制折线图(setOption(option2))

期望结果 (Expected behaviour)

会出现类似截图1中的情况

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

echarts是否会缓存一些cache?

ECharts配置项 (ECharts option)

请见附件option1.txt以及option2.txt

option = {

}

其他信息 (Other comments)

option1.txt
option2.txt
1

@pissang
Copy link
Contributor

pissang commented Oct 31, 2016

默认 setOption 是跟之前的数据合并的,可以 setOption 第二项设置为 true 选择不合并

@huangqiz
Copy link
Author

huangqiz commented Nov 1, 2016

第二个选项设为true的时候,是不是类似会执行clear()的操作?有没有办法在setOption之后仍然保持我用toolbox中设定的缩放比例?

@Ovilia Ovilia added the stale Inactive for a long time. Will be closed in 7 days. label Jul 17, 2019
@stale stale bot closed this as completed Jul 24, 2019
@jinjiaxing
Copy link

设置true也无效怎么办?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Inactive for a long time. Will be closed in 7 days.
Projects
None yet
Development

No branches or pull requests

4 participants