axidio-styleguide-library1-v2 0.2.85 → 0.2.87

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,9 +6488,11 @@ 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
- 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)
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
6494
6496
  ZOOM_THRESHOLD: 30,
6495
6497
  ZOOM_IN_THRESHOLD: 8,
6496
6498
  };
@@ -6555,6 +6557,48 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6555
6557
  removeExistingChart() {
6556
6558
  d3.select('#' + this.uniqueId).remove();
6557
6559
  }
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
+ }
6558
6602
  mergeConfigurations() {
6559
6603
  for (const key in this.defaultConfiguration) {
6560
6604
  this.chartConfiguration[key] = ChartHelper.getValueByConfigurationType(key, this.defaultConfiguration, this.customChartConfiguration);
@@ -6573,18 +6617,26 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6573
6617
  }
6574
6618
  return metaData;
6575
6619
  }
6576
- calculateDimensions(chartContainer, verticalContainer, margin, dataLength) {
6620
+ calculateDimensions(chartContainer, verticalContainer, margin, device, dataLength) {
6577
6621
  const containerWidth = chartContainer.node().getBoundingClientRect().width;
6578
6622
  const containerHeight = verticalContainer.node().getBoundingClientRect().height;
6579
6623
  let width = containerWidth - margin.left - margin.right;
6580
6624
  let height = containerHeight * (this.chartConfiguration.svgHeight / 100) - margin.top - margin.bottom;
6581
- // Fixed zoom handling - same for all resolutions
6625
+ // Responsive zoom handling
6582
6626
  if (dataLength > this.CONSTANTS.ZOOM_THRESHOLD && this.isZoomedOut) {
6583
- const minWidth = dataLength * 25;
6627
+ const minWidth = device.isMobile
6628
+ ? dataLength * 12
6629
+ : device.isTablet
6630
+ ? dataLength * 20
6631
+ : dataLength * 25;
6584
6632
  width = Math.max(width, minWidth);
6585
6633
  }
6586
6634
  if (dataLength > this.CONSTANTS.ZOOM_IN_THRESHOLD && !this.isZoomedOut) {
6587
- width = dataLength * 130;
6635
+ width = device.isMobile
6636
+ ? dataLength * 50
6637
+ : device.isTablet
6638
+ ? dataLength * 90
6639
+ : dataLength * 130;
6588
6640
  }
6589
6641
  if (this.chartConfiguration.isFullScreen) {
6590
6642
  height = this.chartConfiguration.svgHeight !== 80
@@ -6592,44 +6644,28 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6592
6644
  : containerHeight;
6593
6645
  }
6594
6646
  if (this.chartConfiguration.isDrilldownChart) {
6595
- height = containerHeight - margin.top - margin.bottom - 130;
6647
+ const offset = device.isMobile ? 60 : device.isTablet ? 90 : 130;
6648
+ height = containerHeight - margin.top - margin.bottom - offset;
6596
6649
  }
6597
- // Responsive bar width based on screen size and number of bars
6598
- const isMobileOrTablet = window.innerWidth < 1024;
6599
6650
  let barWidth;
6600
6651
  let barPadding;
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
- }
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);
6623
6663
  }
6624
6664
  else {
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));
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
+ }
6633
6669
  return {
6634
6670
  width,
6635
6671
  height,
@@ -6647,7 +6683,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6647
6683
  .attr('class', 'outer-container')
6648
6684
  .style('width', '100%')
6649
6685
  .style('height', dimensions.height)
6650
- .style('overflow-x', 'auto') // Enable scroll for all resolutions
6686
+ .style('overflow-x', 'hidden')
6651
6687
  .style('padding-left', `${margin.left}px`)
6652
6688
  .style('margin-left', '10px')
6653
6689
  .style('padding-right', `${this.CONSTANTS.RIGHT_SVG_WIDTH}px`);
@@ -6673,7 +6709,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6673
6709
  .append('div')
6674
6710
  .attr('class', 'inner-container')
6675
6711
  .style('width', '100%')
6676
- .style('overflow-x', 'visible');
6712
+ .style('overflow-x', 'auto');
6677
6713
  const svg = innerContainer
6678
6714
  .append('svg')
6679
6715
  .attr('width', dimensions.requiredSvgWidth)
@@ -6682,27 +6718,18 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6682
6718
  .attr('transform', `translate(0,${margin.top})`);
6683
6719
  return { svg, svgYAxisLeft, svgYAxisRight, innerContainer };
6684
6720
  }
6685
- createScales(data, layers, lineData, dimensions) {
6721
+ createScales(data, layers, lineData, dimensions, device) {
6686
6722
  const { width, height, barWidth, barPadding } = dimensions;
6687
- // Calculate total width needed for all bars with proper spacing
6688
- const totalBarsWidth = data.length * barWidth;
6689
- const totalSpacing = (data.length - 1) * barPadding;
6690
- const requiredWidth = totalBarsWidth + totalSpacing + (this.CONSTANTS.LEFT_RIGHT_SPACES * 2);
6691
- // Use the larger of container width or required width for proper spacing
6692
- const effectiveWidth = Math.max(width - this.CONSTANTS.RIGHT_SVG_WIDTH, requiredWidth);
6693
- // Calculate padding ratio to create exact pixel gaps between bars
6694
- const totalAvailableSpace = effectiveWidth;
6695
- const paddingRatio = barPadding / (barWidth + barPadding);
6723
+ // Adjust padding based on device
6724
+ const padding = device.isMobile ? 0.15 : device.isTablet ? 0.3 : 0.5;
6696
6725
  const xScale = d3
6697
6726
  .scaleBand()
6698
6727
  .rangeRound([
6699
6728
  this.CONSTANTS.LEFT_RIGHT_SPACES,
6700
- effectiveWidth + this.CONSTANTS.LEFT_RIGHT_SPACES - this.CONSTANTS.RIGHT_SVG_WIDTH
6729
+ width - this.CONSTANTS.RIGHT_SVG_WIDTH - this.CONSTANTS.LEFT_RIGHT_SPACES
6701
6730
  ])
6702
6731
  .domain(data.map(d => d.name).reverse())
6703
- .paddingInner(paddingRatio)
6704
- .paddingOuter(0.5)
6705
- .align(0.5); // Center alignment
6732
+ .padding(padding);
6706
6733
  const xScaleFromOrigin = d3
6707
6734
  .scaleBand()
6708
6735
  .rangeRound([width - this.CONSTANTS.RIGHT_SVG_WIDTH, 0])
@@ -6751,7 +6778,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6751
6778
  }
6752
6779
  return { xAxis, yAxis, yLineAxis };
6753
6780
  }
6754
- renderBars(svg, layers, scales, metaData, dimensions) {
6781
+ renderBars(svg, layers, scales, metaData, dimensions, device) {
6755
6782
  const layer = svg
6756
6783
  .selectAll('.layer')
6757
6784
  .data(layers)
@@ -6763,11 +6790,11 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6763
6790
  .selectAll('rect')
6764
6791
  .data((d) => d)
6765
6792
  .enter();
6766
- this.appendRectangles(rect, scales, metaData, dimensions);
6793
+ this.appendRectangles(rect, scales, metaData, dimensions, device);
6767
6794
  this.addInteractions(rect, svg, metaData, scales);
6768
6795
  return rect;
6769
6796
  }
6770
- appendRectangles(rect, scales, metaData, dimensions) {
6797
+ appendRectangles(rect, scales, metaData, dimensions, device) {
6771
6798
  const { barWidth, barPadding } = dimensions;
6772
6799
  const { xScale, yScale } = scales;
6773
6800
  rect
@@ -6786,19 +6813,17 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6786
6813
  }
6787
6814
  return 0;
6788
6815
  })
