axidio-styleguide-library1-v2 0.3.48 → 0.3.50

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.
@@ -7008,24 +7008,36 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7008
7008
  }
7009
7009
  return `${baseClass} lib-axis-waterfall-label`;
7010
7010
  }
7011
- renderGridsFromLeftAxis(svgYAxisLeft, scales, dimensions) {
7012
- if (this.chartConfiguration.yAxisGrid) {
7013
- // Ensure full grid length by not subtracting the left axis width
7014
- const gridWidth = dimensions.requiredSvgWidth; // This uses the real chart width
7015
- svgYAxisLeft
7016
- .append('g')
7017
- .attr('class', 'grid horizontal-grid-from-left')
7018
- .attr('transform', 'translate(0, 0)')
7019
- .call(d3.axisLeft(scales.yScale)
7020
- .ticks(this.chartConfiguration.numberOfYTicks)
7021
- .tickSize(-gridWidth)
7022
- .tickFormat(() => ''))
7023
- .style('color', 'var(--chart-grid-color)')
7024
- .style('opacity', 1)
7025
- .call(g => g.select('.domain').remove())
7026
- .call(g => g.selectAll('.tick line').style('stroke', 'var(--chart-grid-color)').style('stroke-width', '1px'));
7027
- }
7028
- }
7011
+ // private renderGridsFromLeftAxis(
7012
+ // svgYAxisLeft: any,
7013
+ // scales: any,
7014
+ // dimensions: Dimensions
7015
+ // ) {
7016
+ // if (this.chartConfiguration.yAxisGrid) {
7017
+ // // Calculate how far the grid lines need to extend
7018
+ // // They start from the left Y-axis (at x=80) and go to the full width
7019
+ // const gridWidth = dimensions.requiredSvgWidth + 80 + this.CONSTANTS.RIGHT_SVG_WIDTH;
7020
+ // svgYAxisLeft
7021
+ // .append('g')
7022
+ // .attr('class', 'grid horizontal-grid-from-left')
7023
+ // .attr('transform', 'translate(0,0)')
7024
+ // .call(
7025
+ // d3
7026
+ // .axisLeft(scales.yScale)
7027
+ // .ticks(this.chartConfiguration.numberOfYTicks)
7028
+ // .tickSize(-gridWidth) // Negative to extend right
7029
+ // .tickFormat('')
7030
+ // )
7031
+ // .style('color', 'var(--chart-grid-color)')
7032
+ // .style('opacity', '1')
7033
+ // .call((g: any) => {
7034
+ // g.select('.domain').remove();
7035
+ // g.selectAll('.tick line')
7036
+ // .style('stroke', 'var(--chart-grid-color)')
7037
+ // .style('stroke-width', '1px');
7038
+ // });
7039
+ // }
7040
+ // }
7029
7041
  applyConfigurationFlags() {
7030
7042
  if (this.chartConfiguration.isHeaderVisible !== undefined) {
7031
7043
  this.isHeaderVisible = this.chartConfiguration.isHeaderVisible;
@@ -7060,7 +7072,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7060
7072
  data.sort((a, b) => b.total - a.total);
7061
7073
  const scales = this.createScales(data, layers, lineData, dimensions);
7062
7074
  const axes = this.createAxes(scales);
7063
- this.renderGridsFromLeftAxis(svgYAxisLeft, scales, dimensions);
7075
+ // this.renderGridsFromLeftAxis(svgYAxisLeft, scales, dimensions);
7064
7076
  this.renderGrids(svg, scales, dimensions);
7065
7077
  const rect = this.renderBars(svg, layers, scales, metaData, dimensions);
7066
7078
  this.renderAxes(svg, svgYAxisLeft, svgYAxisRight, axes, scales, dimensions, data);
@@ -7070,6 +7082,25 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7070
7082
  this.renderLineChart(svg, lineData, scales, colors, metaData);
7071
7083
  }
7072
7084
  renderGrids(svg, scales, dimensions) {
7085
+ if (this.chartConfiguration.yAxisGrid) {
7086
+ svg
7087
+ .insert('g', ':first-child')
7088
+ .attr('class', 'grid horizontal-grid')
7089
+ .call(d3
7090
+ .axisLeft(scales.yScale)
7091
+ .ticks(this.chartConfiguration.numberOfYTicks)
7092
+ .tickSize(-dimensions.requiredSvgWidth)
7093
+ .tickFormat(''))
7094
+ .style('color', 'var(--chart-grid-color)')
7095
+ .style('opacity', '1')
7096
+ .call((g) => {
7097
+ g.select('.domain').remove();
7098
+ g.selectAll('.tick line')
7099
+ .style('stroke', 'var(--chart-grid-color)')
7100
+ .style('stroke-width', '1px')
7101
+ .style('shape-rendering', 'crispEdges');
7102
+ });
7103
+ }
7073
7104
  if (this.chartConfiguration.isXgridBetweenLabels) {
7074
7105
  svg
7075
7106
  .append('g')