@datarailsshared/dr_renderer 1.2.394 → 1.2.396
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 +27 -6
- package/src/pivottable.js +0 -7
package/package.json
CHANGED
@@ -728,7 +728,8 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
728
728
|
destroyWhenHiding: true,
|
729
729
|
formatter: function () {
|
730
730
|
const rowKey = pivotData.rowAttrs.length ? lodash.get(this.point, 'series.name') || "" : "";
|
731
|
-
const colKey = lodash.get(this.point, 'name') || this.x.name[0] || "";
|
731
|
+
const colKey = lodash.get(this.point, 'initialName') || lodash.get(this.point, 'name') || this.x.name[0] || "";
|
732
|
+
|
732
733
|
const insight = pivotData.getInsight(colKey, rowKey) || {};
|
733
734
|
setTimeout(() => {
|
734
735
|
var aggr = highchartsRenderer.defaultFormatterToTooltip(pivotData, opts);
|
@@ -1520,10 +1521,14 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
1520
1521
|
let totalKey = columnKey;
|
1521
1522
|
if (lodash.isArray(columnKey)) {
|
1522
1523
|
key = columnKey[0];
|
1523
|
-
totalKey = totalKey.join(
|
1524
|
+
totalKey = totalKey.join(highchartsRenderer.delimer);
|
1524
1525
|
}
|
1526
|
+
|
1527
|
+
const initialKey = lodash.unescape(key);
|
1528
|
+
const formattedKey = highchartsRenderer.getFormattedColKey(initialKey, pivotData);
|
1525
1529
|
const value = pivotData.colTotals[totalKey] ? pivotData.colTotals[totalKey].value() : 0;
|
1526
|
-
|
1530
|
+
|
1531
|
+
totalSeries.data.push({name: lodash.unescape(formattedKey), initialName: initialKey, y: value});
|
1527
1532
|
});
|
1528
1533
|
|
1529
1534
|
chart_series.push(totalSeries);
|
@@ -4797,6 +4802,13 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
4797
4802
|
var temp_cols = opts.cols;
|
4798
4803
|
opts.cols = opts.rows;
|
4799
4804
|
opts.rows = temp_cols;
|
4805
|
+
|
4806
|
+
if (highchartsRenderer.sortHasBeenDoneOnBE(lodash.get(widget.pivot, 'keysObject'))) {
|
4807
|
+
opts.keysObject = lodash.cloneDeep(widget.pivot.keysObject);
|
4808
|
+
const tempColKeys = opts.keysObject.col_keys;
|
4809
|
+
opts.keysObject.col_keys = opts.keysObject.row_keys;
|
4810
|
+
opts.keysObject.row_keys = tempColKeys;
|
4811
|
+
}
|
4800
4812
|
}
|
4801
4813
|
|
4802
4814
|
optsFiltered = $.extend(defaults, opts);
|
@@ -4960,6 +4972,13 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
4960
4972
|
var temp_cols = opts.cols;
|
4961
4973
|
opts.cols = opts.rows;
|
4962
4974
|
opts.rows = temp_cols;
|
4975
|
+
|
4976
|
+
if (highchartsRenderer.sortHasBeenDoneOnBE(lodash.get(widget.pivot, 'keysObject'))) {
|
4977
|
+
opts.keysObject = lodash.cloneDeep(widget.pivot.keysObject);
|
4978
|
+
const tempColKeys = opts.keysObject.col_keys;
|
4979
|
+
opts.keysObject.col_keys = opts.keysObject.row_keys;
|
4980
|
+
opts.keysObject.row_keys = tempColKeys;
|
4981
|
+
}
|
4963
4982
|
}
|
4964
4983
|
|
4965
4984
|
optsFiltered = $.extend(defaults, opts);
|
@@ -8913,6 +8932,8 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
8913
8932
|
value,
|
8914
8933
|
highchartsRenderer.getDateFieldFormat(widget, widget.cols[0])
|
8915
8934
|
);
|
8935
|
+
} else if (!isNaN(value)) {
|
8936
|
+
value = +value;
|
8916
8937
|
}
|
8917
8938
|
break;
|
8918
8939
|
case 'Integer':
|
@@ -9751,11 +9772,11 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
9751
9772
|
const isDate = formatInfo.type === 'Date';
|
9752
9773
|
const isDateFormatting = isDate && highchartsRenderer.isFormattingDatesAsOtherAxisTypes();
|
9753
9774
|
const isNumberFormatting = !isDate && formatInfo.format && highchartsRenderer.isFormattingNumberAxis(pivotData);
|
9754
|
-
|
9755
|
-
if (
|
9775
|
+
|
9776
|
+
if (isNumberFormatting || isDateFormatting) {
|
9756
9777
|
values[key] = highchartsRenderer.returnRawDataValue(
|
9757
9778
|
formatInfo.type,
|
9758
|
-
valueToFloat,
|
9779
|
+
!isNaN(valueToFloat) ? valueToFloat : value,
|
9759
9780
|
formatInfo.format,
|
9760
9781
|
formatInfo.name,
|
9761
9782
|
formatInfo.val_not_convert,
|
package/src/pivottable.js
CHANGED
@@ -695,13 +695,6 @@ let initPivotTable = function($, window, document) {
|
|
695
695
|
this.rowKeys = opts.keysObject.row_keys;
|
696
696
|
this.colKeys = opts.keysObject.col_keys;
|
697
697
|
this.rowKeysByCols = opts.keysObject.row_keys_by_cols;
|
698
|
-
|
699
|
-
const isTransposed = _.get(opts, 'rendererOptions.chartOptions.table_options.transpose_table', false);
|
700
|
-
if (isTransposed) {
|
701
|
-
const colKeys = this.colKeys;
|
702
|
-
this.colKeys = this.rowKeys;
|
703
|
-
this.rowKeys = colKeys;
|
704
|
-
}
|
705
698
|
} else {
|
706
699
|
this.rowKeys = [];
|
707
700
|
this.colKeys = [];
|