Heatmap for Angular
Introduction
Section titled “Introduction”Accessible SVG heatmap: a matrix of values over two categorical axes (columns along x, rows along y) whose cell fills encode values on a sequential or diverging scale in discrete steps, with printed cell values where they fit, a legend of step ranges, two-dimensional keyboard navigation with tooltips, a generated summary, and a data table fallback.
- Color scalesSequential or diverging steps around a midpoint, listed in the legend.
- Cell labelsCells print their values when the formatted value fits.
- Grid keyboardOne tab stop; arrow keys move across rows and columns with a tooltip.
- Data table fallbackThe exact matrix as a table, with a summary of size and extremes.
Behavior, design tokens, and limitations are described on the Heatmap page; this page covers the Angular API.
Live example
Section titled “Live example”import { Component } from '@angular/core';import { AuiHeatmap } from '@absoluteui/angular/heatmap';
@Component({ selector: 'app-tickets', imports: [AuiHeatmap], template: `<aui-heatmap label="Tickets by weekday and hour" [columns]="columns" [rows]="rows" [values]="values"></aui-heatmap>`,})export class TicketsComponent { readonly columns = ['9', '12', '15']; readonly rows = ['Mon', 'Tue']; readonly values = [[1, 5, 9], [null, 4, 2]];}Install and start
Section titled “Install and start”npm install @absoluteui/angular @absoluteui/components @absoluteui/core @absoluteui/themeSetup with provideAbsoluteUI() is covered in Getting started. Styles are included with the component.
import { AuiHeatmap } from '@absoluteui/angular/heatmap';Defaults for every instance: provideAbsoluteUIConfig({ components: { heatmap: { ... } } }) (see Configuration).
API reference
Section titled “API reference”<aui-heatmap>
Section titled “<aui-heatmap>”Class AuiHeatmap; template reference #ref="auiHeatmap".
Server rendering: Renders on the server; the browser re-creates it after hydration.
Inputs
Section titled “Inputs”| Input | Type | Default | Description |
|---|---|---|---|
label |
string |
Required. Chart title: visible text and the accessible name of the plot (aria-labelledby); also the data table caption. | |
hideLabel |
boolean |
false |
Visually hide the title; it stays the accessible name. |
description |
string |
Visible description below the title, also referenced by aria-describedby (text only). | |
summary |
string |
Replaces the generated accessible summary (matrix size, lowest and highest value with their cells). | |
valueFormat |
NumberFormatOptions |
Number format for cell labels, legend step ranges, tooltips, the data table, and the summary. | |
formatValue |
(value: number) => string |
Custom value text; overrides valueFormat everywhere. | |
columns |
readonly string[] |
Required. Column labels (x axis), in order (mirrored in RTL). | |
rows |
readonly string[] |
Required. Row labels (y axis), top to bottom. | |
values |
readonly (readonly (number | null)[])[] |
Required. values[row][column]: exactly one array per row and one value per column. null, NaN, and infinities are empty cells (“No value”). | |
colorScale |
HeatmapColorScale |
{ type?: ‘sequential’ | ‘diverging’ (default sequential), color?: 1-8 (sequential slot, default 1), negative?: 1-8 (default 2), positive?: 1-8 (default 1), midpoint?: number (diverging center, default 0), min?, max? (fixed domain; default the nice-rounded data extent), steps?: 3-9 (per side for diverging, default 5) }. Values outside a fixed domain use the first or last step. | |
xAxis |
{ label?: string; } |
Column axis title (drawn below the plot). | |
yAxis |
{ label?: string; } |
Row axis title (drawn beside the row labels); also the header of the data table’s first column (default “Row”). | |
theme |
ChartTheme |
Look and feel: { palette?: string[] (1-8 CSS colors for slots 1-8); fontFamily?; fontSize? (8-32 px); textColor?; gridLines?: boolean; gridColor?; gridDash? (“4 2” or “none”); axisColor?; lineWidth? (0.5-12 px); markerSize? (1-20 px); cornerRadius?, barRadius?, cellRadius?, sliceRadius?, boxRadius? (0-50 px); swatchRadius? (0-8 px); tooltipRadius?, controlRadius? (0-50 px); lineJoin?: ‘round’ | ‘miter’ | ‘bevel’; areaOpacity? (0-1); gradient?: boolean; valueLabelColor?; tooltip?: { background?, color?, borderColor? }; legendPosition?: ‘top’ | ‘bottom’ | ‘start’ | ‘end’; animation?: boolean | { duration?: number (0-5000 ms) } }. Applied as –aui-chart-* custom properties and classes on the host through the CSSOM (CSP-safe); colors are validated with CSS.supports(‘color’). Animation is opt-in and never runs with prefers-reduced-motion: reduce or [data-aui-animation=‘none’]. | |
renderTooltip |
ChartTooltipRenderer |
Custom tooltip content as DOM nodes (never HTML strings). context: { title, rows: { label, value, seriesId }[], column, row, source: “pointer” | “focus” | “sync” }. Return null for the default tooltip. The tooltip stays aria-hidden; the focused mark keeps its accessible label. | |
syncGroup |
string |
Synchronized crosshair: charts with the same group show the crosshair, highlight, and tooltip at the same column (category or x index) when one of them is hovered or focused. Focus never moves between charts. Use charts that share their categories or x values. | |
legend |
ChartLegendMode |
'auto' |
Legend listing every color step with its value range; auto and show both show it, hide removes it. Entries are not toggle buttons. |
dataTable |
ChartTableMode |
'toggle' |
Data table fallback with the exact matrix: behind a Show data table button (built on first open), always visible, visually hidden (screen readers only), or none. |
tooltip |
boolean |
true |
Tooltip on pointer hover and keyboard focus (cell name and value). |
patterns |
boolean |
false |
Shared chart option (toggles aui-chart–patterns); heatmap cells and step swatches are not textured, so it has no visible effect. |
height |
number |
'300' |
Plot height in CSS px (integer 120-2000); the width follows the container. Cells share the plot evenly. |
cellLabels |
HeatmapCellLabels |
'auto' |
Values printed inside cells: auto and always print them where the formatted value fits (always skips cells that are too small); none prints no values. |
locale |
string |
'en-US' |
Number and message locale. |
direction |
Direction |
'ltr' |
rtl mirrors the columns (first column at the right), puts the row labels on the right, and swaps ArrowLeft/ArrowRight. |
Two-way bindings
Section titled “Two-way bindings”| Model | Type | Change output | Description |
|---|---|---|---|
[(hiddenSeries)] |
readonly string[] |
(hiddenSeriesChange) |
Shared chart option; a heatmap has no series, so it has no effect. |
Outputs
Section titled “Outputs”| Output | Payload | Description |
|---|---|---|
(pointClicked) |
ChartPointClickDetail |
A data mark was activated: pointer click or tap, or Enter / Space on the focused mark. label is the category, x value, or item; value is the formatted value text. Keyboard navigation is unchanged. Re-emits aui-point-click. |
Methods
Section titled “Methods”Call them through a viewChild query or a template reference.
| Method | Description |
|---|---|
setSeriesVisible(id: string, visible: boolean): void |
Shared chart method; a heatmap has no series, so it only re-renders. |
Accessibility and performance
Section titled “Accessibility and performance”Pattern: SVG matrix chart as a named, described group (role=“group” with aria-roledescription “heatmap”) of role=“img” cells with two-dimensional roving focus; a legend listing every color step with its value range; data table fallback with the exact matrix.
The Angular component renders the framework-neutral component, so its keyboard support, roles, WCAG 2.2 criteria, budgets, and import cost apply unchanged: see Heatmap: Accessibility and performance.
(c) 2026 Kasadara Technology Solutions Pvt Ltd. AbsoluteUI is free to use under the AbsoluteUI Free Use License; it is not open source.