From 864fa7945451191f968b04786a51799036d75e86 Mon Sep 17 00:00:00 2001 From: Hadi Khazaee Asl Date: Mon, 31 Aug 2026 00:52:12 +0330 Subject: [PATCH] apply fix on chart component fullscreen issues and it's now works well ... --- .../src/lib/x-chart/x-chart.component.ts | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/projects/x-framework-components/src/lib/x-chart/x-chart.component.ts b/projects/x-framework-components/src/lib/x-chart/x-chart.component.ts index 63016f3..b7665d9 100644 --- a/projects/x-framework-components/src/lib/x-chart/x-chart.component.ts +++ b/projects/x-framework-components/src/lib/x-chart/x-chart.component.ts @@ -113,8 +113,7 @@ export class XChartComponent extends XChartContainerComponent { //#endregion // - private ORIGINAL_HEIGHT: string = '300px'; - private RESIZE_SUBJECT = new Subject(); + private ORIGINAL_HEIGHT: string = undefined; // private CHART_OPTIONS: XChartOptions = null; @@ -371,10 +370,6 @@ export class XChartComponent extends XChartContainerComponent { onDestroy() { super.onDestroy(); - // - this.RESIZE_SUBJECT.next(); - this.RESIZE_SUBJECT.complete(); - // this.destroyComponent(); this.unregisterActionProvider(); @@ -1393,7 +1388,9 @@ export class XChartComponent extends XChartContainerComponent { // // Storing Original Height ... - this.ORIGINAL_HEIGHT = this.CHART_OPTIONS.chart?.height?.toString(); + if (isNullOrEmptyString(this.ORIGINAL_HEIGHT)) { + this.ORIGINAL_HEIGHT = this.CHART_OPTIONS.chart?.height?.toString(); + } // await this.prepareActionBar(); @@ -2123,7 +2120,13 @@ export class XChartComponent extends XChartContainerComponent { }; // - this.chartInstance.updateOptions(this.CHART_OPTIONS, false, true, false, false); + this.chartInstance.updateOptions( + this.CHART_OPTIONS, + false, + true, + false, + false, + ); this.managerService.dispatchResizeEvent(); } @@ -2217,7 +2220,9 @@ export class XChartComponent extends XChartContainerComponent { // Handle Full Screen Toggled ... if (model.action == XCardAction.FullScreenToggled) { // - const isFullscreen = isNullOrUndefined(model.payload) ? false : true; + const isFullscreen = isNullOrUndefined(model.payload) + ? false + : (model.payload as boolean) || false; await this.handleFullscreenMode(isFullscreen); } });