Version
5.1.1
Link to Minimal Reproduction
- No response*
Steps to Reproduce
根据官网说明,使用setOption(option, {notMerge: true, lazyUpdate: false, silent:false})动态更新图表,会导致JS event listeners不断累加导致页面卡顿,最后内存溢出。
即使在更新的option中设置所有为空也仍然不断增加(data:[])
数据构建好,仅不进行渲染也不会增加listeners,只要渲染,无论是否为空都会一直累加
Current Behavior
Expected Behavior
应该如何渲染解决内存溢出问题
Environment
- OS:
- Browser:
- Framework:
Any additional comments?
- No response*
2条答案
按热度按时间chhkpiq41#
@qinxiangling 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] setOption causes the pages to accumulate episode listeners
BODY
Version
5.1.1
Link to Minimal Reproduction
Steps to Reproduce
According to the instructions on the official website, using setOption(option, {notMerge: true, lazyUpdate: false, silent:false}) to dynamically update the chart will cause the JS event listeners to continue to accumulate, causing the page to freeze and eventually memory overflow.
Even if you set all to be empty in the updated option, it still keeps increasing (data:[])
The data is well constructed, and the listeners will not be added only if the rendering is not performed. As long as the rendering is performed, it will continue to accumulate regardless of whether it is empty or not.
Current Behavior
Expected Behavior
How to render to solve the memory overflow problem
Environment
Any additional comments?
7vhp5slm2#
@qinxiangling Please provide a demo for the issue either with Official Editor , CodePen , CodeSandbox or JSFiddle .