Skip to content

Commit

Permalink
fixed empty columns display (only measures by rows case)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaeverywhere committed Apr 1, 2015
1 parent e2b122f commit da6b4c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
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.0.0-beta.16",
"version": "1.0.0-beta.17",
"description": "A lightweight pivot table for MDX2JSON source for InterSystems Cache",
"main": "test/testServer.js",
"repository": {
Expand Down
7 changes: 5 additions & 2 deletions source/js/DataController.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ var DataController = function (controller, dataChangeTrigger) {
*/
DataController.prototype.isValidData = function (data) {

// add null column to display measures
if (!data.dimensions[0].length) data.dimensions[0] = [{}];

return data.dimensions instanceof Array
&& data.dimensions[0] instanceof Array
&& data.dimensions[0].length > 0
//&& data.dimensions[0].length > 0
//&& data.dimensions[1].length > 0
&& data.dimensions[0][0].hasOwnProperty("caption")
//&& data.dimensions[0][0].hasOwnProperty("caption")
//&& data.dimensions[1][0].hasOwnProperty("caption")
&& data.dataArray instanceof Array
&& typeof data["info"] === "object"
Expand Down

0 comments on commit da6b4c3

Please sign in to comment.