From 953fdfe76f3d6e51b8b32f4285e9501dfab944c5 Mon Sep 17 00:00:00 2001 From: Victor Marin <36818606+mdvictor@users.noreply.github.com> Date: Fri, 28 Oct 2022 09:27:54 +0300 Subject: [PATCH] TimeseriesPanel: Fill below to override works with name override (#57728) --- 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 10b86c3322c..26cf4f1477d 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],