axidio-styleguide-library1-v2 0.0.998 → 0.1.1

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.
@@ -8783,13 +8783,13 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8783
8783
  .attr('class', 'lib-xaxis-labels-texts-drilldown')
8784
8784
  .style('font-size', this.isHeaderVisible ? '18px' : '14px')
8785
8785
  .attr('y', function (d) {
8786
- // For grouped bar charts with many bars and xLabel present, do NOT add extra space (avoid overlap)
8786
+ // For grouped bar charts with many bars and xLabel present, add extra space at top for date labels
8787
8787
  if (subgroups.length > 1 && data.length > 8 && metaData.xLabel) {
8788
- // In maximized (fullscreen) view, keep the gap minimal
8788
+ // In maximized (fullscreen) view, keep the gap minimal but add space
8789
8789
  if (self.chartConfiguration.isFullScreen) {
8790
- return short_tick_length_bg;
8790
+ return short_tick_length_bg + 15;
8791
8791
  }
8792
- return short_tick_length_bg;
8792
+ return short_tick_length_bg + 15;
8793
8793
  }
8794
8794
  // For grouped bar charts with many bars and NO xLabel, add space as before, but reduce in fullscreen
8795
8795
  if (subgroups.length > 1 && data.length > 8 && !metaData.xLabel) {
@@ -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 day and month (hide year)
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
- 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
- }
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
  }