In this article:

How to Make Tree Map Charts in Google Sheets

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 

Automate repetitive tasks with Lido

Save hours on repetitive and tedious work. Lido is a new spreadsheet that connects your spreadsheets, forms, PDFs, and email inbox.

Trigger
Action
Select trigger
When a cell value in Google Sheets changes
Check Google Sheets for today's date
When a new row is added to Google Sheets
On new Google Form submission
Send me a daily reminder
On new Typeform submission
When a cell value in database changes
Check database for today's date
When a new row is added in database
When a new HubSpot customer is created
Select action
ADDCALENDAREVENT
Creates a one- or multiple-day calendar event with optional attendees
ADDHUBSPOT
Adds an object to Hubspot
ADDSLACKCHANNEL
Create a Slack channel, and optionally add a topic or members
CALLURL
Makes any HTTP request
CREATEGOOGLEDOC
Replaces [@column_name] values in a Google Doc with the corresponding table row's values
CREATEPDF
Replaces [@column_name] values in a Google Doc with the corresponding table row's values, then export it as a PDF
FETCH
Makes any HTTP request and returns the response
INSERTROWS
Inserts given array below defined values in given worksheet
SENDGMAIL
Sends an email using your Google account
SENDOUTLOOK
Sends an email using your Microsoft Outlook account
SENDSLACK
Sends a Slack message
SENDSMS
Sends an SMS message using your Twilio account
UPDATECELL
Updates cells with given values
UPDATEHUBSPOT
Updates a property of a Hubspot object
Trigger is required
Action is required
Get started