Daytime chart like 'today' but limited to a certain timespan

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

  • What are you trying to achieve?
    Daytime chart like 08:00 to 20:00. But relative, so that the chart always shows the current day. Use is monitoring of solar energy and there is no useful information in nighttime to display.

  • How are you trying to achieve it?
    Using ‘Today’ but tis starts always at 00:00 and ends 23:59

  • What happened?
    I did not find a way to make it working

  • What did you expect to happen?
    I hoped to find a way like Start: “today 08:00” and End: “today 20:00”

  • Can you copy/paste the configuration(s) that you are having problems with?
    no, not relevant

  • 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?
    I did not find instructions for my problem.

Welcome @uli3 to the :grafana: forum.

Did you see this post? I know you can achieve this using hourSelection function in Flux, but that assumes you are using InfluxDB datasource.

Thanks for the hint to the post.
Meanwhile I managed to get a suitable result by entering
From: now/d+7h
To: now/d-4h
The chart looks perfect, exactly the timespan 7:00 to 20:00. Invisible for the remaining time of the day until 20:00.

Two problems:

  1. I do not understand why ‘now’ in the from-field dates back to today 00:00 and in the to-field points forward to tomorrow 00:00.
  2. It looks like I cannot embed the chart to my Home Assistant dashboard without loosing the timescale. I switched off ‘current time range’ for dynamic update but the result there is always 7:00 to actual time.
    Not so much visible in the late afternoon, but a big difference in the morning hours.