Skip to content
Browse docs and components

Heatmap Chart

heatmap-chart

A grid of cells whose colour carries a quantity, on TanStack Charts: activity by weekday and hour, scores by team and quarter. Six steps of one hue from the sunken surface to the chart accent, optional values in the cells, and a tooltip on every cell.

Responsive

Install

$npxshadcnadd@forme/heatmap-chart

Adds the component, its registry dependencies, and the token stylesheet you import once.

API reference

Read from the source, so it is the API of the file you install. A prop marked * is required.

HeatmapChart

A grid of cells whose colour carries a quantity: activity by weekday and hour, scores by team and quarter.

PropTypeDefaultDescription
data*readonly Row[]—
x*keyof Row & string—The column each row falls in: an hour, a weekday, a quarter.
y*keyof Row & string—The row of the grid it falls in.
value*NumericKey<Row>—The quantity the cell's colour carries.
label*string—Accessible name. Say what the grid counts and over what.
columnsreadonly string[]—Column order. Defaults to the order the values first appear in data.
rowsreadonly string[]—Row order, top to bottom. Defaults to first appearance.
showValuesbooleanfalsePrint each value inside its cell. Right for a small grid, noise on a large one.
formatValue(value: number) => stringplain
heightnumber280
classNamestring—