axidio-styleguide-library1-v2 0.0.911 → 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
|
|
@@ -9070,45 +9070,28 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9070
9070
|
})
|
|
9071
9071
|
.attr('width', function (d) {
|
|
9072
9072
|
if (self.chartConfiguration.isDrilldownChart) {
|
|
9073
|
+
let isSingleBar = false;
|
|
9073
9074
|
data.map((indiv) => {
|
|
9074
9075
|
if (indiv.name == d.name) {
|
|
9075
9076
|
let keys = Object.keys(indiv).filter((temp, i) => i != 0);
|
|
9076
9077
|
tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
|
|
9077
|
-
if (
|
|
9078
|
-
|
|
9079
|
-
if (Object.keys(self.chartData.data[0]).length == 2) {
|
|
9080
|
-
tempScale.range([
|
|
9081
|
-
0 + (x.bandwidth() - 125) / 2,
|
|
9082
|
-
x.bandwidth() - (x.bandwidth() - 125) / 2,
|
|
9083
|
-
]);
|
|
9084
|
-
}
|
|
9085
|
-
else {
|
|
9086
|
-
tempScale.range([
|
|
9087
|
-
0 + (x.bandwidth() - 125) / 2,
|
|
9088
|
-
x.bandwidth() - (x.bandwidth() - 125) / 2,
|
|
9089
|
-
]);
|
|
9090
|
-
}
|
|
9091
|
-
}
|
|
9092
|
-
else {
|
|
9093
|
-
tempScale.range([
|
|
9094
|
-
0 + (x.bandwidth() - 125) / 2,
|
|
9095
|
-
x.bandwidth() - (x.bandwidth() - 125) / 2,
|
|
9096
|
-
]);
|
|
9097
|
-
}
|
|
9078
|
+
if (keys.length === 1) {
|
|
9079
|
+
isSingleBar = true;
|
|
9098
9080
|
}
|
|
9099
9081
|
}
|
|
9100
9082
|
});
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
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
|
+
}
|
|
9088
|
+
return tempScale.bandwidth();
|
|
9089
|
+
}
|
|
9090
|
+
// Grouped bars: keep as is
|
|
9091
|
+
return tempScale.bandwidth();
|
|
9092
|
+
}
|
|
9093
|
+
// Non-drilldown: keep as is
|
|
9094
|
+
return tempScale.bandwidth();
|
|
9112
9095
|
})
|
|
9113
9096
|
.attr('height', function (d) {
|
|
9114
9097
|
if (d.value == -1) {
|