Chartjs-How to remove old data from Chart js on mouse hover using mvc c#?

0๐Ÿ‘

I am getting solution on this post my self just need to destroy the myChart variable every time new chart create. and also declare the globally variable so esially access.

Like this declare globally varibale in js =>

var myChart = '';

and just check like this condition on create chart time =>

if (myChart) myChart.destroy();

so using this condition every time your chart is create fresh and remove all old data.

Leave a comment