# NOT RUN {
library(dplyr)
plot_data <- dplyr::sample_frac(ggplot2::diamonds, 0.05)
plot <- gg_point_col(data = plot_data, x_var = carat, y_var = price, col_var = color)
plotly::ggplotly(plot)
plotly::ggplotly(plot) %>%
plotly_col_legend(rev = TRUE)
plotly::ggplotly(plot) %>%
plotly_col_legend(order = c(2, 1, 3:7))
# }
Run the code above in your browser using DataLab