diff --git a/demos.html b/demos.html index a794656d1b..7f2c992c53 100644 --- a/demos.html +++ b/demos.html @@ -225,11 +225,21 @@

Basic flowchart

classDef orange fill:#f96,stroke:#333,stroke-width:4px; class sq,e green class di orange

Basic sequence diagram

-
sequenceDiagram - Alice->>Bob: Hello Bob, how are you? +
%% Sequence diagram code
+sequenceDiagram
+    Alice ->> Bob: Hello Bob, how are you?
     Bob-->>John: How about you John?
-    Bob--xAlice: I am good thanks!
-    Bob-xJohn: I am good thanks!
+    Bob--x Alice: I am good thanks!
+    Bob-x John: I am good thanks!
+    Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
+
+    Bob-->Alice: Checking with John...
+    Alice->John: Yes... John, how are you?
sequenceDiagram + Alice->> Bob: Hello Bob, how are you? + Bob-->> John: How about you John? + Bob--x Alice: I am good thanks! + Bob-x John: I am good thanks! + Note right of John: Bob thinks a long
long time, so long
that the text does
not fit on a row. Bob-->Alice: Checking with John... diff --git a/docs/demos.md b/docs/demos.md index 83c504ecbb..e74d5d2931 100644 --- a/docs/demos.md +++ b/docs/demos.md @@ -73,11 +73,24 @@ graph TB ``` ## Basic sequence diagram ``` +%% Sequence diagram code sequenceDiagram - Alice->>Bob: Hello Bob, how are you? + Alice ->> Bob: Hello Bob, how are you? Bob-->>John: How about you John? - Bob--xAlice: I am good thanks! - Bob-xJohn: I am good thanks! + Bob--x Alice: I am good thanks! + Bob-x John: I am good thanks! + Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row. + + Bob-->Alice: Checking with John... + Alice->John: Yes... John, how are you? +``` +``` +sequenceDiagram + Alice->> Bob: Hello Bob, how are you? + Bob-->> John: How about you John? + Bob--x Alice: I am good thanks! + Bob-x John: I am good thanks! + Note right of John: Bob thinks a long
long time, so long
that the text does
not fit on a row. Bob-->Alice: Checking with John...