@syncfusion/ej2-pivotview 20.1.57 → 20.1.58
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/CHANGELOG.md +8 -0
- package/dist/ej2-pivotview.umd.min.js +2 -2
- package/dist/ej2-pivotview.umd.min.js.map +1 -1
- package/dist/es6/ej2-pivotview.es2015.js +18 -4
- package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
- package/dist/es6/ej2-pivotview.es5.js +18 -4
- package/dist/es6/ej2-pivotview.es5.js.map +1 -1
- package/dist/global/ej2-pivotview.min.js +2 -2
- package/dist/global/ej2-pivotview.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/base/engine.js +1 -0
- package/src/pivotview/actions/excel-export.js +2 -1
- package/src/pivotview/renderer/render.js +15 -3
|
@@ -5115,6 +5115,7 @@ class PivotEngine {
|
|
|
5115
5115
|
isNaN(value) && !isNullOrUndefined(value) &&
|
|
5116
5116
|
(['PopulationStDev', 'SampleStDev', 'PopulationVar', 'SampleVar']).indexOf(aggregate) !== -1) {
|
|
5117
5117
|
formattedText = '#DIV/0!';
|
|
5118
|
+
value = 0;
|
|
5118
5119
|
}
|
|
5119
5120
|
//dln = data[tnum].length;
|
|
5120
5121
|
formattedText = (cellDetails.skipFormatting ? isNullOrUndefined(value) ?
|
|
@@ -9052,6 +9053,12 @@ class Render {
|
|
|
9052
9053
|
}
|
|
9053
9054
|
}
|
|
9054
9055
|
else {
|
|
9056
|
+
if ((['PercentageOfDifferenceFrom', 'PercentageOfRowTotal', 'PercentageOfColumnTotal', 'PercentageOfGrandTotal', 'PercentageOfParentRowTotal', 'PercentageOfParentColumnTotal', 'PercentageOfParentTotal']).indexOf(field.type) > -1) {
|
|
9057
|
+
format = 'P2';
|
|
9058
|
+
}
|
|
9059
|
+
else if (['PopulationStDev', 'SampleStDev', 'PopulationVar', 'SampleVar', 'Index'].indexOf(field.type) > -1) {
|
|
9060
|
+
format = undefined;
|
|
9061
|
+
}
|
|
9055
9062
|
if (this.parent.dataSourceSettings.formatSettings.length > 0) {
|
|
9056
9063
|
for (let fCnt = 0; fCnt < this.parent.dataSourceSettings.formatSettings.length; fCnt++) {
|
|
9057
9064
|
let formatSettings = this.parent.dataSourceSettings.formatSettings[fCnt];
|
|
@@ -9146,12 +9153,18 @@ class Render {
|
|
|
9146
9153
|
else {
|
|
9147
9154
|
this.colPos++;
|
|
9148
9155
|
/* eslint-disable-next-line */
|
|
9149
|
-
|
|
9156
|
+
let pivotValue = args.data[this.colPos];
|
|
9157
|
+
if (isNullOrUndefined(pivotValue.value) || isNullOrUndefined(pivotValue.formattedText) || pivotValue.formattedText === "") {
|
|
9150
9158
|
args.value = this.parent.exportType === 'Excel' ? null : '';
|
|
9151
9159
|
}
|
|
9152
9160
|
else {
|
|
9153
|
-
|
|
9154
|
-
|
|
9161
|
+
let aggMatrix = this.parent.engineModule.aggregatedValueMatrix;
|
|
9162
|
+
if (aggMatrix[pivotValue.rowIndex] && aggMatrix[pivotValue.rowIndex][pivotValue.colIndex]) {
|
|
9163
|
+
args.value = aggMatrix[pivotValue.rowIndex][pivotValue.colIndex];
|
|
9164
|
+
}
|
|
9165
|
+
else {
|
|
9166
|
+
args.value = !isNullOrUndefined(pivotValue.value) ? (pivotValue.formattedText === '#DIV/0!' ? pivotValue.formattedText : pivotValue.value) : pivotValue.formattedText;
|
|
9167
|
+
}
|
|
9155
9168
|
}
|
|
9156
9169
|
}
|
|
9157
9170
|
args = this.exportContentEvent(args);
|
|
@@ -26887,7 +26900,8 @@ class ExcelExport$1 {
|
|
|
26887
26900
|
let styles = (pivotCell.axis == 'row') ? { hAlign: 'Left', bold: true, wrapText: true } : { numberFormat: formatList[field], bold: false, wrapText: true };
|
|
26888
26901
|
let headerStyle = { bold: true, vAlign: 'Center', wrapText: true, indent: cCnt === 0 ? pivotCell.level * 10 : 0 };
|
|
26889
26902
|
if (!(pivotCell.level === -1 && !pivotCell.rowSpan)) {
|
|
26890
|
-
let
|
|
26903
|
+
let aggMatrix = this.parent.engineModule.aggregatedValueMatrix;
|
|
26904
|
+
let cellValue = pivotCell.axis === 'value' ? ((aggMatrix[rCnt] && aggMatrix[rCnt][cCnt]) ? aggMatrix[rCnt][cCnt] : (pivotCell.formattedText === '#DIV/0!' ? pivotCell.formattedText : pivotCell.value)) : pivotCell.formattedText;
|
|
26891
26905
|
let isgetValuesHeader = ((this.parent.dataSourceSettings.rows.length === 0 && this.parent.dataSourceSettings.valueAxis === 'row')
|
|
26892
26906
|
|| (this.parent.dataSourceSettings.columns.length === 0 && this.parent.dataSourceSettings.valueAxis === 'column'));
|
|
26893
26907
|
if (pivotCell.type === 'grand sum' && !(this.parent.dataSourceSettings.values.length === 1 && this.parent.dataSourceSettings.valueAxis === 'row' && pivotCell.axis === 'column')) {
|