how to clear a chartjs code example
Example: chart js clear out chart
if( typeof window.myChart2 !== 'undefined'){
window.myChart2.destroy();
}
if( typeof window.myChart2 !== 'undefined'){
window.myChart2.destroy();
}