Package-level declarations

Types

Link copied to clipboard
fun interface AutoScrollCondition

Defines when an automatic scroll should be performed.

Link copied to clipboard

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

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open class FadingEdges(startWidth: Dp = FadingEdgesDefaults.edgeWidth, endWidth: Dp = FadingEdgesDefaults.edgeWidth, visibilityThreshold: Dp = FadingEdgesDefaults.visibilityThreshold, visibilityEasing: Easing = FadingEdgesDefaults.visibilityEasing)

FadingEdges applies a horizontal fade to the edges of the chart area for scrollable charts. This effect indicates that there’s more content beyond a given edge, and the user can scroll to reveal it.

Link copied to clipboard
sealed interface Scroll

Represents a CartesianChart scroll value or delta.

Link copied to clipboard

Houses information on a CartesianChart’s scroll value. Allows for scroll customization and programmatic scrolling.

Link copied to clipboard

Houses information on a CartesianChart’s zoom factor. Allows for zoom customization.

Link copied to clipboard
fun interface Zoom

Represents a CartesianChart’s zoom factor.

Functions

Link copied to clipboard
fun CartesianChartHost(chart: CartesianChart, model: CartesianChartModel, modifier: Modifier = Modifier, scrollState: VicoScrollState = rememberVicoScrollState(), zoomState: VicoZoomState = rememberDefaultVicoZoomState(scrollState.scrollEnabled), consumeMoveEvents: Boolean = false)

Displays a CartesianChart. This function accepts a CartesianChartModel. For dynamic data, use the function overload that accepts a CartesianChartModelProducer instance.

fun CartesianChartHost(chart: CartesianChart, modelProducer: CartesianChartModelProducer, modifier: Modifier = Modifier, scrollState: VicoScrollState = rememberVicoScrollState(), zoomState: VicoZoomState = rememberDefaultVicoZoomState(scrollState.scrollEnabled), animationSpec: AnimationSpec<Float>? = defaultCartesianDiffAnimationSpec, animateIn: Boolean = true, consumeMoveEvents: Boolean = false, placeholder: @Composable BoxScope.() -> Unit = {})

Displays a CartesianChart.

Link copied to clipboard
fun rememberCartesianChart(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() }): CartesianChart

Creates and remembers a CartesianChart.

Link copied to clipboard
fun rememberFadingEdges(width: Dp = FadingEdgesDefaults.edgeWidth, visibilityThreshold: Dp = FadingEdgesDefaults.visibilityThreshold, visibilityEasing: Easing = FadingEdgesDefaults.visibilityEasing): FadingEdges
fun rememberFadingEdges(startWidth: Dp = FadingEdgesDefaults.edgeWidth, endWidth: Dp = FadingEdgesDefaults.edgeWidth, visibilityThreshold: Dp = FadingEdgesDefaults.visibilityThreshold, visibilityEasing: Easing = FadingEdgesDefaults.visibilityEasing): FadingEdges

Creates and remembers a FadingEdges instance.

Link copied to clipboard
fun rememberVicoScrollState(scrollEnabled: Boolean = true, initialScroll: Scroll.Absolute = Scroll.Absolute.Start, autoScroll: Scroll = initialScroll, autoScrollCondition: AutoScrollCondition = AutoScrollCondition.Never, autoScrollAnimationSpec: AnimationSpec<Float> = spring()): VicoScrollState

Creates and remembers a VicoScrollState instance.

Link copied to clipboard
fun rememberVicoZoomState(zoomEnabled: Boolean = true, initialZoom: Zoom = remember { Zoom.max(Zoom.fixed(), Zoom.Content) }, minZoom: Zoom = Zoom.Content, maxZoom: Zoom = remember { Zoom.max(Zoom.fixed(Defaults.MAX_ZOOM), Zoom.Content) }): VicoZoomState

Creates and remembers a VicoZoomState instance.