axidio-styleguide-library1-v2 0.1.48 → 0.1.50
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.
|
@@ -7902,55 +7902,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7902
7902
|
/**
|
|
7903
7903
|
* used to display y label
|
|
7904
7904
|
*/
|
|
7905
|
-
|
|
7906
|
-
// svg
|
|
7907
|
-
// .selectAll('.lib-xaxis-labels-texts-drilldown')
|
|
7908
|
-
// .attr('transform', 'rotate(-90)')
|
|
7909
|
-
// .attr('text-anchor', 'end')
|
|
7910
|
-
// .attr('x', '-5')
|
|
7911
|
-
// .attr('dy', null);
|
|
7912
|
-
// }
|
|
7913
|
-
if (this.isZoomedOut) {
|
|
7914
|
-
// svg
|
|
7915
|
-
// .selectAll('.lib-xaxis-labels-texts-drilldown')
|
|
7916
|
-
// .attr('transform', 'rotate(-30)')
|
|
7917
|
-
// .attr('text-anchor', 'end')
|
|
7918
|
-
// .attr('x', '-5')
|
|
7919
|
-
// .attr('dy', null)
|
|
7920
|
-
// .style('fill', 'var(--chart-text-color)');
|
|
7921
|
-
svg
|
|
7922
|
-
.selectAll('.lib-xaxis-labels-texts-drilldown')
|
|
7923
|
-
.each((d, i, nodes) => {
|
|
7924
|
-
const text = d3.select(nodes[i]);
|
|
7925
|
-
const label = text.text();
|
|
7926
|
-
// If label contains \n, split and use tspan for each line
|
|
7927
|
-
if (label.indexOf('\n') > -1) {
|
|
7928
|
-
const lines = label.split('\n');
|
|
7929
|
-
text.text(null);
|
|
7930
|
-
lines.forEach((line, idx) => {
|
|
7931
|
-
text.append('tspan')
|
|
7932
|
-
.text(line)
|
|
7933
|
-
.attr('x', 0)
|
|
7934
|
-
.attr('dy', idx === 0 ? '1em' : '1.1em');
|
|
7935
|
-
});
|
|
7936
|
-
}
|
|
7937
|
-
else {
|
|
7938
|
-
// Fallback: split by space for other labels
|
|
7939
|
-
const words = label.split(' ');
|
|
7940
|
-
text.text(null);
|
|
7941
|
-
words.forEach((word, index) => {
|
|
7942
|
-
text.append('tspan').text(word);
|
|
7943
|
-
});
|
|
7944
|
-
}
|
|
7945
|
-
})
|
|
7946
|
-
.style('fill', 'var(--chart-text-color)')
|
|
7947
|
-
.attr('transform', null); // Remove rotate if using line breaks
|
|
7948
|
-
// Optional: Adjust bottom margin or chart layout
|
|
7949
|
-
svg
|
|
7950
|
-
.select('.x-axis')
|
|
7951
|
-
.attr('transform', `translate(0, ${height - margin.bottom + 10})`);
|
|
7952
|
-
}
|
|
7953
|
-
else {
|
|
7905
|
+
if (this.isZoomedOut && this.chartData.data.length > 8) {
|
|
7954
7906
|
svg
|
|
7955
7907
|
.selectAll('.lib-xaxis-labels-texts-drilldown')
|
|
7956
7908
|
.attr('transform', 'rotate(-90)')
|
|
@@ -8018,7 +7970,8 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8018
7970
|
// .style('stroke', this.chartData.targetLineData.color);
|
|
8019
7971
|
svgYAxisRight
|
|
8020
7972
|
.append('foreignObject')
|
|
8021
|
-
.attr('transform', 'translate(' + 0 + ',' + (yZero - 30) + ')')
|
|
7973
|
+
// .attr('transform', 'translate(' + 0 + ',' + (yZero - 30) + ')')
|
|
7974
|
+
.attr('transform', 'translate(' + 0 + ',' + 0 + ')')
|
|
8022
7975
|
.attr('width', rightSvgWidth)
|
|
8023
7976
|
.attr('height', 50)
|
|
8024
7977
|
.append('xhtml:div')
|