axidio-styleguide-library1-v2 0.0.925 → 0.0.926

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,25 +8728,13 @@ 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
- // Move x-axis date label down only for grouped bar chart
8732
- if (subgroups.length > 1 // grouped bar chart
8733
- ) {
8731
+ // Only move x-axis labels further down for grouped charts if there is no xLabel
8732
+ if (subgroups.length > 1 && !metaData.xLabel) {
8734
8733
  svg
8735
8734
  .selectAll('g.x1.axis1 g.tick text')
8736
- .each(function (d) {
8737
- // Check if label is a date (e.g., 08/04/25 or 2025-08-04)
8738
- if (/\d{2,4}[-\/]\d{2}[-\/]\d{2,4}/.test(d) || /\d{2,4}[-\/]\d{2,4}/.test(d)) {
8739
- d3.select(this)
8740
- .attr('class', 'lib-xaxis-labels-texts-drilldown')
8741
- .style('fill', 'var(--chart-text-color)')
8742
- .attr('y', 32); // Move date label down
8743
- }
8744
- else {
8745
- d3.select(this)
8746
- .attr('class', 'lib-xaxis-labels-texts-drilldown')
8747
- .style('fill', 'var(--chart-text-color)');
8748
- }
8749
- });
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)
8750
8738
  }
8751
8739
  else {
8752
8740
  svg
@@ -8818,9 +8806,15 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8818
8806
  .selectAll('g.x1.axis1 g.tick text')
8819
8807
  .attr('class', 'lib-xaxis-labels-texts-drilldown')
8820
8808
  .style('font-size', this.isHeaderVisible ? '18px' : '14px')
8821
- .attr('y', this.isHeaderVisible
8822
- ? short_tick_length_bg + 25
8823
- : short_tick_length_bg)
8809
+ .attr('y', function (d) {
8810
+ // If grouped chart, no xLabel, and label is a date, add +25
8811
+ if (subgroups.length > 1 &&
8812
+ !metaData.xLabel &&
8813
+ (/\d{2,4}[-\/]\d{2}[-\/]\d{2,4}/.test(d) || /\d{2,4}[-\/]\d{2,4}/.test(d))) {
8814
+ return (self.isHeaderVisible ? short_tick_length_bg + 25 : short_tick_length_bg) + 25;
8815
+ }
8816
+ return self.isHeaderVisible ? short_tick_length_bg + 25 : short_tick_length_bg;
8817
+ })
8824
8818
  .attr('x', function (d) {
8825
8819
  if (self.chartData.data.length > 8 && !self.isZoomedOut) {
8826
8820
  return -25; // Move first line text slightly to the left too