Auto-scaled temperature heatmap
Use this when the chart only needs to read well on its own.
<CwHeatmap
data={weekData}
title="Field temperature - last 7 days"
unit="degC"
onCellClick={(point) => console.log(point)}
/>24-hour × N-day temperature heatmap with colour-coded cells, legend, and hover tooltips. Defaults to 1 week.
<CwHeatmap
data={weekData}
unit="°C"
title="Field Temperature – Last 7 Days"
/>CwHeatmap turns timestamped numeric readings into a day-by-hour grid. Feed it normalized points, then choose whether the scale should auto-fit the data or stay fixed across screens.
| API | Type | Details |
|---|---|---|
data Required | CwHeatmapDataPoint[] | Timestamped numeric readings. |
days Default: | number | How many days to render. |
min | number | Optional fixed low end of the scale. |
max | number | Optional fixed high end of the scale. |
unit Default: | string | Unit label shown in tooltips and headings. |
title Default: | string | Heading shown above the chart. |
rowHeight Default: | number | Height of each day row in pixels. |
colors | [string, string, string] | Low, mid, and high scale colors. |
onCellClick | (point: { date: string; hour: number; value: number | null }) => void | Runs when a heatmap cell is clicked. |
These snippets intentionally show the full public API surface the live demo relies on.
Use this when the chart only needs to read well on its own.
<CwHeatmap
data={weekData}
title="Field temperature - last 7 days"
unit="degC"
onCellClick={(point) => console.log(point)}
/>Use fixed ranges when multiple heatmaps should be compared directly.
<CwHeatmap
data={twoWeekData}
days={14}
title="Soil temperature"
unit="degF"
min={50}
max={90}
rowHeight={20}
colors={['#06b6d4', '#a3e635', '#f97316']}
/>