axidio-styleguide-library1-v2 0.1.22 → 0.1.24

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.
@@ -8782,6 +8782,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8782
8782
  .selectAll('g.x1.axis1 g.tick text')
8783
8783
  .attr('class', 'lib-xaxis-labels-texts-drilldown')
8784
8784
  .style('font-size', this.isHeaderVisible ? '18px' : '14px')
8785
+ .attr('text-anchor', 'middle')
8785
8786
  .attr('y', function (d) {
8786
8787
  // For grouped bar charts with many bars and xLabel present, only add 5 if the label is a date
8787
8788
  if (subgroups.length > 1 && data.length > 8 && metaData.xLabel) {
@@ -9077,11 +9078,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9077
9078
  .data(data)
9078
9079
  .enter()
9079
9080
  .append('g')
9080
- .attr('transform', function (d, i) {
9081
- // For grouped bar charts, decrease the translate value for the first bar only
9082
- if (subgroups.length > 1 && i === 0) {
9083
- return 'translate(' + (x(d.name) - 10) + ',0)';
9084
- }
9081
+ .attr('transform', function (d) {
9085
9082
  return 'translate(' + x(d.name) + ',0)';
9086
9083
  });
9087
9084
  state
@@ -9144,6 +9141,14 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9144
9141
  });
9145
9142
  return tempScale(d.key);
9146
9143
  }
9144
+ // For grouped bar charts in zoom-in view, increase x value for the first bar only
9145
+ if (subgroups.length > 1 && !self.isZoomedOut) {
9146
+ // Find index of this bar in the data array
9147
+ const barIndex = data.findIndex((indiv) => indiv.name === d.name);
9148
+ if (barIndex === 0) {
9149
+ return xSubgroup(d.key) - 10;
9150
+ }
9151
+ }
9147
9152
  return xSubgroup(d.key);
9148
9153
  })
9149
9154
  .attr('y', function (d) {