Annotation

Overlay annotations on any chart. Supports point, range, and line annotations with labels.

Primitive: ChartAnnotation

Interactive 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

PropTypeDefaultDescription
annotations*Annotation[]Annotation definitions