Search
ToolTip Class
Remarks See Also
 






Represents the current chart tooltip.

Namespace: MindFusion.Charting
File: MindFusion.Charting.js

 Syntax

JavaScript  Copy Code

// class
ToolTip.prototype = {}

 Remarks

The properties of the ToolTip can be used as static. The tooltips can be set by including LabelKinds.ToolTip among the values of the

 Example

The following code creates a BarSeries and provides two arrays with label data - one is the data array, which will serve as labels and the other is an array with strings. Then it specifies that the two arrays will be used for tooltips and labels at the X-axis with the supportedLabel property. Finally, it customizes the tooltip:

JavaScript  Copy Code

var labels = [
    "Jan", "Feb", "Mar", "Apr", "May", "Jun",
    "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
];

var data = new Collections.List([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]);

// create sample data series
var barSeries = new Charting.BarSeries(data, data, labels),

//specifies that the labels will be used for the X-axis and tooltips
barSeries.supportedLabels = Charting.LabelKinds.XAxisLabel | Charting.LabelKinds.ToolTip;

// customize tooltips
ToolTip.brush = new Drawing.Brush("#fafafa");
ToolTip.pen = new Drawing.Pen("#9caac6");
ToolTip.textBrush = new Drawing.Brush("#5050c0");
ToolTip.horizontalPadding = 6;
ToolTip.verticalPadding = 4;
ToolTip.font = new Charting.Drawing.Font("Verdana", 12, Charting.Drawing.FontStyle.Italic);

 Inheritance Hierarchy

 See Also