axidio-styleguide-library1-v2 0.0.788 → 0.0.790
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,37 +8947,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8947
8947
|
}
|
|
8948
8948
|
})
|
|
8949
8949
|
.attr('x', function (d) {
|
|
8950
|
-
|
|
8951
|
-
data.map((indiv) => {
|
|
8952
|
-
if (indiv.name == d.name) {
|
|
8953
|
-
let keys = Object.keys(indiv).filter((temp, i) => i != 0);
|
|
8954
|
-
tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
|
|
8955
|
-
if (x.bandwidth() > 100) {
|
|
8956
|
-
if (self.chartData.data.length == 1) {
|
|
8957
|
-
if (Object.keys(self.chartData.data[0]).length == 2) {
|
|
8958
|
-
tempScale.range([
|
|
8959
|
-
0 + (x.bandwidth() - 200) / 2,
|
|
8960
|
-
x.bandwidth() - (x.bandwidth() - 200) / 2,
|
|
8961
|
-
]);
|
|
8962
|
-
// .padding(0.05);
|
|
8963
|
-
}
|
|
8964
|
-
else
|
|
8965
|
-
tempScale.range([
|
|
8966
|
-
0 + (x.bandwidth() - 300) / 2,
|
|
8967
|
-
x.bandwidth() - (x.bandwidth() - 300) / 2,
|
|
8968
|
-
]);
|
|
8969
|
-
// .padding(0.05);
|
|
8970
|
-
}
|
|
8971
|
-
else
|
|
8972
|
-
tempScale.range([
|
|
8973
|
-
0 + (x.bandwidth() - 125) / 2,
|
|
8974
|
-
x.bandwidth() - (x.bandwidth() - 125) / 2,
|
|
8975
|
-
]);
|
|
8976
|
-
}
|
|
8977
|
-
}
|
|
8978
|
-
});
|
|
8979
|
-
return tempScale(d.key);
|
|
8980
|
-
}
|
|
8950
|
+
// Keep original position calculation - no centering adjustments
|
|
8981
8951
|
return xSubgroup(d.key);
|
|
8982
8952
|
})
|
|
8983
8953
|
.attr('y', function (d) {
|
|
@@ -8996,41 +8966,33 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8996
8966
|
return y(0);
|
|
8997
8967
|
})
|
|
8998
8968
|
.attr('width', function (d) {
|
|
8969
|
+
let baseWidth = xSubgroup.bandwidth();
|
|
8999
8970
|
if (self.chartConfiguration.isDrilldownChart) {
|
|
9000
|
-
//
|
|
8971
|
+
// Calculate reduced width based on your existing logic
|
|
9001
8972
|
data.map((indiv) => {
|
|
9002
8973
|
if (indiv.name == d.name) {
|
|
9003
8974
|
let keys = Object.keys(indiv).filter((temp, i) => i != 0);
|
|
9004
|
-
var temp;
|
|
9005
8975
|
tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
|
|
9006
8976
|
if (x.bandwidth() > 100) {
|
|
9007
8977
|
if (self.chartData.data.length == 1) {
|
|
9008
8978
|
if (Object.keys(self.chartData.data[0]).length == 2) {
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
//
|
|
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();
|
|
9014
8985
|
}
|
|
9015
|
-
else
|
|
9016
|
-
tempScale.range([
|
|
9017
|
-
0 + (x.bandwidth() - 300) / 2,
|
|
9018
|
-
x.bandwidth() - (x.bandwidth() - 300) / 2,
|
|
9019
|
-
]);
|
|
9020
|
-
// .padding(0.05);
|
|
9021
8986
|
}
|
|
9022
|
-
else
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
|
|
9026
|
-
]);
|
|
8987
|
+
else {
|
|
8988
|
+
// Reduce width by 125px total
|
|
8989
|
+
baseWidth = tempScale.bandwidth() * (x.bandwidth() - 125) / x.bandwidth();
|
|
8990
|
+
}
|
|
9027
8991
|
}
|
|
9028
8992
|
}
|
|
9029
8993
|
});
|
|
9030
|
-
return tempScale.bandwidth();
|
|
9031
8994
|
}
|
|
9032
|
-
|
|
9033
|
-
return self.isZoomedOut ? baseWidth : baseWidth * 0.7;
|
|
8995
|
+
return baseWidth;
|
|
9034
8996
|
})
|
|
9035
8997
|
.attr('height', function (d) {
|
|
9036
8998
|
if (d.value == -1) {
|