Is it possible to execute a function after zoom on a chart in Highcharts ?
Use the afterSetExtremes event:
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
events: {
afterSetExtremes: function(event){
if (this.getExtremes().dataMin < event.min)
alert("Zoomed in!");
}
}
}
Here's a working example: http://jsfiddle.net/RcdfW/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With