BI & Analytics
Blog
Tableau
6
min read

How to create a donut chart in Tableau

Looking to create a donut chart in Tableau? Read our in-depth guide on how to level up your donut charts in Tableau here.
Author
Donna Coles
Donna Coles
Analytics Engineer
How to create a donut chart in Tableau
Share article

How to create donut charts in Tableau like a pro

A donut chart is essentially a pie chart with its middle cut out, which gives it the appearance of a ring donut.

Donut charts can look more aesthetically pleasing than pie charts, but they can also help readability as the reader’s focus is shifted from the area of a slice to the length of the arc instead. Of course, this still isn’t the ideal visual if you want exact comparisons of segments.

In a recent blog post, we showed you how to label pie charts. Some of the techniques discussed in that post involved the use of a second pie chart, layered on top of the other.

This is the crux for building donut charts.

Using dual axis to build a donut chart

Create your basic pie chart by adding your dimension you want to ‘slice’ the pie by to the Colour shelf, changing the mark type to pie chart, and adding your measure to the Angle shelf.

a basic pie chart in Tableau


Now create an axis for this pie chart to sit on. Double click in the Rows shelf and type MIN(0). This will add an axis to the display.

MIN(0) will generate an axis for the pie chart to sit on in Tableau


Create a second instance of the axis, by again double clicking on Rows and typing MIN(0). You’ll now have two pie charts displayed and two MIN(0) marks cards.

Adding another instance of MIN(0) will generate another axis in Tableau

Make the chart dual axis and synchronise the axis. This will layer the two pie charts on top of each other.

Remove Measure Names from the All marks card. This has been automatically added.

