Over the 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. The following is a list of topics that will be covered in this blog on Donut Chart in Tableau.
Click on Tableau Applications to know about Tableau and its applications.
Introduction to Donut chart
A donut chart is an alternate form of 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 whole. This point makes it difficult to compare various pie charts. A donut chart rectifies this situation by de-emphasizing the use of area. It helps readers to focus on length of the arcs rather than proportions. Donut charts are also more space efficient because the blank space inside it can be used to display information inside it.
Not sure about the concepts of Tableau. Check out this blog on Tableau for Beginners to get started with the concepts of Tableau.
Creating a Donut chart in Tableau
A donut chart is a union of two things. First one being the regular pie chart and the other 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 the Tableau.
Check out this video to know about how to become a Tableau certified professional
1.On the homescreen 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 “Marks” card to pie.
2.Drop the “Measure names” to the “filter” card and select 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 “Marks” card respectively.
4. Now click on the drop down option of 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 with a large number, say 100,000 to adjust the range.
7. By right clicking the axis, opt the edit axis option and change the options to fixed and write the range between -2 to 3 inorder 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 .
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. Apply the filter to Measure Names by dropping it in the “Filter” card and select 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 the half of the chart to white. This will make only half of the chart to 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 as floating and place one donut inside another donut chart and remove the borders in the settings.
The below is the double donut chart which will be created.
Donut Pie Chart in Tableau
1.Create two sheets with a pie chart and donut chart in each of them.
2.On the dashboard, merge these two sheets.
3. The settings of the one with 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 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 labelling them, the concentric donut chart in Tableau is created.
Tableau donut chart percentage
To represent values in the donut chart as percentage of total, add the measure to the “detail” field of “marks” card and right click on it, opt for the Percentage of 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 .
Tableau is one of the most popular Business Intelligence and Data visualization tools, used by various organizations around the world. The data visualization had 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.
Check out our Business Intelligence Community for more information about Tableau.