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/specbased dashboard JSON, not the legacypanels[]array) - Two dashboard variables defined:
y_minandy_max, both type “Textbox” - Panel: Time series, under Field → Standard options → Min / Max
What I tried:
- Editing the panel JSON directly to set
"min": "${y_min}"and"max": "${y_max}"insidefieldConfig.defaults. After reloading the dashboard, the Standard options → Min/Max fields in the panel editor show empty (“auto”) — the variable string was not retained. - 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$,{,}). - 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!