Are you bored of using a basic Pie chart in your visualization? Then this blog is for you. In today's blog, we will discuss step-by-step procedures to create a donut chart. Along with the donut chart, there is a much more so stick around. Let's start with a basic donut chart which proves to be the best alternative to the pie chart. A donut chart is a type of Pie chart where the center is carved out so that you display text in the carved-out space.
Pro Tip-: Donut chart can be used to display your KPIs and you can use it to display ratios and percentages. But if you are trying to visualize more than 5 categories try to avoid the donut chart because it will hamper the quality of visualization. The stakeholders expect to see clear visualization where the graphs tell their story by themselves.
(For more pro tips do follow our blog )
So let's get started!!!! To create the donut chart we are using the sample superstore data and will highlight all the steps from scratch.
To start off we are considering the orders table and create a calculated field (reference) that is 0. Take the calculated field in rows and in the marks pane select the pie. You can increase/decrease the size of the pie accordingly.
After getting the pie copy the calculated and paste it in the rows so that you will get two pies. Now you can get the essence of where this visualization is heading to and you can guess the next steps if you are aware of Tableau. We are looking to use the dual-axis with the two pies.
In the marks pane, you can see you have two calculated fields you need to select the second calculated field, and in the color, tab select white so that you get the carved out space. After that in the first calculated field add the region to colors.
Let's consider the case where you have several levels of hierarchies and you need to show all of them in a single chart. In that case, you can't rely on a donut or a pie chart. You need to switch focus on the Sunburst chart. It is one of the best visualizations when it comes to hierarchical data. We will be creating it in Tableau with the sample superstore data.
We will take the categories and put them in the colors and select the pie in the marks pane. It will give you the basic pie chart and as with most visualizations, in Tableau, we are looking forward to doing a dual-axis. For that, we need two pie charts. In columns, we need to create SUM(0) and copy that. In the angle tab, you need to put the sales.
After getting the two pie charts in the marks pane select the SUM(0)_2 and add the subcategories in the color. You can see the reason because you get different categories in one of the pie charts and subcategories in another and eventually we will use dual-axis to merge them.
We are getting close to the final result and you can adjust the size of both pie charts accordingly. Now select the first SUM(0) in the marks pane and sort the subcategories with respect to the sales. The most important thing is we are sorting the subcategories in terms of the field and in descending order.
Comments
Post a Comment