✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

Config = dict({'scrollZoom': True}) not working

When I am using this config parameter inside show function , I am getting mouse scroll zoom

import plotly.graph_objects as go
import plotly.io as pio
pio.renderers.default = “browser”

fig = go.Figure()

config = dict({‘scrollZoom’: True})

fig.add_trace(
go.Scatter(
x=[1, 2, 3],
y=[1, 3, 1]))

fig.show(config=config)


But if I want to preview and store this fig as a html file this scroll zoom feature is not available

import plotly
import plotly.graph_objects as go
import plotly.io as pio
pio.renderers.default = “browser”

fig = go.Figure()

config = dict({‘scrollZoom’: True})

fig.add_trace(
go.Scatter(
x=[1, 2, 3],
y=[1, 3, 1]))

plotly.offline.plot(fig, filename=‘try_plot.html’, auto_open=True)

Am I doing something wrong here , can anyone please help me?

Thanks in advance