axidio-styleguide-library1-v2 0.0.998 → 0.0.999
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.
|
@@ -8843,24 +8843,16 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8843
8843
|
if (dateRangeRegex.test(d.trim())) {
|
|
8844
8844
|
return d.trim().replace(dateRangeRegex, (m, d1, d2) => `${d1} - ${d2}`);
|
|
8845
8845
|
}
|
|
8846
|
-
// If in zoomed-out view and label is a date, show only
|
|
8846
|
+
// If in zoomed-out view and label is a date, show only month and date (MM/DD)
|
|
8847
8847
|
if (self.isZoomedOut) {
|
|
8848
8848
|
// Match date formats like '08/04/25', '2025-08-04', '08-04-2025', etc.
|
|
8849
|
-
|
|
8850
|
-
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
let
|
|
8854
|
-
let
|
|
8855
|
-
|
|
8856
|
-
if (dateParts[1].length === 4) {
|
|
8857
|
-
month = dateParts[2];
|
|
8858
|
-
day = dateParts[3];
|
|
8859
|
-
}
|
|
8860
|
-
else if (dateParts[3].length === 4) {
|
|
8861
|
-
month = dateParts[1];
|
|
8862
|
-
day = dateParts[2];
|
|
8863
|
-
}
|
|
8849
|
+
// Try to extract MM/DD from various formats
|
|
8850
|
+
let match = d.match(/(\d{2,4})[-\/](\d{2})[-\/](\d{2,4})/);
|
|
8851
|
+
if (match) {
|
|
8852
|
+
let yearFirst = match[1].length === 4;
|
|
8853
|
+
let yearLast = match[3].length === 4;
|
|
8854
|
+
let month = yearFirst ? match[2] : match[1];
|
|
8855
|
+
let day = yearFirst ? match[3] : match[2];
|
|
8864
8856
|
return `${month}/${day}`;
|
|
8865
8857
|
}
|
|
8866
8858
|
}
|