graph TB
graph BT
graph RL
graph LR
```mermaid
graph TB
A[方形A] -->|单线&箭头|B(圆角B)
B ---|单线&无箭头| C((圆C))
C --线文字&无箭头--> D>旗帜结点D]
C ==粗线&箭头_样式1==>E{菱形E}
C ==> |粗线&箭头_样式2| F{菱形F}
F -.- |虚线&无箭头|G[方形G]
E -.-> |虚线&箭头|G[方形G]
G --> |单线&箭头|H[/平行四边形H/]
B --> |单线&箭头|I[/正梯形I\]
I --> |单线&箭头|J[[子例形J]]
J --> |单线&箭头|K[(圆柱形K)]
K -.- |虚线&无箭头|L([跑场形K])
D -.-> |虚线&箭头|M
M ==> |粗线&箭头|N[\倒梯形N/]
```
```mermaid
graph BT
A[方形A] -->|单线&箭头|B(圆角B)
B ---|单线&无箭头| C((圆C))
C --线文字&无箭头--> D>旗帜结点D]
C ==粗线&箭头_样式1==>E{菱形E}
C ==> |粗线&箭头_样式2| F{菱形F}
F -.- |虚线&无箭头|G[方形G]
E -.-> |虚线&箭头|G[方形G]
G --> |单线&箭头|H[/平行四边形H/]
B --> |单线&箭头|I[/正梯形I\]
I --> |单线&箭头|J[[子例形J]]
J --> |单线&箭头|K[(圆柱形K)]
K -.- |虚线&无箭头|L([跑场形K])
D -.-> |虚线&箭头|M
M ==> |粗线&箭头|N[\倒梯形N/]
```
```mermaid
graph RL
A[方形A] -->|单线&箭头|B(圆角B)
B ---|单线&无箭头| C((圆C))
C --线文字&无箭头--> D>旗帜结点D]
C ==粗线&箭头_样式1==>E{菱形E}
C ==> |粗线&箭头_样式2| F{菱形F}
F -.- |虚线&无箭头|G[方形G]
E -.-> |虚线&箭头|G[方形G]
G --> |单线&箭头|H[/平行四边形H/]
B --> |单线&箭头|I[/正梯形I\]
I --> |单线&箭头|J[[子例形J]]
J --> |单线&箭头|K[(圆柱形K)]
K -.- |虚线&无箭头|L([跑场形K])
D -.-> |虚线&箭头|M
M ==> |粗线&箭头|N[\倒梯形N/]
```
```mermaid
graph LR
A[方形A] -->|单线&箭头|B(圆角B)
B ---|单线&无箭头| C((圆C))
C --线文字&无箭头--> D>旗帜结点D]
C ==粗线&箭头_样式1==>E{菱形E}
C ==> |粗线&箭头_样式2| F{菱形F}
F -.- |虚线&无箭头|G[方形G]
E -.-> |虚线&箭头|G[方形G]
G --> |单线&箭头|H[/平行四边形H/]
B --> |单线&箭头|I[/正梯形I\]
I --> |单线&箭头|J[[子例形J]]
J --> |单线&箭头|K[(圆柱形K)]
K -.- |虚线&无箭头|L([跑场形K])
D -.-> |虚线&箭头|M
M ==> |粗线&箭头|N[\倒梯形N/]
```
```mermaid
graph LR
A[方形] -->|提示|B(圆角)
B --> C{条件a}
C -->|a=1| D[结果1]
C -->|a=2| E[结果2]
F[横向流程图]
```
```mermaid
graph LR;
client---core;
client---common;
core---common;
common---portal;
common---Biz;
Biz---ConfigService;
Biz---AdminService;
```
```mermaid
%% 时序图例子,-> 直线,-->虚线,->>实线箭头
sequenceDiagram
participant 张三
participant 李四
张三->王五: 王五你好吗?
loop 健康检查
王五->王五: 与疾病战斗
end
Note right of 王五: 合理 食物 <br/>看医生...
李四-->>张三: 很好!
王五->李四: 你怎么样?
李四-->王五: 很好!
```
```mermaid
sequenceDiagram
participant Alice
participant Bob
Alice->>John:hello John
loop healthcheck
John-->>John:fight against
end
Note right of John:rational
John->>Alice:great!
John->>Bob:how about you
Bob->>John:good!
```
```mermaid
%% 语法示例
gantt
dateFormat YYYY-MM-DD
title 软件开发甘特图
section 设计
需求 :done, des1, 2014-01-06,2014-01-08
原型 :active, des2, 2014-01-09, 3d
UI设计 : des3, after des2, 5d
未来任务 : des4, after des3, 5d
section 开发
学习准备理解需求 :crit, done, 2014-01-06,24h
设计框架 :crit, done, after des2, 2d
开发 :crit, active, 3d
未来任务 :crit, 5d
耍 :2d
section 测试
功能测试 :active, a1, after des3, 3d
压力测试 :after a1 , 20h
测试报告 : 48h
```
```mermaid
classDiagram
Animal <|-- Duck
Animal <|-- Fish
Animal <|-- Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
```
```mermaid
stateDiagram
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
```
```mermaid
pie
title Pie Chart
"Dogs" : 386
"Cats" : 85
"Rats" : 150
```
```mermaid
gitGraph:
options
{
"nodeSpacing": 150,
"nodeRadius": 10
}
end
commit
branch newbranch
checkout newbranch
commit
commit
checkout master
commit
commit
merge newbranch
gitGraph:
options
{
"nodeSpacing": 150,
"nodeRadius": 10
}
end
commit
branch newbranch
checkout newbranch
commit
commit
checkout master
commit
commit
merge newbranch
```
```flow
st=>start: 开始框
op=>operation: 处理框
cond=>condition: 判断框
(是或否?)
sub1=>subroutine: 子
流
程
io=>inputoutput: 输入输出框
e=>end: 结束框
st(right)->op(right)->cond
cond(yes)->io(bottom)->e
cond(no)->sub1(right)->op
```