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

bqplot widgets not triggering observe method when run in voici #1647

Open
JuanCab opened this issue Jul 22, 2024 · 0 comments
Open

bqplot widgets not triggering observe method when run in voici #1647

JuanCab opened this issue Jul 22, 2024 · 0 comments

Comments

@JuanCab
Copy link

JuanCab commented Jul 22, 2024

Executive Summary

bqplot widgets when run in voici don't trigger observe when their attributes change so there can be no reaction by external functions to interactions with the bqplot widgets. This only appears to occur when run inside a Voici environment and the same code works properly in JupyterLab and Voila.

Describe the bug
I have an interactive plot (generated via bqplot) consisting of a Scatter object and a Line object where the idea is you can drag the points in the Scatter object and the Line object changes to continue connecting those points. The notebook with this plot runs flawlessly in Jupyter lab and voila. However, in voici, I can drag the points in the Scatter object, but the Line connecting the points does NOT update. Update 7/25/2024: I have now also confirmed that a plot set up with bq.interacts.HandDraw have a similar problem, when hand drawing on the graph, the plot changes but no signal is sent via the observe function, so no other functions can react to the changes.

To Reproduce
I have created a short notebook index.ipynb that illustrates the problem.

However, for those who might be unfamiliar with Voici, it can be a little complicated to set up the environment, so I created a repo containing the notebook as well as the environment.yml file necessary to test it both in voila and voici here.

Expected behavior
The expected behavior (seen in both Jupyter lab and Voila) is that dragging points on the Figure shown should result in not only the points moving, but also the line connecting the points getting updated. The line does NOT update when this same notebook is run in Voici. Again, this appears to be because bqplot widgets run inside of Voici do NOT trigger the observe method and thus can't call outside functions to respond.

Since this could also be a voici bug, I have filed an issue with the voici project as well, issue #121 in their issues list.

@JuanCab JuanCab changed the title Plot generated by bqplot doesn't update properly in Voici, but works in Jupyter Lab or Voila bqplot widgets not triggering observe method when run in voici Jul 25, 2024
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