Toan Hoang

Tableau QT: Sin-Dumbbell Chart

This is a Quick Tip on how to build a Sin-Dumbbell Chart in Tableau, so less reading and more jumping in. We are going to spend 5 minutes or less building our Sin-Dumbbell 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.

Social NetworkPathValue
Facebook1572
Facebook181572
Twitter1630
Twitter181630
Medium1210
Medium181210
Tumblr1120
Tumblr181120
LinkedIn1360
LinkedIn181360
YouTube1415
YouTube181415

Note: we require path and duplicate lines for densification. See our tutorial on Data Densification for more information. Click here

Calculated Fields

We will start by creating the following calculated fields.

Path (bin)

Index

INDEX()-1

TC_Value

WINDOW_MAX(MAX([Value]))

TC_Max Value

WINDOW_MAX(MAX([Value]))

TC_Percentage

[TC_Value]/[TC_Max Value]

X

[Index]*[TC_Percentage]

Y

SIN(RADIANS([X]))

Size

IF [Index] = WINDOW_MAX([Index]) THEN
    2
ELSEIF [Index] = 1 THEN
    1
ELSE
    0
END

Now that we have created our Calculated Fields, we will build our Worksheet.

Worksheet

Now that we have our Calculated Fields and Bin object, let us create our Worksheet:

If all goes well, you should have the following:

Let us make a small ammendment to the X Table Calculation:

You should now have the following:

Now we will adjust the cosmetics:

You should hopefully end up with the following:

Note: You can use the following social media colors by copying this into your Preferences.tps file:

<?xml version='1.0'?>
<workbook>
	<preferences>
          <color-palette name="Social Media" type="regular" >
               <color>#ea4c89</color>
               <color>#3b5998</color>
               <color>#ff0084</color>
               <color>#dc4e41</color>
               <color>#517fa4</color>
               <color>#0077b5</color>
               <color>#00ab6b</color>
               <color>#40a4c4</color>
               <color>#bd081c</color>
               <color>#35465c</color>
               <color>#55acee</color>
               <color>#1ab7ae</color>
               <color>#b31217</color>
          </color-palette>
     </preferences>
</workbook>

and boom, we are done with this Quick Tip. You can find my Sin-Dumbbell Chart on Tableau Public at https://public.tableau.com/profile/toan.hoang#!/vizhome/Sin-DumbbellCharts/Sin-DumbbellChart

Summary

I hope you all enjoyed this article as much as I enjoyed writing it. 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