Interval markers
Vertical band markers for highlighted index ranges (e.g. workout work/rest intervals). Indices are relative to the visible data array.
Primitive:
ChartIntervalMarkersInteractive demo
Usage
import { ChartRoot, ChartIntervalMarkers } from '@ramtt/charts'
<ChartRoot data={data} height={200}>
<ChartIntervalMarkers
intervals={[{ name: 'I1', startIndex: 30, endIndex: 90, type: 'work' }]}
showLabels
/>
</ChartRoot>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| intervals* | Interval[] | — | Interval definitions (name, startIndex, endIndex, type) |
| workColor | string | '#E36B30' | Color for work intervals |
| restColor | string | '#14B8A2' | Color for rest intervals |
| showLabels | boolean | false | Render interval names above the bands |