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

Chart.Region
PropTypeDefaultDescription
type`"time" | "value"`Choose `time` to shade along the x-axis or `value` for horizontal bands tied to y-values.
startDomainInputStart boundary. Accepts `Date`, timestamp, or numeric value depending on region type.
endDomainInputEnd boundary matching the same units as `start`. Regions are inclusive.
labelstringOptional label rendered inside the shaded region when space allows.
colorstringTheme region tokenFill colour. Use CSS variables for consistency across themes.
opacitynumber0.12Opacity applied to the region fill.
axisstring`"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.