axidio-styleguide-library1-v2 0.0.906 → 0.0.907
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.
|
@@ -7378,10 +7378,9 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7378
7378
|
innerContainer.style('overflow-x', 'auto');
|
|
7379
7379
|
}
|
|
7380
7380
|
else {
|
|
7381
|
-
|
|
7382
|
-
barWidth = Math.min(80, Math.max(24, (width - rightSvgWidth - leftAndRightSpaces * 2) / data.length));
|
|
7381
|
+
barWidth = Math.max(40, (width - rightSvgWidth - leftAndRightSpaces * 2) / data.length);
|
|
7383
7382
|
barPadding = 0;
|
|
7384
|
-
requiredSvgWidth =
|
|
7383
|
+
requiredSvgWidth = width - rightSvgWidth;
|
|
7385
7384
|
}
|
|
7386
7385
|
var svg = innerContainer
|
|
7387
7386
|
.append('svg')
|
|
@@ -7413,6 +7412,10 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7413
7412
|
}
|
|
7414
7413
|
// Calculate bar width for mobile to avoid overlap
|
|
7415
7414
|
// ...barWidth is now calculated above, remove duplicate...
|
|
7415
|
+
let maxBarWidth = 70;
|
|
7416
|
+
let totalBarSpace = data.length * maxBarWidth;
|
|
7417
|
+
let availableWidth = width - rightSvgWidth - leftAndRightSpaces * 2;
|
|
7418
|
+
let xRangeEnd = Math.max(availableWidth, totalBarSpace);
|
|
7416
7419
|
var xScale = d3
|
|
7417
7420
|
.scaleBand()
|
|
7418
7421
|
.rangeRound([
|
|
@@ -7593,12 +7596,12 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7593
7596
|
return 0;
|
|
7594
7597
|
})
|
|
7595
7598
|
.attr('width', function (d) {
|
|
7596
|
-
// Use calculated barWidth for mobile, otherwise
|
|
7599
|
+
// Use calculated barWidth for mobile, otherwise scale
|
|
7597
7600
|
if (isMobile) {
|
|
7598
7601
|
return barWidth;
|
|
7599
7602
|
}
|
|
7600
7603
|
return self.chartConfiguration.isMultiChartGridLine == undefined
|
|
7601
|
-
?
|
|
7604
|
+
? xScale.bandwidth()
|
|
7602
7605
|
: self.chartConfiguration.isDrilldownChart &&
|
|
7603
7606
|
self.chartData.data.length <= 3
|
|
7604
7607
|
? 70
|