axidio-styleguide-library1-v2 0.3.14 → 0.3.16
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.
|
@@ -6579,7 +6579,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
6579
6579
|
const leftAxisWidth = 80;
|
|
6580
6580
|
const rightAxisWidth = this.CONSTANTS.RIGHT_SVG_WIDTH;
|
|
6581
6581
|
const availableWidth = containerWidth - leftAxisWidth - rightAxisWidth;
|
|
6582
|
-
let width = availableWidth
|
|
6582
|
+
let width = availableWidth;
|
|
6583
6583
|
let height = containerHeight * (this.chartConfiguration.svgHeight / 100) - margin.top - margin.bottom;
|
|
6584
6584
|
if (dataLength > this.CONSTANTS.ZOOM_THRESHOLD && this.isZoomedOut) {
|
|
6585
6585
|
const minWidth = dataLength * 25;
|
|
@@ -6652,7 +6652,6 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
6652
6652
|
.style('position', 'relative')
|
|
6653
6653
|
.style('width', '100%')
|
|
6654
6654
|
.style('height', `${totalHeight}px`); // Include X-label space
|
|
6655
|
-
// Left Y-axis - Fixed
|
|
6656
6655
|
const leftAxisContainer = chartWrapper
|
|
6657
6656
|
.append('div')
|
|
6658
6657
|
.attr('class', 'left-axis-container')
|
|
@@ -6660,7 +6659,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
6660
6659
|
.style('left', '0')
|
|
6661
6660
|
.style('top', '0')
|
|
6662
6661
|
.style('width', '80px')
|
|
6663
|
-
.style('height', `${dimensions.height + margin.top + margin.bottom}px`)
|
|
6662
|
+
.style('height', `${dimensions.height + margin.top + margin.bottom}px`)
|
|
6664
6663
|
.style('background-color', 'var(--card-bg)')
|
|
6665
6664
|
.style('z-index', '10');
|
|
6666
6665
|
const svgYAxisLeft = leftAxisContainer
|
|
@@ -6668,7 +6667,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
6668
6667
|
.attr('width', '80')
|
|
6669
6668
|
.attr('height', dimensions.height + margin.top + margin.bottom)
|
|
6670
6669
|
.append('g')
|
|
6671
|
-
.attr('transform', `translate(
|
|
6670
|
+
.attr('transform', `translate(70,${margin.top})`);
|
|
6672
6671
|
// Right Y-axis - Fixed
|
|
6673
6672
|
const rightAxisContainer = chartWrapper
|
|
6674
6673
|
.append('div')
|
|
@@ -6691,11 +6690,11 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
6691
6690
|
.append('div')
|
|
6692
6691
|
.attr('class', 'scrollable-chart-container')
|
|
6693
6692
|
.style('position', 'absolute')
|
|
6694
|
-
.style('left', '80px')
|
|
6693
|
+
.style('left', '80px') // Exactly where left container ends
|
|
6695
6694
|
.style('right', `${this.CONSTANTS.RIGHT_SVG_WIDTH}px`)
|
|
6696
6695
|
.style('top', '0')
|
|
6697
6696
|
.style('width', 'auto')
|
|
6698
|
-
.style('height', `${dimensions.height + margin.top + margin.bottom}px`)
|
|
6697
|
+
.style('height', `${dimensions.height + margin.top + margin.bottom}px`)
|
|
6699
6698
|
.style('overflow-x', 'auto')
|
|
6700
6699
|
.style('overflow-y', 'hidden');
|
|
6701
6700
|
const innerContainer = scrollableContainer
|
|
@@ -6735,10 +6734,10 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
6735
6734
|
// X-scale starts from 0 (no left spacing for grid alignment)
|
|
6736
6735
|
const xScale = d3
|
|
6737
6736
|
.scaleBand()
|
|
6738
|
-
.rangeRound([0, dimensions.requiredSvgWidth])
|
|
6737
|
+
.rangeRound([0, dimensions.requiredSvgWidth])
|
|
6739
6738
|
.domain(data.map(d => d.name).reverse())
|
|
6740
6739
|
.paddingInner(paddingRatio)
|
|
6741
|
-
.paddingOuter(0)
|
|
6740
|
+
.paddingOuter(0.1) // Small padding for visual spacing
|
|
6742
6741
|
.align(0.5);
|
|
6743
6742
|
const xScaleFromOrigin = d3
|
|
6744
6743
|
.scaleBand()
|
|
@@ -7063,12 +7062,11 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7063
7062
|
.call((g) => g.select('.domain').remove());
|
|
7064
7063
|
}
|
|
7065
7064
|
if (this.chartConfiguration.yAxisGrid) {
|
|
7066
|
-
// Grid lines start from x=0 (no gap with Y-axis)
|
|
7067
7065
|
const gridWidth = dimensions.requiredSvgWidth;
|
|
7068
7066
|
svg
|
|
7069
7067
|
.append('g')
|
|
7070
7068
|
.attr('class', 'grid horizontal-grid')
|
|
7071
|
-
.attr('transform', 'translate(0,0)')
|
|
7069
|
+
.attr('transform', 'translate(0,0)')
|
|
7072
7070
|
.call(d3
|
|
7073
7071
|
.axisLeft(scales.yScale)
|
|
7074
7072
|
.ticks(this.chartConfiguration.numberOfYTicks)
|
|
@@ -7078,9 +7076,6 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7078
7076
|
.style('opacity', '1')
|
|
7079
7077
|
.call((g) => {
|
|
7080
7078
|
g.select('.domain').remove();
|
|
7081
|
-
g.selectAll('line')
|
|
7082
|
-
.attr('x1', 0)
|
|
7083
|
-
.attr('x2', -gridWidth);
|
|
7084
7079
|
});
|
|
7085
7080
|
}
|
|
7086
7081
|
if (this.chartConfiguration.xAxisGrid) {
|
|
@@ -7138,12 +7133,12 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7138
7133
|
textElement.text(text.substring(0, 10) + '...');
|
|
7139
7134
|
}
|
|
7140
7135
|
});
|
|
7141
|
-
// Ensure X-axis line
|
|
7136
|
+
// Ensure X-axis line starts exactly at x=0
|
|
7142
7137
|
xAxisGroup
|
|
7143
7138
|
.select('.domain')
|
|
7144
7139
|
.style('stroke', 'var(--chart-axis-color)')
|
|
7145
7140
|
.style('stroke-width', '1px')
|
|
7146
|
-
.attr('d', `M0,
|
|
7141
|
+
.attr('d', `M0,0.5H${dimensions.requiredSvgWidth}`);
|
|
7147
7142
|
// Y-axis
|
|
7148
7143
|
svg
|
|
7149
7144
|
.append('g')
|