Explore: Moves GraphSeriesXY and DisplayValue to grafana/data (#18400)

* Chore: Move DisplayValue to grafana/data

* Chore: Move GraphSeriesXY to grafana/data
This commit is contained in:
Hugo Häggmark
2019-08-06 10:49:54 +02:00
committed by GitHub
parent ead2d6e88f
commit b05afd7e4e
26 changed files with 62 additions and 43 deletions

View File

@@ -0,0 +1,14 @@
export interface DisplayValue {
text: string; // Show in the UI
numeric: number; // Use isNaN to check if it is a real number
color?: string; // color based on configs or Threshold
title?: string;
fontSize?: string;
}
export type DecimalCount = number | null | undefined;
export interface DecimalInfo {
decimals: DecimalCount;
scaledDecimals: DecimalCount;
}

View File

@@ -0,0 +1,17 @@
import { DisplayValue } from './displayValue';
export type GraphSeriesValue = number | null;
/** View model projection of a series */
export interface GraphSeriesXY {
label: string;
color: string;
data: GraphSeriesValue[][]; // [x,y][]
info?: DisplayValue[]; // Legend info
isVisible: boolean;
yAxis: number;
}
export interface CreatePlotOverlay {
(element: JQuery, event: any, plot: { getOptions: () => { events: { manager: any } } }): any;
}

View File

@@ -7,3 +7,5 @@ export * from './time';
export * from './threshold';
export * from './utils';
export * from './valueMapping';
export * from './displayValue';
export * from './graph';