-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMermaidSamples.txt
More file actions
152 lines (140 loc) · 2.8 KB
/
MermaidSamples.txt
File metadata and controls
152 lines (140 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
// flowchart
graph TD
A[Start] --> B{Is it working?}
B -->|Yes| C[Great! 🎉]
B -->|No| D[Debug 🔍]
C --> E[Deploy 🚀]
D --> B
style A fill:#e1f5fe
style C fill:#e8f5e8
style D fill:#fff3e0
style E fill:#f3e5f5
// flowchart
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Action 1]
B -->|No| D[Action 2]
C --> E[End]
D --> E
// sequence
sequenceDiagram
participant User
participant System
User->>System: Request data
System-->>User: Send data
User->>System: Process data
System-->>User: Confirmation
User->>System: Logout
sequenceDiagram
participant A as Alice
participant B as Bob
A->>B: Hello Bob, how are you?
B-->>A: Great!
A-)B: See you later!
// class
classDiagram
class Animal {
+String name
+int age
+makeSound()
}
class Dog {
+String breed
+bark()
}
Animal <|-- Dog
class Cat {
+String color
+meow()
}
Animal <|-- Cat
class Bird {
+String species
+fly()
}
Animal <|-- Bird
class Fish {
+String type
+swim()
}
Animal <|-- Fish
class Reptile {
+String habitat
+crawl()
}
Animal <|-- Reptile
class Insect {
+String wingspan
+buzz()
}
Animal <|-- Insect
// classDiagram
classDiagram
class User {
+String name
+String email
+login()
+logout()
}
class System {
+String systemName
+initialize()
+shutdown()
}
User --> System : interacts with
// stateDiagram
stateDiagram
[*] --> Idle
Idle --> Processing : start
Processing --> Completed : finish
Processing --> Error : fail
Completed --> Idle : reset
Error --> Idle : reset
// gantt
gantt
title Project Timeline
dateFormat YYYY-MM-DD
section Planning
Task 1 :a1, 2023-10-01, 30d
Task 2 :after a1, 20d
section Development
Task 3 :2023-11-01, 40d
Task 4 :after a3, 30d
section Testing
Task 5 :2024-01-01, 20d
Task 6 :after a5, 15d
gantt
title Project Timeline
dateFormat YYYY-MM-DD
section Planning
Research :a1, 2024-01-01, 30d
Design :a2, after a1, 20d
section Development
Implementation :a3, after a2, 45d
Testing :a4, after a3, 15d
// pie
pie
title Browser Usage
"Chrome": 45
"Firefox": 30
"Safari": 15
"Others": 10
# Now with config we can apply layouts and styling:-
---
config:
theme: forest
layout: elk
---
classDiagram
class User {
+String name
+String email
+login()
+logout()
}
class System {
+String systemName
+initialize()
+shutdown()
}
User --> System : interacts with