Open bmitc opened 11 months ago
This would be amazing to have in mermaid.
I think that potentially having link directionality would be great, as it would allow for optionally orientated graphs.
Maybe this could be done via a new renderer for the flowcharts, however ? I feel like these two diagram types share do share a lot of use cases, and the structured
feel of the flowchart is mainly due to the way it is rendered, especially if you do not use subgraphs... which I think are not incompatible with your proposal (they could be a circle with this new renderer).
Proposal
Graphs currently can only be laid out in a hierarchical manner that primarily relies, in an often tough to reason about manner, on the order that the relationships were entered in the Mermaid Markdown. It would be great if graphs could be automatically laid out according to a "blow-out" algorithm that can be referred to as organic, force-directed, spring, etc. since there are different algorithms to accomplish this.
It is unclear whether this belongs as a new diagram or new syntax proposal as it's really neither, but these are the only two relevant choices.
This has also been proposed before but was automatically closed, at least twice, in https://github.com/mermaid-js/mermaid/issues/806 and https://github.com/mermaid-js/mermaid/issues/867.
Use Cases
For these reasons, I'm currently going to have to use Graphviz instead of Mermaid. This is unfortunate since GitHub and several static website tools, like Jekyll, support rendering Mermaid diagrams.
Screenshots
To my knowledge, something like this is not currently possible with Mermaid:
Syntax
Maybe something like:
for force-directed? Any other keyword would be fine. I don't think this is much of a syntactical problem as it is an engine problem.
Implementation
None