axidio-styleguide-library1-v2 0.4.38 → 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,17 +3622,17 @@ 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; // Added extra 60px
|
|
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
|
-
.style('height', `${totalHeight}px`)
|
|
3631
|
+
.style('height', `${totalHeight}px`)
|
|
3628
3632
|
.style('overflow', 'hidden')
|
|
3629
|
-
.style('padding-left',
|
|
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
3638
|
// FIXED: Y-axis SVG with proper height
|
|
@@ -3639,7 +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',
|
|
3646
|
+
.style('z-index', 2) // Increased z-index to ensure it stays above
|
|
3643
3647
|
.append('g')
|
|
3644
3648
|
.attr('transform', `translate(${margin.left + 5},${margin.top})`);
|
|
3645
3649
|
const svgYAxisRight = outerContainer
|
|
@@ -3649,21 +3653,23 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3649
3653
|
.style('position', 'absolute')
|
|
3650
3654
|
.style('right', '40px')
|
|
3651
3655
|
.style('top', '0')
|
|
3652
|
-
.style('z-index',
|
|
3656
|
+
.style('z-index', 2) // Increased z-index
|
|
3653
3657
|
.append('g')
|
|
3654
3658
|
.attr('transform', `translate(0,${margin.top})`);
|
|
3659
|
+
// FIXED: Inner container starts AFTER the y-axis labels
|
|
3655
3660
|
const innerContainer = outerContainer
|
|
3656
3661
|
.append('div')
|
|
3657
3662
|
.attr('class', 'inner-container')
|
|
3658
|
-
.style('width',
|
|
3659
|
-
.style('height', `${totalHeight}px`)
|
|
3663
|
+
.style('width', `calc(100% - ${leftSvgWidth}px)`) // Account for y-axis width
|
|
3664
|
+
.style('height', `${totalHeight}px`)
|
|
3665
|
+
.style('margin-left', `${leftSvgWidth}px`) // Push container to start after y-axis
|
|
3660
3666
|
.style('overflow-x', 'auto')
|
|
3661
3667
|
.style('overflow-y', 'hidden');
|
|
3662
|
-
// FIXED: Main SVG with increased height
|
|
3668
|
+
// FIXED: Main SVG with increased height and proper positioning
|
|
3663
3669
|
const svg = innerContainer
|
|
3664
3670
|
.append('svg')
|
|
3665
3671
|
.attr('width', dimensions.width - rightSvgWidth)
|
|
3666
|
-
.attr('height', totalHeight)
|
|
3672
|
+
.attr('height', totalHeight)
|
|
3667
3673
|
.append('g')
|
|
3668
3674
|
.attr('transform', `translate(0,${margin.top})`);
|
|
3669
3675
|
return { outerContainer, svgYAxisLeft, svgYAxisRight, svg, totalHeight };
|