axidio-styleguide-library1-v2 0.0.868 → 0.0.869
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.
|
@@ -8151,31 +8151,31 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8151
8151
|
}
|
|
8152
8152
|
styleAxisDomain();
|
|
8153
8153
|
if (metaData.yLabel) {
|
|
8154
|
-
svgYAxisLeft.selectAll('.lib-axis-group-label, .lib-ylabel-drilldowncharts, .lib-ylabel-weeklyCharts').remove();
|
|
8155
|
-
function isAcronym(label) {
|
|
8156
|
-
return (label.length <= 4 && /^[A-Z]+$/.test(label)) || (label === label.toUpperCase() && /[A-Z]/.test(label));
|
|
8157
|
-
}
|
|
8158
|
-
const yLabelText = metaData.yLabel;
|
|
8159
|
-
const isAcr = isAcronym(yLabelText.replace(/[^A-Za-z]/g, ''));
|
|
8160
8154
|
svgYAxisLeft
|
|
8161
8155
|
.append('text')
|
|
8162
|
-
.attr('class',
|
|
8163
|
-
if (self.chartConfiguration.isDrilldownChart)
|
|
8164
|
-
return 'lib-ylabel-drilldowncharts';
|
|
8165
|
-
if (self.chartConfiguration.isMultiChartGridLine != undefined)
|
|
8166
|
-
return 'lib-ylabel-weeklyCharts';
|
|
8167
|
-
return 'lib-axis-group-label font-size-1';
|
|
8168
|
-
})
|
|
8156
|
+
.attr('class', 'lib-axis-group-label font-size-1')
|
|
8169
8157
|
.attr('style', self.chartConfiguration.yAxisCustomlabelStyles)
|
|
8170
8158
|
.attr('transform', 'rotate(-90)')
|
|
8171
8159
|
.attr('y', 0 - margin.left / 2 - 40)
|
|
8172
8160
|
.attr('x', 0 - height / 2)
|
|
8173
8161
|
.attr('dy', '1em')
|
|
8174
8162
|
.style('text-anchor', 'middle')
|
|
8175
|
-
.
|
|
8176
|
-
|
|
8177
|
-
|
|
8178
|
-
|
|
8163
|
+
.attr('fill', 'var(--chart-text-color)');
|
|
8164
|
+
if (this.chartConfiguration.isMultiChartGridLine == undefined) {
|
|
8165
|
+
svgYAxisLeft
|
|
8166
|
+
.selectAll('.lib-axis-group-label')
|
|
8167
|
+
.style('font-size', 'smaller')
|
|
8168
|
+
.text(metaData.yLabel);
|
|
8169
|
+
}
|
|
8170
|
+
else {
|
|
8171
|
+
/**
|
|
8172
|
+
* used by weekly charts
|
|
8173
|
+
*/
|
|
8174
|
+
svg
|
|
8175
|
+
.selectAll('.lib-axis-group-label')
|
|
8176
|
+
.attr('class', 'lib-ylabel-weeklyCharts')
|
|
8177
|
+
.text(metaData.yLabel.toLowerCase());
|
|
8178
|
+
}
|
|
8179
8179
|
}
|
|
8180
8180
|
if (this.chartData.targetLineData) {
|
|
8181
8181
|
const yZero = yScale(parsedNum);
|
|
@@ -8238,21 +8238,23 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8238
8238
|
}
|
|
8239
8239
|
if (metaData.xLabel) {
|
|
8240
8240
|
function isAcronym(label) {
|
|
8241
|
-
return (label.length <= 4 && /^[A-Z]+$/.test(label)) ||
|
|
8241
|
+
return ((label.length <= 4 && /^[A-Z]+$/.test(label)) ||
|
|
8242
|
+
(label === label.toUpperCase() && /[A-Z]/.test(label)));
|
|
8242
8243
|
}
|
|
8243
8244
|
const xLabelText = metaData.xLabel;
|
|
8244
8245
|
const isAcr = isAcronym(xLabelText.replace(/[^A-Za-z]/g, ''));
|
|
8245
8246
|
svg
|
|
8246
8247
|
.append('text')
|
|
8247
8248
|
.attr('class', function () {
|
|
8249
|
+
let baseClass = 'lib-axis-group-label font-size-1';
|
|
8248
8250
|
if (self.chartConfiguration.isDrilldownChart)
|
|
8249
|
-
return 'lib-xlabel-drilldowncharts';
|
|
8251
|
+
return baseClass + ' lib-xlabel-drilldowncharts';
|
|
8250
8252
|
if (self.chartConfiguration.isMultiChartGridLine != undefined)
|
|
8251
|
-
return 'lib-xlabel-weeklyCharts';
|
|
8252
|
-
return 'lib-axis-waterfall-label
|
|
8253
|
+
return baseClass + ' lib-xlabel-weeklyCharts';
|
|
8254
|
+
return baseClass + ' lib-axis-waterfall-label';
|
|
8253
8255
|
})
|
|
8254
8256
|
.attr('style', self.chartConfiguration.xAxisCustomlabelStyles)
|
|
8255
|
-
.attr('transform', 'translate(' + width / 2 + ' ,' + (height + margin.top + margin.bottom) + ')')
|
|
8257
|
+
.attr('transform', 'translate(' + width / 2 + ' ,' + (height + margin.top + margin.bottom + 10) + ')')
|
|
8256
8258
|
.style('text-anchor', 'middle')
|
|
8257
8259
|
.style('fill', 'var(--chart-text-color)')
|
|
8258
8260
|
.style('color', 'var(--chart-text-color)')
|