Building a Guided Instructions Panel






Collapsible containers are one of the most powerful features that Tableau has released in the past several years.  I literally use them in every single visualization I build, both personal and professional.  When the feature was released, I published a blog post and viz that provided twelve different use cases for collapsible containers.  A few weeks later, I saw Lindsay Betzendahl utilize them in a way I had not thought of – an annotation layer. Dangit!  How did I miss that one?  (Here is an example of one used by Lindsay in a recent viz). 

I recently published a visualization called Movie Money.  In this viz, I decided that I would utilize this technique to provide instructions on how to read each of my charts.  I built it, but wasn’t 100% happy with it.  I wanted the steps to be ordered…I wanted one to come before the other.  I decided to try to build a self-guided instructions panel.  As soon as I did, I thought about a recent blog post and viz from Tableau Zen Master, Chris Love.  In this viz and blog post, he developed an incredibly clever way to walk through the viz. 

I ultimately employed a similar technique that I will walk you through in this blog post, but with a collapsible container as a guided instructions panel.  One note before we begin, I did share this with Chris and he welcomed me writing this blog post as sort of a piggyback off his great work.  Thank you, Chris.  Okay, let’s get to it.

Before we continue, open up the viz and check it out for yourself.  Just click the How to Read icon to the left of the first chart and walk through the guided instructions panel.  You can also view the animated gif below.


My first step was to add a floating container (that would later become a collapsible container) and add a grid system within that container where my instructions would appear.  The grid system would allow me to place sheets containing instructions all over the visualization (top, bottom, left, right, center, wherever).  I floated a horizontal container over the first two charts (the unit histogram chart and bar chart in the gif above).  Within that container, I tiled four vertical containers.  I then added five blanks to each of the vertical containers as placeholders.  At this point, everything was transparent, but I wanted to see what I was working with.  To address this, I added black borders to all of the blanks.  When finished, it looked something like the following:

From here, I determined what the instructions would say.  Each “piece” would be a short phrase that would point to a specific element and explain that element.  I decided I would utilize eight instructional phrases.  I typed the phrases in a Word document.  They included expressions such as “each circle is sized by total gross” and “toggle highlighting by clicking here”. 

I decided I would build this in the same basic manner as a sheet swap except that the sheets would be in different containers, not the same one.  (If you are not familiar with sheet swapping, I suggest you read this great blog post from the data school).  In the case of setting up a sheet swap using two sheets, you’d create a parameter with two values, one value associated with each sheet.  Since I had eight sheets, I set up a parameter containing eight values, integers 1 – 8 and set it up as a slider.  Eventually I would use this parameter to filter the views – more on this later. 

I next had to create eight different sheets containing the eight different instructional phrases.  You may be asking, “why not just use text objects?”  Well, I had no way of filtering those out.  I created a new sheet and typed ‘’ on the marks card and moved it to the Text card.  This just provided me with some value to be able to access the Text.  I clicked on the Text card then clicked on the “…” to open the text editing window.  I then typed my first set of instructions as shown below.  I duplicated this sheet and created seven more sets of instructions similar to this one. 


Armed with my eight sheets of instructions, I moved back to my dashboard.  I started placing these instructional sheets into my grid system.  I placed the first one in the upper left corner next to one of the blanks and then removed that blank. I did it again with a second sheet.  The below GIF shows the general process with two of the sheets. 


I continued tiling these instructional sheets into my grid system until all were added.  I then went back into each sheet and added padding, adjusted alignment and removed those black borders until I was satisfied with the layout.  However, at this point, all of the instructions were showing on the screen at once. 


  
As I mentioned previously, I wanted one to come before the other; I wanted them to be read in a specific order.  To do this, I had to filter them using the values in the parameter I had previously set up. 

I went back to my first instructional sheet and created a calculated field that I called “Top Movies Instructions Filter” which was simply equal to my parameter.  I placed this on the filter shelf for the first set of instructions and checked only the value of 1.  On the second instruction sheet, I added that same filter calculation and checked only a value of 2.  On the third sheet, I checked 3, and so on.  (Note, since the calculation was equal to a parameter and parameters only allow for a single value, I had to adjust the parameter slider each time in order to check the proper number).  When I was finished, I had eight different sheets each corresponding to a single number in my parameter.  Each number only had one sheet associated with it, which meant that as I moved through the parameter slider, only one sheet would show and all others would be filtered out.

Now back on the dashboard, I added this slider parameter below the first instructional sheet in my grid system.  I removed the readout so that only the slider showed.  I then selected the entire container and checked the Add Show Hide Button option to make it a collapsible container.  I changed the hamburger menu button to a How to Read icon and the X to an X with a circle around it. 

When it was complete, I had a full, self-guided instructions panel using just a collapsible container, a few sheets, and a handful of parameters.  If you missed it before, the result looked like the following.  (Note: I actually used this technique twice in my Movie Money viz).



And there you have it!  The technique is really no more complicated than a standard sheet swap, just employed in a different way – one that requires a little time and patience.  Anyway, I hope you enjoyed this short tutorial and as always, if you ever have any questions or comments, please feel free to contact me at any time.


Kevin Flerlage, March 30, 2020


No comments:

Powered by Blogger.