Heatmap

A grid of rows × columns grouped in bands, each cell coloured by a tone or a value. Sticky headers, a value column, tooltips per cell, a legend and a calendar helper for a year of days.

Part of @tectra-ng/charts (npm install @tectra-ng/charts, also included in tectra-ng).

Features8APIThemingAccessibility

Basic

groups set the column bands, rows the cells in the same column order, each with a tone and a tooltip; null is an empty slot. The legend lists the tones and ends with the empty item.

Nightly builds
Service
Week 1
MTWTF
Week 2
MTWTF
Week 3
MTWTF
api
web
worker
search
billing
  • Passed
  • Flaky
  • Failed
  • Running
  • Queued
  • No data

Templates

txHeatmapRowHeader draws the sticky row header and txHeatmapRowValue a sticky value column at the end of each row; labels name both header cells. Their widths are the leadWidth and valueWidth tokens.

Deadlines
Person
Jan
1234
Feb
1234
Mar
1234
Apr
1234
May
1234
Jun
1234
On time
Maya LopezDesign
96%
Owen ClarkePlatform
81%
Priya NatarajanData
64%
Leo HoffmannMobile
88%
  • On time
  • Late
  • No deadline

Interactive

Cells with interactive: true are buttons: they grow on hover and focus, and click, Enter or Space emit cellClick with the row, the cell and the column key.

Deadlines by month
Year
Months
JFMAMJJASOND
2024
2025
2026
  • All on time
  • Some late
  • Missed
  • No deadlines
Click a month or focus it and press Enter.

Value scale

A cell with a value and no tone takes the primary colour, stronger for bigger values in scaleSteps steps; values at scaleMin (0 by default) stay empty. Legend items with a value show the step of that value.

Visits by hour
Day
Night
03
Morning
69
Day
1215
Evening
1821
Mon
Tue
Wed
Thu
Fri
Sat
Sun
  • 1–30
  • 31–60
  • 61–90
  • 91+
  • No visits

Calendar

heatmapCalendar(values, { from, to, intl, firstDayOfWeek }) lays dated values out as weeks grouped by month and seven weekday rows, with dated tooltips and accessible names; days outside the range are hidden. Feed the result to the heatmap.

Commits in 2026
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Mon
Tue
Wed
Thu
Fri
Sat
Sun
  • 1–3
  • 4–6
  • 7–9
  • 10+
  • No commits

Scroll

With many rows or columns the grid scrolls inside maxHeight (364px by default) and sideways; the header row, the row headers and the value column stay in place. The scroll region takes the keyboard focus.

Uptime by region
Service
eu-west
1234
eu-central
1234
us-east
1234
us-west
1234
ap-south
1234
ap-east
1234
sa-east
1234
af-south
1234
Uptime
Auth
97.6%
Billing
98.0%
Search
98.0%
Storage
97.6%
Mail
98.0%
Queue
97.6%
Media
97.6%
Reports
97.6%
Maps
97.6%
Chat
97.6%
Feeds
97.6%
Export
97.6%

Design tokens

dt sets the tokens of one heatmap — the heatmap group of the chart tokens: cell size and radius, column widths, tone colours and the scale colour.

Releases
This week
MTWTF
Design
Platform
Data
Mobile
  • 1
  • 3
  • 5
  • Off

Pass through

pt adds classes and styles to the parts: root, scroll, grid, head, row, lead, groups, group, groupLabel, columns, column, value, cell, legend.

Shift coverage
Shift
Mon
123
Tue
123
Wed
123
Early
Late
Night