axidio-styleguide-library1-v2 0.1.47 → 0.1.49
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,53 +7902,13 @@ 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)');
|
|
7905
|
+
if (this.isZoomedOut && this.chartData.data.length > 8) {
|
|
7921
7906
|
svg
|
|
7922
7907
|
.selectAll('.lib-xaxis-labels-texts-drilldown')
|
|
7923
|
-
.
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
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})`);
|
|
7908
|
+
.attr('transform', 'rotate(-90)')
|
|
7909
|
+
.attr('text-anchor', 'end')
|
|
7910
|
+
.attr('x', '-5')
|
|
7911
|
+
.attr('dy', null);
|
|
7952
7912
|
}
|
|
7953
7913
|
function styleAxisDomain() {
|
|
7954
7914
|
svg.selectAll('.domain')
|