autoql-fe-utils 1.0.121 → 1.0.122
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.
- package/dist/index.global.js +21 -5
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +21 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.global.js
CHANGED
|
@@ -29892,16 +29892,32 @@
|
|
|
29892
29892
|
}
|
|
29893
29893
|
let cellTrans, textTrans, textAlign = labelAlign == "start" ? 0 : labelAlign == "middle" ? 0.5 : 1;
|
|
29894
29894
|
if (orient === "vertical") {
|
|
29895
|
-
const cellSize = textSize.map((d, i) =>
|
|
29895
|
+
const cellSize = textSize.map((d, i) => {
|
|
29896
|
+
var _a;
|
|
29897
|
+
return Math.max(d == null ? void 0 : d.height, (_a = shapeSize[i]) == null ? void 0 : _a.height);
|
|
29898
|
+
});
|
|
29896
29899
|
cellTrans = (d, i) => {
|
|
29897
29900
|
const height = sum(cellSize.slice(0, i));
|
|
29898
29901
|
return `translate(0, ${height + i * shapePadding})`;
|
|
29899
29902
|
};
|
|
29900
|
-
|
|
29903
|
+
if (shapeSize == null ? void 0 : shapeSize.length) {
|
|
29904
|
+
textTrans = (d, i) => {
|
|
29905
|
+
var _a, _b, _c, _d;
|
|
29906
|
+
return `translate( ${((_a = shapeSize[i]) == null ? void 0 : _a.width) + ((_b = shapeSize[i]) == null ? void 0 : _b.x) + labelOffset}, ${((_c = shapeSize[i]) == null ? void 0 : _c.y) + ((_d = shapeSize[i]) == null ? void 0 : _d.height) / 2 + 4})`;
|
|
29907
|
+
};
|
|
29908
|
+
}
|
|
29901
29909
|
} else if (orient === "horizontal") {
|
|
29902
|
-
|
|
29903
|
-
|
|
29904
|
-
|
|
29910
|
+
if (shapeSize == null ? void 0 : shapeSize.length) {
|
|
29911
|
+
cellTrans = (d, i) => {
|
|
29912
|
+
var _a;
|
|
29913
|
+
return `translate(${i * (((_a = shapeSize[i]) == null ? void 0 : _a.width) + shapePadding)},0)`;
|
|
29914
|
+
};
|
|
29915
|
+
textTrans = (d, i) => {
|
|
29916
|
+
var _a, _b, _c, _d;
|
|
29917
|
+
return `translate(${((_a = shapeSize[i]) == null ? void 0 : _a.width) * textAlign + ((_b = shapeSize[i]) == null ? void 0 : _b.x)},
|
|
29918
|
+
${((_c = shapeSize[i]) == null ? void 0 : _c.height) + ((_d = shapeSize[i]) == null ? void 0 : _d.y) + labelOffset + 8})`;
|
|
29919
|
+
};
|
|
29920
|
+
}
|
|
29905
29921
|
}
|
|
29906
29922
|
legendHelpers_default.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign);
|
|
29907
29923
|
legendHelpers_default.d3_title(svg, title, classPrefix, titleWidth);
|