Skip to content

Commit b8f94d5

Browse files
Fix #4: count to behave like sum for totals
1 parent 8d5c573 commit b8f94d5

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
build/
3+
package-lock.json

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "LightPivotTable",
33
"author": "ZitRo",
4-
"version": "1.8.12",
4+
"version": "1.8.13",
55
"description": "A lightweight pivot table for MDX2JSON source for InterSystems Cache",
66
"main": "test/testServer.js",
77
"repository": {

source/js/DataController.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ DataController.prototype.resetRawData = function () {
630630
if (!data[props][columnIndex] && !(byColumns ? pivotDefaultCol : pivotDefault))
631631
return _.TOTAL_FUNCTIONS.totalSUM;
632632
switch ((data[props][columnIndex] || {}).summary || pivotDefault) {
633-
case "count": return _.TOTAL_FUNCTIONS.totalCOUNT;
633+
case "count": return _.TOTAL_FUNCTIONS.totalSUM; // _.TOTAL_FUNCTIONS.totalCOUNT; https://github.com/intersystems-ru/LightPivotTable/issues/4
634634
case "avg": return _.TOTAL_FUNCTIONS.totalAVG;
635635
case "min": return _.TOTAL_FUNCTIONS.totalMIN;
636636
case "max": return _.TOTAL_FUNCTIONS.totalMAX;

0 commit comments

Comments
 (0)