CartesianChartHost

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

Displays a CartesianChart.

Parameters

chart
modelProducer

creates and updates the CartesianChartModel.

modifier

the modifier to be applied to the chart.

scrollState

houses information on the CartesianChart’s scroll value. Allows for scroll customization and programmatic scrolling.

zoomState

houses information on the CartesianChart’s zoom factor. Allows for zoom customization.

animationSpec

the AnimationSpec for difference animations.

animateIn

whether to run an initial animation when the CartesianChartHost enters composition. The animation is skipped for previews.

placeholder

shown when no CartesianChartModel is available.


fun CartesianChartHost(chart: CartesianChart, model: CartesianChartModel, modifier: Modifier = Modifier, scrollState: VicoScrollState = rememberVicoScrollState(), zoomState: VicoZoomState = rememberDefaultVicoZoomState(scrollState.scrollEnabled))

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

Parameters

chart
modifier

the modifier to be applied to the chart.

scrollState

houses information on the CartesianChart’s scroll value. Allows for scroll customization and programmatic scrolling.

zoomState

houses information on the CartesianChart’s zoom factor. Allows for zoom customization.