Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X-Axis Labels format changes on zoom #6731

Closed
kirtiesl opened this issue May 16, 2017 · 12 comments
Closed

X-Axis Labels format changes on zoom #6731

kirtiesl opened this issue May 16, 2017 · 12 comments
Labels

Comments

@kirtiesl
Copy link

@kirtiesl kirtiesl commented May 16, 2017

http://jsfiddle.net/jugal/gwamsh77/
Referring to this example if I set zoomType: 'x' , zooming chart adds random points after month names.Please suggest how to resolve this issue

@pawelfus
Copy link
Contributor

@pawelfus pawelfus commented May 16, 2017

Hi @kirtiesl

Thank you for reporting this issue. If you have fixed number of categories, you can set xAxis.min and xAxis.max to prevent zooming outside the extremes. Demo: http://jsfiddle.net/gwamsh77/11/

@kirtiesl
Copy link
Author

@kirtiesl kirtiesl commented May 16, 2017

My categories are not fixed. It depends upon the json data we get from server

@pawelfus
Copy link
Contributor

@pawelfus pawelfus commented May 16, 2017

Another workaround is to use categories: [] instead of type: 'category', demo: http://jsfiddle.net/gwamsh77/13/

@TorsteinHonsi
Copy link
Collaborator

@TorsteinHonsi TorsteinHonsi commented May 18, 2017

It's a bug, type: 'category should be treated the same as categories: []. Debugging so far points to the adjustForMinRange function, where the axis.minRange on this line is true in one case and false in the other.

@kirtiesl
Copy link
Author

@kirtiesl kirtiesl commented May 18, 2017

Will this bug be resolved soon or any other workaround is possible?

@TorsteinHonsi
Copy link
Collaborator

@TorsteinHonsi TorsteinHonsi commented May 19, 2017

Thanks for your patience! The fix will be part of the next maintenance release, scheduled next week.

@suganya-sk
Copy link

@suganya-sk suganya-sk commented Jun 29, 2017

Hi, I still see the issue using version 5.0.12 - https://jsfiddle.net/xu7Ltt6d/2/. Could you let me know if there is an option I am missing?

category x-axis

(Just to clarify - my x-values are strings though they look like dates)

The labels are also messed up on zooming out to the original limits. And thanks, @pawelfus! Setting "categories" does fix this. I was wondering if we can expect a fix for when the x values are fed in through data and xAxis.type is set to be "category".

@gmorris2
Copy link

@gmorris2 gmorris2 commented Jan 3, 2018

I am having the same issue as @suganya-suvadi with zooming in/out breaking the axis labels and causing data to disappear. I updated the fiddle to look at the latest version (6.0.4) to demonstrate the issue is still occurring.

https://jsfiddle.net/v4cek779/1/

I am using drilldown in my charts as well so setting the categories causes further issues I'd like to avoid if possible. Is there another workaround for this?

@pawelfus
Copy link
Contributor

@pawelfus pawelfus commented Jan 3, 2018

Hi @gmorris2

It's a separate issue, reported as #5857 - could you set cropThreshold to a higher value, like suggested in the #5857 issue?

@gmorris2
Copy link

@gmorris2 gmorris2 commented Jan 3, 2018

@pawelfus That solved my issue! I am using AJAX-retrieved JSON data to fill my series so I simply set cropThreshold to data.length and my issue disappeared. Thanks!

@digambargurav
Copy link

@digambargurav digambargurav commented Jun 27, 2018

Issue is still there.
Step to reproduce:
Zoom the chart at extreme level.
make legends off from x-axis.
now again zoom the chart, the random values are coming on x-Axis.

@pawelfus
Copy link
Contributor

@pawelfus pawelfus commented Jun 27, 2018

Hi @digambargurav

Could you recreate issue in jsFiddle? Does setting the cropThreshold options resolve the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants