axidio-styleguide-library1-v2 0.4.36 → 0.4.37
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.
|
@@ -3617,6 +3617,7 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3617
3617
|
createSVGStructure(dimensions) {
|
|
3618
3618
|
const { chartContainer, height, margin } = dimensions;
|
|
3619
3619
|
const rightSvgWidth = 60;
|
|
3620
|
+
// FIXED: Calculate total height including margins and extra space
|
|
3620
3621
|
const totalHeight = height + margin.top + margin.bottom;
|
|
3621
3622
|
const outerContainer = chartContainer
|
|
3622
3623
|
.append('div')
|
|
@@ -3624,13 +3625,13 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3624
3625
|
.attr('class', 'outer-container')
|
|
3625
3626
|
.style('width', '100%')
|
|
3626
3627
|
.style('height', `${totalHeight}px`)
|
|
3627
|
-
.style('overflow', 'hidden')
|
|
3628
|
+
.style('overflow', 'hidden') // FIXED: Keep outer container hidden
|
|
3628
3629
|
.style('padding-left', `${margin.left}px`)
|
|
3629
3630
|
.style('padding-right', `${rightSvgWidth}px`)
|
|
3630
|
-
.style('margin-left', '
|
|
3631
|
+
.style('margin-left', '15px')
|
|
3631
3632
|
.style('position', 'relative');
|
|
3632
3633
|
const leftSvgWidth = margin.left + 20;
|
|
3633
|
-
// FIXED: Y-axis SVG with proper height
|
|
3634
|
+
// FIXED: Y-axis SVG with proper height and z-index
|
|
3634
3635
|
const svgYAxisLeft = outerContainer
|
|
3635
3636
|
.append('svg')
|
|
3636
3637
|
.attr('width', leftSvgWidth)
|
|
@@ -3638,7 +3639,8 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3638
3639
|
.style('position', 'absolute')
|
|
3639
3640
|
.style('left', '0')
|
|
3640
3641
|
.style('top', '0')
|
|
3641
|
-
.style('z-index',
|
|
3642
|
+
.style('z-index', 3) // FIXED: Higher z-index for axes
|
|
3643
|
+
.style('background', this.isTransparentBackground ? 'transparent' : '#FFFFFF') // FIXED: Background to prevent bleed-through
|
|
3642
3644
|
.append('g')
|
|
3643
3645
|
.attr('transform', `translate(${margin.left + 5},${margin.top})`);
|
|
3644
3646
|
const svgYAxisRight = outerContainer
|
|
@@ -3648,37 +3650,54 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3648
3650
|
.style('position', 'absolute')
|
|
3649
3651
|
.style('right', '40px')
|
|
3650
3652
|
.style('top', '0')
|
|
3651
|
-
.style('z-index',
|
|
3653
|
+
.style('z-index', 3) // FIXED: Higher z-index for axes
|
|
3654
|
+
.style('background', this.isTransparentBackground ? 'transparent' : '#FFFFFF') // FIXED: Background to prevent bleed-through
|
|
3652
3655
|
.append('g')
|
|
3653
3656
|
.attr('transform', `translate(0,${margin.top})`);
|
|
3654
3657
|
const innerContainer = outerContainer
|
|
3655
3658
|
.append('div')
|
|
3656
3659
|
.attr('class', 'inner-container')
|
|
3657
3660
|
.style('width', '100%')
|
|
3658
|
-
.style('height', `${totalHeight}px`)
|
|
3661
|
+
.style('height', `${totalHeight}px`)
|
|
3659
3662
|
.style('overflow-x', 'auto')
|
|
3660
|
-
.style('overflow-y', 'hidden')
|
|
3661
|
-
|
|
3663
|
+
.style('overflow-y', 'hidden')
|
|
3664
|
+
.style('position', 'relative');
|
|
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
|
|
3662
3680
|
const svg = innerContainer
|
|
3663
3681
|
.append('svg')
|
|
3664
3682
|
.attr('width', dimensions.width - rightSvgWidth)
|
|
3665
|
-
.attr('height', totalHeight)
|
|
3683
|
+
.attr('height', totalHeight)
|
|
3684
|
+
.style('position', 'relative')
|
|
3685
|
+
.style('z-index', 1) // FIXED: Lower z-index than axes
|
|
3666
3686
|
.append('g')
|
|
3667
|
-
.attr('transform', `translate(0,${margin.top})`)
|
|
3668
|
-
|
|
3687
|
+
.attr('transform', `translate(0,${margin.top})`)
|
|
3688
|
+
.attr('clip-path', `url(#clip-${this.uniqueId})`); // FIXED: Apply clipping
|
|
3689
|
+
return { outerContainer, svgYAxisLeft, svgYAxisRight, svg, totalHeight, innerContainer };
|
|
3669
3690
|
}
|
|
3670
3691
|
renderAxes(svgElements, scales, chartContext, dimensions) {
|
|
3671
3692
|
const { svg, svgYAxisLeft, svgYAxisRight } = svgElements;
|
|
3672
3693
|
const { x, xScaleFromOrigin, y, lineYscale } = scales;
|
|
3673
3694
|
const { height } = dimensions;
|
|
3674
3695
|
const { metaData, lineData, keyList } = chartContext;
|
|
3675
|
-
|
|
3696
|
+
this.renderXAxis(svg, x, xScaleFromOrigin, height, chartContext, keyList);
|
|
3676
3697
|
this.renderYAxis(svg, svgYAxisLeft, svgYAxisRight, y, dimensions);
|
|
3677
|
-
// Then render grid lines that align with Y-axis
|
|
3678
3698
|
if (this.chartConfiguration.yAxisGrid) {
|
|
3679
3699
|
this.renderYAxisGrid(svg, y, dimensions.width);
|
|
3680
3700
|
}
|
|
3681
|
-
this.renderXAxis(svg, x, xScaleFromOrigin, height, chartContext, keyList);
|
|
3682
3701
|
if (this.chartConfiguration.isXgridBetweenLabels) {
|
|
3683
3702
|
this.renderXAxisGrid(svg, x, height);
|
|
3684
3703
|
}
|
|
@@ -3861,22 +3880,19 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3861
3880
|
}
|
|
3862
3881
|
}
|
|
3863
3882
|
renderYAxisGrid(svg, y, width) {
|
|
3864
|
-
// Alternative: Manually create grid lines for precise control
|
|
3865
|
-
const ticks = y.ticks(this.chartConfiguration.numberOfYTicks);
|
|
3866
3883
|
svg
|
|
3867
|
-
.
|
|
3868
|
-
.
|
|
3869
|
-
.
|
|
3870
|
-
.
|
|
3871
|
-
.
|
|
3872
|
-
.
|
|
3873
|
-
.
|
|
3874
|
-
.attr('y1', (d) => y(d))
|
|
3875
|
-
.attr('y2', (d) => y(d))
|
|
3876
|
-
.style('stroke', '#E0E0E0')
|
|
3877
|
-
.style('stroke-width', '0.5px')
|
|
3884
|
+
.append('g')
|
|
3885
|
+
.attr('class', 'y-axis-grid')
|
|
3886
|
+
.call(d3.axisLeft(y)
|
|
3887
|
+
.ticks(this.chartConfiguration.numberOfYTicks)
|
|
3888
|
+
.tickSize(-width)
|
|
3889
|
+
.tickFormat(''))
|
|
3890
|
+
.style('color', '#535353ff') // FIXED: Lighter grid
|
|
3878
3891
|
.style('opacity', '0.7')
|
|
3879
|
-
.style('stroke-dasharray', 'none')
|
|
3892
|
+
.style('stroke-dasharray', 'none')
|
|
3893
|
+
.call((g) => g.select('.domain').remove())
|
|
3894
|
+
.selectAll('line')
|
|
3895
|
+
.style('stroke-width', '0.5px');
|
|
3880
3896
|
}
|
|
3881
3897
|
renderXAxisGrid(svg, x, height) {
|
|
3882
3898
|
svg
|