axidio-styleguide-library1-v2 0.0.783 → 0.0.785

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: 2,
8422
+ defaultBarHeight: 4,
8423
8423
  };
8424
8424
  this.uniqueId = this.getUniqueId();
8425
8425
  this.isZoomedOut = false;
@@ -8453,7 +8453,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8453
8453
  return false;
8454
8454
  }
8455
8455
  get isAlertEnabled() {
8456
- return this.chartConfiguration?.headerMenuOptions?.some((option) => option.id === 'editAlert');
8456
+ return this.chartConfiguration?.headerMenuOptions?.some(option => option.id === 'editAlert');
8457
8457
  }
8458
8458
  initializegroupChart() {
8459
8459
  var self = this;
@@ -8594,7 +8594,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8594
8594
  var svgYAxisLeft = outerContainer
8595
8595
  .append('svg')
8596
8596
  .attr('width', '100')
8597
- .attr('height', height + margin.top + margin.bottom + 10)
8597
+ .attr('height', (height + margin.top + margin.bottom) + 10)
8598
8598
  .style('position', 'absolute')
8599
8599
  .style('left', '0')
8600
8600
  .style('z-index', 1)
@@ -8603,7 +8603,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8603
8603
  var svgYAxisRight = outerContainer
8604
8604
  .append('svg')
8605
8605
  .attr('width', rightSvgWidth)
8606
- .attr('height', height + margin.top + margin.bottom + 10)
8606
+ .attr('height', (height + margin.top + margin.bottom) + 10)
8607
8607
  .style('position', 'absolute')
8608
8608
  .style('right', '12px')
8609
8609
  .style('z-index', 1)
@@ -8618,7 +8618,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8618
8618
  .append('svg')
8619
8619
  // .attr('id', self.uniqueId)
8620
8620
  .attr('width', width - rightSvgWidth)
8621
- .attr('height', height + margin.top + margin.bottom + 30)
8621
+ .attr('height', (height + margin.top + margin.bottom) + 30)
8622
8622
  // .call(ChartHelper.responsivefy)
8623
8623
  .append('g')
8624
8624
  .attr('transform', 'translate(' + 0 + ',' + margin.top + ')');
@@ -8676,8 +8676,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8676
8676
  .call(d3.axisBottom(x))
8677
8677
  .call((g) => g.select('.domain').remove());
8678
8678
  svg.selectAll('g.x1.axis1 g.tick line').remove();
8679
- svg
8680
- .selectAll('g.x1.axis1 g.tick text')
8679
+ svg.selectAll('g.x1.axis1 g.tick text')
8681
8680
  .attr('class', 'lib-xaxis-labels-texts-drilldown')
8682
8681
  .style('fill', 'var(--chart-text-color)');
8683
8682
  // .attr('y', function () {
@@ -8764,16 +8763,17 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8764
8763
  }
8765
8764
  return d.toLowerCase();
8766
8765
  });
8767
- svg.selectAll('g.x1.axis1 g.tick').each((d) => {
8768
- // Only append second <text> for non-date labels
8769
- if (!/\d{2,4}[-\/]/.test(d) && d.trim().indexOf(' ') > -1) {
8770
- d3.select(this)
8771
- .append('text')
8772
- .attr('class', 'lib-xaxis-labels-texts-drilldown')
8773
- .attr('y', long_tick_length_bg)
8774
- .attr('fill', 'var(--chart-text-color)')
8775
- .text(d.trim().substring(d.indexOf(' '), d.length).toLowerCase());
8766
+ svg
8767
+ .selectAll('g.x1.axis1 g.tick')
8768
+ .append('text')
8769
+ .attr('class', 'lib-xaxis-labels-texts-drilldown')
8770
+ .attr('y', long_tick_length_bg)
8771
+ .attr('fill', 'var(--chart-text-color)')
8772
+ .text(function (d) {
8773
+ if (d.trim().indexOf(' ') > -1) {
8774
+ return d.trim().substring(d.indexOf(' '), d.length).toLowerCase();
8776
8775
  }
8776
+ return '';
8777
8777
  });
8778
8778
  }
8779
8779
  /**y scale for left y axis */
@@ -8887,14 +8887,6 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8887
8887
  });
8888
8888
  }
8889
8889
  var xSubgroup = d3.scaleBand().domain(subgroups);
8890
- if (this.isZoomedOut) {
8891
- // Wider bars in zoomed-out view
8892
- xSubgroup.range([0, x.bandwidth()]).padding(0.1);
8893
- }
8894
- else {
8895
- // Narrower bars in zoomed-in view
8896
- xSubgroup.range([0, x.bandwidth()]).padding(0.3); // Increased padding makes bars narrower
8897
- }
8898
8890
  if (this.chartConfiguration.isMultiChartGridLine == undefined) {
8899
8891
  xSubgroup.range([0, x.bandwidth()]);
8900
8892
  }
