Get help from the marimo community

Updated 4 months ago

issue with plotly express chart not registering change to switch

At a glance

A community member reported an issue with a plotly express scatter_mapbox not re-rendering properly when toggling a mo.ui.switch. The chart would only update after toggling the switch and then changing the notebook's view mode.

The issue was reproduced by other community members who identified it as a bug in the library that needed to be fixed before deployment to the community cloud. After a quick fix to ensure WASM compatibility, a new version was released to the cloud, which successfully resolved the rendering problem.

Useful resources
I have a plotly express scatter_mapbox that displays different values (a complete or filtered dataframe) based on the value of a mo.ui.switch. For some reason, the chart does not re-render on switch value change; instead, it is toggling after I toggle the switch and then switch the view mode of the notebook (i.e. use the toggle app view button). This is the notebook in reference: https://marimo.io/p/@roboboosters/fin-frc
M
M
A
6 comments
To replicate the issue:

  1. navigate to the linked notebook
  2. toggle show inactive teams to on
  3. note that no red dots appear on the map
  4. click the three dots in the top right and uncheck show code
  5. note that red dots now appear on the map
It might be a bug that we fixed in the library but have not shipped to the community cloud. I can release to the cloud tomorrow (or maybe @Akshay could do it)
Mady, I just realized that our latest release is not compatible with WASM. Need to merge a quick fix before I can upgrade the version on cloud
New version should be up on cloud
Yes, that fixed it! You guys are the best, thank you!
you're welcome!
Add a reply
Sign up and join the conversation on Discord