I want to show multiple tool tips at the same time in a Highchart. The basic requirement is like whenever the mouse is hovered over a point in the series I need to show the tool tip for all the points within a radius X of the hovered point. I have tried something like this so far : http://jsfiddle.net/vmso2dbf/
$(function () {
$('#container').highcharts({
title: {
text: 'Multiple tooltips'
},
plotOptions: {
series: {
point: {
events: {
mouseOver: function (event) {
var r = 50;
var arr = [];
var chart = this.series.chart;
var currX = this.plotX;
var currY = this.plotY;
var points = this.series.points;
for(var i=0;i<points.length;i++){
var xdiff = currX - points[i].plotX;
var ydiff = currY - points[i].plotY;
var distance = Math.abs(xdiff*xdiff - ydiff*ydiff);
if(distance < r*r)
arr.push(points[i]);
}
chart.tooltip.refresh(arr);
}
}
},
}
},
tooltip: {
enabled: true,
shared : true
},
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]
}]
});
});
But I need multiple tool tips at the same time and not just one big tool tip for all the points concerned. If that is possible , is there a way to get these tool tips self aligned as per the space available ? Is there any existing plugin/feature in Highcharts that can help me solve this problem ?