Revert "BarchartPanel: Fix color from thresholds show incorrectly (#52038)" (#53806) (#53876)

This reverts commit 11c79cd6da.

(cherry picked from commit e877c1da90)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2022-08-18 12:52:31 +02:00
committed by GitHub
co-authored by Oscar Kilhed
parent d0d9f315c9
commit c800c656bf
@@ -217,7 +217,7 @@ export const BarChartPanel: React.FunctionComponent<Props> = ({
};
// 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<Props> = ({
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) => {