Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the Mermaid stateDiagram layout to horizontal

I need to use Mermaid's stateDiagram-v2, but it renders it top to bottom, and I need it to render left to right. Any way to achieve that?

Sample diagram:

stateDiagram-v2 
[*] --> NEW
NEW --> PENDING
PENDING --> PROCESSING
PROCESSING --> COMPLETED
COMPLETED --> [*]
like image 452
Andrey Avatar asked Oct 17 '25 05:10

Andrey


1 Answers

I can add direction directive

stateDiagram-v2 
  direction LR
  [*] --> NEW
  NEW --> PENDING
  PENDING --> PROCESSING
  PROCESSING --> COMPLETED
  COMPLETED --> [*]
like image 111
Andrey Avatar answered Oct 18 '25 21:10

Andrey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!