Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Eclipse Layout Kernel » [ELK] Layout disjunct graphs(Layout disjunct graphs)
[ELK] Layout disjunct graphs [message #1789884] Thu, 31 May 2018 10:59 Go to next message
Christophe De Loor is currently offline Christophe De LoorFriend
Messages: 9
Registered: May 2018
Junior Member
Hi,

I'm using the ELK layered algorithm for my application and I'm looking for a layout option which changes the layout of disjunct graphs.

Currently these are shown side-by-side, but I would like to show one below the other. Is there a layout-option which will do this?

Kind regards,
Christophe
Re: [ELK] Layout disjunct graphs [message #1789968 is a reply to message #1789884] Fri, 01 June 2018 10:25 Go to previous messageGo to next message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 98
Registered: September 2015
Member
Hi Christophe,

two ways to do this:


  1. Set the Separate Connected Components layout option to false on your graph. This may result in overlapping bounding boxes between your components.
  2. Set the Aspect Ratio to an extremely small value.


Hope this helps!

Cheers,
Chris
Re: [ELK] Layout disjunct graphs [message #1790113 is a reply to message #1789968] Tue, 05 June 2018 10:42 Go to previous messageGo to next message
Christophe De Loor is currently offline Christophe De LoorFriend
Messages: 9
Registered: May 2018
Junior Member
Hi Chris,

Thanks for the help.
I've tried both, but neither are working for my case:
- With the Separate Connected Components option the layout boxes indeed overlap
- With the aspect ratio option, if there's more than 2 disjunct graphs it always uses the width of the widest graph as max width. E.g. in the case of 3 disjunct graphs, of which 1 large and 2 small. Layout will be as follows:

|-graph1-||-graph2-|
|-------graph3-------|

I'm thinking of using a hidden stub node which connects the disjunct graphs. This should force the positions of the separate graphs.

Best regards,
Christophe
Re: [ELK] Layout disjunct graphs [message #1790235 is a reply to message #1790113] Thu, 07 June 2018 10:33 Go to previous message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 98
Registered: September 2015
Member
Christophe De Loor wrote on Tue, 05 June 2018 10:42

I'm thinking of using a hidden stub node which connects the disjunct graphs. This should force the positions of the separate graphs.


Right, I understand the problem. The hidden node would of course have to be connected to the leftmost nodes of the graphs, but you might not know which they are.

One solution might be to compute separate layouts for each subgraph, and then combine those manually.

We might also consider adding an option to our box layouter to always lay out subgraphs in a single row or column, which it currently does not, but which would solve your use case without having to add custom code on your side.
Previous Topic:[ELK] The port side does not match with the port position value
Next Topic:dimensions of parents
Goto Forum:
  


Current Time: Sun Oct 13 10:40:17 GMT 2024

Powered by FUDForum. Page generated in 0.04731 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top