Skip to content

Commit e45428c

Browse files
complex columns properties fix
1 parent 1ea3323 commit e45428c

3 files changed

Lines changed: 11 additions & 19 deletions

File tree

source/js/DataController.js

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,17 @@ DataController.prototype.resetDimensionProps = function () {
118118
return;
119119
}
120120

121+
var cloneObj = function (obj) {
122+
var i, newObj = {};
123+
for (i in obj) newObj[i] = obj[i];
124+
return newObj;
125+
};
126+
121127
var parse = function (obj, props) {
122-
var tObj, clonedProps = {}, i;
123-
for (i in props) clonedProps[i] = props[i];
128+
var tObj, clonedProps, i;
124129
if (obj["children"] && obj["children"].length > 0) {
125130
for (i in obj.children) {
131+
clonedProps = cloneObj(props);
126132
tObj = obj.children[i];
127133
if (tObj["format"]) clonedProps["format"] = tObj["format"];
128134
if (tObj["style"]) clonedProps["style"] =
@@ -132,6 +138,7 @@ DataController.prototype.resetDimensionProps = function () {
132138
parse(tObj, clonedProps);
133139
}
134140
} else {
141+
clonedProps = cloneObj(props);
135142
columnProps.push(clonedProps);
136143
}
137144
};
@@ -258,22 +265,6 @@ DataController.prototype.TOTAL_FUNCTIONS = {
258265
totalNONE: function () {
259266
return "";
260267
}
261-
//
262-
//wholeMIN: function (array, iStart, iEnd, column, xStart) {
263-
// var min = Infinity, m, x;
264-
// for (x = xStart; x < array[0].length; x++) {
265-
// if (m = this.totalMIN(array, iStart, iEnd, x) < min) min = m;
266-
// }
267-
// return min;
268-
//},
269-
//
270-
//wholeMAX: function (array, iStart, iEnd, column, xStart) {
271-
// var max = Infinity, m, x;
272-
// for (x = xStart; x < array[0].length; x++) {
273-
// if (m = this.totalMAX(array, iStart, iEnd, x) < max) max = m;
274-
// }
275-
// return max;
276-
//}
277268

278269
};
279270

source/js/DataSource.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ DataSource.prototype.getCurrentData = function (callback) {
161161

162162
var data = ready.data;
163163

164-
//console.log("Retrieved data:", ready);
164+
console.log("Retrieved data:", ready);
165165

166166
if (mdxType === "drillthrough") {
167167
callback((function (data) {

source/js/PivotView.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@ PivotView.prototype.renderRawData = function (data) {
520520
mainTBody = document.createElement("tbody"),
521521
x, y, tr = null, th, td, primaryColumns = [], primaryRows = [], ratio;
522522

523+
console.log("columnProps", columnProps);
523524
// clean previous content
524525
this.removeMessage();
525526
while (container.firstChild) { container.removeChild(container.firstChild); }

0 commit comments

Comments
 (0)