Set different time ranges for different panels based on available data having different time windows

  • What Grafana version and what operating system are you using?

Grafana version → v11.2.0 (2a88694fd3)
OS → MacOS 13.6.5

  • What are you trying to achieve?

I have 2 panels side by side showing a graph from some timeseries data. The panels are side-by-side for a comparative analysis. Both the panels have different sources of data. The timeseries data are available for a limited time range and are in different time windows which may or may not overlap with each other. I want the panels to zoom into the time range where the data is available. The data sources are powered by the Infinity plugin. The data sources can be changed by changing some variable value in the dashboard.

  • How are you trying to achieve it?

For now I was using time-shift feature so that both graphs have some data visible but this was done manually and for different sources of data the time windows could be different so I will have to manually shift everytime I change data sources which is not ideal. If this was automated that would have been great.

  • Did you follow any online instructions? If so, what is the URL?

I tried searching regarding this issue but mostly the solutions are for situations where relative time or time shift works. I don’t think those solutions will work for this case as you’d never know what is the time gap between the 2 data sources. If I could put some formula in the time-shift field which calculates the time gap that would have been great but I am not sure if that’s possible?