axidio-styleguide-library1-v2 0.2.89 → 0.2.91
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.
|
@@ -7857,8 +7857,8 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7857
7857
|
.attr('x', 5)
|
|
7858
7858
|
.style('text-anchor', 'middle');
|
|
7859
7859
|
}
|
|
7860
|
-
// Mobile/tablet override - check for
|
|
7861
|
-
if (isMobile) {
|
|
7860
|
+
// Mobile/tablet override - check for date labels and apply appropriate rotation
|
|
7861
|
+
if (isMobile || isTablet) {
|
|
7862
7862
|
const textNodes = svg.selectAll('g.x1.axis1 g.tick text');
|
|
7863
7863
|
const groupsCount = data.length || 0;
|
|
7864
7864
|
// Check if we have dates in x-axis and single group
|
|
@@ -7871,19 +7871,30 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7871
7871
|
hasDateValues = true;
|
|
7872
7872
|
}
|
|
7873
7873
|
});
|
|
7874
|
-
if (hasDateValues
|
|
7875
|
-
|
|
7876
|
-
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7874
|
+
if (hasDateValues) {
|
|
7875
|
+
if (isTablet) {
|
|
7876
|
+
// For tablet view with dates, rotate vertically
|
|
7877
|
+
textNodes
|
|
7878
|
+
.style('writing-mode', 'sideways-lr')
|
|
7879
|
+
.style('text-anchor', 'middle')
|
|
7880
|
+
.attr('y', 0)
|
|
7881
|
+
.attr('dx', '0')
|
|
7882
|
+
.attr('dy', '0');
|
|
7883
|
+
}
|
|
7884
|
+
else if (isMobile && subgroups && subgroups.length < 3) {
|
|
7885
|
+
// For mobile single chart with dates, keep horizontal
|
|
7886
|
+
textNodes
|
|
7887
|
+
.style('writing-mode', 'horizontal-tb')
|
|
7888
|
+
.classed('mobile-xaxis-override', false)
|
|
7889
|
+
.attr('transform', 'rotate(0)')
|
|
7890
|
+
.attr('text-anchor', 'middle')
|
|
7891
|
+
.attr('y', 20)
|
|
7892
|
+
.attr('dx', '0')
|
|
7893
|
+
.attr('dy', '0');
|
|
7894
|
+
}
|
|
7884
7895
|
}
|
|
7885
7896
|
else if (!this.isHeaderVisible) {
|
|
7886
|
-
// Default mobile behavior for non-date
|
|
7897
|
+
// Default mobile/tablet behavior for non-date labels
|
|
7887
7898
|
textNodes.classed('mobile-xaxis-override', true);
|
|
7888
7899
|
}
|
|
7889
7900
|
}
|