Black Friday Deal : Up to 40% OFF! + 2 free self-paced courses + Free Ebook  - SCHEDULE CALL

- Tableau Blogs -

How and Why to Create a Pie Chart

Introduction

In this post, we are going to talk about what a pie chart is when to create a pie chart and how to create a pie chart in tableau. We will be using the sample superstore data set for the demonstration. We will also see how you can format the pie chart and show the relevant information.

What is a pie chart?

A pie chart is one of the most useful graphs in visualization where we divide a circle into a different number of segments which will represent a proportion of the entire.

A pie chart is also considered as an alternative to a bar chart where in place of the frequency we show the proportions. For example, if you have to show how much sales we have made in each category then the bar chart can be an ideal chart.  But if you have to so what is the percentage contribution by its categories in the total sales then the pie chart can be the ideal chart.

There are different combinations of pie charts like a doughnut chart which also help to represent some advanced form of data. In this article, we are going to talk about all the things about the pie chart.

When to create a pie chart?

A pie chart can be created when you have to show the proportions as a whole. For example, if you have to find the contribution made by each source in your monthly income. In such a case, pie chart can be one of the ideal charts to demonstrate these details. While creating the pie chart make sure to format it well.

A pie chart can be created for the below scenarios -

  1. You have to show the proportions of the data as a whole
  2. You have to show the proportions as well as the actual number of the whole
  3. You have a fewer category and proportions can work in a better decision

And there can be few other similar requirements for the creation of a pie chart. If you have any such requirement by chart can be preferred over any other chart.

How to create a pie chart in tableau?

If you will look for the official requirement for the pie chart in tableau it says it should have one or more dimensions and one for max two measures. If your requirement satisfies these conditions you are good to create a pie chart.

Example:

Read: Tableau Careers - Know Why & How to Make a Career in Tableau!

Let's say we need to find a percentage of sales by each category. That means we need to find out of total what is the proportion by category Technology, furniture, and Home appliances. As we have to find the proportion of these categories, so a pie chart can be a better option.

Now let’s create a pie chart just by following the below steps-

  1. Drag the category dimension into the column shelf
  2. Drag the sales measure into the row shelf
  3. Now you will find a bar chart that has been created by default but as we need a pie chart for this requirement so go to show me the option and select pie chart from the show me option.

This will create a pie chart like below-

Now, this is a generic pie chart that is not telling a lot of information to you. Although when you hover on the pie chart on the tooltip you will find the relevant information. But to make the chart user ready we need to format this pie chart. In the next section, we are going to format the pie chart.

Formatting a pie chart

As you can see, the size of the pie chart is very small. There are a couple of ways to increase the size of the pie chart-

  1. Make the screen size entire view from the standard view
  2. Press control + Shift and keep on pressing B on Windows system or press ctrl + shift and keep on pressing z on the Mac system

Both the above techniques work perfectly and you will have to decide which option to go for.  I prefer going the entire view as this option adapts as per the screen size. Once you will make the screen size entire view, you will get the screen like below -

As we know, angles are calculated while creating the pie chart and so you can find the sum of sales as the angle. Also, the categories are divided into the color self and so all those legends are showing you at the right top corner. You can change the place of those legends as you want. There is a size option for the sum of sales as well. You can also reposition that as per your requirement.

As of now, the size of the pie chart looks good and we need to further format it for the legends and labels.

You should also consider formatting the colors of these categories. Usually, we follow the color palette as per the organization’s color structure or the requirement received.

In our example, we are not going to change the color of these categories but we will format the legends and the label.

Read: Tableau Career Opportunities: What You Need to Know About Tableau in 2024

To enable the level, we can either click on the T-icon showing you at the top or click on the level field in the marks card and allow levels. I Prefer going through the second option.

Now the level is showing you on the pie chart but the numbers are the total amount of sales made by these categories. As we know pie charts are majorly being used to show the proportions but here, we are showing the numbers.

So, we need to convert these numbers into the percentage proportions as a whole. To convert these numbers to the percentage, go to analysis in the menu and select the percentage of the table. This will convert each number into the percentage of the total which is our desired result.

You can see now we are having the percentage contribution by each category on the total amount of sales. If you also want to show the name of the category is in the label, drag the category dimension into the labels shelf.

Once you do that, the category name will be shown to you as a level. But no longer the percentage by each category. To enable the percentage contribution also drug sum of sales into the level self again.

As you can see, we have now both the category name and the percentage contribution in the sales by those categories. If you want to change the color of these proportions you can go to the color shelf and select the desired color or color palette.

Currently, the percentage is showing you up to 3 digits after the decimal.  If you want to format this you can right-click on it and select format and further customize this as per your requirement.

Tableau Online Training & Certification

Read: Introduction to Data Visualization with Tableau
  • No cost for a Demo Class
  • Industry Expert as your Trainer
  • Available as per your schedule
  • Customer Support Available

Example-2:

