Skip to content

Commit

Permalink
Pull request #5353: Feature/DXCF-5567 web multiple scales hide scale …
Browse files Browse the repository at this point in the history
…mode buttons if more than one scale

Merge in DXCHARTS/dxchart5 from feature/DXCF-5567-web-multiple-scales-hide-scale-mode-buttons-if-more-than-one-scale to master

* commit '231daa34b7a84de8d542eb831a41499720c22464':
  [DXCF-5567] [Web] Multiple scales - hide scale mode buttons if more than one scale // pr fix
  [DXCF-5567] [Web] Multiple scales - hide scale mode buttons if more than one scale // pr fix
  [DXCF-5567] [Web] Multiple scales - hide scale mode buttons if more than one scale // pr fix
  [DXCF-5567] [Web] Multiple scales - hide scale mode buttons if more than one scale // init
  [DXCF-5567] [Web] Multiple scales - hide scale mode buttons if more than one scale // init
  [DXCF-5567] [Web] Multiple scales - hide scale mode buttons if more than one scale // init

GitOrigin-RevId: 4785042859120249bbdd0e82964b36bd909b4a42
  • Loading branch information
Keelaro1 authored and dxcity committed Dec 11, 2024
1 parent e0cbfaa commit 860c399
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/chart/components/pane/pane.component.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
/*
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
Expand Down Expand Up @@ -49,6 +54,7 @@ export class PaneComponent extends ChartBaseElement {
public ht: HitBoundsTest;

public yExtentComponents: YExtentComponent[] = [];
public yExtentComponentsChangedSubject: Subject<void> = new Subject();

get scale() {
return this.mainExtent.scale;
Expand Down Expand Up @@ -256,6 +262,7 @@ export class PaneComponent extends ChartBaseElement {
yExtentComponent.activate();
this.yExtentComponents.push(yExtentComponent);
this.canvasBoundsContainer.updateYAxisWidths();
this.yExtentComponentsChangedSubject.next();
return yExtentComponent;
}

Expand All @@ -265,6 +272,7 @@ export class PaneComponent extends ChartBaseElement {
// re-index extents
this.yExtentComponents.forEach((c, idx) => (c.idx = idx));
this.canvasBoundsContainer.updateYAxisWidths();
this.yExtentComponentsChangedSubject.next();
}

/**
Expand Down Expand Up @@ -293,6 +301,7 @@ export class PaneComponent extends ChartBaseElement {
) {
dataSeries.forEach(series => series.moveToExtent(extentComponent));
initialExtent.dataSeries.size === 0 && initialPane.removeExtentComponent(initialExtent);
this.yExtentComponentsChangedSubject.next();
}

/**
Expand Down

0 comments on commit 860c399

Please sign in to comment.