Reputation: 110
I have used highcharts 7.0.2 version.
In my application initially, charts line charts are bound properly but after zoom in and zoom out it will create an issue on axis labels.
Below are some snaps for the same.
Also, I have used the zooming on 'xy' axis.
chart: {
zoomType: 'xy'
}
1) Chart before zoom out
Fiddle demo: https://jsfiddle.net/ukLaqtyv/. To reproduce the issue you have to do very large zoom.
After click on reset zoom button
Upvotes: 0
Views: 568
Reputation: 39099
This problem looks like a bug, so I reported it on Highcharts github: https://github.com/highcharts/highcharts/issues/10516
To workaround, you can set tickPositions
again by the update
method:
yAxis: {
events: {
afterSetExtremes: function(e) {
if (
typeof e.userMin == 'undefined' &&
typeof e.userMax == 'undefined'
) {
this.update({
tickPositions: this.tickPositions
});
}
}
}
},
Live demo: https://jsfiddle.net/BlackLabel/yx9wtf2p/
API Reference: https://api.highcharts.com/highcharts/yAxis.events.afterSetExtremes
Upvotes: 1