Class Tooltip
- All Implemented Interfaces:
Serializable
- Version:
- $Id: $Id
- Author:
- Vaadin
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter for the fieldanimation.Getter for the fieldbackgroundColor.Getter for the fieldborderColor.Getter for the fieldborderRadius.Getter for the fieldborderWidth.Getter for the fieldenabled.Getter for the fieldfollowPointer.Getter for the fieldfollowTouchMove.Getter for the fieldfooterFormat.getFormatter.Getter for the fieldheaderFormat.Getter for the fieldhideDelay.Getter for the fieldpointFormat.getPointFormatter.getPositioner.Getter for the fieldshadow.getStyle()Getter for the fieldstyle.Getter for the fielduseHTML.Getter for the fieldvalueDecimals.Getter for the fieldvaluePrefix.Getter for the fieldvalueSuffix.voidsetAnimation(Boolean animation) Enable or disable animation of the tooltip.voidsetBackgroundColor(Color backgroundColor) The background color or gradient for the tooltip.voidsetBorderColor(Color borderColor) The color of the tooltip border.voidsetBorderRadius(Number borderRadius) The radius of the rounded border corners.voidsetBorderWidth(Number borderWidth) The pixel width of the tooltip border.voidsetEnabled(Boolean enabled) Enable or disable the tooltip.voidsetFollowPointer(Boolean followPointer) Whether the tooltip should follow the mouse as it moves across columns, pie slices and other point types with an extent.voidsetFollowTouchMove(Boolean followTouchMove) Whether the tooltip should follow the finger as it moves on a touch device.voidsetFooterFormat(String footerFormat) A string to append to the tooltip format.voidsetFormatter(String _fn_formatter) setFormatter.voidsetHeaderFormat(String headerFormat) The HTML of the tooltip header line.voidsetHideDelay(Number hideDelay) The number of milliseconds to wait until the tooltip is hidden when mouse out from a point or chart.voidsetPointFormat(String pointFormat) The HTML of the point's line in the tooltip.voidsetPointFormatter(String _fn_pointFormatter) setPointFormatter.voidsetPositioner(String _fn_positioner) setPositioner.voidWhether to apply a drop shadow to the tooltip.voidCSS styles for the tooltip.voidsetUseHTML(Boolean useHTML) Use HTML to render the contents of the tooltip instead of SVG.voidsetValueDecimals(Number valueDecimals) How many decimals to show in each series' value.voidsetValuePrefix(String valuePrefix) A string to prepend to each series' value.voidsetValueSuffix(String valueSuffix) A string to append to each series' value.
-
Constructor Details
-
Tooltip
public Tooltip()Constructor for Tooltip.
-
Tooltip
Constructor for Tooltip.
- Parameters:
enabled- aBooleanobject.
-
-
Method Details
-
getAnimation
Getter for the field
animation.- Returns:
- a
Booleanobject. - See Also:
-
setAnimation
Enable or disable animation of the tooltip. In slow legacy IE browsers the animation is disabled by default.Defaults to: true
- Parameters:
animation- aBooleanobject.
-
getBackgroundColor
Getter for the field
backgroundColor.- Returns:
- a
Colorobject. - See Also:
-
setBackgroundColor
The background color or gradient for the tooltip.Defaults to: rgba(255, 255, 255, 0.85)
- Parameters:
backgroundColor- aColorobject.
-
getBorderColor
Getter for the field
borderColor.- Returns:
- a
Colorobject. - See Also:
-
setBorderColor
The color of the tooltip border. Whennull, the border takes the color of the corresponding series or point.Defaults to: null
- Parameters:
borderColor- aColorobject.
-
getBorderRadius
Getter for the field
borderRadius.- Returns:
- a
Numberobject. - See Also:
-
setBorderRadius
The radius of the rounded border corners.Defaults to: 3
- Parameters:
borderRadius- aNumberobject.
-
getBorderWidth
Getter for the field
borderWidth.- Returns:
- a
Numberobject. - See Also:
-
setBorderWidth
The pixel width of the tooltip border.Defaults to: 1
- Parameters:
borderWidth- aNumberobject.
-
getEnabled
Getter for the field
enabled.- Returns:
- a
Booleanobject. - See Also:
-
setEnabled
Enable or disable the tooltip.Defaults to: true
- Parameters:
enabled- aBooleanobject.
-
getFollowPointer
Getter for the field
followPointer.- Returns:
- a
Booleanobject. - See Also:
-
setFollowPointer
Whether the tooltip should follow the mouse as it moves across columns, pie slices and other point types with an extent. By default it behaves this way for scatter, bubble and pie series by override in the
plotOptionsfor those series types.For touch moves to behave the same way, followTouchMove must be
truealso.Defaults to: true
- Parameters:
followPointer- aBooleanobject.
-
getFollowTouchMove
Getter for the field
followTouchMove.- Returns:
- a
Booleanobject. - See Also:
-
setFollowTouchMove
Whether the tooltip should follow the finger as it moves on a touch device. If chart.zoomType is set, it will overridefollowTouchMove.Defaults to: true
- Parameters:
followTouchMove- aBooleanobject.
-
getFormatter
getFormatter.
- Returns:
- a
Stringobject.
-
setFormatter
setFormatter.
- Parameters:
_fn_formatter- aStringobject.
-
getHeaderFormat
Getter for the field
headerFormat.- Returns:
- a
Stringobject. - See Also:
-
setHeaderFormat
The HTML of the tooltip header line. Variables are enclosed by curly brackets. Available variables are
point.name,series.name,series.colorand other members from thepointandseriesobjects.Defaults to
<span style="font-size: 10px">{point.key}</span><br/>- Parameters:
headerFormat- aStringobject.
-
getHideDelay
Getter for the field
hideDelay.- Returns:
- a
Numberobject. - See Also:
-
setHideDelay
The number of milliseconds to wait until the tooltip is hidden when mouse out from a point or chart.Defaults to: 500
- Parameters:
hideDelay- aNumberobject.
-
getPointFormat
Getter for the field
pointFormat.- Returns:
- a
Stringobject. - See Also:
-
setPointFormat
The HTML of the point's line in the tooltip. Variables are enclosed by curly brackets. Available variables are point.value, series.name and series.color and other properties on the same form. Furthermore, point.value can be extended by the
tooltip.valuePrefixandtooltip.valueSuffixvariables. This can also be overridden for each series, which makes it a good hook for displaying units.For maps it defaults to
'{point.name}: {point.value}<br/>'- Parameters:
pointFormat- aStringobject.
-
getPointFormatter
getPointFormatter.
- Returns:
- a
Stringobject.
-
setPointFormatter
setPointFormatter.
- Parameters:
_fn_pointFormatter- aStringobject.
-
getPositioner
getPositioner.
- Returns:
- a
Stringobject.
-
setPositioner
setPositioner.
- Parameters:
_fn_positioner- aStringobject.
-
getShadow
Getter for the field
shadow.- Returns:
- a
Booleanobject. - See Also:
-
setShadow
Whether to apply a drop shadow to the tooltip.Defaults to: true
- Parameters:
shadow- aBooleanobject.
-
getStyle
Getter for the field
style.- Returns:
- a
Styleobject. - See Also:
-
setStyle
CSS styles for the tooltip. The tooltip can also be styled through the CSS class.highcharts-tooltip.Defaults to: { "color": "#333333", "cursor": "default", "fontSize": "12px", "padding": "8px", "pointerEvents": "none", "whiteSpace": "nowrap" }
- Parameters:
style- aStyleobject.
-
getUseHTML
Getter for the field
useHTML.- Returns:
- a
Booleanobject. - See Also:
-
setUseHTML
Use HTML to render the contents of the tooltip instead of SVG. Using HTML allows advanced formatting like tables and images in the tooltip. It is also recommended for rtl languages as it works around rtl bugs in early Firefox.Defaults to: false
- Parameters:
useHTML- aBooleanobject.
-
getValueDecimals
Getter for the field
valueDecimals.- Returns:
- a
Numberobject. - See Also:
-
setValueDecimals
How many decimals to show in each series' value. This is overridable in each series' tooltip options object. The default is to preserve all decimals.- Parameters:
valueDecimals- aNumberobject.
-
getValuePrefix
Getter for the field
valuePrefix.- Returns:
- a
Stringobject. - See Also:
-
setValuePrefix
A string to prepend to each series' value. Overridable in each series' tooltip options object.- Parameters:
valuePrefix- aStringobject.
-
getValueSuffix
Getter for the field
valueSuffix.- Returns:
- a
Stringobject. - See Also:
-
setValueSuffix
A string to append to each series' value. Overridable in each series' tooltip options object.- Parameters:
valueSuffix- aStringobject.
-