axidio-styleguide-library1-v2 0.0.923 → 0.0.924

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.
@@ -8728,13 +8728,26 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8728
8728
  .call(d3.axisBottom(x))
8729
8729
  .call((g) => g.select('.domain').remove());
8730
8730
  svg.selectAll('g.x1.axis1 g.tick line').remove();
8731
- // Only move x-axis labels further down for grouped charts if there is no xLabel
8732
- if (subgroups.length > 1 && !metaData.xLabel) {
8731
+ // Move x-axis label down only if: grouped chart, one group, no xLabel, and label is a date
8732
+ if (subgroups.length > 1 &&
8733
+ data.length === 1 &&
8734
+ !metaData.xLabel) {
8733
8735
  svg
8734
8736
  .selectAll('g.x1.axis1 g.tick text')
8735
- .attr('class', 'lib-xaxis-labels-texts-drilldown')
8736
- .style('fill', 'var(--chart-text-color)')
8737
- .attr('y', 32); // Increase distance from bars (default is ~9)
8737
+ .each(function (d, i, nodes) {
8738
+ // Check if label is a date (e.g., 08/04/25 or 2025-08-04)
8739
+ if (/\d{2,4}[-\/]\d{2}[-\/]\d{2,4}/.test(d) || /\d{2,4}[-\/]\d{2,4}/.test(d)) {
8740
+ d3.select(this)
8741
+ .attr('class', 'lib-xaxis-labels-texts-drilldown')
8742
+ .style('fill', 'var(--chart-text-color)')
8743
+ .attr('y', 32); // Move date label down
8744
+ }
8745
+ else {
8746
+ d3.select(this)
8747
+ .attr('class', 'lib-xaxis-labels-texts-drilldown')
8748
+ .style('fill', 'var(--chart-text-color)');
8749
+ }
8750
+ });
8738
8751
  }
8739
8752
  else {
8740
8753
  svg