impaktapps-design 0.2.89-alpha.401 → 0.2.89-alpha.403
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/impaktapps-design.es.js +28 -15
- package/dist/impaktapps-design.es.js.map +1 -1
- package/dist/impaktapps-design.umd.js +8 -8
- package/dist/impaktapps-design.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/component/PieGraph/DrawPieGraph.tsx +7 -2
- package/src/component/ToolTip.tsx +14 -2
- package/src/utils/finalDataProvider.ts +4 -4
|
@@ -10465,10 +10465,17 @@ const ToolTip = ({
|
|
|
10465
10465
|
detectBounds: true,
|
|
10466
10466
|
scroll: true
|
|
10467
10467
|
});
|
|
10468
|
+
const tooltipStyles2 = {
|
|
10469
|
+
...defaultStyles,
|
|
10470
|
+
minWidth: 200,
|
|
10471
|
+
height: 20,
|
|
10472
|
+
backgroundColor: "lightgrey",
|
|
10473
|
+
color: "black"
|
|
10474
|
+
};
|
|
10468
10475
|
return /* @__PURE__ */ jsx(Tooltip$1, {
|
|
10469
10476
|
top: top2,
|
|
10470
10477
|
left: left2,
|
|
10471
|
-
style:
|
|
10478
|
+
style: tooltipStyles2,
|
|
10472
10479
|
children: /* @__PURE__ */ jsxs("div", {
|
|
10473
10480
|
style: {
|
|
10474
10481
|
display: "flex",
|
|
@@ -11509,10 +11516,6 @@ const finalDataProvider = (type2, value, theme) => {
|
|
|
11509
11516
|
...(_l = value == null ? void 0 : value.style) == null ? void 0 : _l.headerStyle
|
|
11510
11517
|
},
|
|
11511
11518
|
tooltipStyle: {
|
|
11512
|
-
minWidth: 80,
|
|
11513
|
-
height: 20,
|
|
11514
|
-
backgroundColor: "lightgrey",
|
|
11515
|
-
color: "black",
|
|
11516
11519
|
...(_m = value == null ? void 0 : value.style) == null ? void 0 : _m.tooltipStyle
|
|
11517
11520
|
},
|
|
11518
11521
|
labelStyle: {
|
|
@@ -11710,12 +11713,13 @@ const DrawPieGraph = ({
|
|
|
11710
11713
|
parentWidth,
|
|
11711
11714
|
parentHeight
|
|
11712
11715
|
}) => {
|
|
11713
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l
|
|
11716
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
11714
11717
|
const [active2, setActive] = useState(null);
|
|
11715
11718
|
const letters = (_a = value == null ? void 0 : value.main) == null ? void 0 : _a.data;
|
|
11716
11719
|
const keys2 = Object.keys(letters[0]);
|
|
11717
11720
|
const arr = ((_b = value == null ? void 0 : value.main) == null ? void 0 : _b.xAxisValue) && ((_c = value == null ? void 0 : value.main) == null ? void 0 : _c.yAxisValue) ? [(_d = value == null ? void 0 : value.main) == null ? void 0 : _d.xAxisValue, (_e = value == null ? void 0 : value.main) == null ? void 0 : _e.yAxisValue] : keys2;
|
|
11718
11721
|
const labelKeyIndex = keys2.indexOf("label");
|
|
11722
|
+
console.log("PieGGGG");
|
|
11719
11723
|
const valueKeyIndex = labelKeyIndex === 0 ? 1 : 0;
|
|
11720
11724
|
const frequency = (d2) => d2[arr[valueKeyIndex]];
|
|
11721
11725
|
const getLetterFrequencyColor = (letter, index2) => {
|
|
@@ -11765,9 +11769,15 @@ const DrawPieGraph = ({
|
|
|
11765
11769
|
pieSortValues,
|
|
11766
11770
|
pieValue: frequency,
|
|
11767
11771
|
outerRadius: (_h = (_g = value == null ? void 0 : value.style) == null ? void 0 : _g.pieStyle) == null ? void 0 : _h.outerRadius,
|
|
11768
|
-
innerRadius: (
|
|
11769
|
-
|
|
11770
|
-
|
|
11772
|
+
innerRadius: ({
|
|
11773
|
+
data
|
|
11774
|
+
}) => {
|
|
11775
|
+
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
11776
|
+
const size = active2 && active2.label == data.label ? ((_b2 = (_a2 = value == null ? void 0 : value.style) == null ? void 0 : _a2.pieStyle) == null ? void 0 : _b2.innerRadius) + 15 : (_d2 = (_c2 = value == null ? void 0 : value.style) == null ? void 0 : _c2.pieStyle) == null ? void 0 : _d2.innerRadius;
|
|
11777
|
+
return ((_f2 = (_e2 = value == null ? void 0 : value.style) == null ? void 0 : _e2.pieStyle) == null ? void 0 : _f2.outerRadius) - size;
|
|
11778
|
+
},
|
|
11779
|
+
cornerRadius: (_j = (_i = value == null ? void 0 : value.style) == null ? void 0 : _i.pieStyle) == null ? void 0 : _j.cornerRadius,
|
|
11780
|
+
padAngle: (_l = (_k = value == null ? void 0 : value.style) == null ? void 0 : _k.pieStyle) == null ? void 0 : _l.padAngle,
|
|
11771
11781
|
children: (pie2) => {
|
|
11772
11782
|
return pie2.arcs.map((arc2, index2) => {
|
|
11773
11783
|
var _a2, _b2, _c2, _d2;
|
|
@@ -11800,12 +11810,15 @@ const DrawPieGraph = ({
|
|
|
11800
11810
|
}
|
|
11801
11811
|
})
|
|
11802
11812
|
})
|
|
11803
|
-
}), tooltipOpen && /* @__PURE__ */ jsx(
|
|
11804
|
-
|
|
11805
|
-
|
|
11806
|
-
|
|
11807
|
-
|
|
11808
|
-
|
|
11813
|
+
}), tooltipOpen && /* @__PURE__ */ jsx(
|
|
11814
|
+
ToolTip,
|
|
11815
|
+
{
|
|
11816
|
+
style: value == null ? void 0 : value.style,
|
|
11817
|
+
top: tooltipTop,
|
|
11818
|
+
left: tooltipLeft,
|
|
11819
|
+
tooltipData
|
|
11820
|
+
}
|
|
11821
|
+
)]
|
|
11809
11822
|
});
|
|
11810
11823
|
};
|
|
11811
11824
|
const PieGraph = ({
|