[BUG]: `scattergl` text is hidden behind selected markers
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript
- Domain
- computer-graphics, data-visualization
Research direction
Start with the linked CodePen reproduction and compare the scattergl behavior with the equivalent scatter trace. Trace scattergl text rendering around the vendor line using ctx2.getImageData mentioned in the report, and review issue #7285 for context. Done means selected text is visible like unselected text, with the reported canvas warning addressed or its scope clarified.
Written by the indexing model from the issue text.
Description
Description
scattergl text is hidden behind selected markers
The equivalent scatter trace renders the text correctly.
Reproducible example:
https://codepen.io/Lexachoc/pen/dPvRydx
mode: "markers+text",
texttemplate: "x=%{x}",
selectedpoints: [0],
selected: {
textfont: { color: "red" }
},
unselected: {
textfont: {color: 'white'}
},
For unselect.textfont, both works, only select.textfont is broken for scattergl:
Note
To confirm, uncomment
textposition: 'top-center',
Additional warning observed
When using:
mode: "markers+text",
or
mode: "text",
scattergl will throw this warning:
Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true. See: https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently
caused by this line: var bottomPx = firstTop(ctx2.getImageData(0, 0, l2, l2)); from the vendor package.
Reported before in https://github.com/plotly/plotly.js/issues/7285
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 21
Getting set up
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
-
chore P3 plotly-internal size: 3 task
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
chore P1 plotly-internal size: 1 task
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
chore P3 plotly-internal size: 1 task
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
plotly/plotly.js#7648 · 3 comments ·
Maintainers usually reply within 1 day
-
bug infrastructure P2
Difficulty 1/5 Under an hour Newbie friendliness 65/100
Maintainers usually reply within 1 day
All issues in plotly/plotly.js
Similar issues
-
Design only Leadership Survey SLFS
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
bcgov/digital-journeys#2293 ·
-
Toolkit
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
API Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ProjectSidewalk/SidewalkWebpage#5556 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jessepollak/home#1454 ·
Maintainers usually reply within 1 day
-
Mend: dependency security vulnerability untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
opensearch-project/OpenSearch-Dashboards#12822 ·
Maintainers usually reply within 1 day