Skip to content
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

Clickmode "event+select" activated and Clicking outside of Graph calls onUpdate incorrectly #6977

Open
willhuang1997 opened this issue Apr 19, 2024 · 1 comment

Comments

@willhuang1997
Copy link

willhuang1997 commented Apr 19, 2024

I have looked for issues but couldn't find anything and just wanted to bring awareness to clickmode: "event+select" issue.

Hi, currently working on Streamlit + Plotly selections! I noticed this bug that didn't seem like a bug on Streamlit's side.

It seems like onUpdate gets called and graph gets updated visually incorrectly when clickmode: "event+select" and dragmode: "select" and doing selection clicks. I would expect onDeselect to be called and layout.selections to remove the selection because selectedpoints in data has []

Reproducible example: https://codesandbox.io/p/sandbox/react-forked-6rypkr?file=%2Fsrc%2FApp.tsx

Steps to reproduce:

  1. Click on a single point
  2. Click outside of a point

Expectation: Graph is not less than 100% opaque
Actual: Graph is less than 100% opaque and weird and onUpdate is not called

Video to show actual:

Screen.Recording.2024-04-19.at.3.39.09.PM.mov

I read that most issues here are likely Plotly.js problems but not sure if that's the case because I went to check plotly.js code and onUpdate is a callback while plotly.js contains an update function as far as I can tell but I assume everything in react-plotly.js is based off plotly.js so just trying to bring extra awareness to this issue.

@willhuang1997
Copy link
Author

I would be happy to attempt to submit a PR if I could just find where in the code this is likely to occur?

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

1 participant