Skip to content

Commit 85a6473

Browse files
default total aggregate apply
1 parent 838522a commit 85a6473

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

source/js/DataController.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,10 @@ DataController.prototype.resetRawData = function () {
455455
* @returns {Function}
456456
*/
457457
var getTotalFunction = function (columnIndex) {
458-
if (!data["columnProps"][columnIndex]) return _.TOTAL_FUNCTIONS.totalSUM;
459-
switch (data["columnProps"][columnIndex].summary) {
458+
var pivotDefault = _.controller.getPivotProperty(["rowTotalAgg"]);
459+
if (!data["columnProps"][columnIndex] && !pivotDefault)
460+
return _.TOTAL_FUNCTIONS.totalSUM;
461+
switch (data["columnProps"][columnIndex].summary || pivotDefault) {
460462
case "count": return _.TOTAL_FUNCTIONS.totalCOUNT;
461463
case "avg": return _.TOTAL_FUNCTIONS.totalAVG;
462464
case "min": return _.TOTAL_FUNCTIONS.totalMIN;

0 commit comments

Comments
 (0)