6/19/2018
Learn how to Make a Tadpole Chart and Different Charts in Tableau with Open Circles
I used to be studying a current weblog publish The Spawning of the Tadpole Chart by Mark Edwards. Mark’s publish outlines execs and cons for numerous kinds of this chart, however he requested on this Twitter thread find out how to make the traces cease on the outer fringe of the circles as an alternative of going into the middle of the circle. I’ve seen this come up earlier than and I’ve tried a number of completely different approaches for this over time, so I believed I might share a number of of these makes an attempt and a easy answer that works properly for creating these Tadpole charts and different charts in Tableau with open circle marks.
The Tadpole Charrt
Earlier than we start, here’s a « Tabpole » chart that Emma Cosh mocked up (not inbuilt Tableau).
This is not a brand new chart. In actual fact, this chart is featured in the Big Book of Dashboards in Chapter 8 in a dashboard created by Jonathan Drummey for Southern Maine Well being Care. We struggled with a reputation for this chart within the guide. Finally we determined it was a variation on a lollipop chart, a chart invented by my co-author Andy Cotgreave. Wanting again on this, it serves the identical objective as a related dot plot, also called a dumbbell chart, nevertheless it’s plotted with a single dot.
Personally, I like the brand new title that Emma got here up with for this line and single dot; the Tadpole chart, and constructing it’s fairly straight ahead. It begins as a dumbbell chart. Nonetheless, the only dot exhibits the present interval so there is no such thing as a dot for the earlier interval. A dumbbell chart is pretty simple to construct in Tableau. It requires a twin axis with one axis because the dots and the opposite axis because the traces connecting them. Eliminating one dot can be fairly simple. A easy calculation to test for the latest interval and make it equal to your measure when it is the present interval and NULL if it is not. Mark Edwards used this kind of calculation to recreate Emma’s Tadpole chart and subsequent variations. You may download Mark’s workbook here and observe alongside.
Calculated Discipline Identify: Gross sales Circle
System: IF [Period] = ‘This 12 months’ THEN [Sales Line] END
For the Superstore knowledge, the calculation may look ike this:
Calculated Discipline Identify: Gross sales Circle
System: IF DATEPART(’12 months’, [Order Date]) = 2018 then [Sales] END
The tough half, nevertheless, is find out how to make the open circles with out having the road come into the middle of the circle. For instance, in certainly one of Mark’s Tadpole chart variations it seems to be like this.
Discover the road goes by the circle and into the middle of every circle. So how can we create the identical chart in Tableau, however with a white middle (or no matter background colour)?
What Would not Work Nicely
Earlier than I supply an answer for this, I am going to share a number of makes an attempt that I attempted over time that didn’t work properly.
First, creating customized shapes. Sometimes, I counsel saving customized shapes as PNG recordsdata. So why not create a PNG file with a circle with a white middle? The issue with that is that when Tableau encodes colour on a customized form that’s saved as a PNG with a clear background, it modifications the colour of the white middle as properly and you find yourself with a coloured dot. So how a couple of JPG? The issue with a JPG is that the it may well’t have a clear background, so you find yourself with a stable coloured sq., as an alternative of a circle. Apart from, even when this labored, it could be a ache to create customized shapes with completely different colours to match the viz and background colour. As well as, customized shapes are low decision, so you possibly can’t print or export them as excessive decision in PDF or pictures.
What about altering the information? We might shorten the road away from the dot utilizing calculations. This is not simple, as a result of the quantity of shortening may very well be a optimistic or damaging quantity relying on which path the Tadpole goes. Additionally, the quantity so as to add or subtract from the road could be depending on the scale of the circle and the size of the road. Because the circle will get greater then extra line must be eliminated. This strategy would require plenty of calculations and could be troublesome to get excellent.
Adam McCann had an fascinating concept. He advised including a label on the within of the circle with « l » and make it white. I considered a variation on this may be to make use of a Unicode bullet character and make that white to fill within the circle. The issue I discovered with this was getting the labels to point out precisely within the middle of the dots and with the precise font measurement.
So let us take a look at one other approach we are able to construct this chart.
Constructing a Fundamental Tadpole Chart
That is the simple half. Constructing a primary Tadpole Chart is fairly straight ahead. Utilizing Mark’s workbook, listed below are the steps to construct a Tadpole chart..
Transfer Sequence to Rows
Transfer Gross sales Strains to Columns
Transfer Gross sales Circle to Columns
Proper-click on Gross sales Circle and Choose « Twin Axis »
Proper-click on the secondary y-axis and Choose « Synchronize Axis »
On the All Marks Card, Transfer Class to Colour
On the Gross sales Strains Marks Card, Choose Line from the dropdown menu on the Marks Card
Transfer Interval to Path
Proper-click on the Y-Axis and choose « Present Header » to take away the header
Proper-click on the Secondary X-Axis on the prime and choose « Present Header » to take away the header
It is best to now have a Tadpole chart that appears like this:
Including a White Heart to the Stuffed Dot
The easiest way I’ve discovered to create the circle is to fill the within of the dot with white (or no matter colour the background colour is) with one other circle. To do that, we’re going to duplicate the Gross sales Circle area and overlay it over prime of the present circle.
Proper-Click on Gross sales Circle and choose « Duplicate »
Transfer Measure Values to Columns on prime of Sum(Gross sales Circle). This may change Sum(Gross sales Circle) with Mesure Values on the Columns.
You’ll now have 4 measures on the Measure Values card, however we solely need two of them.
Proper-click Sum(Gross sales Strains) and choose « Take away » or drag the tablet to the left off of the canvas.
Proper-click Sum(Variety of Information) and choose « Take away » or drag the tablet to the left off of the canvas.
On the Measure Values Marks Card:
Choose Circles from the dropdown menu on the Marks Card
Transfer Measure Names to Measurement
Choose the Element icon to the left of Measure Names and alter it to Colour
or Multi-Choose Class and Measure Values holding down the Management Key and transfer them each to Colour
It is best to now have 12 colours in your legend.
Double-click any colour within the colour legend to open the edit colour menu.
Change the entire Gross sales Circle (copy) colours to white (or to match the background colour) and assign the opposite colours as desired.
Be aware – you possibly can multi-select all of those utilizing the Management key after which double-click the final one. This may change the entire colours without delay with out altering each.
On the Measure Values card, drag Sum(Gross sales Circle (copy)) to the highest of the listing forward of Sum(Gross sales Circle). This may reverse the scale of the circles. Or double-click one of many measurement icons within the legend and choose « Reversed »
Double-click one of many measurement icons within the legend and make the smaller dot (Sum(Gross sales Circle (copy))) bigger.
It is best to now have a Tadpole chart with a circle and no line by the center of the circle.
This similar method may very well be used for lollipop charts, dumbbell charts or any chart that mixes traces and dots on a twin axis. As well as, the scale may be reversed to place the white circle on the skin to create a spot between the dots.
A dumbbell chart with open circles:
A dumbbell chart with an open circle for the earlier interval and a stuffed in circle for the present interval:
A dumbbell chart with the white circle on the skin creating a spot between the dots and the road:
A lollipop chart with open circles:
A line chart with open circles:
A line chart with white circles on the skin creating a spot between the dots and the road:
Under is a Tableau workbook I created based mostly on Mark’s authentic workbook with all of those completely different chart variations:
I hope you discover this data helpful. When you’ve got any questions be at liberty to electronic mail me at Jeff@DataPlusScience.com
Jeffrey A. Shaffer
Observe on Twitter @HighVizAbility