0
votes

Using the Highcharts library, I'm setting up charts with zooming/panning features.

If I create a type: 'datetime' xAxis and use reversed: true, I run into issues when trying to pan. It will immediately zoom all the way in whether I'm currently zoomed or not.

If I remove the reversed property, this issue does not occur. Has anyone else experienced this problem, or know where to look to fix it?

Here's a JSFiddle to display the issue. Use the Shift key to pan.

-

I've tried not using the reversed flag and sorting the data myself, but Highcharts throws an error if dates are not ascending it seems.

1
This is indeed a bug with Highcharts after all. Thanks @morganfree , the issue is now being worked on. A partial fix has been posted in your issue thread, and I've responded to it with additional fixes that now allow a solution to the original question. - Mark

1 Answers

0
votes

As stated in the comments of the question, this is actually a bug with Highcharts. The panning feature was not handling the setExtremes(...) function call properly when dealing with a reversed xAxis.

A bug was posted here: https://github.com/highcharts/highcharts/issues/5997, which now include some commits with a fix (which I have tested myself).

And since then a suggested fix has been submitted for the next Highcharts milestone.