plotly / plotly/plotly.js

add argument to modify hover box position/direction

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

还没有人认领这个 Issue。

cs feature P2
主要语言
JavaScript
星标
18.3k
派生
2k
平均合并
2 天 12 小时
30 天内合并 PR
28

描述

Right now developers can't modify the hover box position respective to the point the user is hovering. The hover box position is determined by:

https://github.com/user-attachments/assets/0634d079-b4eb-4325-af67-d13ac0fc6ba1

Desired behavior:

# the python way
fig.update_traces(hoverbox_direction="right")
fig.update_traces(hoverbox_direction="left+top")

贡献指南

打开贡献指南

从这里开始

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

调研方向

从 src/components/fx/hover.js 中 className="hovertext" 的 g 元素及其 transform 附近开始,然后查看 issue #7278,了解 hover 三角形的方向。定义方向参数应如何映射到 hover 框和三角形,包括 "left+top" 这样的组合方向;当调用方可以通过所请求的 trace 配置选择这些位置时,即表示完成。

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

评估

技术栈
javascript
领域
data-visualization, frontend
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

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