Skip to content

Instantly share code, notes, and snippets.

View kalimuthu123's full-sized avatar
😍
happy

KALIMUTHU kalimuthu123

😍
happy
  • kalimuthu@thb.co.in
  • India
View GitHub Profile
@kalimuthu123
kalimuthu123 / multifact_sum_aggregator.js
Last active September 30, 2019 14:52 — forked from stephanvd/multifact_sum_aggregator.js
Aggregate over multiple fact fields. Result looks like this: http://imgur.com/fI636rq The aggregator returns first field for renderers without multifield support. The renderer is a modified version of the built-in table to support multifield. Quick and dirty but it gets the job done. For https://github.com/nicolaskruchten/pivottable.
multifactSumAggregator = function() {
return function(facts) {
return function() {
var summedFacts = {};
for (_i = 0, _len = facts.length; _i < _len; _i++) {
summedFacts[facts[_i]] = 0
}