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

Overlapping Level 0 ("parent") labels when all children are hidden #177

Open
ivan-nejezchleb opened this issue May 17, 2021 · 5 comments
Open
Labels

Comments

@ivan-nejezchleb
Copy link

ivan-nejezchleb commented May 17, 2021

Expected behaviour

When all "children" labels are hidden by HighCharts because they would cause overlaps also their "parent" should be hidden

Actual behavior

Parent labels are still visible and overlapping


Screenshot 2021-05-17 at 12 25 10

Live demo with steps to reproduce
Demo: https://codepen.io/bertold8/pen/vYxLoZw

Observe the parent labels - "fish" and "vegetable2" should be imho hidden, because all their children labels are hidden and not be still visible and causing the overlaps

Note
I dont care about the grid, we hide it. Just textual labels are important for me

Product version
"highcharts": "8.2.2",
Grouped Categories v1.1.6 (2020-06-19) - bu even the latest version does not solve the issue

Question
What is this group.destroyed meta info used for?
https://github.com/blacklabel/grouped_categories/blob/master/grouped-categories.js#L597

I see no usage of it in grouped-categories code. I tried some patch to use it for hiding parent once parent.destroyed === parent.childCount but not successful 100%.
Thx for any workaround in advance

@KacperMadej
Copy link
Collaborator

Hi @ivan-nejezchleb

Thank you for reporting the problem.
For small/dense categories layout hiding of labels is not working correctly.

@ivan-nejezchleb
Copy link
Author

Hi @KacperMadej if you can give me some clues where to look or which HighCharts axis/tick prototype override should be fixed, I am willing to help with PR

@KacperMadej
Copy link
Collaborator

You might look into Axis' setTickPositions and maybe use the fired event to change something in Highcharts or the plugin.

@ivan-nejezchleb
Copy link
Author

Hi @KacperMadej , I have some prototype, tuning it with all my use cases and also with zoom capability of Highcharts.
Is there any usage of this parent.destroyed counter used here
https://github.com/blacklabel/grouped_categories/blob/master/grouped-categories.js#L287
and
https://github.com/blacklabel/grouped_categories/blob/master/grouped-categories.js#L597
? Both these places are just setters, but I see no usage of this counter to do something meaningful.
Thx for your answer

@KacperMadej
Copy link
Collaborator

I also see no usage. It might be something old and no longer needed or supported.

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

No branches or pull requests

2 participants