@tetacom/svg-charts 1.3.2 → 1.4.0

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.
@@ -785,9 +785,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
785
785
  }], ctorParameters: function () { return [{ type: ChartService }, { type: ZoomService }]; } });
786
786
 
787
787
  class BrushService {
788
- // private _outBrushDomain = new ReplaySubject<[number, number]>(1);
789
788
  constructor() {
790
- // outBrushDomain: Observable<[number, number]>;
791
789
  this._brushDomain = new ReplaySubject(1);
792
790
  this.brushDomain = this._brushDomain.asObservable();
793
791
  }
@@ -2046,12 +2044,7 @@ class ZoomableDirective {
2046
2044
  transform =
2047
2045
  this.zoomService.getD3Transform(zoomed.domain, this.axis.originDomain, scale, this.axis.orientation, this.axis.options.inverted);
2048
2046
  }
2049
- if (zoomed.style?.transition) {
2050
- this._element.transition().call(this.zoom.transform, transform);
2051
- }
2052
- else {
2053
- this._element.call(this.zoom.transform, transform);
2054
- }
2047
+ this._element.call(this.zoom.transform, transform);
2055
2048
  this.currentTransform = transform;
2056
2049
  }
2057
2050
  });
@@ -2214,6 +2207,13 @@ class BrushableDirective {
2214
2207
  this._alive = false;
2215
2208
  }
2216
2209
  ngAfterViewInit() {
2210
+ if (this.config?.brush?.enable) {
2211
+ const brushMessage = new BrushMessage({
2212
+ chartId: this.config.id,
2213
+ selection: [this.config?.brush?.from, this.config?.brush?.to],
2214
+ });
2215
+ this.brushService.setBrush(brushMessage);
2216
+ }
2217
2217
  }
2218
2218
  ngOnChanges(changes) {
2219
2219
  if (changes.hasOwnProperty('config')) {
@@ -2304,7 +2304,7 @@ class BrushableDirective {
2304
2304
  }
2305
2305
  this._container.call(this.brush.move, this.selection
2306
2306
  ? this.selection.map(brushScale)
2307
- : domain.map(brushScale), {});
2307
+ : domain.map(brushScale));
2308
2308
  }, 0);
2309
2309
  });
2310
2310
  }