@datarailsshared/dr_renderer 1.2.316-dragons → 1.2.317-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 +1 -1
- package/src/highcharts_renderer.js +123 -162
- package/src/pivottable.js +4 -17
package/package.json
CHANGED
package/src/dr_pivottable.js
CHANGED
@@ -198,7 +198,7 @@ let initDRPivotTable = function($, window, document) {
|
|
198
198
|
let flatRowKey = rowKey.join(delim);
|
199
199
|
let flatColKey = colKey.join(delim);
|
200
200
|
|
201
|
-
if (this.keysLength === rowKey.length + colKey.length
|
201
|
+
if (this.keysLength === rowKey.length + colKey.length) {
|
202
202
|
if (!this.rowKeys.some(rKey => rKey.join(delim) === flatRowKey)) {
|
203
203
|
this.rowKeys.push(rowKey);
|
204
204
|
}
|
@@ -1150,7 +1150,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
1150
1150
|
ob.name = row_n_value.join(highchartsRenderer.delimer)
|
1151
1151
|
.replace(highchartsRenderer.DR_OTHERS_KEY, othersName);
|
1152
1152
|
}
|
1153
|
-
|
1154
1153
|
lodash.forEach(col_n_keys, function (col_n_value, index) {
|
1155
1154
|
var agg = pivotData.getAggregator(row_n_value, col_n_value);
|
1156
1155
|
var val = agg.value();
|
@@ -1392,7 +1391,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
1392
1391
|
if (opts.trendLine) {
|
1393
1392
|
const a = ((ySum * squareXSum) - (xSum * xySum)) / ((n * squareXSum) - (xSum * xSum));
|
1394
1393
|
const b = ((n * xySum) - (xSum* ySum)) / ((n * squareXSum) - (xSum * xSum));
|
1395
|
-
|
1396
1394
|
const trendSeries = lodash.clone(chart_series[chart_series.length - 1]);
|
1397
1395
|
trendSeries.className = 'trendSeries';
|
1398
1396
|
trendSeries.name = highchartsRenderer.getTrendSeriesName(trendSeries);
|
@@ -1403,7 +1401,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
1403
1401
|
if (colors && colors[i]) {
|
1404
1402
|
trendSeries.color = colors[i];
|
1405
1403
|
}
|
1406
|
-
|
1407
1404
|
trendSerieses.push(trendSeries);
|
1408
1405
|
}
|
1409
1406
|
i++;
|
@@ -1420,7 +1417,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
1420
1417
|
}
|
1421
1418
|
|
1422
1419
|
let weights = { line: 2,spline: 3 ,area:-2, areaspline: -1, scatter:4, column: 1 };
|
1423
|
-
|
1424
1420
|
if (opts.comboOptions && lodash.includes(chartType,'combo') && !lodash.isEqual(row_n_keys, EMPTY_ROW_N_KEYS)) {
|
1425
1421
|
chart_series.forEach((series, seriesIndex) => {
|
1426
1422
|
const savedSeriesOption = lodash.find(opts.comboOptions.seriesOptions, {series: series.name});
|
@@ -1507,7 +1503,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
1507
1503
|
const chart_series = [];
|
1508
1504
|
const row_n_keys = pivotData.getRowKeys();
|
1509
1505
|
const col_n_keys = pivotData.getColKeys();
|
1510
|
-
const rows_by_cols = pivotData.rowKeysByCols;
|
1511
1506
|
|
1512
1507
|
let resultObject = {
|
1513
1508
|
data: [],
|
@@ -1536,9 +1531,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
1536
1531
|
});
|
1537
1532
|
|
1538
1533
|
if (col_index !== col_n_keys.length - 1) {
|
1539
|
-
|
1540
|
-
const rowKeys = rows_by_cols ? rows_by_cols[col_index] : row_n_keys;
|
1541
|
-
lodash.forEach(rowKeys, function (row_n_value) {
|
1534
|
+
lodash.forEach(row_n_keys, function (row_n_value) {
|
1542
1535
|
const agg = pivotData.getAggregator(row_n_value, col_n_value);
|
1543
1536
|
let val = agg.value();
|
1544
1537
|
|
@@ -4714,19 +4707,17 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
4714
4707
|
opts.rendererOptions.onlyOptions = true;
|
4715
4708
|
}
|
4716
4709
|
|
4717
|
-
|
4718
|
-
|
4719
|
-
|
4720
|
-
|
4721
|
-
|
4722
|
-
|
4723
|
-
|
4724
|
-
|
4725
|
-
|
4726
|
-
|
4727
|
-
|
4728
|
-
pivotData.sorters = new_sorting_function;
|
4729
|
-
}
|
4710
|
+
const sortByValueSettings = lodash.filter(
|
4711
|
+
lodash.get(widget, 'options.sortingFields', []),
|
4712
|
+
sortingField => lodash.includes(['field_values', 'variance'], lodash.get(sortingField, 'sorting.sort_by'))
|
4713
|
+
);
|
4714
|
+
|
4715
|
+
if (sortByValueSettings.length) {
|
4716
|
+
pivotData.sortByValueAttrs = lodash.map(sortByValueSettings, fieldSorting => fieldSorting.name);
|
4717
|
+
let new_sorting_function = highchartsRenderer.generateSortingFunctionByValues(sortByValueSettings, pivotData, opts, widget);
|
4718
|
+
opts.sorters = new_sorting_function;
|
4719
|
+
optsFiltered.sorters = new_sorting_function;
|
4720
|
+
pivotData.sorters = new_sorting_function;
|
4730
4721
|
}
|
4731
4722
|
|
4732
4723
|
result = opts.renderer(pivotData, opts.rendererOptions);
|
@@ -4780,7 +4771,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
4780
4771
|
rows: lodash.map(pivotOptions.legendArray, 'name'),
|
4781
4772
|
rendererOptions: widget.options,
|
4782
4773
|
dateValuesDictionary: pivotOptions ? pivotOptions.dateValuesDictionary : null,
|
4783
|
-
keysObject: pivotOptions ? pivotOptions.keysObject : null,
|
4784
4774
|
};
|
4785
4775
|
|
4786
4776
|
if (!subopts.rendererOptions) {
|
@@ -8649,8 +8639,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
8649
8639
|
};
|
8650
8640
|
|
8651
8641
|
highchartsRenderer.getWidgetDataSorters = function (res, widget, defaultDateFormat) {
|
8652
|
-
let sorters;
|
8653
|
-
|
8654
8642
|
if ($.pivotUtilities && !$.pivotUtilities.additionalFieldsList) {
|
8655
8643
|
$.pivotUtilities.additionalFieldsList = [
|
8656
8644
|
{key: 'DR_Average', name: 'DR_Average'},
|
@@ -8658,19 +8646,32 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
8658
8646
|
];
|
8659
8647
|
}
|
8660
8648
|
|
8661
|
-
|
8649
|
+
var datesFields = [];
|
8662
8650
|
datesFields = lodash.filter(widget.rows, element => element.type == 'Date');
|
8663
8651
|
datesFields = datesFields.concat(lodash.filter(widget.cols, element => element.type == 'Date'));
|
8652
|
+
|
8653
|
+
const isCustomSorting = widget.options.sortingFields && Array.isArray(widget.options.sortingFields) && widget.options.sortingFields.length > 0;
|
8654
|
+
if (isCustomSorting) {
|
8655
|
+
lodash.forEach(datesFields, function (field) {
|
8656
|
+
const fieldToSort = lodash.find(
|
8657
|
+
widget.options.sortingFields, element => element.id === field.id && lodash.get(element, 'sorting.sort_by') === 'field_items'
|
8658
|
+
);
|
8659
|
+
field.sorting = fieldToSort ? fieldToSort.sorting : field.sorting;
|
8660
|
+
});
|
8661
|
+
}
|
8662
|
+
|
8664
8663
|
datesFields = lodash.map(datesFields, function (row) {
|
8665
8664
|
return { "format": highchartsRenderer.getDateFieldFormat(widget, row), "name": row.name, "type": row.type, "values": [], "sorting": row.sorting } //'MMM - yyyy' format
|
8666
8665
|
});
|
8667
8666
|
|
8667
|
+
var data = res;
|
8668
|
+
|
8668
8669
|
lodash.forEach(datesFields, function (row) {
|
8669
8670
|
row.val_not_convert = highchartsRenderer.check_values_not_for_convert(widget, row.name);
|
8670
8671
|
});
|
8671
8672
|
|
8672
8673
|
if (datesFields.length > 0) {
|
8673
|
-
lodash.forEach(
|
8674
|
+
lodash.forEach(data, function (element) {
|
8674
8675
|
for (var i in datesFields) {
|
8675
8676
|
if (element.hasOwnProperty(datesFields[i].name)) {
|
8676
8677
|
datesFields[i].values.push(element[datesFields[i].name]);
|
@@ -8688,144 +8689,120 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
8688
8689
|
}
|
8689
8690
|
}
|
8690
8691
|
});
|
8691
|
-
|
8692
|
-
const invertedDateStringMap = lodash.invert(widget.pivot.dateValuesDictionary);
|
8693
|
-
lodash.forEach([widget.pivot.keysObject.col_keys, widget.pivot.keysObject.row_keys], (widgetKeyLists, index) => {
|
8694
|
-
const widgetFields = index ? widget.rows : widget.cols;
|
8695
|
-
lodash.forEach(widgetKeyLists, keysList => {
|
8696
|
-
lodash.forEach(keysList, (key, index) => {
|
8697
|
-
if (widgetFields[index].type === 'Date') {
|
8698
|
-
keysList[index] = invertedDateStringMap[key] || key;
|
8699
|
-
}
|
8700
|
-
});
|
8701
|
-
});
|
8702
|
-
})
|
8703
8692
|
}
|
8693
|
+
lodash.forEach(datesFields, function (row) {
|
8694
|
+
row.values = lodash.uniq(row.values);
|
8704
8695
|
|
8705
|
-
|
8706
|
-
|
8707
|
-
|
8708
|
-
|
8709
|
-
|
8710
|
-
widget.options.sortingFields, element => element.id === field.id && lodash.get(element, 'sorting.sort_by') === 'field_items'
|
8711
|
-
);
|
8712
|
-
field.sorting = fieldToSort ? fieldToSort.sorting : field.sorting;
|
8713
|
-
});
|
8714
|
-
}
|
8715
|
-
|
8716
|
-
lodash.forEach(datesFields, function (row) {
|
8717
|
-
row.values = lodash.uniq(row.values);
|
8718
|
-
|
8719
|
-
const isTimestampDateField = row.type === 'Date' && lodash.some(row.values, value => typeof value ==='number');
|
8720
|
-
if (isTimestampDateField) {
|
8721
|
-
const nullValueIndex = row.values.indexOf(NULL_VALUE);
|
8722
|
-
if (~nullValueIndex) {
|
8723
|
-
row.values.splice(nullValueIndex, 1);
|
8724
|
-
}
|
8725
|
-
row.values = row.values.sort((a, b) => a - b);
|
8726
|
-
if (~nullValueIndex) {
|
8727
|
-
row.values.push(NULL_VALUE);
|
8728
|
-
}
|
8729
|
-
} else {
|
8730
|
-
row.values = row.values.sort();
|
8696
|
+
const isTimestampDateField = row.type === 'Date' && lodash.some(row.values, value => typeof value ==='number');
|
8697
|
+
if (isTimestampDateField) {
|
8698
|
+
const nullValueIndex = row.values.indexOf(NULL_VALUE);
|
8699
|
+
if (~nullValueIndex) {
|
8700
|
+
row.values.splice(nullValueIndex, 1);
|
8731
8701
|
}
|
8732
|
-
|
8733
|
-
if (
|
8734
|
-
row.values
|
8702
|
+
row.values = row.values.sort((a, b) => a - b);
|
8703
|
+
if (~nullValueIndex) {
|
8704
|
+
row.values.push(NULL_VALUE);
|
8735
8705
|
}
|
8736
|
-
|
8737
|
-
row.values =
|
8738
|
-
|
8739
|
-
})
|
8740
|
-
|
8741
|
-
});
|
8706
|
+
} else {
|
8707
|
+
row.values = row.values.sort();
|
8708
|
+
}
|
8742
8709
|
|
8743
|
-
|
8744
|
-
|
8745
|
-
rowsAndCols = widget.rows.concat(widget.cols);
|
8746
|
-
|
8747
|
-
if (widget.chart_type === highchartsRenderer.CHART_TYPES.WATERFALL_BREAKDOWN) {
|
8748
|
-
|
8749
|
-
// if it is breakdown widget - redefine sorting according to breakdown_options
|
8750
|
-
// TODO: remove this when BE sort will be implemented
|
8751
|
-
lodash.forEach(rowsAndCols, function (field) {
|
8752
|
-
const waterfallFieldType = field.id === widget.cols[0].id ? 'totals' : 'breakdown';
|
8753
|
-
field.sorting = {
|
8754
|
-
type: 'CustomOrder',
|
8755
|
-
values: lodash.map(
|
8756
|
-
widget.options.breakdown_options.values[waterfallFieldType],
|
8757
|
-
value => value.key
|
8758
|
-
),
|
8759
|
-
};
|
8760
|
-
});
|
8761
|
-
} else if (isCustomSorting) {
|
8762
|
-
lodash.forEach(rowsAndCols, function (field) {
|
8763
|
-
const fieldToSort = lodash.find(
|
8764
|
-
widget.options.sortingFields, element => element.id === field.id && lodash.get(element, 'sorting.sort_by') === 'field_items'
|
8765
|
-
);
|
8766
|
-
field.sorting = fieldToSort ? fieldToSort.sorting : field.sorting;
|
8767
|
-
});
|
8710
|
+
if (row.sorting && row.sorting.type == "largestToSmallest") {
|
8711
|
+
row.values = lodash.reverse(row.values);
|
8768
8712
|
}
|
8713
|
+
delete row.sorting;
|
8714
|
+
row.values = lodash.map(row.values, function (val) {
|
8715
|
+
return highchartsRenderer.returnRawDataValue(row.type, val, row.format, row.name, row.val_not_convert) + "";
|
8716
|
+
})
|
8717
|
+
|
8718
|
+
});
|
8769
8719
|
|
8720
|
+
/* date string */
|
8721
|
+
var rowsAndCols = [];
|
8722
|
+
rowsAndCols = widget.rows.concat(widget.cols);
|
8723
|
+
|
8724
|
+
if (widget.chart_type === highchartsRenderer.CHART_TYPES.WATERFALL_BREAKDOWN) {
|
8725
|
+
|
8726
|
+
// if it is breakdown widget - redefine sorting according to breakdown_options
|
8727
|
+
// TODO: remove this when BE sort will be implemented
|
8770
8728
|
lodash.forEach(rowsAndCols, function (field) {
|
8771
|
-
|
8772
|
-
|
8773
|
-
|
8774
|
-
|
8775
|
-
|
8776
|
-
|
8777
|
-
|
8778
|
-
|
8779
|
-
|
8780
|
-
|
8781
|
-
|
8782
|
-
|
8783
|
-
|
8784
|
-
|
8785
|
-
|
8729
|
+
const waterfallFieldType = field.id === widget.cols[0].id ? 'totals' : 'breakdown';
|
8730
|
+
field.sorting = {
|
8731
|
+
type: 'CustomOrder',
|
8732
|
+
values: lodash.map(
|
8733
|
+
widget.options.breakdown_options.values[waterfallFieldType],
|
8734
|
+
value => value.key
|
8735
|
+
),
|
8736
|
+
};
|
8737
|
+
});
|
8738
|
+
} else if (isCustomSorting) {
|
8739
|
+
lodash.forEach(rowsAndCols, function (field) {
|
8740
|
+
const fieldToSort = lodash.find(
|
8741
|
+
widget.options.sortingFields, element => element.id === field.id && lodash.get(element, 'sorting.sort_by') === 'field_items'
|
8742
|
+
);
|
8743
|
+
field.sorting = fieldToSort ? fieldToSort.sorting : field.sorting;
|
8744
|
+
});
|
8745
|
+
}
|
8746
|
+
|
8747
|
+
lodash.forEach(rowsAndCols, function (field) {
|
8748
|
+
if (field.sorting && (field.sorting.type == "DateString" || field.sorting.type == "largestToSmallest")) {
|
8749
|
+
var find_field = lodash.find(datesFields, {name: field.name});
|
8750
|
+
if (find_field) {
|
8751
|
+
if (find_field.type != 'Date')
|
8752
|
+
find_field.sorting = field.sorting;
|
8753
|
+
} else {
|
8786
8754
|
datesFields.push({
|
8787
8755
|
"format": field.format,
|
8788
8756
|
"name": field.name,
|
8789
8757
|
"type": field.type,
|
8790
|
-
"values":
|
8758
|
+
"values": [],
|
8759
|
+
"sorting": field.sorting,
|
8791
8760
|
});
|
8792
8761
|
}
|
8793
|
-
})
|
8762
|
+
} else if (field.sorting && field.sorting.type == "CustomOrder" && field.sorting.values) {
|
8763
|
+
datesFields.push({
|
8764
|
+
"format": field.format,
|
8765
|
+
"name": field.name,
|
8766
|
+
"type": field.type,
|
8767
|
+
"values": field.sorting.values
|
8768
|
+
});
|
8769
|
+
}
|
8770
|
+
});
|
8771
|
+
|
8772
|
+
if (widget.vals && widget.vals.length > 1) {
|
8773
|
+
datesFields.push({name: "DR_Values", values: lodash.map(widget.vals, 'name')});
|
8774
|
+
}
|
8794
8775
|
|
8795
|
-
|
8796
|
-
|
8776
|
+
/****** END *******/
|
8777
|
+
|
8778
|
+
// TODO: Remove. sortingValues looks like lagacy which is not in use neither in webclient nor in renderer
|
8779
|
+
if (widget.options && widget.options.sortingValues) {
|
8780
|
+
var field = lodash.find(datesFields, {name: widget.options.sortingValues.field});
|
8781
|
+
if (field) {
|
8782
|
+
field.values = widget.options.sortingValues.values;
|
8783
|
+
field.sorting = null;
|
8784
|
+
} else {
|
8785
|
+
datesFields.push({
|
8786
|
+
name: widget.options.sortingValues.field,
|
8787
|
+
values: widget.options.sortingValues.values
|
8788
|
+
});
|
8797
8789
|
}
|
8798
|
-
|
8799
|
-
|
8800
|
-
|
8801
|
-
|
8802
|
-
if (
|
8803
|
-
|
8804
|
-
|
8805
|
-
|
8806
|
-
field.sorting
|
8790
|
+
}
|
8791
|
+
|
8792
|
+
let sorters = function (attr) {
|
8793
|
+
var field = lodash.find(datesFields, {name: attr});
|
8794
|
+
if (field)
|
8795
|
+
if (field.sorting && field.sorting.type == "DateString") {
|
8796
|
+
return $.pivotUtilities.sortDateStrings(field.sorting.month_order);
|
8797
|
+
} else if (field.sorting && field.sorting.type == "largestToSmallest") {
|
8798
|
+
if (field.sorting.is_absolute)
|
8799
|
+
return $.pivotUtilities.largeToSmallSortByAbsolute;
|
8800
|
+
|
8801
|
+
return $.pivotUtilities.largeToSmallSort;
|
8807
8802
|
} else {
|
8808
|
-
|
8809
|
-
name: widget.options.sortingValues.field,
|
8810
|
-
values: widget.options.sortingValues.values
|
8811
|
-
});
|
8803
|
+
return $.pivotUtilities.sortAs(field.values);
|
8812
8804
|
}
|
8813
|
-
|
8814
|
-
sorters = function (attr) {
|
8815
|
-
var field = lodash.find(datesFields, {name: attr});
|
8816
|
-
if (field)
|
8817
|
-
if (field.sorting && field.sorting.type == "DateString") {
|
8818
|
-
return $.pivotUtilities.sortDateStrings(field.sorting.month_order);
|
8819
|
-
} else if (field.sorting && field.sorting.type == "largestToSmallest") {
|
8820
|
-
if (field.sorting.is_absolute)
|
8821
|
-
return $.pivotUtilities.largeToSmallSortByAbsolute;
|
8822
|
-
|
8823
|
-
return $.pivotUtilities.largeToSmallSort;
|
8824
|
-
} else {
|
8825
|
-
return $.pivotUtilities.sortAs(field.values);
|
8826
|
-
}
|
8827
|
-
};
|
8828
|
-
}
|
8805
|
+
};
|
8829
8806
|
|
8830
8807
|
return sorters;
|
8831
8808
|
};
|
@@ -8845,12 +8822,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
8845
8822
|
|
8846
8823
|
//highchartsRenderer.getGraphOptions(scope.data, override_values, res, scope.dataModel.templatesWithOutData, scope.openDrillDownList, drillDownFunction)
|
8847
8824
|
highchartsRenderer.getGraphOptions = function (widget_obj, override_values, row_data, templates, openDrillDownListFunction, drillDownFunction) {
|
8848
|
-
|
8849
|
-
let keysObject;
|
8850
|
-
if (highchartsRenderer.isSortingOnBackendEnabled()) {
|
8851
|
-
keysObject = row_data.pop();
|
8852
|
-
}
|
8853
|
-
|
8854
8825
|
let res = highchartsRenderer.updateSelectedOverrideValues(widget_obj, override_values, row_data);
|
8855
8826
|
res = highchartsRenderer.convertUniqueDateValues(widget_obj, templates, res);
|
8856
8827
|
|
@@ -8862,10 +8833,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
8862
8833
|
|
8863
8834
|
let pivot = {};
|
8864
8835
|
|
8865
|
-
if (highchartsRenderer.isSortingOnBackendEnabled()) {
|
8866
|
-
pivot.keysObject = keysObject;
|
8867
|
-
}
|
8868
|
-
|
8869
8836
|
let templateNoData = lodash.find(templates, {id: widget_obj.template_id});
|
8870
8837
|
if (templateNoData) {
|
8871
8838
|
|
@@ -8902,8 +8869,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
8902
8869
|
subopts.onlyOptions = true;
|
8903
8870
|
}
|
8904
8871
|
|
8905
|
-
subopts.keysObject = keysObject;
|
8906
|
-
|
8907
8872
|
let hc_options = highchartsRenderer.rhPivotView(res, subopts, is_table, widget_obj);
|
8908
8873
|
|
8909
8874
|
return hc_options;
|
@@ -9231,10 +9196,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
9231
9196
|
}
|
9232
9197
|
}
|
9233
9198
|
|
9234
|
-
highchartsRenderer.isSortingOnBackendEnabled = function() {
|
9235
|
-
return lodash.includes(lodash.get(document, 'ReportHippo.user.features'), 'enable_server_widget_data_sorting');
|
9236
|
-
}
|
9237
|
-
|
9238
9199
|
return highchartsRenderer;
|
9239
9200
|
};
|
9240
9201
|
|
package/src/pivottable.js
CHANGED
@@ -686,17 +686,8 @@ 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, [], []);
|
@@ -861,16 +852,12 @@ let initPivotTable = function($, window, document) {
|
|
861
852
|
};
|
862
853
|
|
863
854
|
PivotData.prototype.getColKeys = function() {
|
864
|
-
|
865
|
-
this.sortKeys();
|
866
|
-
}
|
855
|
+
this.sortKeys();
|
867
856
|
return this.colKeys;
|
868
857
|
};
|
869
858
|
|
870
859
|
PivotData.prototype.getRowKeys = function() {
|
871
|
-
|
872
|
-
this.sortKeys();
|
873
|
-
}
|
860
|
+
this.sortKeys();
|
874
861
|
return this.rowKeys;
|
875
862
|
};
|
876
863
|
|