@gisce/react-ooui 2.74.1 → 2.74.2
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/react-ooui.es.js
CHANGED
|
@@ -2764,12 +2764,20 @@ const Iu = {
|
|
|
2764
2764
|
}
|
|
2765
2765
|
}
|
|
2766
2766
|
}, Fu = (e) => {
|
|
2767
|
-
const t = e.reduce((
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2767
|
+
const t = e.reduce((c, d) => c + d.value, 0), r = e.map((c) => c.value / t * 100).map(
|
|
2768
|
+
(c) => Math.round(c * 100) / 100
|
|
2769
|
+
), o = r.reduce((c, d) => c + d, 0);
|
|
2770
|
+
if (Math.abs(o - 100) < 1e-3)
|
|
2771
|
+
return e.map((c, d) => ({
|
|
2772
|
+
x: c.x,
|
|
2773
|
+
percent: r[d]
|
|
2774
|
+
}));
|
|
2775
|
+
const i = (100 - o) / r.length, l = r.map(
|
|
2776
|
+
(c) => Math.round((c + i) * 100) / 100
|
|
2777
|
+
);
|
|
2778
|
+
return e.map((c, d) => ({
|
|
2779
|
+
x: c.x,
|
|
2780
|
+
percent: l[d]
|
|
2773
2781
|
}));
|
|
2774
2782
|
}, { Text: Ts } = nn, la = 400, Au = nt(Vc), _u = nt(Nc), Ru = nt(Mc), Ou = {
|
|
2775
2783
|
line: Au,
|
|
@@ -2798,7 +2806,7 @@ const Iu = {
|
|
|
2798
2806
|
if (!d)
|
|
2799
2807
|
return;
|
|
2800
2808
|
const g = d.find((_) => _.x === y);
|
|
2801
|
-
return `${`${(
|
|
2809
|
+
return `${`${(g == null ? void 0 : g.percent) || 0}`}%`;
|
|
2802
2810
|
},
|
|
2803
2811
|
[d]
|
|
2804
2812
|
), u = Q(() => {
|