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
Click event only generated when clicking in specific areas of Bar graph #5383
Comments
I've been able to reproduce the issue. See the mentioned discourse discussion. |
Here is another issue which also has issues with mouse clicks. It might be related. |
Hi I've been hitting the exact same problem and been bashing my head all day trying to get it to work. I think the root cause lies within Plotly library not registering click events correctly within the ShadowDOM -> plotly/plotly.js#6108 I have a workaround for now which was to download the
Then I added to my app with |
Thanks for tracking this down @sblowers, I'll try to see if there is a way to this from within the panel.js bundle. |
This issue came out from a discussion on panel discourse, link here. I will reproduce below the main parts of it.
There is an integration problem between panel and plotly when trying to receive click events upon clicking on the bar graph using plotly. The event is only triggered when clicking in the space between the bars and not inside the Bar. if sizing_mode is not used (check the MRE below), situation gets even worse. Same reasoning holds true if orientation of the Bar changes from horizontal to vertical.
Relevant software version info
pandas 1.5.3
panel 1.2.0
plotly 5.15.0
plotly-express 0.4.1
python 3.9.17
ubuntu 20.04
Description of expected behavior and the observed behavior
Click events should only occur when clicking inside the Bar independent of the size mode or orientation used.
Currently events are generated when clicking close to the Bar in the space between bars. If no size mode is used or orientation is changed, than click events are not triggered or occur randomly.
Complete, minimal, self-contained example code that reproduces the issue
Stack traceback and/or browser JavaScript console output
N/A
Screenshots or screencasts of the bug in action
It is pretty easy to reproduce so I think a screenshot is not necessary.
The text was updated successfully, but these errors were encountered: