I am currently using Chart.js to display a pie chart that is populated with dynamic data from a query and would like to have the pie chart redraw when the data has been changed. Fortunately the data only changes when a user clicks a button so I have a good trigger, but I am not sure how to have the pie chart redraw each time this occurs. Has this been done before and what do I need to do to make my chart refresh when the dynamic data changes?
1 thought on “Update with onClick when data changes?”
Comments are closed.
Please use
.update()
Documentation under http://www.chartjs.org/docs/#line-chart-prototype-methods
If this fixes the issue, please close