6789
- .attr('x', (d) => {
6790
- // Center the bar within its bandwidth with proper spacing
6791
- const xPosition = xScale(d.data.name);
6792
- const bandwidth = xScale.bandwidth();
6816
+ .attr('x', (d, i) => {
6817
+ if (device.isMobile) {
6818
+ return this.CONSTANTS.LEFT_RIGHT_SPACES + i * (barWidth + barPadding);
6819
+ }
6793
6820
  if (!this.chartConfiguration.isMultiChartGridLine) {
6794
- // Center the fixed-width bar in the available space
6795
- return xPosition + (bandwidth - barWidth) / 2;
6821
+ return xScale(d.data.name);
6796
6822
  }
6797
6823
  if (this.chartConfiguration.isDrilldownChart && this.chartData.data.length <= 3) {
6798
- return xPosition + bandwidth / 2 - 35;
6824
+ return xScale(d.data.name) + xScale.bandwidth() / 2 - 35;
6799
6825
  }
6800
- const calculatedWidth = bandwidth * 0.8;
6801
- return xPosition + (bandwidth - calculatedWidth) / 2;
6826
+ return xScale(d.data.name) + xScale.bandwidth() * 0.1;
6802
6827
  })
6803
6828
  .attr('height', (d) => {
6804
6829
  if (!isNaN(d[0]) && !isNaN(d[1])) {
@@ -6808,8 +6833,10 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6808
6833
  return 0;
6809
6834
  })
6810
6835
  .attr('width', (d) => {
6811
- if (!this.chartConfiguration.isMultiChartGridLine)
6836
+ if (device.isMobile)
6812
6837
  return barWidth;
6838
+ if (!this.chartConfiguration.isMultiChartGridLine)
6839
+ return xScale.bandwidth();
6813
6840
  if (this.chartConfiguration.isDrilldownChart && this.chartData.data.length <= 3) {
6814
6841
  return 70;
6815
6842
  }
@@ -6865,13 +6892,23 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6865
6892
  const value = d[1] - d[0];
6866
6893
  if (isNaN(value))
6867
6894
  return;
6895
+ const device = this.getDeviceConfig();
6868
6896
  const bandwidth = xScale.bandwidth();
6869
- // Fixed tooltip width for all resolutions
6870
- const width = /week/i.test(d.data.name) && /\d{4}-\d{2}-\d{2}/.test(d.data.name)
6871
- ? '250px'
6872
- : bandwidth + this.CONSTANTS.LEFT_RIGHT_SPACES * 2 > 180
6873
- ? '180px'
6874
- : bandwidth + this.CONSTANTS.LEFT_RIGHT_SPACES * 2;
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
+ }
6875
6912
  svg
6876
6913
  .append('foreignObject')
6877
6914
  .attr('x', this.calculateTooltipX(d, xScale, width))
@@ -6989,10 +7026,8 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
6989
7026
  }
6990
7027
  }
6991
7028
  initializeStackedChart() {
6992
- // Use fixed configuration for all resolutions
6993
- this.chartConfiguration.margin = { top: 20, right: 20, bottom: 40, left: 40 };
6994
- this.chartConfiguration.numberOfYTicks = 5;
6995
- this.chartConfiguration.svgHeight = 70;
7029
+ const device = this.getDeviceConfig();
7030
+ this.configureResponsiveSettings(device);
6996
7031
  this.mergeConfigurations();
6997
7032
  this.applyConfigurationFlags();
6998
7033
  const data = this.chartData.data;
@@ -7003,16 +7038,16 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7003
7038
  const chartContainer = d3.select(this.containerElt.nativeElement);
7004
7039
  const verticalstackedcontainer = d3.select(this.verticalstackedcontainerElt.nativeElement);
7005
7040
  const margin = this.chartConfiguration.margin;
7006
- const dimensions = this.calculateDimensions(chartContainer, verticalstackedcontainer, margin, data.length);
7041
+ const dimensions = this.calculateDimensions(chartContainer, verticalstackedcontainer, margin, device, data.length);
7007
7042
  const { svg, svgYAxisLeft, svgYAxisRight } = this.createSvgContainers(chartContainer, dimensions, margin);
7008
7043
  const stack = d3.stack().keys(keyList).offset(d3.stackOffsetNone);
7009
7044
  const layers = stack(data);
7010
7045
  data.sort((a, b) => b.total - a.total);
7011
- const scales = this.createScales(data, layers, lineData, dimensions);
7046
+ const scales = this.createScales(data, layers, lineData, dimensions, device);
7012
7047
  const axes = this.createAxes(scales);
7013
7048
  this.renderGrids(svg, scales, dimensions);
7014
- const rect = this.renderBars(svg, layers, scales, metaData, dimensions);
7015
- this.renderAxes(svg, svgYAxisLeft, svgYAxisRight, axes, scales, dimensions, data);
7049
+ const rect = this.renderBars(svg, layers, scales, metaData, dimensions, device);
7050
+ this.renderAxes(svg, svgYAxisLeft, svgYAxisRight, axes, scales, dimensions, device, data);
7016
7051
  this.renderAxisLabels(svg, svgYAxisLeft, metaData, dimensions, margin);
7017
7052
  this.renderTargetLine(svg, svgYAxisRight, scales, dimensions, metaData);
7018
7053
  this.renderDataLabels(rect, scales, metaData, dimensions);
@@ -7053,7 +7088,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7053
7088
  }
7054
7089
  }
7055
7090
  }
7056
- renderAxes(svg, svgYAxisLeft, svgYAxisRight, axes, scales, dimensions, data) {
7091
+ renderAxes(svg, svgYAxisLeft, svgYAxisRight, axes, scales, dimensions, device, data) {
7057
7092
  if (this.chartConfiguration.showXaxisTop) {
7058
7093
  svg
7059
7094
  .append('g')
@@ -7063,7 +7098,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7063
7098
  svg.selectAll('.x-axis > g > text').attr('class', 'lib-display-hidden');
7064
7099
  }
7065
7100
  if (!this.chartConfiguration.isMultiChartGridLine) {
7066
- this.renderStandardAxes(svg, axes, scales, dimensions, data);
7101
+ this.renderStandardAxes(svg, axes, scales, dimensions, device, data);
7067
7102
  }
7068
7103
  else if (this.chartConfiguration.isDrilldownChart) {
7069
7104
  this.renderDrilldownAxes(svg, svgYAxisLeft, svgYAxisRight, axes, scales, dimensions);
@@ -7074,29 +7109,24 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7074
7109
  this.applyAxisStyling(svg, svgYAxisLeft, svgYAxisRight);
7075
7110
  this.applyAxisConfigurations(svg, scales, dimensions, data);
7076
7111
  }
7077
- renderStandardAxes(svg, axes, scales, dimensions, data) {
7078
- const isMobileOrTablet = window.innerWidth < 1024;
7079
- svg
7080
- .append('g')
7081
- .attr('transform', `translate(0,${dimensions.height})`)
7082
- .attr('class', 'lib-stacked-x-axis-text')
7083
- .call(axes.xAxis)
7084
- .selectAll('text')
7085
- .style('fill', 'var(--chart-text-color)')
7086
- .style('font-size', isMobileOrTablet ? '10px' : '12px')
7087
- .attr('text-anchor', 'middle')
7088
- .attr('dx', '0')
7089
- .attr('dy', '0.71em')
7090
- .attr('transform', null)
7091
- .each(function () {
7092
- // Ensure X-axis labels are centered and don't overlap
7093
- const textElement = d3.select(this);
7094
- const text = textElement.text();
7095
- if (isMobileOrTablet && text.length > 10) {
7096
- // Truncate long labels on mobile/tablet
7097
- textElement.text(text.substring(0, 8) + '...');
7098
- }
7099
- });
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
+ }
7100
7130
  svg
7101
7131
  .append('g')
7102
7132
  .attr('class', 'lib-stacked-y-axis-text')
@@ -7105,6 +7135,27 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7105
7135
  .selectAll('text')
7106
7136
  .style('fill', 'var(--chart-text-color)');
7107
7137
  }
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
+ }
7108
7159
  renderDrilldownAxes(svg, svgYAxisLeft, svgYAxisRight, axes, scales, dimensions) {
7109
7160
  svg
7110
7161
  .append('g')
@@ -7186,6 +7237,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7186
7237
  }
7187
7238
  }
7188
7239
  renderCustomXAxis(svg, scales, dimensions, data) {
7240
+ const device = this.getDeviceConfig();
7189
7241
  svg
7190
7242
  .append('g')
7191
7243
  .attr('class', 'x1 axis1')
@@ -7193,12 +7245,12 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7193
7245
  .style('color', '#000')
7194
7246
  .call(d3.axisBottom(scales.xScale).tickSize(0))
7195
7247
  .call((g) => g.select('.domain').attr('fill', 'none'));
7196
- this.styleCustomXAxisTicks(svg, data);
7248
+ this.styleCustomXAxisTicks(svg, data, device);
7197
7249
  if (this.chartConfiguration.xLabelsOnSameLine) {
7198
- this.applyXLabelsOnSameLine(svg);
7250
+ this.applyXLabelsOnSameLine(svg, device);
7199
7251
  }
7200
7252
  }
7201
- styleCustomXAxisTicks(svg, data) {
7253
+ styleCustomXAxisTicks(svg, data, device) {
7202
7254
  let alternateText = false;
7203
7255
  svg.selectAll('.x1.axis1 .tick line').attr('y2', () => {
7204
7256
  if (this.chartConfiguration.hideXaxisTick)
@@ -7230,17 +7282,28 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7230
7282
  return this.CONSTANTS.SHORT_TICK_LENGTH_BG;
7231
7283
  });
7232
7284
  }
7233
- applyXLabelsOnSameLine(svg) {
7285
+ applyXLabelsOnSameLine(svg, device) {
7234
7286
  svg
7235
7287
  .selectAll('g.x1.axis1 g.tick text')
7236
7288
  .attr('class', 'lib-xaxis-labels-texts-drilldown')
7237
7289
  .attr('y', this.CONSTANTS.SHORT_TICK_LENGTH_BG)
7238
7290
  .text((d) => {
7291
+ if (device.isMobile) {
7292
+ return d.split(' ')[0].substring(0, 3);
7293
+ }
7239
7294
  const trimmed = d.trim();
7240
7295
  const spaceIndex = trimmed.indexOf(' ');
7241
7296
  return spaceIndex > -1
7242
7297
  ? trimmed.substring(0, spaceIndex).toLowerCase()
7243
7298
  : 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;
7244
7307
  });
7245
7308
  svg
7246
7309
  .selectAll('g.x1.axis1 g.tick')
@@ -7249,11 +7312,16 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7249
7312
  .attr('y', this.CONSTANTS.LONG_TICK_LENGTH_BG)
7250
7313
  .attr('fill', 'currentColor')
7251
7314
  .text((d) => {
7315
+ if (device.isMobile)
7316
+ return '';
7252
7317
  const trimmed = d.trim();
7253
7318
  const spaceIndex = trimmed.indexOf(' ');
7254
7319
  return spaceIndex > -1
7255
7320
  ? trimmed.substring(spaceIndex).toLowerCase()
7256
7321
  : '';
7322
+ })
7323
+ .attr('transform', (d, i) => {
7324
+ return device.isMobile && i === 0 ? 'translate(20,0)' : null;
7257
7325
  });
7258
7326
  }
7259
7327
  renderDataLabels(rect, scales, metaData, dimensions) {
@@ -7444,11 +7512,11 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
7444
7512
  this.isZoomOutSelected(isZoomOut);
7445
7513
  }
7446
7514
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HorizontalBarsWithScrollZoomComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7447
- 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 }); }
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 }); }
7448
7516
  }
