Top
You are looking at an outdated 7.13.0 version of this document. Switch to the 8.0.1 version to see the up to date information.

class anychart.core.ui.Tooltip Improve this Doc

Extends: anychart.core.VisualBaseWithBounds

Class for the tooltip.

Methods Overview

Specific settings
allowLeaveChart()Leaving chart settings.
displayMode()Display mode settings.
hide()Hides tooltips with delay.
hideDelay()Hide delay settings.
textFormatter()Function to format content text.
titleFormatter()Function to format title text.
unionTextFormatter()Function to format content text.
valuePostfix()Postfix settings.
valuePrefix()Prefix settings.
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.
textWrap()Text wrap setting.
useHtml()Use HTML option.
vAlign()Text vertical align settings.
Events
listen()Adds an event listener.
listenOnce()Adds a single time event listener.
removeAllListeners()Removes all listeners.
unlisten()Removes the listener.
unlistenByKey()Removes the listener by the key.
Export
print()Prints all elements.
Interactivity
enabled()Element state (enabled or disabled).
Size and Position
anchor()Anchor settings.
bottom()Bottom bound setting.
bounds()Bounds settings.
getPixelBounds()Returns pixel bounds.
height()Height setting.
left()Left bound setting.
maxHeight()Maximum height.
maxWidth()Maximum width.
minHeight()Minimum height.
minWidth()Minimum width.
offsetX()X offset settings.
offsetY()Y offset settings.
padding()Padding settings.
position()Position settings.
positionMode()Position mode settings.
right()Right bound setting.
top()Top bound setting.
width()Width setting.
zIndex()Z-index of the element.
Text Settings
adjustFontSize()Maximum font size setting.
maxFontSize()Maximum font size settings.
minFontSize()Minimum font size settings.
Visual settings
background()Background settings.
separator()Separator settings.
title()Title settings.

Methods Description

adjustFontSize

Getter for the adjusting font size.

Returns:

number - An adjusted font size.
See listing
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.adjustFontSize();
Setter for the adjusting font size.

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

Getter for the leaving tooltip from chart.

Returns:

boolean - Settings.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.allowLeaveChart();
Setter for the leaving tooltip from chart. Note: Works only for the chart tooltip.

Params:

Name Type Default Description
value boolean
true
Allow or disallow tooltip to leave chart when moving.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

anchor

Getter for the tooltip anchor.

Returns:

anychart.enums.Anchor string - Tooltip anchor settings.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.anchor();
Setter for the tooltip anchor.

Params:

Name Type Default Description
value anychart.enums.Anchor | string
"centerBottom"
Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

background

Getter for tooltip background settings.

Returns:

anychart.core.ui.Background - An instance of the class for method chaining.
See listing
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.background();
Setter for tooltip background settings.

Params:

Name Type Description
value null | boolean | Object | string Background settings.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

bottom

Getter for element bottom bound setting.

Returns:

number string undefined - Current element's bottom bound setting.
Sets element bottom bound setting.

Params:

Name Type Default Description
value number | string | null
null
Bottom bound setting for the element.

Returns:

anychart.core.VisualBaseWithBounds - Returns self for method chaining.

Try it:

bounds

Getter for the element bounds settings.

Returns:

anychart.core.utils.Bounds - Current bounds of the element.
Sets bounds of the element using one parameter.

Params:

Name Type Description
value anychart.utils.RectObj | anychart.math.Rect | anychart.core.utils.Bounds Bounds of element.

Returns:

anychart.core.VisualBase - Self instance for method chaining.

Try it:

Setter for the element bounds settings.

Params:

Name Type Default Description
x number | string
null
X-coordinate.
y number | string
null
Y-coordinate.
width number | string
null
Width.
height number | string
null
Height.

Returns:

anychart.core.VisualBase - Self instance for method chaining.

Try it:

disablePointerEvents

Getter for the pointer events settings.

Returns:

boolean - The pointer events settings.
See listing
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.disablePointerEvents();
Setter for the pointer events setting.

Params:

Name Type Default Description
value boolean
false
Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

displayMode

Getter for display mode settings.

Returns:

anychart.enums.TooltipDisplayMode - Display mode.
See listing
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.displayMode();
Setter for display mode settings. Note: Works only for the chart tooltip.

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

Getter for the current element state (enabled or disabled).

Returns:

boolean - The current element state.

Try it:

Setter for the element enabled state.

Params:

Name Type Default Description
value boolean
true
Value to set.

Returns:

anychart.core.VisualBase - Self instance for method chaining.
Example.
if (!element.enabled())
   element.enabled(true);

