Get Rid of the Grid: Variable Grid Charts in Tableau
Jan 14, 2019Klaus Schulte
For this week’s #makeovermonday challenge I created this visualization combining a hex map and multiple line charts (click to play with the interactive version on Tableau Public):
The “normal” way to create such a small multiple chart is to blend the data with a secondary data source for the geographical coding (I used Matt Chambers hex map file) and to put columns on columns and rows on rows. Quite easy.
Unfortunately you are not able to make this look like a hex map because Tableau doesn’t allow your shapes to leave the borders of the cells within the grid. So this might be the closest hex mapish thing you can achieve using this technique:
Looks not even close like a proper hex map. So how can this be achieved?
The answer is: Get rid of the grid!
And this takes just a few steps:
The first step I did was to join the #makeovermonday-data with my hex map data.
I needed some calculations on my x-axis, therefore I first normalized the years from the data. This brought me a 1 for the first year in the data and a 16 for the last year.
Next step was to calculate the x-axis:
This calculation is “sorting” my line charts horizontally. It is a similar technique like the one Ludovic and I used in our Boris Becker viz and described in this blogpost.
I added a parameter [Gap Column] to be able to play with the exact positioning of my charts at a later stage.
The same thing had to be done for the y-axis:
Again this calculation is “sorting” the line charts, in this case vertically:
For the hexagon shape I calculated one single point in the middle of each line chart…
…and brought this in on a secondary axis, created a dual axis, chose shape from the marks card, and changed the shape to a hexagon.
Last step was the positioning and the scaling of the line charts using my parameters:
That’s it! (+labelling, formatting, tooltips, reference lines etc.)
Hope you enjoyed reading and that you’ll find own use cases for this!