领域专用语言(DSL)(Domain Specific Language)
DOT语言:图形描述语言
https://github.com/dreampuf/GraphvizOnline
Graphviz绘图:一款开源图形可视化软件
https://gitlab.com/graphviz/graphviz
https://graphviz.gitlab.io/about/
Graphviz 有 6 个引擎,分别是:
https://github.com/structurizr/dotnet
可以导出到PlantUML和 DGML
DGML是Directed Graph Markup Language的缩写,中文应该翻译为“有向图标记语言”。 DGML是微软在Visual Studio 2010中开始引入的一种完全符合XML格式语言,它主要是用来描述循环(cyclical)和非循环(acyclic)的有向图。有向图是由一系列的由边(link/edge)进行互联的节点(node)组成。
flowchat
Sequence
Mermaid
PlantUML
Diagrams: https://diagrams.mingrammer.com/
Structurizr DSL :https://structurizr.com/dsl https://github.com/structurizr/dsl
Asciidoctor Diagram:https://github.com/asciidoctor/asciidoctor-diagram
WebSequenceDiagrams: https://www.websequencediagrams.com/
ilograph:http://app.ilograph.com/
https://github.com/dundalek/markmap
https://markmap.js.org/docs/markmap
vs code: https://marketplace.visualstudio.com/items?itemName=gera2ld.markmap-vscode
demo:https://free-for-dev.wcoder.com/
<div class="markmap">
<script type="text/template">
---
markmap:
maxWidth: 300
colorFreezeLevel: 2
---
# markmap
## Links
- <https://markmap.js.org/>
- [GitHub](https://github.com/markmap/markmap)
## Related
- [coc-markmap](https://github.com/markmap/coc-markmap)
- [gatsby-remark-markmap](https://github.com/markmap/gatsby-remark-markmap)
## Features
- links
- **inline** ~~text~~ *styles*
- multiline
text
- `inline code`
- Katex - $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$
- This is a very very very very very very very very very very very very very very very long line.
</script>
</div>```
### flowchart.js
```flow
st=>start: 开始
e=>end: 结束
op=>operation: 操作
sub=>subroutine: 子程序
cond=>condition: 是或者不是?
io=>inputoutput: 输出
st(right)->op->cond
cond(yes)->io(right)->e
cond(no)->sub(right)->op
st=>start: Start
e=>end: End
op1=>operation: My Operation
op2=>operation: Stuff
sub1=>subroutine: My Subroutine
cond=>condition: Yes
or No?
c2=>condition: Good idea
io=>inputoutput: catch something...
st->op1(right)->cond
cond(yes, right)->c2
cond(no)->sub1(left)->op1
c2(yes)->io->e
c2(no)->op2->e
graph TD; A-->B; A-->C; B-->D; C-->D;
顺序图
sequenceDiagram participant Alice participant Bob Alice->>John: Hello John, how are you? loop Healthcheck John->>John: Fight against hypochondria end Note right of John: Rational thoughts <br/>prevail! John-->>Alice: Great! John->>Bob: How about you? Bob-->>John: Jolly good!
甘特图
gantt dateFormat YYYY-MM-DD title Adding GANTT diagram to mermaid excludes weekdays 2014-01-10 section A section Completed task :done, des1, 2014-01-06,2014-01-08 Active task :active, des2, 2014-01-09, 3d Future task : des3, after des2, 5d Future task2 : des4, after des3, 5d
类图-:实验性
classDiagram Class01 <|-- AveryLongClass : Cool Class03 *-- Class04 Class05 o-- Class06 Class07 .. Class08 Class09 --> C2 : Where am i? Class09 --* C3 Class09 --|> Class07 Class07 : equals() Class07 : Object[] elementData Class01 : size() Class01 : int chimp Class01 : int gorilla Class08 <--> C2: Cool label
总结来说js-sequence模块对sequence代码的语法解析执行过程如下图
title: 序列图sequence(示例)
participant A
participant B
participant C
note left of A: A左侧说明
note over B: 覆盖B的说明
note right of C: C右侧说明
A->A:自己到自己
A->B:实线实箭头
A-->C:虚线实箭头
B->>C:实线虚箭头
B-->>A:虚线虚箭头
颜回->孔子: 吃饭了没?
note right of 孔子: 孔子思考\n如何回答
孔子-->颜回: 吃过了。你咧?
颜回->>孔子: 吃过了,吃过了!