0👍
call the destroy method of the chart object
.destroy()
Use this to destroy any chart instances that are created. This will clean up any references stored to the chart object within Chart.js, along with any associated event listeners attached by Chart.js. This must be called before the canvas is reused for a new chart.
// Destroys a specific chart instance
myLineChart.destroy();
https://www.chartjs.org/docs/latest/developers/api.html?h=destroy
- Chartjs-How can I change the legend label without affecting my tooltip label?
- Chartjs-React-chartjs-2 (chart.js) Radar – Remove values?
Source:stackexchange.com