How to Make a Sunburst Chart in Tableau with AI

Cody Schneider

Building a sunburst chart in Tableau can feel like a daunting task, as it isn’t a native, one-click option. These visually striking charts are incredible for displaying hierarchical data, but the traditional manual process involves a mountain of calculated fields and data densification tricks. This article will show you a much simpler, AI-assisted approach to creating them, so you can get the visualization you want without the technical headache.

What is a Sunburst Chart and When Should You Use One?

Think of a sunburst chart, also known as a radial treemap or multi-level pie chart, as a series of rings surrounding a central circle. The innermost ring represents the top level of your hierarchy, and each subsequent outer ring breaks that category down into its sub-categories. The size of each segment corresponds to its value, making it easy to see the proportions within your data structure.

For example, if the inner ring shows total sales by continent, the next ring out could break down each continent's sales by country, and a third ring could break down each country's sales by product category.

Common Use Cases for a Sunburst Chart:

  • E-commerce Product Analysis: Visualizing sales broken down by Category (e.g., Electronics), then by Sub-Category (e.g., Laptops, Phones, Headphones), and even by Brand.

  • Marketing Campaign Performance: Showing website sessions broken down by Channel (e.g., Organic Search, Paid Social), then by Source (e.g., Google, Facebook), and then by Campaign.

  • Budget Allocation: Representing a company budget divided by Department, and then by specific Projects or Expense Types within each department.

When to Avoid a Sunburst Chart:

While powerful, they aren't perfect for every situation. Avoid using them when:

  • Your segments have similar values: It's difficult for the human eye to compare the angles of different slices accurately, especially in the outer rings. A bar chart would be better for precise comparisons.

  • You have a deep hierarchy: A chart with more than three or four levels can become cluttered and hard to read, defeating its purpose.

  • You have a very long list of sub-categories: An outer ring with dozens of tiny slices will be unreadable.

The Traditional (and Complicated) Way to Build Sunburst Charts in Tableau

To appreciate the simpler AI approach, it helps to understand why building a sunburst chart in Tableau manually is so challenging. Unlike Excel, which has a built-in sunburst chart type, Tableau requires you to construct it from scratch using some clever math and data manipulation.

The traditional method typically involves these steps:

  1. Data Duplication: You often need to duplicate your entire dataset to create a "path" for Tableau to draw the inner and outer circles. This is commonly done with a union in the data source pane.

  2. Creating Numerous Calculated Fields: This is where most people get stuck. You have to create a series of complex calculated fields to handle the geometry of the chart, including:

    • Fields for X and Y coordinates using trigonometry (Sine and Cosine).

    • Calculations for the angle of each slice.

    • Nested table calculations to determine positioning.

    • Calculations to manage spacing and paths.

  3. Precise Configuration: After creating the calculations, you have to carefully place them on the correct shelves (Rows, Columns, Marks card) and configure the table calculations' Compute Using settings with extreme precision. The slightest misstep can break the entire visualization.

This process is time-consuming, requires a deep understanding of Tableau's advanced features, and is difficult to troubleshoot. One small error in a formula can leave you wondering why your chart looks like abstract art instead of a clean sunburst.

Why Use an AI-Assisted Approach for Chart Creation?

The difficulty of the manual method is precisely why AI-powered tools are changing the game. Instead of you needing to become an expert in trigonometry and nested table calculations, you can rely on an AI agent that already understands the complex steps required.

Lowering the barrier to entry

Many business professionals, marketers, and founders don't have the 80+ hours it takes to become truly proficient in an advanced BI tool like Tableau. AI removes this gigantic learning curve. If you can describe the chart you want in plain English, you can create it. AI tooling abstracts away the technical complexity, empowering every member of your team - from the most junior analyst to the CEO - to get answers from data without needing specialized knowledge.

A simple prompt like, "Show me website traffic by country as a sunburst chart, broken down by device type" contains all the context a smart AI needs. It understands "sunburst chart" as the desired visualization type, "website traffic" as the metric, and "country" and "device type" as the hierarchical dimensions. The AI handles the data wrangling, calculations, and chart construction in the background.

Saving time and accelerating insights

