1、mermaid支持流程图,时序图和甘特图的脚本生成。
目前部分Markdown编辑器支持mermaid语法。

2、我们通过下面的例子一探mermaid的学习成本。

3、图表方向,如:
graph TD,从上至下

4、```mermaid
graph TD
client1-->|read / write|SVN((SVN server))
client2-->|read only|SVN
client3-->|read / write|SVN
client4-->|read only|SVN
client5(...)-->SVN
SVN---|store the data|sharedrive
```

5、```mermaid
```
是markdown语法,表示mermaid代码块。
SVN((SVN server))——表示这个节点形状是一个圆。
|read only|SVN——以这种方式添加节点之间的文本。
6、```mermaid
graph TD
subgraph SVN Architecture
client1-->|read / write|SVN((SVN server))
client2-->|read only|SVN
client3-->|read / write|SVN
client4-->|read only|SVN
client5(...)-->SVN
SVN---|store the data|sharedrive
end
```
使用subgraph和end关键字来区分子模块。

7、应该说学习成本很低,大家可以通过官网的例子马上就可以使用了。