Skip to content

HeatmapChart

stable

Token-native SVG cell-matrix heatmap with sequential (red/blue/neutral) and diverging color scales from DS dataviz tokens — correlation matrices, factor exposure grids, settlement timing, risk concentration

import { HeatmapChart } from "@nodus/design-system/finance"
Loading demo…

Props

cellsrequired
Type HeatmapCell[]Default

Cell data — {col, row, value, label?}

columns
Type string[]Default

Explicit column order (defaults to first occurrence)

rows
Type string[]Default

Explicit row order (defaults to first occurrence)

title
Type stringDefault

Chart title

asOf
Type stringDefault

As-of date shown right of the title

colorScale
Type 'sequential-red' | 'sequential-blue' | 'sequential-neutral' | 'diverging'Default sequential-blue

Color scale family

domain
Type [number, number]Default

Override value domain (defaults to data min/max)

valueFormat
Type 'percent' | 'integer' | 'decimal' | 'none'Default decimal

In-cell value formatting

cellSize
Type numberDefault 40

Cell size in px

ariaLabel
Type stringDefault

Accessible label override (falls back to title)

style
Type CSSPropertiesDefault

Style override

Accessibility

  • Wrapper renders role="group" and the SVG role="img", both labelled from ariaLabel ?? title.
  • Each populated cell carries role="cell" with an aria-label of "row × col: value".
  • Cell text switches to inverse color on dark cells (normalized value > 0.7) to preserve contrast.
  • Values are printed inside cells (valueFormat) so the encoding is never color-only.
sequential-redsequential-bluesequential-neutraldivergingsemantictypeborderdataviz
MobileStacks / Scroll

Heatmap requires min 320px for legible cells. Wrap in overflow-x-auto.

Design Rationale

This component was designed to express:

Explore Related

Was this helpful?