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
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- kindrequired'arrow' | 'label' | 'circle' | 'bracket'
- Annotation kind. arrow = directed line with arrowhead; label = callout box; circle = stroked circle; bracket = horizontal or L-shaped span.
- xrequirednumber | string
- Source / anchor X coordinate in data space (category string or numeric index).
- yrequirednumber
- 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.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Annotating a chart data point with an arrow