Explicit time range set per panel

Hi all

Is there any solution in the timeseries panel to set the time range to display explicitly (the from & to) in the following context:

  1. Time must be explicit and not relative time.
  2. Must be set in a single panel and not for the dashboard
  3. This setting must not be affected by the dashboard Time Selector

I tried a bunch of things and searched widely.

The XY Panel does what I need but it seems to have this regression? XY PAnel chart does not allow Time as a field when upgrading beyond 10.4.7 · Issue #93069 · grafana/grafana · GitHub

If all else fails, these might be ways forward:

This plugin looks cool, GitHub - isaozler/grafana-shift-selector: The shift selector allows you to adjust the time range of your grafana dashboard to one specific shift or a range of shifts.
But this would involve a separate dashboard and does not seem to be per panel.

Another solution could be this fine plugin Business Text | Volkov Labs
And to create a customised visualizaiton in some d3 framework.

Thanks for any light.

Best
E

@allomorphy1
I see you are using influxDB so maybe I can help you.

As long as you use range line like below in your query
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)

Your panel will be linked to the time range of Grafana (due to v.timeRangeStart and v.timeRangeStop). So here also lies a possible solution for you

Instead you can specify a static time like
|> range(start: 2024-08-01T02:00:01Z , stop: 2024-08-01T22:00:01Z )

which will only affect the panel you are using at that moment

Thank you @orosolido

It is very kind to offer a solution.
Sadly, I am using InfluxQL and not Flux (I gave that language a miss).

My experience with settling range in InfluxQL is that it filters the result set but does not in any useful way control the “viewport” or the dashboard display range.

Do you see that Flux is able to do this?

@allomorphy1
Ahaa
I’m not super familiar with QL but i don’t see a reason why it wouldn’t be able with QL.
looking at the docs I see they offer solutions with absolute time as well.

So based on that I would say it should be possible.
But unf. Im not able to confirm.

Ps. It took me 2 weeks to learn DB. There is a data explorer with a script builder that helped me a lot to get a better understanding. But before those 2 weeks I was just staring at the screen like It was quantum physics :sweat_smile:

I do not think that the query to the datasource, whatever that datasource might be, has any reliable effect on the viewport or the display range of the panel (or whatever the terminology is that is used to reference this).

The query in the panel editor in my experience only affects the returned data set.

Indirectly the data set can be used to fit the viewport ,sadly only natively by the famous Zoom to Data button. This is what we have but not what we want for this panel.

Thank you for any suggesitons.

E