Data viz
Charts, meters and tables drawn from a client's own data.
-
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.
-
Bar chart, vertical
The same chart as columns, for a few categories in time order. Set "orientation": "vertical".
-
Data visualisation
Charts are drawn when the site is built, as SVG with no inline styles, so they read with no JavaScript. scripts/charts.js only adds hover and focus tooltips. Every chart has a "View as table" section (a native <details>) holding the same
-
Funnel
Ordered stages where each is a share of the one before (visit, enquiry, quote, booking). Each stage's area is its count: widths follow the square root of the count and heights are worked out so the areas are exact, so a steep drop stays
-
Gantt
A plan over time: one row per task, from its start date to its end date (both included). A one-day task is a milestone diamond. Groups colour the bars, progress fills part of a bar and is written beside it, and an optional dated marker
-
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.
-
Line chart
Change over time, one to four series. A legend names every series and one tooltip lists them all at the same point.
-
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.
-
Putting data in
There are two ways to fill a chart, and both produce the same markup.
-
Quadrant
Items placed by two scores on a 2×2 grid, split at the middle of each scale. The eisenhower preset names the axes urgency and importance and the boxes Do first, Schedule, Delegate and Drop; or name your own axes and boxes. Every dot is one
-
Radar
A profile across 3 to 8 measures, for one to three things. Every axis shares one scale that starts at zero, so the shapes can be compared; give max when the scale has a known top (a 1 to 5 rating). More than three series overlap into a
-
Sankey
Where things go: visitors from each source, through pages, to booked or left. Band thickness is the flow. Each starting point has its own colour, carried by the bands it feeds; a band fed by several starts is neutral. Flow that stops at a
-
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.
-
Treemap
Parts of a whole when a pie would have too many slices. Each rectangle's area is its value; groups (one level) share a colour and a block. Labels sit inside rectangles with room, and every value is in the tooltip and the table view. Items
-
Venn
Overlap between two or three groups. With two, the drawing is to scale: each circle's area is the group's size and the overlap's area is the shared count. Three circles can't show every overlap exactly, so a three-way Venn uses equal
-
Waffle
A calendar of activity: weeks across, Monday at the top, darker means more. Good for busy and quiet days over a few months.