This page aims to describe how to realise an interactive circle packing chart. It has a major advantage: when hovering circles, additional information appears, what gives more insight to the plot.

This chart follows the pages #306 and #305 that explains how to realise a static version of circle packing, and how to customise it. This interactive version is very close to the static one. It uses the ggiraph library to transform the ggplot2 code in something interactive. The steps are quite easy. First you need to prepare a column in the data frame with the text you want to display while hovering. Second, you need to change the geometries to use the interactive geometries of ggiraph. Check the code below:






Make a search



Leave a Reply

Be the First to Comment!

Notify of