CartesianChart

open class CartesianChart(layers: CartesianLayer<*>, startAxis: Axis<Axis.Position.Vertical.Start>? = null, topAxis: Axis<Axis.Position.Horizontal.Top>? = null, endAxis: Axis<Axis.Position.Vertical.End>? = null, bottomAxis: Axis<Axis.Position.Horizontal.Bottom>? = null, val marker: CartesianMarker? = null, markerVisibilityListener: CartesianMarkerVisibilityListener? = null, val layerPadding: (ExtraStore) -> CartesianLayerPadding = { CartesianLayerPadding() }, legend: Legend<CartesianMeasuringContext, CartesianDrawingContext>? = null, fadingEdges: FadingEdges? = null, decorations: List<Decoration> = emptyList(), persistentMarkers: CartesianChart.PersistentMarkerScope.(ExtraStore) -> Unit? = null, getXStep: (CartesianChartModel) -> Double = { it.getXDeltaGcd() }) : CartesianLayerInsetter<CartesianChartModel>

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

Parameters

startAxis

the start Axis.

topAxis

the top Axis.

endAxis

the end Axis.

bottomAxis

the bottom Axis.

Constructors

Link copied to clipboard
constructor(vararg layers: CartesianLayer<*>, startAxis: Axis<Axis.Position.Vertical.Start>? = null, topAxis: Axis<Axis.Position.Horizontal.Top>? = null, endAxis: Axis<Axis.Position.Vertical.End>? = null, bottomAxis: Axis<Axis.Position.Horizontal.Bottom>? = null, marker: CartesianMarker? = null, markerVisibilityListener: CartesianMarkerVisibilityListener? = null, layerPadding: (ExtraStore) -> CartesianLayerPadding = { CartesianLayerPadding() }, legend: Legend<CartesianMeasuringContext, CartesianDrawingContext>? = null, fadingEdges: FadingEdges? = null, decorations: List<Decoration> = emptyList(), persistentMarkers: CartesianChart.PersistentMarkerScope.(ExtraStore) -> Unit? = null, getXStep: (CartesianChartModel) -> Double = { it.getXDeltaGcd() })

Types

Link copied to clipboard
fun interface PersistentMarkerScope

Facilitates adding persistent CartesianMarkers to CartesianCharts.

Properties

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

The CartesianLayers of which this CartesianChart is composed.

Link copied to clipboard

appears when the CartesianChart is tapped.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun copy(vararg layers: CartesianLayer<*> = this.layers.toTypedArray(), startAxis: Axis<Axis.Position.Vertical.Start>? = this.startAxis, topAxis: Axis<Axis.Position.Horizontal.Top>? = this.topAxis, endAxis: Axis<Axis.Position.Vertical.End>? = this.endAxis, bottomAxis: Axis<Axis.Position.Horizontal.Bottom>? = this.bottomAxis, marker: CartesianMarker? = this.marker, markerVisibilityListener: CartesianMarkerVisibilityListener? = this.markerVisibilityListener, layerPadding: (ExtraStore) -> CartesianLayerPadding = this.layerPadding, legend: Legend<CartesianMeasuringContext, CartesianDrawingContext>? = this.legend, fadingEdges: FadingEdges? = this.fadingEdges, decorations: List<Decoration> = this.decorations, persistentMarkers: CartesianChart.PersistentMarkerScope.(ExtraStore) -> Unit? = this.persistentMarkers, getXStep: (CartesianChartModel) -> Double = this.getXStep): CartesianChart

Creates a new CartesianChart based on this one.

Link copied to clipboard
fun draw(context: CartesianDrawingContext, pointerPosition: Point?)

Draws the CartesianChart.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun prepare(context: CartesianMeasuringContext, horizontalDimensions: MutableHorizontalDimensions, canvasBounds: RectF)

Prepares the CartesianChart for drawing.

Link copied to clipboard

Prepares the CartesianLayers for a difference animation.

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

Carries out the pending difference animation.

Link copied to clipboard
open override fun updateHorizontalInsets(context: CartesianMeasuringContext, freeHeight: Float, model: CartesianChartModel, insets: HorizontalInsets)

Ensures that there are sufficient horizontal insets. freeHeight is the height of the CartesianLayer area.

Link copied to clipboard
open override fun updateInsets(context: CartesianMeasuringContext, horizontalDimensions: HorizontalDimensions, model: CartesianChartModel, insets: Insets)

Ensures that there are sufficient insets.

Link copied to clipboard

Updates ranges in accordance with model.