plotly / plotly/plotly.R

Hover information partially disappear when providing color input

未关闭
#2,311 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
R
星标
2.7k
派生
641
PR 合并指标
30 天内没有已合并 PR

描述

Thanks for this package, it is very useful!
When using it, I encountered a kind of weird bug.

The two following plots should be identical and behave in the same way, except that the second one has colored points.

library(plotly)

plot_ly() %>%
  add_markers(
    x = c(1,2,3), y = c(1,2,3), z = c(1,2,3))

plot_ly() %>%
  add_markers(
    x = c(1,2,3), y = c(1,2,3), z = c(1,2,3), color = c(1,2,3))

For the first plot, all the values appear when I hover over all 3 points, as expected.
However, for the second plot, I can only hover over the second point; no information appears when I hover over the first nor the third point. Here are two screenshots that I made with the second plot (the one that has the bug).

image

image

The expected behavior is that the similar type of information would appear for all points.

More generally, I have the impression than when doing a scatter plot with $n$ points, I can only get the hover information of $n-2$ of them if they are colored. For example, the hoverinfo do not appear for the "extreme" points of this plot:

n = 10
plot_ly() %>%
  add_trace(
    x = 1:n, y = 1:n, z = 1:n, color = 1:n, type="scatter3d", mode="markers")

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先运行两个 plot_ly()/add_markers() 示例以及 n = 10 的 scatter3d 示例,以复现极值点处缺失悬停信息的问题。比较有颜色和无颜色点的悬停行为;当每个点都能一致地显示悬停信息时即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
r
领域
data-visualization
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
32/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。