Added medianBy() aggregation.

This commit is contained in:
Alexander Zobnin
2016-01-29 16:58:28 +03:00
parent 8ae3b8b2eb
commit 2819162809
2 changed files with 22 additions and 1 deletions

View File

@@ -28,7 +28,7 @@ function (_, $) {
category: 'Transform',
params: [
{ name: 'interval', type: 'string'},
{ name: 'function', type: 'string', options: ['avg', 'min', 'max'] }
{ name: 'function', type: 'string', options: ['avg', 'min', 'max', 'median'] }
],
defaultParams: ['1m', 'avg'],
});
@@ -40,6 +40,15 @@ function (_, $) {
defaultParams: [],
});
addFuncDef({
name: 'medianBy',
category: 'Aggregate',
params: [
{ name: 'interval', type: 'string'}
],
defaultParams: ['1m'],
});
addFuncDef({
name: 'average',
category: 'Aggregate',