top of page
Writer's pictureWesley Magee

How To: Donut Charts in Tableau


They're the latest fad in data viz. Ok, maybe not the latest, but they are experiencing an increase in acceptance. They're a way of fighting against traditional "best practices". It's your way to tell the world "you might frown on my pie charts, but I can sneak one in by taking a bite out of the middle". They're donut charts.

I have mixed feelings about the use of donut charts in a business context, but that is for another day. The real question we want to answer is how do we make them in Tableau quickly and easily?

Here's the short of it: You're going to make two pie charts...then make one bigger than the other. It's as simple as that. Here's the step by step...

Create a Spacer
Drag Spacer to Rows Shelf
Change Mark Type to Pie
  1. Create a "Spacer". This is just a calculation labeled "Spacer" where the equation is Min(1). This is a common trick used to apply formatting to a graphic without altering the data.

  1. Drag the "Spacer" onto the Rows shelf twice. You can drag it onto the rows shelf once and then just hold Control to drag and duplicate it.

  1. Change the Mark Type to Pie. This will change both spacers into pies. They will just be circles at this point

  1. Remove the extra formatting. Right click in the window and select format. From there remove borders and grid lines. At this point you should just have two circles.

  2. Make you chart a Dual Axis. Right click the Spacer to the right and select "Dual Axis".

  3. Make the circle as big as you can. Select the first Spacer from the Marks cards and click on "Size". Resize the circle to make it as big as you can and still fit in your screen. It will also help to select "Entire View" for the sheet, so it's centered and encompasses the whole view.

  4. Build a normal pie chart. While still using the first Spacer in the Marks card: a. Drag your dimension (I used Category for the example) to the Color Marks card b. Drag your dimension to the Label Marks card c. Drag your measure (I used Profit for my example) to the Angle Marks card d. Drag your measure to the Label Marks card

  5. Format your inner pie chart. a. Click the Color Marks card and change it to white or whatever your background color is b. Click the Size Marks card and expand the inner circle until your happy with the size of the hole in your donut c. Drag you measure to the Label Marks card and click on the Label Marks card to change the formatting and make the label larger

  6. (Optonal) Change the sort order of your dimension. This is a personal preference, but it's easier to read a multi-category donut if the largest slice goes first and then goes in descending order. Do this by a. Clicking on your dimension in the Marks window (any one will work) and select "Sort" b. Select Sort order: "Descending", Sort by: "Field", and select your measure from the dropdown.

Change Dimension Sort Order
Donut Chart Example

That's it! Let me know if you know of any shortcuts or different approaches to making a donut chart.

737 views
  • LinkedIn
  • Instagram
  • Pinterest
  • Twitter
  • tableaulogo
bottom of page