Annotation
Overlay annotations on any chart. Supports point, range, and line annotations with labels.
Primitive:
ChartAnnotationInteractive demo
Usage
import { ChartRoot, ChartLine, ChartAnnotation } from '@ramtt/charts'
<ChartRoot data={data} height={200}>
<ChartLine />
<ChartAnnotation annotations={[
{ type: 'point', x: 50, label: 'Peak' },
{ type: 'range', x0: 20, x1: 40, label: 'Interval' },
]} />
</ChartRoot>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| annotations* | Annotation[] | — | Annotation definitions |