DEV Community

Thales Bruno
Thales Bruno

Posted on • Updated on • Originally published at thalesbr.uno

Don't use Pie Charts

Despite the clickbait title, this is not an article to be polemic or say universal truths, but just an invitation to think about it.

A pie chart, sometimes called a pizza chart, is a chart in a format that seems like a - guess what? - pie, i.e., a round shape divided into slices. According to this article:

A pie chart is a circular graph that shows the relative contribution that different categories contribute to an overall total.

So, each piece of the chart has its width defined for its proportional value into an overall total.

Let's take a look at an example.

Simple pie chart

We see it's not a bad look chart for sure. Actually, it could be a pretty evident option if we have some category variable to analyze and plot. But the point many people say about avoiding them is because pie charts may don't do a good job showing the proportions of the parts vs. the whole or even if a piece is greater or less than the others if they have the same size, etc.

When the number of categories increases the problem seems clear:

Pie chart with many categories

A bar chart plotting the same data:

Bar plot

Then, as we may see, pie charts are a bit controversial and should be avoided in most cases. Tough with a few categories, maybe only two, they could not be a terrible choice as well. What do you think?

References

Pie Charts in Python 🔎
University of Leicester | Pie charts 🔎
Why You Should Avoid Pie Charts 🔎

Discussion (0)