Stacked Bar Chart
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.
target Config
Configuration for the target line.
stack Bar Config
Configuration for the stacked bar chart.
bar Chart Color Config
Configuration for the colors used in the bar chart.
label Config
Configuration for the labels displayed on the chart.
on Bar Click
A lambda function to be invoked when a bar is clicked, with the index and data of the clicked bar.