Toan Hoang

Tableau QT: Shape Bar Chart

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

CountryPathValue
United States10.9
United States1010.9
United Kingdom10.5
United Kingdom1010.5
Canada10.2
Canada1010.2

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_Color

IF [Index] <= WINDOW_MAX([Index])*[TC_Value] 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 see the following:

Now we need to get our Custom shape image, download the following image HERE, and save this into the following directory: My Tableau Repository\Shapes\Custom Shapes.

Note: Create the Custom Shapes folder, or name this whatever you fancy.

Now apply this new Shape:

You should now have the following:

Now we want to edit the Cosmetics:

You want to end up with the following:

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

Extra Credit:

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