axidio-styleguide-library1-v2 0.6.89 → 0.6.90
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,21 +3527,33 @@ 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
|
+
const isTablet = window.innerWidth <= 1024 && window.innerWidth > 768;
|
|
3531
|
+
const isMobile = window.innerWidth <= 768;
|
|
3532
|
+
let widthMultiplier = 1;
|
|
3533
|
+
if (isMobile) {
|
|
3534
|
+
widthMultiplier = 1.4;
|
|
3535
|
+
}
|
|
3536
|
+
else if (isTablet) {
|
|
3537
|
+
widthMultiplier = 1.25;
|
|
3538
|
+
}
|
|
3530
3539
|
if (dataLength > 30 && this.isZoomedOut) {
|
|
3531
3540
|
const multiplier = this.chartData.dropdownData1 ? 60 : 40;
|
|
3532
|
-
width = Math.max(width, dataLength * multiplier);
|
|
3541
|
+
width = Math.max(width, dataLength * multiplier * widthMultiplier);
|
|
3533
3542
|
}
|
|
3534
3543
|
if (this.chartData.dropdownData2 && width < dataLength * 120 && this.isZoomedOut) {
|
|
3535
|
-
width = dataLength * 120;
|
|
3544
|
+
width = dataLength * 120 * widthMultiplier;
|
|
3536
3545
|
}
|
|
3537
3546
|
if (dataLength > 8 && !this.isZoomedOut) {
|
|
3538
3547
|
if (this.chartData.dropdownData2 && width < dataLength * 250) {
|
|
3539
|
-
width = dataLength * 250;
|
|
3548
|
+
width = dataLength * 250 * widthMultiplier;
|
|
3540
3549
|
}
|
|
3541
3550
|
else {
|
|
3542
|
-
width = dataLength * 160;
|
|
3551
|
+
width = dataLength * 160 * widthMultiplier;
|
|
3543
3552
|
}
|
|
3544
3553
|
}
|
|
3554
|
+
else if (!this.isZoomedOut) {
|
|
3555
|
+
width = baseWidth * widthMultiplier;
|
|
3556
|
+
}
|
|
3545
3557
|
return width;
|
|
3546
3558
|
}
|
|
3547
3559
|
calculateHeight(verticalstackedcontainer, margin) {
|
|
@@ -3573,14 +3585,8 @@ class GroupChartComponent extends ComponentUniqueId {
|
|
|
3573
3585
|
const { width, height, margin } = dimensions;
|
|
3574
3586
|
const leftAndRightSpaces = 50;
|
|
3575
3587
|
const rightSvgWidth = 60;
|
|
3588
|
+
const barPadding = 0.3;
|
|
3576
3589
|
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
3590
|
let x;
|
|
3585
3591
|
if (this.chartConfiguration.isMultiChartGridLine !== undefined) {
|
|
3586
3592
|
x = d3
|