[Chartjs]-Chart.js not able to re-set data

1๐Ÿ‘

If you want to update your chart there is an update method this.chart.update();

this._graph.data.labels = Object.keys(data);
this._graph.data.datasets = dataSets;
this._graph.update();

0๐Ÿ‘

im working on vuejs and get the same error and my solution was just first call the datasets and then the renderChart so try this:

this._graph.data.datasets = dataSets;
this._graph.data.labels = Object.keys(data);

Leave a comment