CamoLineChart
A chart of values over an ordered axis, as lines, areas or stacked areas, with a legend that toggles series, a
tooltip and crosshair at the nearest category, and a data table. categories label the x axis (one per value);
times (epoch milliseconds, ascending, timeZoneOffsetMinutes from UTC) places them on a time axis with
calendar ticks instead. The plot is one image node whose text is title and each series' trend; focusing it
walks the points (Left and Right between categories, Up and Down between series, Home and End) and announces
"Jan, Sales, 42". A null value breaks the line; stacked areas treat negative values as zero. The time axis
keeps its direction in a right-to-left layout, as time does.
API
- Kotlin
- Dart
public fun CamoLineChart(
categories: List<String>,
series: List<ChartSeries>,
title: String,
modifier: Modifier = Modifier,
kind: LineKind = LineKind.Line,
curve: LineCurve = LineCurve.Linear,
markers: MarkerVisibility = MarkerVisibility.OnHover,
xAxis: ChartAxis = ChartAxis(),
yAxis: ChartAxis = ChartAxis(),
times: List<Long>? = null,
timeZoneOffsetMinutes: Int = 0,
loading: Boolean = false,
empty: (@Composable () -> Unit)? = null,
showTable: Boolean = false,
plotHeight: Dp = DefaultPlotHeight,
style: ChartStyle? = null,
)
| Name | Type | Default |
|---|---|---|
categories | List<String> | required |
series | List<ChartSeries> | required |
title | String | required |
modifier | Modifier | Modifier |
kind | LineKind | LineKind.Line |
curve | LineCurve | LineCurve.Linear |
markers | MarkerVisibility | MarkerVisibility.OnHover |
xAxis | ChartAxis | ChartAxis() |
yAxis | ChartAxis | ChartAxis() |
times | List<Long>? | null |
timeZoneOffsetMinutes | Int | 0 |
loading | Boolean | false |
empty | (@Composable () -> Unit)? | null |
showTable | Boolean | false |
plotHeight | Dp | DefaultPlotHeight |
style | ChartStyle? | null |
Why CamoLineChart works this way, its states and its edge cases: contributor docs.