CartesianChart
Host
The CartesianChart host for Jetpack Compose is the CartesianChartHost composable function.
Creation
Instantiate CartesianChart via rememberCartesianChart, whose parameters match those of the CartesianChart constructor:
CartesianChartHost(chart = rememberCartesianChart(/* ... */), /* ... */)Scroll and zoom
CartesianChartHost accepts instances of VicoScrollState and VicoZoomState. Use rememberVicoScrollState and rememberVicoZoomState to instantiate these classes:
val scrollState = rememberVicoScrollState(/* ... */)
val zoomState = rememberVicoZoomState(/* ... */)
CartesianChartHost(scrollState = scrollState, zoomState = zoomState, /* ... */)Last updated