axidio-styleguide-library1-v2 0.0.830 → 0.0.832
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.
|
@@ -8762,7 +8762,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8762
8762
|
.selectAll('g.x1.axis1 g.tick text')
|
|
8763
8763
|
.attr('class', 'lib-xaxis-labels-texts-drilldown')
|
|
8764
8764
|
.style('font-size', '18px')
|
|
8765
|
-
.attr('y', this.isHeaderVisible ? short_tick_length_bg +
|
|
8765
|
+
.attr('y', this.isHeaderVisible ? short_tick_length_bg + 25 : short_tick_length_bg)
|
|
8766
8766
|
.text(function (d) {
|
|
8767
8767
|
var isValueToBeIgnored = false;
|
|
8768
8768
|
if (isMobile && !self.isHeaderVisible) {
|
|
@@ -8985,15 +8985,15 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8985
8985
|
if (self.chartData.data.length == 1) {
|
|
8986
8986
|
if (Object.keys(self.chartData.data[0]).length == 2) {
|
|
8987
8987
|
tempScale.range([
|
|
8988
|
-
0 + (x.bandwidth() -
|
|
8989
|
-
x.bandwidth() - (x.bandwidth() -
|
|
8988
|
+
0 + (x.bandwidth() - 125) / 2,
|
|
8989
|
+
x.bandwidth() - (x.bandwidth() - 125) / 2,
|
|
8990
8990
|
]);
|
|
8991
8991
|
// .padding(0.05);
|
|
8992
8992
|
}
|
|
8993
8993
|
else
|
|
8994
8994
|
tempScale.range([
|
|
8995
|
-
0 + (x.bandwidth() -
|
|
8996
|
-
x.bandwidth() - (x.bandwidth() -
|
|
8995
|
+
0 + (x.bandwidth() - 125) / 2,
|
|
8996
|
+
x.bandwidth() - (x.bandwidth() - 125) / 2,
|
|
8997
8997
|
]);
|
|
8998
8998
|
// .padding(0.05);
|
|
8999
8999
|
}
|
|
@@ -9036,15 +9036,15 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9036
9036
|
if (self.chartData.data.length == 1) {
|
|
9037
9037
|
if (Object.keys(self.chartData.data[0]).length == 2) {
|
|
9038
9038
|
tempScale.range([
|
|
9039
|
-
0 + (x.bandwidth() -
|
|
9040
|
-
x.bandwidth() - (x.bandwidth() -
|
|
9039
|
+
0 + (x.bandwidth() - 125) / 2,
|
|
9040
|
+
x.bandwidth() - (x.bandwidth() - 125) / 2,
|
|
9041
9041
|
]);
|
|
9042
9042
|
// .padding(0.05);
|
|
9043
9043
|
}
|
|
9044
9044
|
else
|
|
9045
9045
|
tempScale.range([
|
|
9046
|
-
0 + (x.bandwidth() -
|
|
9047
|
-
x.bandwidth() - (x.bandwidth() -
|
|
9046
|
+
0 + (x.bandwidth() - 125) / 2,
|
|
9047
|
+
x.bandwidth() - (x.bandwidth() - 125) / 2,
|
|
9048
9048
|
]);
|
|
9049
9049
|
// .padding(0.05);
|
|
9050
9050
|
}
|
|
@@ -9591,6 +9591,30 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9591
9591
|
// .text(metaData.yLabel.toLowerCase());
|
|
9592
9592
|
svg.selectAll('g.x1.axis1 g.tick line').style('display', 'none');
|
|
9593
9593
|
}
|
|
9594
|
+
if (metaData.xLabel) {
|
|
9595
|
+
function isAcronym(label) {
|
|
9596
|
+
return (label.length <= 4 && /^[A-Z]+$/.test(label)) || (label === label.toUpperCase() && /[A-Z]/.test(label));
|
|
9597
|
+
}
|
|
9598
|
+
const xLabelText = metaData.xLabel;
|
|
9599
|
+
const isAcr = isAcronym(xLabelText.replace(/[^A-Za-z]/g, ''));
|
|
9600
|
+
svg
|
|
9601
|
+
.append('text')
|
|
9602
|
+
.attr('class', function () {
|
|
9603
|
+
let baseClass = 'lib-axis-group-label font-size-1';
|
|
9604
|
+
if (self.chartConfiguration.isDrilldownChart)
|
|
9605
|
+
return baseClass + ' lib-xlabel-drilldowncharts';
|
|
9606
|
+
if (self.chartConfiguration.isMultiChartGridLine != undefined)
|
|
9607
|
+
return baseClass + ' lib-xlabel-weeklyCharts';
|
|
9608
|
+
return baseClass + ' lib-axis-waterfall-label';
|
|
9609
|
+
})
|
|
9610
|
+
.attr('style', self.chartConfiguration.xAxisCustomlabelStyles)
|
|
9611
|
+
.attr('transform', 'translate(' + width / 2 + ' ,' + (height + margin.top + 40) + ')')
|
|
9612
|
+
.style('text-anchor', 'middle')
|
|
9613
|
+
.style('fill', 'var(--chart-text-color)')
|
|
9614
|
+
.style('color', 'var(--chart-text-color)')
|
|
9615
|
+
.text(isAcr ? xLabelText.toUpperCase() : xLabelText.toLowerCase())
|
|
9616
|
+
.style('text-transform', isAcr ? 'none' : 'capitalize');
|
|
9617
|
+
}
|
|
9594
9618
|
if (metaData.lineyLabel) {
|
|
9595
9619
|
svgYAxisRight
|
|
9596
9620
|
.append('text')
|