axidio-styleguide-library1-v2 0.0.934 → 0.0.936

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.
@@ -8854,16 +8854,17 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8854
8854
  return '';
8855
8855
  }
8856
8856
  // If label looks like a date (contains digits and - or /)
8857
- if (/\d{2,4}[-\/]/.test(d)) {
8858
- // If there is a space, show the part after the space on the next line
8859
- if (d.indexOf(' ') > -1) {
8857
+ const isDateLabel = /\d{2,4}[-\/]/.test(d);
8858
+ // Only split date/week labels if there are many grouped bars and header is not visible
8859
+ if (isDateLabel) {
8860
+ if (!self.isHeaderVisible && data.length > 8 && d.indexOf(' ') > -1) {
8860
8861
  var first = d.substring(0, d.indexOf(' '));
8861
8862
  var second = d.substring(d.indexOf(' ') + 1).trim();
8862
- // Use tspan for line break if supported, else join with \n
8863
- // If SVG tspan is supported, this will be split into two lines by the .each below
8864
8863
  return first + '\n' + second;
8865
8864
  }
8866
- return d;
8865
+ else {
8866
+ return d;
8867
+ }
8867
8868
  }
8868
8869
  if (d.trim().indexOf(' ') > -1) {
8869
8870
  return d.trim().substring(0, d.indexOf(' ')).toLowerCase();
@@ -9600,8 +9601,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9600
9601
  }
9601
9602
  })
9602
9603
  .style('fill', 'var(--chart-text-color)')
9603
- .attr('transform', 'rotate(-90)')
9604
- .style('text-anchor', 'end'); // Rotate only for this chart in zoomed-out mode
9604
+ .attr('transform', null); // Remove rotate if using line breaks
9605
9605
  // Optional: Adjust bottom margin or chart layout
9606
9606
  svg
9607
9607
  .select('.x-axis')