StackedVerticalBarPlot

fun <X, Y, E : VerticalBarPlotStackedPointEntry<X, Y>> XYGraphScope<X, Y>.StackedVerticalBarPlot(data: List<E>, modifier: Modifier = Modifier, bar: @Composable BarScope.(xIndex: Int, barIndex: Int) -> Unit, barWidth: Float = 0.9f, animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec)

Composes a stacked vertical bar plot. This is a convenience method which defers to VerticalBarPlot. A stacked bar plot can be also achieved by placing multiple VerticalBarPlots on an io.github.koalaplot.core.xygraph.XYGraph, one for each "layer" of bars.

Parameters

data

A List of BarPlotStackedPointEntry data points to plot.

bar

A Composable function to render each bar. xIndex is the index into the data List, barIndex corresponds to the index provided to VerticalBarPlotStackedPointEntry.y, and point is the data point from data.


fun <X> XYGraphScope<X, Float>.StackedVerticalBarPlot(modifier: Modifier = Modifier, barWidth: Float = 0.9f, animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec, content: StackedVerticalBarPlotScope<X>.() -> Unit)

A Vertical Bar Plot to be used in an XYGraph and that plots multiple series as a stack of bars.

Parameters

X

The type of the x-axis values

barWidth

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

content

A block which describes the content for the plot.