mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
14
packages/grafana-data/src/types/displayValue.ts
Normal file
14
packages/grafana-data/src/types/displayValue.ts
Normal 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;
|
||||
}
|
17
packages/grafana-data/src/types/graph.ts
Normal file
17
packages/grafana-data/src/types/graph.ts
Normal 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;
|
||||
}
|
@@ -7,3 +7,5 @@ export * from './time';
|
||||
export * from './threshold';
|
||||
export * from './utils';
|
||||
export * from './valueMapping';
|
||||
export * from './displayValue';
|
||||
export * from './graph';
|
||||
|
Reference in New Issue
Block a user