R Plotly: How to set the color of Individual Bars of a Waterfall Chart in R Plot.ly?
问题 I am trying to change the color of the individual bars of a waterfall chart using R Plotly. More specifically the first and the last bar, I want it to be blue and yellow respectively. So in the below graph, Group 1 has to be blue and Group 2 has to be yellow. R Plotly Waterfall chart seems to only have the option to set three colors for increasing, decreasing and total bars. Here is the code used to generate the above graph: library(plotly) df <- data.frame(Rank = 1:7, Variable = c("Group 1",