Bug: config={'doubleClick': False} does not supress doubleClick for map figures
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 18.8k
- 派生
- 2.8k
- 平均合并
- 16 小时 26 分钟
- 30 天内合并 PR
- 21
描述
Some users use fig.show(config={'doubleClick': False}) to supress the default behaviour where double clicking on a figure returns to the default zoom level.
This behaviour is not supressed on map figures, tested on px.choropleth and choropleth_mapbox, plotly==6.0.1.
There does not appear to be a way to supress this behaviour for those maptypes, and there's no relevant error in the terminal to
Example:
ddk.Block(children=[
ddk.Card(children=ddk.Graph(id='control'),),
ddk.Card(children=ddk.Graph(id='map'),)
])
@callback(
Output('control', 'figure'),
Output('map', 'figure'),
Input('species', 'value'),
)
def two_figures(species):
control = px.scatter()
control.show(config={'doubleClick': False})
map = px.choropleth_map()
map.show(config={'doubleClick': False})
return control, map
returns the following behaviour
https://github.com/user-attachments/assets/b5e7cc0f-0b0f-425d-a6d8-6924b73fffc0
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,使用提供的 ddk.Graph 示例在 plotly==6.0.1 中重现该问题,并比较 px.scatter 与 px.choropleth_map 和 choropleth_mapbox。跟踪 fig.show(config={'doubleClick': False}) 如何传递给地图 figure,然后添加测试覆盖,验证禁用该选项时双击不会重置地图缩放级别。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100