Title: [BUG]: `scattergl` and `splom` hover ignores marker size for overlapping points · Issue #8082 · plotly/plotly.js · GitHub
Open Graph Title: [BUG]: `scattergl` and `splom` hover ignores marker size for overlapping points · Issue #8082 · plotly/plotly.js
X Title: [BUG]: `scattergl` and `splom` hover ignores marker size for overlapping points · Issue #8082 · plotly/plotly.js
Description: 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/sc...
Open Graph Description: 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 p...
X Description: 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 p...
Opengraph URL: https://github.com/plotly/plotly.js/issues/8082
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG]: `scattergl` and `splom` hover ignores marker size for overlapping points","articleBody":"### Description\n\nIf 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`.\n\n`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.\n\nThis is a follow-up to #8077, which fixed ties between equal distances.\n\n### Steps to reproduce\n\n- Open Plotly devtools\n- Run this snippet in the browser devtools\n```js\nPlotly.newPlot(gd, {\n data: [\n { type: 'scatter', name: 'A', mode: 'markers', marker: { size: 6 }, x: [1], y: [0] },\n { type: 'scatter', name: 'B', mode: 'markers', marker: { size: 20 }, x: [1], y: [0] }\n ],\n layout: { hovermode: 'closest' }\n});\n```\n- Hover the center of the shared point\n- Note that the label shows A\n- Change both traces to `type: 'scattergl'` and hover again\n- Note that the label shows B\n\n### Notes\n\n- A fix probably means sharing the scoring functions in `scatter/hover.js` with `scattergl` and `splom`\n- Each marker's radius can be taken from the sizes that `scattergl/convert.js` already computes\n- Large traces search a spatial tree within `hoverdistance` of the pointer, so the search box also has to grow by the largest marker radius\n- This would changed hover results for every WebGL plot with markers of different sizes, so we need to be careful about the blast radius","author":{"url":"https://github.com/camdecoster","@type":"Person","name":"camdecoster"},"datePublished":"2026-09-25T17:44:02Z","url":"https://github.com/plotly/plotly.js/issues/8082"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a94e1b1d-f452-8552-ae13-a2f2e1b41a7f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A5A0:2A5566:8AFF87:B664FE:6B01AE5D |
| html-safe-nonce | c5c48dc674ef7407e15776f9191df418197e0029d70bfffa3c51e3502e7e3d7d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNUEwOjJBNTU2Njo4QUZGODc6QjY2NEZFOjZCMDFBRTVEIiwidmlzaXRvcl9pZCI6IjM1MjI4Mjk1OTIxMjc3MTI4NjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a1348ac6b2be7ac79fe5f7b83cb94bec6cbf0fbd3c87aef7e5acde88f2fec088 |
| hovercard-subject-tag | issue:5586354944 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/plotly/plotly.js/8082/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bdf59dbc42c718ddb4d674f34729ab347135f5e03b2be39098ec045e1f8481e2/plotly/plotly.js/issues/8082 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bdf59dbc42c718ddb4d674f34729ab347135f5e03b2be39098ec045e1f8481e2/plotly/plotly.js/issues/8082 |
| og:image:alt | 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 p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | camdecoster |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/plotly.js git https://github.com/plotly/plotly.js.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 45646037 |
| octolytics-dimension-repository_nwo | plotly/plotly.js |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 45646037 |
| octolytics-dimension-repository_network_root_nwo | plotly/plotly.js |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width