Toan Hoang

Creating a Polar Chart in Tableau

As we close down our second set of tutorials in 2020, I wanted to finally have some fun with Polar Charts, so here you have it, something that is often asked for, and I have finally gotten around to creating this. I hope you enjoy it.

Note: This is an alternative type of data visualisation, and sometimes pushed for by clients. Please always look at best practices for data visualisations before deploying this into production.

Data

We will start by loading the Sample Superstore data into Tableau Desktop / Tableau Public.

Note: If you have Tableau Desktop, you can use the Sample data source, but if you are using Tableau Public, download and load the following data source.

Calculated Fields

With our data set loaded into Tableau, we are going to create the following Bins and Calculated Fields:

Path

IIF([Ship Mode]="First Class",1,102)

Path (bin)

Index

INDEX()-2

Index (Segment)

INDEX()-1

TC_Date Part

WINDOW_MAX(MAX(DATEPART("month",[Order Date])))

TC_Sales

WINDOW_SUM(SUM([Sales]))

TC_Total Sales

WINDOW_SUM(SUM([Sales]))

TC_Percentage

[TC_Sales] / [TC_Total Sales]

TC_Percentage (Adjusted)

[TC_Percentage] / WINDOW_MAX([TC_Percentage])

TC_Step Size

3.6/12

TC_Starting Point

([TC_Date Part]-1)*360/12

X

IF [Index] = -1 THEN
    0
ELSE
    SIN(RADIANS([Index]*[TC_Step Size]+[TC_Starting Point]))*[TC_Percentage (Adjusted)]
END

Y

IF [Index] = -1 THEN
    0
ELSE
    COS(RADIANS([Index]*[TC_Step Size]+[TC_Starting Point]))*[TC_Percentage (Adjusted)]
END

With this done, let us start creating our data visualisation.

Worksheet

We will now build our worksheet:

If all goes well, you should now see the following:

We will now adjust the Table Calculation for X and Y:

You should now see the following:

We will now add a background image to our Worksheet:

You should now see the following:

We will now adjust the cosmetics to finalise our data visualisation:

You will finally end up with the following:

and boom, we are done! I hope you enjoyed creating this data visualization and learned some cool techniques as well. As always, you can find this data visualisation on Tableau Public at https://public.tableau.com/profile/toan.hoang#!/vizhome/PolarCharts/PolarChart

Summary

I hope you all enjoyed this article as much as I enjoyed writing it and as always do share the love. Do let me know if you experienced any issues recreating this Visualization, and as always, please leave a comment below or reach out to me on Twitter @Tableau_Magic. Do also remember to tag me in your work if you use this tutorial.

If you like our work, do consider supporting us on Patreon, and for supporting us, we will give you early access to tutorials, exclusive videos, as well as access to current and future courses on Udemy: https://www.patreon.com/tableaumagic

Exit mobile version