Functions

Link copied to clipboard
abstract fun getModel(): Model?

Returns the ChartEntryModel or, if no ChartEntryModel is available, null.

Link copied to clipboard
abstract fun isRegistered(key: Any): Boolean

Checks if an update listener with the given key is registered.

Link copied to clipboard
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)

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.

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.

Link copied to clipboard
open fun requireModel(): Model

Returns the ChartEntryModel or, if no ChartEntryModel is available, throws an exception.

Link copied to clipboard
abstract suspend fun transformModel(key: Any, fraction: Float)

Creates an intermediate ChartEntryModel for difference animations. fraction is the balance between the initial and target ChartEntryModels.

Link copied to clipboard
abstract fun unregisterFromUpdates(key: Any)

Unregisters the update listener associated with the given key.