content
Gets or sets the tooltip content.
The tooltip content can be specified as a string or as a function that takes a HitTestInfo object as a parameter.
When the tooltip content is a string, it may contain any of the following parameters:
- propertyName: Any property of the data object represented by the point.
- seriesName: Name of the series that contains the data point (FlexChart only).
- pointIndex: Index of the data point.
- value: Value of the data point (y-value for FlexChart, item value for FlexPie).
- x: x-value of the data point (FlexChart only).
- y: y-value of the data point (FlexChart only).
- name: Name of the data point (x-value for FlexChart or legend entry for FlexPie).
Parameters must be enclosed in single curly brackets. For example:
// 'country' and 'sales' are properties of the data object. chart.tooltip.content = '{country}, sales:{sales}';
The next example shows how to set the tooltip content using a function.
// Set the tooltip content chart.tooltip.content = function (ht) { return ht.name + ":" + ht.value.toFixed(); }
- Type
- any
Extends the Tooltip class to provide chart tooltips.