axidio-styleguide-library1-v2 0.2.80 → 0.2.81

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.
@@ -6488,11 +6488,9 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6488
6488
  LONG_TICK_LENGTH: 16,
6489
6489
  SHORT_TICK_LENGTH_BG: 5,
6490
6490
  LONG_TICK_LENGTH_BG: 30,
6491
- MIN_MOBILE_BAR_WIDTH: 28, // Adjusted for better mobile fit
6492
- DESKTOP_MIN_BAR_WIDTH: 40,
6493
- TABLET_MIN_BAR_WIDTH: 35, // Added tablet-specific width
6494
- MOBILE_BAR_PADDING: 10, // Reduced padding for mobile
6495
- TABLET_BAR_PADDING: 8, // Added tablet-specific padding
6491
+ DESKTOP_BAR_WIDTH: 40, // Desktop bar width
6492
+ MOBILE_BAR_WIDTH: 25, // Mobile/Tablet bar width (reduced)
6493
+ BAR_GAP: 30, // Gap between bars (increased for better separation)
6496
6494
  ZOOM_THRESHOLD: 30,
6497
6495
  ZOOM_IN_THRESHOLD: 8,
6498
6496
  };
@@ -6557,48 +6555,6 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6557
6555
  removeExistingChart() {
6558
6556
  d3.select('#' + this.uniqueId).remove();
6559
6557
  }
6560
- getDeviceConfig() {
6561
- const width = window.innerWidth;
6562
- return {
6563
- isMobile: width < 768, // Changed from 576 to 768 for better mobile coverage
6564
- isTablet: width >= 768 && width < 1024, // Changed from 576-992 to 768-1024
6565
- isDesktop: width >= 1024, // Changed from 992 to 1024
6566
- };
6567
- }
6568
- configureResponsiveSettings(device) {
6569
- if (device.isMobile) {
6570
- this.chartConfiguration.margin = { top: 15, right: 5, bottom: 35, left: 25 };
6571
- this.chartConfiguration.numberOfYTicks = 4;
6572
- this.chartConfiguration.svgHeight = 55;
6573
- }
6574
- else if (device.isTablet) {
6575
- this.chartConfiguration.margin = { top: 20, right: 15, bottom: 40, left: 35 };
6576
- this.chartConfiguration.numberOfYTicks = 5;
6577
- this.chartConfiguration.svgHeight = 65;
6578
- }
6579
- else {
6580
- // Desktop/Large screens
6581
- const width = window.innerWidth;
6582
- if (width >= 1920) {
6583
- // Large monitors
6584
- this.chartConfiguration.margin = { top: 35, right: 35, bottom: 55, left: 70 };
6585
- this.chartConfiguration.numberOfYTicks = 8;
6586
- this.chartConfiguration.svgHeight = 85;
6587
- }
6588
- else if (width >= 1366) {
6589
- // Medium monitors
6590
- this.chartConfiguration.margin = { top: 30, right: 30, bottom: 50, left: 60 };
6591
- this.chartConfiguration.numberOfYTicks = 7;
6592
- this.chartConfiguration.svgHeight = 80;
6593
- }
6594
- else {
6595
- // Small desktops/laptops
6596
- this.chartConfiguration.margin = { top: 25, right: 25, bottom: 45, left: 50 };
6597
- this.chartConfiguration.numberOfYTicks = 6;
6598
- this.chartConfiguration.svgHeight = 75;
6599
- }
6600
- }
6601
- }
6602
6558
  mergeConfigurations() {
6603
6559
  for (const key in this.defaultConfiguration) {
6604
6560
  this.chartConfiguration[key] = ChartHelper.getValueByConfigurationType(key, this.defaultConfiguration, this.customChartConfiguration);
@@ -6617,26 +6573,18 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6617
6573
  }
6618
6574
  return metaData;
6619
6575
  }
