Horizontal Bar Chart
fun HorizontalBarChart(data: () -> List<BarData>, modifier: Modifier = Modifier, barChartConfig: BarChartConfig = BarChartConfig.default(), barChartColorConfig: BarChartColorConfig = BarChartColorConfig.default(), horizontalBarLabelConfig: HorizontalBarLabelConfig = HorizontalBarLabelConfig.default(), onBarClick: (BarData) -> Unit = {})
A composable function that displays a horizontal bar chart.
Parameters
data
The list of BarData
objects representing the data to be displayed in the chart.
modifier
The modifier to be applied to the chart.
bar Chart Config
The configuration for the bar chart, including settings like minimum bar count, axis lines, and grid lines.
bar Chart Color Config
The color configuration for the bar chart, including colors for the bars, axis lines, and grid lines.
horizontal Bar Label Config
The configuration for the labels on the horizontal bars, including text colors and background colors.
on Bar Click
A lambda function to handle click events on the bars. It receives the clicked BarData
as a parameter.