Set direction in Bob-Alice diagrams #7280
iampi31415
started this conversation in
Ideas
Replies: 1 comment
-
|
Sequence diagrams in Mermaid are always vertical; you can’t rotate them. If you want a horizontal layout, switch to flowchart LR (or graph LR) and draw the same relationships. This example tries to make the flowchart feel like a real bus. flowchart LR
classDef bus stroke-width:3px;
classDef tap stroke-width:1px;
subgraph Bus["I2C Bus"]
direction TB
SDA[SDA bus]:::bus
SCL[SCL bus]:::bus
end
D1[Device 1]:::tap
D2[Device 2]:::tap
D3[Device 3]:::tap
Dn[Device ...]:::tap
D1 --- SDA
D1 --- SCL
D2 --- SDA
D2 --- SCL
D3 --- SDA
D3 --- SCL
Dn --- SDA
Dn --- SCL
Vdd[Vdd]
SDA -->|Rp| Vdd
SCL -->|Rp| Vdd
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
https://mermaid.js.org/syntax/sequenceDiagram.html
I would like this one horizontally:
sequenceDiagram SDA<<->>SCL: Device 1 SDA<<->>SCL: Device 2 SDA<<->>SCL: Device 3 SDA<<->>SCL: ... SDA->Vdd: Rp SCL->Vdd: RpsequenceDiagram SDA<<->>SCL: Device 1 SDA<<->>SCL: Device 2 SDA<<->>SCL: Device 3 SDA<<->>SCL: ... SDA->Vdd: Rp SCL->Vdd: RpAny alternative?
Beta Was this translation helpful? Give feedback.
All reactions