axidio-styleguide-library1-v2 0.2.74 → 0.2.75
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.
|
@@ -7726,14 +7726,10 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7726
7726
|
.domain(data.map((d) => d.name.toLowerCase()));
|
|
7727
7727
|
}
|
|
7728
7728
|
else {
|
|
7729
|
-
// Use consistent padding but adjust spacing for mobile
|
|
7730
|
-
const barGroupPadding = 0.3;
|
|
7731
|
-
const mobileSpacing = isMobile ? LEFT_AND_RIGHT_SPACES * 1.5 : LEFT_AND_RIGHT_SPACES;
|
|
7732
|
-
// Adjust the range to create more space between bars on mobile
|
|
7733
7729
|
x = d3.scaleBand()
|
|
7734
7730
|
.domain(groups)
|
|
7735
|
-
.range([
|
|
7736
|
-
.padding([
|
|
7731
|
+
.range([LEFT_AND_RIGHT_SPACES, width - RIGHT_SVG_WIDTH - LEFT_AND_RIGHT_SPACES])
|
|
7732
|
+
.padding([0.3]);
|
|
7737
7733
|
}
|
|
7738
7734
|
const xScaleFromOrigin = d3.scaleBand()
|
|
7739
7735
|
.domain(groups)
|
|
@@ -8066,21 +8062,17 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8066
8062
|
}
|
|
8067
8063
|
setupXSubgroupScale(subgroups, x, self) {
|
|
8068
8064
|
const xSubgroup = d3.scaleBand().domain(subgroups);
|
|
8069
|
-
const isMobile = window.innerWidth < 576;
|
|
8070
|
-
// Add more spacing between bars within groups on mobile
|
|
8071
|
-
const subgroupPadding = isMobile ? 0.3 : 0.1;
|
|
8072
8065
|
if (subgroups.length > 1 && !this.isZoomedOut) {
|
|
8073
|
-
|
|
8074
|
-
xSubgroup.range([0, x.bandwidth()]).padding(subgroupPadding);
|
|
8066
|
+
xSubgroup.range([0, x.bandwidth()]);
|
|
8075
8067
|
}
|
|
8076
8068
|
else if (subgroups.length === 1 && !this.isZoomedOut) {
|
|
8077
8069
|
xSubgroup.range([0, 100]);
|
|
8078
8070
|
}
|
|
8079
8071
|
else if (this.chartConfiguration.isMultiChartGridLine === undefined) {
|
|
8080
|
-
xSubgroup.range([0, x.bandwidth()])
|
|
8072
|
+
xSubgroup.range([0, x.bandwidth()]);
|
|
8081
8073
|
}
|
|
8082
8074
|
else {
|
|
8083
|
-
xSubgroup.range([0, x.bandwidth()])
|
|
8075
|
+
xSubgroup.range([0, x.bandwidth()]);
|
|
8084
8076
|
}
|
|
8085
8077
|
return xSubgroup;
|
|
8086
8078
|
}
|