axidio-styleguide-library1-v2 0.2.36 → 0.2.38

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.
@@ -9014,8 +9014,28 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9014
9014
  }
9015
9015
  // Mobile override
9016
9016
  if (isMobile && !this.isHeaderVisible) {
9017
- svg.selectAll('g.x1.axis1 g.tick text')
9018
- .classed('mobile-xaxis-override', true);
9017
+ const textNodes = svg.selectAll('g.x1.axis1 g.tick text');
9018
+ // Check if we have dates in x-axis
9019
+ let hasDateValues = false;
9020
+ textNodes.each(function (d) {
9021
+ if (!hasDateValues && !isNaN(Date.parse(d))) {
9022
+ hasDateValues = true;
9023
+ }
9024
+ });
9025
+ if (hasDateValues && subgroups.length === 1) {
9026
+ // For single chart with dates, show horizontally
9027
+ textNodes
9028
+ .classed('mobile-xaxis-override', true)
9029
+ .style('text-anchor', 'end')
9030
+ .attr('transform', 'rotate(0)')
9031
+ .attr('dx', '-0.5em')
9032
+ .attr('dy', '0.5em')
9033
+ .attr('y', 10);
9034
+ }
9035
+ else {
9036
+ // Default mobile behavior
9037
+ textNodes.classed('mobile-xaxis-override', true);
9038
+ }
9019
9039
  }
9020
9040
  }
9021
9041
  applyXLabelsOnSameLine(svg, subgroups, data, metaData, self, shortTickLengthBg, isMobile, isria) {