10000 [Feature Request] Support for Subgraphs/Clusters (i.e. Compound Graphs) · Issue #37 · nadavrot/layout · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Feature Request] Support for Subgraphs/Clusters (i.e. Compound Graphs) #37

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

Open
dolezvo1 opened this issue Mar 7, 2025 · 0 comments
Open

Comments

@dolezvo1
Copy link
dolezvo1 commented Mar 7, 2025

Graphviz has support for so-called compound graphs (formal definition) using the subgraph construct. For example:

digraph G {

  subgraph cluster_0 {
    style=filled;
    color=lightgrey;
    node [style=filled,color=white];
    a0 -> a1 -> a2 -> a3;
    label = "process #1";
  }

  subgraph cluster_1 {
    node [style=filled];
    b0 -> b1 -> b2 -> b3;
    label = "process #2";
    color=blue
  }
  start -> a0;
  start -> b0;
  a1 -> b3;
  b2 -> a3;
  a3 -> a0;
  a3 -> end;
  b3 -> end;

  start [shape=Mdiamond];
  end [shape=Msquare];
}

should render like this:

Image

However, layout-rs currently renders this example (incorrectly) like this (which is, funnily enough, the first image in the project's readme):

Image

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

No branches or pull requests

1 participant
0