@grafana/ui
Version:
Grafana Components Library
15 lines (14 loc) • 730 B
TypeScript
import { DecimalInfo, DisplayValue, GrafanaTheme, DecimalCount } from '../types';
import { Threshold, ValueMapping, Field } from '@grafana/data';
export declare type DisplayProcessor = (value: any) => DisplayValue;
export interface DisplayValueOptions {
field?: Partial<Field>;
mappings?: ValueMapping[];
thresholds?: Threshold[];
noValue?: string;
isUtc?: boolean;
theme?: GrafanaTheme;
}
export declare function getDisplayProcessor(options?: DisplayValueOptions): DisplayProcessor;
export declare function getColorFromThreshold(value: number, thresholds: Threshold[], theme?: GrafanaTheme): string;
export declare function getDecimalsForValue(value: number, decimalOverride?: DecimalCount): DecimalInfo;