axidio-styleguide-library1-v2 0.6.70 → 0.6.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/horizontal-bars-with-scroll-zoom/horizontal-bars-with-scroll-zoom.component.mjs +7 -7
- package/esm2022/lib/horizontal-grouped-bar-with-scroll-zoom/horizontal-grouped-bar-with-scroll-zoom.component.mjs +2 -2
- package/fesm2022/axidio-styleguide-library1-v2.mjs +7 -7
- package/fesm2022/axidio-styleguide-library1-v2.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -6745,7 +6745,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
6745
6745
|
}
|
|
6746
6746
|
else {
|
|
6747
6747
|
barWidth = 25;
|
|
6748
|
-
barPadding =
|
|
6748
|
+
barPadding = 50;
|
|
6749
6749
|
}
|
|
6750
6750
|
}
|
|
6751
6751
|
else {
|
|
@@ -6754,7 +6754,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
6754
6754
|
}
|
|
6755
6755
|
const totalBarsWidth = barWidth * dataLength;
|
|
6756
6756
|
const totalGaps = barPadding * (dataLength - 1);
|
|
6757
|
-
const minRequiredWidth = totalBarsWidth + totalGaps
|
|
6757
|
+
const minRequiredWidth = totalBarsWidth + totalGaps;
|
|
6758
6758
|
const requiredSvgWidth = Math.max(availableWidth, minRequiredWidth);
|
|
6759
6759
|
return {
|
|
6760
6760
|
width,
|
|
@@ -6864,7 +6864,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
6864
6864
|
.rangeRound([0, dimensions.requiredSvgWidth])
|
|
6865
6865
|
.domain(data.map(d => d.name).reverse())
|
|
6866
6866
|
.paddingInner(paddingRatio)
|
|
6867
|
-
.paddingOuter(0.
|
|
6867
|
+
.paddingOuter(0.2) // Small padding for visual spacing
|
|
6868
6868
|
.align(0.5);
|
|
6869
6869
|
const xScaleFromOrigin = d3
|
|
6870
6870
|
.scaleBand()
|
|
@@ -7057,7 +7057,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7057
7057
|
return xScale(d.data.name) - this.CONSTANTS.LEFT_RIGHT_SPACES +
|
|
7058
7058
|
(bandwidth + this.CONSTANTS.LEFT_RIGHT_SPACES * 2 - 180) / 2;
|
|
7059
7059
|
}
|
|
7060
|
-
return xScale(d.data.name) -
|
|
7060
|
+
return xScale(d.data.name) + xScale.bandwidth() / 2 - numericWidth / 2;
|
|
7061
7061
|
}
|
|
7062
7062
|
generateTooltipHtml(d, metaData, value) {
|
|
7063
7063
|
if (value === 0)
|
|
@@ -7279,7 +7279,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7279
7279
|
.select('.domain')
|
|
7280
7280
|
.style('stroke', 'var(--chart-axis-color)')
|
|
7281
7281
|
.style('stroke-width', '1px')
|
|
7282
|
-
.attr('d', `M0,0.5H${
|
|
7282
|
+
.attr('d', `M0,0.5H${scales.xScale.range()[1]}`);
|
|
7283
7283
|
// Y-axis
|
|
7284
7284
|
svg
|
|
7285
7285
|
.append('g')
|
|
@@ -7529,7 +7529,7 @@ class HorizontalBarsWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7529
7529
|
svg
|
|
7530
7530
|
.append('line')
|
|
7531
7531
|
.attr('x1', 0)
|
|
7532
|
-
.attr('x2', dimensions.
|
|
7532
|
+
.attr('x2', dimensions.requiredSvgWidth)
|
|
7533
7533
|
.attr('y1', yZero)
|
|
7534
7534
|
.attr('y2', yZero)
|
|
7535
7535
|
.style('stroke-dasharray', '5 5')
|
|
@@ -7814,7 +7814,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7814
7814
|
// more than one subgroup so grouped bars don't get congested.
|
|
7815
7815
|
// On desktop: enable scrolling when there are many groups or
|
|
7816
7816
|
// multiple subgroups (keeps previous behavior).
|
|
7817
|
-
if ((isMobile) && subgroupsCount > 1) {
|
|
7817
|
+
if ((isMobile || isTablet) && subgroupsCount > 1) {
|
|
7818
7818
|
innerContainer.style('overflow-x', 'auto');
|
|
7819
7819
|
innerContainer.classed('scroll-enabled', true);
|
|
7820
7820
|
}
|