Reference
Data viz
8 ways to show a number: bar, line, funnel, hero stat, pie, waffle and strip. They are drawn when the site is built, so they need no JavaScript to read; a small script only adds hover tooltips. Colours follow the client's brand, in light and dark, and every chart has a table view of the same numbers. The numbers below are sample data.
1 · Bar chart
Compare one measure across categories. One series, so one colour and no legend. Bars start at zero and the value is labelled on the largest; the rest are in the tooltip and the table view.
2 · Bar chart, vertical
The same chart as columns, for a few categories in time order. Set "orientation": "vertical".
3 · Line chart
Change over time, one to four series. A legend names every series and one tooltip lists them all at the same point.
Bookings and enquiries
Sample data
Bookings and enquiries: Bookings from 14 to 31; Enquiries from 38 to 74.
- Bookings
- Enquiries
View as table
| Bookings | Enquiries | |
|---|---|---|
| Jun | 14 | 38 |
| Jul | 19 | 52 |
| Aug | 22 | 47 |
| Sep | 27 | 66 |
| Oct | 35 | 81 |
| Nov | 31 | 74 |
4 · Funnel
Ordered stages where each is a share of the one before (visit, enquiry, quote, booking). One hue stepped dark to light, with the conversion shown at each step. A funnel cannot grow: the build rejects a stage larger than the one before.
From visit to booking
Sample data
From visit to booking: Visits 4,200; Enquiries 420 (10% of the step before); Quotes 160 (38% of the step before); Bookings 64 (40% of the step before).
View as table
| Stage | Count | Step conversion |
|---|---|---|
| Visits | 4,200 | – |
| Enquiries | 420 | 10% |
| Quotes | 160 | 38% |
| Bookings | 64 | 40% |
5 · Hero stat
The one number a view leads with, with a change against an earlier period and a trend line. The arrow and sign say the direction; colour says only whether that is good. Use one per view.
Bookings this month (sample data)
128
+12 vs last month
View as table
| Point | Value |
|---|---|
| 1 | 88 |
| 2 | 94 |
| 3 | 101 |
| 4 | 97 |
| 5 | 110 |
| 6 | 116 |
| 7 | 128 |
6 · Pie chart
Parts of a whole, three to six of them. Percentages sit in the legend. For two parts use a hero stat; for more than six use a bar.
Where visits come from
Sample data
Where visits come from: Search 52%; Direct 24%; Social 16%; Referrals 8%.
- Search 52%
- Direct 24%
- Social 16%
- Referrals 8%
View as table
| Part | Value | Share |
|---|---|---|
| Search | 52 | 52% |
| Direct | 24 | 24% |
| Social | 16 | 16% |
| Referrals | 8 | 8% |
7 · Waffle
A calendar of activity: weeks across, Monday at the top, darker means more. Good for busy and quiet days over a few months.
Bookings per day
Sample data, twelve weeks
Bookings per day: 7 Sep 2026 to 29 Nov 2026, 193 in total, busiest day 7.
View as table
| Day | Value |
|---|---|
| 7 Sep 2026 | 4 |
| 8 Sep 2026 | 5 |
| 9 Sep 2026 | 0 |
| 10 Sep 2026 | 6 |
| 11 Sep 2026 | 2 |
| 12 Sep 2026 | 2 |
| 13 Sep 2026 | 0 |
| 14 Sep 2026 | 2 |
| 15 Sep 2026 | 0 |
| 16 Sep 2026 | 5 |
| 17 Sep 2026 | 1 |
| 18 Sep 2026 | 2 |
| 19 Sep 2026 | 0 |
| 20 Sep 2026 | 1 |
| 21 Sep 2026 | 0 |
| 22 Sep 2026 | 3 |
| 23 Sep 2026 | 3 |
| 24 Sep 2026 | 2 |
| 25 Sep 2026 | 0 |
| 26 Sep 2026 | 2 |
| 27 Sep 2026 | 1 |
| 28 Sep 2026 | 0 |
| 29 Sep 2026 | 2 |
| 30 Sep 2026 | 7 |
| 1 Oct 2026 | 3 |
| 2 Oct 2026 | 1 |
| 3 Oct 2026 | 0 |
| 4 Oct 2026 | 0 |
| 5 Oct 2026 | 3 |
| 6 Oct 2026 | 5 |
| 7 Oct 2026 | 7 |
| 8 Oct 2026 | 0 |
| 9 Oct 2026 | 3 |
| 10 Oct 2026 | 2 |
| 11 Oct 2026 | 0 |
| 12 Oct 2026 | 3 |
| 13 Oct 2026 | 6 |
| 14 Oct 2026 | 3 |
| 15 Oct 2026 | 1 |
| 16 Oct 2026 | 4 |
| 17 Oct 2026 | 1 |
| 18 Oct 2026 | 1 |
| 19 Oct 2026 | 1 |
| 20 Oct 2026 | 1 |
| 21 Oct 2026 | 6 |
| 22 Oct 2026 | 2 |
| 23 Oct 2026 | 4 |
| 24 Oct 2026 | 2 |
| 25 Oct 2026 | 1 |
| 26 Oct 2026 | 3 |
| 27 Oct 2026 | 0 |
| 28 Oct 2026 | 1 |
| 29 Oct 2026 | 6 |
| 30 Oct 2026 | 0 |
| 31 Oct 2026 | 0 |
| 1 Nov 2026 | 1 |
| 2 Nov 2026 | 0 |
| 3 Nov 2026 | 6 |
| 4 Nov 2026 | 3 |
| 5 Nov 2026 | 2 |
| 6 Nov 2026 | 5 |
| 7 Nov 2026 | 0 |
| 8 Nov 2026 | 1 |
| 9 Nov 2026 | 3 |
| 10 Nov 2026 | 3 |
| 11 Nov 2026 | 1 |
| 12 Nov 2026 | 5 |
| 13 Nov 2026 | 3 |
| 14 Nov 2026 | 1 |
| 15 Nov 2026 | 0 |
| 16 Nov 2026 | 1 |
| 17 Nov 2026 | 4 |
| 18 Nov 2026 | 7 |
| 19 Nov 2026 | 0 |
| 20 Nov 2026 | 4 |
| 21 Nov 2026 | 2 |
| 22 Nov 2026 | 0 |
| 23 Nov 2026 | 4 |
| 24 Nov 2026 | 4 |
| 25 Nov 2026 | 4 |
| 26 Nov 2026 | 3 |
| 27 Nov 2026 | 3 |
| 28 Nov 2026 | 2 |
| 29 Nov 2026 | 1 |
8 · Strip
A row of small cells in time order, each one a state. Used for uptime on the status page. States are always named in words as well as colour.
Uptime, last 30 days
Sample data
Uptime, last 30 days: 30 days, 27 up, 2 degraded, 1 down, 0 without data.
- Up
- Degraded
- Down
- No data
View as table
| Day | State |
|---|---|
| 1 Nov | Up |
| 2 Nov | Up |
| 3 Nov | Up |
| 4 Nov | Up |
| 5 Nov | Up |
| 6 Nov | Up |
| 7 Nov | Up |
| 8 Nov | Up |
| 9 Nov | Up |
| 10 Nov | Up |
| 11 Nov | Up |
| 12 Nov | Degraded |
| 13 Nov | Degraded |
| 14 Nov | Up |
| 15 Nov | Up |
| 16 Nov | Up |
| 17 Nov | Up |
| 18 Nov | Up |
| 19 Nov | Up |
| 20 Nov | Up |
| 21 Nov | Up |
| 22 Nov | Up |
| 23 Nov | Up |
| 24 Nov | Down |
| 25 Nov | Up |
| 26 Nov | Up |
| 27 Nov | Up |
| 28 Nov | Up |
| 29 Nov | Up |
| 30 Nov | Up |
9 · Putting data in
There are two ways to fill a chart, and both produce the same markup.
1 · In client.json, drawn at build time
Describe the chart under charts, then put its token in the page. The build draws the finished chart, and fails with a message naming the chart if the data is wrong (a funnel that grows, a pie with seven parts, a date that isn't a date).
"charts": {
"visits": {
"type": "bar",
"title": "Visits by day",
"data": [ { "label": "Mon", "value": 420 }, { "label": "Tue", "value": 510 } ]
}
}
<!-- in the page -->
{{chart.visits}}
2 · Typed straight into the HTML
The markup is plain HTML, so a chart can be written by hand. This strip is two days:
<div class="strip" role="img" aria-label="Uptime, 2 days">
<i class="strip__cell" data-state="up" title="1 Nov: Up"></i>
<i class="strip__cell" data-state="down" title="2 Nov: Down"></i>
</div>
Every chart type is documented in COMPONENTS.md, with its data shape. Colours come from the chart tokens in THEMING.md. Whatever the route, every number is also in the chart's "View as table" section, so nothing depends on colour or hover. The numbers on this page are sample data.