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