Makeover Monday 2024 Week 34 Walkthrough — How to Make a Trellis Chart

Brittany Rosenau
6 min readAug 20, 2024

--

Makeover Monday is a weekly project where participants improve how they visualize and analyze data — one chart at a time.

Here’s my thought process working through this week’s challenge.

The original chart

Initial thoughts:

  • Well, this isn’t much of a chart, is it? It’s just a text table.
  • Nothing stands out, it requires a lot of mental energy comparing the percentages across different platforms and age groups. There doesn’t seem to be a logic to the sort, and it’s hard to see that YouTube is the most popular out of the bunch overall.

Making over the chart in Tableau

There are many ways to make over this week’s text table — this time I wanted to finally try a trellis chart that didn’t use a date field.

What is a trellis chart? Also known as small multiples, it’s a series of charts that use the same scale and axes, and are useful for comparisons.

I’ve made small multiple charts before- but using a sheet per panel. This has been…fine for some creative projects, but it doesn’t scale and isn’t efficient in a work setting — both for the time it takes to set up, and what a pain it would be to hand off to a different analyst.

For this chart, I found several resources very helpful —I’ll provide a full list at the end of the walkthrough. A big shoutout to the folks at Playfair Data — their tutorial was what finally made this one click for me.

When building this type of chart, a lot of it looks wrong until it looks right. I’m a very visual learner, so for future me when I go back and try and figure out how I did this, and for anyone else who has struggled with getting this chart to work right, I’m including overly detailed step by step screenshots. Enjoy the process, or skip ahead to the end for the final result!

Step 1- visualize what I want the end result to look like

First, I set up my bar chart how I’d like to see it in it’s final form —categories in columns, and platform in rows. In the end, instead of one tall list, I want a series of panels with one panel per platform.

Step 2 — setting up the calcs

There are two calculations needed to create the grid, so I create those, and drag them to columns and rows.

  • columns: (index()-1)%(int(SQRT(size())))
  • rows: int((Index()-1)/ (int(sqrt(size()))))

Step 3 — change calcs to discrete

Next, we have to make our columns and rows calculations discrete as shown below:

Which results in the chart looking like this:

Step 4- edit the table calcs to compute using platform

The default table calculations for our rows and columns are table across, which is not what we want. Because I need each panel to be a different platform, set “compute using” to platform for both the column and row calcs.

Now it’s starting to look closer to the final product:

Step 5- getting rid of the gaps

We need to get rid of those big gaps — so let’s drag Platform off of Rows, and place it on to Detail. That gives us something that’s probably 95% there!

Step 6 — phase 1 of formatting

I want to color this chart by age group, so that I don’t have to keep the column headers on the bottom. I’m fixing the axis at above 100% so that I have some vertical white space between each ‘row’ of columns.

Step 7 — figure out horizontal ‘padding’

I’ve given my panels some vertical breathing room, but now I want some horizontal breathing room between each panel. This part really stumped me — so I put a shoutout in the #tools-tableau channel of the Women in Data slack group, and Christina Gorga got me pointed in the right direction. Here are a few resources for adding space between bars:

These resources helped me rethink how I was approaching the problem, and I remembered this great viz from Takafumi that looked like what I was going for. Sure enough, I was able to crack the viz open in Tableau Public and he used the index() method referenced in the comments of the first solution!

Back in my viz, if I drag Category off of Columns and onto Detail, and add Index() into columns, I get a nice space on either side of my bars.

To get them sized just right, I’ve chosen to use a fixed size, based on .9 axis units, center aligned. You can play around with this setting to get the grouped bars to be closer or further apart.

Step 8 — labelling the panels

Now for another hack — labeling each panel. Remember how I set the axis to over 100%? That was intentional, not just for how much vertical space I would have between panels, but also so I could place the label where I wanted.

To make my labels:

  • I created a calculation called “label placeholder” with a value of 130
  • Create a dual axis chart, and synchronize the axis
  • Change the chart type of my label placeholder to Line
  • Drag platform onto Label, choose to label Line Ends, and only label the start of the line

Step 9 — sheet cleanup

Time to clean everything up. To get rid of the technicolor label line, I change the opacity to 0%. I also get rid of column and row headers, and remove all the pesky gridlines and sheet lines.

Step 10 — publish that dashboard!

Add a title, commentary, and credits, and that’s a wrap!

The finished dashboard looks like this:

https://public.tableau.com/app/profile/brrosenau/viz/SocialNetworkPopularity-MakeoverMonday2024W34/SocialNetworkPopularity

I’m very happy with the result, and plan on using this technique to make panel charts/trellis charts/small multiples without creating dozens of sheets. I hope you’ve found this walkthrough helpful.

Do you think it’s more effective than the original charts? Try your hand at this or other challenges by heading to https://makeovermonday.co.uk/

Further Reading

As promised, some more resources on Trellis Charts:

--

--

Brittany Rosenau

Design Nerd | Analytics Professional | 7x Tableau #VizOfTheDay | Iron Viz Finalist | Tableau Visionary + Public Ambassador