![]() |
VOOZH | about |
jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is a very powerful and optimized framework, platform-independent, and widely supported. jqxChart is a lightweight and powerful chart widget written 100% in javascript. It offers many advanced features and supports three different rendering technologies – SVG, HTML5 Canvas & VML. In this article, we will see the toolTipFormatFunction Property in jQWidgets jqxChart.
The toolTipFormatFunction property is a callback function that is used to display the user-defined tooltip text formatting. It is of type function and its default value is undefined.
Syntax:
seriesGroups: [{
type: 'rangecolumn',
columnsGapPercent: 30,
seriesGapPercent: 0,
toolTipFormatFunction: toolTipCustomFormatFn,
series: [
{ dataFieldFrom: 'f1', dataFieldTo: 't1'},
{ dataFieldFrom: 'f2', dataFieldTo: 't2'},
]
}];
Linked Files: Download jQWidgets from the given link. In the HTML file, locate the script files in the downloaded folder.
<link rel=”stylesheet” href=”jqwidgets/styles/jqx.base.css” type=”text/css” />
<script type=”text/javascript” src=”scripts/jquery-1.11.1.min.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxcore.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxchart.core.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxdraw.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxdata.js”></script>
Example 1: The below example illustrates the jQWidgets jqxChart toolTipFormatFunction property.
Output:
Example 2: The following is another example of the jqxChart toolTipFormatFunction property in jQWidgets.
Output: