In this article:

How to Make Tree Map Charts in Google Sheets

May 8, 2024

Unsure which chart type to use? Click here to find the right chart for your data and the ideas that you want to convey.

Google Sheets allows you to make tree map charts, which provides a way to visualize how data as a whole is divided into its parts. It works like a pie chart, which outlines the parts that constitute a whole through the relative size of the individual slices. In this case, tree map charts visualize parts in terms of squares and rectangles.

The tree map charts by Google Sheets also allow you to categorize items from data, adding a label to distinguish these categories. 

This tutorial will help you learn how to use the tree map charts in Google Sheets. 

How to add a tree map chart

To help you understand further, let us visualize the US population through a tree map chart. We collected the population of each state and territory and also their region, according to the 2010 United States Census:

The dataset to be visualized.
The dataset to be visualized.

The tree map chart requires you to specify three columns of data: 

  1. items
  2. category
  3. numerical value of a quantity that you want to be visualized

Additionally, you have to sort the items according to their categories. Here's what it will look like:

The dataset, sorted and formatted for use by the tree map chart.
The dataset, sorted and formatted for use by the tree map chart.


The first row has the label of the categories on the first column and the sum of the quantities on the third column. Afterward, the next row contains the label of the first category on the first column, the label of the category on the second column, and then the total value for that category on the third column.

The succeeding rows contain the actual items, their category, and their values. The same pattern goes on until all the categories have been listed together with their items. 

To add a tree map chart, here are the steps:

Step 1. Select the whole table of values.

The dataset, selected.
The dataset, selected.


Step 2. Go to Insert, then click Chart.

Insert menu selected, Chart option highlighted in the drop-down box.
Insert menu selected, Chart option highlighted in the drop-down box.


Or look at near the end of the main toolbar and then click the Insert chart icon. 

Insert chart icon in the main toolbar. This is located near the right end of the main toolbar.
Insert chart icon in the main toolbar. This is located near the right end of the main toolbar.


Step 3. Google Sheets will automatically create a column chart. To change the chart type to tree map chart, go to the Chart editor (which is already present on the right side of the Google Sheets), then click the drop-down list for the Chart type. Scroll down until you find the Tree map chart

The chart created. By default, Google Sheets creates charts in column chart format. You need to manually select Tree map chart in the Chart type drop-down list.
The chart created. By default, Google Sheets creates charts in column chart format. You need to manually select Tree map chart in the Chart type drop-down list. 


Step 4. You now have a tree map chart!

The original tree map chart created using the selected dataset.
The original tree map chart created using the selected dataset.


If you hover your cursor to an item in the tree map chart, you can see their actual value:

Hovering your cursor above an item in the selected tree map chart displays the value of that item.
Hovering your cursor above an item in the selected tree map chart displays the value of that item. 


Additionally, clicking on a header (the ones shaded in blue) zooms in to that region, showing the proportion of each item to that whole:

Double-clicking on the header zooms you in to that section, making it more possible for you to visually see the subdivisions in that category.
Double-clicking on the header zooms you in to that section, making it more possible for you to visually see the subdivisions in that category.


How to customize the tree map chart

This is still far from perfect. There doesn’t seem to be enough space for all of them. You can either stretch the chart size to accommodate them or modify the font sizes by going to the Customize tab of the Chart editor

If we try stretching it to become a bit larger, we can have the following result:

The tree map chart, stretched to become larger.
The tree map chart, stretched to become larger. 


Unfortunately, by nature, it would be difficult, if not impossible to display all the labels of each item in this chart by stretching alone. 

Change the font size

To change font size, go to Customize tab of the Chart editor, and then click Tree map. A set of options will appear, which includes the Font size. Change it accordingly. 

Chart editor, Customize tab: Font size option in the Tree map section.
Chart editor, Customize tab: Font size option in the Tree map section. 


Your tree map chart can be improved by changing the font size:

Left: The original chart with original font size. Right: The chart with the font size changed.
Left: The original chart with original font size. Right: The chart with the font size changed.


Change the color range used

While unfortunately Google Sheets does not allow us to set separate colors for each category, we can change the color range used to something better. Go to Customize tab of the Chart editor, and then click Tree map. A set of options will appear, which includes the Min value color, Mid value color, and Max value color. Change them individually by selecting a color from the color palette that will appear when you click the color. 

Chart editor, Customize tab: Color palette for Min value color.
Chart editor, Customize tab: Color palette for Min value color. 


For our example, we have opted to change the colors to shades of green. The chart now looks like this:

Improved tree map chart, with the range of values indicated by shades of green.
Improved tree map chart, with the range of values indicated by shades of green. 

Interlude: consider the possibilities for presenting the chart better by analyzing the data

In specific cases, changing the data to another form can improve our chart. For our example, we can change the state names to state abbreviations to make the chart more compact:

Improved tree map chart, with abbreviations used instead of whole names.
Improved tree map chart, with abbreviations used instead of whole names. 


Always stay on lookout for possibilities in presenting the data on the chart better by analyzing the data that you have. 

How to make a tree map chart without sorting them to categories

You might wonder: is it possible to make a tree map chart without these annoying categories? Yes! 

The trick is simple: specify a single category. 

For our example, we will change the category to United States and the second row to contain “USA USA”:

Dataset changed to have a single category for all the items.
Dataset changed to have a single category for all the items.


The resulting tree map chart looks like this:

The tree map chart with a single category used.
The tree map chart with a single category used. 


Create a Tree map Chart in Google Sheets

  1. Select a table of values
  2. In the file menu click Insert -> Chart
  3. In the chart editor select Treemap Chart
  4. Admire your chart

Sample sheet

To help you practice making tree map charts, here is a sample sheet that you can consult:

Tree Map Chart Sample Sheet 

Get Google Sheets productivity and automation tips delivered straight to your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
We'll email you 1-3 times a week — and never share your information.

Work less, automate more!

Use Lido to connect your spreadsheets to email, Slack, calendars, and more to automate data transfers and eliminate manual copying and pasting. View all use cases ->