Package-level declarations

Types

Link copied to clipboard
sealed interface AreaBaseline<X, Y>

Specifies baseline coordinates for drawing filled areas on line charts.

Link copied to clipboard

An interface for computing the two control points of a cubic Bézier curve segment. The curve segment connects the current and next data points.

Link copied to clipboard
sealed class StackArea<X, Y>

A StackArea defines how to draw a line and its subtending area in a StackedAreaPlot.

Link copied to clipboard

Adapts data for use in a StackedAreaPlot where the input data consists of a List of x-axis coordinates and multiple Lists of Float y-axis coordinates, one per line, where the values are before stacking. This adapter will sum y-axis values to compute each line's height in the StackedAreaPlot. The size of xData and all series in yData must be equal.

Link copied to clipboard

Represents a set of points for a StackedAreaPlot.

Link copied to clipboard
data class StackedAreaStyle(val lineStyle: LineStyle, val areaStyle: AreaStyle)

Provides styling for a single series in a StackedAreaPlot.

Functions

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

An area plot that draws data as points and lines with a filled area to a baseline.

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

An area plot that draws data as points and lines with a filled area to a baseline.

Link copied to clipboard

Creates a CubicBezierControlPointCalculator that generates control points for a Catmull-Rom spline, resulting in a smooth curve that passes through all data points.

Link copied to clipboard
fun <X, Y> XYGraphScope<X, Y>.CubicBezierLinePlot(data: List<Point<X, Y>>, modifier: Modifier = Modifier, control: CubicBezierControlPointCalculator = catmullRomControlPoints(DefaultTau), lineStyle: LineStyle? = null, symbol: @Composable (Point<X, Y>) -> Unit? = null, animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec)

A line plot that draws a smooth, curved line that passes through each data point.

Link copied to clipboard

Creates a CubicBezierControlPointCalculator that generates control points for a horizontal Bézier curve.

Link copied to clipboard
fun <X, Y> XYGraphScope<X, Y>.LinePlot(data: List<Point<X, Y>>, modifier: Modifier = Modifier, lineStyle: LineStyle? = null, symbol: @Composable HoverableElementAreaScope.(Point<X, Y>) -> Unit? = null, animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec)

A line plot that draws data as points and lines on an XYGraph.

Link copied to clipboard
fun <X, Y> XYGraphScope<X, Y>.LinePlot2(data: List<Point<X, Y>>, modifier: Modifier = Modifier, lineStyle: LineStyle? = null, symbol: @Composable (Point<X, Y>) -> Unit? = null, animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec)

A line plot that draws data as points and lines on an XYGraph.

Link copied to clipboard
fun <X, Y> XYGraphScope<X, Y>.StackedAreaPlot(stacks: List<StackArea<X, Y>>, baseline: AreaBaseline<X, Y>, modifier: Modifier = Modifier.Companion, animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec)

A plot that renders multiple stacked series of data as lines with filled areas between them.

fun <X, Y> XYGraphScope<X, Y>.StackedAreaPlot(data: List<StackedAreaPlotEntry<X, Y>>, styles: List<StackedAreaStyle>, firstBaseline: AreaBaseline<X, Y>, modifier: Modifier = Modifier.Companion, animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec)

A Stacked Area Plot is like a line plot but with filled areas between lines.

Link copied to clipboard

Returns an instance of a StackedAreaPlotEntry using the provided data.

Link copied to clipboard
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.

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.

Link copied to clipboard
fun <X, Y> XYGraphScope<X, Y>.StairstepPlot2(data: List<Point<X, Y>>, lineStyle: LineStyle, modifier: Modifier = Modifier, symbol: @Composable (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.

fun <X, Y> XYGraphScope<X, Y>.StairstepPlot2(data: List<Point<X, Y>>, lineStyle: LineStyle, levelLineStyle: (Y) -> LineStyle, cap: StrokeCap = StrokeCap.Square, modifier: Modifier = Modifier, symbol: @Composable (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.

Link copied to clipboard
fun <X, Y> XYGraphScope<X, Y>.StairstepPlot3(data: List<Point<X, Y>>, lineStyle: LineStyle, levelLineStyle: (Y) -> LineStyle, modifier: Modifier = Modifier, cap: StrokeCap = StrokeCap.Square, symbol: @Composable (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.