@@ -8987,10 +8979,14 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8987
8979
  if (d.value == -1) {
8988
8980
  return y(0);
8989
8981
  }
8990
- if (d.value >= 0) {
8991
- const barHeight = height - y(d.value);
8992
- const minHeight = self.chartConfiguration.defaultBarHeight || 2;
8993
- return barHeight < minHeight ? y(0) - minHeight : y(d.value);
8982
+ if (d.value) {
8983
+ // For values between 0 and 10, position bar at baseline with default height
8984
+ if (d.value <= 10 && d.value >= 0) {
8985
+ const defaultHeight = self.chartConfiguration.defaultBarHeight || 8;
8986
+ return y(0) - defaultHeight;
8987
+ }
8988
+ // For values greater than 10, use normal calculated position
8989
+ return y(d.value);
8994
8990
  }
8995
8991
  return y(0);
8996
8992
  })
@@ -9028,19 +9024,19 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9028
9024
  });
9029
9025
  return tempScale.bandwidth();
9030
9026
  }
9031
- if (!self.isZoomedOut) {
9032
- return xSubgroup.bandwidth() * 0.8; // Reduce width by 20%
9033
- }
9034
9027
  return xSubgroup.bandwidth();
9035
9028
  })
9036
9029
  .attr('height', function (d) {
9037
9030
  if (d.value == -1) {
9038
9031
  return height - y(0);
9039
9032
  }
9040
- if (d.value >= 0) {
9041
- const barHeight = height - y(d.value);
9042
- const minHeight = self.chartConfiguration.defaultBarHeight || 2;
9043
- return Math.max(barHeight, minHeight);
9033
+ if (d.value) {
9034
+ // For values between 0 and 10 (inclusive), use default height
9035
+ if (d.value <= 10 && d.value >= 0) {
9036
+ return self.chartConfiguration.defaultBarHeight || 8;
9037
+ }
9038
+ // For values greater than 10, use calculated height
9039
+ return height - y(d.value);
9044
9040
  }
9045
9041
  return height - y(0);
9046
9042
  })
@@ -9369,10 +9365,10 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9369
9365
  .tickSize(0)
9370
9366
  .ticks(self.chartConfiguration.numberOfYTicks)
9371
9367
  .tickFormat(function (d) {
9372
- if (self.chartConfiguration.yAxisLabelFomatter) {
9373
- return self.chartConfiguration.yAxisLabelFomatter(d);
9374
- }
9375
- return d;
9368
+ const formatted = self.chartConfiguration.yAxisLabelFomatter
9369
+ ? self.chartConfiguration.yAxisLabelFomatter(d)
9370
+ : d;
9371
+ return formatted >= 1000 ? formatted / 1000 + 'k' : formatted;
9376
9372
  }))
9377
9373
  .call((g) => {
9378
9374
  // Style the domain line for theme support
@@ -9459,7 +9455,8 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9459
9455
  text.text(null); // Clear current text
9460
9456
  // Add each word to a new tspan
9461
9457
  words.forEach((word, index) => {
9462
- text.append('tspan').text(word);
9458
+ text.append('tspan')
9459
+ .text(word);
9463
9460
  // .attr('x', '15')
9464
9461
  // .attr('dy', index === 0 ? '0em' : '0.9em') // Reduced vertical spacing
9465
9462
  // .attr('text-anchor', 'end');
@@ -9468,8 +9465,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9468
9465
  .style('fill', 'var(--chart-text-color)')
9469
9466
  .attr('transform', null); // Remove rotate if using line breaks
9470
9467
  // Optional: Adjust bottom margin or chart layout
9471
- svg
9472
- .select('.x-axis')
9468
+ svg.select('.x-axis')
9473
9469
  .attr('transform', `translate(0, ${height - margin.bottom + 10})`);
9474
9470
  }
9475
9471
  /**
@@ -9481,7 +9477,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9481
9477
  .attr('class', 'lib-axis-group-label font-size-1')
9482
9478
  .attr('style', self.chartConfiguration.yAxisCustomlabelStyles)
9483
9479
  .attr('transform', 'rotate(-90)')
9484
- .attr('y', 0 - margin.left / 2 - 30)
9480
+ .attr('y', 0 - (margin.left / 2) - 30)
9485
9481
  .attr('x', 0 - height / 2)
9486
9482
  .attr('dy', '1em')
9487
9483
  .style('text-anchor', 'middle')