Is It Possible To Disable The Zoom/pan Window On A Plotly.py Candlestick Chart?
I am creating a candlestick plot using plotly.py. I would like to have a horizontal split and place the candlestick data in the top split and some data curves in the bottom bottom
Solution 1:
To disable zoom and panning you need to set:
layout.xaxis.fixedrange = true
and layout.yaxis.fixedrange = true
.
To hide the controls you need to set displayModeBar = false
.
In Python this would for example look like this:
dcc.Graph(
id='my-id',
config={'displayModeBar': False},
'layout': go.Layout(
xaxis={'title': 'x-axis','fixedrange':True},
yaxis={'title': 'y-axis','fixedrange':True})
)
Solution 2:
I disabled it with layout.xaxis.rangeslider.visible = false
Solution 3:
If you save the file using the control save method, I think that it disables the zoom/pan function. Around October, I had a similar issue, and when I simply saved the chart, the zoom/pan function went away. Let me know if that works.
Post a Comment for "Is It Possible To Disable The Zoom/pan Window On A Plotly.py Candlestick Chart?"