Spaghetti Charts Suggested Alternative: A Trellis Chart

Nir Smilga
3 min readAug 18, 2022

--

This article will discuss the common used charts to compare large number of items, its issues, and a suggested alternative, as well as quick video on how to do it in my favorite data visualization tool- Tableau.

Spaghetti Chart

Not often, we wish to compare a large number of items visually.
Horizontal Bar chart, arranged from largest so smallest value is the classic option, but it has a caveat if we have a large number of items to compare, as we end up with a long scroll bar that prevents as from seeing all items in one.

Things get even more complicated when we wish to compare it over time.
Line chart will be the classic option here, but when we have many items to compare, it looks like a big pile of spaghetti, hence its name.

All the charts can be found and downloaded here ; Data source: Word Bank

We can’t see the forest for the trees…

100% Area Chart

Another possible solution i see a lot is the use of 100% Area Chart.
While it may look more clear to some, we will have a hard time comparing between the different items as they don’t start form the same line nut stacked on top of each other instead.

All the charts can be found and downloaded here ; Data source: Word Bank

Can you compare the countries easily? which country has the max mobile subscriptions per person? which country increased the most overtime?

Suggested alternative- Trellis Chart

A trellis chart, also called small multiples chart, is a layout or a series of small charts with consistent scale and axes.
Each chart often represents different dimension categories such countries, products etc.

The benefits of using a Trellis Chart:
1. Divide and conquer: The ability to see clearly each item without the need to scroll down or put them on top of each other
2. Comparison: All items start from the same line, and as Trellis charts have a consistent scale and axes that allow us to compare apples to apples

The downside of using a trellis chart is that it is hard to compare items in different rows. We can mitigate that by adding an Avg reference line so we will have a common baseline to help as compare between them.
Another recommended option is to sort the items from largest to smallest value of the presented KPI, to help the users further with the comparison.

All the charts can be found and downloaded here ; Data source: Word Bank

Here is a quick video of how to make that in Tableau:

All the charts can be found and downloaded here ; Data source: Word Bank

I will add here the X and Y calculations as the might be less intuitive and may not be captured from the video:

X
if INDEX() % [# of Columns]=0 THEN [# of Columns] else INDEX() % [# of Columns] end

Y
int((INDEX()-1)/[# of Columns])+1

Note it is a table calculation (using Index()) and we will need to make sure it calculated on the item level — in this case the country.

Here is a great and very detailed tutorial, explaining the logic behind this

To wrap this up:

All the charts can be found and downloaded here ; Data source: Word Bank

Link to downloadable Tableau workbook here
Thanks for reading, share your thoughts!

--

--

Nir Smilga
Nir Smilga

Written by Nir Smilga

Passionate about data, insights and visualizations, Tableau featured author

No responses yet