I need to add external function for highchart tooltip formatter and events something like code given below.
How to add it externally.
$(function(){
var highchartObj = chart: {renderTo: 'rightBottomContainer'},xAxis: {categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']}, series: [{data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]}]}
rchart = new Highcharts.Chart(highchartObj);
rchart.Point.prototype.tooltipFormatter = function (useHeader) {
//var point = this, series = point.series;
return "AAAAAA";
};
});
You can define your function somewhere like
Then pass this function to Highcharts configuration object inside
tooltipobject asformatter:As a result you can have your code in a separate function that will be passed inside Highcharts object.
Demo: http://jsfiddle.net/NCnS5/
Docs for
formatterparameter: http://www.highcharts.com/ref/#tooltip–formatter