The donut chart is an improved version of the pie chart that has an empty space in the center.
The center of the donut chart can be used to provide more information about the pie chart, such as adding the total aggregate number from the chart segments.
In the graph below, you can see that the middle part of the donut chart shows the 100% value from the parts around it:
This tutorial will show you how to create a donut chart just like the example above.
The example dataset used for this tutorial can be downloaded here:
Once downloaded, you can load the dataset into Tableau as a Text File.
Now you are ready to start creating the donut chart.
Create a pie chart as the donut chart base
First, you need to create a pie chart that serves as the foundation of your donut chart later.
Follow the steps below to create the pie chart:
- In the Marks pane, change the Mark type from
- Add the
Itemfield as the Color mark
- Add the
Total Salesfield as the Size mark
- Click on the Label mark and check the Show mark labels option
You should see a pie chart generated on the sheet as shown below:
If the pie chart is too small, you can enlarge the chart from the Format > Cell Size > Bigger option.
Now that you have the pie chart, the next step is to create a dual-axis chart that creates a copy of the pie chart.
The second pie chart will then be used as the center part, as you’ll see by the end of this tutorial.
Creating a dual-axis donut chart
First, you need to create a calculated field named
Circle with the value of
Next, drag the
Circle field into the Rows shelf twice, and you’ll see two pie charts generated on the sheet as shown below:
On the Rows shelf, right-click on the second
AGG(Circle) and select the Dual Axis option. You should see the two pie charts merged as one again.
Next, you need to select the AGG(Circle)(2) mark and remove the
SUM(Total Sales) marks from the pane.
Click on the Color mark and select the color that matches your sheet’s background color (
White in this case.)
Then, click on the Size mark and reduce the size just a little by sliding the size meter to the left.
You should see the donut chart formed in your sheet as shown below:
Now that you have the donut chart shape completed, you can do a few more steps to make the chart more informative.
First, you can right-click on any of the
AGG(Circle) fields on the Rows shelf and deselect the Show Header option.
Next, you can add the
Total Sales as a Label mark to the donut chart center (the AGG(Circle)(2) mark)
Right-click on the
Total Sales label mark and select Quick Table Calculation > Percent of Total to show the 100% percentage value.
After that, you can add the
Total Sales as a Label mark again to the center as shown below:
You can also add the
Total Sales and
Item fields as labels to the donut ring (the AGG(Circle) mark) so that each part of the ring shows the percentage and the sum of the total sales number
The final result of the donut chart is as follows:
You can view and download the Workbook for the complete donut chart here:
And that’s how you can create a donut chart using Tableau.
First, you need to create the pie chart that will be used as the donut chart’s ring.
Next, you need to create a copy of the pie chart using a calculated field setup as the dual-axis chart.
Finally, resize the second pie chart to complete the donut chart shape.
After that, you can add and remove details from the donut chart as you need.
Great work for completing the tutorial. I hope this tutorial has been useful for you. 😉