StairstepPlot

fun <X, Y> XYGraphScope<X, Y>.StairstepPlot(data: List<Point<X, Y>>, lineStyle: LineStyle, modifier: Modifier = Modifier, symbol: @Composable HoverableElementAreaScope.(Point<X, Y>) -> Unit? = null, areaStyle: AreaStyle? = null, areaBaseline: AreaBaseline<X, Y>? = null, animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec)

An XY Chart that draws series as points and stairsteps between points.

Parameters

X

The type of the x-axis values

Y

The type of the y-axis values

data

Data series to plot.

lineStyle

Style to use for the line that connects the data points.

areaStyle

Style to use for filling the area between the line and the 0-cross of the y-axis, or the y-axis value closest to 0 if the axis does not include 0. If null, no area will be drawn. lineStyle must also be non-null for the area to be drawn. each point having the same x-axis value.

areaBaseline

Baseline location for the area. Must be not be null if areaStyle and lineStyle are also not null. If areaBaseline is an AreaBaseline.ArbitraryLine then the size of the line data must be equal to that of data, and their x-axis values must match.

symbol

Composable for the symbol to be shown at each data point.

modifier

Modifier for the chart.


fun <X, Y> XYGraphScope<X, Y>.StairstepPlot(data: List<Point<X, Y>>, lineStyle: LineStyle, levelLineStyle: (Y) -> LineStyle, cap: StrokeCap = StrokeCap.Square, modifier: Modifier = Modifier, symbol: @Composable HoverableElementAreaScope.(Point<X, Y>) -> Unit? = null, areaStyle: (Y) -> AreaStyle? = null, areaBaseline: AreaBaseline<X, Y>? = null, animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec)

A StairstepPlot that differentiate lineStyle&areaBaseline at each Y-values based on levelLineStyle.

Parameters

X

The type of the x-axis values

Y

The type of the y-axis values

data

Data series to plot.

lineStyle

Style to use for the line that connects the data points.

levelLineStyle

Style to use for emphasizing the y-axis values. (Used for line that connects same-level data points, data that have same value (Y) should have the same style).

cap

Choose the StrokeCap used for level lines ending.

areaStyle

Style to use for filling the area between the line and the 0-cross of the y-axis, or the y-axis value closest to 0 if the axis does not include 0. If null, no area will be drawn. lineStyle must also be non-null for the area to be drawn. each point having the same x-axis value.

areaBaseline

Baseline location for the area. Must be not be null if areaStyle and lineStyle are also not null. If areaBaseline is an AreaBaseline.ArbitraryLine then the size of the line data must be equal to that of data, and their x-axis values must match.

symbol

Composable for the symbol to be shown at each data point.

modifier

Modifier for the chart.