Signed-off-by: Kyle Cunningham <kyle.cunningham@grafana.com>
(cherry picked from commit 11c79cd6da)
Co-authored-by: mingozh <77652617+mingozh@users.noreply.github.com>
This commit is contained in:
co-authored by
mingozh
parent
1b1076ea2e
commit
9c779fd805
@@ -188,7 +188,7 @@ export const BarChartPanel: React.FunctionComponent<Props> = ({ data, options, w
|
||||
};
|
||||
|
||||
// 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;
|
||||
|
||||
@@ -197,7 +197,7 @@ export const BarChartPanel: React.FunctionComponent<Props> = ({ data, options, w
|
||||
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) => {
|
||||
|
||||
Reference in New Issue
Block a user