top of page
hand-businesswoman-touching-hand-artificial-intelligence-meaning-technology-connection-go-

Step by Step guide on how to create a Donut Chart and Sunburst Chart in Tableau


The Donut chart as the name suggest is a visualization chart in Tableau that has the shape of a Donut. Donut Chart is a variation of a pie chart but unlike a pie chart, it has a hole (white circle) in the middle. Another visual benefit of a donut chart is that the space inside the donut can be used to represent data, labels, and such to make reading the chart easy. Each slice of a donut chart represents different chunks of data, often color-coded for easy understanding.

A donut chart works on two dimensions, and therefore, it needs two sets of information with a common relationship. The first dimension represents the attribute, and the second one represents its value. For example, in the electronic sales donut chart, the number of televisions sold is the dimension while a number (such as three hundred) is its value.

Both dimensions are important because they share a relationship. For someone reading a donut chart of electronics sales, it helps to know how many items were sold across which categories. Moreover, comparing with donut charts of other years also helps them see if item sales have significantly shifted.

Before jumping to the Donut Chart, let’s get an understanding of what a Dual Axis is as we will be creating a Dual Axis for this chart. In a dual axis chart, two separate axes are created for two separate measures in the same chart. As there are two individual axes, two mark cards are created for each measure.


So let’s get started.

  1. Connect to the dataset. For this blog, we will be using Sample Superstore data set.


Drag the category to color in Marks card.

3. From the Marks card drop-down select the Pie chart and change the view to Entire View.


4. Drag Profit to Angle in the Marks card. This will show the profit for each category on different angles based on the sum of profit for that category.


5. Now we have created Pie Chart for the donut chart and we will now create the circle. For this, we need to create the Dual Axis. Double-click on rows and write avg(0).


6. After this step we will have two individual axis for each pie chart and two separate marks cards are created.

7. Click on the first marks card and increase the size of the first pie chart. For the second pie chart remove the category field from the color and remove the sum(profit) field from the second marks card. Now we have one pie chart and one circle.



8. Create a dual axis by clicking on the second measure and then select the dual axis from the drop-down.


9. From the second marks card (circle marks card) select the color white. Drag the profit and put it on labels under All marks to show the category- wise profit and the whole profit will be displayed in the center.


To show the profit in percentage drag the profit into the details field in the marks card and click on it. Go to Quick Table Calculation and select Percentage of Total. now drag this measure on the label field.

Now as we have created the Donut Chart, we can play around with colors, labels, and sizes based on our requirements.


Sunburst Chart

A Sunburst chart also known as Multi-Level Chart is typically useful when we have to visualize hierarchical data. Each ring in the chart represents a level in the hierarchy with the highest level shown in the innermost ring. Let’s see how to create this chart.

1. We will follow the same steps(1 to 6) as the Donut Chart to get the two pie charts. For this visualization, instead of using the Profit we will use Sales. Just drag and drop sales into the Angle field in the marks card. This is how the chart will look like.


2. Now drag and drop the Sub-Category dimension onto the Detail field of the first marks card. Click on the three dots beside the subcategory and select the color. This way we can put two dimensions on the color shelf.



Now the sub-categories are aligned with their respective categories.


3. Now create the dual axis. Click on the second measure on the column shelf and select the dual axis.



4. Now we will sort the sub-categories based on the sales. Click on the sub-category from the first marks card and click on sort.


5. Sort the sub-category by field and select Field Name as Sales. This will sort the sub-category based on sales. Now we will do some color editing so that categories and sub-categories look in sync.


6. The last step is to label the category and the sub categories and remove the header and here is our final SunburstChart.



Conclusion

The sunburst chart is ideal for displaying hierarchical data. Each level of the hierarchy is represented by one ring or circle with the innermost circle as the top of the hierarchy. A sunburst chart without any hierarchical data (one level of categories), looks similar to a doughnut chart. However, a sunburst chart with multiple levels of categories shows how the outer rings relate to the inner rings.

197 views0 comments

Recent Posts

See All

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page