Chart.js: Update with onClick when data changes?

Created on 24 May 2014  Â·  2Comments  Â·  Source: chartjs/Chart.js

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?

support

All 2 comments

Please use .update()

Documentation under http://www.chartjs.org/docs/#line-chart-prototype-methods

If this fixes the issue, please close

Is there other way to update all the points at once?

Was this page helpful?
0 / 5 - 0 ratings