I am using the Chart.js library to draw a bar graph, it is working fine, but now I want to destroy the bar graph and make
Remove the canvas after every chart call, this worked for me
$("canvas#chartreport").remove(); $("div.chartreport").append(''); var ctx = document.getElementById("chartreport").getContext("2d"); chartreport= new Chart(ctx, { .... });