Creating a tree map chart in Google Sheets lets you illustrate a set of data into a data tree, where elements are presented as nested rectangles.
Table of Contents
Presenting the relationship between datasets can be tricky sometimes. That’s why charts are always available so that you can just transform your data into more comprehensive and meaningful forms. One of the most powerful charts that you can use in Google Sheets is a tree map.
Tree maps are effective at illustrating parent-child hierarchies between elements. This type of chart is usually utilized for classifying objects.
A practical example is when you need to categorize a set of objects and display their respective values. While you can just present this scenario in a typical format having rows and columns, it would be easier for other people to interpret your spreadsheet if the data is illustrated as a tree map chart.
In a tree map chart, entities are categorized accordingly and are represented by rectangles. That being the case, you can easily determine how many entities are there in a group. On top of that, a tree map gives you a quick look at each entity’s value as signified by its size and color.
Real Example of Creating a Tree Map Chart in Google Sheets
For you to better understand the concept of the tree map, let’s use it in a real-world scenario.
Maia uses a spreadsheet for her gadget store’s sales records. She generates a report about all her products with their corresponding annual sales every year. She does this consistently to determine the top-selling products of each category easily. Here is the format of her sales report:
Currently, Maia’s gadget store only has eight products distributed between two categories: smartphones and laptops, so identifying the total sales of each product should be fairly simple. However, determining the top products of each category requires a thorough review on each total sale. Oftentimes, she would double-check each product just to be sure of the report she is doing.
To make her work more efficient, Maia looked for ways to illustrate her data into a graphical form. That’s when she stumbled upon the tree map chart in Google Sheets. To transform the data into a tree map, she revised her report into this format:
With the new data format, she highlighted the data set and used the Chart feature in Google Sheets to apply the tree map. A tree map is generated beside the data that appears like this:
Now, Maia has a preview of all her products and she can easily determine the top products based on the color and size of rectangles.
Additionally, she can just determine the value of each product by hovering over it on the chart.
Do you see how useful a tree map chart is? Instead of going through each record just to get the data you need, you can just refer to a tree map, and you’ll have the answer in no time.
Interested in trying out the tree map chart? Here is a link to our example spreadsheet.
Preparing Your Data For a Tree Map Chart
Like any other chart in Google Sheets, you need to follow a certain format to create a tree map. Let’s use our example data earlier to explain further how data should be formatted:
As you can see, the spreadsheet contains three columns of data. To create a tree map, you must adhere to the above format, wherein:
- First column – this column should include the objects you want to illustrate in your tree map chart. Objects should follow a hierarchy where the top record is the parent and the succeeding records constitute subcategories and their corresponding objects.
- Second column – right next to each entity should be its parent. For instance, in row 2, the record can be interpreted as “The parent of Smartphones is Products”.
- Third column – the third column should contain a positive numeric value for each object. This value refers to the figure you want to emphasize on your data. Keep in mind to indicate also the aggregate of these numeric values at the top of the column. In the case above, each numeric value represents the total sales of a gadget, with the aggregate value specified as the first record.
- Fourth column (optional) – In some cases, a fourth column may be included to configure the color of rectangles. This column also accepts positive numeric values.
Once you have arranged your data to follow the format above, you are ready to create your own chart.
How to Create a Tree Map Chart in Google Sheets
- To begin with, open the spreadsheet with the data you will use for the tree map chart. Alternatively, you can click the link I provided previously if you don’t have any data yet. Afterward, click Sheet2.
- Upon opening the spreadsheet, highlight the data you wish to use for the tree map. In the case below, you can see that cell range A1:C11 is selected.
- At this point, click the Insert tab and choose Chart. You’ll notice that a default chart along with its Chart editor will display on your screen.
- From the Chart editor, set the Chart type as Tree map chart.
- Upon selecting tree map, your spreadsheet should already look like this:
Good job! Now you know how to transform your data into a tree map chart. Aside from creating a tree map, you can also customize its appearance through the Chart editor feature. Learn how to use this tool in the next section.
Using the Chart Editor
You can customize your tree map chart using the Chart editor, which has two sections named Setup and Customize.
Navigate to the Setup section if you need to configure the data series of your chart.
- Data range – It contains the cell range used for the tree map chart.
- ID – This field contains the cell range of the entities used for the tree map chart. It’s the first column of the data.
- Parent – This is the cell range of the objects’ parents.
- Size – Holds the cell range of the objects’ numeric values. The size of the rectangles signifies these values.
- Color – If there’s a fourth column on the chart, this field will hold the cell range of the numeric values that will represent the color of the rectangles.
If you wish to modify your tree map chart’s appearance, you can use the controls under the Customize section.
- Chart style – You can use the settings in this section to modify your tree map chart’s background color, font, and border color.
- Tree map – Here, you can customize the objects’ attributes such as the font, font size, format, and text color. Additionally, in this section, you can also set the header color and the colors of your objects depending on their values.
- Chart & axis titles – If you wish to add a title for your tree map chart, just navigate to this section.
Congratulations on making it this far! You just learned another useful feature of Google Sheets: the tree map chart. Remember to use this chart if you need to present a data tree.
If you are interested in learning more about Google Sheets, check out our other articles about the essentials of Google Sheets.
Get more useful Google Sheets content like this one by subscribing to our newsletter.