Closed absolutejam closed 5 years ago
Are you talking about flowchart, sequence diagram or gantt diagram? What are "connectors between siblings"?
Sorry, forgot to mention I'm talking about flow diagrams.
In terms of siblings, take the following example:
A --> B
A --> C
Then B and C could be siblings.
OK, I've got what are siblings. Then what are connectors between siblings ?
Update
I think I've got your point. You want to make two nodes having the same weight so that they are on the same level. I believe somebody else had created an issue for this.
This would be a very cool feature because I think Mermaid would then be able to support Evaporating Cloud diagrams.
Traditionally the sibling same level connect is a jagged line, but it could just as well be a red line.
Yes, this is one of the things missing in mermaid before I can use mermaid to create network maps.
Take a look at the example made in graphviz over at https://www.reddit.com/r/networking/comments/8dbucs/tools_to_create_maintainable_network_diagrams/dxr8azc/ more specific https://imgur.com/a/TgqYNjo
If we look at CORE-SW1 and CORE-SW2 from the above example I want to have them levelled (at the same height/level within the map). Other than that I dont really care for other parameters which is the beauty of using a textbased diagrammer such as mermaid's flowchart capability. That is I just define the nodes and the links between them and mermaid does the rest.
But doing so in mermaid CORE-SW1 ends up one level and CORE-SW2 at another one:
Another use for using "sibling nodes" would be generating pretty organizational charts: https://cdn.vertex42.com/ExcelTemplates/Images/orgcharts/functional-business-organizational-chart.gif
Great project, I'm enjoying using it!
As pointed out by a colleague, you can force two nodes to be on the same level (siblings) by creating fake intermediary nodes and collapsing them with styling (width:0px). Here's an example: https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZ3JhcGggVERcbkFbQTxicj5MZXZlbCMxXSBcbiAgIEEgLS0-QltCPGJyPkxldmVsIzJdXG4gICAgICBCIC0tPkIxW0ItMTxicj5MZXZlbCMzXVxuICAgICAgQiAtLT5CMltCLTI8YnI-TGV2ZWwjM11cbiAgICAgICAgIEIyIC0tPkIyMVtCLTItMTxicj5MZXZlbCM0XVxuICAgQSAtLT5DW0M8YnI-TGV2ZWwjMl1cbiAgIEEgLS0-RFtEPGJyPkxldmVsIzJdXG4gICAgICBEIC0tPkQxW0QtMTxicj5MZXZlbCMzXVxuICAgICAgICAgRDEgLS0-RDExW0QtMS0xPGJyPkxldmVsIzRdXG4gICAgICBEIC0tPkQyW0QtMjxicj5MZXZlbCMzXVxuICAgWDEoXCIgXCIpXG4gICAgICBBLS0tWDFcbiAgICAgIFgxIC0tPkVbRTxicj5MZXZlbCMzXVxuICAgICAgc3R5bGUgRSBmaWxsOnllbGxvdyxzdHJva2U6cmVkLHN0cm9rZS13aWR0aDozcHhcbiAgIFgyLTEoXCIgXCIpXG4gICBYMi0yKFwiIFwiKVxuICAgICAgQS0tLVgyLTFcbiAgICAgIFgyLTEtLS1YMi0yXG4gICAgICBYMi0yIC0tPkZbRjxicj5MZXZlbCM0XVxuICAgICAgc3R5bGUgRiBmaWxsOmxpZ2h0Z3JlZW4sc3Ryb2tlOmJsdWUsc3Ryb2tlLXdpZHRoOjNweFxuY2xhc3NEZWYgU2tpcExldmVsIHdpZHRoOjBweDtcbmNsYXNzIFgxLFgyLTEsWDItMiBTa2lwTGV2ZWwiLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9fQ
@Apachez- Some rough hacks at your diagram. I was trying to do the same thing so I tinkered with your example. None of these would make sense for me to use (I want my graphs autogenerated):
Ideally Mermaid will be updated to allow "linked siblings" and styling of subgroups.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hey guys,
Awesome project you got going here. Just a quick query - Is it possible to ensure two nodes appear on the same level, even if they don't share the same parents? (Eg. two separate graphs that converge) And also, can we add connectors between siblings?
Cheers!