Sparkline¶
Tiny inline chart for showing trends.
Usage¶
Props¶
| Prop | Type | Default | Description |
|---|---|---|---|
data |
number[] |
required | Raw numeric data points |
width |
number |
data.length |
Width in cells |
min |
number |
auto (Math.min(...data)) |
Minimum value for scaling |
max |
number |
auto (Math.max(...data)) |
Maximum value for scaling |
highRes |
boolean |
false |
Render with graphics drawlists when supported |
blitter |
"braille" \| "sextant" \| "quadrant" \| "halfblock" |
"braille" |
Sub-cell renderer used in highRes mode |
style |
TextStyle |
- | Optional style override |
Notes¶
- Values are normalized internally using
(value - min) / (max - min). - Use
min/maxto pin the scale when comparing multiple sparklines. - For multi-series data, render multiple sparklines in a
row. highResautomatically falls back to text rendering on non-graphics builders.