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.

Visits by day

Sample data

Visits by day: Mon 420; Tue 510; Wed 480; Thu 640; Fri 720; Sat 380; Sun 210.

0200400600800MonTueWedThuFri720SatSun
View as table
CategoryValue
Mon420
Tue510
Wed480
Thu640
Fri720
Sat380
Sun210

2 · Bar chart, vertical

The same chart as columns, for a few categories in time order. Set "orientation": "vertical".

Enquiries by month

Sample data

Enquiries by month: Jun 38; Jul 52; Aug 47; Sep 66; Oct 81; Nov 74.

020406080100JunJulAugSep81OctNov
View as table
CategoryValue
Jun38
Jul52
Aug47
Sep66
Oct81
Nov74

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.

020406080100JunJulAugSepOctNov
  • Bookings
  • Enquiries
View as table
BookingsEnquiries
Jun1438
Jul1952
Aug2247
Sep2766
Oct3581
Nov3174

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).

Visits4,200Enquiries420 · 10%Quotes160 · 38%Bookings64 · 40%
View as table
StageCountStep conversion
Visits4,200–
Enquiries42010%
Quotes16038%
Bookings6440%

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
PointValue
188
294
3101
497
5110
6116
7128

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
PartValueShare
Search5252%
Direct2424%
Social1616%
Referrals88%

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.

MonWedFriSepOctNov
LessMore
View as table
DayValue
7 Sep 20264
8 Sep 20265
9 Sep 20260
10 Sep 20266
11 Sep 20262
12 Sep 20262
13 Sep 20260
14 Sep 20262
15 Sep 20260
16 Sep 20265
17 Sep 20261
18 Sep 20262
19 Sep 20260
20 Sep 20261
21 Sep 20260
22 Sep 20263
23 Sep 20263
24 Sep 20262
25 Sep 20260
26 Sep 20262
27 Sep 20261
28 Sep 20260
29 Sep 20262
30 Sep 20267
1 Oct 20263
2 Oct 20261
3 Oct 20260
4 Oct 20260
5 Oct 20263
6 Oct 20265
7 Oct 20267
8 Oct 20260
9 Oct 20263
10 Oct 20262
11 Oct 20260
12 Oct 20263
13 Oct 20266
14 Oct 20263
15 Oct 20261
16 Oct 20264
17 Oct 20261
18 Oct 20261
19 Oct 20261
20 Oct 20261
21 Oct 20266
22 Oct 20262
23 Oct 20264
24 Oct 20262
25 Oct 20261
26 Oct 20263
27 Oct 20260
28 Oct 20261
29 Oct 20266
30 Oct 20260
31 Oct 20260
1 Nov 20261
2 Nov 20260
3 Nov 20266
4 Nov 20263
5 Nov 20262
6 Nov 20265
7 Nov 20260
8 Nov 20261
9 Nov 20263
10 Nov 20263
11 Nov 20261
12 Nov 20265
13 Nov 20263
14 Nov 20261
15 Nov 20260
16 Nov 20261
17 Nov 20264
18 Nov 20267
19 Nov 20260
20 Nov 20264
21 Nov 20262
22 Nov 20260
23 Nov 20264
24 Nov 20264
25 Nov 20264
26 Nov 20263
27 Nov 20263
28 Nov 20262
29 Nov 20261

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
DayState
1 NovUp
2 NovUp
3 NovUp
4 NovUp
5 NovUp
6 NovUp
7 NovUp
8 NovUp
9 NovUp
10 NovUp
11 NovUp
12 NovDegraded
13 NovDegraded
14 NovUp
15 NovUp
16 NovUp
17 NovUp
18 NovUp
19 NovUp
20 NovUp
21 NovUp
22 NovUp
23 NovUp
24 NovDown
25 NovUp
26 NovUp
27 NovUp
28 NovUp
29 NovUp
30 NovUp

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.