"A Beginner’s Guide to Create Sunburst Chart in Tableau"
A Sunburst Chart is a multi-level pie chart that shows how data is broken down across multiple hierarchical levels. Each level of the hierarchy is represented as a ring or circle, with the innermost circle being the top-level category. As you move outward, each ring represents a deeper level of the hierarchy.
Imagine peeling an onion in reverse—each layer reveals more detail, and all layers together show the big picture.
Uses: Sunburst charts are particularly useful when:
You need to visualize hierarchical data with multiple levels.
You want to show proportional relationships within and across levels.
You aim for a visually engaging dashboard without sacrificing data clarity.
Anatomy of a Sunburst Chart
Center Circle: Represents the root or top-level category.
Rings (Levels): Each concentric ring represents a deeper level in the hierarchy.
Arcs: The size of each arc is proportional to the value it represents.
Colors: Typically used to distinguish categories or indicate metrics (e.g., performance, risk).
How to Build a Sunburst Chart in Tableau
Required:
Tableau Desktop (any recent version)
A hierarchical dataset (e.g., Category → Sub-Category → Product)
A measure (e.g., Sales, Quantity) to size the chart segments
Step-by-Step Instructions
Step 1: Prepare Your Data
You need to create a dataset that reflects hierarchy. Here's an example structure:
Level 1 (Category) | Level 2 (Sub-Category) | Level 3 (Product) | Sales |
Furniture | Chairs | Office Chair | 200 |
Furniture | Chairs | Gaming Chair | 400 |
Technology | Phones | iPhone | 800 |
Each row should represent a full path from top to bottom level.
Step 2: Create a Path Field
To build a radial chart, Tableau needs points to draw paths between levels. You must generate points that represent each part of the arc using a data scaffold technique.
You can do this in two ways:
Use a scaffold file with values from 0 to N (e.g., 0–360 to simulate degrees of a circle).
Create a calculated field for path generation inside Tableau.
A sample scaffold table would look like:
Path ID |
1 |
2 |
3 |
... |
360 |
Then join this scaffold with your main dataset using a cross join (using a dummy field like “1” = “1”).
Step 3: Create Calculated Fields for the Radial Layout
You’ll need to calculate X and Y coordinates to position each point on a radial axis.
Examples of Calculated Fields:
Angle:
plaintext
CopyEdit
[Path ID] (2 PI() / 360)
Radius (based on hierarchy level):
plaintext
CopyEdit
CASE [Level] WHEN "Category" THEN 1 WHEN "Sub-Category" THEN 2 WHEN "Product" THEN 3 END
X Coordinate:
plaintext
CopyEdit
[Radius] * COS([Angle])
Y Coordinate:
plaintext
CopyEdit
[Radius] * SIN([Angle])
Step 4: Build the Visualization
Drag X to Columns and Y to Rows
Change the mark type to "Polygon"
Drag Path ID to Path
Drag your hierarchy fields (e.g., Category, Sub-Category, Product) to Detail
Drag your measure (e.g., Sales) to Color or Size
Step 5: Final Touches
Adjust the color gradient for better visibility.
Use tooltip customization to show hierarchy and value details.
Hide headers and axis lines for a cleaner radial look.
Consider duplicating the sheet to create labels using scatter plots.
Conclusion
Creating a Sunburst Chart in Tableau takes some creative data manipulation and calculations, but it’s a rewarding way to visualize complex hierarchies in a beautiful and interactive format.
This is how a sunburst chart looks like



