|
|
@ -25,7 +25,7 @@ jQuery.fn.dataTable.Api.register( 'average()', function () {
|
|
|
|
var data = this.flatten();
|
|
|
|
var data = this.flatten();
|
|
|
|
var sum = data.reduce( function ( a, b ) {
|
|
|
|
var sum = data.reduce( function ( a, b ) {
|
|
|
|
return (a*1) + (b*1); // cast values in-case they are strings
|
|
|
|
return (a*1) + (b*1); // cast values in-case they are strings
|
|
|
|
} );
|
|
|
|
}, 0 );
|
|
|
|
|
|
|
|
|
|
|
|
return sum / data.length;
|
|
|
|
return sum / data.length;
|
|
|
|
} );
|
|
|
|
} );
|
|
|
|