Mermaid-Chart / issue-tracker

Other
11 stars 2 forks source link

Subgraph Direction Control Even When Linking Outside #63

Open MattLCE opened 7 months ago

MattLCE commented 7 months ago

Is your feature request related to a problem? Please describe. I put the table of contents of a short course into a subgraph to gather those elements together. Visually this clarifies that most of the diagram is branches and the reader should return to the origin when done with a branch. This created REALLY long edge lines that are hard to follow.

Describe the solution you'd like I want the subgraph direction to be controllable even if nodes in the subgraph link to nodes outside the subgraph. I want the subgraph to be able to act like a hypernode so I can make logical/physical/visual groups.

Describe alternatives you've considered I tried not using a subgraph but that spread out the table of contents nodes across a wide area and made it difficult to understand how to navigate the flowchart. It's not a perfect flowchart because each branch just ends instead of connecting back into the table of contents. It really ruins the layout if I do that.

Additional context Add any other context or screenshots about the feature request here. see screenshot mermaid subgraph direction

MattLCE commented 7 months ago

There are a few problems with laying out subgraphs, particularly if they link across. Here is an example where I created an empty subgraph so that the subgraphs would be next to each other. I think it turned the empty subgraph into a box? mermaid subgraph interlinking If I didn't create the empty subgraph it would pull the entire subgraph inside the other subgraph, even though I didn't nest them. mermaid subgraph pulled inside This is probably because the subgraph is pulling anything inside itself if it's linked. Every time a node in the subgraph links to a node outside the subgraph it pulls that node inside the subgraph visually, even though it's outside of the subgraph logically. mermaid not in subgraph

jgreywolf commented 6 months ago

@MattLCE See the comment in your other post where this is slightly improved by moving the following out of the subgraph definition:

O1-->offer0
O2-->agency0
O3-->specSell0
O4-->customer0
O5a-->fulfill0
O5b-->collateral