getTooltipMask();
The getTooltipMask method creates and returns template of tooltip text.
This method returns a String-type value.
To execute this example, the HTML page must contain an instance of the ChartSeriePoint class named point (see ChartSerie constructor). Create and set a new tooltip text template for a bubble of created series:
// Determine and set a new tooltip text template for bubble var tooltipMask = point.getTooltipMask(); console.log("Tooltip text template:"); console.log(tooltipMask); // Determines values displayed in tooltip text var tooltipValues = point.getTooltipValues(); console.log(""); console.log("Tooltip text:") console.log(tooltipValues.Name); console.log(tooltipValues.XTitle + ": " + tooltipValues.XValue); console.log(tooltipValues.YTitle + ": " + tooltipValues.YValue); console.log(tooltipValues.SizeTitle + ": " + tooltipValues.SizeValue); console.log(tooltipValues.ColorTitle + ": " + tooltipValues.ColorValue); // Refresh bubble chart bubbleChart.refresh();
After the example execution a new tooltip text template is set for a bubble in created series:
This template and the tooltip text are shown in the browser console:
Tooltip text template:
{%Name}
{%XTitle}: {%XValue:#,##.00}
{%YTitle}: {%YValue:#,##.00}
{%SizeTitle}: {%SizeValue:#,##.00}
{%ColorTitle}: {%ColorValue:#,##.00}
Tooltip text:
Series point
Gross regional product, mln rubles: 150,000
Index of the physical volume of gross regional product, % to previous period: 30
Gross regional product per capita, rubles: 55,000
Gross regional product per capita, rubles: 6,000
See also: