axidio-styleguide-library1-v2 0.0.790 → 0.0.791

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.
@@ -8947,8 +8947,8 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8947
8947
  }
8948
8948
  })
8949
8949
  .attr('x', function (d) {
8950
- // Keep original position calculation - no centering adjustments
8951
- return xSubgroup(d.key);
8950
+ // Do not shift the bar position, always use the center of the subgroup slot
8951
+ return xSubgroup(d.key) + (xSubgroup.bandwidth() - (self.isZoomedOut ? xSubgroup.bandwidth() : xSubgroup.bandwidth() * 0.7)) / 2;
8952
8952
  })
8953
8953
  .attr('y', function (d) {
8954
8954
  if (d.value == -1) {
@@ -8966,33 +8966,9 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8966
8966
  return y(0);
8967
8967
  })
8968
8968
  .attr('width', function (d) {
8969
- let baseWidth = xSubgroup.bandwidth();
8970
- if (self.chartConfiguration.isDrilldownChart) {
8971
- // Calculate reduced width based on your existing logic
8972
- data.map((indiv) => {
8973
- if (indiv.name == d.name) {
8974
- let keys = Object.keys(indiv).filter((temp, i) => i != 0);
8975
- tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
8976
- if (x.bandwidth() > 100) {
8977
- if (self.chartData.data.length == 1) {
8978
- if (Object.keys(self.chartData.data[0]).length == 2) {
8979
- // Reduce width by 200px total
8980
- baseWidth = tempScale.bandwidth() * (x.bandwidth() - 200) / x.bandwidth();
8981
- }
8982
- else {
8983
- // Reduce width by 300px total
8984
- baseWidth = tempScale.bandwidth() * (x.bandwidth() - 300) / x.bandwidth();
8985
- }
8986
- }
8987
- else {
8988
- // Reduce width by 125px total
8989
- baseWidth = tempScale.bandwidth() * (x.bandwidth() - 125) / x.bandwidth();
8990
- }
8991
- }
8992
- }
8993
- });
8994
- }
8995
- return baseWidth;
8969
+ // Only reduce the width, do not move the bar position
8970
+ const baseWidth = xSubgroup.bandwidth();
8971
+ return self.isZoomedOut ? baseWidth : baseWidth * 0.7;
8996
8972
  })
8997
8973
  .attr('height', function (d) {
8998
8974
  if (d.value == -1) {