creating an onion chart using tableau in case you’re wondering why it’s called an onion chart it gets its name due to its similarity to a cross-section of an onion as you see this chart is made up of circles inside circles the varying circle sizes are based on lower to higher values which help in other plans analysis

→Let’s learn how we can access sales across multiple states using an onion chart

we will begin by connecting to the sample superstore data set which is provided by default when we installed the tableau now go to sheet one first, let us calculate sales per state.

## Step1:

create a calculated field with the name sales per state formula below,

calculates the maximum value of sales from all the states available in the pane and we will call this field sales per state and click OK. sales per state will act as the radius.

## Step2:

we will create 3 calculated fields using basic trigonometric functions to get the values for index the X position and the Y position below.

## Step3:

Now let us start by creating the chart Drag and drop the X position on the column shelf and Y position onto the Row shelf.

This results in a single mark on the view now in order to break the mark for each state let us place the state in the colour card as you see this place is the marks along the Y-axis

As for the sales for every state now in order to facilitate added glance analysis let us simplify the view of this chart to trace a circular path for every mark.

## Step4:

we need values from 0 to 360 which can be achieved using two very simple steps.

The first step involves → creating a calculated field called padding now this formula assigns a value of 0 for the minimum ordered date for every state and a value of 360 for all the other states.

The second step involves →step number two is to create a bin to bucket the padding field values from zero to 360

→so let us right-click the padding field and create a bin

→let us assign a bin size of 1

→set a mark type to line and drop the padding bin field into the path card now

## Step5:

Let us edit the table calculations to get a desired visualizations

→Now when you right-click the X position fields and compute using padding bin

→Then make the same changes for the Y Position field

Let us add this state to the label to make the chart more informative if you really want this to resemble and watering onion we can edit the Y position calculated field below and select fit width for Broder view and there is an onion chart.