CartesianChart

Host

The CartesianChartarrow-up-right host for Jetpack Compose is the CartesianChartHostarrow-up-right composable function.

Creation

Instantiate CartesianChart via rememberCartesianChartarrow-up-right, whose parameters match those of the CartesianChart constructor:

CartesianChartHost(chart = rememberCartesianChart(/* ... */), /* ... */)

Scroll and zoom

CartesianChartHost accepts instances of VicoScrollStatearrow-up-right and VicoZoomStatearrow-up-right. Use rememberVicoScrollStatearrow-up-right and rememberVicoZoomStatearrow-up-right to instantiate these classes:

val scrollState = rememberVicoScrollState(/* ... */)
val zoomState = rememberVicoZoomState(/* ... */)
CartesianChartHost(scrollState = scrollState, zoomState = zoomState, /* ... */)

Last updated