diff --git a/package.json b/package.json index 5dbb448..174b6e0 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/source/js/DataController.js b/source/js/DataController.js index db724b2..4014116 100644 --- a/source/js/DataController.js +++ b/source/js/DataController.js @@ -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(); @@ -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.