Skip to content
SENVENLI UI

Heatmap

A value by two cyclic dimensions, such as weekday by hour, as shaded cells.
Orders by weekday and hour
import { Heatmap } from "@senvenli/react/charts";

Examples

A month by week

Days outside the month draw no cell; a day without data is hatched, never zero.

Guidelines

When to use it

  • Finding busy and quiet times.

Use something else when

Accessibility

Built in

  • A "Show as table" button shows the same data as a table, which screen readers get by default.

You provide

  • A title that says what the figure is.

API reference

Heatmap

title
string

What the chart shows ("Income and expenses"), over it; leave it out when a card or a heading already says so.

aria-label
string

Names the chart when it has no visible title.

period
string

The period it covers ("September 2026").

isLoading
boolean
emptyState
React.ReactNode

Shown instead of the plot when there is no data: an EmptyState size="small" or text; "No data" by default.

rowsRequired
readonly string[]

The rows, top to bottom ("Week 1" …, or the months). Names are unique: cells find their row by name.

columnsRequired
readonly string[]

The columns, from the inline start (the weekdays, or the weeks). Names are unique, as for rows: a name given twice draws both, but every cell of that name lands in the first (the chart warns).

dataRequired
readonly HeatmapCell[]

One entry per cell; a row and column with no entry draws no cell (a day outside the month).

rowHeader
string

The row headers' name ("Week"), on the data table's first header and the grid's corner; "Period" by default.

thresholds
readonly [number, number, number, number]

Four strictly ascending lower bounds of the four intensity steps; from the positive values' quartiles by default. Bounds out of order still count each bound a value reaches, so the steps no longer follow the values (the chart warns).

valueFormatter
ChartValueFormatterDefault plain
onCellPress
(cell: HeatmapCell) => void