Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Implement a Treemap Chart in Excel

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

A treemap chart in Excel visually represents hierarchical data using nested rectangles, where size and color show values and categories—ideal for spotting proportions and patterns in sales, budgets, or inventory. You need Excel 2016 or later with a data table structured in two or more columns including categories and values.

What You'll Need

  • Microsoft Excel 2016 or later (including Excel 365)
  • A data table with at least two columns: one for category names and one for numeric values
  • Optional: a third column for subcategories to create multi-level treemaps

Step-by-Step

  1. Organize your data in a table with headers. Column A should contain top-level categories (e.g., Product Lines), Column B can contain subcategories (e.g., Product Names), and Column C must contain the numeric values (e.g., Sales Amount). Ensure no blank rows or columns are within your data range.
  2. Select the entire data range, including headers. Click and drag to highlight cells from A1 to the last row of your data, including all relevant columns.
  3. Go to the Insert tab on the Excel ribbon. In the Charts group, click the Insert Hierarchy Chart button (it looks like a grid of nested rectangles).
  4. From the dropdown menu, select Treemap. Excel will generate a basic treemap using your selected data.
  5. Wait for Excel to build the chart. The largest rectangles represent the highest values, and colors may vary based on value intensity. If subcategories are included, you’ll see nested rectangles within larger ones.
  6. Click on the chart to activate the Chart Design tab. Use the Add Chart Element button to toggle data labels, legend, and title. For clarity, enable Data Labels to show exact values or percentages inside each rectangle.
  7. Right-click any rectangle and choose Format Data Point. In the Format pane, adjust color schemes under Fill. You can choose from preset color palettes (e.g., Accent colors, Grayscale) or customize individual rectangles by selecting them and assigning a new fill color.
  8. To change the hierarchy (which category is parent or child), right-click the chart and select Switch Row/Column. This swaps how Excel interprets your data columns—useful if subcategories appear as top-level items.
  9. Click the Chart Title box and type a descriptive title, such as "Q3 Sales by Product Category and Subcategory". Adjust font size and alignment using the Home tab.
  10. Resize the chart by dragging its corners. Avoid making it too small; ensure labels remain readable. If text overlaps, reduce font size via Format Data Labels > Font.
  11. Save your workbook. Treemaps are dynamic—if you update the underlying data (e.g., change a sales number), the chart will auto-update. Confirm this by modifying a value and watching the rectangle sizes and colors adjust.

Common Mistakes

  • Using blank cells or mixed data types (e.g., text in the value column) prevents Excel from generating the chart. Always validate that all values are numbers.
  • Including extra columns outside the data range (e.g., comments or notes) can confuse Excel’s chart wizard. Delete or move unrelated columns before selecting data.
  • Trying to create a treemap with only one category level. While possible, the chart is most useful with at least two levels (parent-child) to show hierarchy.
  • Overloading the chart with too many categories (50+). Excel will shrink labels to near-invisible sizes. Group smaller items into an "Other" category if needed.
  • Forgetting to enable data labels. Without them, users cannot interpret sizes accurately—colors alone are misleading without context.

Tips

  • Use the "Palette" option in Format Data Series to apply color gradients that reflect value intensity—lighter for low, darker for high—making trends easier to spot.
  • For presentations, export the treemap as a PNG or PDF: right-click the chart > Save as Picture. This preserves quality when pasting into Word or PowerPoint.
  • Apply conditional formatting to your source data first (e.g., color scales on the value column). The treemap will inherit similar color logic, helping maintain visual consistency.
  • Use the "Sort by Value" option in Chart Design > Sort to arrange rectangles from largest to smallest, improving readability.
  • If your data includes negative values, Excel will display them as hollow rectangles. Consider filtering out negatives or converting them to zeros if they distort the visualization.
  • Combine treemaps with slicers: insert a slicer from the Insert tab linked to your data table. This lets users filter categories interactively without editing the chart.

Troubleshooting

  • "Treemap option is grayed out": You’re likely using Excel 2013 or earlier. Upgrade to Excel 2016 or later. Alternatively, ensure your data includes at least two columns and numeric values.
  • "Rectangles are too small to read labels": Reduce the number of data points. Combine low-value categories into an "Other" row. Increase chart size or reduce label font size via Format Data Labels.
  • "Colors are not changing with values": Check that you’re using a color palette that supports gradients (e.g., "Accent" or "Colorful"). Avoid "Monochrome" unless intentional.
  • "Subcategories aren’t appearing nested": Verify your data structure: top-level categories must be in the first column, subcategories in the second. Use Switch Row/Column if they’re swapped.
  • "Chart doesn’t update when I change data": Ensure you’re editing values within the original selected range. If you added new rows after creating the chart, reselect the full range and recreate the chart.

Frequently Asked Questions

Can I create a treemap in Excel Online?

No, Excel Online does not support treemap charts. You must use the desktop version of Excel 2016 or later.

Do treemaps work with pivot tables?

Yes, but you must convert the pivot table to values first. Copy the pivot table data, paste as values in a new range, then select that range to create the treemap.

Can I add more than two levels of hierarchy?

Excel treemaps support only two levels: parent and child. For three or more levels, you’ll need specialized tools like Power BI or Tableau.

Why are some rectangles missing from my chart?

Values of zero or blank cells are excluded. Negative values are shown as hollow rectangles. Check your data for these values and adjust if needed.

Can I animate a treemap in Excel?

No, Excel does not support animation for treemap charts. Use PowerPoint for animations or export static versions for presentations.

Is it possible to link treemap colors to another column (e.g., profit margin)?

No, Excel treemaps use only the value column to determine size and color. Color is based on value magnitude, not a separate metric. Use conditional formatting on the source data to guide your interpretation.