e_funnel: Funnel

Description Usage Arguments Details See Also Examples

View source: R/add.R

Description

Add a funnel.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
e_funnel(
  e,
  values,
  labels,
  name = NULL,
  legend = TRUE,
  rm_x = TRUE,
  rm_y = TRUE,
  ...
)

e_funnel_(
  e,
  values,
  labels,
  name = NULL,
  legend = TRUE,
  rm_x = TRUE,
  rm_y = TRUE,
  ...
)

Arguments

e

An echarts4r object as returned by e_charts.

values, labels

Values and labels of funnel.

name

name of the serie.

legend

Whether to add serie to legend.

rm_x, rm_y

Whether to remove x and y axis, defaults to TRUE.

...

Any other option to pass to bar or line char types.

Details

No bind argument here, with a funnel bind = labels.

See Also

Additional arguments

Examples

1
2
3
4
5
6
7
8
funnel <- data.frame(
  stage = c("View", "Click", "Purchase"),
  value = c(80, 30, 20)
)

funnel |>
  e_charts() |>
  e_funnel(value, stage)

JohnCoene/echarts4 documentation built on July 27, 2021, 5:20 p.m.