axidio-styleguide-library1-v2 0.0.789 → 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,38 +8947,8 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8947
8947
|
}
|
|
8948
8948
|
})
|
|
8949
8949
|
.attr('x', function (d) {
|
|
8950
|
-
|
|
8951
|
-
|
|
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
|
-
}
|
|
8981
|
-
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;
|
|
8982
8952
|
})
|
|
8983
8953
|
.attr('y', function (d) {
|
|
8984
8954
|
if (d.value == -1) {
|
|
@@ -8996,39 +8966,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8996
8966
|
return y(0);
|
|
8997
8967
|
})
|
|
8998
8968
|
.attr('width', function (d) {
|
|
8999
|
-
|
|
9000
|
-
// var tempScale;
|
|
9001
|
-
data.map((indiv) => {
|
|
9002
|
-
if (indiv.name == d.name) {
|
|
9003
|
-
let keys = Object.keys(indiv).filter((temp, i) => i != 0);
|
|
9004
|
-
var temp;
|
|
9005
|
-
tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
|
|
9006
|
-
if (x.bandwidth() > 100) {
|
|
9007
|
-
if (self.chartData.data.length == 1) {
|
|
9008
|
-
if (Object.keys(self.chartData.data[0]).length == 2) {
|
|
9009
|
-
tempScale.range([
|
|
9010
|
-
0 + (x.bandwidth() - 200) / 2,
|
|
9011
|
-
x.bandwidth() - (x.bandwidth() - 200) / 2,
|
|
9012
|
-
]).paddingInner(0.3);
|
|
9013
|
-
// .padding(0.05);
|
|
9014
|
-
}
|
|
9015
|
-
else
|
|
9016
|
-
tempScale.range([
|
|
9017
|
-
0 + (x.bandwidth() - 300) / 2,
|
|
9018
|
-
x.bandwidth() - (x.bandwidth() - 300) / 2,
|
|
9019
|
-
]).paddingInner(0.3);
|
|
9020
|
-
// .padding(0.05);
|
|
9021
|
-
}
|
|
9022
|
-
else
|
|
9023
|
-
tempScale.range([
|
|
9024
|
-
0 + (x.bandwidth() - 125) / 2,
|
|
9025
|
-
x.bandwidth() - (x.bandwidth() - 125) / 2,
|
|
9026
|
-
]).paddingInner(0.3);
|
|
9027
|
-
}
|
|
9028
|
-
}
|
|
9029
|
-
});
|
|
9030
|
-
return tempScale.bandwidth();
|
|
9031
|
-
}
|
|
8969
|
+
// Only reduce the width, do not move the bar position
|
|
9032
8970
|
const baseWidth = xSubgroup.bandwidth();
|
|
9033
8971
|
return self.isZoomedOut ? baseWidth : baseWidth * 0.7;
|
|
9034
8972
|
})
|