axidio-styleguide-library1-v2 0.0.946 → 0.0.947

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.
@@ -8809,19 +8809,11 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8809
8809
  .attr('y', function (d) {
8810
8810
  // For grouped bar charts with many bars and xLabel present, do NOT add extra space (avoid overlap)
8811
8811
  if (subgroups.length > 1 && data.length > 8 && metaData.xLabel) {
8812
- // In maximized (fullscreen) view, keep the gap minimal
8813
- if (self.chartConfiguration.isFullScreen) {
8814
- return short_tick_length_bg;
8815
- }
8816
8812
  return short_tick_length_bg;
8817
8813
  }
8818
- // For grouped bar charts with many bars and NO xLabel, add space as before, but reduce in fullscreen
8814
+ // For grouped bar charts with many bars and NO xLabel, add space as before
8819
8815
  if (subgroups.length > 1 && data.length > 8 && !metaData.xLabel) {
8820
8816
  const chartHasExtraBottom = (self.chartConfiguration.margin && self.chartConfiguration.margin.bottom >= 40);
8821
- if (self.chartConfiguration.isFullScreen) {
8822
- // Reduce extra gap in maximized view
8823
- return short_tick_length_bg + 2;
8824
- }
8825
8817
  return chartHasExtraBottom ? short_tick_length_bg : short_tick_length_bg + 10;
8826
8818
  }
8827
8819
  // Default/fallback logic for other cases
@@ -8834,10 +8826,6 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8834
8826
  if (/\d{2,4}[-\/]\d{2,4}/.test(d) && d.indexOf(' ') > -1) {
8835
8827
  baseY += 4;
8836
8828
  }
8837
- // In maximized view, reduce baseY slightly for grouped bars
8838
- if (self.chartConfiguration.isFullScreen && subgroups.length > 1) {
8839
- baseY = Math.max(short_tick_length_bg, baseY - 10);
8840
- }
8841
8829
  return baseY;
8842
8830
  })
8843
8831
  .attr('x', function (d) {
@@ -9309,7 +9297,10 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9309
9297
  .on('mouseout', handleMouseOut)
9310
9298
  .on('mouseover', handleMouseOver);
9311
9299
  }
9312
- if (this.chartConfiguration.displayTitleOnTop) {
9300
+ const shouldBindMouseEvents = this.chartConfiguration.displayTitleOnTop ||
9301
+ (this.chartConfiguration.textsOnBar === undefined &&
9302
+ this.chartConfiguration.displayTitleOnTop === undefined);
9303
+ if (shouldBindMouseEvents) {
9313
9304
  state
9314
9305
  .selectAll('rect')
9315
9306
  .on('mouseout', handleMouseOut)
@@ -9431,49 +9422,6 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9431
9422
  * display data values on mouse over
9432
9423
  * used by dashboard charts
9433
9424
  */
9434
- if (this.chartConfiguration.textsOnBar == undefined &&
9435
- this.chartConfiguration.displayTitleOnTop == undefined) {
9436
- state
9437
- .selectAll('rect')
9438
- .on('mouseout', function (d) {
9439
- state.selectAll('.barstext').remove();
9440
- })
9441
- .on('mouseover', function (d1) {
9442
- state
9443
- .selectAll('text')
9444
- .data(function (d) {
9445
- let newList = [];
9446
- subgroups.map(function (key) {
9447
- if (key !== 'name' &&
9448
- d1.key == key &&
9449
- d1.value == d[key] &&
9450
- d1.name == d.name) {
9451
- let obj = { key: key, value: d[key], name: d.name };
9452
- newList.push(obj);
9453
- }
9454
- });
9455
- return newList;
9456
- })
9457
- .enter()
9458
- .append('text')
9459
- .attr('fill', 'var(--chart-text-color)')
9460
- .attr('class', 'barstext')
9461
- .attr('x', function (d) {
9462
- return xSubgroup(d.key);
9463
- })
9464
- .attr('y', function (d) {
9465
- return y(d.value);
9466
- })
9467
- .attr('style', 'font-size: ' + '.85em' + ';' + ' font-weight:' + 'bold' + ';')
9468
- .style('fill', function (d) {
9469
- return metaData.colors[d.key];
9470
- })
9471
- .attr('width', self.isZoomedOut ? xSubgroup.bandwidth() : xSubgroup.bandwidth())
9472
- .text(function (d) {
9473
- return d.value;
9474
- });
9475
- });
9476
- }
9477
9425
  svg
9478
9426
  .append('g')
9479
9427
  .attr('class', 'x2 axis2')