<< Back

How to highlight viz-in-tooltips in Tableau 2019.2

I recently discovered that you can use parameter actions to highlight (rather than filter) viz in tooltips. It’s pretty straightforward to set up, and it means you can add a nice bit of extra context to your graphs. You can follow along with the example I use here by going to this link and downloading the workbook.

I started out by making a radial graph of this year’s Giro d’Italia results. I wanted to make something circular to look like a bike wheel – each colour represents a stage of the tour, each line represents a rider, the length of the line represents where that rider finished (first = longest line, last = shortest line), and the distance between the lines represents the time difference between riders. It’s pretty, but not particularly useful for exploring the data.

So I wanted to add two graphs to the tooltips. The first shows a plot of all riders for the stage, with the finish time in seconds on the y-axis and the finish position on the x-axis. The second shows a plot of all stages for the rider, with stage on the x-axis and the amount of time the rider was behind the overall lead on the y-axis.

What would be great right now is to be able to highlight the vizzes in tooltip here. I’m hovering over Primoz Roglic in the first stage, so I’d like to be able to highlight Roglic (while keeping all other riders) in the top plot, and I’d like to be able to highlight stage 1 (while keeping all other stages) in the bottom plot.

With parameter actions, it’s really easy. Let’s start with the top plot. It’s a simple line graph of each stage, showing all riders’ times and positions. You can see in the filters that my viz in tooltip filter action is already set up, which is why it’s only showing one stage.

What I’d like to do is highlight where a particular rider sits in this line. So, what I’d like to do is to make this into a dual axis graph where the other axis is a lot of circles, and then I’m going to size the circles differently depending on which rider I’m highlighting. I could also do this with colours, but I’m already using colour for something else here.

The next thing I did was to create a new parameter, called [Selected Rider], which I populated with all the riders’ names in my database.

I then created a calculated field to change the size of the circle on the plot.

At the moment, it’s still a parameter with no other inputs, so it’ll be stuck on whichever parameter value is the default.

Finally, I can update this to work in a tooltip properly by going to the dashboard and adding an action.

And that’s it! Setting it to Hover will mean that hovering over anything on the Spokes worksheet in the dashboard will update the [Selected Rider] parameter. And when that parameter updates, so does the size value in the [Rider sizer] calculation, so the viz in tooltip highlights the rider that you’re hovering over.

One small caveat: as with everything related to viz in tooltips, it can be a little slow to update, especially on Tableau Public.

Reminder: feel free to explore and download the workbook here.

https://public.tableau.com/profile/gwilym#!/vizhome/GirodItalia2019_15599037613020/GiroDItalia2019

Leave a Reply

Your email address will not be published. Required fields are marked *