StackedBarChart

fun StackedBarChart(data: () -> List<StackBarData>, modifier: Modifier = Modifier, target: Float? = null, targetConfig: TargetConfig = TargetConfig.default(), stackBarConfig: StackBarConfig = StackBarConfig.default(), barChartColorConfig: BarChartColorConfig = BarChartColorConfig.default(), labelConfig: LabelConfig = LabelConfig.default(), onBarClick: (Int, StackBarData) -> Unit = { _, _ -> })

A composable function that displays a stacked bar chart.

Parameters

data

A lambda function that returns a list of StackBarData representing the data to be displayed.

modifier

A Modifier for this composable.

target

An optional target value to be displayed as a line on the chart.

targetConfig

Configuration for the target line.

stackBarConfig

Configuration for the stacked bar chart.

barChartColorConfig

Configuration for the colors used in the bar chart.

labelConfig

Configuration for the labels displayed on the chart.

onBarClick

A lambda function to be invoked when a bar is clicked, with the index and data of the clicked bar.