score:8

Accepted answer

You can fix the issue by making var chart; global (put it right before your myFunction() call). Then your destroy should be if(chart) chart.destroy();


Related Query

More Query from same tag