axidio-styleguide-library1-v2 0.0.922 → 0.0.924
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,10 +8728,33 @@ 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
|
-
|
|
8733
|
-
.
|
|
8734
|
-
.
|
|
8731
|
+
// Move x-axis label down only if: grouped chart, one group, no xLabel, and label is a date
|
|
8732
|
+
if (subgroups.length > 1 &&
|
|
8733
|
+
data.length === 1 &&
|
|
8734
|
+
!metaData.xLabel) {
|
|
8735
|
+
svg
|
|
8736
|
+
.selectAll('g.x1.axis1 g.tick text')
|
|
8737
|
+
.each(function (d, i, nodes) {
|
|
8738
|
+
// Check if label is a date (e.g., 08/04/25 or 2025-08-04)
|
|
8739
|
+
if (/\d{2,4}[-\/]\d{2}[-\/]\d{2,4}/.test(d) || /\d{2,4}[-\/]\d{2,4}/.test(d)) {
|
|
8740
|
+
d3.select(this)
|
|
8741
|
+
.attr('class', 'lib-xaxis-labels-texts-drilldown')
|
|
8742
|
+
.style('fill', 'var(--chart-text-color)')
|
|
8743
|
+
.attr('y', 32); // Move date label down
|
|
8744
|
+
}
|
|
8745
|
+
else {
|
|
8746
|
+
d3.select(this)
|
|
8747
|
+
.attr('class', 'lib-xaxis-labels-texts-drilldown')
|
|
8748
|
+
.style('fill', 'var(--chart-text-color)');
|
|
8749
|
+
}
|
|
8750
|
+
});
|
|
8751
|
+
}
|
|
8752
|
+
else {
|
|
8753
|
+
svg
|
|
8754
|
+
.selectAll('g.x1.axis1 g.tick text')
|
|
8755
|
+
.attr('class', 'lib-xaxis-labels-texts-drilldown')
|
|
8756
|
+
.style('fill', 'var(--chart-text-color)');
|
|
8757
|
+
}
|
|
8735
8758
|
// .attr('y', function () {
|
|
8736
8759
|
// if (alternate_text) {
|
|
8737
8760
|
// alternate_text = false;
|