I’m trying the stacked bar chart example using ggplot and don’t get the correct values in the tooltip. Rather than showing the value for each variable (e.g. F1/500) as in the online example, it shows a cumulative sum for that bar (F1/800).
Session info:
R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Sierra 10.12.1
plotly_4.5.6 ggplot2_2.2.0
library(plotly)
DF <- read.table(text="Rank F1 F2 F3
1 500 250 50
2 400 100 30
3 300 155 100
4 200 90 10", header=TRUE)
library(reshape2)
DF1 <- melt(DF, id.var="Rank")
p <- ggplot(DF1, aes(x = Rank, y = value, fill = variable)) +
geom_bar(stat = "identity")
ggplotly(p)