axidio-styleguide-library1-v2 0.2.23 → 0.2.25
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/group-chart/group-chart.component.mjs +2 -189
- package/esm2022/lib/horizontal-bars-with-scroll-zoom/horizontal-bars-with-scroll-zoom.component.mjs +779 -1037
- package/fesm2022/axidio-styleguide-library1-v2.mjs +784 -1229
- 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 +133 -8
- package/package.json +1 -1
|
@@ -3481,9 +3481,6 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3481
3481
|
var alternate_text = false;
|
|
3482
3482
|
var short_tick_length = 4;
|
|
3483
3483
|
var long_tick_length = 16;
|
|
3484
|
-
/**
|
|
3485
|
-
* longer tick length needed for weekly charts
|
|
3486
|
-
*/
|
|
3487
3484
|
var short_tick_length_bg = 5;
|
|
3488
3485
|
var long_tick_length_bg = 30;
|
|
3489
3486
|
var leftAndRightSpaces = 50;
|
|
@@ -3495,9 +3492,6 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3495
3492
|
data = this.chartData.data;
|
|
3496
3493
|
metaData = this.chartData.metaData;
|
|
3497
3494
|
lineData = this.chartData.lineData;
|
|
3498
|
-
// if (lineData || this.chartData.targetLineData) {
|
|
3499
|
-
// rightSvgWidth = 60;
|
|
3500
|
-
// }
|
|
3501
3495
|
if (!metaData.colorAboveTarget) {
|
|
3502
3496
|
metaData['colorAboveTarget'] = metaData.colors;
|
|
3503
3497
|
}
|
|
@@ -3534,16 +3528,10 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3534
3528
|
else
|
|
3535
3529
|
width = this.chartData.data.length * 160;
|
|
3536
3530
|
}
|
|
3537
|
-
// if (this.chartData.data.length > 8) {
|
|
3538
|
-
// width = this.chartData.data.length * 140;
|
|
3539
|
-
// }
|
|
3540
3531
|
var height = parseInt(verticalstackedcontainer.style('height')) *
|
|
3541
3532
|
(self.chartConfiguration.svgHeight / 100) -
|
|
3542
3533
|
margin.top -
|
|
3543
3534
|
margin.bottom;
|
|
3544
|
-
/**
|
|
3545
|
-
* entire height used in weekly charts as x axis needed to be displayed at the bottom of the chart
|
|
3546
|
-
*/
|
|
3547
3535
|
if (this.chartConfiguration.isFullScreen != undefined &&
|
|
3548
3536
|
this.chartConfiguration.isFullScreen) {
|
|
3549
3537
|
height =
|
|
@@ -3565,30 +3553,15 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3565
3553
|
margin.bottom -
|
|
3566
3554
|
100;
|
|
3567
3555
|
}
|
|
3568
|
-
/**
|
|
3569
|
-
* for hiding header
|
|
3570
|
-
* used by weekly charts
|
|
3571
|
-
*/
|
|
3572
3556
|
if (this.chartConfiguration.isHeaderVisible != undefined)
|
|
3573
3557
|
this.isHeaderVisible = this.chartConfiguration.isHeaderVisible;
|
|
3574
|
-
/**
|
|
3575
|
-
* for hiding legends
|
|
3576
|
-
* used by weekly charts
|
|
3577
|
-
*/
|
|
3578
3558
|
if (this.chartConfiguration.legendVisible != undefined) {
|
|
3579
3559
|
this.legendVisible = this.chartConfiguration.legendVisible;
|
|
3580
3560
|
}
|
|
3581
|
-
/**
|
|
3582
|
-
* for removing background color so that it can take parents color
|
|
3583
|
-
*
|
|
3584
|
-
*/
|
|
3585
3561
|
if (this.chartConfiguration.isTransparentBackground != undefined) {
|
|
3586
3562
|
this.isTransparentBackground =
|
|
3587
3563
|
this.chartConfiguration.isTransparentBackground;
|
|
3588
3564
|
}
|
|
3589
|
-
/**
|
|
3590
|
-
* format data values based on configuration received
|
|
3591
|
-
*/
|
|
3592
3565
|
if (this.chartConfiguration.textFormatter != undefined) {
|
|
3593
3566
|
formatFromBackend = ChartHelper.dataValueFormatter(this.chartConfiguration.textFormatter);
|
|
3594
3567
|
formatForHugeNumbers = ChartHelper.dataValueFormatter('.2s');
|
|
@@ -3601,7 +3574,6 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3601
3574
|
.style('height', height)
|
|
3602
3575
|
.style('overflow-x', 'hidden')
|
|
3603
3576
|
.style('padding-left', `${margin.left}px`)
|
|
3604
|
-
// .call(ChartHelper.responsivefy)
|
|
3605
3577
|
.style('padding-right', `${rightSvgWidth}px`)
|
|
3606
3578
|
.style('margin-left', '15px');
|
|
3607
3579
|
var svgYAxisLeft = outerContainer
|
|
@@ -3629,10 +3601,8 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3629
3601
|
.style('overflow-x', 'auto');
|
|
3630
3602
|
var svg = innerContainer
|
|
3631
3603
|
.append('svg')
|
|
3632
|
-
// .attr('id', self.uniqueId)
|
|
3633
3604
|
.attr('width', width - rightSvgWidth)
|
|
3634
3605
|
.attr('height', height + margin.top + margin.bottom + 30)
|
|
3635
|
-
// .call(ChartHelper.responsivefy)
|
|
3636
3606
|
.append('g')
|
|
3637
3607
|
.attr('transform', 'translate(' + 0 + ',' + margin.top + ')');
|
|
3638
3608
|
var subgroups = keyList;
|
|
@@ -3641,9 +3611,6 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3641
3611
|
return d.name;
|
|
3642
3612
|
})
|
|
3643
3613
|
.keys();
|
|
3644
|
-
/**
|
|
3645
|
-
* x axis range made similar to line chart or vertical stack so that all the charts will get aligned with each other.
|
|
3646
|
-
*/
|
|
3647
3614
|
if (this.chartConfiguration.isMultiChartGridLine != undefined) {
|
|
3648
3615
|
x = d3
|
|
3649
3616
|
.scaleBand()
|
|
@@ -3661,27 +3628,11 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3661
3628
|
.range([leftAndRightSpaces, width - rightSvgWidth - leftAndRightSpaces])
|
|
3662
3629
|
.padding([0.3]);
|
|
3663
3630
|
}
|
|
3664
|
-
// x.bandwidth(96);
|
|
3665
3631
|
var xScaleFromOrigin = d3
|
|
3666
3632
|
.scaleBand()
|
|
3667
3633
|
.domain(groups)
|
|
3668
3634
|
.range([0, width - rightSvgWidth]);
|
|
3669
|
-
// .padding([0.2]);
|
|
3670
|
-
/**
|
|
3671
|
-
* draw second x axis on top
|
|
3672
|
-
*/
|
|
3673
|
-
// if (self.chartConfiguration.showXaxisTop) {
|
|
3674
|
-
// svg
|
|
3675
|
-
// .append('g')
|
|
3676
|
-
// .attr('class', 'lib-line-axis-text lib-line-x-axis-text x-axis')
|
|
3677
|
-
// .attr('style', self.chartConfiguration.xAxisCustomTextStyles)
|
|
3678
|
-
// .call(d3.axisBottom(x).tickSize(0));
|
|
3679
|
-
// }
|
|
3680
|
-
// d3.svg.axis().scale(x).orient('bottom').ticks(1).innerTickSize(-height);
|
|
3681
3635
|
if (this.chartConfiguration.isMultiChartGridLine == undefined) {
|
|
3682
|
-
/**
|
|
3683
|
-
* normal ticks for all dashboard charts
|
|
3684
|
-
*/
|
|
3685
3636
|
svg
|
|
3686
3637
|
.append('g')
|
|
3687
3638
|
.attr('class', 'x1 axis1')
|
|
@@ -3694,7 +3645,7 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3694
3645
|
.selectAll('g.x1.axis1 g.tick text')
|
|
3695
3646
|
.attr('class', 'lib-xaxis-labels-texts-drilldown')
|
|
3696
3647
|
.style('fill', 'var(--chart-text-color)')
|
|
3697
|
-
.attr('y', 32);
|
|
3648
|
+
.attr('y', 32);
|
|
3698
3649
|
}
|
|
3699
3650
|
else {
|
|
3700
3651
|
svg
|
|
@@ -3702,32 +3653,14 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3702
3653
|
.attr('class', 'lib-xaxis-labels-texts-drilldown')
|
|
3703
3654
|
.style('fill', 'var(--chart-text-color)');
|
|
3704
3655
|
}
|
|
3705
|
-
// .attr('y', function () {
|
|
3706
|
-
// if (alternate_text) {
|
|
3707
|
-
// alternate_text = false;
|
|
3708
|
-
// return long_tick_length + 1;
|
|
3709
|
-
// } else {
|
|
3710
|
-
// alternate_text = true;
|
|
3711
|
-
// return short_tick_length + 1;
|
|
3712
|
-
// }
|
|
3713
|
-
// });
|
|
3714
3656
|
}
|
|
3715
3657
|
else {
|
|
3716
|
-
/**
|
|
3717
|
-
* bigger ticks for weekly charts and more space from x axis to labels
|
|
3718
|
-
*/
|
|
3719
|
-
/**
|
|
3720
|
-
* draw x axis
|
|
3721
|
-
*/
|
|
3722
3658
|
svg
|
|
3723
3659
|
.append('g')
|
|
3724
3660
|
.attr('class', 'x1 axis1')
|
|
3725
3661
|
.attr('transform', 'translate(0,' + height + ')')
|
|
3726
3662
|
.call(d3.axisBottom(x).tickSize(0))
|
|
3727
3663
|
.call((g) => g.select('.domain').attr('fill', 'none'));
|
|
3728
|
-
/**
|
|
3729
|
-
* tick line size in alternate fashion
|
|
3730
|
-
*/
|
|
3731
3664
|
svg.selectAll('g.x1.axis1 g.tick line').attr('y2', function () {
|
|
3732
3665
|
if (alternate_text &&
|
|
3733
3666
|
self.chartConfiguration.isNoAlternateXaxisText == undefined) {
|
|
@@ -3739,14 +3672,7 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3739
3672
|
return short_tick_length_bg - 4;
|
|
3740
3673
|
}
|
|
3741
3674
|
});
|
|
3742
|
-
/**
|
|
3743
|
-
* reset the flag so that values can be shown in same alternate fashion
|
|
3744
|
-
*/
|
|
3745
3675
|
alternate_text = false;
|
|
3746
|
-
/**
|
|
3747
|
-
* print x-axis label texts
|
|
3748
|
-
* used by weekly charts
|
|
3749
|
-
*/
|
|
3750
3676
|
svg
|
|
3751
3677
|
.selectAll('g.x1.axis1 g.tick text')
|
|
3752
3678
|
.attr('class', 'lib-xaxis-labels-texts-weeklycharts')
|
|
@@ -3795,7 +3721,6 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3795
3721
|
return '';
|
|
3796
3722
|
});
|
|
3797
3723
|
}
|
|
3798
|
-
/**y scale for left y axis */
|
|
3799
3724
|
var y = d3.scaleLinear().rangeRound([height, 0]);
|
|
3800
3725
|
var maxValue = d3.max(data, (d) => d3.max(keyList, (key) => +d[key]));
|
|
3801
3726
|
if (maxValue == 0) {
|
|
@@ -3806,27 +3731,7 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3806
3731
|
maxValue = 100;
|
|
3807
3732
|
}
|
|
3808
3733
|
}
|
|
3809
|
-
if (self.chartConfiguration.yAxisGrid) {
|
|
3810
|
-
// svg
|
|
3811
|
-
// .append('g')
|
|
3812
|
-
// .attr('class', 'grid')
|
|
3813
|
-
// .call(
|
|
3814
|
-
// d3
|
|
3815
|
-
// .axisLeft(y)
|
|
3816
|
-
// .ticks(self.chartConfiguration.numberOfYTicks)
|
|
3817
|
-
// .tickSize(-width)
|
|
3818
|
-
// .tickFormat('')
|
|
3819
|
-
// )
|
|
3820
|
-
// // .style('stroke-dasharray', '5 5')
|
|
3821
|
-
// .style('color', '#B9B9B9')
|
|
3822
|
-
// .style('opacity', '0.5')
|
|
3823
|
-
// .call((g) => g.select('.domain').remove());
|
|
3824
|
-
}
|
|
3825
3734
|
if (this.chartConfiguration.customYscale) {
|
|
3826
|
-
/**
|
|
3827
|
-
* increase y-scale so that values wont cross or exceed out of range
|
|
3828
|
-
* used in weekly charts
|
|
3829
|
-
*/
|
|
3830
3735
|
maxValue = maxValue * this.chartConfiguration.customYscale;
|
|
3831
3736
|
}
|
|
3832
3737
|
if (this.chartData.targetLineData &&
|
|
@@ -3864,10 +3769,6 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3864
3769
|
.tickSize(0)
|
|
3865
3770
|
.tickFormat(self.chartConfiguration.yLineAxisLabelFomatter);
|
|
3866
3771
|
}
|
|
3867
|
-
/**
|
|
3868
|
-
* show x-axis grid between labels
|
|
3869
|
-
* used by weekly charts
|
|
3870
|
-
*/
|
|
3871
3772
|
if (self.chartConfiguration.isXgridBetweenLabels) {
|
|
3872
3773
|
svg
|
|
3873
3774
|
.append('g')
|
|
@@ -3879,9 +3780,6 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3879
3780
|
.call((g) => g.select('.domain').remove());
|
|
3880
3781
|
}
|
|
3881
3782
|
if (this.chartConfiguration.yAxisGrid) {
|
|
3882
|
-
/**
|
|
3883
|
-
* draw y axis
|
|
3884
|
-
*/
|
|
3885
3783
|
svg
|
|
3886
3784
|
.append('g')
|
|
3887
3785
|
.call(d3
|
|
@@ -3905,22 +3803,12 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3905
3803
|
xSubgroup.range([0, x.bandwidth()]);
|
|
3906
3804
|
}
|
|
3907
3805
|
else {
|
|
3908
|
-
/**
|
|
3909
|
-
* used to make grouped bars with lesser width as we are not using padding for width
|
|
3910
|
-
* used by weekly charts
|
|
3911
|
-
*/
|
|
3912
3806
|
xSubgroup.range([0, x.bandwidth()]);
|
|
3913
3807
|
}
|
|
3914
|
-
// if (this.chartConfiguration.isDrilldownChart) {
|
|
3915
|
-
// }
|
|
3916
3808
|
var color = d3
|
|
3917
3809
|
.scaleOrdinal()
|
|
3918
3810
|
.domain(subgroups)
|
|
3919
3811
|
.range(Object.values(metaData.colors));
|
|
3920
|
-
// var colorAboveTarget = d3
|
|
3921
|
-
// .scaleOrdinal()
|
|
3922
|
-
// .domain(subgroups)
|
|
3923
|
-
// .range(Object.values(metaData.colorAboveTarget));
|
|
3924
3812
|
var state = svg
|
|
3925
3813
|
.append('g')
|
|
3926
3814
|
.selectAll('.state')
|
|
@@ -3935,10 +3823,8 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3935
3823
|
.data(function (d) {
|
|
3936
3824
|
let newList = [];
|
|
3937
3825
|
subgroups.map(function (key) {
|
|
3938
|
-
// if (key !== "group") {
|
|
3939
3826
|
let obj = { key: key, value: d[key], name: d.name };
|
|
3940
3827
|
newList.push(obj);
|
|
3941
|
-
// }
|
|
3942
3828
|
});
|
|
3943
3829
|
return newList;
|
|
3944
3830
|
})
|
|
@@ -3951,7 +3837,6 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3951
3837
|
!metaData.barWithoutClick.length ||
|
|
3952
3838
|
(!metaData.barWithoutClick.includes(d?.name) &&
|
|
3953
3839
|
!metaData.barWithoutClick.includes(d?.key)))
|
|
3954
|
-
// self.handleClick(d.data.name);
|
|
3955
3840
|
self.handleClick(d);
|
|
3956
3841
|
}
|
|
3957
3842
|
})
|
|
@@ -3968,14 +3853,12 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3968
3853
|
0 + (x.bandwidth() - 200) / 2,
|
|
3969
3854
|
x.bandwidth() - (x.bandwidth() - 200) / 2,
|
|
3970
3855
|
]);
|
|
3971
|
-
// .padding(0.05);
|
|
3972
3856
|
}
|
|
3973
3857
|
else
|
|
3974
3858
|
tempScale.range([
|
|
3975
3859
|
0 + (x.bandwidth() - 300) / 2,
|
|
3976
3860
|
x.bandwidth() - (x.bandwidth() - 300) / 2,
|
|
3977
3861
|
]);
|
|
3978
|
-
// .padding(0.05);
|
|
3979
3862
|
}
|
|
3980
3863
|
else
|
|
3981
3864
|
tempScale.range([
|
|
@@ -3994,7 +3877,6 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3994
3877
|
})
|
|
3995
3878
|
.attr('width', function (d) {
|
|
3996
3879
|
if (self.chartConfiguration.isDrilldownChart) {
|
|
3997
|
-
// var tempScale;
|
|
3998
3880
|
data.map((indiv) => {
|
|
3999
3881
|
if (indiv.name == d.name) {
|
|
4000
3882
|
let keys = Object.keys(indiv).filter((temp, i) => i != 0);
|
|
@@ -4007,14 +3889,12 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
4007
3889
|
0 + (x.bandwidth() - 200) / 2,
|
|
4008
3890
|
x.bandwidth() - (x.bandwidth() - 200) / 2,
|
|
4009
3891
|
]);
|
|
4010
|
-
// .padding(0.05);
|
|
4011
3892
|
}
|
|
4012
3893
|
else
|
|
4013
3894
|
tempScale.range([
|
|
4014
3895
|
0 + (x.bandwidth() - 300) / 2,
|
|
4015
3896
|
x.bandwidth() - (x.bandwidth() - 300) / 2,
|
|
4016
3897
|
]);
|
|
4017
|
-
// .padding(0.05);
|
|
4018
3898
|
}
|
|
4019
3899
|
else
|
|
4020
3900
|
tempScale.range([
|
|
@@ -4036,7 +3916,6 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
4036
3916
|
return height - y(d.value);
|
|
4037
3917
|
return height - y(0);
|
|
4038
3918
|
})
|
|
4039
|
-
// .style('cursor', 'pointer')
|
|
4040
3919
|
.style('cursor', function (d) {
|
|
4041
3920
|
if (metaData.hasDrillDown && !isria)
|
|
4042
3921
|
return 'pointer';
|
|
@@ -4051,9 +3930,6 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
4051
3930
|
return self.chartData.metaData.colorAboveTarget[d.key];
|
|
4052
3931
|
return self.chartData.metaData.colors[d.key];
|
|
4053
3932
|
});
|
|
4054
|
-
/**
|
|
4055
|
-
* display angled texts on the bars
|
|
4056
|
-
*/
|
|
4057
3933
|
if (this.chartConfiguration.textsOnBar != undefined && !this.isZoomedOut) {
|
|
4058
3934
|
state
|
|
4059
3935
|
.selectAll('text')
|
|
@@ -4114,14 +3990,12 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
4114
3990
|
0 + (x.bandwidth() - 200) / 2,
|
|
4115
3991
|
x.bandwidth() - (x.bandwidth() - 200) / 2,
|
|
4116
3992
|
]);
|
|
4117
|
-
// .padding(0.05);
|
|
4118
3993
|
}
|
|
4119
3994
|
else
|
|
4120
3995
|
tempScale.range([
|
|
4121
3996
|
0 + (x.bandwidth() - 300) / 2,
|
|
4122
3997
|
x.bandwidth() - (x.bandwidth() - 300) / 2,
|
|
4123
3998
|
]);
|
|
4124
|
-
// .padding(0.05);
|
|
4125
3999
|
}
|
|
4126
4000
|
else
|
|
4127
4001
|
tempScale.range([
|
|
@@ -4131,16 +4005,9 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
4131
4005
|
}
|
|
4132
4006
|
}
|
|
4133
4007
|
});
|
|
4134
|
-
/**
|
|
4135
|
-
* if set, then all texts ll be horizontal
|
|
4136
|
-
*/
|
|
4137
4008
|
if (self.chartConfiguration.textAlwaysHorizontal) {
|
|
4138
4009
|
return ('translate(' + xSubgroup(d.key) + ',' + (y(d.value) - 3) + ')');
|
|
4139
4010
|
}
|
|
4140
|
-
/**
|
|
4141
|
-
* rotate texts having more than one digits
|
|
4142
|
-
*/
|
|
4143
|
-
// if (d.value > 9)
|
|
4144
4011
|
if (!isNaN(tempScale(d.key)))
|
|
4145
4012
|
return ('translate(' +
|
|
4146
4013
|
(tempScale(d.key) + tempScale.bandwidth() * 0.55) +
|
|
@@ -4148,14 +4015,6 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
4148
4015
|
(y(0) - 10) +
|
|
4149
4016
|
') rotate(270)');
|
|
4150
4017
|
return 'translate(0,0)';
|
|
4151
|
-
// else
|
|
4152
|
-
// return (
|
|
4153
|
-
// 'translate(' +
|
|
4154
|
-
// (tempScale(d.key) + tempScale.bandwidth() / 2) +
|
|
4155
|
-
// ',' +
|
|
4156
|
-
// y(0) +
|
|
4157
|
-
// ')'
|
|
4158
|
-
// );
|
|
4159
4018
|
})
|
|
4160
4019
|
.on('click', function (d) {
|
|
4161
4020
|
if (!metaData.barWithoutClick ||
|
|
@@ -4184,7 +4043,6 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
4184
4043
|
svg
|
|
4185
4044
|
.append('foreignObject')
|
|
4186
4045
|
.attr('x', function () {
|
|
4187
|
-
// var tempScale;
|
|
4188
4046
|
var elementsCounter;
|
|
4189
4047
|
data.map((indiv) => {
|
|
4190
4048
|
if (indiv.name == d.name) {
|
|
@@ -4198,14 +4056,12 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
4198
4056
|
0 + (x.bandwidth() - 200) / 2,
|
|
4199
4057
|
x.bandwidth() - (x.bandwidth() - 200) / 2,
|
|
4200
4058
|
]);
|
|
4201
|
-
// .padding(0.05);
|
|
4202
4059
|
}
|
|
4203
4060
|
else
|
|
4204
4061
|
tempScale.range([
|
|
4205
4062
|
0 + (x.bandwidth() - 300) / 2,
|
|
4206
4063
|
x.bandwidth() - (x.bandwidth() - 300) / 2,
|
|
4207
4064
|
]);
|
|
4208
|
-
// .padding(0.05);
|
|
4209
4065
|
}
|
|
4210
4066
|
else
|
|
4211
4067
|
tempScale.range([
|
|
@@ -4235,7 +4091,6 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
4235
4091
|
return d.class;
|
|
4236
4092
|
})
|
|
4237
4093
|
.attr('width', function () {
|
|
4238
|
-
// var tempScale;
|
|
4239
4094
|
data.map((indiv) => {
|
|
4240
4095
|
if (indiv.name == d.name) {
|
|
4241
4096
|
let keys = Object.keys(indiv).filter((temp, i) => i != 0);
|
|
@@ -4247,14 +4102,12 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
4247
4102
|
0 + (x.bandwidth() - 200) / 2,
|
|
4248
4103
|
x.bandwidth() - (x.bandwidth() - 200) / 2,
|
|
4249
4104
|
]);
|
|
4250
|
-
// .padding(0.05);
|
|
4251
4105
|
}
|
|
4252
4106
|
else
|
|
4253
4107
|
tempScale.range([
|
|
4254
4108
|
0 + (x.bandwidth() - 300) / 2,
|
|
4255
4109
|
x.bandwidth() - (x.bandwidth() - 300) / 2,
|
|
4256
4110
|
]);
|
|
4257
|
-
// .padding(0.05);
|
|
4258
4111
|
}
|
|
4259
4112
|
else
|
|
4260
4113
|
tempScale.range([
|
|
@@ -4341,35 +4194,18 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
4341
4194
|
.attr('transform', 'translate(0,0)')
|
|
4342
4195
|
.call(y)
|
|
4343
4196
|
.style('display', 'none');
|
|
4344
|
-
/**
|
|
4345
|
-
* hide x axis labels
|
|
4346
|
-
* config is there for future use
|
|
4347
|
-
* used by weekly charts
|
|
4348
|
-
*/
|
|
4349
4197
|
if (this.chartConfiguration.isXaxisLabelHidden != undefined &&
|
|
4350
4198
|
this.chartConfiguration.isXaxisLabelHidden) {
|
|
4351
4199
|
d3.selectAll('g.lib-line-x-axis-text > g > text').attr('class', 'lib-display-hidden');
|
|
4352
4200
|
}
|
|
4353
|
-
/**
|
|
4354
|
-
* hide y axis labels
|
|
4355
|
-
* used by weekly charts
|
|
4356
|
-
*/
|
|
4357
4201
|
if (this.chartConfiguration.isYaxisLabelHidden != undefined &&
|
|
4358
4202
|
this.chartConfiguration.isYaxisLabelHidden) {
|
|
4359
4203
|
d3.selectAll('.yaxis-dashed > g > text').attr('class', 'lib-display-hidden');
|
|
4360
4204
|
}
|
|
4361
|
-
/**
|
|
4362
|
-
* hide y axis labels
|
|
4363
|
-
* config is there for future use
|
|
4364
|
-
*/
|
|
4365
4205
|
if (this.chartConfiguration.isYaxisHidden != undefined &&
|
|
4366
4206
|
this.chartConfiguration.isYaxisHidden) {
|
|
4367
4207
|
d3.selectAll('.yaxis-dashed').attr('class', 'lib-display-hidden');
|
|
4368
4208
|
}
|
|
4369
|
-
/**
|
|
4370
|
-
* dashed y axis
|
|
4371
|
-
* used by weekly charts
|
|
4372
|
-
*/
|
|
4373
4209
|
if (this.chartConfiguration.isYaxisDashed != undefined &&
|
|
4374
4210
|
this.chartConfiguration.isYaxisDashed) {
|
|
4375
4211
|
d3.selectAll('.yaxis-dashed')
|
|
@@ -4386,17 +4222,11 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
4386
4222
|
.call(yLineAxis);
|
|
4387
4223
|
}
|
|
4388
4224
|
}
|
|
4389
|
-
/**
|
|
4390
|
-
* used to display y label
|
|
4391
|
-
*/
|
|
4392
4225
|
if (this.isZoomedOut) {
|
|
4393
4226
|
svg
|
|
4394
4227
|
.selectAll('.lib-xaxis-labels-texts-drilldown')
|
|
4395
4228
|
.attr('class', 'lib-display-hidden');
|
|
4396
4229
|
}
|
|
4397
|
-
/**
|
|
4398
|
-
* used to write y labels based on configuration
|
|
4399
|
-
*/
|
|
4400
4230
|
if (metaData.yLabel) {
|
|
4401
4231
|
svgYAxisLeft
|
|
4402
4232
|
.append('text')
|
|
@@ -4415,9 +4245,6 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
4415
4245
|
.text(metaData.yLabel);
|
|
4416
4246
|
}
|
|
4417
4247
|
else {
|
|
4418
|
-
/**
|
|
4419
|
-
* used by weekly charts
|
|
4420
|
-
*/
|
|
4421
4248
|
svg
|
|
4422
4249
|
.selectAll('.lib-axis-group-label')
|
|
4423
4250
|
.attr('class', 'lib-ylabel-weeklyCharts')
|
|
@@ -4458,13 +4285,6 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
4458
4285
|
.attr('y2', yZero)
|
|
4459
4286
|
.style('stroke-dasharray', '5 5')
|
|
4460
4287
|
.style('stroke', this.chartData.targetLineData.color);
|
|
4461
|
-
// svgYAxisRight
|
|
4462
|
-
// .append('line')
|
|
4463
|
-
// .attr('x1', 0)
|
|
4464
|
-
// .attr('x2', rightSvgWidth)
|
|
4465
|
-
// .attr('y1', yZero)
|
|
4466
|
-
// .attr('y2', yZero)
|
|
4467
|
-
// .style('stroke', this.chartData.targetLineData.color);
|
|
4468
4288
|
svgYAxisRight
|
|
4469
4289
|
.append('foreignObject')
|
|
4470
4290
|
.attr('transform', 'translate(' + 0 + ',' + (yZero - 30) + ')')
|
|
@@ -4492,13 +4312,6 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
4492
4312
|
});
|
|
4493
4313
|
}
|
|
4494
4314
|
if (this.chartConfiguration.isDrilldownChart) {
|
|
4495
|
-
/**
|
|
4496
|
-
* used by drilldown charts
|
|
4497
|
-
*/
|
|
4498
|
-
// svg
|
|
4499
|
-
// .selectAll('.lib-axis-group-label')
|
|
4500
|
-
// .attr('class', 'lib-ylabel-drilldowncharts')
|
|
4501
|
-
// .text(metaData.yLabel.toLowerCase());
|
|
4502
4315
|
svg.selectAll('g.x1.axis1 g.tick line').style('display', 'none');
|
|
4503
4316
|
}
|
|
4504
4317
|
if (metaData.lineyLabel) {
|
|
@@ -6825,6 +6638,21 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
6825
6638
|
this.isTopCaptionVisible = true;
|
|
6826
6639
|
this.uniqueId = this.getUniqueId();
|
|
6827
6640
|
this.isTransparentBackground = false;
|
|
6641
|
+
this.isCC = false;
|
|
6642
|
+
this.isZoomedOut = true;
|
|
6643
|
+
this.CONSTANTS = {
|
|
6644
|
+
RIGHT_SVG_WIDTH: 60,
|
|
6645
|
+
LEFT_RIGHT_SPACES: 50,
|
|
6646
|
+
SHORT_TICK_LENGTH: 4,
|
|
6647
|
+
LONG_TICK_LENGTH: 16,
|
|
6648
|
+
SHORT_TICK_LENGTH_BG: 5,
|
|
6649
|
+
LONG_TICK_LENGTH_BG: 30,
|
|
6650
|
+
MIN_MOBILE_BAR_WIDTH: 32,
|
|
6651
|
+
DESKTOP_MIN_BAR_WIDTH: 40,
|
|
6652
|
+
MOBILE_BAR_PADDING: 12,
|
|
6653
|
+
ZOOM_THRESHOLD: 30,
|
|
6654
|
+
ZOOM_IN_THRESHOLD: 8,
|
|
6655
|
+
};
|
|
6828
6656
|
this.defaultConfiguration = {
|
|
6829
6657
|
margin: { top: 20, right: 20, bottom: 20, left: 40 },
|
|
6830
6658
|
svgHeight: 70,
|
|
@@ -6840,6 +6668,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
6840
6668
|
forComparison: true,
|
|
6841
6669
|
headerMenuOptions: HeaderConfigHelper.headerConfig.headerMenuOptions,
|
|
6842
6670
|
yAxisGrid: false,
|
|
6671
|
+
// Optional configs with undefined defaults
|
|
6843
6672
|
isHeaderVisible: undefined,
|
|
6844
6673
|
isTransparentBackground: undefined,
|
|
6845
6674
|
isTopCaptionVisible: undefined,
|
|
@@ -6867,56 +6696,40 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
6867
6696
|
isToggleVisible: undefined,
|
|
6868
6697
|
isTitleHidden: undefined,
|
|
6869
6698
|
};
|
|
6870
|
-
this.isCC = false;
|
|
6871
|
-
this.isZoomedOut = true;
|
|
6872
|
-
}
|
|
6873
|
-
isZoomOutSelected(isZoomOut) {
|
|
6874
|
-
this.isZoomedOut = isZoomOut;
|
|
6875
|
-
this.ngOnChanges();
|
|
6876
6699
|
}
|
|
6700
|
+
ngOnInit() { }
|
|
6877
6701
|
ngOnChanges() {
|
|
6878
|
-
|
|
6879
|
-
d3.select('#' + self.uniqueId).remove();
|
|
6702
|
+
this.removeExistingChart();
|
|
6880
6703
|
this.initializeStackedChart();
|
|
6881
6704
|
}
|
|
6882
6705
|
onResized(event) {
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
}.bind(self), 10);
|
|
6706
|
+
setTimeout(() => {
|
|
6707
|
+
this.removeExistingChart();
|
|
6708
|
+
this.initializeStackedChart();
|
|
6709
|
+
}, 10);
|
|
6888
6710
|
}
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
|
|
6896
|
-
|
|
6897
|
-
|
|
6898
|
-
|
|
6899
|
-
|
|
6900
|
-
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
var rightSvgWidth = 60;
|
|
6907
|
-
var leftAndRightSpaces = 50;
|
|
6908
|
-
let isria = this.customChartConfiguration.isRia;
|
|
6909
|
-
// Responsive breakpoints
|
|
6910
|
-
const isMobile = window.innerWidth < 576;
|
|
6911
|
-
const isTablet = window.innerWidth >= 576 && window.innerWidth < 992;
|
|
6912
|
-
const isDesktop = window.innerWidth >= 992;
|
|
6913
|
-
// Adjust margins and font sizes based on device
|
|
6914
|
-
if (isMobile) {
|
|
6711
|
+
isZoomOutSelected(isZoomOut) {
|
|
6712
|
+
this.isZoomedOut = isZoomOut;
|
|
6713
|
+
this.ngOnChanges();
|
|
6714
|
+
}
|
|
6715
|
+
removeExistingChart() {
|
|
6716
|
+
d3.select('#' + this.uniqueId).remove();
|
|
6717
|
+
}
|
|
6718
|
+
getDeviceConfig() {
|
|
6719
|
+
const width = window.innerWidth;
|
|
6720
|
+
return {
|
|
6721
|
+
isMobile: width < 576,
|
|
6722
|
+
isTablet: width >= 576 && width < 992,
|
|
6723
|
+
isDesktop: width >= 992,
|
|
6724
|
+
};
|
|
6725
|
+
}
|
|
6726
|
+
configureResponsiveSettings(device) {
|
|
6727
|
+
if (device.isMobile) {
|
|
6915
6728
|
this.chartConfiguration.margin = { top: 20, right: 10, bottom: 40, left: 30 };
|
|
6916
6729
|
this.chartConfiguration.numberOfYTicks = 4;
|
|
6917
6730
|
this.chartConfiguration.svgHeight = 60;
|
|
6918
6731
|
}
|
|
6919
|
-
else if (isTablet) {
|
|
6732
|
+
else if (device.isTablet) {
|
|
6920
6733
|
this.chartConfiguration.margin = { top: 25, right: 20, bottom: 45, left: 40 };
|
|
6921
6734
|
this.chartConfiguration.numberOfYTicks = 6;
|
|
6922
6735
|
this.chartConfiguration.svgHeight = 70;
|
|
@@ -6926,922 +6739,612 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
6926
6739
|
this.chartConfiguration.numberOfYTicks = 7;
|
|
6927
6740
|
this.chartConfiguration.svgHeight = 80;
|
|
6928
6741
|
}
|
|
6929
|
-
|
|
6930
|
-
|
|
6742
|
+
}
|
|
6743
|
+
mergeConfigurations() {
|
|
6744
|
+
for (const key in this.defaultConfiguration) {
|
|
6745
|
+
this.chartConfiguration[key] = ChartHelper.getValueByConfigurationType(key, this.defaultConfiguration, this.customChartConfiguration);
|
|
6931
6746
|
}
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
if (metaData.unit
|
|
6747
|
+
}
|
|
6748
|
+
prepareMetaData(metaData) {
|
|
6749
|
+
if (!metaData.unit)
|
|
6935
6750
|
metaData.unit = '';
|
|
6936
|
-
if (metaData.isCC)
|
|
6751
|
+
if (metaData.isCC)
|
|
6937
6752
|
this.isCC = metaData.isCC;
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
metaData.barWithoutClick = metaData.barWithoutClick.map((ele) => ele.toLowerCase());
|
|
6753
|
+
if (metaData.barWithoutClick?.length) {
|
|
6754
|
+
metaData.barWithoutClick = metaData.barWithoutClick.map(el => el.toLowerCase());
|
|
6941
6755
|
}
|
|
6942
6756
|
else {
|
|
6943
6757
|
metaData.barWithoutClick = [];
|
|
6944
6758
|
}
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
let
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
var height = containerHeight * (self.chartConfiguration.svgHeight / 100) - margin.top - margin.bottom;
|
|
6965
|
-
// Adjust width for large datasets and zoom
|
|
6966
|
-
if (this.chartData.data.length > 30 && this.isZoomedOut) {
|
|
6967
|
-
width = width > this.chartData.data.length * (isMobile ? 15 : 25)
|
|
6968
|
-
? width
|
|
6969
|
-
: this.chartData.data.length * (isMobile ? 15 : 25);
|
|
6970
|
-
}
|
|
6971
|
-
if (this.chartData.data.length > 8 && !this.isZoomedOut) {
|
|
6972
|
-
width = this.chartData.data.length * (isMobile ? 60 : 130);
|
|
6973
|
-
}
|
|
6974
|
-
// Fullscreen and drilldown adjustments
|
|
6975
|
-
if (this.chartConfiguration.isFullScreen != undefined && this.chartConfiguration.isFullScreen) {
|
|
6976
|
-
height = this.chartConfiguration.svgHeight != 80
|
|
6759
|
+
return metaData;
|
|
6760
|
+
}
|
|
6761
|
+
calculateDimensions(chartContainer, verticalContainer, margin, device, dataLength) {
|
|
6762
|
+
const containerWidth = chartContainer.node().getBoundingClientRect().width;
|
|
6763
|
+
const containerHeight = verticalContainer.node().getBoundingClientRect().height;
|
|
6764
|
+
let width = containerWidth - margin.left - margin.right;
|
|
6765
|
+
let height = containerHeight * (this.chartConfiguration.svgHeight / 100) - margin.top - margin.bottom;
|
|
6766
|
+
// Handle zoom out scenario
|
|
6767
|
+
if (dataLength > this.CONSTANTS.ZOOM_THRESHOLD && this.isZoomedOut) {
|
|
6768
|
+
const minWidth = dataLength * (device.isMobile ? 15 : 25);
|
|
6769
|
+
width = Math.max(width, minWidth);
|
|
6770
|
+
}
|
|
6771
|
+
// Handle zoom in scenario
|
|
6772
|
+
if (dataLength > this.CONSTANTS.ZOOM_IN_THRESHOLD && !this.isZoomedOut) {
|
|
6773
|
+
width = dataLength * (device.isMobile ? 60 : 130);
|
|
6774
|
+
}
|
|
6775
|
+
// Handle full screen
|
|
6776
|
+
if (this.chartConfiguration.isFullScreen) {
|
|
6777
|
+
height = this.chartConfiguration.svgHeight !== 80
|
|
6977
6778
|
? this.chartConfiguration.svgHeight
|
|
6978
6779
|
: containerHeight;
|
|
6979
6780
|
}
|
|
6781
|
+
// Handle drilldown
|
|
6980
6782
|
if (this.chartConfiguration.isDrilldownChart) {
|
|
6981
|
-
height = containerHeight - margin.top - margin.bottom - (isMobile ? 60 : 130);
|
|
6783
|
+
height = containerHeight - margin.top - margin.bottom - (device.isMobile ? 60 : 130);
|
|
6982
6784
|
}
|
|
6983
|
-
//
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
* for hiding legends
|
|
6993
|
-
* used by weekly charts
|
|
6994
|
-
*/
|
|
6995
|
-
if (this.chartConfiguration.isTopCaptionVisible != undefined) {
|
|
6996
|
-
//UPDATENAME
|
|
6997
|
-
this.isTopCaptionVisible = this.chartConfiguration.isTopCaptionVisible;
|
|
6998
|
-
}
|
|
6999
|
-
/**
|
|
7000
|
-
* for removing background color so that it can take parents color
|
|
7001
|
-
*
|
|
7002
|
-
*/
|
|
7003
|
-
if (this.chartConfiguration.isTransparentBackground != undefined) {
|
|
7004
|
-
this.isTransparentBackground =
|
|
7005
|
-
this.chartConfiguration.isTransparentBackground;
|
|
7006
|
-
}
|
|
7007
|
-
/**
|
|
7008
|
-
* format data values based on configuration received
|
|
7009
|
-
*/
|
|
7010
|
-
if (this.chartConfiguration.textFormatter != undefined) {
|
|
7011
|
-
formatFromBackend = ChartHelper.dataValueFormatter(this.chartConfiguration.textFormatter);
|
|
7012
|
-
formatForHugeNumbers = ChartHelper.dataValueFormatter('.2s');
|
|
6785
|
+
// Calculate bar dimensions
|
|
6786
|
+
let barWidth;
|
|
6787
|
+
let barPadding;
|
|
6788
|
+
let requiredSvgWidth;
|
|
6789
|
+
if (device.isMobile) {
|
|
6790
|
+
barWidth = this.CONSTANTS.MIN_MOBILE_BAR_WIDTH;
|
|
6791
|
+
barPadding = this.CONSTANTS.MOBILE_BAR_PADDING;
|
|
6792
|
+
requiredSvgWidth = Math.max(width - this.CONSTANTS.RIGHT_SVG_WIDTH, (barWidth + barPadding) * dataLength + this.CONSTANTS.LEFT_RIGHT_SPACES * 2 +
|
|
6793
|
+
this.CONSTANTS.RIGHT_SVG_WIDTH - barPadding);
|
|
7013
6794
|
}
|
|
7014
|
-
|
|
6795
|
+
else {
|
|
6796
|
+
barWidth = Math.max(this.CONSTANTS.DESKTOP_MIN_BAR_WIDTH, (width - this.CONSTANTS.RIGHT_SVG_WIDTH - this.CONSTANTS.LEFT_RIGHT_SPACES * 2) / dataLength);
|
|
6797
|
+
barPadding = 0;
|
|
6798
|
+
requiredSvgWidth = width - this.CONSTANTS.RIGHT_SVG_WIDTH;
|
|
6799
|
+
}
|
|
6800
|
+
return {
|
|
6801
|
+
width,
|
|
6802
|
+
height,
|
|
6803
|
+
containerWidth,
|
|
6804
|
+
containerHeight,
|
|
6805
|
+
barWidth,
|
|
6806
|
+
barPadding,
|
|
6807
|
+
requiredSvgWidth,
|
|
6808
|
+
};
|
|
6809
|
+
}
|
|
6810
|
+
createSvgContainers(chartContainer, dimensions, margin) {
|
|
6811
|
+
const outerContainer = chartContainer
|
|
7015
6812
|
.append('div')
|
|
7016
|
-
.attr('id',
|
|
6813
|
+
.attr('id', this.uniqueId)
|
|
7017
6814
|
.attr('class', 'outer-container')
|
|
7018
6815
|
.style('width', '100%')
|
|
7019
|
-
.style('height', height)
|
|
6816
|
+
.style('height', dimensions.height)
|
|
7020
6817
|
.style('overflow-x', 'hidden')
|
|
7021
6818
|
.style('padding-left', `${margin.left}px`)
|
|
7022
6819
|
.style('margin-left', '10px')
|
|
7023
|
-
.style('padding-right', `${
|
|
7024
|
-
|
|
6820
|
+
.style('padding-right', `${this.CONSTANTS.RIGHT_SVG_WIDTH}px`);
|
|
6821
|
+
const svgYAxisLeft = outerContainer
|
|
7025
6822
|
.append('svg')
|
|
7026
6823
|
.attr('width', '80')
|
|
7027
|
-
.attr('height', height + margin.top + margin.bottom)
|
|
6824
|
+
.attr('height', dimensions.height + margin.top + margin.bottom)
|
|
7028
6825
|
.style('position', 'absolute')
|
|
7029
6826
|
.style('left', '0')
|
|
7030
6827
|
.style('z-index', 1)
|
|
7031
6828
|
.append('g')
|
|
7032
|
-
.attr('transform',
|
|
7033
|
-
|
|
6829
|
+
.attr('transform', `translate(${margin.left + 10},${margin.top})`);
|
|
6830
|
+
const svgYAxisRight = outerContainer
|
|
7034
6831
|
.append('svg')
|
|
7035
|
-
.attr('width',
|
|
7036
|
-
.attr('height', height + margin.top + margin.bottom)
|
|
6832
|
+
.attr('width', this.CONSTANTS.RIGHT_SVG_WIDTH)
|
|
6833
|
+
.attr('height', dimensions.height + margin.top + margin.bottom)
|
|
7037
6834
|
.style('position', 'absolute')
|
|
7038
6835
|
.style('right', '2px')
|
|
7039
6836
|
.style('z-index', 1)
|
|
7040
6837
|
.append('g')
|
|
7041
|
-
.attr('transform',
|
|
7042
|
-
|
|
6838
|
+
.attr('transform', `translate(0,${margin.top})`);
|
|
6839
|
+
const innerContainer = outerContainer
|
|
7043
6840
|
.append('div')
|
|
7044
6841
|
.attr('class', 'inner-container')
|
|
7045
6842
|
.style('width', '100%')
|
|
7046
6843
|
.style('overflow-x', 'auto');
|
|
7047
|
-
|
|
7048
|
-
let barWidth;
|
|
7049
|
-
let barPadding = 12; // px, space between bars on mobile
|
|
7050
|
-
let requiredSvgWidth;
|
|
7051
|
-
if (isMobile) {
|
|
7052
|
-
// Use a minimum width per bar and add padding between bars
|
|
7053
|
-
const minBarWidth = 32; // px, can adjust as needed
|
|
7054
|
-
barWidth = minBarWidth;
|
|
7055
|
-
requiredSvgWidth = Math.max(width - rightSvgWidth, (barWidth + barPadding) * data.length + leftAndRightSpaces * 2 + rightSvgWidth - barPadding // no padding after last bar
|
|
7056
|
-
);
|
|
7057
|
-
innerContainer.style('overflow-x', 'auto');
|
|
7058
|
-
}
|
|
7059
|
-
else {
|
|
7060
|
-
barWidth = Math.max(40, (width - rightSvgWidth - leftAndRightSpaces * 2) / data.length);
|
|
7061
|
-
barPadding = 0;
|
|
7062
|
-
requiredSvgWidth = width - rightSvgWidth;
|
|
7063
|
-
}
|
|
7064
|
-
var svg = innerContainer
|
|
6844
|
+
const svg = innerContainer
|
|
7065
6845
|
.append('svg')
|
|
7066
|
-
.attr('width', requiredSvgWidth)
|
|
7067
|
-
.attr('height', height + margin.top + margin.bottom + 30)
|
|
6846
|
+
.attr('width', dimensions.requiredSvgWidth)
|
|
6847
|
+
.attr('height', dimensions.height + margin.top + margin.bottom + 30)
|
|
7068
6848
|
.append('g')
|
|
7069
|
-
.attr('transform',
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
.offset(d3.stackOffsetNone);
|
|
7076
|
-
var layers = stack(data);
|
|
7077
|
-
data.sort(function (a, b) {
|
|
7078
|
-
return b.total - a.total;
|
|
7079
|
-
});
|
|
7080
|
-
let lineYscale;
|
|
7081
|
-
if (lineData != null) {
|
|
7082
|
-
lineYscale = d3
|
|
7083
|
-
.scaleLinear()
|
|
7084
|
-
.domain([
|
|
7085
|
-
0,
|
|
7086
|
-
d3.max(lineData, function (d) {
|
|
7087
|
-
return +d.value;
|
|
7088
|
-
}),
|
|
7089
|
-
])
|
|
7090
|
-
.range([height, 0]);
|
|
7091
|
-
}
|
|
7092
|
-
// Calculate bar width for mobile to avoid overlap
|
|
7093
|
-
// ...barWidth is now calculated above, remove duplicate...
|
|
7094
|
-
var xScale = d3
|
|
6849
|
+
.attr('transform', `translate(0,${margin.top})`);
|
|
6850
|
+
return { svg, svgYAxisLeft, svgYAxisRight, innerContainer };
|
|
6851
|
+
}
|
|
6852
|
+
createScales(data, layers, lineData, dimensions, device) {
|
|
6853
|
+
const { width, height, barWidth, barPadding } = dimensions;
|
|
6854
|
+
const xScale = d3
|
|
7095
6855
|
.scaleBand()
|
|
7096
6856
|
.rangeRound([
|
|
7097
|
-
|
|
7098
|
-
width -
|
|
6857
|
+
this.CONSTANTS.LEFT_RIGHT_SPACES,
|
|
6858
|
+
width - this.CONSTANTS.RIGHT_SVG_WIDTH - this.CONSTANTS.LEFT_RIGHT_SPACES
|
|
7099
6859
|
])
|
|
7100
|
-
.domain(data.map(
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
.padding(isMobile ? 0.2 : 0.5);
|
|
7104
|
-
var xScaleFromOrigin = d3
|
|
6860
|
+
.domain(data.map(d => d.name).reverse())
|
|
6861
|
+
.padding(device.isMobile ? 0.2 : 0.5);
|
|
6862
|
+
const xScaleFromOrigin = d3
|
|
7105
6863
|
.scaleBand()
|
|
7106
|
-
.rangeRound([width -
|
|
7107
|
-
.domain(data.map(
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
if (self.chartConfiguration.showXaxisTop) {
|
|
7115
|
-
svg
|
|
7116
|
-
.append('g')
|
|
7117
|
-
.attr('class', 'lib-line-axis-text lib-line-x-axis-text x-axis')
|
|
7118
|
-
.attr('style', self.chartConfiguration.xAxisCustomTextStyles)
|
|
7119
|
-
.call(d3.axisBottom(xScale).tickSize(0));
|
|
7120
|
-
svg.selectAll('.x-axis > g > text').attr('class', 'lib-display-hidden');
|
|
7121
|
-
}
|
|
7122
|
-
/**
|
|
7123
|
-
* draw second x axis on top
|
|
7124
|
-
*/
|
|
7125
|
-
// if (self.chartConfiguration.showXaxisAtTarget) {
|
|
7126
|
-
// svg
|
|
7127
|
-
// .append('g')
|
|
7128
|
-
// .attr('class', 'lib-line-axis-text lib-line-x-axis-text x-axis')
|
|
7129
|
-
// .attr('style', self.chartConfiguration.xAxisCustomTextStyles)
|
|
7130
|
-
// .call(d3.axisBottom(xScale).tickSize(0));
|
|
7131
|
-
// svg.selectAll('.x-axis > g > text').attr('class', 'lib-display-hidden');
|
|
7132
|
-
// }
|
|
7133
|
-
if (this.chartConfiguration.xAxisGrid) {
|
|
7134
|
-
for (var j = 0; j < this.chartConfiguration.xAxisGrid.length; j++) {
|
|
7135
|
-
svg
|
|
7136
|
-
.append('g')
|
|
7137
|
-
.attr('class', `x${j + 2} axis${j + 2}`)
|
|
7138
|
-
.style('color', 'var(--chart-grid-color)') // Use CSS variable instead of hardcoded
|
|
7139
|
-
.attr('transform', 'translate(0,' + height * this.chartConfiguration.xAxisGrid[j] + ')')
|
|
7140
|
-
.call(d3.axisBottom(xScale).tickSize(0).ticks(5).tickFormat(''))
|
|
7141
|
-
.style('fill', 'var(--chart-text-color)');
|
|
7142
|
-
}
|
|
7143
|
-
}
|
|
7144
|
-
let yScale = d3.scaleLinear().rangeRound([height, 0]);
|
|
7145
|
-
/**
|
|
7146
|
-
* update max vakues so that the vakue wont exceed the max limit
|
|
7147
|
-
* used by weekly charts
|
|
7148
|
-
*/
|
|
7149
|
-
var maxValue = d3.max(layers, (d) => d3.max(d, (d) => d[1]));
|
|
7150
|
-
if (maxValue == 0) {
|
|
7151
|
-
if (this.chartData.targetLineData) {
|
|
7152
|
-
maxValue = this.chartData.targetLineData.target + 20;
|
|
7153
|
-
}
|
|
7154
|
-
else {
|
|
7155
|
-
maxValue = 100;
|
|
7156
|
-
}
|
|
6864
|
+
.rangeRound([width - this.CONSTANTS.RIGHT_SVG_WIDTH, 0])
|
|
6865
|
+
.domain(data.map(d => d.name).reverse());
|
|
6866
|
+
const yScale = d3.scaleLinear().rangeRound([height, 0]);
|
|
6867
|
+
let maxValue = d3.max(layers, (d) => d3.max(d, (d) => d[1]));
|
|
6868
|
+
if (maxValue === 0) {
|
|
6869
|
+
maxValue = this.chartData.targetLineData
|
|
6870
|
+
? Number(this.chartData.targetLineData.target) + 20
|
|
6871
|
+
: 100;
|
|
7157
6872
|
}
|
|
7158
6873
|
if (this.chartConfiguration.customYscale) {
|
|
7159
|
-
maxValue
|
|
6874
|
+
maxValue *= this.chartConfiguration.customYscale;
|
|
7160
6875
|
}
|
|
7161
|
-
if (this.chartData.targetLineData &&
|
|
7162
|
-
|
|
7163
|
-
maxValue =
|
|
7164
|
-
maxValue < 10 && this.chartData.targetLineData.target < 10
|
|
7165
|
-
? this.chartData.targetLineData.target + 3
|
|
7166
|
-
: this.chartData.targetLineData.target + 20;
|
|
6876
|
+
if (this.chartData.targetLineData && maxValue < Number(this.chartData.targetLineData.target)) {
|
|
6877
|
+
const target = Number(this.chartData.targetLineData.target);
|
|
6878
|
+
maxValue = maxValue < 10 && target < 10 ? target + 3 : target + 20;
|
|
7167
6879
|
}
|
|
7168
6880
|
yScale.domain([0, maxValue]).nice();
|
|
7169
|
-
let
|
|
7170
|
-
|
|
6881
|
+
let lineYscale = null;
|
|
6882
|
+
if (lineData) {
|
|
6883
|
+
lineYscale = d3
|
|
6884
|
+
.scaleLinear()
|
|
6885
|
+
.domain([0, d3.max(lineData, d => +d.value)])
|
|
6886
|
+
.range([height, 0]);
|
|
6887
|
+
}
|
|
6888
|
+
return { xScale, xScaleFromOrigin, yScale, lineYscale };
|
|
6889
|
+
}
|
|
6890
|
+
createAxes(scales) {
|
|
6891
|
+
const xAxis = d3
|
|
6892
|
+
.axisBottom(scales.xScale)
|
|
7171
6893
|
.tickSize(0)
|
|
7172
|
-
.tickFormat(
|
|
7173
|
-
|
|
7174
|
-
.axisLeft(yScale)
|
|
7175
|
-
.ticks(
|
|
6894
|
+
.tickFormat(this.chartConfiguration.xAxisLabelFomatter);
|
|
6895
|
+
const yAxis = d3
|
|
6896
|
+
.axisLeft(scales.yScale)
|
|
6897
|
+
.ticks(this.chartConfiguration.numberOfYTicks)
|
|
7176
6898
|
.tickSize(0)
|
|
7177
|
-
.tickFormat(
|
|
7178
|
-
let yLineAxis;
|
|
7179
|
-
if (lineYscale
|
|
6899
|
+
.tickFormat(this.chartConfiguration.yAxisLabelFomatter);
|
|
6900
|
+
let yLineAxis = null;
|
|
6901
|
+
if (scales.lineYscale) {
|
|
7180
6902
|
yLineAxis = d3
|
|
7181
|
-
.axisRight(lineYscale)
|
|
7182
|
-
.ticks(
|
|
6903
|
+
.axisRight(scales.lineYscale)
|
|
6904
|
+
.ticks(this.chartConfiguration.numberOfYTicks)
|
|
7183
6905
|
.tickSize(0)
|
|
7184
|
-
.tickFormat(
|
|
7185
|
-
}
|
|
7186
|
-
/**
|
|
7187
|
-
* between x-axis label used by weekly charts
|
|
7188
|
-
* isXgridBetweenLabels will be undefined for dashboard charts
|
|
7189
|
-
*/
|
|
7190
|
-
if (self.chartConfiguration.isXgridBetweenLabels) {
|
|
7191
|
-
svg
|
|
7192
|
-
.append('g')
|
|
7193
|
-
.attr('class', 'grid')
|
|
7194
|
-
.attr('transform', 'translate(' + xScale.bandwidth() / 2 + ',' + height + ')')
|
|
7195
|
-
.call(d3.axisBottom(xScale).tickSize(-height).tickFormat(''))
|
|
7196
|
-
.style('stroke-dasharray', '5 5')
|
|
7197
|
-
.style('color', '#999999')
|
|
7198
|
-
// .style("opacity", "0.5")
|
|
7199
|
-
.call((g) => g.select('.domain').remove());
|
|
6906
|
+
.tickFormat(this.chartConfiguration.yLineAxisLabelFomatter);
|
|
7200
6907
|
}
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
|
-
svg
|
|
7206
|
-
.append('g')
|
|
7207
|
-
.attr('class', 'grid')
|
|
7208
|
-
.call(d3
|
|
7209
|
-
.axisLeft(yScale)
|
|
7210
|
-
.ticks(self.chartConfiguration.numberOfYTicks)
|
|
7211
|
-
.tickSize(-width)
|
|
7212
|
-
.tickFormat(''))
|
|
7213
|
-
// Remove hardcoded colors and use CSS variables
|
|
7214
|
-
.style('color', 'var(--chart-grid-color)')
|
|
7215
|
-
.style('opacity', '1');
|
|
7216
|
-
// .call((g) => g.select('.domain').remove());
|
|
7217
|
-
}
|
|
7218
|
-
var layer = svg
|
|
6908
|
+
return { xAxis, yAxis, yLineAxis };
|
|
6909
|
+
}
|
|
6910
|
+
renderBars(svg, layers, scales, metaData, dimensions, device) {
|
|
6911
|
+
const layer = svg
|
|
7219
6912
|
.selectAll('.layer')
|
|
7220
6913
|
.data(layers)
|
|
7221
6914
|
.enter()
|
|
7222
6915
|
.append('g')
|
|
7223
6916
|
.attr('class', 'layer')
|
|
7224
|
-
.style('fill',
|
|
7225
|
-
|
|
7226
|
-
});
|
|
7227
|
-
var rect = layer
|
|
6917
|
+
.style('fill', (d) => metaData.colors[d.key]);
|
|
6918
|
+
const rect = layer
|
|
7228
6919
|
.selectAll('rect')
|
|
7229
|
-
.data(
|
|
7230
|
-
return d;
|
|
7231
|
-
})
|
|
6920
|
+
.data((d) => d)
|
|
7232
6921
|
.enter();
|
|
6922
|
+
this.appendRectangles(rect, scales, metaData, dimensions, device);
|
|
6923
|
+
this.addInteractions(rect, svg, metaData, scales);
|
|
6924
|
+
return rect;
|
|
6925
|
+
}
|
|
6926
|
+
appendRectangles(rect, scales, metaData, dimensions, device) {
|
|
6927
|
+
const { barWidth, barPadding } = dimensions;
|
|
6928
|
+
const { xScale, yScale } = scales;
|
|
7233
6929
|
rect
|
|
7234
6930
|
.append('rect')
|
|
7235
|
-
.on('click',
|
|
7236
|
-
if (!lineData ||
|
|
7237
|
-
if (!metaData.barWithoutClick
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
self.handleClick(d.data.name);
|
|
6931
|
+
.on('click', (d) => {
|
|
6932
|
+
if (!this.chartData.lineData || this.chartConfiguration.forComparison) {
|
|
6933
|
+
if (!metaData.barWithoutClick?.includes(d.data.name.toLowerCase())) {
|
|
6934
|
+
this.handleClick(d.data.name);
|
|
6935
|
+
}
|
|
7241
6936
|
}
|
|
7242
6937
|
})
|
|
7243
|
-
.attr('y',
|
|
6938
|
+
.attr('y', (d) => {
|
|
7244
6939
|
if (!isNaN(d[0]) && !isNaN(d[1])) {
|
|
7245
6940
|
const actualHeight = yScale(d[0]) - yScale(d[1]);
|
|
7246
6941
|
return actualHeight < 3 ? yScale(d[0]) - 3 : yScale(d[1]);
|
|
7247
6942
|
}
|
|
7248
6943
|
return 0;
|
|
7249
6944
|
})
|
|
7250
|
-
.attr('x',
|
|
7251
|
-
if (isMobile) {
|
|
7252
|
-
|
|
7253
|
-
return leftAndRightSpaces + i * (barWidth + barPadding);
|
|
6945
|
+
.attr('x', (d, i) => {
|
|
6946
|
+
if (device.isMobile) {
|
|
6947
|
+
return this.CONSTANTS.LEFT_RIGHT_SPACES + i * (barWidth + barPadding);
|
|
7254
6948
|
}
|
|
7255
|
-
if (
|
|
6949
|
+
if (!this.chartConfiguration.isMultiChartGridLine) {
|
|
7256
6950
|
return xScale(d.data.name);
|
|
7257
6951
|
}
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
self.chartData.data.length <= 3) {
|
|
7261
|
-
return xScale(d.data.name) + xScale.bandwidth() / 2 - 35;
|
|
7262
|
-
}
|
|
7263
|
-
return xScale(d.data.name) + xScale.bandwidth() * 0.1;
|
|
6952
|
+
if (this.chartConfiguration.isDrilldownChart && this.chartData.data.length <= 3) {
|
|
6953
|
+
return xScale(d.data.name) + xScale.bandwidth() / 2 - 35;
|
|
7264
6954
|
}
|
|
6955
|
+
return xScale(d.data.name) + xScale.bandwidth() * 0.1;
|
|
7265
6956
|
})
|
|
7266
|
-
.attr('height',
|
|
6957
|
+
.attr('height', (d) => {
|
|
7267
6958
|
if (!isNaN(d[0]) && !isNaN(d[1])) {
|
|
7268
6959
|
const actualHeight = yScale(d[0]) - yScale(d[1]);
|
|
7269
6960
|
return actualHeight < 3 ? 3 : actualHeight;
|
|
7270
6961
|
}
|
|
7271
6962
|
return 0;
|
|
7272
6963
|
})
|
|
7273
|
-
.attr('width',
|
|
7274
|
-
|
|
7275
|
-
if (isMobile) {
|
|
6964
|
+
.attr('width', (d) => {
|
|
6965
|
+
if (device.isMobile)
|
|
7276
6966
|
return barWidth;
|
|
6967
|
+
if (!this.chartConfiguration.isMultiChartGridLine)
|
|
6968
|
+
return xScale.bandwidth();
|
|
6969
|
+
if (this.chartConfiguration.isDrilldownChart && this.chartData.data.length <= 3) {
|
|
6970
|
+
return 70;
|
|
7277
6971
|
}
|
|
7278
|
-
return
|
|
7279
|
-
? xScale.bandwidth()
|
|
7280
|
-
: self.chartConfiguration.isDrilldownChart &&
|
|
7281
|
-
self.chartData.data.length <= 3
|
|
7282
|
-
? 70
|
|
7283
|
-
: xScale.bandwidth() * 0.8;
|
|
6972
|
+
return xScale.bandwidth() * 0.8;
|
|
7284
6973
|
})
|
|
7285
|
-
|
|
7286
|
-
.style('cursor', function (d) {
|
|
6974
|
+
.style('cursor', (d) => {
|
|
7287
6975
|
if (metaData.hasDrillDown) {
|
|
7288
|
-
if (metaData.barWithoutClick.
|
|
7289
|
-
metaData.barWithoutClick.includes(d.data.name.toLowerCase())) {
|
|
6976
|
+
if (metaData.barWithoutClick?.includes(d.data.name.toLowerCase())) {
|
|
7290
6977
|
return 'default';
|
|
7291
6978
|
}
|
|
7292
6979
|
return 'pointer';
|
|
7293
6980
|
}
|
|
7294
|
-
|
|
7295
|
-
return 'default';
|
|
6981
|
+
return 'default';
|
|
7296
6982
|
})
|
|
7297
|
-
.style('fill',
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
return metaData.colors[d.key];
|
|
7305
|
-
});
|
|
7306
|
-
/**
|
|
7307
|
-
* do not show valus on hover as its alreay dislayed
|
|
7308
|
-
*/
|
|
7309
|
-
if (!this.isCC && !self.chartConfiguration.isMultiChartGridLine) {
|
|
7310
|
-
rect
|
|
7311
|
-
.append('svg:title') // TITLE APPENDED HERE
|
|
7312
|
-
.text(function (d) {
|
|
7313
|
-
return d[1] - d[0];
|
|
7314
|
-
});
|
|
6983
|
+
.style('fill', (d) => this.getBarColor(d, metaData));
|
|
6984
|
+
}
|
|
6985
|
+
getBarColor(d, metaData) {
|
|
6986
|
+
if (!isNaN(d[0]) &&
|
|
6987
|
+
!isNaN(d[1]) &&
|
|
6988
|
+
this.chartData.targetLineData &&
|
|
6989
|
+
parseFloat(d[1]) - parseFloat(d[0]) >= parseFloat(String(this.chartData.targetLineData.target))) {
|
|
6990
|
+
return this.chartData.targetLineData.barAboveTargetColor || metaData.colors[d.key];
|
|
7315
6991
|
}
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
|
|
7323
|
-
|
|
7324
|
-
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
|
|
7328
|
-
|
|
7329
|
-
|
|
7330
|
-
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
}
|
|
7355
|
-
else
|
|
7356
|
-
return;
|
|
7357
|
-
}
|
|
7358
|
-
});
|
|
7359
|
-
}
|
|
7360
|
-
/**
|
|
7361
|
-
svg
|
|
6992
|
+
return metaData.colors[d.key];
|
|
6993
|
+
}
|
|
6994
|
+
addInteractions(rect, svg, metaData, scales) {
|
|
6995
|
+
rect
|
|
6996
|
+
.selectAll('rect')
|
|
6997
|
+
.on('mouseenter', (d) => this.handleMouseOver(d, svg, metaData, scales))
|
|
6998
|
+
.on('mouseout', (d) => this.handleMouseOut(svg, metaData));
|
|
6999
|
+
}
|
|
7000
|
+
handleMouseOver(d, svg, metaData, scales) {
|
|
7001
|
+
if (!this.chartConfiguration.displayTitleOnTop)
|
|
7002
|
+
return;
|
|
7003
|
+
svg.selectAll('rect')
|
|
7004
|
+
.filter((data) => data === d)
|
|
7005
|
+
.style('fill', (d) => this.getHoverColor(d, metaData));
|
|
7006
|
+
this.displayTooltip(d, svg, metaData, scales);
|
|
7007
|
+
}
|
|
7008
|
+
getHoverColor(d, metaData) {
|
|
7009
|
+
if (!isNaN(d[0]) &&
|
|
7010
|
+
!isNaN(d[1]) &&
|
|
7011
|
+
this.chartData.targetLineData &&
|
|
7012
|
+
parseFloat(d[1]) - parseFloat(d[0]) >= parseFloat(String(this.chartData.targetLineData.target))) {
|
|
7013
|
+
return this.chartData.targetLineData.barAboveTargetHoverColor ||
|
|
7014
|
+
this.chartData.targetLineData.barAboveTargetColor ||
|
|
7015
|
+
metaData.colors[d.key];
|
|
7016
|
+
}
|
|
7017
|
+
return metaData.hoverColor || metaData.colors[d.key];
|
|
7018
|
+
}
|
|
7019
|
+
displayTooltip(d, svg, metaData, scales) {
|
|
7020
|
+
const { xScale, yScale } = scales;
|
|
7021
|
+
const value = d[1] - d[0];
|
|
7022
|
+
if (isNaN(value))
|
|
7023
|
+
return;
|
|
7024
|
+
const width = /week/i.test(d.data.name) && /\d{4}-\d{2}-\d{2}/.test(d.data.name)
|
|
7025
|
+
? '250px'
|
|
7026
|
+
: xScale.bandwidth() + this.CONSTANTS.LEFT_RIGHT_SPACES * 2 > 180
|
|
7027
|
+
? '180px'
|
|
7028
|
+
: xScale.bandwidth() + this.CONSTANTS.LEFT_RIGHT_SPACES * 2;
|
|
7029
|
+
svg
|
|
7362
7030
|
.append('foreignObject')
|
|
7363
|
-
.attr('
|
|
7031
|
+
.attr('x', this.calculateTooltipX(d, xScale, width))
|
|
7032
|
+
.attr('class', 'lib-verticalstack-title-ontop')
|
|
7033
|
+
.attr('y', yScale(d[1]) - 51)
|
|
7364
7034
|
.attr('width', width)
|
|
7365
|
-
.attr('height',
|
|
7035
|
+
.attr('height', 40)
|
|
7366
7036
|
.append('xhtml:div')
|
|
7367
|
-
.attr('class', '
|
|
7368
|
-
.style('
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
|
|
7373
|
-
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
leftAndRightSpaces +
|
|
7401
|
-
(xScale.bandwidth() + leftAndRightSpaces * 2 - 180) / 2);
|
|
7402
|
-
}
|
|
7403
|
-
return xScale(d.data.name) - leftAndRightSpaces;
|
|
7404
|
-
})
|
|
7405
|
-
.attr('class', 'lib-verticalstack-title-ontop')
|
|
7406
|
-
.attr('y', function () {
|
|
7407
|
-
// Increase the gap between the bar and the tooltip (was -1 - 40)
|
|
7408
|
-
return yScale(d[1]) - 1 - 50; // 10px more gap
|
|
7409
|
-
})
|
|
7410
|
-
.attr('dy', function () {
|
|
7411
|
-
return d.class;
|
|
7412
|
-
})
|
|
7413
|
-
.attr('width', function () {
|
|
7414
|
-
if (d.data.name && /week/i.test(d.data.name) && /\d{4}-\d{2}-\d{2}/.test(d.data.name)) {
|
|
7415
|
-
return '250px'; // increase for week + date
|
|
7416
|
-
}
|
|
7417
|
-
if (xScale.bandwidth() + leftAndRightSpaces * 2 > 180) {
|
|
7418
|
-
return '180px';
|
|
7419
|
-
}
|
|
7420
|
-
return xScale.bandwidth() + leftAndRightSpaces * 2;
|
|
7421
|
-
})
|
|
7422
|
-
.attr('height', 40)
|
|
7423
|
-
.append('xhtml:div')
|
|
7424
|
-
.attr('class', 'title')
|
|
7425
|
-
.style('z-index', 99)
|
|
7426
|
-
.html(function () {
|
|
7427
|
-
// Tooltip content without any arrow mark
|
|
7428
|
-
if (!isNaN(d[1] - d[0])) {
|
|
7429
|
-
if (d[1] - d[0] === 0) {
|
|
7430
|
-
return '<span class="title-top-text">0</span>';
|
|
7431
|
-
}
|
|
7432
|
-
var dataType = metaData.dataType ? metaData.dataType : '';
|
|
7433
|
-
var desiredText = '';
|
|
7434
|
-
// Always show the full x-axis label (category name) in the tooltip
|
|
7435
|
-
desiredText =
|
|
7436
|
-
'<span class="title-bar-name">' +
|
|
7437
|
-
(d.data.name ? d.data.name : '') +
|
|
7438
|
-
'</span>';
|
|
7439
|
-
desiredText += metaData.unit
|
|
7440
|
-
? '<span class="title-top-text">' +
|
|
7441
|
-
metaData.unit +
|
|
7442
|
-
(d[1] - d[0]) + ' ' +
|
|
7443
|
-
dataType +
|
|
7444
|
-
'</span>'
|
|
7445
|
-
: '<span class="title-top-text">' +
|
|
7446
|
-
(d[1] - d[0]) + ' ' +
|
|
7447
|
-
dataType +
|
|
7448
|
-
'</span>';
|
|
7449
|
-
// No arrow mark or arrow HTML/CSS in tooltip
|
|
7450
|
-
return desiredText;
|
|
7451
|
-
}
|
|
7452
|
-
else
|
|
7453
|
-
return;
|
|
7454
|
-
});
|
|
7037
|
+
.attr('class', 'title')
|
|
7038
|
+
.style('z-index', 99)
|
|
7039
|
+
.html(this.generateTooltipHtml(d, metaData, value));
|
|
7040
|
+
}
|
|
7041
|
+
calculateTooltipX(d, xScale, width) {
|
|
7042
|
+
const bandwidth = xScale.bandwidth();
|
|
7043
|
+
const numericWidth = typeof width === 'string' ? parseInt(width) : width;
|
|
7044
|
+
if (bandwidth + this.CONSTANTS.LEFT_RIGHT_SPACES * 2 > 180) {
|
|
7045
|
+
return xScale(d.data.name) - this.CONSTANTS.LEFT_RIGHT_SPACES +
|
|
7046
|
+
(bandwidth + this.CONSTANTS.LEFT_RIGHT_SPACES * 2 - 180) / 2;
|
|
7047
|
+
}
|
|
7048
|
+
return xScale(d.data.name) - this.CONSTANTS.LEFT_RIGHT_SPACES;
|
|
7049
|
+
}
|
|
7050
|
+
generateTooltipHtml(d, metaData, value) {
|
|
7051
|
+
if (value === 0)
|
|
7052
|
+
return '<span class="title-top-text">0</span>';
|
|
7053
|
+
const dataType = metaData.dataType || '';
|
|
7054
|
+
const name = d.data.name ? `<span class="title-bar-name">${d.data.name}</span>` : '';
|
|
7055
|
+
const valueText = metaData.unit
|
|
7056
|
+
? `${metaData.unit}${value} ${dataType}`
|
|
7057
|
+
: `${value} ${dataType}`;
|
|
7058
|
+
return `${name}<span class="title-top-text">${valueText}</span>`;
|
|
7059
|
+
}
|
|
7060
|
+
handleMouseOut(svg, metaData) {
|
|
7061
|
+
if (!this.chartConfiguration.displayTitleOnTop)
|
|
7062
|
+
return;
|
|
7063
|
+
svg.selectAll('rect')
|
|
7064
|
+
.style('fill', (d) => this.getBarColor(d, metaData));
|
|
7065
|
+
svg.selectAll('.lib-verticalstack-title-ontop').remove();
|
|
7066
|
+
}
|
|
7067
|
+
renderAxisLabels(svg, svgYAxisLeft, metaData, dimensions, margin) {
|
|
7068
|
+
if (metaData.yLabel) {
|
|
7069
|
+
this.addYAxisLabel(svgYAxisLeft, metaData.yLabel, dimensions.height, margin);
|
|
7455
7070
|
}
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
return;
|
|
7459
|
-
}
|
|
7460
|
-
// svg.selectAll('rect').style('fill', metaData.colors[d.key]);
|
|
7461
|
-
svg.selectAll('rect').style('fill', function (d) {
|
|
7462
|
-
if (!isNaN(d[0]) &&
|
|
7463
|
-
!isNaN(d[1]) &&
|
|
7464
|
-
self.chartData.targetLineData &&
|
|
7465
|
-
parseFloat(d[1]) - parseFloat(d[0]) >=
|
|
7466
|
-
parseFloat(self.chartData.targetLineData.target))
|
|
7467
|
-
return self.chartData?.targetLineData?.barAboveTargetColor;
|
|
7468
|
-
return metaData.colors[d.key];
|
|
7469
|
-
});
|
|
7470
|
-
svg.selectAll('.lib-verticalstack-title-ontop').remove();
|
|
7071
|
+
if (metaData.xLabel) {
|
|
7072
|
+
this.addXAxisLabel(svg, metaData.xLabel, dimensions.width, dimensions.height, margin);
|
|
7471
7073
|
}
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7074
|
+
}
|
|
7075
|
+
addYAxisLabel(svgYAxisLeft, label, height, margin) {
|
|
7076
|
+
const isria = this.customChartConfiguration?.isRia;
|
|
7077
|
+
const isAcronym = this.isAcronymLabel(label);
|
|
7078
|
+
const yPosition = isria ? -margin.left / 2 - 30 : -margin.left / 2 - 40;
|
|
7079
|
+
svgYAxisLeft.selectAll('.lib-axis-group-label, .lib-ylabel-drilldowncharts, .lib-ylabel-weeklyCharts').remove();
|
|
7080
|
+
svgYAxisLeft
|
|
7081
|
+
.append('text')
|
|
7082
|
+
.attr('class', this.getYAxisLabelClass())
|
|
7083
|
+
.attr('style', this.chartConfiguration.yAxisCustomlabelStyles)
|
|
7084
|
+
.attr('transform', 'rotate(-90)')
|
|
7085
|
+
.attr('y', yPosition)
|
|
7086
|
+
.attr('x', -height / 2)
|
|
7087
|
+
.attr('dy', '1em')
|
|
7088
|
+
.style('text-anchor', 'middle')
|
|
7089
|
+
.style('fill', 'var(--chart-text-color)')
|
|
7090
|
+
.text(isAcronym ? label.toUpperCase() : label.toLowerCase())
|
|
7091
|
+
.style('text-transform', isAcronym ? 'none' : 'capitalize');
|
|
7092
|
+
}
|
|
7093
|
+
addXAxisLabel(svg, label, width, height, margin) {
|
|
7094
|
+
const isria = this.customChartConfiguration?.isRia;
|
|
7095
|
+
const isAcronym = this.isAcronymLabel(label);
|
|
7096
|
+
const xPosition = isria
|
|
7097
|
+
? height + margin.top + margin.bottom
|
|
7098
|
+
: height + margin.top + margin.bottom + 10;
|
|
7099
|
+
svg
|
|
7100
|
+
.append('text')
|
|
7101
|
+
.attr('class', this.getXAxisLabelClass())
|
|
7102
|
+
.attr('style', this.chartConfiguration.xAxisCustomlabelStyles)
|
|
7103
|
+
.attr('transform', `translate(${width / 2},${xPosition})`)
|
|
7104
|
+
.style('text-anchor', 'middle')
|
|
7105
|
+
.style('fill', 'var(--chart-text-color)')
|
|
7106
|
+
.text(isAcronym ? label.toUpperCase() : label.toLowerCase())
|
|
7107
|
+
.style('text-transform', isAcronym ? 'none' : 'capitalize');
|
|
7108
|
+
}
|
|
7109
|
+
isAcronymLabel(label) {
|
|
7110
|
+
const cleanLabel = label.replace(/[^A-Za-z]/g, '');
|
|
7111
|
+
return (label.length <= 4 && /^[A-Z]+$/.test(label)) ||
|
|
7112
|
+
(label === label.toUpperCase() && /[A-Z]/.test(label));
|
|
7113
|
+
}
|
|
7114
|
+
getYAxisLabelClass() {
|
|
7115
|
+
let baseClass = 'lib-axis-group-label font-size-1';
|
|
7116
|
+
if (this.chartConfiguration.isDrilldownChart) {
|
|
7117
|
+
return `${baseClass} lib-ylabel-drilldowncharts`;
|
|
7507
7118
|
}
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
* used by weekly charts
|
|
7511
|
-
*/
|
|
7512
|
-
if (this.chartConfiguration.showAngledLabels != undefined) {
|
|
7513
|
-
rect
|
|
7514
|
-
.append('text')
|
|
7515
|
-
.attr('x', 0)
|
|
7516
|
-
.attr('fill', function (d, i) {
|
|
7517
|
-
return metaData.colors[d.key];
|
|
7518
|
-
})
|
|
7519
|
-
.attr('class', 'lib-data-labels-angled-weeklycharts')
|
|
7520
|
-
.attr('y', 0)
|
|
7521
|
-
.attr('dy', function (d) {
|
|
7522
|
-
return d.class;
|
|
7523
|
-
})
|
|
7524
|
-
.text(function (d) {
|
|
7525
|
-
if (!isNaN(d[1] - d[0]) && d[1] - d[0] > 0) {
|
|
7526
|
-
if (d[1] - d[0] <= 999)
|
|
7527
|
-
return metaData.unit
|
|
7528
|
-
? metaData.unit + formatFromBackend(d[1] - d[0])
|
|
7529
|
-
: formatFromBackend(d[1] - d[0]);
|
|
7530
|
-
else
|
|
7531
|
-
return metaData.unit + formatForHugeNumbers(d[1] - d[0]);
|
|
7532
|
-
}
|
|
7533
|
-
else
|
|
7534
|
-
return;
|
|
7535
|
-
})
|
|
7536
|
-
.attr('transform', function (d) {
|
|
7537
|
-
if (!isNaN(d[1] - d[0]) && d[1] - d[0] > 0) {
|
|
7538
|
-
var total = 0;
|
|
7539
|
-
var incrementer = 1;
|
|
7540
|
-
metaData.keyList.forEach((key) => {
|
|
7541
|
-
if (d.data[key])
|
|
7542
|
-
total = total + d.data[key];
|
|
7543
|
-
else
|
|
7544
|
-
incrementer = 2;
|
|
7545
|
-
});
|
|
7546
|
-
if (tempObjectHolder[d.data.name] == undefined) {
|
|
7547
|
-
tempObjectHolder[d.data.name] = 1;
|
|
7548
|
-
}
|
|
7549
|
-
else {
|
|
7550
|
-
tempObjectHolder[d.data.name] =
|
|
7551
|
-
tempObjectHolder[d.data.name] + incrementer;
|
|
7552
|
-
}
|
|
7553
|
-
switch (tempObjectHolder[d.data.name]) {
|
|
7554
|
-
case 1:
|
|
7555
|
-
return ('translate(' +
|
|
7556
|
-
(xScale(d.data.name) + xScale.bandwidth() / 3) +
|
|
7557
|
-
',' +
|
|
7558
|
-
(yScale(total) - 3) +
|
|
7559
|
-
') rotate(270)');
|
|
7560
|
-
case 2:
|
|
7561
|
-
return ('translate(' +
|
|
7562
|
-
(xScale(d.data.name) + xScale.bandwidth() / 2 + 2) +
|
|
7563
|
-
',' +
|
|
7564
|
-
(yScale(total) - 3) +
|
|
7565
|
-
') rotate(270)');
|
|
7566
|
-
default:
|
|
7567
|
-
return ('translate(' +
|
|
7568
|
-
(xScale(d.data.name) + (xScale.bandwidth() * 3) / 4) +
|
|
7569
|
-
',' +
|
|
7570
|
-
(yScale(total) - 3) +
|
|
7571
|
-
') rotate(270)');
|
|
7572
|
-
}
|
|
7573
|
-
}
|
|
7574
|
-
return 'rotate(0)';
|
|
7575
|
-
});
|
|
7119
|
+
if (this.chartConfiguration.isMultiChartGridLine !== undefined) {
|
|
7120
|
+
return `${baseClass} lib-ylabel-weeklyCharts`;
|
|
7576
7121
|
}
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
svg.append('text')
|
|
7584
|
-
.attr('class', 'custom-x-label')
|
|
7585
|
-
.attr('x', 0)
|
|
7586
|
-
.attr('y', height + 18)
|
|
7587
|
-
.attr('text-anchor', 'middle')
|
|
7588
|
-
.attr('transform', 'translate(' + (xVal + 20) + ',0)') // current value + 20
|
|
7589
|
-
.style('font-size', '10px')
|
|
7590
|
-
.style('fill', 'var(--chart-text-color)')
|
|
7591
|
-
.style('writing-mode', 'sideways-lr') // writing mode for mobile
|
|
7592
|
-
.text(d.name.substring(0, 3));
|
|
7593
|
-
});
|
|
7594
|
-
}
|
|
7595
|
-
else {
|
|
7596
|
-
svg
|
|
7597
|
-
.append('g')
|
|
7598
|
-
.attr('transform', 'translate(0,' + height + ')')
|
|
7599
|
-
.attr('class', 'lib-stacked-x-axis-text')
|
|
7600
|
-
.call(xAxis)
|
|
7601
|
-
.selectAll('text')
|
|
7602
|
-
.style('fill', 'var(--chart-text-color)')
|
|
7603
|
-
.style('font-size', '12px')
|
|
7604
|
-
.attr('text-anchor', 'middle')
|
|
7605
|
-
.attr('dx', '0')
|
|
7606
|
-
.attr('dy', '0.71em')
|
|
7607
|
-
.attr('transform', null)
|
|
7608
|
-
.text(function (d) {
|
|
7609
|
-
return d;
|
|
7610
|
-
});
|
|
7611
|
-
}
|
|
7612
|
-
svg
|
|
7613
|
-
.append('g')
|
|
7614
|
-
.attr('class', 'lib-stacked-y-axis-text')
|
|
7615
|
-
.attr('style', self.chartConfiguration.yAxisCustomTextStyles)
|
|
7616
|
-
.attr('transform', 'translate(0,0)')
|
|
7617
|
-
.call(yAxis)
|
|
7618
|
-
.selectAll('text')
|
|
7619
|
-
.style('fill', 'var(--chart-text-color)');
|
|
7122
|
+
return `${baseClass} lib-axis-waterfall-label`;
|
|
7123
|
+
}
|
|
7124
|
+
getXAxisLabelClass() {
|
|
7125
|
+
let baseClass = 'lib-axis-group-label font-size-1';
|
|
7126
|
+
if (this.chartConfiguration.isDrilldownChart) {
|
|
7127
|
+
return `${baseClass} lib-xlabel-drilldowncharts`;
|
|
7620
7128
|
}
|
|
7621
|
-
|
|
7129
|
+
if (this.chartConfiguration.isMultiChartGridLine !== undefined) {
|
|
7130
|
+
return `${baseClass} lib-xlabel-weeklyCharts`;
|
|
7131
|
+
}
|
|
7132
|
+
return `${baseClass} lib-axis-waterfall-label`;
|
|
7133
|
+
}
|
|
7134
|
+
applyConfigurationFlags() {
|
|
7135
|
+
if (this.chartConfiguration.isHeaderVisible !== undefined) {
|
|
7136
|
+
this.isHeaderVisible = this.chartConfiguration.isHeaderVisible;
|
|
7137
|
+
}
|
|
7138
|
+
if (this.chartConfiguration.isTopCaptionVisible !== undefined) {
|
|
7139
|
+
this.isTopCaptionVisible = this.chartConfiguration.isTopCaptionVisible;
|
|
7140
|
+
}
|
|
7141
|
+
if (this.chartConfiguration.isTransparentBackground !== undefined) {
|
|
7142
|
+
this.isTransparentBackground = this.chartConfiguration.isTransparentBackground;
|
|
7143
|
+
}
|
|
7144
|
+
}
|
|
7145
|
+
initializeStackedChart() {
|
|
7146
|
+
const device = this.getDeviceConfig();
|
|
7147
|
+
this.configureResponsiveSettings(device);
|
|
7148
|
+
this.mergeConfigurations();
|
|
7149
|
+
this.applyConfigurationFlags();
|
|
7150
|
+
const data = this.chartData.data;
|
|
7151
|
+
const metaData = this.prepareMetaData(this.chartData.metaData);
|
|
7152
|
+
const lineData = this.chartData.lineData;
|
|
7153
|
+
const colors = metaData.colors;
|
|
7154
|
+
const keyList = metaData.keyList;
|
|
7155
|
+
const chartContainer = d3.select(this.containerElt.nativeElement);
|
|
7156
|
+
const verticalstackedcontainer = d3.select(this.verticalstackedcontainerElt.nativeElement);
|
|
7157
|
+
const margin = this.chartConfiguration.margin;
|
|
7158
|
+
const dimensions = this.calculateDimensions(chartContainer, verticalstackedcontainer, margin, device, data.length);
|
|
7159
|
+
const { svg, svgYAxisLeft, svgYAxisRight } = this.createSvgContainers(chartContainer, dimensions, margin);
|
|
7160
|
+
// Create stack and layers
|
|
7161
|
+
const stack = d3.stack().keys(keyList).offset(d3.stackOffsetNone);
|
|
7162
|
+
const layers = stack(data);
|
|
7163
|
+
data.sort((a, b) => b.total - a.total);
|
|
7164
|
+
const scales = this.createScales(data, layers, lineData, dimensions, device);
|
|
7165
|
+
const axes = this.createAxes(scales);
|
|
7166
|
+
// Render chart elements
|
|
7167
|
+
this.renderGrids(svg, scales, dimensions);
|
|
7168
|
+
const rect = this.renderBars(svg, layers, scales, metaData, dimensions, device);
|
|
7169
|
+
this.renderAxes(svg, svgYAxisLeft, svgYAxisRight, axes, scales, dimensions, device, data);
|
|
7170
|
+
this.renderAxisLabels(svg, svgYAxisLeft, metaData, dimensions, margin);
|
|
7171
|
+
this.renderTargetLine(svg, svgYAxisRight, scales, dimensions, metaData);
|
|
7172
|
+
this.renderDataLabels(rect, scales, metaData, dimensions);
|
|
7173
|
+
this.renderLineChart(svg, lineData, scales, colors, metaData);
|
|
7174
|
+
}
|
|
7175
|
+
renderGrids(svg, scales, dimensions) {
|
|
7176
|
+
if (this.chartConfiguration.isXgridBetweenLabels) {
|
|
7622
7177
|
svg
|
|
7623
7178
|
.append('g')
|
|
7624
|
-
.attr('
|
|
7625
|
-
.attr('
|
|
7626
|
-
.call(
|
|
7627
|
-
.style('
|
|
7628
|
-
|
|
7629
|
-
.
|
|
7630
|
-
.attr('class', 'lib-yaxis-labels-texts-drilldown yaxis-dashed')
|
|
7631
|
-
.attr('style', self.chartConfiguration.yAxisCustomTextStyles)
|
|
7632
|
-
.attr('transform', 'translate(0,0)')
|
|
7633
|
-
.call(yAxis)
|
|
7634
|
-
.selectAll('text')
|
|
7635
|
-
.style('fill', 'var(--chart-text-color)');
|
|
7636
|
-
svgYAxisRight
|
|
7637
|
-
.append('g')
|
|
7638
|
-
.attr('class', 'lib-yaxis-labels-texts-drilldown yaxis-dashed')
|
|
7639
|
-
.attr('style', self.chartConfiguration.yAxisCustomTextStyles)
|
|
7640
|
-
.attr('transform', 'translate(0,0)')
|
|
7641
|
-
.call(yAxis)
|
|
7642
|
-
.style('display', 'none');
|
|
7179
|
+
.attr('class', 'grid')
|
|
7180
|
+
.attr('transform', `translate(${scales.xScale.bandwidth() / 2},${dimensions.height})`)
|
|
7181
|
+
.call(d3.axisBottom(scales.xScale).tickSize(-dimensions.height).tickFormat(''))
|
|
7182
|
+
.style('stroke-dasharray', '5 5')
|
|
7183
|
+
.style('color', '#999999')
|
|
7184
|
+
.call((g) => g.select('.domain').remove());
|
|
7643
7185
|
}
|
|
7644
|
-
|
|
7186
|
+
if (this.chartConfiguration.yAxisGrid) {
|
|
7645
7187
|
svg
|
|
7646
7188
|
.append('g')
|
|
7647
|
-
.attr('
|
|
7648
|
-
.
|
|
7649
|
-
.
|
|
7650
|
-
.
|
|
7651
|
-
.
|
|
7652
|
-
.
|
|
7189
|
+
.attr('class', 'grid')
|
|
7190
|
+
.call(d3
|
|
7191
|
+
.axisLeft(scales.yScale)
|
|
7192
|
+
.ticks(this.chartConfiguration.numberOfYTicks)
|
|
7193
|
+
.tickSize(-dimensions.width)
|
|
7194
|
+
.tickFormat(''))
|
|
7195
|
+
.style('color', 'var(--chart-grid-color)')
|
|
7196
|
+
.style('opacity', '1');
|
|
7197
|
+
}
|
|
7198
|
+
if (this.chartConfiguration.xAxisGrid) {
|
|
7199
|
+
for (let j = 0; j < this.chartConfiguration.xAxisGrid.length; j++) {
|
|
7200
|
+
svg
|
|
7201
|
+
.append('g')
|
|
7202
|
+
.attr('class', `x${j + 2} axis${j + 2}`)
|
|
7203
|
+
.style('color', 'var(--chart-grid-color)')
|
|
7204
|
+
.attr('transform', `translate(0,${dimensions.height * this.chartConfiguration.xAxisGrid[j]})`)
|
|
7205
|
+
.call(d3.axisBottom(scales.xScale).tickSize(0).ticks(5).tickFormat(''))
|
|
7206
|
+
.style('fill', 'var(--chart-text-color)');
|
|
7207
|
+
}
|
|
7208
|
+
}
|
|
7209
|
+
}
|
|
7210
|
+
renderAxes(svg, svgYAxisLeft, svgYAxisRight, axes, scales, dimensions, device, data) {
|
|
7211
|
+
if (this.chartConfiguration.showXaxisTop) {
|
|
7653
7212
|
svg
|
|
7654
7213
|
.append('g')
|
|
7655
|
-
.attr('class', 'lib-
|
|
7656
|
-
.attr('style',
|
|
7657
|
-
.
|
|
7658
|
-
|
|
7659
|
-
.selectAll('text')
|
|
7660
|
-
.style('fill', 'var(--chart-text-color)');
|
|
7214
|
+
.attr('class', 'lib-line-axis-text lib-line-x-axis-text x-axis')
|
|
7215
|
+
.attr('style', this.chartConfiguration.xAxisCustomTextStyles)
|
|
7216
|
+
.call(d3.axisBottom(scales.xScale).tickSize(0));
|
|
7217
|
+
svg.selectAll('.x-axis > g > text').attr('class', 'lib-display-hidden');
|
|
7661
7218
|
}
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
d3.selectAll('g.lib-stacked-x-axis-text g.tick text').attr('y', function () {
|
|
7668
|
-
if (alternate_text) {
|
|
7669
|
-
alternate_text = false;
|
|
7670
|
-
return long_tick_length + 1;
|
|
7671
|
-
}
|
|
7672
|
-
else {
|
|
7673
|
-
alternate_text = true;
|
|
7674
|
-
return short_tick_length + 1;
|
|
7675
|
-
}
|
|
7676
|
-
});
|
|
7219
|
+
if (!this.chartConfiguration.isMultiChartGridLine) {
|
|
7220
|
+
this.renderStandardAxes(svg, axes, scales, dimensions, device, data);
|
|
7221
|
+
}
|
|
7222
|
+
else if (this.chartConfiguration.isDrilldownChart) {
|
|
7223
|
+
this.renderDrilldownAxes(svg, svgYAxisLeft, svgYAxisRight, axes, scales, dimensions);
|
|
7677
7224
|
}
|
|
7678
7225
|
else {
|
|
7679
|
-
|
|
7226
|
+
this.renderMultiChartAxes(svg, axes, scales, dimensions);
|
|
7680
7227
|
}
|
|
7681
|
-
|
|
7682
|
-
|
|
7683
|
-
|
|
7684
|
-
|
|
7685
|
-
if (
|
|
7686
|
-
this.
|
|
7687
|
-
d3.selectAll('.multichart > g > text').attr('class', 'lib-display-hidden');
|
|
7228
|
+
this.applyAxisStyling(svg, svgYAxisLeft, svgYAxisRight);
|
|
7229
|
+
this.applyAxisConfigurations(svg, scales, dimensions, data);
|
|
7230
|
+
}
|
|
7231
|
+
renderStandardAxes(svg, axes, scales, dimensions, device, data) {
|
|
7232
|
+
if (device.isMobile) {
|
|
7233
|
+
this.renderMobileXAxis(svg, data, dimensions);
|
|
7688
7234
|
}
|
|
7689
|
-
else
|
|
7690
|
-
svg
|
|
7691
|
-
.append('g')
|
|
7692
|
-
.attr('class', 'x1 axis1')
|
|
7693
|
-
.attr('transform', 'translate(0,' + height + ')')
|
|
7694
|
-
.style('color', '#000')
|
|
7695
|
-
.call(d3.axisBottom(xScale).tickSize(0))
|
|
7696
|
-
.call((g) => g.select('.domain').attr('fill', 'none'));
|
|
7235
|
+
else {
|
|
7697
7236
|
svg
|
|
7698
7237
|
.append('g')
|
|
7699
|
-
.attr('
|
|
7700
|
-
.attr('
|
|
7701
|
-
.
|
|
7702
|
-
.
|
|
7703
|
-
.
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
}
|
|
7710
|
-
/**
|
|
7711
|
-
* isNoAlternateXaxisText is used to prevent x-axis label to be displayed in alternate fashion
|
|
7712
|
-
* for future use
|
|
7713
|
-
*/
|
|
7714
|
-
if (alternate_text &&
|
|
7715
|
-
self.chartConfiguration.isNoAlternateXaxisText == undefined) {
|
|
7716
|
-
alternate_text = false;
|
|
7717
|
-
return long_tick_length_bg - 7;
|
|
7718
|
-
}
|
|
7719
|
-
else {
|
|
7720
|
-
alternate_text = true;
|
|
7721
|
-
return short_tick_length_bg - 4;
|
|
7722
|
-
}
|
|
7723
|
-
});
|
|
7724
|
-
/**
|
|
7725
|
-
* reset the flag so that texts also follow the pattern of ticks
|
|
7726
|
-
* used by weekly charts
|
|
7727
|
-
*/
|
|
7728
|
-
alternate_text = false;
|
|
7729
|
-
svg
|
|
7730
|
-
.selectAll('g.x1.axis1 g.tick text')
|
|
7731
|
-
// .attr('class', 'lib-xaxis-labels-texts-weeklycharts')
|
|
7732
|
-
.attr('class', function () {
|
|
7733
|
-
if (self.chartConfiguration.isDrilldownChart) {
|
|
7734
|
-
if (data && data.length > 8) {
|
|
7735
|
-
return 'lib-xaxis-labels-texts-drilldown-alt';
|
|
7736
|
-
}
|
|
7737
|
-
return 'lib-xaxis-labels-texts-drilldown';
|
|
7738
|
-
}
|
|
7739
|
-
else
|
|
7740
|
-
return 'lib-xaxis-labels-texts-weeklycharts';
|
|
7741
|
-
})
|
|
7742
|
-
.attr('y', function () {
|
|
7743
|
-
if (alternate_text) {
|
|
7744
|
-
alternate_text = false;
|
|
7745
|
-
return long_tick_length_bg;
|
|
7746
|
-
}
|
|
7747
|
-
else {
|
|
7748
|
-
alternate_text = true;
|
|
7749
|
-
return short_tick_length_bg;
|
|
7750
|
-
}
|
|
7751
|
-
});
|
|
7238
|
+
.attr('transform', `translate(0,${dimensions.height})`)
|
|
7239
|
+
.attr('class', 'lib-stacked-x-axis-text')
|
|
7240
|
+
.call(axes.xAxis)
|
|
7241
|
+
.selectAll('text')
|
|
7242
|
+
.style('fill', 'var(--chart-text-color)')
|
|
7243
|
+
.style('font-size', '12px')
|
|
7244
|
+
.attr('text-anchor', 'middle')
|
|
7245
|
+
.attr('dx', '0')
|
|
7246
|
+
.attr('dy', '0.71em')
|
|
7247
|
+
.attr('transform', null);
|
|
7752
7248
|
}
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
return d.toLowerCase();
|
|
7768
|
-
})
|
|
7769
|
-
.attr('transform', function (d, i) {
|
|
7770
|
-
if (isMobile) {
|
|
7771
|
-
var totalBars = 0;
|
|
7772
|
-
if (this.parentNode && this.parentNode.parentNode) {
|
|
7773
|
-
totalBars = d3.select(this.parentNode.parentNode).selectAll('g.tick').size();
|
|
7774
|
-
}
|
|
7775
|
-
if (totalBars === 2) {
|
|
7776
|
-
return 'translate(0,0)';
|
|
7777
|
-
}
|
|
7778
|
-
else {
|
|
7779
|
-
return 'translate(' + (i * 30) + ',0)';
|
|
7780
|
-
}
|
|
7781
|
-
}
|
|
7782
|
-
return null;
|
|
7783
|
-
});
|
|
7249
|
+
svg
|
|
7250
|
+
.append('g')
|
|
7251
|
+
.attr('class', 'lib-stacked-y-axis-text')
|
|
7252
|
+
.attr('style', this.chartConfiguration.yAxisCustomTextStyles)
|
|
7253
|
+
.call(axes.yAxis)
|
|
7254
|
+
.selectAll('text')
|
|
7255
|
+
.style('fill', 'var(--chart-text-color)');
|
|
7256
|
+
}
|
|
7257
|
+
renderMobileXAxis(svg, data, dimensions) {
|
|
7258
|
+
svg.selectAll('.custom-x-label').remove();
|
|
7259
|
+
data.forEach((d, i) => {
|
|
7260
|
+
const xVal = this.CONSTANTS.LEFT_RIGHT_SPACES +
|
|
7261
|
+
i * (dimensions.barWidth + dimensions.barPadding) +
|
|
7262
|
+
dimensions.barWidth / 2;
|
|
7784
7263
|
svg
|
|
7785
|
-
.selectAll('g.x1.axis1 g.tick')
|
|
7786
7264
|
.append('text')
|
|
7787
|
-
.attr('class', '
|
|
7788
|
-
.attr('
|
|
7789
|
-
.attr('
|
|
7790
|
-
.text
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7265
|
+
.attr('class', 'custom-x-label')
|
|
7266
|
+
.attr('x', 0)
|
|
7267
|
+
.attr('y', dimensions.height + 18)
|
|
7268
|
+
.attr('text-anchor', 'middle')
|
|
7269
|
+
.attr('transform', `translate(${xVal + 20},0)`)
|
|
7270
|
+
.style('font-size', '10px')
|
|
7271
|
+
.style('fill', 'var(--chart-text-color)')
|
|
7272
|
+
.style('writing-mode', 'sideways-lr')
|
|
7273
|
+
.text(d.name.substring(0, 3));
|
|
7274
|
+
});
|
|
7275
|
+
}
|
|
7276
|
+
renderDrilldownAxes(svg, svgYAxisLeft, svgYAxisRight, axes, scales, dimensions) {
|
|
7277
|
+
svg
|
|
7278
|
+
.append('g')
|
|
7279
|
+
.attr('transform', `translate(0,${dimensions.height})`)
|
|
7280
|
+
.attr('class', 'lib-stacked-x-axis-text multichart1')
|
|
7281
|
+
.call(axes.xAxis)
|
|
7282
|
+
.style('display', 'none');
|
|
7283
|
+
svgYAxisLeft
|
|
7284
|
+
.append('g')
|
|
7285
|
+
.attr('class', 'lib-yaxis-labels-texts-drilldown yaxis-dashed')
|
|
7286
|
+
.attr('style', this.chartConfiguration.yAxisCustomTextStyles)
|
|
7287
|
+
.call(axes.yAxis)
|
|
7288
|
+
.selectAll('text')
|
|
7289
|
+
.style('fill', 'var(--chart-text-color)');
|
|
7290
|
+
svgYAxisRight
|
|
7291
|
+
.append('g')
|
|
7292
|
+
.attr('class', 'lib-yaxis-labels-texts-drilldown yaxis-dashed')
|
|
7293
|
+
.attr('style', this.chartConfiguration.yAxisCustomTextStyles)
|
|
7294
|
+
.call(axes.yAxis)
|
|
7295
|
+
.style('display', 'none');
|
|
7296
|
+
}
|
|
7297
|
+
renderMultiChartAxes(svg, axes, scales, dimensions) {
|
|
7298
|
+
svg
|
|
7299
|
+
.append('g')
|
|
7300
|
+
.attr('transform', `translate(0,${dimensions.height})`)
|
|
7301
|
+
.attr('class', 'lib-stacked-x-axis-text multichart')
|
|
7302
|
+
.call(axes.xAxis)
|
|
7303
|
+
.selectAll('text')
|
|
7304
|
+
.style('fill', 'var(--chart-text-color)');
|
|
7305
|
+
svg
|
|
7306
|
+
.append('g')
|
|
7307
|
+
.attr('class', 'lib-stacked-y-axis-text yaxis-dashed')
|
|
7308
|
+
.attr('style', this.chartConfiguration.yAxisCustomTextStyles)
|
|
7309
|
+
.call(axes.yAxis)
|
|
7310
|
+
.selectAll('text')
|
|
7311
|
+
.style('fill', 'var(--chart-text-color)');
|
|
7312
|
+
}
|
|
7313
|
+
applyAxisStyling(svg, svgYAxisLeft, svgYAxisRight) {
|
|
7314
|
+
const styleAxisDomain = (container) => {
|
|
7315
|
+
container.selectAll('.domain')
|
|
7316
|
+
.style('stroke', 'var(--chart-axis-color)')
|
|
7317
|
+
.style('stroke-width', '1px');
|
|
7318
|
+
};
|
|
7319
|
+
styleAxisDomain(svg);
|
|
7320
|
+
styleAxisDomain(svgYAxisLeft);
|
|
7321
|
+
styleAxisDomain(svgYAxisRight);
|
|
7322
|
+
if (this.chartConfiguration.isYaxisDashed) {
|
|
7830
7323
|
d3.selectAll('.yaxis-dashed')
|
|
7831
7324
|
.style('stroke-dasharray', '5 5')
|
|
7832
|
-
.style('color', 'var(--chart-grid-color)');
|
|
7325
|
+
.style('color', 'var(--chart-grid-color)');
|
|
7833
7326
|
}
|
|
7834
|
-
|
|
7835
|
-
* x axis color
|
|
7836
|
-
* used by weekly charts
|
|
7837
|
-
*/
|
|
7838
|
-
if (this.chartConfiguration.isXaxisColor != undefined) {
|
|
7327
|
+
if (this.chartConfiguration.isXaxisColor) {
|
|
7839
7328
|
d3.selectAll('.multichart').style('color', this.chartConfiguration.isXaxisColor || 'var(--chart-text-color)');
|
|
7840
7329
|
}
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7330
|
+
}
|
|
7331
|
+
applyAxisConfigurations(svg, scales, dimensions, data) {
|
|
7332
|
+
if (this.chartConfiguration.isMultiChartGridLine !== undefined) {
|
|
7333
|
+
d3.selectAll('.multichart > g > text').attr('class', 'lib-display-hidden');
|
|
7334
|
+
}
|
|
7335
|
+
if (this.chartConfiguration.isXaxisLabelHidden) {
|
|
7336
|
+
d3.selectAll('.multichart > g > text').attr('class', 'lib-display-hidden');
|
|
7337
|
+
}
|
|
7338
|
+
else if (this.chartConfiguration.isXaxisLabelHidden !== undefined) {
|
|
7339
|
+
this.renderCustomXAxis(svg, scales, dimensions, data);
|
|
7340
|
+
}
|
|
7341
|
+
if (this.chartConfiguration.isYaxisLabelHidden) {
|
|
7342
|
+
svg.selectAll('.yaxis-dashed > g > text').attr('class', 'lib-display-hidden');
|
|
7343
|
+
}
|
|
7344
|
+
if (this.chartConfiguration.isYaxisHidden) {
|
|
7345
|
+
d3.selectAll('.yaxis-dashed').attr('class', 'lib-display-hidden');
|
|
7346
|
+
}
|
|
7347
|
+
if (this.isZoomedOut && data.length > 9) {
|
|
7845
7348
|
svg
|
|
7846
7349
|
.selectAll('.lib-xaxis-labels-texts-drilldown')
|
|
7847
7350
|
.attr('transform', 'rotate(-90)')
|
|
@@ -7849,219 +7352,272 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7849
7352
|
.attr('x', '-5')
|
|
7850
7353
|
.attr('dy', null);
|
|
7851
7354
|
}
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7355
|
+
}
|
|
7356
|
+
renderCustomXAxis(svg, scales, dimensions, data) {
|
|
7357
|
+
const device = this.getDeviceConfig();
|
|
7358
|
+
svg
|
|
7359
|
+
.append('g')
|
|
7360
|
+
.attr('class', 'x1 axis1')
|
|
7361
|
+
.attr('transform', `translate(0,${dimensions.height})`)
|
|
7362
|
+
.style('color', '#000')
|
|
7363
|
+
.call(d3.axisBottom(scales.xScale).tickSize(0))
|
|
7364
|
+
.call((g) => g.select('.domain').attr('fill', 'none'));
|
|
7365
|
+
this.styleCustomXAxisTicks(svg, data, device);
|
|
7366
|
+
if (this.chartConfiguration.xLabelsOnSameLine) {
|
|
7367
|
+
this.applyXLabelsOnSameLine(svg, device);
|
|
7862
7368
|
}
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7369
|
+
}
|
|
7370
|
+
styleCustomXAxisTicks(svg, data, device) {
|
|
7371
|
+
let alternateText = false;
|
|
7372
|
+
svg.selectAll('.x1.axis1 .tick line').attr('y2', () => {
|
|
7373
|
+
if (this.chartConfiguration.hideXaxisTick)
|
|
7374
|
+
return 0;
|
|
7375
|
+
if (alternateText && !this.chartConfiguration.isNoAlternateXaxisText) {
|
|
7376
|
+
alternateText = false;
|
|
7377
|
+
return this.CONSTANTS.LONG_TICK_LENGTH_BG - 7;
|
|
7868
7378
|
}
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
|
|
7874
|
-
|
|
7875
|
-
|
|
7876
|
-
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
.
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7379
|
+
alternateText = true;
|
|
7380
|
+
return this.CONSTANTS.SHORT_TICK_LENGTH_BG - 4;
|
|
7381
|
+
});
|
|
7382
|
+
alternateText = false;
|
|
7383
|
+
svg
|
|
7384
|
+
.selectAll('g.x1.axis1 g.tick text')
|
|
7385
|
+
.attr('class', () => {
|
|
7386
|
+
if (this.chartConfiguration.isDrilldownChart) {
|
|
7387
|
+
return data.length > 8
|
|
7388
|
+
? 'lib-xaxis-labels-texts-drilldown-alt'
|
|
7389
|
+
: 'lib-xaxis-labels-texts-drilldown';
|
|
7390
|
+
}
|
|
7391
|
+
return 'lib-xaxis-labels-texts-weeklycharts';
|
|
7392
|
+
})
|
|
7393
|
+
.attr('y', () => {
|
|
7394
|
+
if (alternateText) {
|
|
7395
|
+
alternateText = false;
|
|
7396
|
+
return this.CONSTANTS.LONG_TICK_LENGTH_BG;
|
|
7397
|
+
}
|
|
7398
|
+
alternateText = true;
|
|
7399
|
+
return this.CONSTANTS.SHORT_TICK_LENGTH_BG;
|
|
7400
|
+
});
|
|
7401
|
+
}
|
|
7402
|
+
applyXLabelsOnSameLine(svg, device) {
|
|
7403
|
+
svg
|
|
7404
|
+
.selectAll('g.x1.axis1 g.tick text')
|
|
7405
|
+
.attr('class', 'lib-xaxis-labels-texts-drilldown')
|
|
7406
|
+
.attr('y', this.CONSTANTS.SHORT_TICK_LENGTH_BG)
|
|
7407
|
+
.text((d) => {
|
|
7408
|
+
if (device.isMobile) {
|
|
7409
|
+
return d.split(' ')[0].substring(0, 3);
|
|
7410
|
+
}
|
|
7411
|
+
const trimmed = d.trim();
|
|
7412
|
+
const spaceIndex = trimmed.indexOf(' ');
|
|
7413
|
+
return spaceIndex > -1
|
|
7414
|
+
? trimmed.substring(0, spaceIndex).toLowerCase()
|
|
7415
|
+
: trimmed.toLowerCase();
|
|
7416
|
+
})
|
|
7417
|
+
.attr('transform', function (d, i) {
|
|
7418
|
+
if (device.isMobile) {
|
|
7419
|
+
const parent = this.parentNode?.parentNode;
|
|
7420
|
+
const totalBars = parent ? d3.select(parent).selectAll('g.tick').size() : 0;
|
|
7421
|
+
return totalBars === 2 ? 'translate(0,0)' : `translate(${i * 30},0)`;
|
|
7422
|
+
}
|
|
7423
|
+
return null;
|
|
7424
|
+
});
|
|
7425
|
+
svg
|
|
7426
|
+
.selectAll('g.x1.axis1 g.tick')
|
|
7427
|
+
.append('text')
|
|
7428
|
+
.attr('class', 'lib-xaxis-labels-texts-drilldown')
|
|
7429
|
+
.attr('y', this.CONSTANTS.LONG_TICK_LENGTH_BG)
|
|
7430
|
+
.attr('fill', 'currentColor')
|
|
7431
|
+
.text((d) => {
|
|
7432
|
+
if (device.isMobile)
|
|
7433
|
+
return '';
|
|
7434
|
+
const trimmed = d.trim();
|
|
7435
|
+
const spaceIndex = trimmed.indexOf(' ');
|
|
7436
|
+
return spaceIndex > -1
|
|
7437
|
+
? trimmed.substring(spaceIndex).toLowerCase()
|
|
7438
|
+
: '';
|
|
7439
|
+
})
|
|
7440
|
+
.attr('transform', (d, i) => {
|
|
7441
|
+
return device.isMobile && i === 0 ? 'translate(20,0)' : null;
|
|
7442
|
+
});
|
|
7443
|
+
}
|
|
7444
|
+
renderDataLabels(rect, scales, metaData, dimensions) {
|
|
7445
|
+
if (!this.isCC && !this.chartConfiguration.isMultiChartGridLine) {
|
|
7446
|
+
rect.append('svg:title').text((d) => d[1] - d[0]);
|
|
7892
7447
|
}
|
|
7893
|
-
if (this.
|
|
7894
|
-
|
|
7895
|
-
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7448
|
+
if (this.chartConfiguration.showTotalOnTop) {
|
|
7449
|
+
this.renderTopLabels(rect, scales, metaData);
|
|
7450
|
+
}
|
|
7451
|
+
if (this.chartConfiguration.showAngledLabels) {
|
|
7452
|
+
this.renderAngledLabels(rect, scales, metaData);
|
|
7453
|
+
}
|
|
7454
|
+
}
|
|
7455
|
+
renderTopLabels(rect, scales, metaData) {
|
|
7456
|
+
const formatFromBackend = this.chartConfiguration.textFormatter
|
|
7457
|
+
? ChartHelper.dataValueFormatter(this.chartConfiguration.textFormatter)
|
|
7458
|
+
: (d) => d;
|
|
7459
|
+
const formatForHugeNumbers = ChartHelper.dataValueFormatter('.2s');
|
|
7460
|
+
rect
|
|
7461
|
+
.append('text')
|
|
7462
|
+
.attr('x', (d) => scales.xScale(d.data.name) + scales.xScale.bandwidth() / 2)
|
|
7463
|
+
.attr('class', 'lib-verticalstack-labels-ontop-weklycharts')
|
|
7464
|
+
.attr('y', (d) => scales.yScale(d[1]) - 3)
|
|
7465
|
+
.text((d) => {
|
|
7466
|
+
const value = d[1] - d[0];
|
|
7467
|
+
if (isNaN(value) || value === 0)
|
|
7468
|
+
return;
|
|
7469
|
+
const formattedValue = value <= 999
|
|
7470
|
+
? formatFromBackend(value)
|
|
7471
|
+
: formatForHugeNumbers(value);
|
|
7472
|
+
return metaData.unit ? metaData.unit + formattedValue : formattedValue;
|
|
7473
|
+
});
|
|
7474
|
+
}
|
|
7475
|
+
renderAngledLabels(rect, scales, metaData) {
|
|
7476
|
+
const formatFromBackend = this.chartConfiguration.textFormatter
|
|
7477
|
+
? ChartHelper.dataValueFormatter(this.chartConfiguration.textFormatter)
|
|
7478
|
+
: (d) => d;
|
|
7479
|
+
const formatForHugeNumbers = ChartHelper.dataValueFormatter('.2s');
|
|
7480
|
+
const tempObjectHolder = {};
|
|
7481
|
+
rect
|
|
7482
|
+
.append('text')
|
|
7483
|
+
.attr('x', 0)
|
|
7484
|
+
.attr('y', 0)
|
|
7485
|
+
.attr('fill', (d) => metaData.colors[d.key])
|
|
7486
|
+
.attr('class', 'lib-data-labels-angled-weeklycharts')
|
|
7487
|
+
.text((d) => {
|
|
7488
|
+
const value = d[1] - d[0];
|
|
7489
|
+
if (isNaN(value) || value <= 0)
|
|
7490
|
+
return;
|
|
7491
|
+
const formattedValue = value <= 999
|
|
7492
|
+
? formatFromBackend(value)
|
|
7493
|
+
: formatForHugeNumbers(value);
|
|
7494
|
+
return metaData.unit ? metaData.unit + formattedValue : formattedValue;
|
|
7495
|
+
})
|
|
7496
|
+
.attr('transform', (d) => {
|
|
7497
|
+
const value = d[1] - d[0];
|
|
7498
|
+
if (isNaN(value) || value <= 0)
|
|
7499
|
+
return 'rotate(0)';
|
|
7500
|
+
let total = 0;
|
|
7501
|
+
let incrementer = 1;
|
|
7502
|
+
metaData.keyList.forEach(key => {
|
|
7503
|
+
if (d.data[key]) {
|
|
7504
|
+
total += d.data[key];
|
|
7924
7505
|
}
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
targetLineName = self.chartData.targetLineData.targetName;
|
|
7506
|
+
else {
|
|
7507
|
+
incrementer = 2;
|
|
7928
7508
|
}
|
|
7929
|
-
return (`<div>${targetLineName}</div>` +
|
|
7930
|
-
'<div>' +
|
|
7931
|
-
self.chartData.targetLineData.target +
|
|
7932
|
-
'' +
|
|
7933
|
-
dataTypeTemp +
|
|
7934
|
-
'</div>');
|
|
7935
7509
|
});
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
.
|
|
7939
|
-
.
|
|
7940
|
-
.
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
.attr('x', height / 2)
|
|
7949
|
-
.attr('dy', '5em')
|
|
7950
|
-
.style('text-anchor', 'middle')
|
|
7951
|
-
.text(metaData.lineyLabel);
|
|
7952
|
-
}
|
|
7953
|
-
if (metaData.xLabel) {
|
|
7954
|
-
function isAcronym(label) {
|
|
7955
|
-
return ((label.length <= 4 && /^[A-Z]+$/.test(label)) ||
|
|
7956
|
-
(label === label.toUpperCase() && /[A-Z]/.test(label)));
|
|
7510
|
+
tempObjectHolder[d.data.name] = (tempObjectHolder[d.data.name] || 0) + incrementer;
|
|
7511
|
+
const position = tempObjectHolder[d.data.name];
|
|
7512
|
+
const xPos = scales.xScale(d.data.name);
|
|
7513
|
+
const bandwidth = scales.xScale.bandwidth();
|
|
7514
|
+
const yPos = scales.yScale(total) - 3;
|
|
7515
|
+
switch (position) {
|
|
7516
|
+
case 1:
|
|
7517
|
+
return `translate(${xPos + bandwidth / 3},${yPos}) rotate(270)`;
|
|
7518
|
+
case 2:
|
|
7519
|
+
return `translate(${xPos + bandwidth / 2 + 2},${yPos}) rotate(270)`;
|
|
7520
|
+
default:
|
|
7521
|
+
return `translate(${xPos + (bandwidth * 3) / 4},${yPos}) rotate(270)`;
|
|
7957
7522
|
}
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7523
|
+
});
|
|
7524
|
+
}
|
|
7525
|
+
renderTargetLine(svg, svgYAxisRight, scales, dimensions, metaData) {
|
|
7526
|
+
if (!this.chartData.targetLineData)
|
|
7527
|
+
return;
|
|
7528
|
+
const parsedTarget = this.parseTargetValue(this.chartData.targetLineData.target);
|
|
7529
|
+
const yZero = scales.yScale(parsedTarget);
|
|
7530
|
+
svg
|
|
7531
|
+
.append('line')
|
|
7532
|
+
.attr('x1', 0)
|
|
7533
|
+
.attr('x2', dimensions.width)
|
|
7534
|
+
.attr('y1', yZero)
|
|
7535
|
+
.attr('y2', yZero)
|
|
7536
|
+
.style('stroke-dasharray', '5 5')
|
|
7537
|
+
.style('stroke', this.chartData.targetLineData.color);
|
|
7538
|
+
this.renderTargetLabel(svgYAxisRight, yZero, metaData);
|
|
7539
|
+
}
|
|
7540
|
+
parseTargetValue(target) {
|
|
7541
|
+
const parsed = parseFloat(String(target));
|
|
7542
|
+
if (isNaN(parsed))
|
|
7543
|
+
return 0;
|
|
7544
|
+
return Number.isInteger(parsed) ? parseInt(String(target)) : parsed;
|
|
7545
|
+
}
|
|
7546
|
+
renderTargetLabel(svgYAxisRight, yZero, metaData) {
|
|
7547
|
+
const dataType = metaData.dataType || '';
|
|
7548
|
+
const targetName = this.chartData.targetLineData.targetName || 'target';
|
|
7549
|
+
svgYAxisRight
|
|
7550
|
+
.append('foreignObject')
|
|
7551
|
+
.attr('transform', `translate(0,${yZero - 13})`)
|
|
7552
|
+
.attr('width', this.CONSTANTS.RIGHT_SVG_WIDTH)
|
|
7553
|
+
.attr('height', 50)
|
|
7554
|
+
.append('xhtml:div')
|
|
7555
|
+
.attr('class', 'target-display')
|
|
7556
|
+
.style('color', 'var(--chart-text-color)')
|
|
7557
|
+
.html(`<div>${targetName}</div><div>${this.chartData.targetLineData.target}${dataType}</div>`);
|
|
7558
|
+
}
|
|
7559
|
+
renderLineChart(svg, lineData, scales, colors, metaData) {
|
|
7560
|
+
if (!lineData || !colors)
|
|
7561
|
+
return;
|
|
7562
|
+
const dataGroup = d3
|
|
7563
|
+
.nest()
|
|
7564
|
+
.key((d) => d.category)
|
|
7565
|
+
.entries(lineData);
|
|
7566
|
+
const lineGen = d3
|
|
7567
|
+
.line()
|
|
7568
|
+
.x((d) => scales.xScale(d.name) + scales.xScale.bandwidth() / 2)
|
|
7569
|
+
.y((d) => scales.lineYscale(d.value));
|
|
7570
|
+
dataGroup.forEach((group) => {
|
|
7961
7571
|
svg
|
|
7962
|
-
.append('
|
|
7963
|
-
.
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7969
|
-
return baseClass + ' lib-axis-waterfall-label';
|
|
7970
|
-
})
|
|
7971
|
-
.attr('style', self.chartConfiguration.xAxisCustomlabelStyles)
|
|
7972
|
-
.attr('transform', 'translate(' + width / 2 + ' ,' + xPosition + ')')
|
|
7973
|
-
.style('text-anchor', 'middle')
|
|
7974
|
-
.style('fill', 'var(--chart-text-color)')
|
|
7975
|
-
.text(isAcr ? xLabelText.toUpperCase() : xLabelText.toLowerCase())
|
|
7976
|
-
.style('text-transform', isAcr ? 'none' : 'capitalize');
|
|
7977
|
-
}
|
|
7978
|
-
if (lineData && colors) {
|
|
7979
|
-
var dataGroup = d3
|
|
7980
|
-
.nest()
|
|
7981
|
-
.key(function (d) {
|
|
7982
|
-
return d.category;
|
|
7983
|
-
})
|
|
7984
|
-
.entries(lineData);
|
|
7985
|
-
var lineGen = d3
|
|
7986
|
-
.line()
|
|
7987
|
-
.x(function (d) {
|
|
7988
|
-
return xScale(d.name) + xScale.bandwidth() / 2;
|
|
7572
|
+
.append('path')
|
|
7573
|
+
.datum(group.values)
|
|
7574
|
+
.attr('fill', 'none')
|
|
7575
|
+
.attr('stroke', (d) => {
|
|
7576
|
+
return d[0]?.category
|
|
7577
|
+
? colors[d[0].category]
|
|
7578
|
+
: this.chartConfiguration.lineGraphColor;
|
|
7989
7579
|
})
|
|
7990
|
-
.
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
|
|
7994
|
-
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
if ('category' in d) {
|
|
8026
|
-
return colors[d.category];
|
|
8027
|
-
}
|
|
8028
|
-
else {
|
|
8029
|
-
return self.chartConfiguration.lineGraphColor;
|
|
8030
|
-
}
|
|
8031
|
-
})
|
|
8032
|
-
.attr('stroke', 'none')
|
|
8033
|
-
.attr('cx', function (d, i) {
|
|
8034
|
-
return xScale(d.name) + xScale.bandwidth() / 2;
|
|
8035
|
-
})
|
|
8036
|
-
.attr('cy', function (d, i) {
|
|
8037
|
-
return lineYscale(d.value);
|
|
8038
|
-
})
|
|
8039
|
-
.attr('r', 3) /**radius of circle=5 */
|
|
8040
|
-
.style('cursor', 'pointer');
|
|
8041
|
-
if (self.chartConfiguration.lineGraphColor) {
|
|
8042
|
-
dot
|
|
8043
|
-
.append('text')
|
|
8044
|
-
.attr('class', 'dots')
|
|
8045
|
-
.attr('fill', self.chartConfiguration.lineGraphColor)
|
|
8046
|
-
.attr('style', 'font-size: ' + '.85em;' + 'font-weight:' + 'bold')
|
|
8047
|
-
.attr('x', function (d, i) {
|
|
8048
|
-
return xScale(d.name) + xScale.bandwidth() / 2;
|
|
8049
|
-
})
|
|
8050
|
-
.attr('y', function (d, i) {
|
|
8051
|
-
return lineYscale(d.value);
|
|
8052
|
-
})
|
|
8053
|
-
.attr('dy', '-1em')
|
|
8054
|
-
.text(function (d, i) {
|
|
8055
|
-
return self.chartConfiguration.labelFormatter(d.value);
|
|
8056
|
-
});
|
|
8057
|
-
}
|
|
8058
|
-
});
|
|
7580
|
+
.attr('stroke-width', 2.5)
|
|
7581
|
+
.attr('d', lineGen);
|
|
7582
|
+
this.renderLineDots(svg, group.values, scales, colors);
|
|
7583
|
+
});
|
|
7584
|
+
}
|
|
7585
|
+
renderLineDots(svg, values, scales, colors) {
|
|
7586
|
+
const dot = svg
|
|
7587
|
+
.selectAll('.line-dots')
|
|
7588
|
+
.data(values)
|
|
7589
|
+
.enter()
|
|
7590
|
+
.append('g')
|
|
7591
|
+
.on('click', (d) => this.handleClick(d));
|
|
7592
|
+
dot
|
|
7593
|
+
.append('circle')
|
|
7594
|
+
.attr('fill', (d) => {
|
|
7595
|
+
return d.category
|
|
7596
|
+
? colors[d.category]
|
|
7597
|
+
: this.chartConfiguration.lineGraphColor;
|
|
7598
|
+
})
|
|
7599
|
+
.attr('stroke', 'none')
|
|
7600
|
+
.attr('cx', (d) => scales.xScale(d.name) + scales.xScale.bandwidth() / 2)
|
|
7601
|
+
.attr('cy', (d) => scales.lineYscale(d.value))
|
|
7602
|
+
.attr('r', 3)
|
|
7603
|
+
.style('cursor', 'pointer');
|
|
7604
|
+
if (this.chartConfiguration.lineGraphColor) {
|
|
7605
|
+
dot
|
|
7606
|
+
.append('text')
|
|
7607
|
+
.attr('class', 'dots')
|
|
7608
|
+
.attr('fill', this.chartConfiguration.lineGraphColor)
|
|
7609
|
+
.style('font-size', '.85em')
|
|
7610
|
+
.style('font-weight', 'bold')
|
|
7611
|
+
.attr('x', (d) => scales.xScale(d.name) + scales.xScale.bandwidth() / 2)
|
|
7612
|
+
.attr('y', (d) => scales.lineYscale(d.value))
|
|
7613
|
+
.attr('dy', '-1em')
|
|
7614
|
+
.text((d) => this.chartConfiguration.labelFormatter(d.value));
|
|
8059
7615
|
}
|
|
8060
|
-
// svg.attr('width', 150).style('max-width', 150).style('overflow-x', 'auto');
|
|
8061
7616
|
}
|
|
8062
7617
|
handleClick(d) {
|
|
8063
|
-
if (this.chartData?.metaData?.hasDrillDown || d?.toggleFrom)
|
|
7618
|
+
if (this.chartData?.metaData?.hasDrillDown || d?.toggleFrom) {
|
|
8064
7619
|
this.clickEvent.emit(d);
|
|
7620
|
+
}
|
|
8065
7621
|
}
|
|
8066
7622
|
handleHeaderMenuClick(id) {
|
|
8067
7623
|
this.headerMenuclickEvent.emit(id);
|
|
@@ -8070,15 +7626,14 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8070
7626
|
this.clickEvent.emit(event);
|
|
8071
7627
|
}
|
|
8072
7628
|
handleZoominZoomoutClick({ isZoomOut, event }) {
|
|
8073
|
-
// this.isZoomOutSelected(isZoomOut, event);
|
|
8074
7629
|
this.isZoomOutSelected(isZoomOut);
|
|
8075
7630
|
}
|
|
8076
7631
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HorizontalBarsWithScrollZoomComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8077
|
-
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 <!-- <span *ngIf=\"chartConfiguration.isComparebyDropdownVisible\">\r\n <lib-dropdown></lib-dropdown>\r\n </span> -->\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:1.2em}.lib-axis-group-label{font-size:.85em;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:12px;line-height:14.52px;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}.title-top-text{color:var(--font-color)!important;font-size:14px;font-weight:600}.title-bar-name{color:var(--font-color)!important;font-size:17px;font-weight:700;text-transform:capitalize}.title-bottom-text{color:var(--font-color)!important;font-size:12px}.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}@media (max-width: 575px){.lib-xaxis-labels-texts-drilldown{writing-mode:sideways-lr}}@media screen and (min-width: 1024px) and (min-height: 400px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:10px!important}.dots{font-size:10px!important}}@media screen and (min-width: 1024px) and (min-height: 1000px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:10px!important}.dots{font-size:10px!important}}@media screen and (min-width: 1024px) and (min-height: 1500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:10px!important}.dots{font-size:10px!important}}@media screen and (min-width: 1366px) and (min-height: 400px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:12px!important}.dots{font-size:12px!important}}@media screen and (min-width: 1366px) and (min-height: 1000px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:12px!important}.dots{font-size:12px!important}}@media screen and (min-width: 1366px) and (min-height: 1500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:12px!important}.dots{font-size:12px!important}}@media screen and (min-width: 1920px) and (min-height: 400px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:14px!important}.dots{font-size:14px!important}}@media screen and (min-width: 1920px) and (min-height: 1000px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:14px!important}.dots{font-size:14px!important}}@media screen and (min-width: 1920px) and (min-height: 1500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:14px!important}.dots{font-size:14px!important}}@media screen and (min-width: 2560px) and (min-height: 500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:16px!important}.dots{font-size:16px!important}}@media screen and (min-width: 2560px) and (min-height: 1000px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:16px!important}.dots{font-size:16px!important}}@media screen and (min-width: 2560px) and (min-height: 1500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:16px!important}}.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}\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 }); }
|
|
7632
|
+
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:1.2em}.lib-axis-group-label{font-size:.85em;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:12px;line-height:14.52px;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}.title-top-text{color:var(--font-color)!important;font-size:14px;font-weight:600}.title-bar-name{color:var(--font-color)!important;font-size:17px;font-weight:700;text-transform:capitalize}.title-bottom-text{color:var(--font-color)!important;font-size:12px}.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}@media (max-width: 575px){.lib-xaxis-labels-texts-drilldown{writing-mode:sideways-lr}}@media screen and (min-width: 1024px) and (min-height: 400px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:10px!important}.dots{font-size:10px!important}}@media screen and (min-width: 1024px) and (min-height: 1000px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:10px!important}.dots{font-size:10px!important}}@media screen and (min-width: 1024px) and (min-height: 1500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:10px!important}.dots{font-size:10px!important}}@media screen and (min-width: 1366px) and (min-height: 400px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:12px!important}.dots{font-size:12px!important}}@media screen and (min-width: 1366px) and (min-height: 1000px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:12px!important}.dots{font-size:12px!important}}@media screen and (min-width: 1366px) and (min-height: 1500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:12px!important}.dots{font-size:12px!important}}@media screen and (min-width: 1920px) and (min-height: 400px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:14px!important}.dots{font-size:14px!important}}@media screen and (min-width: 1920px) and (min-height: 1000px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:14px!important}.dots{font-size:14px!important}}@media screen and (min-width: 1920px) and (min-height: 1500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:14px!important}.dots{font-size:14px!important}}@media screen and (min-width: 2560px) and (min-height: 500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:16px!important}.dots{font-size:16px!important}}@media screen and (min-width: 2560px) and (min-height: 1000px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:16px!important}.dots{font-size:16px!important}}@media screen and (min-width: 2560px) and (min-height: 1500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:16px!important}}.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}\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 }); }
|
|
8078
7633
|
}
|
|
8079
7634
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HorizontalBarsWithScrollZoomComponent, decorators: [{
|
|
8080
7635
|
type: Component,
|
|
8081
|
-
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 <!-- <span *ngIf=\"chartConfiguration.isComparebyDropdownVisible\">\r\n <lib-dropdown></lib-dropdown>\r\n </span> -->\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:1.2em}.lib-axis-group-label{font-size:.85em;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:12px;line-height:14.52px;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}.title-top-text{color:var(--font-color)!important;font-size:14px;font-weight:600}.title-bar-name{color:var(--font-color)!important;font-size:17px;font-weight:700;text-transform:capitalize}.title-bottom-text{color:var(--font-color)!important;font-size:12px}.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}@media (max-width: 575px){.lib-xaxis-labels-texts-drilldown{writing-mode:sideways-lr}}@media screen and (min-width: 1024px) and (min-height: 400px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:10px!important}.dots{font-size:10px!important}}@media screen and (min-width: 1024px) and (min-height: 1000px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:10px!important}.dots{font-size:10px!important}}@media screen and (min-width: 1024px) and (min-height: 1500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:10px!important}.dots{font-size:10px!important}}@media screen and (min-width: 1366px) and (min-height: 400px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:12px!important}.dots{font-size:12px!important}}@media screen and (min-width: 1366px) and (min-height: 1000px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:12px!important}.dots{font-size:12px!important}}@media screen and (min-width: 1366px) and (min-height: 1500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:12px!important}.dots{font-size:12px!important}}@media screen and (min-width: 1920px) and (min-height: 400px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:14px!important}.dots{font-size:14px!important}}@media screen and (min-width: 1920px) and (min-height: 1000px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:14px!important}.dots{font-size:14px!important}}@media screen and (min-width: 1920px) and (min-height: 1500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:14px!important}.dots{font-size:14px!important}}@media screen and (min-width: 2560px) and (min-height: 500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:16px!important}.dots{font-size:16px!important}}@media screen and (min-width: 2560px) and (min-height: 1000px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:16px!important}.dots{font-size:16px!important}}@media screen and (min-width: 2560px) and (min-height: 1500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:16px!important}}.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}\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"] }]
|
|
7636
|
+
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:1.2em}.lib-axis-group-label{font-size:.85em;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:12px;line-height:14.52px;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}.title-top-text{color:var(--font-color)!important;font-size:14px;font-weight:600}.title-bar-name{color:var(--font-color)!important;font-size:17px;font-weight:700;text-transform:capitalize}.title-bottom-text{color:var(--font-color)!important;font-size:12px}.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}@media (max-width: 575px){.lib-xaxis-labels-texts-drilldown{writing-mode:sideways-lr}}@media screen and (min-width: 1024px) and (min-height: 400px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:10px!important}.dots{font-size:10px!important}}@media screen and (min-width: 1024px) and (min-height: 1000px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:10px!important}.dots{font-size:10px!important}}@media screen and (min-width: 1024px) and (min-height: 1500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:10px!important}.dots{font-size:10px!important}}@media screen and (min-width: 1366px) and (min-height: 400px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:12px!important}.dots{font-size:12px!important}}@media screen and (min-width: 1366px) and (min-height: 1000px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:12px!important}.dots{font-size:12px!important}}@media screen and (min-width: 1366px) and (min-height: 1500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:12px!important}.dots{font-size:12px!important}}@media screen and (min-width: 1920px) and (min-height: 400px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:14px!important}.dots{font-size:14px!important}}@media screen and (min-width: 1920px) and (min-height: 1000px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:14px!important}.dots{font-size:14px!important}}@media screen and (min-width: 1920px) and (min-height: 1500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:14px!important}.dots{font-size:14px!important}}@media screen and (min-width: 2560px) and (min-height: 500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:16px!important}.dots{font-size:16px!important}}@media screen and (min-width: 2560px) and (min-height: 1000px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:16px!important}.dots{font-size:16px!important}}@media screen and (min-width: 2560px) and (min-height: 1500px){.lib-stacked-y-axis-text text,.lib-stacked-x-axis-text text{font-size:16px!important}}.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}\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"] }]
|
|
8082
7637
|
}], ctorParameters: () => [], propDecorators: { containerElt: [{
|
|
8083
7638
|
type: ViewChild,
|
|
8084
7639
|
args: ['verticalstackedchartcontainer', { static: true }]
|