axidio-styleguide-library1-v2 0.3.35 → 0.3.36
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,6 +7857,20 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7857
7857
|
.attr('x', 5)
|
|
7858
7858
|
.style('text-anchor', 'middle');
|
|
7859
7859
|
}
|
|
7860
|
+
// ✅ Tablet View — Rotate if text > 10 characters
|
|
7861
|
+
if (isTablet) {
|
|
7862
|
+
const textNodes = svg.selectAll('g.x1.axis1 g.tick text');
|
|
7863
|
+
textNodes.each(function (d) {
|
|
7864
|
+
const text = d ? d.toString() : '';
|
|
7865
|
+
if (text.length > 10) {
|
|
7866
|
+
textNodes
|
|
7867
|
+
.style('writing-mode', 'sideways-lr') // Vertical text
|
|
7868
|
+
.attr('text-anchor', 'middle')
|
|
7869
|
+
.attr('y', 25)
|
|
7870
|
+
.attr('x', 0);
|
|
7871
|
+
}
|
|
7872
|
+
});
|
|
7873
|
+
}
|
|
7860
7874
|
// Mobile/tablet override - check for single-group date charts first
|
|
7861
7875
|
if (isMobile) {
|
|
7862
7876
|
const textNodes = svg.selectAll('g.x1.axis1 g.tick text');
|
|
@@ -7902,19 +7916,6 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7902
7916
|
textNodes.classed('mobile-xaxis-override', true);
|
|
7903
7917
|
}
|
|
7904
7918
|
}
|
|
7905
|
-
if (isTablet) {
|
|
7906
|
-
const textNodes = svg.selectAll('g.x1.axis1 g.tick text');
|
|
7907
|
-
textNodes.each((d) => {
|
|
7908
|
-
const text = d.toString();
|
|
7909
|
-
if (text.length > 10) {
|
|
7910
|
-
d3.select(this)
|
|
7911
|
-
.style('writing-mode', 'sideways-lr') // Vertical layout
|
|
7912
|
-
.attr('text-anchor', 'middle')
|
|
7913
|
-
.attr('y', 25)
|
|
7914
|
-
.attr('x', 0);
|
|
7915
|
-
}
|
|
7916
|
-
});
|
|
7917
|
-
}
|
|
7918
7919
|
}
|
|
7919
7920
|
applyXLabelsOnSameLine(svg, subgroups, data, metaData, self, shortTickLengthBg, isMobile, isria) {
|
|
7920
7921
|
const xAxisLabels = svg.selectAll('g.x1.axis1 g.tick text')
|