Time-series multipanel/multiple axes

I am using Grafana 11.1.0 on windows 11.

I have some time-series data in a PostgreSQL data source. My data consists of sensor data for multiple machines. I have a table that includes every machine’s sensor data where each row is distinguished by the machine ID and its timestamp. I want to get a variable I’ll call “baroalt” for each machine in a given state, and overlay them on top of each other onto the same panel. I’m imagining something like this:

The problem is, each machine was tested on different dates and at different times, to the times would not be synced up.
My question is, is there a way I can still do this? If this is not possible, I would like to make some kind of multi-part panel of the machines side by side. I am very new to Grafana and would appreciate any help I can get.

Here’s an idea of the kind of query I would want to run:

SELECT v.machine_id, utc_timestamp as time, baroalt from v_metadata as vm
INNER JOIN v_data as v on v.machine_id = vm.machine_id
where v.“utc_sec” BETWEEN takeoff_start AND takeoff_stop

I am also applying a multiframe time-series transformation.

This is what the above query returns:


As you can see, this is not useful for any kind of comparison as I need to Zoom out a lot before I can see all the machines, and they aren’t overlayed.
For reference, here’s a zoom in on one of them:

Any suggestions on how I can create a more useful visual representation of this data would be appreciated!

Welcome to forum @mdabiri

So most questions are easier to sort out if you can provide an answer to the following

how would you align the test dates outside of grafana purely in postgres sql query?

That would probably require some kind of time manipulation to align everything. I’m still working on this, but I’m guessing in order to align the machines in takeoff mode I’ll have to find a range that would include them all, like from the earliest takeoff_start to the latest takeoff_stop point, then have another column that sets the start to 0 and calculates some kind of time offset for different machines, so that their time offsets will fall in the same range. Then maybe I can use that column as the time column in Grafana. Does that make sense? I can certainly clarify if not.
I guess my biggest question is whether this kind of time manipulation is the way to go, or if there’s already some built in Grafana feature that might be used for this case that I just don’t know about.

1 Like

gotcha. I doubt it is something grafana can do. but what you propose sounds interesting. can you provide some sample csv?

but end of the day it is not a grafana issue but we can try to help