0👍
If myChart.destroy() not working. Try myChart.update().
Try update like this:
var myChartData = myChart.data; // need to store in variable first
myChartData = chart_data; // chart_data from $_SESSION var
myChart.data = myChartData;
myChart.update();
Good luck.
- Chartjs-How to build dynamic charts with Chart.js
- Chartjs-What is the correct way to send 2 parameters in socket.io using lambdas? (I get undefined when printing in client and server)
Source:stackexchange.com