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