axidio-styleguide-library1-v2 0.0.911 → 0.0.912
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.
|
@@ -8798,7 +8798,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8798
8798
|
.style('font-size', this.isHeaderVisible ? '18px' : '14px')
|
|
8799
8799
|
.attr('y', this.isHeaderVisible
|
|
8800
8800
|
? short_tick_length_bg + 25
|
|
8801
|
-
: short_tick_length_bg)
|
|
8801
|
+
: short_tick_length_bg + 15)
|
|
8802
8802
|
.attr('x', function (d) {
|
|
8803
8803
|
if (self.chartData.data.length > 8 && !self.isZoomedOut) {
|
|
8804
8804
|
return -25; // Move first line text slightly to the left too
|
|
@@ -9070,11 +9070,21 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9070
9070
|
})
|
|
9071
9071
|
.attr('width', function (d) {
|
|
9072
9072
|
if (self.chartConfiguration.isDrilldownChart) {
|
|
9073
|
+
let isSingleBar = false;
|
|
9074
|
+
let reducedBarWidth = 60; // Set your desired reduced width here
|
|
9073
9075
|
data.map((indiv) => {
|
|
9074
9076
|
if (indiv.name == d.name) {
|
|
9075
9077
|
let keys = Object.keys(indiv).filter((temp, i) => i != 0);
|
|
9076
9078
|
tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
|
|
9077
|
-
if (
|
|
9079
|
+
// Only reduce width if single bar (not grouped)
|
|
9080
|
+
if (keys.length === 1) {
|
|
9081
|
+
isSingleBar = true;
|
|
9082
|
+
tempScale.range([
|
|
9083
|
+
0 + (x.bandwidth() - reducedBarWidth) / 2,
|
|
9084
|
+
x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
|
|
9085
|
+
]);
|
|
9086
|
+
}
|
|
9087
|
+
else if (x.bandwidth() > 100) {
|
|
9078
9088
|
if (self.chartData.data.length == 1) {
|
|
9079
9089
|
if (Object.keys(self.chartData.data[0]).length == 2) {
|
|
9080
9090
|
tempScale.range([
|
|
@@ -9098,6 +9108,9 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9098
9108
|
}
|
|
9099
9109
|
}
|
|
9100
9110
|
});
|
|
9111
|
+
if (isSingleBar) {
|
|
9112
|
+
return tempScale.bandwidth();
|
|
9113
|
+
}
|
|
9101
9114
|
return self.isZoomedOut
|
|
9102
9115
|
? tempScale.bandwidth()
|
|
9103
9116
|
: self.chartData.data.length && self.chartData.data.length > 8
|