Funnel Chart in R-Interactive Funnel Plot

[This article was first published on Methods – finnstats, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Funnel Chart in R, A funnel chart is mainly used for demonstrates the flow of users through a business or sales process. This chart takes its name from its shape, which starts from a broad head and ends in a small neck.

The number of users at each stage of the process are represented from the funnel’s width as it narrows.

Based on the funnel chart can understand easily there are any significant drop-offs and can make decisions accordingly. Note the drop reasons we need to analyze it separately to get the clarity.

So basically funnel charts are high level visualization before going to deeper and deeper investigations.

QQ-plots in R: Quantile-Quantile Plots-Quick Start Guide »

In this article we are going to describe how to create a funnel chart in R, that is interactive.

If you are not installed highcharter package install the same based on below command.

Funnel Chart in R


 Load required R packages, here we are using dplyr and highcharter.

Error Bar Plot in R-Adding Error Bars-Quick Guide »


Once you loaded the package then need to set the high charter options.

options(highcharter.theme = hc_theme_smpl(tooltip = list(valueDecimals = 2)))

Let’s create a data frame for plotting

df <- data.frame(
  x = c(0, 1, 2, 3, 4),
  y = c(975, 779, 584, 390, 200),
  name = as.factor(c("Leads", "Sales Call", "Follow Up", "Conversion", "Sale"))
) %>%

Here we are talking about sales process in different stages like, leads, sales call, follow up, conversion and sales.

  x   y       name
1 0 975      Leads
2 1 779 Sales Call
3 2 584  Follow Up
4 3 390 Conversion
5 4 200       Sale

Let’s create an interactive funnel chart in R

hc <- df %>%
    "funnel", hcaes(x = name, y = y),
    name = "Sales Conversions"

Note displayed normal png image, If you want to see the magic interactive lets plot it.

Animated Graph GIF with gganimate & ggplot »

Enjoyed this article? Don’t forget to show your love, Please Subscribe the Newsletter and COMMENT below!

The post Funnel Chart in R-Interactive Funnel Plot appeared first on finnstats.

To leave a comment for the author, please follow the link and comment on their blog: Methods – finnstats. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)