axidio-styleguide-library1-v2 0.0.921 → 0.0.922

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.
@@ -9030,30 +9030,17 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9030
9030
  let keys = Object.keys(indiv).filter((temp, i) => i != 0);
9031
9031
  tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
9032
9032
  if (x.bandwidth() > 100) {
9033
- // Grouped chart: decrease bar width to 70% of slot
9034
- if (subgroups.length > 1) {
9035
- const groupedBarWidth = x.bandwidth() * 0.5;
9036
- const offset = (x.bandwidth() - groupedBarWidth) / 2;
9037
- tempScale.range([offset, x.bandwidth() - offset]);
9033
+ // Increase bar width a bit in zoom-in view
9034
+ let reducedBarWidth = 60;
9035
+ if (!self.isZoomedOut) {
9036
+ reducedBarWidth = 80;
9038
9037
  }
9039
- else {
9040
- // Normal/zoomed drilldown logic
9041
- let reducedBarWidth = 60;
9042
- if (!self.isZoomedOut) {
9043
- reducedBarWidth = 80;
9044
- }
9045
- if (self.chartData.data.length == 1) {
9046
- if (Object.keys(self.chartData.data[0]).length == 2) {
9047
- tempScale.range([
9048
- 0 + (x.bandwidth() - reducedBarWidth) / 2,
9049
- x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
9050
- ]);
9051
- }
9052
- else
9053
- tempScale.range([
9054
- 0 + (x.bandwidth() - reducedBarWidth) / 2,
9055
- x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
9056
- ]);
9038
+ if (self.chartData.data.length == 1) {
9039
+ if (Object.keys(self.chartData.data[0]).length == 2) {
9040
+ tempScale.range([
9041
+ 0 + (x.bandwidth() - reducedBarWidth) / 2,
9042
+ x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
9043
+ ]);
9057
9044
  }
9058
9045
  else
9059
9046
  tempScale.range([
@@ -9061,6 +9048,11 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9061
9048
  x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
9062
9049
  ]);
9063
9050
  }
9051
+ else
9052
+ tempScale.range([
9053
+ 0 + (x.bandwidth() - reducedBarWidth) / 2,
9054
+ x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
9055
+ ]);
9064
9056
  }
9065
9057
  }
9066
9058
  });
@@ -9086,30 +9078,17 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9086
9078
  let keys = Object.keys(indiv).filter((temp, i) => i != 0);
9087
9079
  tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
9088
9080
  if (x.bandwidth() > 100) {
9089
- // Grouped chart: decrease bar width to 70% of slot
9090
- if (subgroups.length > 1) {
9091
- const groupedBarWidth = x.bandwidth() * 0.5;
9092
- const offset = (x.bandwidth() - groupedBarWidth) / 2;
9093
- tempScale.range([offset, x.bandwidth() - offset]);
9081
+ // Increase bar width a bit in zoom-in view
9082
+ let reducedBarWidth = 60;
9083
+ if (!self.isZoomedOut) {
9084
+ reducedBarWidth = 80;
9094
9085
  }
9095
- else {
9096
- // Normal/zoomed drilldown logic
9097
- let reducedBarWidth = 60;
9098
- if (!self.isZoomedOut) {
9099
- reducedBarWidth = 80;
9100
- }
9101
- if (self.chartData.data.length == 1) {
9102
- if (Object.keys(self.chartData.data[0]).length == 2) {
9103
- tempScale.range([
9104
- 0 + (x.bandwidth() - reducedBarWidth) / 2,
9105
- x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
9106
- ]);
9107
- }
9108
- else
9109
- tempScale.range([
9110
- 0 + (x.bandwidth() - reducedBarWidth) / 2,
9111
- x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
9112
- ]);
9086
+ if (self.chartData.data.length == 1) {
9087
+ if (Object.keys(self.chartData.data[0]).length == 2) {
9088
+ tempScale.range([
9089
+ 0 + (x.bandwidth() - reducedBarWidth) / 2,
9090
+ x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
9091
+ ]);
9113
9092
  }
9114
9093
  else
9115
9094
  tempScale.range([
@@ -9117,6 +9096,11 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9117
9096
  x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
9118
9097
  ]);
9119
9098
  }
9099
+ else
9100
+ tempScale.range([
9101
+ 0 + (x.bandwidth() - reducedBarWidth) / 2,
9102
+ x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
9103
+ ]);
9120
9104
  }
9121
9105
  }
9122
9106
  });