mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-10 19:09:44 +02:00
chore: Add treemap example
This commit is contained in:
21
packages/examples/src/examples/treemap.ts
Normal file
21
packages/examples/src/examples/treemap.ts
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import type { DiagramMetadata } from '../types.js';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
id: 'treemap',
|
||||||
|
name: 'Treemap',
|
||||||
|
description: 'Visualize hierarchical data as nested rectangles',
|
||||||
|
examples: [
|
||||||
|
{
|
||||||
|
title: 'Treemap',
|
||||||
|
isDefault: true,
|
||||||
|
code: `treemap-beta
|
||||||
|
"Section 1"
|
||||||
|
"Leaf 1.1": 12
|
||||||
|
"Section 1.2"
|
||||||
|
"Leaf 1.2.1": 12
|
||||||
|
"Section 2"
|
||||||
|
"Leaf 2.1": 20
|
||||||
|
"Leaf 2.2": 25`,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
} satisfies DiagramMetadata;
|
Reference in New Issue
Block a user