Tooltip not showing custom _field label (with time range string) in Time Series panel (Grafana 10.4.16 + InfluxDB Flux)

Hi Grafana team and community,

I’m working on a Grafana dashboard using:

Grafana version: 10.4.16
Data source: InfluxDB OSS 2.x
Query language: Flux
Panel type: Time series

I want to display a custom label in the tooltip, where the label (_field) includes **both _start and _stop times (in IST) like this:

IST 2025-05-14:00:00.000 to 2025-05-14:02:00.000 : 38

I use the following working Flux query:

import “regexp”
import “experimental”

from(bucket: “dashboard”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) =>
r[“_measurement”] == “ArrivalTraffic” and
r._field == “scheduled_flights”
)
|> filter(fn: (r) => r.host != “”)
|> window(every: 2h, period: 2h, timeColumn: “_time”)
|> pivot(rowKey: [“_time”], columnKey: [“_field”], valueColumn: “_value”)
|> group(columns: [“_time”, “_start”, “_stop”, “host”, “station”, “_measurement”], mode: “by”)
|> sum(column: “scheduled_flights”)
|> group(columns: [“_start”, “_stop”], mode: “by”)
|> map(fn: (r) => ({
_time: r._stop,
_value: r.scheduled_flights,
_field: "IST " +
string(v: experimental.addDuration(d: 5h30m, to: r._start)) +
" to " +
string(v: experimental.addDuration(d: 5h30m, to: r._stop))
}))
|> group()

  • This query returns correct _field values in the format:
    IST 2025-05-14T01:30:00Z to 2025-05-14T03:30:00Z
  • Query Inspector confirms the _field is properly set and unique per window
  • Data is displayed correctly in the time series chart

What Doesn’t Work:

  • The tooltip only shows _value, not the custom _field label
  • Even after:
    • Setting tooltip mode to All
    • Grouping by _field
    • Ensuring data returns multiple unique _field values
  • Grafana still seems to collapse it as one series or ignore the label

How can I force Grafana to display the _field value as the series name in the tooltip consistently for a Time Series panel?

Or is this a known limitation in Grafana when using Flux + InfluxDB and custom _field?


:folded_hands: Thanks in advance

Any guidance or workaround is appreciated!