Open dbartholomae opened 2 years ago
Displaying a node half-half in two subgraphs does not seem very intuitive. What about having two subgraphs enclosing the shared node like the tikz-bayesnet library for latex?
This could also work, but might add a bit of complexity, as mermaid then needs to decide which box should be the bigger and which the smaller one, so the rendering of one box no longer depends only on properties of that box itself.
I have a similar problem - I need to somehow display a grouping of nodes in my graph, where nodes can be in different groups. For example, I expect to have code something like this:
flowchart TD
A([Parent workspace])
B([Child workspace 1])
C([Child workspace 2])
N1[Node 1]
N2[Node 2]
N2[Node 3]
subgraph setup1["Setup 1"]
B
N1
N2
end
subgraph setup2["Setup 2"]
C
N2
N3
end
subgraph setup3["Setup 3"]
A
B
C
end
A-->B
A-->C
B-->N1
B-->N2
C-->N2
C-->N3
A the moment it displays the result like on the screenshot, but my goal is to have grouping like it's showed with the colored lines:
Actually, I would say that the subgraph
as a rectangular container is not even the best tool to achieve this goal - it's not about wrapping nodes inside containers, but rather about drawing a line around some nodes. So something like a free-form dash line without background filling would perfectly work for this purpose.
Displaying a node half-half in two subgraphs does not seem very intuitive. What about having two subgraphs enclosing the shared node like the tikz-bayesnet library for latex?
+1 for this :D
Displaying a node half-half in two subgraphs does not seem very intuitive. What about having two subgraphs enclosing the shared node like the tikz-bayesnet library for latex?
+1 for this as well. :D
I have the same problem.
+1
Is your feature request related to a problem? Please describe. I'm using Mermaid to describe the flow in our system and which teams are responsible for which part, e. g.
This will display the Order as being part of the Buy domain, but, actually, it should be a shared interface between both domains.
Describe the solution you'd like Allow to display nodes half-half in two subgraphs similar to this sketch:![image](https://user-images.githubusercontent.com/3396992/146536643-654780f9-088a-4c63-83b0-2a170217d9b8.png)
Ideally, this could be achieved with the following syntax:
But this robs both domains of a very important concept they have.
Additional context If someone is willing to get me started, I would be happy to try my hands on a PR (and use that knowledge also for further contributions).