Skip to main content



      Home
Home » Modeling » Eclipse Layout Kernel » Creating a graph with containers of SubGraphs
Creating a graph with containers of SubGraphs [message #1801923] Tue, 29 January 2019 09:39 Go to next message
Eclipse UserFriend
I need to create a graph which contains many SubGraphs, each has it's own node's and edges.
The SubGraphs should be treated as nodes as they have dependencies as well.
It should look similar to the example layout here: https://www.eclipse.org/elk/
However, I couldn't find anywhere in the docs how to implement it.
I'm using elkjs-4.1.0
Re: Creating a graph with containers of SubGraphs [message #1802055 is a reply to message #1801923] Thu, 31 January 2019 06:49 Go to previous messageGo to next message
Eclipse UserFriend
Ohad,

as you can see in our graph model specification, nodes can themselves contain further nodes. It's basically a matter of building your graphs and putting them into their own nodes again. See here for an extremely simple example JSON structure.

Cheers,
Chris
Re: Creating a graph with containers of SubGraphs [message #1802184 is a reply to message #1802055] Sun, 03 February 2019 03:15 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Christoph! Exactly what I needed.

A follow-up question:
I'm trying to properly visualize the whole graph but since I have subgraphs I need to know how many nodes I have in each layer so that I know what height and width to give each containing subgraph.

Is there a way I can see how many nodes there are in each layer in a subgraph?

[Updated on: Sun, 03 February 2019 03:21] by Moderator

Re: Creating a graph with containers of SubGraphs [message #1802352 is a reply to message #1802184] Thu, 07 February 2019 04:26 Go to previous message
Eclipse UserFriend
Ohad,

you shouldn't have to set the size of nodes that contain further nodes beforehand, that's what the layout algorithm will figure out automatically. After the layout, you can extract the computed node size from the result and apply it to whatever you use to visualize your nodes.

Cheers,
Chris

[Updated on: Thu, 07 February 2019 04:26] by Moderator

Previous Topic:Mixing nodes to be adjusted with nodes with fixed positions in Elk Layered
Next Topic:Unexpected bends in Layered Layout
Goto Forum:
  


Current Time: Wed May 14 21:45:07 EDT 2025

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

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

Back to the top