当前位置:网站首页>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

边栏推荐
- Building tin with point cloud
- 华为云OneMeeting告诉你全场景会议这么开!
- Installation and configuration of CGAL in PCL environment 5.4.1
- How does redis implement inventory deduction? How to prevent oversold?
- Matlab 2D or 3D triangulation
- Bayesian inference problem, MCMC and variational inference
- 论文笔记:Universal Value Function Approximators
- 释放互联网价值的 Web3
- Design of secsha system
- PCL calculation of center and radius of circumscribed circle of plane triangle
猜你喜欢

基于趋势和季节性的时间序列预测

【324. 摆动排序 II】

i人事HR系统上架企业微信ISV,增强企微在服务连锁零售等行业深度应用

R语言GLM广义线性模型:逻辑回归、泊松回归拟合小鼠临床试验数据(剂量和反应)示例和自测题

Win11底部状态栏如何换成黑色?Win11底部状态栏换黑色的方法
![return new int[]{i + 1, mid + 1};return {i + 1, mid + 1};](/img/6a/45a4494276deba72ef9833818229f5.png)
return new int[]{i + 1, mid + 1};return {i + 1, mid + 1};

On the first anniversary of the data security law, which four major changes are coming?

There are thousands of roads. Why did this innovative storage company choose this one?

Leetcode 周赛299

Markdown drawing Mermaid practical tutorial
随机推荐
数字藏品,万字长文,你想知道的大部分问题都讲清楚了从业者必看
Redis 如何实现库存扣减操作?如何防止商品被超卖?
Month on month SQL implementation
图神经网络入门 (GNN, GCN)
Number theory -- detailed proof of Euler function, sieve method for Euler function, Euler theorem and Fermat theorem
阿里开源(EasyExcel)
Why is it not enough to declare the structure alias when using the structure variable of other files in C language, and the proper name must be used? (cannot add struct when using alias)
math_ Proving common equivalent infinitesimal & Case & substitution
秋招经验分享 | 银行笔面试该怎么准备
return new int[]{i + 1, mid + 1}; return {i + 1, mid + 1};
return new int[]{i + 1, mid + 1};return {i + 1, mid + 1};
Rigid error: could not extract PIDs from PS output PIDS: [], Procs: [“bad pid
智能计算系统1 环境搭建
Constrained Delaunay triangulation in MATLAB
智能计算系统2 bangc算子开发的demo (CPU和MLU270的异构编程流程)
2280.Cupboards
NanoPC-T4(RK3399) game1 oled(I2C)显示时间天气温度
道路千万条,为什么这家创新存储公司会选这条?
H5 sunflower operation
Chunfeng power and Huawei work together to build a smart Park benchmark, and the future factory innovation will reach a new level