1) CustomFormatter is my own formatter function
2) aggregatorFieldName is of string array and is the value of field on which aggregation needs to be performed
But the below line in Utilities.js
this.aggregator = this.props.aggregatorsthis.props.aggregatorName;
calls sum()() with _ref3 as my formatter function where I am expecting it should receive the aggreagtor field name
below is the sum function from utilities.
sum: function sum() {
var formatter = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : usFmt;
return function (_ref3) {
var _ref4 = _slicedToArray(_ref3, 1),
attr = _ref4[0];
return function () {
return {
sum: 0,
push: function push(record) {
if (!isNaN(parseFloat(record[attr]))) {
this.sum += parseFloat(record[attr]);
}
},
value: function value() {
return this.sum;
},
format: formatter,
numInputs: typeof attr !== 'undefined' ? 0 : 1
};
};
};
Hello All,
I am defining aggregator like this .
SumResidual: () => aggregatorTemplates.Sum(CustomFormatter)([aggregateFieldName]),
and aggregatorName=SumResidual
also I am defining vals to aggregateFieldName
1) CustomFormatter is my own formatter function 2) aggregatorFieldName is of string array and is the value of field on which aggregation needs to be performed
But the below line in Utilities.js this.aggregator = this.props.aggregatorsthis.props.aggregatorName;
calls sum()() with _ref3 as my formatter function where I am expecting it should receive the aggreagtor field name
below is the sum function from utilities. sum: function sum() { var formatter = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : usFmt;
},
Am I doing it correctly ?
Any help is appreciated :)
Regards