Definition of a Treemap Chart

A treemap chart is a space-filling visualization that displays hierarchical data using nested rectangles. Each rectangle represents a category or subcategory, and its size corresponds to a quantitative value such as revenue, volume, or percentage contribution. Color can encode a secondary metric, making treemaps ideal for multi-dimensional analysis and part-to-whole views.

Treemaps use layout algorithms to pack rectangles efficiently into a single area, preserving hierarchy while maximizing the use of screen space. This makes them especially useful when you need to show many categories at once without resorting to long tables or multiple charts.

A common example of a treemap that is well suited to its data is the stock heat map generated by FinViz. The small rectangles are individual company ticker symbols, and the rectangular groups are the sectors (healthcare, real estate, etc.) comprised of these companies. In this instance, the color represents the individual stock's gain or loss, and the size of the rectangle represents the company's market cap.

When Should You Use a Treemap?

Treemaps are best for part-to-whole analysis, hierarchical breakdowns, and datasets with many categories. They reveal dominant contributors, highlight small but important segments, and provide a compact overview of complex structures.

  • Financial portfolio allocation across asset classes and holdings
  • Product category and subcategory revenue performance
  • Website traffic segmentation by source, medium, and campaign
  • Disk usage visualization by folder and file type
  • Organizational structure analysis by department and team size
  • Marketing channel contribution to total conversions or spend

Treemap Variants

Different treemap layout algorithms produce different visual styles and trade-offs between readability, ordering, and aspect ratio. Choosing the right variant helps match the chart to your data and audience.

  • Squarified treemaps for balanced, near-square rectangles that improve readability.
  • Slice-and-dice treemaps for ordered layouts that preserve category sequence.
  • Strip treemaps for sequential data where ordering along one axis matters.
  • Voronoi treemaps for organic, cell-like shapes that emphasize clusters.

Treemap vs Other Hierarchical Charts

Treemaps are one of several ways to visualize hierarchical data. Understanding how they differ from other chart types helps you choose the right visualization for your analysis.

  • Sunburst charts use radial layers instead of rectangles, making hierarchy depth more visually explicit but less space-efficient for many categories.
  • Tree diagrams show node-link relationships rather than area encoding, which is better for structural understanding but weaker for part-to-whole comparison.
  • Heat maps show grid-based intensity without hierarchy, useful for matrix data but not for nested structures.
  • Nested bar charts show hierarchy with grouped bars, requiring more space and often more scrolling than treemaps.

Treemap Best Practices

Good treemap design balances detail with readability. Following best practices ensures that viewers can quickly understand the hierarchy and relative magnitudes.

  • Limit hierarchy depth to maintain readability and avoid overly nested rectangles.
  • Use consistent color scales for secondary metrics such as growth or variance.
  • Group very small categories into an “Other” group to avoid tiny, unreadable rectangles.
  • Apply clear labels or tooltips so users can identify categories and values easily.
  • Choose squarified layouts for balanced shapes that are easier to compare visually.

Common Mistakes in Treemap Design

Treemaps can become confusing if they are not carefully designed. Avoid these common pitfalls to keep your visualization effective.

  • Using too many categories, which leads to clutter and tiny rectangles.
  • Applying overly complex or inconsistent color schemes that obscure meaning.
  • Creating rectangles too small to interpret, especially at deeper hierarchy levels.
  • Mixing unrelated metrics in size and color, making the chart hard to interpret.
  • Ignoring hierarchy clarity, so viewers cannot see how categories roll up to parents.

Treemap Use Cases

Treemaps are versatile and can be applied across many domains where hierarchical and part-to-whole relationships matter.

  • Analyzing revenue by region, product line, and individual products.
  • Visualizing cost breakdowns across departments and projects.
  • Exploring website content structure and page-level traffic.
  • Monitoring resource allocation across teams and initiatives.
  • Summarizing inventory by category, supplier, and location.

How to Interpret a Treemap

To interpret a treemap, focus on three main elements: rectangle size, color, and nesting. Rectangle size represents magnitude, color represents a secondary metric, and nesting shows hierarchical relationships.

Larger rectangles indicate dominant contributors within their parent category, while smaller rectangles represent less significant items. Color variations reveal performance differences, such as high versus low growth or profit, within the same hierarchy. The nesting structure shows how each item rolls up into higher-level groups.

Treemap Chart Anatomy

Understanding the anatomy of a treemap helps viewers quickly decode what they are seeing.

  • Parent rectangles represent top-level categories or groups.
  • Child rectangles represent subcategories or individual items within parents.
  • Color legend explains the meaning of color encoding, such as performance or status.
  • Hierarchy depth indicates how many levels of nesting are visible.
  • Value encoding defines which metric controls rectangle size and which controls color.

Which Chart Uses Nested Rectangles?

The chart type that uses nested rectangles to represent hierarchical data is called a treemap chart. In a treemap, each rectangle represents a category or subcategory, and its size is proportional to a numeric value such as sales, volume, or count. Larger values produce larger rectangles, while smaller values produce smaller ones.

