LatencyHeatmap
2D matrix heatmap with green→yellow→red OKLCH hue lerp.
Basic usage
Data is passed via props; pure SVG rendering with no third-party chart library.
Colors come from the --viz-1..8 tokens and are color-blind friendly.
Demo source
<CfLatencyHeatmap ... /> <CfLatencyHeatmap ... /> Week × 24 hours
Rows = Mon–Sun, columns = hours. Colors map to oklch(70% 0.16 H) where H lerps from 152 (green) → 78 (yellow) → 22 (red).
Demo source
<CfLatencyHeatmap :data="data" :row-labels="days" :col-labels="hours" /> <CfLatencyHeatmap data={data} rowLabels={days} colLabels={hours} /> API
| Prop | Type | Default | Description |
|---|---|---|---|
data | number[][] | — | rows × cols numeric matrix |
rowLabels / colLabels | string[] | — | |
min / max | number | auto | Color mapping range |
反馈与讨论
LatencyHeatmap · Discussion