<!--
为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。
-->
### One-line summary [问题简述]
假设一开始的 series配置如下:
``` json
[{
name: 'name1',
type: 'line',
data: [1]
},
{
name: 'name2',
type: 'line',
data: [1]
}]
```
修改数据如下(仅删除一个项)
```json
[{
name: 'name2',
type: 'line',
data: [1]
}]
```
使用`chartInstance.setOption(option)`。
此时,图表中折现数仍为2(期望为1)。
如使用`chartInstance.setOption(option, true)`
则表现正常
### Version & Environment [版本及环境]
+ ECharts version [ECharts 版本]: 3.8.5、4.1.0
+ Browser version [浏览器类型和版本]: chrome 9.0.3497.92
+ OS Version [操作系统类型和版本]: macOS High Sierra 10.13.6
### Expected behaviour [期望结果]
折线图渲染以最终配置为准
### ECharts option [ECharts配置项]
<!-- Copy and paste your 'echarts option' here. -->
<!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的
option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
```javascript
option = {
legend: {
data:['邮件营销','联盟广告']
},
xAxis: {
type: 'category',
data: ['周一']
},
yAxis: {
type: 'value'
},
series: [
{
name:'邮件营销',
type:'line',
data:[120]
},
{
name:'联盟广告',
type:'line',
data:[220]
},
]
}
```
然后,数据变动为
```
legend: {
data:['邮件营销']
},
xAxis: {
type: 'category',
data: ['周一']
},
yAxis: {
type: 'value'
},
series: [
{
name:'邮件营销',
type:'line',
data:[120]
}
]
```
此时,`legend`数为1,折线数为2
### Other comments [其他信息]
<!-- For example: Screenshot or Online demo -->
<!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
[ Full content available at:
https://github.com/apache/incubator-echarts/issues/9089 ]
This message was relayed via gitbox.apache.org for [email protected]