Hi,
I want to use colorscale with Funnel plot,But almost no effect.
Has anyone else encountered? How to I modify my code?
Ths!
The following is my example code :
install.packages("plotly")
library(plotly)
library(dplyr)
p <- plot_ly() %>%
add_trace(type = "funnel",
y = c("Website visit", "Downloads", "Potential customers", "Requested price", "Finalized"),
x = c(55, 27.4, 20.6, 11, 2),
textposition = "inside",
textinfo = "value+percent total+x",
opacity = 0.65,
marker = list(colorscale = "YlGnBu",color=c(5,4,3,2,1),showscale=TRUE,
line = list(width = c(4, 2, 2, 3, 1, 1), color = c("wheat", "wheat", "blue", "wheat", "wheat"))),
connector = list(line = list(color = "royalblue", dash = "dot", width = 3))) %>%
layout(yaxis = list(categoryarray = c("Website visit", "Downloads", "Potential customers", "Requested price", "Finalized")))
p