Data visualisation
A chart answers one question for someone who is also watching robots. Pick the form from the question, colour each mark by the job it does, and keep everything else quiet. The palette below is checked for colour blindness on every build.
Pick the form first
Colour comes last. Most bad charts start by picking colours; start from what the reader has to do.
| The job | Form | In the kit |
|---|---|---|
| One number someone acts on | The number itself, large, with its unit and change | radial-chart-goal |
| A level within a known range | A meter, neutral until it crosses a threshold | meterradial-chart-battery |
| A value over time | A line, one y axis | line-chart-telemetryline-chart-limitline-chart-compare |
| How a whole splits, over time | Stacked areas that add up to the whole | area-chart-fleet-statesarea-chart-cumulative |
| Compare categories | Bars from zero, sorted unless the order means something | bar-chart-missionsbar-chart-rankedbar-chart-stacked |
| Above and below a target | Bars in one hue around a drawn zero | bar-chart-variance |
| When something happens (day × hour) | A heatmap in one hue | heatmap-week-hours |
| Where something happens | A heatmap by zone, with each cell's number | heatmap-zones |
| How one value is spread | A histogram: equal bins that touch, one hue, the median drawn | histogram-battery |
| The steps of a run, or events in order | Not a chart: a trace or a timeline | tracetimeline |
| Exact values, or many columns | Not a chart: a table | data-grid |
- One number someone acts on
- Form
- The number itself, large, with its unit and change
- In the kit
- radial-chart-goal
- A level within a known range
- Form
- A meter, neutral until it crosses a threshold
- In the kit
- meterradial-chart-battery
- A value over time
- Form
- A line, one y axis
- In the kit
- line-chart-telemetryline-chart-limitline-chart-compare
- How a whole splits, over time
- Form
- Stacked areas that add up to the whole
- In the kit
- area-chart-fleet-statesarea-chart-cumulative
- Compare categories
- Form
- Bars from zero, sorted unless the order means something
- In the kit
- bar-chart-missionsbar-chart-rankedbar-chart-stacked
- Above and below a target
- Form
- Bars in one hue around a drawn zero
- In the kit
- bar-chart-variance
- When something happens (day × hour)
- Form
- A heatmap in one hue
- In the kit
- heatmap-week-hours
- Where something happens
- Form
- A heatmap by zone, with each cell's number
- In the kit
- heatmap-zones
- How one value is spread
- Form
- A histogram: equal bins that touch, one hue, the median drawn
- In the kit
- histogram-battery
- The steps of a run, or events in order
- Exact values, or many columns
- Form
- Not a chart: a table
- In the kit
- data-grid
Colour by job
Four jobs, one rule each. A mark gets colour for one of these reasons or it stays neutral.
| Job | Means | Tokens | Rule |
|---|---|---|---|
| Categorical | Which series: identity, not amount | --chart-1 … 5 | Graphite and one accent. The series the reader should look at is the accent, the brand indigo; the others are graphite, told apart by line style too. Slot 4 is Other, slot 5 the baseline (an earlier period, a plan). Kept with the series when others are filtered out. |
| Sequential | How much: the accent's ramp | --chart-1 into --track | From the bare track at none to the full accent at the most, with a Fewer–More scale: light to dark in light, dark to light in dark, so more is always further from the card (heatmap-week-hours). Cells that carry their number stop at 60 % (36 % in high contrast), so the number keeps 4.5:1 (heatmap-zones). |
| Status | A threshold was crossed | --warning--danger | Only on the value or segment that crossed it, with a word or a shape. Never a series colour; a battery never turns danger. |
| Process | Something running that someone waits on | --info | Progress, a running stage, the route a robot is driving now. Not a series. |
- Categorical
- Means
- Which series: identity, not amount
- Tokens
- --chart-1 … 5
- Rule
- Graphite and one accent. The series the reader should look at is the accent, the brand indigo; the others are graphite, told apart by line style too. Slot 4 is Other, slot 5 the baseline (an earlier period, a plan). Kept with the series when others are filtered out.
- Sequential
- Means
- How much: the accent's ramp
- Tokens
- --chart-1 into --track
- Rule
- From the bare track at none to the full accent at the most, with a Fewer–More scale: light to dark in light, dark to light in dark, so more is always further from the card (heatmap-week-hours). Cells that carry their number stop at 60 % (36 % in high contrast), so the number keeps 4.5:1 (heatmap-zones).
- Status
- Means
- A threshold was crossed
- Tokens
- --warning--danger
- Rule
- Only on the value or segment that crossed it, with a word or a shape. Never a series colour; a battery never turns danger.
- Process
- Means
- Something running that someone waits on
- Tokens
- --info
- Rule
- Progress, a running stage, the route a robot is driving now. Not a series.
Contrast against a card, light · dark. The accent is the SYNCROBOTIC brand indigo (#5347a8 in light, the same hue in every mode), chroma 0.15; the greys are 0.01 or less, so only the series that matters has colour. The accent and all three graphite steps are at least 3:1, the minimum for a mark. Other is the quietest of them (3.0:1 in light, 3.3:1 in dark): it recedes, and is still a shape you can see on its own. The baseline is the graphite mid, always dashed.
How many series
Three series and Other. Any two of the accent and the two greys can sit side by side, in a legend, a stack or a crossing, so every pair must differ, and Other must differ from the grey beside it. The usual floor is ΔE 15 to normal vision and 8 under red-green colour blindness; this palette holds 15 for both, in every mode. Measured here from the theme, ΔE normal · colour-blind, red when it fails.
| Slots | Light | Dark | Light, high contrast | Dark, high contrast |
|---|---|---|---|---|
1 · 2 | 18 · 17.4 | 31 · 31.0 | 17 · 16.1 | 20 · 19.1 |
1 · 3 | 15 · 15.2 | 18 · 17.3 | 17 · 15.4 | 17 · 16.1 |
2 · 3 | 17 · 16.5 | 16 · 15.9 | 18 · 17.5 | 31 · 30.8 |
3 · 4 | 15 · 15.2 | 27 · 27.1 | 16 · 15.5 | 16 · 15.6 |
1 · 2- Light
- 18 · 17.4
- Dark
- 31 · 31.0
- Light, high contrast
- 17 · 16.1
- Dark, high contrast
- 20 · 19.1
1 · 3- Light
- 15 · 15.2
- Dark
- 18 · 17.3
- Light, high contrast
- 17 · 15.4
- Dark, high contrast
- 17 · 16.1
2 · 3- Light
- 17 · 16.5
- Dark
- 16 · 15.9
- Light, high contrast
- 18 · 17.5
- Dark, high contrast
- 31 · 30.8
3 · 4- Light
- 15 · 15.2
- Dark
- 27 · 27.1
- Light, high contrast
- 16 · 15.5
- Dark, high contrast
- 16 · 15.6
Line style carries the series too
The chart gives each line and area outline its style by its place in the config, and the legend and tooltip draw it, so the series read in grey print and to anyone who cannot tell the accent from a grey.
- AccentSolid
- GraphiteDashed, 6 4
- Graphite midDotted, 1.5 3.5
A fourth series is never a new colour: fold the rest into Other (slot 4), highlight the one that matters and grey the others, or split the chart into small multiples, one series each, all in the accent. Scatter plots and maps, where any two marks touch, keep to the accent and one grey. Blue, green, amber and red are status, never a series. Simulation: Machado, Oliveira and Fernandes (2009); ΔE in OKLab.
Marks and axes
The data carries the contrast; the frame recedes.
Average patrol speed · m/s
- One y axis. Two measures on different scales are two charts, stacked, sharing the time axis.
- Lines 2 px: the first series solid, the second dashed (6 4), the third dotted (1.5 3.5); the chart sets this by series order. Bars start at zero, with 4 px rounded data ends and a 2 px gap in the surface colour between bars of a group and segments of a stack.
- A horizontal hairline grid (--border); no axis lines; tick labels in --muted-foreground, tabular numbers.
- A limit is a dashed line with its label at the end, in --muted-foreground. Only the value past it turns warning.
- Two series or more: a legend above the plot, with each series' line style. One series: no legend; the title names it, in the accent. Up to three series may also be labelled at the line's end.
- Text is never in the series colour: values, labels and legend stay in text colours; the swatch beside them carries the identity.
- Every chart with axes (line, area, bar, heatmap) has a table view (ChartTable), for exact values and for anyone who cannot tell two series apart. Sparklines, rings (radial) and status strips write their numbers in words instead.
- No data is said in words in the plot's place, not an empty frame.
Rules
Maps and robot tracks
The map is a chart too, and the busiest one: scans, zones, routes and robots share one surface. Each layer keeps one job.
| Layer | Drawn with | Why |
|---|---|---|
| Floor and scans | --map, --map-point | Grey, the quietest layer: it is where things happen, not what happens. |
| Grid, zones and walls | --edge, --map-point outline | Hairlines, no fills. A safety zone is named with its icon (SafetyZone) and a word, not painted red. |
| Route being driven | --info, dashed | A process someone waits on: the one place blue appears on the map. |
| Robots | StatusGlyph + ID | The status shape and the robot's ID, as in every list; colour only when a robot needs attention. The selected one gets the focus ring's ink. |
| Density over the floor | --chart-1 ramp | The accent's ramp over the grey scans, with a scale: the one colour on the floor. |
- Floor and scans
- Drawn with
--map, --map-point- Why
- Grey, the quietest layer: it is where things happen, not what happens.
- Grid, zones and walls
- Drawn with
--edge, --map-point outline- Why
- Hairlines, no fills. A safety zone is named with its icon (SafetyZone) and a word, not painted red.
- Route being driven
- Drawn with
--info, dashed- Why
- A process someone waits on: the one place blue appears on the map.
- Robots
- Drawn with
StatusGlyph + ID- Why
- The status shape and the robot's ID, as in every list; colour only when a robot needs attention. The selected one gets the focus ring's ink.
- Density over the floor
- Drawn with
--chart-1 ramp- Why
- The accent's ramp over the grey scans, with a scale: the one colour on the floor.
Annotations on images
Boxes and points over a photo: what a model predicted, what a person labelled, the previous version and the one being edited. The photo can be any colour, so the line style carries the meaning and every stroke has a halo.
- PredictedSolid, 2 px
- Ground truthDashed 6 4, 2 px
- Previous versionDotted, faded
- SelectedSolid, 3 px, handles
| Mark | Line | Token | Against its halo, light · dark |
|---|---|---|---|
| PredictedWhat the model found | Solid, 2 px | --annotate-predicted | 7.4:1 · 6.5:1 |
| Ground truthWhat a person labelled | Dashed 6 4, 2 px | --annotate-truth | 11.3:1 · 18.1:1 |
| Previous versionThe same label in the last version | Dotted, faded | --annotate-previous | 7.7:1 · 8.2:1 |
| SelectedThe one being edited | Solid, 3 px, handles | --annotate-selected | 19.9:1 · 20.1:1 |
- PredictedWhat the model found
- Line
- Solid, 2 px
- Token
--annotate-predicted- Against its halo, light · dark
- 7.4:1 · 6.5:1
- Ground truthWhat a person labelled
- Line
- Dashed 6 4, 2 px
- Token
--annotate-truth- Against its halo, light · dark
- 11.3:1 · 18.1:1
- Previous versionThe same label in the last version
- Line
- Dotted, faded
- Token
--annotate-previous- Against its halo, light · dark
- 7.7:1 · 8.2:1
- SelectedThe one being edited
- Line
- Solid, 3 px, handles
- Token
--annotate-selected- Against its halo, light · dark
- 19.9:1 · 20.1:1
- Line style first, colour second: predicted solid 2 px, ground truth dashed (6 4) 2 px, the previous version dotted and faded (--annotate-fade), the selected one 3 px with square handles at its corners. Points: predicted a filled dot, ground truth a ring.
- Every stroke is drawn twice: first in --annotate-halo, 2 px wider, then in its colour. The two are at least 3:1 apart, so on a bright or a dark photo one of them shows.
- Colours come from the chart palette (predicted --chart-1, the accent indigo, solid; ground truth --chart-2, graphite, dashed), the previous version is the muted ink and the selected one the focus ink. Never status colours: a low score is a number in the label, not a warning box.
- The class is a word in the label (text in --foreground on --annotate-halo), not a colour: the colours already say where a box came from.
- Two sources at a time, plus the selection: predicted against ground truth, or this version against the previous one. To compare more, put pictures side by side.
- High contrast keeps the same strokes and stops fading the previous version: nothing is translucent there.
Motion and hover
Movement only marks a change of state, so charts do not perform.
- The chart fades in when it mounts (--motion-base). Marks do not grow or slide in; nothing moves under reduced motion.
- Hover is the reading layer: a crosshair and one card with every series on lines and areas, a band on bars. The hit area is wider than the mark.
- Time range and filters sit in one row above the chart (a segmented control: 1 h, 24 h, 7 d). Changing them never repaints the surviving series.