@datarailsshared/dr_renderer 1.2.323-dragons → 1.2.325
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 -3
- package/src/highcharts_renderer.js +238 -180
- package/src/pivottable.js +5 -17
- package/tests/highcharts_renderer.test.js +527 -0
- package/tests/mock/add-in-dynamic-ranges.json +133 -0
- package/tests/mock/add-in-functions.json +412 -0
- package/tests/mock/add-in-tables.json +347 -0
- package/tests/mock/widgets.json +411 -0
package/src/pivottable.js
CHANGED
@@ -686,22 +686,14 @@ let initPivotTable = function($, window, document) {
|
|
686
686
|
});
|
687
687
|
this.tree = {};
|
688
688
|
this.insights = [];
|
689
|
-
|
690
|
-
this.
|
691
|
-
if (this.isKeysSortingDoneOnBackendSide) {
|
692
|
-
this.rowKeys = opts.keysObject.row_keys;
|
693
|
-
this.colKeys = opts.keysObject.col_keys;
|
694
|
-
// TODO: add also for breakdown sort object when BE story is ready.
|
695
|
-
} else {
|
696
|
-
this.rowKeys = [];
|
697
|
-
this.colKeys = [];
|
698
|
-
}
|
699
|
-
|
689
|
+
this.rowKeys = [];
|
690
|
+
this.colKeys = [];
|
700
691
|
this.rowTotals = {};
|
701
692
|
this.colTotals = {};
|
702
693
|
this.allTotal = this.aggregator(this, [], []);
|
703
694
|
this.sorted = false;
|
704
695
|
this.dateValuesDictionary = opts.dateValuesDictionary;
|
696
|
+
this.sortByValueAttrs = opts.sortByValueAttrs || [];
|
705
697
|
PivotData.forEachRecord(this.input, this.derivedAttributes, (function(_this) {
|
706
698
|
return function(record) {
|
707
699
|
if (_this.filter(record)) {
|
@@ -861,16 +853,12 @@ let initPivotTable = function($, window, document) {
|
|
861
853
|
};
|
862
854
|
|
863
855
|
PivotData.prototype.getColKeys = function() {
|
864
|
-
|
865
|
-
this.sortKeys();
|
866
|
-
}
|
856
|
+
this.sortKeys();
|
867
857
|
return this.colKeys;
|
868
858
|
};
|
869
859
|
|
870
860
|
PivotData.prototype.getRowKeys = function() {
|
871
|
-
|
872
|
-
this.sortKeys();
|
873
|
-
}
|
861
|
+
this.sortKeys();
|
874
862
|
return this.rowKeys;
|
875
863
|
};
|
876
864
|
|