axidio-styleguide-library1-v2 0.0.935 → 0.0.937

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.
@@ -8806,16 +8806,6 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8806
8806
  .selectAll('g.x1.axis1 g.tick text')
8807
8807
  .attr('class', 'lib-xaxis-labels-texts-drilldown')
8808
8808
  .style('font-size', this.isHeaderVisible ? '18px' : '14px')
8809
- .style('font-weight', function (d) {
8810
- // Make bold if grouped, no xLabel, date, and header not visible (+25 case)
8811
- if (subgroups.length > 1 &&
8812
- !metaData.xLabel &&
8813
- !self.isHeaderVisible &&
8814
- (/\d{2,4}[-\/]\d{2}[-\/]\d{2,4}/.test(d) || /\d{2,4}[-\/]\d{2,4}/.test(d))) {
8815
- return 'bold';
8816
- }
8817
- return null;
8818
- })
8819
8809
  .attr('y', function (d) {
8820
8810
  // If grouped chart, no xLabel, and label is a date, add extra offset
8821
8811
  let baseY = self.isHeaderVisible ? short_tick_length_bg + 25 : short_tick_length_bg;
@@ -8854,16 +8844,17 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8854
8844
  return '';
8855
8845
  }
8856
8846
  // If label looks like a date (contains digits and - or /)
8857
- if (/\d{2,4}[-\/]/.test(d)) {
8858
- // If there is a space, show the part after the space on the next line
8859
- if (d.indexOf(' ') > -1) {
8847
+ const isDateLabel = /\d{2,4}[-\/]/.test(d);
8848
+ // Only split date/week labels if there are many grouped bars and header is not visible
8849
+ if (isDateLabel) {
8850
+ if (!self.isHeaderVisible && data.length > 8 && d.indexOf(' ') > -1) {
8860
8851
  var first = d.substring(0, d.indexOf(' '));
8861
8852
  var second = d.substring(d.indexOf(' ') + 1).trim();
8862
- // Use tspan for line break if supported, else join with \n
8863
- // If SVG tspan is supported, this will be split into two lines by the .each below
8864
8853
  return first + '\n' + second;
8865
8854
  }
8866
- return d;
8855
+ else {
8856
+ return d;
8857
+ }
8867
8858
  }
8868
8859
  if (d.trim().indexOf(' ') > -1) {
8869
8860
  return d.trim().substring(0, d.indexOf(' ')).toLowerCase();