Title: Update( ) fails if the user is interacting with the plot · Issue #2687 · plotly/plotly.js · GitHub
Open Graph Title: Update( ) fails if the user is interacting with the plot · Issue #2687 · plotly/plotly.js
X Title: Update( ) fails if the user is interacting with the plot · Issue #2687 · plotly/plotly.js
Description: Hi ! I use an heatmap to represent large datasets. After plotly_relayout events I download and process data (asynchronous, can take some time), then display them. However Plotly will return an undefined error from a promise if the update...
Open Graph Description: Hi ! I use an heatmap to represent large datasets. After plotly_relayout events I download and process data (asynchronous, can take some time), then display them. However Plotly will return an unde...
X Description: Hi ! I use an heatmap to represent large datasets. After plotly_relayout events I download and process data (asynchronous, can take some time), then display them. However Plotly will return an unde...
Opengraph URL: https://github.com/plotly/plotly.js/issues/2687
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Update( ) fails if the user is interacting with the plot","articleBody":"Hi !\r\n\r\nI use an heatmap to represent large datasets. After plotly_relayout events I download and process data (asynchronous, can take some time), then display them. However Plotly will return an undefined error from a promise if the update is done while dragging. I used a setTimeout in the codepen to copy the behavior of my program.\r\n\r\nCodePen : https://codepen.io/watashiku/pen/pKJJNW?editors=1010\r\nError message : \r\n```\r\nplotly-latest.js:128472 Uncaught TypeError: Cannot read property 'length' of undefined\r\n at exports.drawData (VM750 plotly-latest.js:128472)\r\n at Object.lib.syncOrAsync (VM750 plotly-latest.js:119125)\r\n at relayout (VM750 plotly-latest.js:125433)\r\n at Object.exports.call (VM750 plotly-latest.js:153164)\r\n at VM750 plotly-latest.js:133800\r\n at Object.lib.syncOrAsync (VM750 plotly-latest.js:119125)\r\n at Object.dragTail [as doneFn] (VM750 plotly-latest.js:133798)\r\n at HTMLDocument.onDone (VM750 plotly-latest.js:102144)\r\n```\r\nSteps to reproduce : drag the plot once, then quickly start dragging again and hold it one second - the bug appears if you are dragging during the update triggered by the previous drag. \r\n\r\nIt creates two major problems :\r\n - The plot will be \"locked\" on the screen : panning or zooming will not affect the plot (only the axes in the background),\r\n - There is no plotly_afterplot event triggered by Plotly which means there is no way for me to tell the user that the plot is ready nor somehow handling the situation by myself (and the error cannot be catched outside of Plotly due to the way it is raise I think?).\r\n\r\nNotes : \r\n - When the bug happens clicking on the graph fixes it\r\n - The behavior is similar for react, restyle and addtrace. It does not appear with plot (but this creates traces for every relayout)","author":{"url":"https://github.com/Watashiku","@type":"Person","name":"Watashiku"},"datePublished":"2018-05-31T15:11:00Z","url":"https://github.com/plotly/plotly.js/issues/2687"}
| 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:7c01ce89-9087-7c08-4680-a62035aabd62 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BA2A:27D3AD:CFADB2:108B6BF:6B01003A |
| html-safe-nonce | 9f9409e3fe9be14f425cd4c38fd7104cf48f923e4a95eb290f2ad6f61a7692c4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTJBOjI3RDNBRDpDRkFEQjI6MTA4QjZCRjo2QjAxMDAzQSIsInZpc2l0b3JfaWQiOiI2MjY4NTA0MDA1ODAzMDQ5MDE4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e7985b1e9ceede88474dbcf10ec3b8575e41c00830925c1b0e9e317279f4f603 |
| hovercard-subject-tag | issue:328179735 |
| 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/2687/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9487f3e0d1fbf6f445af527d935bdb836ce2203bf6165016a3766de5a9183505/plotly/plotly.js/issues/2687 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9487f3e0d1fbf6f445af527d935bdb836ce2203bf6165016a3766de5a9183505/plotly/plotly.js/issues/2687 |
| og:image:alt | Hi ! I use an heatmap to represent large datasets. After plotly_relayout events I download and process data (asynchronous, can take some time), then display them. However Plotly will return an unde... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Watashiku |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width