Skip to main content

Module heatmap

Module heatmap 

Source
Expand description

Heatmap — a rows × cols matrix painted as a colour grid using a theme-derived Ramp, with a gradient legend. The cell-layout math (cell_rect) is a pure function with tests so the grid geometry can be verified headlessly.

Structs§

HeatmapState
Persistent, observable interaction state (FC-3): the (row, col) cell the pointer last hovered. Serialized so it round-trips headlessly.
HeatmapView
A dense matrix in row-major order with optional axis labels.

Enums§

HeatmapEffect
FC-8: the heatmap does no I/O.
HeatmapMsg
FC-2 input surface. One input: the hovered cell changing (hit-tested purely in HeatmapView::render, applied in HeatmapView::update).

Functions§

cell_rect
The pixel rect of cell (row, col) inside grid, given rows × cols. Pure geometry — no painter needed, so it’s directly testable.