You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I test this the zoom works as it should when zooming by clicking and dragging up and down, but I get the same stutter you're seeing if I use a wheel zoom.
I can also confirm that this isn't a problem if the plot is displayed using iplot.
Technical notes:
Plotly.js emits a relayout event at the end of a drag zoom. This event is sent to the Python side where we update the Python model. Then the event is sent back to the JavaScript side to update all of the views (i.e. when the figure is displayed in multiple output cells). This is how the zoom level of multiple views is synchronized. Right now, we allow the round trip event to update all of the views, even the view that originated the relayout event. This isn't a problem for a single relayout event.
My guess is that during a wheel zoom, the relayout events are emitted by Plotly.js continually. So we end up updating the view of the figure we're performing the drag on, while the drag is still ongoing.
The solution in this case is probably just to not apply the relayout events to the originating view. However, we used to do this but I removed it in bd16d77. Unfortunately I didn't explain the problem that this was causing in the commit message. I think it had to do with the calculation of the unspecified default properties on the JavaScript side and sending them back to the Python side.
Plan: don't apply relayout events to originating view. Carefully test that the axis ranges and autorange properties are properly synced back to the Python model.
Trying to zoom using the mouse wheel on a Scatter3d plot shown via FigureWidget makes the plot stutter more than zoom. Here's an example:
I get this effect while running
plotly.py v3.1.0
on both Safari and Chrome.The text was updated successfully, but these errors were encountered: