Browse Source

Added new graphite function spec, weightedAverage, Closes #1879

Torkel Ödegaard 10 năm trước cách đây
mục cha
commit
b48b11e902
1 tập tin đã thay đổi với 10 bổ sung0 xóa
  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,