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.
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.
- kindrequis'arrow' | 'label' | 'circle' | 'bracket'
- Annotation kind. arrow = directed line with arrowhead; label = callout box; circle = stroked circle; bracket = horizontal or L-shaped span.
- xrequisnumber | string
- Source / anchor X coordinate in data space (category string or numeric index).
- yrequisnumber
- Source / anchor Y coordinate in data space.
- x2number | string
- End-point X in data space. Required for arrow (head position) and bracket (right edge).
- y2number
- End-point Y in data space. Optional for bracket — when omitted the bracket stays horizontal.
- textstring
- Text content rendered alongside the annotation.
- colorTIntent | string
- Stroke / fill colour — accepts a TIntent name or any CSS colour string.
- widthnumber
- Stroke width in SVG units. Default 1.5.
- radiusnumber
- Circle radius in SVG units. Applies to the circle kind only. Default 12.
- dxnumber
- Horizontal offset of the text label relative to its anchor point in SVG units. Default 0.
- dynumber
- 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