Sparkline · BarMini Widget
Shape of a series, sized to sit inside a Statistic. Lightweight Charts owns the plotted line, area
or histogram and its hidden scales. No visible axis or tooltip: a mini chart shows direction, while
the exact value belongs beside it. Import these client components from @ceebee/ui/client.
Usage
Revenue
35.2M
+9.4%
Signups
18
+3
The cases that break naive versions
- A flat series stays flat, with the scale chosen by Lightweight Charts.
- A single point stays visible through its marker even without a line segment.
- A zero-height bar is absent, not a fabricated positive value.
- Non-finite values are filtered out before anything is measured.
Do
Give it a label that names the series — 'Revenue trend', not 'Chart'.
Don't
Ask people to read values off it. It shows direction; the number belongs next to it.
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
| values | number[] | — | In order. Non-finite entries are ignored. |
| width / height | number | '100%' / number | 120 / 32 | The drawing box in px, or a responsive full-width chart with width='100%'. |
| tone / hue | Tone | DecorHue | tone='brand' | Line and fill colour. |
| filled | boolean | false | Sparkline only: fills under the line. |
| showLast | boolean | true | Sparkline only: dot on the final point. |
| label | string | — | Required accessible name. |