Limit time to available data

I’m new here so I may ask a stupid question :blush:
Is it possible to automatically limit the displayed data of a graph to the min and max time returned by the query.
We are using InfluxDb to insert sensor data with some tags (like batch number). With a variable we limit the displayed data to 1 batch and want to see all sensor data for that batch. I can’t find out how to do this.