axidio-styleguide-library1-v2 0.4.35 → 0.4.36

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,18 +3617,17 @@ 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
3621
- const totalHeight = height + margin.top + margin.bottom; // Added extra 60px
3620
+ const totalHeight = height + margin.top + margin.bottom;
3622
3621
  const outerContainer = chartContainer
3623
3622
  .append('div')
3624
3623
  .attr('id', this.uniqueId)
3625
3624
  .attr('class', 'outer-container')
3626
3625
  .style('width', '100%')
3627
- .style('height', `${totalHeight}px`) // Use calculated total height
3626
+ .style('height', `${totalHeight}px`)
3628
3627
  .style('overflow', 'hidden')
3629
3628
  .style('padding-left', `${margin.left}px`)
3630
3629
  .style('padding-right', `${rightSvgWidth}px`)
3631
- .style('margin-left', '15px')
3630
+ .style('margin-left', '0px') // FIXED: Remove left margin that might cause offset
3632
3631
  .style('position', 'relative');
3633
3632
  const leftSvgWidth = margin.left + 20;
3634
3633
  // FIXED: Y-axis SVG with proper height
@@ -3673,11 +3672,13 @@ class GroupChartComponent extends ComponentUniqueId {
3673
3672
  const { x, xScaleFromOrigin, y, lineYscale } = scales;
3674
3673
  const { height } = dimensions;
3675
3674
  const { metaData, lineData, keyList } = chartContext;
3676
- this.renderXAxis(svg, x, xScaleFromOrigin, height, chartContext, keyList);
3675
+ // Render Y-axis first to establish the reference point
3677
3676
  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);
3681
3682
  if (this.chartConfiguration.isXgridBetweenLabels) {
3682
3683
  this.renderXAxisGrid(svg, x, height);
3683
3684
  }
@@ -3860,22 +3861,22 @@ class GroupChartComponent extends ComponentUniqueId {
3860
3861
  }
3861
3862
  }
3862
3863
  renderYAxisGrid(svg, y, width) {
3864
+ // Alternative: Manually create grid lines for precise control
3865
+ const ticks = y.ticks(this.chartConfiguration.numberOfYTicks);
3863
3866
  svg
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
- .attr('transform', 'translate(0,0)')
3871
- .style('color', '#E0E0E0')
3872
- .style('opacity', '0.7')
3873
- .style('stroke-dasharray', 'none')
3874
- .call((g) => g.select('.domain').remove())
3875
- .selectAll('line')
3867
+ .selectAll('.y-grid-line')
3868
+ .data(ticks)
3869
+ .enter()
3870
+ .append('line')
3871
+ .attr('class', 'y-grid-line')
3872
+ .attr('x1', 0) // Start from Y-axis (x=0)
3873
+ .attr('x2', width) // Extend to full width
3874
+ .attr('y1', (d) => y(d))
3875
+ .attr('y2', (d) => y(d))
3876
+ .style('stroke', '#E0E0E0')
3876
3877
  .style('stroke-width', '0.5px')
3877
- .attr('x1', 0)
3878
- .attr('x2', width);
3878
+ .style('opacity', '0.7')
3879
+ .style('stroke-dasharray', 'none');
3879
3880
  }
3880
3881
  renderXAxisGrid(svg, x, height) {
3881
3882
  svg