axidio-styleguide-library1-v2 0.2.38 → 0.2.39
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.
|
@@ -9025,7 +9025,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9025
9025
|
if (hasDateValues && subgroups.length === 1) {
|
|
9026
9026
|
// For single chart with dates, show horizontally
|
|
9027
9027
|
textNodes
|
|
9028
|
-
.classed('mobile-xaxis-override',
|
|
9028
|
+
.classed('mobile-xaxis-override', false)
|
|
9029
9029
|
.style('text-anchor', 'end')
|
|
9030
9030
|
.attr('transform', 'rotate(0)')
|
|
9031
9031
|
.attr('dx', '-0.5em')
|
|
@@ -9101,6 +9101,13 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9101
9101
|
}
|
|
9102
9102
|
formatXLabelText(d, data, metaData, subgroups, self, isMobile) {
|
|
9103
9103
|
if (isMobile && !self.isHeaderVisible) {
|
|
9104
|
+
// If the label looks like a date and there's only one subgroup, show the full label
|
|
9105
|
+
const isDateLabel = /\d{2,4}[-\/]\d{1,2}[-\/]\d{1,4}/.test(d) || !isNaN(Date.parse(d));
|
|
9106
|
+
if (isDateLabel && subgroups && subgroups.length === 1) {
|
|
9107
|
+
// return original label (preserve any formatting) — keep as-is to avoid trimming
|
|
9108
|
+
return d;
|
|
9109
|
+
}
|
|
9110
|
+
// Default mobile trimming: show first word (or fragment) shortened to 3 chars
|
|
9104
9111
|
const firstPart = d.split(/[\s\-]+/)[0];
|
|
9105
9112
|
return firstPart.substring(0, 3).toLowerCase();
|
|
9106
9113
|
}
|