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

-1 on xAxis when legends filtered out #18066

Closed
AhmetG-Rev opened this issue Dec 1, 2022 · 1 comment · Fixed by #18825
Closed

-1 on xAxis when legends filtered out #18066

AhmetG-Rev opened this issue Dec 1, 2022 · 1 comment · Fixed by #18825

Comments

@AhmetG-Rev
Copy link

Expected behaviour

When Legend filter is used, x and y axis should be readjusted automaticaly.

Actual behaviour

"-1" appears on the xAxis. -1 on xAxis
https://stackoverflow.com/questions/74628650/highcharts-1-on-xaxis-when-legends-filtered-out?noredirect=1#comment131732957_74628650

Live demo with steps to reproduce

https://jsfiddle.net/ag_test/pe9t4vxu/1/

  • add a new data series to the chart (by clicking the add series button)
  • filter out the old series by clicking the legends of them.

Product version

Highcharts JS v10.3.2

Affected browser(s)

Chrome 108.0.5359.71

@bm64
Copy link
Member

bm64 commented Dec 4, 2022

Hello @AhmetG-Rev and thanks for reporting the issue.
It seems that the issue occurs only if the least numerous series have less than six points.

Workaround:
Set xAxis.minRange value to be less or equal to the number of points in least numerous series: https://jsfiddle.net/BlackLabel/r9hLe150/

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

Successfully merging a pull request may close this issue.

4 participants