axidio-styleguide-library1-v2 0.6.89 → 0.6.91
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.
|
@@ -3527,20 +3527,26 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3527
3527
|
const baseWidth = containerWidth - leftSvgWidth - rightSvgWidth;
|
|
3528
3528
|
const dataLength = this.chartData.data.length;
|
|
3529
3529
|
let width = baseWidth;
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
}
|
|
3537
|
-
if (dataLength > 8 && !this.isZoomedOut) {
|
|
3538
|
-
if (this.chartData.dropdownData2 && width < dataLength * 250) {
|
|
3539
|
-
width = dataLength * 250;
|
|
3530
|
+
const isTablet = window.innerWidth <= 1024 && window.innerWidth > 768;
|
|
3531
|
+
const isMobile = window.innerWidth <= 768;
|
|
3532
|
+
if (this.isZoomedOut) {
|
|
3533
|
+
let widthMultiplier = 1;
|
|
3534
|
+
if (isMobile) {
|
|
3535
|
+
widthMultiplier = 1.4;
|
|
3540
3536
|
}
|
|
3541
|
-
else {
|
|
3542
|
-
|
|
3537
|
+
else if (isTablet) {
|
|
3538
|
+
widthMultiplier = 1.25;
|
|
3543
3539
|
}
|
|
3540
|
+
if (dataLength > 30) {
|
|
3541
|
+
const multiplier = this.chartData.dropdownData1 ? 60 : 40;
|
|
3542
|
+
width = Math.max(width, dataLength * multiplier * widthMultiplier);
|
|
3543
|
+
}
|
|
3544
|
+
if (this.chartData.dropdownData2 && width < dataLength * 120) {
|
|
3545
|
+
width = dataLength * 120 * widthMultiplier;
|
|
3546
|
+
}
|
|
3547
|
+
}
|
|
3548
|
+
else {
|
|
3549
|
+
width = baseWidth;
|
|
3544
3550
|
}
|
|
3545
3551
|
return width;
|
|
3546
3552
|
}
|
|
@@ -3574,20 +3580,13 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3574
3580
|
const leftAndRightSpaces = 50;
|
|
3575
3581
|
const rightSvgWidth = 60;
|
|
3576
3582
|
const groups = d3.map(data, (d) => d.name).keys();
|
|
3577
|
-
let barPadding = 0.3;
|
|
3578
|
-
if (window.innerWidth <= 1024) {
|
|
3579
|
-
barPadding = 0.6;
|
|
3580
|
-
}
|
|
3581
|
-
if (window.innerWidth <= 768) {
|
|
3582
|
-
barPadding = 0.7;
|
|
3583
|
-
}
|
|
3584
3583
|
let x;
|
|
3585
3584
|
if (this.chartConfiguration.isMultiChartGridLine !== undefined) {
|
|
3586
3585
|
x = d3
|
|
3587
3586
|
.scaleBand()
|
|
3588
3587
|
.rangeRound([0, width])
|
|
3589
3588
|
.align(0.5)
|
|
3590
|
-
.padding(
|
|
3589
|
+
.padding(0.5)
|
|
3591
3590
|
.domain(data.map((d) => d.name.toLowerCase()).reverse());
|
|
3592
3591
|
}
|
|
3593
3592
|
else {
|
|
@@ -3595,7 +3594,7 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3595
3594
|
.scaleBand()
|
|
3596
3595
|
.domain(groups.reverse())
|
|
3597
3596
|
.range([leftAndRightSpaces, width - rightSvgWidth - leftAndRightSpaces])
|
|
3598
|
-
.padding(
|
|
3597
|
+
.padding(0.3);
|
|
3599
3598
|
}
|
|
3600
3599
|
const xScaleFromOrigin = d3.scaleBand().domain(groups).range([0, width - rightSvgWidth]);
|
|
3601
3600
|
const xSubgroup = d3.scaleBand().domain(keyList).range([0, x.bandwidth()]);
|