HorizontalBarPlot

fun <Y> XYGraphScope<Float, Y>.HorizontalBarPlot(xData: List<Float>, yData: List<Y>, modifier: Modifier = Modifier, bar: DefaultHorizontalBarComposable<Float, Y>, barWidth: Float = 0.9f, startAnimationUseCase: StartAnimationUseCase = StartAnimationUseCase( executionType = StartAnimationUseCase.ExecutionType.Default, /* chart animation */ KoalaPlotTheme.animationSpec, ))

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

Parameters

Y

The type of the x-axis values

xData

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

yData

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

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 : HorizontalBarPlotEntry<X, Y>> XYGraphScope<X, Y>.HorizontalBarPlot(data: List<E>, modifier: Modifier = Modifier, bar: DefaultHorizontalBarComposable<X, Y>, barWidth: Float = 0.9f, startAnimationUseCase: StartAnimationUseCase = StartAnimationUseCase( executionType = StartAnimationUseCase.ExecutionType.Default, /* chart animation */ KoalaPlotTheme.animationSpec, ))

A HorizontalBarPlot to be used in an XYGraph and that plots data points as horizontal 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>.HorizontalBarPlot(defaultBar: DefaultHorizontalBarComposable<X, Y> = horizontalSolidBar(Color.Blue), modifier: Modifier = Modifier, barWidth: Float = 0.9f, startAnimationUseCase: StartAnimationUseCase = StartAnimationUseCase( executionType = StartAnimationUseCase.ExecutionType.Default, /* chart animation */ KoalaPlotTheme.animationSpec, ), content: HorizontalBarPlotScope<X, Y>.() -> Unit)

Creates a Horizontal 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.