Zoom also affects fixed timeframe graph

  • What Grafana version and what operating system are you using?
    Grafana v9.2.3
    Ubuntu 20.04

  • What are you trying to achieve?
    When zooming on a graph, I’d like one graph to remain nailed to a ‘last 30 days’ view.

  • How are you trying to achieve it?
    The ‘last 30 days’ view works perfectly when not zoomed. I wasn’t aware something had to be done to avoid zooming on a fixed timeframe graph.

  • What happened?
    The fixed timeframe graph couldn’t be rendered, it ran out of datapoints. Setting min interval to 5 minutes rather than leaving this default resolved that issue, but the Relative time value is ignored when zoomed.

The graph no longer shows “Last 30 days” in the top right when the timeframe is zoomed.

  • What did you expect to happen?
    I expected the Relative time setting to override any zoomed timeframes on the dashboard.

  • Can you copy/paste the configuration(s) that you are having problems with?
    n/a

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

  • Did you follow any online instructions? If so, what is the URL?
    no

The time series data source query is pretty simple:

from(bucket: "${bucket}")
  |> range(start: v.timeRangeStart, stop: now())
  |> filter(fn: (r) => r["_measurement"] == "mail.log")
  |> filter(fn: (r) => r["program"] == "postfix/smtp")
  |> filter(fn: (r) => r["_field"] == "postfix_dsn")
  |> filter(fn: (r) => exists r.postfix_status)
  |> group(columns: ["postfix_status"])
  |> aggregateWindow(every: v.windowPeriod, fn: count, createEmpty: true)