How to fit to zoom?

I have a dashboard with a sensor selection dropdown as template variable. Based on the selection, I am able to see my timeseries panel changing as expected.

However, in my use case, the available data for each sensor varies. That is, speedometer data is available for 10 mins whereas wind speed is available for 20 mins. When I change the sensor, the limits of X axis is not changing. So, either I see empty spaces in speedometer or truncated data in wind speed based on my time range selection.

Is it possible to get the min and max timestep and set that as dashboard time range automatically?

Hi @selvavm,

Thanks for opening this post.

Please review the submission template and include more details:

  • What Grafana version and what operating system are you using?
  • What is your datasource?
  • What visualization panel you are using e.g. time-series, bar chart, histogram etc?
  • What are you trying to achieve (share screenshots, gifs or screencast)?
  • How are you trying to achieve it?
  • What happened?
  • What did you expect to happen?
  • Can you copy/paste the configuration(s) that you are having problems with?
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
  • Did you follow any online instructions? If so, what is the URL?