Stacked Bar Chart
fun StackedBarChart(data: ChartData, modifier: Modifier = Modifier, style: StackedBarChartStyle = StackedBarChartDefaults.style(), title: String? = null, selection: ChartSelection = rememberChartSelection(), interactionEnabled: Boolean = true, animateOnStart: Boolean = true, selectedValueFormatter: ChartValueFormatter = StackedBarChartDefaults.selectedValueFormatter, axisValueFormatter: ChartValueFormatter = StackedBarChartDefaults.axisValueFormatter, subtitle: String? = null)(source)
Displays nonnegative absolute stacks from one aligned series per segment. selectedValueFormatter formats the selected values; axisValueFormatter formats Y ticks.
subtitle appears below the title and stays visible while a value is selected.
At least one series of at least two finite, nonnegative values is required. Series must have equal lengths, and each stacked total must be finite. Categories may be empty; otherwise their count must match the values in each series. Invalid data renders validation errors in place of the chart.