Dot Gauge
A half-circle arc lit in the accent up to the reading, with the reading itself in the middle and a caption under it. Give it zones and the arc takes a zone's colour once the reading is in it, with the zones faintly marked on the unlit arc so you can see trouble coming. It eases to each new reading, and it's a meter to screen readers.
Needs: None. Canvas 2D.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | required | The reading. |
| min | number | 0 | The bottom of the scale. |
| max | number | 100 | The top of the scale. |
| format | (value: number) => string | – | How the reading shows in the middle. |
| caption | string | – | A short name under the arc, like “CPU”. |
| zones | { from: number; tone: string }[] | – | Where warning ranges start, and their colour. |
| tone | string | – | The arc's colour in the normal range. The page's accent by default. |
| pitch | number | 3 | Size of one dot in px. The gauge is 41 dots wide. |
| label | string | "Gauge" | What it measures, for screen readers. |
| className | string | – | Class on the gauge. |
| style | CSSProperties | – | Style on the gauge. |