Reference line
Horizontal dashed reference line at a Y value with optional label rendered to the right of the chart area.
Primitive:
ChartRefLineInteractive demo
Usage
import { ChartRoot, ChartRefLine } from '@ramtt/charts'
<ChartRoot data={data} height={200}>
<ChartRefLine y={breakEven} label="Break-even" />
</ChartRoot>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| y* | number | — | Y value where the line is rendered |
| label | string | — | Optional label to the right of the line |
| className | string | — | Tailwind classes for the line stroke |
| animate | AnimateConfig | true | Entry animation |