mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown

Home Page:https://mermaid.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flowchart edges not found: Diagram db `getEdges` returining edges which aren't drawn on DOM

ad1992 opened this issue Β· comments

Description

Diagram db getEdges sometimes returns edges which aren't drawn or DOM for flowchart

Steps to reproduce

Let's consider the πŸ‘‡πŸ» mermaid code

flowchart TB   
    subgraph conference
        frontend
        backend
        security
    end
    frontend --> |Dive into frontend frameworks| conference
    backend --> |Learn all about backend| conference
    security --> |securing web apps| conference

For the above this πŸ‘‡πŸ» is the mermaid output

Screenshot 2024-05-13 at 12 49 47β€―PM

As its clear that none of the edges are drawn even though the diagram db getEdges returns πŸ‘‡πŸ»

[
    {
        "start": "frontend",
        "end": "conference",
        "type": "arrow_point",
        "text": "Dive into frontend frameworks",
        "labelType": "text",
        "stroke": "normal",
        "length": 1
    },
    {
        "start": "backend",
        "end": "conference",
        "type": "arrow_point",
        "text": "Learn all about backend",
        "labelType": "text",
        "stroke": "normal",
        "length": 1
    },
    {
        "start": "security",
        "end": "conference",
        "type": "arrow_point",
        "text": "securing web apps",
        "labelType": "text",
        "stroke": "normal",
        "length": 1
    }
]

So this should be fixed in the code so that the getEdges returns correct set of edges

Screenshots

No response

Code Sample

No response

Setup

  • Mermaid version:
  • Browser and Version: [Chrome, Edge, Firefox]

Suggested Solutions

No response

Additional Context

No response