Flow Chart
A node (default)
---
title: Node
---
%% meta, title: title of diagram, on this example, Node
flowchart LR
id
%% flowchart: Diagram type
%% LR: Direction (Left to Right)
%% Other Option:
%% TB - Top to bottom
%% TD - Top-down/ same as top to bottom
%% BT - Bottom to top
%% RL - Right to left
%% LR - Left to right
%% id : displayed textMermaid
๋ณต์ฌ
A node with text
---
title: Node with text
---
flowchart LR
id1[This is the text in the box]
%% id1 get a text in square bracketMermaid
๋ณต์ฌ
Unicode text
flowchart LR
id["This โค Unicode"]
%% Without double quote, raise errorMermaid
๋ณต์ฌ
%%{init: {"flowchart": {"htmlLabels": false}} }%%
flowchart LR
markdown["`This **is** _Markdown_`"]
newLines["`Line1
Line 2
Line 3`"]
markdown --> newLines
%% Use double quotes and backticks "` text `" to enclose the markdown text.Mermaid
๋ณต์ฌ
Node shapes
flowchart LR
id1(This is the text in the box)
%% A node with round edges
id2([This is the text in the box])
%% A stadium-shaped node
id3[[This is the text in the box]]
%% A node in a subroutine shape
id4[(Database)]
%% A node in a cylindrical shape
id5((This is the text in the circle))
%% A node in the form of a circle
id6{This is the text in the box}
%% A node (rhombus)
Mermaid
๋ณต์ฌ
Links between nodes
flowchart LR
A[this is A]
B{this is B}
C[this is C]
D{this is D}
E[this is E]
F{this is F}
G[this is G]
H{this is H}
A --> B
B --- C
D -.->|D to E|E
E ==> |E to F| F
G ~~~ H
G & H --> A & BMermaid
๋ณต์ฌ
Subgraphs
flowchart TB
c1---->a2
subgraph 1[this is one]
a1-...->a2
end
subgraph two
direction RL
b1====>b2
end
subgraph Three
c1-->c2
end
1 ==> two
Mermaid
๋ณต์ฌ
Styling ์ถ๊ฐํ๊ธฐ
%% Styling line curves
flowchart LR
A:::someclass --> B:::someclass2
linkStyle 0 stroke:blue;
classDef someclass fill:#f96, color:red, stroke:#f0f, stroke-width:10px
%% link can be seleted by order index(started from 0)
%% fill bg
%% color test color
%% stroke line color
%% stroke-width
classDef someclass2 fill:#f96
Mermaid
๋ณต์ฌ
flowchart LR
id1(Start)-->id2(Stop)
style id1 fill:#f9f,stroke:#333,stroke-width:4px
style id2 fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray:Mermaid
๋ณต์ฌ
