Skip to content

Commit dea08fb

Browse files
Fix undefined pivot property
1 parent 3c265e7 commit dea08fb

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

example/index.html

+10-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,15 @@
8686
{
8787
basicMDX: 'SELECT NON EMPTY {[Measures].[%COUNT],%LABEL([Measures].[Avg Age],"Avg Age (ex. 1)",""),%LABEL([Measures].[Avg Age],"Avg Age (ex. 2)",""),%LABEL([Measures].[Avg Age],"Avg Age (ex. 3)","")} ON 0,NON EMPTY [AllerSevD].[H1].[Allergy Severities].Members ON 1 FROM [Patients]',
8888
pivot: "Pivot Features/Conditional Formatting.pivot"
89-
}
89+
},
90+
{
91+
basicMDX: 'SELECT NON EMPTY HEAD({NONEMPTYCROSSJOIN([Product].[P1].[Product Category].&[Pasta],[Measures].[Units Sold]),NONEMPTYCROSSJOIN([Product].[P1].[Product Category].&[Pasta],[Measures].[Amount Sold])},2000,SAMPLE) ON 1 FROM [HOLEFOODS]',
92+
pivot: 'OH/Measure labels displayed.pivot'
93+
},
94+
{
95+
basicMDX: 'SELECT NON EMPTY HEAD({NONEMPTYCROSSJOIN([Product].[P1].[Product Category].&[Pasta],[Measures].[Units Sold]),NONEMPTYCROSSJOIN([Product].[P1].[Product Category].&[Pasta],[Measures].[Amount Sold])},2000,SAMPLE) ON 1 FROM [HOLEFOODS]',
96+
pivot: 'OH/Measure labels ommitted.pivot'
97+
}
9098
][v],
9199
setup;
92100

@@ -98,7 +106,7 @@
98106
container: document.getElementById("pivot") // HTMLElement which will contain table.
99107
//, locale: "en" // language to use (default: browser default or "en")
100108
, dataSource: {
101-
MDX2JSONSource: "http://" + location.hostname + ":57776/MDX2JSON"
109+
MDX2JSONSource: "http://" + location.hostname + ":57772/MDX2JSON"
102110
//MDX2JSONSource: "http://37.139.4.54/MDX2JSON"
103111
// MDX2JSON server address
104112
, basicMDX: typeof req === "object" ? req.basicMDX : req

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.11",
4+
"version": "1.8.12",
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
@@ -867,7 +867,7 @@ DataController.prototype.modifyRawData = function (data) {
867867
var y = data.info.topHeaderRowsNumber - 1;
868868
for (i = data.info.leftHeaderColumnsNumber; i < data.rawData[y].length; i++) {
869869
data.rawData[y][i].style = "min-width:"
870-
+ (this.controller.CONFIG.pivotProperties["cellWidth"] || 100) + "px;"
870+
+ (this.controller.getPivotProperty(["cellWidth"]) || 100) + "px;"
871871
+ (data.rawData[y][i].style ? data.rawData[y][i].style : "");
872872
}
873873

0 commit comments

Comments
 (0)