Skip to content

Figure margin edit makes scrollZoom glitch / lag #4223

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

Open
Entropy5 opened this issue May 31, 2023 · 3 comments
Open

Figure margin edit makes scrollZoom glitch / lag #4223

Entropy5 opened this issue May 31, 2023 · 3 comments
Labels
bug something broken P3 backlog performance something is slow

Comments

@Entropy5
Copy link

Updating layout to change margin size works well
Enabling scrollzoom works well
Doing both at the same time gives you an interactive plot that is very laggy to scroll zoom in
Seems worse with more points
Seems related to plotly/plotly.js#3729

I encountered this issue on Dash first, but realised it exists in pure Plotly as well
Plotly v 5.14.1 on Python 3.9.13

Minimal example (remove update_layout line to see behavior improve)

import plotly.express as px
df = px.data.gapminder()
fig = px.scatter(df, x='pop', y='gdpPercap')
fig.update_layout(margin=dict(l=0, r=0, t=0, b=0))
fig.show(config=dict({'scrollZoom': True}))
@AdityaJ42
Copy link

Facing a similar issue which seems to be more noticeable when running generating graphs in a Jupyter notebook.

@hpeiyan
Copy link

hpeiyan commented Aug 2, 2023

same issue

@gvwilson gvwilson self-assigned this Jul 11, 2024
@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson added P3 backlog bug something broken performance something is slow labels Aug 12, 2024
@danich69
Copy link

Have the same problem - plots go crazy when trying to zoom on them while controlling for margins.

AlexChaloner added a commit to AlexChaloner/agile_predict that referenced this issue Dec 26, 2024
Set scrollZoom to true in the plotly graphs, which allows scroll to zoom on desktop and two-finger scroll on mobile.

This commit also removes the margins, as a bug with margin+scrollzoom makes the scrollzoom laggy (see e.g. plotly/plotly.py#4223)
AlexChaloner added a commit to AlexChaloner/agile_predict that referenced this issue Dec 26, 2024
Set scrollZoom to true in the plotly graphs, which allows scroll to zoom on desktop and two-finger scroll on mobile.

This commit also removes the margins, as a bug with margin+scrollzoom makes the scrollzoom laggy (see e.g. plotly/plotly.py#4223)
AlexChaloner added a commit to AlexChaloner/agile_predict that referenced this issue Dec 26, 2024
Set scrollZoom to true in the plotly graphs, which allows scroll to zoom on desktop and two-finger scroll on mobile.

This commit also removes the margins, as a bug with margin+scrollzoom makes the scrollzoom laggy (see e.g. plotly/plotly.py#4223)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog performance something is slow
Projects
None yet
Development

No branches or pull requests

5 participants