Toan Hoang

Petal Charts in Tableau

I struggled to find the appropriate name for this chart type and it bugged me quite a bit. On one hand, should this be called a petal chart or should this be called a radial line chart with expanded extremities? Alas, what is in a name? right? If someone has the perfect name for this, please comment below or send me a message, but in the mean time, let us get to building this Data Visualisation in Tableau.

Note: As always never choose a data visualisation type and try to fit your data into it, instead, understand your data and choose the best visualization for your data consumers.

Data

Load the following data into Tableau Desktop / Public.

CountriesSalesPath
United Kingdom800
0
United Kingdom8001
United States7000
United States7001
Australia5000
Australia5001
Germany9000
Germany9001
France2000
France2001
India4000
India4001
Singapore3000
Singapore3001

Note: we need two records for each stage as we are going to be drawing polygons and using densification to get more points on our canvas.

Calculated Fields

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

Path (bins)

Index

(INDEX()-1)

TC_Degrees

360/WINDOW_COUNT(COUNTD([Countries]))*INDEX()

TC_Size

MAX([Sales])/WINDOW_MAX(MAX([Sales]))

X

SIN([Index]*[TC_Degrees]*PI()/180)*[Index]*[TC_Size]

Y

COS([Index]*[TC_Degrees]*PI()/180)*[Index]*[TC_Size]

Now that we have our Calculated Fields created, let us start creating our Worksheet.

Worksheet

We will now build our worksheet:

If all goes well, you should have something like the following:

Now we will adjust the cosmetics of the visualisation by:

You want to end up with something like the following:

and boom, we are done and have created a quick but very cool data visualisations.

You can see and interact with my visualisation on Tableau Public at https://public.tableau.com/profile/toan.hoang#!/vizhome/PetalDiagrams/PetalDiagrams

Summary

I hope you all enjoyed this article as much as I enjoyed writing it, if so, please do share this article with fellow Tableau addicts and spread the love. Do let me know if you experienced any issues recreating this Visualisation, and as always, please leave a comment below or reach out to me on Twitter @Tableau_Magic.

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:

Also, do be sure to check out our various courses:

Exit mobile version