1.7 KB76 lines
Blame
1<!doctype html>
2<html lang="en">
3 <head>
4 <meta charset="utf-8" />
5 <meta name="viewport" content="width=device-width, initial-scale=1" />
6 <title>Mermaid Treemap Diagram Demo</title>
7 <link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" />
8 <style>
9 body {
10 font-family: 'Montserrat', sans-serif;
11 margin: 0 auto;
12 max-width: 900px;
13 padding: 20px;
14 }
15 .mermaid {
16 margin: 30px 0;
17 }
18 h1,
19 h2 {
20 color: #333;
21 }
22 pre {
23 background-color: #f5f5f5;
24 padding: 15px;
25 border-radius: 5px;
26 }
27 </style>
28 </head>
29 <body>
30 <h1>Treemap Diagram Demo</h1>
31 <p>This is a demo of the new treemap diagram type in Mermaid.</p>
32
33 <h2>Basic Treemap Example</h2>
34 <pre class="mermaid">
35treemap
36 "Root"
37 "Branch 1"
38 "Leaf 1.1": 10
39 "Leaf 1.2": 15
40 "Branch 2"
41 "Branch 2.1"
42 "Leaf 2.1.1": 20
43 "Leaf 2.1.2": 25
44 "Leaf 2.2": 25
45 "Leaf 2.3": 30
46 </pre>
47
48 <h2>Technology Stack Treemap Example</h2>
49 <pre class="mermaid">
50treemap
51 "Technology Stack"
52 "Frontend"
53 "React": 35
54 "CSS": 15
55 "HTML": 10
56 "Backend"
57 "Node.js": 25
58 "Express": 10
59 "MongoDB": 15
60 "DevOps"
61 "Docker": 10
62 "Kubernetes": 15
63 "CI/CD": 5
64 </pre>
65
66 <script type="module">
67 import mermaid from './mermaid.esm.mjs';
68 mermaid.initialize({
69 theme: 'forest',
70 logLevel: 1,
71 securityLevel: 'loose',
72 });
73 </script>
74 </body>
75</html>
76