axidio-styleguide-library1-v2 0.1.78 → 0.1.80

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.
@@ -8228,21 +8228,27 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8228
8228
  return a;
8229
8229
  };
8230
8230
  }
8231
- ngOnInit() {
8232
- this.initializegroupChart();
8233
- }
8234
8231
  ngOnChanges(changes) {
8235
- if (changes['chartData'] && !changes['chartData'].firstChange) {
8236
- d3.select('#' + this.uniqueId).remove();
8237
- this.initializegroupChart();
8232
+ if (changes['chartData'] && !changes['chartData'].isFirstChange()) {
8233
+ this.updateChartData();
8238
8234
  }
8239
8235
  }
8240
- onResized(event) {
8236
+ updateChartData() {
8237
+ console.log('Updating chart with new data:', this.chartData);
8238
+ const containerElement = d3.select(this.containerElt.nativeElement);
8239
+ containerElement.selectAll("*").remove();
8240
+ d3.select('#' + this.uniqueId).remove();
8241
8241
  setTimeout(() => {
8242
- d3.select('#' + this.uniqueId).remove();
8243
8242
  this.initializegroupChart();
8244
8243
  }, 10);
8245
8244
  }
8245
+ onResized(event) {
8246
+ let self = this;
8247
+ setTimeout(function () {
8248
+ d3.select('#' + self.uniqueId).remove();
8249
+ self.initializegroupChart();
8250
+ }.bind(self), 10);
8251
+ }
8246
8252
  isZoomOutSelected(isZoomOut, event) {
8247
8253
  this.isZoomedOut = isZoomOut;
8248
8254
  this.onResized(event);
@@ -8250,6 +8256,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8250
8256
  handleZoominZoomoutClick({ isZoomOut, event }) {
8251
8257
  this.isZoomOutSelected(isZoomOut, event);
8252
8258
  }
8259
+ ngOnInit() { }
8253
8260
  isLegendVisible() {
8254
8261
  if (this.chartData &&
8255
8262
  this.chartData.metaData.colors &&
@@ -8263,6 +8270,9 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8263
8270
  }
8264
8271
  initializegroupChart() {
8265
8272
  var self = this;
8273
+ d3.select('#' + this.uniqueId).remove();
8274
+ const containerElement = d3.select(this.containerElt.nativeElement);
8275
+ containerElement.selectAll("*").remove();
8266
8276
  let data = [];
8267
8277
  let metaData = null;
8268
8278
  let keyList = null;