axidio-styleguide-library1-v2 0.4.92 → 0.4.94
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.
|
@@ -7983,10 +7983,10 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7983
7983
|
svg.selectAll('g.x1.axis1 g.tick text')
|
|
7984
7984
|
.attr('x', -20);
|
|
7985
7985
|
}
|
|
7986
|
-
if (!isria && self.chartData.data.length > 11
|
|
7987
|
-
|
|
7988
|
-
|
|
7989
|
-
}
|
|
7986
|
+
// if (!isria && self.chartData.data.length > 11 && !self.isZoomedOut && (x.bandwidth< 100)) {
|
|
7987
|
+
// svg.selectAll('g.x1.axis1 g.tick text')
|
|
7988
|
+
// .attr('x', -20);
|
|
7989
|
+
// }
|
|
7990
7990
|
// ✅ Tablet View — Rotate if text > 10 characters
|
|
7991
7991
|
if (isTablet) {
|
|
7992
7992
|
const textNodes = svg.selectAll('g.x1.axis1 g.tick text');
|
|
@@ -8048,6 +8048,13 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8048
8048
|
textNodes.classed('mobile-xaxis-override', true);
|
|
8049
8049
|
}
|
|
8050
8050
|
}
|
|
8051
|
+
if (!isria && !self.isZoomedOut && subgroups.length > 1 && data.length > 8 && x.bandwidth() > 100) {
|
|
8052
|
+
const reducedBarWidth = 100;
|
|
8053
|
+
const offset = (x.bandwidth() - reducedBarWidth) / 2;
|
|
8054
|
+
const centerOffset = offset + (reducedBarWidth / 2);
|
|
8055
|
+
svg.selectAll('g.x1.axis1 g.tick text')
|
|
8056
|
+
.attr('x', centerOffset - (x.bandwidth() / 2));
|
|
8057
|
+
}
|
|
8051
8058
|
}
|
|
8052
8059
|
applyXLabelsOnSameLine(svg, subgroups, data, metaData, self, shortTickLengthBg, isMobile, isria) {
|
|
8053
8060
|
const xAxisLabels = svg.selectAll('g.x1.axis1 g.tick text')
|
|
@@ -8341,7 +8348,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8341
8348
|
const keys = Object.keys(indiv).filter((temp, i) => i !== 0);
|
|
8342
8349
|
calculatedScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
|
|
8343
8350
|
if (x.bandwidth() > 100) {
|
|
8344
|
-
const reducedBarWidth = self.isZoomedOut ? 60 :
|
|
8351
|
+
const reducedBarWidth = self.isZoomedOut ? 60 : 100;
|
|
8345
8352
|
const offset = (x.bandwidth() - reducedBarWidth) / 2;
|
|
8346
8353
|
calculatedScale.range([offset, x.bandwidth() - offset]);
|
|
8347
8354
|
}
|