axidio-styleguide-library1-v2 0.0.810 → 0.0.812

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.
@@ -8694,7 +8694,17 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8694
8694
  svg
8695
8695
  .selectAll('g.x1.axis1 g.tick text')
8696
8696
  .attr('class', 'lib-xaxis-labels-texts-drilldown')
8697
- .style('fill', 'var(--chart-text-color)');
8697
+ .style('fill', 'var(--chart-text-color)')
8698
+ .attr('transform', function (d) {
8699
+ if (self.isZoomedOut) {
8700
+ return 'translate(0, 0)'; // Default position when zoomed out
8701
+ }
8702
+ else {
8703
+ // When zoomed in, shift labels left
8704
+ const leftOffset = -x.bandwidth() * 0.1; // Shift left by 10% of bandwidth
8705
+ return `translate(${leftOffset}, 0)`;
8706
+ }
8707
+ });
8698
8708
  // .attr('y', function () {
8699
8709
  // if (alternate_text) {
8700
8710
  // alternate_text = false;
@@ -8759,6 +8769,15 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8759
8769
  .selectAll('g.x1.axis1 g.tick text')
8760
8770
  .attr('class', 'lib-xaxis-labels-texts-drilldown')
8761
8771
  .attr('y', short_tick_length_bg)
8772
+ .attr('x', function (d) {
8773
+ // SAME adjustment as first line for consistent alignment
8774
+ if (self.isZoomedOut) {
8775
+ return 0; // Default position when zoomed out
8776
+ }
8777
+ else {
8778
+ return -x.bandwidth() * 0.08; // Shift left when zoomed in - SAME VALUE
8779
+ }
8780
+ })
8762
8781
  .text(function (d) {
8763
8782
  var isValueToBeIgnored = false;
8764
8783
  data.map((indiv) => {
@@ -8787,6 +8806,15 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8787
8806
  .append('text')
8788
8807
  .attr('class', 'lib-xaxis-labels-texts-drilldown')
8789
8808
  .attr('y', long_tick_length_bg)
8809
+ .attr('x', function (d) {
8810
+ // Adjust position based on zoom state
8811
+ if (self.isZoomedOut) {
8812
+ return 0; // Default position when zoomed out
8813
+ }
8814
+ else {
8815
+ return -x.bandwidth() * 0.08; // Shift left when zoomed in
8816
+ }
8817
+ })
8790
8818
  .attr('fill', 'var(--chart-text-color)')
8791
8819
  .text(function (d) {
8792
8820
  if (d.trim().indexOf(' ') > -1) {