GroupedVerticalBarPlot

fun <X, Y, E : VerticalBarPlotGroupedPointEntry<X, Y>> XYGraphScope<X, Y>.GroupedVerticalBarPlot(data: List<E>, modifier: Modifier = Modifier, bar: @Composable BarScope.(dataIndex: Int, groupIndex: Int, entry: E) -> Unit = { i, g, _ -> val colors = remember(data) { generateHueColorPalette(data.maxOf { it.y.size }) } DefaultVerticalBar( brush = SolidColor(colors[g]), modifier = Modifier.fillMaxWidth(KoalaPlotTheme.sizes.barWidth) ) }, maxBarGroupWidth: Float = 0.9f, animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec)

A Vertical Bar Plot to be used in an XYGraph and that plots multiple series side-by-side.

Parameters

X

The type of the x-axis values

Y

The type of the y-axis values

E

The type of the data element holding the values for each bar

data

Coordinate data for the bars to be plotted.

bar

Composable function to emit a bar for each data element, see VerticalBarComposable.

maxBarGroupWidth

The fraction of space between adjacent x-axis bars or bar groups that may be used. Must be between 0 and 1, defaults to 0.9.


fun <X, Y> XYGraphScope<X, Y>.GroupedVerticalBarPlot(modifier: Modifier = Modifier, maxBarGroupWidth: Float = 0.9f, animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec, content: GroupedVerticalBarPlotScope<X, Y>.() -> Unit)

A Vertical Bar Plot to be used in an XYGraph and that plots multiple series side-by-side.

Parameters

X

The type of the x-axis values

Y

The type of the y-axis values

maxBarGroupWidth

The fraction of space between adjacent x-axis bars or bar groups that may be used. Must be between 0 and 1, defaults to 0.9.

content

A block which describes the content for the plot.