Design guide
The rules below come from Nielsen Norman Group, Tufte and Few, Storytelling with Data and Datawrapper. Rules marked lint are checked by dashboard --check (a design/* warning; --strict fails on it).
Layout
Section titled “Layout”- Summary → trend → detail. A KPI strip first, then the one chart that answers the main question (full width), then breakdowns two by two, then a detail table.
- The most important thing top left. Not a filter, not a logo.
- At most ~7 panels per view; split topics into
::TABs. linttoo-many-panels - Group what belongs together in a
::GROUPbox. KPI tiles in one strip. lintungrouped-kpis - No raw row dumps. A top-N or an aggregate;
::PAGEDfor large remote data. lintraw-table
Charts
Section titled “Charts”| The question | Chart |
|---|---|
| rank or compare categories | a sorted ::BARCHART (::FLIP for long labels) |
| a value over time | ::LINECHART, ≤ ~6 series |
| part of a whole | ::BARCHART_STACKED; a ::DONUTCHART only up to 5–6 slices |
| the distribution of a number | ::HISTOGRAM, ::BOXPLOT by group |
| two numbers | ::SCATTER, a third as ::BUBBLE size |
| two categories and a measure | ::HEATMAP |
| progress to a goal | ::GAUGE, ::BULLET, a KPI’s ::GOAL |
| geography | ::REGION, ::MAP, points |
- Sort bars by value unless x is time or an order. lint
unsorted-bars - No pie past ~6 slices. lint
pie-slices - Title every chart with the takeaway:
'Revenue up 12 % on last year', not'Revenue'. lintuntitled-chart - At most ~7 colours; keep the top few and bucket the rest as “Other”, or use
::FACET. lintmany-series - Format the axis (
'€'::YFORMAT), one accent colour, and never colour alone: pair it with position or a label.
Allowing an exception
Section titled “Allowing an exception”When a chart breaks a rule on purpose, put -- @lint_allow design/many-series right above it: --check still notes it, --strict passes.