[BUG]: `scattergl` and `splom` hover ignores marker size for overlapping points
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript
調査の方向性
Reproduce the overlapping-marker example in the browser devtools, then compare scatter/hover.js with the scattergl and splom hover paths. Read the marker sizes computed in scattergl/convert.js and trace how the spatial-tree search uses hoverdistance. Done means WebGL hover ranking matches scatter for marker size and x-hovermode without unintended changes elsewhere.
索引モデルが issue の本文から書いたものです。
説明
Description
If markers of different sizes overlap, scatter and scattergl show different hover labels. scatter includes the marker radius in the hover distance, and a smaller marker wins while the pointer is near its center (src/traces/scatter/hover.js). scattergl and splom measure only the distance to the marker center, so the marker drawn on top always wins. scatterpolargl inherits this through scattergl.
scattergl also uses a plain |dx| in x hovermode, but scatter changes the shape of dx inside the marker radius. That difference can rank close points differently.
This is a follow-up to #8077, which fixed ties between equal distances.
Steps to reproduce
- Open Plotly devtools
- Run this snippet in the browser devtools
Plotly.newPlot(gd, {
data: [
{ type: 'scatter', name: 'A', mode: 'markers', marker: { size: 6 }, x: [1], y: [0] },
{ type: 'scatter', name: 'B', mode: 'markers', marker: { size: 20 }, x: [1], y: [0] }
],
layout: { hovermode: 'closest' }
});
- Hover the center of the shared point
- Note that the label shows A
- Change both traces to
type: 'scattergl'and hover again - Note that the label shows B
Notes
- A fix probably means sharing the scoring functions in
scatter/hover.jswithscatterglandsplom - Each marker's radius can be taken from the sizes that
scattergl/convert.jsalready computes - Large traces search a spatial tree within
hoverdistanceof the pointer, so the search box also has to grow by the largest marker radius - This would changed hover results for every WebGL plot with markers of different sizes, so we need to be careful about the blast radius
- 主要言語
- JavaScript
- スター
- 18.3k
- フォーク
- 2k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 21
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
plotly/plotly.js のほかの issue
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
chore P3 plotly-internal size: 3 task
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
chore P1 plotly-internal size: 1 task
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
chore P3 plotly-internal size: 1 task
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
plotly/plotly.js#7648 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
plotly/plotly.js の issue をすべて見る
似ている issue
-
Complexity: Small P-Feature: Projects page ready for merge team role: back end/devOps role: front end size: 0.25pt
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 67/100
bellingcat/toolkit#905 ·
-
self-care self-care:docs-build-time-investigator
難易度 2/5 半日 初心者へのやさしさ 76/100
githubnext/gh-aw-cao#14191 ·
メンテナーはふだん 1 日以内に返信
-
effort:low impact:medium RAG status: auto-triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
mastra-ai/mastra#25229 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
sugarlabs/musicblocks#8984 ·
メンテナーはふだん 1 日以内に返信