Treemap charts are especially useful when you need to visualize how parts contribute to a whole within multiple levels of a hierarchy. For example, you can show product lines, individual products, and regions all in one view, with each level represented by nested rectangles. Color can be used to encode an additional measure, such as growth or profitability, making the chart both dense and highly informative.

Because treemaps use nested rectangles instead of traditional bars or slices, they can display a large number of categories in a compact space. This makes them ideal for exploring complex datasets where you want to quickly identify the largest and smallest contributors, spot patterns, and compare groups within a hierarchy.

On this page, you can learn more about treemap chart definitions, when to use them, and how to create them in InetSoft, including how to configure hierarchy levels, size metrics, and color encoding to make your nested rectangles tell a clear visual story.

Why Use a Treemap Chart?

The obvious benefit of the treemap chart is that is provides a very quick illustration of the "big picture", effectively highlighting areas that have the greatest importance in terms of power, value, or any other KPI. For example, in the FinViz chart above, it is immediately obvious which companies and sectors are losers or winners at the moment the chart is displayed. (For the FinViz application, the chart changes continuously throughout the trading day.) Although it is not easy to compare two companies that are spatially separated from each other in the chart, such comparisons are probably not necessary in this application. If such detailed comparisons were required, other chart types such as a Bar Chart might be better suited to the data.

A general disadvantage of treemaps, which can be seen in both examples above, is that less significant areas can be difficult to read or may not display labels at all, and zooming may be required to be able to resolve the text or details. Although this can be partially addressed by effective use of tooltips for interactive charts, a treemap is therefore not best choice for data that needs to be compared precisely or viewed in its entirety, but is more suitable for cases where an "at a glance" holistic impression conveys the desired information. For the FinViz chart above, what most users want to see is "How is the energy sector doing?" or the like. The exact details of whether a stock is down 1% or 1.5% are not important. The holistic nature of the viewer's needs makes the treemap the perfect way to present the market.

Variations of Treemap Charts with Examples

Treemap charts can appear in different styles, and can be adapted to suit the data they are presenting. There are also other chart types that can be used to present hierarchical data in a manner logically identical to a treemap.

Circle Packing Chart

The first of these is the Circle Packing Chart. Not as compact as the treemap, it nevertheless presents the same information. It may be useful when the treemap appears too dense.

Needle Dashboard treemap Example

Sunburst Chart

Another variation on the treemap concept is the Sunburst Chart. This also clearly suffers from the inability to display all text labels legibly, and requires zooming to reveal all of the data. Below, the same chart has been zoomed to reveal the details of the Personal and Office Tools categories.

Icicle Chart

Yet another variation is the Icicle Chart, which favors a one-dimensional orientation of the rectangular regions, and may be easier to read in some instances.

Icicle Chart Example

Treemap Charts in InetSoft Software

InetSoft's Style Intelligence and Style Scope products support Treemap Charts, Circle Packing Charts, Sunburst Charts, and Icicle Charts. These charts can be created easily in the Visual Composer, as described below.

InetSoft's software products are 100% web-based, and provide a full suite of business intelligence capabilities including interactive dashboards, ad hoc reporting, pixel-perfect report generation, and self-service data preparation. To try out these chart types for free online, see the instructions below.

How to Make a Treemap Chart in InetSoft

Creating a Treemap Chart with InetSoft software is extremely simple. The other chart types mentioned above (Circle Packing, Sunburst, and Icicle) are created in the same way.

Drag a Chart component from the Toolbox panel into a dashboard in Visual Composer, and then press the Edit button to open the Chart Editor.

In the Chart Editor, set the Chart Style to Treemap.

Drag the desired hierarchy dimensions to the T region in the Chart Editor. Drag a desired dimension to the Color region, and drag a measure to the Size region. (See highlights below.)

Press the Edit Measure button next to the measure and choose a desired Aggregate.

Press Finish to close the Chart Editor. The Treemap is complete.

How to Create a Treemap Chart in Google Sheets

Creating a Treemap in Google Sheets is cumbersome, because all aggregates in the hierarchy must be pre-computed and arranged in an eccentric tabular form, with parent values in the same column as child values. Unlike InetSoft, in Google Sheets the treemap chart cannot be created from the raw data directly.

To create a Treemap Chart in Google Sheets, you must first aggregate the data as shown below, with parent values and aggregates shown highlighted. Then add a Chart from the Insert menu, and use the Chart Editor to choose the Tree map chart type. This creates the desired treemap.

Tool to Make Treemap Charts Online for Free

To easily and quickly create Treemap Charts online for free, create a Free Individual Account on the InetSoft website. You will then be able to upload a text data set, as shown below:

Once you have done that, you will be able to proceed to the Visualization Recommender, which will get you started creating a dashboard. To start with a Treemap Chart, select the hierarchical fields and measure that you want to use, and choose Treemap from the top bar of the Recommender.

After you press Finish to leave the Visualization Recommender, you can continue to modify the Chart or add other components using the Visual Composer shown earlier.

We will help you get started Contact us