Package-level declarations

Types

Link copied to clipboard

The default implementation of Extras.

Link copied to clipboard

DrawContext is an extension of MeasureContext that stores a Canvas and other properties. It also defines helpful drawing functions.

Link copied to clipboard
interface Extras

An abstraction layer over Map used by MeasureContext and ChartDrawContext to store and retrieve data.

Link copied to clipboard

MeasureContext holds data used by various chart components during the measuring and drawing phases.

Link copied to clipboard
data class MutableMeasureContext(val canvasBounds: RectF, var density: Float, var isLtr: Boolean, var isHorizontalScrollEnabled: Boolean = false, var horizontalLayout: HorizontalLayout = HorizontalLayout.Segmented, var spToPx: (Float) -> Float, var chartValuesProvider: ChartValuesProvider) : MeasureContext, Extras

A MeasureContext implementation that facilitates the mutation of some of its properties.

Functions

Link copied to clipboard
fun <T : Any> Extras.getExtraOr(key: Any, block: () -> T): T

Returns the value of the extra with the given key if such an extra exists. Otherwise, returns the result of block.

Link copied to clipboard
fun <T : Any> Extras.getOrPutExtra(key: Any, block: () -> T): T

Returns the value of the extra with the given key if such an extra exists. Otherwise, returns the result of block and saves it as an extra with the given key.