Circular Bar Charts: Why You Should Make Them But Never Share Them

It’s time to deep dive into a data visualization foundation: Bar charts! In this article, we will deep dive into the allure of Circular Bar Charts and help you understand why they’re not always the best fit for your data viz.

Take a look at these four chart types. Which type accurately depicts the values on the chart?

The answer is that all of them are TECHNICALLY correct. 

Each visualization above is simply a projection of some value across a visual space. And while the projections distort our view of the data, they are still an accurate representation. Each projection has its pros and cons.

Consider these plots in the same way you would think about maps. Each world map below is showing you the same information. Depending on what detail you’re seeking, some of the map projections are much easier to read than others. 

But just because they all accurately portray the world doesn’t mean they should all be used interchangeably.

This rule of thumb should apply to your charts too! Don’t worry- we’re going to dive into each one of the charts first introduced in this article to help you  understand their best use.

With the basic Bar Chart, shown below, the projection is rather simple. We are just looking at the value in a standardized 1-dimensional view (the x-axis).

Now, the Curvy-Bar charts uses the same x-axis as the bar charts but then uses a second dimension (on the y-axis) to distort the view. This distortion is consistent from bar-to-bar so it does show a correct visualization. 

In the circular bar charts, we used two different ways to standardize our visualizations. While a bar chart clearly articulates the data, the circular bar charts offer the visual appeal of a circle– AND WHO CAN PASS UP THE VISUAL APPEAL OF A CIRCLE?! 

The Radian-Correct Bar Chart visualization, shown above, uses radians (or degrees) in a circle to size the lengths of the bars. These bars are perfectly accurate using radians, but the overall length of the bars do not match. 

This is because the distance is calculated using the circumference calculation of 2πr. This also means that the outermost bars will will be proportionally larger if they travel an equal distance.

We see this all the time with the Olympics in track events. The 400m and 200m have staggered starts to account for the distance around the circle.

This means with the radians-based circular bar charts the distances that we are seeing are distorted. We can adjust these charts by using distance-based circular bar charts.

The Distance-Correct Bar Chart is shown below. It demonstrates what a distance-based circular bar chart looks like using the exact same data.

Even when the circular bars are sorted from largest to smallest we are left the bar lengths do not appear to be sorted from largest to smallest (even though they are). This is because of the properties of a circle. You have to travel further on the outside!

So which one of these four charts is correct? I asked the data analytics community on Twitter and I was actually surprised that so many people selected the radians-based solution.

But just because they all accurately portray the data doesn’t mean they all should be used. And the circular bar charts shown above showcase exactly why: they are difficult to interpret.

All this said: it’s STILL worth learning how to make both chart types because it’ll allow you to practice advanced concepts in Tableau: Data Densification, Use of SIN() and COS() functions to draw circles, and Table Calculations!

If you are un-deterred and still want to make these chart types be sure to check out one of our Tableau Tutorials on YouTube.

Tutorial: Radians-Based Circular Bar Chart

Step #1: The Data

Join a placeholder dataset to your existing dataset using custom joins where 1 = 1. This custom dataset should be a single column of data that counts up by 1 from 0 to 200. The larger you make this value the more granular your visualization. For our example we call this column Value.

In this example we use Sample – Superstore and use the Orders table.

Step #2: The Calculations

You will need 6 calculations.

Create a calculation called Index | Sub. This will be used to calculate the radius.

// Index Sub
INDEX() - WINDOW_MAX(INDEX()) + 20

Create a calculation called % Value. This will normalize our data between 0 and 1.

// % Value
[Value]/{MAX([Value])}

For this example we create a bar chart using Sales by Sub-Category. Create a calculation that normalizes sales for subcategory between 0 and 1.

// % Sales
{FIXED [Sub-Category] : SUM([Sales])}
/
{MAX({FIXED [Sub-Category] : SUM([Sales])})}

Create a calculation called Percent Filter using % Sales and % Value that will be used to filter to relevant data.

// Percent Filter
[% Value] <= [% Sales]

Now you need to create the calculations for rows and columns.

// Columns
-(1.5 * [Index | Sub]) * SUM(COS(PI() * 1.25 * [% Value]))
// Columns
-(1.5 * [Index | Sub]) * SUM(COS(PI() * 1.25 * [% Value]))
// Rows (bottom layer)
(1.5 * [Index | Sub]) * SUM(SIN(PI() * 1.25 * [% Value]))
// Rows (top layer)
(1.5 * [Index | Sub]) * SUM(SIN(PI() * 1.25 * [% Value]))  
*
IF MIN([Percent Filter]) THEN 1 END
Step #3: The Build

Add Columns to the columns shelf. Add Rows (bottom layer) and Rows (top layer) to the rows shelf.

Change the marks types to line. Place Value on path as a continuous dimension. Add Sub-Category to detail.

Edit the table calculations for the calculations on your rows and columns shelves. Select specific dimensions and select Sub-Category. Then change the sort order to sort ascending on sum of sales.

On the Rows (bottom layer) marks card add Sales to text. Set the label to show on the end of the lines. Align the text to the middle-left.

On the Rows (top later) marks card, add Sub-Category to text, too. Rotate the text and align to the bottom-center.

Tutorial: Distance-Based Circular Bar Chart

Step #1: The Data

Follow the steps from the previous tutorial above.

Step #2: The Calculations

Create the Index | Sub and % Value calculations from above. For this calculation you need a different % Sales calculation. This starts normalizing our data for distance.

// % Sales
(MIN({FIXED [Sub-Category] : SUM([Sales])}
/
{MAX({FIXED [Sub-Category] : SUM([Sales])})})) 
*
(WINDOW_MAX([Index | Sub])/[Index | Sub])

But it doesn’t get the values between 0 and 1 (at least not guaranteed). So we need to adjust these values with Normalized Circles

// Normalized Circles
([% Sales]/WINDOW_MAX([% Sales])) <= MIN([% Value])

The Columns and Rows (bottom layer) calculations will remain the same but the Rows (top layer) will change.

// Rows (top layer)
(1.5 * [Index | Sub]) * SUM(SIN(PI() * 1.25 * [% Value]))  
*
IF [Normalized Circles] THEN 1 END
Step #3: The Build

Follow the steps from the previous tutorial above. When you edit the table calculation for Rows (top layer) make sure you edit all of the nested Table Calculations.

For Index | Sub, select Sub-Category from specific dimensions and sort ascending on sum of sales.

For % Sales, select Sub-Category from specific dimensions.

For % Sales | Normalized, select Sub-Category from specific dimensions.

Wrap-up

You can make these charts. Just don’t share them with others.

Tessellation 

We are a modern analytics consultancy. We enable and manage organizations’ analytics and self-service teams by educating people, optimizing technology, developing world-class products, and providing sustainable results. Curious to know how we can level up your organization’s analytics? Learn more here!

Data Coach

Where most analytics training programs lack depth, Data Coach provides wisdom. Our modern curriculum is unparalleled. Comprising video lessons, hands-on exercises, and a capstone project designed around your company’s data, Data Coach also offers a truly premium service: one-on-one coaching. Interested in upskilling your team? Check out our website!

Comments are closed.