question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

can't nest subgraphs in flowchart

See original GitHub issue

The following is a valid subgraph

 graph TB
   subgraph Foo
     a1-->a2
   end

but this is not

 graph TB
   subgraph Foo
     a1-->a2
     subgraph Bar
       b1-->b2
     end
   end

I can’t think of a reason subgraphs should not be nestable, and i can think of reasons I’d want them to be.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11

github_iconTop GitHub Comments

3reactions
ubreddycommented, May 22, 2015

Please notice the labels of subgraphs going haywire.

<div class="mermaid"> graph TB; I --> IG((IG))

subgraph publicnet IG --> ELB NAT end subgraph webnet ELB --> Web1 ELB --> Web2 Web1 --> elb2 Web2 --> elb2 end subgraph appnet
subgraph C1 subgraph C1cluster1 elb2 --> C1Prod1Ins1 elb2 --> C1Prod1InsN end subgraph C1cluster2 elb2 --> C1Prod2Ins1 elb2 --> C1Prod2InsN end subgraph C1cluster3 elb2 --> C1Prod3Ins1 elb2 --> C1Prod3InsN end end subgraph C2 subgraph C2cluster1 elb2 --> C2Prod1Ins1 elb2 --> C2Prod1InsN end subgraph C2cluster2 elb2 --> C2Prod2Ins1 elb2 --> C2Prod2InsN end subgraph C2cluster3 elb2 --> C2Prod3Ins1 elb2 --> C2Prod3InsN end end end subgraph dbnet C1Prod1Ins1 --> RDS1 C1Prod1InsN --> RDS1 C1Prod2Ins1 --> RDS1 C1Prod2InsN --> RDS1 C1Prod3Ins1 --> RDS1 C1Prod3InsN --> RDS1 C2Prod1Ins1 --> RDS2 C2Prod1InsN --> RDS2 C2Prod2Ins1 --> RDS2 C2Prod2InsN --> RDS2 C2Prod3Ins1 --> RDS2 C2Prod3InsN --> RDS2 end

</div>

test

0reactions
knsvcommented, Jun 9, 2015

Thanks for pointing this out. You also need to add the code below to your page. I will update the docs.

<script>mermaid.initialize({startOnLoad:true});</script>

Knut Sveidqvist Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Tuesday 9 June 2015 at 06:28, Udaya Reddy wrote:

@Knut Replaced mermaid.full.js of 0.4 with mermaid.js of version 0.5 and the diagrams dont render? read the docs… It should have worked.
What am I missing? any guidance? Regards Uday

On Sunday, 7 June 2015 9:04 PM, Knut Sveidqvist <notifications@github.com (mailto:notifications@github.com)> wrote:

A fix for this has been released in version 0.5.0— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub (https://github.com/knsv/mermaid/issues/161#issuecomment-110220886).

Read more comments on GitHub >

github_iconTop Results From Across the Web

can't nest subgraphs in flowchart #161 - mermaid-js ... - GitHub
nested subgraph labels at 3 or levels deep are not working well, or if there are two subgraphs within a subgraph too.
Read more >
Mermaid - How to connect subgraphs in markdown?
I can't figure out how to connect subgraphs. Given the program below, I need to be able to connect one and two with...
Read more >
When subgraph expands, parent subgraph doesn't change ...
I have nested subgraphs that each use the Parallel layout (Have also tried TreeLayout with the same result). Here is my starting state:....
Read more >
Nesting nodes | Visual Scripting | 1.7.8 - Unity - Manual
Use the following nodes to work with nesting Subgraphs and State Units in a Script Graph. For more information on Subgraphs and State...
Read more >
Onion Diagram (Nested Ellipses) - Help - Graphviz
Hi, I'm trying to draw a simple onion diagram for stakeholder analysis. ... Am I taking the right approach here by using nested...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found