Figure margin edit makes scrollZoom glitch / lag
未关闭
还没有人认领这个 Issue。
bug
P3
performance
- 主要语言
- Python
- 星标
- 18.8k
- 派生
- 2.8k
- 平均合并
- 16 小时 26 分钟
- 30 天内合并 PR
- 21
描述
Updating layout to change margin size works well
Enabling scrollzoom works well
Doing both at the same time gives you an interactive plot that is very laggy to scroll zoom in
Seems worse with more points
Seems related to https://github.com/plotly/plotly.js/issues/3729
I encountered this issue on Dash first, but realised it exists in pure Plotly as well
Plotly v 5.14.1 on Python 3.9.13
Minimal example (remove update_layout line to see behavior improve)
import plotly.express as px
df = px.data.gapminder()
fig = px.scatter(df, x='pop', y='gdpPercap')
fig.update_layout(margin=dict(l=0, r=0, t=0, b=0))
fig.show(config=dict({'scrollZoom': True}))
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用 Plotly 5.14.1 运行提供的 Python 最小示例,并比较有无 update_layout margin 更改时的滚动缩放,尤其是在点数增加时。将所描述的行为和相关 issue #3729 作为调查的起点;当编辑 margin 不再导致明显的滚动缩放延迟时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 32/100