axidio-styleguide-library1-v2 0.1.79 → 0.1.81
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.
|
@@ -8923,22 +8923,25 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8923
8923
|
return xSubgroup(d.key);
|
|
8924
8924
|
})
|
|
8925
8925
|
.attr('y', function (d) {
|
|
8926
|
-
if (d.value
|
|
8926
|
+
if (d.value == -1) {
|
|
8927
8927
|
return y(0);
|
|
8928
|
-
|
|
8929
|
-
|
|
8930
|
-
|
|
8928
|
+
}
|
|
8929
|
+
if (d.value >= 0) {
|
|
8930
|
+
const barHeight = height - y(d.value);
|
|
8931
|
+
const minHeight = self.chartConfiguration.defaultBarHeight || 2;
|
|
8932
|
+
return barHeight < minHeight ? y(0) - minHeight : y(d.value);
|
|
8933
|
+
}
|
|
8934
|
+
return y(0);
|
|
8931
8935
|
})
|
|
8932
8936
|
.attr('width', function (d) {
|
|
8933
8937
|
// For grouped bar charts in zoom-in view, slightly increase bar width for both bars (shipped and planned)
|
|
8934
8938
|
if (subgroups.length > 1 && !self.isZoomedOut) {
|
|
8935
8939
|
return xSubgroup.bandwidth() * 0.25;
|
|
8936
8940
|
}
|
|
8937
|
-
// For single-bar (non-grouped) charts in zoom-in view, set bar width to
|
|
8941
|
+
// For single-bar (non-grouped) charts in zoom-in view, set bar width to 120
|
|
8938
8942
|
if (subgroups.length === 1 && !self.isZoomedOut) {
|
|
8939
|
-
return
|
|
8943
|
+
return 120;
|
|
8940
8944
|
}
|
|
8941
|
-
let tempScale = d3.scaleBand().domain([]).range([0, 0]);
|
|
8942
8945
|
// Default logic for other chart types
|
|
8943
8946
|
if (self.chartConfiguration.isDrilldownChart) {
|
|
8944
8947
|
data.map((indiv) => {
|
|
@@ -8999,14 +9002,9 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8999
9002
|
.attr('fill', function (d) {
|
|
9000
9003
|
if (d.value &&
|
|
9001
9004
|
self.chartData.targetLineData &&
|
|
9002
|
-
d.value >=
|
|
9003
|
-
self.chartData.metaData.colorAboveTarget)
|
|
9004
|
-
|
|
9005
|
-
const colorAboveTarget = Object.keys(self.chartData.metaData.colorAboveTarget).find(k => k.toLowerCase() === key);
|
|
9006
|
-
if (colorAboveTarget) {
|
|
9007
|
-
return self.chartData.metaData.colorAboveTarget[colorAboveTarget];
|
|
9008
|
-
}
|
|
9009
|
-
}
|
|
9005
|
+
d.value >= parseInt(self.chartData.targetLineData.target) &&
|
|
9006
|
+
self.chartData.metaData.colorAboveTarget)
|
|
9007
|
+
return self.chartData.metaData.colorAboveTarget[d.key];
|
|
9010
9008
|
return self.chartData.metaData.colors[d.key];
|
|
9011
9009
|
});
|
|
9012
9010
|
/**
|