How to change the time interval for chart display (X-axis) on Dashboard

I would like to allow the selection of the time range of the displayed data. The data is not stored anywhere, I wouldn't mind if after setting a longer range the older data would not be displayed, but would be gradually added.

Is it possible to specify the time range within the dahboard? E.g. using a dropdown node?

Something like this: InfluxDB with Node-Red – Fun Tech Projects (funprojects.blog)
but I don't know how and which parameter can change the X-axis range.

Thanks