plotly / plotly/plotly.py

Bug: config={'doubleClick': False} does not supress doubleClick for map figures

オープン
#5,196 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
18.8k
フォーク
2.8k
平均マージ
16時間 26分
マージ済み PR(30日)
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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. 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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。