Title: Identification of selected points with a key · Issue #1765 · plotly/plotly.js · GitHub
Open Graph Title: Identification of selected points with a key · Issue #1765 · plotly/plotly.js
X Title: Identification of selected points with a key · Issue #1765 · plotly/plotly.js
Description: When lassoing, the current way to get the selected points is to do something like eventData ? eventData.points.map(({curveNumber, pointNumber}) => gd.calcdata[curveNumber][pointNumber]) : null eventData itself has an id field but it's un...
Open Graph Description: When lassoing, the current way to get the selected points is to do something like eventData ? eventData.points.map(({curveNumber, pointNumber}) => gd.calcdata[curveNumber][pointNumber]) : null even...
X Description: When lassoing, the current way to get the selected points is to do something like eventData ? eventData.points.map(({curveNumber, pointNumber}) => gd.calcdata[curveNumber][pointNumber]) : null e...
Opengraph URL: https://github.com/plotly/plotly.js/issues/1765
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Identification of selected points with a key","articleBody":"When *lassoing*, the current way to get the selected points is to do something like\r\n```\r\neventData \r\n ? eventData.points.map(({curveNumber, pointNumber}) => gd.calcdata[curveNumber][pointNumber]) \r\n : null\r\n```\r\n- eventData itself has an `id` field but it's `undefined` (am I missing some relevant use?) and, currently, the `data` property of the `calcdata` leaf can carry anything via the `customdata` attribute when calling `Plotly.plotNew`.\r\n\r\nAs `customdata` is an attribute intended for library users, I think we should have a separate attribute, e.g. `key`, for the unique identification of a data point, to let crossfiltering have sufficient selection input. The identification must be unique enough to identify a record of a 'dataframe' that the plot feeds from. It can't trivially be an index number of the `data.x`/`data.y` because a specific plot may not have all the rows to render (consider a set of trellised panels, each plotting just a subset of the data). From the viewpoint of `plotly.js` the `key` field is populated by the API caller and the doc clearly states its intended use.\r\n\r\nAny alternative ideas or already available mechanism?\r\n\r\nWhen using the *box selector*, the situation is easier because of receiving a simple `x`/`y` data domain. The points are also available so the use of the `x`/`y` domain is more of a special-case optimization opportunity so this item considers the more general case of the lasso.","author":{"url":"https://github.com/monfera","@type":"Person","name":"monfera"},"datePublished":"2017-06-07T21:08:08Z","url":"https://github.com/plotly/plotly.js/issues/1765"}
| 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:d0302f65-e5c9-d80b-220c-ab895974ee3b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9E58:311640:33599F2:4157BC6:6B01DCD8 |
| html-safe-nonce | ed00af11f6f169241b31bb18c686c37a57eedad4c05fd67bab47d8778e03c185 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTU4OjMxMTY0MDozMzU5OUYyOjQxNTdCQzY6NkIwMURDRDgiLCJ2aXNpdG9yX2lkIjoiNzk5NzA3MjAzMTQwMzMzNDg3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a7c16c40a7703f53f8fb5b45c13597b798bea00babc58e9720fbbba8a5e7ad03 |
| hovercard-subject-tag | issue:234343161 |
| 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/1765/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1d258caac0917f45a2dd8b8fc79883255182e2805d0842cfde0a011c1dbce40f/plotly/plotly.js/issues/1765 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1d258caac0917f45a2dd8b8fc79883255182e2805d0842cfde0a011c1dbce40f/plotly/plotly.js/issues/1765 |
| og:image:alt | When lassoing, the current way to get the selected points is to do something like eventData ? eventData.points.map(({curveNumber, pointNumber}) => gd.calcdata[curveNumber][pointNumber]) : null even... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | monfera |
| 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