You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it's great for creating complex flowcharts via markup. I prefer mermaid to manually drawn diagrams because it's much easier to add in new links and nodes retrospectively without having to re-arrange an entire diagram.
Problem
one issue with this use case (namely, a graph with lots of nodes but binary links) appears when using linkStyle. currently, linkStyle only accepts a 'link number' as a reference, which can cause havoc in a diagram when adding a new link or node early on as it means updating all of the subsequent linkStyle references/styling.
Suggestion
allow linkStyle to be set based on link text instead of link number
where a link style is explicitly defined based on link number, it takes precedence over the above syntax. linkStyle default should still be maintained for anything not specified as a link number or text reference.
Benefit
this is really useful for complex flowcharts with lots of nodes that have binary decisions (i.e. 'Success' or 'Failure')
this would mean that a graph with 20 different decisions has link styles updated automatically if a new link is added early on, without having to manually view and alter the color of subsequent links
happy to contribute to this if you can link me to a good starting point!
The text was updated successfully, but these errors were encountered:
Proposal
hi,
thanks for developing mermaid!
it's great for creating complex flowcharts via markup. I prefer mermaid to manually drawn diagrams because it's much easier to add in new links and nodes retrospectively without having to re-arrange an entire diagram.
Problem
one issue with this use case (namely, a graph with lots of nodes but binary links) appears when using
linkStyle
. currently,linkStyle
only accepts a 'link number' as a reference, which can cause havoc in a diagram when adding a new link or node early on as it means updating all of the subsequentlinkStyle
references/styling.Suggestion
allow
linkStyle
to be set based on link text instead of link numberExample
the syntax might be something like:
where a link style is explicitly defined based on link number, it takes precedence over the above syntax.
linkStyle default
should still be maintained for anything not specified as a link number or text reference.Benefit
this is really useful for complex flowcharts with lots of nodes that have binary decisions (i.e. 'Success' or 'Failure')
this would mean that a graph with 20 different decisions has link styles updated automatically if a new link is added early on, without having to manually view and alter the color of subsequent links
happy to contribute to this if you can link me to a good starting point!
The text was updated successfully, but these errors were encountered: