| 1 | <!doctype html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="utf-8" /> |
| 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
| 6 | <title>Mermaid Quick Test Page</title> |
| 7 | <link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=" /> |
| 8 | <style> |
| 9 | div.mermaid { |
| 10 | font-family: 'Courier New', Courier, monospace !important; |
| 11 | } |
| 12 | </style> |
| 13 | </head> |
| 14 | |
| 15 | <body> |
| 16 | <h1>Pie chart demos</h1> |
| 17 | <pre class="mermaid"> |
| 18 | pie title Default text position: Animal adoption |
| 19 | accTitle: simple pie char demo |
| 20 | accDescr: pie chart with 3 sections: dogs, cats, rats. Most are dogs. |
| 21 | "Dogs": 386 |
| 22 | "Cats": 85 |
| 23 | "Rats": 15 |
| 24 | </pre> |
| 25 | |
| 26 | <hr /> |
| 27 | <pre class="mermaid"> |
| 28 | %%{init: {"pie": {"textPosition": 0.9}, "themeVariables": {"pieOuterStrokeWidth": "5px"}}}%% |
| 29 | pie |
| 30 | title Offset labels close to border: Product X |
| 31 | accTitle: Key elements in Product X |
| 32 | accDescr: This is a pie chart showing the key elements in Product X. |
| 33 | "Calcium": 42.96 |
| 34 | "Potassium": 50.05 |
| 35 | "Magnesium": 10.01 |
| 36 | "Iron": 5 |
| 37 | </pre> |
| 38 | |
| 39 | <pre class="mermaid"> |
| 40 | %%{init: {"pie": {"textPosition": 0.45}, "themeVariables": {"pieOuterStrokeWidth": "5px"}}}%% |
| 41 | pie |
| 42 | title Centralized labels: Languages |
| 43 | accTitle: Key elements in Product X |
| 44 | accDescr: This is a pie chart showing the key elements in Product X. |
| 45 | "JavaScript": 30 |
| 46 | "Python": 25 |
| 47 | "Java": 20 |
| 48 | "C#": 15 |
| 49 | "Others": 10 |
| 50 | </pre> |
| 51 | |
| 52 | <script type="module"> |
| 53 | import mermaid from '/mermaid.esm.mjs'; |
| 54 | mermaid.initialize({ |
| 55 | theme: 'forest', |
| 56 | logLevel: 3, |
| 57 | securityLevel: 'loose', |
| 58 | }); |
| 59 | </script> |
| 60 | </body> |
| 61 | </html> |
| 62 | |