6620
- calculateDimensions(chartContainer, verticalContainer, margin, device, dataLength) {
6576
+ calculateDimensions(chartContainer, verticalContainer, margin, dataLength) {
6621
6577
  const containerWidth = chartContainer.node().getBoundingClientRect().width;
6622
6578
  const containerHeight = verticalContainer.node().getBoundingClientRect().height;
6623
6579
  let width = containerWidth - margin.left - margin.right;
6624
6580
  let height = containerHeight * (this.chartConfiguration.svgHeight / 100) - margin.top - margin.bottom;
6625
- // Responsive zoom handling
6581
+ // Fixed zoom handling - same for all resolutions
6626
6582
  if (dataLength > this.CONSTANTS.ZOOM_THRESHOLD && this.isZoomedOut) {
6627
- const minWidth = device.isMobile
6628
- ? dataLength * 12
6629
- : device.isTablet
6630
- ? dataLength * 20
6631
- : dataLength * 25;
6583
+ const minWidth = dataLength * 25;
6632
6584
  width = Math.max(width, minWidth);
6633
6585
  }
6634
6586
  if (dataLength > this.CONSTANTS.ZOOM_IN_THRESHOLD && !this.isZoomedOut) {
6635
- width = device.isMobile
6636
- ? dataLength * 50
6637
- : device.isTablet
6638
- ? dataLength * 90
6639
- : dataLength * 130;
6587
+ width = dataLength * 130;
6640
6588
  }
6641
6589
  if (this.chartConfiguration.isFullScreen) {
6642
6590
  height = this.chartConfiguration.svgHeight !== 80
@@ -6644,28 +6592,44 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6644
6592
  : containerHeight;
6645
6593
  }
6646
6594
  if (this.chartConfiguration.isDrilldownChart) {
6647
- const offset = device.isMobile ? 60 : device.isTablet ? 90 : 130;
6648
- height = containerHeight - margin.top - margin.bottom - offset;
6595
+ height = containerHeight - margin.top - margin.bottom - 130;
6649
6596
  }
6597
+ // Responsive bar width based on screen size and number of bars
6598
+ const isMobileOrTablet = window.innerWidth < 1024;
6650
6599
  let barWidth;
6651
6600
  let barPadding;
6652
- let requiredSvgWidth;
6653
- if (device.isMobile) {
6654
- barWidth = this.CONSTANTS.MIN_MOBILE_BAR_WIDTH;
6655
- barPadding = this.CONSTANTS.MOBILE_BAR_PADDING;
6656
- requiredSvgWidth = Math.max(width - this.CONSTANTS.RIGHT_SVG_WIDTH, (barWidth + barPadding) * dataLength + this.CONSTANTS.LEFT_RIGHT_SPACES * 2 +
6657
- this.CONSTANTS.RIGHT_SVG_WIDTH - barPadding);
6658
- }
6659
- else if (device.isTablet) {
6660
- barWidth = this.CONSTANTS.TABLET_MIN_BAR_WIDTH;
6661
- barPadding = this.CONSTANTS.TABLET_BAR_PADDING;
6662
- requiredSvgWidth = Math.max(width - this.CONSTANTS.RIGHT_SVG_WIDTH, (barWidth + barPadding) * dataLength + this.CONSTANTS.LEFT_RIGHT_SPACES * 2);
6601
+ if (isMobileOrTablet) {
6602
+ // Dynamic sizing for mobile/tablet based on number of bars
6603
+ if (dataLength === 1) {
6604
+ barWidth = 60; // Single bar - very wide
6605
+ barPadding = 0; // No gap needed
6606
+ }
6607
+ else if (dataLength === 2) {
6608
+ barWidth = 50; // 2 bars - wide with gap
6609
+ barPadding = 45; // Significant gap between 2 bars
6610
+ }
6611
+ else if (dataLength === 3) {
6612
+ barWidth = 45; // 3 bars - wide
6613
+ barPadding = 40; // Good spacing
6614
+ }
6615
+ else if (dataLength <= 5) {
6616
+ barWidth = 35; // Medium width for 4-5 bars
6617
+ barPadding = 30; // Medium spacing
6618
+ }
6619
+ else {
6620
+ barWidth = 25; // Narrower for many bars
6621
+ barPadding = 25; // Tighter spacing for many bars
6622
+ }
6663
6623
  }
6664
6624
  else {
6665
- barWidth = Math.max(this.CONSTANTS.DESKTOP_MIN_BAR_WIDTH, (width - this.CONSTANTS.RIGHT_SVG_WIDTH - this.CONSTANTS.LEFT_RIGHT_SPACES * 2) / dataLength);
6666
- barPadding = 0;
6667
- requiredSvgWidth = width - this.CONSTANTS.RIGHT_SVG_WIDTH;
6668
- }
6625
+ // Desktop: consistent sizing
6626
+ barWidth = this.CONSTANTS.DESKTOP_BAR_WIDTH;
6627
+ barPadding = this.CONSTANTS.BAR_GAP;
6628
+ }
6629
+ // Calculate required SVG width: bars + gaps + side spaces
6630
+ const totalBarsWidth = barWidth * dataLength;
6631
+ const totalGaps = barPadding * (dataLength - 1);
6632
+ const requiredSvgWidth = Math.max(width - this.CONSTANTS.RIGHT_SVG_WIDTH, totalBarsWidth + totalGaps + (this.CONSTANTS.LEFT_RIGHT_SPACES * 2));
6669
6633
  return {
6670
6634
  width,
6671
6635
  height,
@@ -6683,7 +6647,8 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6683
6647
  .attr('class', 'outer-container')
6684
6648
  .style('width', '100%')
6685
6649
  .style('height', dimensions.height)
6686
- .style('overflow-x', 'hidden')
6650
+ .style('position', 'relative')
6651
+ .style('overflow', 'hidden')
6687
6652
  .style('padding-left', `${margin.left}px`)
6688
6653
  .style('margin-left', '10px')
6689
6654
  .style('padding-right', `${this.CONSTANTS.RIGHT_SVG_WIDTH}px`);
@@ -6693,7 +6658,9 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6693
6658
  .attr('height', dimensions.height + margin.top + margin.bottom)
6694
6659
  .style('position', 'absolute')
6695
6660
  .style('left', '0')
6696
- .style('z-index', 1)
6661
+ .style('top', '0')
6662
+ .style('z-index', 3)
6663
+ .style('pointer-events', 'none')
6697
6664
  .append('g')
6698
6665
  .attr('transform', `translate(${margin.left + 10},${margin.top})`);
6699
6666
  const svgYAxisRight = outerContainer
@@ -6702,34 +6669,60 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6702
6669
  .attr('height', dimensions.height + margin.top + margin.bottom)
6703
6670
  .style('position', 'absolute')
6704
6671
  .style('right', '2px')
6672
+ .style('top', '0')
6673
+ .style('z-index', 3)
6674
+ .style('pointer-events', 'none')
6675
+ .append('g')
6676
+ .attr('transform', `translate(0,${margin.top})`);
6677
+ const svgGridOverlay = outerContainer
6678
+ .append('svg')
6679
+ .attr('width', `calc(100% - ${margin.left + this.CONSTANTS.RIGHT_SVG_WIDTH}px)`)
6680
+ .attr('height', dimensions.height + margin.top + margin.bottom)
6681
+ .style('position', 'absolute')
6682
+ .style('left', `${margin.left}px`)
6683
+ .style('top', '0')
6705
6684
  .style('z-index', 1)
6685
+ .style('pointer-events', 'none')
6706
6686
  .append('g')
6707
6687
  .attr('transform', `translate(0,${margin.top})`);
6708
6688
  const innerContainer = outerContainer
6709
6689
  .append('div')
6710
6690
  .attr('class', 'inner-container')
6711
6691
  .style('width', '100%')
6712
- .style('overflow-x', 'auto');
6692
+ .style('height', '100%')
6693
+ .style('overflow-x', 'auto')
6694
+ .style('overflow-y', 'hidden')
6695
+ .style('position', 'relative')
6696
+ .style('z-index', 2);
6713
6697
  const svg = innerContainer
6714
6698
  .append('svg')
6715
6699
  .attr('width', dimensions.requiredSvgWidth)
6716
6700
  .attr('height', dimensions.height + margin.top + margin.bottom + 30)
6717
6701
  .append('g')
6718
6702
  .attr('transform', `translate(0,${margin.top})`);
6719
- return { svg, svgYAxisLeft, svgYAxisRight, innerContainer };
6703
+ return { svg, svgYAxisLeft, svgYAxisRight, svgGridOverlay, innerContainer };
6720
6704
  }
6721
- createScales(data, layers, lineData, dimensions, device) {
6705
+ createScales(data, layers, lineData, dimensions) {
6722
6706
  const { width, height, barWidth, barPadding } = dimensions;
6723
- // Adjust padding based on device
6724
- const padding = device.isMobile ? 0.15 : device.isTablet ? 0.3 : 0.5;
6707
+ // Calculate total width needed for all bars with proper spacing
6708
+ const totalBarsWidth = data.length * barWidth;
6709
+ const totalSpacing = (data.length - 1) * barPadding;
6710
+ const requiredWidth = totalBarsWidth + totalSpacing + (this.CONSTANTS.LEFT_RIGHT_SPACES * 2);
6711
+ // Use the larger of container width or required width for proper spacing
6712
+ const effectiveWidth = Math.max(width - this.CONSTANTS.RIGHT_SVG_WIDTH, requiredWidth);
6713
+ // Calculate padding ratio to create exact pixel gaps between bars
6714
+ const totalAvailableSpace = effectiveWidth;
6715
+ const paddingRatio = barPadding / (barWidth + barPadding);
6725
6716
  const xScale = d3
6726
6717
  .scaleBand()
6727
6718
  .rangeRound([
6728
6719
  this.CONSTANTS.LEFT_RIGHT_SPACES,
6729
- width - this.CONSTANTS.RIGHT_SVG_WIDTH - this.CONSTANTS.LEFT_RIGHT_SPACES
6720
+ effectiveWidth + this.CONSTANTS.LEFT_RIGHT_SPACES - this.CONSTANTS.RIGHT_SVG_WIDTH
6730
6721
  ])
6731
6722
  .domain(data.map(d => d.name).reverse())
6732
- .padding(padding);
6723
+ .paddingInner(paddingRatio)
6724
+ .paddingOuter(0.5)
6725
+ .align(0.5); // Center alignment
6733
6726
  const xScaleFromOrigin = d3
6734
6727
  .scaleBand()
6735
6728
  .rangeRound([width - this.CONSTANTS.RIGHT_SVG_WIDTH, 0])
@@ -6778,7 +6771,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6778
6771
  }
6779
6772
  return { xAxis, yAxis, yLineAxis };
6780
6773
  }
6781
- renderBars(svg, layers, scales, metaData, dimensions, device) {
6774
+ renderBars(svg, layers, scales, metaData, dimensions) {
6782
6775
  const layer = svg
6783
6776
  .selectAll('.layer')
6784
6777
  .data(layers)
@@ -6790,11 +6783,11 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6790
6783
  .selectAll('rect')
6791
6784
  .data((d) => d)
6792
6785
  .enter();
6793
- this.appendRectangles(rect, scales, metaData, dimensions, device);
6786
+ this.appendRectangles(rect, scales, metaData, dimensions);
6794
6787
  this.addInteractions(rect, svg, metaData, scales);
6795
6788
  return rect;
6796
6789
  }
6797
- appendRectangles(rect, scales, metaData, dimensions, device) {
6790
+ appendRectangles(rect, scales, metaData, dimensions) {
6798
6791
  const { barWidth, barPadding } = dimensions;
6799
6792
  const { xScale, yScale } = scales;
6800
6793
  rect
@@ -6813,17 +6806,19 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6813
6806
  }
6814
6807
  return 0;
6815
6808
  })
6816
- .attr('x', (d, i) => {
6817
- if (device.isMobile) {
6818
- return this.CONSTANTS.LEFT_RIGHT_SPACES + i * (barWidth + barPadding);
6819
- }
6809
+ .attr('x', (d) => {
6810
+ // Center the bar within its bandwidth with proper spacing
6811
+ const xPosition = xScale(d.data.name);
6812
+ const bandwidth = xScale.bandwidth();
6820
6813
  if (!this.chartConfiguration.isMultiChartGridLine) {
6821
- return xScale(d.data.name);
6814
+ // Center the fixed-width bar in the available space
6815
+ return xPosition + (bandwidth - barWidth) / 2;
6822
6816
  }
6823
6817
  if (this.chartConfiguration.isDrilldownChart && this.chartData.data.length <= 3) {
6824
- return xScale(d.data.name) + xScale.bandwidth() / 2 - 35;
6818
+ return xPosition + bandwidth / 2 - 35;
6825
6819
  }
6826
- return xScale(d.data.name) + xScale.bandwidth() * 0.1;
6820
+ const calculatedWidth = bandwidth * 0.8;
6821
+ return xPosition + (bandwidth - calculatedWidth) / 2;
6827
6822
  })
6828
6823
  .attr('height', (d) => {
6829
6824
  if (!isNaN(d[0]) && !isNaN(d[1])) {
@@ -6833,10 +6828,8 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6833
6828
  return 0;
6834
6829
  })
6835
6830
  .attr('width', (d) => {
6836
- if (device.isMobile)
6837
- return barWidth;
6838
6831
  if (!this.chartConfiguration.isMultiChartGridLine)
6839
- return xScale.bandwidth();
6832
+ return barWidth;
6840
6833
  if (this.chartConfiguration.isDrilldownChart && this.chartData.data.length <= 3) {
6841
6834
  return 70;
6842
6835
  }
@@ -6892,23 +6885,13 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6892
6885
  const value = d[1] - d[0];
6893
6886
  if (isNaN(value))
6894
6887
  return;
6895
- const device = this.getDeviceConfig();
6896
6888
  const bandwidth = xScale.bandwidth();
6897
- // Responsive tooltip width
6898
- let width;
6899
- if (device.isMobile) {
6900
- width = Math.min(bandwidth + 40, 150);
6901
- }
6902
- else if (device.isTablet) {
6903
- width = Math.min(bandwidth + 60, 200);
6904
- }
6905
- else {
6906
- width = /week/i.test(d.data.name) && /\d{4}-\d{2}-\d{2}/.test(d.data.name)
6907
- ? '250px'
6908
- : bandwidth + this.CONSTANTS.LEFT_RIGHT_SPACES * 2 > 180
6909
- ? '180px'
6910
- : bandwidth + this.CONSTANTS.LEFT_RIGHT_SPACES * 2;
6911
- }
6889
+ // Fixed tooltip width for all resolutions
6890
+ const width = /week/i.test(d.data.name) && /\d{4}-\d{2}-\d{2}/.test(d.data.name)
6891
+ ? '250px'
6892
+ : bandwidth + this.CONSTANTS.LEFT_RIGHT_SPACES * 2 > 180
6893
+ ? '180px'
6894
+ : bandwidth + this.CONSTANTS.LEFT_RIGHT_SPACES * 2;
6912
6895
  svg
6913
6896
  .append('foreignObject')
6914
6897
  .attr('x', this.calculateTooltipX(d, xScale, width))
@@ -7026,8 +7009,9 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7026
7009
  }
7027
7010
  }
7028
7011
  initializeStackedChart() {
7029
- const device = this.getDeviceConfig();
7030
- this.configureResponsiveSettings(device);
7012
+ this.chartConfiguration.margin = { top: 20, right: 20, bottom: 40, left: 40 };
7013
+ this.chartConfiguration.numberOfYTicks = 5;
7014
+ this.chartConfiguration.svgHeight = 70;
7031
7015
  this.mergeConfigurations();
7032
7016
  this.applyConfigurationFlags();
7033
7017
  const data = this.chartData.data;
@@ -7038,22 +7022,22 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7038
7022
  const chartContainer = d3.select(this.containerElt.nativeElement);
7039
7023
  const verticalstackedcontainer = d3.select(this.verticalstackedcontainerElt.nativeElement);
7040
7024
  const margin = this.chartConfiguration.margin;
7041
- const dimensions = this.calculateDimensions(chartContainer, verticalstackedcontainer, margin, device, data.length);
7042
- const { svg, svgYAxisLeft, svgYAxisRight } = this.createSvgContainers(chartContainer, dimensions, margin);
7025
+ const dimensions = this.calculateDimensions(chartContainer, verticalstackedcontainer, margin, data.length);
7026
+ const { svg, svgYAxisLeft, svgYAxisRight, svgGridOverlay } = this.createSvgContainers(chartContainer, dimensions, margin);
7043
7027
  const stack = d3.stack().keys(keyList).offset(d3.stackOffsetNone);
7044
7028
  const layers = stack(data);
7045
7029
  data.sort((a, b) => b.total - a.total);
7046
- const scales = this.createScales(data, layers, lineData, dimensions, device);
7030
+ const scales = this.createScales(data, layers, lineData, dimensions);
7047
7031
  const axes = this.createAxes(scales);
7048
- this.renderGrids(svg, scales, dimensions);
7049
- const rect = this.renderBars(svg, layers, scales, metaData, dimensions, device);
7050
- this.renderAxes(svg, svgYAxisLeft, svgYAxisRight, axes, scales, dimensions, device, data);
7032
+ this.renderGrids(svg, svgGridOverlay, scales, dimensions);
7033
+ const rect = this.renderBars(svg, layers, scales, metaData, dimensions);
7034
+ this.renderAxes(svg, svgYAxisLeft, svgYAxisRight, axes, scales, dimensions, data);
7051
7035
  this.renderAxisLabels(svg, svgYAxisLeft, metaData, dimensions, margin);
7052
- this.renderTargetLine(svg, svgYAxisRight, scales, dimensions, metaData);
7036
+ this.renderTargetLine(svgGridOverlay, svgYAxisRight, scales, dimensions, metaData);
7053
7037
  this.renderDataLabels(rect, scales, metaData, dimensions);
7054
7038
  this.renderLineChart(svg, lineData, scales, colors, metaData);
7055
7039
  }
7056
- renderGrids(svg, scales, dimensions) {
7040
+ renderGrids(svg, svgGridOverlay, scales, dimensions) {
7057
7041
  if (this.chartConfiguration.isXgridBetweenLabels) {
7058
7042
  svg
7059
7043
  .append('g')
@@ -7065,30 +7049,33 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7065
7049
  .call((g) => g.select('.domain').remove());
7066
7050
  }
7067
7051
  if (this.chartConfiguration.yAxisGrid) {
7068
- svg
7052
+ const containerWidth = dimensions.width - this.CONSTANTS.RIGHT_SVG_WIDTH - 80;
7053
+ svgGridOverlay
7069
7054
  .append('g')
7070
- .attr('class', 'grid')
7055
+ .attr('class', 'grid grid-fixed')
7071
7056
  .call(d3
7072
7057
  .axisLeft(scales.yScale)
7073
7058
  .ticks(this.chartConfiguration.numberOfYTicks)
7074
- .tickSize(-dimensions.width)
7059
+ .tickSize(-containerWidth)
7075
7060
  .tickFormat(''))
7076
7061
  .style('color', 'var(--chart-grid-color)')
7077
7062
  .style('opacity', '1');
7078
7063
  }
7079
7064
  if (this.chartConfiguration.xAxisGrid) {
7065
+ const containerWidth = dimensions.width - this.CONSTANTS.RIGHT_SVG_WIDTH - 80;
7080
7066
  for (let j = 0; j < this.chartConfiguration.xAxisGrid.length; j++) {
7081
- svg
7082
- .append('g')
7083
- .attr('class', `x${j + 2} axis${j + 2}`)
7084
- .style('color', 'var(--chart-grid-color)')
7085
- .attr('transform', `translate(0,${dimensions.height * this.chartConfiguration.xAxisGrid[j]})`)
7086
- .call(d3.axisBottom(scales.xScale).tickSize(0).ticks(5).tickFormat(''))
7087
- .style('fill', 'var(--chart-text-color)');
7067
+ svgGridOverlay
7068
+ .append('line')
7069
+ .attr('x1', 0)
7070
+ .attr('x2', containerWidth)
7071
+ .attr('y1', dimensions.height * this.chartConfiguration.xAxisGrid[j])
7072
+ .attr('y2', dimensions.height * this.chartConfiguration.xAxisGrid[j])
7073
+ .style('stroke', 'var(--chart-grid-color)')
7074
+ .style('stroke-width', 1);
7088
7075
  }
7089
7076
  }
7090
7077
  }
7091
- renderAxes(svg, svgYAxisLeft, svgYAxisRight, axes, scales, dimensions, device, data) {
7078
+ renderAxes(svg, svgYAxisLeft, svgYAxisRight, axes, scales, dimensions, data) {
7092
7079
  if (this.chartConfiguration.showXaxisTop) {
7093
7080
  svg
7094
7081
  .append('g')
@@ -7098,7 +7085,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7098
7085
  svg.selectAll('.x-axis > g > text').attr('class', 'lib-display-hidden');
7099
7086
  }
7100
7087
  if (!this.chartConfiguration.isMultiChartGridLine) {
7101
- this.renderStandardAxes(svg, axes, scales, dimensions, device, data);
7088
+ this.renderStandardAxes(svg, axes, scales, dimensions, data);
7102
7089
  }
7103
7090
  else if (this.chartConfiguration.isDrilldownChart) {
7104
7091
  this.renderDrilldownAxes(svg, svgYAxisLeft, svgYAxisRight, axes, scales, dimensions);
@@ -7109,24 +7096,29 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7109
7096
  this.applyAxisStyling(svg, svgYAxisLeft, svgYAxisRight);
7110
7097
  this.applyAxisConfigurations(svg, scales, dimensions, data);
7111
7098
  }
7112
- renderStandardAxes(svg, axes, scales, dimensions, device, data) {
7113
- if (device.isMobile) {
7114
- this.renderMobileXAxis(svg, data, dimensions);
7115
- }
7116
- else {
7117
- svg
7118
- .append('g')
7119
- .attr('transform', `translate(0,${dimensions.height})`)
7120
- .attr('class', 'lib-stacked-x-axis-text')
7121
- .call(axes.xAxis)
7122
- .selectAll('text')
7123
- .style('fill', 'var(--chart-text-color)')
7124
- .style('font-size', '12px')
7125
- .attr('text-anchor', 'middle')
7126
- .attr('dx', '0')
7127
- .attr('dy', '0.71em')
7128
- .attr('transform', null);
7129
- }
7099
+ renderStandardAxes(svg, axes, scales, dimensions, data) {
7100
+ const isMobileOrTablet = window.innerWidth < 1024;
7101
+ svg
7102
+ .append('g')
7103
+ .attr('transform', `translate(0,${dimensions.height})`)
7104
+ .attr('class', 'lib-stacked-x-axis-text')
7105
+ .call(axes.xAxis)
7106
+ .selectAll('text')
7107
+ .style('fill', 'var(--chart-text-color)')
7108
+ .style('font-size', isMobileOrTablet ? '10px' : '12px')
7109
+ .attr('text-anchor', 'middle')
7110
+ .attr('dx', '0')
7111
+ .attr('dy', '0.71em')
7112
+ .attr('transform', null)
7113
+ .each(function () {
7114
+ // Ensure X-axis labels are centered and don't overlap
7115
+ const textElement = d3.select(this);
7116
+ const text = textElement.text();
7117
+ if (isMobileOrTablet && text.length > 10) {
7118
+ // Truncate long labels on mobile/tablet
7119
+ textElement.text(text.substring(0, 8) + '...');
7120
+ }
7121
+ });
7130
7122
  svg
7131
7123
  .append('g')
7132
7124
  .attr('class', 'lib-stacked-y-axis-text')
@@ -7135,27 +7127,6 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7135
7127
  .selectAll('text')
7136
7128
  .style('fill', 'var(--chart-text-color)');
7137
7129
  }
7138
- renderMobileXAxis(svg, data, dimensions) {
7139
- svg.selectAll('.custom-x-label').remove();
7140
- const maxLength = Math.max(...data.map(d => d.name.length));
7141
- const fontSize = maxLength > 10 ? '8px' : '10px';
7142
- data.forEach((d, i) => {
7143
- const xVal = this.CONSTANTS.LEFT_RIGHT_SPACES +
7144
- i * (dimensions.barWidth + dimensions.barPadding) +
7145
- dimensions.barWidth / 2;
7146
- svg
7147
- .append('text')
7148
- .attr('class', 'custom-x-label')
7149
- .attr('x', 0)
7150
- .attr('y', dimensions.height + 18)
7151
- .attr('text-anchor', 'middle')
7152
- .attr('transform', `translate(${xVal + 20},0)`)
7153
- .style('font-size', fontSize)
7154
- .style('fill', 'var(--chart-text-color)')
7155
- .style('writing-mode', 'sideways-lr')
7156
- .text(d.name.length > 6 ? d.name.substring(0, 4) + '...' : d.name);
7157
- });
7158
- }
7159
7130
  renderDrilldownAxes(svg, svgYAxisLeft, svgYAxisRight, axes, scales, dimensions) {
7160
7131
  svg
7161
7132
  .append('g')
@@ -7237,7 +7208,6 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7237
7208
  }
7238
7209
  }
7239
7210
  renderCustomXAxis(svg, scales, dimensions, data) {
7240
- const device = this.getDeviceConfig();
7241
7211
  svg
7242
7212
  .append('g')
7243
7213
  .attr('class', 'x1 axis1')
@@ -7245,12 +7215,12 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7245
7215
  .style('color', '#000')
7246
7216
  .call(d3.axisBottom(scales.xScale).tickSize(0))
7247
7217
  .call((g) => g.select('.domain').attr('fill', 'none'));
7248
- this.styleCustomXAxisTicks(svg, data, device);
7218
+ this.styleCustomXAxisTicks(svg, data);
7249
7219
  if (this.chartConfiguration.xLabelsOnSameLine) {
7250
- this.applyXLabelsOnSameLine(svg, device);
7220
+ this.applyXLabelsOnSameLine(svg);
7251
7221
  }
7252
7222
  }
7253
- styleCustomXAxisTicks(svg, data, device) {
7223
+ styleCustomXAxisTicks(svg, data) {
7254
7224
  let alternateText = false;
7255
7225
  svg.selectAll('.x1.axis1 .tick line').attr('y2', () => {
7256
7226
  if (this.chartConfiguration.hideXaxisTick)
@@ -7282,28 +7252,17 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7282
7252
  return this.CONSTANTS.SHORT_TICK_LENGTH_BG;
7283
7253
  });
7284
7254
  }
7285
- applyXLabelsOnSameLine(svg, device) {
7255
+ applyXLabelsOnSameLine(svg) {
7286
7256
  svg
7287
7257
  .selectAll('g.x1.axis1 g.tick text')
7288
7258
  .attr('class', 'lib-xaxis-labels-texts-drilldown')
7289
7259
  .attr('y', this.CONSTANTS.SHORT_TICK_LENGTH_BG)
7290
7260
  .text((d) => {
7291
- if (device.isMobile) {
7292
- return d.split(' ')[0].substring(0, 3);
7293
- }
7294
7261
  const trimmed = d.trim();
7295
7262
  const spaceIndex = trimmed.indexOf(' ');
7296
7263
  return spaceIndex > -1
7297
7264
  ? trimmed.substring(0, spaceIndex).toLowerCase()
7298
7265
  : trimmed.toLowerCase();
7299
- })
7300
- .attr('transform', function (d, i) {
7301
- if (device.isMobile) {
7302
- const parent = this.parentNode?.parentNode;
7303
- const totalBars = parent ? d3.select(parent).selectAll('g.tick').size() : 0;
7304
- return totalBars === 2 ? 'translate(0,0)' : `translate(${i * 30},0)`;
7305
- }
7306
- return null;
7307
7266
  });
7308
7267
  svg
7309
7268
  .selectAll('g.x1.axis1 g.tick')
@@ -7312,16 +7271,11 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7312
7271
  .attr('y', this.CONSTANTS.LONG_TICK_LENGTH_BG)
7313
7272
  .attr('fill', 'currentColor')
7314
7273
  .text((d) => {
7315
- if (device.isMobile)
7316
- return '';
7317
7274
  const trimmed = d.trim();
7318
7275
  const spaceIndex = trimmed.indexOf(' ');
7319
7276
  return spaceIndex > -1
7320
7277
  ? trimmed.substring(spaceIndex).toLowerCase()
7321
7278
  : '';
7322
- })
7323
- .attr('transform', (d, i) => {
7324
- return device.isMobile && i === 0 ? 'translate(20,0)' : null;
7325
7279
  });
7326
7280
  }
7327
7281
  renderDataLabels(rect, scales, metaData, dimensions) {
@@ -7405,15 +7359,16 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7405
7359
  }
7406
7360
  });
7407
7361
  }
7408
- renderTargetLine(svg, svgYAxisRight, scales, dimensions, metaData) {
7362
+ renderTargetLine(svgGridOverlay, svgYAxisRight, scales, dimensions, metaData) {
7409
7363
  if (!this.chartData.targetLineData)
7410
7364
  return;
7411
7365
  const parsedTarget = this.parseTargetValue(this.chartData.targetLineData.target);
7412
7366
  const yZero = scales.yScale(parsedTarget);
7413
- svg
7367
+ const containerWidth = dimensions.width - this.CONSTANTS.RIGHT_SVG_WIDTH - 80;
7368
+ svgGridOverlay
7414
7369
  .append('line')
7415
7370
  .attr('x1', 0)
7416
- .attr('x2', dimensions.width)
7371
+ .attr('x2', containerWidth)
7417
7372
  .attr('y1', yZero)
7418
7373
  .attr('y2', yZero)
7419
7374
  .style('stroke-dasharray', '5 5')
@@ -7512,11 +7467,11 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7512
7467
  this.isZoomOutSelected(isZoomOut);
7513
7468
  }
7514
7469
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HorizontalBarsWithScrollZoomComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7515
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: HorizontalBarsWithScrollZoomComponent, selector: "lib-horizontal-bars-with-scroll-zoom", inputs: { chartData: "chartData", customChartConfiguration: "customChartConfiguration" }, outputs: { clickEvent: "clickEvent", headerMenuclickEvent: "headerMenuclickEvent" }, viewQueries: [{ propertyName: "containerElt", first: true, predicate: ["verticalstackedchartcontainer"], descendants: true, static: true }, { propertyName: "verticalstackedcontainerElt", first: true, predicate: ["verticalstackedcontainer"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<meta http-equiv=\"CACHE-CONTROL\" content=\"NO-CACHE\" />\r\n<meta http-equiv=\"EXPIRES\" content=\"Sat, 01 Jun 2004 11:12:01 GMT\" />\r\n<div\r\n #verticalstackedcontainer\r\n class=\"lib-chart-wrapper\"\r\n [ngClass]=\"{ 'lib-no-background': isTransparentBackground }\"\r\n style=\"background-color: var(--card-bg);\"\r\n\r\n (resized)=\"onResized($event)\"\r\n>\r\n <div class=\"header-alt\" *ngIf=\"!isHeaderVisible\">\r\n <lib-chart-header-v2\r\n [chartData]=\"chartData\"\r\n [chartConfiguration]=\"chartConfiguration\"\r\n (clickEvent)=\"handleClick($event)\"\r\n ></lib-chart-header-v2>\r\n\r\n <lib-chart-header-v3\r\n [chartData]=\"chartData\"\r\n [chartConfiguration]=\"chartConfiguration\"\r\n (compareByFilterSelection)=\"handleCompareByFilterSelection($event)\"\r\n (zoomInZoomOutClick)=\"handleZoominZoomoutClick($event)\"\r\n ></lib-chart-header-v3>\r\n </div>\r\n <div\r\n [style.height]=\"chartConfiguration.svgHeight\"\r\n id=\"verticalstackedchartcontainer\"\r\n #verticalstackedchartcontainer\r\n class=\"lib-chart-svg\"\r\n ></div>\r\n</div>\r\n", styles: [".lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-weight:400;letter-spacing:0px;color:#000;opacity:1;font-size:12px}.lib-axis-group-label{font-size:12px;font-weight:600;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;color:#000;opacity:1}.dots{font-size:10px}.inline__display{display:flex;justify-content:space-around;padding-top:2%}.verticalbar__text{font-style:normal;font-variant:normal;font-weight:400;font-size:13px;line-height:20px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;opacity:1}.lib-line-label-item{display:inline-block!important;font-size:.85em;margin-right:10px;font-weight:600}.lib-line-label-wrapper-vertical{display:flex;justify-content:center}.target-display{font-size:11px;line-height:13px;font-weight:700;text-transform:uppercase;float:right}.title{background-color:#d9d9d9;height:40px;display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:3px;line-height:1;padding:4px 8px;box-sizing:border-box}.title-top-text{color:var(--font-color)!important;font-size:12px;font-weight:600}.title-bar-name{color:var(--font-color)!important;font-size:14px;font-weight:700;text-transform:capitalize}.title-bottom-text{color:var(--font-color)!important;font-size:11px}.zoomIcons-holder{display:flex;align-items:center;margin-right:15px}.zoomIcons{border:.5px solid #b6b6b6;cursor:pointer;display:flex;justify-content:center;align-items:center;width:30px;height:30px;color:var(--color)!important}.zoom-active{background-color:#2d5ca0;opacity:1}.zoom-inactive{background-color:#d9d9d9;opacity:.5}.bottom__text{position:absolute!important;bottom:0!important;display:flex!important;justify-content:center!important;align-items:center!important;width:100%!important}.box__heightwidth{opacity:1;height:10px;width:10px;border:none!important;border-radius:50%}.label__text{margin-right:10px;display:flex;justify-content:center;align-items:center;font-style:normal;font-variant:normal;font-weight:400;font-size:10px;line-height:13px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;letter-spacing:.2px;color:#707070!important}.lib-verticalstack-labels-ontop-weklycharts{font-style:normal;font-variant:normal;font-weight:700;font-size:10px;line-height:11px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.05px;text-anchor:middle;fill:#000}.lib-verticalstack-title-ontop{font-style:normal;font-variant:normal;font-size:14px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.05px;text-anchor:middle;fill:#000}.marginLeft-20{margin-left:20px}.flex-inline{display:flex;justify-content:center;align-items:center;font-size:14px}@media (max-width: 767px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:9px!important}.lib-axis-group-label{font-size:10px!important}.dots{font-size:8px!important}.lib-xaxis-labels-texts-drilldown{writing-mode:sideways-lr;font-size:9px!important}.target-display{font-size:9px;line-height:11px}.title-top-text{font-size:10px}.title-bar-name{font-size:12px}.zoomIcons{width:26px;height:26px}.lib-verticalstack-labels-ontop-weklycharts{font-size:9px}}@media (min-width: 768px) and (max-width: 1023px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:10px!important}.lib-axis-group-label{font-size:11px!important}.dots{font-size:9px!important}.target-display{font-size:10px;line-height:12px}.title-top-text{font-size:11px}.title-bar-name{font-size:13px}.zoomIcons{width:28px;height:28px}}@media (min-width: 1024px) and (max-width: 1365px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:11px!important}.lib-axis-group-label{font-size:12px!important}.dots{font-size:10px!important}}@media (min-width: 1366px) and (max-width: 1919px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:12px!important}.lib-axis-group-label{font-size:13px!important}.dots{font-size:11px!important}}@media (min-width: 1920px) and (max-width: 2559px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:14px!important}.lib-axis-group-label{font-size:14px!important}.dots{font-size:12px!important}.target-display{font-size:13px;line-height:15px}.title-top-text{font-size:14px}.title-bar-name{font-size:16px}}@media (min-width: 2560px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:16px!important}.lib-axis-group-label{font-size:15px!important}.dots{font-size:14px!important}.target-display{font-size:14px;line-height:16px}.title-top-text{font-size:15px}.title-bar-name{font-size:18px}.zoomIcons{width:34px;height:34px}}@media (orientation: portrait) and (max-width: 767px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:8px!important}.lib-xaxis-labels-texts-drilldown{font-size:8px!important}}@media (orientation: landscape) and (min-width: 768px) and (max-width: 1023px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:11px!important}}\n", ".lib-chart-wrapper{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;background:#fff 0% 0% no-repeat padding-box;position:relative}.lib-chart-wrapper-wo-shadow{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background){background-color:#2e3640}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background) .chart-title{color:#fff}.lib-chart-svg{width:100%}.lib-chart-header{text-align:center;background-color:#052340;color:#fff;width:100%;height:17%;word-spacing:.5px;line-height:1.8;font-weight:700;padding-top:2%;letter-spacing:0;font-size:1.2em}.lib-donut-chart-footer{width:100%;text-align:right}.lib-donut-label-text{font-size:.9em;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-weight:400;letter-spacing:0px;color:#000;opacity:1}.lib-donut-label-icon{display:inline-block;width:10px;height:10px;margin-right:20px;border-radius:3px}.lib-donut-label-item{font-weight:400;font-size:.85em;color:#2f2f2f}.lib-donut-justified-label-wrapper{width:100%;display:inline-block;text-align:center;list-style-type:none}.lib-donut-justified-label-item{font-weight:400;font-size:.85em;color:#2f2f2f;display:inline-block;text-align:left;padding:0 10px}.lib-donut-justified-label-icon{display:inline-block;width:10px;height:10px;margin-right:5px;border-radius:3px}.lib-no-background{background:none!important}.lib-display-hidden{display:none}.lib-ylabel-weeklyCharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:12px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.07px;text-transform:capitalize;color:#000}.lib-data-labels-weeklycharts{font-style:normal;font-variant:normal;font-weight:400;font-size:12px;line-height:14px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.06px;color:#000}.lib-data-labels-angled-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:9.5px;line-height:11px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:.4px;text-anchor:start}.lib-xaxis-labels-texts-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:11px;letter-spacing:-.05px;fill:#000}.lib-xaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:-1px;color:#000;opacity:1;text-transform:capitalize}.lib-white-space-nowrap{white-space:nowrap}.lib-xaxis-labels-texts-drilldown-alt{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:10px;letter-spacing:0px;color:#000;opacity:1;text-transform:capitalize}.lib-yaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:0px;color:#000!important;opacity:1}.lib-ylabel-drilldowncharts,.lib-xlabel-drilldowncharts{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:16px;letter-spacing:-.1px;color:#000!important;opacity:1}.lib-donut-justified-label-icon-drilldown{display:inline-block;width:14px;height:14px;margin-right:10px;border-radius:50%}.marginright-2{margin-right:2%}.margintop-5{margin-top:5%}.width-100{width:100%}.float-right{float:right}.marginBottom-10{margin-bottom:10px}.header-alt{align-items:center;margin-bottom:10px}input::placeholder{font-size:20px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;color:#000;opacity:1}.padding-5{padding:5px}.hidden{visibility:hidden}.font-weight-bold{font-weight:900}.textalign-center{text-align:center}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.font-weight-600{font-weight:600}.marginRight-15{margin-right:15px}.marginRight-20{margin-right:20px}.switch{position:relative;display:inline-block;width:46px;height:24px;margin-left:5px;margin-right:5px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#2d5ca0;-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:\"\";height:18px;width:18px;right:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider.round{border-radius:18px}.slider.round:before{border-radius:50%}.slider1{position:absolute;cursor:pointer;inset:0;background-color:#015ba2cf;-webkit-transition:.4s;transition:.4s}.slider1:before{position:absolute;content:\"\";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider1.round1{border-radius:18px}.slider1.round1:before{border-radius:50%}.lib-display-flex{display:flex}.lib-align-items-center{align-items:center}.lib-flex-direction-column{flex-direction:column}.lib-justify-content-space-between{justify-content:space-between}.lib-justify-content-space-around{justify-content:space-around}.lib-justify-content-center{justify-content:center}.lib-justify-content-start{justify-content:start}.lib-justify-content-end{justify-content:end}.lib-ml-20{margin-left:20px}.lib-position-absolute{position:absolute}.lib-z-index-9{z-index:9}.marginright-3{margin-right:3px}@media (min-height: 900px){.lib-chart-wrapper{border-radius:8px}.header-font-size-1{font-size:18px!important}.font-size-1{font-size:14px!important}.font-size-2{font-size:16px!important}.font-size-3{font-size:14px!important}.font-size-4{font-size:22px!important}.font-size-5{font-size:24px!important}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ResizedDirective, selector: "[resized]", outputs: ["resized"] }, { kind: "component", type: ChartHeaderV2Component, selector: "lib-chart-header-v2", inputs: ["chartData", "chartConfiguration"], outputs: ["clickEvent", "zoomInZoomOutClick"] }, { kind: "component", type: ChartHeaderV3Component, selector: "lib-chart-header-v3", inputs: ["chartData", "chartConfiguration"], outputs: ["compareByFilterSelection", "zoomInZoomOutClick"] }], encapsulation: i0.ViewEncapsulation.None }); }
7470
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: HorizontalBarsWithScrollZoomComponent, selector: "lib-horizontal-bars-with-scroll-zoom", inputs: { chartData: "chartData", customChartConfiguration: "customChartConfiguration" }, outputs: { clickEvent: "clickEvent", headerMenuclickEvent: "headerMenuclickEvent" }, viewQueries: [{ propertyName: "containerElt", first: true, predicate: ["verticalstackedchartcontainer"], descendants: true, static: true }, { propertyName: "verticalstackedcontainerElt", first: true, predicate: ["verticalstackedcontainer"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<meta http-equiv=\"CACHE-CONTROL\" content=\"NO-CACHE\" />\r\n<meta http-equiv=\"EXPIRES\" content=\"Sat, 01 Jun 2004 11:12:01 GMT\" />\r\n<div\r\n #verticalstackedcontainer\r\n class=\"lib-chart-wrapper\"\r\n [ngClass]=\"{ 'lib-no-background': isTransparentBackground }\"\r\n style=\"background-color: var(--card-bg);\"\r\n\r\n (resized)=\"onResized($event)\"\r\n>\r\n <div class=\"header-alt\" *ngIf=\"!isHeaderVisible\">\r\n <lib-chart-header-v2\r\n [chartData]=\"chartData\"\r\n [chartConfiguration]=\"chartConfiguration\"\r\n (clickEvent)=\"handleClick($event)\"\r\n ></lib-chart-header-v2>\r\n\r\n <lib-chart-header-v3\r\n [chartData]=\"chartData\"\r\n [chartConfiguration]=\"chartConfiguration\"\r\n (compareByFilterSelection)=\"handleCompareByFilterSelection($event)\"\r\n (zoomInZoomOutClick)=\"handleZoominZoomoutClick($event)\"\r\n ></lib-chart-header-v3>\r\n </div>\r\n <div\r\n [style.height]=\"chartConfiguration.svgHeight\"\r\n id=\"verticalstackedchartcontainer\"\r\n #verticalstackedchartcontainer\r\n class=\"lib-chart-svg\"\r\n ></div>\r\n</div>\r\n", styles: [".lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-weight:400;letter-spacing:0px;color:#000;opacity:1;font-size:12px}.lib-axis-group-label{font-size:12px;font-weight:600;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;color:#000;opacity:1}.dots{font-size:10px}.inline__display{display:flex;justify-content:space-around;padding-top:2%}.verticalbar__text{font-style:normal;font-variant:normal;font-weight:400;font-size:13px;line-height:20px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;opacity:1}.lib-line-label-item{display:inline-block!important;font-size:.85em;margin-right:10px;font-weight:600}.lib-line-label-wrapper-vertical{display:flex;justify-content:center}.target-display{font-size:11px;line-height:13px;font-weight:700;text-transform:uppercase;float:right}.title{background-color:#d9d9d9;height:40px;display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:3px;line-height:1;padding:4px 8px;box-sizing:border-box}.title-top-text{color:var(--font-color)!important;font-size:12px;font-weight:600}.title-bar-name{color:var(--font-color)!important;font-size:14px;font-weight:700;text-transform:capitalize}.title-bottom-text{color:var(--font-color)!important;font-size:11px}.zoomIcons-holder{display:flex;align-items:center;margin-right:15px}.zoomIcons{border:.5px solid #b6b6b6;cursor:pointer;display:flex;justify-content:center;align-items:center;width:30px;height:30px;color:var(--color)!important}.zoom-active{background-color:#2d5ca0;opacity:1}.zoom-inactive{background-color:#d9d9d9;opacity:.5}.bottom__text{position:absolute!important;bottom:0!important;display:flex!important;justify-content:center!important;align-items:center!important;width:100%!important}.box__heightwidth{opacity:1;height:10px;width:10px;border:none!important;border-radius:50%}.label__text{margin-right:10px;display:flex;justify-content:center;align-items:center;font-style:normal;font-variant:normal;font-weight:400;font-size:10px;line-height:13px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;letter-spacing:.2px;color:#707070!important}.lib-verticalstack-labels-ontop-weklycharts{font-style:normal;font-variant:normal;font-weight:700;font-size:10px;line-height:11px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.05px;text-anchor:middle;fill:#000}.lib-verticalstack-title-ontop{font-style:normal;font-variant:normal;font-size:14px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.05px;text-anchor:middle;fill:#000}.marginLeft-20{margin-left:20px}.flex-inline{display:flex;justify-content:center;align-items:center;font-size:14px}.lib-xaxis-labels-texts-drilldown,.lib-xaxis-labels-texts-drilldown-alt,.lib-xaxis-labels-texts-weeklycharts{font-size:12px}.lib-display-hidden{display:none!important}\n", ".lib-chart-wrapper{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;background:#fff 0% 0% no-repeat padding-box;position:relative}.lib-chart-wrapper-wo-shadow{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background){background-color:#2e3640}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background) .chart-title{color:#fff}.lib-chart-svg{width:100%}.lib-chart-header{text-align:center;background-color:#052340;color:#fff;width:100%;height:17%;word-spacing:.5px;line-height:1.8;font-weight:700;padding-top:2%;letter-spacing:0;font-size:1.2em}.lib-donut-chart-footer{width:100%;text-align:right}.lib-donut-label-text{font-size:.9em;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-weight:400;letter-spacing:0px;color:#000;opacity:1}.lib-donut-label-icon{display:inline-block;width:10px;height:10px;margin-right:20px;border-radius:3px}.lib-donut-label-item{font-weight:400;font-size:.85em;color:#2f2f2f}.lib-donut-justified-label-wrapper{width:100%;display:inline-block;text-align:center;list-style-type:none}.lib-donut-justified-label-item{font-weight:400;font-size:.85em;color:#2f2f2f;display:inline-block;text-align:left;padding:0 10px}.lib-donut-justified-label-icon{display:inline-block;width:10px;height:10px;margin-right:5px;border-radius:3px}.lib-no-background{background:none!important}.lib-display-hidden{display:none}.lib-ylabel-weeklyCharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:12px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.07px;text-transform:capitalize;color:#000}.lib-data-labels-weeklycharts{font-style:normal;font-variant:normal;font-weight:400;font-size:12px;line-height:14px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.06px;color:#000}.lib-data-labels-angled-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:9.5px;line-height:11px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:.4px;text-anchor:start}.lib-xaxis-labels-texts-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:11px;letter-spacing:-.05px;fill:#000}.lib-xaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:-1px;color:#000;opacity:1;text-transform:capitalize}.lib-white-space-nowrap{white-space:nowrap}.lib-xaxis-labels-texts-drilldown-alt{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:10px;letter-spacing:0px;color:#000;opacity:1;text-transform:capitalize}.lib-yaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:0px;color:#000!important;opacity:1}.lib-ylabel-drilldowncharts,.lib-xlabel-drilldowncharts{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:16px;letter-spacing:-.1px;color:#000!important;opacity:1}.lib-donut-justified-label-icon-drilldown{display:inline-block;width:14px;height:14px;margin-right:10px;border-radius:50%}.marginright-2{margin-right:2%}.margintop-5{margin-top:5%}.width-100{width:100%}.float-right{float:right}.marginBottom-10{margin-bottom:10px}.header-alt{align-items:center;margin-bottom:10px}input::placeholder{font-size:20px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;color:#000;opacity:1}.padding-5{padding:5px}.hidden{visibility:hidden}.font-weight-bold{font-weight:900}.textalign-center{text-align:center}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.font-weight-600{font-weight:600}.marginRight-15{margin-right:15px}.marginRight-20{margin-right:20px}.switch{position:relative;display:inline-block;width:46px;height:24px;margin-left:5px;margin-right:5px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#2d5ca0;-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:\"\";height:18px;width:18px;right:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider.round{border-radius:18px}.slider.round:before{border-radius:50%}.slider1{position:absolute;cursor:pointer;inset:0;background-color:#015ba2cf;-webkit-transition:.4s;transition:.4s}.slider1:before{position:absolute;content:\"\";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider1.round1{border-radius:18px}.slider1.round1:before{border-radius:50%}.lib-display-flex{display:flex}.lib-align-items-center{align-items:center}.lib-flex-direction-column{flex-direction:column}.lib-justify-content-space-between{justify-content:space-between}.lib-justify-content-space-around{justify-content:space-around}.lib-justify-content-center{justify-content:center}.lib-justify-content-start{justify-content:start}.lib-justify-content-end{justify-content:end}.lib-ml-20{margin-left:20px}.lib-position-absolute{position:absolute}.lib-z-index-9{z-index:9}.marginright-3{margin-right:3px}@media (min-height: 900px){.lib-chart-wrapper{border-radius:8px}.header-font-size-1{font-size:18px!important}.font-size-1{font-size:14px!important}.font-size-2{font-size:16px!important}.font-size-3{font-size:14px!important}.font-size-4{font-size:22px!important}.font-size-5{font-size:24px!important}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ResizedDirective, selector: "[resized]", outputs: ["resized"] }, { kind: "component", type: ChartHeaderV2Component, selector: "lib-chart-header-v2", inputs: ["chartData", "chartConfiguration"], outputs: ["clickEvent", "zoomInZoomOutClick"] }, { kind: "component", type: ChartHeaderV3Component, selector: "lib-chart-header-v3", inputs: ["chartData", "chartConfiguration"], outputs: ["compareByFilterSelection", "zoomInZoomOutClick"] }], encapsulation: i0.ViewEncapsulation.None }); }
7516
7471
  }
7517
7472
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HorizontalBarsWithScrollZoomComponent, decorators: [{
7518
7473
  type: Component,
7519
- args: [{ selector: 'lib-horizontal-bars-with-scroll-zoom', encapsulation: ViewEncapsulation.None, template: "<meta http-equiv=\"CACHE-CONTROL\" content=\"NO-CACHE\" />\r\n<meta http-equiv=\"EXPIRES\" content=\"Sat, 01 Jun 2004 11:12:01 GMT\" />\r\n<div\r\n #verticalstackedcontainer\r\n class=\"lib-chart-wrapper\"\r\n [ngClass]=\"{ 'lib-no-background': isTransparentBackground }\"\r\n style=\"background-color: var(--card-bg);\"\r\n\r\n (resized)=\"onResized($event)\"\r\n>\r\n <div class=\"header-alt\" *ngIf=\"!isHeaderVisible\">\r\n <lib-chart-header-v2\r\n [chartData]=\"chartData\"\r\n [chartConfiguration]=\"chartConfiguration\"\r\n (clickEvent)=\"handleClick($event)\"\r\n ></lib-chart-header-v2>\r\n\r\n <lib-chart-header-v3\r\n [chartData]=\"chartData\"\r\n [chartConfiguration]=\"chartConfiguration\"\r\n (compareByFilterSelection)=\"handleCompareByFilterSelection($event)\"\r\n (zoomInZoomOutClick)=\"handleZoominZoomoutClick($event)\"\r\n ></lib-chart-header-v3>\r\n </div>\r\n <div\r\n [style.height]=\"chartConfiguration.svgHeight\"\r\n id=\"verticalstackedchartcontainer\"\r\n #verticalstackedchartcontainer\r\n class=\"lib-chart-svg\"\r\n ></div>\r\n</div>\r\n", styles: [".lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-weight:400;letter-spacing:0px;color:#000;opacity:1;font-size:12px}.lib-axis-group-label{font-size:12px;font-weight:600;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;color:#000;opacity:1}.dots{font-size:10px}.inline__display{display:flex;justify-content:space-around;padding-top:2%}.verticalbar__text{font-style:normal;font-variant:normal;font-weight:400;font-size:13px;line-height:20px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;opacity:1}.lib-line-label-item{display:inline-block!important;font-size:.85em;margin-right:10px;font-weight:600}.lib-line-label-wrapper-vertical{display:flex;justify-content:center}.target-display{font-size:11px;line-height:13px;font-weight:700;text-transform:uppercase;float:right}.title{background-color:#d9d9d9;height:40px;display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:3px;line-height:1;padding:4px 8px;box-sizing:border-box}.title-top-text{color:var(--font-color)!important;font-size:12px;font-weight:600}.title-bar-name{color:var(--font-color)!important;font-size:14px;font-weight:700;text-transform:capitalize}.title-bottom-text{color:var(--font-color)!important;font-size:11px}.zoomIcons-holder{display:flex;align-items:center;margin-right:15px}.zoomIcons{border:.5px solid #b6b6b6;cursor:pointer;display:flex;justify-content:center;align-items:center;width:30px;height:30px;color:var(--color)!important}.zoom-active{background-color:#2d5ca0;opacity:1}.zoom-inactive{background-color:#d9d9d9;opacity:.5}.bottom__text{position:absolute!important;bottom:0!important;display:flex!important;justify-content:center!important;align-items:center!important;width:100%!important}.box__heightwidth{opacity:1;height:10px;width:10px;border:none!important;border-radius:50%}.label__text{margin-right:10px;display:flex;justify-content:center;align-items:center;font-style:normal;font-variant:normal;font-weight:400;font-size:10px;line-height:13px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;letter-spacing:.2px;color:#707070!important}.lib-verticalstack-labels-ontop-weklycharts{font-style:normal;font-variant:normal;font-weight:700;font-size:10px;line-height:11px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.05px;text-anchor:middle;fill:#000}.lib-verticalstack-title-ontop{font-style:normal;font-variant:normal;font-size:14px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.05px;text-anchor:middle;fill:#000}.marginLeft-20{margin-left:20px}.flex-inline{display:flex;justify-content:center;align-items:center;font-size:14px}@media (max-width: 767px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:9px!important}.lib-axis-group-label{font-size:10px!important}.dots{font-size:8px!important}.lib-xaxis-labels-texts-drilldown{writing-mode:sideways-lr;font-size:9px!important}.target-display{font-size:9px;line-height:11px}.title-top-text{font-size:10px}.title-bar-name{font-size:12px}.zoomIcons{width:26px;height:26px}.lib-verticalstack-labels-ontop-weklycharts{font-size:9px}}@media (min-width: 768px) and (max-width: 1023px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:10px!important}.lib-axis-group-label{font-size:11px!important}.dots{font-size:9px!important}.target-display{font-size:10px;line-height:12px}.title-top-text{font-size:11px}.title-bar-name{font-size:13px}.zoomIcons{width:28px;height:28px}}@media (min-width: 1024px) and (max-width: 1365px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:11px!important}.lib-axis-group-label{font-size:12px!important}.dots{font-size:10px!important}}@media (min-width: 1366px) and (max-width: 1919px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:12px!important}.lib-axis-group-label{font-size:13px!important}.dots{font-size:11px!important}}@media (min-width: 1920px) and (max-width: 2559px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:14px!important}.lib-axis-group-label{font-size:14px!important}.dots{font-size:12px!important}.target-display{font-size:13px;line-height:15px}.title-top-text{font-size:14px}.title-bar-name{font-size:16px}}@media (min-width: 2560px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:16px!important}.lib-axis-group-label{font-size:15px!important}.dots{font-size:14px!important}.target-display{font-size:14px;line-height:16px}.title-top-text{font-size:15px}.title-bar-name{font-size:18px}.zoomIcons{width:34px;height:34px}}@media (orientation: portrait) and (max-width: 767px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:8px!important}.lib-xaxis-labels-texts-drilldown{font-size:8px!important}}@media (orientation: landscape) and (min-width: 768px) and (max-width: 1023px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:11px!important}}\n", ".lib-chart-wrapper{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;background:#fff 0% 0% no-repeat padding-box;position:relative}.lib-chart-wrapper-wo-shadow{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background){background-color:#2e3640}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background) .chart-title{color:#fff}.lib-chart-svg{width:100%}.lib-chart-header{text-align:center;background-color:#052340;color:#fff;width:100%;height:17%;word-spacing:.5px;line-height:1.8;font-weight:700;padding-top:2%;letter-spacing:0;font-size:1.2em}.lib-donut-chart-footer{width:100%;text-align:right}.lib-donut-label-text{font-size:.9em;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-weight:400;letter-spacing:0px;color:#000;opacity:1}.lib-donut-label-icon{display:inline-block;width:10px;height:10px;margin-right:20px;border-radius:3px}.lib-donut-label-item{font-weight:400;font-size:.85em;color:#2f2f2f}.lib-donut-justified-label-wrapper{width:100%;display:inline-block;text-align:center;list-style-type:none}.lib-donut-justified-label-item{font-weight:400;font-size:.85em;color:#2f2f2f;display:inline-block;text-align:left;padding:0 10px}.lib-donut-justified-label-icon{display:inline-block;width:10px;height:10px;margin-right:5px;border-radius:3px}.lib-no-background{background:none!important}.lib-display-hidden{display:none}.lib-ylabel-weeklyCharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:12px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.07px;text-transform:capitalize;color:#000}.lib-data-labels-weeklycharts{font-style:normal;font-variant:normal;font-weight:400;font-size:12px;line-height:14px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.06px;color:#000}.lib-data-labels-angled-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:9.5px;line-height:11px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:.4px;text-anchor:start}.lib-xaxis-labels-texts-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:11px;letter-spacing:-.05px;fill:#000}.lib-xaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:-1px;color:#000;opacity:1;text-transform:capitalize}.lib-white-space-nowrap{white-space:nowrap}.lib-xaxis-labels-texts-drilldown-alt{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:10px;letter-spacing:0px;color:#000;opacity:1;text-transform:capitalize}.lib-yaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:0px;color:#000!important;opacity:1}.lib-ylabel-drilldowncharts,.lib-xlabel-drilldowncharts{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:16px;letter-spacing:-.1px;color:#000!important;opacity:1}.lib-donut-justified-label-icon-drilldown{display:inline-block;width:14px;height:14px;margin-right:10px;border-radius:50%}.marginright-2{margin-right:2%}.margintop-5{margin-top:5%}.width-100{width:100%}.float-right{float:right}.marginBottom-10{margin-bottom:10px}.header-alt{align-items:center;margin-bottom:10px}input::placeholder{font-size:20px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;color:#000;opacity:1}.padding-5{padding:5px}.hidden{visibility:hidden}.font-weight-bold{font-weight:900}.textalign-center{text-align:center}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.font-weight-600{font-weight:600}.marginRight-15{margin-right:15px}.marginRight-20{margin-right:20px}.switch{position:relative;display:inline-block;width:46px;height:24px;margin-left:5px;margin-right:5px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#2d5ca0;-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:\"\";height:18px;width:18px;right:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider.round{border-radius:18px}.slider.round:before{border-radius:50%}.slider1{position:absolute;cursor:pointer;inset:0;background-color:#015ba2cf;-webkit-transition:.4s;transition:.4s}.slider1:before{position:absolute;content:\"\";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider1.round1{border-radius:18px}.slider1.round1:before{border-radius:50%}.lib-display-flex{display:flex}.lib-align-items-center{align-items:center}.lib-flex-direction-column{flex-direction:column}.lib-justify-content-space-between{justify-content:space-between}.lib-justify-content-space-around{justify-content:space-around}.lib-justify-content-center{justify-content:center}.lib-justify-content-start{justify-content:start}.lib-justify-content-end{justify-content:end}.lib-ml-20{margin-left:20px}.lib-position-absolute{position:absolute}.lib-z-index-9{z-index:9}.marginright-3{margin-right:3px}@media (min-height: 900px){.lib-chart-wrapper{border-radius:8px}.header-font-size-1{font-size:18px!important}.font-size-1{font-size:14px!important}.font-size-2{font-size:16px!important}.font-size-3{font-size:14px!important}.font-size-4{font-size:22px!important}.font-size-5{font-size:24px!important}}\n"] }]
7474
+ args: [{ selector: 'lib-horizontal-bars-with-scroll-zoom', encapsulation: ViewEncapsulation.None, template: "<meta http-equiv=\"CACHE-CONTROL\" content=\"NO-CACHE\" />\r\n<meta http-equiv=\"EXPIRES\" content=\"Sat, 01 Jun 2004 11:12:01 GMT\" />\r\n<div\r\n #verticalstackedcontainer\r\n class=\"lib-chart-wrapper\"\r\n [ngClass]=\"{ 'lib-no-background': isTransparentBackground }\"\r\n style=\"background-color: var(--card-bg);\"\r\n\r\n (resized)=\"onResized($event)\"\r\n>\r\n <div class=\"header-alt\" *ngIf=\"!isHeaderVisible\">\r\n <lib-chart-header-v2\r\n [chartData]=\"chartData\"\r\n [chartConfiguration]=\"chartConfiguration\"\r\n (clickEvent)=\"handleClick($event)\"\r\n ></lib-chart-header-v2>\r\n\r\n <lib-chart-header-v3\r\n [chartData]=\"chartData\"\r\n [chartConfiguration]=\"chartConfiguration\"\r\n (compareByFilterSelection)=\"handleCompareByFilterSelection($event)\"\r\n (zoomInZoomOutClick)=\"handleZoominZoomoutClick($event)\"\r\n ></lib-chart-header-v3>\r\n </div>\r\n <div\r\n [style.height]=\"chartConfiguration.svgHeight\"\r\n id=\"verticalstackedchartcontainer\"\r\n #verticalstackedchartcontainer\r\n class=\"lib-chart-svg\"\r\n ></div>\r\n</div>\r\n", styles: [".lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-weight:400;letter-spacing:0px;color:#000;opacity:1;font-size:12px}.lib-axis-group-label{font-size:12px;font-weight:600;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;color:#000;opacity:1}.dots{font-size:10px}.inline__display{display:flex;justify-content:space-around;padding-top:2%}.verticalbar__text{font-style:normal;font-variant:normal;font-weight:400;font-size:13px;line-height:20px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;opacity:1}.lib-line-label-item{display:inline-block!important;font-size:.85em;margin-right:10px;font-weight:600}.lib-line-label-wrapper-vertical{display:flex;justify-content:center}.target-display{font-size:11px;line-height:13px;font-weight:700;text-transform:uppercase;float:right}.title{background-color:#d9d9d9;height:40px;display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:3px;line-height:1;padding:4px 8px;box-sizing:border-box}.title-top-text{color:var(--font-color)!important;font-size:12px;font-weight:600}.title-bar-name{color:var(--font-color)!important;font-size:14px;font-weight:700;text-transform:capitalize}.title-bottom-text{color:var(--font-color)!important;font-size:11px}.zoomIcons-holder{display:flex;align-items:center;margin-right:15px}.zoomIcons{border:.5px solid #b6b6b6;cursor:pointer;display:flex;justify-content:center;align-items:center;width:30px;height:30px;color:var(--color)!important}.zoom-active{background-color:#2d5ca0;opacity:1}.zoom-inactive{background-color:#d9d9d9;opacity:.5}.bottom__text{position:absolute!important;bottom:0!important;display:flex!important;justify-content:center!important;align-items:center!important;width:100%!important}.box__heightwidth{opacity:1;height:10px;width:10px;border:none!important;border-radius:50%}.label__text{margin-right:10px;display:flex;justify-content:center;align-items:center;font-style:normal;font-variant:normal;font-weight:400;font-size:10px;line-height:13px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;letter-spacing:.2px;color:#707070!important}.lib-verticalstack-labels-ontop-weklycharts{font-style:normal;font-variant:normal;font-weight:700;font-size:10px;line-height:11px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.05px;text-anchor:middle;fill:#000}.lib-verticalstack-title-ontop{font-style:normal;font-variant:normal;font-size:14px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.05px;text-anchor:middle;fill:#000}.marginLeft-20{margin-left:20px}.flex-inline{display:flex;justify-content:center;align-items:center;font-size:14px}.lib-xaxis-labels-texts-drilldown,.lib-xaxis-labels-texts-drilldown-alt,.lib-xaxis-labels-texts-weeklycharts{font-size:12px}.lib-display-hidden{display:none!important}\n", ".lib-chart-wrapper{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;background:#fff 0% 0% no-repeat padding-box;position:relative}.lib-chart-wrapper-wo-shadow{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background){background-color:#2e3640}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background) .chart-title{color:#fff}.lib-chart-svg{width:100%}.lib-chart-header{text-align:center;background-color:#052340;color:#fff;width:100%;height:17%;word-spacing:.5px;line-height:1.8;font-weight:700;padding-top:2%;letter-spacing:0;font-size:1.2em}.lib-donut-chart-footer{width:100%;text-align:right}.lib-donut-label-text{font-size:.9em;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-weight:400;letter-spacing:0px;color:#000;opacity:1}.lib-donut-label-icon{display:inline-block;width:10px;height:10px;margin-right:20px;border-radius:3px}.lib-donut-label-item{font-weight:400;font-size:.85em;color:#2f2f2f}.lib-donut-justified-label-wrapper{width:100%;display:inline-block;text-align:center;list-style-type:none}.lib-donut-justified-label-item{font-weight:400;font-size:.85em;color:#2f2f2f;display:inline-block;text-align:left;padding:0 10px}.lib-donut-justified-label-icon{display:inline-block;width:10px;height:10px;margin-right:5px;border-radius:3px}.lib-no-background{background:none!important}.lib-display-hidden{display:none}.lib-ylabel-weeklyCharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:12px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.07px;text-transform:capitalize;color:#000}.lib-data-labels-weeklycharts{font-style:normal;font-variant:normal;font-weight:400;font-size:12px;line-height:14px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.06px;color:#000}.lib-data-labels-angled-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:9.5px;line-height:11px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:.4px;text-anchor:start}.lib-xaxis-labels-texts-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:11px;letter-spacing:-.05px;fill:#000}.lib-xaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:-1px;color:#000;opacity:1;text-transform:capitalize}.lib-white-space-nowrap{white-space:nowrap}.lib-xaxis-labels-texts-drilldown-alt{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:10px;letter-spacing:0px;color:#000;opacity:1;text-transform:capitalize}.lib-yaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:0px;color:#000!important;opacity:1}.lib-ylabel-drilldowncharts,.lib-xlabel-drilldowncharts{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:16px;letter-spacing:-.1px;color:#000!important;opacity:1}.lib-donut-justified-label-icon-drilldown{display:inline-block;width:14px;height:14px;margin-right:10px;border-radius:50%}.marginright-2{margin-right:2%}.margintop-5{margin-top:5%}.width-100{width:100%}.float-right{float:right}.marginBottom-10{margin-bottom:10px}.header-alt{align-items:center;margin-bottom:10px}input::placeholder{font-size:20px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;color:#000;opacity:1}.padding-5{padding:5px}.hidden{visibility:hidden}.font-weight-bold{font-weight:900}.textalign-center{text-align:center}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.font-weight-600{font-weight:600}.marginRight-15{margin-right:15px}.marginRight-20{margin-right:20px}.switch{position:relative;display:inline-block;width:46px;height:24px;margin-left:5px;margin-right:5px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#2d5ca0;-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:\"\";height:18px;width:18px;right:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider.round{border-radius:18px}.slider.round:before{border-radius:50%}.slider1{position:absolute;cursor:pointer;inset:0;background-color:#015ba2cf;-webkit-transition:.4s;transition:.4s}.slider1:before{position:absolute;content:\"\";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider1.round1{border-radius:18px}.slider1.round1:before{border-radius:50%}.lib-display-flex{display:flex}.lib-align-items-center{align-items:center}.lib-flex-direction-column{flex-direction:column}.lib-justify-content-space-between{justify-content:space-between}.lib-justify-content-space-around{justify-content:space-around}.lib-justify-content-center{justify-content:center}.lib-justify-content-start{justify-content:start}.lib-justify-content-end{justify-content:end}.lib-ml-20{margin-left:20px}.lib-position-absolute{position:absolute}.lib-z-index-9{z-index:9}.marginright-3{margin-right:3px}@media (min-height: 900px){.lib-chart-wrapper{border-radius:8px}.header-font-size-1{font-size:18px!important}.font-size-1{font-size:14px!important}.font-size-2{font-size:16px!important}.font-size-3{font-size:14px!important}.font-size-4{font-size:22px!important}.font-size-5{font-size:24px!important}}\n"] }]
7520
7475
  }], ctorParameters: () => [], propDecorators: { containerElt: [{
7521
7476
  type: ViewChild,
7522
7477
  args: ['verticalstackedchartcontainer', { static: true }]
@@ -7625,6 +7580,1242 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
7625
7580
  get isAlertEnabled() {
7626
7581
  return this.chartConfiguration?.headerMenuOptions?.some((option) => option.id === 'editAlert');
7627
7582
  }
7583
+ // initializegroupChart() {
7584
+ // var self = this;
7585
+ // let data = [];
7586
+ // let metaData: any = null;
7587
+ // let keyList = null;
7588
+ // let lineData = null;
7589
+ // let colorMap = {};
7590
+ // var formatFromBackend;
7591
+ // var formatForHugeNumbers;
7592
+ // const isMobile = window.innerWidth < 576;
7593
+ // const isTablet = window.innerWidth >= 576 && window.innerWidth < 992;
7594
+ // const isDesktop = window.innerWidth >= 992;
7595
+ // let isria = this.customChartConfiguration.isRia
7596
+ // var x: any;
7597
+ // var alternate_text = false;
7598
+ // var short_tick_length = 4;
7599
+ // var long_tick_length = 16;
7600
+ // /**
7601
+ // * longer tick length needed for weekly charts
7602
+ // */
7603
+ // var short_tick_length_bg = 5;
7604
+ // var long_tick_length_bg = 30;
7605
+ // var leftAndRightSpaces = 50;
7606
+ // var rightSvgWidth = 60;
7607
+ // var tempScale;
7608
+ // for (var i in this.defaultConfiguration) {
7609
+ // this.chartConfiguration[i] = ChartHelper.getValueByConfigurationType(
7610
+ // i,
7611
+ // this.defaultConfiguration,
7612
+ // this.customChartConfiguration
7613
+ // );
7614
+ // }
7615
+ // data = this.chartData.data;
7616
+ // metaData = this.chartData.metaData;
7617
+ // lineData = this.chartData.lineData;
7618
+ // // if (lineData || this.chartData.targetLineData) {
7619
+ // // rightSvgWidth = 60;
7620
+ // // }
7621
+ // if (!metaData.colorAboveTarget) {
7622
+ // metaData['colorAboveTarget'] = metaData.colors;
7623
+ // }
7624
+ // colorMap = metaData.colors;
7625
+ // keyList = metaData.keyList;
7626
+ // var chartContainer = d3.select(this.containerElt.nativeElement);
7627
+ // var verticalstackedcontainer = d3.select(
7628
+ // this.groupcontainerElt.nativeElement
7629
+ // );
7630
+ // var margin = this.chartConfiguration.margin;
7631
+ // const { width, height } = this.calculateChartDimensions(
7632
+ // chartContainer,
7633
+ // verticalstackedcontainer,
7634
+ // margin,
7635
+ // self
7636
+ // );
7637
+ // /**
7638
+ // * for hiding header
7639
+ // * used by weekly charts
7640
+ // */
7641
+ // if (this.chartConfiguration.isHeaderVisible != undefined)
7642
+ // this.isHeaderVisible = this.chartConfiguration.isHeaderVisible;
7643
+ // /**
7644
+ // * for hiding legends
7645
+ // * used by weekly charts
7646
+ // */
7647
+ // if (this.chartConfiguration.legendVisible != undefined) {
7648
+ // this.legendVisible = this.chartConfiguration.legendVisible;
7649
+ // }
7650
+ // /**
7651
+ // * for removing background color so that it can take parents color
7652
+ // *
7653
+ // */
7654
+ // if (this.chartConfiguration.isTransparentBackground != undefined) {
7655
+ // this.isTransparentBackground =
7656
+ // this.chartConfiguration.isTransparentBackground;
7657
+ // }
7658
+ // /**
7659
+ // * format data values based on configuration received
7660
+ // */
7661
+ // if (this.chartConfiguration.textFormatter != undefined) {
7662
+ // formatFromBackend = ChartHelper.dataValueFormatter(
7663
+ // this.chartConfiguration.textFormatter
7664
+ // );
7665
+ // formatForHugeNumbers = ChartHelper.dataValueFormatter('.2s');
7666
+ // }
7667
+ // const {
7668
+ // outerContainer,
7669
+ // svgYAxisLeft,
7670
+ // svgYAxisRight,
7671
+ // innerContainer,
7672
+ // svg
7673
+ // } = this.createChartContainers(chartContainer, margin, height, rightSvgWidth, self, width);
7674
+ // var subgroups: any = keyList;
7675
+ // var groups = d3
7676
+ // .map(data, function (d) {
7677
+ // return d.name;
7678
+ // })
7679
+ // .keys();
7680
+ // /**
7681
+ // * x axis range made similar to line chart or vertical stack so that all the charts will get aligned with each other.
7682
+ // */
7683
+ // if (this.chartConfiguration.isMultiChartGridLine != undefined) {
7684
+ // x = d3
7685
+ // .scaleBand()
7686
+ // .rangeRound([width, 0])
7687
+ // .align(0.5)
7688
+ // .padding([0.5])
7689
+ // .domain(
7690
+ // data.map(function (d: any) {
7691
+ // return d.name.toLowerCase();
7692
+ // })
7693
+ // );
7694
+ // } else {
7695
+ // x = d3
7696
+ // .scaleBand()
7697
+ // .domain(groups)
7698
+ // .range([leftAndRightSpaces, width - rightSvgWidth - leftAndRightSpaces])
7699
+ // .padding([0.3]);
7700
+ // }
7701
+ // // x.bandwidth(96);
7702
+ // var xScaleFromOrigin = d3
7703
+ // .scaleBand()
7704
+ // .domain(groups)
7705
+ // .range([0, width - rightSvgWidth]);
7706
+ // // .padding([0.2]);
7707
+ // if (this.chartConfiguration.isMultiChartGridLine == undefined) {
7708
+ // /**
7709
+ // * normal ticks for all dashboard charts
7710
+ // */
7711
+ // svg
7712
+ // .append('g')
7713
+ // .attr('class', 'x1 axis1')
7714
+ // .attr('transform', 'translate(0,' + height + ')')
7715
+ // .call(d3.axisBottom(x))
7716
+ // .call((g) => g.select('.domain').remove());
7717
+ // svg.selectAll('g.x1.axis1 g.tick line').remove();
7718
+ // // Only move x-axis labels further down for grouped charts if there is no xLabel
7719
+ // if (subgroups.length > 1 && !metaData.xLabel) {
7720
+ // svg
7721
+ // .selectAll('g.x1.axis1 g.tick text')
7722
+ // .attr('class', 'lib-xaxis-labels-texts-drilldown')
7723
+ // .style('fill', 'var(--chart-text-color)')
7724
+ // .attr('y', 32); // Increase distance from bars (default is ~9)
7725
+ // } else {
7726
+ // svg
7727
+ // .selectAll('g.x1.axis1 g.tick text')
7728
+ // .attr('class', 'lib-xaxis-labels-texts-drilldown')
7729
+ // .style('fill', 'var(--chart-text-color)');
7730
+ // }
7731
+ // }
7732
+ // else {
7733
+ // /**
7734
+ // * bigger ticks for weekly charts and more space from x axis to labels
7735
+ // */
7736
+ // /**
7737
+ // * draw x axis
7738
+ // */
7739
+ // svg
7740
+ // .append('g')
7741
+ // .attr('class', 'x1 axis1')
7742
+ // .attr('transform', 'translate(0,' + height + ')')
7743
+ // .call(d3.axisBottom(x).tickSize(0))
7744
+ // .call((g) => g.select('.domain').attr('fill', 'none'));
7745
+ // /**
7746
+ // * tick line size in alternate fashion
7747
+ // */
7748
+ // svg.selectAll('g.x1.axis1 g.tick line').attr('y2', function () {
7749
+ // if (
7750
+ // alternate_text &&
7751
+ // self.chartConfiguration.isNoAlternateXaxisText == undefined
7752
+ // ) {
7753
+ // alternate_text = false;
7754
+ // return long_tick_length_bg - 7;
7755
+ // } else {
7756
+ // alternate_text = true;
7757
+ // return short_tick_length_bg - 4;
7758
+ // }
7759
+ // });
7760
+ // /**
7761
+ // * reset the flag so that values can be shown in same alternate fashion
7762
+ // */
7763
+ // alternate_text = false;
7764
+ // /**
7765
+ // * print x-axis label texts
7766
+ // * used by weekly charts
7767
+ // */
7768
+ // svg
7769
+ // .selectAll('g.x1.axis1 g.tick text')
7770
+ // .attr('class', 'lib-xaxis-labels-texts-weeklycharts')
7771
+ // .attr('y', function () {
7772
+ // // Minimize gap in maximized (fullscreen) view for weekly charts
7773
+ // if (self.chartConfiguration.isFullScreen) {
7774
+ // return short_tick_length_bg;
7775
+ // }
7776
+ // if (alternate_text) {
7777
+ // alternate_text = false;
7778
+ // return long_tick_length_bg;
7779
+ // } else {
7780
+ // alternate_text = true;
7781
+ // return short_tick_length_bg;
7782
+ // }
7783
+ // });
7784
+ // }
7785
+ // if (self.chartConfiguration.xLabelsOnSameLine) {
7786
+ // const xAxisLabels = svg
7787
+ // .selectAll('g.x1.axis1 g.tick text')
7788
+ // .attr('class', 'lib-xaxis-labels-texts-drilldown')
7789
+ // .style('font-size', this.isHeaderVisible ? '18px' : '14px')
7790
+ // .attr('text-anchor', 'middle')
7791
+ // .attr('y', function(d) {
7792
+ // // For grouped bar charts with many bars and xLabel present, only add 5 if the label is a date
7793
+ // if (subgroups.length > 1 && data.length > 8 && metaData.xLabel) {
7794
+ // const isDateLabel = /\d{2,4}[-\/]/.test(d);
7795
+ // if (self.chartConfiguration.isFullScreen) {
7796
+ // return isDateLabel ? short_tick_length_bg + 14 : short_tick_length_bg;
7797
+ // }
7798
+ // return isDateLabel ? short_tick_length_bg + 14 : short_tick_length_bg;
7799
+ // }
7800
+ // // For grouped bar charts with many bars and NO xLabel, add space as before, but reduce in fullscreen
7801
+ // if (subgroups.length > 1 && data.length > 8 && !metaData.xLabel) {
7802
+ // const chartHasExtraBottom = (self.chartConfiguration.margin && self.chartConfiguration.margin.bottom >= 40);
7803
+ // if (self.chartConfiguration.isFullScreen) {
7804
+ // // Reduce extra gap in maximized view
7805
+ // return short_tick_length_bg + 2;
7806
+ // }
7807
+ // return chartHasExtraBottom ? short_tick_length_bg : short_tick_length_bg + 10;
7808
+ // }
7809
+ // // Default/fallback logic for other cases
7810
+ // let baseY = self.isHeaderVisible ? short_tick_length_bg + 25 : short_tick_length_bg;
7811
+ // if (
7812
+ // subgroups.length > 1 &&
7813
+ // !metaData.xLabel &&
7814
+ // (/\d{2,4}[-\/]\d{2}[-\/]\d{2,4}/.test(d) || /\d{2,4}[-\/]\d{2,4}/.test(d))
7815
+ // ) {
7816
+ // baseY = self.isHeaderVisible ? short_tick_length_bg + 15 : short_tick_length_bg + 25;
7817
+ // }
7818
+ // if (/\d{2,4}[-\/]\d{2,4}/.test(d) && d.indexOf(' ') > -1) {
7819
+ // baseY += 4;
7820
+ // }
7821
+ // // In maximized view, reduce baseY slightly for grouped bars
7822
+ // if (self.chartConfiguration.isFullScreen && subgroups.length > 1) {
7823
+ // baseY = Math.max(short_tick_length_bg, baseY - 10);
7824
+ // }
7825
+ // return baseY;
7826
+ // })
7827
+ // .attr('x', function (d) {
7828
+ // if (self.chartData.data.length > 8 && !self.isZoomedOut) {
7829
+ // return 1; // Move first line text slightly to the left in zoom-in view for better alignment
7830
+ // }
7831
+ // return 0; // Default position
7832
+ // })
7833
+ // .text(function (d) {
7834
+ // var isValueToBeIgnored = false;
7835
+ // if (isMobile && !self.isHeaderVisible) {
7836
+ // let firstPart = d.split(/[\s\-]+/)[0];
7837
+ // return firstPart.substring(0, 3).toLowerCase();
7838
+ // }
7839
+ // (data as any[]).map((indiv: any) => {
7840
+ // if (
7841
+ // indiv.name &&
7842
+ // indiv.name.toLowerCase() == d.trim().toLowerCase() &&
7843
+ // indiv[metaData.keyList[0]] == -1
7844
+ // ) {
7845
+ // isValueToBeIgnored = true;
7846
+ // }
7847
+ // });
7848
+ // if (isValueToBeIgnored) {
7849
+ // return '';
7850
+ // }
7851
+ // // Always add space before and after hyphen for date range labels, even when header is visible and label is single line
7852
+ // // Apply for grouped bar charts and single bar charts, header visible, single line
7853
+ // const dateRangeRegex = /(\d{2,4}[-\/]\d{2}[-\/]\d{2,4})\s*-\s*(\d{2,4}[-\/]\d{2}[-\/]\d{2,4})/;
7854
+ // if (dateRangeRegex.test(d.trim())) {
7855
+ // return d.trim().replace(dateRangeRegex, (m, d1, d2) => `${d1} - ${d2}`);
7856
+ // }
7857
+ // // Split date and week labels into two lines in grouped bar zoom-in view (and minimized view)
7858
+ // const isDateLabel = /\d{2,4}[-\/]/.test(d);
7859
+ // const isWeekLabel = /week|wk|w\d+/i.test(d);
7860
+ // if (
7861
+ // subgroups.length > 1 && !self.isZoomedOut && data.length > 8 && d.indexOf(' ') > -1 && (isDateLabel || isWeekLabel)
7862
+ // ) {
7863
+ // var first = d.substring(0, d.indexOf(' '));
7864
+ // var second = d.substring(d.indexOf(' ') + 1).trim();
7865
+ // return first + '\n' + second;
7866
+ // }
7867
+ // // Also keep previous logic for minimized view
7868
+ // if (isDateLabel) {
7869
+ // if (!self.isHeaderVisible && data.length > 8 && d.indexOf(' ') > -1) {
7870
+ // var first = d.substring(0, d.indexOf(' '));
7871
+ // var second = d.substring(d.indexOf(' ') + 1).trim();
7872
+ // return first + '\n' + second;
7873
+ // } else {
7874
+ // return d;
7875
+ // }
7876
+ // }
7877
+ // if (d.trim().indexOf(' ') > -1) {
7878
+ // return d.trim().substring(0, d.indexOf(' ')).toLowerCase();
7879
+ // }
7880
+ // return d.toLowerCase();
7881
+ // // If label looks like a date (contains digits and - or /)
7882
+ // const isDateLabel2 = /\d{2,4}[-\/]/.test(d);
7883
+ // // Only split date/week labels if there are many grouped bars and header is not visible
7884
+ // if (isDateLabel) {
7885
+ // if (!self.isHeaderVisible && data.length > 8 && d.indexOf(' ') > -1) {
7886
+ // var first = d.substring(0, d.indexOf(' '));
7887
+ // var second = d.substring(d.indexOf(' ') + 1).trim();
7888
+ // return first + '\n' + second;
7889
+ // } else {
7890
+ // return d;
7891
+ // }
7892
+ // }
7893
+ // if (d.trim().indexOf(' ') > -1) {
7894
+ // return d.trim().substring(0, d.indexOf(' ')).toLowerCase();
7895
+ // }
7896
+ // return d.toLowerCase();
7897
+ // });
7898
+ // // Now apply writing-mode: sideways-lr for grouped charts with date labels in zoomed-out view and many bars
7899
+ // xAxisLabels.each(function(this: SVGTextElement, d: any) {
7900
+ // // Only apply writing-mode for exact date labels, not those containing 'week' or similar
7901
+ // const isDateLabel = /^(\d{2,4}[-\/])?\d{2,4}[-\/]\d{2,4}$/.test(d.trim());
7902
+ // const isWeekLabel = /week|wk|w\d+/i.test(d);
7903
+ // if (subgroups.length > 1 && self.isZoomedOut && data.length > 8 && isDateLabel && !isWeekLabel) {
7904
+ // d3.select(this).style('writing-mode', 'sideways-lr');
7905
+ // }
7906
+ // });
7907
+ // if (!isMobile) {
7908
+ // svg
7909
+ // .selectAll('g.x1.axis1 g.tick')
7910
+ // .filter(function (d) {
7911
+ // return !/\d{2,4}[-\/]/.test(d); // Only process non-date labels
7912
+ // })
7913
+ // .append('text')
7914
+ // .attr('class', 'lib-xaxis-labels-texts-drilldown')
7915
+ // .attr('y', long_tick_length_bg)
7916
+ // .attr('fill', 'var(--chart-text-color)')
7917
+ // .attr('x', function (d) {
7918
+ // if (self.chartData.data.length > 8 && !self.isZoomedOut) {
7919
+ // return 1; // Move text slightly to the left
7920
+ // }
7921
+ // return 0; // Default position
7922
+ // })
7923
+ // .text(function (d) {
7924
+ // if (d.trim().indexOf(' ') > -1) {
7925
+ // return d.trim().substring(d.indexOf(' '), d.length).toLowerCase();
7926
+ // }
7927
+ // return '';
7928
+ // });
7929
+ // }
7930
+ // }
7931
+ // if (isria && self.chartData.data.length > 8) {
7932
+ // svg
7933
+ // .selectAll('g.x1.axis1 g.tick text')
7934
+ // .classed('mobile-xaxis-override', true)
7935
+ // .text(function (d: string) {
7936
+ // return d.substring(0, 3);
7937
+ // })
7938
+ // .style('font-size', '12px')
7939
+ // .attr('y', 5)
7940
+ // .attr('x', 5)
7941
+ // .style('text-anchor', 'middle');
7942
+ // }
7943
+ // if (isMobile && !this.isHeaderVisible) {
7944
+ // svg
7945
+ // .selectAll('g.x1.axis1 g.tick text')
7946
+ // .classed('mobile-xaxis-override', true);
7947
+ // }
7948
+ // /**y scale for left y axis */
7949
+ // var y = d3.scaleLinear().rangeRound([height, 0]);
7950
+ // var maxValue = d3.max(data, (d) => d3.max(keyList, (key) => +d[key]));
7951
+ // if (maxValue == 0) {
7952
+ // if (this.chartData.targetLineData) {
7953
+ // maxValue = this.chartData.targetLineData.target + 20;
7954
+ // } else {
7955
+ // maxValue = 100;
7956
+ // }
7957
+ // }
7958
+ // if (this.chartConfiguration.customYscale) {
7959
+ // /**
7960
+ // * increase y-scale so that values wont cross or exceed out of range
7961
+ // * used in weekly charts
7962
+ // */
7963
+ // maxValue = maxValue * this.chartConfiguration.customYscale;
7964
+ // }
7965
+ // if (
7966
+ // this.chartData.targetLineData &&
7967
+ // maxValue < this.chartData.targetLineData.target
7968
+ // ) {
7969
+ // maxValue =
7970
+ // maxValue < 10 && this.chartData.targetLineData.target < 10
7971
+ // ? this.chartData.targetLineData.target + 3
7972
+ // : this.chartData.targetLineData.target + 20;
7973
+ // }
7974
+ // y.domain([0, maxValue]).nice();
7975
+ // let lineYscale;
7976
+ // if (lineData != null) {
7977
+ // let maxLineValue = d3.max(lineData, function (d) {
7978
+ // return +d.value;
7979
+ // });
7980
+ // maxLineValue = maxLineValue * this.chartConfiguration.customYscale;
7981
+ // let minLineValue = d3.min(lineData, function (d) {
7982
+ // return +d.value;
7983
+ // });
7984
+ // if (maxLineValue > 0) minLineValue = minLineValue - 3;
7985
+ // if (minLineValue > 0) {
7986
+ // minLineValue = 0;
7987
+ // }
7988
+ // lineYscale = d3
7989
+ // .scaleLinear()
7990
+ // .domain([minLineValue, maxLineValue])
7991
+ // .range([height, minLineValue]);
7992
+ // }
7993
+ // let yLineAxis;
7994
+ // if (lineYscale != null) {
7995
+ // yLineAxis = d3
7996
+ // .axisRight(lineYscale)
7997
+ // .ticks(self.chartConfiguration.numberOfYTicks)
7998
+ // .tickSize(0)
7999
+ // .tickFormat(self.chartConfiguration.yLineAxisLabelFomatter);
8000
+ // }
8001
+ // /**
8002
+ // * show x-axis grid between labels
8003
+ // * used by weekly charts
8004
+ // */
8005
+ // if (self.chartConfiguration.isXgridBetweenLabels) {
8006
+ // svg
8007
+ // .append('g')
8008
+ // .attr('class', 'grid')
8009
+ // .attr(
8010
+ // 'transform',
8011
+ // 'translate(' + x.bandwidth() / 2 + ',' + height + ')'
8012
+ // )
8013
+ // .call(d3.axisBottom(x).tickSize(-height).tickFormat(''))
8014
+ // .style('stroke-dasharray', '5 5')
8015
+ // .style('color', 'var(--chart-grid-color, #999999)') // Use CSS variable
8016
+ // .call((g) => g.select('.domain').remove());
8017
+ // }
8018
+ // if (this.chartConfiguration.yAxisGrid) {
8019
+ // svg
8020
+ // .append('g')
8021
+ // .call(
8022
+ // d3
8023
+ // .axisLeft(y)
8024
+ // .ticks(self.chartConfiguration.numberOfYTicks)
8025
+ // .tickSize(-width)
8026
+ // )
8027
+ // .style('color', 'var(--chart-axis-color, #B9B9B9)')
8028
+ // .style('opacity', '0.5')
8029
+ // .call((g) => {
8030
+ // g.select('.domain')
8031
+ // .remove()
8032
+ // .style('stroke', 'var(--chart-domain-color, #000000)'); // Add CSS variable for domain
8033
+ // });
8034
+ // } else {
8035
+ // svg
8036
+ // .append('g')
8037
+ // .call(d3.axisLeft(y).ticks(self.chartConfiguration.numberOfYTicks))
8038
+ // .style('color', 'var(--chart-axis-color, #B9B9B9)')
8039
+ // .style('opacity', '0.5')
8040
+ // .call((g) => {
8041
+ // g.select('.domain')
8042
+ // .style('stroke', 'var(--chart-domain-color, #000000)') // Add CSS variable for domain
8043
+ // .style('stroke-width', '1px'); // Ensure visibility
8044
+ // });
8045
+ // }
8046
+ // var xSubgroup = d3.scaleBand().domain(subgroups);
8047
+ // if (subgroups.length > 1 && !this.isZoomedOut) {
8048
+ // // For grouped bar charts in zoom-in view, use full x.bandwidth() for subgroups
8049
+ // xSubgroup.range([0, x.bandwidth()]);
8050
+ // } else if (subgroups.length === 1 && !this.isZoomedOut) {
8051
+ // // For single-bar (non-grouped) charts in zoom-in view, set bar width to 100 (increased from 80)
8052
+ // xSubgroup.range([0, 100]);
8053
+ // } else if (this.chartConfiguration.isMultiChartGridLine == undefined) {
8054
+ // xSubgroup.range([0, x.bandwidth()]);
8055
+ // } else {
8056
+ // // used to make grouped bars with lesser width as we are not using padding for width
8057
+ // xSubgroup.range([0, x.bandwidth()]);
8058
+ // }
8059
+ // // if (this.chartConfiguration.isDrilldownChart) {
8060
+ // // }
8061
+ // var color = d3
8062
+ // .scaleOrdinal()
8063
+ // .domain(subgroups)
8064
+ // .range(Object.values(metaData.colors));
8065
+ // // var colorAboveTarget = d3
8066
+ // // .scaleOrdinal()
8067
+ // // .domain(subgroups)
8068
+ // // .range(Object.values(metaData.colorAboveTarget));
8069
+ // var state = svg
8070
+ // .append('g')
8071
+ // .selectAll('.state')
8072
+ // .data(data)
8073
+ // .enter()
8074
+ // .append('g')
8075
+ // .attr('transform', function (d) {
8076
+ // return 'translate(' + x(d.name) + ',0)';
8077
+ // });
8078
+ // state
8079
+ // .selectAll('rect')
8080
+ // .data(function (d) {
8081
+ // let newList: any = [];
8082
+ // subgroups.map(function (key) {
8083
+ // // if (key !== "group") {
8084
+ // let obj: any = { key: key, value: d[key], name: d.name };
8085
+ // newList.push(obj);
8086
+ // // }
8087
+ // });
8088
+ // return newList;
8089
+ // })
8090
+ // .enter()
8091
+ // .append('rect')
8092
+ // .attr('class', 'bars')
8093
+ // .on('click', function (d) {
8094
+ // if (d.key != 'Target') {
8095
+ // if (
8096
+ // !metaData.barWithoutClick ||
8097
+ // !metaData.barWithoutClick.length ||
8098
+ // (!metaData.barWithoutClick.includes(d?.name) &&
8099
+ // !metaData.barWithoutClick.includes(d?.key))
8100
+ // )
8101
+ // // self.handleClick(d.data.name);
8102
+ // self.handleClick(d);
8103
+ // }
8104
+ // })
8105
+ // .attr('x', function (d) {
8106
+ // if (self.chartConfiguration.isDrilldownChart) {
8107
+ // data.map((indiv: any) => {
8108
+ // if (indiv.name == d.name) {
8109
+ // let keys = Object.keys(indiv).filter((temp, i) => i != 0);
8110
+ // tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
8111
+ // if (x.bandwidth() > 100) {
8112
+ // // Increase bar width a bit in zoom-in view
8113
+ // let reducedBarWidth = 60;
8114
+ // if (!self.isZoomedOut) {
8115
+ // reducedBarWidth = 30;
8116
+ // }
8117
+ // if (self.chartData.data.length == 1) {
8118
+ // if (Object.keys(self.chartData.data[0]).length == 2) {
8119
+ // tempScale.range([
8120
+ // 0 + (x.bandwidth() - reducedBarWidth) / 2,
8121
+ // x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
8122
+ // ]);
8123
+ // } else
8124
+ // tempScale.range([
8125
+ // 0 + (x.bandwidth() - reducedBarWidth) / 2,
8126
+ // x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
8127
+ // ]);
8128
+ // } else
8129
+ // tempScale.range([
8130
+ // 0 + (x.bandwidth() - reducedBarWidth) / 2,
8131
+ // x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
8132
+ // ]);
8133
+ // }
8134
+ // }
8135
+ // });
8136
+ // return tempScale(d.key);
8137
+ // }
8138
+ // return xSubgroup(d.key);
8139
+ // })
8140
+ // .attr('y', function (d) {
8141
+ // if (d.value == -1) {
8142
+ // return y(0);
8143
+ // }
8144
+ // if (d.value >= 0) {
8145
+ // const barHeight = height - y(d.value);
8146
+ // const minHeight = self.chartConfiguration.defaultBarHeight || 2;
8147
+ // return barHeight < minHeight ? y(0) - minHeight : y(d.value);
8148
+ // }
8149
+ // return y(0);
8150
+ // })
8151
+ // .attr('width', function (d) {
8152
+ // // For grouped bar charts in zoom-in view, set bar width to 50 for maximum thickness
8153
+ // if (subgroups.length > 1 && !self.isZoomedOut) {
8154
+ // return 50;
8155
+ // }
8156
+ // // For single-bar (non-grouped) charts in zoom-in view, set bar width to 80
8157
+ // if (subgroups.length === 1 && !self.isZoomedOut) {
8158
+ // return 80;
8159
+ // }
8160
+ // let tempScale = d3.scaleBand().domain([]).range([0, 0]);
8161
+ // // Default logic for other chart types
8162
+ // if (self.chartConfiguration.isDrilldownChart) {
8163
+ // data.map((indiv: any) => {
8164
+ // if (indiv.name == d.name) {
8165
+ // let keys = Object.keys(indiv).filter((temp, i) => i != 0);
8166
+ // tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
8167
+ // if (x.bandwidth() > 100) {
8168
+ // // Increase bar width a bit in zoom-in view
8169
+ // let reducedBarWidth = 60;
8170
+ // if (!self.isZoomedOut) {
8171
+ // reducedBarWidth = 100;
8172
+ // }
8173
+ // if (self.chartData.data.length == 1) {
8174
+ // if (Object.keys(self.chartData.data[0]).length == 2) {
8175
+ // tempScale.range([
8176
+ // 0 + (x.bandwidth() - reducedBarWidth) / 2,
8177
+ // x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
8178
+ // ]);
8179
+ // } else
8180
+ // tempScale.range([
8181
+ // 0 + (x.bandwidth() - reducedBarWidth) / 2,
8182
+ // x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
8183
+ // ]);
8184
+ // } else
8185
+ // tempScale.range([
8186
+ // 0 + (x.bandwidth() - reducedBarWidth) / 2,
8187
+ // x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
8188
+ // ]);
8189
+ // }
8190
+ // }
8191
+ // });
8192
+ // return self.isZoomedOut
8193
+ // ? tempScale.bandwidth()
8194
+ // : self.chartData.data.length && self.chartData.data.length > 8
8195
+ // ? tempScale.bandwidth()
8196
+ // : tempScale.bandwidth();
8197
+ // }
8198
+ // return self.isZoomedOut
8199
+ // ? tempScale.bandwidth()
8200
+ // : self.chartData.data.length && self.chartData.data.length > 8
8201
+ // ? tempScale.bandwidth()
8202
+ // : tempScale.bandwidth();
8203
+ // })
8204
+ // .attr('height', function (d) {
8205
+ // if (d.value == -1) {
8206
+ // return height - y(0);
8207
+ // }
8208
+ // if (d.value >= 0) {
8209
+ // const barHeight = height - y(d.value);
8210
+ // const minHeight = self.chartConfiguration.defaultBarHeight || 2;
8211
+ // return Math.max(barHeight, minHeight);
8212
+ // }
8213
+ // return height - y(0);
8214
+ // })
8215
+ // .style('cursor', function (d) {
8216
+ // if (metaData.hasDrillDown && !isria) return 'pointer';
8217
+ // else return 'default';
8218
+ // })
8219
+ // .attr('fill', function (d) {
8220
+ // if (
8221
+ // d.value &&
8222
+ // self.chartData.targetLineData &&
8223
+ // d.value >= parseFloat(self.chartData.targetLineData.target) &&
8224
+ // self.chartData.metaData.colorAboveTarget
8225
+ // ) {
8226
+ // const key = d.key.toLowerCase();
8227
+ // const colorAboveTarget = Object.keys(self.chartData.metaData.colorAboveTarget).find(
8228
+ // k => k.toLowerCase() === key
8229
+ // );
8230
+ // if (colorAboveTarget) {
8231
+ // return self.chartData.metaData.colorAboveTarget[colorAboveTarget];
8232
+ // }
8233
+ // }
8234
+ // return self.chartData.metaData.colors[d.key];
8235
+ // });
8236
+ // /**
8237
+ // * display angled texts on the bars
8238
+ // */
8239
+ // if (this.chartConfiguration.textsOnBar != undefined && !this.isZoomedOut) {
8240
+ // state
8241
+ // .selectAll('text')
8242
+ // .data(function (d) {
8243
+ // let newList: any = [];
8244
+ // subgroups.map(function (key) {
8245
+ // let obj: any = { key: key, value: d[key], name: d.name };
8246
+ // newList.push(obj);
8247
+ // });
8248
+ // return newList;
8249
+ // })
8250
+ // .enter()
8251
+ // .append('text')
8252
+ // .attr('fill', 'var(--chart-text-color)')
8253
+ // .attr('x', function (d) {
8254
+ // return 0;
8255
+ // })
8256
+ // .attr('y', function (d) {
8257
+ // return 0;
8258
+ // })
8259
+ // .attr('class', 'lib-data-labels-weeklycharts')
8260
+ // .text(function (d) {
8261
+ // return d.key && d.value
8262
+ // ? d.key.length > 20
8263
+ // ? d.key.substring(0, 17) + '...'
8264
+ // : d.key
8265
+ // : '';
8266
+ // })
8267
+ // .style('fill', function (d) {
8268
+ // return '#000';
8269
+ // })
8270
+ // .style('font-weight', 'bold')
8271
+ // .style('font-size', function (d) {
8272
+ // if (self.isZoomedOut) {
8273
+ // return '9px'; // 👈 Zoomed out mode
8274
+ // }
8275
+ // if (self.chartConfiguration.isDrilldownChart) {
8276
+ // if (window.innerWidth > 1900) {
8277
+ // return '18px';
8278
+ // } else if (window.innerWidth < 1400) {
8279
+ // return '10px';
8280
+ // } else {
8281
+ // return '14px';
8282
+ // }
8283
+ // } else {
8284
+ // return '14px';
8285
+ // }
8286
+ // })
8287
+ // .attr('transform', function (d) {
8288
+ // data.map((indiv: any) => {
8289
+ // if (indiv.name == d.name) {
8290
+ // let keys = Object.keys(indiv).filter((temp, i) => i != 0);
8291
+ // var temp;
8292
+ // tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
8293
+ // if (x.bandwidth() > 100) {
8294
+ // if (self.chartData.data.length == 1) {
8295
+ // if (Object.keys(self.chartData.data[0]).length == 2) {
8296
+ // tempScale.range([
8297
+ // 0 + (x.bandwidth() - 200) / 2,
8298
+ // x.bandwidth() - (x.bandwidth() - 200) / 2,
8299
+ // ]);
8300
+ // // .padding(0.05);
8301
+ // } else
8302
+ // tempScale.range([
8303
+ // 0 + (x.bandwidth() - 300) / 2,
8304
+ // x.bandwidth() - (x.bandwidth() - 300) / 2,
8305
+ // ]);
8306
+ // // .padding(0.05);
8307
+ // } else
8308
+ // tempScale.range([
8309
+ // 0 + (x.bandwidth() - 125) / 2,
8310
+ // x.bandwidth() - (x.bandwidth() - 125) / 2,
8311
+ // ]);
8312
+ // }
8313
+ // }
8314
+ // });
8315
+ // /**
8316
+ // * if set, then all texts ll be horizontal
8317
+ // */
8318
+ // if (self.chartConfiguration.textAlwaysHorizontal) {
8319
+ // return (
8320
+ // 'translate(' + xSubgroup(d.key) + ',' + (y(d.value) - 3) + ')'
8321
+ // );
8322
+ // }
8323
+ // /**
8324
+ // * rotate texts having more than one digits
8325
+ // */
8326
+ // // if (d.value > 9)
8327
+ // if (!isNaN(tempScale(d.key)))
8328
+ // return (
8329
+ // 'translate(' +
8330
+ // (tempScale(d.key) + tempScale.bandwidth() * 0.55) +
8331
+ // ',' +
8332
+ // (y(0) - 10) +
8333
+ // ') rotate(270)'
8334
+ // );
8335
+ // return 'translate(0,0)';
8336
+ // // else
8337
+ // // return (
8338
+ // // 'translate(' +
8339
+ // // (tempScale(d.key) + tempScale.bandwidth() / 2) +
8340
+ // // ',' +
8341
+ // // y(0) +
8342
+ // // ')'
8343
+ // // );
8344
+ // })
8345
+ // .on('click', function (d) {
8346
+ // if (
8347
+ // !metaData.barWithoutClick ||
8348
+ // !metaData.barWithoutClick.length ||
8349
+ // (!metaData.barWithoutClick.includes(d?.name) &&
8350
+ // !metaData.barWithoutClick.includes(d?.key))
8351
+ // )
8352
+ // self.handleClick(d);
8353
+ // });
8354
+ // if (!isria) {
8355
+ // state
8356
+ // .selectAll('.lib-data-labels-weeklycharts')
8357
+ // .on('mouseout', handleMouseOut)
8358
+ // .on('mouseover', handleMouseOver);
8359
+ // }
8360
+ // }
8361
+ // if (this.chartConfiguration.displayTitleOnTop || (
8362
+ // this.chartConfiguration.textsOnBar == undefined &&
8363
+ // this.chartConfiguration.displayTitleOnTop == undefined
8364
+ // )) {
8365
+ // if (!isria) {
8366
+ // state
8367
+ // .selectAll('rect')
8368
+ // .on('mouseout', handleMouseOut)
8369
+ // .on('mouseover', handleMouseOver);
8370
+ // }
8371
+ // }
8372
+ // function handleMouseOver(d, i) {
8373
+ // svg.selectAll('.lib-verticalstack-title-ontop').remove();
8374
+ // svg
8375
+ // .append('foreignObject')
8376
+ // .attr('x', function () {
8377
+ // // ...existing code for tempScale calculation...
8378
+ // var elementsCounter;
8379
+ // data.map((indiv: any) => {
8380
+ // if (indiv.name == d.name) {
8381
+ // let keys = Object.keys(indiv).filter((temp, i) => i != 0);
8382
+ // elementsCounter = keys.length;
8383
+ // tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
8384
+ // if (x.bandwidth() > 100) {
8385
+ // if (self.chartData.data.length == 1) {
8386
+ // if (Object.keys(self.chartData.data[0]).length == 2) {
8387
+ // tempScale.range([
8388
+ // 0 + (x.bandwidth() - 200) / 2,
8389
+ // x.bandwidth() - (x.bandwidth() - 200) / 2,
8390
+ // ]);
8391
+ // } else
8392
+ // tempScale.range([
8393
+ // 0 + (x.bandwidth() - 300) / 2,
8394
+ // x.bandwidth() - (x.bandwidth() - 300) / 2,
8395
+ // ]);
8396
+ // } else
8397
+ // tempScale.range([
8398
+ // 0 + (x.bandwidth() - 125) / 2,
8399
+ // x.bandwidth() - (x.bandwidth() - 125) / 2,
8400
+ // ]);
8401
+ // }
8402
+ // }
8403
+ // });
8404
+ // if (metaData.hasDrillDown) {
8405
+ // if (tempScale.bandwidth() + leftAndRightSpaces * 2 > 180) {
8406
+ // return (
8407
+ // x(d.name) + tempScale(d.key) + tempScale.bandwidth() / 2 - 90
8408
+ // );
8409
+ // }
8410
+ // return (
8411
+ // x(d.name) +
8412
+ // tempScale(d.key) -
8413
+ // (tempScale.bandwidth() + leftAndRightSpaces * 2) / 2 +
8414
+ // tempScale.bandwidth() / 2
8415
+ // );
8416
+ // } else return x(d.name) + tempScale(d.key) - (tempScale.bandwidth() + leftAndRightSpaces * 2) / 2 + tempScale.bandwidth() / 2;
8417
+ // })
8418
+ // .attr('class', 'lib-verticalstack-title-ontop')
8419
+ // .attr('y', function () {
8420
+ // return y(d.value) - 3 - 40 - 10;
8421
+ // })
8422
+ // .attr('dy', function () {
8423
+ // return d.class;
8424
+ // })
8425
+ // .attr('width', function () {
8426
+ // data.map((indiv: any) => {
8427
+ // if (indiv.name == d.name) {
8428
+ // let keys = Object.keys(indiv).filter((temp, i) => i != 0);
8429
+ // tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
8430
+ // if (x.bandwidth() > 100) {
8431
+ // if (self.chartData.data.length == 1) {
8432
+ // if (Object.keys(self.chartData.data[0]).length == 2) {
8433
+ // tempScale.range([
8434
+ // 0 + (x.bandwidth() - 200) / 2,
8435
+ // x.bandwidth() - (x.bandwidth() - 200) / 2,
8436
+ // ]);
8437
+ // } else
8438
+ // tempScale.range([
8439
+ // 0 + (x.bandwidth() - 300) / 2,
8440
+ // x.bandwidth() - (x.bandwidth() - 300) / 2,
8441
+ // ]);
8442
+ // } else
8443
+ // tempScale.range([
8444
+ // 0 + (x.bandwidth() - 125) / 2,
8445
+ // x.bandwidth() - (x.bandwidth() - 125) / 2,
8446
+ // ]);
8447
+ // }
8448
+ // }
8449
+ // });
8450
+ // if (metaData.hasDrillDown) {
8451
+ // if (tempScale.bandwidth() + leftAndRightSpaces * 2 > 180) {
8452
+ // return '180px';
8453
+ // }
8454
+ // return tempScale.bandwidth() + leftAndRightSpaces * 2;
8455
+ // } else return tempScale.bandwidth() + leftAndRightSpaces * 2;
8456
+ // })
8457
+ // .attr('height', 50)
8458
+ // .append('xhtml:div')
8459
+ // .attr('class', 'title')
8460
+ // .style('z-index', 99)
8461
+ // .html(function () {
8462
+ // let barLabel = d.key;
8463
+ // let dataType = metaData.dataType ? metaData.dataType : '';
8464
+ // let value = d.value;
8465
+ // let desiredText =
8466
+ // '<span class="title-bar-name">' + barLabel + '</span>';
8467
+ // desiredText +=
8468
+ // '<span class="title-bar-value"><span>' +
8469
+ // value +
8470
+ // '</span>' +
8471
+ // dataType +
8472
+ // '</span>';
8473
+ // return desiredText;
8474
+ // });
8475
+ // }
8476
+ // function handleMouseOut(d, i) {
8477
+ // svg.selectAll('.lib-verticalstack-title-ontop').remove();
8478
+ // }
8479
+ // svg
8480
+ // .append('g')
8481
+ // .attr('class', 'x2 axis2')
8482
+ // .attr('transform', 'translate(0,' + height + ')')
8483
+ // .style('color', 'var(--chart-axis-color, #000)') // Use CSS variable instead of hardcoded #000
8484
+ // .call(d3.axisBottom(xScaleFromOrigin).tickSize(0))
8485
+ // .call((g) => g.select('.domain').attr('fill', 'none'));
8486
+ // svg.selectAll('g.x2.axis2 g.tick text').style('display', 'none');
8487
+ // svg
8488
+ // .append('g')
8489
+ // .attr('class', 'lib-stacked-y-axis-text yaxis-dashed')
8490
+ // .attr('style', self.chartConfiguration.yAxisCustomTextStyles)
8491
+ // .attr('transform', 'translate(0,0)')
8492
+ // .call(y)
8493
+ // .style('display', 'none');
8494
+ // svgYAxisLeft
8495
+ // .append('g')
8496
+ // .append('g')
8497
+ // .attr('class', 'lib-yaxis-labels-texts-drilldown yaxis-dashed')
8498
+ // .attr('style', self.chartConfiguration.yAxisCustomTextStyles)
8499
+ // .attr('transform', 'translate(0,0)')
8500
+ // .call(
8501
+ // d3
8502
+ // .axisLeft(y)
8503
+ // .tickSize(0)
8504
+ // .ticks(self.chartConfiguration.numberOfYTicks)
8505
+ // .tickFormat(function (d) {
8506
+ // const formatted = self.chartConfiguration.yAxisLabelFomatter
8507
+ // ? self.chartConfiguration.yAxisLabelFomatter(d)
8508
+ // : d;
8509
+ // return formatted >= 1000 ? formatted / 1000 + 'k' : formatted;
8510
+ // })
8511
+ // )
8512
+ // .call((g) => {
8513
+ // // Style the domain line for theme support
8514
+ // g.select('.domain')
8515
+ // .style('stroke', 'var(--chart-domain-color, #000000)')
8516
+ // .style('stroke-width', '1px');
8517
+ // })
8518
+ // .selectAll('text')
8519
+ // .style('fill', 'var(--chart-text-color)');
8520
+ // svgYAxisRight
8521
+ // .append('g')
8522
+ // .attr('class', 'lib-yaxis-labels-texts-drilldown yaxis-dashed')
8523
+ // .attr('style', self.chartConfiguration.yAxisCustomTextStyles)
8524
+ // .attr('transform', 'translate(0,0)')
8525
+ // .call(y)
8526
+ // .style('display', 'none');
8527
+ // /**
8528
+ // * hide x axis labels
8529
+ // * config is there for future use
8530
+ // * used by weekly charts
8531
+ // */
8532
+ // if (
8533
+ // this.chartConfiguration.isXaxisLabelHidden != undefined &&
8534
+ // this.chartConfiguration.isXaxisLabelHidden
8535
+ // ) {
8536
+ // d3.selectAll('g.lib-line-x-axis-text > g > text').attr(
8537
+ // 'class',
8538
+ // 'lib-display-hidden'
8539
+ // );
8540
+ // }
8541
+ // /**
8542
+ // * hide y axis labels
8543
+ // * used by weekly charts
8544
+ // */
8545
+ // if (
8546
+ // this.chartConfiguration.isYaxisLabelHidden != undefined &&
8547
+ // this.chartConfiguration.isYaxisLabelHidden
8548
+ // ) {
8549
+ // d3.selectAll('.yaxis-dashed > g > text').attr(
8550
+ // 'class',
8551
+ // 'lib-display-hidden'
8552
+ // );
8553
+ // }
8554
+ // /**
8555
+ // * hide y axis labels
8556
+ // * config is there for future use
8557
+ // */
8558
+ // if (
8559
+ // this.chartConfiguration.isYaxisHidden != undefined &&
8560
+ // this.chartConfiguration.isYaxisHidden
8561
+ // ) {
8562
+ // d3.selectAll('.yaxis-dashed').attr('class', 'lib-display-hidden');
8563
+ // }
8564
+ // /**
8565
+ // * dashed y axis
8566
+ // * used by weekly charts
8567
+ // */
8568
+ // if (
8569
+ // this.chartConfiguration.isYaxisDashed != undefined &&
8570
+ // this.chartConfiguration.isYaxisDashed
8571
+ // ) {
8572
+ // d3.selectAll('.yaxis-dashed')
8573
+ // .style('stroke-dasharray', '5 5')
8574
+ // .style('color', 'var(--chart-axis-color, #999999)'); // Use CSS variable
8575
+ // }
8576
+ // if (lineData != null) {
8577
+ // if (lineData && self.chartConfiguration.showLineChartAxis) {
8578
+ // svgYAxisRight
8579
+ // .append('g')
8580
+ // .attr('class', 'lib-stacked-y-axis-text1')
8581
+ // .attr('style', self.chartConfiguration.yAxisCustomTextStyles)
8582
+ // .attr('transform', 'translate(' + 0 + ',0)')
8583
+ // .call(yLineAxis);
8584
+ // }
8585
+ // }
8586
+ // /**
8587
+ // * used to display y label
8588
+ // */
8589
+ // // if (this.isZoomedOut) {
8590
+ // // svg
8591
+ // // .selectAll('.lib-xaxis-labels-texts-drilldown')
8592
+ // // .attr('class', 'lib-display-hidden');
8593
+ // // }
8594
+ // if (this.isZoomedOut) {
8595
+ // svg
8596
+ // .selectAll('.lib-xaxis-labels-texts-drilldown')
8597
+ // .each((d, i, nodes) => {
8598
+ // const text = d3.select(nodes[i]);
8599
+ // const label = text.text();
8600
+ // if (label.indexOf('\n') > -1) {
8601
+ // const lines = label.split('\n');
8602
+ // text.text(null);
8603
+ // lines.forEach((line, idx) => {
8604
+ // text.append('tspan')
8605
+ // .text(line)
8606
+ // .attr('x', 0)
8607
+ // .attr('dy', idx === 0 ? '1em' : '1.1em');
8608
+ // });
8609
+ // } else {
8610
+ // const words = label.split(' ');
8611
+ // text.text(null);
8612
+ // words.forEach((word, index) => {
8613
+ // text.append('tspan').text(word);
8614
+ // });
8615
+ // }
8616
+ // })
8617
+ // .style('fill', 'var(--chart-text-color)')
8618
+ // .attr('transform', null);
8619
+ // svg
8620
+ // .select('.x-axis')
8621
+ // .attr('transform', `translate(0, ${height - margin.bottom + 10})`);
8622
+ // }
8623
+ // /**
8624
+ // * used to write y labels based on configuration
8625
+ // */
8626
+ // if (metaData.yLabel) {
8627
+ // const yPosition = isria ? 0 - margin.left / 2 - 30 : 0 - margin.left / 2 - 40;
8628
+ // svgYAxisLeft
8629
+ // .append('text')
8630
+ // .attr('class', 'lib-axis-group-label font-size-1')
8631
+ // .attr('style', self.chartConfiguration.yAxisCustomlabelStyles)
8632
+ // .attr('transform', 'rotate(-90)')
8633
+ // .attr('y', yPosition)
8634
+ // .attr('x', 0 - height / 2)
8635
+ // .attr('dy', '1em')
8636
+ // .style('text-anchor', 'middle')
8637
+ // .attr('fill', 'var(--chart-text-color)');
8638
+ // if (this.chartConfiguration.isMultiChartGridLine === undefined) {
8639
+ // svgYAxisLeft
8640
+ // .selectAll('.lib-axis-group-label')
8641
+ // .style('font-size', 'smaller')
8642
+ // .text(metaData.yLabel);
8643
+ // } else {
8644
+ // svg
8645
+ // .selectAll('.lib-axis-group-label')
8646
+ // .attr('class', 'lib-ylabel-weeklyCharts')
8647
+ // .text(metaData.yLabel.toLowerCase());
8648
+ // }
8649
+ // }
8650
+ // if (this.chartData.targetLineData) {
8651
+ // const yZero = y(this.chartData.targetLineData.target);
8652
+ // svg
8653
+ // .append('line')
8654
+ // .attr('x1', 0)
8655
+ // .attr('x2', width)
8656
+ // .attr('y1', yZero)
8657
+ // .attr('y2', yZero)
8658
+ // .style('stroke-dasharray', '5 5')
8659
+ // .style('stroke', this.chartData.targetLineData.color);
8660
+ // // svgYAxisRight
8661
+ // // .append('line')
8662
+ // // .attr('x1', 0)
8663
+ // // .attr('x2', rightSvgWidth)
8664
+ // // .attr('y1', yZero)
8665
+ // // .attr('y2', yZero)
8666
+ // // .style('stroke', this.chartData.targetLineData.color);
8667
+ // svgYAxisRight
8668
+ // .append('foreignObject')
8669
+ // .attr('transform', 'translate(' + 0 + ',' + (yZero - 30) + ')')
8670
+ // .attr('width', rightSvgWidth)
8671
+ // .attr('height', 50)
8672
+ // .append('xhtml:div')
8673
+ // .attr('class', 'target-display')
8674
+ // .style('color', 'var(--chart-text-color)')
8675
+ // .html(function () {
8676
+ // let dataTypeTemp = '';
8677
+ // let targetLineName = 'target';
8678
+ // if (metaData.dataType) {
8679
+ // dataTypeTemp = metaData.dataType;
8680
+ // }
8681
+ // if (
8682
+ // self.chartData.targetLineData &&
8683
+ // self.chartData.targetLineData.targetName
8684
+ // ) {
8685
+ // targetLineName = self.chartData.targetLineData.targetName;
8686
+ // }
8687
+ // return (
8688
+ // `<div>${targetLineName}</div>` +
8689
+ // '<div>' +
8690
+ // self.chartData.targetLineData.target +
8691
+ // '' +
8692
+ // dataTypeTemp +
8693
+ // '</div>'
8694
+ // );
8695
+ // });
8696
+ // }
8697
+ // if (this.chartConfiguration.isDrilldownChart) {
8698
+ // /**
8699
+ // * used by drilldown charts
8700
+ // */
8701
+ // // svg
8702
+ // // .selectAll('.lib-axis-group-label')
8703
+ // // .attr('class', 'lib-ylabel-drilldowncharts')
8704
+ // // .text(metaData.yLabel.toLowerCase());
8705
+ // svg.selectAll('g.x1.axis1 g.tick line').style('display', 'none');
8706
+ // }
8707
+ // if (metaData.xLabel) {
8708
+ // function isAcronym(label) {
8709
+ // return (
8710
+ // (label.length <= 4 && /^[A-Z]+$/.test(label)) ||
8711
+ // (label === label.toUpperCase() && /[A-Z]/.test(label))
8712
+ // );
8713
+ // }
8714
+ // const xLabelText = metaData.xLabel;
8715
+ // const isAcr = isAcronym(xLabelText.replace(/[^A-Za-z]/g, ''));
8716
+ // const xPosition = isria ? (height + margin.top + margin.bottom) : (height + margin.top + margin.bottom + 40);
8717
+ // svg
8718
+ // .append('text')
8719
+ // .attr('class', function () {
8720
+ // let baseClass = 'lib-axis-group-label font-size-1';
8721
+ // if (self.chartConfiguration.isDrilldownChart)
8722
+ // return baseClass + ' lib-xlabel-drilldowncharts';
8723
+ // if (self.chartConfiguration.isMultiChartGridLine != undefined)
8724
+ // return baseClass + ' lib-xlabel-weeklyCharts';
8725
+ // return baseClass + ' lib-axis-waterfall-label';
8726
+ // })
8727
+ // .attr('style', self.chartConfiguration.xAxisCustomlabelStyles)
8728
+ // .attr(
8729
+ // 'transform',
8730
+ // 'translate(' + width / 2 + ' ,' + xPosition + ')'
8731
+ // )
8732
+ // .style('text-anchor', 'middle')
8733
+ // .style('fill', 'var(--chart-text-color)')
8734
+ // .text(isAcr ? xLabelText.toUpperCase() : xLabelText.toLowerCase())
8735
+ // .style('text-transform', isAcr ? 'none' : 'capitalize');
8736
+ // }
8737
+ // if (metaData.lineyLabel) {
8738
+ // svgYAxisRight
8739
+ // .append('text')
8740
+ // .attr('class', 'lib-axis-group-label lib-line-axis')
8741
+ // .attr('fill', 'var(--chart-text-color)')
8742
+ // .attr('style', self.chartConfiguration.yAxisCustomlabelStyles)
8743
+ // .attr('transform', 'translate(0,0) rotate(90)')
8744
+ // .attr('y', 0 - 100)
8745
+ // .attr('x', 0 + 100)
8746
+ // .attr('dy', '5em')
8747
+ // .style('text-anchor', 'middle')
8748
+ // .style('font-size', 'smaller')
8749
+ // .text(metaData.lineyLabel);
8750
+ // }
8751
+ // if (lineData) {
8752
+ // svg
8753
+ // .append('path')
8754
+ // .datum(lineData)
8755
+ // .attr('fill', 'none')
8756
+ // .attr('stroke', self.chartConfiguration.lineGraphColor)
8757
+ // .attr('stroke-width', 1.5)
8758
+ // .attr(
8759
+ // 'd',
8760
+ // d3
8761
+ // .line()
8762
+ // .x(function (d) {
8763
+ // return x(d.name) + x.bandwidth() / 2;
8764
+ // })
8765
+ // .y(function (d) {
8766
+ // return lineYscale(d.value);
8767
+ // })
8768
+ // );
8769
+ // var dot = svg
8770
+ // .selectAll('myCircles')
8771
+ // .data(lineData)
8772
+ // .enter()
8773
+ // .append('g')
8774
+ // .on('click', function (d) {
8775
+ // if (
8776
+ // !metaData.barWithoutClick ||
8777
+ // !metaData.barWithoutClick.length ||
8778
+ // (!metaData.barWithoutClick.includes(d?.name) &&
8779
+ // !metaData.barWithoutClick.includes(d?.key))
8780
+ // )
8781
+ // self.handleClick(d);
8782
+ // });
8783
+ // dot
8784
+ // .append('circle')
8785
+ // .attr('fill', function (d) {
8786
+ // return self.chartConfiguration.lineGraphColor;
8787
+ // })
8788
+ // .attr('stroke', 'none')
8789
+ // .attr('cx', function (d) {
8790
+ // return x(d.name) + x.bandwidth() / 2;
8791
+ // })
8792
+ // .attr('cy', function (d) {
8793
+ // return lineYscale(d.value);
8794
+ // })
8795
+ // .style('cursor', () =>
8796
+ // self.chartData.metaData.hasDrillDown ? 'pointer' : 'default'
8797
+ // )
8798
+ // .attr('r', 3);
8799
+ // if (self.chartConfiguration.lineGraphColor) {
8800
+ // dot
8801
+ // .append('text')
8802
+ // .attr('class', 'dot')
8803
+ // .attr('fill', 'var(--chart-text-color)')
8804
+ // .attr('color', self.chartConfiguration.lineGraphColor)
8805
+ // .attr('style', 'font-size: ' + '.85em')
8806
+ // .attr('x', function (d, i) {
8807
+ // return x(d.name) + x.bandwidth() / 2;
8808
+ // })
8809
+ // .attr('y', function (d) {
8810
+ // return lineYscale(d.value);
8811
+ // })
8812
+ // .attr('dy', '-1em')
8813
+ // .text(function (d) {
8814
+ // return self.chartConfiguration.labelFormatter(d.value);
8815
+ // });
8816
+ // }
8817
+ // }
8818
+ // }
7628
8819
  initializegroupChart() {
7629
8820
  // ==================== VARIABLE DECLARATIONS ====================
7630
8821
  const self = this;
@@ -7790,14 +8981,9 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
7790
8981
  let alternate_text = false;
7791
8982
  if (this.chartConfiguration.isMultiChartGridLine === undefined) {
7792
8983
  // Normal ticks for dashboard charts
7793
- // Dynamically adjust Y translation for mobile
7794
- let translateY = height;
7795
- if (isMobile) {
7796
- translateY = height + 26; // Add extra space at the top for mobile
7797
- }
7798
8984
  svg.append('g')
7799
8985
  .attr('class', 'x1 axis1')
7800
- .attr('transform', `translate(0,${translateY})`)
8986
+ .attr('transform', `translate(0,${height})`)
7801
8987
  .call(d3.axisBottom(x))
7802
8988
  .call((g) => g.select('.domain').remove());
7803
8989
  svg.selectAll('g.x1.axis1 g.tick line').remove();
@@ -8592,7 +9778,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8592
9778
  // Minimum width per bar group based on device and number of subgroups
8593
9779
  const minWidthPerGroup = (() => {
8594
9780
  if (subgroupsCount > 2) {
8595
- return isMobile ? 100 : isTablet ? 100 : 120; // Wider for multiple subgroups
9781
+ return isMobile ? 80 : isTablet ? 100 : 120; // Wider for multiple subgroups
8596
9782
  }
8597
9783
  return isMobile ? 40 : isTablet ? 60 : 80; // Normal width for 1-2 subgroups
8598
9784
  })();