☰
Current Page
Main Menu
Home
Home
Editing mermaid
Edit
Preview
H1
H2
H3
default
Set your preferred keybinding
default
vim
emacs
markdown
Set this page's format to
Markdown
Plain Text
Pod
RDoc
reStructuredText
Rendering unavailable for
AsciiDoc
BibTeX
Creole
MediaWiki
Org-mode
Textile
Help 1
Help 1
Help 1
Help 2
Help 3
Help 4
Help 5
Help 6
Help 7
Help 8
Autosaved text is available. Click the button to restore it.
Restore Text
[[_TOC_]] [Cheat sheet](https://jojozhuang.github.io/tutorial/mermaid-cheat-sheet/) [mermaid play ground](https://www.mermaidchart.com/play) # Examples ## Flowchart # ```mermaid flowchart LR A[Hard] -->|Text| B(Round) B --> C{Decision} C -->|One| D[Result 1] C -->|Two| E[Result 2] ``` ## Sequence diagram ```mermaid sequenceDiagram Alice->>John: Hello John, how are you? loop HealthCheck John->>John: Fight against hypochondria end Note right of John: Rational thoughts! John-->>Alice: Great! John->>Bob: How about you? Bob-->>John: Jolly good! ``` ## Gant Chart ```mermaid gantt section Section Completed :done, des1, 2014-01-06,2014-01-08 Active :active, des2, 2014-01-07, 3d Parallel 1 : des3, after des1, 1d Parallel 2 : des4, after des1, 1d Parallel 3 : des5, after des3, 1d Parallel 4 : des6, after des4, 1d ``` ## Class Diagram ```mermaid classDiagram Class01 <|-- AveryLongClass : Cool <<Interface>> Class01 Class09 --> C2 : Where am I? Class09 --* C3 Class09 --|> Class07 Class07 : equals() Class07 : Object[] elementData Class01 : size() Class01 : int chimp Class01 : int gorilla class Class10 { <<service>> int id size() } ``` ## State diagram ```mermaid stateDiagram-v2 [*] --> Still Still --> [*] Still --> Moving Moving --> Still Moving --> Crash Crash --> [*] ``` ## Pie chart ```mermaid pie "Dogs" : 386 "Cats" : 85.9 "Rats" : 15 ``` ## Bar chart ```mermaid gantt title Git Issues - days since last update dateFormat X axisFormat %s section Issue19062 71 : 0, 71 section Issue19401 36 : 0, 36 section Issue193 34 : 0, 34 section Issue7441 9 : 0, 9 section Issue1300 5 : 0, 5 ``` ## User Journey diagram ```mermaid 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: 3: Me ``` ## C4 diagram ```mermaid C4Context title System Context diagram for Internet Banking System Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.") Person(customerB, "Banking Customer B") Person_Ext(customerC, "Banking Customer C") System(SystemAA, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.") Person(customerD, "Banking Customer D", "A customer of the bank, <br/> with personal bank accounts.") Enterprise_Boundary(b1, "BankBoundary") { SystemDb_Ext(SystemE, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.") System_Boundary(b2, "BankBoundary2") { System(SystemA, "Banking System A") System(SystemB, "Banking System B", "A system of the bank, with personal bank accounts.") } System_Ext(SystemC, "E-mail system", "The internal Microsoft Exchange e-mail system.") SystemDb(SystemD, "Banking System D Database", "A system of the bank, with personal bank accounts.") Boundary(b3, "BankBoundary3", "boundary") { SystemQueue(SystemF, "Banking System F Queue", "A system of the bank, with personal bank accounts.") SystemQueue_Ext(SystemG, "Banking System G Queue", "A system of the bank, with personal bank accounts.") } } BiRel(customerA, SystemAA, "Uses") BiRel(SystemAA, SystemE, "Uses") Rel(SystemAA, SystemC, "Sends e-mails", "SMTP") Rel(SystemC, customerA, "Sends e-mails to") ``` ## XY-Chart ```mermaid xychart-beta title "Marktperformance 2025: Monatliche Trends (Indexierte Werte)" x-axis ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"] y-axis "Performance (Start = 100)" %% Daten basieren auf realen 2025-Trends: %% Silber: Top Performer (+147-149% im Jahr) line [105, 115, 130, 150, 165, 180, 200, 215, 230, 240, 245, 249] %% Gold: Starkes Jahr (+60-65%), Peak im Dezember bei ca. $4.550 line [108, 112, 110, 118, 125, 130, 135, 142, 148, 155, 158, 165] %% S&P 500: Solides Wachstum (+16,4%), Tech-getrieben line [103, 105, 104, 102, 107, 109, 111, 113, 114, 115, 116, 116.4] %% Bitcoin: Volatil, Allzeithoch im Okt (ca. $104k), Korrektur im Dez (ca. $87k) line [111, 105, 83, 75, 91, 92, 103, 102, 98, 115, 92, 97] %% Western Digital (WDC) - Top Aktie, +261% line [100, 105, 120, 145, 160, 180, 210, 230, 250, 280, 310, 361] %% SVS Baker Steel Fund - Top Fonds, +171% line [100, 110, 125, 135, 140, 150, 160, 175, 190, 210, 230, 271] %% Micron Tech (MU) - Zweitbeste Aktie, +178% (basierend auf Jan-Dez Preis) line [100, 105, 118, 130, 145, 160, 180, 200, 220, 260, 300, 320] %% Bitcoin (BTC) - Top Krypto, +16% (moderat im Gesamtbild) line [100, 103, 102, 98, 105, 108, 110, 107, 112, 120, 105, 116] %% WTI Crude Oil (Rohöl) - Verlierer, -19% line [100, 98, 92, 86, 84, 90, 95, 90, 88, 85, 83, 81] ``` ```mermaid xychart-beta title "Volatilitäts-Vergleich 2025: Micro-Caps vs. Markt (Kumulativ in %)" x-axis ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"] y-axis "Kumulative Rendite in %" %% Micro-Cap Aktie (Stellvertretend für spekulative Peaks: +800% Peak, Crash am Ende) line [10, 50, 250, 450, 800, 600, 400, 300, 550, 700, 350, 150] %% Silber: Top Rohstoff (+149% Jahresschluss) line [5, 12, 25, 45, 60, 75, 85, 105, 125, 135, 145, 149] %% Kakao: Agrar-Volatilität (+163% Peak, dann Korrektur) line [15, 45, 100, 163, 150, 120, 90, 80, 75, 70, 72, 70] %% Bitcoin: Krypto-Leader (Peak Okt, Korrektur Dez) line [12, 15, -5, -8, 20, 45, 60, 75, 90, 102, 40, 18] %% S&P 500: Benchmark zum Vergleich (+16.4%) line [2, 1, -4, -5, 1, 6, 8, 10, 14, 16, 17, 16] ``` xychart-beta ## XY-Chart horizontal ```mermaid xychart-beta horizontal title "Sales Revenue" x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec] y-axis "Revenue (in $)" 4000 --> 11000 bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000] line [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000] ``` ## Block diagram ```mermaid block-beta columns 5 A B C D:2 E:4 F G:2 H:3 ```
Uploading file...
Edit message:
Cancel