Over time, we have come across various data visualization styles and tools. However, as many tools were there, there were also significant downsides to them. For example, if we are comparing sales of different departments of an organization, using all the previous tools we could get to know which department is leading the race, but wouldn’t be able to know the whole amount of sales. So, this is the point where the Donut chart comes into action.
In this blog, let’s see how to create a Donut Chart in Tableau.
Check out this video to know about how to become a Tableau certified professional
Introduction to Donut chart
A donut chart is an alternate form of the pie chart. But, unlike pie charts, it has an area of the center cut out and displays attributes or categories as arcs. Pie charts try to show the proportional values of the attributes to one another and to the chart as a whole. This point makes it difficult to compare various pie charts. A donut chart rectifies this situation by de-emphasizing the use of the area. It helps readers to focus on the length of the arcs rather than the proportions. Donut charts are also more space-efficient because the blank space inside them can be used to display information inside them.
Creating a Donut chart in Tableau
A donut chart is a union of two things. The first one is the regular pie chart and the other is just a whole circle. Following are the steps that needed to be implemented to create a Donut chart in Tableau. In this blog, we are going to work with the sample dataset available in Tableau.
1. On the home screen of the Tableau Desktop, Under the Saved Data sources card, click on Sample-Superstore.
2. Drag the category to the “colors” card in “Marks”.
3. In the “Marks” card change the drop-down box value to pie.
4. Drag the quantity to the “Angle” card in the “Marks”.
5. Now the pie chart part of the donut chart is ready and we are yet to make another circle. For that, we need to write avg(0) in the “Rows” shelf as shown in the figure.
6. After this step we will be having two pie charts and using the “size” in the “marks” card the size of the first pie chart should be increased.
7. For the lower pie chart need not be a pie chart so we remove the category field from the “Marks” card of the second chart.
8. Following the previous step we need to right-click on the axis and select “Dual Axis”. Then, synchronize both of them.
10. Drag sales to the “angle” field of both the pie charts. Change the color of the second chart to white by clicking on the color field. Finally, we have our much-awaited donut chart here.
There are different variations of the donut charts. Some of them are as follows:
- Stacked Donut chart
- Concentric Donut chart
- Donut Pie chart
- Half Donut chart
- Multiple Donut chart
- Double Donut chart
Let’s see how these various donut charts are implemented in Tableau.
Stacked Donut Chart in Tableau
In this chart, as the name suggests we stack pie charts on one another to compare different measures.
1. Fill the column field as INDEX() and change the “automatic” in the “Marks” card to pie.
2. Drop the “Measure names” to the “filter” card and select the necessary attributes required to create the stacked donut chart.
3. Drag and drop the “Measure Values”, “segment” to the “details” field, and “Measure names” to the “color” field of the “Marks” card respectively.
4. Now click on the drop-down option of the index in columns field and opt for compute using segments.
5. Drag the Index()(+ctrl) from the columns field to the “size” field of the “Marks” card. Based on the index value it would allot the size to the pie chart. Now, we move forward to stack all these charts on one another.
6. Divide the index by a large number, say 100,000 to adjust the range.
7. By right-clicking the axis, opt for the edit axis option and change the options to fixed and write the range between -2 to 3 in order to stack all of them up.
8. Add another field to the column that is SUM(0) and then go for the dual-axis to add both the pie charts.
9. Now, increase the size of the first chart i.e., INDEX()/100000, and decrease the size of the last added chart respectively. Remove all the details and color attributes from the last pie chart.
10. By adding the labels in the respective cards of the two charts we would get the stacked donut chart.
Get 100% Hike!
Master Most in Demand Skills Now!
Donut Chart For Multiple Measures
In this context, we create a donut chart for multiple measures. The steps to be followed to create this chart are as follows.
1. Create a Pie chart for multiple measures by dragging and dropping Measure Names and Measure Values to the fields of “color” and “angle” respectively.
2. From different types of filters apply the filter to Measure Names by dropping it in the “Filter” card and selecting desired measures. In this example, we have selected ‘sales’, ‘quantity’, and ‘profit’.
3. Now, to create another copy of the pie chart we write SUM(0) to duplicate the chart.
4. Now, by repeating the process mentioned in the section of the Donut chart we get to create a Donut chart for Multiple measures.
Multiple Donut Chart in Tableau
Multiple Donut charts are useful to show proportional parts of multiple wholes with different segments as columns.
Continuing the process of the donut chart with multiple measures, we should add “Segment” to the columns field. By doing such we get multiple donut charts as below.
Half Donut Chart in Tableau
- Create two pie charts and follow the steps of creating a donut chart.
- After the donut chart is made, change the colors of measures or attributes that are contributing to half of the chart to white. This will make only half of the chart be displayed thus, making it a half donut chart.
Double Donut Chart in Tableau
1. Create two sheets and create two donut charts in each sheet as mentioned above.
2. Now, click on Dashboard >> new Dashboard.
3. In the Dashboard drag and drop both the sheets. In the settings make one sheet floating and place one donut inside another donut chart and remove the borders in the settings.
Below is the double donut chart which will be created.
Donut Pie Chart in Tableau
1. Create two sheets with a pie chart and a donut chart in each of them.
2. On the dashboard, merge these two sheets.
3. The settings of the one with the pie chart should be marked as floating so that we can place it in the middle of the donut chart of the other.
4. By doing this, below is the image of the donut pie chart in Tableau.
Concentric Donut Chart in Tableau
The Concentric Donut chart is also known as the Sunburst chart or Multi-level chart. The following are the steps to be followed to create a concentric donut chart.
- Create two pie charts in the sheets with different measures as mentioned before and select a dual-axis to stack them up.
- In this example, we add both category and subcategory to the color field and sales to the angle field. Here, we are adding two measures to the color field in order to align them with each other.
- Right-click on the subcategory and sort the colors according to the sales in ascending order.
- After labeling them, the concentric donut chart in Tableau is created.
Tableau donut chart percentage
To represent values in the donut chart as a percentage of the total, add the measure to the “detail” field of the “marks” card and right-click on it, opt for the Percentage of the total in the quick calculation. Now, add this measure to the “label” field. Now the labels would be the percentage of the total of that particular measure.
Conclusion
Tableau is one of the most popular Data visualization and Business Intelligence tools, used by various organizations around the world. The data visualization made it easy to compare various statistics using numerous variations of donut charts, pie charts, and bar charts. Donut charts have made the whole to part relationships in the data much easier for the users to analyze and interpret.