Skip to content

TimelineHeatmap Views

A TimelineHeatmap renders a matrix of rows × time buckets, each cell shaded by intensity — a load board, a density grid, an activity heatmap. Like Calendar it has built-in Day / Week / Month bucketing with prev/next navigation; the header, bucketing and colour scale are standard in the component.

It has two data sources — one component:

Like Calendar, it queries the model’s records via the standard data layer and reads field mappings from the arch by display_mode:

display_modeMeaning
rowthe group axis (e.g. Work Center) — one row per distinct value
datethe time axis (records are bucketed by this date)
valuethe measure summed per cell
- data_type: UiView
name: throughput_heatmap_view
identifier: throughput_heatmap_view
type: TimelineHeatmap
model: WorkOrder
arch:
- content:
- {type: field, name: work_center, display_mode: row}
- {type: field, name: scheduled_start, display_mode: date}
- {type: field, name: expected_duration, display_mode: value}

Cells are shaded by relative intensity (value ÷ max). The search bar and Browse panel work, because it’s a real record query — reusable for any model with a date + a group + a measure.

When the arch declares a data_method instead of field mappings, the component calls that method (passing the live bucket + anchor) and renders the returned matrix directly. Use this when the board needs rows the records can’t produce — e.g. a capacity board must show idle resources and a true load % / overload, which a record query over scheduled work cannot give.

arch:
- data_method: ui_load

The method returns:

{
"buckets": [
{"label": "Jun 24", "sublabel": "Tu", "today": True},
...
],
"rows": [
{
"id": 1, "label": "Assembly", "sublabel": "ASM",
"cells": [
{"value": 82.0, "display": "82%", "tooltip": "394 / 480 min · 82%", "level": "mid"},
...
],
},
...
],
}

Each cell’s level drives a discrete capacity colour scale and a legend:

levelMeaningColour
idleno load(empty)
low< 70%teal
mid70–90%yellow
high90–100%orange
overoverloadred

The Capacity Load board in mrp_capacity is the reference consumer (WorkCenterLoad.ui_load).