Class Tooltip
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Object
protected Object
protected String
protected Integer
protected FontStyle
protected Integer
protected Callbacks
protected Integer
protected Integer
protected Boolean
protected JavaScriptFunction
protected Object
protected String
protected Integer
protected FontStyle
protected Integer
protected Integer
protected JavaScriptFunction
protected String
protected Object
protected Object
protected String
protected Integer
protected FontStyle
protected Integer
protected Integer
protected Integer
protected Integer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMode()
setBackgroundColor
(Object backgroundColor) Background color of the tooltipsetBodyFontColor
(Object bodyFontColor) Font color for tooltip items.setBodyFontFamily
(String bodyFontFamily) Font family for tooltip items inherited from global font familysetBodyFontSize
(Integer bodyFontSize) Font size for tooltip items inherited from global font sizesetBodyFontStyle
(FontStyle bodyFontStyle) setBodySpacing
(Integer bodySpacing) Spacing to add to top and bottom of each tooltip itemsetCallbacks
(Callbacks callbacks) See the callbacks section belowsetCaretSize
(Integer caretSize) Size, in px, of the tooltip arrowsetCornerRadius
(Integer cornerRadius) Radius of tooltip corner curvessetEnabled
(Boolean enabled) Are tooltips enabledsetExternal
(JavaScriptFunction external) See section belowsetFooterFontColor
(Object footerFontColor) Font color for tooltip footer.setFooterFontFamily
(String footerFontFamily) Font family for tooltip footer inherited from global font family.setFooterFontSize
(Integer footerFontSize) Font size for tooltip footer inherited from global font size.setFooterFontStyle
(FontStyle footerFontStyle) Font style for tooltip footer.setFooterMarginTop
(Integer footerMarginTop) Margin to add before drawing the footersetFooterSpacing
(Integer footerSpacing) Spacing to add to top and bottom of each footer line.setItemSort
(JavaScriptFunction itemSort) Allows sorting of tooltip items.Sets which elements appear in the tooltip.setMultiKeyBackground
(Object multiKeyBackground) Color to draw behind the colored boxes when multiple items are in the tooltipsetTitleFontColor
(Object titleFontColor) Font color for tooltip titlesetTitleFontFamily
(String titleFontFamily) Font family for tooltip title inherited from global font familysetTitleFontSize
(Integer titleFontSize) Font size for tooltip title inherited from global font sizesetTitleFontStyle
(FontStyle titleFontStyle) setTitleMarginBottom
(Integer titleMarginBottom) Margin to add on bottom of title sectionsetTitleSpacing
(Integer titleSpacing) Spacing to add to top and bottom of each title line.setXPadding
(Integer xPadding) Padding to add on left and right of tooltipsetYPadding
(Integer yPadding) Padding to add on top and bottom of tooltip
-
Field Details
-
enabled
-
external
-
mode
-
itemSort
-
backgroundColor
-
titleFontFamily
-
titleFontSize
-
titleFontStyle
-
titleFontColor
-
titleSpacing
-
titleMarginBottom
-
bodyFontFamily
-
bodyFontSize
-
bodyFontStyle
-
bodyFontColor
-
bodySpacing
-
xPadding
-
yPadding
-
caretSize
-
cornerRadius
-
multiKeyBackground
-
callbacks
-
-
Constructor Details
-
Tooltip
public Tooltip()
-
-
Method Details
-
getEnabled
- See Also:
-
setEnabled
Are tooltips enabled
Default
true
-
getExternal
- See Also:
-
setExternal
See section below
Default
null
-
getMode
- See Also:
-
setMode
Sets which elements appear in the tooltip. Acceptable options are 'single', 'label' or 'x-axis'. single highlights the closest element. label highlights elements in all datasets at the same X value. 'x-axis' also highlights elements in all datasets at the same X value, but activates when hovering anywhere within the vertical slice of the x-axis representing that X value.
Default
'single'
-
getItemSort
- See Also:
-
setItemSort
Allows sorting of tooltip items. Must implement a function that can be passed to Array.prototype.sort
Default
undefined
-
getBackgroundColor
- See Also:
-
setBackgroundColor
Background color of the tooltip
Default
'rgba(0,0,0,0.8)'
-
getTitleFontFamily
- See Also:
-
setTitleFontFamily
Font family for tooltip title inherited from global font family
Default
"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif"
-
getTitleFontSize
- See Also:
-
setTitleFontSize
Font size for tooltip title inherited from global font size
Default
12
-
getTitleFontStyle
- See Also:
-
setTitleFontStyle
Default
"bold"
-
getTitleFontColor
- See Also:
-
setTitleFontColor
Font color for tooltip title
Default
"#fff"
-
getTitleSpacing
- See Also:
-
setTitleSpacing
Spacing to add to top and bottom of each title line.
Default
2
-
getTitleMarginBottom
- See Also:
-
setTitleMarginBottom
Margin to add on bottom of title section
Default
6
-
getBodyFontFamily
- See Also:
-
setBodyFontFamily
Font family for tooltip items inherited from global font family
Default
"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif"
-
getBodyFontSize
- See Also:
-
setBodyFontSize
Font size for tooltip items inherited from global font size
Default
12
-
getBodyFontStyle
- See Also:
-
setBodyFontStyle
Default
"normal"
-
getBodyFontColor
- See Also:
-
setBodyFontColor
Font color for tooltip items.
Default
"#fff"
-
getBodySpacing
- See Also:
-
setBodySpacing
Spacing to add to top and bottom of each tooltip item
Default
2
-
getXPadding
- See Also:
-
setXPadding
Padding to add on left and right of tooltip
Default
6
-
getYPadding
- See Also:
-
setYPadding
Padding to add on top and bottom of tooltip
Default
6
-
getCaretSize
- See Also:
-
setCaretSize
Size, in px, of the tooltip arrow
Default
5
-
getCornerRadius
- See Also:
-
setCornerRadius
Radius of tooltip corner curves
Default
6
-
getMultiKeyBackground
- See Also:
-
setMultiKeyBackground
Color to draw behind the colored boxes when multiple items are in the tooltip
Default
"#fff"
-
getCallbacks
- See Also:
-
setCallbacks
See the callbacks section below
Default
-