mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
TimeSeries: Add data frame index and field name (#19005)
This commit is contained in:
@@ -67,9 +67,21 @@ export function getDataMinMax(data: TimeSeries[]) {
|
||||
return { datamin, datamax };
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated: This class should not be used in new panels
|
||||
*
|
||||
* Use DataFrame and helpers instead
|
||||
*/
|
||||
export default class TimeSeries {
|
||||
datapoints: any;
|
||||
id: string;
|
||||
// Represents index of original data frame in the quey response
|
||||
dataFrameIndex: number;
|
||||
/**
|
||||
* Name of the field the time series was created from
|
||||
* Used in graph panel to retrieve value from the original data frame
|
||||
*/
|
||||
fieldName: string;
|
||||
label: string;
|
||||
alias: string;
|
||||
aliasEscaped: string;
|
||||
@@ -110,6 +122,8 @@ export default class TimeSeries {
|
||||
this.stats = {};
|
||||
this.legend = true;
|
||||
this.unit = opts.unit;
|
||||
this.fieldName = opts.fieldName;
|
||||
this.dataFrameIndex = opts.dataFrameIndex;
|
||||
this.hasMsResolution = this.isMsResolutionNeeded();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user