Display value between start and end events

  • What Grafana version and what operating system are you using?
    v 6.5.0

  • What are you trying to achieve?
    Display value (always 1) between start and end events. I’m using the information to visualize gaps in my data.

  • How are you trying to achieve it?
    I have a postgres view that has 4 columns:
    start: timestamp without time zone
    end: timestamp without time zone
    duration: interval (end - start)
    value: 1 (always 1)

I want to display a chart that shows the value of 1 between the start time and end time. Otherwise the display value is 0. How can I do this?