Expand description
A deliberately narrow trend reading, not a charting framework.
A sparkline has no axes, ticks, legend, tooltip, locale or scale policy.
The caller supplies points already normalized into the inclusive 0..=1
square, plus the exact label and current, minimum and maximum text a reader
should receive. x = 0 is the leading edge, x = 1 the trailing edge,
y = 0 the bottom and y = 1 the top. Points outside that square or with
non-finite coordinates are skipped rather than clamped into a value the
caller did not supply.
GPUI’s existing stroked path is used directly. The path has no motion, locale lookup or layout-dependent sampling, so the same normalized points produce the same geometry for the same bounds.
Structs§
- Sparkline
- A compact, accessible trend reading.
- Sparkline
Point - One point already normalized by the caller.
- Sparkline
Reading - The plotted points and the exact text that makes them accessible.
Enums§
- Sparkline
State - The complete state of one trend reading.