Skip to content

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

@JuanCab

Description

@JuanCab

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions