Open
Description
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}))