axidio-styleguide-library1-v2 0.3.36 → 0.3.37

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.
@@ -7861,13 +7861,18 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
7861
7861
  if (isTablet) {
7862
7862
  const textNodes = svg.selectAll('g.x1.axis1 g.tick text');
7863
7863
  textNodes.each(function (d) {
7864
- const text = d ? d.toString() : '';
7865
- if (text.length > 10) {
7864
+ const text = d ? d.toString().trim() : '';
7865
+ // Detect date formats (to skip them)
7866
+ const isDateString = /^\d{1,4}[-\/]\d{1,2}[-\/]\d{1,4}$/.test(text) || // e.g. 2025-10-29 or 10/29/2025
7867
+ /^(\d{1,4}[-\/]\d{1,2}[-\/]\d{1,4})\s*[-–]\s*(\d{1,4}[-\/]\d{1,2}[-\/]\d{1,4})$/.test(text);
7868
+ if (!isDateString && text.length > 10) {
7869
+ const trimmed = text.slice(0, 10) + '…';
7866
7870
  textNodes
7867
7871
  .style('writing-mode', 'sideways-lr') // Vertical text
7868
7872
  .attr('text-anchor', 'middle')
7869
7873
  .attr('y', 25)
7870
- .attr('x', 0);
7874
+ .attr('x', 0)
7875
+ .text(trimmed);
7871
7876
  }
7872
7877
  });
7873
7878
  }