Type class
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" }] }
@since 4.5.5
@todo resolve translations
@todo change mouse cursors based on context/tool
@todo better line selection on click
@todo arrow support
@todo undo/redo
@todo reposition/resize annotations on chart resize
@todo make annotations hold on IE (when in not annotation mode)
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
active # |
Type Default Seting to Setting to |
---|---|
autoSize # |
Type Default If set to This feature is experimental. Use at your own risk. @since 4.7.19 |
colors # |
Type List of colors to show in selection. |
currentColor # |
Type Default Currently selected color. |
currentFontSize # |
Type Default Currently selected font size. |
currentFontWeight # |
Type Default Currently selected font weight. |
currentOpacity # |
Type Default Currently selected opacity. |
currentTool # |
Type Default Currently selected tool. |
currentWidth # |
Type Default Currently selected width. |
data # |
Type Set or get annotation data. @since 4.5.6 |
fabric # |
Type Returns an instance of Fabric's |
fontSizes # |
Type List of available font sizes. |
fontWeights # |
Type List of available font weights. |
group # |
Type A |
icons # |
Type Default List of icons to use in annotation |
indicator # |
Type Current tool/color indicator element. |
opacities # |
Type List of opacities available for selection. |
target # |
Inherited from A target object plugin is for. |
useMenu # |
Type Default If set to In such case, annotation functionality will be available only via API. @since 4.8.0 |
widths # |
Type List of widths in pixels for line and free-draw tool. |
There is 1 inherited item currently hidden from this list. |
Methods
activate() |
Returns Activates annotation mode. |
---|---|
addIcon( url: ) |
Returns Adds an image to canvas. |
addText() |
Returns Adds an editable text object to canvas. |
arrow() |
Returns Puts annotator in arrow drawing mode. |
clear() |
Returns Clears all annotations. |
constructor() |
Returns Constructor |
deactivate() |
Returns Deactivates annotation mode. |
delete() |
Returns Puts annotator in object deletion mode |
deleteSelected() |
Returns Deletes selected objects |
discard() |
Returns Clears all annotations and exits annotation mode. |
dispose() |
Returns Inherited from Disposes this object and related stuff. |
draw() |
Returns Puts annotator in free-drawing mode. |
init() |
Returns |
isDisposed() |
Returns Inherited from Returns if this element is already disposed. |
line() |
Returns Puts annotator in line drawing mode. |
select() |
Returns Puts annotator in object selection mode. |
setColor( value: ) |
Returns Sets color. |
setFontSize( value: ) |
Returns Sets font size. |
setFontWeight( value: ) |
Returns Sets font weight. |
setIconFill( img: ) |
Returns Attemps to set a fill to the SVG icon. |
setOpacity( value: ) |
Returns Sets opacity. |
setWidth( value: ) |
Returns Sets line width. |
underConstruction() |
Returns Does nothing. |
There are 2 inherited items currently hidden from this list. |
Events
Annotation does not have any events.
Adapters
Annotation does not have any adapters.