Subgraphs Always Default to Top-to-Down (TD
), Ignoring Global Direction
#6428
Labels
Status: Triage
Needs to be verified, categorized, etc
Type: Bug / Error
Something isn't working or is incorrect
Description
In Mermaid subgraphs always default to the top-to-down (
TD
) layout, even if a different global direction (LR
,RL
, orBT
) is explicitly set. This forces users to manually declare directions inside each subgraph, creating redundancy and confusion.Steps to reproduce
Example 1: Global
LR
, Subgraph defaults toTD
(Incorrect):**Expected Behavior:
The subgraph should inherit the global left-to-right (LR) direction implicitly.
**Actual Behavior:
The subgraph incorrectly defaults to top-to-bottom (TD).
Example 2: Explicitly Stated Subgraph Direction (Correct but Redundant):
**Actual Behavior:
Correctly renders due to explicit declaration, but redundant because global direction was already set to LR.
Screenshots
**Failing Exemple
**Working Exemple
Code Sample
Setup
Environment
Mermaid.js Version: v11.4.1
Browser: Microsoft Edge v132.0.2957.115
OS: Windows 11
Suggested Solutions
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: