From c442ca198c6f7feff4e233dee8372cd8c9cca087 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Thu, 25 Jul 2019 16:26:26 -0600 Subject: [PATCH] Added exponentialMovingAverage documentation --- ui/src/shared/constants/fluxFunctions.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/ui/src/shared/constants/fluxFunctions.ts b/ui/src/shared/constants/fluxFunctions.ts index b714775ed1..99460ece16 100644 --- a/ui/src/shared/constants/fluxFunctions.ts +++ b/ui/src/shared/constants/fluxFunctions.ts @@ -687,6 +687,29 @@ export const FLUX_FUNCTIONS: FluxToolbarFunction[] = [ link: 'https://v2.docs.influxdata.com/v2.0/reference/flux/functions/built-in/transformations/elapsed/', }, + { + name: 'exponentialMovingAverage', + args: [ + { + name: 'n', + desc: 'The number of points to average.', + type: 'Integer', + }, + { + name: 'columns', + desc: + 'Columns to operate on. Defaults to `["_value"]`.', + type: 'Array of Strings`', + }, + ], + package: '', + desc: + 'Calculates the exponential moving average of values grouped into `n` number of points, giving more weight to recent data.', + example: 'exponentialMovingAverage(n: 5)', + category: 'Aggregates', + link: + 'https://v2.docs.influxdata.com/v2.0/reference/flux/functions/built-in/transformations/aggregates/exponentialmovingaverage/', + }, { name: 'fill', args: [