annotations
Configuration Structure
annotations: {}yaxis
y
0Value on which the annotation will be drawn
y2
nullIf you provide this additional y2 value, a region will be drawn from y to y2.
strokeDashArray
1Creates dashes in borders of the SVG path. A higher number creates more space between dashes in the border.
borderColor
'#c2c2c2'Color of the annotation line
opacity
0.3Opacity of the filled region.
offsetX
0Sets the left offset for annotation line
offsetY
0Sets the top offset for annotation line
width
'100%'Sets the width for annotation line
yAxisIndex
0When there are multiple y-axis, setting this options will put the annotation for that particular y-axis
borderColor
'#c2c2c2'Border Color of the label
borderWidth
1Border width of the label
borderRadius
2Border-radius of the label
text
undefinedText for tha annotation label
textAnchor
'end'The alignment of text relative to label’s drawing position
Accepted values
- start
- middle
- end
position
'right'Available Options
- left
- right
offsetX
0Sets the left offset for annotation label
offsetY
0Sets the top offset for annotation label
mouseEnter
Fires when user's mouse enter the label of the annotation.
mouseLeave
Fires when user's mouse leave the label of the annotation.
click
Fires when user clicks on the label of the annotation.
style
background
'#fff'Background Color for the annotation label
color
undefinedForeColor for the annotation label
fontSize
'11px'FontSize for the annotation label
fontWeight
400Font-weight for the annotation label
fontFamily
undefinedFont-family for the annotation label
cssClass
A custom Css Class to give to the annotation label elements
padding
left
5Left padding for the label
right
5Right padding for the label
top
2Top padding for the label
bottom
2Bottom padding for the label
xaxis
x
0Value on which the annotation will be drawn
x2
nullIf you provide this additional x2 value, a region will be drawn from x to x2.
strokeDashArray
1Creates dashes in borders of SVG path. A higher number creates more space between dashes in the border.
borderColor
'#c2c2c2'Color of the annotation line
opacity
0.3Opacity of the filled region.
offsetX
0Sets the left offset for annotation line
offsetY
0Sets the top offset for annotation line
borderColor
'#c2c2c2'Border color of the label
borderWidth
1Border width of the label
borderRadius
2Border-radius of the label
text
undefinedText for tha annotation label
textAnchor
'middle'The alignment of text relative to label’s drawing position Accepted values
- start
- middle
- end
position
'top'Available Options
- top
- bottom
orientation
'vertical'Available Options
- vertical
- horizontal
offsetX
0Sets the left offset for annotation label
offsetY
0Sets the top offset for annotation label
mouseEnter
Fires when user’s mouse enter the label of the annotation.
mouseLeave
Fires when user’s mouse leave the label of the annotation.
click
Fires when user clicks on the label of the annotation.
style
background
'#fff'Background Color for the annotation label
color
ForeColor for the annotation label
fontSize
'11px'FontSize for the annotation label
fontWeight
400Font-weight for the annotation label
fontFamily
undefinedFont-family for the annotation label
cssClass
A custom Css Class to give to the annotation label elements
points
x
0X Value on which the annotation will be drawn (can be either timestamp for datetime x-axis or string category for category x-axis)
y
nullY Value on which the annotation will be drawn
yAxisIndex
0When there are multiple y-axis, setting this options will put the point annotation for that particular y-axis' y value
seriesIndex
undefinedIn a multiple series, you will have to specify which series the annotation's y value belongs to. Not required for single series
mouseEnter
Fires when user’s mouse enter the marker of point annotation.
mouseLeave
Fires when user’s mouse leave the marker of point annotation.
click
Fires when user clicks on the marker of point annotation.
marker
size
4Size of the marker.
fillColor
'#fff'Fill Color of the marker point.
strokeColor
'#333'Stroke Color of the marker point.
strokeWidth
2Stroke Size of the marker point.
shape
'circle'Shape of the marker. Available Options for shape
- circle
- square
offsetX
0Sets the left offset of the marker
offsetY
0Sets the top offset of the marker
cssClass
Additional CSS classes to append to the marker
label
borderColor
'#c2c2c2'Border Color of the label
borderWidth
1Border width of the label
borderRadius
2Border-radius of the label
text
undefinedText for tha annotation label
textAnchor
'middle'The alignment of text relative to label’s drawing position Accepted values
- start
- middle
- end
offsetX
0Sets the left offset for annotation label
offsetY
0Sets the top offset for annotation label
mouseEnter
Fires when user’s mouse enter the label of the point annotation.
mouseLeave
Fires when user’s mouse leave the label of the point annotation.
click
Fires when user clicks on the label of the point annotation.
style
background
'#fff'Background Color for the annotation label
color
undefinedForeColor for the annotation label
fontSize
'11px'FontSize for the annotation label
fontWeight
400Font-weight for the annotation label
fontFamily
undefinedFont-family for the annotation label
cssClass
A custom Css Class to give to the annotation label elements
padding
left
5Left padding for the label
right
5Right padding for the label
top
2Top padding for the label
bottom
2Bottom padding for the label
path
undefinedProvide a full path of the image to display in place of annotation.
width
20Width of image annotation.
height
20Height of image annotation.
offsetX
0Left offset of the image.
offsetY
0Top offset of the image.
texts
x
0X (left) position for the text relative to the element specified in appendTo property
y
0Y (top) position for the text relative to the element specified in appendTo property
text
''The main text to be displayed
textAnchor
'start'The alignment of text relative to label’s drawing position Accepted values
- start
- middle
- end
foreColor
undefinedForeColor for the annotation label
fontSize
'13px'FontSize for the annotation label
fontWeight
400Font-weight for the annotation label
fontFamily
undefinedFont-family for the annotation label
appendTo
A query selector to which the text element will be appended.
borderColor
'#c2c2c2'Border Color for the label
borderRadius
0Border Radius for the label
borderWidth
0Border width for the label
paddingLeft
4Left padding for the label
paddingRight
4Right padding for the label
paddingTop
2Top padding for the label
paddingBottom
2Bottom padding for the label
images
path
An absolute path to the image
x
Left position for the image relative to the element specified in appendTo property
y
Top position for the image relative to the element specified in appendTo property
width
The width of the image
height
The height of the image
appendTo
A query selector to which the image element will be appended.