Skip to content

ELK flowchart edge curving instead of right angle #7213

@chu121su12

Description

@chu121su12

Description

In certain condition, elk render a curved edge instead of straight angle. I'm not yet sure on the elk internals, but some cases make it fallback to curved with recourse is to reorder nodes/edges.

Steps to reproduce

see example

Screenshots

Image

See N11 -> N22 edges curved midway. With up to 3 additional N11 -> N22, it become right angles again:

Image

And adding the fourth N11 -> N22, it becomes partial curved, partial right angle:

Image

Code Sample

---
config: { layout: elk }
---

flowchart LR
    subgraph G1
        N00
        N11
        N12
        N13
    end
    subgraph G2
        N21
        N22
    end

    N00 --- N01 & N02 & N03 & N04 & N05
    N00 --- N11 & N12 & N13 & N22

    N11 --- N22
    N11 --- N22
    N11 --- N22
    N11 --- N22
    N11 --- N22

    %% %% up to 3
    %% N11 --- N22
    %% N11 --- N22
    %% N11 --- N22

    %% %% 4th
    %% N11 --- N22

Setup

  • Mermaid version: live v11.12.0
  • Browser and Version: Firefox 145.0.1

Suggested Solutions

Not a solution but if this condition is caused by some sort of loop approximation, please provide a iteration limit as tunable paramter.

Additional Context

Note that the repetition of N11 -> N22 is only made to prove the rendering bug. It still happens witout the repetation but this is the fastest way I can reproduce without showing my personal use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageNeeds to be verified, categorized, etcType: Bug / ErrorSomething isn't working or is incorrect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions