1👍
This means you already made a chart on that canvas, so you must destroy that one first. This can de done like so:
const c = Chart.getChart(canvasId);
if (c) c.destroy();
new Chart(canvasId, config);
Source:stackexchange.com
1👍
This means you already made a chart on that canvas, so you must destroy that one first. This can de done like so:
const c = Chart.getChart(canvasId);
if (c) c.destroy();
new Chart(canvasId, config);