7449
7517
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HorizontalBarsWithScrollZoomComponent, decorators: [{
7450
7518
  type: Component,
7451
- 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"] }]
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"] }]
7452
7520
  }], ctorParameters: () => [], propDecorators: { containerElt: [{
7453
7521
  type: ViewChild,
7454
7522
  args: ['verticalstackedchartcontainer', { static: true }]
@@ -7557,1242 +7625,6 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
7557
7625
  get isAlertEnabled() {
7558
7626
  return this.chartConfiguration?.headerMenuOptions?.some((option) => option.id === 'editAlert');
7559
7627
  }
7560
- // initializegroupChart() {
7561
- // var self = this;
7562
- // let data = [];
7563
- // let metaData: any = null;
7564
- // let keyList = null;
7565
- // let lineData = null;
7566
- // let colorMap = {};
7567
- // var formatFromBackend;
7568
- // var formatForHugeNumbers;
7569
- // const isMobile = window.innerWidth < 576;
7570
- // const isTablet = window.innerWidth >= 576 && window.innerWidth < 992;
7571
- // const isDesktop = window.innerWidth >= 992;
7572
- // let isria = this.customChartConfiguration.isRia
7573
- // var x: any;
7574
- // var alternate_text = false;
7575
- // var short_tick_length = 4;
7576
- // var long_tick_length = 16;
7577
- // /**
7578
- // * longer tick length needed for weekly charts
7579
- // */
7580
- // var short_tick_length_bg = 5;
7581
- // var long_tick_length_bg = 30;
7582
- // var leftAndRightSpaces = 50;
7583
- // var rightSvgWidth = 60;
7584
- // var tempScale;
7585
- // for (var i in this.defaultConfiguration) {
7586
- // this.chartConfiguration[i] = ChartHelper.getValueByConfigurationType(
7587
- // i,
7588
- // this.defaultConfiguration,
7589
- // this.customChartConfiguration
7590
- // );
7591
- // }
7592
- // data = this.chartData.data;
7593
- // metaData = this.chartData.metaData;
7594
- // lineData = this.chartData.lineData;
7595
- // // if (lineData || this.chartData.targetLineData) {
7596
- // // rightSvgWidth = 60;
7597
- // // }
7598
- // if (!metaData.colorAboveTarget) {
7599
- // metaData['colorAboveTarget'] = metaData.colors;
7600
- // }
7601
- // colorMap = metaData.colors;
7602
- // keyList = metaData.keyList;
7603
- // var chartContainer = d3.select(this.containerElt.nativeElement);
7604
- // var verticalstackedcontainer = d3.select(
7605
- // this.groupcontainerElt.nativeElement
7606
- // );
7607
- // var margin = this.chartConfiguration.margin;
7608
- // const { width, height } = this.calculateChartDimensions(
7609
- // chartContainer,
7610
- // verticalstackedcontainer,
7611
- // margin,
7612
- // self
7613
- // );
7614
- // /**
7615
- // * for hiding header
7616
- // * used by weekly charts
7617
- // */
7618
- // if (this.chartConfiguration.isHeaderVisible != undefined)
7619
- // this.isHeaderVisible = this.chartConfiguration.isHeaderVisible;
7620
- // /**
7621
- // * for hiding legends
7622
- // * used by weekly charts
7623
- // */
7624
- // if (this.chartConfiguration.legendVisible != undefined) {
7625
- // this.legendVisible = this.chartConfiguration.legendVisible;
7626
- // }
7627
- // /**
7628
- // * for removing background color so that it can take parents color
7629
- // *
7630
- // */
7631
- // if (this.chartConfiguration.isTransparentBackground != undefined) {
7632
- // this.isTransparentBackground =
7633
- // this.chartConfiguration.isTransparentBackground;
7634
- // }
7635
- // /**
7636
- // * format data values based on configuration received
7637
- // */
7638
- // if (this.chartConfiguration.textFormatter != undefined) {
7639
- // formatFromBackend = ChartHelper.dataValueFormatter(
7640
- // this.chartConfiguration.textFormatter
7641
- // );
7642
- // formatForHugeNumbers = ChartHelper.dataValueFormatter('.2s');
7643
- // }
7644
- // const {
7645
- // outerContainer,
7646
- // svgYAxisLeft,
7647
- // svgYAxisRight,
7648
- // innerContainer,
7649
- // svg
7650
- // } = this.createChartContainers(chartContainer, margin, height, rightSvgWidth, self, width);
7651
- // var subgroups: any = keyList;
7652
- // var groups = d3
7653
- // .map(data, function (d) {
7654
- // return d.name;
7655
- // })
7656
- // .keys();
7657
- // /**
7658
- // * x axis range made similar to line chart or vertical stack so that all the charts will get aligned with each other.
7659
- // */
7660
- // if (this.chartConfiguration.isMultiChartGridLine != undefined) {
7661
- // x = d3
7662
- // .scaleBand()
7663
- // .rangeRound([width, 0])
7664
- // .align(0.5)
7665
- // .padding([0.5])
7666
- // .domain(
7667
- // data.map(function (d: any) {
7668
- // return d.name.toLowerCase();
7669
- // })
7670
- // );
7671
- // } else {
7672
- // x = d3
7673
- // .scaleBand()
7674
- // .domain(groups)
7675
- // .range([leftAndRightSpaces, width - rightSvgWidth - leftAndRightSpaces])
7676
- // .padding([0.3]);
7677
- // }
7678
- // // x.bandwidth(96);
7679
- // var xScaleFromOrigin = d3
7680
- // .scaleBand()
7681
- // .domain(groups)
7682
- // .range([0, width - rightSvgWidth]);
7683
- // // .padding([0.2]);
7684
- // if (this.chartConfiguration.isMultiChartGridLine == undefined) {
7685
- // /**
7686
- // * normal ticks for all dashboard charts
7687
- // */
7688
- // svg
7689
- // .append('g')
7690
- // .attr('class', 'x1 axis1')
7691
- // .attr('transform', 'translate(0,' + height + ')')
7692
- // .call(d3.axisBottom(x))
7693
- // .call((g) => g.select('.domain').remove());
7694
- // svg.selectAll('g.x1.axis1 g.tick line').remove();
7695
- // // Only move x-axis labels further down for grouped charts if there is no xLabel
7696
- // if (subgroups.length > 1 && !metaData.xLabel) {
7697
- // svg
7698
- // .selectAll('g.x1.axis1 g.tick text')
7699
- // .attr('class', 'lib-xaxis-labels-texts-drilldown')
7700
- // .style('fill', 'var(--chart-text-color)')
7701
- // .attr('y', 32); // Increase distance from bars (default is ~9)
7702
- // } else {
7703
- // svg
7704
- // .selectAll('g.x1.axis1 g.tick text')
7705
- // .attr('class', 'lib-xaxis-labels-texts-drilldown')
7706
- // .style('fill', 'var(--chart-text-color)');
7707
- // }
7708
- // }
7709
- // else {
7710
- // /**
7711
- // * bigger ticks for weekly charts and more space from x axis to labels
7712
- // */
7713
- // /**
7714
- // * draw x axis
7715
- // */
7716
- // svg
7717
- // .append('g')
7718
- // .attr('class', 'x1 axis1')
7719
- // .attr('transform', 'translate(0,' + height + ')')
7720
- // .call(d3.axisBottom(x).tickSize(0))
7721
- // .call((g) => g.select('.domain').attr('fill', 'none'));
7722
- // /**
7723
- // * tick line size in alternate fashion
7724
- // */
7725
- // svg.selectAll('g.x1.axis1 g.tick line').attr('y2', function () {
7726
- // if (
7727
- // alternate_text &&
7728
- // self.chartConfiguration.isNoAlternateXaxisText == undefined
7729
- // ) {
7730
- // alternate_text = false;
7731
- // return long_tick_length_bg - 7;
7732
- // } else {
7733
- // alternate_text = true;
7734
- // return short_tick_length_bg - 4;
7735
- // }
7736
- // });
7737
- // /**
7738
- // * reset the flag so that values can be shown in same alternate fashion
7739
- // */
7740
- // alternate_text = false;
7741
- // /**
7742
- // * print x-axis label texts
7743
- // * used by weekly charts
7744
- // */
7745
- // svg
7746
- // .selectAll('g.x1.axis1 g.tick text')
7747
- // .attr('class', 'lib-xaxis-labels-texts-weeklycharts')
7748
- // .attr('y', function () {
7749
- // // Minimize gap in maximized (fullscreen) view for weekly charts
7750
- // if (self.chartConfiguration.isFullScreen) {
7751
- // return short_tick_length_bg;
7752
- // }
7753
- // if (alternate_text) {
7754
- // alternate_text = false;
7755
- // return long_tick_length_bg;
7756
- // } else {
7757
- // alternate_text = true;
7758
- // return short_tick_length_bg;
7759
- // }
7760
- // });
7761
- // }
7762
- // if (self.chartConfiguration.xLabelsOnSameLine) {
7763
- // const xAxisLabels = svg
7764
- // .selectAll('g.x1.axis1 g.tick text')
7765
- // .attr('class', 'lib-xaxis-labels-texts-drilldown')
7766
- // .style('font-size', this.isHeaderVisible ? '18px' : '14px')
7767
- // .attr('text-anchor', 'middle')
7768
- // .attr('y', function(d) {
7769
- // // For grouped bar charts with many bars and xLabel present, only add 5 if the label is a date
7770
- // if (subgroups.length > 1 && data.length > 8 && metaData.xLabel) {
7771
- // const isDateLabel = /\d{2,4}[-\/]/.test(d);
7772
- // if (self.chartConfiguration.isFullScreen) {
7773
- // return isDateLabel ? short_tick_length_bg + 14 : short_tick_length_bg;
7774
- // }
7775
- // return isDateLabel ? short_tick_length_bg + 14 : short_tick_length_bg;
7776
- // }
7777
- // // For grouped bar charts with many bars and NO xLabel, add space as before, but reduce in fullscreen
7778
- // if (subgroups.length > 1 && data.length > 8 && !metaData.xLabel) {
7779
- // const chartHasExtraBottom = (self.chartConfiguration.margin && self.chartConfiguration.margin.bottom >= 40);
7780
- // if (self.chartConfiguration.isFullScreen) {
7781
- // // Reduce extra gap in maximized view
7782
- // return short_tick_length_bg + 2;
7783
- // }
7784
- // return chartHasExtraBottom ? short_tick_length_bg : short_tick_length_bg + 10;
7785
- // }
7786
- // // Default/fallback logic for other cases
7787
- // let baseY = self.isHeaderVisible ? short_tick_length_bg + 25 : short_tick_length_bg;
7788
- // if (
7789
- // subgroups.length > 1 &&
7790
- // !metaData.xLabel &&
7791
- // (/\d{2,4}[-\/]\d{2}[-\/]\d{2,4}/.test(d) || /\d{2,4}[-\/]\d{2,4}/.test(d))
7792
- // ) {
7793
- // baseY = self.isHeaderVisible ? short_tick_length_bg + 15 : short_tick_length_bg + 25;
7794
- // }
7795
- // if (/\d{2,4}[-\/]\d{2,4}/.test(d) && d.indexOf(' ') > -1) {
7796
- // baseY += 4;
7797
- // }
7798
- // // In maximized view, reduce baseY slightly for grouped bars
7799
- // if (self.chartConfiguration.isFullScreen && subgroups.length > 1) {
7800
- // baseY = Math.max(short_tick_length_bg, baseY - 10);
7801
- // }
7802
- // return baseY;
7803
- // })
7804
- // .attr('x', function (d) {
7805
- // if (self.chartData.data.length > 8 && !self.isZoomedOut) {
7806
- // return 1; // Move first line text slightly to the left in zoom-in view for better alignment
7807
- // }
7808
- // return 0; // Default position
7809
- // })
7810
- // .text(function (d) {
7811
- // var isValueToBeIgnored = false;
7812
- // if (isMobile && !self.isHeaderVisible) {
7813
- // let firstPart = d.split(/[\s\-]+/)[0];
7814
- // return firstPart.substring(0, 3).toLowerCase();
7815
- // }
7816
- // (data as any[]).map((indiv: any) => {
7817
- // if (
7818
- // indiv.name &&
7819
- // indiv.name.toLowerCase() == d.trim().toLowerCase() &&
7820
- // indiv[metaData.keyList[0]] == -1
7821
- // ) {
7822
- // isValueToBeIgnored = true;
7823
- // }
7824
- // });
7825
- // if (isValueToBeIgnored) {
7826
- // return '';
7827
- // }
7828
- // // Always add space before and after hyphen for date range labels, even when header is visible and label is single line
7829
- // // Apply for grouped bar charts and single bar charts, header visible, single line
7830
- // const dateRangeRegex = /(\d{2,4}[-\/]\d{2}[-\/]\d{2,4})\s*-\s*(\d{2,4}[-\/]\d{2}[-\/]\d{2,4})/;
7831
- // if (dateRangeRegex.test(d.trim())) {
7832
- // return d.trim().replace(dateRangeRegex, (m, d1, d2) => `${d1} - ${d2}`);
7833
- // }
7834
- // // Split date and week labels into two lines in grouped bar zoom-in view (and minimized view)
7835
- // const isDateLabel = /\d{2,4}[-\/]/.test(d);
7836
- // const isWeekLabel = /week|wk|w\d+/i.test(d);
7837
- // if (
7838
- // subgroups.length > 1 && !self.isZoomedOut && data.length > 8 && d.indexOf(' ') > -1 && (isDateLabel || isWeekLabel)
7839
- // ) {
7840
- // var first = d.substring(0, d.indexOf(' '));
7841
- // var second = d.substring(d.indexOf(' ') + 1).trim();
7842
- // return first + '\n' + second;
7843
- // }
7844
- // // Also keep previous logic for minimized view
7845
- // if (isDateLabel) {
7846
- // if (!self.isHeaderVisible && data.length > 8 && d.indexOf(' ') > -1) {
7847
- // var first = d.substring(0, d.indexOf(' '));
7848
- // var second = d.substring(d.indexOf(' ') + 1).trim();
7849
- // return first + '\n' + second;
7850
- // } else {
7851
- // return d;
7852
- // }
7853
- // }
7854
- // if (d.trim().indexOf(' ') > -1) {
7855
- // return d.trim().substring(0, d.indexOf(' ')).toLowerCase();
7856
- // }
7857
- // return d.toLowerCase();
7858
- // // If label looks like a date (contains digits and - or /)
7859
- // const isDateLabel2 = /\d{2,4}[-\/]/.test(d);
7860
- // // Only split date/week labels if there are many grouped bars and header is not visible
7861
- // if (isDateLabel) {
7862
- // if (!self.isHeaderVisible && data.length > 8 && d.indexOf(' ') > -1) {
7863
- // var first = d.substring(0, d.indexOf(' '));
7864
- // var second = d.substring(d.indexOf(' ') + 1).trim();
7865
- // return first + '\n' + second;
7866
- // } else {
7867
- // return d;
7868
- // }
7869
- // }
7870
- // if (d.trim().indexOf(' ') > -1) {
7871
- // return d.trim().substring(0, d.indexOf(' ')).toLowerCase();
7872
- // }
7873
- // return d.toLowerCase();
7874
- // });
7875
- // // Now apply writing-mode: sideways-lr for grouped charts with date labels in zoomed-out view and many bars
7876
- // xAxisLabels.each(function(this: SVGTextElement, d: any) {
7877
- // // Only apply writing-mode for exact date labels, not those containing 'week' or similar
7878
- // const isDateLabel = /^(\d{2,4}[-\/])?\d{2,4}[-\/]\d{2,4}$/.test(d.trim());
7879
- // const isWeekLabel = /week|wk|w\d+/i.test(d);
7880
- // if (subgroups.length > 1 && self.isZoomedOut && data.length > 8 && isDateLabel && !isWeekLabel) {
7881
- // d3.select(this).style('writing-mode', 'sideways-lr');
7882
- // }
7883
- // });
7884
- // if (!isMobile) {
7885
- // svg
7886
- // .selectAll('g.x1.axis1 g.tick')
7887
- // .filter(function (d) {
7888
- // return !/\d{2,4}[-\/]/.test(d); // Only process non-date labels
7889
- // })
7890
- // .append('text')
7891
- // .attr('class', 'lib-xaxis-labels-texts-drilldown')
7892
- // .attr('y', long_tick_length_bg)
7893
- // .attr('fill', 'var(--chart-text-color)')
7894
- // .attr('x', function (d) {
7895
- // if (self.chartData.data.length > 8 && !self.isZoomedOut) {
7896
- // return 1; // Move text slightly to the left
7897
- // }
7898
- // return 0; // Default position
7899
- // })
7900
- // .text(function (d) {
7901
- // if (d.trim().indexOf(' ') > -1) {
7902
- // return d.trim().substring(d.indexOf(' '), d.length).toLowerCase();
7903
- // }
7904
- // return '';
7905
- // });
7906
- // }
7907
- // }
7908
- // if (isria && self.chartData.data.length > 8) {
7909
- // svg
7910
- // .selectAll('g.x1.axis1 g.tick text')
7911
- // .classed('mobile-xaxis-override', true)
7912
- // .text(function (d: string) {
7913
- // return d.substring(0, 3);
7914
- // })
7915
- // .style('font-size', '12px')
7916
- // .attr('y', 5)
7917
- // .attr('x', 5)
7918
- // .style('text-anchor', 'middle');
7919
- // }
7920
- // if (isMobile && !this.isHeaderVisible) {
7921
- // svg
7922
- // .selectAll('g.x1.axis1 g.tick text')
7923
- // .classed('mobile-xaxis-override', true);
7924
- // }
7925
- // /**y scale for left y axis */
7926
- // var y = d3.scaleLinear().rangeRound([height, 0]);
7927
- // var maxValue = d3.max(data, (d) => d3.max(keyList, (key) => +d[key]));
7928
- // if (maxValue == 0) {
7929
- // if (this.chartData.targetLineData) {
7930
- // maxValue = this.chartData.targetLineData.target + 20;
7931
- // } else {
7932
- // maxValue = 100;
7933
- // }
7934
- // }
7935
- // if (this.chartConfiguration.customYscale) {
7936
- // /**
7937
- // * increase y-scale so that values wont cross or exceed out of range
7938
- // * used in weekly charts
7939
- // */
7940
- // maxValue = maxValue * this.chartConfiguration.customYscale;
7941
- // }
7942
- // if (
7943
- // this.chartData.targetLineData &&
7944
- // maxValue < this.chartData.targetLineData.target
7945
- // ) {
7946
- // maxValue =
7947
- // maxValue < 10 && this.chartData.targetLineData.target < 10
7948
- // ? this.chartData.targetLineData.target + 3
7949
- // : this.chartData.targetLineData.target + 20;
7950
- // }
7951
- // y.domain([0, maxValue]).nice();
7952
- // let lineYscale;
7953
- // if (lineData != null) {
7954
- // let maxLineValue = d3.max(lineData, function (d) {
7955
- // return +d.value;
7956
- // });
7957
- // maxLineValue = maxLineValue * this.chartConfiguration.customYscale;
7958
- // let minLineValue = d3.min(lineData, function (d) {
7959
- // return +d.value;
7960
- // });
7961
- // if (maxLineValue > 0) minLineValue = minLineValue - 3;
7962
- // if (minLineValue > 0) {
7963
- // minLineValue = 0;
7964
- // }
7965
- // lineYscale = d3
7966
- // .scaleLinear()
7967
- // .domain([minLineValue, maxLineValue])
7968
- // .range([height, minLineValue]);
7969
- // }
7970
- // let yLineAxis;
7971
- // if (lineYscale != null) {
7972
- // yLineAxis = d3
7973
- // .axisRight(lineYscale)
7974
- // .ticks(self.chartConfiguration.numberOfYTicks)
7975
- // .tickSize(0)
7976
- // .tickFormat(self.chartConfiguration.yLineAxisLabelFomatter);
7977
- // }
7978
- // /**
7979
- // * show x-axis grid between labels
7980
- // * used by weekly charts
7981
- // */
7982
- // if (self.chartConfiguration.isXgridBetweenLabels) {
7983
- // svg
7984
- // .append('g')
7985
- // .attr('class', 'grid')
7986
- // .attr(
7987
- // 'transform',
7988
- // 'translate(' + x.bandwidth() / 2 + ',' + height + ')'
7989
- // )
7990
- // .call(d3.axisBottom(x).tickSize(-height).tickFormat(''))
7991
- // .style('stroke-dasharray', '5 5')
7992
- // .style('color', 'var(--chart-grid-color, #999999)') // Use CSS variable
7993
- // .call((g) => g.select('.domain').remove());
7994
- // }
7995
- // if (this.chartConfiguration.yAxisGrid) {
7996
- // svg
7997
- // .append('g')
7998
- // .call(
7999
- // d3
8000
- // .axisLeft(y)
8001
- // .ticks(self.chartConfiguration.numberOfYTicks)
8002
- // .tickSize(-width)
8003
- // )
8004
- // .style('color', 'var(--chart-axis-color, #B9B9B9)')
8005
- // .style('opacity', '0.5')
8006
- // .call((g) => {
8007
- // g.select('.domain')
8008
- // .remove()
8009
- // .style('stroke', 'var(--chart-domain-color, #000000)'); // Add CSS variable for domain
8010
- // });
8011
- // } else {
8012
- // svg
8013
- // .append('g')
8014
- // .call(d3.axisLeft(y).ticks(self.chartConfiguration.numberOfYTicks))
8015
- // .style('color', 'var(--chart-axis-color, #B9B9B9)')
8016
- // .style('opacity', '0.5')
8017
- // .call((g) => {
8018
- // g.select('.domain')
8019
- // .style('stroke', 'var(--chart-domain-color, #000000)') // Add CSS variable for domain
8020
- // .style('stroke-width', '1px'); // Ensure visibility
8021
- // });
8022
- // }
8023
- // var xSubgroup = d3.scaleBand().domain(subgroups);
8024
- // if (subgroups.length > 1 && !this.isZoomedOut) {
8025
- // // For grouped bar charts in zoom-in view, use full x.bandwidth() for subgroups
8026
- // xSubgroup.range([0, x.bandwidth()]);
8027
- // } else if (subgroups.length === 1 && !this.isZoomedOut) {
8028
- // // For single-bar (non-grouped) charts in zoom-in view, set bar width to 100 (increased from 80)
8029
- // xSubgroup.range([0, 100]);
8030
- // } else if (this.chartConfiguration.isMultiChartGridLine == undefined) {
8031
- // xSubgroup.range([0, x.bandwidth()]);
8032
- // } else {
8033
- // // used to make grouped bars with lesser width as we are not using padding for width
8034
- // xSubgroup.range([0, x.bandwidth()]);
8035
- // }
8036
- // // if (this.chartConfiguration.isDrilldownChart) {
8037
- // // }
8038
- // var color = d3
8039
- // .scaleOrdinal()
8040
- // .domain(subgroups)
8041
- // .range(Object.values(metaData.colors));
8042
- // // var colorAboveTarget = d3
8043
- // // .scaleOrdinal()
8044
- // // .domain(subgroups)
8045
- // // .range(Object.values(metaData.colorAboveTarget));
8046
- // var state = svg
8047
- // .append('g')
8048
- // .selectAll('.state')
8049
- // .data(data)
8050
- // .enter()
8051
- // .append('g')
8052
- // .attr('transform', function (d) {
8053
- // return 'translate(' + x(d.name) + ',0)';
8054
- // });
8055
- // state
8056
- // .selectAll('rect')
8057
- // .data(function (d) {
8058
- // let newList: any = [];
8059
- // subgroups.map(function (key) {
8060
- // // if (key !== "group") {
8061
- // let obj: any = { key: key, value: d[key], name: d.name };
8062
- // newList.push(obj);
8063
- // // }
8064
- // });
8065
- // return newList;
8066
- // })
8067
- // .enter()
8068
- // .append('rect')
8069
- // .attr('class', 'bars')
8070
- // .on('click', function (d) {
8071
- // if (d.key != 'Target') {
8072
- // if (
8073
- // !metaData.barWithoutClick ||
8074
- // !metaData.barWithoutClick.length ||
8075
- // (!metaData.barWithoutClick.includes(d?.name) &&
8076
- // !metaData.barWithoutClick.includes(d?.key))
8077
- // )
8078
- // // self.handleClick(d.data.name);
8079
- // self.handleClick(d);
8080
- // }
8081
- // })
8082
- // .attr('x', function (d) {
8083
- // if (self.chartConfiguration.isDrilldownChart) {
8084
- // data.map((indiv: any) => {
8085
- // if (indiv.name == d.name) {
8086
- // let keys = Object.keys(indiv).filter((temp, i) => i != 0);
8087
- // tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
8088
- // if (x.bandwidth() > 100) {
8089
- // // Increase bar width a bit in zoom-in view
8090
- // let reducedBarWidth = 60;
8091
- // if (!self.isZoomedOut) {
8092
- // reducedBarWidth = 30;
8093
- // }
8094
- // if (self.chartData.data.length == 1) {
8095
- // if (Object.keys(self.chartData.data[0]).length == 2) {
8096
- // tempScale.range([
8097
- // 0 + (x.bandwidth() - reducedBarWidth) / 2,
8098
- // x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
8099
- // ]);
8100
- // } else
8101
- // tempScale.range([
8102
- // 0 + (x.bandwidth() - reducedBarWidth) / 2,
8103
- // x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
8104
- // ]);
8105
- // } else
8106
- // tempScale.range([
8107
- // 0 + (x.bandwidth() - reducedBarWidth) / 2,
8108
- // x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
8109
- // ]);
8110
- // }
8111
- // }
8112
- // });
8113
- // return tempScale(d.key);
8114
- // }
8115
- // return xSubgroup(d.key);
8116
- // })
8117
- // .attr('y', function (d) {
8118
- // if (d.value == -1) {
8119
- // return y(0);
8120
- // }
8121
- // if (d.value >= 0) {
8122
- // const barHeight = height - y(d.value);
8123
- // const minHeight = self.chartConfiguration.defaultBarHeight || 2;
8124
- // return barHeight < minHeight ? y(0) - minHeight : y(d.value);
8125
- // }
8126
- // return y(0);
8127
- // })
8128
- // .attr('width', function (d) {
8129
- // // For grouped bar charts in zoom-in view, set bar width to 50 for maximum thickness
8130
- // if (subgroups.length > 1 && !self.isZoomedOut) {
8131
- // return 50;
8132
- // }
8133
- // // For single-bar (non-grouped) charts in zoom-in view, set bar width to 80
8134
- // if (subgroups.length === 1 && !self.isZoomedOut) {
8135
- // return 80;
8136
- // }
8137
- // let tempScale = d3.scaleBand().domain([]).range([0, 0]);
8138
- // // Default logic for other chart types
8139
- // if (self.chartConfiguration.isDrilldownChart) {
8140
- // data.map((indiv: any) => {
8141
- // if (indiv.name == d.name) {
8142
- // let keys = Object.keys(indiv).filter((temp, i) => i != 0);
8143
- // tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
8144
- // if (x.bandwidth() > 100) {
8145
- // // Increase bar width a bit in zoom-in view
8146
- // let reducedBarWidth = 60;
8147
- // if (!self.isZoomedOut) {
8148
- // reducedBarWidth = 100;
8149
- // }
8150
- // if (self.chartData.data.length == 1) {
8151
- // if (Object.keys(self.chartData.data[0]).length == 2) {
8152
- // tempScale.range([
8153
- // 0 + (x.bandwidth() - reducedBarWidth) / 2,
8154
- // x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
8155
- // ]);
8156
- // } else
8157
- // tempScale.range([
8158
- // 0 + (x.bandwidth() - reducedBarWidth) / 2,
8159
- // x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
8160
- // ]);
8161
- // } else
8162
- // tempScale.range([
8163
- // 0 + (x.bandwidth() - reducedBarWidth) / 2,
8164
- // x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
8165
- // ]);
8166
- // }
8167
- // }
8168
- // });
8169
- // return self.isZoomedOut
8170
- // ? tempScale.bandwidth()
8171
- // : self.chartData.data.length && self.chartData.data.length > 8
8172
- // ? tempScale.bandwidth()
8173
- // : tempScale.bandwidth();
8174
- // }
8175
- // return self.isZoomedOut
8176
- // ? tempScale.bandwidth()
8177
- // : self.chartData.data.length && self.chartData.data.length > 8
8178
- // ? tempScale.bandwidth()
8179
- // : tempScale.bandwidth();
8180
- // })
8181
- // .attr('height', function (d) {
8182
- // if (d.value == -1) {
8183
- // return height - y(0);
8184
- // }
8185
- // if (d.value >= 0) {
8186
- // const barHeight = height - y(d.value);
8187
- // const minHeight = self.chartConfiguration.defaultBarHeight || 2;
8188
- // return Math.max(barHeight, minHeight);
8189
- // }
8190
- // return height - y(0);
8191
- // })
8192
- // .style('cursor', function (d) {
8193
- // if (metaData.hasDrillDown && !isria) return 'pointer';
8194
- // else return 'default';
8195
- // })
8196
- // .attr('fill', function (d) {
8197
- // if (
8198
- // d.value &&
8199
- // self.chartData.targetLineData &&
8200
- // d.value >= parseFloat(self.chartData.targetLineData.target) &&
8201
- // self.chartData.metaData.colorAboveTarget
8202
- // ) {
8203
- // const key = d.key.toLowerCase();
8204
- // const colorAboveTarget = Object.keys(self.chartData.metaData.colorAboveTarget).find(
8205
- // k => k.toLowerCase() === key
8206
- // );
8207
- // if (colorAboveTarget) {
8208
- // return self.chartData.metaData.colorAboveTarget[colorAboveTarget];
8209
- // }
8210
- // }
8211
- // return self.chartData.metaData.colors[d.key];
8212
- // });
8213
- // /**
8214
- // * display angled texts on the bars
8215
- // */
8216
- // if (this.chartConfiguration.textsOnBar != undefined && !this.isZoomedOut) {
8217
- // state
8218
- // .selectAll('text')
8219
- // .data(function (d) {
8220
- // let newList: any = [];
8221
- // subgroups.map(function (key) {
8222
- // let obj: any = { key: key, value: d[key], name: d.name };
8223
- // newList.push(obj);
8224
- // });
8225
- // return newList;
8226
- // })
8227
- // .enter()
8228
- // .append('text')
8229
- // .attr('fill', 'var(--chart-text-color)')
8230
- // .attr('x', function (d) {
8231
- // return 0;
8232
- // })
8233
- // .attr('y', function (d) {
8234
- // return 0;
8235
- // })
8236
- // .attr('class', 'lib-data-labels-weeklycharts')
8237
- // .text(function (d) {
8238
- // return d.key && d.value
8239
- // ? d.key.length > 20
8240
- // ? d.key.substring(0, 17) + '...'
8241
- // : d.key
8242
- // : '';
8243
- // })
8244
- // .style('fill', function (d) {
8245
- // return '#000';
8246
- // })
8247
- // .style('font-weight', 'bold')
8248
- // .style('font-size', function (d) {
8249
- // if (self.isZoomedOut) {
8250
- // return '9px'; // 👈 Zoomed out mode
8251
- // }
8252
- // if (self.chartConfiguration.isDrilldownChart) {
8253
- // if (window.innerWidth > 1900) {
8254
- // return '18px';
8255
- // } else if (window.innerWidth < 1400) {
8256
- // return '10px';
8257
- // } else {
8258
- // return '14px';
8259
- // }
8260
- // } else {
8261
- // return '14px';
8262
- // }
8263
- // })
8264
- // .attr('transform', function (d) {
8265
- // data.map((indiv: any) => {
8266
- // if (indiv.name == d.name) {
8267
- // let keys = Object.keys(indiv).filter((temp, i) => i != 0);
8268
- // var temp;
8269
- // tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
8270
- // if (x.bandwidth() > 100) {
8271
- // if (self.chartData.data.length == 1) {
8272
- // if (Object.keys(self.chartData.data[0]).length == 2) {
8273
- // tempScale.range([
8274
- // 0 + (x.bandwidth() - 200) / 2,
8275
- // x.bandwidth() - (x.bandwidth() - 200) / 2,
8276
- // ]);
8277
- // // .padding(0.05);
8278
- // } else
8279
- // tempScale.range([
8280
- // 0 + (x.bandwidth() - 300) / 2,
8281
- // x.bandwidth() - (x.bandwidth() - 300) / 2,
8282
- // ]);
8283
- // // .padding(0.05);
8284
- // } else
8285
- // tempScale.range([
8286
- // 0 + (x.bandwidth() - 125) / 2,
8287
- // x.bandwidth() - (x.bandwidth() - 125) / 2,
8288
- // ]);
8289
- // }
8290
- // }
8291
- // });
8292
- // /**
8293
- // * if set, then all texts ll be horizontal
8294
- // */
8295
- // if (self.chartConfiguration.textAlwaysHorizontal) {
8296
- // return (
8297
- // 'translate(' + xSubgroup(d.key) + ',' + (y(d.value) - 3) + ')'
8298
- // );
8299
- // }
8300
- // /**
8301
- // * rotate texts having more than one digits
8302
- // */
8303
- // // if (d.value > 9)
8304
- // if (!isNaN(tempScale(d.key)))
8305
- // return (
8306
- // 'translate(' +
8307
- // (tempScale(d.key) + tempScale.bandwidth() * 0.55) +
8308
- // ',' +
8309
- // (y(0) - 10) +
8310
- // ') rotate(270)'
8311
- // );
8312
- // return 'translate(0,0)';
8313
- // // else
8314
- // // return (
8315
- // // 'translate(' +
8316
- // // (tempScale(d.key) + tempScale.bandwidth() / 2) +
8317
- // // ',' +
8318
- // // y(0) +
8319
- // // ')'
8320
- // // );
8321
- // })
8322
- // .on('click', function (d) {
8323
- // if (
8324
- // !metaData.barWithoutClick ||
8325
- // !metaData.barWithoutClick.length ||
8326
- // (!metaData.barWithoutClick.includes(d?.name) &&
8327
- // !metaData.barWithoutClick.includes(d?.key))
8328
- // )
8329
- // self.handleClick(d);
8330
- // });
8331
- // if (!isria) {
8332
- // state
8333
- // .selectAll('.lib-data-labels-weeklycharts')
8334
- // .on('mouseout', handleMouseOut)
8335
- // .on('mouseover', handleMouseOver);
8336
- // }
8337
- // }
8338
- // if (this.chartConfiguration.displayTitleOnTop || (
8339
- // this.chartConfiguration.textsOnBar == undefined &&
8340
- // this.chartConfiguration.displayTitleOnTop == undefined
8341
- // )) {
8342
- // if (!isria) {
8343
- // state
8344
- // .selectAll('rect')
8345
- // .on('mouseout', handleMouseOut)
8346
- // .on('mouseover', handleMouseOver);
8347
- // }
8348
- // }
8349
- // function handleMouseOver(d, i) {
8350
- // svg.selectAll('.lib-verticalstack-title-ontop').remove();
8351
- // svg
8352
- // .append('foreignObject')
8353
- // .attr('x', function () {
8354
- // // ...existing code for tempScale calculation...
8355
- // var elementsCounter;
8356
- // data.map((indiv: any) => {
8357
- // if (indiv.name == d.name) {
8358
- // let keys = Object.keys(indiv).filter((temp, i) => i != 0);
8359
- // elementsCounter = keys.length;
8360
- // tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
8361
- // if (x.bandwidth() > 100) {
8362
- // if (self.chartData.data.length == 1) {
8363
- // if (Object.keys(self.chartData.data[0]).length == 2) {
8364
- // tempScale.range([
8365
- // 0 + (x.bandwidth() - 200) / 2,
8366
- // x.bandwidth() - (x.bandwidth() - 200) / 2,
8367
- // ]);
8368
- // } else
8369
- // tempScale.range([
8370
- // 0 + (x.bandwidth() - 300) / 2,
8371
- // x.bandwidth() - (x.bandwidth() - 300) / 2,
8372
- // ]);
8373
- // } else
8374
- // tempScale.range([
8375
- // 0 + (x.bandwidth() - 125) / 2,
8376
- // x.bandwidth() - (x.bandwidth() - 125) / 2,
8377
- // ]);
8378
- // }
8379
- // }
8380
- // });
8381
- // if (metaData.hasDrillDown) {
8382
- // if (tempScale.bandwidth() + leftAndRightSpaces * 2 > 180) {
8383
- // return (
8384
- // x(d.name) + tempScale(d.key) + tempScale.bandwidth() / 2 - 90
8385
- // );
8386
- // }
8387
- // return (
8388
- // x(d.name) +
8389
- // tempScale(d.key) -
8390
- // (tempScale.bandwidth() + leftAndRightSpaces * 2) / 2 +
8391
- // tempScale.bandwidth() / 2
8392
- // );
8393
- // } else return x(d.name) + tempScale(d.key) - (tempScale.bandwidth() + leftAndRightSpaces * 2) / 2 + tempScale.bandwidth() / 2;
8394
- // })
8395
- // .attr('class', 'lib-verticalstack-title-ontop')
8396
- // .attr('y', function () {
8397
- // return y(d.value) - 3 - 40 - 10;
8398
- // })
8399
- // .attr('dy', function () {
8400
- // return d.class;
8401
- // })
8402
- // .attr('width', function () {
8403
- // data.map((indiv: any) => {
8404
- // if (indiv.name == d.name) {
8405
- // let keys = Object.keys(indiv).filter((temp, i) => i != 0);
8406
- // tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
8407
- // if (x.bandwidth() > 100) {
8408
- // if (self.chartData.data.length == 1) {
8409
- // if (Object.keys(self.chartData.data[0]).length == 2) {
8410
- // tempScale.range([
8411
- // 0 + (x.bandwidth() - 200) / 2,
8412
- // x.bandwidth() - (x.bandwidth() - 200) / 2,
8413
- // ]);
8414
- // } else
8415
- // tempScale.range([
8416
- // 0 + (x.bandwidth() - 300) / 2,
8417
- // x.bandwidth() - (x.bandwidth() - 300) / 2,
8418
- // ]);
8419
- // } else
8420
- // tempScale.range([
8421
- // 0 + (x.bandwidth() - 125) / 2,
8422
- // x.bandwidth() - (x.bandwidth() - 125) / 2,
8423
- // ]);
8424
- // }
8425
- // }
8426
- // });
8427
- // if (metaData.hasDrillDown) {
8428
- // if (tempScale.bandwidth() + leftAndRightSpaces * 2 > 180) {
8429
- // return '180px';
8430
- // }
8431
- // return tempScale.bandwidth() + leftAndRightSpaces * 2;
8432
- // } else return tempScale.bandwidth() + leftAndRightSpaces * 2;
8433
- // })
8434
- // .attr('height', 50)
8435
- // .append('xhtml:div')
8436
- // .attr('class', 'title')
8437
- // .style('z-index', 99)
8438
- // .html(function () {
8439
- // let barLabel = d.key;
8440
- // let dataType = metaData.dataType ? metaData.dataType : '';
8441
- // let value = d.value;
8442
- // let desiredText =
8443
- // '<span class="title-bar-name">' + barLabel + '</span>';
8444
- // desiredText +=
8445
- // '<span class="title-bar-value"><span>' +
8446
- // value +
8447
- // '</span>' +
8448
- // dataType +
8449
- // '</span>';
8450
- // return desiredText;
8451
- // });
8452
- // }
8453
- // function handleMouseOut(d, i) {
8454
- // svg.selectAll('.lib-verticalstack-title-ontop').remove();
8455
- // }
8456
- // svg
8457
- // .append('g')
8458
- // .attr('class', 'x2 axis2')
8459
- // .attr('transform', 'translate(0,' + height + ')')
8460
- // .style('color', 'var(--chart-axis-color, #000)') // Use CSS variable instead of hardcoded #000
8461
- // .call(d3.axisBottom(xScaleFromOrigin).tickSize(0))
8462
- // .call((g) => g.select('.domain').attr('fill', 'none'));
8463
- // svg.selectAll('g.x2.axis2 g.tick text').style('display', 'none');
8464
- // svg
8465
- // .append('g')
8466
- // .attr('class', 'lib-stacked-y-axis-text yaxis-dashed')
8467
- // .attr('style', self.chartConfiguration.yAxisCustomTextStyles)
8468
- // .attr('transform', 'translate(0,0)')
8469
- // .call(y)
8470
- // .style('display', 'none');
8471
- // svgYAxisLeft
8472
- // .append('g')
8473
- // .append('g')
8474
- // .attr('class', 'lib-yaxis-labels-texts-drilldown yaxis-dashed')
8475
- // .attr('style', self.chartConfiguration.yAxisCustomTextStyles)
8476
- // .attr('transform', 'translate(0,0)')
8477
- // .call(
8478
- // d3
8479
- // .axisLeft(y)
8480
- // .tickSize(0)
8481
- // .ticks(self.chartConfiguration.numberOfYTicks)
8482
- // .tickFormat(function (d) {
8483
- // const formatted = self.chartConfiguration.yAxisLabelFomatter
8484
- // ? self.chartConfiguration.yAxisLabelFomatter(d)
8485
- // : d;
8486
- // return formatted >= 1000 ? formatted / 1000 + 'k' : formatted;
8487
- // })
8488
- // )
8489
- // .call((g) => {
8490
- // // Style the domain line for theme support
8491
- // g.select('.domain')
8492
- // .style('stroke', 'var(--chart-domain-color, #000000)')
8493
- // .style('stroke-width', '1px');
8494
- // })
8495
- // .selectAll('text')
8496
- // .style('fill', 'var(--chart-text-color)');
8497
- // svgYAxisRight
8498
- // .append('g')
8499
- // .attr('class', 'lib-yaxis-labels-texts-drilldown yaxis-dashed')
8500
- // .attr('style', self.chartConfiguration.yAxisCustomTextStyles)
8501
- // .attr('transform', 'translate(0,0)')
8502
- // .call(y)
8503
- // .style('display', 'none');
8504
- // /**
8505
- // * hide x axis labels
8506
- // * config is there for future use
8507
- // * used by weekly charts
8508
- // */
8509
- // if (
8510
- // this.chartConfiguration.isXaxisLabelHidden != undefined &&
8511
- // this.chartConfiguration.isXaxisLabelHidden
8512
- // ) {
8513
- // d3.selectAll('g.lib-line-x-axis-text > g > text').attr(
8514
- // 'class',
8515
- // 'lib-display-hidden'
8516
- // );
8517
- // }
8518
- // /**
8519
- // * hide y axis labels
8520
- // * used by weekly charts
8521
- // */
8522
- // if (
8523
- // this.chartConfiguration.isYaxisLabelHidden != undefined &&
8524
- // this.chartConfiguration.isYaxisLabelHidden
8525
- // ) {
8526
- // d3.selectAll('.yaxis-dashed > g > text').attr(
8527
- // 'class',
8528
- // 'lib-display-hidden'
8529
- // );
8530
- // }
8531
- // /**
8532
- // * hide y axis labels
8533
- // * config is there for future use
8534
- // */
8535
- // if (
8536
- // this.chartConfiguration.isYaxisHidden != undefined &&
8537
- // this.chartConfiguration.isYaxisHidden
8538
- // ) {
8539
- // d3.selectAll('.yaxis-dashed').attr('class', 'lib-display-hidden');
8540
- // }
8541
- // /**
8542
- // * dashed y axis
8543
- // * used by weekly charts
8544
- // */
8545
- // if (
8546
- // this.chartConfiguration.isYaxisDashed != undefined &&
8547
- // this.chartConfiguration.isYaxisDashed
8548
- // ) {
8549
- // d3.selectAll('.yaxis-dashed')
8550
- // .style('stroke-dasharray', '5 5')
8551
- // .style('color', 'var(--chart-axis-color, #999999)'); // Use CSS variable
8552
- // }
8553
- // if (lineData != null) {
8554
- // if (lineData && self.chartConfiguration.showLineChartAxis) {
8555
- // svgYAxisRight
8556
- // .append('g')
8557
- // .attr('class', 'lib-stacked-y-axis-text1')
8558
- // .attr('style', self.chartConfiguration.yAxisCustomTextStyles)
8559
- // .attr('transform', 'translate(' + 0 + ',0)')
8560
- // .call(yLineAxis);
8561
- // }
8562
- // }
8563
- // /**
8564
- // * used to display y label
8565
- // */
8566
- // // if (this.isZoomedOut) {
8567
- // // svg
8568
- // // .selectAll('.lib-xaxis-labels-texts-drilldown')
8569
- // // .attr('class', 'lib-display-hidden');
8570
- // // }
8571
- // if (this.isZoomedOut) {
8572
- // svg
8573
- // .selectAll('.lib-xaxis-labels-texts-drilldown')
8574
- // .each((d, i, nodes) => {
8575
- // const text = d3.select(nodes[i]);
8576
- // const label = text.text();
8577
- // if (label.indexOf('\n') > -1) {
8578
- // const lines = label.split('\n');
8579
- // text.text(null);
8580
- // lines.forEach((line, idx) => {
8581
- // text.append('tspan')
8582
- // .text(line)
8583
- // .attr('x', 0)
8584
- // .attr('dy', idx === 0 ? '1em' : '1.1em');
8585
- // });
8586
- // } else {
8587
- // const words = label.split(' ');
8588
- // text.text(null);
8589
- // words.forEach((word, index) => {
8590
- // text.append('tspan').text(word);
8591
- // });
8592
- // }
8593
- // })
8594
- // .style('fill', 'var(--chart-text-color)')
8595
- // .attr('transform', null);
8596
- // svg
8597
- // .select('.x-axis')
8598
- // .attr('transform', `translate(0, ${height - margin.bottom + 10})`);
8599
- // }
8600
- // /**
8601
- // * used to write y labels based on configuration
8602
- // */
8603
- // if (metaData.yLabel) {
8604
- // const yPosition = isria ? 0 - margin.left / 2 - 30 : 0 - margin.left / 2 - 40;
8605
- // svgYAxisLeft
8606
- // .append('text')
8607
- // .attr('class', 'lib-axis-group-label font-size-1')
8608
- // .attr('style', self.chartConfiguration.yAxisCustomlabelStyles)
8609
- // .attr('transform', 'rotate(-90)')
8610
- // .attr('y', yPosition)
8611
- // .attr('x', 0 - height / 2)
8612
- // .attr('dy', '1em')
8613
- // .style('text-anchor', 'middle')
8614
- // .attr('fill', 'var(--chart-text-color)');
8615
- // if (this.chartConfiguration.isMultiChartGridLine === undefined) {
8616
- // svgYAxisLeft
8617
- // .selectAll('.lib-axis-group-label')
8618
- // .style('font-size', 'smaller')
8619
- // .text(metaData.yLabel);
8620
- // } else {
8621
- // svg
8622
- // .selectAll('.lib-axis-group-label')
8623
- // .attr('class', 'lib-ylabel-weeklyCharts')
8624
- // .text(metaData.yLabel.toLowerCase());
8625
- // }
8626
- // }
8627
- // if (this.chartData.targetLineData) {
8628
- // const yZero = y(this.chartData.targetLineData.target);
8629
- // svg
8630
- // .append('line')
8631
- // .attr('x1', 0)
8632
- // .attr('x2', width)
8633
- // .attr('y1', yZero)
8634
- // .attr('y2', yZero)
8635
- // .style('stroke-dasharray', '5 5')
8636
- // .style('stroke', this.chartData.targetLineData.color);
8637
- // // svgYAxisRight
8638
- // // .append('line')
8639
- // // .attr('x1', 0)
8640
- // // .attr('x2', rightSvgWidth)
8641
- // // .attr('y1', yZero)
8642
- // // .attr('y2', yZero)
8643
- // // .style('stroke', this.chartData.targetLineData.color);
8644
- // svgYAxisRight
8645
- // .append('foreignObject')
8646
- // .attr('transform', 'translate(' + 0 + ',' + (yZero - 30) + ')')
8647
- // .attr('width', rightSvgWidth)
8648
- // .attr('height', 50)
8649
- // .append('xhtml:div')
8650
- // .attr('class', 'target-display')
8651
- // .style('color', 'var(--chart-text-color)')
8652
- // .html(function () {
8653
- // let dataTypeTemp = '';
8654
- // let targetLineName = 'target';
8655
- // if (metaData.dataType) {
8656
- // dataTypeTemp = metaData.dataType;
8657
- // }
8658
- // if (
8659
- // self.chartData.targetLineData &&
8660
- // self.chartData.targetLineData.targetName
8661
- // ) {
8662
- // targetLineName = self.chartData.targetLineData.targetName;
8663
- // }
8664
- // return (
8665
- // `<div>${targetLineName}</div>` +
8666
- // '<div>' +
8667
- // self.chartData.targetLineData.target +
8668
- // '' +
8669
- // dataTypeTemp +
8670
- // '</div>'
8671
- // );
8672
- // });
8673
- // }
8674
- // if (this.chartConfiguration.isDrilldownChart) {
8675
- // /**
8676
- // * used by drilldown charts
8677
- // */
8678
- // // svg
8679
- // // .selectAll('.lib-axis-group-label')
8680
- // // .attr('class', 'lib-ylabel-drilldowncharts')
8681
- // // .text(metaData.yLabel.toLowerCase());
8682
- // svg.selectAll('g.x1.axis1 g.tick line').style('display', 'none');
8683
- // }
8684
- // if (metaData.xLabel) {
8685
- // function isAcronym(label) {
8686
- // return (
8687
- // (label.length <= 4 && /^[A-Z]+$/.test(label)) ||
8688
- // (label === label.toUpperCase() && /[A-Z]/.test(label))
8689
- // );
8690
- // }
8691
- // const xLabelText = metaData.xLabel;
8692
- // const isAcr = isAcronym(xLabelText.replace(/[^A-Za-z]/g, ''));
8693
- // const xPosition = isria ? (height + margin.top + margin.bottom) : (height + margin.top + margin.bottom + 40);
8694
- // svg
8695
- // .append('text')
8696
- // .attr('class', function () {
8697
- // let baseClass = 'lib-axis-group-label font-size-1';
8698
- // if (self.chartConfiguration.isDrilldownChart)
8699
- // return baseClass + ' lib-xlabel-drilldowncharts';
8700
- // if (self.chartConfiguration.isMultiChartGridLine != undefined)
8701
- // return baseClass + ' lib-xlabel-weeklyCharts';
8702
- // return baseClass + ' lib-axis-waterfall-label';
8703
- // })
8704
- // .attr('style', self.chartConfiguration.xAxisCustomlabelStyles)
8705
- // .attr(
8706
- // 'transform',
8707
- // 'translate(' + width / 2 + ' ,' + xPosition + ')'
8708
- // )
8709
- // .style('text-anchor', 'middle')
8710
- // .style('fill', 'var(--chart-text-color)')
8711
- // .text(isAcr ? xLabelText.toUpperCase() : xLabelText.toLowerCase())
8712
- // .style('text-transform', isAcr ? 'none' : 'capitalize');
8713
- // }
8714
- // if (metaData.lineyLabel) {
8715
- // svgYAxisRight
8716
- // .append('text')
8717
- // .attr('class', 'lib-axis-group-label lib-line-axis')
8718
- // .attr('fill', 'var(--chart-text-color)')
8719
- // .attr('style', self.chartConfiguration.yAxisCustomlabelStyles)
8720
- // .attr('transform', 'translate(0,0) rotate(90)')
8721
- // .attr('y', 0 - 100)
8722
- // .attr('x', 0 + 100)
8723
- // .attr('dy', '5em')
8724
- // .style('text-anchor', 'middle')
8725
- // .style('font-size', 'smaller')
8726
- // .text(metaData.lineyLabel);
8727
- // }
8728
- // if (lineData) {
8729
- // svg
8730
- // .append('path')
8731
- // .datum(lineData)
8732
- // .attr('fill', 'none')
8733
- // .attr('stroke', self.chartConfiguration.lineGraphColor)
8734
- // .attr('stroke-width', 1.5)
8735
- // .attr(
8736
- // 'd',
8737
- // d3
8738
- // .line()
8739
- // .x(function (d) {
8740
- // return x(d.name) + x.bandwidth() / 2;
8741
- // })
8742
- // .y(function (d) {
8743
- // return lineYscale(d.value);
8744
- // })
8745
- // );
8746
- // var dot = svg
8747
- // .selectAll('myCircles')
8748
- // .data(lineData)
8749
- // .enter()
8750
- // .append('g')
8751
- // .on('click', function (d) {
8752
- // if (
8753
- // !metaData.barWithoutClick ||
8754
- // !metaData.barWithoutClick.length ||
8755
- // (!metaData.barWithoutClick.includes(d?.name) &&
8756
- // !metaData.barWithoutClick.includes(d?.key))
8757
- // )
8758
- // self.handleClick(d);
8759
- // });
8760
- // dot
8761
- // .append('circle')
8762
- // .attr('fill', function (d) {
8763
- // return self.chartConfiguration.lineGraphColor;
8764
- // })
8765
- // .attr('stroke', 'none')
8766
- // .attr('cx', function (d) {
8767
- // return x(d.name) + x.bandwidth() / 2;
8768
- // })
8769
- // .attr('cy', function (d) {
8770
- // return lineYscale(d.value);
8771
- // })
8772
- // .style('cursor', () =>
8773
- // self.chartData.metaData.hasDrillDown ? 'pointer' : 'default'
8774
- // )
8775
- // .attr('r', 3);
8776
- // if (self.chartConfiguration.lineGraphColor) {
8777
- // dot
8778
- // .append('text')
8779
- // .attr('class', 'dot')
8780
- // .attr('fill', 'var(--chart-text-color)')
8781
- // .attr('color', self.chartConfiguration.lineGraphColor)
8782
- // .attr('style', 'font-size: ' + '.85em')
8783
- // .attr('x', function (d, i) {
8784
- // return x(d.name) + x.bandwidth() / 2;
8785
- // })
8786
- // .attr('y', function (d) {
8787
- // return lineYscale(d.value);
8788
- // })
8789
- // .attr('dy', '-1em')
8790
- // .text(function (d) {
8791
- // return self.chartConfiguration.labelFormatter(d.value);
8792
- // });
8793
- // }
8794
- // }
8795
- // }
8796
7628
  initializegroupChart() {
8797
7629
  // ==================== VARIABLE DECLARATIONS ====================
8798
7630
  const self = this;
@@ -8903,7 +7735,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8903
7735
  .domain(groups)
8904
7736
  .range([0, width - RIGHT_SVG_WIDTH]);
8905
7737
  // ==================== X-AXIS RENDERING ====================
8906
- this.renderXAxis(svg, x, height, metaData, subgroups, data, SHORT_TICK_LENGTH_BG, LONG_TICK_LENGTH_BG, self, isria, isMobile);
7738
+ this.renderXAxis(svg, x, height, metaData, subgroups, data, SHORT_TICK_LENGTH_BG, LONG_TICK_LENGTH_BG, self, isria, isMobile, isTablet);
8907
7739
  // ==================== Y-AXIS SETUP ====================
8908
7740
  const y = d3.scaleLinear().rangeRound([height, 0]);
8909
7741
  let maxValue = this.calculateMaxValue(data, keyList);
@@ -8954,13 +7786,18 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
8954
7786
  }
8955
7787
  }
8956
7788
  // ==================== HELPER METHODS ====================
8957
- renderXAxis(svg, x, height, metaData, subgroups, data, shortTickLengthBg, longTickLengthBg, self, isria, isMobile) {
7789
+ renderXAxis(svg, x, height, metaData, subgroups, data, shortTickLengthBg, longTickLengthBg, self, isria, isMobile, isTablet) {
8958
7790
  let alternate_text = false;
8959
7791
  if (this.chartConfiguration.isMultiChartGridLine === undefined) {
8960
7792
  // 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
+ }
8961
7798
  svg.append('g')
8962
7799
  .attr('class', 'x1 axis1')
8963
- .attr('transform', `translate(0,${height})`)
7800
+ .attr('transform', `translate(0,${translateY})`)
8964
7801
  .call(d3.axisBottom(x))
8965
7802
  .call((g) => g.select('.domain').remove());
8966
7803
  svg.selectAll('g.x1.axis1 g.tick line').remove();
@@ -9020,8 +7857,8 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9020
7857
  .attr('x', 5)
9021
7858
  .style('text-anchor', 'middle');
9022
7859
  }
9023
- // Mobile override - check for single-group date charts first
9024
- if (isMobile) {
7860
+ // Mobile/tablet override - check for single-group date charts first
7861
+ if (isMobile || isTablet) {
9025
7862
  const textNodes = svg.selectAll('g.x1.axis1 g.tick text');
9026
7863
  const groupsCount = data.length || 0;
9027
7864
  // Check if we have dates in x-axis and single group
@@ -9049,10 +7886,10 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9049
7886
  // Default mobile behavior for non-date or multi-group
9050
7887
  textNodes.classed('mobile-xaxis-override', true);
9051
7888
  }
9052
- // If there are many groups on mobile, rotate labels to sideways to
9053
- // avoid overlapping and make them readable. Use a lower threshold
9054
- // (3) so even small mobile screens get rotated labels when needed.
9055
- if (groupsCount > 3) {
7889
+ // If there are many groups on mobile/tablet AND this is a grouped chart,
7890
+ // rotate labels to sideways to avoid overlapping and make them readable.
7891
+ // Do NOT rotate for single-bar charts on tablet/mobile.
7892
+ if (groupsCount > 3 && subgroups && subgroups.length > 1) {
9056
7893
  svg.selectAll('g.x1.axis1 g.tick text')
9057
7894
  .style('writing-mode', 'sideways-lr')
9058
7895
  .style('text-anchor', 'middle')
@@ -9122,13 +7959,22 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9122
7959
  return baseY;
9123
7960
  }
9124
7961
  formatXLabelText(d, data, metaData, subgroups, self, isMobile) {
7962
+ // Check if we're on mobile or tablet
7963
+ const isSmallScreen = window.innerWidth < 992; // Less than 992px (mobile or tablet)
7964
+ // Check if label contains both date and week information
7965
+ const hasDateAndTime = (text) => {
7966
+ const dateMatch = /\d{2,4}[-\/]\d{1,2}[-\/]\d{1,4}/.test(text) || !isNaN(Date.parse(text));
7967
+ const weekMatch = /week|wk|w\d+/i.test(text);
7968
+ return { isDate: dateMatch, isWeek: weekMatch };
7969
+ };
7970
+ const labelInfo = hasDateAndTime(d);
7971
+ // Apply date-week trimming only for mobile and tablet screens
7972
+ if (isSmallScreen && labelInfo.isDate && labelInfo.isWeek) {
7973
+ const datePart = d.match(/\d{2,4}[-\/]\d{1,2}[-\/]\d{1,4}/);
7974
+ return datePart ? datePart[0] : d;
7975
+ }
9125
7976
  // Mobile handling: keep date labels intact for single-series charts (do not trim)
9126
7977
  if (isMobile) {
9127
- const isDateLabel = /\d{2,4}[-\/]\d{1,2}[-\/]\d{1,4}/.test(d) || !isNaN(Date.parse(d));
9128
- if (isDateLabel && subgroups && subgroups.length < 3) {
9129
- // For single-series charts on mobile, show full date labels (no trimming)
9130
- return d;
9131
- }
9132
7978
  // If header is hidden (compact mobile), trim non-date labels as before
9133
7979
  if (!self.isHeaderVisible) {
9134
7980
  const firstPart = d.split(/[\s\-]+/)[0];
@@ -9146,17 +7992,15 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9146
7992
  if (dateRangeRegex.test(d.trim())) {
9147
7993
  return d.trim().replace(dateRangeRegex, (m, d1, d2) => `${d1} - ${d2}`);
9148
7994
  }
9149
- // Split date and week labels into two lines
9150
- const isDateLabel = /\d{2,4}[-\/]/.test(d);
9151
- const isWeekLabel = /week|wk|w\d+/i.test(d);
7995
+ // Handle splitting of multi-part labels
9152
7996
  if (subgroups.length > 1 && !self.isZoomedOut && data.length > 8 &&
9153
- d.indexOf(' ') > -1 && (isDateLabel || isWeekLabel)) {
7997
+ d.indexOf(' ') > -1 && (labelInfo.isDate || labelInfo.isWeek)) {
9154
7998
  const first = d.substring(0, d.indexOf(' '));
9155
7999
  const second = d.substring(d.indexOf(' ') + 1).trim();
9156
8000
  return `${first}\n${second}`;
9157
8001
  }
9158
8002
  // Handle date labels in minimized view
9159
- if (isDateLabel) {
8003
+ if (labelInfo.isDate) {
9160
8004
  if (!self.isHeaderVisible && data.length > 8 && d.indexOf(' ') > -1) {
9161
8005
  const first = d.substring(0, d.indexOf(' '));
9162
8006
  const second = d.substring(d.indexOf(' ') + 1).trim();
@@ -9755,7 +8599,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9755
8599
  // Minimum width per bar group based on device and number of subgroups
9756
8600
  const minWidthPerGroup = (() => {
9757
8601
  if (subgroupsCount > 2) {
9758
- return isMobile ? 80 : isTablet ? 100 : 120; // Wider for multiple subgroups
8602
+ return isMobile ? 100 : isTablet ? 100 : 120; // Wider for multiple subgroups
9759
8603
  }
9760
8604
  return isMobile ? 40 : isTablet ? 60 : 80; // Normal width for 1-2 subgroups
9761
8605
  })();