Try it:

fontColor

Getter for font color settings.

Returns:

string - Font color settings.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.fontSize();
Setter for font color settings.

Params:

Name Type Description
value string Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

fontDecoration

Getter for font decoration settings.

Returns:

anychart.graphics.vector.Text.Decoration - Font decoration settings.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.fontDecoration();
Setter for font decoration settings.

Params:

Name Type Description
value anychart.graphics.vector.Text.Decoration | string Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

fontFamily

Getter for font family settings.

Returns:

string - Font family settings.
See listing
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.fontSize();
Setter for font family settings.

Params:

Name Type Description
value string Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

fontOpacity

Getter for font opacity settings.

Returns:

number - Font opacity settings.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.fontOpacity();
Setter for font opacity settings.

Params:

Name Type Description
value number Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

fontSize

Getter for font size settings.

Returns:

number - Font size settings.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.fontSize();
Setter for font size settings.

Params:

Name Type Description
value number | string Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

fontStyle

Getter for font style settings.

Returns:

anychart.graphics.vector.Text.FontStyle - Font style settings.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.fontStyle();
Setter for font style settings.

Params:

Name Type Description
value string | anychart.graphics.vector.Text.FontStyle Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

fontVariant

Getter for font variant settings.

Returns:

anychart.graphics.vector.Text.FontVariant - Font variant settings.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.fontVariant();
Setter for font variant settings.

Params:

Name Type Description
value string | anychart.graphics.vector.Text.FontVariant Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

fontWeight

Getter for font weight settings.

Returns:

string number - Font weight settings.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.fontWeight();
Setter for font weight settings.

Params:

Name Type Description
value string | number Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

getPixelBounds

Returns pixel bounds of the element due to parent bounds and self bounds settings.

Returns:

anychart.math.Rect - Pixel bounds of the element.

hAlign

Getter for text horizontal align settings.

Returns:

anychart.graphics.vector.Text.HAlign - Horizontal align settings.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.hAlign();
Setter for the text horizontal align settings.

Params:

Name Type Description
value string | anychart.graphics.vector.Text.HAlign Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

height

Getter for element height setting.

Returns:

number string undefined - Current element's height setting.
Sets element height setting.

Params:

Name Type Default Description
value number | string | null
null
Height setting for the element.

Returns:

anychart.core.VisualBaseWithBounds - Returns self for method chaining.

Try it:

hide

Hides tooltips with delay.

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

Getter for delay in milliseconds before union tooltip item becomes hidden.

Returns:

number - Hide delay settings.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.hideDelay();
Setter for the delay in milliseconds before a tooltip becomes hidden.

Params:

Name Type Default Description
value number
0
Delay in milliseconds.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

left

Getter for element left bound setting.

Returns:

number string undefined - Current element's left bound setting.
Sets element left bound setting.

Params:

Name Type Default Description
value number | string | null
null
Left bound setting for the element.

Returns:

anychart.core.VisualBaseWithBounds - Returns self for method chaining.

Try it:

letterSpacing

Getter for text letter spacing settings.

Returns:

number - Letter spacing settings.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.letterSpacing();
Setter for text letter spacing settings.

Params:

Name Type Description
value number Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

lineHeight

Getter for text line height settings.

Returns:

number string - Line height settings.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.lineHeight();
Setter for text line height settings.

Params:

Name Type Default Description
value number | string
"normal"
Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

listen

Adds an event listener to an implementing object.

Params:

