While working as a sales analyst for a retail company, I have to create a data visualization to display different product categories and their subcategories, which contribute to overall sales.
Using Tableau, I created a Sunburst chart to visualize this data. In this chart, the inner ring represents the three main product categories: Furniture, Office Supplies, and Technology, each sized by its total sales contribution. The outer ring displayed the sub-categories within each main category, also sized proportionally to their sales.
In this Tableau tutorial, I will explain what a Sunburst chart is in Tableau and the methods to create a Sunburst chart in Tableau.
What is a Sunburst Chart in Tableau?
In Tableau, a Sunburst chart is used to display hierarchical data, which is represented by nested, layered data in a circular chart. Each layer represents part of a hierarchical data structure, with the innermost layer representing the top level.
The size of each segment within a ring or layer indicates the proportion or value it represents within that level of the hierarchy.
For example, to visualize the sales hierarchy with Category > Sub-Category > Region. The innermost layer would display the three main product categories (Furniture, Office Supplies, Technology). The next layer would break each category into its subcategories, and the outermost layer would display sales distributed across different regions.
In Tableau, we don’t have a built-in option to create a Sunburst chart. To display the Sunburst chart, we need to customize and overlap the pie charts.
Create a Sunburst Chart in Tableau
In Tableau, there are two ways to create a basic Sunburst Chart.
- Create a Sunburst chart using a dual axis in Tableau
- Create a Sunburst chart using map layers in Tableau
Create a Sunburst Chart Using a Dual Axis Pie Chart in Tableau
To create a Sunburst chart in Tableau, we will use the Superstore data. After connecting the data source with Tableau, follow the steps below.
- Select the Marks type as Pie and drag the Sub-category to the Color card. After this, add the Sales to the Angle card.

- In the rows shelf, create a calculatice field twice with value as MIN(0). With this we will have two pie charts that we will overlap in the further steps.

3. Now, in the first calculative axis, drag the Subcategory to the Details card. After this, change the card type from Detail to Color.

With this, in the first axis of the Subcategories will be colored following the color pallete of the Category pie chart color.

- Now, we will overlap the pie charts. The category will be in the centre, overlapping the subcategory pie chart. For this, adjust the sizes of pie charts from the size card and ensure that the category chart is smaller in size.

- To overlap the charts and display them as a Sunburst chart, click on the second axis (Category) in the rows and select Dual axis.

Now, you will see the Category at the center and Subcategory in the outer ring. Here, each product category and subcategory will be in alignment in inner and outer rings of the chart.
- At last, to display the sales values, add the Sales measures to the Label card of Subcategory Marks section.

This way, we can create a Sunburst chart in Tableau using the dual-axis pie chart.
Check out: Tableau Dual Axis Chart
Create a Sunburst Chart Using Map Layers in Tableau
Another way to create a Subburst chart in Tableau is by using the Map layers. In the Map layers, we can also add an inner and outer ring to the category and subcategory using the calculative field.
Follow the steps below to create a Sunburst chart using Map layers in Tableau.
- Create a calculative field with formula MAKEPOINT(0,0), label it as Position, and click OK.

- In the data fields, double-click on the calculated field Position, and then it will be added to the Rows and Columns as Latitude and Longitude.

- After this, set the Marks type to ‘pie’, then add ‘Category‘ to ‘Color‘, and ‘Sales‘ to ‘Angle‘.

- Drag the calculated field ‘Position‘ to the map on Add a Marks Layer. This will create two layers in the Marks section. The existing one will be Position, and the new marks layer will be Position(2).

Here, rename the Position as Category and Position(2) as Sub Category.

Check out: Tableau Gauge Chart
- In the second layer, Subcategory, change the Marks type to Pie. Next, add ‘Category‘ to the Color card and ‘Sales‘ to the Angle card.

- In the Sub-Category marks, we also need to add color for sub-categories, but we can’t add Sub-category to the color card. For this, first add the Sub-category to the Detail card, then change it to Color.

With this, the secondary color palette Sub-Category will follow the primary color palette of Category.

- To make the overlapped pie charts visible, we need to increase the size. For that, go to the Marks section and, in the Size card, adjust the slider to increase the size. Repeat this step for both mark layers.

Now, can see that the two-layered sunburst chart is created where the color palette of Category is followed by the Sub-Category.
Check out: Donut Chart in Tableau
- To add a circle ring between layer one (Category) and layer two (Sub-Category), create a calculative field.
Label the field as Empty, and the value for the field will be ‘Empty’.

- Add the calculative field ‘Position’ to the Marks Layer to create another layer that will be displayed as a white ring. After this change, label the new layer as Outer Ring.

- In the Outer Ring layer’s Marks section, select the type as Pie Chart, and add a calculative field “Empty” to the Color card. In the Color, select the white color to make the ring visible.

- Here, we want the circular ring between layer one (Category) and layer two (Sub-Category); for that, drag the Outer Ring marks between Category and Sub-Category.

With this, a circular ring will be added between the inner and outer layer.
- To add an inner circle, follow the same process as we have done for the outer circle.
Drag the Position field to the Map layer > Label it as ‘Inner Circle‘ > Set chart type to pie> Add ‘Empty‘ field to the Color card.
After this, adjust the slider from Size to increase the circle’s size.

Check out: Sankey Chart in Tableau
- To increase the Size of the Sunburst chart, press “Ctrl + Shift + B”.
To remove the map from the background, click on the Maps tab and select Background Maps > None.

To remove the Latitude and Longitude grid lines, right click on the chart and select Format. In the Format tab, click on the Lines icon, then select all Lines as None.

This way, we can create a Sumburst Chart in Tableau using the Map layers, where we can add an inner circle and a ring between two layers.
Conclusion
In this Tableau tutorial, we have learned how to create a Sunburst chart in Tableau to visualize data with hierarchy in sales data, such as Category and Sub-Category. Since Tableau doesn’t have a built-in Sunburst chart option, we discussed two methods for this chart: using dual-axis pie charts and using map layers.
The dual-axis approach involves overlapping two pie charts to represent inner and outer rings, while the map layers method consists of adding inner circles and separator rings between layers.
You may like to read:
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.