Chartjs-Strange issue with Chart.js bar chart, image scattering

1👍

You might be interested by this post. You need to clear the canvas at the beginning of your makeGrafico function.

In a first time, you should try adding window.myBar.destroy(). If it does not work, you should consider deleting the canvas element and then creating it again :

var $parent = $('#canvas').parent();
$('#canvas').remove();
$parent.append('<canvas id="canvas"></canvas>');

Leave a comment