Title: Plotly.deleteTraces leads to bad trace uid sequence · Issue #2836 · plotly/plotly.js · GitHub
Open Graph Title: Plotly.deleteTraces leads to bad trace uid sequence · Issue #2836 · plotly/plotly.js
X Title: Plotly.deleteTraces leads to bad trace uid sequence · Issue #2836 · plotly/plotly.js
Description: Consider Plotly.newPlot('graph', [{ y: [1, 2, 1] }, { y: [2, 1, 2] }, { y: [3, 2, 3] }]) .then(gd => { console.log(gd._fullData.map(t => t.uid)) // => ['0', '1', '2'] return gd }) .then(gd => { return Plotly.deleteTraces(gd, [0]) }) .the...
Open Graph Description: Consider Plotly.newPlot('graph', [{ y: [1, 2, 1] }, { y: [2, 1, 2] }, { y: [3, 2, 3] }]) .then(gd => { console.log(gd._fullData.map(t => t.uid)) // => ['0', '1', '2'] return gd }) .then(gd => { ret...
X Description: Consider Plotly.newPlot('graph', [{ y: [1, 2, 1] }, { y: [2, 1, 2] }, { y: [3, 2, 3] }]) .then(gd => { console.log(gd._fullData.map(t => t.uid)) // => ['0', '1', ...
Opengraph URL: https://github.com/plotly/plotly.js/issues/2836
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Plotly.deleteTraces leads to bad trace uid sequence","articleBody":"Consider\r\n\r\n```js\r\nPlotly.newPlot('graph', [{\r\n y: [1, 2, 1]\r\n}, {\r\n y: [2, 1, 2]\r\n}, {\r\n y: [3, 2, 3]\r\n}])\r\n.then(gd => {\r\n console.log(gd._fullData.map(t => t.uid))\r\n // => ['0', '1', '2']\r\n return gd\r\n})\r\n.then(gd => {\r\n return Plotly.deleteTraces(gd, [0])\r\n})\r\n.then(gd => {\r\n console.log(gd._fullData.map(t => t.uid))\r\n // (currently) => ['0', '1']\r\n // (in 1.38.x) => ['1', '2']\r\n})\r\n```\r\n\r\nIn a codepen: https://codepen.io/etpinard/pen/KBmVYB?editors=1010\r\n\r\nThis is probably due to https://github.com/plotly/plotly.js/pull/2681 and probably leads to bugs (not yet reported) when deleting traces in subplots that track traces using uids e.g. gl3d:\r\n\r\nhttps://github.com/plotly/plotly.js/blob/180b6b9225173e834ff92245b6f3620bfcfd14a8/src/plots/gl3d/scene.js#L452-L471\r\n\r\ncc @alexcjohnson\r\n\r\n","author":{"url":"https://github.com/etpinard","@type":"Person","name":"etpinard"},"datePublished":"2018-07-23T20:59:58Z","url":"https://github.com/plotly/plotly.js/issues/2836"}
| 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:303c21e3-cc25-77ee-a006-c01e780e94d6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C47E:1F2F:4F9DC3:69C242:6B01812F |
| html-safe-nonce | 80c7c757ef4d2388d1cdf2871bbbba047b3db877ccc718e2bb8817a43682eed0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDdFOjFGMkY6NEY5REMzOjY5QzI0Mjo2QjAxODEyRiIsInZpc2l0b3JfaWQiOiI3MTMzNDY2OTY3MDMzMzQ4Mzk5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8791d6e40fcd5d98dd5f128ee6d6048dfc74e0e7b995c9484c77cc2833d5966f |
| hovercard-subject-tag | issue:343793639 |
| 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/2836/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f04ae3c9de5d836e1912d260c3ce80699d2f518e064c6a08965eae6893898c12/plotly/plotly.js/issues/2836 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f04ae3c9de5d836e1912d260c3ce80699d2f518e064c6a08965eae6893898c12/plotly/plotly.js/issues/2836 |
| og:image:alt | Consider Plotly.newPlot('graph', [{ y: [1, 2, 1] }, { y: [2, 1, 2] }, { y: [3, 2, 3] }]) .then(gd => { console.log(gd._fullData.map(t => t.uid)) // => ['0', '1', '2'] return gd }) .then(gd => { ret... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | etpinard |
| 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