[BUG]: scattergl hover freezes with more than 100.000 points all with different x but same y
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript
- Domain
- data-visualization
Research direction
Start by reproducing the issue with the provided scattergl JavaScript snippet in Plotly.js 4.0.0, comparing hover behavior at 100,000 and 99,999 points. Trace the scattergl hover path and the TOO_MANY_POINTS handling mentioned in the report, using issues #6792 and #5790 for context. Done means hovering no longer freezes or becomes abnormally slow for the reported data.
Written by the indexing model from the issue text.
Description
Description
In scattergl, when you have more than 100.000 points the scattergl freezes when trying to hover, more informations in the steps to reproduce.
Steps to reproduce
In version 4.0.0
Create a scattergl with 100.000 points with x just the index of the point and y all the same.
you can use this snipper
const n = 100000;
Plotly.newPlot('graph', [{
type: 'scattergl',
mode: 'markers',
x0: 0,
dx: 1,
y: Array(n).fill(0)
}]);
The default hovermode will be ok, no need to change it.
Try hovering on the point: the app freezes immediately.
Staying in the horizontal line of the points will make it look a little slow but normal, but when you exit from the line it freezes again.
Try removing one point (99.999 points): the freeze is gone.
Notes
Probably related to #6792 and #5790 but can't confirm if it's completely the same, this is more specific.
It is probably due to to the collapsation of the algorithm that comes in in a scattergl when there are TOO_MANY_POINTS (exactly 100.000).
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 22
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from plotly/plotly.js
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
chore P3 plotly-internal size: 3 task
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
-
chore P1 plotly-internal size: 1 task
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
chore P3 plotly-internal size: 1 task
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
All issues in plotly/plotly.js
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
Mintplex-Labs/anything-llm#6490 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
[quality] workflow-scripts guard reads test:unit:coverage as skipping the unit suite, blocking #632 Openagent/quality hive/hosted-available-lke648397-260827-5n31 quality testing
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
area-clientside-dartpad
Difficulty 2/5 1-3 hours Newbie friendliness 62/100