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)

  • Right click on Path, go to Create and select Bins…
  • In the Edit Bins dialogue window:
    • Set New field name to Path (bin).
    • Set Size of bins to 1.
    • Click Ok.

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:

  • Change the Mark Type to Line.
  • Drag Countries to Color.
  • Drag Path (bin) onto Columns.
    • Right-click on this object and ensure that Show Missing Values is checked.
    • Drag this object onto the Path Mark.
  • Drag X onto Columns.
    • Right-click on the Object, go to Compute Using and select Countries.
    • Right-click on the Object, to Edit Table Calculations...
      • In Nested Calculations for Index, set Compute Using to Specific Dimensions and select Path (bin).
  • Drag Y onto Rows.
    • Right-click on the Object, go to Compute Using and select Countries.
    • Right-click on the Object, to Edit Table Calculations...
      • In Nested Calculations for Index, set Compute Using to Specific Dimensions and select Path (bin).

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

Now we will adjust the cosmetics of the visualisation by:

  • Remove grid and zero lines.
  • Fix the range of the X and Y Axis to -1 and 1.
  • Hide the Axis headers.
  • Drag Index onto Size.
    • Right-click on the Object, go to Compute Using and select Path (bin).
    • Adjust size accordingly.
  • Add tool tips.

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:

9 COMMENTS

  1. Hi Toan,
    I really love and appreciate your work. Unfortunately, I am not able to put any of the charts into my work.
    As the data is huge, cannot duplicate the data. Is there a way to get this working using blend with multiple dimensions as the chart has multple filters?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.