Skip to content

Hover info/tooltip is using y labels and not values which causes problems with boxplots hoverinfo #706

Open
@ukkonen

Description

@ukkonen

When you use your own labels for values on x or y axis then hoverinfo/tooltip will show these labels. This is generally ok but it is problem for boxplots, where you cannot change hoverinfo text. For example, you want to make boxplot of some time values (in minutes) but you want to format labels on y axis to HH:MM. If some value of a quartile hit the value displayed on y axis, the hover info will show HH:MM label for this value while for other values it will show just time in minutes... See the hoverinfo for the first and the third quartile compared to other values on the figure bellow. Any suggestion how to fix it or make it consistent so the formatting is the same? Thank you!

library(ggplot2)
library(plotly)

p<-ggplot()+
  geom_boxplot(aes(x="A", y=c(5,15,25,25,45,72)))+
  scale_y_continuous(breaks=seq(0, 75,15), labels=c("00:00","00:15","00:30","00:45","01:00","01:15"))+
  ylab("") 

ggplotly(p)

boxplot

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions