plotly / plotly/react-plotly.js
Plotly.restyle breaks onClick handlers
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 1.1k
- 派生
- 138
- 平均合并
- 3 天 2 小时
- 30 天内合并 PR
- 4
描述
Issue: After calling Plotly.restyle on a rendered chart, onClick callback fail to be called.
Reproduction: https://codesandbox.io/s/youthful-ganguly-kt5pq7?file=/src/chart.tsx Using this example, you are able to click the line points or the bar and see the selection updated at the bottom. this works indefinitely, and as expected. By clicking the restyle button, the bars will change color from orange to blue. After this, click events cease to work on both the bar and the line plots.
Base Plotly: this DOES work as expected in base plotly using the same data and same reproduction steps https://codepen.io/swalsh81/pen/gOqaxeP
Expected functionality: Click events should continue to work after a Plotly.restyle event is called and function like the base plotly does as demonstrated
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先在链接的 CodeSandbox 中复现该行为,重点关注 chart.tsx 和 Plotly.restyle 按钮流程。将 React 组件的行为与链接的基础 Plotly CodePen 进行比较,然后验证 restyling 后柱状图和折线图的 click callbacks 是否仍会触发。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, react
- 领域
- data-visualization, frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 48/100