[Chartjs]-Instead of creating new chart in ChartJS, the new updated chart keeps the old data and adds the new

0👍

I found a work-around that solves my problem, but I still think this is a bug in ChartJS. Before calling bigChart.destroy(), I now do two things: First, reset the data object back to it’s original value, and second, reset the config object back to it’s original value, THEN call bigChart.destroy().

I think the destroy() method should handle that for me, but in my case, for whatever reason, it doesn’t.

So, what I have is a work-around, not really a solution, but I’ll take it.

Leave a comment