plotly / plotly/react-plotly.js
Clickmode "event+select" activated and Clicking outside of Graph calls onUpdate incorrectly
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 1.1k
- 派生
- 138
- 平均合并
- 3 天 2 小时
- 30 天内合并 PR
- 4
描述
Hi, currently working on Streamlit + Plotly selections! I noticed this bug that didn't seem like a bug on Streamlit's side.
It seems like onUpdate gets called and graph gets updated visually incorrectly when clickmode: "event+select" and dragmode: "select" and doing selection clicks. I would expect onDeselect to be called and layout.selections to remove the selection because selectedpoints in data has []
Reproducible example: https://codesandbox.io/p/sandbox/react-forked-6rypkr?file=%2Fsrc%2FApp.tsx
Steps to reproduce:
- Click on a single point
- Click outside of a point
Expectation: Graph is not less than 100% opaque
Actual: Graph is less than 100% opaque and weird and onUpdate is not called
Video to show actual:
https://github.com/plotly/react-plotly.js/assets/16749069/632b9ef7-c213-4a27-a7c7-08f5b8c9417e
I read that most issues here are likely Plotly.js problems but not sure if that's the case because I went to check plotly.js code and onUpdate is a callback while plotly.js contains an update function as far as I can tell.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从链接的 CodeSandbox 复现开始,检查 react-plotly.js 对使用 dragmode "select" 时 clickmode "event+select" 的处理。比较点击某个点后再点击其外部时的 callbacks 和图表状态,并确定该行为应归属于此 wrapper 还是 Plotly.js。完成的标准是:报告取消选择、移除选择,并且图表保持完全不透明。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, react
- 领域
- data-visualization, frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100