During Week 2 at the Data School, we started the week off by learning about visualisation best practices. It was particularly interesting to learn about cognitive functions and how a visualisation may assist or hinder one’s ability to retain information. Bar charts and line charts seem to reign supreme when considering visualisation best practices, but will this notion matter if the visualisation overall is not engaging? In some instances, a chart with more appeal would work a lot better, because line and bar graphs do start to look boring after you’ve seen hundreds of them.
So, with that being said, let’s have a look at how I have managed to keep lollipop charts relevant in 2018.
Lollipop charts are essentially a more appealing version of the lauded bar chart and require 4 extra clicks (minus formatting) to construct it. You basically overlay 2 of the same measures, select dual axis and change the chart type to circle instead of bar and you should get something like this.
But you shouldn’t stop there.
You can portray a lot more information on the same chart by taking the lollipop chart off the X or Y axis and making the ‘zero’ line a reference line instead, as seen below.
For this example, I will be using the data from the Alteryx Weekly Challenge 93. This type lollipop chart works well because there are 3 measures which uses the same scale. We are looking at the states which have produced the most and least number of pumpkins on any given year, as well as the total average number of pumpkins across all years.
To start, drag a Dimension (Year – Discreet) onto the Column shelf and a Measure (Maximum Pumpkin Numbers) into the Row shelf. You then want to drag in another Measure (Minimum Pumpkin Numbers) onto the existing axis. If the pill in your row shelf turned to Measure Values, you’re on the right track.
Next, because I want the Lollipop Chart to highlight the Maximum Pumpkin Numbers, I drag in the same Measure (Maximum Pumpkin Numbers) to the right axis until you see the dotted line.
Select the Marks Card of the measure you dragged in last and select the chart type to Gantt Bar, while changing the Measure Values Marks Card to Circle.
Next, create a Calculated Field for the reference line. An example is shown below.
Then right click on the Calculated Field you just created and create another Calculated Field. This 2nd one will be for the Lollipop stick. In this formula, we are subtracting a value from the reference line formula we just created. Call the 2nd Calculated Field “Bar”.
Click and drag “Bar” to the Size Card for the Gantt Bar and adjust the Size to roughly 15%.
Finally, go into the Analytics Pane and click and drag the Average Line pill to Table (measure you want to act as the reference line) and you will have created an improved version of a Lollipop Chart!