Give a chestnut! Tableau Tips (83): How to display labels in a small area chart

published: 2021-05-26

In our daily business data analysis, we often encounter some graph areas in the analysis chart are so small that the labels cannot be automatically displayed, which will affect the intuitiveness of the data analysis results.

For example: the following stacked chart showing sales, the color represents the product sub-category, and the area represents the sales. It can be seen that the stacked graph where the office supplies are located has sales in a part of the color area, because the area size does not show the label.

So, in Tableau, how do you display the labels of smaller charts? Here, we share the method.

In this issue of "Give a Chestnut", the Tableau trick that Ada wants to share with you is: how to display labels in a small area chart.

To facilitate learning, we use Tableau's own supermarket data and use stacked charts (stacked bars) as an example.

Specific steps are as follows:

Step 1:Create a stacked chart

First put "sales" on the row, "category" on the column, drag "subcategory" to the color in the tag label, and drag "sales" to the tag in the tag label.

Step 2:Add labels to charts that don’t show labels

Select the color area without labels, right-click and select "Always Mark" in "Mark Labels", and the labels will be displayed.

The graphics after all labels are displayed are as follows:

After the setting is complete, you can find that because the area of some charts is too small, the displayed label will be crowded with other label data or exceed the chart area.

Step 3:Add comment "mark"

Next, select the chart area where the label is crowded, right-click and select "Mark" in "Add Comment", enter the content that the label wants to display in the mark dialog box, adjust the border size and background color.

In this way, we display all the labels of the chart with a small area.

Have you gotten the Tableau skills in this issue? Hurry up and open your Tableau and give it a try!