MutableMeasureContext

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.

Constructors

Link copied to clipboard
constructor(canvasBounds: RectF, density: Float, isLtr: Boolean, isHorizontalScrollEnabled: Boolean = false, horizontalLayout: HorizontalLayout = HorizontalLayout.Segmented, spToPx: (Float) -> Float, chartValuesProvider: ChartValuesProvider)

Properties

Link copied to clipboard
open override val canvasBounds: RectF

The bounds of the canvas that will be used to draw the chart and its components.

Link copied to clipboard

Provides the chart’s ChartValues instances.

Link copied to clipboard
open override var density: Float

The pixel density.

Link copied to clipboard

Defines how the chart’s content is positioned horizontally.

Link copied to clipboard

Whether horizontal scrolling is enabled.

Link copied to clipboard
open override var isLtr: Boolean

Whether the layout direction is left-to-right.

Link copied to clipboard

Functions

Link copied to clipboard
open override fun reset()

Removes all stored extras.

Link copied to clipboard
open override fun spToPx(sp: Float): Float

Converts the provided dimension from sp to px.