In this article, we will learn how to create a Doughnut Chart (aka Donut Chart) and get to know better the ways we can manipulate a Pie chart to produce a Donut Chart.
A recent post added by a colleague of mine, explains why should we re-think when trying to apply pie charts to our data. Pie charts, as the post mentions, don’t have the best reputation, so it’s a good opportunity to look for another candidate along the food chain. A Donut is yet another kind of sweet delight that might take away the heavy feeling we tend to get when messing with pies…
A doughnut chart is essentially a Pie Chart with the centre area cut out. It is possible that the doughnut has the power to de-emphasize the use of the obvious angle in a pie. Instead, viewers can focus more on the length of the arcs rather than comparing slices. Another possible advantage is to make use of the free space in the centre to add other information or to report statistics.
Although it is quite straightforward to build a Pie Chart in Tableau, a Donut Chart is not an out of the box feature.
For this demonstration I will simply use the sample superstore dataset that comes along with Tableau desktop.
First, Let’s create a table and see what we are planning to do:
Let’s have a look at the table we have just created as the basis of our Pie Chart:
Our goal is to visualise what is the composition of the different Categories and to find out what is the relative sales amount of each Sub-Category. So let’s go ahead and create a Pie on the table…
We will now add 2 Placeholders on the Marks Card Shelf and duplicate our Pies to populate them. We will achieve that by adding an ad-hoc calculation to Rows, duplicate the measure and switch to dual axis.
Creating the placeholders is essential for creating a Donut Chart, But it also has many other uses.
Placing each newly created measure on the Rows or Columns creates its own Marks Shelf, where we can edit each Marks Card independently. This nifty little trick allows us to have more options with modifying our visualisation.
If you find Placeholders a bit confusing, take the time to discover some more about Unlocking the mysteries of placeholders with other interesting use cases.
Now that we have created our two placeholders, we can edit them as we like. It is time to turn our pies into donuts.
That’s it! Our Donut Chart is ready. you can find this example vis in Pies and Donuts.
The question of when to use a Pie Chart or rather convert it to a Donut Chart is always valid. Another question might be why are we so fond of Pies and Donuts at the first place? if we deep dive into history we might find out that this popular kind of chart is quite ancient and used by numerous civilizations. Read through An historical and evolutionary perspective to check out why we tend to adore these kind of charts.
To find out what are we really onto when looking at a these charts check out the results of three studies, who try to bluntly show how wrong we are really when it comes to Pie Charts, and the fun part is that donut charts are no worse than those old pies.