Skip to content

Commit b6e0d3c

Browse files
ShowSummary (totals display) will be overridden by pivot settings
1 parent 0ddae51 commit b6e0d3c

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

package.json

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

source/js/DataController.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ DataController.prototype.setData = function (data) {
9898
this._dataStack[this._dataStack.length - 1].data = data;
9999
//this.data = data;
100100
this.setLeftHeaderColumnsNumber(data); // required in resetDimensionProps()
101+
this.pivotDataProcess(data);
101102
this.resetDimensionProps();
102103
this.resetConditionalFormatting();
103104
this.resetRawData();
@@ -116,6 +117,20 @@ DataController.prototype.setData = function (data) {
116117

117118
};
118119

120+
/**
121+
* Function that process pivot data.
122+
* @param [data]
123+
*/
124+
DataController.prototype.pivotDataProcess = function ( data ) {
125+
126+
var totals = this.controller.getPivotProperty(["columnTotals"]);
127+
128+
if (typeof totals === "boolean") {
129+
this.controller.CONFIG["showSummary"] = totals;
130+
}
131+
132+
};
133+
119134
/**
120135
* Handle drillThrough on current level.
121136
* If handler returns boolean false, drillThrough won't be performed.

0 commit comments

Comments
 (0)