I am building a stacked funnel graph with plotly with 5 variables. Towards the bottom of the graph, the rectangles becomes so narrow that it's hard to read the values of the data labels. I've tried adjusting the overall graph width itself plot_ly(width = 1200, height = 800) however that doesn't solve the issue. I would like to be able to have that type of flexibility for each step of the funnel. Is that possible?
EDIT: As an example, I took the stacked graph from here: https://plotly.com/r/funnel-charts/ and extended the data so they all go through the entire funnel. As you can see, for the last stages, it's hard to read. I would like to find a way to make it readable.
Code adapted from website above:
fig <- plot_ly(height = 1200, width = 800,
type = "funnel",
name = 'Montreal',
y = c("Website visit", "Downloads", "Potential customers", "Requested price", "invoice sent", "Finalized"),
x = c(120, 60, 30, 20, 10, 5),
textinfo = "value+percent initial")
fig <- fig %>%
add_trace(
type = "funnel",
name = 'Toronto',
orientation = "h",
y = c("Website visit", "Downloads", "Potential customers", "Requested price", "invoice sent", "Finalized"),
x = c(100, 60, 40, 30, 20, 10),
textposition = "inside",
textinfo = "value+percent previous")
fig <- fig %>%
add_trace(
type = "funnel",
name = 'Vancouver',
orientation = "h",
y = c("Website visit", "Downloads", "Potential customers", "Requested price", "invoice sent", "Finalized"),
x = c(90, 70, 50, 30, 10, 5),
textposition = "outside",
textinfo = "value+percent total")
fig <- fig %>%
layout(yaxis = list(categoryarray = c("Website visit", "Downloads", "Potential customers", "Requested price", "invoice sent", "Finalized")))
fig
