Mermaid is simple markdown-like script language for generating charts from text via javascript 1
TB/TD - top bottom
BT - bottom top
RL - right left
LR - left right
A node is single a box/entity
graph LR
id1
```mermaid
graph LR
id1
```
graph LR
id1[This is the text in the box]
```mermaid
graph LR
id1[This is the text in the box]
```
graph LR
id1(This is the text in the box)
```mermaid
graph LR
id1(This is the text in the box)
```
graph LR
id1((This is the text in the circle))
```mermaid
graph LR
id1((This is the text in the circle))
```
graph LR
id1>This is the text in the box]
```mermaid
graph LR
id1>This is the text in the box]
```
graph LR
id1{This is the text in the box}
```mermaid
graph LR
id1{This is the text in the box}
```
graph LR
A-->B
```mermaid
graph LR
A-->B
```
graph LR
A---B
```mermaid
graph LR
A---B
```
graph LR
A-- This is the text -->B
```mermaid
graph LR
A-- This is the text -->B
```
graph LR
A-- This is the text ---B
```mermaid
graph LR
A-- This is the text ---B
```
graph LR
A-.-B
```mermaid
graph LR
A-.-B
```
graph LR
A-.->B
```mermaid
graph LR
A-.->B
```
graph LR
A-. This is the text .-B
```mermaid
graph LR
A-. This is the text .-B
```
graph LR
A-. This is the text .->B
```mermaid
graph LR
A-. This is the text .->B
```
graph LR
A==>B
```mermaid
graph LR
A==>B
```
graph LR
A===B
```mermaid
graph LR
A===B
```
graph LR
A== This is the text ===B
```mermaid
graph LR
A== This is the text ===B
```
graph LR
A== This is the text ==>B
```mermaid
graph LR
A== This is the text ==>B
```
graph TD
A-->B
A-->C
B-->D
C-->D
```mermaid
graph TD
A-->B
A-->C
B-->D
C-->D
```
graph LR
A-->B
A-->C
B-->D
C-->D
```mermaid
graph LR
A-->B
A-->C
B-->D
C-->D
```
graph LR
A["A double quote:#quot;"] -->B["A dec char:#9829;"]
```mermaid
graph LR
A["A double quote:#quot;"] -->B["A dec char:#9829;"]
```
graph LR;
A-->B;
click A callback "Tooltip for a callback"
click B "http://www.github.com" "This is a tooltip for a link"
```mermaid
graph LR;
A-->B;
click A callback "Tooltip for a callback"
click B "http://www.github.com" "This is a tooltip for a link"
```
graph TD
B["fa:fa-twitter for peace"]
B-->C[fa:fa-ban forbidden]
B-->D(fa:fa-spinner)
B-->E(A fa:fa-camera-retro perhaps?)
```mermaid
graph TD
B["fa:fa-twitter for peace"]
B-->C[fa:fa-ban forbidden]
B-->D(fa:fa-spinner);
B-->E(A fa:fa-camera-retro perhaps?);
```
graph LR
A[Square Rect] -- Link text --> B((Circle))
A --> C(Round Rect)
B --> D{Rhombus}
C --> D
```mermaid
graph LR
A[Square Rect] -- Link text --> B((Circle))
A --> C(Round Rect)
B --> D{Rhombus}
C --> D
```
-> a solid line without arrow
--> a dotted line without arrow
->> a solid line with arrowhead
-->> a dotted line with arrowhead
-x a solid line with a cross at the end (async)
--x a dotted line with a cross at the end (async)
sequenceDiagram
participant John
participant Alice
Alice->>John: Hello John, how are you?
John-->>Alice: Great!
```mermaid
sequenceDiagram
participant John
participant Alice
Alice->>John: Hello John, how are you?
John-->>Alice: Great!
```
Footnotes
-
Github: https://github.com/knsv/mermaid ↩