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

Organization Chart, wrong position for children with normal layout #13915

Closed
alvarezguille opened this issue Jul 16, 2020 · 12 comments
Closed

Organization Chart, wrong position for children with normal layout #13915

alvarezguille opened this issue Jul 16, 2020 · 12 comments
Assignees

Comments

@alvarezguille
Copy link
Contributor

alvarezguille commented Jul 16, 2020

Expected behaviour

Nodes are placed below their parent node if possible.
image

Actual behaviour

Position of node's children seems off.
Both when having mixed layouts in a level or when having all normal layout in a level.
Nodes are shifted to the right.
image

Live demo with steps to reproduce

All normal layout: https://jsfiddle.net/alvarezg/rb3ftuLy/
Mixed normal and hanging: https://jsfiddle.net/alvarezg/g7aepx49/

Product version

Highcharts, Highstock 8.1.2

@sebastianbochan
Copy link
Contributor

Hi @alvarezguille,
Thank you for reporting.

As a workaround, you can declare a negative offset.

Demo:

@alvarezguille
Copy link
Contributor Author

Thanks for the quick answer and the workaround! 🙇‍♂️

@jethas-bennettjones
Copy link

Hi. I thought I'd add another example of this not working quite as expected: https://jsfiddle.net/gma7etru/1/

Does anyone have any suggested workarounds for this?

@pawelfus
Copy link
Contributor

pawelfus commented Aug 24, 2020

Hi @jethas-bennettjones

You can change order of nodes in the data: https://jsfiddle.net/BlackLabel/bws9o75a/1/ or change layout: https://jsfiddle.net/BlackLabel/bws9o75a/2/

@jethas-bennettjones
Copy link

Hi @pawelfus

Thanks for the tips, though the graph I used as an example is a lot simpler than the one I'm trying to put together.
Here is an idea of the problem that I'm faced with:
image

We're also trying to do this programmatically, so having each node have it's own layout element might not be feasible, especially since the end goal is to have this be user-driven.

@pawelfus
Copy link
Contributor

Thanks for providing more details! I don't see any other workaround you can use at this moment

@jethas-bennettjones
Copy link

Hi @pawelfus. Is there a potential roadmap for when this might get fixed?

@pawelfus
Copy link
Contributor

I can't provide any estimate, but it seems we forget to label the issue (or GH tricked us..) so it was never discussed internally. I will mention this issue on the next meeting, if this will get into the planned releases, ticket will get proper status.

@jethas-bennettjones
Copy link

Hi @pawelfus, is there any update on this?

@pawelfus
Copy link
Contributor

pawelfus commented Nov 6, 2020

We didn't find any good solution for your chart. With current algorithm, it's quite tricky issue with correctly positioning such datasets. We might need to implement this from scratch (different algorithm perhaps?), unlikely to happen in the nearest feature. I will highlight this issue again, on the next meeting, perhaps we will come up with some new ideas.

@pawelfus
Copy link
Contributor

We think this issue can get an acceptable solution with:

  • forcing all nodes that are children of the hanging layout to use hanging layout too
  • making space for all hanging children, translating other nodes to the bottom

This is the idea in action:

Mixing normal and hanging layouts is not an easy task (see image above).

What do you think @jethas-bennettjones ? Could you test my solution above and let us know the results?

@brentbalog
Copy link

I'm facing the same issue as discussed here. Alternating hanging and normal layouts only gets you so far, and manual offset adjustments is not a viable solution for us. It seems like this has been WIP for awhile, what process do you use to prioritize these issues into your dev process? Thanks,

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

No branches or pull requests

6 participants