Sparkline macro
A tiny inline trend line of recent values, no axes or legend.
Preview
Loading the renderer…
createSurface + updateComponents, A2UI v0.9.
json
[
{
"version": "v0.9",
"createSurface": {
"surfaceId": "preview",
"catalogId": "https://ui.exponential.at/catalogs/core/v1"
}
},
{
"version": "v0.9",
"updateComponents": {
"surfaceId": "preview",
"components": [
{
"id": "root",
"component": "Stack",
"direction": "vertical",
"align": "stretch",
"children": [
"example"
]
},
{
"id": "example",
"component": "Sparkline",
"values": [
1,
3,
2,
5,
4
]
}
]
}
}
]This surface through a MemoryTransport. Install and transports: React guide.
This surface through a MemoryTransport. Install and transports: SwiftUI guide.
This surface through a MemoryTransport. Install and transports: Compose guide.
This surface through a MemoryTransport. Install and transports: gpui guide.
Platforms




View exponential-ui-sparkline, painted by each native renderer.
Variants
tone · neutraltone · primarytone · successtone · warningtone · dangertone · infoProps
| Prop | Type | Default | Description |
|---|---|---|---|
valuesrequiredbind | [number] | – | The points, oldest first. |
tone | neutral | primary | success | warning | danger | info | "primary" | The line colour tone. |
height | number | 24 | The height in px. |
Events and slots
No events, no slots. Children: none.
Accessibility
- Role
img- Semantics
- img with a generated summary (first, last, min, max). The Chart painter names it with
sparklineSummary(first, last, min, max).
Not focusable; no keys.
Theming
- Recipe parts
Sparkline/root- Keyed by
tone:hover:pressed:focus:disabled:checked:open:selected:invalid:dragover