Dot Chart
The line is lit in the accent and the area under it is a blue-noise stipple, densest along the line and thinning toward the baseline. Move across it and a dotted guide follows from point to point with the value and its label above; at rest it shows the latest point. It can be focused and read point by point with the arrow keys, and it draws itself in from the left the first time it comes into view.
Needs: None. Canvas 2D.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| data | number[] | required | The values, oldest first. |
| labels | string[] | – | A short name for each point, like “OCT 12”, read beside the value. |
| format | (value: number) => string | – | How a value reads. |
| height | number | 160 | Height in px. It fills its container's width. |
| zero | boolean | false | Start the scale at zero. |
| area | boolean | true | A stipple under the line. |
| tone | string | – | The line's colour. The page's accent by default. |
| pitch | number | 3 | Size of one dot in px. |
| label | string | "Chart" | What the chart shows, for screen readers. |
| className | string | – | Class on the chart. |
| style | CSSProperties | – | Style on the chart. |