I am trying to create a waterfall chart in plotly, ie two bars next to each other in each g
data <- data.frame(x = c("A", "B", "A", "B"),
g= c(1, 1, 2, 2),
y = 10, 30 ,50 ,60)
plot_ly(
data, type = "waterfall", measure = ~x,
x = ~g, y= ~y,
connector = list(visible = FALSE))