I have a highstock chart with two y-axes. When I mouseover the chart, the default tooltip only shows one of the y-axis, unless I directly put my mouse over the excluded series' point. Is there a way to just show both y-axes in the tooltip at whatever x value the mouse is over in the chart?
1
votes
2 Answers
1
votes
0
votes
I guess that you need something which map points between axis. Its not built-in, but you can use formatter and prepare something like this:
formatter: function(){
var y = this.y,
txt = 'y1: ' + y,
yAxis = this.series.yAxis,
index = this.series.yAxis.options.index == 0 ? 1 : 0,
oAxis = this.series.chart.yAxis[index];
txt += '<br>y2: ' + oAxis.toValue(yAxis.toPixels(y));
return txt;
}