Skip to content

Commit e8e84dd

Browse files
Pick up "Display measure headers" option
1 parent d98bb01 commit e8e84dd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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.6",
4+
"version": "1.8.7",
55
"description": "A lightweight pivot table for MDX2JSON source for InterSystems Cache",
66
"main": "test/testServer.js",
77
"repository": {

source/js/DataController.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@ DataController.prototype.resetRawData = function () {
409409
}
410410

411411
var rd0 = [], rd1 = [], groupNum = 2, rawData = [];
412+
var MEASURES_HIDDEN = _.controller.CONFIG["pivotProperties"]
413+
&& _.controller.CONFIG["pivotProperties"]["hideMeasures"] === 2;
412414

413415
var transpose = function (a) {
414416
return Object.keys(a[0]).map(function (c) {
@@ -483,7 +485,7 @@ DataController.prototype.resetRawData = function () {
483485
value: c[i].caption || ""
484486
};
485487
applyHeaderStyle(obj, hor);
486-
a.push(arr.concat(obj));
488+
a.push(c[i]["type"] === "msr" && MEASURES_HIDDEN ? arr : arr.concat(obj));
487489
groupNum++;
488490
}
489491
}

0 commit comments

Comments
 (0)