@datarailsshared/dr_renderer 1.2.316-dragons → 1.2.318-rocket
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/dr_pivottable.js +3 -14
- package/src/highcharts_renderer.js +266 -220
- package/src/pivottable.js +4 -18
- package/tests/highcharts_renderer.test.js +0 -642
package/package.json
CHANGED
package/src/dr_pivottable.js
CHANGED
@@ -91,7 +91,6 @@ let initDRPivotTable = function($, window, document) {
|
|
91
91
|
|
92
92
|
DRPivotData.prototype.arrSort = function(attrs) {
|
93
93
|
var a, sortersArr;
|
94
|
-
const sortByValueAttrs = this.sortByValueAttrs;
|
95
94
|
sortersArr = (function() {
|
96
95
|
var l, len1, results;
|
97
96
|
results = [];
|
@@ -101,21 +100,11 @@ let initDRPivotTable = function($, window, document) {
|
|
101
100
|
}
|
102
101
|
return results;
|
103
102
|
}).call(this);
|
104
|
-
|
105
103
|
return function(a, b) {
|
106
104
|
var comparison, i, sorter;
|
107
105
|
for (i in sortersArr) {
|
108
|
-
|
109
|
-
|
110
|
-
if (sortByValueAttrs.indexOf(attrs[index]) !== -1) {
|
111
|
-
|
112
|
-
// For case current Field attrs[index] is sorted by value we are concatenating values passed to sorter function
|
113
|
-
// Concatenation is done from first field in a block (first axis or first series) until current field index.
|
114
|
-
// Cause for this case sorting will be as list of these concatenated strings (which is prepared in getSortingByValueOrderList)
|
115
|
-
comparison = sorter(a.slice(0, index + 1).join(','), b.slice(0, index + 1).join(','));
|
116
|
-
} else {
|
117
|
-
comparison = sorter(a[index], b[index]);
|
118
|
-
}
|
106
|
+
sorter = sortersArr[i];
|
107
|
+
comparison = sorter(a[i], b[i]);
|
119
108
|
if (comparison !== 0) {
|
120
109
|
return comparison;
|
121
110
|
}
|
@@ -198,7 +187,7 @@ let initDRPivotTable = function($, window, document) {
|
|
198
187
|
let flatRowKey = rowKey.join(delim);
|
199
188
|
let flatColKey = colKey.join(delim);
|
200
189
|
|
201
|
-
if (this.keysLength === rowKey.length + colKey.length
|
190
|
+
if (this.keysLength === rowKey.length + colKey.length) {
|
202
191
|
if (!this.rowKeys.some(rKey => rKey.join(delim) === flatRowKey)) {
|
203
192
|
this.rowKeys.push(rowKey);
|
204
193
|
}
|