How To: Connected Scatterplot Using Set Actions with Tableau
With set actions in Tableau, we are free to create all sorts of new UI/UX interactions. This one is once again inspired by Rody Zakovich's amazing post on custom UI/UX. With set actions it is very easy to implement a connected scatterplot on hover, and I'll walk you through how to build it.
In this example, I want to see profit vs sales with each year connected in the scatterplot. To begin, we will build a simple scatterplot where each year's profit and sales are represented by category:
Next, we need to create a set for our categories:
Now we will create the calculations that will drive the connected line on hover through the set action.
Then we will drag both of these measures in and create a dual axis on both.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiilleOPRg2hDx-3J0oGWxrTf_3Bzi-RCFVWpo4pNslavcO7BhoUZL0_eQQ3FFqN1MvBoIgzCZH0hVWZ9NsA9PsLapPBBP-DjKLrEBvJRTzhggI9ZRbhQB2f-Sls2DIAVJyLjCrImFY1zpM/s1600/Screen+Shot+2018-11-09+at+10.10.07+AM.png)
Make sure you change the Category Profit and Sales to a line and put the Year on the Path:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibxpgV1TXTRqBqvimaqy7doej1IA20ltRZeatgluODl1LU4lfnTyJBpu1HhW0TOQMkc6rX4_lBX_-xzjPOc5neF_QGLs4DAp_oOQYD-9eeGZzX0qDvDeiRQqhJH2K3qN9zKXPaQt9HGxF6/s1600/Screen+Shot+2018-11-09+at+10.11.28+AM.png)
Finally, we will setup the set action to create the connected scatterplot on hover.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSFF22g297p9SMoarEPO21O1GSj_NL3G-hzOZKDxQNS5LKWBwM3HoIyqNL87EmvL5ldl12JSIHNTXTl5yvS4YhbXsYi-YvB2BONpHe7is7xq6ku53pWmMvkFxQWsLeb8AYBQln6eKWAMUn/s1600/Screen+Shot+2018-11-09+at+10.12.02+AM.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSsI_SAhurLAmeVbAokhu919vt1-5C1enRT6h3ip_mnPq2Fc_Rx7AgSXRtG6cXC9lLJDnjArX6bwtDVch-H-aqTxKJvCrfD20hGhJ1FeDLpi2RCb6LPpWGArv9nn8ZPNH8lwPDVsQOO3Rv/s1600/Screen+Shot+2018-11-09+at+10.12.12+AM.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXumIOgIaEJuQoqERpvOBAlbnyV9haMPLjnBnJsuPFqAETss8GQkC_1a_q2zE4OSaJ5_1UNm-OddZFxfvZoOeiI57X8VS7KC-FVPdrjlWO4Flq8ePWSBWn4wNL6N6AN_AmBHi7XJO5yL0b/s1600/Screen+Shot+2018-11-09+at+10.12.42+AM.png)
That's all there is to it. You should now have a scatterplot that connects the points on hover. Feel free to download the workbook and comment with any questions.
0 comments:
Note: Only a member of this blog may post a comment.