Mermaid and flow create diagrams.
Mermaid
Pie
Start with
```mermaid
. Three elements:- type:
pie
- title: no ‘:’
- content and number
- type:
Codes
1 | ```mermaid |
- Result
Gantt
Start with
```mermaid
. Four elements:type:
gantt
title: no ‘:’ after ‘title’
dataFormat: no ‘:’ after ‘dataFormat’
section: no ‘:’ after ‘section’
task name: no space after ‘task:’
state: 4states
state meaning done did/have done active be doing blank be to do crit important task id
starting date
ending date/length
Code
1 | ```mermaid |
- Result
Flowchart
Shape
Variable shapes with different symbols.
1 | ```mermaid |
Ralations from top to bottom
Variable connecting types with different points, lines and arrows.
1 | ``` mermaid |
Relations from left to right
1 | ```mermaid |
Example
- example of binary tree (bt)
Take DLR of bt as an example.In this tree diagram, the uppercase means different nodes of binary tree. The number means order of traversing. Circles with “none” mean there’s nothing, just to adjust the position of left and right nodes.
1 | ```mermaid |
- example of flowchart
1 | ```mermaid |
We can see that mermaid has some limits when make charts through above example. For instance, it can’t create specific left and right node of tree. It looks good with common flowchart but seems a little weird with algorithm flowchart. Here’s another method to draw a flowchart with syntax and structure of flow in the following section.
Flow
Elements include start, inputoutput, operation, condition and end, see above.
syntax:
DefName=>keyword: text description
defName1->Defname2
CondName(yes/no)->Defname
1 | ```flow |