How to use dashboard variable in timeseries panel type Min/Max fields

Hi all,

I’m trying to make the Y-axis Min/Max of a Time series panel controllable via a dashboard variable, so an external embedding context (an iframe with a query-string-driven var-y_min/var-y_max) can set the axis bounds dynamically without editing the panel each time.

Setup:

  • Grafana v13.0.2 (3fcdbc5a)
  • Dashboard uses the newer schema (kind/spec based dashboard JSON, not the legacy panels[] array)
  • Two dashboard variables defined: y_min and y_max, both type “Textbox”
  • Panel: Time series, under Field → Standard options → Min / Max

What I tried:

  1. Editing the panel JSON directly to set "min": "${y_min}" and "max": "${y_max}" inside fieldConfig.defaults. After reloading the dashboard, the Standard options → Min/Max fields in the panel editor show empty (“auto”) — the variable string was not retained.
  2. Trying to type ${y_min} directly into the Min field in the panel editor UI: the field does not accept the input at all (appears to be a strict numeric-only input, rejects $, {, }).
  3. Setting the variables to plain numbers (e.g. y_min=20, y_max=30) via the dashboard’s variable dropdowns at the top, then checking the panel — axis remains on “auto” (0–3000ish, calculated from data), confirming the variable substitution never reaches the Min/Max fields.

Question: Is there a supported way to bind a Time series panel’s Y-axis Min/Max to a dashboard variable in current Grafana (v13), or is this field intentionally restricted to static numeric values only? If it’s not supported on Min/Max directly, is there a recommended alternative (e.g. a transform, a hidden series that forces the axis range, or a different field/override mechanism) to achieve a variable-driven Y-axis range?

Happy to share the full panel JSON if helpful.

Thanks!

Create additional query in the panel (that one can use dashboard variable eventually), which will return min/max value and then use it the transformation Config from query result to set panel’s min/max:

It is not straightforward as your idea, but it should work.