Skip to content

Commit

Permalink
Not displaying totals fix, no data message display
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaeverywhere committed Oct 15, 2016
1 parent 31a32ad commit 811ac36
Show file tree
Hide file tree
Showing 3 changed files with 10 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.6.9",
"version": "1.6.11",
"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 @@ -119,7 +119,7 @@ DataController.prototype.setData = function (data) {
*/
DataController.prototype.pivotDataProcess = function ( data ) {

var totals = this.controller.getPivotProperty(["columnTotals"]);
var totals = this.controller.getPivotProperty(["rowTotals"]);

if (typeof totals === "boolean") {
this.controller.CONFIG["showSummary"] = totals;
Expand Down
9 changes: 8 additions & 1 deletion source/js/DataSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,16 @@ DataSource.prototype.getCurrentData = function (callback) {

})(data));
} else if (mdxType === "mdx") {
if (!data || !data.Data || !data.Cols
|| (!data.Data.length && !((data.Cols[0]||{}).tuples||[]).length)
&& !((data.Cols[1]||{}).tuples||[]).length) {
return callback({
error: pivotLocale.get(4)
});
}
callback(_._convert(data));
} else {
callback({ error: "Unrecognised MDX: " + mdx || true });
callback({ error: "Unrecognised MDX type: " + mdx || true });
}

};
Expand Down

0 comments on commit 811ac36

Please sign in to comment.