Skip to content

Support Per-Link Curve Styling in Flowcharts #1727

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

Open
ErMagnificoo opened this issue May 26, 2025 · 0 comments
Open

Support Per-Link Curve Styling in Flowcharts #1727

ErMagnificoo opened this issue May 26, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@ErMagnificoo
Copy link

Image

Is your feature request related to a problem? Please describe.
Yes. Currently, the curve setting in Mermaid's flowchart configuration allows customizing the line curvature using D3 curve functions, but this setting applies globally to all lines in the diagram. I often need to make only specific lines curvy, especially when representing annotations or comments — a common requirement in technical or patent drawings. The inability to selectively apply line curvature means I cannot properly depict these scenarios, as making all lines curvy compromises the readability and accuracy of the rest of the diagram.

Describe the solution you'd like
I’d like to be able to specify the line style (curved or straight) on a per-link basis in flowcharts. Ideally, this would involve a syntax or style directive that can be applied to individual connections, much like how stroke, text, and other styles are handled.

For example:

A --> B
B -.-> C  %% This link could be curved
C --> D

Or via a style block:

linkStyle 1 stroke:curved;

Describe alternatives you've considered

  • I reviewed the flowchart diagram config options and styling options, but the curve setting is only available at the global level.

  • Workarounds like splitting diagrams or overlaying SVG elements are not practical and defeat the purpose of using Mermaid for clean, text-based diagram generation.

Additional context
This feature would be especially helpful for creating diagrams used in patent filings, where annotation lines are traditionally shown as curvy or wavy lines to distinguish them from structural elements. Currently, Mermaid is almost perfect for this use case, but the lack of per-line curvature control makes it unsuitable for compliance with common patent drawing standards.

@ErMagnificoo ErMagnificoo added the enhancement New feature or request label May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant