-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Multiple graph in the live editor #586
Comments
It was necessary for me to add "end" on the last line to close the subgraph declaration. But other than that, your code above works for me. I'm unclear what you mean by in the "same live editor". |
@erikh2000 Yes it works with adding |
Oh sorry, it does not work indeed.
in the above code we have |
My issue is mainly about adding multiple independent graphs in the live editor that can be achieved by allowing multiple graph statement in it. |
You need to give unique names to your nodes so that Mermaid won't interpret them as the same node. It makes sense if you think about it. How would Mermaid know if you meant the two "a1" nodes to be separate? So for example, you can change one of the "a1"s to "a1_copy". That gives you an ugly "a1_copy" text rendered in the graph, but you can specify a separate label like so:
...and then the node will render in the graph with "a1" text. |
That is exactly the issue. My point is allowing multiple separate set of node in tow
|
also two having independent node with the same name among subgraph we can use subgraph name as name space
|
It is doable in your own HTML page. Just put your code in two separate But for https://mermaidjs.github.io/mermaid-live-editor/, I don't think we will add this feature since this is not a common use case. |
I would need the same, multiple graphs ... |
tylerlong write it is not common use. But i disagree. For example to create a subflow as a sidestep. For example something like this:
|
Hey, you're commenting on a closed issue. Feel free to open a new issue if the problem still persists. |
Can we have multiple independent graph in the same live editor? This does not work:
The text was updated successfully, but these errors were encountered: