axidio-styleguide-library1-v2 0.7.22 → 0.7.24

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.
@@ -8273,26 +8273,21 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8273
8273
  // if (!isria && self.chartData.data.length > 11 && !self.isZoomedOut && (x.bandwidth< 100)) {
8274
8274
  // svg.selectAll('g.x1.axis1 g.tick text')
8275
8275
  // .attr('x', -20);
8276
- // }
8277
- // ✅ Tablet View — Rotate if text > 10 characters
8278
8276
  if (isTablet) {
8279
8277
  const isria = this.customChartConfiguration.isRia;
8280
8278
  const textNodes = svg.selectAll('g.x1.axis1 g.tick text');
8281
- textNodes.each((d) => {
8279
+ textNodes.each(function (d) {
8282
8280
  const text = d ? d.toString().trim() : '';
8283
8281
  // Detect date formats (to skip them)
8284
- const isDateString = /^\d{1,4}[-\/]\d{1,2}[-\/]\d{1,4}$/.test(text) || // e.g. 2025-10-29 or 10/29/2025
8282
+ const isDateString = /^\d{1,4}[-\/]\d{1,2}[-\/]\d{1,4}$/.test(text) ||
8285
8283
  /^(\d{1,4}[-\/]\d{1,2}[-\/]\d{1,4})\s*[-–]\s*(\d{1,4}[-\/]\d{1,2}[-\/]\d{1,4})$/.test(text);
8286
8284
  if (!isDateString && text.length > 10) {
8285
+ const currentText = d3.select(this);
8287
8286
  const trimmed = text.slice(0, 9) + '…';
8288
- // textNodes
8289
- // .style('font-size', '9px')
8290
- // if (isria) {
8291
- // textNodes.text(trimmed);
8292
- // }
8293
- d3.select(this)
8294
- .style('font-size', '9px')
8295
- .text(isria ? trimmed : text);
8287
+ currentText.style('font-size', '9px');
8288
+ if (isria) {
8289
+ currentText.text(trimmed);
8290
+ }
8296
8291
  }
8297
8292
  });
8298
8293
  }