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

stackLabels need an allowOverlap: false option #6876

Closed
swrobel opened this issue Jun 19, 2017 · 3 comments
Closed

stackLabels need an allowOverlap: false option #6876

swrobel opened this issue Jun 19, 2017 · 3 comments

Comments

@swrobel
Copy link

@swrobel swrobel commented Jun 19, 2017

Expected behaviour

allowOverlap: false for stackLabels hides some labels so that none overlap, the same way the option works for dataLabels.

Actual behaviour

For dense charts, stackLabels overlap and become unreadable.

Live demo with steps to reproduce

On most screens sizes, the stackLabels will overlap on this chart, as shown below. I have set the allowOverlap: false option for stackLabels but it has no effect. Enabling it for dataLabels works as expected. I would expect these two types of labels to behave in the same way.
http://jsfiddle.net/uukL5u5n/
screen shot 2017-06-19 at 2 17 49 pm

@sebastianbochan
Copy link
Contributor

@sebastianbochan sebastianbochan commented Jun 20, 2017

Thank you for reporting.

At this moment Highcharts doens't support an anty-collision algorithm. You can use a workaround for labels, like in the demo below:

@swrobel
Copy link
Author

@swrobel swrobel commented Jun 20, 2017

@sebastianbochan dataLabels support the allowOverlap: false option which at least hides some labels so none are overlapping. This request is simply to allow the same option & resulting behavior for stackLabels (but thank you for the suggestions).

@TorsteinHonsi
Copy link
Collaborator

@TorsteinHonsi TorsteinHonsi commented Jun 21, 2017

Reliable demo (with specific width): http://jsfiddle.net/highcharts/uukL5u5n/1/

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
4 participants
You can’t perform that action at this time.