tayyeowleng commented on issue #19248: URL: https://github.com/apache/echarts/issues/19248#issuecomment-1788737316
Dispose and Rebuild of the Container Node We assume that there exist several bookmark pages and each page contained some charts. In this case, the content in other pages will be removed in DOM when select one page. The user will not find the chart after reselecting these pages. Essentially, this is because the container node of the charts was removed. Even if the node is added again later, the node where the graph is located no longer exists. The correct way is, call [echartsInstance.dispose](https://echarts.apache.org/api.html#echartsInstance.dispose) to dispose the instance after the container was disposed, and call [echarts.init](https://echarts.apache.org//api.html#echarts.init) to initialize after the container was added again. Tips: Call [echartsInstance.dispose](https://echarts.apache.org/api.html#echartsInstance.dispose) to release resources while disposing the node to avoid memory leaks. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org