Highcharts: How to access range values in formatter for "columnrange" type?
highcharts
Solution
In case when you use shared option in tooltip then you need to use this.points[0] etc, if you have shared option disabled you should use this.point
Take look at example shared http://jsfiddle.net/dmN3N/24/
tooltip: {
shared:true,
valueSuffix: '',
formatter:function(){
return 'LOW: '+this.points[0].point.low+' HIGH: '+this.points[0].point.high ;
}
},
and not shared
http://jsfiddle.net/dmN3N/22/
tooltip: {
valueSuffix: '',
formatter:function(){
return 'LOW: '+this.point.low+' HIGH: '+this.point.high;
}
},
Problem
I want to customize the tooltips of my Highcharts graph. The y-axis is of type "columnrange", i.e. it has an interval for the y-value: ``` series: [{ data: [ [-0.547571175, 0.401498266], [-0.960011899, 0.444655955], [-0.660727717, 0.862639688], [-0.446911722, 0.660380453], [-0.863925256, 0.619544707], ....... ] }] ``` The tooltip formatter should look something like this: ``` tooltip: { formatter: function() { var point = this.points[0]; return '<b>'+ point.x +'</b><br />Interval:'+ point.low +' - '+ point.high; }, shared: true } ``` But `point.low` and `point.high` are not defined... How to get these low/high values? Here you find a sample graph: http://jsfiddle.net/dmN3N/21/