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

This reverts commit 11c79cd6da.
This commit is contained in:
Oscar Kilhed 2022-08-18 08:47:17 +02:00 committed by GitHub
parent 82b63688d2
commit e877c1da90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -217,7 +217,7 @@ export const BarChartPanel: React.FunctionComponent<Props> = ({
}; };
// Color by value // 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; let fillOpacity = 1;
@ -226,7 +226,7 @@ export const BarChartPanel: React.FunctionComponent<Props> = ({
const disp = colorByField.display!; const disp = colorByField.display!;
fillOpacity = (colorByField.config.custom.fillOpacity ?? 100) / 100; fillOpacity = (colorByField.config.custom.fillOpacity ?? 100) / 100;
// gradientMode? ignore? // 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) => { const prepConfig = (alignedFrame: DataFrame, allFrames: DataFrame[], getTimeRange: () => TimeRange) => {