Annotation
Type classSince 4.5.5
A plugin which automatically groups PercenSeries slices that are smaller than certain percent into one "Other" slice.
By pushing an instance of Annnotation into plugin list of any Chart, it automatically applies the functionality.
Example:
let annotation = chart.plugins.push(new am4plugins_annotation.Annotation());
let annotation = chart.plugins.push(new am4plugins_annotation.Annotation());
{
"plugins": [{
"type": "Annotation"
}]
}
Sources
This information about Annotation is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.
Inheritance
Annotation extends Plugin.
Annotation is not extended by any other symbol.
Properties
activeType
booleanDefaultfalseSeting to
trueputs the chart in annotation mode.Setting to
falsereturns chart to regular mode of operation.autoSizeType
booleanDefaultfalseSince 4.7.19If set to
trueplugin will try to reposition annotation relatively when size of the chart chanages.This feature is experimental. Use at your own risk.
colorsList of colors to show in selection.
currentColorType
ColorDefault#000Currently selected color.
currentFontSizeType
numberDefault10Currently selected font size.
currentFontWeightType
numberDefault400Currently selected font weight.
currentOpacityType
numberDefault1Currently selected opacity.
currentToolType
stringDefaultselectCurrently selected tool.
currentWidthType
numberDefault1Currently selected width.
dataType
anySince 4.5.6Set or get annotation data.
fabricType
CanvasReturns an instance of Fabric's
Canvas.fontSizesType
Array<number>List of available font sizes.
fontWeightsType
Array<number>List of available font weights.
groupType
SVGGElementA
<g>that holds SVG representation of the annotations in chart overlay.iconsType
Array<string>Default[]List of icons to use in annotation
indicatorType
HTMLElementCurrent tool/color indicator element.
opacitiesType
Array<number>List of opacities available for selection.
useMenuType
booleanDefaulttrueSince 4.8.0If set to
falsethe plugin will not create own menu nor will add its items to existing Export menu.In such case, annotation functionality will be available only via API.
widthsType
Array<number>List of widths in pixels for line and free-draw tool.
Methods
activate()Returns
voidActivates annotation mode.
addIcon(url:string)Returns
voidAdds an image to canvas.
addText()Returns
voidAdds an editable text object to canvas.
arrow()Returns
voidPuts annotator in arrow drawing mode.
clear()Returns
voidClears all annotations.
constructor()Returns
AnnotationConstructor
deactivate()Returns
voidDeactivates annotation mode.
delete()Returns
voidPuts annotator in object deletion mode
deleteSelected()Returns
voidDeletes selected objects
discard()Returns
voidClears all annotations and exits annotation mode.
draw()Returns
voidPuts annotator in free-drawing mode.
init()Returns
voidline()Returns
voidPuts annotator in line drawing mode.
select()Returns
voidPuts annotator in object selection mode.
setColor(value:Color)Returns
voidSets color.
setFontSize(value:number)Returns
voidSets font size.
setFontWeight(value:number)Returns
voidSets font weight.
setIconFill(img:Image)Returns
voidAttemps to set a fill to the SVG icon.
setOpacity(value:number)Returns
voidSets opacity.
setWidth(value:number)Returns
voidSets line width.
underConstruction()Returns
voidDoes nothing.
2 inherited items
Events
Annotation does not have any events.