vue-data-ui 2.12.6 → 2.12.7-beta.0
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/{Arrow-Bd9ZVBnX.js → Arrow-CmqjRRUl.js} +1 -1
- package/dist/BaseDraggableDialog-BMlyvt7E.js +180 -0
- package/dist/{BaseIcon-CNbwMh_-.js → BaseIcon-CZdMutjs.js} +1 -1
- package/dist/{ColorPicker-B_FoQwtO.js → ColorPicker-DvVKgyAl.js} +23 -24
- package/dist/{DataTable-Rajdtaf6.js → DataTable-Cv9CIz-a.js} +11 -11
- package/dist/{Legend-BxtDQCIv.js → Legend-DFunFf8i.js} +8 -8
- package/dist/NonSvgPenAndPaper-pVuHj6_A.js +467 -0
- package/dist/PackageVersion-CLY-udAA.js +10 -0
- package/dist/{PenAndPaper-BkP3J-Ft.js → PenAndPaper-B9na2mbr.js} +8 -10
- package/dist/RecursiveCircles-Dn3TGoL6.js +96 -0
- package/dist/RecursiveLabels-NTMB9w5C.js +49 -0
- package/dist/RecursiveLinks-ld_gDZH4.js +64 -0
- package/dist/{Shape-C69a0f29.js → Shape-D3w9qas1.js} +2 -2
- package/dist/{Slicer-7qFdY-bT.js → Slicer-ncY8krrM.js} +2 -2
- package/dist/SparkTooltip-CwThutH2.js +68 -0
- package/dist/{Title-CzaCeCOm.js → Title-B5qqUI3M.js} +2 -2
- package/dist/Tooltip-C9rxJ-Ru.js +149 -0
- package/dist/{usePrinter-C5bLp34h.js → UserOptions-Ddy6CuLC.js} +172 -231
- package/dist/{dom-to-png-Bm0D0yPL.js → dom-to-png-DDlooC9r.js} +1 -1
- package/dist/{img-BN9AzqUr.js → img-m9g7lR5d.js} +1 -1
- package/dist/{index-BFzQMJda.js → index-BiHmNd1-.js} +21 -21
- package/dist/{pdf-uTbs813M.js → pdf-BqM953uL.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/useChartAccessibility-9icAAmYg.js +12 -0
- package/dist/useMouse-AicQS8Vf.js +13 -0
- package/dist/{useNestedProp-v7KPpwuP.js → useNestedProp-tRqS0ZAM.js} +1 -1
- package/dist/{usePanZoom-CUkkqW81.js → usePanZoom-BQMvRXEQ.js} +16 -17
- package/dist/usePrinter-CRCbl1WG.js +53 -0
- package/dist/vClickOutside-C6WiFswA.js +13 -0
- package/dist/{vue-data-ui-D1k8FeRp.js → vue-data-ui-D9uTDt73.js} +63 -63
- package/dist/vue-data-ui.js +19 -19
- package/dist/{vue-ui-3d-bar-DoklA4DT.js → vue-ui-3d-bar-rtuSc8FS.js} +397 -402
- package/dist/{vue-ui-accordion-BUz4JIIX.js → vue-ui-accordion-CmCs2yR2.js} +3 -3
- package/dist/{vue-ui-age-pyramid-4kyBq-Dy.js → vue-ui-age-pyramid-BrzMSiyu.js} +215 -218
- package/dist/{vue-ui-annotator-Bq1ZeFfb.js → vue-ui-annotator-CYxmTpf6.js} +2 -2
- package/dist/{vue-ui-bullet-DU10avvA.js → vue-ui-bullet-D25qNQfb.js} +137 -140
- package/dist/{vue-ui-candlestick-BI1t3flz.js → vue-ui-candlestick-BuerNa-r.js} +265 -271
- package/dist/{vue-ui-carousel-table-VowLf_oc.js → vue-ui-carousel-table-aN0HLsOO.js} +137 -137
- package/dist/{vue-ui-chestnut-BHjV3d94.js → vue-ui-chestnut-oUj2ocsZ.js} +397 -400
- package/dist/{vue-ui-chord-CPr7r-2_.js → vue-ui-chord-C4evlXYB.js} +356 -365
- package/dist/vue-ui-circle-pack-CWrNiKTY.js +656 -0
- package/dist/{vue-ui-cursor-C9teAbVI.js → vue-ui-cursor-DgpSttlt.js} +2 -2
- package/dist/{vue-ui-dashboard-CwDYB8tP.js → vue-ui-dashboard-BN2ha1Eh.js} +62 -62
- package/dist/{vue-ui-digits-CHmkL0hn.js → vue-ui-digits-BhjAxXgm.js} +2 -2
- package/dist/vue-ui-donut-D3_z61HI.js +1291 -0
- package/dist/vue-ui-donut-evolution-oKtmZPx4.js +864 -0
- package/dist/{vue-ui-dumbbell-DTKLLd1N.js → vue-ui-dumbbell-C8Lokx-F.js} +265 -270
- package/dist/{vue-ui-flow-BLBhsU2n.js → vue-ui-flow-BVRkH0PS.js} +291 -300
- package/dist/{vue-ui-funnel-CIrWdeBk.js → vue-ui-funnel-DFxcmAB5.js} +216 -219
- package/dist/{vue-ui-galaxy-ByhKyIV4.js → vue-ui-galaxy-CGE0hlBC.js} +227 -235
- package/dist/{vue-ui-gauge-BbfBMpng.js → vue-ui-gauge-B48eMvOR.js} +240 -243
- package/dist/{vue-ui-gizmo-BM-_QfHM.js → vue-ui-gizmo-zTKNpjvv.js} +57 -58
- package/dist/{vue-ui-heatmap-BA4z4hsw.js → vue-ui-heatmap-UNfTt8SM.js} +239 -242
- package/dist/{vue-ui-history-plot-8vM_IUy8.js → vue-ui-history-plot-CbCWmvtg.js} +257 -262
- package/dist/{vue-ui-kpi-D57QLK6A.js → vue-ui-kpi-Drf_lrlh.js} +29 -30
- package/dist/{vue-ui-mini-loader-CR4c-xJQ.js → vue-ui-mini-loader-DU3G6BVs.js} +2 -2
- package/dist/vue-ui-molecule-B5MOXYEA.js +580 -0
- package/dist/{vue-ui-mood-radar-Brc9cxoD.js → vue-ui-mood-radar-CC_CVLvn.js} +180 -186
- package/dist/{vue-ui-nested-donuts-W3Z5F--L.js → vue-ui-nested-donuts-D_H962kk.js} +366 -374
- package/dist/{vue-ui-onion-BNBlGNlF.js → vue-ui-onion-P8k6T724.js} +252 -258
- package/dist/{vue-ui-parallel-coordinate-plot-B5G3jyvg.js → vue-ui-parallel-coordinate-plot-B5Los0vX.js} +296 -303
- package/dist/{vue-ui-quadrant-CUy9mVIA.js → vue-ui-quadrant-B3wzCTxK.js} +402 -409
- package/dist/{vue-ui-quick-chart-D4_8mRXU.js → vue-ui-quick-chart-oucj6hXk.js} +611 -616
- package/dist/{vue-ui-radar-BUk56jGL.js → vue-ui-radar-Cjqlyu6d.js} +270 -277
- package/dist/{vue-ui-rating-B9TQl5KP.js → vue-ui-rating-gryk_h_6.js} +2 -2
- package/dist/vue-ui-relation-circle-ielvWC-1.js +525 -0
- package/dist/{vue-ui-ridgeline-Cl06bGom.js → vue-ui-ridgeline-Dydqo68b.js} +321 -326
- package/dist/{vue-ui-rings-B6bpFlFp.js → vue-ui-rings-BRBXektJ.js} +262 -269
- package/dist/{vue-ui-scatter--WUuVw5G.js → vue-ui-scatter-Df-BM7Ts.js} +372 -379
- package/dist/{vue-ui-skeleton-B_YI7Yuc.js → vue-ui-skeleton-CbYQYRvD.js} +19 -19
- package/dist/{vue-ui-smiley-Bbam2fDz.js → vue-ui-smiley-BfHaQMaW.js} +2 -2
- package/dist/{vue-ui-spark-trend-DavXuwGt.js → vue-ui-spark-trend-z3fUChs_.js} +114 -117
- package/dist/{vue-ui-sparkbar-9N1FU9-J.js → vue-ui-sparkbar-ChtFIugH.js} +104 -106
- package/dist/{vue-ui-sparkgauge-_9ntq4EK.js → vue-ui-sparkgauge-DtpODCww.js} +72 -74
- package/dist/{vue-ui-sparkhistogram-BEzOV4HV.js → vue-ui-sparkhistogram-C3XnYiXI.js} +83 -86
- package/dist/vue-ui-sparkline-CoL8jiX8.js +459 -0
- package/dist/{vue-ui-sparkstackbar-BSWcs3v0.js → vue-ui-sparkstackbar-CYk3mZJH.js} +102 -105
- package/dist/{vue-ui-stackbar-gG5BLlAr.js → vue-ui-stackbar-D9LGbuG5.js} +433 -437
- package/dist/{vue-ui-strip-plot-BJouRmxh.js → vue-ui-strip-plot-C5r1Ee2R.js} +245 -252
- package/dist/{vue-ui-table-D9Ry8s4N.js → vue-ui-table-DBaT_TfA.js} +3 -3
- package/dist/{vue-ui-table-heatmap-Bizzpi31.js → vue-ui-table-heatmap-CYW4YfKN.js} +93 -94
- package/dist/{vue-ui-table-sparkline-Dg54Ovs2.js → vue-ui-table-sparkline-Di0MYR4p.js} +212 -212
- package/dist/{vue-ui-thermometer-6MSdF_Gm.js → vue-ui-thermometer-BF1btHY2.js} +154 -157
- package/dist/{vue-ui-timer-ByaKokk8.js → vue-ui-timer-D9FfRWN5.js} +180 -181
- package/dist/vue-ui-tiremarks-CQ0lk8fJ.js +341 -0
- package/dist/vue-ui-treemap-1Lx7YRtc.js +947 -0
- package/dist/{vue-ui-vertical-bar-CE4oBwBv.js → vue-ui-vertical-bar-DdVVQ1ED.js} +397 -403
- package/dist/{vue-ui-waffle-DNEEnY_G.js → vue-ui-waffle-BhnuPiRD.js} +317 -324
- package/dist/vue-ui-wheel-BIjJ0fg8.js +335 -0
- package/dist/vue-ui-word-cloud-3-r8HwO_.js +642 -0
- package/dist/{vue-ui-world-Brhq17TE.js → vue-ui-world-CPIGEswq.js} +430 -442
- package/dist/{vue-ui-xy-K2G7QQxG.js → vue-ui-xy-9e_epIN4.js} +845 -846
- package/dist/vue-ui-xy-canvas-DcGgQ7s4.js +1206 -0
- package/package.json +6 -6
- package/dist/BaseDraggableDialog-Bzwlfmy1.js +0 -186
- package/dist/PackageVersion-BjrblLPQ.js +0 -10
- package/dist/Tooltip-CWmRmhJr.js +0 -158
- package/dist/useChartAccessibility-BWojgys7.js +0 -13
- package/dist/vue-ui-circle-pack-D_jYpsuD.js +0 -659
- package/dist/vue-ui-donut-WRUDvvZa.js +0 -1292
- package/dist/vue-ui-donut-evolution-BQxV5D_L.js +0 -871
- package/dist/vue-ui-molecule-Bq69N7rC.js +0 -782
- package/dist/vue-ui-relation-circle-T6aTibIU.js +0 -528
- package/dist/vue-ui-sparkline-D__GCUAz.js +0 -519
- package/dist/vue-ui-tiremarks-Z8pjUT1g.js +0 -344
- package/dist/vue-ui-treemap-pRJ3be5l.js +0 -956
- package/dist/vue-ui-wheel-DWPYZxdT.js +0 -338
- package/dist/vue-ui-word-cloud-DAR7R8F8.js +0 -648
- package/dist/vue-ui-xy-canvas-ml44sPHS.js +0 -1673
|
@@ -1,26 +1,20 @@
|
|
|
1
|
-
import { computed as k, ref as v, watch as
|
|
2
|
-
import { u as
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import { u as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
import { _ as Qt } from "./PackageVersion-BjrblLPQ.js";
|
|
13
|
-
import { _ as Zt } from "./PenAndPaper-BkP3J-Ft.js";
|
|
14
|
-
import { u as jt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
|
-
import { u as el } from "./useChartAccessibility-BWojgys7.js";
|
|
16
|
-
import { _ as tl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
|
-
const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["id"], ul = ["offset", "stop-color"], nl = ["offset", "stop-opacity"], rl = ["id"], il = ["id"], dl = ["id"], cl = ["flood-color"], vl = ["d", "fill", "stroke", "stroke-width", "filter"], fl = { key: 1 }, hl = ["d", "fill"], pl = { key: 2 }, yl = ["x", "y", "font-size", "font-weight", "fill"], bl = { key: 3 }, gl = ["filter"], ml = ["opacity", "text-anchor", "x", "y", "fill", "font-size", "font-weight"], $l = ["opacity", "text-anchor", "x", "y", "fill", "font-size", "font-weight"], wl = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], kl = ["d", "fill", "onMouseenter", "onClick"], _l = {
|
|
1
|
+
import { defineAsyncComponent as R, computed as k, ref as v, watch as et, onMounted as tt, nextTick as lt, shallowRef as at, onBeforeUnmount as zt, createElementBlock as i, openBlock as n, unref as r, normalizeStyle as se, normalizeClass as B, createBlock as E, createCommentVNode as g, createVNode as ot, createSlots as Mt, withCtx as L, renderSlot as x, normalizeProps as Y, guardReactiveProps as X, createElementVNode as m, Fragment as T, renderList as O, toDisplayString as N, withDirectives as st, vShow as ut, createTextVNode as ue } from "vue";
|
|
2
|
+
import { u as Rt, c as Bt, t as Et, p as Ce, a as Ut, H as D, o as Gt, e as H, b as Yt, d as Xt, m as nt, f as F, X as Ht, s as rt, K as Wt, k as _e, n as W, i as J, x as it, q as qt, r as Kt, y as Jt, S as dt } from "./index-BiHmNd1-.js";
|
|
3
|
+
import { t as Qt, u as Zt } from "./useResponsive-JZ9xq-JV.js";
|
|
4
|
+
import { u as ct } from "./useNestedProp-tRqS0ZAM.js";
|
|
5
|
+
import { u as jt } from "./usePrinter-CRCbl1WG.js";
|
|
6
|
+
import { u as el } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
|
+
import { u as tl } from "./useChartAccessibility-9icAAmYg.js";
|
|
8
|
+
import ll from "./Title-B5qqUI3M.js";
|
|
9
|
+
import al from "./Legend-DFunFf8i.js";
|
|
10
|
+
import { _ as ol } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
+
const sl = ["id"], ul = ["xmlns", "viewBox"], nl = ["width", "height"], rl = ["id"], il = ["offset", "stop-color"], dl = ["offset", "stop-opacity"], cl = ["id"], vl = ["id"], fl = ["id"], hl = ["flood-color"], pl = ["d", "fill", "stroke", "stroke-width", "filter"], yl = { key: 1 }, bl = ["d", "fill"], gl = { key: 2 }, ml = ["x", "y", "font-size", "font-weight", "fill"], wl = { key: 3 }, $l = ["filter"], kl = ["opacity", "text-anchor", "x", "y", "fill", "font-size", "font-weight"], Ll = ["opacity", "text-anchor", "x", "y", "fill", "font-size", "font-weight"], xl = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], Cl = ["d", "fill", "onMouseenter", "onClick"], _l = {
|
|
18
12
|
key: 5,
|
|
19
13
|
class: "vue-data-ui-watermark"
|
|
20
|
-
},
|
|
14
|
+
}, Tl = {
|
|
21
15
|
key: 0,
|
|
22
16
|
class: "vue-ui-nested-donuts-legend-title"
|
|
23
|
-
},
|
|
17
|
+
}, Fl = ["onClick"], Ol = ["innerHTML"], Sl = {
|
|
24
18
|
__name: "vue-ui-nested-donuts",
|
|
25
19
|
props: {
|
|
26
20
|
config: {
|
|
@@ -37,38 +31,38 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
37
31
|
}
|
|
38
32
|
},
|
|
39
33
|
emits: ["selectLegend", "selectDatapoint"],
|
|
40
|
-
setup(
|
|
41
|
-
const { vue_ui_nested_donuts:
|
|
42
|
-
function
|
|
43
|
-
|
|
34
|
+
setup(vt, { expose: ft, emit: ht }) {
|
|
35
|
+
const pt = R(() => import("./vue-ui-accordion-CmCs2yR2.js")), yt = R(() => import("./DataTable-Cv9CIz-a.js")), bt = R(() => import("./PackageVersion-CLY-udAA.js")), gt = R(() => import("./PenAndPaper-B9na2mbr.js")), mt = R(() => import("./vue-ui-skeleton-CbYQYRvD.js")), wt = R(() => import("./Tooltip-C9rxJ-Ru.js")), $t = R(() => import("./UserOptions-Ddy6CuLC.js")), { vue_ui_nested_donuts: kt } = Rt(), C = vt, Q = k(() => !!C.dataset && C.dataset.length), y = v(Bt()), ne = v(!1), re = v(""), Lt = v(null), Te = v(0), q = v(null), Fe = v(null), ie = v(null), Oe = v(null), Se = v(null), Ae = v(0), Ie = v(0), Ne = v(0), z = v(!0), M = v([]), K = v([]), U = v(!1);
|
|
36
|
+
function xt(l) {
|
|
37
|
+
U.value = l, Te.value += 1;
|
|
44
38
|
}
|
|
45
39
|
const e = k({
|
|
46
|
-
get: () =>
|
|
40
|
+
get: () => ze(),
|
|
47
41
|
set: (l) => l
|
|
48
|
-
}), { userOptionsVisible: de, setUserOptionsVisibility:
|
|
42
|
+
}), { userOptionsVisible: de, setUserOptionsVisibility: Ve, keepUserOptionState: Pe } = el({ config: e.value }), { svgRef: De } = tl({
|
|
49
43
|
config: e.value.style.chart.title
|
|
50
44
|
});
|
|
51
|
-
function
|
|
52
|
-
const l =
|
|
53
|
-
userConfig:
|
|
54
|
-
defaultConfig:
|
|
45
|
+
function ze() {
|
|
46
|
+
const l = ct({
|
|
47
|
+
userConfig: C.config,
|
|
48
|
+
defaultConfig: kt
|
|
55
49
|
});
|
|
56
50
|
return l.theme ? {
|
|
57
|
-
...
|
|
58
|
-
userConfig:
|
|
51
|
+
...ct({
|
|
52
|
+
userConfig: Ut.vue_ui_nested_donuts[l.theme] || C.config,
|
|
59
53
|
defaultConfig: l
|
|
60
54
|
}),
|
|
61
|
-
customPalette:
|
|
55
|
+
customPalette: Et[l.theme] || Ce
|
|
62
56
|
} : l;
|
|
63
57
|
}
|
|
64
|
-
|
|
65
|
-
() =>
|
|
58
|
+
et(
|
|
59
|
+
() => C.config,
|
|
66
60
|
(l) => {
|
|
67
|
-
e.value =
|
|
61
|
+
e.value = ze(), de.value = !e.value.userOptions.showOnChartHover, ce(), Ae.value += 1, Ie.value += 1, Ne.value += 1, $.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, $.value.showTable = e.value.table.show, $.value.showTooltip = e.value.style.chart.tooltip.show;
|
|
68
62
|
},
|
|
69
63
|
{ deep: !0 }
|
|
70
64
|
);
|
|
71
|
-
const
|
|
65
|
+
const Me = k(() => {
|
|
72
66
|
const { top: l, right: s, bottom: a, left: o } = e.value.style.chart.padding;
|
|
73
67
|
return {
|
|
74
68
|
css: `padding:${l}px ${s}px ${a}px ${o}px`,
|
|
@@ -78,162 +72,161 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
78
72
|
left: o
|
|
79
73
|
};
|
|
80
74
|
});
|
|
81
|
-
function
|
|
75
|
+
function Ct(l, s = 1e3, a = 50) {
|
|
82
76
|
return new Promise((o) => {
|
|
83
77
|
const t = l.length;
|
|
84
|
-
M.value = Array(t).fill(0),
|
|
78
|
+
M.value = Array(t).fill(0), K.value = [];
|
|
85
79
|
let u = 0;
|
|
86
|
-
l.forEach((c,
|
|
80
|
+
l.forEach((c, h) => {
|
|
87
81
|
setTimeout(() => {
|
|
88
|
-
const
|
|
89
|
-
function
|
|
90
|
-
const
|
|
91
|
-
M.value[
|
|
82
|
+
const I = performance.now();
|
|
83
|
+
function d(p) {
|
|
84
|
+
const _ = Math.min((p - I) / s, 1), ge = dt(_), me = c * ge;
|
|
85
|
+
M.value[h] = me, M.value = [...M.value];
|
|
92
86
|
const ae = [];
|
|
93
|
-
let
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
(
|
|
87
|
+
let we = 0;
|
|
88
|
+
C.dataset.forEach((oe, $e) => {
|
|
89
|
+
const Nt = oe.series.reduce(
|
|
90
|
+
(Le, xe) => Le + D(xe.values).reduce((Pt, Dt) => Pt + Dt, 0),
|
|
97
91
|
0
|
|
98
|
-
),
|
|
99
|
-
|
|
92
|
+
), Vt = M.value.slice(we, we + oe.series.length).reduce((Le, xe) => Le + xe, 0), ke = Nt - Vt;
|
|
93
|
+
ke > 1e-3 && ae.push({
|
|
100
94
|
name: "__ghost__",
|
|
101
95
|
arcOf: oe.name,
|
|
102
|
-
arcOfId: `${y.value}_${
|
|
103
|
-
id: `ghost_${y.value}_${
|
|
96
|
+
arcOfId: `${y.value}_${$e}`,
|
|
97
|
+
id: `ghost_${y.value}_${$e}`,
|
|
104
98
|
seriesIndex: -1,
|
|
105
|
-
datasetIndex:
|
|
99
|
+
datasetIndex: $e,
|
|
106
100
|
color: "transparent",
|
|
107
|
-
value:
|
|
108
|
-
fullValue:
|
|
101
|
+
value: ke,
|
|
102
|
+
fullValue: ke,
|
|
109
103
|
absoluteValues: [],
|
|
110
104
|
ghost: !0
|
|
111
|
-
}),
|
|
112
|
-
}),
|
|
105
|
+
}), we += oe.series.length;
|
|
106
|
+
}), K.value = ae, _ < 1 ? requestAnimationFrame(d) : (u += 1, u === t && o());
|
|
113
107
|
}
|
|
114
|
-
requestAnimationFrame(
|
|
115
|
-
},
|
|
108
|
+
requestAnimationFrame(d);
|
|
109
|
+
}, h * a);
|
|
116
110
|
});
|
|
117
111
|
});
|
|
118
112
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
(o) => D(o.values).reduce((t, u) => t + u, 0)
|
|
113
|
+
tt(async () => {
|
|
114
|
+
if (ce(), e.value.startAnimation?.show) {
|
|
115
|
+
const s = C.dataset.flatMap((a) => a.series).map(
|
|
116
|
+
(a) => D(a.values).reduce((o, t) => o + t, 0)
|
|
124
117
|
);
|
|
125
|
-
M.value =
|
|
126
|
-
const
|
|
127
|
-
(
|
|
118
|
+
M.value = s.map(() => 0), z.value = !0, K.value = C.dataset.map((a, o) => {
|
|
119
|
+
const t = a.series.reduce(
|
|
120
|
+
(u, c) => u + D(c.values).reduce((h, I) => h + I, 0),
|
|
128
121
|
0
|
|
129
122
|
);
|
|
130
123
|
return {
|
|
131
124
|
name: "__ghost__",
|
|
132
|
-
arcOf:
|
|
133
|
-
arcOfId: `${y.value}_${
|
|
134
|
-
id: `ghost_${y.value}_${
|
|
125
|
+
arcOf: a.name,
|
|
126
|
+
arcOfId: `${y.value}_${o}`,
|
|
127
|
+
id: `ghost_${y.value}_${o}`,
|
|
135
128
|
seriesIndex: -1,
|
|
136
|
-
datasetIndex:
|
|
129
|
+
datasetIndex: o,
|
|
137
130
|
color: "transparent",
|
|
138
|
-
value:
|
|
139
|
-
fullValue:
|
|
131
|
+
value: t,
|
|
132
|
+
fullValue: t,
|
|
140
133
|
absoluteValues: [],
|
|
141
134
|
ghost: !0
|
|
142
135
|
};
|
|
143
|
-
}), await
|
|
144
|
-
|
|
136
|
+
}), await lt(), Ct(
|
|
137
|
+
s,
|
|
145
138
|
e.value.startAnimation.durationMs,
|
|
146
139
|
e.value.startAnimation.staggerMs
|
|
147
140
|
).then(() => {
|
|
148
|
-
z.value = !1,
|
|
141
|
+
z.value = !1, K.value = [];
|
|
149
142
|
});
|
|
150
143
|
} else
|
|
151
144
|
z.value = !1;
|
|
152
145
|
});
|
|
153
|
-
const
|
|
154
|
-
|
|
146
|
+
const V = at(null), G = at(null);
|
|
147
|
+
tt(() => {
|
|
155
148
|
ce();
|
|
156
149
|
});
|
|
157
150
|
function ce() {
|
|
158
|
-
if (
|
|
151
|
+
if (Gt(C.dataset) && H({
|
|
159
152
|
componentName: "VueUiNestedDonuts",
|
|
160
153
|
type: "dataset"
|
|
161
154
|
}), e.value.responsive) {
|
|
162
|
-
const l =
|
|
163
|
-
const { width: s, height: a } =
|
|
164
|
-
chart:
|
|
165
|
-
title: e.value.style.chart.title.text ?
|
|
155
|
+
const l = Qt(() => {
|
|
156
|
+
const { width: s, height: a } = Zt({
|
|
157
|
+
chart: q.value,
|
|
158
|
+
title: e.value.style.chart.title.text ? Fe.value : null,
|
|
166
159
|
legend: e.value.style.chart.legend.show ? ie.value : null,
|
|
167
|
-
source:
|
|
168
|
-
noTitle:
|
|
169
|
-
padding:
|
|
160
|
+
source: Oe.value,
|
|
161
|
+
noTitle: Se.value,
|
|
162
|
+
padding: Me.value
|
|
170
163
|
});
|
|
171
164
|
requestAnimationFrame(() => {
|
|
172
|
-
|
|
165
|
+
f.value.width = s, f.value.height = a;
|
|
173
166
|
});
|
|
174
167
|
});
|
|
175
|
-
|
|
168
|
+
V.value && (G.value && V.value.unobserve(G.value), V.value.disconnect()), V.value = new ResizeObserver(l), G.value = q.value.parentNode, V.value.observe(G.value);
|
|
176
169
|
}
|
|
177
170
|
}
|
|
178
|
-
|
|
179
|
-
|
|
171
|
+
zt(() => {
|
|
172
|
+
V.value && (G.value && V.value.unobserve(G.value), V.value.disconnect());
|
|
180
173
|
});
|
|
181
|
-
const { isPrinting:
|
|
174
|
+
const { isPrinting: Re, isImaging: Be, generatePdf: Ee, generateImage: Ue } = jt({
|
|
182
175
|
elementId: `nested_donuts_${y.value}`,
|
|
183
176
|
fileName: e.value.style.chart.title.text || "vue-ui-nested-donuts",
|
|
184
177
|
options: e.value.userOptions.print
|
|
185
|
-
}),
|
|
178
|
+
}), _t = k(() => e.value.userOptions.show && !e.value.style.chart.title.text), Tt = k(() => Yt(e.value.customPalette)), $ = v({
|
|
186
179
|
dataLabels: {
|
|
187
180
|
show: e.value.style.chart.layout.labels.dataLabels.show
|
|
188
181
|
},
|
|
189
182
|
showTable: e.value.table.show,
|
|
190
183
|
showTooltip: e.value.style.chart.tooltip.show
|
|
191
|
-
}),
|
|
184
|
+
}), f = v({
|
|
192
185
|
height: 512,
|
|
193
186
|
width: 512
|
|
194
|
-
}),
|
|
195
|
-
function
|
|
196
|
-
|
|
187
|
+
}), Ge = ht;
|
|
188
|
+
function Ft({ datapoint: l, index: s }) {
|
|
189
|
+
Ge("selectDatapoint", { datapoint: l, index: s });
|
|
197
190
|
}
|
|
198
|
-
function
|
|
191
|
+
function Ye({
|
|
199
192
|
from: l,
|
|
200
193
|
to: s,
|
|
201
194
|
duration: a,
|
|
202
195
|
onUpdate: o,
|
|
203
196
|
onDone: t,
|
|
204
|
-
easing: u =
|
|
197
|
+
easing: u = dt
|
|
205
198
|
}) {
|
|
206
199
|
const c = performance.now();
|
|
207
|
-
function
|
|
208
|
-
const
|
|
209
|
-
o(
|
|
200
|
+
function h(I) {
|
|
201
|
+
const d = Math.min((I - c) / a, 1), p = u(d), _ = l + (s - l) * p;
|
|
202
|
+
o(_, d), d < 1 ? requestAnimationFrame(h) : (o(s, 1), t && t());
|
|
210
203
|
}
|
|
211
|
-
requestAnimationFrame(
|
|
204
|
+
requestAnimationFrame(h);
|
|
212
205
|
}
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
[null, void 0].includes(s.name) &&
|
|
206
|
+
const w = v([]), S = k(() => {
|
|
207
|
+
C.dataset.forEach((s, a) => {
|
|
208
|
+
[null, void 0].includes(s.name) && H({
|
|
216
209
|
componentName: "VueUiNestedDonuts",
|
|
217
210
|
type: "datasetSerieAttribute",
|
|
218
211
|
property: "name",
|
|
219
212
|
index: a
|
|
220
|
-
}), [null, void 0].includes(s.series) ?
|
|
213
|
+
}), [null, void 0].includes(s.series) ? H({
|
|
221
214
|
componentName: "VueUiNestedDonuts",
|
|
222
215
|
type: "datasetSerieAttribute",
|
|
223
216
|
property: "series",
|
|
224
217
|
index: a
|
|
225
|
-
}) : s.series.length === 0 ?
|
|
218
|
+
}) : s.series.length === 0 ? H({
|
|
226
219
|
componentName: "VueUiNestedDonuts",
|
|
227
220
|
type: "datasetAttributeEmpty",
|
|
228
221
|
property: `series at index ${a}`
|
|
229
222
|
}) : s.series.forEach((o, t) => {
|
|
230
|
-
[null, void 0].includes(o.name) &&
|
|
223
|
+
[null, void 0].includes(o.name) && H({
|
|
231
224
|
componentName: "VueUiNestedDonuts",
|
|
232
225
|
type: "datasetSerieAttribute",
|
|
233
226
|
property: "name",
|
|
234
227
|
index: t,
|
|
235
228
|
key: "serie"
|
|
236
|
-
}), [null, void 0].includes(o.values) &&
|
|
229
|
+
}), [null, void 0].includes(o.values) && H({
|
|
237
230
|
componentName: "VueUiNestedDonuts",
|
|
238
231
|
type: "datasetSerieAttribute",
|
|
239
232
|
property: "values",
|
|
@@ -243,13 +236,13 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
243
236
|
});
|
|
244
237
|
});
|
|
245
238
|
let l = 0;
|
|
246
|
-
return
|
|
239
|
+
return C.dataset.map((s, a) => ({
|
|
247
240
|
...s,
|
|
248
|
-
total: s.series.filter((o) =>
|
|
241
|
+
total: s.series.filter((o) => !w.value.includes(o.id)).map((o) => D(o.values).reduce((t, u) => t + u, 0)).reduce((o, t) => o + t, 0),
|
|
249
242
|
datasetIndex: a,
|
|
250
243
|
id: `${y.value}_${a}`,
|
|
251
244
|
series: s.series.map((o, t) => {
|
|
252
|
-
const u = D(o.values).reduce((c,
|
|
245
|
+
const u = D(o.values).reduce((c, h) => c + h, 0);
|
|
253
246
|
return {
|
|
254
247
|
name: o.name,
|
|
255
248
|
arcOf: s.name,
|
|
@@ -257,99 +250,98 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
257
250
|
id: `${y.value}_${a}_${t}`,
|
|
258
251
|
seriesIndex: t,
|
|
259
252
|
datasetIndex: a,
|
|
260
|
-
color:
|
|
253
|
+
color: Xt(o.color) || Tt.value[t] || Ce[t % Ce.length],
|
|
261
254
|
value: z.value ? M.value[l++] ?? 0 : u,
|
|
262
255
|
absoluteValues: o.values || []
|
|
263
256
|
};
|
|
264
257
|
})
|
|
265
258
|
}));
|
|
266
|
-
}), A = k(() => Math.min(
|
|
267
|
-
const a = l.series.filter((o) =>
|
|
259
|
+
}), A = k(() => Math.min(f.value.height, f.value.width) * (e.value.style.chart.layout.donut.strokeWidth / 512)), Xe = k(() => [...S.value].map((l, s) => {
|
|
260
|
+
const a = l.series.filter((o) => !w.value.includes(o.id)).map((o) => o.value).reduce((o, t) => o + t, 0);
|
|
268
261
|
return {
|
|
269
262
|
...l,
|
|
270
263
|
total: a,
|
|
271
|
-
series: l.series.filter((o) =>
|
|
264
|
+
series: l.series.filter((o) => !w.value.includes(o.id)).map((o) => ({
|
|
272
265
|
...o,
|
|
273
266
|
proportion: o.value / a
|
|
274
267
|
}))
|
|
275
268
|
};
|
|
276
269
|
}));
|
|
277
|
-
function
|
|
270
|
+
function Ot(l, s, a) {
|
|
278
271
|
let o = 0;
|
|
279
272
|
for (let t = 0; t < l.length; t += 1)
|
|
280
273
|
a.includes(l[t]) && (o += 1);
|
|
281
274
|
return o < s;
|
|
282
275
|
}
|
|
283
|
-
const b = v(
|
|
284
|
-
|
|
285
|
-
() =>
|
|
276
|
+
const b = v(Xe.value);
|
|
277
|
+
et(
|
|
278
|
+
() => Xe.value,
|
|
286
279
|
(l) => b.value = l
|
|
287
280
|
);
|
|
288
281
|
function ve(l) {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
arcOfId: `${y.value}_${f}`
|
|
282
|
+
Ge("selectLegend", l);
|
|
283
|
+
const s = C.dataset.flatMap(
|
|
284
|
+
(d, p) => d.series.map((_, ge) => ({
|
|
285
|
+
value: D(_.values).reduce((me, ae) => me + ae, 0),
|
|
286
|
+
id: `${y.value}_${p}_${ge}`,
|
|
287
|
+
arcOfId: `${y.value}_${p}`
|
|
296
288
|
}))
|
|
297
289
|
).find((d) => d.id === l.id);
|
|
298
290
|
if (!s) return;
|
|
299
|
-
const a =
|
|
291
|
+
const a = S.value.flatMap((d) => d.series).find((d) => d.id === l.id)?.value ?? 0, o = b.value.flatMap((d) => d.series).find((d) => d.id === l.id);
|
|
300
292
|
let u = o ? o.value : 0;
|
|
301
|
-
const c =
|
|
293
|
+
const c = S.value.find(
|
|
302
294
|
(d) => d.id === s.arcOfId
|
|
303
295
|
);
|
|
304
296
|
if (!c) return;
|
|
305
|
-
const
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
297
|
+
const h = c.series.map((d) => d.id), I = Ot(
|
|
298
|
+
h,
|
|
299
|
+
h.length - 1,
|
|
300
|
+
w.value
|
|
309
301
|
);
|
|
310
|
-
|
|
302
|
+
w.value.includes(l.id) ? (w.value = w.value.filter((d) => d !== l.id), e.value.serieToggleAnimation.show ? Ye({
|
|
311
303
|
from: u,
|
|
312
304
|
to: a,
|
|
313
305
|
duration: e.value.serieToggleAnimation.durationMs,
|
|
314
306
|
onUpdate: (d) => {
|
|
315
|
-
b.value = b.value.map((
|
|
316
|
-
...
|
|
317
|
-
series:
|
|
307
|
+
b.value = b.value.map((p) => ({
|
|
308
|
+
...p,
|
|
309
|
+
series: p.series.map((_) => _.id === l.id ? { ..._, value: d } : _)
|
|
318
310
|
}));
|
|
319
311
|
}
|
|
320
312
|
}) : b.value = b.value.map((d) => ({
|
|
321
313
|
...d,
|
|
322
|
-
series: d.series.map((
|
|
323
|
-
}))) :
|
|
314
|
+
series: d.series.map((p) => p.id === l.id ? { ...p, value: a } : p)
|
|
315
|
+
}))) : I && (e.value.serieToggleAnimation.show ? Ye({
|
|
324
316
|
from: u,
|
|
325
317
|
to: 0,
|
|
326
318
|
duration: e.value.serieToggleAnimation.durationMs,
|
|
327
319
|
onUpdate: (d) => {
|
|
328
|
-
b.value = b.value.map((
|
|
329
|
-
...
|
|
330
|
-
series:
|
|
320
|
+
b.value = b.value.map((p) => ({
|
|
321
|
+
...p,
|
|
322
|
+
series: p.series.map((_) => _.id === l.id ? { ..._, value: d } : _)
|
|
331
323
|
}));
|
|
332
324
|
},
|
|
333
325
|
onDone: () => {
|
|
334
|
-
|
|
326
|
+
w.value.push(l.id);
|
|
335
327
|
}
|
|
336
328
|
}) : (b.value = b.value.map((d) => ({
|
|
337
329
|
...d,
|
|
338
|
-
series: d.series.map((
|
|
339
|
-
})),
|
|
330
|
+
series: d.series.map((p) => p.id === l.id ? { ...p, value: 0 } : p)
|
|
331
|
+
})), w.value.push(l.id)));
|
|
340
332
|
}
|
|
341
|
-
const fe = k(() => A.value /
|
|
342
|
-
const a = A.value - s * A.value / b.value.length, o = z.value ?
|
|
333
|
+
const fe = k(() => A.value / S.value.length * e.value.style.chart.layout.donut.spacingRatio), He = k(() => b.value.map((l, s) => A.value - s * A.value / S.value.length)), Z = k(() => b.value.map((l, s) => {
|
|
334
|
+
const a = A.value - s * A.value / b.value.length, o = z.value ? K.value.find((u) => u.datasetIndex === s) : null, t = [...l.series, ...o ? [o] : []].map((u) => ({
|
|
343
335
|
...u,
|
|
344
336
|
value: u.value < 1e-3 ? 1e-3 : u.value
|
|
345
337
|
}));
|
|
346
338
|
return {
|
|
347
339
|
...l,
|
|
348
340
|
radius: a,
|
|
349
|
-
donut:
|
|
341
|
+
donut: nt(
|
|
350
342
|
{ series: t },
|
|
351
|
-
|
|
352
|
-
|
|
343
|
+
f.value.width / 2,
|
|
344
|
+
f.value.height / 2,
|
|
353
345
|
a,
|
|
354
346
|
a,
|
|
355
347
|
1.99999,
|
|
@@ -360,14 +352,14 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
360
352
|
fe.value
|
|
361
353
|
)
|
|
362
354
|
};
|
|
363
|
-
})),
|
|
364
|
-
const a = s * A.value /
|
|
355
|
+
})), We = k(() => [...S.value].map((l, s) => {
|
|
356
|
+
const a = s * A.value / S.value.length;
|
|
365
357
|
return {
|
|
366
358
|
sizeRatio: a,
|
|
367
|
-
donut:
|
|
359
|
+
donut: nt(
|
|
368
360
|
{ series: [{ value: 1 }] },
|
|
369
|
-
|
|
370
|
-
|
|
361
|
+
f.value.width / 2,
|
|
362
|
+
f.value.height / 2,
|
|
371
363
|
A.value - a,
|
|
372
364
|
A.value - a,
|
|
373
365
|
1.99999,
|
|
@@ -375,19 +367,19 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
375
367
|
1,
|
|
376
368
|
360,
|
|
377
369
|
105.25,
|
|
378
|
-
A.value /
|
|
370
|
+
A.value / S.value.length * e.value.style.chart.layout.donut.spacingRatio
|
|
379
371
|
)[0]
|
|
380
372
|
};
|
|
381
|
-
})),
|
|
382
|
-
function
|
|
383
|
-
|
|
373
|
+
})), qe = v(null), j = v(null), ee = v(null), he = v(null);
|
|
374
|
+
function St({ datapoint: l, _relativeIndex: s, seriesIndex: a }) {
|
|
375
|
+
qe.value = l.arcOfId, j.value = l.id, ee.value = a, he.value = {
|
|
384
376
|
datapoint: l,
|
|
385
377
|
seriesIndex: a,
|
|
386
378
|
series: b.value,
|
|
387
379
|
config: e.value
|
|
388
380
|
};
|
|
389
381
|
const o = e.value.style.chart.tooltip.customFormat;
|
|
390
|
-
if (
|
|
382
|
+
if (it(o) && Jt(
|
|
391
383
|
() => o({
|
|
392
384
|
seriesIndex: a,
|
|
393
385
|
datapoint: l,
|
|
@@ -403,12 +395,12 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
403
395
|
});
|
|
404
396
|
else {
|
|
405
397
|
let t = "";
|
|
406
|
-
if (e.value.style.chart.tooltip.showAllItemsAtIndex &&
|
|
407
|
-
const u = b.value.map((c) => c.series.find((
|
|
408
|
-
u.forEach((c,
|
|
398
|
+
if (e.value.style.chart.tooltip.showAllItemsAtIndex && w.value.length === 0) {
|
|
399
|
+
const u = b.value.map((c) => c.series.find((h) => h.seriesIndex === a));
|
|
400
|
+
u.forEach((c, h) => {
|
|
409
401
|
if (!c) return "";
|
|
410
402
|
t += `
|
|
411
|
-
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${
|
|
403
|
+
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${h < u.length - 1 ? `border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor}` : ""}">
|
|
412
404
|
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
413
405
|
<svg viewBox="0 0 20 20" height="${e.value.style.chart.tooltip.fontSize}" width="${e.value.style.chart.tooltip.fontSize}">
|
|
414
406
|
<circle cx="10" cy="10" r="10" fill="${c.color}"/>
|
|
@@ -418,7 +410,7 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
418
410
|
</span>
|
|
419
411
|
</div>
|
|
420
412
|
<span>
|
|
421
|
-
${e.value.style.chart.tooltip.showValue ? `<b>${
|
|
413
|
+
${e.value.style.chart.tooltip.showValue ? `<b>${J(
|
|
422
414
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
423
415
|
l.value,
|
|
424
416
|
F({
|
|
@@ -440,7 +432,7 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
440
432
|
`;
|
|
441
433
|
});
|
|
442
434
|
} else
|
|
443
|
-
t += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.arcOf ?? ""} - ${l.name}</div>`, t += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`, e.value.style.chart.tooltip.showValue && (t += `<b>${
|
|
435
|
+
t += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.arcOf ?? ""} - ${l.name}</div>`, t += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`, e.value.style.chart.tooltip.showValue && (t += `<b>${J(
|
|
444
436
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
445
437
|
l.value,
|
|
446
438
|
F({
|
|
@@ -466,46 +458,46 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
466
458
|
function pe(l) {
|
|
467
459
|
return l.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
|
|
468
460
|
}
|
|
469
|
-
function
|
|
461
|
+
function Ke(l, s) {
|
|
470
462
|
if (!e.value.useBlurOnHover)
|
|
471
463
|
return "";
|
|
472
|
-
if (e.value.style.chart.tooltip.showAllItemsAtIndex &&
|
|
464
|
+
if (e.value.style.chart.tooltip.showAllItemsAtIndex && w.value.length === 0)
|
|
473
465
|
return [null, void 0].includes(ee.value) || ee.value === s ? "" : `url(#blur_${y.value})`;
|
|
474
|
-
if (!e.value.style.chart.tooltip.showAllItemsAtIndex ||
|
|
466
|
+
if (!e.value.style.chart.tooltip.showAllItemsAtIndex || w.value.length)
|
|
475
467
|
return [null, void 0].includes(j.value) || j.value === l.id ? "" : `url(#blur_${y.value})`;
|
|
476
468
|
}
|
|
477
|
-
const ye = k(() =>
|
|
469
|
+
const ye = k(() => S.value.map((l, s) => {
|
|
478
470
|
const a = l.series.filter(
|
|
479
|
-
(t) =>
|
|
471
|
+
(t) => !w.value.includes(t.id)
|
|
480
472
|
), o = z.value ? a.map((t) => {
|
|
481
|
-
const u =
|
|
473
|
+
const u = C.dataset[s].series.findIndex(
|
|
482
474
|
(c) => c.name === t.name
|
|
483
475
|
);
|
|
484
476
|
return D(
|
|
485
|
-
|
|
486
|
-
).reduce((c,
|
|
477
|
+
C.dataset[s].series[u].values
|
|
478
|
+
).reduce((c, h) => c + h, 0);
|
|
487
479
|
}).reduce((t, u) => t + u, 0) : a.map((t) => t.value).reduce((t, u) => t + u, 0);
|
|
488
480
|
return l.series.map((t, u) => {
|
|
489
|
-
const c = D(
|
|
490
|
-
(
|
|
481
|
+
const c = D(C.dataset[s].series[u].values).reduce(
|
|
482
|
+
(I, d) => I + d,
|
|
491
483
|
0
|
|
492
|
-
),
|
|
484
|
+
), h = z.value ? c : t.value;
|
|
493
485
|
return {
|
|
494
486
|
name: t.name,
|
|
495
487
|
color: t.color,
|
|
496
|
-
value:
|
|
488
|
+
value: h,
|
|
497
489
|
shape: "circle",
|
|
498
490
|
arcOf: t.arcOf,
|
|
499
491
|
id: t.id,
|
|
500
492
|
seriesIndex: u,
|
|
501
493
|
datasetIndex: s,
|
|
502
494
|
total: o,
|
|
503
|
-
opacity:
|
|
495
|
+
opacity: w.value.includes(t.id) ? 0.5 : 1,
|
|
504
496
|
segregate: () => ve(t),
|
|
505
|
-
isSegregated:
|
|
497
|
+
isSegregated: w.value.includes(t.id)
|
|
506
498
|
};
|
|
507
499
|
});
|
|
508
|
-
})),
|
|
500
|
+
})), At = k(() => ({
|
|
509
501
|
cy: "nested-donuts-legend",
|
|
510
502
|
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
511
503
|
color: e.value.style.chart.legend.color,
|
|
@@ -520,8 +512,8 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
520
512
|
}))), s = b.value.flatMap((a) => a.series.map((o) => o.value));
|
|
521
513
|
return { head: l, body: s };
|
|
522
514
|
});
|
|
523
|
-
function
|
|
524
|
-
|
|
515
|
+
function Je() {
|
|
516
|
+
lt(() => {
|
|
525
517
|
const l = P.value.head.map((o, t) => [
|
|
526
518
|
[o.name],
|
|
527
519
|
[P.value.body[t]],
|
|
@@ -532,8 +524,8 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
532
524
|
[e.value.style.chart.title.text],
|
|
533
525
|
[e.value.style.chart.title.subtitle.text],
|
|
534
526
|
[[""], ["val"], ["%"]]
|
|
535
|
-
].concat(l), a =
|
|
536
|
-
|
|
527
|
+
].concat(l), a = qt(s);
|
|
528
|
+
Kt({
|
|
537
529
|
csvContent: a,
|
|
538
530
|
title: e.value.style.chart.title.text || "vue-ui-nested-donuts"
|
|
539
531
|
});
|
|
@@ -587,62 +579,62 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
587
579
|
config: a
|
|
588
580
|
};
|
|
589
581
|
});
|
|
590
|
-
function
|
|
591
|
-
return
|
|
582
|
+
function It() {
|
|
583
|
+
return S.value;
|
|
592
584
|
}
|
|
593
|
-
function
|
|
594
|
-
|
|
585
|
+
function Qe() {
|
|
586
|
+
$.value.showTable = !$.value.showTable;
|
|
595
587
|
}
|
|
596
|
-
function
|
|
597
|
-
|
|
588
|
+
function Ze() {
|
|
589
|
+
$.value.dataLabels.show = !$.value.dataLabels.show;
|
|
598
590
|
}
|
|
599
|
-
function
|
|
600
|
-
|
|
591
|
+
function je() {
|
|
592
|
+
$.value.showTooltip = !$.value.showTooltip;
|
|
601
593
|
}
|
|
602
594
|
const le = v(!1);
|
|
603
595
|
function be() {
|
|
604
596
|
le.value = !le.value;
|
|
605
597
|
}
|
|
606
|
-
return
|
|
607
|
-
getData:
|
|
608
|
-
generatePdf:
|
|
609
|
-
generateCsv:
|
|
610
|
-
generateImage:
|
|
611
|
-
toggleTable:
|
|
612
|
-
toggleLabels:
|
|
613
|
-
toggleTooltip:
|
|
598
|
+
return ft({
|
|
599
|
+
getData: It,
|
|
600
|
+
generatePdf: Ee,
|
|
601
|
+
generateCsv: Je,
|
|
602
|
+
generateImage: Ue,
|
|
603
|
+
toggleTable: Qe,
|
|
604
|
+
toggleLabels: Ze,
|
|
605
|
+
toggleTooltip: je,
|
|
614
606
|
toggleAnnotator: be
|
|
615
|
-
}), (l, s) => (n(),
|
|
607
|
+
}), (l, s) => (n(), i("div", {
|
|
616
608
|
ref_key: "nestedDonutsChart",
|
|
617
|
-
ref:
|
|
618
|
-
class:
|
|
609
|
+
ref: q,
|
|
610
|
+
class: B(`vue-ui-nested-donuts ${U.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
619
611
|
style: se(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
620
612
|
id: `nested_donuts_${y.value}`,
|
|
621
|
-
onMouseenter: s[3] || (s[3] = () =>
|
|
622
|
-
onMouseleave: s[4] || (s[4] = () =>
|
|
613
|
+
onMouseenter: s[3] || (s[3] = () => r(Ve)(!0)),
|
|
614
|
+
onMouseleave: s[4] || (s[4] = () => r(Ve)(!1))
|
|
623
615
|
}, [
|
|
624
|
-
e.value.userOptions.buttons.annotator ? (n(),
|
|
616
|
+
e.value.userOptions.buttons.annotator ? (n(), E(r(gt), {
|
|
625
617
|
key: 0,
|
|
626
|
-
svgRef:
|
|
618
|
+
svgRef: r(De),
|
|
627
619
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
628
620
|
color: e.value.style.chart.color,
|
|
629
621
|
active: le.value,
|
|
630
622
|
onClose: be
|
|
631
623
|
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : g("", !0),
|
|
632
|
-
|
|
624
|
+
_t.value ? (n(), i("div", {
|
|
633
625
|
key: 1,
|
|
634
626
|
ref_key: "noTitle",
|
|
635
|
-
ref:
|
|
627
|
+
ref: Se,
|
|
636
628
|
class: "vue-data-ui-no-title-space",
|
|
637
629
|
style: "height:36px; width: 100%;background:transparent"
|
|
638
630
|
}, null, 512)) : g("", !0),
|
|
639
|
-
e.value.style.chart.title.text ? (n(),
|
|
631
|
+
e.value.style.chart.title.text ? (n(), i("div", {
|
|
640
632
|
key: 2,
|
|
641
633
|
ref_key: "chartTitle",
|
|
642
|
-
ref:
|
|
634
|
+
ref: Fe
|
|
643
635
|
}, [
|
|
644
|
-
(n(),
|
|
645
|
-
key: `title_${
|
|
636
|
+
(n(), E(ll, {
|
|
637
|
+
key: `title_${Ae.value}`,
|
|
646
638
|
config: {
|
|
647
639
|
title: {
|
|
648
640
|
cy: "donut-div-title",
|
|
@@ -655,13 +647,13 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
655
647
|
}
|
|
656
648
|
}, null, 8, ["config"]))
|
|
657
649
|
], 512)) : g("", !0),
|
|
658
|
-
e.value.userOptions.show &&
|
|
650
|
+
e.value.userOptions.show && Q.value && (r(Pe) || r(de)) ? (n(), E(r($t), {
|
|
659
651
|
ref: "details",
|
|
660
|
-
key: `user_option_${
|
|
652
|
+
key: `user_option_${Te.value}`,
|
|
661
653
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
662
654
|
color: e.value.style.chart.color,
|
|
663
|
-
isPrinting:
|
|
664
|
-
isImaging:
|
|
655
|
+
isPrinting: r(Re),
|
|
656
|
+
isImaging: r(Be),
|
|
665
657
|
uid: y.value,
|
|
666
658
|
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
667
659
|
hasPdf: e.value.userOptions.buttons.pdf,
|
|
@@ -670,116 +662,116 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
670
662
|
hasTable: e.value.userOptions.buttons.table,
|
|
671
663
|
hasLabel: e.value.userOptions.buttons.labels,
|
|
672
664
|
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
673
|
-
isFullscreen:
|
|
674
|
-
isTooltip:
|
|
665
|
+
isFullscreen: U.value,
|
|
666
|
+
isTooltip: $.value.showTooltip,
|
|
675
667
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
676
|
-
chartElement:
|
|
668
|
+
chartElement: q.value,
|
|
677
669
|
position: e.value.userOptions.position,
|
|
678
670
|
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
679
671
|
isAnnotation: le.value,
|
|
680
|
-
onToggleFullscreen:
|
|
681
|
-
onGeneratePdf:
|
|
682
|
-
onGenerateCsv:
|
|
683
|
-
onGenerateImage:
|
|
684
|
-
onToggleTable:
|
|
685
|
-
onToggleLabels:
|
|
686
|
-
onToggleTooltip:
|
|
672
|
+
onToggleFullscreen: xt,
|
|
673
|
+
onGeneratePdf: r(Ee),
|
|
674
|
+
onGenerateCsv: Je,
|
|
675
|
+
onGenerateImage: r(Ue),
|
|
676
|
+
onToggleTable: Qe,
|
|
677
|
+
onToggleLabels: Ze,
|
|
678
|
+
onToggleTooltip: je,
|
|
687
679
|
onToggleAnnotator: be,
|
|
688
680
|
style: se({
|
|
689
|
-
visibility:
|
|
681
|
+
visibility: r(Pe) ? r(de) ? "visible" : "hidden" : "visible"
|
|
690
682
|
})
|
|
691
|
-
},
|
|
683
|
+
}, Mt({ _: 2 }, [
|
|
692
684
|
l.$slots.menuIcon ? {
|
|
693
685
|
name: "menuIcon",
|
|
694
|
-
fn:
|
|
695
|
-
|
|
686
|
+
fn: L(({ isOpen: a, color: o }) => [
|
|
687
|
+
x(l.$slots, "menuIcon", Y(X({ isOpen: a, color: o })), void 0, !0)
|
|
696
688
|
]),
|
|
697
689
|
key: "0"
|
|
698
690
|
} : void 0,
|
|
699
691
|
l.$slots.optionTooltip ? {
|
|
700
692
|
name: "optionTooltip",
|
|
701
|
-
fn:
|
|
702
|
-
|
|
693
|
+
fn: L(() => [
|
|
694
|
+
x(l.$slots, "optionTooltip", {}, void 0, !0)
|
|
703
695
|
]),
|
|
704
696
|
key: "1"
|
|
705
697
|
} : void 0,
|
|
706
698
|
l.$slots.optionPdf ? {
|
|
707
699
|
name: "optionPdf",
|
|
708
|
-
fn:
|
|
709
|
-
|
|
700
|
+
fn: L(() => [
|
|
701
|
+
x(l.$slots, "optionPdf", {}, void 0, !0)
|
|
710
702
|
]),
|
|
711
703
|
key: "2"
|
|
712
704
|
} : void 0,
|
|
713
705
|
l.$slots.optionCsv ? {
|
|
714
706
|
name: "optionCsv",
|
|
715
|
-
fn:
|
|
716
|
-
|
|
707
|
+
fn: L(() => [
|
|
708
|
+
x(l.$slots, "optionCsv", {}, void 0, !0)
|
|
717
709
|
]),
|
|
718
710
|
key: "3"
|
|
719
711
|
} : void 0,
|
|
720
712
|
l.$slots.optionImg ? {
|
|
721
713
|
name: "optionImg",
|
|
722
|
-
fn:
|
|
723
|
-
|
|
714
|
+
fn: L(() => [
|
|
715
|
+
x(l.$slots, "optionImg", {}, void 0, !0)
|
|
724
716
|
]),
|
|
725
717
|
key: "4"
|
|
726
718
|
} : void 0,
|
|
727
719
|
l.$slots.optionTable ? {
|
|
728
720
|
name: "optionTable",
|
|
729
|
-
fn:
|
|
730
|
-
|
|
721
|
+
fn: L(() => [
|
|
722
|
+
x(l.$slots, "optionTable", {}, void 0, !0)
|
|
731
723
|
]),
|
|
732
724
|
key: "5"
|
|
733
725
|
} : void 0,
|
|
734
726
|
l.$slots.optionLabels ? {
|
|
735
727
|
name: "optionLabels",
|
|
736
|
-
fn:
|
|
737
|
-
|
|
728
|
+
fn: L(() => [
|
|
729
|
+
x(l.$slots, "optionLabels", {}, void 0, !0)
|
|
738
730
|
]),
|
|
739
731
|
key: "6"
|
|
740
732
|
} : void 0,
|
|
741
733
|
l.$slots.optionFullscreen ? {
|
|
742
734
|
name: "optionFullscreen",
|
|
743
|
-
fn:
|
|
744
|
-
|
|
735
|
+
fn: L(({ toggleFullscreen: a, isFullscreen: o }) => [
|
|
736
|
+
x(l.$slots, "optionFullscreen", Y(X({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
|
|
745
737
|
]),
|
|
746
738
|
key: "7"
|
|
747
739
|
} : void 0,
|
|
748
740
|
l.$slots.optionAnnotator ? {
|
|
749
741
|
name: "optionAnnotator",
|
|
750
|
-
fn:
|
|
751
|
-
|
|
742
|
+
fn: L(({ toggleAnnotator: a, isAnnotator: o }) => [
|
|
743
|
+
x(l.$slots, "optionAnnotator", Y(X({ toggleAnnotator: a, isAnnotator: o })), void 0, !0)
|
|
752
744
|
]),
|
|
753
745
|
key: "8"
|
|
754
746
|
} : void 0
|
|
755
747
|
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : g("", !0),
|
|
756
|
-
|
|
748
|
+
Q.value ? (n(), i("svg", {
|
|
757
749
|
key: 4,
|
|
758
750
|
ref_key: "svgRef",
|
|
759
|
-
ref:
|
|
760
|
-
xmlns:
|
|
761
|
-
class:
|
|
762
|
-
"vue-data-ui-fullscreen--on":
|
|
763
|
-
"vue-data-ui-fulscreen--off": !
|
|
751
|
+
ref: De,
|
|
752
|
+
xmlns: r(Ht),
|
|
753
|
+
class: B({
|
|
754
|
+
"vue-data-ui-fullscreen--on": U.value,
|
|
755
|
+
"vue-data-ui-fulscreen--off": !U.value
|
|
764
756
|
}),
|
|
765
|
-
viewBox: `0 0 ${
|
|
766
|
-
style: se(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};${
|
|
757
|
+
viewBox: `0 0 ${f.value.width <= 0 ? 1e-3 : f.value.width} ${f.value.height < 0 ? 1e-3 : f.value.height}`,
|
|
758
|
+
style: se(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};${Me.value.css}`)
|
|
767
759
|
}, [
|
|
768
|
-
|
|
769
|
-
l.$slots["chart-background"] ? (n(),
|
|
760
|
+
ot(r(bt)),
|
|
761
|
+
l.$slots["chart-background"] ? (n(), i("foreignObject", {
|
|
770
762
|
key: 0,
|
|
771
763
|
x: 0,
|
|
772
764
|
y: 0,
|
|
773
|
-
width:
|
|
774
|
-
height:
|
|
765
|
+
width: f.value.width <= 0 ? 1e-3 : f.value.width,
|
|
766
|
+
height: f.value.height < 0 ? 1e-3 : f.value.height,
|
|
775
767
|
style: {
|
|
776
768
|
pointerEvents: "none"
|
|
777
769
|
}
|
|
778
770
|
}, [
|
|
779
|
-
|
|
780
|
-
], 8,
|
|
771
|
+
x(l.$slots, "chart-background", {}, void 0, !0)
|
|
772
|
+
], 8, nl)) : g("", !0),
|
|
781
773
|
m("defs", null, [
|
|
782
|
-
(n(!0),
|
|
774
|
+
(n(!0), i(T, null, O(We.value, (a, o) => (n(), i("radialGradient", {
|
|
783
775
|
id: `radial_${y.value}_${o}`
|
|
784
776
|
}, [
|
|
785
777
|
s[5] || (s[5] = m("stop", {
|
|
@@ -788,21 +780,21 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
788
780
|
"stop-opacity": "0"
|
|
789
781
|
}, null, -1)),
|
|
790
782
|
m("stop", {
|
|
791
|
-
offset: `${(1 - fe.value /
|
|
792
|
-
"stop-color":
|
|
783
|
+
offset: `${(1 - fe.value / He.value[o]) * 100}%`,
|
|
784
|
+
"stop-color": r(rt)("#FFFFFF", 0),
|
|
793
785
|
"stop-opacity": "0"
|
|
794
|
-
}, null, 8,
|
|
786
|
+
}, null, 8, il),
|
|
795
787
|
m("stop", {
|
|
796
|
-
offset: `${(1 - fe.value /
|
|
788
|
+
offset: `${(1 - fe.value / He.value[o] / 2) * 100}%`,
|
|
797
789
|
"stop-color": "#FFFFFF",
|
|
798
790
|
"stop-opacity": e.value.style.chart.gradientIntensity / 100
|
|
799
|
-
}, null, 8,
|
|
791
|
+
}, null, 8, dl),
|
|
800
792
|
s[6] || (s[6] = m("stop", {
|
|
801
793
|
offset: "100%",
|
|
802
794
|
"stop-color": "#FFFFFF",
|
|
803
795
|
"stop-opacity": "0"
|
|
804
796
|
}, null, -1))
|
|
805
|
-
], 8,
|
|
797
|
+
], 8, rl))), 256))
|
|
806
798
|
]),
|
|
807
799
|
m("defs", null, [
|
|
808
800
|
m("filter", {
|
|
@@ -816,12 +808,12 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
816
808
|
in: "SourceGraphic",
|
|
817
809
|
stdDeviation: 2,
|
|
818
810
|
id: `blur_std_${y.value}`
|
|
819
|
-
}, null, 8,
|
|
811
|
+
}, null, 8, vl),
|
|
820
812
|
s[7] || (s[7] = m("feColorMatrix", {
|
|
821
813
|
type: "saturate",
|
|
822
814
|
values: "0"
|
|
823
815
|
}, null, -1))
|
|
824
|
-
], 8,
|
|
816
|
+
], 8, cl),
|
|
825
817
|
m("filter", {
|
|
826
818
|
id: `shadow_${y.value}`,
|
|
827
819
|
"color-interpolation-filters": "sRGB"
|
|
@@ -832,65 +824,65 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
832
824
|
stdDeviation: "10",
|
|
833
825
|
"flood-opacity": "0.5",
|
|
834
826
|
"flood-color": e.value.style.chart.layout.donut.shadowColor
|
|
835
|
-
}, null, 8,
|
|
836
|
-
], 8,
|
|
827
|
+
}, null, 8, hl)
|
|
828
|
+
], 8, fl)
|
|
837
829
|
]),
|
|
838
|
-
(n(!0),
|
|
839
|
-
(n(!0),
|
|
830
|
+
(n(!0), i(T, null, O(Z.value, (a, o) => (n(), i("g", null, [
|
|
831
|
+
(n(!0), i(T, null, O(a.donut.filter((t) => !t.ghost), (t, u) => (n(), i("g", null, [
|
|
840
832
|
m("path", {
|
|
841
833
|
class: "vue-ui-donut-arc-path",
|
|
842
834
|
d: t.arcSlice,
|
|
843
|
-
fill:
|
|
835
|
+
fill: r(rt)(t.color, 80),
|
|
844
836
|
stroke: e.value.style.chart.backgroundColor,
|
|
845
837
|
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
846
|
-
filter:
|
|
847
|
-
}, null, 8,
|
|
838
|
+
filter: Ke(t, u)
|
|
839
|
+
}, null, 8, pl)
|
|
848
840
|
]))), 256))
|
|
849
841
|
]))), 256)),
|
|
850
|
-
e.value.style.chart.useGradient ? (n(),
|
|
851
|
-
(n(!0),
|
|
842
|
+
e.value.style.chart.useGradient ? (n(), i("g", yl, [
|
|
843
|
+
(n(!0), i(T, null, O(We.value, (a, o) => (n(), i("g", null, [
|
|
852
844
|
m("path", {
|
|
853
845
|
d: a.donut.arcSlice,
|
|
854
846
|
fill: `url(#radial_${y.value}_${o})`,
|
|
855
847
|
stroke: "transparent",
|
|
856
848
|
"stroke-width": "0"
|
|
857
|
-
}, null, 8,
|
|
849
|
+
}, null, 8, bl)
|
|
858
850
|
]))), 256))
|
|
859
851
|
])) : g("", !0),
|
|
860
|
-
e.value.style.chart.layout.labels.dataLabels.showDonutName ? (n(),
|
|
861
|
-
(n(!0),
|
|
862
|
-
(n(!0),
|
|
863
|
-
u === 0 &&
|
|
852
|
+
e.value.style.chart.layout.labels.dataLabels.showDonutName ? (n(), i("g", gl, [
|
|
853
|
+
(n(!0), i(T, null, O(Z.value, (a, o) => (n(), i("g", null, [
|
|
854
|
+
(n(!0), i(T, null, O(a.donut, (t, u) => (n(), i("g", null, [
|
|
855
|
+
u === 0 && f.value.width && f.value.height ? (n(), i("text", {
|
|
864
856
|
key: 0,
|
|
865
|
-
class:
|
|
866
|
-
x:
|
|
857
|
+
class: B({ animated: e.value.useCssAnimation }),
|
|
858
|
+
x: f.value.width / 2,
|
|
867
859
|
y: t.startY - e.value.style.chart.layout.labels.dataLabels.fontSize + e.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,
|
|
868
860
|
"text-anchor": "middle",
|
|
869
861
|
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
870
862
|
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldDonutName ? "bold" : "normal",
|
|
871
863
|
fill: e.value.style.chart.layout.labels.dataLabels.color
|
|
872
|
-
},
|
|
864
|
+
}, N(e.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation ? r(Wt)({
|
|
873
865
|
source: a.name,
|
|
874
866
|
length: e.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize
|
|
875
|
-
}) : a.name), 11,
|
|
867
|
+
}) : a.name), 11, ml)) : g("", !0)
|
|
876
868
|
]))), 256))
|
|
877
869
|
]))), 256))
|
|
878
870
|
])) : g("", !0),
|
|
879
|
-
e.value.style.chart.layout.labels.dataLabels.show ? (n(),
|
|
880
|
-
(n(!0),
|
|
881
|
-
(n(!0),
|
|
882
|
-
filter:
|
|
871
|
+
e.value.style.chart.layout.labels.dataLabels.show ? (n(), i("g", wl, [
|
|
872
|
+
(n(!0), i(T, null, O(Z.value, (a, o) => (n(), i("g", null, [
|
|
873
|
+
(n(!0), i(T, null, O(a.donut.filter((t) => !t.ghost), (t, u) => (n(), i("g", {
|
|
874
|
+
filter: Ke(t, u)
|
|
883
875
|
}, [
|
|
884
|
-
|
|
885
|
-
class:
|
|
876
|
+
st(m("text", {
|
|
877
|
+
class: B({ animated: e.value.useCssAnimation }),
|
|
886
878
|
opacity: pe(t) ? 1 : 0,
|
|
887
|
-
"text-anchor":
|
|
888
|
-
x:
|
|
879
|
+
"text-anchor": r(W)(t, !0).anchor,
|
|
880
|
+
x: r(W)(
|
|
889
881
|
t,
|
|
890
882
|
!1,
|
|
891
883
|
e.value.style.chart.layout.labels.dataLabels.offsetX
|
|
892
884
|
).x || 0,
|
|
893
|
-
y:
|
|
885
|
+
y: r(_e)(
|
|
894
886
|
t,
|
|
895
887
|
e.value.style.chart.layout.labels.dataLabels.offsetY,
|
|
896
888
|
e.value.style.chart.layout.labels.dataLabels.offsetY
|
|
@@ -898,26 +890,26 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
898
890
|
fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? t.color : e.value.style.chart.layout.labels.dataLabels.color,
|
|
899
891
|
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
900
892
|
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldPercentage ? "bold" : "normal"
|
|
901
|
-
},
|
|
893
|
+
}, N(r(F)({
|
|
902
894
|
v: t.proportion * 100,
|
|
903
895
|
s: "%",
|
|
904
896
|
r: e.value.style.chart.layout.labels.dataLabels.roundingPercentage
|
|
905
|
-
})), 11,
|
|
897
|
+
})), 11, kl), [
|
|
906
898
|
[
|
|
907
|
-
|
|
908
|
-
|
|
899
|
+
ut,
|
|
900
|
+
$.value.dataLabels.show && e.value.style.chart.layout.labels.dataLabels.showPercentage
|
|
909
901
|
]
|
|
910
902
|
]),
|
|
911
|
-
|
|
912
|
-
class:
|
|
903
|
+
st(m("text", {
|
|
904
|
+
class: B({ animated: e.value.useCssAnimation }),
|
|
913
905
|
opacity: pe(t) ? 1 : 0,
|
|
914
|
-
"text-anchor":
|
|
915
|
-
x:
|
|
906
|
+
"text-anchor": r(W)(t, !0).anchor,
|
|
907
|
+
x: r(W)(
|
|
916
908
|
t,
|
|
917
909
|
!1,
|
|
918
910
|
e.value.style.chart.layout.labels.dataLabels.offsetX
|
|
919
911
|
).x || 0,
|
|
920
|
-
y:
|
|
912
|
+
y: r(_e)(
|
|
921
913
|
t,
|
|
922
914
|
e.value.style.chart.layout.labels.dataLabels.offsetY,
|
|
923
915
|
e.value.style.chart.layout.labels.dataLabels.offsetY
|
|
@@ -925,32 +917,32 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
925
917
|
fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? t.color : e.value.style.chart.layout.labels.dataLabels.color,
|
|
926
918
|
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
927
919
|
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldValue ? "bold" : "normal"
|
|
928
|
-
}, " (" +
|
|
920
|
+
}, " (" + N(r(J)(
|
|
929
921
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
930
922
|
t.value,
|
|
931
|
-
|
|
923
|
+
r(F)({
|
|
932
924
|
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
933
925
|
v: t.value,
|
|
934
926
|
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
935
927
|
r: e.value.style.chart.layout.labels.dataLabels.roundingValue
|
|
936
928
|
}),
|
|
937
929
|
{ datapoint: t, seriesIndex: o, datapointIndex: u }
|
|
938
|
-
)) + ") ", 11,
|
|
930
|
+
)) + ") ", 11, Ll), [
|
|
939
931
|
[
|
|
940
|
-
|
|
941
|
-
|
|
932
|
+
ut,
|
|
933
|
+
$.value.dataLabels.show && e.value.style.chart.layout.labels.dataLabels.showPercentage && e.value.style.chart.layout.labels.dataLabels.showValue
|
|
942
934
|
]
|
|
943
935
|
]),
|
|
944
|
-
pe(t) &&
|
|
936
|
+
pe(t) && $.value.dataLabels.show && !e.value.style.chart.layout.labels.dataLabels.showPercentage && e.value.style.chart.layout.labels.dataLabels.showValue ? (n(), i("text", {
|
|
945
937
|
key: 0,
|
|
946
|
-
class:
|
|
947
|
-
"text-anchor":
|
|
948
|
-
x:
|
|
938
|
+
class: B({ animated: e.value.useCssAnimation }),
|
|
939
|
+
"text-anchor": r(W)(t, !0).anchor,
|
|
940
|
+
x: r(W)(
|
|
949
941
|
t,
|
|
950
942
|
!1,
|
|
951
943
|
e.value.style.chart.layout.labels.dataLabels.offsetX
|
|
952
944
|
).x || 0,
|
|
953
|
-
y:
|
|
945
|
+
y: r(_e)(
|
|
954
946
|
t,
|
|
955
947
|
e.value.style.chart.layout.labels.dataLabels.offsetY,
|
|
956
948
|
e.value.style.chart.layout.labels.dataLabels.offsetY
|
|
@@ -958,42 +950,42 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
958
950
|
fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? t.color : e.value.style.chart.layout.labels.dataLabels.color,
|
|
959
951
|
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
960
952
|
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldValue ? "bold" : "normal"
|
|
961
|
-
},
|
|
953
|
+
}, N(r(J)(
|
|
962
954
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
963
955
|
t.value,
|
|
964
|
-
|
|
956
|
+
r(F)({
|
|
965
957
|
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
966
958
|
v: t.value,
|
|
967
959
|
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
968
960
|
r: e.value.style.chart.layout.labels.dataLabels.roundingValue
|
|
969
961
|
}),
|
|
970
962
|
{ datapoint: t, seriesIndex: o, datapointIndex: u }
|
|
971
|
-
)), 11,
|
|
972
|
-
], 8,
|
|
963
|
+
)), 11, xl)) : g("", !0)
|
|
964
|
+
], 8, $l))), 256))
|
|
973
965
|
]))), 256))
|
|
974
966
|
])) : g("", !0),
|
|
975
|
-
(n(!0),
|
|
976
|
-
(n(!0),
|
|
967
|
+
(n(!0), i(T, null, O(Z.value, (a, o) => (n(), i("g", null, [
|
|
968
|
+
(n(!0), i(T, null, O(a.donut, (t, u) => (n(), i("g", null, [
|
|
977
969
|
m("path", {
|
|
978
970
|
d: t.arcSlice,
|
|
979
|
-
fill:
|
|
980
|
-
onMouseenter: (c) =>
|
|
971
|
+
fill: Lt.value === o ? "rgba(0,0,0,0.1)" : "transparent",
|
|
972
|
+
onMouseenter: (c) => St({
|
|
981
973
|
datapoint: t,
|
|
982
974
|
seriesIndex: t.seriesIndex
|
|
983
975
|
}),
|
|
984
|
-
onClick: (c) =>
|
|
976
|
+
onClick: (c) => Ft({ datapoint: t, index: u }),
|
|
985
977
|
onMouseleave: s[0] || (s[0] = (c) => {
|
|
986
|
-
ne.value = !1,
|
|
978
|
+
ne.value = !1, qe.value = null, j.value = null, ee.value = null;
|
|
987
979
|
})
|
|
988
|
-
}, null, 40,
|
|
980
|
+
}, null, 40, Cl)
|
|
989
981
|
]))), 256))
|
|
990
982
|
]))), 256)),
|
|
991
|
-
|
|
992
|
-
], 14,
|
|
993
|
-
l.$slots.watermark ? (n(),
|
|
994
|
-
|
|
983
|
+
x(l.$slots, "svg", { svg: f.value }, void 0, !0)
|
|
984
|
+
], 14, ul)) : g("", !0),
|
|
985
|
+
l.$slots.watermark ? (n(), i("div", _l, [
|
|
986
|
+
x(l.$slots, "watermark", Y(X({ isPrinting: r(Re) || r(Be) })), void 0, !0)
|
|
995
987
|
])) : g("", !0),
|
|
996
|
-
|
|
988
|
+
Q.value ? g("", !0) : (n(), E(r(mt), {
|
|
997
989
|
key: 6,
|
|
998
990
|
config: {
|
|
999
991
|
type: "donut",
|
|
@@ -1005,8 +997,8 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
1005
997
|
}
|
|
1006
998
|
}
|
|
1007
999
|
}, null, 8, ["config"])),
|
|
1008
|
-
|
|
1009
|
-
show:
|
|
1000
|
+
ot(r(wt), {
|
|
1001
|
+
show: $.value.showTooltip && ne.value,
|
|
1010
1002
|
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
1011
1003
|
color: e.value.style.chart.tooltip.color,
|
|
1012
1004
|
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
@@ -1016,43 +1008,43 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
1016
1008
|
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
1017
1009
|
position: e.value.style.chart.tooltip.position,
|
|
1018
1010
|
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
1019
|
-
parent:
|
|
1011
|
+
parent: q.value,
|
|
1020
1012
|
content: re.value,
|
|
1021
|
-
isFullscreen:
|
|
1022
|
-
isCustom:
|
|
1013
|
+
isFullscreen: U.value,
|
|
1014
|
+
isCustom: r(it)(e.value.style.chart.tooltip.customFormat)
|
|
1023
1015
|
}, {
|
|
1024
|
-
"tooltip-before":
|
|
1025
|
-
|
|
1016
|
+
"tooltip-before": L(() => [
|
|
1017
|
+
x(l.$slots, "tooltip-before", Y(X({ ...he.value })), void 0, !0)
|
|
1026
1018
|
]),
|
|
1027
|
-
"tooltip-after":
|
|
1028
|
-
|
|
1019
|
+
"tooltip-after": L(() => [
|
|
1020
|
+
x(l.$slots, "tooltip-after", Y(X({ ...he.value })), void 0, !0)
|
|
1029
1021
|
]),
|
|
1030
1022
|
_: 3
|
|
1031
1023
|
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
|
|
1032
|
-
e.value.style.chart.legend.show ? (n(),
|
|
1024
|
+
e.value.style.chart.legend.show ? (n(), i("div", {
|
|
1033
1025
|
key: 7,
|
|
1034
1026
|
ref_key: "chartLegend",
|
|
1035
1027
|
ref: ie,
|
|
1036
|
-
class:
|
|
1028
|
+
class: B({ "vue-ui-nested-donuts-legend": ye.value.length > 1 })
|
|
1037
1029
|
}, [
|
|
1038
|
-
(n(!0),
|
|
1039
|
-
key: `legend_${o}_${
|
|
1030
|
+
(n(!0), i(T, null, O(ye.value, (a, o) => (n(), E(al, {
|
|
1031
|
+
key: `legend_${o}_${Ne.value}`,
|
|
1040
1032
|
legendSet: a,
|
|
1041
|
-
config:
|
|
1033
|
+
config: At.value,
|
|
1042
1034
|
onClickMarker: s[1] || (s[1] = ({ legend: t }) => ve(t))
|
|
1043
1035
|
}, {
|
|
1044
|
-
legendTitle:
|
|
1045
|
-
t[0] && t[0].arcOf ? (n(),
|
|
1036
|
+
legendTitle: L(({ titleSet: t }) => [
|
|
1037
|
+
t[0] && t[0].arcOf ? (n(), i("div", Tl, N(t[0].arcOf), 1)) : g("", !0)
|
|
1046
1038
|
]),
|
|
1047
|
-
item:
|
|
1039
|
+
item: L(({ legend: t, index: u }) => [
|
|
1048
1040
|
m("div", {
|
|
1049
1041
|
onClick: (c) => ve(t),
|
|
1050
|
-
style: se(`opacity:${
|
|
1042
|
+
style: se(`opacity:${w.value.includes(t.id) ? 0.5 : 1}`)
|
|
1051
1043
|
}, [
|
|
1052
|
-
ue(
|
|
1044
|
+
ue(N(t.name) + ": " + N(r(J)(
|
|
1053
1045
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
1054
1046
|
t.value,
|
|
1055
|
-
|
|
1047
|
+
r(F)({
|
|
1056
1048
|
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
1057
1049
|
v: t.value,
|
|
1058
1050
|
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
@@ -1060,40 +1052,40 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
1060
1052
|
}),
|
|
1061
1053
|
{ datapoint: t, seriesIndex: u }
|
|
1062
1054
|
)) + " ", 1),
|
|
1063
|
-
|
|
1055
|
+
w.value.includes(t.id) ? (n(), i(T, { key: 1 }, [
|
|
1064
1056
|
ue(" ( - % ) ")
|
|
1065
|
-
], 64)) : (n(),
|
|
1066
|
-
ue(" (" +
|
|
1057
|
+
], 64)) : (n(), i(T, { key: 0 }, [
|
|
1058
|
+
ue(" (" + N(isNaN(t.value / t.total) ? "-" : r(F)({
|
|
1067
1059
|
v: t.value / t.total * 100,
|
|
1068
1060
|
s: "%",
|
|
1069
1061
|
r: e.value.style.chart.legend.roundingPercentage
|
|
1070
1062
|
})) + ") ", 1)
|
|
1071
1063
|
], 64))
|
|
1072
|
-
], 12,
|
|
1064
|
+
], 12, Fl)
|
|
1073
1065
|
]),
|
|
1074
1066
|
_: 2
|
|
1075
1067
|
}, 1032, ["legendSet", "config"]))), 128))
|
|
1076
1068
|
], 2)) : g("", !0),
|
|
1077
|
-
e.value.style.chart.legend.show ? g("", !0) : (n(),
|
|
1069
|
+
e.value.style.chart.legend.show ? g("", !0) : (n(), i("div", {
|
|
1078
1070
|
key: 8,
|
|
1079
1071
|
ref_key: "chartLegend",
|
|
1080
1072
|
ref: ie
|
|
1081
1073
|
}, [
|
|
1082
|
-
|
|
1074
|
+
x(l.$slots, "legend", { legend: ye.value }, void 0, !0)
|
|
1083
1075
|
], 512)),
|
|
1084
|
-
l.$slots.source ? (n(),
|
|
1076
|
+
l.$slots.source ? (n(), i("div", {
|
|
1085
1077
|
key: 9,
|
|
1086
1078
|
ref_key: "source",
|
|
1087
|
-
ref:
|
|
1079
|
+
ref: Oe,
|
|
1088
1080
|
dir: "auto"
|
|
1089
1081
|
}, [
|
|
1090
|
-
|
|
1082
|
+
x(l.$slots, "source", {}, void 0, !0)
|
|
1091
1083
|
], 512)) : g("", !0),
|
|
1092
|
-
|
|
1084
|
+
Q.value ? (n(), E(r(pt), {
|
|
1093
1085
|
key: 10,
|
|
1094
1086
|
hideDetails: "",
|
|
1095
1087
|
config: {
|
|
1096
|
-
open:
|
|
1088
|
+
open: $.value.showTable,
|
|
1097
1089
|
maxHeight: 1e4,
|
|
1098
1090
|
body: {
|
|
1099
1091
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
@@ -1105,33 +1097,33 @@ const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = ["i
|
|
|
1105
1097
|
}
|
|
1106
1098
|
}
|
|
1107
1099
|
}, {
|
|
1108
|
-
content:
|
|
1109
|
-
(n(),
|
|
1110
|
-
key: `table_${
|
|
1100
|
+
content: L(() => [
|
|
1101
|
+
(n(), E(r(yt), {
|
|
1102
|
+
key: `table_${Ie.value}`,
|
|
1111
1103
|
colNames: te.value.colNames,
|
|
1112
1104
|
head: te.value.head,
|
|
1113
1105
|
body: te.value.body,
|
|
1114
1106
|
config: te.value.config,
|
|
1115
1107
|
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
1116
|
-
onClose: s[2] || (s[2] = (a) =>
|
|
1108
|
+
onClose: s[2] || (s[2] = (a) => $.value.showTable = !1)
|
|
1117
1109
|
}, {
|
|
1118
|
-
th:
|
|
1110
|
+
th: L(({ th: a }) => [
|
|
1119
1111
|
m("div", {
|
|
1120
1112
|
innerHTML: a,
|
|
1121
1113
|
style: { display: "flex", "align-items": "center" }
|
|
1122
|
-
}, null, 8,
|
|
1114
|
+
}, null, 8, Ol)
|
|
1123
1115
|
]),
|
|
1124
|
-
td:
|
|
1125
|
-
ue(
|
|
1116
|
+
td: L(({ td: a }) => [
|
|
1117
|
+
ue(N(a.name || a), 1)
|
|
1126
1118
|
]),
|
|
1127
1119
|
_: 1
|
|
1128
1120
|
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
1129
1121
|
]),
|
|
1130
1122
|
_: 1
|
|
1131
1123
|
}, 8, ["config"])) : g("", !0)
|
|
1132
|
-
], 46,
|
|
1124
|
+
], 46, sl));
|
|
1133
1125
|
}
|
|
1134
|
-
},
|
|
1126
|
+
}, El = /* @__PURE__ */ ol(Sl, [["__scopeId", "data-v-e7ec0539"]]);
|
|
1135
1127
|
export {
|
|
1136
|
-
|
|
1128
|
+
El as default
|
|
1137
1129
|
};
|