Time Series - Display analog and digital values separately

  • What Grafana version and what operating system are you using?
    v 9.3.2 running in Docker

  • What are you trying to achieve?
    I record analog temperature values and digital switching states (e.g. of pumps). I would like to display these simultaneously in a graph to make the interdependencies visible.
    However, these values should not overlap (completely). Ideally, digital values are displayed below the analog values.

  • How are you trying to achieve it?
    My first try looks like this:

These are the database queries

from(bucket: "iobdata")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "modbus.0.holdingRegisters.6_TempPufferO")
  |> filter(fn: (r) => r["_field"] == "value")
  |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)
  |> yield(name: "last")

and

from(bucket: "iobdata")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "modbus.0.coils.22_AnfBrenner")
  |> filter(fn: (r) => r["_field"] == "value")
  |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)
  |> yield(name: "last")
  • What happened?
    The analog values are displayed as expected. The digital values overlap the analog values at full height.
    Here, a user had created a solution for “stacked” digital assets with a workaround.
    Grafana true/false seit Update nicht mehr möglich
    I would like to have something like this for an analog and a digital value.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    no