time-seriesgrafanainfluxdbflux

Relational XY graph for each timestamp in Grafana


Lets suppose i have the following table data

Time  X1 Y1 X2 Y2
t1 …
t2 …

I need to do a X-Y graph with 2 lines (one for each time). Each line connects points (X1,Y1) to (X2,Y2)

Is this even possible in grafana? If so how?

My data comes from InfluxDb

Best regards Ricardo


Solution

  • The XY Chart panel do that natively. You can feed a table like the one you provided and create as much series as needed, telling which colum is X and which one is Y for each series. They don't need to be called X or Y either.

    There is an auto detectection for series, but I am not sure of the expected format in the table (not documented and reading at the code I believe it's for X with multiples Y, not multiple series of pairs.)

    XY Chart panel in Grafana 10 with example data