Hover info/tooltip is using y labels and not values which causes problems with boxplots hoverinfo
Nessuno ha ancora preso questa issue.
- Lingua principale
- R
- Stelle
- 2.7k
- Fork
- 641
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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)

Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riproduci l'esempio con ggplot2 e plotly usando ggplotly(p), quindi esamina come vengono generate le informazioni al passaggio del mouse sul boxplot quando scale_y_continuous fornisce etichette personalizzate. Confronta i valori dei quartili che corrispondono ai tick etichettati con altri valori e verifica che la formattazione del tooltip risultante sia coerente per tutti i valori del boxplot.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- r
- Ambito
- data-visualization
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100