@datarailsshared/dr_renderer 1.2.324 → 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/highcharts_renderer.js +9 -0
- package/src/pivottable.js +1 -0
package/package.json
CHANGED
@@ -4789,6 +4789,10 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
4789
4789
|
opts.sorters = new_sorting_function;
|
4790
4790
|
optsFiltered.sorters = new_sorting_function;
|
4791
4791
|
pivotData.sorters = new_sorting_function;
|
4792
|
+
|
4793
|
+
if (lodash.isObject(lodash.get(widget, 'pivot'))) {
|
4794
|
+
widget.pivot.sorters = new_sorting_function;
|
4795
|
+
}
|
4792
4796
|
}
|
4793
4797
|
|
4794
4798
|
result = opts.renderer(pivotData, opts.rendererOptions);
|
@@ -4802,6 +4806,10 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
4802
4806
|
result = {};
|
4803
4807
|
}
|
4804
4808
|
}
|
4809
|
+
|
4810
|
+
if (lodash.isObject(lodash.get(widget, 'pivot'))) {
|
4811
|
+
widget.pivot.sortByValueAttrs = pivotData.sortByValueAttrs;
|
4812
|
+
}
|
4805
4813
|
} catch (_error) {
|
4806
4814
|
e = _error;
|
4807
4815
|
if (typeof console !== "undefined" && console !== null) {
|
@@ -4838,6 +4846,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
4838
4846
|
}
|
4839
4847
|
var subopts = {
|
4840
4848
|
sorters: pivotOptions ? pivotOptions.sorters : null,
|
4849
|
+
sortByValueAttrs: pivotOptions ? pivotOptions.sortByValueAttrs : null,
|
4841
4850
|
cols: lodash.map(pivotOptions.axisArray, 'name'),
|
4842
4851
|
rows: lodash.map(pivotOptions.legendArray, 'name'),
|
4843
4852
|
rendererOptions: widget.options,
|
package/src/pivottable.js
CHANGED
@@ -693,6 +693,7 @@ let initPivotTable = function($, window, document) {
|
|
693
693
|
this.allTotal = this.aggregator(this, [], []);
|
694
694
|
this.sorted = false;
|
695
695
|
this.dateValuesDictionary = opts.dateValuesDictionary;
|
696
|
+
this.sortByValueAttrs = opts.sortByValueAttrs || [];
|
696
697
|
PivotData.forEachRecord(this.input, this.derivedAttributes, (function(_this) {
|
697
698
|
return function(record) {
|
698
699
|
if (_this.filter(record)) {
|