From c800c656bf7f573fa02bf3ade72081256a436d4b Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Thu, 18 Aug 2022 12:52:31 +0200 Subject: [PATCH] Revert "BarchartPanel: Fix color from thresholds show incorrectly (#52038)" (#53806) (#53876) This reverts commit 11c79cd6da1cf4824e1a48d98d0b5935b1a22351. (cherry picked from commit e877c1da90b4f64c51d19b1e59e1c076650d711d) Co-authored-by: Oscar Kilhed --- public/app/plugins/panel/barchart/BarChartPanel.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/panel/barchart/BarChartPanel.tsx b/public/app/plugins/panel/barchart/BarChartPanel.tsx index 39203bdfcf9..a36ddac4201 100644 --- a/public/app/plugins/panel/barchart/BarChartPanel.tsx +++ b/public/app/plugins/panel/barchart/BarChartPanel.tsx @@ -217,7 +217,7 @@ export const BarChartPanel: React.FunctionComponent = ({ }; // Color by value - let getColor: ((seriesIdx: number, valueIdx: number, value: any) => string) | undefined = undefined; + let getColor: ((seriesIdx: number, valueIdx: number) => string) | undefined = undefined; let fillOpacity = 1; @@ -226,7 +226,7 @@ export const BarChartPanel: React.FunctionComponent = ({ const disp = colorByField.display!; fillOpacity = (colorByField.config.custom.fillOpacity ?? 100) / 100; // gradientMode? ignore? - getColor = (seriesIdx: number, valueIdx: number, value: any) => disp(value).color!; + getColor = (seriesIdx: number, valueIdx: number) => disp(colorByField.values.get(valueIdx)).color!; } const prepConfig = (alignedFrame: DataFrame, allFrames: DataFrame[], getTimeRange: () => TimeRange) => {