Diagram Time for daylight

  • What Grafana version and what operating system are you using?
    Using v9.3.2 on Docker on Synology NAS

  • What are you trying to achieve?
    I am trying to show a diagram only for the daylight time. That means from sunrise to sunset. That is a relative dynamic timespan which can be read for example by the Sun and Moon Plugin. I don’t want to do the request that way that I have to correct timespan, because I want to change it by need. But starting the dashboard I want to have the daylight timespan.

  • How are you trying to achieve it?
    Acutally I am working with the today quick range, but there is to much waste in the data which only reduces the view on the needed data.

Does anybody have an idea on how to set the timespan to dynamic values?

Welcome @thomasslippert

Are you envisioning something like this, but in a Grafana panel? If yes, what would the time selector do? It seems this sort of “graph” would be always moving just slightly every few minutes.

No, what I want to do is reduce the timespan of this diagram to the timespan with sun (start with sunrise, end with sunset):

There does not appear any out-of-the-box way to do this. The only thing I can think of is having a table for your given lat & lon that shows the sunrise & sunset times (i.e. start and stop times) in a table, and then (using some plugin or change to Grafana) reference those start and stop times in the time picker. AFAIK, the time picker selections cannot be presently modified, but maybe there is a work around somewhere. Good luck!

Only as information: What I did was a relative time for today. The timespan is set up like this:
From: now/d+6h
To: now/d-3h
This is not exactly what I want, but filters away some unrelevant side information.