axidio-styleguide-library1-v2 0.6.24 → 0.6.25

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.
@@ -6717,8 +6717,8 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6717
6717
  let barWidth;
6718
6718
  let barPadding;
6719
6719
  if (!this.isZoomedOut && dataLength > this.CONSTANTS.ZOOM_IN_THRESHOLD) {
6720
- barWidth = 60;
6721
- barPadding = 50;
6720
+ barWidth = 80;
6721
+ barPadding = 40;
6722
6722
  }
6723
6723
  else if (isMobileOrTablet) {
6724
6724
  if (dataLength === 1) {
@@ -6760,11 +6760,6 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6760
6760
  requiredSvgWidth,
6761
6761
  };
6762
6762
  }
6763
- scrollToCenter(scrollableContainer, svgWidth) {
6764
- const containerWidth = scrollableContainer.node().getBoundingClientRect().width;
6765
- const scrollPosition = (svgWidth - containerWidth) / 2;
6766
- scrollableContainer.node().scrollLeft = Math.max(0, scrollPosition);
6767
- }
6768
6763
  createSvgContainers(chartContainer, dimensions, margin, hasXLabel // Add this parameter
6769
6764
  ) {
6770
6765
  // Calculate total height including space for X-axis label if present
@@ -6847,7 +6842,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6847
6842
  .style('align-items', 'center')
6848
6843
  .style('background-color', 'var(--card-bg)')
6849
6844
  .style('z-index', '10');
6850
- return { svg, svgYAxisLeft, svgYAxisRight, innerContainer, bottomLabelContainer, scrollableContainer };
6845
+ return { svg, svgYAxisLeft, svgYAxisRight, innerContainer, bottomLabelContainer };
6851
6846
  }
6852
6847
  createScales(data, layers, lineData, dimensions) {
6853
6848
  const { width, height, barWidth, barPadding } = dimensions;
@@ -7187,7 +7182,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7187
7182
  const margin = this.chartConfiguration.margin;
7188
7183
  const dimensions = this.calculateDimensions(chartContainer, verticalstackedcontainer, margin, data.length);
7189
7184
  const hasXLabel = !!metaData.xLabel;
7190
- const { svg, svgYAxisLeft, svgYAxisRight, bottomLabelContainer, scrollableContainer } = this.createSvgContainers(chartContainer, dimensions, margin, hasXLabel);
7185
+ const { svg, svgYAxisLeft, svgYAxisRight, bottomLabelContainer } = this.createSvgContainers(chartContainer, dimensions, margin, hasXLabel);
7191
7186
  const stack = d3.stack().keys(keyList).offset(d3.stackOffsetNone);
7192
7187
  const layers = stack(data);
7193
7188
  data.sort((a, b) => b.total - a.total);
@@ -7201,11 +7196,6 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7201
7196
  this.renderTargetLine(svg, svgYAxisRight, scales, dimensions, metaData);
7202
7197
  this.renderDataLabels(rect, scales, metaData, dimensions);
7203
7198
  this.renderLineChart(svg, lineData, scales, colors, metaData);
7204
- if (!this.isZoomedOut && data.length > this.CONSTANTS.ZOOM_IN_THRESHOLD) {
7205
- setTimeout(() => {
7206
- this.scrollToCenter(scrollableContainer, dimensions.requiredSvgWidth);
7207
- }, 0);
7208
- }
7209
7199
  }
7210
7200
  renderGrids(svg, scales, dimensions) {
7211
7201
  if (this.chartConfiguration.isXgridBetweenLabels) {