Chartjs-Charts.js doughnut

0👍

In order to use the same canvas you have to clear the reference(s) to it. Charts.js states that you must use .destroy() to clear all references to the canvas.

You read about it here: Charts.js .destroy()

I had the same issue in some dynamic charts that I made so I found it easier to just create a div around the canvas, clear the div using jquery $(“#divID”).empty(), and then append the new canvas.

Leave a comment