Annotations let you create your own custom objects within charts. One can create various shapes like polygons, rectangles, circles, arcs, etc., render annotation text at required positions, load external images and much more.
Members
-
<static> this.groups :FusionCharts~annotations~Groups[]
-
The list of all the groups that have been rendered using the given instance of the annotations class.
Type:
FusionCharts~annotations~Groups[]
Methods
-
addGroup(options) → {object}
-
Adds a group in the annotations that acts as a container for the shapes that have to be drawn within the group. The shapes drawn within a group generally share some properties or characteristics.
Parameters:
Parameter Description options
The options that pertain to the new group element to be added.
Returns:
newGroup The created group object.
Type:
-
addItem(groupId, options)
-
Adds an item to either a specific group or creates a new group and adds the item to it.
Parameters:
Parameter Description groupId
- string
-
<optional>
If the item has to be added to a particular group then, the id of that group is required.
options
The options that have to used to create the item.
-
clear()
-
Clears all groups and the contained shapes that belong to the annotation object.
-
hide(id)
-
Hides the item (group or shape) with the given id.
Parameters:
Parameter Description id
-
show(id)
-
Shows the item (group or shape) with the given id.
Parameters:
Parameter Description id
-
update(id, key, value)
-
Method to dynamically update a shape or group with an id.
Parameters:
Parameter Description id
The id of the annotation shape or group.
key
The option that is to be updated.
value
The new value to be assigned to the option.
-
destroy(id)
-
Destros a particular item (group or shape) with the given id.
Parameters:
Parameter Description id
Events
-
annotationClick
-
Fired when an annotation is clicked
Parameters:
Parameter Description chartX
x-coordinate of the pointer relative to the chart.
chartY
y-coordinate of the pointer relative to the chart.
pageX
x-coordinate of the pointer relative to the page.
pageY
y-coordinate of the pointer relative to the page.
annotationId
Specifies the Id of the annotation (if provided during annotation creation).
annotationOptions
contains all the options that are set on the annotations.
groupId
Specifies the Id of the annotation group (if provided during annotation creation) within which the annotation exists.
groupOptions
contains all the options that are set on the annotation group.
-
annotationRollOver
-
Fired when the pointer moves over an annotation
Parameters:
Parameter Description chartX
x-coordinate of the pointer relative to the chart.
chartY
y-coordinate of the pointer relative to the chart.
pageX
x-coordinate of the pointer relative to the page.
pageY
y-coordinate of the pointer relative to the page.
annotationId
Specifies the Id of the annotation (if provided during annotation creation).
annotationOptions
contains all the options that are set on the annotations.
groupId
Specifies the Id of the annotation group (if provided during annotation creation) within which the annotation exists.
groupOptions
contains all the options that are set on the annotation group.
-
annotationRollOut
-
Fired when the pointer moves out of an annotation
Parameters:
Parameter Description chartX
x-coordinate of the pointer relative to the chart.
chartY
y-coordinate of the pointer relative to the chart.
pageX
x-coordinate of the pointer relative to the page.
pageY
y-coordinate of the pointer relative to the page.
annotationId
Specifies the Id of the annotation (if provided during annotation creation).
annotationOptions
contains all the options that are set on the annotations.
groupId
Specifies the Id of the annotation group (if provided during annotation creation) within which the annotation exists.
groupOptions
contains all the options that are set on the annotation group.