From 23b791c234152c77f30b3fb93bdc5b4f4b8dec02 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Fri, 28 Oct 2022 08:46:35 +0200 Subject: [PATCH] TimeseriesPanel: Fill below to override works with name override (#57728) (#57800) (cherry picked from commit 953fdfe76f3d6e51b8b32f4285e9501dfab944c5) Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com> --- packages/grafana-ui/src/components/TimeSeries/utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/grafana-ui/src/components/TimeSeries/utils.ts b/packages/grafana-ui/src/components/TimeSeries/utils.ts index 76f195120e4..4274471147b 100644 --- a/packages/grafana-ui/src/components/TimeSeries/utils.ts +++ b/packages/grafana-ui/src/components/TimeSeries/utils.ts @@ -400,8 +400,11 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn<{ } if (customConfig.fillBelowTo) { + const fillBelowToField = frame.fields.find((f) => f.name === customConfig.fillBelowTo); + const fillBelowDispName = getFieldDisplayName(fillBelowToField!, frame, allFrames); + const t = indexByName.get(dispName); - const b = indexByName.get(customConfig.fillBelowTo); + const b = indexByName.get(fillBelowDispName); if (isNumber(b) && isNumber(t)) { builder.addBand({ series: [t, b],