Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ukkonen opened this issue Sep 4, 2016 · 2 comments

Comments

@ukkonen
Copy link

ukkonen commented Sep 4, 2016

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

@cpsievert
Copy link
Collaborator

cpsievert commented Apr 6, 2017

Currently we always convert boxplots to a "box" trace type which does its own aggregation, making this sort of plot impossible to reconcile.

Going forward, I think we should use a combination of geom2trace.GeomPolygon(), to_basic.GeomRect(), and geom2trace.GeomPoint(), so we can guarantee a replica of the static version with the correct hoverinfo.

Also, it would be neat to have this geom respect dynamicTicks = TRUE, and use a "box" trace in that case

@tkkanno
Copy link

tkkanno commented Jan 30, 2019

any progress on this issue? I see nothing has been mentioned for ~20 months and it remains unresolved...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants