axidio-styleguide-library1-v2 0.1.10 → 0.1.12

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.
@@ -8844,21 +8844,26 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8844
8844
  if (dateRangeRegex.test(d.trim())) {
8845
8845
  return d.trim().replace(dateRangeRegex, (m, d1, d2) => `${d1} - ${d2}`);
8846
8846
  }
8847
- // If in zoomed-out view and label is a date, show only month and date (MM/DD)
8848
- if (self.isZoomedOut) {
8849
- // Match date formats like '08/04/25', '2025-08-04', '08-04-2025', etc.
8850
- // Try to extract MM/DD from various formats
8851
- let match = d.match(/(\d{2,4})[-\/](\d{2})[-\/](\d{2,4})/);
8852
- if (match) {
8853
- let yearFirst = match[1].length === 4;
8854
- let yearLast = match[3].length === 4;
8855
- let month = yearFirst ? match[2] : match[1];
8856
- let day = yearFirst ? match[3] : match[2];
8857
- return `${month}/${day}`;
8847
+ // Show the date label as it is, do not trim or hide the year
8848
+ // If label looks like a date (contains digits and - or /)
8849
+ const isDateLabel = /\d{2,4}[-\/]/.test(d);
8850
+ // Only split date/week labels if there are many grouped bars and header is not visible
8851
+ if (isDateLabel) {
8852
+ if (!self.isHeaderVisible && data.length > 8 && d.indexOf(' ') > -1) {
8853
+ var first = d.substring(0, d.indexOf(' '));
8854
+ var second = d.substring(d.indexOf(' ') + 1).trim();
8855
+ return first + '\n' + second;
8858
8856
  }
8857
+ else {
8858
+ return d;
8859
+ }
8860
+ }
8861
+ if (d.trim().indexOf(' ') > -1) {
8862
+ return d.trim().substring(0, d.indexOf(' ')).toLowerCase();
8859
8863
  }
8864
+ return d.toLowerCase();
8860
8865
  // If label looks like a date (contains digits and - or /)
8861
- const isDateLabel = /\d{2,4}[-\/]/.test(d);
8866
+ const isDateLabel2 = /\d{2,4}[-\/]/.test(d);
8862
8867
  // Only split date/week labels if there are many grouped bars and header is not visible
8863
8868
  if (isDateLabel) {
8864
8869
  if (!self.isHeaderVisible && data.length > 8 && d.indexOf(' ') > -1) {