XYChartScope

Deprecated

XYChart has been deprecated in favor of XYGraph

Replace with

XYGraphScope

A scope for XY plots providing axis and state context.

Properties

Link copied to clipboard
abstract val xAxisModel: AxisModel<X>
Link copied to clipboard
abstract val xAxisState: AxisState
Link copied to clipboard
abstract val yAxisModel: AxisModel<Y>
Link copied to clipboard
abstract val yAxisState: AxisState

Functions

Link copied to clipboard
fun <X, Y> XYChartScope<X, Y>.HorizontalLineAnnotation(location: Y, lineStyle: LineStyle)

Places a vertical line marker on the plot at the specified x-axis location styled using the provided lineStyle.

Link copied to clipboard
abstract fun Modifier.hoverableElement(element: @Composable () -> Unit): Modifier
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
open fun scale(point: Point<X, Y>, size: Size): Offset

Transforms point from AxisModel space to display coordinates provided a plot area size.

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
fun <X, Y> XYChartScope<X, Y>.VerticalLineAnnotation(location: X, lineStyle: LineStyle)

Places a vertical line marker on the plot at the specified x-axis location styled using the provided lineStyle.

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.