top of page
Writer's pictureswati gupta

Lollipop Charts: Composite Charts In Tableau


Tableau is the most popular interactive data visualization tool and used for reporting and analyzing vast volumes of data. It helps users create different charts, graphs, maps, dashboards, and stories for visualizing and analyzing data in making business decisions.

A lollipop is a type of visualization chart that actually looks like a lollipop. In many situations, we are in need to find alternatives for Bar chart /Gantt chart/Side-by-side bar chart to make the dashboard more visually appealing and easier to understand. That's where we can use a lollipop chart.

Features of Lollipop Charts are :

  • The lollipop chart is a composite chart with bars and circles.

  • It is a variant of the bar chart with a circle at the end, to highlight the data value.

  • Like a bar chart, a lollipop chart is used to compare categorical data.

  • The length of the bar measures the magnitude.

  • In addition, we can use color to represent the category or magnitude.

  • Size can also be used to emphasize the degree.

  • We can replace circles with icons of specific categories, which can display category information more intuitively.

  • On the other hand, the end circle overstates the value. The lollipop chart extends the length of the bar and blurs the boundary. It makes precise comparison difficult, especially when the circle size is large or non-equal.

  • For this kind of composite chart, we are able to use more visual elements to convey information.

  • Lollipops chart offer a less cluttered view and on a very basic level, it offers something a little bit different on a dashboard that may well become cluttered with too many bar charts.


Best Practices for creating lollipop charts are :

  • Sorting the lollipop chart makes it more interpretable.

  • Use color and gridlines with caution to avoid clutter.

  • Always label the axis clearly.

  • Provide additional details on the tooltip.

The Classic Lollipop Chart:

I will be using dataset as Sample Superstore to visualize Sales for different product Sub-Category’s as a lollipop chart. Connect dataset above to Tableau app and follow along.


Step1. Build a simple bar chart.

a) Drag dimension field ‘Sub-Category’ to the rows shelf.

b) Drag measure field ‘Sales’ to the columns shelf.

c) Select ‘Bar’ under the Marks card.

Step 2. Create a dual bar chart.

a) Drag the measure field ‘Sales’ to the columns shelf next to the aggregate field SUM(Sales).

b) Make the charts dual.

c) Synchronize the axis.


Step 3. Change the second bar chart to a circle.

a) Select the second bar chart and change it to ‘Shape’ under marks card.

b) Choose circle on the ‘Shape’ tab.

c) Make the bar chart (1st chart) thinner and the circles (2nd chart) larger by adjusting their respective sizes

under the size tab.



The classic lollipop chart is created.


Diverging Lollipop Chart:

To create a Diverging lollipop chart follow the following steps-

Step 1. Drag State to the Columns shelf and add two instances of Profit to the Rows shelf.

Step 2. Again create a Dual Axis and make sure Synchronize Axis is checked.

Step 3. Tableau will automatically swap all the mark types from bar to circle.Click on the first instance of Profit and change the mark type from Automatic to Bar.

Step 4. This time we will use dynamic arrow shapes instead of circles.

Step 5. Positive profit values will be assigned an up arrow, and negative profit values will be assigned a down arrow. To do this, we need to create the following Calculated Field:

IF SUM([Profit]) > 0 THEN “Positive”

ELSEIF SUM([Profit]) < 0 THEN “Negative”

ELSEIF SUM([Profit]) = 0 THEN “Zero”

END

Step 6. Click on the second instance of Profit and change the mark type to Shape.

Step 7. Drag and drop the Calculated Field onto the Shape property of the Marks card. Click on the Shape property of the Marks Card and select the “Filled” Shape Palette. Now you can assign the up arrow for “Positive” and the down arrow for “Negative.

Step 8. Sort the Order as Descending.

Step 9. Click the All instance of the Marks card, and drag Profit onto the Color property of the Marks card.


Diverging lollipop chart is created.



Multi-layer Lollipop Chart:

To create a Multi layer lollipop chart follow the following steps-

Step 1. Put the discrete month of Order Date onto the Columns shelf.

Step 2. Pull Measure Values onto the Rows shelf, and filter to just Profit and Sales.

Step 3. Add Measure Names to the Color property of the Marks card.

Step 4. Click and drag Measure Values to duplicate it on the rows shelf.

Step 5. Create a Dual Axis and synchronize the axes. At this point, you will only have two lines in your view.

Step 6. Click the first instance of Measure Values on the Marks card, change the mark type to Bar, and adjust the size so the bars are thin.

Step 7. Next, click the second instance of Measure Values on the Marks card and change the mark type to Circle.

The visual will look a little off at this point because Tableau automatically stacks the Profit bars on top of the Sales bars.

Step 8. To fix this, select Analysis in the menu bar, hover over Stack Marks and choose Off.Now instead of stacking the bars, Tableau layers them on top of each other, which allows our lollipop “sticks” to line up with the “candy” circles properly.



Multi layer lollipop chart is created.


Conclusion:

Design Lollipop Chart in Tableau is the chart which shows the information in candy form and it is very nice way to represent the data in attractive way. We can see that Sorting in descending order allows us to compare profit changes more clearly, and Diverging color and growth direction help us to distinguish positive and negative value. The length of bars and degree of colors illustrate the magnitude. The labels on lollipop display the exact values for precision analysis.These charts make your visualization even more interesting!







328 views

Recent Posts

See All
bottom of page