Chart
A compact SVG bar or line chart for a handful of values, with empty and loading states.
Reads this week
Live preview · click to try it
Variants
2 named variants. Layer names match the names below.
Reads this week
BarsChart / Bars
Reads this week
LineChart / Line
States
Reads this week
Chart / Default
Reads this week
Chart / Hover
No readings this week.
Chart / Empty
Loading readings…
Chart / Loading
The readings could not be loaded.
Chart / Error
Reads this week
Chart / Disabled
Reads this week
Chart / Focus
Usage
Do
- A short series, such as visits or sales, next to the figure it explains.
Don't
- Dense scientific plots or live trading data.
Properties
| Property | Type or options | Default |
|---|---|---|
| Variant | Bars · Line | Bars |
| Values | Array of numbers | Sample week |
| Label | String | Reads this week |
Styles it uses
Accent/AcidAccent/DeepSurface/TileInk/PrimaryInk/SecondaryLine/RuleState/Focus
Text: Data Mono · Caption
Accessibility
- Each value is also in a text table for screen readers.
- Colour is not the only way to tell bars apart.
- The chart is not the only content in a 44px target.