A treemap is a graphical tool to display categorical data. It uses colored rectangles to represent distinct categories. The area of each rectangle is proportional to the value of the corresponding category.
Consider the following treemap of the stocks in the Dow 30. The stocks are grouped by sector and the size of each rectangle corresponds to the stock’s market capitalization.

It is easy to see that information technology stocks dominate the index, making up almost half of the total market capitalization. Further, the information technology stocks are dominated by Apple and Microsoft.
You can also see that communication services stocks have a similar total market cap to industrials, even though there are only two communications services stocks compared to four in industrials.