axidio-styleguide-library1-v2 0.0.799 → 0.0.800

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.
@@ -8150,8 +8150,11 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
8150
8150
  .style('stroke-width', '1px');
8151
8151
  }
8152
8152
  styleAxisDomain();
8153
+ // Always render y-axis label after axis/grid so it is visible
8153
8154
  if (metaData.yLabel) {
8155
+ // Remove any previous y-axis label to avoid duplicates
8154
8156
  svgYAxisLeft.selectAll('.lib-axis-group-label, .lib-ylabel-drilldowncharts, .lib-ylabel-weeklyCharts').remove();
8157
+ // Helper to check if label is an acronym (all uppercase or <=4 chars and all letters)
8155
8158
  function isAcronym(label) {
8156
8159
  return (label.length <= 4 && /^[A-Z]+$/.test(label)) || (label === label.toUpperCase() && /[A-Z]/.test(label));
8157
8160
  }
@@ -8237,27 +8240,9 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
8237
8240
  .text(metaData.lineyLabel);
8238
8241
  }
8239
8242
  if (metaData.xLabel) {
8240
- function isAcronym(label) {
8241
- return (label.length <= 4 && /^[A-Z]+$/.test(label)) || (label === label.toUpperCase() && /[A-Z]/.test(label));
8242
- }
8243
- const xLabelText = metaData.xLabel;
8244
- const isAcr = isAcronym(xLabelText.replace(/[^A-Za-z]/g, ''));
8245
8243
  svg
8246
8244
  .append('text')
8247
- .attr('class', function () {
8248
- if (self.chartConfiguration.isDrilldownChart)
8249
- return 'lib-xlabel-drilldowncharts';
8250
- if (self.chartConfiguration.isMultiChartGridLine != undefined)
8251
- return 'lib-xlabel-weeklyCharts';
8252
- return 'lib-axis-waterfall-label font-size-1';
8253
- })
8254
- .attr('style', self.chartConfiguration.xAxisCustomlabelStyles)
8255
- .attr('transform', 'translate(' + width / 2 + ' ,' + (height + margin.top + 40) + ')')
8256
- .style('text-anchor', 'middle')
8257
- .style('fill', 'var(--chart-text-color)')
8258
- .style('color', 'var(--chart-text-color)')
8259
- .text(isAcr ? xLabelText.toUpperCase() : xLabelText.toLowerCase())
8260
- .style('text-transform', isAcr ? 'none' : 'capitalize');
8245
+ .attr('class', 'lib-axis-waterfall-label');
8261
8246
  }
8262
8247
  if (lineData && colors) {
8263
8248
  var dataGroup = d3
@@ -9043,7 +9028,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9043
9028
  });
9044
9029
  return tempScale.bandwidth();
9045
9030
  }
9046
- return xSubgroup.bandwidth();
9031
+ return self.isZoomedOut ? xSubgroup.bandwidth() : xSubgroup.bandwidth() * 0.5;
9047
9032
  })
9048
9033
  .attr('height', function (d) {
9049
9034
  if (d.value == -1) {
@@ -9322,7 +9307,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9322
9307
  .on('mouseout', function (d) {
9323
9308
  state.selectAll('.barstext').remove();
9324
9309
  })
9325
- .on('mouseover', (d1) => {
9310
+ .on('mouseover', function (d1) {
9326
9311
  state
9327
9312
  .selectAll('text')
9328
9313
  .data(function (d) {
@@ -9352,10 +9337,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9352
9337
  .style('fill', function (d) {
9353
9338
  return metaData.colors[d.key];
9354
9339
  })
9355
- // .attr('width', xSubgroup.bandwidth())
9356
- // .attr('width', this.isZoomedOut ? xSubgroup.bandwidth() : xSubgroup.bandwidth() * 0.6)
9357
- .attr('x', (d) => xSubgroup(d.key) +
9358
- (this.isZoomedOut ? 0 : (xSubgroup.bandwidth() * 0.4) / 2))
9340
+ .attr('width', xSubgroup.bandwidth())
9359
9341
  .text(function (d) {
9360
9342
  return d.value;
9361
9343
  });