apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.64k stars 19.61k forks source link

[Bug] 动态的series,会导致数据错乱。 #19332

Closed vernonin closed 11 months ago

vernonin commented 11 months ago

Version

5.4.2

Link to Minimal Reproduction

https://codesandbox.io/s/nervous-mendeleev-xmk33z?file=/src/index.js

Steps to Reproduce

1.第一次显示正常。 2.当选择其他项,异步获取series。 3.将新的series数据放在option。

Current Behavior

1.第一次显示正常。 2.当选择其他项,异步获取series时,数据不对应了。

Expected Behavior

当我异步获取series时,希望数据跟series保持一致。

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

echarts-bot[bot] commented 11 months ago

@vernonin It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED
**TITLE** [Bug] dynamic series, which can cause data to be out of order. **BODY** ### Version 5.4.2 ### Link to Minimal Reproduction https://codesandbox.io/s/nervous-mendeleev-xmk33z?file=/src/index.js ### Steps to Reproduce 1. The first display is normal. 2. When selecting other items, obtain the series asynchronously. 3. Put the new series data in option. ### Current Behavior 1. The first display is normal. 2. When selecting other items and obtaining the series asynchronously, the data does not correspond. ### Expected Behavior When I obtain the series asynchronously, I hope that the data will be consistent with the series. ### Environment ```markdown - OS: -Browser: - Framework: ``` ### Any additional comments? _No response_
plainheart commented 11 months ago

默认策略是会合并前后配置项,你的这种场景可以设置 notMergetrue 避免合并,直接以新配置项替换旧配置项。

vernonin commented 11 months ago

好的,O(∩_∩)O谢谢啦!