Skip to content

selectedpoints doesn't work from Plotly.update for scattergl #2348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kevinoe opened this issue Feb 7, 2018 · 1 comment
Closed

selectedpoints doesn't work from Plotly.update for scattergl #2348

kevinoe opened this issue Feb 7, 2018 · 1 comment

Comments

@kevinoe
Copy link

kevinoe commented Feb 7, 2018

If you do a box select (and lasso?) in a scatter plot, you can no longer update the selected points via update. Also, if the dragmode STARTS as select, selectedpoints fails entirely.

For this example:
https://codepen.io/ks_openeye/pen/gvLrxR

  1. Notice the second point is already selected
  2. Switch to box select.
  3. Select the last point
  4. Click the button - notice it fails to select the point with index 1

For this example (dragmode == 'select' to start)
https://codepen.io/ks_openeye/pen/bLBpKM

  1. Notice no points render
  2. The console throws an error (scene.unselectBatch is null):
plotly-latest.js:180868 Uncaught (in promise) TypeError: Cannot read property '0' of null
    at plotly-latest.js:180868
    at Array.map (<anonymous>)
    at Object.plot (plotly-latest.js:180820)
    at plotOne (plotly-latest.js:135422)
    at Object.exports.plot (plotly-latest.js:135394)
    at drawData (plotly-latest.js:125636)
    at Object.lib.syncOrAsync (plotly-latest.js:120901)
    at Plotly.plot (plotly-latest.js:125691)
    at Object.lib.syncOrAsync (plotly-latest.js:120901)
    at Object.update (plotly-latest.js:127454)
(anonymous) @ plotly-latest.js:180868
plot @ plotly-latest.js:180820
plotOne @ plotly-latest.js:135422
exports.plot @ plotly-latest.js:135394
drawData @ plotly-latest.js:125636
lib.syncOrAsync @ plotly-latest.js:120901
Plotly.plot @ plotly-latest.js:125691
lib.syncOrAsync @ plotly-latest.js:120901
update @ plotly-latest.js:127454
updateSelected @ pen.js:25
(anonymous) @ pen.js:30
Promise resolved (async)
(anonymous) @ pen.js:29
@kevinoe kevinoe changed the title selectedpoints can't always be updated in the scatterplot selectedpoints doesn't work from Plotly.update Feb 7, 2018
@kevinoe kevinoe changed the title selectedpoints doesn't work from Plotly.update selectedpoints doesn't work from Plotly.update for scattergl Feb 7, 2018
@etpinard
Copy link
Contributor

etpinard commented Feb 7, 2018

This appears to be fixed in the current master - most likely by @dfcreative 's #2311

image


@kevinoe We'll release 1.34.0 with a fix for this issue in the next few hours, so I'll close this ticket.

Please reopen an issue if ever 1.34.0 still shows the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants