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
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
Facilitates adding persistent CartesianMarkers to CartesianCharts.
Properties
Link copied to clipboard
The bottom Axis.
Link copied to clipboard
The end Axis.
Link copied to clipboard
returns the CartesianLayerPadding.
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
The start Axis.
Link copied to clipboard
The top Axis.
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
Draws the CartesianChart.
Link copied to clipboard
fun prepare(context: CartesianMeasuringContext, horizontalDimensions: MutableHorizontalDimensions, canvasBounds: RectF)
Prepares the CartesianChart for drawing.
Link copied to clipboard
fun prepareForTransformation(model: CartesianChartModel?, extraStore: MutableExtraStore, ranges: CartesianChartRanges)
Prepares the CartesianLayers for a difference animation.
Link copied to clipboard
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