Here is my highcharts code which is working fine and tooltip shows only when hover one series, but I need to change it so that the same tooltip shows when hover any series in the chart, any help please. [jsfiddle][1]
[1]: https://jsfiddle.net/khalifa/kktwdwf6/
tooltip
will be as
tooltip: {
useHTML: true,// enables html property
shared: true,// enables shared tooltip
formatter: function() {
var s = '<b>' + this.x + '</b><br>';
$.each(this.points, function(e) {
//console.log(this.point.marker.symbol)
var str = this.point.marker.symbol;
if (str != 'circle') {
str = str.substring(0, str.length - 1);
var img = str.slice(4);
var w = this.y;
w = w - 20;
n = '<img src ="' + img + '"/><br>'
} else {
n = '●';
}
s += 'Question ID: <b>' + this.series.name + '</b><br/>' +
n + '</b><br/>';
});
return s;
},
},
Also you have to define markers with each data point
data: [{
y: 11.7,
marker: {
symbol: 'circle'
}
}, {
y: 11.8,
marker: {
symbol: 'circle'
}
}],
Fiddle demo
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments