How to format the treemap in Power BI with an example? It includes changing the box color, TreeMap title position, background colors and data labels, etc.
To demonstrate these formatting options, we will use the treemap we created earlier. See the Power BI treemap article to understand the steps required to create a Power BI treemap.
How to format the treemap in Power BI
Click on the Format to see the list of available formatting options for the treemap.
Format a treemap legend in Power BI
To display the legend, select the legend region and change the option from Off to In. In the following screenshot, you can see the legend
Format Power BI treemap data colors
By default, Power BI IntelliSense assigns random colors to each rectangle box. But when using this section of data colors, you have the option to change these colors according to your requirements.
For the purpose of the demonstration, we changed the rectangular box from Finance to Pink.
Enable data labels on the treemap in Power BI
Data labels used to display information about the rectangular box. In this case, it shows the Sales Amount for each rectangular box. To enable data labels, toggle Data labels option a In.
In the screenshot below, you can see that we changed the color, display units from Auto to thousands, and font family to Arial Black.
Format Category Tags in a Power BI Treemap
Category labels indicate a dimension value (group value) that represents a rectangular box. In the screenshot below, you can see that we changed the color of a category label, the text size to 14, and the font family to Georgia.
Format a treemap title in Power BI
Select the title and change the option to Off to In to display the treemap title. Below is the list of options available to format the treemap title.
As you can see in the screenshot below, we changed the title text to Sales Amount by Department Name. Next, Font Style to Georgia, Font Size to 20, and Title Alignment to Center.
Add background color to treemap in Power BI
You can add the background color to the treemap by toggling Background option a In. For demonstration purposes, we are adding yellow as a background color. Here you can also change the transparency percentage.
The following screenshot shows the treemap after formatting.