BarChart

fun BarChart(dataSet: ChartDataSet, style: BarChartStyle = BarChartDefaults.style(), interactionEnabled: Boolean = true, animateOnStart: Boolean = true, selectedBarIndex: Int = NO_SELECTION)

A composable function that displays a Bar Chart.

Parameters

dataSet

The data set to be displayed in the chart.

style

The style to be applied to the chart. If not provided, the default style will be used.

interactionEnabled

Enables touch interactions (tap selection and scroll/zoom). Defaults to true.

animateOnStart

Enables initial chart animations. Defaults to true.

selectedBarIndex

Optional preselected bar index for deterministic rendering (e.g. screenshots).