Closed happyshows closed 5 years ago
It's some stange behaviour from tidyeval because labels
and label
closely match. I will investigate that.
In the meantime, it works by naming all arguments explicitely:
funnel <- data.frame(stage = c("View", "Click", "Purchase"), value = c(80, 30, 20))
funnel %>%
e_charts() %>%
e_funnel(values = value, labels = stage, label = list(show = FALSE))
cool thanks for the clarification
I tried with your recommendation, however, it pop up with new error
funnel %>%
e_charts() %>%
e_funnel(values = value, labels = stage, legend = F,
maxSize = '250%',label = list(show = FALSE))
Error: Can't convert a list to a quosure
Apologies, fiddled a bit with the function, this works after reinstall.
funnel <- data.frame(stage = c("View", "Click", "Purchase"), value = c(80, 30, 20))
funnel %>%
e_charts() %>%
e_funnel(values = value, labels = stage, label = list(show = FALSE))
I've added a function to deal with nested data such as this, works with any chart type.
funnel <- data.frame(
stage = c("View", "Click", "Purchase"),
value = c(80, 30, 20),
color = c("blue", "red", "green")
)
funnel %>%
e_charts() %>%
e_funnel(value, stage) %>%
e_add("itemStyle", color)
Example on the website in the advanced section.
Hi,
Below code will run into error:
funnel %>% e_charts() %>% e_funnel(value, stage, legend = F, label = list(show = T) )
Warning: 'glue::collapse' is deprecated. Use 'glue_collapse' instead. See help("Deprecated") and help("glue-deprecated"). Error:
list(show = T)
must evaluate to column positions or names, not a listwhile level 1 parameters works fine, like below funnel %>% e_charts() %>% e_funnel(value, stage, legend = F, maxSize = '250%' )
I have tried similar approach in graph which seems to work well: