axidio-styleguide-library1-v2 0.0.936 → 0.0.938
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.
|
@@ -8806,28 +8806,20 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8806
8806
|
.selectAll('g.x1.axis1 g.tick text')
|
|
8807
8807
|
.attr('class', 'lib-xaxis-labels-texts-drilldown')
|
|
8808
8808
|
.style('font-size', this.isHeaderVisible ? '18px' : '14px')
|
|
8809
|
-
.style('font-weight', function (d) {
|
|
8810
|
-
// Make bold if grouped, no xLabel, date, and header not visible (+25 case)
|
|
8811
|
-
if (subgroups.length > 1 &&
|
|
8812
|
-
!metaData.xLabel &&
|
|
8813
|
-
!self.isHeaderVisible &&
|
|
8814
|
-
(/\d{2,4}[-\/]\d{2}[-\/]\d{2,4}/.test(d) || /\d{2,4}[-\/]\d{2,4}/.test(d))) {
|
|
8815
|
-
return 'bold';
|
|
8816
|
-
}
|
|
8817
|
-
return null;
|
|
8818
|
-
})
|
|
8819
8809
|
.attr('y', function (d) {
|
|
8820
|
-
//
|
|
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
|
|
8821
8815
|
let baseY = self.isHeaderVisible ? short_tick_length_bg + 25 : short_tick_length_bg;
|
|
8822
8816
|
if (subgroups.length > 1 &&
|
|
8823
8817
|
!metaData.xLabel &&
|
|
8824
8818
|
(/\d{2,4}[-\/]\d{2}[-\/]\d{2,4}/.test(d) || /\d{2,4}[-\/]\d{2,4}/.test(d))) {
|
|
8825
|
-
// If header is visible, use a smaller offset (e.g., +15), else +25
|
|
8826
8819
|
baseY = self.isHeaderVisible ? short_tick_length_bg + 15 : short_tick_length_bg + 25;
|
|
8827
8820
|
}
|
|
8828
|
-
// Add a little extra space if the date label contains a space (will be split into two lines)
|
|
8829
8821
|
if (/\d{2,4}[-\/]\d{2,4}/.test(d) && d.indexOf(' ') > -1) {
|
|
8830
|
-
baseY += 4;
|
|
8822
|
+
baseY += 4;
|
|
8831
8823
|
}
|
|
8832
8824
|
return baseY;
|
|
8833
8825
|
})
|