-
Notifications
You must be signed in to change notification settings - Fork 140
180_Update_Chart
Francois Vancoppenolle edited this page Apr 2, 2015
·
3 revisions
Previous Page Next Page Table of content
It's possible to update a chart with new values or new options. To do this, the best method is to use the "updateChart" function delivered with ChartNew.js.
function updateChart(ctx,data,config,animation,runanimationcompletefunction)
- ctx : context that need to be updated;
- data : the (new) data for the context;
- config : the (new) config options;
- animation : 'true' or 'false' -> set the value to true if you want that the updated chart is animated;
- runanimationcompletefunction : 'true' or 'false' -> set the value to true if you want that the "onAnimationComplete" function has to be executed at the end of the display. "runanimationcompletefunction" can be set to true (and executed) even if the animation parameter is set to false.
Example : see Samples/UpdateChart.html