axidio-styleguide-library1-v2 0.0.996 → 0.0.998
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,6 +8843,27 @@ 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 day and month (hide year)
|
|
8847
|
+
if (self.isZoomedOut) {
|
|
8848
|
+
// Match date formats like '08/04/25', '2025-08-04', '08-04-2025', etc.
|
|
8849
|
+
const dateParts = d.match(/(\d{2,4})[-\/]?(\d{2})[-\/]?(\d{2,4})/);
|
|
8850
|
+
if (dateParts) {
|
|
8851
|
+
// Try to find month and day, ignore year
|
|
8852
|
+
// If format is MM/DD/YY or MM/DD/YYYY
|
|
8853
|
+
let month = dateParts[2];
|
|
8854
|
+
let day = dateParts[3];
|
|
8855
|
+
// If format is YYYY-MM-DD
|
|
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
|
+
}
|
|
8864
|
+
return `${month}/${day}`;
|
|
8865
|
+
}
|
|
8866
|
+
}
|
|
8846
8867
|
// If label looks like a date (contains digits and - or /)
|
|
8847
8868
|
const isDateLabel = /\d{2,4}[-\/]/.test(d);
|
|
8848
8869
|
// Only split date/week labels if there are many grouped bars and header is not visible
|
|
@@ -9091,7 +9112,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9091
9112
|
// Increase bar width a bit in zoom-in view
|
|
9092
9113
|
let reducedBarWidth = 60;
|
|
9093
9114
|
if (!self.isZoomedOut) {
|
|
9094
|
-
reducedBarWidth =
|
|
9115
|
+
reducedBarWidth = 30;
|
|
9095
9116
|
}
|
|
9096
9117
|
if (self.chartData.data.length == 1) {
|
|
9097
9118
|
if (Object.keys(self.chartData.data[0]).length == 2) {
|
|
@@ -9148,7 +9169,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9148
9169
|
// Increase bar width a bit in zoom-in view
|
|
9149
9170
|
let reducedBarWidth = 60;
|
|
9150
9171
|
if (!self.isZoomedOut) {
|
|
9151
|
-
reducedBarWidth =
|
|
9172
|
+
reducedBarWidth = 80;
|
|
9152
9173
|
}
|
|
9153
9174
|
if (self.chartData.data.length == 1) {
|
|
9154
9175
|
if (Object.keys(self.chartData.data[0]).length == 2) {
|