2👍
✅
Change this :
myChart.data.datasets[0] = foo['datasets'][0];
myChart.data.labels = foo['labels'];
myChart.update();
To this :
myChart.config.data = foo;
myChart.update();
Edit after comments :
Source:stackexchange.com