IAnnotatorSettings
Type interface
Sources
IAnnotatorSettings is an interface: it describes a shape of data and is not imported on its own.
Inheritance
IAnnotatorSettings extends IEntitySettings.
IAnnotatorSettings is not extended by any other symbol.
Properties
Defaults are those of Annotator. Classes that extend it can have other defaults: see their settings.
annotationsType
ArraySince 5.25.0The annotations. Setting it draws them, e.g. to restore annotations saved earlier. It is updated when annotation mode closes.
Type
ArrayDefault[ "pin", "undo", "redo", "delete", "clear", "layout", "done" ]Since 5.25.0Buttons in the toolbar besides the tools, in their usual places:
"pin"- pins new annotations to the chart or to the screen."undo","redo"."delete"- removes the selected annotation."clear"- removes all annotations, once confirmed."layout"- lays the toolbar out in rows or in a column."done"- closes annotation mode, keeping the changes."cancel"- closes annotation mode, dropping the changes.
captionTextType
undefined|stringDefaultroot.language.translateAny("Text")Since 5.25.0Text of a new caption.
colorsType
ArrayDefault computed at runtimeSince 5.25.0Colors offered in the toolbar.
defaultTextType
undefined|stringDefaultroot.language.translateAny("Your text here")Since 5.25.0Text of a new text or callout.
disableRotationType
undefined|false|trueDefaultfalseSince 5.25.0Hides the grip that rotates an annotation.
escapeActionType
"save"|"cancel"|"none"Default"save"Since 5.25.0What ESC does in annotation mode, once nothing is selected:
"save"- closes it, keeping the changes."cancel"- closes it, dropping the changes."none"- nothing.
fillType
ColorDefaultroot.interfaceColors.get("background")Since 5.25.0Fill color of new ellipses that are filled and of callouts. The chart's background color by default.
fontFamiliesType
ArrayDefault[ "Helvetica, Arial, sans-serif", "Times, \"Times New Roman\", serif", "Courier, \"Courier New\", monospace", "cursive", "fantasy" ]Since 5.25.0Font families offered in the toolbar.
fontFamilyType
undefined|stringSince 5.25.0Font family of new annotations. The chart's if not set.
fontSizeType
undefined|numberDefault16Since 5.25.0Font size of new annotations.
fontSizesType
ArrayDefault[ 12, 16, 20, 28, 40 ]Since 5.25.0Font sizes offered in the toolbar.
highlightColorType
ColorDefaultam5.color(0xFFFF00)Since 5.25.0Color of new highlights.
highlightOpacityType
undefined|numberDefault0.5Since 5.25.0Opacity of new highlights.
iconsType
ArraySince 5.25.0Icons the icon tool offers. The stock chart's arrows and icons if not set.
layerType
undefined|numberDefault1000Layer the annotations are drawn on, above the chart.
markerSettingsType
undefined|objectSince 5.7.4Deprecated Use the Annotator's own settings
Settings of marker.js 2, which earlier versions used. Those that have an equivalent are applied, e.g.
defaultColorSetascolorsanddefaultStrokeWidthasstrokeWidth.markerStateType
anyDeprecated Use
annotationsAnnotations in the format of marker.js 2, which earlier versions used.
Setting it draws them. When annotation mode closes, the annotations are also written here in that format, so setups that save it keep working.
Use
annotationsinstead: only it keeps what annotations are pinned to.markerStyleSettingsType
undefined|objectSince 5.7.5Deprecated Use a theme
Toolbar styles of marker.js 2, which earlier versions used. Colors of the toolbar and toolbox are applied.
opacityStepsType
ArrayDefault[ 0.1, 0.25, 0.5, 0.75, 1 ]Since 5.25.0Opacities offered in the toolbar.
pinToType
"chart"|"screen"Default"chart"Since 5.25.0What new annotations are pinned to:
"chart"- what is under them: values of an XY chart's axes, a place on a map, a pie slice, or a hierarchy or flow node. They then move, resize and zoom with it. Where there is nothing to pin to, they stay where they are on the chart's area."screen"- where they are on the chart's area.
The user can switch it in the toolbar.
strokeType
ColorDefaultam5.color(0xEF4444)Since 5.25.0Line color of new annotations.
strokeDasharrayType
ArraySince 5.25.0Dash pattern of new annotations.
strokeDasharraysType
ArrayDefault[ [], [ 3, 3 ], [ 12, 3 ], [ 9, 6, 3, 6 ] ]Since 5.25.0Dash patterns offered in the toolbar. An empty one is a solid line.
strokeWidthType
undefined|numberDefault3Since 5.25.0Line width of new annotations.
strokeWidthsType
ArrayDefault[ 1, 2, 3, 5, 10 ]Since 5.25.0Line widths offered in the toolbar.
textColorType
ColorDefaultam5.color(0xEF4444)Since 5.25.0Text color of new annotations.
toolbarLayoutType
"horizontal"|"vertical"|"auto"Default"auto"Since 5.25.0How the toolbar is laid out when annotation mode opens: in rows along the chart's top, or in a column by its left edge.
"auto"picks a column if the chart is taller than it is wide, and rows otherwise.The user can switch it, move the toolbar by its grip, and collapse it by clicking the grip.
toolsType
ArrayDefault[ "rectangle", "ellipse", "highlight", "cover", "line", "arrow", "curve", "measure", "polyline", "freehand", "text", "callout", "caption", "icon" ]Since 5.25.0Tools in the toolbar, in this order.
9 inherited items
animationsType
ArrayInherited fromIEntitySettingsSince 5.20.8Animations the element plays on its own, described as data - so they can be set from a JSON config and saved with it.
Each one animates a setting of the element (or, with
target: "dataItem", a value of its data item - a map point'spositionOnLine, say). They start when the setting is applied, restart when it changes, and stop when the element is disposed. A saved config keeps what was configured, never a value caught half way through an animation.sprite.set("animations", [ { key: "rotation", to: 360, duration: 4000, loops: 0 }, { key: "scale", from: 1, to: 1.3, duration: 800, loops: 0, yoyo: true, easing: "sine" } ]);idType
undefined|stringInherited fromIEntitySettingsA unique ID for looking the element up in
root.entitiesById. Setting an ID that another element already has throws an error.ignoreThemesType
undefined|false|trueDefaultfalseInherited fromIEntitySettingsSince 5.15.6Ignores themes: no theme rule applies to the element, not even one of the default theme.
stateAnimationDurationType
undefined|numberDefault0Inherited fromIEntitySettingsHow long, in milliseconds, a switch from one state to another animates.
0switches at once.stateAnimationEasingType
$ease.EasingDefaultam5.ease.out(am5.ease.cubic)Inherited fromIEntitySettingsEasing of the animated switch from one state to another.
themesType
ArrayInherited fromIEntitySettingsThemes applied to the element and everything inside it.
themeTagsType
ArrayDefault[]Inherited fromIEntitySettingsTags that theme rules can target. They also count for the element's children, so a rule can match a child by a tag of its parent.
More info: Themes
themeTagsSelfType
ArrayInherited fromIEntitySettingsTags that theme rules can target, like
themeTags, but only for this element, not its children.More info: Themes
userDataType
anyInherited fromIEntitySettingsAny data of your own to keep with the element.