@syncfusion/ej2-pivotview 20.2.38 → 20.2.39
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 +9 -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 +26 -14
- package/dist/es6/ej2-pivotview.es2015.js.map +1 -1
- package/dist/es6/ej2-pivotview.es5.js +26 -14
- 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 +11 -11
- package/src/base/engine.js +7 -5
- package/src/pivotchart/base/pivotchart.js +16 -6
- package/src/pivotview/actions/virtualscroll.js +2 -2
- package/src/pivotview/renderer/render.js +1 -1
- package/styles/bootstrap-dark.css +1 -1
- package/styles/bootstrap.css +1 -1
- package/styles/bootstrap4.css +1 -1
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/fabric-dark.css +1 -1
- package/styles/fabric.css +1 -1
- package/styles/fluent-dark.css +2 -2
- package/styles/fluent.css +2 -2
- package/styles/highcontrast-light.css +1 -1
- package/styles/highcontrast.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/material.css +1 -1
- package/styles/pivotfieldlist/_fluent-definition.scss +1 -1
- package/styles/pivotfieldlist/_layout.scss +1 -1
- package/styles/pivotfieldlist/_tailwind-definition.scss +1 -1
- package/styles/pivotfieldlist/bootstrap-dark.css +1 -1
- package/styles/pivotfieldlist/bootstrap.css +1 -1
- package/styles/pivotfieldlist/bootstrap4.css +1 -1
- package/styles/pivotfieldlist/bootstrap5-dark.css +1 -1
- package/styles/pivotfieldlist/bootstrap5.css +1 -1
- package/styles/pivotfieldlist/fabric-dark.css +1 -1
- package/styles/pivotfieldlist/fabric.css +1 -1
- package/styles/pivotfieldlist/fluent-dark.css +2 -2
- package/styles/pivotfieldlist/fluent.css +2 -2
- package/styles/pivotfieldlist/highcontrast-light.css +1 -1
- package/styles/pivotfieldlist/highcontrast.css +1 -1
- package/styles/pivotfieldlist/material-dark.css +1 -1
- package/styles/pivotfieldlist/material.css +1 -1
- package/styles/pivotfieldlist/tailwind-dark.css +2 -2
- package/styles/pivotfieldlist/tailwind.css +2 -2
- package/styles/tailwind-dark.css +2 -2
- package/styles/tailwind.css +2 -2
|
@@ -1354,7 +1354,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
1354
1354
|
if (this_1.fields.indexOf(newFieldName) === -1) {
|
|
1355
1355
|
this_1.fields.push(newFieldName);
|
|
1356
1356
|
}
|
|
1357
|
-
item[this_1.fieldKeys[newFieldName]] = (isInRangeAvail ? undefined : new Date(newDate.setMonth(date.getMonth(),
|
|
1357
|
+
item[this_1.fieldKeys[newFieldName]] = (isInRangeAvail ? undefined : new Date(newDate.setMonth(date.getMonth(), 1)).toString());
|
|
1358
1358
|
}
|
|
1359
1359
|
break;
|
|
1360
1360
|
case 'Days':
|
|
@@ -4885,8 +4885,9 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
4885
4885
|
for (var _g = 0, indexCollection_2 = indexCollection; _g < indexCollection_2.length; _g++) {
|
|
4886
4886
|
var index = indexCollection_2[_g];
|
|
4887
4887
|
var currentSet = data[index[0]][index[1]];
|
|
4888
|
+
var actualValue = isNullOrUndefined(selectedRowValues[index[1]].actualValue) ? 0 : selectedRowValues[index[1]].actualValue;
|
|
4888
4889
|
// let cVal: number = currentSet.value - (selectedRowValues[index[1]] as IAxisSet).value;
|
|
4889
|
-
var cVal = currentSet.actualValue
|
|
4890
|
+
var cVal = (isNullOrUndefined(currentSet.actualValue) ? 0 : currentSet.actualValue) - actualValue;
|
|
4890
4891
|
cVal = isNaN(cVal) ? 0 : (currentSet.value === 0 && selectedRowValues[index[1]].value === 0) ? 0 : cVal;
|
|
4891
4892
|
if (!this.aggregatedValueMatrix[index[0]]) {
|
|
4892
4893
|
this.aggregatedValueMatrix[index[0]] = [];
|
|
@@ -4898,8 +4899,7 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
4898
4899
|
else {
|
|
4899
4900
|
// cVal = ((selectedRowValues[index[1]] as IAxisSet).value === 0 ?
|
|
4900
4901
|
// 0 : (cVal / (selectedRowValues[index[1]] as IAxisSet).value));
|
|
4901
|
-
cVal = (
|
|
4902
|
-
0 : (cVal / selectedRowValues[index[1]].actualValue));
|
|
4902
|
+
cVal = (actualValue === 0 ? 0 : (cVal / actualValue));
|
|
4903
4903
|
this.aggregatedValueMatrix[index[0]][index[1]] = cVal;
|
|
4904
4904
|
currentSet.formattedText = currentSet.showSubTotals ? (cVal !== 0 ? this.globalize.formatNumber(cVal, { format: 'P', maximumFractionDigits: this.getPercentFormat(this.formatFields, currentSet.actualText) }) : this.emptyCellTextContent) : currentSet.formattedText;
|
|
4905
4905
|
}
|
|
@@ -5138,7 +5138,9 @@ var PivotEngine = /** @__PURE__ @class */ (function () {
|
|
|
5138
5138
|
activeColumn[cln].valueSort[item.valueSort.levelName] &&
|
|
5139
5139
|
currentSet.axis === 'value' && currentSet.actualText === name_3) {
|
|
5140
5140
|
if (activeColumn[cln].type !== 'grand sum') {
|
|
5141
|
-
|
|
5141
|
+
if (!isNullOrUndefined(currentSet.value)) {
|
|
5142
|
+
cVal += currentSet.value;
|
|
5143
|
+
}
|
|
5142
5144
|
currentSet.formattedText = subTotal ? '' : this.getFormattedValue(cVal, name_3).formattedText;
|
|
5143
5145
|
if (!this.aggregatedValueMatrix[rln]) {
|
|
5144
5146
|
this.aggregatedValueMatrix[rln] = [];
|
|
@@ -8603,7 +8605,7 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
8603
8605
|
if (cell.isGrandSum || (isGrandSum || this.colGrandPos === Number(tCell.getAttribute('aria-colindex'))) || this.rowGrandPos === Number(tCell.getAttribute('index'))) {
|
|
8604
8606
|
tCell.classList.add('e-gtot');
|
|
8605
8607
|
}
|
|
8606
|
-
else if (this.parent.dataType === 'olap' ? cell.isSum : this.validateColumnTotalcell(
|
|
8608
|
+
else if (this.parent.dataType === 'olap' ? cell.isSum : this.validateColumnTotalcell(cell.colIndex)) {
|
|
8607
8609
|
tCell.classList.add('e-colstot');
|
|
8608
8610
|
}
|
|
8609
8611
|
if (cell.cssClass) {
|
|
@@ -13773,7 +13775,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
13773
13775
|
this.parent.actionBeginMethod();
|
|
13774
13776
|
this.parent.showWaitingPopup();
|
|
13775
13777
|
this.parent.scrollPosObject.vertical = section;
|
|
13776
|
-
engine.pageSettings.rowCurrentPage = section > 1 ? section : 1;
|
|
13778
|
+
this.parent.pageSettings.rowCurrentPage = engine.pageSettings.rowCurrentPage = section > 1 ? section : 1;
|
|
13777
13779
|
var rowStartPos_1 = 0;
|
|
13778
13780
|
this.parent.trigger(enginePopulating, args, function (observedArgs) {
|
|
13779
13781
|
if (_this.parent.dataType === 'pivot') {
|
|
@@ -13811,7 +13813,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
13811
13813
|
this.parent.showWaitingPopup();
|
|
13812
13814
|
var pivot_1 = this.parent;
|
|
13813
13815
|
pivot_1.scrollPosObject.horizontal = section;
|
|
13814
|
-
engine.pageSettings.columnCurrentPage = section > 1 ? section : 1;
|
|
13816
|
+
this.parent.pageSettings.columnCurrentPage = engine.pageSettings.columnCurrentPage = section > 1 ? section : 1;
|
|
13815
13817
|
var colStartPos_1 = 0;
|
|
13816
13818
|
this.parent.trigger(enginePopulating, args, function (observedArgs) {
|
|
13817
13819
|
if (pivot_1.dataType === 'pivot') {
|
|
@@ -15982,14 +15984,14 @@ var PivotChart = /** @__PURE__ @class */ (function () {
|
|
|
15982
15984
|
var aggregateType = this.parent.dataType === 'olap' ? '' : this.parent.localeObj.getConstant(measureField.aggregateType);
|
|
15983
15985
|
var measureAggregatedName = (this.parent.dataType === 'olap' ? '' : aggregateType + ' ' +
|
|
15984
15986
|
this.parent.localeObj.getConstant('of') + ' ') + measureField.caption;
|
|
15985
|
-
var formattedText = this.
|
|
15986
|
-
args.text.split('<b>')[1].split('</b>')[0] : this.engineModule.pivotValues[rowIndex][colIndex].formattedText;
|
|
15987
|
+
var formattedText = this.engineModule.pivotValues[rowIndex][colIndex].formattedText;
|
|
15987
15988
|
var formatField = this.engineModule.formatFields[measureField.id];
|
|
15988
|
-
var
|
|
15989
|
+
var valueFormat = this.engineModule.getFormattedValue(args.point.y, measureField.id, formattedText);
|
|
15990
|
+
var formattedValue = (formatField && formatField.format && formatField.format.toLowerCase().match(/n|p|c/) !== null &&
|
|
15989
15991
|
this.chartSettings.useGroupingSeparator) ? this.parent.dataType === 'olap' ?
|
|
15990
|
-
|
|
15991
|
-
|
|
15992
|
-
formattedText
|
|
15992
|
+
valueFormat.toString() :
|
|
15993
|
+
valueFormat.formattedText :
|
|
15994
|
+
formattedText;
|
|
15993
15995
|
var columnText = (args.series.name ? args.series.name.split(' | ')[0] : args.data.seriesName.split(' | ')[0]);
|
|
15994
15996
|
var rowText = args.point.x;
|
|
15995
15997
|
if (this.parent.tooltipTemplate && this.parent.getTooltipTemplate() !== undefined || this.chartSettings.tooltip.template) {
|
|
@@ -16318,6 +16320,16 @@ var PivotChart = /** @__PURE__ @class */ (function () {
|
|
|
16318
16320
|
args.text = '';
|
|
16319
16321
|
}
|
|
16320
16322
|
}
|
|
16323
|
+
if (args.axis.name !== 'primaryXAxis') {
|
|
16324
|
+
var formatField = this.engineModule.formatFields[args.axis.name];
|
|
16325
|
+
var valueFormat = this.engineModule.getFormattedValue(args.value, args.axis.name, args.text);
|
|
16326
|
+
var formattedValue = ((formatField && formatField.format && formatField.format.toLowerCase().match(/n|p|c/) !== null &&
|
|
16327
|
+
this.chartSettings.useGroupingSeparator) ? this.parent.dataType === 'olap' ?
|
|
16328
|
+
valueFormat.toString() :
|
|
16329
|
+
valueFormat.formattedText :
|
|
16330
|
+
args.value.toString());
|
|
16331
|
+
args.text = formattedValue;
|
|
16332
|
+
}
|
|
16321
16333
|
this.parent.trigger(chartAxisLabelRender, args);
|
|
16322
16334
|
};
|
|
16323
16335
|
PivotChart.prototype.multiLevelLabelClick = function (args) {
|