axidio-styleguide-library1-v2 0.0.780 → 0.0.782

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.
@@ -8419,7 +8419,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8419
8419
  isDisplayBarDetailsAtBottom: undefined,
8420
8420
  howmanyBarDetailsToDisplay: 0,
8421
8421
  barVauleColor: undefined,
8422
- defaultBarHeight: 4,
8422
+ defaultBarHeight: 2,
8423
8423
  };
8424
8424
  this.uniqueId = this.getUniqueId();
8425
8425
  this.isZoomedOut = false;
@@ -8754,6 +8754,10 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8754
8754
  if (isValueToBeIgnored) {
8755
8755
  return '';
8756
8756
  }
8757
+ // If label looks like a date (contains digits and - or /), show full label as one line
8758
+ if (/\d{2,4}[-\/]/.test(d)) {
8759
+ return d;
8760
+ }
8757
8761
  if (d.trim().indexOf(' ') > -1) {
8758
8762
  return d.trim().substring(0, d.indexOf(' ')).toLowerCase();
8759
8763
  }
@@ -8761,15 +8765,16 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8761
8765
  });
8762
8766
  svg
8763
8767
  .selectAll('g.x1.axis1 g.tick')
8764
- .append('text')
8765
- .attr('class', 'lib-xaxis-labels-texts-drilldown')
8766
- .attr('y', long_tick_length_bg)
8767
- .attr('fill', 'var(--chart-text-color)')
8768
- .text(function (d) {
8769
- if (d.trim().indexOf(' ') > -1) {
8770
- return d.trim().substring(d.indexOf(' '), d.length).toLowerCase();
8768
+ .each((d) => {
8769
+ // Only append second <text> for non-date labels
8770
+ if (!/\d{2,4}[-\/]/.test(d) && d.trim().indexOf(' ') > -1) {
8771
+ d3.select(this)
8772
+ .append('text')
8773
+ .attr('class', 'lib-xaxis-labels-texts-drilldown')
8774
+ .attr('y', long_tick_length_bg)
8775
+ .attr('fill', 'var(--chart-text-color)')
8776
+ .text(d.trim().substring(d.indexOf(' '), d.length).toLowerCase());
8771
8777
  }
8772
- return '';
8773
8778
  });
8774
8779
  }
8775
8780
  /**y scale for left y axis */
@@ -8975,14 +8980,10 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8975
8980
  if (d.value == -1) {
8976
8981
  return y(0);
8977
8982
  }
8978
- if (d.value) {
8979
- // For values between 0 and 10, position bar at baseline with default height
8980
- if (d.value <= 10 && d.value >= 0) {
8981
- const defaultHeight = self.chartConfiguration.defaultBarHeight || 8;
8982
- return y(0) - defaultHeight;
8983
- }
8984
- // For values greater than 10, use normal calculated position
8985
- return y(d.value);
8983
+ if (d.value >= 0) {
8984
+ const barHeight = height - y(d.value);
8985
+ const minHeight = self.chartConfiguration.defaultBarHeight || 2;
8986
+ return barHeight < minHeight ? y(0) - minHeight : y(d.value);
8986
8987
  }
8987
8988
  return y(0);
8988
8989
  })
@@ -9026,13 +9027,10 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9026
9027
  if (d.value == -1) {
9027
9028
  return height - y(0);
9028
9029
  }
9029
- if (d.value) {
9030
- // For values between 0 and 10 (inclusive), use default height
9031
- if (d.value <= 10 && d.value >= 0) {
9032
- return self.chartConfiguration.defaultBarHeight || 8;
9033
- }
9034
- // For values greater than 10, use calculated height
9035
- return height - y(d.value);
9030
+ if (d.value >= 0) {
9031
+ const barHeight = height - y(d.value);
9032
+ const minHeight = self.chartConfiguration.defaultBarHeight || 2;
9033
+ return Math.max(barHeight, minHeight);
9036
9034
  }
9037
9035
  return height - y(0);
9038
9036
  })
@@ -9361,10 +9359,10 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9361
9359
  .tickSize(0)
9362
9360
  .ticks(self.chartConfiguration.numberOfYTicks)
9363
9361
  .tickFormat(function (d) {
9364
- const formatted = self.chartConfiguration.yAxisLabelFomatter
9365
- ? self.chartConfiguration.yAxisLabelFomatter(d)
9366
- : d;
9367
- return formatted >= 1000 ? formatted / 1000 + 'k' : formatted;
9362
+ if (self.chartConfiguration.yAxisLabelFomatter) {
9363
+ return self.chartConfiguration.yAxisLabelFomatter(d);
9364
+ }
9365
+ return d;
9368
9366
  }))
9369
9367
  .call((g) => {
9370
9368
  // Style the domain line for theme support