Skip to content

Heatmap

<ax-heatmap> is a Pro component: a grid of cells colored by value. Use a sequential ramp (one token’s fill-opacity) or bins (mapped to --color-chart-1..5). Self-gates with a PRO watermark until licensed.

import { AxHeatmapComponent } from '@axisui-ng/charts';
<ax-heatmap
[matrix]="matrix"
[rows]="rows"
[cols]="cols"
scale="bins"
ariaLabel="Activity"
/>
matrix = [
[1, 3, 2],
[4, 0, 5],
];
rows = ['Mon', 'Tue'];
cols = ['AM', 'Mid', 'PM'];
InputTypeDefaultNotes
matrixnumber[][][]Row-major cell values.
rowsstring[][]Optional row axis labels.
colsstring[][]Optional column axis labels.
scale'sequential' | 'bins''sequential'Opacity ramp vs chart-palette bins.
binsnumber5Band count for bins (mapped into chart-1..5).
colorIndexnumber1Base token (1–5) for sequential.
cellSizenumber28Cell size in px.
ariaLabelstring''Summary; empty → auto (rows × cols, value range).

role="img" with aria-label from ariaLabel or an auto summary. Each cell has a <title> with its value. A visually hidden data table mirrors the matrix for screen readers.

Pro component — see ProWatermark for how the watermark/gating works.

Interactive examples live in Storybook under Pro / Heatmap. Run pnpm storybook to explore them.