core
CartesianChart
CartesianChartModelProducer
CartesianLayer
CandlestickCartesianLayer
ColumnCartesianLayer
LineCartesianLayer
Axis
CartesianValueFormatter
CartesianMarker
Decoration
Component
Fill
Shape
Legend
compose
VicoTheme
views
The following has been adapted from the “Basic column chart” sample chart.
val modelProducer = remember { CartesianChartModelProducer() } LaunchedEffect(Unit) { modelProducer.runTransaction { columnSeries { series(5, 6, 5, 2, 11, 8, 5, 2, 15, 11, 8, 13, 12, 10, 2, 7) } } } CartesianChartHost( rememberCartesianChart( rememberColumnCartesianLayer(), startAxis = rememberStartAxis(), bottomAxis = rememberBottomAxis(), ), modelProducer, )
The following has been adapted from the “Basic line chart” sample chart.
val modelProducer = remember { CartesianChartModelProducer() } LaunchedEffect(Unit) { modelProducer.runTransaction { lineSeries { series(13, 8, 7, 12, 0, 1, 15, 14, 0, 11, 6, 12, 0, 11, 12, 11) } } } CartesianChartHost( rememberCartesianChart( rememberLineCartesianLayer(), startAxis = rememberStartAxis(), bottomAxis = rememberBottomAxis(), ), modelProducer, )
For more examples, refer to the sample app.