axidio-styleguide-library1-v2 0.4.15 → 0.4.16

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.
@@ -3388,10 +3388,10 @@ class GroupChartComponent extends ComponentUniqueId {
3388
3388
  this.objectKeys = Object.keys;
3389
3389
  this.defaultConfiguration = {
3390
3390
  margin: {
3391
- top: 20, // FIXED: Reduced top margin
3391
+ top: 15, // FIXED: Reduced for 250px height
3392
3392
  right: 40,
3393
- bottom: 60, // FIXED: Reduced from 80 to 60 to fit in 300px
3394
- left: 100 // FIXED: Increased to 100 for Y-axis label + values spacing
3393
+ bottom: 50, // FIXED: Reduced for 250px height
3394
+ left: 95 // FIXED: Enough space for label + values
3395
3395
  },
3396
3396
  labelFormatter: ChartHelper.defaultFormatter,
3397
3397
  svgHeight: 70,
@@ -3622,22 +3622,22 @@ class GroupChartComponent extends ComponentUniqueId {
3622
3622
  .attr('id', this.uniqueId)
3623
3623
  .attr('class', 'outer-container')
3624
3624
  .style('width', '100%')
3625
- .style('height', `${height + margin.top + margin.bottom}px`) // FIXED: Explicit height
3625
+ .style('height', `${height + margin.top + margin.bottom}px`)
3626
3626
  .style('overflow-x', 'hidden')
3627
- .style('overflow-y', 'hidden') // FIXED: Prevent vertical overflow
3627
+ .style('overflow-y', 'hidden')
3628
3628
  .style('padding-left', `${margin.left}px`)
3629
3629
  .style('padding-right', `${rightSvgWidth}px`)
3630
3630
  .style('margin-left', '15px');
3631
- // FIXED: Increased width for Y-axis to prevent overlap
3631
+ // FIXED: Position Y-axis to show label properly
3632
3632
  const svgYAxisLeft = outerContainer
3633
3633
  .append('svg')
3634
- .attr('width', 100) // Keep at 100
3634
+ .attr('width', margin.left + 15) // FIXED: Width matches left margin
3635
3635
  .attr('height', height + margin.top + margin.bottom)
3636
3636
  .style('position', 'absolute')
3637
- .style('left', '0')
3637
+ .style('left', '-15px') // FIXED: Position to include label
3638
3638
  .style('z-index', 1)
3639
3639
  .append('g')
3640
- .attr('transform', `translate(${margin.left - 5},${margin.top})`); // FIXED: Adjusted transform
3640
+ .attr('transform', `translate(${margin.left},${margin.top})`); // FIXED: Proper transform
3641
3641
  const svgYAxisRight = outerContainer
3642
3642
  .append('svg')
3643
3643
  .attr('width', rightSvgWidth)
@@ -3651,13 +3651,13 @@ class GroupChartComponent extends ComponentUniqueId {
3651
3651
  .append('div')
3652
3652
  .attr('class', 'inner-container')
3653
3653
  .style('width', '100%')
3654
- .style('height', '100%') // FIXED: Full height
3654
+ .style('height', '100%')
3655
3655
  .style('overflow-x', 'auto')
3656
- .style('overflow-y', 'hidden'); // FIXED: Prevent vertical scroll
3656
+ .style('overflow-y', 'hidden');
3657
3657
  const svg = innerContainer
3658
3658
  .append('svg')
3659
3659
  .attr('width', dimensions.width - rightSvgWidth)
3660
- .attr('height', height + margin.top + margin.bottom) // FIXED: Exact height
3660
+ .attr('height', height + margin.top + margin.bottom)
3661
3661
  .append('g')
3662
3662
  .attr('transform', `translate(0,${margin.top})`);
3663
3663
  return { outerContainer, svgYAxisLeft, svgYAxisRight, svg };
@@ -3682,15 +3682,24 @@ class GroupChartComponent extends ComponentUniqueId {
3682
3682
  renderXAxis(svg, x, xScaleFromOrigin, height, chartContext, keyList) {
3683
3683
  const { data, metaData } = chartContext;
3684
3684
  if (this.chartConfiguration.isMultiChartGridLine === undefined) {
3685
- svg
3685
+ // FIXED: X-axis with bottom line
3686
+ const xAxis = svg
3686
3687
  .append('g')
3687
3688
  .attr('class', 'x1 axis1')
3688
3689
  .attr('transform', `translate(0,${height})`)
3689
- .call(d3.axisBottom(x))
3690
- .call((g) => g.select('.domain').remove());
3691
- svg.selectAll('g.x1.axis1 g.tick line').remove();
3690
+ .call(d3.axisBottom(x).tickSize(0));
3691
+ // FIXED: Keep X-axis line visible
3692
+ xAxis
3693
+ .select('.domain')
3694
+ .style('stroke', 'var(--chart-axis-color, #999999)')
3695
+ .style('stroke-width', '1px');
3696
+ xAxis.selectAll('g.tick line').remove();
3692
3697
  const textClass = 'lib-xaxis-labels-texts-drilldown';
3693
- const textSelection = svg.selectAll('g.x1.axis1 g.tick text').attr('class', textClass).style('fill', 'var(--chart-text-color)');
3698
+ const textSelection = xAxis
3699
+ .selectAll('g.tick text')
3700
+ .attr('class', textClass)
3701
+ .style('fill', 'var(--chart-text-color)')
3702
+ .style('font-size', '12px');
3694
3703
  if (keyList.length > 1 && !metaData.xLabel) {
3695
3704
  textSelection.attr('y', 32);
3696
3705
  }
@@ -3701,14 +3710,19 @@ class GroupChartComponent extends ComponentUniqueId {
3701
3710
  if (this.chartConfiguration.xLabelsOnSameLine) {
3702
3711
  this.renderXLabelsOnSameLine(svg, data, metaData);
3703
3712
  }
3704
- // Render bottom x-axis
3705
- svg
3713
+ // Bottom x-axis with line
3714
+ const xAxis2 = svg
3706
3715
  .append('g')
3707
3716
  .attr('class', 'x2 axis2')
3708
3717
  .attr('transform', `translate(0,${height})`)
3709
3718
  .style('color', '#000')
3710
- .call(d3.axisBottom(xScaleFromOrigin).tickSize(0))
3711
- .call((g) => g.select('.domain').attr('fill', 'none'));
3719
+ .call(d3.axisBottom(xScaleFromOrigin).tickSize(0));
3720
+ // FIXED: Show X-axis line
3721
+ xAxis2
3722
+ .select('.domain')
3723
+ .style('stroke', 'var(--chart-axis-color, #999999)')
3724
+ .style('stroke-width', '1px')
3725
+ .attr('fill', 'none');
3712
3726
  svg.selectAll('g.x2.axis2 g.tick text').style('display', 'none');
3713
3727
  if (this.isZoomedOut) {
3714
3728
  svg.selectAll('.lib-xaxis-labels-texts-drilldown').attr('class', 'lib-display-hidden');
@@ -3777,6 +3791,7 @@ class GroupChartComponent extends ComponentUniqueId {
3777
3791
  });
3778
3792
  }
3779
3793
  renderYAxis(svg, svgYAxisLeft, svgYAxisRight, y, dimensions) {
3794
+ // Main Y-axis in chart area (hidden)
3780
3795
  svg
3781
3796
  .append('g')
3782
3797
  .attr('class', 'lib-stacked-y-axis-text yaxis-dashed')
@@ -3784,26 +3799,32 @@ class GroupChartComponent extends ComponentUniqueId {
3784
3799
  .attr('transform', 'translate(0,0)')
3785
3800
  .call(y)
3786
3801
  .style('display', 'none');
3802
+ // FIXED: Left Y-axis with proper positioning
3787
3803
  const yAxisLeft = d3
3788
3804
  .axisLeft(y)
3789
3805
  .tickSize(0)
3790
3806
  .ticks(this.chartConfiguration.numberOfYTicks)
3791
3807
  .tickFormat(this.chartConfiguration.yAxisLabelFomatter);
3792
- svgYAxisLeft
3793
- .append('g')
3808
+ const yAxisGroup = svgYAxisLeft
3794
3809
  .append('g')
3795
3810
  .attr('class', 'lib-yaxis-labels-texts-drilldown yaxis-dashed')
3796
3811
  .attr('style', this.chartConfiguration.yAxisCustomTextStyles)
3797
3812
  .attr('transform', 'translate(0,0)')
3798
- .call(yAxisLeft)
3799
- .call((g) => g.select('.domain').remove())
3813
+ .call(yAxisLeft);
3814
+ // FIXED: Add Y-axis vertical line
3815
+ yAxisGroup
3816
+ .select('.domain')
3817
+ .style('stroke', 'var(--chart-axis-color, #999999)')
3818
+ .style('stroke-width', '1px');
3819
+ // FIXED: Style Y-axis text with proper positioning
3820
+ yAxisGroup
3800
3821
  .selectAll('text')
3801
3822
  .style('fill', 'var(--chart-text-color)')
3802
3823
  .style('font-size', '12px')
3803
3824
  .style('font-weight', '400')
3804
- .attr('x', -10) // FIXED: Move Y-axis values slightly right to create gap
3825
+ .attr('x', -8) // FIXED: Slight offset from axis line
3805
3826
  .attr('dy', '0.32em');
3806
- svgYAxisLeft.selectAll('.tick line').remove();
3827
+ // Right Y-axis (hidden)
3807
3828
  svgYAxisRight
3808
3829
  .append('g')
3809
3830
  .attr('class', 'lib-yaxis-labels-texts-drilldown yaxis-dashed')
@@ -3835,12 +3856,12 @@ class GroupChartComponent extends ComponentUniqueId {
3835
3856
  .ticks(this.chartConfiguration.numberOfYTicks)
3836
3857
  .tickSize(-width)
3837
3858
  .tickFormat(''))
3838
- .style('color', '#E8E8E8') // FIXED: Very light gray
3859
+ .style('color', '#E8E8E8')
3839
3860
  .style('opacity', '0.8')
3840
3861
  .style('stroke-dasharray', 'none')
3841
3862
  .call((g) => g.select('.domain').remove())
3842
3863
  .selectAll('line')
3843
- .style('stroke-width', '0.5px'); // FIXED: Thinner lines
3864
+ .style('stroke-width', '0.5px');
3844
3865
  }
3845
3866
  renderXAxisGrid(svg, x, height) {
3846
3867
  svg
@@ -4116,12 +4137,13 @@ class GroupChartComponent extends ComponentUniqueId {
4116
4137
  .attr('class', 'lib-axis-group-label font-size-1')
4117
4138
  .attr('style', this.chartConfiguration.yAxisCustomlabelStyles)
4118
4139
  .attr('transform', 'rotate(-90)')
4119
- // FIXED: Proper positioning with adequate spacing from Y-axis values
4120
- .attr('y', -65) // FIXED: Moved further left to avoid overlap (was: -margin.left + 10)
4140
+ // FIXED: Proper positioning for label
4141
+ .attr('y', -70) // FIXED: Distance from Y-axis
4121
4142
  .attr('x', 0 - height / 2)
4122
4143
  .attr('dy', '1em')
4123
4144
  .style('text-anchor', 'middle')
4124
- .style('font-size', '13px')
4145
+ .style('font-size', '12px')
4146
+ .style('font-weight', '400')
4125
4147
  .attr('fill', 'var(--chart-text-color)');
4126
4148
  if (this.chartConfiguration.isMultiChartGridLine === undefined) {
4127
4149
  svgYAxisLeft.selectAll('.lib-axis-group-label').text(yLabel);
@@ -4149,11 +4171,11 @@ class GroupChartComponent extends ComponentUniqueId {
4149
4171
  .append('text')
4150
4172
  .attr('class', baseClass)
4151
4173
  .attr('style', this.chartConfiguration.xAxisCustomlabelStyles)
4152
- // FIXED: Adjusted for smaller bottom margin
4153
- .attr('transform', `translate(${width / 2},${height + 40})`)
4174
+ // FIXED: Adjusted for 250px height
4175
+ .attr('transform', `translate(${width / 2},${height + 35})`)
4154
4176
  .style('text-anchor', 'middle')
4155
4177
  .style('fill', 'var(--chart-text-color)')
4156
- .style('font-size', '13px')
4178
+ .style('font-size', '12px')
4157
4179
  .text(isAcronym ? xLabel.toUpperCase() : xLabel.toLowerCase())
4158
4180
  .style('text-transform', isAcronym ? 'none' : 'capitalize');
4159
4181
  }