当前位置:网站首页>Markdown Mermaid planting grass (1)_ Introduction to Mermaid
Markdown Mermaid planting grass (1)_ Introduction to Mermaid
2022-06-28 19:42:00 【CarnivoreRabbit】
Markdown mermaid Want to buy (1)_ mermaid brief introduction
List of articles
1 Why recommend mermaid
Ben Xiaobai has been infatuated with markdown And markdown Related tools . Maybe it's because the genuine programming skills can't be learned , You can only learn this to add to the icing on the cake (zhuangbility) The technique of . To make fun of , Good notes, good presentation , It can contribute to the learning effect .
Markdown What about language , It can be said to be a friend of programmers . Whether it's github Or what you are looking at now CSDN, And various note taking products , Both support this graphic and textual editing format . Ben Xiaobai first recommends one that everyone recommends markdown Artifact typora, This product is currently used by me markdown The main product of language , After experiencing several online editors and several note taking software , I still think typora It is the local end markdown The best solution of the editor ( Ben Xiaobai's personal opinion , Expert light spray ).
Get down to business , Let's talk about the main character of this article mermaid. Ben Xiaobai thought ,markdown Only in the text 、 The table level is wonderful , Until recently, I happened to find mermaid This markdown The additive artifact of language .
so to speak ,mermaid It basically meets the editing needs of programmers for commonly used charts in their work . To this point , It is worthy of Ben Xiaobai's recommendation .
2 mermaid brief introduction
Go to the previous one directly mermaid The home page of :mermaid Portal .
mermaid The following types of graphical rendering are currently available :
| Number | English title | Chinese title |
|---|---|---|
| 1 | Flowchart | flow chart |
| 2 | Sequence Diagram | Sequence diagram |
| 3 | Class Diagram | Class diagram |
| 4 | State Diagram | State diagram |
| 5 | Entity Relationship Diagram | Entity relation diagram |
| 6 | User Journey | Laundry list |
| 7 | Gantt | Gantt Chart |
| 8 | Pie Chart | The pie chart |
Mermaid lets you represent diagrams using text and code.
mermaid The goal is to allow you to use a text editor and code to draw diagrams . OK, Since it's a profile , Let's give an example of each diagram ( The following example is excerpted from , No copyright protection ):
thank CSDN Support mermaid Most drawings of , But Gantt chart is not supported ???
2.1 flow chart
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
2.2 Sequence diagram
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!
2.3 Class diagram
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
2.4 State diagram
stateDiagram-v2
state fork_state <<fork>>
[*] --> fork_state
fork_state --> State2
fork_state --> State3
state join_state <<join>>
State2 --> join_state
State3 --> join_state
join_state --> State4
State4 --> [*]
2.5 Entity relation diagram (ER chart )
erDiagram
CUSTOMER ||--o{
ORDER : places
ORDER ||--|{
LINE-ITEM : contains
CUSTOMER }|..|{
DELIVERY-ADDRESS : uses
2.6 User experience map
journey
title My working day
section Go to work
Make tea: 5: Me
Go upstairs: 3: Me
Do work: 1: Me, Cat
section Go home
Go downstairs: 5: Me
Sit down: 5: Me
2.7 Gantt Chart
gantt
dateFormat YYYY-MM-DD
axisFormat %m-%d
title Adding GANTT diagram to mermaid
excludes weekdays 2021-01-10
section A section
Completed task :done, des1, 2021-01-16,2021-01-28
Active task :active, des2, 2021-01-29, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d

2.8 The pie chart
pie
title Key elements in Product X
"Calcium" : 42.96
"Potassium" : 50.05
"Magnesium" : 10.01
"Iron" : 5

边栏推荐
- 国内有正规安全的外汇交易商吗?
- Parallax JS special effect JS carousel map plug-in
- return new int[]{i + 1, mid + 1}; return {i + 1, mid + 1};
- 2280.Cupboards
- Facts / assertions / assertions / conclusions / assertions / judgments
- 行业分析| 快对讲,楼宇对讲
- 直播app系统源码,动态遇到视频时开始自动播放
- Month on month SQL implementation
- 【324. 摆动排序 II】
- The white paper on the panorama of the digital economy and the digitalization of consumer finance were released
猜你喜欢

Autumn recruitment experience sharing | how to prepare for bank interview

论文阅读:Duplex Contextual Relation Network for Polyp Segmentation

Variational graph auto-encoders (VGAE)

How to change the status bar at the bottom of win11 to black? How to change the status bar at the bottom of win11 to black

视差js特效js轮播图插件

论文3 VScode&texlive&SumatraPDF打造完美书写论文工具

Installation and configuration of CGAL in PCL environment 5.4.1

I. The HR system is put on the enterprise wechat ISV to enhance the in-depth application of enterprise wechat in service chain retail and other industries

H5 sunflower operation

基于趋势和季节性的时间序列预测
随机推荐
大火的虚拟人在哪些产业开始发力?
1002_ twenty million one hundred and eighty-one thousand and nineteen
颜色渐变的FontAwesome图标
R语言GLM广义线性模型:逻辑回归、泊松回归拟合小鼠临床试验数据(剂量和反应)示例和自测题
pd. Difference between before and after cut interval parameter setting
Building tin with point cloud
数字经济专家高泽龙:映客更名映宇宙,元宇宙会成为映客下一个增长引擎吗?
为什么C语言用使用其他文件的结构体变量时,声明结构体别名还不行,必须使用本名?(使用别名时不能加struct)
Variational graph auto-encoders (VGAE)
Bayesian inference problem, MCMC and variational inference
释放互联网价值的 Web3
I just bought the ADB MySQL service. Every time I do an operation, such as creating a table, this problem will pop up. What is the problem?
华为云OneMeeting告诉你全场景会议这么开!
Leetcode 周赛299
图神经网络入门 (GNN, GCN)
Win11底部状态栏如何换成黑色?Win11底部状态栏换黑色的方法
深度学习需要多强的数学基础?
G biaxial graph SQL script
math_证明常用等价无穷小&案例&代换
Markdown drawing Mermaid practical tutorial