axidio-styleguide-library1-v2 0.0.791 → 0.0.793

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.
@@ -8892,8 +8892,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8892
8892
  }
8893
8893
  var xSubgroup = d3.scaleBand().domain(subgroups);
8894
8894
  if (this.chartConfiguration.isMultiChartGridLine == undefined) {
8895
- xSubgroup.range([0, x.bandwidth()])
8896
- .padding(this.isZoomedOut ? 0.1 : 0.3);
8895
+ xSubgroup.range([0, x.bandwidth()]);
8897
8896
  }
8898
8897
  else {
8899
8898
  /**
@@ -8947,8 +8946,38 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8947
8946
  }
8948
8947
  })
8949
8948
  .attr('x', function (d) {
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;
8949
+ if (self.chartConfiguration.isDrilldownChart) {
8950
+ data.map((indiv) => {
8951
+ if (indiv.name == d.name) {
8952
+ let keys = Object.keys(indiv).filter((temp, i) => i != 0);
8953
+ tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
8954
+ if (x.bandwidth() > 100) {
8955
+ if (self.chartData.data.length == 1) {
8956
+ if (Object.keys(self.chartData.data[0]).length == 2) {
8957
+ tempScale.range([
8958
+ 0 + (x.bandwidth() - 200) / 2,
8959
+ x.bandwidth() - (x.bandwidth() - 200) / 2,
8960
+ ]);
8961
+ // .padding(0.05);
8962
+ }
8963
+ else
8964
+ tempScale.range([
8965
+ 0 + (x.bandwidth() - 300) / 2,
8966
+ x.bandwidth() - (x.bandwidth() - 300) / 2,
8967
+ ]);
8968
+ // .padding(0.05);
8969
+ }
8970
+ else
8971
+ tempScale.range([
8972
+ 0 + (x.bandwidth() - 125) / 2,
8973
+ x.bandwidth() - (x.bandwidth() - 125) / 2,
8974
+ ]);
8975
+ }
8976
+ }
8977
+ });
8978
+ return tempScale(d.key);
8979
+ }
8980
+ return xSubgroup(d.key);
8952
8981
  })
8953
8982
  .attr('y', function (d) {
8954
8983
  if (d.value == -1) {
@@ -8966,9 +8995,42 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8966
8995
  return y(0);
8967
8996
  })
8968
8997
  .attr('width', function (d) {
8969
- // Only reduce the width, do not move the bar position
8970
- const baseWidth = xSubgroup.bandwidth();
8971
- return self.isZoomedOut ? baseWidth : baseWidth * 0.7;
8998
+ if (self.chartConfiguration.isDrilldownChart) {
8999
+ // var tempScale;
9000
+ data.map((indiv) => {
9001
+ if (indiv.name == d.name) {
9002
+ let keys = Object.keys(indiv).filter((temp, i) => i != 0);
9003
+ var temp;
9004
+ tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
9005
+ tempScale.range([
9006
+ 0 + (x.bandwidth() - 125) / 2,
9007
+ x.bandwidth() - (x.bandwidth() - 125) / 2,
9008
+ ]);
9009
+ // if (x.bandwidth() > 100) {
9010
+ // if (self.chartData.data.length == 1) {
9011
+ // if (Object.keys(self.chartData.data[0]).length == 2) {
9012
+ // tempScale.range([
9013
+ // 0 + (x.bandwidth() - 200) / 2,
9014
+ // x.bandwidth() - (x.bandwidth() - 200) / 2,
9015
+ // ]);
9016
+ // // .padding(0.05);
9017
+ // } else
9018
+ // tempScale.range([
9019
+ // 0 + (x.bandwidth() - 250) / 2,
9020
+ // x.bandwidth() - (x.bandwidth() - 250) / 2,
9021
+ // ]);
9022
+ // // .padding(0.05);
9023
+ // } else
9024
+ // tempScale.range([
9025
+ // 0 + (x.bandwidth() - 125) / 2,
9026
+ // x.bandwidth() - (x.bandwidth() - 125) / 2,
9027
+ // ]);
9028
+ // }
9029
+ }
9030
+ });
9031
+ return tempScale.bandwidth();
9032
+ }
9033
+ return xSubgroup.bandwidth();
8972
9034
  })
8973
9035
  .attr('height', function (d) {
8974
9036
  if (d.value == -1) {