axidio-styleguide-library1-v2 0.0.822 → 0.0.824
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.
|
@@ -8765,10 +8765,8 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8765
8765
|
.text(function (d) {
|
|
8766
8766
|
var isValueToBeIgnored = false;
|
|
8767
8767
|
if (isMobile) {
|
|
8768
|
-
let
|
|
8769
|
-
|
|
8770
|
-
return trmLabel.substring(0, 3).toLowerCase();
|
|
8771
|
-
}
|
|
8768
|
+
let firstPart = d.split(/[\s\-]+/)[0];
|
|
8769
|
+
return firstPart.substring(0, 3).toLowerCase();
|
|
8772
8770
|
}
|
|
8773
8771
|
data.map((indiv) => {
|
|
8774
8772
|
if (indiv.name.toLowerCase() == d.trim().toLowerCase() &&
|
|
@@ -8788,21 +8786,23 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8788
8786
|
}
|
|
8789
8787
|
return d.toLowerCase();
|
|
8790
8788
|
});
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
|
|
8796
|
-
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
|
|
8800
|
-
|
|
8801
|
-
|
|
8802
|
-
|
|
8803
|
-
|
|
8804
|
-
|
|
8805
|
-
|
|
8789
|
+
if (!isMobile) {
|
|
8790
|
+
svg
|
|
8791
|
+
.selectAll('g.x1.axis1 g.tick')
|
|
8792
|
+
.filter(function (d) {
|
|
8793
|
+
return !/\d{2,4}[-\/]/.test(d); // Only process non-date labels
|
|
8794
|
+
})
|
|
8795
|
+
.append('text')
|
|
8796
|
+
.attr('class', 'lib-xaxis-labels-texts-drilldown')
|
|
8797
|
+
.attr('y', long_tick_length_bg)
|
|
8798
|
+
.attr('fill', 'var(--chart-text-color)')
|
|
8799
|
+
.text(function (d) {
|
|
8800
|
+
if (d.trim().indexOf(' ') > -1) {
|
|
8801
|
+
return d.trim().substring(d.indexOf(' '), d.length).toLowerCase();
|
|
8802
|
+
}
|
|
8803
|
+
return '';
|
|
8804
|
+
});
|
|
8805
|
+
}
|
|
8806
8806
|
}
|
|
8807
8807
|
if (isMobile && !this.isHeaderVisible) {
|
|
8808
8808
|
svg
|
|
@@ -9604,6 +9604,30 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9604
9604
|
.style('font-size', 'smaller')
|
|
9605
9605
|
.text(metaData.lineyLabel);
|
|
9606
9606
|
}
|
|
9607
|
+
if (metaData.xLabel) {
|
|
9608
|
+
function isAcronym(label) {
|
|
9609
|
+
return (label.length <= 4 && /^[A-Z]+$/.test(label)) || (label === label.toUpperCase() && /[A-Z]/.test(label));
|
|
9610
|
+
}
|
|
9611
|
+
const xLabelText = metaData.xLabel;
|
|
9612
|
+
const isAcr = isAcronym(xLabelText.replace(/[^A-Za-z]/g, ''));
|
|
9613
|
+
svg
|
|
9614
|
+
.append('text')
|
|
9615
|
+
.attr('class', function () {
|
|
9616
|
+
let baseClass = 'lib-axis-group-label';
|
|
9617
|
+
if (self.chartConfiguration.isDrilldownChart)
|
|
9618
|
+
return baseClass + ' lib-xlabel-drilldowncharts';
|
|
9619
|
+
if (self.chartConfiguration.isMultiChartGridLine != undefined)
|
|
9620
|
+
return baseClass + ' lib-xlabel-weeklyCharts';
|
|
9621
|
+
return baseClass + ' lib-axis-waterfall-label font-size-1';
|
|
9622
|
+
})
|
|
9623
|
+
.attr('style', self.chartConfiguration.xAxisCustomlabelStyles)
|
|
9624
|
+
.attr('transform', 'translate(' + width / 2 + ' ,' + (height + margin.top + 40) + ')')
|
|
9625
|
+
.style('text-anchor', 'middle')
|
|
9626
|
+
.style('fill', 'var(--chart-text-color)')
|
|
9627
|
+
.style('color', 'var(--chart-text-color)')
|
|
9628
|
+
.text(isAcr ? xLabelText.toUpperCase() : xLabelText.toLowerCase())
|
|
9629
|
+
.style('text-transform', isAcr ? 'none' : 'capitalize');
|
|
9630
|
+
}
|
|
9607
9631
|
if (lineData) {
|
|
9608
9632
|
svg
|
|
9609
9633
|
.append('path')
|