Skip to content

Commit 811ac36

Browse files
Not displaying totals fix, no data message display
1 parent 31a32ad commit 811ac36

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "LightPivotTable",
33
"author": "ZitRo",
4-
"version": "1.6.9",
4+
"version": "1.6.11",
55
"description": "A lightweight pivot table for MDX2JSON source for InterSystems Cache",
66
"main": "test/testServer.js",
77
"repository": {

source/js/DataController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ DataController.prototype.setData = function (data) {
119119
*/
120120
DataController.prototype.pivotDataProcess = function ( data ) {
121121

122-
var totals = this.controller.getPivotProperty(["columnTotals"]);
122+
var totals = this.controller.getPivotProperty(["rowTotals"]);
123123

124124
if (typeof totals === "boolean") {
125125
this.controller.CONFIG["showSummary"] = totals;

source/js/DataSource.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,16 @@ DataSource.prototype.getCurrentData = function (callback) {
222222

223223
})(data));
224224
} else if (mdxType === "mdx") {
225+
if (!data || !data.Data || !data.Cols
226+
|| (!data.Data.length && !((data.Cols[0]||{}).tuples||[]).length)
227+
&& !((data.Cols[1]||{}).tuples||[]).length) {
228+
return callback({
229+
error: pivotLocale.get(4)
230+
});
231+
}
225232
callback(_._convert(data));
226233
} else {
227-
callback({ error: "Unrecognised MDX: " + mdx || true });
234+
callback({ error: "Unrecognised MDX type: " + mdx || true });
228235
}
229236

230237
};

0 commit comments

Comments
 (0)