@@ -57,6 +57,19 @@ export enum AggregationValue {
5757 SUM = 'sum' ,
5858}
5959
60+ export enum ReducerValue {
61+ AVG = 'avg' ,
62+ SUM = 'sum' ,
63+ MIN = 'min' ,
64+ MAX = 'max' ,
65+ RANGE = 'range' ,
66+ COUNT = 'count' ,
67+ STDP = 'std.p' ,
68+ STDS = 'std.s' ,
69+ VARP = 'var.p' ,
70+ VARS = 'var.s' ,
71+ }
72+
6073/**
6174 * Aggregations
6275 */
@@ -69,3 +82,27 @@ export const Aggregations: Array<SelectableValue<AggregationValue>> = [
6982 { label : 'Range' , description : 'Diff between maximum and minimum in the bucket' , value : AggregationValue . RANGE } ,
7083 { label : 'Sum' , description : 'Summation' , value : AggregationValue . SUM } ,
7184] ;
85+
86+ /**
87+ * Reducers
88+ */
89+ export const Reducers : Array < SelectableValue < ReducerValue > > = [
90+ { label : 'Avg' , description : 'Arithmetic mean of all non-NaN values' , value : ReducerValue . AVG } ,
91+ { label : 'Sum' , description : 'Sum of all non-NaN values' , value : ReducerValue . SUM } ,
92+ { label : 'Min' , description : 'Minimum non-NaN value' , value : ReducerValue . MIN } ,
93+ { label : 'Max' , description : 'Maximum non-NaN value' , value : ReducerValue . MAX } ,
94+ {
95+ label : 'Range' ,
96+ description : 'Difference between maximum non-Nan value and minimum non-NaN value' ,
97+ value : ReducerValue . RANGE ,
98+ } ,
99+ { label : 'Count' , description : 'Number of non-NaN values' , value : ReducerValue . COUNT } ,
100+ {
101+ label : 'Std Population' ,
102+ description : 'Population standard deviation of all non-NaN values' ,
103+ value : ReducerValue . STDP ,
104+ } ,
105+ { label : 'Std Sample' , description : 'Sample standard deviation of all non-NaN values' , value : ReducerValue . STDS } ,
106+ { label : 'Var Population' , description : 'Population variance of all non-NaN values' , value : ReducerValue . VARP } ,
107+ { label : 'Var Sample' , description : 'Sample variance of all non-NaN values' , value : ReducerValue . VARS } ,
108+ ] ;
0 commit comments