You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/sequenceDiagram.md
+39-2
Original file line number
Diff line number
Diff line change
@@ -282,9 +282,46 @@ sequenceDiagram
282
282
John-->>Alice: Great!
283
283
```
284
284
285
+
## sequenceNumbers
286
+
287
+
It is possiebl to get a sequence number attached to each arrow in a sequence diagram. This can be configured when adding mermaid to the website as shown below:
288
+
```
289
+
<script>
290
+
mermaid.initialize({
291
+
sequence: { showSequenceNumbers: true },
292
+
});
293
+
</script>
294
+
```
295
+
296
+
It can also be be turned on via the diagram code as in the diagram:
297
+
```
298
+
sequenceDiagram
299
+
autonumber
300
+
Alice->>John: Hello John, how are you?
301
+
loop Healthcheck
302
+
John->>John: Fight against hypochondria
303
+
end
304
+
Note right of John: Rational thoughts!
305
+
John-->>Alice: Great!
306
+
John->>Bob: How about you?
307
+
Bob-->>John: Jolly good!
308
+
```
309
+
```mermaid
310
+
sequenceDiagram
311
+
autonumber
312
+
Alice->>John: Hello John, how are you?
313
+
loop Healthcheck
314
+
John->>John: Fight against hypochondria
315
+
end
316
+
Note right of John: Rational thoughts!
317
+
John-->>Alice: Great!
318
+
John->>Bob: How about you?
319
+
Bob-->>John: Jolly good!
320
+
```
321
+
285
322
## Styling
286
323
287
-
Styling of the a sequence diagram is done by defining a number of css classes. During rendering these classes are extracted from the file located at src/themes/sequence.scss
324
+
Styling of a sequence diagram is done by defining a number of css classes. During rendering these classes are extracted from the file located at src/themes/sequence.scss
288
325
289
326
### Classes used
290
327
@@ -414,5 +451,5 @@ mermaid.sequenceConfig = {
414
451
Param | Description | Default value
415
452
--- | --- | ---
416
453
mirrorActor | Turns on/off the rendering of actors below the diagram as well as above it | false
417
-
bottomMarginAdj | Adjusts how far down the graph ended. Wide borders styles with css could generate unwantewd clipping which is why this config param exists. | 1
454
+
bottomMarginAdj | Adjusts how far down the graph ended. Wide borders styles with css could generate unwanted clipping which is why this config param exists. | 1
0 commit comments