You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For more information, see the [Mermaid release notes](https://github.com/mermaid-js/mermaid/releases).
901
904
@@ -1125,6 +1128,89 @@ Here's the published view of the requirements diagram:
1125
1128
1126
1129
:::image type="content" source="media/wiki/wiki-mermaid-requirements-diagram.png" alt-text="Screenshot of the Mermaid Live Editor with the code for a requirements diagram and a preview of the published view." lightbox="media/wiki/wiki-mermaid-requirements-diagram.png":::
1127
1130
1131
+
#### Example: Gitgraph diagram
1132
+
1133
+
A git graph diagram (type `gitGraph`) is used to visualize Git operations like commits, branches, and merges.
1134
+
1135
+
The following example shows how to add a git graph diagram to a wiki page:
1136
+
1137
+
```md
1138
+
::: mermaid
1139
+
gitGraph
1140
+
commit id: "Initial commit"
1141
+
branch develop
1142
+
commit id: "Develop commit 1"
1143
+
commit id: "Develop commit 2"
1144
+
checkout main
1145
+
commit id: "Main commit 1"
1146
+
merge develop id: "Merge develop into main"
1147
+
branch feature
1148
+
checkout feature
1149
+
commit id: "Feature commit 1"
1150
+
checkout develop
1151
+
commit id: "Develop commit 3"
1152
+
checkout feature
1153
+
merge develop id: "Merge develop into feature"
1154
+
:::
1155
+
```
1156
+
1157
+
Here's the published view of the git graph diagram:
1158
+
1159
+
:::image type="content" source="media/wiki/wiki-mermaid-git-graph-diagram.png" alt-text="Screenshot of the Mermaid Live Editor with the code for a git graph diagram and a preview of the published view." lightbox="media/wiki/wiki-mermaid-git-graph-diagram.png":::
1160
+
1161
+
#### Example: Entity Relationship diagram
1162
+
1163
+
An entity relationship diagram (type `erDiagram`) is used to model the relationships between entities in a system, such as a database or an application. These diagrams help in understanding and designing the structure of data and its interrelationships.
1164
+
1165
+
The following example shows how to add an entity relationship diagram to a wiki page:
1166
+
1167
+
```md
1168
+
::: mermaid
1169
+
erDiagram
1170
+
CUSTOMER {
1171
+
string name
1172
+
string address
1173
+
}
1174
+
ORDER {
1175
+
int orderNumber
1176
+
string product
1177
+
}
1178
+
CUSTOMER ||--o{ ORDER : places
1179
+
:::
1180
+
```
1181
+
1182
+
Here's the published view of the entity relationship diagram:
1183
+
1184
+
:::image type="content" source="media/wiki/wiki-mermaid-entity-relationship-diagram.png" alt-text="Screenshot of the Mermaid Live Editor with the code for an entity relationship diagram and a preview of the published view." lightbox="media/wiki/wiki-mermaid-entity-relationship-diagram.png":::
1185
+
1186
+
#### Example: Timeline diagram
1187
+
1188
+
A timeline diagram (type `timeline`) is used to visualize events in chronological order, making it easier to track progress or historical events.
1189
+
1190
+
The following example shows how to add a Timeline diagram to a wiki page:
1191
+
1192
+
```md
1193
+
::: mermaid
1194
+
timeline
1195
+
title Project Development Timeline
1196
+
section Planning
1197
+
Project kickoff : 2025-01-01
1198
+
Requirements gathering : 2025-01-15
1199
+
section Development
1200
+
Initial development : 2025-02-01
1201
+
First prototype : 2025-03-01
1202
+
section Testing
1203
+
Alpha testing : 2025-04-01
1204
+
Beta testing : 2025-05-01
1205
+
section Release
1206
+
Public release : 2025-06-01
1207
+
:::
1208
+
```
1209
+
1210
+
Here's the published view of the timeline diagram:
1211
+
1212
+
:::image type="content" source="media/wiki/wiki-mermaid-timeline-diagram.png" alt-text="Screenshot of the Mermaid Live Editor with the code for a timeline diagram and a preview of the published view." lightbox="media/wiki/wiki-mermaid-timeline-diagram.png":::
0 commit comments