Skip to content

Commit

Permalink
Fix undefined pivot property
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaeverywhere committed Nov 27, 2017
1 parent 3c265e7 commit dea08fb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,15 @@
{
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]',
pivot: "Pivot Features/Conditional Formatting.pivot"
}
},
{
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]',
pivot: 'OH/Measure labels displayed.pivot'
},
{
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]',
pivot: 'OH/Measure labels ommitted.pivot'
}
][v],
setup;

Expand All @@ -98,7 +106,7 @@
container: document.getElementById("pivot") // HTMLElement which will contain table.
//, locale: "en" // language to use (default: browser default or "en")
, dataSource: {
MDX2JSONSource: "http://" + location.hostname + ":57776/MDX2JSON"
MDX2JSONSource: "http://" + location.hostname + ":57772/MDX2JSON"
//MDX2JSONSource: "http://37.139.4.54/MDX2JSON"
// MDX2JSON server address
, basicMDX: typeof req === "object" ? req.basicMDX : req
Expand Down
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.8.11",
"version": "1.8.12",
"description": "A lightweight pivot table for MDX2JSON source for InterSystems Cache",
"main": "test/testServer.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion source/js/DataController.js
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ DataController.prototype.modifyRawData = function (data) {
var y = data.info.topHeaderRowsNumber - 1;
for (i = data.info.leftHeaderColumnsNumber; i < data.rawData[y].length; i++) {
data.rawData[y][i].style = "min-width:"
+ (this.controller.CONFIG.pivotProperties["cellWidth"] || 100) + "px;"
+ (this.controller.getPivotProperty(["cellWidth"]) || 100) + "px;"
+ (data.rawData[y][i].style ? data.rawData[y][i].style : "");
}

Expand Down

0 comments on commit dea08fb

Please sign in to comment.