Add test for crossfilter.groupAll()

This commit is contained in:
Douglas
2016-02-26 11:09:55 -06:00
parent 0e6151e5e3
commit 66f219903a
+5
View File
@@ -24,6 +24,11 @@ var payments = crossfilter<Payment>([
{date: "2011-11-14T17:29:52Z", quantity: 1, total: 200, tip: 100, type: "visa"}
]);
var total_payments : number = payments.groupAll<number>().reduce(
function(p,v) { return p+=v; },
function(p,v) { return p-=v; },
function() { return 0; } ).value();
var paymentsByTotal = payments.dimension((d) => d.total);
// Filters