[Chartjs]-Chart.js: load new data on click

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 :

link to latest state

Leave a comment