Hover info/tooltip is using y labels and not values which causes problems with boxplots hoverinfo
还没有人认领这个 Issue。
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
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)

贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用 ggplot2 和 plotly,通过 ggplotly(p) 重现该示例,然后检查当 scale_y_continuous 提供自定义标签时,boxplot 的悬停信息是如何生成的。比较与带标签刻度相匹配的四分位数值和其他值,并验证生成的 tooltip 格式对所有 boxplot 值都保持一致。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- r
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100