axidio-styleguide-library1-v2 0.2.83 → 0.2.84
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.
|
@@ -7959,6 +7959,8 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7959
7959
|
return baseY;
|
|
7960
7960
|
}
|
|
7961
7961
|
formatXLabelText(d, data, metaData, subgroups, self, isMobile) {
|
|
7962
|
+
// Check if we're on mobile or tablet
|
|
7963
|
+
const isSmallScreen = window.innerWidth < 992; // Less than 992px (mobile or tablet)
|
|
7962
7964
|
// Check if label contains both date and week information
|
|
7963
7965
|
const hasDateAndTime = (text) => {
|
|
7964
7966
|
const dateMatch = /\d{2,4}[-\/]\d{1,2}[-\/]\d{1,4}/.test(text) || !isNaN(Date.parse(text));
|
|
@@ -7966,8 +7968,8 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7966
7968
|
return { isDate: dateMatch, isWeek: weekMatch };
|
|
7967
7969
|
};
|
|
7968
7970
|
const labelInfo = hasDateAndTime(d);
|
|
7969
|
-
//
|
|
7970
|
-
if (labelInfo.isDate && labelInfo.isWeek) {
|
|
7971
|
+
// Apply date-week trimming only for mobile and tablet screens
|
|
7972
|
+
if (isSmallScreen && labelInfo.isDate && labelInfo.isWeek) {
|
|
7971
7973
|
const datePart = d.match(/\d{2,4}[-\/]\d{1,2}[-\/]\d{1,4}/);
|
|
7972
7974
|
return datePart ? datePart[0] : d;
|
|
7973
7975
|
}
|