axidio-styleguide-library1-v2 0.1.4 → 0.1.5
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.
|
@@ -8783,11 +8783,11 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8783
8783
|
.attr('class', 'lib-xaxis-labels-texts-drilldown')
|
|
8784
8784
|
.style('font-size', this.isHeaderVisible ? '18px' : '14px')
|
|
8785
8785
|
.attr('y', function (d) {
|
|
8786
|
-
// For grouped bar charts with many bars and xLabel present, add extra space
|
|
8786
|
+
// For grouped bar charts with many bars and xLabel present, do NOT add extra space (avoid overlap)
|
|
8787
8787
|
if (subgroups.length > 1 && data.length > 8 && metaData.xLabel) {
|
|
8788
|
-
// In maximized (fullscreen) view, keep the gap minimal
|
|
8788
|
+
// In maximized (fullscreen) view, keep the gap minimal
|
|
8789
8789
|
if (self.chartConfiguration.isFullScreen) {
|
|
8790
|
-
return short_tick_length_bg + 3;
|
|
8790
|
+
return short_tick_length_bg + 3; // Slightly reduce gap
|
|
8791
8791
|
}
|
|
8792
8792
|
return short_tick_length_bg + 3;
|
|
8793
8793
|
}
|
|
@@ -9095,50 +9095,13 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9095
9095
|
}
|
|
9096
9096
|
})
|
|
9097
9097
|
.attr('x', function (d) {
|
|
9098
|
-
// Always decrease x value by 10 for the first subgroup of the first group in grouped charts, zoom-in view
|
|
9099
|
-
if (subgroups.length > 1 && !self.isZoomedOut && self.chartData.data.length > 1 && d.name === self.chartData.data[0].name && d.key === subgroups[0]) {
|
|
9100
|
-
if (self.chartConfiguration.isDrilldownChart) {
|
|
9101
|
-
data.map((indiv, idx) => {
|
|
9102
|
-
if (indiv.name == d.name) {
|
|
9103
|
-
let keys = Object.keys(indiv).filter((temp, i) => i != 0);
|
|
9104
|
-
tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
|
|
9105
|
-
if (x.bandwidth() > 100) {
|
|
9106
|
-
let reducedBarWidth = 60;
|
|
9107
|
-
if (!self.isZoomedOut) {
|
|
9108
|
-
reducedBarWidth = 30;
|
|
9109
|
-
}
|
|
9110
|
-
if (self.chartData.data.length == 1) {
|
|
9111
|
-
if (Object.keys(self.chartData.data[0]).length == 2) {
|
|
9112
|
-
tempScale.range([
|
|
9113
|
-
0 + (x.bandwidth() - reducedBarWidth) / 2,
|
|
9114
|
-
x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
|
|
9115
|
-
]);
|
|
9116
|
-
}
|
|
9117
|
-
else
|
|
9118
|
-
tempScale.range([
|
|
9119
|
-
0 + (x.bandwidth() - reducedBarWidth) / 2,
|
|
9120
|
-
x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
|
|
9121
|
-
]);
|
|
9122
|
-
}
|
|
9123
|
-
else
|
|
9124
|
-
tempScale.range([
|
|
9125
|
-
0 + (x.bandwidth() - reducedBarWidth) / 2,
|
|
9126
|
-
x.bandwidth() - (x.bandwidth() - reducedBarWidth) / 2,
|
|
9127
|
-
]);
|
|
9128
|
-
}
|
|
9129
|
-
}
|
|
9130
|
-
});
|
|
9131
|
-
return tempScale(d.key) - 10;
|
|
9132
|
-
}
|
|
9133
|
-
return xSubgroup(d.key) - 10;
|
|
9134
|
-
}
|
|
9135
|
-
// Otherwise, use normal logic
|
|
9136
9098
|
if (self.chartConfiguration.isDrilldownChart) {
|
|
9137
|
-
data.map((indiv
|
|
9099
|
+
data.map((indiv) => {
|
|
9138
9100
|
if (indiv.name == d.name) {
|
|
9139
9101
|
let keys = Object.keys(indiv).filter((temp, i) => i != 0);
|
|
9140
9102
|
tempScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
|
|
9141
9103
|
if (x.bandwidth() > 100) {
|
|
9104
|
+
// Increase bar width a bit in zoom-in view
|
|
9142
9105
|
let reducedBarWidth = 60;
|
|
9143
9106
|
if (!self.isZoomedOut) {
|
|
9144
9107
|
reducedBarWidth = 30;
|
|
@@ -9180,9 +9143,9 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
9180
9143
|
return y(0);
|
|
9181
9144
|
})
|
|
9182
9145
|
.attr('width', function (d) {
|
|
9183
|
-
// For grouped bar charts in zoom-in view,
|
|
9146
|
+
// For grouped bar charts in zoom-in view, use full bandwidth for each bar (no overlap)
|
|
9184
9147
|
if (subgroups.length > 1 && !self.isZoomedOut) {
|
|
9185
|
-
return xSubgroup.bandwidth()
|
|
9148
|
+
return xSubgroup.bandwidth();
|
|
9186
9149
|
}
|
|
9187
9150
|
// For single-bar (non-grouped) charts in zoom-in view, set bar width to 80
|
|
9188
9151
|
if (subgroups.length === 1 && !self.isZoomedOut) {
|