Horizontally centered bars, one per stage, whose widths are proportional to the value — the standard conversion/drop-off view.

geom_funnel(
  mapping = NULL,
  data = NULL,
  alpha = NULL,
  label = TRUE,
  label_size = NULL
)

Arguments

mapping, data

Standard layer overrides. Map the stage to x (ordered top to bottom) and the count to y.

alpha

Bar opacity.

label

Draw the stage label and value inside each bar.

label_size

Label size in px.

Value

A Layer to add with +.

Examples

d <- data.frame(
  stage = factor(c("Visits", "Signups", "Trials", "Paid"),
                 levels = c("Visits", "Signups", "Trials", "Paid")),
  n = c(10000, 3200, 1100, 420)
)
ggnext(d, aes(stage, n, color = stage)) + geom_funnel() + theme_void()
#> <ggnext plot>
#>   data:  4 x 2
#>   aes:   x = stage, y = n, color = stage
#>   layers: 1 
#>   coord: cartesian
#>   mode:  static