mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
BarchartPanel: Fix color from thresholds show incorrectly (#52038)
Signed-off-by: Kyle Cunningham <kyle.cunningham@grafana.com>
This commit is contained in:
parent
273c37c27d
commit
11c79cd6da
@ -205,7 +205,7 @@ export const BarChartPanel: React.FunctionComponent<Props> = ({
|
||||
};
|
||||
|
||||
// Color by value
|
||||
let getColor: ((seriesIdx: number, valueIdx: number) => string) | undefined = undefined;
|
||||
let getColor: ((seriesIdx: number, valueIdx: number, value: any) => string) | undefined = undefined;
|
||||
|
||||
let fillOpacity = 1;
|
||||
|
||||
@ -214,7 +214,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) => disp(colorByField.values.get(valueIdx)).color!;
|
||||
getColor = (seriesIdx: number, valueIdx: number, value: any) => disp(value).color!;
|
||||
}
|
||||
|
||||
const prepConfig = (alignedFrame: DataFrame, allFrames: DataFrame[], getTimeRange: () => TimeRange) => {
|
||||
|
Loading…
Reference in New Issue
Block a user