DataLinks: allow using values from other fields in the same row (#21478)
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
ThresholdsMode,
|
||||
FieldColorMode,
|
||||
ColorScheme,
|
||||
TimeZone,
|
||||
} from '../types';
|
||||
import { fieldMatchers, ReducerID, reduceField } from '../transformations';
|
||||
import { FieldMatcher } from '../types/transformations';
|
||||
@@ -34,6 +35,7 @@ export interface ApplyFieldOverrideOptions {
|
||||
fieldOptions: FieldConfigSource;
|
||||
replaceVariables: InterpolateFunction;
|
||||
theme: GrafanaTheme;
|
||||
timeZone?: TimeZone;
|
||||
autoMinMax?: boolean;
|
||||
}
|
||||
|
||||
@@ -164,7 +166,11 @@ export function applyFieldOverrides(options: ApplyFieldOverrideOptions): DataFra
|
||||
type,
|
||||
};
|
||||
// and set the display processor using it
|
||||
f.display = getDisplayProcessor({ field: f, theme: options.theme });
|
||||
f.display = getDisplayProcessor({
|
||||
field: f,
|
||||
theme: options.theme,
|
||||
timeZone: options.timeZone,
|
||||
});
|
||||
return f;
|
||||
});
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import { stylesFactory } from '../../themes';
|
||||
export enum VariableOrigin {
|
||||
Series = 'series',
|
||||
Field = 'field',
|
||||
Fields = 'fields',
|
||||
Value = 'value',
|
||||
BuiltIn = 'built-in',
|
||||
Template = 'template',
|
||||
|
||||
Reference in New Issue
Block a user