axidio-styleguide-library1-v2 0.0.916 → 0.0.918
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)
|
|
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
|
|
@@ -8970,13 +8970,13 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8970
8970
|
}
|
|
8971
8971
|
var xSubgroup = d3.scaleBand().domain(subgroups);
|
|
8972
8972
|
if (this.chartConfiguration.isMultiChartGridLine == undefined) {
|
|
8973
|
-
|
|
8974
|
-
const barWidthRatio = 0.6;
|
|
8975
|
-
const offset = (x.bandwidth() * (1 - barWidthRatio)) / 2;
|
|
8976
|
-
xSubgroup.range([offset, x.bandwidth() - offset]);
|
|
8973
|
+
xSubgroup.range([0, x.bandwidth()]);
|
|
8977
8974
|
}
|
|
8978
8975
|
else {
|
|
8979
|
-
|
|
8976
|
+
/**
|
|
8977
|
+
* used to make grouped bars with lesser width as we are not using padding for width
|
|
8978
|
+
* used by weekly charts
|
|
8979
|
+
*/
|
|
8980
8980
|
xSubgroup.range([0, x.bandwidth()]);
|
|
8981
8981
|
}
|
|
8982
8982
|
// if (this.chartConfiguration.isDrilldownChart) {
|
|
@@ -9030,25 +9030,28 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9030
9030
|
let keys = Object.keys(indiv).filter((temp, i) => i != 0);
|
|
9031
9031
|
tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
|
|
9032
9032
|
if (x.bandwidth() > 100) {
|
|
9033
|
+
// Increase bar width a bit in zoom-in view
|
|
9034
|
+
let reducedBarWidth = 60;
|
|
9035
|
+
if (!self.isZoomedOut) {
|
|
9036
|
+
reducedBarWidth = 80;
|
|
9037
|
+
}
|
|
9033
9038
|
if (self.chartData.data.length == 1) {
|
|
9034
9039
|
if (Object.keys(self.chartData.data[0]).length == 2) {
|
|
9035
9040
|
tempScale.range([
|
|
9036
|
-
0 + (x.bandwidth() -
|
|
9037
|
-
x.bandwidth() - (x.bandwidth() -
|
|
9041
|
+
0 + (x.bandwidth() - reducedBarWidth) / 2,
|
|
9042
|
+
x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
|
|
9038
9043
|
]);
|
|
9039
|
-
// .padding(0.05);
|
|
9040
9044
|
}
|
|
9041
9045
|
else
|
|
9042
9046
|
tempScale.range([
|
|
9043
|
-
0 + (x.bandwidth() -
|
|
9044
|
-
x.bandwidth() - (x.bandwidth() -
|
|
9047
|
+
0 + (x.bandwidth() - reducedBarWidth) / 2,
|
|
9048
|
+
x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
|
|
9045
9049
|
]);
|
|
9046
|
-
// .padding(0.05);
|
|
9047
9050
|
}
|
|
9048
9051
|
else
|
|
9049
9052
|
tempScale.range([
|
|
9050
|
-
0 + (x.bandwidth() -
|
|
9051
|
-
x.bandwidth() - (x.bandwidth() -
|
|
9053
|
+
0 + (x.bandwidth() - reducedBarWidth) / 2,
|
|
9054
|
+
x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
|
|
9052
9055
|
]);
|
|
9053
9056
|
}
|
|
9054
9057
|
}
|
|
@@ -9070,32 +9073,33 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9070
9073
|
})
|
|
9071
9074
|
.attr('width', function (d) {
|
|
9072
9075
|
if (self.chartConfiguration.isDrilldownChart) {
|
|
9073
|
-
// var tempScale;
|
|
9074
9076
|
data.map((indiv) => {
|
|
9075
9077
|
if (indiv.name == d.name) {
|
|
9076
9078
|
let keys = Object.keys(indiv).filter((temp, i) => i != 0);
|
|
9077
|
-
var temp;
|
|
9078
9079
|
tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
|
|
9079
9080
|
if (x.bandwidth() > 100) {
|
|
9081
|
+
// Increase bar width a bit in zoom-in view
|
|
9082
|
+
let reducedBarWidth = 60;
|
|
9083
|
+
if (!self.isZoomedOut) {
|
|
9084
|
+
reducedBarWidth = 80;
|
|
9085
|
+
}
|
|
9080
9086
|
if (self.chartData.data.length == 1) {
|
|
9081
9087
|
if (Object.keys(self.chartData.data[0]).length == 2) {
|
|
9082
9088
|
tempScale.range([
|
|
9083
|
-
0 + (x.bandwidth() -
|
|
9084
|
-
x.bandwidth() - (x.bandwidth() -
|
|
9089
|
+
0 + (x.bandwidth() - reducedBarWidth) / 2,
|
|
9090
|
+
x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
|
|
9085
9091
|
]);
|
|
9086
|
-
// .padding(0.05);
|
|
9087
9092
|
}
|
|
9088
9093
|
else
|
|
9089
9094
|
tempScale.range([
|
|
9090
|
-
0 + (x.bandwidth() -
|
|
9091
|
-
x.bandwidth() - (x.bandwidth() -
|
|
9095
|
+
0 + (x.bandwidth() - reducedBarWidth) / 2,
|
|
9096
|
+
x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
|
|
9092
9097
|
]);
|
|
9093
|
-
// .padding(0.05);
|
|
9094
9098
|
}
|
|
9095
9099
|
else
|
|
9096
9100
|
tempScale.range([
|
|
9097
|
-
0 + (x.bandwidth() -
|
|
9098
|
-
x.bandwidth() - (x.bandwidth() -
|
|
9101
|
+
0 + (x.bandwidth() - reducedBarWidth) / 2,
|
|
9102
|
+
x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
|
|
9099
9103
|
]);
|
|
9100
9104
|
}
|
|
9101
9105
|
}
|