Sparkline
The day in one small line. No axis, no dot, no numbers: the number next to it says how much, the line says how.
Specs
Every value is a token from Foundations. The names match Figma and the Flutter file.
Sizes
64 by 28 in a row, 136 by 44 on a card
Line
2.5 stroke, the icons' weight, round caps and joins, inset by half the stroke so the caps stay inside
Points
17 in a row and 37 on a card, thinned from the day's 73, joined by the same monotone curve as the price chart
Colour
status/success when the day is up, status/danger when it is downFill
only on the card size: the line's colour from 20% to 0
Motion
none. It is redrawn when the data changes
Usage
Do
- Put the change in words next to it: the line is the shape, the number is the fact.
- Scale every line to its own high and low, so a quiet coin and a loud one both read.
Don't
- Don't make it something to press or read point by point. That is the price chart.
- Don't compare two sparklines by height: each has its own scale.
Accessibility
- Next to a written change it is decoration and hidden from a screen reader.
- On its own it needs a label that says the change in words.
- Focus: a 2px
focus/ring2px outside the shape, for keyboard and switch control only. Targets are 44pt or more.