
Overview
A lollipop chart is a type of data visualization that combines elements of a bar chart and a point chart. It consists of a vertical or horizontal line (the "stick") with a dot (the "lollipop") at the end, representing the value associated with each category. This format allows for easy comparison of values across different categories while providing a visually appealing alternative to traditional bar charts.
Example of a Lollipop Chart

Step-by-step guide
To create a lollipop chart in R with ggplot2…
Load the necessary libraries and dataset as shown below.

(Note, I am using the Sample – Superstore dataset)
Using the geom_segment and geom_point functions, I will create a lollipop chart showing the Sales by product Sub-Category using the code below.

The above code summarizes the Sales by product Sub-Category, before applying the ggplot(), geom_segment() and geom_point() functions to plot the lollipop chart.
Executing the above code plots the view below.

Finally, let’s declutter the view using the classic theme as shown below.

Executing the above code generates a cleaner lollipop chart as shown below.

Conclusion
Lollipop charts are an effective and visually engaging method for presenting data, particularly when comparing values across categories. They combine elements of scatter plots and bar charts, allowing for a clear representation of numerical data in relation to categorical variables. The versatility of lollipop charts makes them suitable for various applications, from business analytics to scientific research.
Lollipop charts serve as an effective alternative to standard bar charts, particularly in scenarios requiring clarity and visual appeal in data presentation. However, users should consider their potential limitations regarding precision and data suitability.
If you like the work we do and would like to work with us, drop us an email on our contacts page and we’ll reach out!
Thank you for reading!