There is a chart instance already initialized on the dom.
See original GitHub issueI just created one chart and get this warning on console:
There is a chart instance already initialized on the dom. (echarts.js:2168)
I just update options. I’m on Ionic (Angular) and show this chart on page navigation. But this is not the problem. I get this warning only once or twice (directly at the same time).
If I navigate back and then forward again to the page with the chart, there is no more warning. Only the two (or sometimes only one) message you see above.
On ngOnChanges
I reassign the chart options like this.options = {...this.options}
to trigger an update.
Any idea? …
{
"echarts": "^5.0.2",
"ngx-echarts": "^6.0.1",
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
There is a chart instance already initialized on the dom!
On the current page, when you execute charts drawing for many times, the console will give a warning “there is a chart instance...
Read more >There is a chart instance already initialized on the dom!警告
用echarts时,如果存在DOM,就会报存在警告,处理方法删除DOM: echarts.dispose(document.getElementById(id)) 复制代码.
Read more >echart cannot be visualized on DOM even though there is an ...
Hello i have a wird issue that the echarts is not loading even there is an instance on the DOM. ... chart displayed...
Read more >Echarts:There is a chart instance already initialized ... - 零五网
使用Echarts 插件的时候,多次加载会出现 There is a chart instance already initialized on the dom! 错误,提示echarts 已经初始化过了。
Read more >消除There is a chart instance already initialized on the dom ...
消除There is a chart instance already initialized on the dom. React中使用echarts 注意事项.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Instead of updating the object passed to
[options]
, you can define the changing data in a separate variable and pass that variable to[merge]
.Example:
HTML:
Component:
?