Name Type Description
type string The event type id.
listener function Callback method. Function that looks like function(event){ // event.actualTarget - actual event target // event.currentTarget - current event target // event.iterator - event iterator // event.originalEvent - original event // event.point - event point // event.pointIndex - event point index }.
useCapture boolean Whether to fire in capture phase (defaults to false).
listenerScope Object Object in whose scope to call the listener.

Returns:

Object - Unique key for the listener.

Try it:

listenOnce

Adds an event listener to an implementing object.

Params:

Name Type Description
type string The event type id.
listener function Callback method.
useCapture boolean Whether to fire in capture phase (defaults to false).
listenerScope Object Object in whose scope to call the listener.

Returns:

Object - Unique key for the listener.

Try it:

maxFontSize

Getter for maximum font size settings for adjust text from.

Returns:

number - Maximum font size.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.maxFontSize();
Setter for maximum font size settings for adjust text from.

Params:

Name Type Default Description
value number | string
9
Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

maxHeight

Getter for maximum height.

Returns:

number string null - Current element's maximum height.
Setter for maximum height.

Params:

Name Type Default Description
value number | string | null
null
Value to set.

Returns:

anychart.core.VisualBase - Self instance for method chaining.

Try it:

maxWidth

Getter for maximum width.

Returns:

number string null - Current element's maximum width.
Setter for maximum width.

Params:

Name Type Default Description
value number | string | null
null
Value to set.

Returns:

anychart.core.VisualBase - Self instance for method chaining.

Try it:

minFontSize

Getter for minimum font size settings for adjust text from.

Returns:

number - Minimum font size.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.minFontSize();
Setter for minimum font size settings for adjust text from.

Params:

Name Type Default Description
value number | string
9
Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

minHeight

Getter for minimum height.

Returns:

number string null - Current element's minimum height.
Setter for minimum height.

Params:

Name Type Default Description
value number | string | null
null
Value to set.

Returns:

anychart.core.VisualBase - Self instance for method chaining.

Try it:

minWidth

Getter for minimum width.

Returns:

number string null - Current element's minimum width.
Setter for minimum width.

Params:

Name Type Default Description
value number | string | null
null
Value to set.

Returns:

anychart.core.VisualBase - Self instance for method chaining.

Try it:

offsetX

Getter for the tooltip offset by X.

Returns:

number - Tooltip offset by X.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.offsetX();
Setter for union tooltip offsetX.

Params:

Name Type Description
value number Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

offsetY

Getter for the tooltip offset by Y.

Returns:

number - Tooltip offset by Y.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.offsetY();
Setter for the tooltip offset by Y.

Params:

Name Type Description
value number Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

padding

Setter for tooltip padding in pixels by one value.

Params:

Name Type Default Description
value 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:

Setter for tooltip padding in pixels.

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.
Example
// 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

Getter for union tooltip position.

Returns:

anychart.enums.Position string - Tooltip position.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.position();
Setter for union tooltip position.
Note: Do not works with position mode FLOAT.

Params:

Name Type Description
value anychart.enums.Position | string Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

positionMode

Getter for all tooltips position mode.

Returns:

string - Position mode.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.positionMode();
Setter for all tooltips position mode.

Params:

Name Type Description
value string | anychart.enums.TooltipPositionMode Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

print

Prints all elements on related stage.

Params:

Name Type Default Description
paperSizeOrOptions anychart.graphics.vector.PaperSize | Object
Paper size or object with options.
landscape boolean
false
Flag of landscape.

Try it:

removeAllListeners

Removes all listeners from an object. You can also optionally remove listeners of some particular type.

Params:

Name Type Description
type string Type of event to remove, default is to remove all types.

Returns:

number - Number of listeners removed.

Try it:

Getter for element right bound setting.

Returns:

number string undefined - Current element's right bound setting.
Sets element right bound setting.

Params:

Name Type Default Description
value number | string | null
null
Right bound setting for the element.

Returns:

anychart.core.VisualBaseWithBounds - Returns self for method chaining.

Try it:

selectable

Getter for the text selectable option.

Returns:

boolean - Text selectable value.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.selectable();
Setter for the text selectable option.

Params:

Name Type Default Description
value boolean
false
Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

separator

Getter for union tooltip separator.

Returns:

anychart.core.ui.Separator - An instance of the class for method chaining.

Try it:

Setter for union tooltip separator.

Params:

Name Type Description
value null | boolean | Object Separator settings.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

textDirection

Getter for the text direction settings.

Returns:

anychart.graphics.vector.Text.Direction - Text direction settings.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.fontOpacity();
Setter for text direction settings.

Params:

Name Type Description
value string | anychart.graphics.vector.Text.Direction Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

textFormatter

Getter for function content text for the tooltip.

Returns:

function - Function to format title text.
Example
var currentTooltipSettings = chart.tooltip();
var currentFormatter = currentTooltipSettings.textFormatter();
Setter for function content text for the tooltip.

Params:

Name Type Default Description
value function
function() {return this['formattedValues'].join('\n');}
Function or string token to format content text. Function that looks like function(){ // this.formattedValues - formatted values for tooltip // this.valuePostfix - tooltip postfix value // this.valuePrefix - tooltip prefix value // this.allPoints - array of the all points // this.points - array of the series points // this.clientX - X coordinate of the mouse // this.clientY - Y coordinate of the mouse return textFormatterValue; // type Function }.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

textIndent

Getter for text-indent settings.

Returns:

number - Text indent settings.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.textIndent();
Setter for text-indent settings.

Params:

Name Type Description
value number Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

textOverflow

Getter for text overflow settings.

Returns:

anychart.graphics.vector.Text.TextOverflow - Text overflow settings
Setter for text overflow settings.

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

Getter for the full text appearance settings.

Returns:

Object string number boolean - Text settings.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.textSettings();
Setter for the full text appearance settings.

Params:

Name Type Description
value Object Few text settings.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

Setter for the custom text appearance settings.

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:

textWrap

Getter for text wrap settings.

Returns:

anychart.graphics.vector.Text.TextWrap - Text wrap settings.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.textWrap();
Setter for text wrap settings.

Params:

Name Type Description
value string | anychart.graphics.vector.Text.TextWrap Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

title

Getter for union tooltip title visual settings.

Returns:

anychart.core.ui.Title - An instance of the class for method chaining.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.title();
Setter for union tooltip title visual settings.

Params:

Name Type Description
value null | boolean | Object Title settings.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

titleFormatter

Getter for the function to format title.

Returns:

function - Function to format title text.
Example
var currentTooltipSettings = chart.tooltip();
var currentFormatter = currentTooltipSettings.titleFormatter();
Setter for the function to format title.
Note: Use anychart.core.ui.Tooltip#title method to set title visual settings.

Params:

Name Type Default Description
value function
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 titleFormatterValue; // type Function }.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

top

Getter for element top bound setting.

Returns:

number string undefined - Current element's top bound setting.
Sets element top bound setting.

Params:

Name Type Default Description
value number | string | null
null
Top bound setting for the element.

Returns:

anychart.core.VisualBaseWithBounds - Returns self for method chaining.

Try it:

unionTextFormatter

Getter for function content text for union tooltip.

Returns:

function - Function to format title text.
Example
var tooltipSettings = chart.tooltip();
var currentFormatter = tooltipSettings.unionTextFormatter();
Setter for function content text for union tooltip.

Params:

Name Type Default Description
value function
function() {return this['formattedValues'].join('\n');}
Function or string token to format content text. Function that looks like function(){ // this.formattedValues - formatted values for tooltip // this.valuePostfix - tooltip postfix value // this.valuePrefix - tooltip prefix value // this.allPoints - array of the all points // this.points - array of the series points // this.clientX - X coordinate of the mouse // this.clientY - Y coordinate of the mouse return textFormatterValue; // type Function }.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

unlisten

Removes a listener added using listen() or listenOnce() methods.

Params:

Name Type Description
type string The event type id.
listener function Callback method.
useCapture boolean Whether to fire in capture phase (defaults to false).
listenerScope Object Object in whose scope to call the listener.

Returns:

boolean - Whether any listener was removed.

Try it:

unlistenByKey

Removes an event listener which was added with listen() by the key returned by listen() or listenOnce().

Params:

Name Type Description
key Object The key returned by listen() or listenOnce().

Returns:

boolean - Whether any listener was removed.

Try it:

useHtml

Getter for the useHTML flag.

Returns:

boolean - UseHTML flag.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.useHtml();
Setter for the useHTML flag.

Params:

Name Type Description
value boolean Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

vAlign

Getter for text vertical align settings.

Returns:

anychart.graphics.vector.Text.VAlign - Vertical align.
Example
var currentTooltipSettings = chart.tooltip();
var currentValue = currentTooltipSettings.vAlign();
Setter for text vertical align settings.

Params:

Name Type Description
value string | anychart.graphics.vector.Text.VAlign Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

valuePostfix

Getter for tooltip postfix value.

Returns:

string - Postfix settings.
See listing
var currentTooltipSettings = series.tooltip();
var currentValue = currentTooltipSettings.valuePostfix();
Setter for tooltip postfix value.

Params:

Name Type Default Description
value string
''
Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

valuePrefix

Getter for tooltip prefix value.

Returns:

string - Current prefix settings.
See listing
var currentTooltipSettings = series.tooltip();
var currentValue = currentTooltipSettings.valuePrefix();
Setter for tooltip prefix value.

Params:

Name Type Default Description
value string
''
Value to set.

Returns:

anychart.core.ui.Tooltip - Self instance for method chaining.

Try it:

width

Getter for element width setting.

Returns:

number string undefined - Current element's width setting.
Sets element width setting.

Params:

Name Type Default Description
value number | string | null
null
Width setting for the element.

Returns:

anychart.core.VisualBaseWithBounds - Returns self for method chaining.

Try it:

zIndex

Getter for the current Z-index of the element.

Returns:

number - The current zIndex.

Try it:

Setter for the Z-index of the element.

Params:

Name Type Default Description
value number
0
Value to set.

Returns:

anychart.core.VisualBase - Self instance for method chaining.

Try it: