Show graph even with no data in the given interval

Hey there,

I was trying to setup a simple graph for room temperatures which are stored in an InfluxDB. Those temperatures are only written to the database, if the value changes. So in some rooms I only get a record every few hours.

When there is no data in the given interval there is nothing shown in the graph. I thought it could be possible to get all values in the interval and the latest recod before the interval with two queries. Sadly Grafana seems to ignore all values outside the given interval so this didn’t work.

Then I thought it would be possible to set the time of the last record before the interval to the start time of the interval. This time column isn’t even party of the query so this also doesn’t work.

Maybe my approach is more for MSSQL and not for InfluxDB. Is there any way to provide the last record before the given interval?

Thank you!