0👍
After adding elements to data.labels
and values to data.datasets.data
, you need to invoke chart.update()
.
Please consult Adding or Removing Data from Chart.js documentation.
- Chartjs-Charting with chartjs, can't get it working correctly
- Chartjs-Fill color to pointer in Chartjs
Source:stackexchange.com