Open gonzalobg opened 1 year ago
Is this supposed to work? I am not aware of all the flowchart features, but I can't find anything about this in the documentation
Hard to tell. Is flowchart used for these graphs?
My understanding from skimming from some of the source code is that there is a default shape
that can be overriden, but I could not find anything in the documentation about how to do that.
I couldn't find much documentation about graph
either, so I'm not sure if this not being documented is a "bug", or whether this is not documented because it is not supported yet, or whether the bug is on my side because I am trying to change the default in the wrong way.
graph
and flowchart
identify the same type of diagram, but I guess graph
was the old identifier.
By default, nodes are rendered with rect
tag, so I don't think using classDef
to modify its shape is really appropriated
How does one make all nodes circular by default in Mermaid?
classDef is not for modifying shapes.
Shape can have some special meaning in a diagram. There is no way to configure which shape corresponds to a type of node/vertex at the moment. By default they are square https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/diagrams/flowchart/parser/flow.jison#L381
e.g.
Label | Shape |
---|---|
A | square |
A( ) | rounded square |
A(( )) | circle |
etc.
So it is in the grammar and all the matching between syntax & shapes are here
So I believe this is an enhancement.
Consider adding a configuration option for default shape.
Description
When I do:
the default shape of the nodes in the graph is rectangles, not circles.
Steps to reproduce
See above.
Screenshots
No response
Code Sample
Setup
Suggested Solutions
Fix this so that the default shape changes.
Additional Context
No response