CamoSparkline
A small trend with no axes, grid or legend, for a row or a card. It sizes to modifier (100 x 28 dp when that
doesn't say), scales to the data or to range, and breaks the line at null values. A sparkline is one image
node whose text is sparklineSummary: description names it ("Signups, last 30 days") and the text adds the
first and last values and the change, so the direction is never only a color. It is not focusable.
API
- Kotlin
- Dart
public fun CamoSparkline(
values: List<Double?>,
modifier: Modifier = Modifier,
kind: SparklineKind = SparklineKind.Line,
range: ClosedFloatingPointRange<Double>? = null,
highlight: SparklineHighlight = SparklineHighlight.Last,
tone: Tone = Tone.Default,
description: String? = null,
style: ChartStyle? = null,
)
| Name | Type | Default |
|---|---|---|
values | List<Double?> | required |
modifier | Modifier | Modifier |
kind | SparklineKind | SparklineKind.Line |
range | ClosedFloatingPointRange<Double>? | null |
highlight | SparklineHighlight | SparklineHighlight.Last |
tone | Tone | Tone.Default |
description | String? | null |
style | ChartStyle? | null |
Design notes
Why CamoSparkline works this way, its states and its edge cases: contributor docs.