Mermaid Node Order

I am using Obsidian in an Android Mobile. I made a code for my diagram. But nodes are not in order as I want.

I want first node to be grade-12, grade-13 and exam-format. But my result is inverse of it.

Please be kind enough to help me on this.

Would you be willing to share the mermaid code block for this diagram?

Oh Sorry…
I missed to include that.

graph TD

A[Economics Syllabus]

subgraph Grade-12
direction LR
JOINT1-->UN-01-->UN-02-->UN-03-->UN-04-->UN-05-->UN-06
end
subgraph Grade-13
direction LR
JOINT2-->UN-07-->UN-08-->UN-09-->UN-10-->UN-11-->UN-12
end
subgraph Exam-Format
direction LR
JOINT3
end

A ---> JOINT1
A ---> JOINT2
A ---> JOINT3

Thanks! I played around with the diagram a bit, and it looks like Mermaid sometimes enforces its own order on your nodes, especially when there are subgraphs present. Removing the subgraphs allowed the diagram to order the way I expected. It may not be quite what you’re looking for, but perhaps it’s close:

graph TD

A[Economics Syllabus]

A --> Grade-12    --> JOINT1
A --> Grade-13    --> JOINT2
A --> Exam-Format -->JOINT3

JOINT1-->UN-01-->UN-02-->UN-03-->UN-04-->UN-05-->UN-06

JOINT2-->UN-07-->UN-08-->UN-09-->UN-10-->UN-11-->UN-12

JOINT3

Thanks for your help. It is better. @Craig

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.