[BUG]: `scattergl` and `splom` hover ignores marker size for overlapping points
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 55/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- javascript
- Domínio
- data-visualization
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- JavaScript
- Estrelas
- 18.3k
- Forks
- 2k
- Merge médio
- 1d 19h
- PRs com merge (30d)
- 21
Preparar o ambiente
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de plotly/plotly.js
-
bug
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia
-
chore P3 plotly-internal size: 3 task
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
Mantenedores costumam responder em até 1 dia
-
chore P1 plotly-internal size: 1 task
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
chore P3 plotly-internal size: 1 task
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
plotly/plotly.js#7648 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de plotly/plotly.js
Issues semelhantes
-
bug CI breakage triage needed
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
oppia/oppia#27517 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
draftomen enhancement size: S
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
andreagrandi/draftomen#761 ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
HarperFast/harper#2866 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
HarperFast/harper-pro#927 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
anthropics/skills#1897 · 1 comentário ·
Mantenedores costumam responder em até 1 dia