HeatmapChart

Molecule

Matrix of cells coloured on one token scale (`color` at a variable opacity, or mixed from `colorLow` to `color`; `colorFor` for banded colours). A missing value (`null`) renders as an empty cell, never as 0, so gaps in the data stay visible. Hover shows the value; the scale can be fixed with `min` / `max`. Options: `showValues` (cell labels whose colour follows the cell), `cellGap`, `cellRadius`, `legendPosition`, `legendItems` (a banded legend), `legendFormat`, `tickStyle`, `fill`.

Missing data is empty, not zero

Preview

Messages per hour and weekday (every 37th cell is missing)

Code
<%- include('modules/ui/Chart/Chart', { type: 'heatmap', cells: cells, height: 220, valueLabel: 'Messages' }) %>

Fixed scale and value format

Preview

Humidity by room and time of day (fixed 0-100 scale)

Code
<%- include('modules/ui/Chart/Chart', { type: 'heatmap', cells: cells, min: 0, max: 100, valueLabel: 'Humidity', valueFormat: 'fmtPercent' }) %>
<!-- valueFormat is the NAME of a global function: window.fmtPercent = (v) => v + '%' -->

Two-colour scale, cell values, legend on the right

Preview

Humidity from colorLow (info) to color (error), values printed in the cells

Code
<%- include('modules/ui/Chart/Chart', { type: 'heatmap', cells: cells, color: 'var(--error)', colorLow: 'var(--info)', showValues: true, legendPosition: 'right' }) %>
Source modules/ui/Chart/scripts/heatmap.js