class anychart.core.ui.Tooltip Improve this Doc
Extends: anychart.core.VisualBase
Class for the tooltip.
Methods Overview
Specific settings | |
allowLeaveChart() | Tooltip allowLeaveChart settings. |
allowLeaveScreen() | Tooltip allowLeaveScreen settings. |
allowLeaveStage() | Tooltip allowLeaveStage settings. |
displayMode() | Display mode settings. |
format() | Function to format content text. |
hide() | Hides tooltips with delay. |
hideDelay() | Hide delay settings. |
titleFormat() | Function to format title text. |
unionFormat() | Function to format content text. |
valuePostfix() | Postfix settings. |
valuePrefix() | Prefix settings. |
Base Text Settings | |
maxLength() | Maximum text length. |
Content Text Settings | |
disablePointerEvents() | Pointer events settings. |
fontColor() | Font color settings. |
fontDecoration() | Font decoration setting. |
fontFamily() | Font family settings. |
fontOpacity() | Font opacity settings. |
fontSize() | Font size settings. |
fontStyle() | Font style settings. |
fontVariant() | Font variant settings. |
fontWeight() | Font weight settings. |
hAlign() | Text horizontal align settings. |
letterSpacing() | Text letter spacing settings. |
lineHeight() | Text line height setting. |
selectable() | Text selectable option. |
textDirection() | Text direction settings. |
textIndent() | Text indent settings. |
textOverflow() | Text overflow settings. |
textSettings() | Font opacity setting. |
textShadow() | Font color settings. |
useHtml() | Enable/Disable HTML tooltip. |
vAlign() | Text vertical align settings. |
wordBreak() | Word break mode. |
wordWrap() | Word-wrap mode. |
Events | |
onBeforeContentChange() | onBeforeContentChange handler. |
onBeforeTitleChange() | onBeforeTitleChange handler. |
onContentChanged() | onContentChanged handler. |
onDomReady() | onDomReady handler. |
onTitleChanged() | onTitleChanged handler. |
Interactivity | |
enabled() | Element state (enabled or disabled). |
Size and Position | |
anchor() | Anchor settings. |
height() | Tooltip height. |
offsetX() | X offset settings. |
offsetY() | Y offset settings. |
padding() | Padding settings. |
position() | Position settings. |
positionMode() | Position mode settings. |
width() | Tooltip width. |
zIndex() | Z-index of the element. |
Text Settings | |
adjustFontSize() | Adjusting settings. |
maxFontSize() | Maximum font size settings. |
minFontSize() | Minimum font size settings. |
Visual settings | |
background() | Background settings. |
separator() | Separator settings. |
title() | Title settings. |
Methods Description
adjustFontSize
- [false, false] - do not adjust (adjust is off )
- [true, false] - adjust width
- [false, true] - adjust height
- [true, true] - adjust the first suitable value.
Returns:
number - An adjusted font size.var tooltip = chart.tooltip(); var adjustFontSize = tooltip.adjustFontSize();
Note: anychart.core.ui.Tooltip#fontSize does not work when adjusting is enabled.
Params:
Name | Type | Description |
---|---|---|
adjustOrAdjustByWidth | boolean | Array.<boolean> | Object | Is font needs to be adjusted in case of 1 argument and adjusted by width in case of 2 arguments. |
adjustByHeight | boolean | Is font needs to be adjusted by height. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
allowLeaveChart
Returns:
boolean - Boolean value.var tooltipSettings = chart.tooltip(); var value = tooltipSettings.allowLeaveChart();
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Allow or forbid tooltip to leave chart when moving. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
allowLeaveScreen
Returns:
boolean - Boolean value.var tooltipSettings = chart.tooltip(); var value = tooltipSettings.allowLeaveScreen();
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | false | Allow or forbid tooltip to leave screen when moving. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
allowLeaveStage
Returns:
boolean - Boolean value.var tooltipSettings = chart.tooltip(); var value = tooltipSettings.allowLeaveStage();
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | false | Allow or forbid tooltip to leave stage when moving. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
anchor
Returns:
anychart.enums.Anchor | string - Tooltip anchor settings.var tooltip = chart.tooltip(); var anchor = tooltip.anchor();
Params:
Name | Type | Default | Description |
---|---|---|---|
anchor | anychart.enums.Anchor | string | 'left-top' | Value to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
background
Returns:
anychart.core.ui.Background - Background settings.var tooltip = chart.tooltip(); var background = tooltip.background();
- null/boolean - disable background.
- object - sets background settings.
- string - sets fill settings.
Params:
Name | Type | Description |
---|---|---|
settings | null | boolean | Object | string | Background settings. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.disablePointerEvents
Returns:
boolean - The pointer events settings.var tooltip = chart.tooltip(); var disablePointerEvents = tooltip.disablePointerEvents();
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | false | Value to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.displayMode
Returns:
anychart.enums.TooltipDisplayMode | string - Display mode.var tooltip = chart.tooltip(); var displayMode = tooltip.displayMode();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.enums.TooltipDisplayMode | string | 'single' | Value to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
enabled
Returns:
boolean - Element state.Try it:
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Enabled state to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.if (!element.enabled()) element.enabled(true);
Try it:
fontColor
Returns:
string - Font color settings.var tooltip = chart.tooltip(); var fontColor = tooltip.fontColor();
Params:
Name | Type | Description |
---|---|---|
color | string | Font color to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
fontDecoration
Returns:
anychart.graphics.vector.Text.Decoration - Font decoration settings.var tooltip = chart.tooltip(); var fontDecoration = tooltip.fontDecoration();
Params:
Name | Type | Description |
---|---|---|
value | anychart.graphics.vector.Text.Decoration | string | Font decoration to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
fontFamily
Returns:
string - Font family settings.var tooltip = chart.tooltip(); var fontFamily = tooltip.fontFamily();
Params:
Name | Type | Description |
---|---|---|
family | string | Font family to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
fontOpacity
Returns:
number - Font opacity settings.var tooltip = chart.tooltip(); var fontOpacity = tooltip.fontOpacity();
Params:
Name | Type | Description |
---|---|---|
opacity | number | Font opacity to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
fontSize
Returns:
number - Font size settings.var tooltip = chart.tooltip(); var fontSize = tooltip.fontSize();
Params:
Name | Type | Description |
---|---|---|
size | number | string | Font size to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
fontStyle
Returns:
anychart.graphics.vector.Text.FontStyle - Font style settings.var tooltip = chart.tooltip(); var fontStyle = tooltip.fontStyle();
Params:
Name | Type | Description |
---|---|---|
style | string | anychart.graphics.vector.Text.FontStyle | Font style to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
fontVariant
Returns:
anychart.graphics.vector.Text.FontVariant - Font variant settings.var tooltip = chart.tooltip(); var fontVariant = tooltip.fontVariant();
Params:
Name | Type | Description |
---|---|---|
value | string | anychart.graphics.vector.Text.FontVariant | Font variant to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
fontWeight
Returns:
string | number - Font weight settings.var tooltip = chart.tooltip(); var fontWeight = tooltip.fontWeight();
Params:
Name | Type | Description |
---|---|---|
weight | string | number | Font weight to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
format
Returns:
function | string - Function to format title text.var tooltipSettings = chart.tooltip(); var format = tooltipSettings.format();
Learn more about using the format() method.
Params:
Name | Type | Description |
---|---|---|
format | function | string | Function or string token to format content text. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
hAlign
Returns:
anychart.graphics.vector.Text.HAlign - Horizontal align settings.var tooltip = chart.tooltip(); var hAlign = tooltip.hAlign();
Params:
Name | Type | Description |
---|---|---|
align | string | anychart.graphics.vector.Text.HAlign | Horizontal align to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
height
Returns:
string | number - Tooltip height.var tooltipSettings = chart.tooltip(); var height = tooltipSettings.height();
Params:
Name | Type | Description |
---|---|---|
height | string | number | Tooltip height to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
hide
Params:
Name | Type | Description |
---|---|---|
force | boolean | Ignore tooltips hide delay. |
event | anychart.core.MouseEvent | Event that initiate tooltip hiding. |
Returns:
boolean - Returns true if the tooltip was hidden.Try it:
hideDelay
Returns:
number - Hide delay settings.var tooltip = chart.tooltip(); var hideDelay = tooltip.hideDelay();
Params:
Name | Type | Default | Description |
---|---|---|---|
delay | number | 0 | Delay in milliseconds. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
letterSpacing
Returns:
number - Letter spacing settings.var tooltip = chart.tooltip(); var letterSpacing = tooltip.letterSpacing();
Params:
Name | Type | Description |
---|---|---|
spacing | number | Value to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
lineHeight
Returns:
number | string - Line height settings.var tooltip = chart.tooltip(); var lineHeight = tooltip.lineHeight();
Params:
Name | Type | Default | Description |
---|---|---|---|
height | number | string | 'normal' | Line height to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
maxFontSize
Returns:
number - Maximum font size.var tooltip = chart.tooltip(); var maxFontSize = tooltip.maxFontSize();
Params:
Name | Type | Default | Description |
---|---|---|---|
size | number | string | 9 | Maximum font size to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
maxLength
Returns:
number | null - Maximum length of text.var maxLengthValue = chart.tooltip().maxLength(); // null by default.
Params:
Name | Type | Default | Description |
---|---|---|---|
maxLength | number | null | null | Maximum text length to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.chart.tooltip().maxLength(15); // Limit characters count for tooltip format.
minFontSize
Returns:
number - Minimum font size.var tooltip = chart.tooltip(); var minFontSize = tooltip.minFontSize();
Params:
Name | Type | Default | Description |
---|---|---|---|
size | number | string | 9 | Minimum font size to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
offsetX
Returns:
number - Tooltip offset by X.var tooltip = chart.tooltip(); var offsetX = tooltip.offsetX();
Params:
Name | Type | Description |
---|---|---|
offset | number | Offset by X to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
offsetY
Returns:
number - Tooltip offset by Y.var tooltip = chart.tooltip(); var offsetY = tooltip.offsetY();
Params:
Name | Type | Description |
---|---|---|
offset | number | Offset by Y to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
onBeforeContentChange
Returns:
function():boolean - Handler function.Enable HTML-mode for the tooltip with tooltip.useHtml(true) to work with onBeforeContentChange().
The handler is called before changes are applied.
The handler determines whether to change the content.
If the handler returns true, then the content is changed and the handler passed to onContentChanged() is called.
If the handler returns false the content is not changed and the handler passed to onTitleChanged() will never be called.
See the structure of HTML-tooltip elements in the useHtml() method.
Params:
Name | Type | Description |
---|---|---|
handler | function():boolean | Handler function.
Function that looks like function(){ Handler context contains following fields: // this.parentElement - reference to the basic HTML-element. The parent DIV of the entire element // this.titleElement - reference to the title DIV // this.separatorElement - reference to HR-element, tooltip separator // this.contentElement - reference to the DIV of the tooltip content return booleanFlag // type boolean. If the handler returns true then the content is changed. If the handler returns false then the content is not changed. } |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
onBeforeTitleChange
Returns:
function():boolean - Handler function.Enable HTML-mode for the tooltip with tooltip.useHtml(true) to work with onBeforeTitleChange().
The handler is called before changes are applied.
The handler determines whether to change the title.
If the handler returns true, then the title is changed and the handler passed to onTitleChanged() is called.
If the handler returns false the title is not changed and the handler passed to onTitleChanged() will never be called.
See the structure of HTML-tooltip elements in the useHtml() method.
Params:
Name | Type | Description |
---|---|---|
handler | function():boolean | Handler function.
Function that looks like function(){ Handler context contains following fields: // this.parentElement - reference to the basic HTML-element. The parent DIV of the entire element // this.titleElement - reference to the title DIV // this.separatorElement - reference to HR-element, tooltip separator // this.contentElement - reference to the DIV of the tooltip content return booleanFlag // type boolean. If the handler returns true then the title is changed. If the handler returns false then the title is not changed. } |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
onContentChanged
Returns:
function - Handler function.Enable HTML-mode for the tooltip with tooltip.useHtml(true) to work with onContentChanged().
The method informs that the content has been changed.
The onContentChanged() method is called only if the onBeforeContentChange() method returns true.
See the structure of HTML-tooltip elements in the useHtml() method.
Params:
Name | Type | Description |
---|---|---|
handler | function | Handler function.
Function that looks like function(){ Handler context contains following fields: // this.parentElement - reference to the basic HTML-element. The parent DIV of the entire element // this.titleElement - reference to the title DIV // this.separatorElement - reference to HR-element, tooltip separator // this.contentElement - reference to the DIV of the tooltip content } |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
onDomReady
Returns:
function - Handler function.Enable HTML-mode for the tooltip with tooltip.useHtml(true) to work with onDomReady().
The handler set from the onDomReady() method is called once when all elements of the HTML-tooltip have been created.
The handler set from the onDomReady() method is called for each tooltip on the chart. Setting the onDomReady() handler to a chart calls a handler for each tooltip on the chart (for example, several tooltips for separated mode).
See the structure of HTML-tooltip elements in the useHtml() method.
Params:
Name | Type | Description |
---|---|---|
handler | function | Handler function.
Function that looks like function(){ Handler context contains following fields: // this.parentElement - reference to the basic HTML-element. The parent DIV of the entire element // this.titleElement - reference to the title DIV // this.separatorElement - reference to HR-element, tooltip separator // this.contentElement - reference to the DIV of the tooltip content } |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
onTitleChanged
Returns:
function - Handler function.Enable HTML-mode for the tooltip with tooltip.useHtml(true) to work with onTitleChanged().
The method informs that the title has been changed.
The onTitleChanged() method is called only if the onBeforeTitleChange() method returns true.
See the structure of HTML-tooltip elements in the useHtml() method.
Params:
Name | Type | Description |
---|---|---|
handler | function | Handler function.
Function that looks like function(){ Handler context contains following fields: // this.parentElement - reference to the basic HTML-element. The parent DIV of the entire element // this.titleElement - reference to the title DIV // this.separatorElement - reference to HR-element, tooltip separator // this.contentElement - reference to the DIV of the tooltip content } |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
padding
Returns:
anychart.core.utils.Padding - Tooltip padding.Try it:
Params:
Name | Type | Default | Description |
---|---|---|---|
padding | Array.<(number|string)> | Object | {top: 5, right: 10, bottom: 5, left: 10} | Value to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
Params:
Name | Type | Default | Description |
---|---|---|---|
value1 | string | number | 5 | Top or top-bottom space. |
value2 | string | number | 10 | Right or right-left space. |
value3 | string | number | 5 | Bottom space. |
value4 | string | number | 10 | Left space. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.// 1) top and bottom 10px, left and right 15px label.padding(10, '15px'); // 2) top 10px, left and right 15px, bottom 5px label.padding(10, '15px', 5); // 3) top 10px, right 15px, bottom 5px, left 12px label.padding(10, '15px', '5px', 12);
Try it:
position
Returns:
anychart.enums.Position | string - Tooltip position.var tooltip = chart.tooltip(); var position = tooltip.position();
Note: Do not works with position mode FLOAT.
Params:
Name | Type | Description |
---|---|---|
position | anychart.enums.Position | string | Position to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
positionMode
Returns:
string - Position mode.var tooltip = chart.tooltip(); var positionMode = tooltip.positionMode();
Params:
Name | Type | Description |
---|---|---|
mode | anychart.enums.TooltipPositionMode | string | Position mode to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
selectable
Returns:
boolean - Text selectable value.var tooltip = chart.tooltip(); var selectable = tooltip.selectable();
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | false | Selectable option to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
separator
Returns:
anychart.core.ui.Separator - Tooltip separator.Try it:
- null/boolean - disables separator.
- object - sets separator settings.
Params:
Name | Type | Description |
---|---|---|
settings | null | boolean | Object | Separator settings. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
textDirection
Returns:
anychart.graphics.vector.Text.Direction - Text direction settings.var tooltip = chart.tooltip(); var textDirection = tooltip.textDirection();
Params:
Name | Type | Description |
---|---|---|
value | string | anychart.graphics.vector.Text.Direction | Text direction to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
textIndent
Returns:
number - Text indent settings.var tooltip = chart.tooltip(); var textIndent = tooltip.textIndent();
Params:
Name | Type | Description |
---|---|---|
indent | number | Text indent to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
textOverflow
Returns:
anychart.graphics.vector.Text.TextOverflow - Text overflow settingsvar tooltip = chart.tooltip(); var textOverflow = tooltip.textOverflow();
Params:
Name | Type | Description |
---|---|---|
value | anychart.graphics.vector.Text.TextOverflow | string | Value to set |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
textSettings
Returns:
Object | string | number | boolean - Text settings.var tooltip = chart.tooltip(); var textSettings = tooltip.textSettings();
Params:
Name | Type | Description |
---|---|---|
settings | Object | Few text settings. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
name | string | Text settings name. |
value | string | number | boolean | Value to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
textShadow
Returns:
string - String representation of text shadow.var tooltip = chart.tooltip(); var textShadow = tooltip.textShadow();
Params:
Name | Type | Default | Description |
---|---|---|---|
textShadow | anychart.graphics.vector.TextShadow | string | 'none' | Text shadow to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
title
Returns:
anychart.core.ui.Title - An instance of the class for method chaining.var tooltip = chart.tooltip(); var title = tooltip.title();
- null/false - disable title.
- object - Setter for title settings.
Params:
Name | Type | Description |
---|---|---|
settings | null | boolean | Object | Title settings. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
titleFormat
Returns:
function | string - Function to format title text.var tooltipSettings = chart.tooltip(); var formatter = tooltipSettings.titleFormat();
Note: Use anychart.core.ui.Tooltip#title method to set title visual settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
format | function | string | function() {return 'Tooltip';} |
Function to format title text. Function that looks like: function(){ // this.clientX - X coordinate of the mouse // this.clientY - Y coordinate of the mouse // this.formattedValues - array of the formatted values for the tooltip // this.points - array of the series points // this.allPoints - array of the all points // this.titleText - tooltip title text return titleFormatValue; // type Function } |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
unionFormat
Returns:
function():string | string - Function to format title text.var tooltipSettings = chart.tooltip(); var formatter = tooltipSettings.unionFormat();
Learn more about using unionFormat() method.
Params:
Name | Type | Description |
---|---|---|
unionFormat | function():string | string | Function or string token ('{%joinedFormattedValues}') to format content text.
UnionFormat-function that looks like:function() {
// this.clientX - X coordinate of the mouse. Type is number
// this.clientY - Y coordinate of the mouse. Type is number
// this.dataIntervalUnit - Interval unit. Type is string
// this.dataIntervalUnitCount - Interval unit count. Type is number
// this.formattedValues - Formatted values for the tooltip. Type is array of the string
// this.hoveredDate - Type is number
// this.isGrouped - Type is boolean
// this.joinedFormattedValues - Formatted values for the join through |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
useHtml
Returns:
boolean - UseHTML flag.var tooltip = chart.tooltip(); var useHtml = tooltip.useHtml();
When the HTML tooltip mode is set to true AnyChart Component installs default tooltip CSS classes. Override the CSS class of the tooltip to customize the tooltip visually. Learn more about CSS Classes HTML-tooltip has the following DOM structure:
<div class="anychart-tooltip"> // The basic HTML-element. The parent DIV of the entire element. <div class="anychart-tooltip-title"></div> // The title element. <hr noshade="true" class="anychart-tooltip-separator"> // The tooltip separator element. <div></div> // The content element. </div>
The HTML text obtained from tooltip.format() is rendered to the contentElement.
The HTML text obtained from tooltip.titleFormat() is rendered to the tltleElement.
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | false | Value to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
vAlign
Returns:
anychart.graphics.vector.Text.VAlign - Vertical align.var tooltip = chart.tooltip(); var vAlign = tooltip.vAlign();
Params:
Name | Type | Description |
---|---|---|
align | string | anychart.graphics.vector.Text.VAlign | Vertical align to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
valuePostfix
Returns:
string - Postfix settings.var tooltip = series.tooltip(); var valuePostfix = tooltip.valuePostfix();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | string | '' | Value to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
valuePrefix
Returns:
string - Prefix settings.var tooltip = series.tooltip(); var valuePrefix = tooltip.valuePrefix();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | string | '' | Value to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
width
Returns:
string | number - Tooltip width.var tooltipSettings = chart.tooltip(); var width = tooltipSettings.width();
Params:
Name | Type | Description |
---|---|---|
width | string | number | Tooltip width to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
wordBreak
Returns:
anychart.enums.WordBreak | string - Word-break mode.var wordBreak = tooltip.wordBreak();
Params:
Name | Type | Default | Description |
---|---|---|---|
mode | anychart.enums.WordBreak | string | 'normal' | Value to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
wordWrap
Returns:
anychart.enums.WordWrap | string - Word-wrap mode.var wordWrap = tooltip.wordWrap();
Params:
Name | Type | Default | Description |
---|---|---|---|
mode | anychart.enums.WordWrap | string | 'normal' | Value to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it:
zIndex
Params:
Name | Type | Default | Description |
---|---|---|---|
zIndex | number | 0 | Value to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.Try it: