axidio-styleguide-library1-v2 0.4.82 → 0.4.83

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.
@@ -8316,19 +8316,35 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8316
8316
  }
8317
8317
  return xSubgroup(d.key);
8318
8318
  }
8319
+ // private calculateDrilldownBarX(d, data, x, self, tempScale) {
8320
+ // data.forEach((indiv: any) => {
8321
+ // if (indiv.name === d.name) {
8322
+ // const keys = Object.keys(indiv).filter((temp, i) => i !== 0);
8323
+ // tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
8324
+ // if (x.bandwidth() > 100) {
8325
+ // const reducedBarWidth = self.isZoomedOut ? 60 : 30;
8326
+ // const offset = (x.bandwidth() - reducedBarWidth) / 2;
8327
+ // tempScale.range([offset, x.bandwidth() - offset]);
8328
+ // }
8329
+ // }
8330
+ // });
8331
+ // return tempScale(d.key) || 0;
8332
+ // }
8319
8333
  calculateDrilldownBarX(d, data, x, self, tempScale) {
8334
+ let calculatedScale = tempScale;
8320
8335
  data.forEach((indiv) => {
8321
8336
  if (indiv.name === d.name) {
8322
8337
  const keys = Object.keys(indiv).filter((temp, i) => i !== 0);
8323
- tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
8338
+ calculatedScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
8324
8339
  if (x.bandwidth() > 100) {
8325
- const reducedBarWidth = self.isZoomedOut ? 60 : 30;
8340
+ const reducedBarWidth = self.isZoomedOut ? 60 : 100;
8326
8341
  const offset = (x.bandwidth() - reducedBarWidth) / 2;
8327
- tempScale.range([offset, x.bandwidth() - offset]);
8342
+ calculatedScale.range([offset, x.bandwidth() - offset]);
8328
8343
  }
8329
8344
  }
8330
8345
  });
8331
- return tempScale(d.key);
8346
+ // Return position relative to the group (since bars are inside a translated group element)
8347
+ return calculatedScale(d.key) || 0;
8332
8348
  }
8333
8349
  calculateBarY(d, y, height, self) {
8334
8350
  if (d.value === -1) {