Let's say, you have to create a pie chart for the total number of orders in each state. You can follow the previous steps to create a pie chart for the proportions of orders in each state. The changes will be in place of the category we will have to use the state and in place of sales, we need to use a number of records. Once all the formatting did you will get the pie chart like below -

Look at this pie chart and analyse whether this pie chart should have been created or not.  As you can see there are a lot of sections in this pie chart which are making the readability very poor.  And so, the pie chart might not be the ideal chart for this particular requirement. You can play around the other charts for this requirement. One of the possible charts for this requirement can be a bar chart, other can be a Treemaps.

So, it's very important you decide whether you should use the pie chart for the given requirement or not.  It should not be always that if you have to find the proportions you must use the chart.

You can also use the dual axis on the same pie chart and create a chart called a doughnut chart which we will talk about in some other article. A doughnut chart is an advanced form of Pie Chart itself with some additional information.

Best practices to create a pie chart

  • There should be an adequate number of proportions
  • Try to show the proportions rather than the actual figure as the level
  • If the actual figures are required try showing on the tooltip
  • Make the proper formatting of the pie chart for the desired information
  • Use the proper color combination and format the labels

Tableau Online Training & Certification

  • Personalized Free Consultation
  • Access to Our Learning Management System
  • Access to Our Course Curriculum
  • Be a Part of Our Free Demo Class

Wrapping it up

This is all about the pie chart. In this article, we talked about what is a pie chart on how to create it when to use it, the alternatives around it, and formatting a pie chart. We also talked about the best practices to create a pie chart. Do try it now and let us know for any difficulty.

Read: The Ultimate Beginner’s Guide To Data Visualization Tools Tableau


fbicons FaceBook twitterTwitter lingedinLinkedIn pinterest Pinterest emailEmail

     Logo

    JanBask Training

    A dynamic, highly professional, and a global online training course provider committed to propelling the next generation of technology learners with a whole new way of training experience.


  • fb-15
  • twitter-15
  • linkedin-15

Comments

Trending Courses

Cyber Security Course

Cyber Security

  • Introduction to cybersecurity
  • Cryptography and Secure Communication 
  • Cloud Computing Architectural Framework
  • Security Architectures and Models
Cyber Security Course

Upcoming Class

-0 day 22 Nov 2024

QA Course

QA

  • Introduction and Software Testing
  • Software Test Life Cycle
  • Automation Testing and API Testing
  • Selenium framework development using Testing
QA Course

Upcoming Class

1 day 23 Nov 2024

Salesforce Course

Salesforce

  • Salesforce Configuration Introduction
  • Security & Automation Process
  • Sales & Service Cloud
  • Apex Programming, SOQL & SOSL
Salesforce Course

Upcoming Class

-0 day 22 Nov 2024

Business Analyst Course

Business Analyst

  • BA & Stakeholders Overview
  • BPMN, Requirement Elicitation
  • BA Tools & Design Documents
  • Enterprise Analysis, Agile & Scrum
Business Analyst Course

Upcoming Class

-0 day 22 Nov 2024

MS SQL Server Course

MS SQL Server

  • Introduction & Database Query
  • Programming, Indexes & System Functions
  • SSIS Package Development Procedures
  • SSRS Report Design
MS SQL Server Course

Upcoming Class

1 day 23 Nov 2024

Data Science Course

Data Science

  • Data Science Introduction
  • Hadoop and Spark Overview
  • Python & Intro to R Programming
  • Machine Learning
Data Science Course

Upcoming Class

-0 day 22 Nov 2024

DevOps Course

DevOps

  • Intro to DevOps
  • GIT and Maven
  • Jenkins & Ansible
  • Docker and Cloud Computing
DevOps Course

Upcoming Class

5 days 27 Nov 2024

Hadoop Course

Hadoop

  • Architecture, HDFS & MapReduce
  • Unix Shell & Apache Pig Installation
  • HIVE Installation & User-Defined Functions
  • SQOOP & Hbase Installation
Hadoop Course

Upcoming Class

-0 day 22 Nov 2024

Python Course

Python

  • Features of Python
  • Python Editors and IDEs
  • Data types and Variables
  • Python File Operation
Python Course

Upcoming Class

8 days 30 Nov 2024

Artificial Intelligence Course

Artificial Intelligence

  • Components of AI
  • Categories of Machine Learning
  • Recurrent Neural Networks
  • Recurrent Neural Networks
Artificial Intelligence Course

Upcoming Class

1 day 23 Nov 2024

Machine Learning Course

Machine Learning

  • Introduction to Machine Learning & Python
  • Machine Learning: Supervised Learning
  • Machine Learning: Unsupervised Learning
Machine Learning Course

Upcoming Class

35 days 27 Dec 2024

 Tableau Course

Tableau

  • Introduction to Tableau Desktop
  • Data Transformation Methods
  • Configuring tableau server
  • Integration with R & Hadoop
 Tableau Course

Upcoming Class

-0 day 22 Nov 2024

Search Posts

Reset

Receive Latest Materials and Offers on Tableau Course

Interviews