How to Create a Treemap Chart in Excel

How to Create a Treemap Chart in Excel

A few years back, I was handed a spreadsheet with hundreds of product SKUs and asked to “show which ones matter most.” A bar chart would have been a scrolling nightmare. That’s when I turned to the treemap chart, and it completely changed how I present large categorical datasets. If you’ve got a lot of categories and want to instantly show which ones are biggest, this is the chart I reach for every time.

What Is a Treemap Chart?

A treemap chart displays hierarchical data as a set of nested rectangles. The size of each rectangle corresponds to its value, and rectangles are grouped into larger colored blocks representing categories. The bigger the rectangle, the bigger the value — it’s a visual way to compare proportions across many items at once without needing dozens of individual bars.

Unlike a sunburst chart, which shows hierarchy in concentric rings, a treemap shows it through nested rectangles. I find treemaps easier to read when I’m dealing with a large number of individual items, because size differences pop out visually much faster in rectangles than in ring segments.

When Should You Use a Treemap?

I reach for treemaps when:

  • I have many categories or subcategories (10+) that I need to compare by size
  • I want to show part-to-whole relationships across a large dataset
  • I’m displaying budget allocations, market share, or inventory volume
  • The audience needs to spot outliers quickly — treemaps make oversized or undersized segments obvious

If you only have a handful of categories, a simple bar chart usually communicates the same information more clearly.

Required Data Structure

Your data needs at least two columns: a category (and optionally a subcategory) and a numeric value. Here’s an example layout I typically use:

CategorySubcategoryRevenue
ElectronicsPhones45000
ElectronicsLaptops38000
ElectronicsTablets12000
FurnitureChairs15000
FurnitureTables21000
FurnitureDesks9000

If you only have one level of categorization, just use a single category column plus the value column — treemaps work perfectly fine with flat data too.

Step-by-Step Instructions

Here’s how I build a treemap in Excel:

  1. Select your data range, including headers, arranged with categories first and numeric values last.
  2. Go to the Insert tab.
  3. In the Charts group, click the Insert Hierarchy Chart icon.
  4. Choose Treemap from the dropdown.
  5. Excel generates the chart immediately, grouping rectangles by category and sizing them by value.
  6. Click on the chart to bring up the Chart Design and Format ribbon tabs for further customization.

Formatting and Settings I Adjust

Once the treemap is generated, here’s what I typically clean up:

  • Banner labels: By default, Excel shows category names as banners across each colored group. You can turn these on or off under Format Data Series > Label Options.
  • Data labels: Right-click a rectangle to add labels showing the item name and its value directly inside each block.
  • Border settings: I usually add a thin white border between rectangles (Format Data Series > Border) so segments don’t visually blend together.
  • Color adjustments: Excel colors by top-level category automatically; you can override individual rectangle colors under Format Data Point if you need specific branding.

A Practical Example

Suppose I’m analyzing a retail company’s inventory across categories and subcategories. Once I plot the treemap, I can instantly see that “Electronics > Phones” occupies a massive rectangle compared to “Furniture > Desks,” which is barely visible. Without scanning a table of forty rows, a manager instantly understands where the inventory value — and risk — is concentrated. That immediate visual weight is the treemap’s biggest strength.

Common Mistakes to Avoid

Some pitfalls I’ve run into (and now watch for):

  • Mixing units: Don’t combine dollar values and unit counts in the same treemap — it distorts the size comparison.
  • Too many tiny rectangles: If your smallest values are barely visible, consider grouping them into an “Other” category.
  • No sorting: While Excel sorts automatically by value within each group, double-check your source data doesn’t have duplicate category names spelled differently (e.g., “Electronics” vs “electronics”), which will split what should be one group into two.
  • Overusing color: If every rectangle is a different, unrelated color, it can be visually noisy. Stick to a consistent palette per top-level category.

Troubleshooting Tips

If something’s not working:

  • Chart option missing: Treemap charts require Excel 2016 or later (or Microsoft 365). If you don’t see the Hierarchy Chart icon, you’ll need to update your version.
  • Rectangles look randomly grouped: This usually traces back to inconsistent category naming or extra spaces in your category column — clean your data with TRIM() first.
  • Labels not fitting: Small rectangles can’t display long text labels. Shorten category names or turn off labels for the smallest items.
  • Chart looks flat with no hierarchy: If you only supplied one column of categories, that’s expected — add a subcategory column if you want nested grouping.

Real-World Use Cases

I’ve personally built treemaps for:

  • Comparing website traffic by page category and individual page
  • Visualizing a stock portfolio’s allocation across sectors and companies
  • Mapping a company’s headcount by department and team
  • Showing survey response distribution across many answer options

In each case, the treemap let me compress a large, unwieldy dataset into a single glanceable image — something that would have taken multiple bar charts or a long table to convey otherwise.

Best Practices

Before I finalize any treemap, I run through this checklist:

  • Group very small values into an “Other” bucket to avoid clutter
  • Use a consistent color scheme so viewers can quickly associate colors with top-level categories
  • Keep labels short — long text rarely fits inside smaller rectangles
  • Test readability at the size the chart will actually be displayed or printed
  • Pair the treemap with a short written insight (“Electronics account for 60% of total inventory value”) so the visual and the takeaway reinforce each other

Treemaps are one of the most efficient ways to turn a sprawling spreadsheet into a story anyone can understand in seconds. Once your data is clean and properly categorized, building one in Excel takes less than a minute — the real work is in the formatting choices that make it easy to read.

Total
6
Shares

Leave a Reply

Previous Post
How to Revoke Privileges in PostgreSQL

How to Revoke Privileges in PostgreSQL

Next Post
How to Set Up Replication in PostgreSQL

How to Set Up Replication in PostgreSQL

Related Posts