CartesianChart
The CartesianChart
host
for Jetpack Compose is the CartesianChartHost
composable function.
Instantiate CartesianChart
via rememberCartesianChart
, whose parameters match those of the
CartesianChart
constructor:
CartesianChartHost(chart = rememberCartesianChart(/* ... */), /* ... */)
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, /* ... */)