瀏覽代碼

Added new graphite function spec, weightedAverage, Closes #1879

Torkel Ödegaard 10 年之前
父節點
當前提交
b48b11e902
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      public/app/plugins/datasource/graphite/gfunc.js

+ 10 - 0
public/app/plugins/datasource/graphite/gfunc.js

@@ -530,6 +530,16 @@ function (_, $) {
     defaultParams: [10]
   });
 
+  addFuncDef({
+    name: 'weightedAverage',
+    category: categories.Filter,
+    params: [
+      { name: 'other', type: 'value_or_series', optional: true },
+      { name: "node", type: "int", options: [0,1,2,3,4,5,6,7,8,9,10,12] },
+    ],
+    defaultParams: ['#A', 4]
+  });
+
   addFuncDef({
     name: 'movingMedian',
     category: categories.Filter,