Clicks are sometimes missed with clickmode layout key
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 18.3k
- 派生
- 2k
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 28
描述
Hi,
This is William Huang from the Streamlit Open Source team!
I am currently attempting to provide selection on charts for the Streamlit st.plotly_chart api. I noticed there are on_select and on_click callbacks that we can register to. The on_click callbacks always register and that seems fine.
However, when I try to use the clickmode: “event+select” in the layout of the graph, clicks are sometimes missed. This can be replicated here:
Plotly.js - JSFiddle - Code Playground
or here:
Plotly Playground - JSFiddle - Code Playground 1
Is there someone that can help me to understand why clicks are being missed? We are trying to release this feature within streamlit so any help would be appreciated!
I created a demo app here: https://chart-selections-demo.streamlit.app/ that uses this clickmode layout property. (FEEL FREE TO CHECK OUT 😉 )
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从链接的两个 JSFiddle 复现开始,并查看 issue 中描述的 clickmode: “event+select”行为。跟踪 Plotly.js 中点击事件和选择事件的处理,以确定点击为何会被遗漏;完成的标准是复现不再遗漏点击,同时保留选择行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100