MakeoverMonday - Centred doughnut charts
In this week’s Makeover Monday we were presented with a really small data set, 12 rows by 3 columns. With such limited data available I wanted to set myself a challenge to do something a bit different; the theme related to UK pet ownership so I decided to keep with the pet theme and try to visualise the percentages in a douhgnut chart that mimicked the appearance of a dog collar.
Nothing too ground breaking so far, however my Tableau trick came when wanting the highlighted section of the doughnut to appear in the middle bottom of the ring, as opposed to at the top and starting at zero.
How did I do it?
I effectively was trying to visualise two percentages, one percentage representing the chosen pet ownership and the other being the inverse of this value, for example 24% of UK households in 2017 owned a dog with the inverse being 76% did not. To force the 24% to the bottom of the doughnut I created two calculations:
[Non Owners 1] : 0.5 - (sum([Percentage of Households with this pet])/2)
[Non Owners 2] : 0.5 - (sum([Percentage of Households with this pet])/2)
These two calculations allowed me to ‘frame’ the chosen pet ownership, forcing it to centred on the 50% point of the doughnut:
- Create a standard Tableau doughnut chart (there are plenty of blog posts about this).
- Filter [Measure Names] to be the three required measures [Percentage of Households with this pet], [Non Owners 1] and [Non Owners 2].
- In the ring part of the doughnut use [Measure Value] as the angle and [Measure Names] as colour.
- Set [Non Owners 1] and [Non Owners 2] to be the same colour and set [Percentage of Households with this pet] to be a different colour.
- Finally order [Measure Names] to be [Non Owners 1], [Percentage of Households with this pet] and then [Non Owners 2].
You should now be able to achieve a doughnut chart where by your selected section is centred at the bottom of the doughnut ring.
To view my complete Makeover Monday visualisation please use the following link: