registerForUpdates

open fun registerForUpdates(key: Any, cancelAnimation: () -> Unit, startAnimation: (transformModel: suspend (chartKey: Any, fraction: Float) -> Unit) -> Unit, getOldModel: () -> Model?, modelTransformerProvider: Chart.ModelTransformerProvider?, extraStore: MutableExtraStore, updateChartValues: (Model?) -> ChartValuesProvider, onModelCreated: (Model?, ChartValuesProvider) -> Unit)

Registers an update listener associated with a key. cancelAnimation and startAnimation are called after a data update is requested, with cancelAnimation being called before the update starts being processed, and startAnimation being called once the update has been processed. updateChartValues updates the chart’s ChartValues and returns its ChartValuesProvider. onModelCreated is called when a new Model has been generated.


abstract fun registerForUpdates(key: Any, cancelAnimation: () -> Unit, startAnimation: (transformModel: suspend (chartKey: Any, fraction: Float) -> Unit) -> Unit, getOldModel: () -> Model?, modelTransformerProvider: Chart.ModelTransformerProvider?, extraStore: MutableExtraStore, updateChartValues: (Model?) -> ChartValuesProvider, onModelCreated: (Model?) -> Unit)

Deprecated

Use the overload in which `onModelCreated` has two parameters. In custom `ChartModelProducer` implementations, the aforementioned overload should be overridden, and this one can do nothing.

Registers an update listener associated with a key. cancelAnimation and startAnimation are called after a data update is requested, with cancelAnimation being called before the update starts being processed (at which point transformModel should stop being used), and startAnimation being called once the update has been processed (at which point it’s safe to use transformModel). updateChartValues updates the chart’s ChartValues and returns its ChartValuesProvider. onModelCreated is called when a new Model has been generated.