Data
Sparkline <pm-sparkline>
Sparkline: a small trend chart without axes, for stat cards and table cells.
Overview
Takes the colour of its tone. With a label it is announced with its first and last value; without one it is decorative. Size with --pm-sparkline-width / --pm-sparkline-height.
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
values | number[] | [] | The numbers to plot, in order: values="3,5,4,8" or an array property. |
type | 'line' | 'area' | 'bar' | — | line (default), area or bar. |
label | string | — | Accessible name, e.g. "Revenue, last 7 days". |
Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.