# Treemap Visualization Guide

**Component Reference:** Treemap or @splunk/visualizations/Treemap

## Overview

A treemap visualization displays hierarchical data as nested rectangles sized by a numeric value. Each level of the hierarchy is subdivided into smaller rectangles, making it easy to compare how categories and subcategories contribute to the whole.

## Details

- **Category:** Comparisons
- **Visualization Type:** splunk.treemap

## Tips

- Use treemaps to compare proportions across categories within a hierarchy.
- Choose a clear size metric so rectangle areas are meaningful.
- Best for showing part-to-whole relationships, category breakdowns, or concentration patterns.

## Variations

| Variation | Description | Key |
| --- | --- | --- |
| Basic | Use a basic treemap to compare one level of categories by size. | basic |
| Subdivisions | Use parent IDs and subdivisions to show nested categories while still supporting drilldown into parent nodes. | hierarchy |
| Dynamic Colors | Use gradient, match value, or range value coloring to highlight values and categories in the treemap. | dynamicColors |
| Performance | Use parent and child relationships to handle large number of nodes. Nodes that are too small to render will collapse into an "Others" node that can be drilled down. | performance |
