All specs
Display · heatmap

Heatmap

Grid-based heatmap with block character intensity levels.

Anatomy

Mon  ░░ ▒▒ ▓▓ ██ ▒▒
Tue  ▒▒ ▓▓ ██ ▓▓ ░░
Wed  ▒▒ ▓▓ ▓▓ ██ ░░
     9am 10am 11am 12pm 1pm

Usage

heatmap({
  data: [
    [0, 1, 3, 5, 2],
    [1, 4, 5, 3, 0],
    [2, 3, 4, 5, 1],
  ],
  rowLabels: ['Mon', 'Tue', 'Wed'],
  colLabels: ['9am', '10am', '11am', '12pm', '1pm'],
})

Options

KeyTypeDefaultDescription
datanumber[][]—2D numeric grid
rowLabelsstring[]?—Labels for rows
colLabelsstring[]?—Labels for columns
minnumber?autoCustom minimum value
maxnumber?autoCustom maximum value
cellWidthnumber?2Character width per cell

Intensity levels

LevelUnicodeASCIIStyle
0 Dim
1░.Dim
2▒:Default
3▓#Bold
4█@Accent

Do & don't

Do — use for activity grids, GitHub-style contribution charts, time×metric views

Don't — use for precise data (use table); don't use for single-row data (use sparkline)

Out of scope

▸Color gradients (uses block intensity only)

▸Interactive hover/select

▸Legend/scale bar