axidio-styleguide-library1-v2 0.2.64 → 0.2.65
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.
|
@@ -9136,21 +9136,12 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9136
9136
|
.attr('y', (d) => this.calculateXLabelYPosition(d, subgroups, data, metaData, self, shortTickLengthBg))
|
|
9137
9137
|
.attr('x', (d) => (self.chartData.data.length > 8 && !self.isZoomedOut) ? 1 : 0)
|
|
9138
9138
|
.text((d) => this.formatXLabelText(d, data, metaData, subgroups, self, isMobile));
|
|
9139
|
-
// Apply writing-mode
|
|
9139
|
+
// Apply writing-mode for grouped charts with date labels in zoomed-out view
|
|
9140
9140
|
xAxisLabels.each(function (d) {
|
|
9141
9141
|
const isDateLabel = /^(\d{2,4}[-\/])?\d{2,4}[-\/]\d{2,4}$/.test(d.trim());
|
|
9142
9142
|
const isWeekLabel = /week|wk|w\d+/i.test(d);
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
if (isMobile && subgroups.length > 1 && self.isZoomedOut && data.length > 8 && isDateLabel && !isWeekLabel) {
|
|
9146
|
-
element
|
|
9147
|
-
.style('writing-mode', 'sideways-lr')
|
|
9148
|
-
.attr('y', 30); // Increase dy to 30 for better alignment in mobile zoom-out view
|
|
9149
|
-
}
|
|
9150
|
-
else {
|
|
9151
|
-
element
|
|
9152
|
-
.style('writing-mode', null)
|
|
9153
|
-
.attr('y', null); // Reset to default positioning when not in mobile zoom-out view
|
|
9143
|
+
if (subgroups.length > 1 && self.isZoomedOut && data.length > 8 && isDateLabel && !isWeekLabel) {
|
|
9144
|
+
d3.select(this).style('writing-mode', 'sideways-lr');
|
|
9154
9145
|
}
|
|
9155
9146
|
});
|
|
9156
9147
|
// Add second line for non-date labels on desktop
|