I have some data that is sorted but in plotly the horizontal bar is only sorting in reverse alphabetical order but I need it to sort by a VALUE which is a number; see image 'YOY' column. enter image description here
ecomm_yoy <- ecomm_data2019 %>%
inner_join(ecomm_data2018, by = "Brand") %>%
mutate(YOY = round(((Value.x - Value.y)/Value.y)*100, 2))
ecomm_yoy2 <- ecomm_yoy[order(-ecomm_yoy$YOY),]
plot_ly(x = ecomm_yoy2$YOY, y = ecomm_yoy2$Brand, type = 'bar', orientation = 'h')