Then on the second MIN(0) marks card, change the mark type to circle, remove all the pills from the marks card shelf, and change the colour to white (or whatever you want the colour to be.

Adjust the Size on both marks cards so the pie chart (the first card) is bigger than the circle. You should now have a donut.

a basic donut chart using dual axis in Tableau

You can then remove all gridlines, zero lines, axis rulers, row/column dividers, and hide the axis headers.

The centre of a donut chart is often used to add further information to the chart; this may be a title to describe what the chart is showing, or perhaps a key KPI that the donut visual supplements.

Just add the relevant information to the Label shelf of the second marks card (the circle mark) and align middle centre.

enhancing donut charts in Tableau with text

Using map layers to build donut charts

You can also use the map layer functionality to build a donut chart (v2020.4 or greater only). The benefit of using this method is you can add more layers than just the ‘pie chart layer’ and the ‘circle’ layer.

You can also disable layers so they are not inadvertently clickable.

But let’s just start with a basic donut (if you’ve read the How to label pie charts in Tableau post, these steps will be familiar).

Building the first map layer

In order to use map layers, you must use a field with a geographic data type. As we’re not using one in this chart, we need to make one.

Create a new calculated field:

Zero
MAKEPOINT(0,0)

Double click this field, and it will automatically add the point centrally onto a map with Longitude and Latitude fields automatically generated too.

adding MAKEPOINT(0,0) to the canvas in Tableau places a single point in the middle of a map of the world

Add the field you want to ‘slice’ your pie with (in this case Segment) to Colour and adjust the colours. Change the mark type to pie chart and add your measure (in this case Sales) to angle. Increase the size to be as large as possible.

creating a single pie chart on a map in Tableau

To increase the size further beyond that possible with the slider on the Size shelf, use Ctrl-Shift-B (Windows) or Cmd-Shift-B (Mac) to increase the size (Ctrl-B / Cmd-B to reduce).

using keyboard shortcuts to increase the size of a pie chart on a map in Tableau

Building the second map layer

Drag Zero onto the map canvas and drop it over the Add a Marks Layer section that displays. This will add a second marks card called Zero(2)

adding a marks layer to a map in Tableau


Rename the marks card labelled Zero to Pie Chart, and rename the marks card called Zero(2) to Centre Circle as this will make it easier to manage the layers (and these instructions).

Change the mark type of the Centre Circle marks card to circle. Set the colour to be white and increase the size so it is smaller than the outer pie chart, but leaves a suitable amount displayed.

a smaller circle mark creates the centre of a donut chart in Tableau


Finally remove the background map (from the Map menu, select Background Maps > None). This will result in the chart being displayed with traditional axes.

a basic donut chart with map layers in Tableau.

Extending the concepts

By using map layers, you can add further layers (by adding further instances of Zero onto the chart).

In the image below, concentric circles have created a double-ring donut by using 4 map layers, where each new layer is sized smaller than the previous. Both the outer and inner sectioned layers are split by the same dimension, so the outer white ring is purely for visual effect.

using map layers in Tableau to create double ring donuts.

In this example, a double ring has also been created, but the visual displays a more ‘hierarchical’ effect.  The inner donut is split by a dimension (in this case Category), and the outer donut is then split by the next dimension in its hierarchy (in this case Sub-Category).

Colours from the same hue are then used to ‘link’ the two dimensions together.

a hierarchical double ring donut


In this next example, the map layers are being used to create the double ring, and to also label some of the layers. In this case the dimensions splitting the rings are not directly hierarchical like the example above but the concept still works, to show the breakdown of survivors of the Titanic by class.

double ring donut chart in Tableau depicting survivors of the Titanic by class.

Note - data sourced from https://statdoe.com/pie-donut-chart-in-r/


And finally, in this example two map layers are used to give the appearance of a ‘partially eaten’ or ‘broken’ donut.

Broken or ‘partially eaten’ donut chart in Tableau


This works best for a boolean true/false or yes/no type split. One value of the dimension splitting the pie (in this case the False option) is coloured white (or the same as the background), and then a central circle is layered on top.

This concept can be further expanded to visually reconnect the broken ends with a thin line, by adding another circle layer that is set to 0% opacity, but has a coloured border.

The ‘colour’ of the dimension previously coloured white in the example above, now needs to use a transparent white colour instead (see here for further details on what this is and how to set it up).

Using a thinner line to connect a broken donut chart in Tableau

Summary

The introduction of map layers certainly helps extend the possibilities of the different types of donut chart visuals that can be achieved. A workbook to accompany this blog post is accessible from here.

Facts & figures

About client

Testimonial

Blogs you might also like

5 Ways to Level Up Your Bar Chart Using Tableau Parameter Actions

5 Ways to Level Up Your Bar Chart Using Tableau Parameter Actions

Tableau Parameter Actions are a great feature in Tableau. Read all about it in our latest blog.

BI & Analytics
Blog
Tableau
Everything you need to know about Tableau Certifications

Everything you need to know about Tableau Certifications

Thinking of taking one of the Tableau Certifications? We explore how to get ready in our latest blog. Read all about it here.

BI & Analytics
Blog
Tableau
Personalise your Tableau Dashboard with Custom Titles

Personalise your Tableau Dashboard with Custom Titles

Learn about how to add the personal touch to your Tableau Dashboard with custom titles.

BI & Analytics
Blog
Tableau
Bar Charts: The Good, the Bad, and the Ugly

Bar Charts: The Good, the Bad, and the Ugly

Why can bar charts be effective and how to use them to get answers easier, and faster!

BI & Analytics
Blog
Tableau
How to create a waterfall chart in Tableau

How to create a waterfall chart in Tableau

Learn how to create your own waterfall charts in Tableau Desktop by following these steps.

BI & Analytics
Blog
Tableau
The Ultimate Guide to Embedded Analytics

The Ultimate Guide to Embedded Analytics

Discover what embedded analytics is all about and how it can drive additional revenue streams for your business.

BI & Analytics
Blog
ThoughtSpot
How to label pie charts in Tableau

How to label pie charts in Tableau

Learn more on how to label pie charts in Tableau like a pro.

BI & Analytics
Blog
Tableau
How to label bar charts in Tableau

How to label bar charts in Tableau

Learn how to label bar charts in Tableau like a pro and level up your dashboard design. Read the full article here.

BI & Analytics
Blog
Tableau
How to ace your ThoughtSpot certifications?

How to ace your ThoughtSpot certifications?

Learn more about ThoughtSpot certifications and how to ace your exams.

BI & Analytics
Blog
ThoughtSpot
How to stop marks being highlighted when ‘clicked’ in Tableau

How to stop marks being highlighted when ‘clicked’ in Tableau

Learn how to stop marks from being highlighted when clicked in Tableau.

BI & Analytics
Blog
Tableau
How to Create Multiple Select Parameters in Tableau

How to Create Multiple Select Parameters in Tableau

Learn how to create multiple select parameters in Tableau to add more control and interactivity to your analysis.

BI & Analytics
Blog
Tableau
How to apply conditional formatting to tooltips in Tableau

How to apply conditional formatting to tooltips in Tableau

Learn how to apply conditional formatting to tooltips in Tableau with our step-by-step guide. Improve your data visualization skills today with Biztory.

BI & Analytics
Blog
Tableau
Rediscovering Business Intelligence with Sigma Computing

Rediscovering Business Intelligence with Sigma Computing

Discover how Sigma Computing is reshaping the BI landscape with its user-friendly interface and powerful capabilities.

BI & Analytics
Blog
Sigma
Sigma Computing: Our Favourite Features

Sigma Computing: Our Favourite Features

Discover our favourite features of Sigma for powerful and fun data analysis.

BI & Analytics
Blog
Sigma
Tableau vs. Power BI: Everything to know

Tableau vs. Power BI: Everything to know

Compare Tableau and Power BI to determine the best business intelligence tool for your needs.

BI & Analytics
Blog
Tableau
Tableau Map Layers: Getting Started (1/3)

Tableau Map Layers: Getting Started (1/3)

Learn how to leverage Tableau's Map Layers feature to create complex visualizations.

BI & Analytics
Blog
Tableau
Tableau Map Layers: Pull everything into one view (3/3)

Tableau Map Layers: Pull everything into one view (3/3)

Use Tableau Map Layers to combine multiple visuals in a single worksheet and create custom dashboard views for enhanced data visualization.

BI & Analytics
Blog
Tableau
Tableau Map Layers: Building Different Charts (2/3)

Tableau Map Layers: Building Different Charts (2/3)

Learn how to create Pie, Doughnut, Line, and Area charts using Tableau Map Layers.

BI & Analytics
Blog
Tableau