@syncfusion/ej2-pivotview 19.4.53 → 19.4.54

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.
@@ -10267,7 +10267,7 @@ var DataSourceUpdate = /** @__PURE__ @class */ (function () {
10267
10267
  break;
10268
10268
  case 'values':
10269
10269
  droppedPosition !== -1 ? _this.parent.dataSourceSettings.values.splice(droppedPosition, 0, dataSourceItem) : _this.parent.dataSourceSettings.values.push(dataSourceItem);
10270
- if (_this.parent.dataType === 'olap' && !_this.parent.engineModule.isMeasureAvail) {
10270
+ if (_this.parent.dataType === 'olap' && !_this.parent.engineModule.isMeasureAvail && !(_this.parent.dataSourceSettings.values.length > 1)) {
10271
10271
  var measureField = {
10272
10272
  name: '[Measures]', caption: 'Measures', showRemoveIcon: true, allowDragAndDrop: true
10273
10273
  };
@@ -15527,13 +15527,6 @@ var PivotChart = /** @__PURE__ @class */ (function () {
15527
15527
  }
15528
15528
  this.parent.element.querySelector('.' + PIVOTCHART).style.width = width + 'px';
15529
15529
  }
15530
- this.parent.chart.height = ['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.parent.chartSettings.chartSeries.type) < 0 &&
15531
- this.parent.chartSettings.enableScrollOnMultiAxis && this.parent.chartSettings.enableMultipleAxis &&
15532
- this.parent.dataSourceSettings.values.length > 0 ? Number(this.parent.chart.height) > (this.parent.dataSourceSettings.values.length * 235) + 100 ? /* eslint-disable-line */
15533
- isNaN(Number(this.getChartHeight())) ? this.getChartHeight().toString() : (Number(this.getChartHeight()) - 5).toString() :
15534
- (!isNaN(Number(this.getChartHeight())) || this.parent.dataSourceSettings.values.length > 1) ?
15535
- ((this.parent.dataSourceSettings.values.length * 235) + 100).toString() :
15536
- this.getChartHeight().toString() : this.getChartHeight().toString();
15537
15530
  this.updateView();
15538
15531
  this.parent.notify(contentReady, {});
15539
15532
  this.parent.trigger(chartLoaded, args);
@@ -25347,6 +25340,13 @@ var PivotView = /** @__PURE__ @class */ (function (_super) {
25347
25340
  if (this.chart && ((this.showToolbar && this.currentView === 'Chart') || !this.showToolbar)) {
25348
25341
  this.chart.width = (this.showToolbar && this.grid) ? this.getGridWidthAsNumber().toString() :
25349
25342
  (this.displayOption.view === 'Both' && this.grid) ? this.getGridWidthAsNumber().toString() : this.getWidthAsNumber().toString();
25343
+ this.chart.height = ['Pie', 'Funnel', 'Pyramid', 'Doughnut', 'Radar', 'Polar'].indexOf(this.chartSettings.chartSeries.type) < 0 &&
25344
+ this.chartSettings.enableScrollOnMultiAxis && this.chartSettings.enableMultipleAxis &&
25345
+ this.dataSourceSettings.values.length > 0 ? Number(this.chart.height) > (this.dataSourceSettings.values.length * 235) + 100 ? /* eslint-disable-line */
25346
+ isNaN(Number(this.pivotChartModule.getChartHeight())) ? this.pivotChartModule.getChartHeight().toString() : (Number(this.pivotChartModule.getChartHeight()) - 5).toString() :
25347
+ (!isNaN(Number(this.pivotChartModule.getChartHeight())) || this.dataSourceSettings.values.length > 1) ?
25348
+ ((this.dataSourceSettings.values.length * 235) + 100).toString() :
25349
+ this.pivotChartModule.getChartHeight().toString() : this.pivotChartModule.getChartHeight().toString();
25350
25350
  if (this.displayOption.view === 'Chart' && this.showGroupingBar && this.groupingBarModule &&
25351
25351
  this.element.querySelector('.' + CHART_GROUPING_BAR_CLASS)) {
25352
25352
  this.groupingBarModule.refreshUI();
@@ -28876,7 +28876,7 @@ var TreeViewRenderer = /** @__PURE__ @class */ (function () {
28876
28876
  this.parent.dataSourceSettings.values.splice(dropPosition, 0, newField) :
28877
28877
  this.parent.dataSourceSettings.values.push(newField);
28878
28878
  if (this.parent.dataType === 'olap' && this.parent.olapEngineModule &&
28879
- !(this.parent.olapEngineModule).isMeasureAvail) {
28879
+ !(this.parent.olapEngineModule).isMeasureAvail && !(this.parent.dataSourceSettings.values.length > 1)) {
28880
28880
  var measureField = {
28881
28881
  name: '[Measures]', caption: 'Measures', baseField: undefined, baseItem: undefined
28882
28882
  };