IAnnotation
Type interface
An annotation, as stored in the Annotator's annotations setting.
Colors are CSS color strings. Sizes are in pixels.
Sources
IAnnotation is an interface: it describes a shape of data and is not imported on its own.
Properties
ariaLabelType
undefined|stringSince 5.25.0What screen readers say for the annotation. If not set: its tool's name, its text, and what it is pinned to (a slice, a node, a data item).
An annotation with no text that isn't pinned to such an item (a frame on an XY chart, a shape pinned to the screen) is read only if this is set.
Set it to
""to keep an annotation from screen readers.blurType
undefined|numberSince 5.25.0A rectangle blurs what is under it: from
0(no blur) to1(most).Its fill, if any, tints the blur. Used by the
"cover"tool.closedType
undefined|false|trueSince 5.25.0A
"polyline"goes back from its last point to its first.endCapType
AnnotationCapWhat the line has at its end.
fillType
undefined|stringFill color. None if not set.
fillOpacityType
undefined|numberOpacity of the fill (0-1).
fontFamilyType
undefined|stringFont family.
fontSizeType
undefined|numberFont size.
iconType
undefined|stringSince 5.25.0SVG path of an
"icon"annotation, drawn in a 50 by 50 box.imageType
undefined|stringImage of a hand-drawn line made with an earlier version, as a data URL.
notesType
undefined|stringNotes, kept from annotations made with an earlier version.
opacityType
undefined|numberOpacity of the whole annotation (0-1).
pinType
IAnnotationPinWhat the annotation is pinned to. Without one, it stays where it is on the chart's area.
pointsType
ArrayPoints that define the annotation:
"rectangle","ellipse","caption": two opposite corners."icon": two opposite corners of the box the icon fits in."line": start and end."curve": start, end and control point."polyline": every point, in order. Each is pinned to what it is on."freehand": every point of the line; or, for one drawn with an earlier version, two corners ofimage."text": center."callout": the point it points at, and the center of its box.
rotationType
undefined|numberRotation in degrees, around the center.
shapeType
AnnotationShapeShape of the annotation.
startCapType
AnnotationCapWhat the line has at its start.
strokeType
undefined|stringLine color.
strokeDasharrayType
ArrayLine dash pattern, e.g.
[3, 3].strokeWidthType
undefined|numberLine width.
textType
undefined|stringText of a text, callout or caption.
textColorType
undefined|stringText color.
toolType
AnnotationToolThe tool the annotation was made with, if not one named after its shape.
widthType
undefined|numberWidth of a text or callout box. Text wraps to it. Fits the text if not set.