Introduction
In this blog, we are going to see how to create sunburst chart. before going to start, we need to know how to create the donut chart. If we know the concept how to create donut chart, it will be easier to understand the sunburst chart. For that you can go through my previous blog after that we can start here and create the sunburst chart. Here are the steps to create the sunburst chart.
Steps
Step 1 - Open tableau public and load the dataset. Then go to sheet 1
Step 2- We need to create one calculated field, Left side of the screen, we have one search bar near by that we have one down arrow click on that and click on the create calculated field, and the screen looks like the below one,
Here we are able to see the calculated field. In this, we need to create the Make point(0,0) and give the title as center as shown given below,
Like this we need to create that calculated field.
Step 3 - Drag that "center" calculated field into anywhere inside the sheet and drop it. Then the screen will appear like this below image,
This above image is the one which will appear once we drag that center into anywhere of the sheet
Step 4- Next step, we need to drag again the center into the sheet, while dragging we are able to see the marks layer, we have to drop it there, the marks layer is shown below,
Depends on how may layers we want, we need to drag the center that much times and drop it into the marks layer, we can create many layers, Here we are going to create three layers ,one is outer layer, another one is inner layer and the another one is circle.
After that we need to remove everything from rows and columns and the marks image is shown below,
Step 5- We need to rename the layers but before that, we need to change colors and size in each layer to identify the layer. we will see what we need to change in each layers one by one given below,
Layers Color Size Name Chart
Center 3 into Yellow Small Inner Layer Circle
Center 2 into Blue Medium Second Layer Pie
Center into Green Large Outer layer Pie
These are all the changes we need to make, these colors are made only for the differentiation, if we want, we can change colors. After making all changes, Our chart will look like given below,
Step 6 - Next step is we need to give one measure value in label at inner layer, and make center alignment by clicking label in the inner layer then the chart looks like below one,
Step 7 - Next we need to select one dimension and drag and drop that dimension under the second layer in color and label under the marks
Drag the measure whatever we dragged in the inner layer, we need to drag that and drop in the angle in the second layer, after these two things, our chart looks like below one,
Till now, we completed two layers. Now ,we are going to work on the Outer layer
The Outer layer is little complicated when compared to the other layers. we need to do it a little bit carefully.
Step 8 - I will make this step 8 into the pointers to make it simple,
1. Drag the same measure which we used in the inner and second layer into angle in the Outer layer.
2. Then drag that dimension which we used in the second layer into color in the Outer layer.
3. Now the second dimension which we need to show in the Outer layer, we need to drag and drop that dimension in the detail in Outer layer. Then we need to check that detail and change into color which we shown in the given below image,
4. Now drag that dimension what we just changed to color, drag the same dimension and drop it in the label.
These are the four important things, which we don't even need to change the order, if we change the order we are unable to get the exact logic in the sunburst chart.
Once we completed all these steps exactly, then the final chart will looks like the below chart,
This is the final sunburst chart we got.
Tips
There are the three important tips we used in the whole sunburst to get image like the final One ,we are going to see one by one,
1. We can change the colors of sub categories by clicking the colors under the layers. When we click on that, the screen will be like the image given below,
From this set of colors ,we can select from the left side which color we are going to change and in the right side, we can select what color we are going to place for that replacement and for the the group of colors, we can give assign palette. and check okay.
2. We can change the style of the text by clicking the label, and we are able to see the screen like below,
Here we can change the color, style and size of the text.
3. We can change the alignment and the other things by clicking the labels and alignment and the screen will look like the below one,
These are all the some tips i used to create the final beautiful sunburst chart. While we working on that sunburst , we came to know why the concept of donut is important. Now we are going to see when we are going to use these sunburst chart.
When
1. Sunburst chart is used if one measure and one or more dimensions (are inter related) like categories and subcategories. Like donut, For example How much Profit is shared for categories and sub categories like that situation we can use this sunburst chart.
2. We must avoid if both the dimensions are not related to each other.
Here we came to know How we can easily create the sunburst chart step by step.
Thank you!
Comentários