mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
71.29k stars 6.43k forks source link

Sub-graph direction in flowchart-elk cannot change direction #5864

Open zhuwenyun opened 3 weeks ago

zhuwenyun commented 3 weeks ago

Description

Sub-graph direction in flowchart-elk cannot change direction

Steps to reproduce

First, I set the layout of subgraphs from left to right through flowchart-elk LR, and then I set 3 subgraphs, and the direction of each subgraph is from top to bottom. As a result, if the direction setting of subgraphs is not effective, it is from left to right. This is different from flowchart's default rendering method. I have worked hard to help you read it and wait for your reply. Thank you

Screenshots

Sub-graph direction in flowchart-elk cannot change direction

Code Sample

flowchart-elk LR

    subgraph sg1
      direction TB
      a1 --> a2 --> a3
    end

    subgraph sg2
      direction TB
      b1 --> b2
    end

    subgraph sg3
      direction TB
      c1 --> c2 --> c3
    end

    sg1 --> sg2 --> sg3

Setup

Suggested Solutions

No response

Additional Context

image

zhuwenyun commented 3 weeks ago

mermaid version is 11.2.0

zhuwenyun commented 3 weeks ago

image The default layout direction is in effect

zszen commented 3 weeks ago

mermaid version is 11.2.0

@zhuwenyun by the way how to add elk to mermaid v11