Plotly - Create Pie Chart with continuous color scale
问题 I'm looking to create a plotly chart where the colors of each slice another variable in the dataframe. This is pretty simple to do in ggplot2, however, I'm struggling to convert this to plotly. My sample code is here: Product <- c("Product1","Product2","Product3","Product4","Product5","Product6","Product7") Value <- c(1000000,200002,599996,1399994,2199992,2999990,3799988) Rating = c(0.24, 0.28, 0.17, 0.1, 0.5, 0.6, 0.34) df <- data.frame(Product,Value, Rating) plot_ly(df, labels = ~Product,