axidio-styleguide-library1-v2 0.4.37 → 0.4.39
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.
|
@@ -3495,7 +3495,11 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3495
3495
|
return { width, height, margin, chartContainer, verticalstackedcontainer };
|
|
3496
3496
|
}
|
|
3497
3497
|
calculateWidth(chartContainer, margin) {
|
|
3498
|
-
const
|
|
3498
|
+
const containerWidth = parseInt(chartContainer.style('width'));
|
|
3499
|
+
const leftSvgWidth = margin.left + 20;
|
|
3500
|
+
const rightSvgWidth = 60;
|
|
3501
|
+
// Calculate available width excluding fixed y-axis elements
|
|
3502
|
+
const baseWidth = containerWidth - leftSvgWidth - rightSvgWidth;
|
|
3499
3503
|
const dataLength = this.chartData.data.length;
|
|
3500
3504
|
let width = baseWidth;
|
|
3501
3505
|
if (dataLength > 30 && this.isZoomedOut) {
|
|
@@ -3618,20 +3622,20 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3618
3622
|
const { chartContainer, height, margin } = dimensions;
|
|
3619
3623
|
const rightSvgWidth = 60;
|
|
3620
3624
|
// FIXED: Calculate total height including margins and extra space
|
|
3621
|
-
const totalHeight = height + margin.top + margin.bottom;
|
|
3625
|
+
const totalHeight = height + margin.top + margin.bottom + 60; // Added extra 60px
|
|
3622
3626
|
const outerContainer = chartContainer
|
|
3623
3627
|
.append('div')
|
|
3624
3628
|
.attr('id', this.uniqueId)
|
|
3625
3629
|
.attr('class', 'outer-container')
|
|
3626
3630
|
.style('width', '100%')
|
|
3627
3631
|
.style('height', `${totalHeight}px`)
|
|
3628
|
-
.style('overflow', 'hidden')
|
|
3629
|
-
.style('padding-left',
|
|
3632
|
+
.style('overflow', 'hidden')
|
|
3633
|
+
.style('padding-left', '0') // Remove left padding from outer container
|
|
3630
3634
|
.style('padding-right', `${rightSvgWidth}px`)
|
|
3631
|
-
.style('margin-left', '
|
|
3635
|
+
.style('margin-left', '0') // Remove left margin
|
|
3632
3636
|
.style('position', 'relative');
|
|
3633
3637
|
const leftSvgWidth = margin.left + 20;
|
|
3634
|
-
// FIXED: Y-axis SVG with proper height
|
|
3638
|
+
// FIXED: Y-axis SVG with proper height
|
|
3635
3639
|
const svgYAxisLeft = outerContainer
|
|
3636
3640
|
.append('svg')
|
|
3637
3641
|
.attr('width', leftSvgWidth)
|
|
@@ -3639,8 +3643,7 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3639
3643
|
.style('position', 'absolute')
|
|
3640
3644
|
.style('left', '0')
|
|
3641
3645
|
.style('top', '0')
|
|
3642
|
-
.style('z-index',
|
|
3643
|
-
.style('background', this.isTransparentBackground ? 'transparent' : '#FFFFFF') // FIXED: Background to prevent bleed-through
|
|
3646
|
+
.style('z-index', 2) // Increased z-index to ensure it stays above
|
|
3644
3647
|
.append('g')
|
|
3645
3648
|
.attr('transform', `translate(${margin.left + 5},${margin.top})`);
|
|
3646
3649
|
const svgYAxisRight = outerContainer
|
|
@@ -3650,43 +3653,26 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3650
3653
|
.style('position', 'absolute')
|
|
3651
3654
|
.style('right', '40px')
|
|
3652
3655
|
.style('top', '0')
|
|
3653
|
-
.style('z-index',
|
|
3654
|
-
.style('background', this.isTransparentBackground ? 'transparent' : '#FFFFFF') // FIXED: Background to prevent bleed-through
|
|
3656
|
+
.style('z-index', 2) // Increased z-index
|
|
3655
3657
|
.append('g')
|
|
3656
3658
|
.attr('transform', `translate(0,${margin.top})`);
|
|
3659
|
+
// FIXED: Inner container starts AFTER the y-axis labels
|
|
3657
3660
|
const innerContainer = outerContainer
|
|
3658
3661
|
.append('div')
|
|
3659
3662
|
.attr('class', 'inner-container')
|
|
3660
|
-
.style('width',
|
|
3663
|
+
.style('width', `calc(100% - ${leftSvgWidth}px)`) // Account for y-axis width
|
|
3661
3664
|
.style('height', `${totalHeight}px`)
|
|
3665
|
+
.style('margin-left', `${leftSvgWidth}px`) // Push container to start after y-axis
|
|
3662
3666
|
.style('overflow-x', 'auto')
|
|
3663
|
-
.style('overflow-y', 'hidden')
|
|
3664
|
-
|
|
3665
|
-
// FIXED: Create a clipping path for the main SVG
|
|
3666
|
-
const defs = innerContainer
|
|
3667
|
-
.append('svg')
|
|
3668
|
-
.attr('width', dimensions.width - rightSvgWidth)
|
|
3669
|
-
.attr('height', totalHeight)
|
|
3670
|
-
.append('defs');
|
|
3671
|
-
defs
|
|
3672
|
-
.append('clipPath')
|
|
3673
|
-
.attr('id', `clip-${this.uniqueId}`)
|
|
3674
|
-
.append('rect')
|
|
3675
|
-
.attr('width', dimensions.width - rightSvgWidth)
|
|
3676
|
-
.attr('height', totalHeight)
|
|
3677
|
-
.attr('x', 0)
|
|
3678
|
-
.attr('y', 0);
|
|
3679
|
-
// FIXED: Main SVG with clipping and proper z-index
|
|
3667
|
+
.style('overflow-y', 'hidden');
|
|
3668
|
+
// FIXED: Main SVG with increased height and proper positioning
|
|
3680
3669
|
const svg = innerContainer
|
|
3681
3670
|
.append('svg')
|
|
3682
3671
|
.attr('width', dimensions.width - rightSvgWidth)
|
|
3683
3672
|
.attr('height', totalHeight)
|
|
3684
|
-
.style('position', 'relative')
|
|
3685
|
-
.style('z-index', 1) // FIXED: Lower z-index than axes
|
|
3686
3673
|
.append('g')
|
|
3687
|
-
.attr('transform', `translate(0,${margin.top})`)
|
|
3688
|
-
|
|
3689
|
-
return { outerContainer, svgYAxisLeft, svgYAxisRight, svg, totalHeight, innerContainer };
|
|
3674
|
+
.attr('transform', `translate(0,${margin.top})`);
|
|
3675
|
+
return { outerContainer, svgYAxisLeft, svgYAxisRight, svg, totalHeight };
|
|
3690
3676
|
}
|
|
3691
3677
|
renderAxes(svgElements, scales, chartContext, dimensions) {
|
|
3692
3678
|
const { svg, svgYAxisLeft, svgYAxisRight } = svgElements;
|