axidio-styleguide-library1-v2 0.0.910 → 0.0.911

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.
@@ -9070,29 +9070,11 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9070
9070
  })
9071
9071
  .attr('width', function (d) {
9072
9072
  if (self.chartConfiguration.isDrilldownChart) {
9073
- // Reduce bar width for single-bar (non-grouped) charts only
9074
- let isSingleBar = false;
9075
- let singleBarWidth = x.bandwidth();
9076
9073
  data.map((indiv) => {
9077
9074
  if (indiv.name == d.name) {
9078
9075
  let keys = Object.keys(indiv).filter((temp, i) => i != 0);
9079
9076
  tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
9080
- // If only one key (besides name), treat as single bar
9081
- if (keys.length === 1) {
9082
- isSingleBar = true;
9083
- // If isZoomedOut, reduce width by 30px
9084
- if (self.isZoomedOut) {
9085
- singleBarWidth = Math.max(10, x.bandwidth() - 30);
9086
- }
9087
- else {
9088
- singleBarWidth = x.bandwidth();
9089
- }
9090
- tempScale.range([
9091
- 0 + (x.bandwidth() - singleBarWidth) / 2,
9092
- x.bandwidth() - (x.bandwidth() - singleBarWidth) / 2,
9093
- ]);
9094
- }
9095
- else if (x.bandwidth() > 100) {
9077
+ if (x.bandwidth() > 100) {
9096
9078
  if (self.chartData.data.length == 1) {
9097
9079
  if (Object.keys(self.chartData.data[0]).length == 2) {
9098
9080
  tempScale.range([
@@ -9116,16 +9098,12 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9116
9098
  }
9117
9099
  }
9118
9100
  });
9119
- if (isSingleBar) {
9120
- return tempScale.bandwidth();
9121
- }
9122
9101
  return self.isZoomedOut
9123
9102
  ? tempScale.bandwidth()
9124
9103
  : self.chartData.data.length && self.chartData.data.length > 8
9125
9104
  ? tempScale.bandwidth() * 0.5
9126
9105
  : tempScale.bandwidth();
9127
9106
  }
9128
- // For non-drilldown charts
9129
9107
  return self.isZoomedOut
9130
9108
  ? tempScale.bandwidth()
9131
9109
  : self.chartData.data.length && self.chartData.data.length > 8