Foundations
Regions
Regions highlight contextual windows—cooling cycles, comfort bands, maintenance periods—so operators can quickly scan timelines. They register alongside other marks and honour secondary axes.
Example
The demo layers time-based cooling regions (blue) and a comfort band (green) on top of temperature and pressure series.
Usage
<Chart.Root data={data} height={360}>
<Chart.Region
type="time"
start={cycle.start}
end={cycle.end}
color="var(--ambient-data-series-6)"
opacity={0.12}
/>
<Chart.Region
type="value"
start={72}
end={78}
color="var(--ambient-data-series-3)"
opacity={0.08}
label="Comfort band"
/>
</Chart.Root>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| type | `"time" | "value"` | — | Choose `time` to shade along the x-axis or `value` for horizontal bands tied to y-values. |
| start | DomainInput | — | Start boundary. Accepts `Date`, timestamp, or numeric value depending on region type. |
| end | DomainInput | — | End boundary matching the same units as `start`. Regions are inclusive. |
| label | string | — | Optional label rendered inside the shaded region when space allows. |
| color | string | Theme region token | Fill colour. Use CSS variables for consistency across themes. |
| opacity | number | 0.12 | Opacity applied to the region fill. |
| axis | string | `"y"` | Bind value regions to a named secondary axis to match transformed scales. |
Recommendations
- Keep opacity below 0.2 so the underlying series remain legible.
- Use value regions to communicate acceptable operating envelopes and time regions for discrete events.
- When binding to a secondary axis, pass the same `axis` name used on the associated `Chart.YAxis` and series.