CartesianChart

open class CartesianChart(layers: List<CartesianLayer<*>>, var legend: Legend<CartesianMeasureContext, CartesianDrawContext>? = null, var fadingEdges: FadingEdges? = null) : BoundsAware, ChartInsetter

A chart based on a Cartesian coordinate plane, composed of CartesianLayers.

Constructors

Link copied to clipboard
constructor(vararg layers: CartesianLayer<*>, legend: Legend<CartesianMeasureContext, CartesianDrawContext>? = null, fadingEdges: FadingEdges? = null)
constructor(layers: List<CartesianLayer<*>>, legend: Legend<CartesianMeasureContext, CartesianDrawContext>? = null, fadingEdges: FadingEdges? = null)

Properties

Link copied to clipboard
Link copied to clipboard
open override val bounds: RectF

The bounds of the abstract component.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

applies a horizontal fade to the edges of the CartesianChart, provided that it’s scrollable.

Link copied to clipboard

The CartesianLayers of which this CartesianChart is composed.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun addDecoration(decoration: Decoration)

Adds the provided Decoration.

Link copied to clipboard

Adds the provided persistent CartesianMarker at x.

Link copied to clipboard
Link copied to clipboard
open override fun getHorizontalInsets(context: CartesianMeasureContext, availableHeight: Float, outInsets: HorizontalInsets)

Called during the measurement phase, after getInsets. Only horizontal insets can be requested from this function. Unless the available height is of interest, getInsets can be used to set all insets. The final inset for a given edge of the associated CartesianChart is the largest of the insets requested for the edge.

Link copied to clipboard
open override fun getInsets(context: CartesianMeasureContext, outInsets: Insets, horizontalDimensions: HorizontalDimensions)

Called during the measurement phase, before getHorizontalInsets. Both horizontal and vertical insets can be requested from this function. The final inset for a given edge of the associated CartesianChart is the largest of the insets requested for the edge.

Link copied to clipboard
fun prepare(context: CartesianMeasureContext, model: CartesianChartModel, horizontalDimensions: MutableHorizontalDimensions, bounds: RectF, marker: CartesianMarker?)

Prepares the CartesianChart for drawing.

Link copied to clipboard

Prepares the CartesianLayers for a difference animation.

Link copied to clipboard

Removes the specified Decoration, provided that it’s present.

Link copied to clipboard

Removes the persistent CartesianMarker at x, provided that there is such a CartesianMarker.

Link copied to clipboard
open override fun setBounds(left: Number, top: Number, right: Number, bottom: Number)

Sets the coordinates of the bounds to the provided values.

open fun setBounds(bounds: RectF)

Sets the coordinates of the bounds to the provided bounds.

Link copied to clipboard
fun setDecorations(decorations: List<Decoration>)

Removes all Decorations and adds the provided ones.

Link copied to clipboard

Removes all persistent CartesianMarkers and adds the provided ones.

Link copied to clipboard
suspend fun transform(extraStore: MutableExtraStore, fraction: Float)

Carries out the pending difference animation.

Link copied to clipboard

Updates chartValues in accordance with model.