Chapter 57. 3 Innovative Ways to Use Tooltips: Tip 3

How to Make Dynamic Tooltips

Whenever I know that my data visualizations will be consumed via an interactive version of Tableau (i.e., Tableau Public, Tableau Online, Tableau Server, Tableau Reader), I move as much secondary information as possible to the tooltips. This is easily done by moving the fields you want displayed in the tooltips to the Tooltip Marks Card and formatting as desired.

However, there is one big drawback with tooltips. Any field placed on the Tooltip Marks Card will be shown for every mark on the view, and in the same format. There are times when this doesn’t make sense, resulting in strange results such as descriptive words in the tooltip that don’t have corresponding values (which happens if the value is null). This chapter shares how to make dynamic tooltips in Tableau, allowing you to show different information for each mark.

How to Automatically Display Varying Information Within Tooltips

To illustrate how to make dynamic tooltips in Tableau, we once again dig into A Tale of 50 Cities, which shows the census-over-census population change of the 50 largest cities in the United States since 1790. Notice there are no labels on the highlight table, so the information was communicated through the tooltips, which you can see if you hover over the interactive version:

Image

While creating the visualization, ...

Get Innovative Tableau now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.