axidio-styleguide-library1-v2 0.4.36 → 0.4.38
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,17 +3617,18 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3617
3617
|
createSVGStructure(dimensions) {
|
|
3618
3618
|
const { chartContainer, height, margin } = dimensions;
|
|
3619
3619
|
const rightSvgWidth = 60;
|
|
3620
|
-
|
|
3620
|
+
// FIXED: Calculate total height including margins and extra space
|
|
3621
|
+
const totalHeight = height + margin.top + margin.bottom; // Added extra 60px
|
|
3621
3622
|
const outerContainer = chartContainer
|
|
3622
3623
|
.append('div')
|
|
3623
3624
|
.attr('id', this.uniqueId)
|
|
3624
3625
|
.attr('class', 'outer-container')
|
|
3625
3626
|
.style('width', '100%')
|
|
3626
|
-
.style('height', `${totalHeight}px`)
|
|
3627
|
+
.style('height', `${totalHeight}px`) // Use calculated total height
|
|
3627
3628
|
.style('overflow', '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
3634
|
// FIXED: Y-axis SVG with proper height
|
|
@@ -3672,13 +3673,11 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3672
3673
|
const { x, xScaleFromOrigin, y, lineYscale } = scales;
|
|
3673
3674
|
const { height } = dimensions;
|
|
3674
3675
|
const { metaData, lineData, keyList } = chartContext;
|
|
3675
|
-
|
|
3676
|
+
this.renderXAxis(svg, x, xScaleFromOrigin, height, chartContext, keyList);
|
|
3676
3677
|
this.renderYAxis(svg, svgYAxisLeft, svgYAxisRight, y, dimensions);
|
|
3677
|
-
// Then render grid lines that align with Y-axis
|
|
3678
3678
|
if (this.chartConfiguration.yAxisGrid) {
|
|
3679
3679
|
this.renderYAxisGrid(svg, y, dimensions.width);
|
|
3680
3680
|
}
|
|
3681
|
-
this.renderXAxis(svg, x, xScaleFromOrigin, height, chartContext, keyList);
|
|
3682
3681
|
if (this.chartConfiguration.isXgridBetweenLabels) {
|
|
3683
3682
|
this.renderXAxisGrid(svg, x, height);
|
|
3684
3683
|
}
|
|
@@ -3861,22 +3860,19 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3861
3860
|
}
|
|
3862
3861
|
}
|
|
3863
3862
|
renderYAxisGrid(svg, y, width) {
|
|
3864
|
-
// Alternative: Manually create grid lines for precise control
|
|
3865
|
-
const ticks = y.ticks(this.chartConfiguration.numberOfYTicks);
|
|
3866
3863
|
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')
|
|
3864
|
+
.append('g')
|
|
3865
|
+
.attr('class', 'y-axis-grid')
|
|
3866
|
+
.call(d3.axisLeft(y)
|
|
3867
|
+
.ticks(this.chartConfiguration.numberOfYTicks)
|
|
3868
|
+
.tickSize(-width)
|
|
3869
|
+
.tickFormat(''))
|
|
3870
|
+
.style('color', '#535353ff') // FIXED: Lighter grid
|
|
3878
3871
|
.style('opacity', '0.7')
|
|
3879
|
-
.style('stroke-dasharray', 'none')
|
|
3872
|
+
.style('stroke-dasharray', 'none')
|
|
3873
|
+
.call((g) => g.select('.domain').remove())
|
|
3874
|
+
.selectAll('line')
|
|
3875
|
+
.style('stroke-width', '0.5px');
|
|
3880
3876
|
}
|
|
3881
3877
|
renderXAxisGrid(svg, x, height) {
|
|
3882
3878
|
svg
|