Afaik, y-axis cant be made to auto scale when using x-range sliders. Y range is chosen with respect to the y values of the whole x range and does not change after zooming-in. This is especially annoying with candlestick charts in volatile periods. When you zoom-in using x-range slider, you essentially get flat candlesticks as their fluctuations only cover a very small part of the initial range. After doing some research it seems that some progress has been made here: https://github.com/plotly/plotly.js/pull/2364. Anyone knows if there is a working solution for plotly.py ? Thanks for your time.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The only solution I could find was to remove the slider and then you can just use the regular zoom tool.
layout = go.Layout(
xaxis = dict(
rangeslider = dict(
visible = False
)
)
)
回答2:
If it can help, I am using fixedrange = False on yaxis, to be able to zoom manually and adapt the window to the suited y range:
yaxis = dict(
fixedrange = False
)