axidio-styleguide-library1-v2 0.7.46 → 0.7.48
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.
|
@@ -8088,7 +8088,7 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8088
8088
|
if (this.chartConfiguration.isMultiChartGridLine !== undefined) {
|
|
8089
8089
|
const paddingValue = (isria && subgroups.length === 1) ? 0.1 : 0.5;
|
|
8090
8090
|
x = d3.scaleBand()
|
|
8091
|
-
.rangeRound([
|
|
8091
|
+
.rangeRound([width, 0])
|
|
8092
8092
|
.align(0.5)
|
|
8093
8093
|
.padding([paddingValue])
|
|
8094
8094
|
.domain(data.map((d) => d.name));
|
|
@@ -8648,7 +8648,8 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8648
8648
|
let calculatedScale = tempScale;
|
|
8649
8649
|
data.forEach((indiv) => {
|
|
8650
8650
|
if (indiv.name === d.name) {
|
|
8651
|
-
const keys = Object.keys(indiv).filter((temp, i) => i !== 0);
|
|
8651
|
+
// const keys = Object.keys(indiv).filter((temp, i) => i !== 0);
|
|
8652
|
+
const keys = Object.keys(indiv).filter(key => key !== 'name');
|
|
8652
8653
|
calculatedScale = d3.scaleBand().domain(keys).range([0, x.bandwidth()]);
|
|
8653
8654
|
if (x.bandwidth() > 100) {
|
|
8654
8655
|
const reducedBarWidth = self.isZoomedOut ? 60 : 100;
|
|
@@ -8660,6 +8661,28 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
8660
8661
|
// Return position relative to the group (since bars are inside a translated group element)
|
|
8661
8662
|
return calculatedScale(d.key) || 0;
|
|
8662
8663
|
}
|
|
8664
|
+
// private calculateDrilldownBarX(d, data, x, self, tempScale) {
|
|
8665
|
+
// // ✅ FIX: Use the actual subgroups from metaData, not Object.keys
|
|
8666
|
+
// const subgroups = self.chartData.metaData.keyList;
|
|
8667
|
+
// // Create scale using the full subgroups list
|
|
8668
|
+
// const calculatedScale = d3.scaleBand()
|
|
8669
|
+
// .domain(subgroups) // ✅ Use consistent domain across all groups
|
|
8670
|
+
// .range([0, x.bandwidth()]);
|
|
8671
|
+
// if (x.bandwidth() > 100) {
|
|
8672
|
+
// const reducedBarWidth = self.isZoomedOut ? 60 : 100;
|
|
8673
|
+
// const offset = (x.bandwidth() - reducedBarWidth) / 2;
|
|
8674
|
+
// calculatedScale.range([offset, x.bandwidth() - offset]);
|
|
8675
|
+
// }
|
|
8676
|
+
// const position = calculatedScale(d.key);
|
|
8677
|
+
// // ✅ Debug logging
|
|
8678
|
+
// if (position === undefined) {
|
|
8679
|
+
// console.error(`❌ Position undefined for key "${d.key}" in group "${d.name}"`);
|
|
8680
|
+
// console.error('Available subgroups:', subgroups);
|
|
8681
|
+
// console.error('Scale domain:', calculatedScale.domain());
|
|
8682
|
+
// return 0;
|
|
8683
|
+
// }
|
|
8684
|
+
// return position;
|
|
8685
|
+
// }
|
|
8663
8686
|
calculateBarY(d, y, height, self) {
|
|
8664
8687
|
if (d.value === -1) {
|
|
8665
8688
|
return y(0);
|