XYChart Scope
Deprecated
XYChart has been deprecated in favor of XYGraph
Replace with
XYGraphScope
Content copied to clipboard
A scope for XY plots providing axis and state context.
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <X, Y> XYChartScope<X, Y>.LineChart(data: List<Point<X, Y>>, modifier: Modifier = Modifier, lineStyle: LineStyle? = null, symbol: @Composable HoverableElementAreaScope.(Point<X, Y>) -> Unit? = null, areaStyle: AreaStyle? = null, areaBaseline: AreaBaseline<X, Y>? = null, animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec)
Link copied to clipboard
fun <X, Y> XYChartScope<X, Y>.StackedAreaChart(data: List<MultiPoint<X, Y>>, styles: List<StackedAreaStyle>, firstBaseline: AreaBaseline.ConstantLine<X, Y>, modifier: Modifier = Modifier, animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec)
Link copied to clipboard
fun <X, Y> XYChartScope<X, Y>.StairstepChart(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)
Link copied to clipboard
fun <X, Y, E : BarChartEntry<X, Y>> XYChartScope<X, Y>.VerticalBarChart(series: List<List<E>>, modifier: Modifier = Modifier, bar: VerticalBarComposable<E> = { i, _, _ ->
val colors = remember(series.size) { generateHueColorPalette(series.size) }
DefaultVerticalBar(
brush = SolidColor(colors[i]),
modifier = Modifier.fillMaxWidth(KoalaPlotTheme.sizes.barWidth)
)
}, stacked: Boolean = false, maxBarGroupWidth: Float = 0.9f, animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec)
A VerticalBarChart to be used in an XYChart and that can plot multiple series either side-by-side or stacked as a stacked bar chart.
Link copied to clipboard
Link copied to clipboard
fun <X, Y> XYChartScope<X, Y>.XYAnnotation(location: Point<X, Y>, anchorPoint: AnchorPoint, modifier: Modifier = Modifier, content: @Composable () -> Unit)
Places a Composable as an annotation on an XYChart with the Composable's anchorPoint placed at the provided location.