axidio-styleguide-library1-v2 0.0.951 → 0.0.953

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.
@@ -8836,11 +8836,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8836
8836
  })
8837
8837
  .text(function (d) {
8838
8838
  var isValueToBeIgnored = false;
8839
- // Check if this should show truncated text (mobile or ria conditions)
8840
- const shouldTruncate = (isMobile && !self.isHeaderVisible) || (isria && self.chartData.data.length > 8);
8841
- console.log('shouldTruncate:', shouldTruncate, 'isMobile:', isMobile, 'isHeaderVisible:', self.isHeaderVisible, 'isria:', isria, 'data.length:', self.chartData.data.length);
8842
- alert(self.chartData.data.length);
8843
- if (shouldTruncate) {
8839
+ if (isMobile && !self.isHeaderVisible) {
8844
8840
  let firstPart = d.split(/[\s\-]+/)[0];
8845
8841
  return firstPart.substring(0, 3).toLowerCase();
8846
8842
  }
@@ -8896,11 +8892,23 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8896
8892
  });
8897
8893
  }
8898
8894
  }
8899
- if ((isMobile && !self.isHeaderVisible) || (isria && self.chartData.data.length > 8)) {
8895
+ if (isMobile && !this.isHeaderVisible) {
8900
8896
  svg
8901
8897
  .selectAll('g.x1.axis1 g.tick text')
8902
8898
  .classed('mobile-xaxis-override', true);
8903
8899
  }
8900
+ if (isria && self.chartData.data.length > 8) {
8901
+ svg
8902
+ .selectAll('g.x1.axis1 g.tick text')
8903
+ .classed('mobile-xaxis-override', true)
8904
+ .text(function (d) {
8905
+ return d.substring(0, 3);
8906
+ })
8907
+ .style('font-size', '12px') // reduce font size
8908
+ .attr('y', -5) // move text up
8909
+ .attr('x', 0) // center align
8910
+ .style('text-anchor', 'middle'); // align text horizontally center
8911
+ }
8904
8912
  /**y scale for left y axis */
8905
8913
  var y = d3.scaleLinear().rangeRound([height, 0]);
8906
8914
  var maxValue = d3.max(data, (d) => d3.max(keyList, (key) => +d[key]));