Plotly FigureWidget axes do not reset ranges within solara's render context
Upon applying an effect to set
autorange=True
to a figure with autorange='reversed'
, the Figure does not return to the original axes orientation.
I'm wondering what happens behind the scenes here for the render when the use_effect
is triggered. I can upload a ipynb
with its expected behaviour within a jupyter context vs its behaviour in solara.
The partial code (can give complete if needed). plotstate
contains 2 reactives for flipx and flipy.
4 Replies
Not sure what is going on here, the code seems correct (and quite nice/creative!). Would be nice if you can could share the code.
This works for me, i'm not sure why the updating of the widget doesnt work. It could be an issue with the code, or with the plotly widget. Anyway, I think this is much cleaner, what do you think?
While this works, it refreshes the widget, meaning any user relayout (i.e. zoom & pan) is lost. I'd ideally like to update the property using an effect to keep the current range during the flip updates.