Annotation action
Use this action with change({ id: 'Annotation', context }).
Context
id:Get|Delete|Update|Duplicateindex: optional annotation index (Get)uid: annotation uidtraits: replacement trait values (Update)extras: additional non-editable metadata merged into traits (Update)points: point updates (Update)
Behavior
Annotation is a multi-action API for removing, updating, or duplicating annotations.
Notes for Get
Getreturns annotation models from all panes/axes.- Returned items include
paneIndex,axisIndex, and list index for stable host-side addressing.
Notes for Update
traitsare replaced with the values you send.extrasare merged and are not interpreted by chart logic.- Editable trait availability depends on annotation type; use annotation taxonomy as source of truth.
- Common editable fields include
line,fill,showPrices, andshowBarCount(when supported by the annotation type).
Style details:
line.color/fill.coloraccept CSS3-like color strings (#rgb,#rrggbb,rgba(r,g,b,a)).linealso supportslineWidthanddashStyle.- Supported dash styles:
Solid,ShortDash,ShortDot,ShortDashDot,ShortDashDotDot,SparseDot,Dot,Dash,LongDash,DashDot,LongDashDot.
Point updates:
- Most annotations manage points interactively, so sending
pointsusually has no effect. ComputedTextis an important exception. Updating points beyond the first two can be useful; the first two are reserved for text bounds (top-left and bottom-right).
For integration flow details, see Notifications and Annotations.