I have a plotly chart that uses a range selector that looks like this-
fig.update_layout(
xaxis=dict(
rangeselector=dict(
buttons=list([
dict(count=1,
label="1d",
step="day",
stepmode="backward")
])
)
type="date"
)
I pulled this example code from the wiki here.
I want to automatically adjust the y-axis whenever someone clicks on the button filtering the data back to the most recent one days worth of data. To use the example "time series with range sliders and selectors" from the wiki page, I would want the y-axis to change from the default of 90 to 130 to a new value of 120 to 130.
from How do I auto-adjust the y-axis when the x-axis changes in a plotly chart?
No comments:
Post a Comment