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

Edge Routing / Horizontal Partitions? #490

Closed
shean42 opened this issue Feb 9, 2020 · 5 comments
Closed

Edge Routing / Horizontal Partitions? #490

shean42 opened this issue Feb 9, 2020 · 5 comments
Labels
question Request for support in using ELK.

Comments

@shean42
Copy link

shean42 commented Feb 9, 2020

Hi all,

While the layout for this graph is nearly perfect I'm struggling to find layout options to properly route that one outstanding edge.

A requirement in the given case is the horizontal partitioning with the rows underneath each other, even though the rows don't have to be compounds.

Given this setting I have two questions:

a) Can ELK route the edge in the above example while preserving the rows?
b) Is there something like 'horizontal partitions' in addition to the vertical ones ELK already supports, which could help to solve the above?

Thanks

@shean42 shean42 changed the title Edge Routing / Vertical Partitions? Edge Routing / Horizontal Partitions? Feb 9, 2020
@le-cds le-cds added the question Request for support in using ELK. label Feb 10, 2020
@le-cds
Copy link
Contributor

le-cds commented Feb 10, 2020

The edge you're talking about is what we call a long hierarchical edge. By default, ELK lays out each level of hierarchy separately, but that doesn't work with such edges. Setting hierarchy handling to INCLUDE_CHILDREN will fix that part of the layout problem.

Regarding your partitions, I'm not entirely sure whether that will work in this particular case, but I certainly invite you to try. 😉 The basic idea will be to switch the layout direction in the topmost level to DOWN. That will already yield the two rows, but only because there is an edge running from the top to the bottom node. Enable partitions for force this order by setting the layout partitioning option to true on the topmost level and assigning the compound nodes appropriate layout partitions.

I hope this works properly with the hierarchical layout mode. If not, feel free to get back to us and we'll see whether there's time to fix any bugs!

Cheers,
Chris

@shean42
Copy link
Author

shean42 commented Feb 12, 2020

Thanks for your reply, this is quite insightful!

After playing around some more with the options here are a few findings:

  • Direction 'down' is nicely working, but unfortunately I can't use it since the nodes in each 'row' need have the direction 'right'. I see from another discussion here that different directions in a hierarchy are not supported yet, so this certainly would be an interesting feature!

  • By trying to work around the above I'm testing a flat model. While the overall layout turns out quite nicely the separation and pre-defined order of the 'rows' naturally is not reflected in the output. Having horizontal partitions in addition to the already existing vertical ones could solve this, so maybe that's an idea for future developments too!

  • Another approach to solve this could be to separately generate layouts for the 'rows' and in a second run route the inter-row edges. I see that edge routing without node placement has been asked for many times, so I'd like to ++ that counter :-)

Let me know if you have some more ideas about what could be done with the existing features! I was thinking about wrapping/cuts but could not get that to improve the overall situation.

viele Grüße :-)

@le-cds
Copy link
Contributor

le-cds commented Feb 12, 2020

Thanks for your analysis and suggestions! Somewhat embarrassingly, I had not thought of the fact that hierarchical layout does not support different layout directions yet. I will in fact create an issue to track that, but seeing that it's a rather complicated part of our code base, you'd better not hold your breadth on that one. 😉

Separate edge routing is a highly sought after feature indeed, and it is high on our agenda. Once we find a master student willing and capable of implementing it, we're good to go.

Viele Grüße zurück! 🙂

@shean42
Copy link
Author

shean42 commented Feb 12, 2020

Cool, thanks a lot for all your efforts here!!

@le-cds
Copy link
Contributor

le-cds commented Feb 12, 2020

Cheers. I'll close the issue for now. :)

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

No branches or pull requests

2 participants