Topic: Chart Destroy / Dispose / and Clear Canvas
edharris4 free asked 2 years ago
As attempting to update initialized pie and doughnut charts which have the percentage values displayed on the chart causes an error as in my previous post, I am attempting to code a temporary-workaround by destroying and disposing of the chart instances and clearing the canvas so that I can put a new chart on the same canvas with the same chart type that would have had the new updated data.
However, trying doughnutInstance.destroy() , doughnutInstance.dispose(), and doughnutInstance.clear() does not work. There was a similar question already asked 3 weeks ago by another user and a solution was posted, but that link no longer exists as it seems to have been removed.
Kamila Pieńkowska staff answered 2 years ago
Here is a link to the thread: https://mdbootstrap.com/support/standard/chart-destroy-method/
And here snippet with an example: https://mdbootstrap.com/snippets/standard/kpienkowska/4434713
edharris4 free commented 2 years ago
The link for the snippet still gives a 404 error that the link is not found just as it did in the thread 3 weeks ago.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB Standard
- MDB Version: MDB5 5.0.0
- Device: Any Computer
- Browser: Chrome, iOS,
- OS: linux, PHP8, mySQL
- Provided sample code: No
- Provided link: No