In the below HighCharts
example, the series A
and B
have identical data. Only the line for B
is visible in the chart plot area, as it is plotted directly over A
.
It is impossible for the end user to know that the A
is behind B
.
We can set tooltip.shared = true
in the configuration object to show all the data values for a given x-axis point when hovered over any series. However, in my real-life example I have up to 50 series plotted on the chart and this is not appropriate.
Is it possible to keep the behaviour of tooltip.shared = false
, but when the user hovers over a series that overlaps at that point with one or more series, to show all (and only) of the overlapping series values in the tooltip? Or is there any other user-friendly way to indicate that there are 2+ identical y-values at a given x-value?
http://jsfiddle.net/adamtsiopani/XbYZz/
$(function () {
$('#container').highcharts({
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
tooltip: {
valueSuffix: '°C'
},
series: [{
name: 'Tokyo',
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
}, {
name: 'New York',
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
}, {
name: 'Berlin',
data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
}, {
name: 'London',
data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
}]
});
});