axidio-styleguide-library1-v2 0.0.925 → 0.0.927
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.
|
@@ -8728,25 +8728,13 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8728
8728
|
.call(d3.axisBottom(x))
|
|
8729
8729
|
.call((g) => g.select('.domain').remove());
|
|
8730
8730
|
svg.selectAll('g.x1.axis1 g.tick line').remove();
|
|
8731
|
-
//
|
|
8732
|
-
if (subgroups.length > 1
|
|
8733
|
-
) {
|
|
8731
|
+
// Only move x-axis labels further down for grouped charts if there is no xLabel
|
|
8732
|
+
if (subgroups.length > 1 && !metaData.xLabel) {
|
|
8734
8733
|
svg
|
|
8735
8734
|
.selectAll('g.x1.axis1 g.tick text')
|
|
8736
|
-
.
|
|
8737
|
-
|
|
8738
|
-
|
|
8739
|
-
d3.select(this)
|
|
8740
|
-
.attr('class', 'lib-xaxis-labels-texts-drilldown')
|
|
8741
|
-
.style('fill', 'var(--chart-text-color)')
|
|
8742
|
-
.attr('y', 32); // Move date label down
|
|
8743
|
-
}
|
|
8744
|
-
else {
|
|
8745
|
-
d3.select(this)
|
|
8746
|
-
.attr('class', 'lib-xaxis-labels-texts-drilldown')
|
|
8747
|
-
.style('fill', 'var(--chart-text-color)');
|
|
8748
|
-
}
|
|
8749
|
-
});
|
|
8735
|
+
.attr('class', 'lib-xaxis-labels-texts-drilldown')
|
|
8736
|
+
.style('fill', 'var(--chart-text-color)')
|
|
8737
|
+
.attr('y', 32); // Increase distance from bars (default is ~9)
|
|
8750
8738
|
}
|
|
8751
8739
|
else {
|
|
8752
8740
|
svg
|
|
@@ -8818,9 +8806,16 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8818
8806
|
.selectAll('g.x1.axis1 g.tick text')
|
|
8819
8807
|
.attr('class', 'lib-xaxis-labels-texts-drilldown')
|
|
8820
8808
|
.style('font-size', this.isHeaderVisible ? '18px' : '14px')
|
|
8821
|
-
.attr('y',
|
|
8822
|
-
|
|
8823
|
-
|
|
8809
|
+
.attr('y', function (d) {
|
|
8810
|
+
// If grouped chart, no xLabel, and label is a date, add extra offset
|
|
8811
|
+
if (subgroups.length > 1 &&
|
|
8812
|
+
!metaData.xLabel &&
|
|
8813
|
+
(/\d{2,4}[-\/]\d{2}[-\/]\d{2,4}/.test(d) || /\d{2,4}[-\/]\d{2,4}/.test(d))) {
|
|
8814
|
+
// If header is visible, use a smaller offset (e.g., +15), else +25
|
|
8815
|
+
return (self.isHeaderVisible ? short_tick_length_bg + 15 : short_tick_length_bg + 25);
|
|
8816
|
+
}
|
|
8817
|
+
return self.isHeaderVisible ? short_tick_length_bg + 25 : short_tick_length_bg;
|
|
8818
|
+
})
|
|
8824
8819
|
.attr('x', function (d) {
|
|
8825
8820
|
if (self.chartData.data.length > 8 && !self.isZoomedOut) {
|
|
8826
8821
|
return -25; // Move first line text slightly to the left too
|