IChartAnnotation

interface
Chart

A single overlay annotation drawn on top of a cartesian chart SVG surface. Supports four kinds: arrow, label, circle and bracket. Positioned in data coordinates and projected to pixel space by the chart X/Y scales.

TypeScript

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

kind
requis
'arrow' | 'label' | 'circle' | 'bracket'
Annotation kind. arrow = directed line with arrowhead; label = callout box; circle = stroked circle; bracket = horizontal or L-shaped span.
x
requis
number | string
Source / anchor X coordinate in data space (category string or numeric index).
y
requis
number
Source / anchor Y coordinate in data space.
x2
number | string
End-point X in data space. Required for arrow (head position) and bracket (right edge).
y2
number
End-point Y in data space. Optional for bracket — when omitted the bracket stays horizontal.
text
string
Text content rendered alongside the annotation.
color
TIntent | string
Stroke / fill colour — accepts a TIntent name or any CSS colour string.
width
number
Stroke width in SVG units. Default 1.5.
radius
number
Circle radius in SVG units. Applies to the circle kind only. Default 12.
dx
number
Horizontal offset of the text label relative to its anchor point in SVG units. Default 0.
dy
number
Vertical offset of the text label relative to its anchor point in SVG units. Default -14.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Annotating a chart data point with an arrow

typescript