apply fix on chart component fullscreen issues and it's now works well ...

This commit is contained in:
2026-08-31 00:52:12 +03:30
parent 174300d9f1
commit 864fa79454
@@ -113,8 +113,7 @@ export class XChartComponent extends XChartContainerComponent {
//#endregion
//
private ORIGINAL_HEIGHT: string = '300px';
private RESIZE_SUBJECT = new Subject<Event>();
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);
}
});