VerticalBarPlot

fun <X> XYGraphScope<X, Float>.VerticalBarPlot(xData: List<X>, yData: List<Float>, modifier: Modifier = Modifier, bar: @Composable BarScope.(index: Int) -> Unit, barWidth: Float = 0.9f, animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec)

A VerticalBarPlot to be used in an XYGraph and that plots a single series of data points as vertical bars.

Parameters

X

The type of the x-axis values

xData

X-axis data points for where to plot the bars on the XYGraph. The size of xData and yData must match.

yData

y-axis data points for each bar. Assumes each bar starts at 0.

bar

Composable function to emit a bar for each data element, given the index of the point in the data and the value of the data point.

barWidth

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


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

A VerticalBarPlot to be used in an XYGraph and that plots data points as vertical bars.

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

Data points for where to plot the bars on the XYGraph

bar

Composable function to emit a bar for each data element, given the index of the point in the data.

barWidth

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


fun <X, Y> XYGraphScope<X, Y>.VerticalBarPlot(defaultBar: @Composable BarScope.() -> Unit = solidBar(Color.Blue), modifier: Modifier = Modifier, barWidth: Float = 0.9f, animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec, content: VerticalBarPlotScope<X, Y>.() -> Unit)

Creates a Vertical Bar Plot.

Parameters

defaultBar

A Composable to provide the bar if not specified on an individually added item.

barWidth

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

content

A block which describes the content for the plot.