Even for experienced Tableau developers, the manual "busy work" of building a sunburst chart is tedious. It's time that could be better spent analyzing the results and making strategic decisions. AI handles the heavy lifting in seconds, not hours. This drastically speeds up the entire reporting workflow. Instead of spending your Monday downloading data, wrangling it in Tableau, and building the visuals, you get an answer in real time and can spend the rest of your week acting on it.

Step-by-Step Guide: Building a Sunburst Chart Using AI

The specific steps will vary slightly depending on the AI tool or extension you use, but the general workflow is centered around natural language and automation.

Step 1: Get Your Data Ready

First, ensure your data is structured properly for a hierarchical chart. You need separate columns that represent the different levels you want to display. Let's use a simple sales dataset as an example. Your data in a spreadsheet or database might look like this:

Category

Sub-Category

ProductName

Sales

Apparel

Shirts

T-Shirt

1500

Apparel

Shirts

Polo Shirt

2200

Apparel

Jackets

Denim Jacket

3100

Home Goods

Kitchen

Coffee Maker

1800

Home Goods

Kitchen

Blender

1200

Home Goods

Decor

Picture Frame

800

Here, the hierarchy is Category -> Sub-Category.

Step 2: Connect Your Source to an AI Tool

Connect your data source to an AI-powered analytics platform. Good tools will have one-click integrations with common sources like Google Sheets, databases, or even allow you to upload a CSV file directly. The key is to get your structured data into an environment where the AI can work with it.

Step 3: Write Your Prompt

This is where the magic happens. Instead of dragging and dropping pills and writing formulas, you simply type what you want to see. Using our example data, your prompt could be:

“Create a sunburst chart showing the sum of sales broken down by Category and then Sub-Category.”

A good AI agent doesn't need perfect syntax. You could also try something more conversational, like:

“Build a sunburst of my sales. I want to see the main categories on the inside ring and sub-categories on the outside.”

Step 4: Let the AI Generate the Visualization

Once you enter the prompt, the AI gets to work. In seconds, it will:

  • Identify the dimensions (Category, Sub-Category) and the measure (Sales).

  • Perform the necessary aggregations (SUM of Sales).

  • Calculate the angles, coordinates, and paths required to draw the chart.

  • Render a fully interactive sunburst visualization for you.

Step 5: Review and Refine in Tableau

The AI-generated chart gives you a massive head start. From here, your workflow can branch. Some AI tools can export a configured .twbx file that you can open directly in Tableau. Others, designed as comprehensive dashboarding tools themselves, allow you to fine-tune the chart right there.

If you bring the chart into Tableau, you can use all of Tableau's powerful formatting features to perfect it. You can:

  • Customize Colors: Apply your brand color palette or use a sequential palette to highlight values.

  • Refine Tooltips: Edit the tooltips to show the category name, the exact sales value, and the percentage of the total for each segment.

  • Integrate with Your Dashboard: Add the sunburst chart to a larger dashboard and set up filter actions, allowing users to click a segment on the sunburst to filter other charts on the page.

Best Practices for an Effective Sunburst Chart

Now that you've built your chart, here are a few design tips to make sure it's clear, insightful, and easy for your audience to understand.

  • Keep it Simple: Limit your hierarchy to two or three levels at most. Beyond that, the outer rings become too sliced up to be useful.

  • Use Color Strategically: Don't just assign random colors. Use color to either distinguish between the top-level categories or use a sequential gradient to represent the value of each slice (e.g., darker blue for higher sales).

  • Sort Your Segments: Order the segments in each ring from largest to smallest. This draws attention to the most significant components of each category.

  • Leverage Interactivity: A cluttered chart with too many labels is hard to read. Instead, keep the visual clean and provide detailed information - like specific values or percentages - in tooltips that appear on hover.

Final Thoughts

Sunburst charts are an excellent way to visualize how a whole is divided across multiple hierarchical levels. While creating them traditionally in Tableau is a complex process reserved for advanced users, AI tools completely transform the workflow, making powerful visualizations accessible to everyone, regardless of their technical skills.

We built Graphed to solve this exact problem - eliminating the complex, manual work of building advanced visualizations. Instead of fighting with calculated fields in Tableau, you can connect your data sources to Graphed and ask in plain English to build real-time, interactive dashboards instantly. It turns hours of technical setup into a simple conversation, letting you get straight to the insights.