What Treemaps Actually Show
A treemap is a chart that displays hierarchical data as nested rectangles. Each rectangle's area is proportional to its value, and rectangles are grouped inside larger rectangles to show parent-child relationships. If you need to answer "how much of the total does each piece represent, and how do those pieces group together?" a treemap is built for the job.
Think of a company budget. The total budget is the entire rectangle. Inside it, departments get rectangles proportional to their spend. Inside each department, individual line items get smaller rectangles. You see both the hierarchy (which items belong to which department) and the proportion (which departments eat most of the budget) in a single view.
Treemaps were invented by Ben Shneiderman at the University of Maryland in 1990 to visualize hard drive usage. The original problem — showing thousands of files grouped in directories with their sizes — is still one of the best use cases. But the format has expanded far beyond disk space.
When Treemaps Are the Right Choice
Treemaps shine when you have part-to-whole data with a hierarchical structure and a lot of categories. A pie chart with 25 slices is unreadable. A treemap with 25 rectangles works because the reader's eye can compare rectangular areas more easily than wedge angles.
Strong use cases: budget allocation across departments and line items, stock market visualization by sector and company (the S&P 500 heatmap is a treemap), website analytics showing traffic by category and page, disk usage by folder and file, product revenue by category and SKU, and population data by region and country.
The common thread is data with two characteristics: it sums to a meaningful total, and it has at least two levels of grouping. If your data is flat — just a list of values without categories — a bar chart is simpler and clearer. For guidance on matching chart types to data shapes, see chart types guide.
Reading a Treemap: Size and Color
A treemap encodes data through two visual channels: size and color. Size always represents the primary metric — revenue, count, file size, population. Bigger rectangles mean bigger values. The reader should be able to glance at the treemap and immediately identify the largest categories without reading any labels.
Color is the second channel, and this is where treemaps get powerful. You can use color to encode a completely different metric. In a stock market treemap, size might represent market cap while color represents daily price change (green for up, red for down). In a budget treemap, size might show spend while color shows variance from plan. Two metrics, one chart.
If you only have one metric, use color to reinforce the grouping — give each top-level category a distinct hue so readers can quickly see which sub-items belong together. This is the simpler approach and works well when the hierarchy itself is the story.
Color Coding Strategies That Work
Sequential color scale: use shades of a single hue (light to dark blue) when the color encodes a numeric value on a spectrum — profit margin from low to high, performance from poor to excellent. The reader intuitively understands that darker means more. This works well with our data visualization best practices guidance on using color with purpose.
Diverging color scale: use two contrasting colors (red to green, blue to orange) when the data has a meaningful midpoint. Stock price changes, budget variance (over vs. under), satisfaction scores relative to a benchmark. The midpoint gets a neutral color, and extremes get saturated colors.
Categorical color: use distinct hues for each top-level category when the color's job is just grouping. Marketing gets blue, Engineering gets green, Sales gets orange. Sub-items inherit lighter shades of their parent's color. This is the easiest approach and the right default if you are not encoding a second metric.
One trap to avoid: using too many colors. If every rectangle is a different hue with no logical grouping, the treemap becomes a patchwork quilt that communicates nothing. Limit yourself to 5-7 distinct colors at the top level.
When Not to Use a Treemap
Treemaps are poor at showing exact values. Readers can tell which rectangle is biggest, but they cannot accurately judge whether one rectangle is 15% or 20% of the total. If precise comparison matters, use a bar chart.
They also struggle with small values. If one category is 0.3% of the total, its rectangle is invisible. You end up with a few dominant blocks and a cluster of slivers in the corner that nobody can read. If your data has a long tail of tiny values, either group them into "Other" or switch to a different format entirely.
Time-series data does not belong in a treemap. Treemaps show a snapshot — proportions at a single point in time. If you need to show how those proportions changed over months or years, use a stacked area chart or small multiples.
Finally, if your data has no hierarchy — just a flat list of values — a treemap adds visual complexity without informational benefit. A sorted bar chart or even a simple table would serve better.
Building a Treemap Step by Step
Step 1: Structure your data as a hierarchy. You need at least two levels: parent categories and child items. Each child item needs a numeric value that represents size. Optionally, add a second numeric value for color encoding. A spreadsheet with columns for Category, Subcategory, and Value is the simplest input format.
Step 2: Choose your color strategy before you start. Decide whether color encodes a second metric (sequential or diverging scale) or just groups categories (categorical). This decision affects how you set up the chart and how readers will interpret it.
Step 3: Label the rectangles that matter. Not every rectangle needs a label — tiny ones will have overlapping text that is unreadable. Label the largest items in each category and let the reader hover or reference a legend for smaller ones. Prioritize readability over completeness.
Step 4: Add a clear title that states what the treemap shows and what the size represents. "Q4 Revenue by Product Category" is specific. "Revenue Breakdown" is vague. If color encodes a second metric, add a color legend explaining the scale.
Make Your Treemap in GraphMake
Open treemap maker and paste your hierarchical data. The tool handles the rectangle sizing and layout algorithm automatically — you choose the color strategy, labels, and hierarchy depth. No signup, no watermark on export.
For treemaps embedded in a larger infographic — say, a budget breakdown alongside stat cards and a timeline — use the full editor. Add a Treemap widget to the canvas alongside other charts and text elements. The treemap renders as a canvas object that you can resize, reposition, and export with everything else.
Treemaps work particularly well in dashboard-style infographics. Pair a treemap showing composition with stat cards showing totals and a bar chart showing top-line comparisons. That combination — overview, detail, and headline numbers — covers most reporting needs in a single visual.