vue-data-ui 3.0.0-next.0 → 3.0.0-next.10
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/README.md +109 -68
- package/dist/{Arrow-CzFtSJ1v.js → Arrow-8Wnel_lw.js} +1 -1
- package/dist/{BaseDraggableDialog-0S5xhs2P.js → BaseDraggableDialog-D-IcFGSE.js} +2 -2
- package/dist/{BaseIcon-DoDjTdD5.js → BaseIcon-RLse0qy8.js} +1 -1
- package/dist/{ColorPicker-BGRchgqQ.js → ColorPicker-D9dpnizT.js} +2 -2
- package/dist/{DataTable-BBbOgI-a.js → DataTable-IzCJ9gby.js} +2 -2
- package/dist/{Legend-Q4bOb-Nf.js → Legend-SfJ53F5x.js} +12 -11
- package/dist/{NonSvgPenAndPaper-DNKRvsBB.js → NonSvgPenAndPaper-3oZlBiCt.js} +3 -3
- package/dist/{PackageVersion-D0VPY8-5.js → PackageVersion-u8Hc4rJi.js} +1 -1
- package/dist/{PenAndPaper-DhBJsnob.js → PenAndPaper-6iArlmj7.js} +32 -32
- package/dist/{Shape-DbsLJ-SE.js → Shape-vSWSsIaU.js} +1 -1
- package/dist/{Slicer-DZEFp2GU.js → Slicer-CPMTQDCj.js} +2 -2
- package/dist/{SparkTooltip-CoOJR62O.js → SparkTooltip-sazd7MmK.js} +1 -1
- package/dist/{Title-D29apS4l.js → Title-CTsOHFNh.js} +1 -1
- package/dist/Tooltip-4cn1szzA.js +157 -0
- package/dist/{UserOptions-Bdit7AWO.js → UserOptions-X9Ckvwp-.js} +137 -129
- package/dist/{dom-to-png-BdPIrHOF.js → dom-to-png-C3BKllTG.js} +1 -1
- package/dist/img-D9CjuW6g.js +33 -0
- package/dist/{index-DMqAxz7R.js → index-DBSLpcPM.js} +1515 -1426
- package/dist/pdf-V4tIjxUb.js +58 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +1098 -222
- package/dist/types/vue-data-ui.d.ts +1098 -222
- package/dist/useLoading-Bt5Doa8m.js +28 -0
- package/dist/{useNestedProp-YgN3FV_8.js → useNestedProp-BQFkJRtL.js} +1 -1
- package/dist/{usePrinter-COkTjv6C.js → usePrinter-CjyE7ii3.js} +2 -2
- package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DG97x2hL.js} +139 -132
- package/dist/vue-data-ui-BgN2CPSV.js +320 -0
- package/dist/vue-data-ui.js +53 -52
- package/dist/{vue-ui-3d-bar-Ojgjl20n.js → vue-ui-3d-bar-DlnRLAbw.js} +261 -245
- package/dist/{vue-ui-accordion-P6eFHGQp.js → vue-ui-accordion-yWXqkLfQ.js} +3 -3
- package/dist/{vue-ui-age-pyramid-IcMpAhiw.js → vue-ui-age-pyramid-C_4kFlWe.js} +233 -217
- package/dist/{vue-ui-annotator-Bk7d86-x.js → vue-ui-annotator-DVXA74Er.js} +2 -2
- package/dist/{vue-ui-bullet-DCvWbCPk.js → vue-ui-bullet-DoxSEGR4.js} +172 -156
- package/dist/{vue-ui-candlestick-DCf-88Yv.js → vue-ui-candlestick-Bke-ZK92.js} +271 -254
- package/dist/{vue-ui-carousel-table-DEsl0XUh.js → vue-ui-carousel-table-CqRuHaU6.js} +17 -16
- package/dist/{vue-ui-chestnut-Cg10-3wu.js → vue-ui-chestnut-BYIowBXd.js} +419 -403
- package/dist/{vue-ui-chord-BWYzR6vf.js → vue-ui-chord-DyA4jvyD.js} +256 -240
- package/dist/{vue-ui-circle-pack-CO2Ra2-5.js → vue-ui-circle-pack-BVT22rGO.js} +230 -214
- package/dist/{vue-ui-cursor-BbYHJDbV.js → vue-ui-cursor-B3RyMKwx.js} +2 -2
- package/dist/{vue-ui-dashboard-DkCnNuse.js → vue-ui-dashboard-Cgqpnpao.js} +62 -62
- package/dist/{vue-ui-digits-DRsphHt2.js → vue-ui-digits-Db9yuqjo.js} +2 -2
- package/dist/vue-ui-donut-CdsBUcPD.js +1547 -0
- package/dist/{vue-ui-donut-evolution-B5F2-0bh.js → vue-ui-donut-evolution-D5eUZJuU.js} +370 -357
- package/dist/{vue-ui-dumbbell-DqqSxoSh.js → vue-ui-dumbbell-CWgs8sB6.js} +216 -200
- package/dist/{vue-ui-flow-CTIcUJgV.js → vue-ui-flow-CL5jxEBp.js} +217 -201
- package/dist/{vue-ui-funnel-k7KD7Xoc.js → vue-ui-funnel-DT9BzBp3.js} +213 -197
- package/dist/{vue-ui-galaxy-C9EHaP4I.js → vue-ui-galaxy-hwr5J-b7.js} +215 -202
- package/dist/{vue-ui-gauge-CBiM_1-n.js → vue-ui-gauge-D_fnRyKs.js} +220 -204
- package/dist/{vue-ui-gizmo-CAc7b2oK.js → vue-ui-gizmo-CLni95HP.js} +3 -3
- package/dist/{vue-ui-heatmap-B3ubrP2v.js → vue-ui-heatmap-Bd8qoV2F.js} +244 -224
- package/dist/{vue-ui-history-plot-XCqccO3b.js → vue-ui-history-plot-BJvaJkPO.js} +268 -252
- package/dist/{vue-ui-kpi-DTGMDjaZ.js → vue-ui-kpi-B7uO6vRA.js} +3 -3
- package/dist/{vue-ui-mini-loader-Cn_7nvVq.js → vue-ui-mini-loader-CTDfGO91.js} +2 -2
- package/dist/{vue-ui-molecule-BugMXFAK.js → vue-ui-molecule-BSE6LaGt.js} +204 -188
- package/dist/{vue-ui-mood-radar-Cv4dHZPL.js → vue-ui-mood-radar-CN24P-Tk.js} +206 -190
- package/dist/vue-ui-nested-donuts-CWL3uP-u.js +1212 -0
- package/dist/{vue-ui-onion-Bha2hRAb.js → vue-ui-onion-Bib32nel.js} +196 -180
- package/dist/{vue-ui-parallel-coordinate-plot-DWJ2DWx4.js → vue-ui-parallel-coordinate-plot-l0O-i93L.js} +194 -178
- package/dist/{vue-ui-quadrant-BKHZoTml.js → vue-ui-quadrant-D0pzeobL.js} +321 -305
- package/dist/{vue-ui-quick-chart-D_k3lbU8.js → vue-ui-quick-chart-CaLIrn96.js} +347 -331
- package/dist/{vue-ui-radar-Co4EOjSk.js → vue-ui-radar-DXJ1WS7s.js} +193 -177
- package/dist/{vue-ui-rating-dtNN0EdX.js → vue-ui-rating-C6qqU59J.js} +2 -2
- package/dist/{vue-ui-relation-circle-CR4UpQzM.js → vue-ui-relation-circle-SpPQ2WhH.js} +188 -172
- package/dist/{vue-ui-ridgeline-BKX97EnR.js → vue-ui-ridgeline-BMsbiTjU.js} +212 -196
- package/dist/{vue-ui-rings-EPTwyt6D.js → vue-ui-rings-ES4LhrT0.js} +223 -210
- package/dist/{vue-ui-scatter-BlxzblSR.js → vue-ui-scatter-yV6nLFs6.js} +288 -273
- package/dist/{vue-ui-skeleton-CjN2ZdgT.js → vue-ui-skeleton-7gkY0oe-.js} +3 -3
- package/dist/{vue-ui-smiley-DdF_ErYG.js → vue-ui-smiley-CYLqgGm1.js} +2 -2
- package/dist/{vue-ui-spark-trend-RdOlCuT9.js → vue-ui-spark-trend-kQ3dsaGO.js} +3 -3
- package/dist/{vue-ui-sparkbar-DWufRGcN.js → vue-ui-sparkbar-Bfe8SMeM.js} +3 -3
- package/dist/{vue-ui-sparkgauge-IP1O3qyT.js → vue-ui-sparkgauge-Dxts3pPS.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-Cnv9xZ8H.js → vue-ui-sparkhistogram-CC6-gQ2R.js} +4 -4
- package/dist/{vue-ui-sparkline-CYgeD5V3.js → vue-ui-sparkline-Ba6FPyOS.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-BCwoK9xd.js → vue-ui-sparkstackbar-CQr6s7Ij.js} +3 -3
- package/dist/{vue-ui-stackbar-CqFIvfrK.js → vue-ui-stackbar-cJAK-x5g.js} +497 -474
- package/dist/{vue-ui-strip-plot-Dq-kDRai.js → vue-ui-strip-plot-DyU5K6-X.js} +241 -225
- package/dist/{vue-ui-table-vaIdQnPl.js → vue-ui-table-B_KeSP8f.js} +3 -3
- package/dist/{vue-ui-table-heatmap-U_Td0cdh.js → vue-ui-table-heatmap-CzGGjLl6.js} +26 -25
- package/dist/{vue-ui-table-sparkline-DkOaHx5L.js → vue-ui-table-sparkline-BoW1Y5Hh.js} +8 -7
- package/dist/{vue-ui-thermometer-CzckBZgs.js → vue-ui-thermometer-ROH_nY6z.js} +170 -154
- package/dist/{vue-ui-timer-DSdUshUs.js → vue-ui-timer-DmgpfYIT.js} +5 -5
- package/dist/vue-ui-tiremarks-CkmD6BQB.js +358 -0
- package/dist/vue-ui-treemap-BOxeG-ql.js +965 -0
- package/dist/vue-ui-vertical-bar-BoKi7wHJ.js +1106 -0
- package/dist/{vue-ui-waffle-DusUVY6y.js → vue-ui-waffle-BIM_Qg3a.js} +234 -221
- package/dist/vue-ui-wheel-CGZgFZax.js +352 -0
- package/dist/{vue-ui-word-cloud-_7uYjJ5A.js → vue-ui-word-cloud-Dt-X1dFo.js} +249 -233
- package/dist/{vue-ui-world-COIyBHII.js → vue-ui-world-BrPqffT7.js} +239 -223
- package/dist/vue-ui-xy-CYko0Jmo.js +2982 -0
- package/dist/{vue-ui-xy-canvas-CuYRyub2.js → vue-ui-xy-canvas-DVRWryRe.js} +447 -431
- package/package.json +2 -2
- package/dist/Tooltip-hVZUY_s5.js +0 -149
- package/dist/img-BeMVTwmF.js +0 -20
- package/dist/pdf-DPxOdzfi.js +0 -51
- package/dist/useMouse-AicQS8Vf.js +0 -13
- package/dist/vue-data-ui-nceqWRts.js +0 -301
- package/dist/vue-ui-donut-DSE7ubVv.js +0 -1315
- package/dist/vue-ui-nested-donuts-CYe0Are_.js +0 -1154
- package/dist/vue-ui-tiremarks-B2WWklqG.js +0 -342
- package/dist/vue-ui-treemap-D1dgDhjG.js +0 -952
- package/dist/vue-ui-vertical-bar-Dd4sYeAC.js +0 -958
- package/dist/vue-ui-wheel-ClsKBh52.js +0 -336
- package/dist/vue-ui-xy-C_OUyzTC.js +0 -3135
|
@@ -0,0 +1,1212 @@
|
|
|
1
|
+
import { defineAsyncComponent as R, computed as L, ref as h, watch as ot, onMounted as st, nextTick as ut, shallowRef as nt, onBeforeUnmount as Et, createElementBlock as r, openBlock as n, unref as i, normalizeStyle as ne, normalizeClass as D, createBlock as U, createCommentVNode as w, createVNode as rt, createSlots as Rt, withCtx as x, renderSlot as C, normalizeProps as W, guardReactiveProps as q, createElementVNode as y, Fragment as T, renderList as N, toDisplayString as S, withDirectives as it, vShow as dt, createTextVNode as Ut } from "vue";
|
|
2
|
+
import { u as Gt, c as Yt, t as Xt, p as Te, a as Wt, G as M, o as qt, e as H, b as Ht, d as Jt, m as Ne, f as O, X as Kt, s as Qt, L as ct, k as Ae, n as J, i as Q, x as vt, q as Zt, r as jt, y as el, v as Oe, T as ht } from "./index-DBSLpcPM.js";
|
|
3
|
+
import { t as tl, u as ll } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as ft } from "./useNestedProp-BQFkJRtL.js";
|
|
5
|
+
import { u as al } from "./usePrinter-CjyE7ii3.js";
|
|
6
|
+
import { u as ol } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
|
+
import { u as sl } from "./useChartAccessibility-9icAAmYg.js";
|
|
8
|
+
import ul from "./Title-CTsOHFNh.js";
|
|
9
|
+
import nl from "./Legend-SfJ53F5x.js";
|
|
10
|
+
import rl from "./img-D9CjuW6g.js";
|
|
11
|
+
import { _ as il } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
|
+
const dl = ["id"], cl = ["xmlns", "viewBox"], vl = ["width", "height"], hl = ["id"], fl = ["offset", "stop-color"], yl = ["offset", "stop-opacity"], pl = ["id"], bl = ["id"], gl = ["id"], ml = ["flood-color"], wl = ["id", "d"], $l = ["d", "fill", "stroke", "stroke-width", "filter"], kl = ["d", "fill", "stroke", "stroke-width"], Ll = { key: 1 }, xl = ["d", "fill"], Cl = { key: 2 }, _l = ["font-size", "font-weight", "fill", "dy"], Tl = ["href"], Nl = ["x", "y", "font-size", "font-weight", "fill"], Al = { key: 3 }, Ol = ["filter"], Sl = ["opacity", "text-anchor", "x", "y", "fill", "font-size", "font-weight"], Fl = ["opacity", "text-anchor", "x", "y", "fill", "font-size", "font-weight"], Il = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], Vl = ["d", "fill", "onMouseenter", "onClick"], Pl = {
|
|
13
|
+
key: 5,
|
|
14
|
+
class: "vue-data-ui-watermark"
|
|
15
|
+
}, zl = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "vue-ui-nested-donuts-legend-title"
|
|
18
|
+
}, Dl = ["onClick"], Ml = ["innerHTML"], Bl = {
|
|
19
|
+
__name: "vue-ui-nested-donuts",
|
|
20
|
+
props: {
|
|
21
|
+
config: {
|
|
22
|
+
type: Object,
|
|
23
|
+
default() {
|
|
24
|
+
return {};
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
dataset: {
|
|
28
|
+
type: Array,
|
|
29
|
+
default() {
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
emits: ["selectLegend", "selectDatapoint"],
|
|
35
|
+
setup(yt, { expose: pt, emit: bt }) {
|
|
36
|
+
const gt = R(() => import("./vue-ui-accordion-yWXqkLfQ.js")), mt = R(() => import("./DataTable-IzCJ9gby.js")), wt = R(() => import("./PackageVersion-u8Hc4rJi.js")), $t = R(() => import("./PenAndPaper-6iArlmj7.js")), kt = R(() => import("./vue-ui-skeleton-7gkY0oe-.js")), Lt = R(() => import("./Tooltip-4cn1szzA.js")), xt = R(() => import("./UserOptions-X9Ckvwp-.js")), { vue_ui_nested_donuts: Ct } = Gt(), _ = yt, Z = L(() => !!_.dataset && _.dataset.length), p = h(Yt()), re = h(!1), ie = h(""), de = h(null), Se = h(0), V = h(null), Fe = h(null), ce = h(null), Ie = h(null), Ve = h(null), Pe = h(0), ze = h(0), De = h(0), B = h(!0), E = h([]), K = h([]), G = h(!1);
|
|
37
|
+
function Me(l) {
|
|
38
|
+
G.value = l, Se.value += 1;
|
|
39
|
+
}
|
|
40
|
+
const e = L({
|
|
41
|
+
get: () => Re(),
|
|
42
|
+
set: (l) => l
|
|
43
|
+
}), { userOptionsVisible: ve, setUserOptionsVisibility: Be, keepUserOptionState: Ee } = ol({ config: e.value }), { svgRef: j } = sl({
|
|
44
|
+
config: e.value.style.chart.title
|
|
45
|
+
});
|
|
46
|
+
function Re() {
|
|
47
|
+
const l = ft({
|
|
48
|
+
userConfig: _.config,
|
|
49
|
+
defaultConfig: Ct
|
|
50
|
+
});
|
|
51
|
+
return l.theme ? {
|
|
52
|
+
...ft({
|
|
53
|
+
userConfig: Wt.vue_ui_nested_donuts[l.theme] || _.config,
|
|
54
|
+
defaultConfig: l
|
|
55
|
+
}),
|
|
56
|
+
customPalette: Xt[l.theme] || Te
|
|
57
|
+
} : l;
|
|
58
|
+
}
|
|
59
|
+
ot(
|
|
60
|
+
() => _.config,
|
|
61
|
+
(l) => {
|
|
62
|
+
e.value = Re(), ve.value = !e.value.userOptions.showOnChartHover, he(), Pe.value += 1, ze.value += 1, De.value += 1, k.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, k.value.showTable = e.value.table.show, k.value.showTooltip = e.value.style.chart.tooltip.show, v.value.width = e.value.style.chart.width, v.value.height = e.value.style.chart.height;
|
|
63
|
+
},
|
|
64
|
+
{ deep: !0 }
|
|
65
|
+
);
|
|
66
|
+
const Ue = L(() => {
|
|
67
|
+
const { top: l, right: s, bottom: o, left: a } = e.value.style.chart.padding;
|
|
68
|
+
return {
|
|
69
|
+
css: `padding:${l}px ${s}px ${o}px ${a}px`,
|
|
70
|
+
top: l,
|
|
71
|
+
right: s,
|
|
72
|
+
bottom: o,
|
|
73
|
+
left: a
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
function _t(l, s = 1e3, o = 50) {
|
|
77
|
+
return new Promise((a) => {
|
|
78
|
+
const t = l.length;
|
|
79
|
+
E.value = Array(t).fill(0), K.value = [];
|
|
80
|
+
let u = 0;
|
|
81
|
+
l.forEach((c, f) => {
|
|
82
|
+
setTimeout(() => {
|
|
83
|
+
const m = performance.now();
|
|
84
|
+
function d(b) {
|
|
85
|
+
const A = Math.min((b - m) / s, 1), we = ht(A), $e = c * we;
|
|
86
|
+
E.value[f] = $e, E.value = [...E.value];
|
|
87
|
+
const se = [];
|
|
88
|
+
let ke = 0;
|
|
89
|
+
_.dataset.forEach((ue, Le) => {
|
|
90
|
+
const zt = Oe(ue.series.reduce(
|
|
91
|
+
(Ce, _e) => Ce + Oe(M(_e.values).reduce((Mt, Bt) => Mt + Bt, 0)),
|
|
92
|
+
0
|
|
93
|
+
)), Dt = Oe(E.value.slice(ke, ke + ue.series.length).reduce((Ce, _e) => Ce + _e, 0)), xe = zt - Dt;
|
|
94
|
+
xe > Number.MIN_VALUE && se.push({
|
|
95
|
+
name: "__ghost__",
|
|
96
|
+
arcOf: ue.name,
|
|
97
|
+
arcOfId: `${p.value}_${Le}`,
|
|
98
|
+
id: `ghost_${p.value}_${Le}`,
|
|
99
|
+
seriesIndex: -1,
|
|
100
|
+
datasetIndex: Le,
|
|
101
|
+
color: "transparent",
|
|
102
|
+
value: xe,
|
|
103
|
+
fullValue: xe,
|
|
104
|
+
absoluteValues: [],
|
|
105
|
+
ghost: !0
|
|
106
|
+
}), ke += ue.series.length;
|
|
107
|
+
}), K.value = se, A < 1 ? requestAnimationFrame(d) : (u += 1, u === t && a());
|
|
108
|
+
}
|
|
109
|
+
requestAnimationFrame(d);
|
|
110
|
+
}, f * o);
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
st(async () => {
|
|
115
|
+
if (he(), e.value.startAnimation?.show) {
|
|
116
|
+
const s = _.dataset.flatMap((o) => o.series).map(
|
|
117
|
+
(o) => M(o.values).reduce((a, t) => a + t, 0)
|
|
118
|
+
);
|
|
119
|
+
E.value = s.map(() => 0), B.value = !0, K.value = _.dataset.map((o, a) => {
|
|
120
|
+
const t = o.series.reduce(
|
|
121
|
+
(u, c) => u + M(c.values).reduce((f, m) => f + m, 0),
|
|
122
|
+
0
|
|
123
|
+
);
|
|
124
|
+
return {
|
|
125
|
+
name: "__ghost__",
|
|
126
|
+
arcOf: o.name,
|
|
127
|
+
arcOfId: `${p.value}_${a}`,
|
|
128
|
+
id: `ghost_${p.value}_${a}`,
|
|
129
|
+
seriesIndex: -1,
|
|
130
|
+
datasetIndex: a,
|
|
131
|
+
color: "transparent",
|
|
132
|
+
value: t,
|
|
133
|
+
fullValue: t,
|
|
134
|
+
absoluteValues: [],
|
|
135
|
+
ghost: !0
|
|
136
|
+
};
|
|
137
|
+
}), await ut(), _t(
|
|
138
|
+
s,
|
|
139
|
+
e.value.startAnimation.durationMs,
|
|
140
|
+
e.value.startAnimation.staggerMs
|
|
141
|
+
).then(() => {
|
|
142
|
+
B.value = !1, K.value = [];
|
|
143
|
+
});
|
|
144
|
+
} else
|
|
145
|
+
B.value = !1;
|
|
146
|
+
});
|
|
147
|
+
const P = nt(null), Y = nt(null);
|
|
148
|
+
st(() => {
|
|
149
|
+
he();
|
|
150
|
+
});
|
|
151
|
+
function he() {
|
|
152
|
+
if (qt(_.dataset) && H({
|
|
153
|
+
componentName: "VueUiNestedDonuts",
|
|
154
|
+
type: "dataset"
|
|
155
|
+
}), e.value.responsive) {
|
|
156
|
+
const l = tl(() => {
|
|
157
|
+
const { width: s, height: o } = ll({
|
|
158
|
+
chart: V.value,
|
|
159
|
+
title: e.value.style.chart.title.text ? Fe.value : null,
|
|
160
|
+
legend: e.value.style.chart.legend.show ? ce.value : null,
|
|
161
|
+
source: Ie.value,
|
|
162
|
+
noTitle: Ve.value,
|
|
163
|
+
padding: Ue.value
|
|
164
|
+
});
|
|
165
|
+
requestAnimationFrame(() => {
|
|
166
|
+
v.value.width = s, v.value.height = o;
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
P.value && (Y.value && P.value.unobserve(Y.value), P.value.disconnect()), P.value = new ResizeObserver(l), Y.value = V.value.parentNode, P.value.observe(Y.value);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
Et(() => {
|
|
173
|
+
P.value && (Y.value && P.value.unobserve(Y.value), P.value.disconnect());
|
|
174
|
+
});
|
|
175
|
+
const { isPrinting: Ge, isImaging: Ye, generatePdf: Xe, generateImage: We } = al({
|
|
176
|
+
elementId: `nested_donuts_${p.value}`,
|
|
177
|
+
fileName: e.value.style.chart.title.text || "vue-ui-nested-donuts",
|
|
178
|
+
options: e.value.userOptions.print
|
|
179
|
+
}), Tt = L(() => e.value.userOptions.show && !e.value.style.chart.title.text), Nt = L(() => Ht(e.value.customPalette)), k = h({
|
|
180
|
+
dataLabels: {
|
|
181
|
+
show: e.value.style.chart.layout.labels.dataLabels.show
|
|
182
|
+
},
|
|
183
|
+
showTable: e.value.table.show,
|
|
184
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
185
|
+
}), v = h({
|
|
186
|
+
width: e.value.style.chart.width,
|
|
187
|
+
height: e.value.style.chart.height
|
|
188
|
+
}), qe = bt;
|
|
189
|
+
function At({ datapoint: l, index: s }) {
|
|
190
|
+
qe("selectDatapoint", { datapoint: l, index: s });
|
|
191
|
+
}
|
|
192
|
+
function He({
|
|
193
|
+
from: l,
|
|
194
|
+
to: s,
|
|
195
|
+
duration: o,
|
|
196
|
+
onUpdate: a,
|
|
197
|
+
onDone: t,
|
|
198
|
+
easing: u = ht
|
|
199
|
+
}) {
|
|
200
|
+
const c = performance.now();
|
|
201
|
+
function f(m) {
|
|
202
|
+
const d = Math.min((m - c) / o, 1), b = u(d), A = l + (s - l) * b;
|
|
203
|
+
a(A, d), d < 1 ? requestAnimationFrame(f) : (a(s, 1), t && t());
|
|
204
|
+
}
|
|
205
|
+
requestAnimationFrame(f);
|
|
206
|
+
}
|
|
207
|
+
const $ = h([]), F = L(() => {
|
|
208
|
+
_.dataset.forEach((s, o) => {
|
|
209
|
+
[null, void 0].includes(s.name) && H({
|
|
210
|
+
componentName: "VueUiNestedDonuts",
|
|
211
|
+
type: "datasetSerieAttribute",
|
|
212
|
+
property: "name",
|
|
213
|
+
index: o
|
|
214
|
+
}), [null, void 0].includes(s.series) ? H({
|
|
215
|
+
componentName: "VueUiNestedDonuts",
|
|
216
|
+
type: "datasetSerieAttribute",
|
|
217
|
+
property: "series",
|
|
218
|
+
index: o
|
|
219
|
+
}) : s.series.length === 0 ? H({
|
|
220
|
+
componentName: "VueUiNestedDonuts",
|
|
221
|
+
type: "datasetAttributeEmpty",
|
|
222
|
+
property: `series at index ${o}`
|
|
223
|
+
}) : s.series.forEach((a, t) => {
|
|
224
|
+
[null, void 0].includes(a.name) && H({
|
|
225
|
+
componentName: "VueUiNestedDonuts",
|
|
226
|
+
type: "datasetSerieAttribute",
|
|
227
|
+
property: "name",
|
|
228
|
+
index: t,
|
|
229
|
+
key: "serie"
|
|
230
|
+
}), [null, void 0].includes(a.values) && H({
|
|
231
|
+
componentName: "VueUiNestedDonuts",
|
|
232
|
+
type: "datasetSerieAttribute",
|
|
233
|
+
property: "values",
|
|
234
|
+
index: t,
|
|
235
|
+
key: "serie"
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
let l = 0;
|
|
240
|
+
return _.dataset.map((s, o) => ({
|
|
241
|
+
...s,
|
|
242
|
+
total: s.series.filter((a) => !$.value.includes(a.id)).map((a) => M(a.values).reduce((t, u) => t + u, 0)).reduce((a, t) => a + t, 0),
|
|
243
|
+
datasetIndex: o,
|
|
244
|
+
id: `${p.value}_${o}`,
|
|
245
|
+
series: s.series.map((a, t) => {
|
|
246
|
+
const u = M(a.values).reduce((c, f) => c + f, 0);
|
|
247
|
+
return {
|
|
248
|
+
name: a.name,
|
|
249
|
+
arcOf: s.name,
|
|
250
|
+
arcOfId: `${p.value}_${o}`,
|
|
251
|
+
id: `${p.value}_${o}_${t}`,
|
|
252
|
+
seriesIndex: t,
|
|
253
|
+
datasetIndex: o,
|
|
254
|
+
color: Jt(a.color) || Nt.value[t] || Te[t % Te.length],
|
|
255
|
+
value: B.value ? E.value[l++] ?? 0 : u,
|
|
256
|
+
absoluteValues: a.values || []
|
|
257
|
+
};
|
|
258
|
+
})
|
|
259
|
+
}));
|
|
260
|
+
}), I = L(() => Math.min(v.value.height, v.value.width) * (e.value.style.chart.layout.donut.strokeWidth / 512)), Je = L(() => [...F.value].map((l, s) => {
|
|
261
|
+
const o = l.series.filter((a) => !$.value.includes(a.id)).map((a) => a.value).reduce((a, t) => a + t, 0);
|
|
262
|
+
return {
|
|
263
|
+
...l,
|
|
264
|
+
total: o,
|
|
265
|
+
series: l.series.filter((a) => !$.value.includes(a.id)).map((a) => ({
|
|
266
|
+
...a,
|
|
267
|
+
proportion: a.value / o
|
|
268
|
+
}))
|
|
269
|
+
};
|
|
270
|
+
}));
|
|
271
|
+
function Ot(l, s, o) {
|
|
272
|
+
let a = 0;
|
|
273
|
+
for (let t = 0; t < l.length; t += 1)
|
|
274
|
+
o.includes(l[t]) && (a += 1);
|
|
275
|
+
return a < s;
|
|
276
|
+
}
|
|
277
|
+
const g = h(Je.value);
|
|
278
|
+
ot(
|
|
279
|
+
() => Je.value,
|
|
280
|
+
(l) => g.value = l
|
|
281
|
+
);
|
|
282
|
+
function fe(l) {
|
|
283
|
+
qe("selectLegend", l);
|
|
284
|
+
const s = _.dataset.flatMap(
|
|
285
|
+
(d, b) => d.series.map((A, we) => ({
|
|
286
|
+
value: M(A.values).reduce(($e, se) => $e + se, 0),
|
|
287
|
+
id: `${p.value}_${b}_${we}`,
|
|
288
|
+
arcOfId: `${p.value}_${b}`
|
|
289
|
+
}))
|
|
290
|
+
).find((d) => d.id === l.id);
|
|
291
|
+
if (!s) return;
|
|
292
|
+
const o = F.value.flatMap((d) => d.series).find((d) => d.id === l.id)?.value ?? 0, a = g.value.flatMap((d) => d.series).find((d) => d.id === l.id);
|
|
293
|
+
let u = a ? a.value : 0;
|
|
294
|
+
const c = F.value.find(
|
|
295
|
+
(d) => d.id === s.arcOfId
|
|
296
|
+
);
|
|
297
|
+
if (!c) return;
|
|
298
|
+
const f = c.series.map((d) => d.id), m = Ot(
|
|
299
|
+
f,
|
|
300
|
+
f.length - 1,
|
|
301
|
+
$.value
|
|
302
|
+
);
|
|
303
|
+
$.value.includes(l.id) ? ($.value = $.value.filter((d) => d !== l.id), e.value.serieToggleAnimation.show ? He({
|
|
304
|
+
from: u,
|
|
305
|
+
to: o,
|
|
306
|
+
duration: e.value.serieToggleAnimation.durationMs,
|
|
307
|
+
onUpdate: (d) => {
|
|
308
|
+
g.value = g.value.map((b) => ({
|
|
309
|
+
...b,
|
|
310
|
+
series: b.series.map((A) => A.id === l.id ? { ...A, value: d } : A)
|
|
311
|
+
}));
|
|
312
|
+
}
|
|
313
|
+
}) : g.value = g.value.map((d) => ({
|
|
314
|
+
...d,
|
|
315
|
+
series: d.series.map((b) => b.id === l.id ? { ...b, value: o } : b)
|
|
316
|
+
}))) : m && (e.value.serieToggleAnimation.show ? He({
|
|
317
|
+
from: u,
|
|
318
|
+
to: 0,
|
|
319
|
+
duration: e.value.serieToggleAnimation.durationMs,
|
|
320
|
+
onUpdate: (d) => {
|
|
321
|
+
g.value = g.value.map((b) => ({
|
|
322
|
+
...b,
|
|
323
|
+
series: b.series.map((A) => A.id === l.id ? { ...A, value: d } : A)
|
|
324
|
+
}));
|
|
325
|
+
},
|
|
326
|
+
onDone: () => {
|
|
327
|
+
$.value.push(l.id);
|
|
328
|
+
}
|
|
329
|
+
}) : (g.value = g.value.map((d) => ({
|
|
330
|
+
...d,
|
|
331
|
+
series: d.series.map((b) => b.id === l.id ? { ...b, value: 0 } : b)
|
|
332
|
+
})), $.value.push(l.id)));
|
|
333
|
+
}
|
|
334
|
+
const ee = L(() => I.value / F.value.length * e.value.style.chart.layout.donut.spacingRatio), Ke = L(() => g.value.map((l, s) => I.value - s * I.value / F.value.length)), X = L(() => g.value.map((l, s) => {
|
|
335
|
+
const o = Math.abs(l.series.map((m) => m.value).reduce((m, d) => m + d, 0)) > 0, a = I.value - s * I.value / g.value.length, t = B.value ? K.value.find((m) => m.datasetIndex === s) : null, u = [...l.series, ...t ? [t] : []].map((m) => ({
|
|
336
|
+
...m,
|
|
337
|
+
value: m.value < 1e-11 ? Number.MIN_VALUE : m.value
|
|
338
|
+
})), c = Ne(
|
|
339
|
+
{ series: [
|
|
340
|
+
{ name: "_", color: e.value.style.chart.layout.donut.emptyFill, value: 1 }
|
|
341
|
+
] },
|
|
342
|
+
v.value.width / 2,
|
|
343
|
+
v.value.height / 2,
|
|
344
|
+
a,
|
|
345
|
+
a,
|
|
346
|
+
1.99999,
|
|
347
|
+
2,
|
|
348
|
+
1,
|
|
349
|
+
360,
|
|
350
|
+
105.25,
|
|
351
|
+
ee.value
|
|
352
|
+
), f = `M ${v.value.width / 2},${v.value.height / 2 + a}
|
|
353
|
+
a ${a},${a} 0 1,1 0,${-2 * a}
|
|
354
|
+
a ${a},${a} 0 1,1 0,${2 * a}`;
|
|
355
|
+
return {
|
|
356
|
+
...l,
|
|
357
|
+
hasData: o,
|
|
358
|
+
radius: a,
|
|
359
|
+
skeleton: c,
|
|
360
|
+
fullCirclePath: f,
|
|
361
|
+
donut: Ne(
|
|
362
|
+
{ series: u },
|
|
363
|
+
v.value.width / 2,
|
|
364
|
+
v.value.height / 2,
|
|
365
|
+
a,
|
|
366
|
+
a,
|
|
367
|
+
1.99999,
|
|
368
|
+
2,
|
|
369
|
+
1,
|
|
370
|
+
360,
|
|
371
|
+
105.25,
|
|
372
|
+
ee.value
|
|
373
|
+
)
|
|
374
|
+
};
|
|
375
|
+
})), Qe = L(() => [...F.value].map((l, s) => {
|
|
376
|
+
const o = s * I.value / F.value.length;
|
|
377
|
+
return {
|
|
378
|
+
sizeRatio: o,
|
|
379
|
+
donut: Ne(
|
|
380
|
+
{ series: [{ value: 1 }] },
|
|
381
|
+
v.value.width / 2,
|
|
382
|
+
v.value.height / 2,
|
|
383
|
+
I.value - o,
|
|
384
|
+
I.value - o,
|
|
385
|
+
1.99999,
|
|
386
|
+
2,
|
|
387
|
+
1,
|
|
388
|
+
360,
|
|
389
|
+
105.25,
|
|
390
|
+
I.value / F.value.length * e.value.style.chart.layout.donut.spacingRatio
|
|
391
|
+
)[0]
|
|
392
|
+
};
|
|
393
|
+
})), Ze = h(null), te = h(null), le = h(null), ye = h(null);
|
|
394
|
+
function St({ datapoint: l, _relativeIndex: s, seriesIndex: o }) {
|
|
395
|
+
Ze.value = l.arcOfId, te.value = l.id, le.value = o, de.value = l.id, ye.value = {
|
|
396
|
+
datapoint: l,
|
|
397
|
+
seriesIndex: o,
|
|
398
|
+
series: g.value,
|
|
399
|
+
config: e.value
|
|
400
|
+
};
|
|
401
|
+
const a = e.value.style.chart.tooltip.customFormat;
|
|
402
|
+
if (vt(a) && el(
|
|
403
|
+
() => a({
|
|
404
|
+
seriesIndex: o,
|
|
405
|
+
datapoint: l,
|
|
406
|
+
series: g.value,
|
|
407
|
+
config: e.value
|
|
408
|
+
})
|
|
409
|
+
))
|
|
410
|
+
ie.value = a({
|
|
411
|
+
seriesIndex: o,
|
|
412
|
+
datapoint: l,
|
|
413
|
+
series: g.value,
|
|
414
|
+
config: e.value
|
|
415
|
+
});
|
|
416
|
+
else {
|
|
417
|
+
let t = "";
|
|
418
|
+
if (e.value.style.chart.tooltip.showAllItemsAtIndex && $.value.length === 0) {
|
|
419
|
+
const u = g.value.map((c) => c.series.find((f) => f.seriesIndex === o));
|
|
420
|
+
u.forEach((c, f) => {
|
|
421
|
+
if (!c) return "";
|
|
422
|
+
t += `
|
|
423
|
+
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${f < u.length - 1 ? `border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor}` : ""}">
|
|
424
|
+
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
425
|
+
<svg viewBox="0 0 20 20" height="${e.value.style.chart.tooltip.fontSize}" width="${e.value.style.chart.tooltip.fontSize}">
|
|
426
|
+
<circle cx="10" cy="10" r="10" fill="${c.color}"/>
|
|
427
|
+
</svg>
|
|
428
|
+
<span>
|
|
429
|
+
${c.arcOf ?? ""} - ${c.name}
|
|
430
|
+
</span>
|
|
431
|
+
</div>
|
|
432
|
+
<span>
|
|
433
|
+
${e.value.style.chart.tooltip.showValue ? `<b>${Q(
|
|
434
|
+
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
435
|
+
l.value,
|
|
436
|
+
O({
|
|
437
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
438
|
+
v: l.value,
|
|
439
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
440
|
+
r: e.value.style.chart.tooltip.roundingValue
|
|
441
|
+
}),
|
|
442
|
+
{ datapoint: l, seriesIndex: o }
|
|
443
|
+
)}
|
|
444
|
+
</b>` : ""}
|
|
445
|
+
${e.value.style.chart.tooltip.showPercentage ? `(${O({
|
|
446
|
+
v: c.proportion * 100,
|
|
447
|
+
s: "%",
|
|
448
|
+
r: e.value.style.chart.tooltip.roundingPercentage
|
|
449
|
+
})})` : ""}
|
|
450
|
+
</span>
|
|
451
|
+
</div>
|
|
452
|
+
`;
|
|
453
|
+
});
|
|
454
|
+
} else
|
|
455
|
+
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>${Q(
|
|
456
|
+
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
457
|
+
l.value,
|
|
458
|
+
O({
|
|
459
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
460
|
+
v: l.value,
|
|
461
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
462
|
+
r: e.value.style.chart.tooltip.roundingValue
|
|
463
|
+
}),
|
|
464
|
+
{ datapoint: l, seriesIndex: o }
|
|
465
|
+
)}</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? t += `<span>(${O({
|
|
466
|
+
v: l.proportion * 100,
|
|
467
|
+
s: "%",
|
|
468
|
+
r: e.value.style.chart.tooltip.roundingPercentage
|
|
469
|
+
})})</span></div>` : t += `<b>${O({
|
|
470
|
+
v: l.proportion * 100,
|
|
471
|
+
s: "%",
|
|
472
|
+
r: e.value.style.chart.tooltip.roundingPercentage
|
|
473
|
+
})}</b></div>`);
|
|
474
|
+
ie.value = `<div style="font-size:${e.value.style.chart.tooltip.fontSize}px">${t}</div>`;
|
|
475
|
+
}
|
|
476
|
+
re.value = !0;
|
|
477
|
+
}
|
|
478
|
+
function pe(l) {
|
|
479
|
+
return l.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
|
|
480
|
+
}
|
|
481
|
+
function je(l, s) {
|
|
482
|
+
if (!e.value.useBlurOnHover)
|
|
483
|
+
return "";
|
|
484
|
+
if (e.value.style.chart.tooltip.showAllItemsAtIndex && $.value.length === 0)
|
|
485
|
+
return [null, void 0].includes(le.value) || le.value === s ? "" : `url(#blur_${p.value})`;
|
|
486
|
+
if (!e.value.style.chart.tooltip.showAllItemsAtIndex || $.value.length)
|
|
487
|
+
return [null, void 0].includes(te.value) || te.value === l.id ? "" : `url(#blur_${p.value})`;
|
|
488
|
+
}
|
|
489
|
+
const be = L(() => F.value.map((l, s) => {
|
|
490
|
+
const o = l.series.filter(
|
|
491
|
+
(t) => !$.value.includes(t.id)
|
|
492
|
+
), a = B.value ? o.map((t) => {
|
|
493
|
+
const u = _.dataset[s].series.findIndex(
|
|
494
|
+
(c) => c.name === t.name
|
|
495
|
+
);
|
|
496
|
+
return M(
|
|
497
|
+
_.dataset[s].series[u].values
|
|
498
|
+
).reduce((c, f) => c + f, 0);
|
|
499
|
+
}).reduce((t, u) => t + u, 0) : o.map((t) => t.value).reduce((t, u) => t + u, 0);
|
|
500
|
+
return l.series.map((t, u) => {
|
|
501
|
+
const c = M(_.dataset[s].series[u].values).reduce(
|
|
502
|
+
(m, d) => m + d,
|
|
503
|
+
0
|
|
504
|
+
), f = B.value ? c : t.value;
|
|
505
|
+
return {
|
|
506
|
+
name: t.name,
|
|
507
|
+
color: t.color,
|
|
508
|
+
value: f,
|
|
509
|
+
shape: "circle",
|
|
510
|
+
arcOf: t.arcOf,
|
|
511
|
+
id: t.id,
|
|
512
|
+
seriesIndex: u,
|
|
513
|
+
datasetIndex: s,
|
|
514
|
+
total: a,
|
|
515
|
+
opacity: $.value.includes(t.id) ? 0.5 : 1,
|
|
516
|
+
segregate: () => fe(t),
|
|
517
|
+
isSegregated: $.value.includes(t.id)
|
|
518
|
+
};
|
|
519
|
+
});
|
|
520
|
+
})), Ft = L(() => ({
|
|
521
|
+
cy: "nested-donuts-legend",
|
|
522
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
523
|
+
color: e.value.style.chart.legend.color,
|
|
524
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
525
|
+
paddingBottom: 12,
|
|
526
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
527
|
+
})), z = L(() => {
|
|
528
|
+
const l = g.value.flatMap((o) => o.series.map((a) => ({
|
|
529
|
+
name: `${o.name} - ${a.name}`,
|
|
530
|
+
color: a.color,
|
|
531
|
+
total: o.total
|
|
532
|
+
}))), s = g.value.flatMap((o) => o.series.map((a) => a.value));
|
|
533
|
+
return { head: l, body: s };
|
|
534
|
+
});
|
|
535
|
+
function et(l = null) {
|
|
536
|
+
ut(() => {
|
|
537
|
+
const s = z.value.head.map((t, u) => [
|
|
538
|
+
[t.name],
|
|
539
|
+
[z.value.body[u]],
|
|
540
|
+
[
|
|
541
|
+
isNaN(z.value.body[u] / t.total) ? "-" : z.value.body[u] / t.total * 100
|
|
542
|
+
]
|
|
543
|
+
]), o = [
|
|
544
|
+
[e.value.style.chart.title.text],
|
|
545
|
+
[e.value.style.chart.title.subtitle.text],
|
|
546
|
+
[[""], ["val"], ["%"]]
|
|
547
|
+
].concat(s), a = Zt(o);
|
|
548
|
+
l ? l(a) : jt({
|
|
549
|
+
csvContent: a,
|
|
550
|
+
title: e.value.style.chart.title.text || "vue-ui-nested-donuts"
|
|
551
|
+
});
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
const ae = L(() => {
|
|
555
|
+
const l = [
|
|
556
|
+
e.value.table.columnNames.series,
|
|
557
|
+
e.value.table.columnNames.value,
|
|
558
|
+
e.value.table.columnNames.percentage
|
|
559
|
+
], s = z.value.head.map((t, u) => {
|
|
560
|
+
const c = O({
|
|
561
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
562
|
+
v: z.value.body[u],
|
|
563
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
564
|
+
r: e.value.table.td.roundingValue
|
|
565
|
+
});
|
|
566
|
+
return [
|
|
567
|
+
{
|
|
568
|
+
color: t.color,
|
|
569
|
+
name: t.name
|
|
570
|
+
},
|
|
571
|
+
c,
|
|
572
|
+
isNaN(z.value.body[u] / t.total) ? "-" : O({
|
|
573
|
+
v: z.value.body[u] / t.total * 100,
|
|
574
|
+
s: "%",
|
|
575
|
+
r: e.value.table.td.roundingPercentage
|
|
576
|
+
})
|
|
577
|
+
];
|
|
578
|
+
}), o = {
|
|
579
|
+
th: {
|
|
580
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
581
|
+
color: e.value.table.th.color,
|
|
582
|
+
outline: e.value.table.th.outline
|
|
583
|
+
},
|
|
584
|
+
td: {
|
|
585
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
586
|
+
color: e.value.table.td.color,
|
|
587
|
+
outline: e.value.table.td.outline
|
|
588
|
+
},
|
|
589
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
590
|
+
};
|
|
591
|
+
return {
|
|
592
|
+
colNames: [
|
|
593
|
+
e.value.table.columnNames.series,
|
|
594
|
+
e.value.table.columnNames.value,
|
|
595
|
+
e.value.table.columnNames.percentage
|
|
596
|
+
],
|
|
597
|
+
head: l,
|
|
598
|
+
body: s,
|
|
599
|
+
config: o
|
|
600
|
+
};
|
|
601
|
+
});
|
|
602
|
+
function It() {
|
|
603
|
+
return F.value;
|
|
604
|
+
}
|
|
605
|
+
function tt() {
|
|
606
|
+
k.value.showTable = !k.value.showTable;
|
|
607
|
+
}
|
|
608
|
+
function lt() {
|
|
609
|
+
k.value.dataLabels.show = !k.value.dataLabels.show;
|
|
610
|
+
}
|
|
611
|
+
function at() {
|
|
612
|
+
k.value.showTooltip = !k.value.showTooltip;
|
|
613
|
+
}
|
|
614
|
+
const oe = h(!1);
|
|
615
|
+
function ge() {
|
|
616
|
+
oe.value = !oe.value;
|
|
617
|
+
}
|
|
618
|
+
async function Vt({ scale: l = 2 } = {}) {
|
|
619
|
+
if (!V.value) return;
|
|
620
|
+
const { width: s, height: o } = V.value.getBoundingClientRect(), a = s / o, { imageUri: t, base64: u } = await rl({ domElement: V.value, base64: !0, img: !0, scale: l });
|
|
621
|
+
return {
|
|
622
|
+
imageUri: t,
|
|
623
|
+
base64: u,
|
|
624
|
+
title: e.value.style.chart.title.text,
|
|
625
|
+
width: s,
|
|
626
|
+
height: o,
|
|
627
|
+
aspectRatio: a
|
|
628
|
+
};
|
|
629
|
+
}
|
|
630
|
+
const me = h(null);
|
|
631
|
+
function Pt() {
|
|
632
|
+
if (!me.value) return;
|
|
633
|
+
const { x: l, y: s, width: o, height: a } = me.value.getBBox();
|
|
634
|
+
j.value && j.value.setAttribute("viewBox", `${l} ${s} ${o + Math.min(0, l)} ${a + Math.min(0, s)}`);
|
|
635
|
+
}
|
|
636
|
+
return pt({
|
|
637
|
+
autoSize: Pt,
|
|
638
|
+
getData: It,
|
|
639
|
+
getImage: Vt,
|
|
640
|
+
generatePdf: Xe,
|
|
641
|
+
generateCsv: et,
|
|
642
|
+
generateImage: We,
|
|
643
|
+
toggleTable: tt,
|
|
644
|
+
toggleLabels: lt,
|
|
645
|
+
toggleTooltip: at,
|
|
646
|
+
toggleAnnotator: ge,
|
|
647
|
+
toggleFullscreen: Me
|
|
648
|
+
}), (l, s) => (n(), r("div", {
|
|
649
|
+
ref_key: "nestedDonutsChart",
|
|
650
|
+
ref: V,
|
|
651
|
+
class: D(`vue-ui-nested-donuts ${G.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
652
|
+
style: ne(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
653
|
+
id: `nested_donuts_${p.value}`,
|
|
654
|
+
onMouseenter: s[3] || (s[3] = () => i(Be)(!0)),
|
|
655
|
+
onMouseleave: s[4] || (s[4] = () => i(Be)(!1))
|
|
656
|
+
}, [
|
|
657
|
+
e.value.userOptions.buttons.annotator ? (n(), U(i($t), {
|
|
658
|
+
key: 0,
|
|
659
|
+
svgRef: i(j),
|
|
660
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
661
|
+
color: e.value.style.chart.color,
|
|
662
|
+
active: oe.value,
|
|
663
|
+
onClose: ge
|
|
664
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : w("", !0),
|
|
665
|
+
Tt.value ? (n(), r("div", {
|
|
666
|
+
key: 1,
|
|
667
|
+
ref_key: "noTitle",
|
|
668
|
+
ref: Ve,
|
|
669
|
+
class: "vue-data-ui-no-title-space",
|
|
670
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
671
|
+
}, null, 512)) : w("", !0),
|
|
672
|
+
e.value.style.chart.title.text ? (n(), r("div", {
|
|
673
|
+
key: 2,
|
|
674
|
+
ref_key: "chartTitle",
|
|
675
|
+
ref: Fe
|
|
676
|
+
}, [
|
|
677
|
+
(n(), U(ul, {
|
|
678
|
+
key: `title_${Pe.value}`,
|
|
679
|
+
config: {
|
|
680
|
+
title: {
|
|
681
|
+
cy: "donut-div-title",
|
|
682
|
+
...e.value.style.chart.title
|
|
683
|
+
},
|
|
684
|
+
subtitle: {
|
|
685
|
+
cy: "donut-div-subtitle",
|
|
686
|
+
...e.value.style.chart.title.subtitle
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
}, null, 8, ["config"]))
|
|
690
|
+
], 512)) : w("", !0),
|
|
691
|
+
e.value.userOptions.show && Z.value && (i(Ee) || i(ve)) ? (n(), U(i(xt), {
|
|
692
|
+
ref: "details",
|
|
693
|
+
key: `user_option_${Se.value}`,
|
|
694
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
695
|
+
color: e.value.style.chart.color,
|
|
696
|
+
isPrinting: i(Ge),
|
|
697
|
+
isImaging: i(Ye),
|
|
698
|
+
uid: p.value,
|
|
699
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
700
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
701
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
702
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
703
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
704
|
+
hasLabel: e.value.userOptions.buttons.labels,
|
|
705
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
706
|
+
isFullscreen: G.value,
|
|
707
|
+
isTooltip: k.value.showTooltip,
|
|
708
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
709
|
+
chartElement: V.value,
|
|
710
|
+
position: e.value.userOptions.position,
|
|
711
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
712
|
+
isAnnotation: oe.value,
|
|
713
|
+
callbacks: e.value.userOptions.callbacks,
|
|
714
|
+
printScale: e.value.userOptions.print.scale,
|
|
715
|
+
onToggleFullscreen: Me,
|
|
716
|
+
onGeneratePdf: i(Xe),
|
|
717
|
+
onGenerateCsv: et,
|
|
718
|
+
onGenerateImage: i(We),
|
|
719
|
+
onToggleTable: tt,
|
|
720
|
+
onToggleLabels: lt,
|
|
721
|
+
onToggleTooltip: at,
|
|
722
|
+
onToggleAnnotator: ge,
|
|
723
|
+
style: ne({
|
|
724
|
+
visibility: i(Ee) ? i(ve) ? "visible" : "hidden" : "visible"
|
|
725
|
+
})
|
|
726
|
+
}, Rt({ _: 2 }, [
|
|
727
|
+
l.$slots.menuIcon ? {
|
|
728
|
+
name: "menuIcon",
|
|
729
|
+
fn: x(({ isOpen: o, color: a }) => [
|
|
730
|
+
C(l.$slots, "menuIcon", W(q({ isOpen: o, color: a })), void 0, !0)
|
|
731
|
+
]),
|
|
732
|
+
key: "0"
|
|
733
|
+
} : void 0,
|
|
734
|
+
l.$slots.optionTooltip ? {
|
|
735
|
+
name: "optionTooltip",
|
|
736
|
+
fn: x(() => [
|
|
737
|
+
C(l.$slots, "optionTooltip", {}, void 0, !0)
|
|
738
|
+
]),
|
|
739
|
+
key: "1"
|
|
740
|
+
} : void 0,
|
|
741
|
+
l.$slots.optionPdf ? {
|
|
742
|
+
name: "optionPdf",
|
|
743
|
+
fn: x(() => [
|
|
744
|
+
C(l.$slots, "optionPdf", {}, void 0, !0)
|
|
745
|
+
]),
|
|
746
|
+
key: "2"
|
|
747
|
+
} : void 0,
|
|
748
|
+
l.$slots.optionCsv ? {
|
|
749
|
+
name: "optionCsv",
|
|
750
|
+
fn: x(() => [
|
|
751
|
+
C(l.$slots, "optionCsv", {}, void 0, !0)
|
|
752
|
+
]),
|
|
753
|
+
key: "3"
|
|
754
|
+
} : void 0,
|
|
755
|
+
l.$slots.optionImg ? {
|
|
756
|
+
name: "optionImg",
|
|
757
|
+
fn: x(() => [
|
|
758
|
+
C(l.$slots, "optionImg", {}, void 0, !0)
|
|
759
|
+
]),
|
|
760
|
+
key: "4"
|
|
761
|
+
} : void 0,
|
|
762
|
+
l.$slots.optionTable ? {
|
|
763
|
+
name: "optionTable",
|
|
764
|
+
fn: x(() => [
|
|
765
|
+
C(l.$slots, "optionTable", {}, void 0, !0)
|
|
766
|
+
]),
|
|
767
|
+
key: "5"
|
|
768
|
+
} : void 0,
|
|
769
|
+
l.$slots.optionLabels ? {
|
|
770
|
+
name: "optionLabels",
|
|
771
|
+
fn: x(() => [
|
|
772
|
+
C(l.$slots, "optionLabels", {}, void 0, !0)
|
|
773
|
+
]),
|
|
774
|
+
key: "6"
|
|
775
|
+
} : void 0,
|
|
776
|
+
l.$slots.optionFullscreen ? {
|
|
777
|
+
name: "optionFullscreen",
|
|
778
|
+
fn: x(({ toggleFullscreen: o, isFullscreen: a }) => [
|
|
779
|
+
C(l.$slots, "optionFullscreen", W(q({ toggleFullscreen: o, isFullscreen: a })), void 0, !0)
|
|
780
|
+
]),
|
|
781
|
+
key: "7"
|
|
782
|
+
} : void 0,
|
|
783
|
+
l.$slots.optionAnnotator ? {
|
|
784
|
+
name: "optionAnnotator",
|
|
785
|
+
fn: x(({ toggleAnnotator: o, isAnnotator: a }) => [
|
|
786
|
+
C(l.$slots, "optionAnnotator", W(q({ toggleAnnotator: o, isAnnotator: a })), void 0, !0)
|
|
787
|
+
]),
|
|
788
|
+
key: "8"
|
|
789
|
+
} : void 0
|
|
790
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : w("", !0),
|
|
791
|
+
Z.value ? (n(), r("svg", {
|
|
792
|
+
key: 4,
|
|
793
|
+
ref_key: "svgRef",
|
|
794
|
+
ref: j,
|
|
795
|
+
xmlns: i(Kt),
|
|
796
|
+
class: D({
|
|
797
|
+
"vue-data-ui-fullscreen--on": G.value,
|
|
798
|
+
"vue-data-ui-fulscreen--off": !G.value,
|
|
799
|
+
"vue-data-ui-svg": !0
|
|
800
|
+
}),
|
|
801
|
+
viewBox: `0 0 ${v.value.width <= 0 ? 1e-3 : v.value.width} ${v.value.height < 0 ? 1e-3 : v.value.height}`,
|
|
802
|
+
style: ne(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};${Ue.value.css}`)
|
|
803
|
+
}, [
|
|
804
|
+
y("g", {
|
|
805
|
+
ref_key: "G",
|
|
806
|
+
ref: me,
|
|
807
|
+
class: "vue-data-ui-g"
|
|
808
|
+
}, [
|
|
809
|
+
rt(i(wt)),
|
|
810
|
+
l.$slots["chart-background"] ? (n(), r("foreignObject", {
|
|
811
|
+
key: 0,
|
|
812
|
+
x: 0,
|
|
813
|
+
y: 0,
|
|
814
|
+
width: v.value.width <= 0 ? 1e-3 : v.value.width,
|
|
815
|
+
height: v.value.height < 0 ? 1e-3 : v.value.height,
|
|
816
|
+
style: {
|
|
817
|
+
pointerEvents: "none"
|
|
818
|
+
}
|
|
819
|
+
}, [
|
|
820
|
+
C(l.$slots, "chart-background", {}, void 0, !0)
|
|
821
|
+
], 8, vl)) : w("", !0),
|
|
822
|
+
y("defs", null, [
|
|
823
|
+
(n(!0), r(T, null, N(Qe.value, (o, a) => (n(), r("radialGradient", {
|
|
824
|
+
id: `radial_${p.value}_${a}`
|
|
825
|
+
}, [
|
|
826
|
+
s[5] || (s[5] = y("stop", {
|
|
827
|
+
offset: "0%",
|
|
828
|
+
"stop-color": "#FFFFFF",
|
|
829
|
+
"stop-opacity": "0"
|
|
830
|
+
}, null, -1)),
|
|
831
|
+
y("stop", {
|
|
832
|
+
offset: `${(1 - ee.value / Ke.value[a]) * 100}%`,
|
|
833
|
+
"stop-color": i(Qt)("#FFFFFF", 0),
|
|
834
|
+
"stop-opacity": "0"
|
|
835
|
+
}, null, 8, fl),
|
|
836
|
+
y("stop", {
|
|
837
|
+
offset: `${(1 - ee.value / Ke.value[a] / 2) * 100}%`,
|
|
838
|
+
"stop-color": "#FFFFFF",
|
|
839
|
+
"stop-opacity": e.value.style.chart.gradientIntensity / 100
|
|
840
|
+
}, null, 8, yl),
|
|
841
|
+
s[6] || (s[6] = y("stop", {
|
|
842
|
+
offset: "100%",
|
|
843
|
+
"stop-color": "#FFFFFF",
|
|
844
|
+
"stop-opacity": "0"
|
|
845
|
+
}, null, -1))
|
|
846
|
+
], 8, hl))), 256))
|
|
847
|
+
]),
|
|
848
|
+
y("defs", null, [
|
|
849
|
+
y("filter", {
|
|
850
|
+
id: `blur_${p.value}`,
|
|
851
|
+
x: "-50%",
|
|
852
|
+
y: "-50%",
|
|
853
|
+
width: "200%",
|
|
854
|
+
height: "200%"
|
|
855
|
+
}, [
|
|
856
|
+
y("feGaussianBlur", {
|
|
857
|
+
in: "SourceGraphic",
|
|
858
|
+
stdDeviation: 2,
|
|
859
|
+
id: `blur_std_${p.value}`
|
|
860
|
+
}, null, 8, bl),
|
|
861
|
+
s[7] || (s[7] = y("feColorMatrix", {
|
|
862
|
+
type: "saturate",
|
|
863
|
+
values: "0"
|
|
864
|
+
}, null, -1))
|
|
865
|
+
], 8, pl),
|
|
866
|
+
y("filter", {
|
|
867
|
+
id: `shadow_${p.value}`,
|
|
868
|
+
"color-interpolation-filters": "sRGB"
|
|
869
|
+
}, [
|
|
870
|
+
y("feDropShadow", {
|
|
871
|
+
dx: "0",
|
|
872
|
+
dy: "0",
|
|
873
|
+
stdDeviation: "10",
|
|
874
|
+
"flood-opacity": "0.5",
|
|
875
|
+
"flood-color": e.value.style.chart.layout.donut.shadowColor
|
|
876
|
+
}, null, 8, ml)
|
|
877
|
+
], 8, gl)
|
|
878
|
+
]),
|
|
879
|
+
y("defs", null, [
|
|
880
|
+
(n(!0), r(T, null, N(X.value, (o, a) => (n(), r("path", {
|
|
881
|
+
key: `path-full-${a}`,
|
|
882
|
+
id: `path-full-${a}-${p.value}`,
|
|
883
|
+
d: o.fullCirclePath,
|
|
884
|
+
fill: "none"
|
|
885
|
+
}, null, 8, wl))), 128))
|
|
886
|
+
]),
|
|
887
|
+
(n(!0), r(T, null, N(X.value, (o, a) => (n(), r("g", null, [
|
|
888
|
+
o.hasData ? (n(!0), r(T, { key: 0 }, N(o.donut.filter((t) => !t.ghost), (t, u) => (n(), r("g", null, [
|
|
889
|
+
y("path", {
|
|
890
|
+
class: "vue-ui-donut-arc-path",
|
|
891
|
+
d: t.arcSlice,
|
|
892
|
+
fill: t.color,
|
|
893
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
894
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
895
|
+
filter: je(t, u)
|
|
896
|
+
}, null, 8, $l)
|
|
897
|
+
]))), 256)) : (n(!0), r(T, { key: 1 }, N(o.skeleton, (t, u) => (n(), r("g", null, [
|
|
898
|
+
y("path", {
|
|
899
|
+
class: "vue-ui-donut-arc-path",
|
|
900
|
+
d: t.arcSlice,
|
|
901
|
+
fill: t.color,
|
|
902
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
903
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth
|
|
904
|
+
}, null, 8, kl)
|
|
905
|
+
]))), 256))
|
|
906
|
+
]))), 256)),
|
|
907
|
+
e.value.style.chart.useGradient ? (n(), r("g", Ll, [
|
|
908
|
+
(n(!0), r(T, null, N(Qe.value, (o, a) => (n(), r("g", null, [
|
|
909
|
+
y("path", {
|
|
910
|
+
d: o.donut.arcSlice,
|
|
911
|
+
fill: `url(#radial_${p.value}_${a})`,
|
|
912
|
+
stroke: "transparent",
|
|
913
|
+
"stroke-width": "0"
|
|
914
|
+
}, null, 8, xl)
|
|
915
|
+
]))), 256))
|
|
916
|
+
])) : w("", !0),
|
|
917
|
+
e.value.style.chart.layout.labels.dataLabels.showDonutName ? (n(), r("g", Cl, [
|
|
918
|
+
e.value.style.chart.layout.labels.dataLabels.curvedDonutName ? (n(!0), r(T, { key: 0 }, N(X.value, (o, a) => (n(), r("g", null, [
|
|
919
|
+
(n(!0), r(T, null, N(o.donut, (t, u) => (n(), r("g", null, [
|
|
920
|
+
u === 0 && v.value.width && v.value.height ? (n(), r("text", {
|
|
921
|
+
key: 0,
|
|
922
|
+
class: D({ animated: e.value.useCssAnimation }),
|
|
923
|
+
"text-anchor": "middle",
|
|
924
|
+
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
925
|
+
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldDonutName ? "bold" : "normal",
|
|
926
|
+
fill: e.value.style.chart.layout.labels.dataLabels.color,
|
|
927
|
+
dy: e.value.style.chart.layout.labels.dataLabels.donutNameOffsetY
|
|
928
|
+
}, [
|
|
929
|
+
y("textPath", {
|
|
930
|
+
href: `#path-full-${a}-${p.value}`,
|
|
931
|
+
startOffset: "50%",
|
|
932
|
+
"text-anchor": "middle",
|
|
933
|
+
method: "align",
|
|
934
|
+
spacing: "auto",
|
|
935
|
+
side: "right"
|
|
936
|
+
}, S(e.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation ? i(ct)({
|
|
937
|
+
source: o.name,
|
|
938
|
+
length: e.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize
|
|
939
|
+
}) : o.name), 9, Tl)
|
|
940
|
+
], 10, _l)) : w("", !0)
|
|
941
|
+
]))), 256))
|
|
942
|
+
]))), 256)) : (n(!0), r(T, { key: 1 }, N(X.value, (o, a) => (n(), r("g", null, [
|
|
943
|
+
(n(!0), r(T, null, N(o.donut, (t, u) => (n(), r("g", null, [
|
|
944
|
+
u === 0 && v.value.width && v.value.height ? (n(), r("text", {
|
|
945
|
+
key: 0,
|
|
946
|
+
class: D({ animated: e.value.useCssAnimation }),
|
|
947
|
+
x: v.value.width / 2,
|
|
948
|
+
y: t.startY - e.value.style.chart.layout.labels.dataLabels.fontSize + e.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,
|
|
949
|
+
"text-anchor": "middle",
|
|
950
|
+
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
951
|
+
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldDonutName ? "bold" : "normal",
|
|
952
|
+
fill: e.value.style.chart.layout.labels.dataLabels.color
|
|
953
|
+
}, S(e.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation ? i(ct)({
|
|
954
|
+
source: o.name,
|
|
955
|
+
length: e.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize
|
|
956
|
+
}) : o.name), 11, Nl)) : w("", !0)
|
|
957
|
+
]))), 256))
|
|
958
|
+
]))), 256))
|
|
959
|
+
])) : w("", !0),
|
|
960
|
+
e.value.style.chart.layout.labels.dataLabels.show ? (n(), r("g", Al, [
|
|
961
|
+
(n(!0), r(T, null, N(X.value, (o, a) => (n(), r("g", null, [
|
|
962
|
+
(n(!0), r(T, null, N(o.donut.filter((t) => !t.ghost), (t, u) => (n(), r("g", {
|
|
963
|
+
filter: je(t, u)
|
|
964
|
+
}, [
|
|
965
|
+
it(y("text", {
|
|
966
|
+
class: D({ animated: e.value.useCssAnimation }),
|
|
967
|
+
opacity: pe(t) ? 1 : 0,
|
|
968
|
+
"text-anchor": i(J)(t, !0).anchor,
|
|
969
|
+
x: i(J)(
|
|
970
|
+
t,
|
|
971
|
+
!1,
|
|
972
|
+
e.value.style.chart.layout.labels.dataLabels.offsetX
|
|
973
|
+
).x || 0,
|
|
974
|
+
y: i(Ae)(
|
|
975
|
+
t,
|
|
976
|
+
e.value.style.chart.layout.labels.dataLabels.offsetY,
|
|
977
|
+
e.value.style.chart.layout.labels.dataLabels.offsetY
|
|
978
|
+
),
|
|
979
|
+
fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? t.color : e.value.style.chart.layout.labels.dataLabels.color,
|
|
980
|
+
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
981
|
+
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldPercentage ? "bold" : "normal"
|
|
982
|
+
}, S(i(O)({
|
|
983
|
+
v: t.proportion * 100,
|
|
984
|
+
s: "%",
|
|
985
|
+
r: e.value.style.chart.layout.labels.dataLabels.roundingPercentage
|
|
986
|
+
})), 11, Sl), [
|
|
987
|
+
[
|
|
988
|
+
dt,
|
|
989
|
+
k.value.dataLabels.show && e.value.style.chart.layout.labels.dataLabels.showPercentage
|
|
990
|
+
]
|
|
991
|
+
]),
|
|
992
|
+
it(y("text", {
|
|
993
|
+
class: D({ animated: e.value.useCssAnimation }),
|
|
994
|
+
opacity: pe(t) ? 1 : 0,
|
|
995
|
+
"text-anchor": i(J)(t, !0).anchor,
|
|
996
|
+
x: i(J)(
|
|
997
|
+
t,
|
|
998
|
+
!1,
|
|
999
|
+
e.value.style.chart.layout.labels.dataLabels.offsetX
|
|
1000
|
+
).x || 0,
|
|
1001
|
+
y: i(Ae)(
|
|
1002
|
+
t,
|
|
1003
|
+
e.value.style.chart.layout.labels.dataLabels.offsetY,
|
|
1004
|
+
e.value.style.chart.layout.labels.dataLabels.offsetY
|
|
1005
|
+
) + e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
1006
|
+
fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? t.color : e.value.style.chart.layout.labels.dataLabels.color,
|
|
1007
|
+
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
1008
|
+
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldValue ? "bold" : "normal"
|
|
1009
|
+
}, " (" + S(i(Q)(
|
|
1010
|
+
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
1011
|
+
t.value,
|
|
1012
|
+
i(O)({
|
|
1013
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
1014
|
+
v: t.value,
|
|
1015
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
1016
|
+
r: e.value.style.chart.layout.labels.dataLabels.roundingValue
|
|
1017
|
+
}),
|
|
1018
|
+
{ datapoint: t, seriesIndex: a, datapointIndex: u }
|
|
1019
|
+
)) + ") ", 11, Fl), [
|
|
1020
|
+
[
|
|
1021
|
+
dt,
|
|
1022
|
+
k.value.dataLabels.show && e.value.style.chart.layout.labels.dataLabels.showPercentage && e.value.style.chart.layout.labels.dataLabels.showValue
|
|
1023
|
+
]
|
|
1024
|
+
]),
|
|
1025
|
+
pe(t) && k.value.dataLabels.show && !e.value.style.chart.layout.labels.dataLabels.showPercentage && e.value.style.chart.layout.labels.dataLabels.showValue ? (n(), r("text", {
|
|
1026
|
+
key: 0,
|
|
1027
|
+
class: D({ animated: e.value.useCssAnimation }),
|
|
1028
|
+
"text-anchor": i(J)(t, !0).anchor,
|
|
1029
|
+
x: i(J)(
|
|
1030
|
+
t,
|
|
1031
|
+
!1,
|
|
1032
|
+
e.value.style.chart.layout.labels.dataLabels.offsetX
|
|
1033
|
+
).x || 0,
|
|
1034
|
+
y: i(Ae)(
|
|
1035
|
+
t,
|
|
1036
|
+
e.value.style.chart.layout.labels.dataLabels.offsetY,
|
|
1037
|
+
e.value.style.chart.layout.labels.dataLabels.offsetY
|
|
1038
|
+
),
|
|
1039
|
+
fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? t.color : e.value.style.chart.layout.labels.dataLabels.color,
|
|
1040
|
+
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
1041
|
+
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldValue ? "bold" : "normal"
|
|
1042
|
+
}, S(i(Q)(
|
|
1043
|
+
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
1044
|
+
t.value,
|
|
1045
|
+
i(O)({
|
|
1046
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
1047
|
+
v: t.value,
|
|
1048
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
1049
|
+
r: e.value.style.chart.layout.labels.dataLabels.roundingValue
|
|
1050
|
+
}),
|
|
1051
|
+
{ datapoint: t, seriesIndex: a, datapointIndex: u }
|
|
1052
|
+
)), 11, Il)) : w("", !0)
|
|
1053
|
+
], 8, Ol))), 256))
|
|
1054
|
+
]))), 256))
|
|
1055
|
+
])) : w("", !0),
|
|
1056
|
+
(n(!0), r(T, null, N(X.value, (o, a) => (n(), r("g", null, [
|
|
1057
|
+
(n(!0), r(T, null, N(o.donut, (t, u) => (n(), r("g", null, [
|
|
1058
|
+
y("path", {
|
|
1059
|
+
d: t.arcSlice,
|
|
1060
|
+
fill: de.value === t.id ? e.value.style.chart.layout.donut.selectedColor : "transparent",
|
|
1061
|
+
onMouseenter: (c) => St({
|
|
1062
|
+
datapoint: t,
|
|
1063
|
+
seriesIndex: t.seriesIndex
|
|
1064
|
+
}),
|
|
1065
|
+
onClick: (c) => At({ datapoint: t, index: u }),
|
|
1066
|
+
onMouseleave: s[0] || (s[0] = (c) => {
|
|
1067
|
+
re.value = !1, Ze.value = null, te.value = null, le.value = null, de.value = null;
|
|
1068
|
+
})
|
|
1069
|
+
}, null, 40, Vl)
|
|
1070
|
+
]))), 256))
|
|
1071
|
+
]))), 256)),
|
|
1072
|
+
C(l.$slots, "svg", { svg: v.value }, void 0, !0)
|
|
1073
|
+
], 512)
|
|
1074
|
+
], 14, cl)) : w("", !0),
|
|
1075
|
+
l.$slots.watermark ? (n(), r("div", Pl, [
|
|
1076
|
+
C(l.$slots, "watermark", W(q({ isPrinting: i(Ge) || i(Ye) })), void 0, !0)
|
|
1077
|
+
])) : w("", !0),
|
|
1078
|
+
Z.value ? w("", !0) : (n(), U(i(kt), {
|
|
1079
|
+
key: 6,
|
|
1080
|
+
config: {
|
|
1081
|
+
type: "donut",
|
|
1082
|
+
style: {
|
|
1083
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1084
|
+
donut: {
|
|
1085
|
+
color: "#CCCCCC"
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
}, null, 8, ["config"])),
|
|
1090
|
+
rt(i(Lt), {
|
|
1091
|
+
show: k.value.showTooltip && re.value,
|
|
1092
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
1093
|
+
color: e.value.style.chart.tooltip.color,
|
|
1094
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
1095
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
1096
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
1097
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
1098
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
1099
|
+
position: e.value.style.chart.tooltip.position,
|
|
1100
|
+
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
1101
|
+
parent: V.value,
|
|
1102
|
+
content: ie.value,
|
|
1103
|
+
isFullscreen: G.value,
|
|
1104
|
+
isCustom: i(vt)(e.value.style.chart.tooltip.customFormat)
|
|
1105
|
+
}, {
|
|
1106
|
+
"tooltip-before": x(() => [
|
|
1107
|
+
C(l.$slots, "tooltip-before", W(q({ ...ye.value })), void 0, !0)
|
|
1108
|
+
]),
|
|
1109
|
+
"tooltip-after": x(() => [
|
|
1110
|
+
C(l.$slots, "tooltip-after", W(q({ ...ye.value })), void 0, !0)
|
|
1111
|
+
]),
|
|
1112
|
+
_: 3
|
|
1113
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
|
|
1114
|
+
e.value.style.chart.legend.show ? (n(), r("div", {
|
|
1115
|
+
key: 7,
|
|
1116
|
+
ref_key: "chartLegend",
|
|
1117
|
+
ref: ce,
|
|
1118
|
+
class: D({ "vue-ui-nested-donuts-legend": be.value.length > 1 })
|
|
1119
|
+
}, [
|
|
1120
|
+
(n(!0), r(T, null, N(be.value, (o, a) => (n(), U(nl, {
|
|
1121
|
+
key: `legend_${a}_${De.value}`,
|
|
1122
|
+
legendSet: o,
|
|
1123
|
+
config: Ft.value,
|
|
1124
|
+
onClickMarker: s[1] || (s[1] = ({ legend: t }) => fe(t))
|
|
1125
|
+
}, {
|
|
1126
|
+
legendTitle: x(({ titleSet: t }) => [
|
|
1127
|
+
t[0] && t[0].arcOf ? (n(), r("div", zl, S(t[0].arcOf), 1)) : w("", !0)
|
|
1128
|
+
]),
|
|
1129
|
+
item: x(({ legend: t, index: u }) => [
|
|
1130
|
+
y("div", {
|
|
1131
|
+
onClick: (c) => fe(t),
|
|
1132
|
+
style: ne(`opacity:${$.value.includes(t.id) ? 0.5 : 1}`)
|
|
1133
|
+
}, S(t.name) + S(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + S(e.value.style.chart.legend.showValue ? i(Q)(
|
|
1134
|
+
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
1135
|
+
t.value,
|
|
1136
|
+
i(O)({
|
|
1137
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
1138
|
+
v: t.value,
|
|
1139
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
1140
|
+
r: e.value.style.chart.legend.roundingValue
|
|
1141
|
+
}),
|
|
1142
|
+
{ datapoint: t, seriesIndex: u }
|
|
1143
|
+
) : "") + " " + S(e.value.style.chart.legend.showPercentage ? $.value.includes(t.id) ? `${e.value.style.chart.legend.showValue ? "(" : ""}- %${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? "(" : ""}${isNaN(t.value / t.total) ? "-" : i(O)({
|
|
1144
|
+
v: t.value / t.total * 100,
|
|
1145
|
+
s: "%",
|
|
1146
|
+
r: e.value.style.chart.legend.roundingPercentage
|
|
1147
|
+
})}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, Dl)
|
|
1148
|
+
]),
|
|
1149
|
+
_: 2
|
|
1150
|
+
}, 1032, ["legendSet", "config"]))), 128))
|
|
1151
|
+
], 2)) : w("", !0),
|
|
1152
|
+
e.value.style.chart.legend.show ? w("", !0) : (n(), r("div", {
|
|
1153
|
+
key: 8,
|
|
1154
|
+
ref_key: "chartLegend",
|
|
1155
|
+
ref: ce
|
|
1156
|
+
}, [
|
|
1157
|
+
C(l.$slots, "legend", { legend: be.value }, void 0, !0)
|
|
1158
|
+
], 512)),
|
|
1159
|
+
l.$slots.source ? (n(), r("div", {
|
|
1160
|
+
key: 9,
|
|
1161
|
+
ref_key: "source",
|
|
1162
|
+
ref: Ie,
|
|
1163
|
+
dir: "auto"
|
|
1164
|
+
}, [
|
|
1165
|
+
C(l.$slots, "source", {}, void 0, !0)
|
|
1166
|
+
], 512)) : w("", !0),
|
|
1167
|
+
Z.value ? (n(), U(i(gt), {
|
|
1168
|
+
key: 10,
|
|
1169
|
+
hideDetails: "",
|
|
1170
|
+
config: {
|
|
1171
|
+
open: k.value.showTable,
|
|
1172
|
+
maxHeight: 1e4,
|
|
1173
|
+
body: {
|
|
1174
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1175
|
+
color: e.value.style.chart.color
|
|
1176
|
+
},
|
|
1177
|
+
head: {
|
|
1178
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1179
|
+
color: e.value.style.chart.color
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
}, {
|
|
1183
|
+
content: x(() => [
|
|
1184
|
+
(n(), U(i(mt), {
|
|
1185
|
+
key: `table_${ze.value}`,
|
|
1186
|
+
colNames: ae.value.colNames,
|
|
1187
|
+
head: ae.value.head,
|
|
1188
|
+
body: ae.value.body,
|
|
1189
|
+
config: ae.value.config,
|
|
1190
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
1191
|
+
onClose: s[2] || (s[2] = (o) => k.value.showTable = !1)
|
|
1192
|
+
}, {
|
|
1193
|
+
th: x(({ th: o }) => [
|
|
1194
|
+
y("div", {
|
|
1195
|
+
innerHTML: o,
|
|
1196
|
+
style: { display: "flex", "align-items": "center" }
|
|
1197
|
+
}, null, 8, Ml)
|
|
1198
|
+
]),
|
|
1199
|
+
td: x(({ td: o }) => [
|
|
1200
|
+
Ut(S(o.name || o), 1)
|
|
1201
|
+
]),
|
|
1202
|
+
_: 1
|
|
1203
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
1204
|
+
]),
|
|
1205
|
+
_: 1
|
|
1206
|
+
}, 8, ["config"])) : w("", !0)
|
|
1207
|
+
], 46, dl));
|
|
1208
|
+
}
|
|
1209
|
+
}, Ql = /* @__PURE__ */ il(Bl, [["__scopeId", "data-v-bb5bf10a"]]);
|
|
1210
|
+
export {
|
|
1211
|
+
Ql as default
|
|
1212
|
+
};
|