axidio-styleguide-library1-v2 0.0.912 → 0.0.913
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 + 25)
|
|
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
|
|
@@ -9071,57 +9071,27 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9071
9071
|
.attr('width', function (d) {
|
|
9072
9072
|
if (self.chartConfiguration.isDrilldownChart) {
|
|
9073
9073
|
let isSingleBar = false;
|
|
9074
|
-
let reducedBarWidth = 60; // Set your desired reduced width here
|
|
9075
9074
|
data.map((indiv) => {
|
|
9076
9075
|
if (indiv.name == d.name) {
|
|
9077
9076
|
let keys = Object.keys(indiv).filter((temp, i) => i != 0);
|
|
9078
9077
|
tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
|
|
9079
|
-
// Only reduce width if single bar (not grouped)
|
|
9080
9078
|
if (keys.length === 1) {
|
|
9081
9079
|
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) {
|
|
9088
|
-
if (self.chartData.data.length == 1) {
|
|
9089
|
-
if (Object.keys(self.chartData.data[0]).length == 2) {
|
|
9090
|
-
tempScale.range([
|
|
9091
|
-
0 + (x.bandwidth() - 125) / 2,
|
|
9092
|
-
x.bandwidth() - (x.bandwidth() - 125) / 2,
|
|
9093
|
-
]);
|
|
9094
|
-
}
|
|
9095
|
-
else {
|
|
9096
|
-
tempScale.range([
|
|
9097
|
-
0 + (x.bandwidth() - 125) / 2,
|
|
9098
|
-
x.bandwidth() - (x.bandwidth() - 125) / 2,
|
|
9099
|
-
]);
|
|
9100
|
-
}
|
|
9101
|
-
}
|
|
9102
|
-
else {
|
|
9103
|
-
tempScale.range([
|
|
9104
|
-
0 + (x.bandwidth() - 125) / 2,
|
|
9105
|
-
x.bandwidth() - (x.bandwidth() - 125) / 2,
|
|
9106
|
-
]);
|
|
9107
|
-
}
|
|
9108
9080
|
}
|
|
9109
9081
|
}
|
|
9110
9082
|
});
|
|
9111
9083
|
if (isSingleBar) {
|
|
9084
|
+
if (self.isZoomedOut) {
|
|
9085
|
+
// Reduce width to 60% or min 25px in zoomed out view
|
|
9086
|
+
return Math.max(tempScale.bandwidth() * 0.6, 25);
|
|
9087
|
+
}
|
|
9112
9088
|
return tempScale.bandwidth();
|
|
9113
9089
|
}
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
}
|
|
9120
|
-
return self.isZoomedOut
|
|
9121
|
-
? tempScale.bandwidth()
|
|
9122
|
-
: self.chartData.data.length && self.chartData.data.length > 8
|
|
9123
|
-
? tempScale.bandwidth() * 0.5
|
|
9124
|
-
: tempScale.bandwidth();
|
|
9090
|
+
// Grouped bars: keep as is
|
|
9091
|
+
return tempScale.bandwidth();
|
|
9092
|
+
}
|
|
9093
|
+
// Non-drilldown: keep as is
|
|
9094
|
+
return tempScale.bandwidth();
|
|
9125
9095
|
})
|
|
9126
9096
|
.attr('height', function (d) {
|
|
9127
9097
|
if (d.value == -1) {
|