Zoomable Charts in Seconds



Create a Zoomable Chart in Seconds

Several people have written about ways to “zoom” into your charts, one of whom is my brother, Ken Flerlage, and another is my boss and colleague, Jeff Shaffer.  Ken’s blog post talks about using set actions to show a zoomed in area in another window when you hover.  Jeff’s blog post talks about how to create a zoom feature in the tooltip using bins and a duplicate chart.  Both of these methods are really cool and I suggest you read them both before proceeding. 

In this blog post, I am going to introduce a method of zooming into any chart that can literally be done in seconds.  It’s an incredibly simple trick that I had never seen used before.  When I asked around, I learned that several people knew about it, but even more did not.  And this is the reason that I am sharing it with you now.

While working on my Agriculture IronViz entry, I created a jitter plot, which is shown below. 


You may notice that the vast majority of points in this jitter plot are between 50 and 65 years of age.  However, there are a couple of outliers below 40 and nearing 75.  Because of the outliers, the x axis is stretched and the vast majority of points sit directly on top of each other. 

I wanted to allow the reader to further explore this chart.  I started with two parameters for a min age and max age.  When the user chose a min age of say 50 and a max age of say 65, it essentially zoomed into the chart by filtering out the points that were not in that range.  However, it was a bit clunky in my opinion (it required the selection of two parameters) and it was actually filtering out points, which I did not want it to do. 

I considered set actions for some type of drill-down capabilities, tried mapping a transparent background image to provide the map toolbar (which worked by the way), but I then had a “DUH” moment.  I right-clicked the chart and viola, there was an option to “Show View Toolbar”.  Sure enough, that added the toolbar to the chart like with any map and I was able to navigate the jitter plot.  Below is a GIF showing how simple this is.

And that’s all there is to it!  Right-click the chart, choose “Show View Toolbar”, then use the toolbar to explore the chart just like you would do with a map.  So simple!  Although you may not need it, I’ve created a sample workbook to go along with it. 

I hope you enjoyed this quick blog post.  As always, please feel free to reach out to me if you have any questions. 

Kevin Flerlage, April 22, 2019 | Twitter | LinkedIn | Tableau Public











No comments

Powered by Blogger.