axidio-styleguide-library1-v2 0.0.937 → 0.0.939
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.
|
@@ -8807,17 +8807,19 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8807
8807
|
.attr('class', 'lib-xaxis-labels-texts-drilldown')
|
|
8808
8808
|
.style('font-size', this.isHeaderVisible ? '18px' : '14px')
|
|
8809
8809
|
.attr('y', function (d) {
|
|
8810
|
-
//
|
|
8810
|
+
// For grouped bar charts with many bars, always use a fixed y-offset for label consistency
|
|
8811
|
+
if (subgroups.length > 1 && data.length > 8) {
|
|
8812
|
+
return short_tick_length_bg + 20;
|
|
8813
|
+
}
|
|
8814
|
+
// Default/fallback logic for other cases
|
|
8811
8815
|
let baseY = self.isHeaderVisible ? short_tick_length_bg + 25 : short_tick_length_bg;
|
|
8812
8816
|
if (subgroups.length > 1 &&
|
|
8813
8817
|
!metaData.xLabel &&
|
|
8814
8818
|
(/\d{2,4}[-\/]\d{2}[-\/]\d{2,4}/.test(d) || /\d{2,4}[-\/]\d{2,4}/.test(d))) {
|
|
8815
|
-
// If header is visible, use a smaller offset (e.g., +15), else +25
|
|
8816
8819
|
baseY = self.isHeaderVisible ? short_tick_length_bg + 15 : short_tick_length_bg + 25;
|
|
8817
8820
|
}
|
|
8818
|
-
// Add a little extra space if the date label contains a space (will be split into two lines)
|
|
8819
8821
|
if (/\d{2,4}[-\/]\d{2,4}/.test(d) && d.indexOf(' ') > -1) {
|
|
8820
|
-
baseY += 4;
|
|
8822
|
+
baseY += 4;
|
|
8821
8823
|
}
|
|
8822
8824
|
return baseY;
|
|
8823
8825
|
})
|