@gisce/react-ooui 2.5.6 → 2.5.7-rc.1
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
|
@@ -4988,15 +4988,7 @@ const Tn = (e) => (t) => {
|
|
|
4988
4988
|
pie: {
|
|
4989
4989
|
appendPadding: 10,
|
|
4990
4990
|
radius: 0.9,
|
|
4991
|
-
label:
|
|
4992
|
-
type: "inner",
|
|
4993
|
-
offset: "-30%",
|
|
4994
|
-
content: ({ percent: e }) => `${(e * 100).toFixed(0)}%`,
|
|
4995
|
-
style: {
|
|
4996
|
-
fontSize: 14,
|
|
4997
|
-
textAlign: "center"
|
|
4998
|
-
}
|
|
4999
|
-
},
|
|
4991
|
+
label: null,
|
|
5000
4992
|
legend: {
|
|
5001
4993
|
maxWidthRatio: 0.5,
|
|
5002
4994
|
maxItemWidth: 1e3
|
|
@@ -5262,7 +5254,19 @@ const Ul = {
|
|
|
5262
5254
|
function Gl(e) {
|
|
5263
5255
|
const { type: t, data: n, isGroup: i, isStack: o } = e;
|
|
5264
5256
|
let s = { ...Ir[t] };
|
|
5265
|
-
|
|
5257
|
+
if (s || (s = { ...Ir.default }), s.data = n, t === "pie") {
|
|
5258
|
+
const a = n.reduce((l, d) => l + d.value, 0);
|
|
5259
|
+
n.forEach((l) => {
|
|
5260
|
+
l.percent = l.value / a * 100;
|
|
5261
|
+
}), s.colorField = "x", s.angleField = "value", s.legend.itemValue = {
|
|
5262
|
+
formatter: (l, d) => {
|
|
5263
|
+
const u = n.find((m) => m.x === d.id);
|
|
5264
|
+
return `${`${((u == null ? void 0 : u.percent) || 0).toFixed(0)}%`}`;
|
|
5265
|
+
}
|
|
5266
|
+
};
|
|
5267
|
+
} else
|
|
5268
|
+
s.xField = "x", s.yField = "value", s.seriesField = "type", s.isGroup = i, o && (s.isStack = !0, s.groupField = "stacked");
|
|
5269
|
+
return s;
|
|
5266
5270
|
}
|
|
5267
5271
|
const ql = (e, t) => {
|
|
5268
5272
|
const { view_id: n, model: i, context: o, domain: s, limit: a, manualIds: l } = e, [d, u] = b(!1), [f, c] = b(), [m, p] = b(), h = ne(
|