cheatsheet / current

Treemap

Use Mermaid treemap-beta to show hierarchical categories sized by value.

Treemap

Use Mermaid treemap-beta to show hierarchical categories sized by value.

Basic template

treemap-beta
    "Root"
        "Category A" : 40
        "Category B" : 60

Core syntax

  • Start with treemap-beta
  • Use indentation for hierarchy
  • Assign values with "Label" : number
  • Parent nodes can contain child nodes

Common example

treemap-beta
    "Technology Spend"
        "Cloud" : 45
        "Licensing" : 25
        "Contractors" : 15
        "Training" : 5
        "Hardware"
            "Laptops" : 6
            "Peripherals" : 4

Good for

  • Budget breakdowns
  • Portfolio composition
  • Category-heavy datasets

Watch for

  • Treemaps are better for relative area than exact number reading
  • Keep the hierarchy shallow if you want a readable result