core
CartesianChart
CartesianChartModelProducer
CartesianLayer
CandlestickCartesianLayer
ColumnCartesianLayer
LineCartesianLayer
Axis
CartesianValueFormatter
CartesianMarker
Decoration
Component
Fill
Shape
Legend
compose
VicoTheme
views
<com.patrykandpatrick.vico.views.cartesian.CartesianChartView android:id="@+id/cartesian_chart_view" android:layout_width="match_parent" android:layout_height="wrap_content" app:layers="column" app:showBottomAxis="true" app:showStartAxis="true" />
At the top level of the Activity:
Activity
val modelProducer = CartesianChartModelProducer()
In onCreate:
onCreate
cartesianChartView.modelProducer = modelProducer lifecycleScope.launch { modelProducer.runTransaction { columnSeries { series(4, 12, 8, 16) } } }
<com.patrykandpatrick.vico.views.cartesian.CartesianChartView android:id="@+id/cartesian_chart_view" android:layout_width="match_parent" android:layout_height="wrap_content" app:layers="line" app:showBottomAxis="true" app:showStartAxis="true" />
cartesianChartView.modelProducer = modelProducer lifecycleScope.launch { modelProducer.runTransaction { lineSeries { series(4, 12, 8, 16) } } }
Refer to the sample app—see “Sample app” under “Learning resources” in the preface.