A tree map diagram is one way to visualize and comprehend data in a chart more easily. This article goes over how you can both add to and customize tree map charts, while also providing you with a sample sheet to work with yourself.
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 tree map chart requires you to specify three columns of data:
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 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.
Step 2. Go to Insert, then click Chart.
Or look at near the end of the main toolbar and then click the Insert chart icon.
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.
Step 4. You now have a tree map chart!
If you hover your cursor to an item in the tree map chart, you can see their actual value:
Additionally, clicking on a header (the ones shaded in blue) zooms in to that region, showing the proportion of each item to that whole:
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:
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.
Your tree map chart can be improved by changing the font size:
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.
For our example, we have opted to change the colors to shades of green. The chart now looks like this:
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:
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”:
The resulting tree map chart looks like this:
Create a Tree map Chart in Google Sheets
Select a table of values
In the file menu click Insert -> Chart
In the chart editor select Treemap Chart
Admire your chart
To help you practice making tree map charts, here is a sample sheet that you can consult: