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