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

How to create a tight tree-like layout for a network graph? #233

Open
frankandrobot opened this issue Jul 20, 2023 · 2 comments
Open

How to create a tight tree-like layout for a network graph? #233

frankandrobot opened this issue Jul 20, 2023 · 2 comments
Labels

Comments

@frankandrobot
Copy link

frankandrobot commented Jul 20, 2023

  • Context: this is for rendering networks of internet devices. Technically, our network graphs can be cyclic. But for the most part, they are trees w/ a few cycles.. Our network graphs are acyclic, and in fact, they are trees.
  • And so for the most part, we can render the graph like the screenshot
  • So what I'm asking for is how to create the layout for the screenshot.
  • In particular, this is a screenshot of a very large network (+300 nodes) rendered in a tight space.
  • So looking for ways to render a tree in a tight space with no overlapping edges.
  • Some more context: we're using another library to render the nodes. We're trying to use elkjs for the layout.
image
@soerendomroes
Copy link
Member

You can try the layered and the mrtree algorithms.
I suggest trying out example graphs in elklive or elklive json.

For further guidance, I need to know what you want your drawing to look like.

@Vesper0704
Copy link

I've been working on this kind of architecture layout as well. What I did is to use layered algorithm, and set partition indices for the nodes. Here is a demo you can refer to:
image
You can extend it horizontally by simply adding nodes/edges in a flat way because there is no nested hierarchy here.

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

3 participants