Skip to content
Francois Vancoppenolle edited this page Apr 2, 2015 · 3 revisions

Previous Page         Next Page          Table of content

Update Chart

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.

updateChart parameters

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

Previous Page         Next Page          Top of Page