X / Y axes or replace timestamp

Hi there.

I want to make a graph that displays hourly forecasts (temperature, rain, etc.). I have data coming from OpenHAB that saves in a InfluxDB2 database. For each forecast, I have the following in InfluxDB:



where XX is a number between 00 (now) and 48 (hours). I can retrieve the data in Grafana with:

from(bucket: “openhab”)
|> range(start: -2h)
|> filter(fn: (r) =>
r._measurement =~ /weather_h[0-4][0-9]_temperature/
|> last()

I want to make a graph that uses weather_hXX_timestamp on the X axis, and weather_hXX_temperature on the Y axis. Seems simple enough, but I can’t figure it out. Note there are no missing values in the ranges, they include all values from 00 to 48.

I read:

and a few others

and installed Plotly for Grafana 7.5.4: Plotly panel plugin for Grafana | Grafana Labs, but I’m not familiar with javascript, I typically do embedded stuff.

I can’t wrap my head around this. Where to start?
Any help will be greatly appreciated

What values do you have in your weather_hXX_timestamp field?

Can you show a screenshot or a sample from the query inspector in query editor:

Grafana expects a proper timestamp so maybe you need to do some formatting to convert it into the right format. A query like this should work with the standard Graph panel - it is build to have time on the X-axis and the value on the Y-axis.