Hover tooltip works incorrectly in scatter WebGL
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 18.8k
- フォーク
- 2.8k
- 平均マージ
- 16時間 26分
- マージ済み PR(30日)
- 21
説明
In the code example below (using the scattergl) when the cursor is rolled over the bubble, the hover tooltip does not appear until the cursor is close to the center of the bubble. The tooltip itself also points to the center of the bubble.
This is different from the expected behavior observed with the regular scatter where the tooltip appears in relation to the boundary of the bubble, rather than its center. And the tooltip points to the boundary as well.
For the Plotly Express px.scatter, one needs to set render_mode='svg' to switch out of WebGL for the correct behaviour.
This results in an incorrect tooltip in WebGL appearing when the cursor is over the larger bubble in an example such as this one:

import pandas as pd
import plotly.graph_objects as go
df = pd.DataFrame({'x': [1], 'y': [1],'z': [100]})
fig = go.Figure()
fig.add_scattergl(
x=df['x'],
y=df['y'],
marker_size=df['z'],
mode='markers',
marker_sizeref=0.01,
marker_sizemode='area',
showlegend=True,
hovertemplate=(
'x: %{x:.2f}<br>'
'y: %{y:.2f}<br>'
'<extra></extra>'
),
)
fig.show()
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、提供されている go.Figure.add_scattergl を使った Python の例を実行し、その hover の挙動を通常の scatter と比較します。scattergl のエントリーポイントから WebGL の hover 処理を追跡し、期待される境界ベースのツールチップの挙動と render_mode='svg' との比較を参照します。大きなバブルが表示領域全体で反応し、ツールチップが境界を指すようになれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- data-visualization, frontend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100