How do I add DONUT CHARTS over a FILLED MAP in Tableau?

by Cecily Santiago

Have you ever wanted to show donut charts hovering over locations in a map in Tableau but didn't know how without floating the donut charts? Maybe you were able to achieve pie charts over the map but couldn't get the center to cut out?

Here's a step-by-step guide using Tableau's built-in Superstore data with screenshots of each step.

A filled map of the US with donut charts for each region
  1. Create your filled regions map.
    1. Drag 'Country/Region' to the Filters Card and select 'United States.'
    2. Drag 'State/Province' onto Detail on the Marks Card.
    3. Drag 'Region' onto Color on the Marks Card.
    4. Using the drop down in the Marks Card, set the Marks Type to Map.
Set up your Filters and Marks Cards as shown
This is the result you should get
  1. Format the Map Layers.
    1. Open the Map menu in the Menu Bar and select 'Background Layers...'
      The Background Layers panel will open on the left side of your window.
    2. Use the slider to set 'Washout (%)' to 100%.
    3. Uncheck all of the Background Map Layers.
    4. Click the [x] in the upper right corner of the panel to get back to your Data panel
Open the Background Layers panel
Set the Washout to 100% and turn off all Background Map Layers
This is what you'll see after formatting the Map Layers
  1. Format the Map Colors
    1. On the Marks Card, click into the Color menu.
    2. Set 'Opacity' to 100% using the slider.
    3. Set 'Border:' to 'None' using the dropdown.
    4. Click into 'Edit Color...' to change your colors, if desired.
Turn opacity up and borders off. Edit colors to change your palette.
You'll see something like this when you're done.
  1. Add a new Marks Layer to your map.
    1. Drag the 'Region' pill from the Data panel to the upper left corner of your map.
      A box will appear there that says 'Add a Marks Layer'
    2. Drop the 'Region' pill onto the layers icon in this box. The icon will turn orange when you can drop your pill.
      You will now see a new section in your Marks Card where you can control this layer.
Add a new Marks Layer to your map
There is now a new section in your Marks Card
  1. Set this layer to show pie charts.
    We will create pie charts of Sales by Customer Segment
    1. Using the drop down in the Marks Card, set the Marks Type to Pie.
    2. Drag the 'Region' pill onto 'Detail.'
      This creates one mark for each region.
    3. Drag the 'Sales' pill onto 'Angle.'
    4. Drag the 'Segment' pill onto 'Color.'
    5. Click into 'Size' and make the pie charts as large as you would like.
    6. Click into 'Color' and click 'Edit Colors...' if you want to change the color palette.
Configure the Marks Card to build your pie charts. Make sure you have 'Region' on detail.
You should now have a filled map with a pie chart over each region.
  1. Add another marks layer to your map.
    Follow the instructions from Step 4.
You will now have three sections in the Marks Card.
  1. Set this layer to create the donut holes for the donut charts.
    1. Using the drop down in the Marks Card, set the Marks Type to Circle.
    2. Make sure the 'Region' pill is on Color. Since we already set colors for each region, the new circles should already match the backgrounds!
    3. Click into Size and use the slider to make these circles almost as big as your pie charts.
    4. Drag 'Region' onto Label.
    5. Click into Label, click the dropdown for Alignment, and set it to center alignment both horizontally and vertically.
Set your mark type to 'Circle.' Put 'Region' on Color and Label. Change the alignment of the label to be in the middle of the donut.

Voila! You've created a filled map with donut charts!

You can see my Donut Map Dashboard and download the workbook.

Now that you know the process, you can tweak the formatting to your liking or replace 'Region' with any other geographic object. I recently used this method to create 'Acorn Charts' (like donut charts but with acorns in the center instead of circles) marking NYC parks and showing the percentage of squirrels with different colors of fur for my Squirrels Dashboard.

EDIT TO ADD: Removing state borders on Tableau Public

Originally, when I uploaded this dashboard to Tableau Public, the borders for the states popped back up. I tried taking 'State' off of Detail on the filled map, but then Canada reappeared on my map, which I didn't want. Thanks to a suggestion from Salome Grasland, I added a data source filter to only show the US instead of dimension filter.

[Read: Tableau: Apply Data Source Filters by Nitesh Shrestha]