pepstock-org / Charba

J2CL and GWT Charts library based on CHART.JS
https://pepstock-org.github.io/Charba-Wiki/docs
Apache License 2.0
62 stars 6 forks source link

Incomplete explanation how to change the options of chart instance at runtime #46

Closed stockiNail closed 4 years ago

stockiNail commented 4 years ago

In the WIKI page about Options, there is an incomplete explanation about how to change the options at runtime.

The options, set to the chart to configure the chart, are cloned by Chart.JS therefore if the options must be changed at runtime, by a plugin, callback or whatever else, you can access to the options by a chart instance, if the chart is initialized (check by chart.isInitialized())

// --------------------------------------
// Chart options, cloned and update at runtime
// --------------------------------------
chart.getNode().getOptions();

This method was true before version 2.6 because it wasn't implemented the reconfiguration of a chart instance (in current version by updateOptions, which will be renamed into reconfigure).

stockiNail commented 4 years ago

Fixed into wiki for new release