Workout Wednesday: A Forest of Data

Now this a viz I haven’t seen before, it literally looks like a forest.

Weekly Orders & Sales by Segment _ #WorkoutWednesday2019 Week 6.png

The Challenge

Ann’s original

My recreation

If you missed them, here’s my previous Workout Wednesday blog posts

Taken in for Questioning

Let’s see what this viz has to say for itself.

What do the tooltips show? 

We’ve got a viz in tooltip here! It looks like it’s showing the sales & quantity per sub-category, this changes for each order number. I can’t hover over the bars behind the circles unless I filter, and they don’t have viz in tooltips. Each “tree” appears to show a weeks worth of data.

What sort of interactivity is there? 

The only interactivity is a filter that allows you to view each region individually or the entire data set.

What sort of marks are on show? 

Slightly transparent circles for each order number which have been sized & ordered by sales. There’s also what appears to be a very thin grey bar beneath the circles, they really do look like tree trunks!

Do I think there’s a dual axis involved? 

Yep. One for the circles, one for the tree trunks

What does clicking do? 

Axis – nothing

Circles – highlights the selected circle and its tree trunk

Bars – nothing

Click on bits of the dashboard and drag your mouse across, where do the sheets finish? 

Looks like it’s one sheet to me, in addition to the sheet for the viz in tooltip

It’s Tableau Time

The first part is fairly straightforward, I’ve put week of [Order Date] onto Columns, [Segment] and Count Distinct of [Order ID] onto Rows, and I end up with this. The [Order Date] filter is for 2018, and [Region] is filtered to All (I’ll be using this later). I’ve also set the size of the Bar mark to its smallest and set the colour to a light grey.


For the dual axis and to create the “leaves” on the “trees” I created a calculated field for the index function that I placed onto rows. When this is computed using [Order ID], it should give a stacked column of dots.

Index dots.PNG

I’ve played with the formatting in Tableau for probably far too long, and worryingly enough I recognised the palette Ann used. So I placed Segment onto the [Index] colour mark and chose Summer, the original viz also has some sort of transparency applied to the circle marks. With a bit of comparing it looked like it was set to about 50%. This sorts out the colour of the marks.


Next I dropped [Sales] onto the size mark and had a play with the controls (double click on the size legend card to show this) until I was happy that my viz matched the original.


Now by setting the dual axis and synchronising the axes, we end up with a viz that’s looking pretty good.

Now for the title it should change depending on what’s selected. It should show whichever Region is selected, or it should show All, if they all are. Here’s what the dialog box for the title looks like


And here’s what the title looks like, not quite right.

title - wrong.PNG

When applying a dimension as a filter, Tableau defaults to a multiple values list with check boxes. If we show the filter and then change it to a single value drop down, it fixes the title and shows All when everything is selected instead of a list.



This bit gets its own section as it probably took me the longest.

First, lets build the sheet we’re going to use as our Viz in Tooltip.

[Sub Category] goes onto rows, then hold control while you select [Sales] and [Quantity] and drag them into the view until the image under the mouse says “Show me”.


Drop them here and you’ll get a nice table. Under the analysis menu show the column grand totals, right align all text apart from the titles which should be centre aligned. Remove the row banding and the row dividers, but leave the total border and you’ll end up with something looking like this.


This isn’t far off, now it’s just sorting out the highlighting part of this table, but only on sales.

I wont bore you with how long I spent on this. One of my attempts involved converting all the quantity values to negative but formatting them to hide the minus sign. But I just couldn’t stop highlighting appearing in the quantity column.

So after a bit of google-fu I found something I’d entirely forgotten existed, measure names is special. You can separate out the legends for each of the measures in the view.

separate legends.png

Once I’d worked this out it was fairly straightforward to get the legends sorted. The one sticking point was with the quantity legend, I could add white to either end of a diverging colour palette, but Tableau insisted on putting grey in the middle.

After a bit of pondering and random clicking, I got rid of this by ticking “Stepped Colours” and setting the number of steps to two.

legend - sales.png
legend - quantity.png

So the last bit was formatting the rest of the tooltips so they looked like Ann’s, adding the title, explanation text, adding the footer, removing grid lines and setting the axis so it’s fixed at one end and automatic at the other.


And just like that, you’re done. Thanks for reading the post and thanks for the great challenge Ann, I can definitely see myself using a chart like this.