Skip to content

Commit

Permalink
ShowSummary (totals display) will be overridden by pivot settings
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaeverywhere committed Jan 15, 2016
1 parent 0ddae51 commit b6e0d3c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "LightPivotTable",
"author": "ZitRo",
"version": "1.4.12",
"version": "1.4.13",
"description": "A lightweight pivot table for MDX2JSON source for InterSystems Cache",
"main": "test/testServer.js",
"repository": {
Expand Down
15 changes: 15 additions & 0 deletions source/js/DataController.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ DataController.prototype.setData = function (data) {
this._dataStack[this._dataStack.length - 1].data = data;
//this.data = data;
this.setLeftHeaderColumnsNumber(data); // required in resetDimensionProps()
this.pivotDataProcess(data);
this.resetDimensionProps();
this.resetConditionalFormatting();
this.resetRawData();
Expand All @@ -116,6 +117,20 @@ DataController.prototype.setData = function (data) {

};

/**
* Function that process pivot data.
* @param [data]
*/
DataController.prototype.pivotDataProcess = function ( data ) {

var totals = this.controller.getPivotProperty(["columnTotals"]);

if (typeof totals === "boolean") {
this.controller.CONFIG["showSummary"] = totals;
}

};

/**
* Handle drillThrough on current level.
* If handler returns boolean false, drillThrough won't be performed.
Expand Down

0 comments on commit b6e0d3c

Please sign in to comment.