Heatmap
Use it to spot patterns across two dimensions, such as category against month. Shade each row on its own scale when rows differ in size and you care about shape.
How to use it
Paste the toolkit from Get the code into your page first, then call the chart like this.
const chart = heatmap({
rows: ['Groceries', 'Housing', 'Eating out'],
cols: months, // ['2025-10', '2025-11', ...]
collabel: monthName,
matrix: [
[412, 389, 455, /* ... */],
[1150, 1150, 1210, /* ... */],
[188, null, 301, /* ... null = no data */]
],
norm: 'row', // each row on its own scale
showValues: true,
fmt: v => '£' + Math.round(v),
onClick: (r, c) => openCell(r, c),
label: 'Spending by category and month'
});Options
What you can pass to this chart.
rows / cols
Arrays of labels. cols can be formatted with collabel.
matrix
matrix[row][col] numbers. null means no data (drawn as an empty cell, not zero).
norm
'row' scales each row to its own maximum; anything else uses one global scale.
showValues
Prints compact values inside dark cells when they are wide enough.
fmt / unit
Value formatter and the label used in the tooltip.
onClick
(rowIndex, colIndex) => void.
More charts like this
Other charts in the “Over time” group.
Small multiples
One mini chart per category on a shared layout, with a detail chart for the one you pick.
View chart →Line
One or a few series over time, with a typical-value line and an optional comparison.
View chart →Stacked area
Volume over time, split into themes, or the same data as a share of the total.
View chart →Want charts or dashboards like these in your own product?
Tell me what you are trying to see and I can help work out the right approach, from the data behind it to the screen in front of people.