Keep zoom, but change axes? uirevision

This might be answered somewhere I haven’t found, please guide me to the appropriate place if so :slightly_smiling_face:. I have an interval that fires ever 10 seconds to get the last 24 hours of data, and plots this as a scatter trace. I am using a range-slider with buttons, so that the user easily can click 2h for example to have the graph zoom in on the last two hours. I have set uirevision to 'foo' so that it never resets.

However, I would like the x-axis to slide on each update. This way the user won’t have to slide the slider manually / click the 2h button each time the graph is updated. It will always show the last x hours as the user has chosen. But if I try to set the range of the x-axis manually, the uirevision is ignored, and the plot resets every time. Any help with this issue is greatly appreciated :slightly_smiling_face:

I have a graph that updates the x-axis as a time-series too.


this should work