How to control “count” in tooltip for ggplotly with filled bar plot in R
问题 Thanks in advance for any advice you can offer! I'm hoping to be able to relabel "count" in the tooltip for a public facing interactive plot. Here's a reproducible example: library(plotly) df <- data.frame(cat=c(rep("A", 5), rep("B", 7), rep("C", 10)), time=c(rep("Time1", 3), rep("Time2", 13), rep("Time3", 6))) ggplotly(ggplot(df, aes(x=time, fill=cat)) + geom_bar(position = "fill")) I know I can control the time and category labels in the tooltip with text=paste("Category:", cat, "Time:"