vue-data-ui 2.17.5 → 2.17.7

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.
Files changed (90) hide show
  1. package/dist/{Arrow-V2QU9IrH.js → Arrow-me__N_0y.js} +1 -1
  2. package/dist/{BaseDraggableDialog-B9we9Njj.js → BaseDraggableDialog-B3vDETZF.js} +2 -2
  3. package/dist/{BaseIcon-CIwIBC3F.js → BaseIcon-ChZPZX-A.js} +1 -1
  4. package/dist/{ColorPicker-DIh1Yy5j.js → ColorPicker-BTHKcTCn.js} +2 -2
  5. package/dist/{DataTable-CuWuzeRI.js → DataTable-U4EH3cP4.js} +2 -2
  6. package/dist/{Legend-Bqi7F2iA.js → Legend-BQfiyC_w.js} +19 -18
  7. package/dist/{NonSvgPenAndPaper-CZZHY1OT.js → NonSvgPenAndPaper-B58ag5uE.js} +3 -3
  8. package/dist/{PackageVersion-BrZUdhZl.js → PackageVersion-NDKFRBq5.js} +1 -1
  9. package/dist/{PenAndPaper-DYoM74sL.js → PenAndPaper-CwoLkSrd.js} +3 -3
  10. package/dist/{Shape-J_57EZ2b.js → Shape-CeJI3w0R.js} +1 -1
  11. package/dist/{Slicer-BcmxCA-7.js → Slicer-DKLVa_w9.js} +2 -2
  12. package/dist/{SparkTooltip-DTZ9lyG2.js → SparkTooltip-1viQ12s2.js} +1 -1
  13. package/dist/{Title-C6IPIA3g.js → Title-tOz-gEGM.js} +1 -1
  14. package/dist/{Tooltip-Co7-BfJt.js → Tooltip-Dw_vV0R_.js} +1 -1
  15. package/dist/{UserOptions-B_r-qsSM.js → UserOptions-Bepf6s0a.js} +2 -2
  16. package/dist/{dom-to-png-BIakyQa8.js → dom-to-png-C4e097oF.js} +1 -1
  17. package/dist/{img-01ajmdrG.js → img-Bb0wcHve.js} +1 -1
  18. package/dist/{index-1P8hgXEL.js → index-R4FwM_IZ.js} +327 -328
  19. package/dist/{pdf-DpU5K64g.js → pdf-Bap-QOia.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +11 -0
  22. package/dist/types/vue-data-ui.d.ts +11 -0
  23. package/dist/{useNestedProp-DpGVxlm5.js → useNestedProp-BK4CixKz.js} +1 -1
  24. package/dist/{usePrinter-DhVpUIjn.js → usePrinter-3YhL7e8Q.js} +2 -2
  25. package/dist/{vue-data-ui-CY8hyLh3.js → vue-data-ui-CY0rRZ7Z.js} +63 -63
  26. package/dist/vue-data-ui.js +1 -1
  27. package/dist/{vue-ui-3d-bar-BylWATuf.js → vue-ui-3d-bar-Dep0ysOa.js} +6 -6
  28. package/dist/{vue-ui-accordion-24NeyZv-.js → vue-ui-accordion-CvmwQkdH.js} +3 -3
  29. package/dist/{vue-ui-age-pyramid-B83tZ39h.js → vue-ui-age-pyramid-BCPyK18i.js} +6 -6
  30. package/dist/{vue-ui-annotator-CzjOtDZF.js → vue-ui-annotator-JTkkUkwf.js} +2 -2
  31. package/dist/{vue-ui-bullet-DF3LC9Bq.js → vue-ui-bullet-JkggghcX.js} +7 -7
  32. package/dist/{vue-ui-candlestick-CUz_PMvv.js → vue-ui-candlestick-BGV4q10G.js} +7 -7
  33. package/dist/{vue-ui-carousel-table-l3XWJkDn.js → vue-ui-carousel-table-B_ie5YYq.js} +4 -4
  34. package/dist/{vue-ui-chestnut-Up5iZggG.js → vue-ui-chestnut-CLxKZsOD.js} +6 -6
  35. package/dist/{vue-ui-chord-Ci4m__az.js → vue-ui-chord-Co3kJVCi.js} +8 -8
  36. package/dist/{vue-ui-circle-pack-Bt-mm22Z.js → vue-ui-circle-pack-PL75C9jO.js} +6 -6
  37. package/dist/{vue-ui-cursor-DrhAdLl4.js → vue-ui-cursor-DC7O-8eZ.js} +2 -2
  38. package/dist/{vue-ui-dashboard-BTHMYSV_.js → vue-ui-dashboard-C3nn1lMD.js} +62 -62
  39. package/dist/{vue-ui-digits-CuQv2y9K.js → vue-ui-digits-D5UgycEC.js} +2 -2
  40. package/dist/vue-ui-donut-eHNz1cS2.js +1387 -0
  41. package/dist/{vue-ui-donut-evolution-K9ak_ipi.js → vue-ui-donut-evolution-BNo8EYG7.js} +8 -8
  42. package/dist/{vue-ui-dumbbell-BgkwijRo.js → vue-ui-dumbbell-D2RD8nwP.js} +7 -7
  43. package/dist/{vue-ui-flow-DERu1AKJ.js → vue-ui-flow-nlmivNyk.js} +7 -7
  44. package/dist/{vue-ui-funnel-Cg9WOVIy.js → vue-ui-funnel-eWVO6Rh-.js} +6 -6
  45. package/dist/{vue-ui-galaxy-EQjQWQnQ.js → vue-ui-galaxy-Ch2uWCU5.js} +5 -5
  46. package/dist/{vue-ui-gauge-DK6IYcgh.js → vue-ui-gauge-Ccknj5io.js} +6 -6
  47. package/dist/{vue-ui-gizmo-CTP17DpI.js → vue-ui-gizmo-CYbxx735.js} +3 -3
  48. package/dist/{vue-ui-heatmap-_2cCJYLT.js → vue-ui-heatmap-zSgV_xBw.js} +7 -7
  49. package/dist/{vue-ui-history-plot-DLDyT58X.js → vue-ui-history-plot-DwOOZx8Y.js} +7 -7
  50. package/dist/{vue-ui-kpi-DjPn2a-U.js → vue-ui-kpi-vZcmV3FL.js} +3 -3
  51. package/dist/{vue-ui-mini-loader-DU6qKMZd.js → vue-ui-mini-loader-DqrVkeKh.js} +2 -2
  52. package/dist/{vue-ui-molecule-Gh7AgRWc.js → vue-ui-molecule-DuMBa5Er.js} +5 -5
  53. package/dist/{vue-ui-mood-radar-DIwX-_gl.js → vue-ui-mood-radar-DeFiyKZo.js} +7 -7
  54. package/dist/{vue-ui-nested-donuts-DBTmpY4B.js → vue-ui-nested-donuts-ChqfdGIA.js} +7 -7
  55. package/dist/{vue-ui-onion-DwGWtFDH.js → vue-ui-onion-f1aoOv6z.js} +7 -7
  56. package/dist/{vue-ui-parallel-coordinate-plot-BgeqRRyn.js → vue-ui-parallel-coordinate-plot-Ca-UNZey.js} +8 -8
  57. package/dist/{vue-ui-quadrant-CBzkH3qE.js → vue-ui-quadrant-DUCj9oO3.js} +8 -8
  58. package/dist/{vue-ui-quick-chart-CDDj9TxF.js → vue-ui-quick-chart-R2nTOiT6.js} +6 -6
  59. package/dist/{vue-ui-radar-D1UXMxkA.js → vue-ui-radar-CVcnsuAK.js} +7 -7
  60. package/dist/{vue-ui-rating-aNFQ5sd7.js → vue-ui-rating-D2wYPFBm.js} +2 -2
  61. package/dist/{vue-ui-relation-circle-DLALezkH.js → vue-ui-relation-circle-D9TquCd5.js} +6 -6
  62. package/dist/{vue-ui-ridgeline-D1ZwVo6V.js → vue-ui-ridgeline-Cg1Zo2a_.js} +8 -8
  63. package/dist/{vue-ui-rings-CE31ZZXT.js → vue-ui-rings-DUjrPHK_.js} +8 -8
  64. package/dist/{vue-ui-scatter-DyyuU-A3.js → vue-ui-scatter-BWB6HCP0.js} +8 -8
  65. package/dist/{vue-ui-skeleton-DGfviPaE.js → vue-ui-skeleton-WSSONwJZ.js} +3 -3
  66. package/dist/{vue-ui-smiley-C6TsY3Hl.js → vue-ui-smiley-WLYZ-Ah-.js} +2 -2
  67. package/dist/{vue-ui-spark-trend-B400VATP.js → vue-ui-spark-trend-E6k5O2Rw.js} +3 -3
  68. package/dist/{vue-ui-sparkbar-C0OnOOJ5.js → vue-ui-sparkbar-CNzH63eE.js} +3 -3
  69. package/dist/{vue-ui-sparkgauge-BkNqshFM.js → vue-ui-sparkgauge-Bhh1DXey.js} +3 -3
  70. package/dist/{vue-ui-sparkhistogram-C3LwQSVu.js → vue-ui-sparkhistogram-DyLwFyLp.js} +4 -4
  71. package/dist/{vue-ui-sparkline-CLfr_Who.js → vue-ui-sparkline-uS8cCax1.js} +3 -3
  72. package/dist/{vue-ui-sparkstackbar-zycRUKtt.js → vue-ui-sparkstackbar-C6dYAH8m.js} +3 -3
  73. package/dist/{vue-ui-stackbar-Bc-qdemV.js → vue-ui-stackbar-Dddp2o8G.js} +9 -9
  74. package/dist/{vue-ui-strip-plot-KZtAVPn8.js → vue-ui-strip-plot-B6yC9kff.js} +7 -7
  75. package/dist/{vue-ui-table-4Oxtep8q.js → vue-ui-table-Cnih0nfc.js} +3 -3
  76. package/dist/{vue-ui-table-heatmap-Cx-gl_Jh.js → vue-ui-table-heatmap-BS8p2f9Z.js} +5 -5
  77. package/dist/{vue-ui-table-sparkline-u8mbihVP.js → vue-ui-table-sparkline-CKq52QYD.js} +4 -4
  78. package/dist/{vue-ui-thermometer-CIdkm0Cz.js → vue-ui-thermometer-DsLI46GU.js} +6 -6
  79. package/dist/{vue-ui-timer-BbVyIS3I.js → vue-ui-timer-BJlG0PSO.js} +5 -5
  80. package/dist/{vue-ui-tiremarks-CAX9tTfm.js → vue-ui-tiremarks-DdG9sprc.js} +6 -6
  81. package/dist/{vue-ui-treemap-CjzvHTfM.js → vue-ui-treemap-Bv_8qc1b.js} +8 -8
  82. package/dist/{vue-ui-vertical-bar-C81RHFCQ.js → vue-ui-vertical-bar-BFHAmyWq.js} +279 -273
  83. package/dist/{vue-ui-waffle-DOtUYFsS.js → vue-ui-waffle-DlU66HMb.js} +8 -8
  84. package/dist/{vue-ui-wheel-cn3Z8XVN.js → vue-ui-wheel-hbOXnmiy.js} +6 -6
  85. package/dist/{vue-ui-word-cloud-COUvIVpX.js → vue-ui-word-cloud-LPiLJ5Oe.js} +6 -6
  86. package/dist/{vue-ui-world-NdI2WafX.js → vue-ui-world-C5XgS-5e.js} +6 -6
  87. package/dist/{vue-ui-xy-D9eKQQ5Z.js → vue-ui-xy-BEZVemUJ.js} +17 -17
  88. package/dist/{vue-ui-xy-canvas-IunRC-hl.js → vue-ui-xy-canvas-DxVCBwMh.js} +8 -8
  89. package/package.json +2 -2
  90. package/dist/vue-ui-donut-C1leqtTL.js +0 -1338
@@ -0,0 +1,1387 @@
1
+ import { defineAsyncComponent as te, useSlots as Bt, computed as f, shallowRef as W, ref as w, onMounted as nt, onBeforeUnmount as Et, watch as ut, createElementBlock as u, openBlock as s, normalizeStyle as k, normalizeClass as Ce, createBlock as le, createCommentVNode as v, renderSlot as b, createElementVNode as h, createVNode as Pe, unref as r, createSlots as rt, withCtx as P, normalizeProps as ue, guardReactiveProps as re, Fragment as p, renderList as A, mergeProps as it, toDisplayString as M, createTextVNode as Gt, nextTick as Rt } from "vue";
2
+ import { u as Wt, o as Ut, e as Te, g as jt, c as Ht, b as qt, v as Jt, d as vt, p as ae, m as dt, $ as Kt, f as z, X as Qt, s as ge, w as Zt, j as el, N as L, i as V, k as he, n as x, t as tl, a as ll, C as Ie, q as al, r as ol, x as sl, T as ct } from "./index-R4FwM_IZ.js";
3
+ import { t as nl, u as ul } from "./useResponsive-DfdjqQps.js";
4
+ import { u as ht } from "./useNestedProp-BK4CixKz.js";
5
+ import { u as rl } from "./usePrinter-3YhL7e8Q.js";
6
+ import { u as il } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as vl } from "./useChartAccessibility-9icAAmYg.js";
8
+ import dl from "./Legend-BQfiyC_w.js";
9
+ import cl from "./Title-tOz-gEGM.js";
10
+ import { _ as hl } from "./Shape-CeJI3w0R.js";
11
+ import yl from "./img-Bb0wcHve.js";
12
+ import { _ as fl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
+ const pl = ["id"], gl = ["xmlns", "viewBox"], ml = ["width", "height"], bl = { key: 1 }, wl = ["id"], kl = ["stop-color"], xl = ["offset", "stop-color"], _l = ["offset", "stop-color"], $l = ["stop-color"], Cl = { key: 2 }, Pl = ["id", "cx", "cy"], Tl = ["stop-color", "stop-opacity"], Il = ["stop-color"], Ml = ["id"], Al = ["id"], Sl = ["id"], Ll = ["flood-color"], Fl = ["id"], zl = ["flood-color"], Ol = ["d", "stroke", "filter"], Nl = ["d", "stroke", "filter"], Yl = ["cx", "cy", "r", "fill", "filter"], Xl = { key: 6 }, Vl = ["stroke", "d"], Dl = ["d", "fill", "stroke", "stroke-width", "filter"], Bl = { key: 0 }, El = ["d", "fill", "stroke", "stroke-width", "filter"], Gl = { key: 0 }, Rl = ["stroke", "d"], Wl = { key: 0 }, Ul = ["d", "stroke", "stroke-width", "filter"], jl = { key: 1 }, Hl = ["d", "fill", "stroke", "stroke-width", "filter"], ql = ["d", "fill", "stroke", "stroke-width", "filter"], Jl = { key: 1 }, Kl = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Ql = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Zl = { key: 0 }, ea = ["d", "fill", "stroke", "stroke-width"], ta = ["cx", "cy", "r", "stroke"], la = ["cx", "cy", "r", "fill"], aa = { key: 0 }, oa = ["d", "fill", "onMouseenter", "onMouseleave", "onClick"], sa = { key: 1 }, na = ["cx", "cy", "r"], ua = ["x", "y", "fill", "font-size"], ra = ["x", "y", "fill", "font-size"], ia = ["x", "y", "fill", "font-size"], va = ["x", "y", "fill", "font-size"], da = ["filter"], ca = { key: 0 }, ha = ["x", "y"], ya = { key: 1 }, fa = ["cx", "cy", "fill", "stroke", "filter", "onClick", "onMouseenter", "onMouseleave"], pa = ["cx", "cy", "fill", "stroke", "filter", "onClick", "onMouseenter", "onMouseleave"], ga = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave"], ma = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave"], ba = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave"], wa = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave"], ka = { key: 2 }, xa = ["x", "y", "width"], _a = ["x", "y", "width"], $a = {
14
+ key: 5,
15
+ class: "vue-data-ui-watermark"
16
+ }, Ca = ["onClick"], Pa = ["innerHTML"], Ta = {
17
+ __name: "vue-ui-donut",
18
+ props: {
19
+ config: {
20
+ type: Object,
21
+ default() {
22
+ return {};
23
+ }
24
+ },
25
+ dataset: {
26
+ type: Array,
27
+ default() {
28
+ return [];
29
+ }
30
+ }
31
+ },
32
+ emits: ["selectLegend", "selectDatapoint"],
33
+ setup(Me, { expose: yt, emit: ft }) {
34
+ const pt = te(() => import("./vue-ui-accordion-CvmwQkdH.js")), gt = te(() => import("./DataTable-U4EH3cP4.js")), mt = te(() => import("./PackageVersion-NDKFRBq5.js")), bt = te(() => import("./PenAndPaper-CwoLkSrd.js")), wt = te(() => import("./vue-ui-skeleton-WSSONwJZ.js")), kt = te(() => import("./Tooltip-Dw_vV0R_.js")), xt = te(() => import("./UserOptions-Bepf6s0a.js")), { vue_ui_donut: _t } = Wt(), $t = Bt(), g = Me, ie = f({
35
+ get() {
36
+ return !!g.dataset && g.dataset.length;
37
+ },
38
+ set(l) {
39
+ return l;
40
+ }
41
+ }), U = W(null), Ae = W(null), Se = W(null), j = W(null), oe = W(null), Le = W(null), Fe = W(null), ze = w(0), Oe = w(0), Ne = w(0);
42
+ nt(() => {
43
+ Ye();
44
+ }), Et(() => {
45
+ j.value && (oe.value && j.value.unobserve(oe.value), j.value.disconnect());
46
+ });
47
+ function Ye() {
48
+ if (Ut(g.dataset) ? Te({
49
+ componentName: "VueUiDonut",
50
+ type: "dataset"
51
+ }) : (g.dataset.forEach((l, o) => {
52
+ jt({
53
+ datasetObject: l,
54
+ requiredAttributes: ["name", "values"]
55
+ }).forEach((t) => {
56
+ ie.value = !1, Te({
57
+ componentName: "VueUiDonut",
58
+ type: "datasetSerieAttribute",
59
+ property: t,
60
+ index: o
61
+ });
62
+ });
63
+ }), g.dataset.forEach((l, o) => {
64
+ (!l.name || l.name === "") && Te({
65
+ componentName: "VueUiDonut",
66
+ type: "datasetAttributeEmpty",
67
+ property: "name",
68
+ index: o
69
+ });
70
+ })), e.value.responsive) {
71
+ const l = nl(() => {
72
+ const { width: o, height: t } = ul({
73
+ chart: U.value,
74
+ title: e.value.style.chart.title.text ? Ae.value : null,
75
+ legend: e.value.style.chart.legend.show ? Se.value : null,
76
+ source: Le.value,
77
+ noTitle: Fe.value,
78
+ padding: Ee.value
79
+ });
80
+ requestAnimationFrame(() => {
81
+ n.value.width = o, n.value.height = t;
82
+ });
83
+ });
84
+ j.value && (oe.value && j.value.unobserve(oe.value), j.value.disconnect()), j.value = new ResizeObserver(l), oe.value = U.value.parentNode, j.value.observe(oe.value);
85
+ }
86
+ }
87
+ const m = w(Ht()), Ct = w(null), me = w(!1), be = w(""), O = w(null), Xe = w(0);
88
+ function Ve() {
89
+ const l = ht({
90
+ userConfig: g.config,
91
+ defaultConfig: _t
92
+ });
93
+ let o = {};
94
+ return l.theme ? o = {
95
+ ...ht({
96
+ userConfig: ll.vue_ui_donut[l.theme] || g.config,
97
+ defaultConfig: l
98
+ }),
99
+ customPalette: tl[l.theme] || ae
100
+ } : o = l, g.config && Ie(g.config, "events.datapointEnter") ? o.events.datapointEnter = g.config.events.datapointEnter : o.events.datapointEnter = null, g.config && Ie(g.config, "events.datapointLeave") ? o.events.datapointLeave = g.config.events.datapointLeave : o.events.datapointLeave = null, g.config && Ie(g.config, "events.datapointClick") ? o.events.datapointClick = g.config.events.datapointClick : o.events.datapointClick = null, o;
101
+ }
102
+ const e = f({
103
+ get: () => Ve(),
104
+ set: (l) => l
105
+ }), T = w(!0), B = W([]);
106
+ function Pt(l, o = 1e3, t = 50) {
107
+ return new Promise((a) => {
108
+ const i = l.length;
109
+ B.value = Array(i).fill(0);
110
+ let c = 0;
111
+ l.forEach(($, C) => {
112
+ setTimeout(() => {
113
+ const R = performance.now();
114
+ function X(ce) {
115
+ const pe = Math.min((ce - R) / o, 1), Dt = ct(pe);
116
+ B.value[C] = $ * Dt, B.value = [...B.value], pe < 1 ? requestAnimationFrame(X) : (B.value[C] = $, B.value = [...B.value], c += 1, c === i && a());
117
+ }
118
+ requestAnimationFrame(X);
119
+ }, C * t);
120
+ });
121
+ });
122
+ }
123
+ nt(async () => {
124
+ const l = g.dataset.map((o) => o.values.reduce((t, a) => t + a, 0));
125
+ e.value.startAnimation.show && await Pt(
126
+ l,
127
+ e.value.startAnimation.durationMs,
128
+ e.value.startAnimation.staggerMs
129
+ ), T.value = !1;
130
+ });
131
+ const { userOptionsVisible: we, setUserOptionsVisibility: De, keepUserOptionState: Be } = il({ config: e.value }), { svgRef: ve } = vl({ config: e.value.style.chart.title });
132
+ function Tt() {
133
+ De(!0);
134
+ }
135
+ function It() {
136
+ De(!1);
137
+ }
138
+ ut(() => g.config, (l) => {
139
+ e.value = Ve(), we.value = !e.value.userOptions.showOnChartHover, Ye(), ze.value += 1, Oe.value += 1, Ne.value += 1, y.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, y.value.showTable = e.value.table.show, y.value.showTooltip = e.value.style.chart.tooltip.show, n.value.height = e.value.style.chart.height, n.value.width = e.value.style.chart.width;
140
+ }, { deep: !0 });
141
+ const Ee = f(() => {
142
+ const { top: l, right: o, bottom: t, left: a } = e.value.style.chart.padding;
143
+ return {
144
+ css: `padding:${l}px ${o}px ${t}px ${a}px`,
145
+ top: l,
146
+ right: o,
147
+ bottom: t,
148
+ left: a
149
+ };
150
+ }), { isPrinting: Ge, isImaging: Re, generatePdf: We, generateImage: Ue } = rl({
151
+ elementId: `donut__${m.value}`,
152
+ fileName: e.value.style.chart.title.text || "vue-ui-donut",
153
+ options: e.value.userOptions.print
154
+ }), Mt = f(() => e.value.userOptions.show && !e.value.style.chart.title.text), je = f(() => qt(e.value.customPalette)), y = w({
155
+ dataLabels: {
156
+ show: e.value.style.chart.layout.labels.dataLabels.show
157
+ },
158
+ showTable: e.value.table.show,
159
+ showTooltip: e.value.style.chart.tooltip.show
160
+ }), n = w({
161
+ height: e.value.style.chart.height,
162
+ width: e.value.style.chart.width
163
+ }), Q = f(() => {
164
+ const l = e.value.style.chart.layout.donut.strokeWidth / 512, o = Math.min(n.value.width, n.value.height) * l, t = o > _.value ? _.value : o;
165
+ return Math.max(t, 3);
166
+ }), He = ft, E = f(() => g.dataset.map((l, o) => ({
167
+ name: l.name,
168
+ color: vt(l.color) || je.value[o] || ae[o] || ae[o % ae.length],
169
+ value: Jt(l.values.reduce((t, a) => t + a, 0)),
170
+ absoluteValues: l.values,
171
+ comment: l.comment || "",
172
+ patternIndex: o,
173
+ seriesIndex: o,
174
+ ghost: !1,
175
+ pattern: `pattern_${m.value}_${o}`
176
+ }))), F = W(E.value);
177
+ ut(() => E.value, (l) => F.value = l);
178
+ function At() {
179
+ return E.value.map((l) => ({
180
+ name: l.name,
181
+ color: l.color,
182
+ value: l.value
183
+ }));
184
+ }
185
+ const D = w([]), Z = w(!1);
186
+ function qe({ from: l, to: o, duration: t, onUpdate: a, onDone: i, easing: c = ct }) {
187
+ const $ = performance.now();
188
+ function C(R) {
189
+ const X = Math.min((R - $) / t, 1), ce = c(X), pe = l + (o - l) * ce;
190
+ a(pe, X), X < 1 ? requestAnimationFrame(C) : (a(o, 1), i && i());
191
+ }
192
+ requestAnimationFrame(C);
193
+ }
194
+ function Je(l) {
195
+ const o = E.value.find((i, c) => c === l);
196
+ let a = F.value.find((i, c) => c === l).value;
197
+ if (D.value.includes(l)) {
198
+ let c = function() {
199
+ F.value = F.value.map(
200
+ (C, R) => l === R ? { ...C, value: i } : C
201
+ );
202
+ }, $ = function() {
203
+ Z.value = !0, qe({
204
+ from: a,
205
+ to: i,
206
+ duration: e.value.serieToggleAnimation.durationMs,
207
+ onUpdate: (C, R) => {
208
+ F.value = F.value.map(
209
+ (X, ce) => l === ce ? { ...X, value: C } : X
210
+ );
211
+ },
212
+ onDone: () => {
213
+ c(), Z.value = !1;
214
+ }
215
+ });
216
+ };
217
+ D.value = D.value.filter((C) => C !== l);
218
+ const i = o.value;
219
+ e.value.serieToggleAnimation.show && e.value.type === "classic" ? $() : c();
220
+ } else if (D.value.length < E.value.length - 1) {
221
+ let i = function() {
222
+ D.value.push(l), F.value = F.value.map(
223
+ ($, C) => l === C ? { ...$, value: 0 } : $
224
+ );
225
+ }, c = function() {
226
+ Z.value = !0, qe({
227
+ from: a,
228
+ to: 0,
229
+ duration: e.value.serieToggleAnimation.durationMs,
230
+ onUpdate: ($, C) => {
231
+ F.value = F.value.map(
232
+ (R, X) => l === X ? { ...R, value: $ } : R
233
+ );
234
+ },
235
+ onDone: () => {
236
+ i(), Z.value = !1;
237
+ }
238
+ });
239
+ };
240
+ e.value.serieToggleAnimation.show && e.value.type === "classic" ? c() : i();
241
+ }
242
+ He("selectLegend", G.value.map((i) => ({
243
+ name: i.name,
244
+ color: i.color,
245
+ value: i.value
246
+ })));
247
+ }
248
+ const St = f(() => g.dataset.reduce((l, o) => l + o.values.reduce((t, a) => t + a, 0), 0)), G = f(() => {
249
+ if (T.value) {
250
+ const l = B.value.map((t, a) => ({
251
+ ...E.value[a],
252
+ value: t,
253
+ color: E.value[a].color,
254
+ ghost: !1
255
+ })), o = St.value - B.value.reduce((t, a) => t + a, 0);
256
+ return o > 0 && l.push({
257
+ name: "__ghost__",
258
+ value: o,
259
+ color: "transparent",
260
+ ghost: !0
261
+ }), l;
262
+ } else
263
+ return F.value.forEach((l, o) => {
264
+ if ([null, void 0].includes(l.values))
265
+ return {
266
+ ...l,
267
+ values: []
268
+ };
269
+ }), F.value.map((l, o) => ({
270
+ ...l,
271
+ seriesIndex: o
272
+ })).filter((l, o) => !D.value.includes(o));
273
+ }), Ke = f(() => g.dataset.map((l, o) => ({
274
+ name: l.name,
275
+ color: vt(l.color) || je.value[o] || ae[o] || ae[o % ae.length],
276
+ value: (l.values || []).reduce((t, a) => t + a, 0),
277
+ shape: "circle",
278
+ patternIndex: o
279
+ })).map((l, o) => ({
280
+ ...l,
281
+ proportion: l.value / g.dataset.map((t) => (t.values || []).reduce((a, i) => a + i, 0)).reduce((t, a) => t + a, 0),
282
+ opacity: D.value.includes(o) ? 0.5 : 1,
283
+ segregate: () => !Z.value && Je(o),
284
+ isSegregated: D.value.includes(o)
285
+ }))), Lt = f(() => ({
286
+ cy: "donut-div-legend",
287
+ backgroundColor: e.value.style.chart.legend.backgroundColor,
288
+ color: e.value.style.chart.legend.color,
289
+ fontSize: e.value.style.chart.legend.fontSize,
290
+ paddingBottom: 12,
291
+ fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
292
+ })), _ = f(() => {
293
+ const l = Math.min(n.value.width / 3, n.value.height / 3);
294
+ return l < 55 ? 55 : l;
295
+ }), I = f(() => dt({ series: G.value }, n.value.width / 2, n.value.height / 2, _.value, _.value, 1.99999, 2, 1, 360, 105.25, Q.value)), Ft = f(() => Math.abs(G.value.map((l) => l.value).reduce((l, o) => l + o, 0)) > 0), zt = f(() => dt({
296
+ series: [
297
+ {
298
+ value: 1,
299
+ color: e.value.style.chart.layout.donut.emptyFill,
300
+ name: "_",
301
+ seriesIndex: 0,
302
+ patternIndex: -1,
303
+ ghost: !1,
304
+ absoluteValues: [1]
305
+ }
306
+ ]
307
+ }, n.value.width / 2, n.value.height / 2, _.value, _.value, 1.99999, 2, 1, 360, 105.25, Q.value)), N = f(() => I.value.filter((l) => !l.ghost)), d = f(() => {
308
+ const l = Math.max(...G.value.map((t) => t.value)), o = G.value.map((t) => t.value / l);
309
+ return Kt({
310
+ series: o,
311
+ center: {
312
+ x: n.value.width / 2,
313
+ y: n.value.height / 2
314
+ },
315
+ maxRadius: Math.min(n.value.width, n.value.height) / 3,
316
+ hasGhost: T.value
317
+ });
318
+ });
319
+ function se(l) {
320
+ return l.x > n.value.width / 2 + 6 ? "start" : l.x < n.value.width / 2 - 6 ? "end" : "middle";
321
+ }
322
+ function Ot(l) {
323
+ return l.middlePoint.y > n.value.height / 2 ? L({ initX: l.middlePoint.x, initY: l.middlePoint.y, offset: 100, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y : L({ initX: l.middlePoint.x, initY: l.middlePoint.y, offset: 0, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y - 100;
324
+ }
325
+ function Y(l) {
326
+ return l.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
327
+ }
328
+ function ke(l, o) {
329
+ const t = l.value / Nt(o);
330
+ return isNaN(t) ? 0 : V(
331
+ e.value.style.chart.layout.labels.percentage.formatter,
332
+ t * 100,
333
+ z({
334
+ v: t * 100,
335
+ s: "%",
336
+ r: e.value.style.chart.layout.labels.percentage.rounding
337
+ }),
338
+ { datapoint: l }
339
+ );
340
+ }
341
+ function Nt(l) {
342
+ return [...l].map((o) => o.value).reduce((o, t) => o + t, 0);
343
+ }
344
+ const S = f(() => G.value.map((l) => l.value).reduce((l, o) => l + o, 0)), Qe = f(() => S.value / G.value.length), Ze = f(() => (l) => Z.value ? l.proportion * 100 : l.value / S.value * 100), xe = w(null), de = w(!1);
345
+ function H({ datapoint: l, seriesIndex: o }) {
346
+ e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: l, seriesIndex: o }), me.value = !1, O.value = null;
347
+ }
348
+ function q({ datapoint: l, relativeIndex: o, seriesIndex: t, show: a = !1 }) {
349
+ e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: l, seriesIndex: t }), xe.value = { datapoint: l, seriesIndex: t, config: e.value, series: E.value }, me.value = a, O.value = o;
350
+ let i = "";
351
+ const c = e.value.style.chart.tooltip.customFormat;
352
+ if (de.value = !1, sl(c))
353
+ try {
354
+ const $ = c({
355
+ seriesIndex: t,
356
+ datapoint: l,
357
+ series: E.value,
358
+ config: e.value
359
+ });
360
+ typeof $ == "string" && (be.value = $, de.value = !0);
361
+ } catch {
362
+ console.warn("Custom format cannot be applied."), de.value = !1;
363
+ }
364
+ if (!de.value) {
365
+ if (i += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`, i += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${l.color}"/>${$t.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${m.value}_${t})"/>` : ""}</svg>`, e.value.style.chart.tooltip.showValue && (i += `<b>${V(
366
+ e.value.style.chart.layout.labels.value.formatter,
367
+ l.value,
368
+ z({
369
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
370
+ v: l.value,
371
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
372
+ r: e.value.style.chart.tooltip.roundingValue
373
+ }),
374
+ {
375
+ datapoint: l,
376
+ relativeIndex: o,
377
+ seriesIndex: t
378
+ }
379
+ )}</b>`), e.value.style.chart.tooltip.showPercentage) {
380
+ const $ = V(
381
+ e.value.style.chart.layout.labels.percentage.formatter,
382
+ l.proportion * 100,
383
+ z({
384
+ v: l.proportion * 100,
385
+ s: "%",
386
+ r: e.value.style.chart.tooltip.roundingPercentage
387
+ }),
388
+ {
389
+ datapoint: l,
390
+ relativeIndex: o,
391
+ seriesIndex: t
392
+ }
393
+ );
394
+ e.value.style.chart.tooltip.showValue ? i += `<span>(${$})</span></div>` : i += `<b>${$}</b></div>`;
395
+ }
396
+ e.value.style.chart.comments.showInTooltip && l.comment && (i += `<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${l.color}">${l.comment}</div>`), be.value = `<div>${i}</div>`;
397
+ }
398
+ }
399
+ function ee(l) {
400
+ return e.value.useBlurOnHover && ![null, void 0].includes(O.value) && O.value !== l ? `url(#blur_${m.value})` : "";
401
+ }
402
+ const J = f(() => {
403
+ const l = G.value.map((t) => ({
404
+ name: t.name,
405
+ color: t.color
406
+ })), o = G.value.map((t) => t.value);
407
+ return { head: l, body: o };
408
+ });
409
+ function et(l = null) {
410
+ Rt(() => {
411
+ const o = J.value.head.map((i, c) => [[
412
+ i.name
413
+ ], [J.value.body[c]], [isNaN(J.value.body[c] / S.value) ? "-" : J.value.body[c] / S.value * 100]]), t = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), a = al(t);
414
+ l ? l(a) : ol({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-donut" });
415
+ });
416
+ }
417
+ const ye = f(() => {
418
+ const l = [
419
+ ' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',
420
+ z({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: S.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
421
+ "100%"
422
+ ], o = J.value.head.map((i, c) => [
423
+ {
424
+ color: i.color,
425
+ name: i.name
426
+ },
427
+ J.value.body[c],
428
+ isNaN(J.value.body[c] / S.value) ? "-" : (J.value.body[c] / S.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
429
+ ]), t = {
430
+ th: {
431
+ backgroundColor: e.value.table.th.backgroundColor,
432
+ color: e.value.table.th.color,
433
+ outline: e.value.table.th.outline
434
+ },
435
+ td: {
436
+ backgroundColor: e.value.table.td.backgroundColor,
437
+ color: e.value.table.td.color,
438
+ outline: e.value.table.td.outline
439
+ },
440
+ breakpoint: e.value.table.responsiveBreakpoint
441
+ };
442
+ return {
443
+ colNames: [
444
+ e.value.table.columnNames.series,
445
+ e.value.table.columnNames.value,
446
+ e.value.table.columnNames.percentage
447
+ ],
448
+ head: l,
449
+ body: o,
450
+ config: t
451
+ };
452
+ }), ne = w(!1);
453
+ function tt(l) {
454
+ ne.value = l, Xe.value += 1;
455
+ }
456
+ const lt = f(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent));
457
+ function Yt(l) {
458
+ return l.toFixed(e.value.style.chart.legend.roundingPercentage).split("").map((o) => "-").join("");
459
+ }
460
+ function K(l, o) {
461
+ e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: l.seriesIndex }), He("selectDatapoint", { datapoint: l, index: o });
462
+ }
463
+ function at() {
464
+ y.value.showTable = !y.value.showTable;
465
+ }
466
+ function ot() {
467
+ y.value.dataLabels.show = !y.value.dataLabels.show;
468
+ }
469
+ function st() {
470
+ y.value.showTooltip = !y.value.showTooltip;
471
+ }
472
+ const fe = w(!1);
473
+ function _e() {
474
+ fe.value = !fe.value;
475
+ }
476
+ async function Xt({ scale: l = 2 } = {}) {
477
+ if (!U.value) return;
478
+ const { width: o, height: t } = U.value.getBoundingClientRect(), a = o / t, { imageUri: i, base64: c } = await yl({ domElement: U.value, base64: !0, img: !0, scale: l });
479
+ return {
480
+ imageUri: i,
481
+ base64: c,
482
+ title: e.value.style.chart.title.text,
483
+ width: o,
484
+ height: t,
485
+ aspectRatio: a
486
+ };
487
+ }
488
+ const $e = w(null);
489
+ function Vt() {
490
+ if (!$e.value) return;
491
+ const { x: l, y: o, width: t, height: a } = $e.value.getBBox();
492
+ ve.value && ve.value.setAttribute("viewBox", `${l} ${o} ${t + Math.min(0, l)} ${a + Math.min(0, o)}`);
493
+ }
494
+ return yt({
495
+ autoSize: Vt,
496
+ getData: At,
497
+ getImage: Xt,
498
+ generatePdf: We,
499
+ generateCsv: et,
500
+ generateImage: Ue,
501
+ toggleTable: at,
502
+ toggleLabels: ot,
503
+ toggleTooltip: st,
504
+ toggleAnnotator: _e,
505
+ toggleFullscreen: tt
506
+ }), (l, o) => (s(), u("div", {
507
+ ref_key: "donutChart",
508
+ ref: U,
509
+ class: Ce(`vue-ui-donut ${ne.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
510
+ style: k(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height:100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
511
+ id: `donut__${m.value}`,
512
+ onMouseenter: Tt,
513
+ onMouseleave: It
514
+ }, [
515
+ e.value.userOptions.buttons.annotator && r(ve) ? (s(), le(r(bt), {
516
+ key: 0,
517
+ color: e.value.style.chart.color,
518
+ backgroundColor: e.value.style.chart.backgroundColor,
519
+ active: fe.value,
520
+ svgRef: r(ve),
521
+ onClose: _e
522
+ }, null, 8, ["color", "backgroundColor", "active", "svgRef"])) : v("", !0),
523
+ b(l.$slots, "userConfig", {}, void 0, !0),
524
+ Mt.value ? (s(), u("div", {
525
+ key: 1,
526
+ ref_key: "noTitle",
527
+ ref: Fe,
528
+ class: "vue-data-ui-no-title-space",
529
+ style: "height:36px; width: 100%;background:transparent"
530
+ }, null, 512)) : v("", !0),
531
+ e.value.style.chart.title.text ? (s(), u("div", {
532
+ key: 2,
533
+ ref_key: "chartTitle",
534
+ ref: Ae,
535
+ style: "width:100%;background:transparent;padding-bottom:24px"
536
+ }, [
537
+ (s(), le(cl, {
538
+ key: `title_${ze.value}`,
539
+ config: {
540
+ title: {
541
+ cy: "donut-div-title",
542
+ ...e.value.style.chart.title
543
+ },
544
+ subtitle: {
545
+ cy: "donut-div-subtitle",
546
+ ...e.value.style.chart.title.subtitle
547
+ }
548
+ }
549
+ }, null, 8, ["config"]))
550
+ ], 512)) : v("", !0),
551
+ e.value.userOptions.show && ie.value && (r(Be) || r(we)) ? (s(), le(r(xt), {
552
+ ref_key: "details",
553
+ ref: Ct,
554
+ key: `user_option_${Xe.value}`,
555
+ backgroundColor: e.value.style.chart.backgroundColor,
556
+ color: e.value.style.chart.color,
557
+ isPrinting: r(Ge),
558
+ isImaging: r(Re),
559
+ uid: m.value,
560
+ hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
561
+ hasPdf: e.value.userOptions.buttons.pdf,
562
+ hasImg: e.value.userOptions.buttons.img,
563
+ hasXls: e.value.userOptions.buttons.csv,
564
+ hasTable: e.value.userOptions.buttons.table,
565
+ hasLabel: e.value.userOptions.buttons.labels,
566
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
567
+ isFullscreen: ne.value,
568
+ chartElement: U.value,
569
+ position: e.value.userOptions.position,
570
+ callbacks: e.value.userOptions.callbacks,
571
+ isTooltip: y.value.showTooltip,
572
+ titles: { ...e.value.userOptions.buttonTitles },
573
+ hasAnnotator: e.value.userOptions.buttons.annotator,
574
+ isAnnotation: fe.value,
575
+ printScale: e.value.userOptions.print.scale,
576
+ onToggleFullscreen: tt,
577
+ onGeneratePdf: r(We),
578
+ onGenerateCsv: et,
579
+ onGenerateImage: r(Ue),
580
+ onToggleTable: at,
581
+ onToggleLabels: ot,
582
+ onToggleTooltip: st,
583
+ onToggleAnnotator: _e,
584
+ style: k({
585
+ visibility: r(Be) ? r(we) ? "visible" : "hidden" : "visible"
586
+ })
587
+ }, rt({ _: 2 }, [
588
+ l.$slots.menuIcon ? {
589
+ name: "menuIcon",
590
+ fn: P(({ isOpen: t, color: a }) => [
591
+ b(l.$slots, "menuIcon", ue(re({ isOpen: t, color: a })), void 0, !0)
592
+ ]),
593
+ key: "0"
594
+ } : void 0,
595
+ l.$slots.optionTooltip ? {
596
+ name: "optionTooltip",
597
+ fn: P(() => [
598
+ b(l.$slots, "optionTooltip", {}, void 0, !0)
599
+ ]),
600
+ key: "1"
601
+ } : void 0,
602
+ l.$slots.optionPdf ? {
603
+ name: "optionPdf",
604
+ fn: P(() => [
605
+ b(l.$slots, "optionPdf", {}, void 0, !0)
606
+ ]),
607
+ key: "2"
608
+ } : void 0,
609
+ l.$slots.optionCsv ? {
610
+ name: "optionCsv",
611
+ fn: P(() => [
612
+ b(l.$slots, "optionCsv", {}, void 0, !0)
613
+ ]),
614
+ key: "3"
615
+ } : void 0,
616
+ l.$slots.optionImg ? {
617
+ name: "optionImg",
618
+ fn: P(() => [
619
+ b(l.$slots, "optionImg", {}, void 0, !0)
620
+ ]),
621
+ key: "4"
622
+ } : void 0,
623
+ l.$slots.optionTable ? {
624
+ name: "optionTable",
625
+ fn: P(() => [
626
+ b(l.$slots, "optionTable", {}, void 0, !0)
627
+ ]),
628
+ key: "5"
629
+ } : void 0,
630
+ l.$slots.optionLabels ? {
631
+ name: "optionLabels",
632
+ fn: P(() => [
633
+ b(l.$slots, "optionLabels", {}, void 0, !0)
634
+ ]),
635
+ key: "6"
636
+ } : void 0,
637
+ l.$slots.optionFullscreen ? {
638
+ name: "optionFullscreen",
639
+ fn: P(({ toggleFullscreen: t, isFullscreen: a }) => [
640
+ b(l.$slots, "optionFullscreen", ue(re({ toggleFullscreen: t, isFullscreen: a })), void 0, !0)
641
+ ]),
642
+ key: "7"
643
+ } : void 0,
644
+ l.$slots.optionAnnotator ? {
645
+ name: "optionAnnotator",
646
+ fn: P(({ toggleAnnotator: t, isAnnotator: a }) => [
647
+ b(l.$slots, "optionAnnotator", ue(re({ toggleAnnotator: t, isAnnotator: a })), void 0, !0)
648
+ ]),
649
+ key: "8"
650
+ } : void 0
651
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "chartElement", "position", "callbacks", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : v("", !0),
652
+ ie.value ? (s(), u("svg", {
653
+ key: 4,
654
+ ref_key: "svgRef",
655
+ ref: ve,
656
+ xmlns: r(Qt),
657
+ class: Ce({ "vue-data-ui-fullscreen--on": ne.value, "vue-data-ui-fulscreen--off": !ne.value, "vue-data-ui-svg": !0 }),
658
+ viewBox: `0 0 ${n.value.width <= 0 ? 10 : n.value.width} ${n.value.height <= 0 ? 10 : n.value.height}`,
659
+ style: k(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};${Ee.value.css}`)
660
+ }, [
661
+ h("g", {
662
+ ref_key: "G",
663
+ ref: $e,
664
+ class: "vue-data-ui-g"
665
+ }, [
666
+ Pe(r(mt)),
667
+ l.$slots["chart-background"] ? (s(), u("foreignObject", {
668
+ key: 0,
669
+ x: 0,
670
+ y: 0,
671
+ width: n.value.width <= 0 ? 10 : n.value.width,
672
+ height: n.value.height <= 0 ? 10 : n.value.height,
673
+ style: {
674
+ pointerEvents: "none"
675
+ }
676
+ }, [
677
+ b(l.$slots, "chart-background", {}, void 0, !0)
678
+ ], 8, ml)) : v("", !0),
679
+ e.value.type === "classic" && !isNaN(Q.value / _.value) ? (s(), u("defs", bl, [
680
+ e.value.style.chart.useGradient ? (s(), u("radialGradient", {
681
+ key: 0,
682
+ id: `gradient_${m.value}`
683
+ }, [
684
+ h("stop", {
685
+ offset: "0%",
686
+ "stop-color": r(ge)(e.value.style.chart.backgroundColor, 0),
687
+ "stop-opacity": "0"
688
+ }, null, 8, kl),
689
+ h("stop", {
690
+ offset: `${(1 - Q.value / _.value) * 100}%`,
691
+ "stop-color": r(ge)("#FFFFFF", 0),
692
+ "stop-opacity": "0"
693
+ }, null, 8, xl),
694
+ h("stop", {
695
+ offset: `${(1 - Q.value / _.value / 2) * 100}%`,
696
+ "stop-color": r(ge)("#FFFFFF", e.value.style.chart.gradientIntensity)
697
+ }, null, 8, _l),
698
+ h("stop", {
699
+ offset: "100%",
700
+ "stop-color": r(ge)(e.value.style.chart.backgroundColor, 0),
701
+ "stop-opacity": "0"
702
+ }, null, 8, $l)
703
+ ], 8, wl)) : v("", !0)
704
+ ])) : v("", !0),
705
+ e.value.type === "polar" ? (s(), u("defs", Cl, [
706
+ (s(!0), u(p, null, A(d.value, (t, a) => (s(), u("radialGradient", {
707
+ id: `polar_gradient_${a}_${m.value}`,
708
+ cx: (isNaN(t.middlePoint.x / n.value.width * 100) ? 0 : t.middlePoint.x / n.value.width * 100) + "%",
709
+ cy: (isNaN(t.middlePoint.y / n.value.height * 100) ? 0 : t.middlePoint.y / n.value.height * 100) + "%",
710
+ r: "62%"
711
+ }, [
712
+ h("stop", {
713
+ offset: "0%",
714
+ "stop-color": r(Zt)(I.value[a].color, 0.05),
715
+ "stop-opacity": e.value.style.chart.gradientIntensity / 100
716
+ }, null, 8, Tl),
717
+ h("stop", {
718
+ offset: "100%",
719
+ "stop-color": I.value[a].color
720
+ }, null, 8, Il)
721
+ ], 8, Pl))), 256))
722
+ ])) : v("", !0),
723
+ h("defs", null, [
724
+ h("filter", {
725
+ id: `blur_${m.value}`,
726
+ x: "-50%",
727
+ y: "-50%",
728
+ width: "200%",
729
+ height: "200%"
730
+ }, [
731
+ h("feGaussianBlur", {
732
+ in: "SourceGraphic",
733
+ stdDeviation: 2,
734
+ id: `blur_std_${m.value}`
735
+ }, null, 8, Al),
736
+ o[5] || (o[5] = h("feColorMatrix", {
737
+ type: "saturate",
738
+ values: "0"
739
+ }, null, -1))
740
+ ], 8, Ml),
741
+ h("filter", {
742
+ id: `shadow_${m.value}`,
743
+ "color-interpolation-filters": "sRGB"
744
+ }, [
745
+ h("feDropShadow", {
746
+ dx: "0",
747
+ dy: "0",
748
+ stdDeviation: "10",
749
+ "flood-opacity": "0.5",
750
+ "flood-color": e.value.style.chart.layout.donut.shadowColor
751
+ }, null, 8, Ll)
752
+ ], 8, Sl),
753
+ h("filter", {
754
+ id: `drop_shadow_${m.value}`,
755
+ "color-interpolation-filters": "sRGB",
756
+ x: "-50%",
757
+ y: "-50%",
758
+ width: "200%",
759
+ height: "200%"
760
+ }, [
761
+ h("feDropShadow", {
762
+ dx: "0",
763
+ dy: "0",
764
+ stdDeviation: "3",
765
+ "flood-opacity": "1",
766
+ "flood-color": e.value.style.chart.layout.donut.shadowColor
767
+ }, null, 8, zl)
768
+ ], 8, Fl)
769
+ ]),
770
+ e.value.type === "classic" ? (s(!0), u(p, { key: 3 }, A(I.value.filter((t) => !t.ghost), (t, a) => (s(), u("g", null, [
771
+ Y(t) && y.value.dataLabels.show ? (s(), u("path", {
772
+ key: 0,
773
+ d: r(el)(t, { x: n.value.width / 2, y: n.value.height / 2 }, 16, 16, !1, !1, Q.value, 12, e.value.style.chart.layout.curvedMarkers),
774
+ stroke: t.color,
775
+ "stroke-width": "1",
776
+ "stroke-linecap": "round",
777
+ "stroke-linejoin": "round",
778
+ fill: "none",
779
+ filter: ee(a)
780
+ }, null, 8, Ol)) : v("", !0)
781
+ ]))), 256)) : v("", !0),
782
+ e.value.type === "polar" ? (s(!0), u(p, { key: 4 }, A(I.value.filter((t) => !t.ghost), (t, a) => (s(), u("g", null, [
783
+ Y(t) && y.value.dataLabels.show ? (s(), u("path", {
784
+ key: 0,
785
+ d: `M ${r(L)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x},${r(L)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y} ${d.value[a].middlePoint.x},${d.value[a].middlePoint.y}`,
786
+ stroke: t.color,
787
+ "stroke-width": "1",
788
+ "stroke-linecap": "round",
789
+ "stroke-linejoin": "round",
790
+ fill: "none",
791
+ filter: ee(a),
792
+ style: k({
793
+ transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
794
+ })
795
+ }, null, 12, Nl)) : v("", !0)
796
+ ]))), 256)) : v("", !0),
797
+ e.value.type === "classic" && e.value.style.chart.layout.donut.useShadow ? (s(), u("circle", {
798
+ key: 5,
799
+ cx: n.value.width / 2,
800
+ cy: n.value.height / 2,
801
+ r: _.value <= 0 ? 10 : _.value,
802
+ fill: e.value.style.chart.backgroundColor,
803
+ filter: `url(#shadow_${m.value})`
804
+ }, null, 8, Yl)) : v("", !0),
805
+ l.$slots.pattern ? (s(), u("g", Xl, [
806
+ (s(!0), u(p, null, A(Me.dataset, (t, a) => (s(), u("defs", {
807
+ key: `pattern-${t.patternIndex}`
808
+ }, [
809
+ b(l.$slots, "pattern", it({ ref_for: !0 }, { seriesIndex: a, patternId: `pattern_${m.value}_${a}` }), void 0, !0)
810
+ ]))), 128))
811
+ ])) : v("", !0),
812
+ S.value && e.value.type === "classic" ? (s(), u(p, { key: 7 }, [
813
+ (s(!0), u(p, null, A(N.value, (t, a) => (s(), u("path", {
814
+ stroke: e.value.style.chart.backgroundColor,
815
+ d: t.arcSlice,
816
+ fill: "#FFFFFF"
817
+ }, null, 8, Vl))), 256)),
818
+ (s(!0), u(p, null, A(N.value, (t, a) => (s(), u("path", {
819
+ class: "vue-ui-donut-arc-path",
820
+ d: t.arcSlice,
821
+ fill: t.color,
822
+ stroke: e.value.style.chart.backgroundColor,
823
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
824
+ filter: ee(a)
825
+ }, null, 8, Dl))), 256)),
826
+ l.$slots.pattern ? (s(), u("g", Bl, [
827
+ (s(!0), u(p, null, A(N.value, (t, a) => (s(), u("path", {
828
+ class: "vue-ui-donut-arc-path",
829
+ d: t.arcSlice,
830
+ fill: `url(#${t.pattern})`,
831
+ stroke: e.value.style.chart.backgroundColor,
832
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
833
+ filter: ee(a)
834
+ }, null, 8, El))), 256))
835
+ ])) : v("", !0)
836
+ ], 64)) : v("", !0),
837
+ S.value && e.value.type === "polar" ? (s(), u(p, { key: 8 }, [
838
+ I.value.length > 1 ? (s(), u("g", Gl, [
839
+ (s(!0), u(p, null, A(N.value, (t, a) => (s(), u("path", {
840
+ stroke: e.value.style.chart.backgroundColor,
841
+ d: d.value[a].path,
842
+ fill: "#FFFFFF",
843
+ style: k({
844
+ transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
845
+ })
846
+ }, null, 12, Rl))), 256)),
847
+ e.value.style.chart.layout.donut.useShadow ? (s(), u("g", Wl, [
848
+ (s(!0), u(p, null, A(N.value, (t, a) => (s(), u("path", {
849
+ class: "vue-ui-donut-arc-path",
850
+ d: d.value[a].path,
851
+ fill: "transparent",
852
+ stroke: e.value.style.chart.backgroundColor,
853
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
854
+ filter: `url(#drop_shadow_${m.value})`,
855
+ style: k({
856
+ transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
857
+ })
858
+ }, null, 12, Ul))), 256))
859
+ ])) : v("", !0),
860
+ l.$slots.pattern ? (s(), u("g", jl, [
861
+ (s(!0), u(p, null, A(N.value, (t, a) => (s(), u("path", {
862
+ class: "vue-ui-donut-arc-path",
863
+ d: d.value[a].path,
864
+ fill: `url(#${t.pattern})`,
865
+ stroke: e.value.style.chart.backgroundColor,
866
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
867
+ filter: ee(a),
868
+ style: k({
869
+ transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
870
+ })
871
+ }, null, 12, Hl))), 256))
872
+ ])) : v("", !0),
873
+ (s(!0), u(p, null, A(N.value, (t, a) => (s(), u("path", {
874
+ class: "vue-ui-donut-arc-path",
875
+ d: d.value[a].path,
876
+ fill: e.value.style.chart.useGradient ? `url(#polar_gradient_${a}_${m.value})` : t.color,
877
+ stroke: e.value.style.chart.backgroundColor,
878
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
879
+ filter: ee(a),
880
+ style: k({
881
+ transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
882
+ })
883
+ }, null, 12, ql))), 256))
884
+ ])) : (s(), u("g", Jl, [
885
+ l.$slots.pattern ? (s(), u("circle", {
886
+ key: 0,
887
+ cx: n.value.width / 2,
888
+ cy: n.value.height / 2,
889
+ r: _.value,
890
+ fill: `url(#pattern_${m.value}_${I.value[0].patternIndex})`,
891
+ stroke: e.value.style.chart.backgroundColor,
892
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth
893
+ }, null, 8, Kl)) : v("", !0),
894
+ h("circle", {
895
+ cx: n.value.width / 2,
896
+ cy: n.value.height / 2,
897
+ r: _.value,
898
+ fill: e.value.style.chart.useGradient ? `url(#polar_gradient_0_${m.value})` : I.value[0].color,
899
+ stroke: e.value.style.chart.backgroundColor,
900
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth
901
+ }, null, 8, Ql)
902
+ ]))
903
+ ], 64)) : (s(), u(p, { key: 9 }, [
904
+ e.value.type === "classic" && !Ft.value ? (s(), u("g", Zl, [
905
+ (s(!0), u(p, null, A(zt.value, (t, a) => (s(), u("path", {
906
+ class: "vue-ui-donut-arc-path",
907
+ d: t.arcSlice,
908
+ fill: t.color,
909
+ stroke: e.value.style.chart.backgroundColor,
910
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth
911
+ }, null, 8, ea))), 256))
912
+ ])) : v("", !0),
913
+ h("circle", {
914
+ cx: n.value.width / 2,
915
+ cy: n.value.height / 2,
916
+ r: _.value <= 0 ? 10 : _.value,
917
+ fill: "transparent",
918
+ stroke: e.value.style.chart.backgroundColor
919
+ }, null, 8, ta)
920
+ ], 64)),
921
+ e.value.style.chart.useGradient && e.value.type === "classic" ? (s(), u("circle", {
922
+ key: 10,
923
+ cx: n.value.width / 2,
924
+ cy: n.value.height / 2,
925
+ r: (
926
+ /* This might require adjustments */
927
+ _.value <= 0 ? 10 : _.value
928
+ ),
929
+ fill: `url(#gradient_${m.value})`
930
+ }, null, 8, la)) : v("", !0),
931
+ S.value ? (s(), u(p, { key: 11 }, [
932
+ I.value.length > 1 || e.value.type === "classic" ? (s(), u("g", aa, [
933
+ (s(!0), u(p, null, A(I.value.filter((t) => !t.ghost), (t, a) => (s(), u("path", {
934
+ d: e.value.type === "classic" ? t.arcSlice : d.value[a].path,
935
+ fill: O.value === a ? e.value.style.chart.layout.donut.selectedColor : "transparent",
936
+ onMouseenter: (i) => q({
937
+ datapoint: t,
938
+ relativeIndex: a,
939
+ seriesIndex: t.seriesIndex,
940
+ show: !0
941
+ }),
942
+ onMouseleave: (i) => H({ datapoint: t, seriesIndex: t.seriesIndex }),
943
+ onClick: (i) => K(t, a)
944
+ }, null, 40, oa))), 256))
945
+ ])) : (s(), u("g", sa, [
946
+ h("circle", {
947
+ cx: n.value.width / 2,
948
+ cy: n.value.height / 2,
949
+ r: _.value,
950
+ fill: "transparent",
951
+ onMouseenter: o[0] || (o[0] = (t) => q({
952
+ datapoint: I.value[0],
953
+ relativeIndex: 0,
954
+ seriesIndex: I.value[0].seriesIndex,
955
+ show: !0
956
+ })),
957
+ onMouseleave: o[1] || (o[1] = (t) => H({ datapoint: I.value[0], seriesIndex: I.value[0].seriesIndex })),
958
+ onClick: o[2] || (o[2] = (t) => K(I.value[0], l.i))
959
+ }, null, 40, na)
960
+ ]))
961
+ ], 64)) : v("", !0),
962
+ e.value.type === "classic" ? (s(), u(p, { key: 12 }, [
963
+ e.value.style.chart.layout.labels.hollow.total.show ? (s(), u("text", {
964
+ key: 0,
965
+ "text-anchor": "middle",
966
+ x: n.value.width / 2,
967
+ y: n.value.height / 2 - (e.value.style.chart.layout.labels.hollow.average.show ? e.value.style.chart.layout.labels.hollow.total.fontSize : 0) + e.value.style.chart.layout.labels.hollow.total.offsetY,
968
+ fill: e.value.style.chart.layout.labels.hollow.total.color,
969
+ "font-size": e.value.style.chart.layout.labels.hollow.total.fontSize,
970
+ style: k(`font-weight:${e.value.style.chart.layout.labels.hollow.total.bold ? "bold" : ""}`)
971
+ }, M(e.value.style.chart.layout.labels.hollow.total.text), 13, ua)) : v("", !0),
972
+ e.value.style.chart.layout.labels.hollow.total.show ? (s(), u("text", {
973
+ key: 1,
974
+ "text-anchor": "middle",
975
+ x: n.value.width / 2,
976
+ y: n.value.height / 2 + e.value.style.chart.layout.labels.hollow.total.fontSize - (e.value.style.chart.layout.labels.hollow.average.show ? e.value.style.chart.layout.labels.hollow.total.fontSize : 0) + e.value.style.chart.layout.labels.hollow.total.value.offsetY,
977
+ fill: e.value.style.chart.layout.labels.hollow.total.value.color,
978
+ "font-size": e.value.style.chart.layout.labels.hollow.total.value.fontSize,
979
+ style: k(`font-weight:${e.value.style.chart.layout.labels.hollow.total.value.bold ? "bold" : ""}`)
980
+ }, M(r(V)(
981
+ e.value.style.chart.layout.labels.hollow.total.value.formatter,
982
+ S.value,
983
+ r(z)({
984
+ p: e.value.style.chart.layout.labels.hollow.total.value.prefix,
985
+ v: S.value,
986
+ s: e.value.style.chart.layout.labels.hollow.total.value.suffix
987
+ })
988
+ )), 13, ra)) : v("", !0),
989
+ e.value.style.chart.layout.labels.hollow.average.show ? (s(), u("text", {
990
+ key: 2,
991
+ "text-anchor": "middle",
992
+ x: n.value.width / 2,
993
+ y: n.value.height / 2 + (e.value.style.chart.layout.labels.hollow.total.show ? e.value.style.chart.layout.labels.hollow.average.fontSize : 0) + e.value.style.chart.layout.labels.hollow.average.offsetY,
994
+ fill: e.value.style.chart.layout.labels.hollow.average.color,
995
+ "font-size": e.value.style.chart.layout.labels.hollow.average.fontSize,
996
+ style: k(`font-weight:${e.value.style.chart.layout.labels.hollow.average.bold ? "bold" : ""}`)
997
+ }, M(e.value.style.chart.layout.labels.hollow.average.text), 13, ia)) : v("", !0),
998
+ e.value.style.chart.layout.labels.hollow.average.show ? (s(), u("text", {
999
+ key: 3,
1000
+ "text-anchor": "middle",
1001
+ x: n.value.width / 2,
1002
+ y: n.value.height / 2 + (e.value.style.chart.layout.labels.hollow.total.show ? e.value.style.chart.layout.labels.hollow.average.fontSize : 0) + e.value.style.chart.layout.labels.hollow.average.fontSize + e.value.style.chart.layout.labels.hollow.average.value.offsetY,
1003
+ fill: e.value.style.chart.layout.labels.hollow.average.value.color,
1004
+ "font-size": e.value.style.chart.layout.labels.hollow.average.value.fontSize,
1005
+ style: k(`font-weight:${e.value.style.chart.layout.labels.hollow.average.value.bold ? "bold" : ""}`)
1006
+ }, M(Z.value || T.value ? "--" : r(V)(
1007
+ e.value.style.chart.layout.labels.hollow.average.value.formatter,
1008
+ Qe.value,
1009
+ r(z)({
1010
+ p: e.value.style.chart.layout.labels.hollow.average.value.prefix,
1011
+ v: Qe.value,
1012
+ s: e.value.style.chart.layout.labels.hollow.average.value.suffix,
1013
+ r: e.value.style.chart.layout.labels.hollow.average.value.rounding
1014
+ })
1015
+ )), 13, va)) : v("", !0)
1016
+ ], 64)) : v("", !0),
1017
+ (s(!0), u(p, null, A(N.value.filter((t) => !t.ghost), (t, a) => (s(), u("g", {
1018
+ filter: ee(a),
1019
+ class: Ce({ animated: e.value.useCssAnimation })
1020
+ }, [
1021
+ e.value.style.chart.layout.labels.dataLabels.useLabelSlots ? (s(), u("g", ca, [
1022
+ (s(), u("foreignObject", {
1023
+ x: r(x)(t, !0).anchor === "end" ? r(x)(t).x - 120 : r(x)(t, !0).anchor === "middle" ? r(x)(t).x - 60 : r(x)(t).x,
1024
+ y: r(he)(t) - (lt.value ? 20 : 0),
1025
+ width: "120",
1026
+ height: "60",
1027
+ style: { overflow: "visible" }
1028
+ }, [
1029
+ h("div", null, [
1030
+ b(l.$slots, "dataLabel", it({ ref_for: !0 }, {
1031
+ datapoint: t,
1032
+ isBlur: !e.value.useBlurOnHover || [null, void 0].includes(O.value) || O.value === a,
1033
+ isSafari: lt.value,
1034
+ isVisible: Y(t) && y.value.dataLabels.show,
1035
+ textAlign: r(x)(t, !0, 16, !0).anchor,
1036
+ flexAlign: r(x)(t, !0, 16).anchor,
1037
+ percentage: ke(t, N.value)
1038
+ }), void 0, !0)
1039
+ ])
1040
+ ], 8, ha))
1041
+ ])) : (s(), u("g", ya, [
1042
+ e.value.type === "classic" ? (s(), u(p, { key: 0 }, [
1043
+ Y(t) && y.value.dataLabels.show ? (s(), u("circle", {
1044
+ key: 0,
1045
+ cx: r(x)(t).x,
1046
+ cy: r(he)(t) - 3.5,
1047
+ fill: t.color,
1048
+ stroke: e.value.style.chart.backgroundColor,
1049
+ "stroke-width": 1,
1050
+ r: 3,
1051
+ filter: !e.value.useBlurOnHover || [null, void 0].includes(O.value) || O.value === a ? "" : `url(#blur_${m.value})`,
1052
+ onClick: (i) => K(t, a),
1053
+ onMouseenter: (i) => q({
1054
+ datapoint: t,
1055
+ relativeIndex: a,
1056
+ seriesIndex: t.seriesIndex,
1057
+ show: !0
1058
+ }),
1059
+ onMouseleave: (i) => H({ datapoint: t, seriesIndex: t.seriesIndex })
1060
+ }, null, 40, fa)) : v("", !0)
1061
+ ], 64)) : v("", !0),
1062
+ e.value.type === "polar" ? (s(), u(p, { key: 1 }, [
1063
+ Y(t) && y.value.dataLabels.show ? (s(), u("circle", {
1064
+ key: 0,
1065
+ cx: r(L)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
1066
+ cy: r(L)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y,
1067
+ fill: t.color,
1068
+ stroke: e.value.style.chart.backgroundColor,
1069
+ "stroke-width": 1,
1070
+ r: 3,
1071
+ filter: !e.value.useBlurOnHover || [null, void 0].includes(O.value) || O.value === a ? "" : `url(#blur_${m.value})`,
1072
+ onClick: (i) => K(t, a),
1073
+ onMouseenter: (i) => q({
1074
+ datapoint: t,
1075
+ relativeIndex: a,
1076
+ seriesIndex: t.seriesIndex,
1077
+ show: !0
1078
+ }),
1079
+ onMouseleave: (i) => H({ datapoint: t, seriesIndex: t.seriesIndex }),
1080
+ style: k({
1081
+ transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1082
+ })
1083
+ }, null, 44, pa)) : v("", !0)
1084
+ ], 64)) : v("", !0),
1085
+ e.value.type === "classic" ? (s(), u(p, { key: 2 }, [
1086
+ Y(t) && y.value.dataLabels.show ? (s(), u("text", {
1087
+ key: 0,
1088
+ "text-anchor": r(x)(t, !0, 12).anchor,
1089
+ x: r(x)(t, !0, 12).x,
1090
+ y: r(he)(t),
1091
+ fill: e.value.style.chart.layout.labels.percentage.color,
1092
+ "font-size": e.value.style.chart.layout.labels.percentage.fontSize,
1093
+ style: k(`font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}`),
1094
+ onClick: (i) => K(t, a),
1095
+ onMouseenter: (i) => q({
1096
+ datapoint: t,
1097
+ relativeIndex: a,
1098
+ seriesIndex: t.seriesIndex,
1099
+ show: !0
1100
+ }),
1101
+ onMouseleave: (i) => H({ datapoint: t, seriesIndex: t.seriesIndex })
1102
+ }, M(ke(t, N.value)) + " " + M(e.value.style.chart.layout.labels.value.show ? `(${r(V)(
1103
+ e.value.style.chart.layout.labels.value.formatter,
1104
+ t.value,
1105
+ r(z)({
1106
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
1107
+ v: t.value,
1108
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
1109
+ r: e.value.style.chart.layout.labels.value.rounding
1110
+ }),
1111
+ { datapoint: t }
1112
+ )})` : ""), 45, ga)) : v("", !0),
1113
+ Y(t) && y.value.dataLabels.show ? (s(), u("text", {
1114
+ key: 1,
1115
+ "text-anchor": r(x)(t).anchor,
1116
+ x: r(x)(t, !0, 12).x,
1117
+ y: r(he)(t) + e.value.style.chart.layout.labels.percentage.fontSize,
1118
+ fill: e.value.style.chart.layout.labels.name.color,
1119
+ "font-size": e.value.style.chart.layout.labels.name.fontSize,
1120
+ style: k(`font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}`),
1121
+ onClick: (i) => K(t, a),
1122
+ onMouseenter: (i) => q({
1123
+ datapoint: t,
1124
+ relativeIndex: a,
1125
+ seriesIndex: t.seriesIndex,
1126
+ show: !0
1127
+ }),
1128
+ onMouseleave: (i) => H({ datapoint: t, seriesIndex: t.seriesIndex })
1129
+ }, M(t.name), 45, ma)) : v("", !0)
1130
+ ], 64)) : v("", !0),
1131
+ e.value.type === "polar" ? (s(), u(p, { key: 3 }, [
1132
+ Y(t) && y.value.dataLabels.show ? (s(), u("text", {
1133
+ key: 0,
1134
+ "text-anchor": se(d.value[a].middlePoint),
1135
+ x: r(L)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
1136
+ y: r(L)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y,
1137
+ fill: e.value.style.chart.layout.labels.percentage.color,
1138
+ "font-size": e.value.style.chart.layout.labels.percentage.fontSize,
1139
+ style: k({
1140
+ transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1141
+ fontWeight: e.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"
1142
+ }),
1143
+ onClick: (i) => K(t, a),
1144
+ onMouseenter: (i) => q({
1145
+ datapoint: t,
1146
+ relativeIndex: a,
1147
+ seriesIndex: t.seriesIndex,
1148
+ show: !0
1149
+ }),
1150
+ onMouseleave: (i) => H({ datapoint: t, seriesIndex: t.seriesIndex })
1151
+ }, M(ke(t, N.value)) + " " + M(e.value.style.chart.layout.labels.value.show ? `(${r(V)(
1152
+ e.value.style.chart.layout.labels.value.formatter,
1153
+ t.value,
1154
+ r(z)({
1155
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
1156
+ v: t.value,
1157
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
1158
+ r: e.value.style.chart.layout.labels.value.rounding
1159
+ }),
1160
+ { datapoint: t }
1161
+ )})` : ""), 45, ba)) : v("", !0),
1162
+ Y(t) && y.value.dataLabels.show ? (s(), u("text", {
1163
+ key: 1,
1164
+ "text-anchor": se(d.value[a].middlePoint),
1165
+ x: r(L)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
1166
+ y: r(L)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y + e.value.style.chart.layout.labels.percentage.fontSize,
1167
+ fill: e.value.style.chart.layout.labels.name.color,
1168
+ "font-size": e.value.style.chart.layout.labels.name.fontSize,
1169
+ style: k({
1170
+ transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1171
+ fontWeight: e.value.style.chart.layout.labels.name.bold ? "bold" : "normal"
1172
+ }),
1173
+ onClick: (i) => K(t, a),
1174
+ onMouseenter: (i) => q({
1175
+ datapoint: t,
1176
+ relativeIndex: a,
1177
+ seriesIndex: t.seriesIndex,
1178
+ show: !0
1179
+ }),
1180
+ onMouseleave: (i) => H({ datapoint: t, seriesIndex: t.seriesIndex })
1181
+ }, M(t.name), 45, wa)) : v("", !0)
1182
+ ], 64)) : v("", !0)
1183
+ ])),
1184
+ y.value.dataLabels.show && e.value.style.chart.comments.show && t.comment ? (s(), u("g", ka, [
1185
+ Y(t) && e.value.type === "classic" ? (s(), u("foreignObject", {
1186
+ key: 0,
1187
+ x: e.value.style.chart.comments.offsetX + (r(x)(t, !0).anchor === "end" ? r(x)(t).x - e.value.style.chart.comments.width : r(x)(t, !0).anchor === "middle" ? r(x)(t).x - e.value.style.chart.comments.width / 2 : r(x)(t).x),
1188
+ y: r(he)(t) + 24 + e.value.style.chart.comments.offsetY,
1189
+ width: e.value.style.chart.comments.width,
1190
+ height: "200",
1191
+ style: { overflow: "visible", "pointer-events": "none" }
1192
+ }, [
1193
+ h("div", null, [
1194
+ b(l.$slots, "plot-comment", {
1195
+ plot: { ...t, textAlign: r(x)(t, !0, 16, !0).anchor, flexAlign: r(x)(t, !0, 16).anchor, isFirstLoad: T.value }
1196
+ }, void 0, !0)
1197
+ ])
1198
+ ], 8, xa)) : v("", !0),
1199
+ Y(t) && e.value.type === "polar" ? (s(), u("foreignObject", {
1200
+ key: 1,
1201
+ x: e.value.style.chart.comments.offsetX + (se(d.value[a].middlePoint) === "end" ? r(L)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x - e.value.style.chart.comments.width : se(d.value[a].middlePoint) === "middle" ? r(L)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x - e.value.style.chart.comments.width / 2 : r(L)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x),
1202
+ y: Ot(d.value[a]) + e.value.style.chart.comments.offsetY,
1203
+ width: e.value.style.chart.comments.width,
1204
+ height: "200",
1205
+ style: k({
1206
+ transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1207
+ overflow: "visible",
1208
+ pointerEvents: "none"
1209
+ })
1210
+ }, [
1211
+ h("div", null, [
1212
+ b(l.$slots, "plot-comment", {
1213
+ plot: { ...t, textAlign: se(d.value[a].middlePoint), flexAlign: se(d.value[a].middlePoint), isFirstLoad: T.value }
1214
+ }, void 0, !0)
1215
+ ])
1216
+ ], 12, _a)) : v("", !0)
1217
+ ])) : v("", !0)
1218
+ ], 10, da))), 256)),
1219
+ b(l.$slots, "svg", { svg: n.value }, void 0, !0)
1220
+ ], 512)
1221
+ ], 14, gl)) : v("", !0),
1222
+ l.$slots.watermark ? (s(), u("div", $a, [
1223
+ b(l.$slots, "watermark", ue(re({ isPrinting: r(Ge) || r(Re) })), void 0, !0)
1224
+ ])) : v("", !0),
1225
+ ie.value ? v("", !0) : (s(), le(r(wt), {
1226
+ key: 6,
1227
+ config: {
1228
+ type: "donut",
1229
+ style: {
1230
+ backgroundColor: e.value.style.chart.backgroundColor,
1231
+ donut: {
1232
+ color: "#CCCCCC",
1233
+ strokeWidth: Q.value * 0.8
1234
+ }
1235
+ }
1236
+ }
1237
+ }, null, 8, ["config"])),
1238
+ h("div", {
1239
+ ref_key: "chartLegend",
1240
+ ref: Se
1241
+ }, [
1242
+ e.value.style.chart.legend.show ? (s(), le(dl, {
1243
+ key: `legend_${Ne.value}`,
1244
+ legendSet: Ke.value,
1245
+ config: Lt.value,
1246
+ onClickMarker: o[3] || (o[3] = ({ i: t }) => Je(t))
1247
+ }, rt({
1248
+ item: P(({ legend: t, index: a }) => [
1249
+ h("div", {
1250
+ style: k(`opacity:${D.value.includes(a) ? 0.5 : 1}`),
1251
+ onClick: (i) => t.segregate()
1252
+ }, M(t.name) + M(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + M(e.value.style.chart.legend.showValue ? r(V)(
1253
+ e.value.style.chart.layout.labels.value.formatter,
1254
+ t.value,
1255
+ r(z)({
1256
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
1257
+ v: t.value,
1258
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
1259
+ r: e.value.style.chart.legend.roundingValue
1260
+ }),
1261
+ {
1262
+ datapoint: t,
1263
+ index: a
1264
+ }
1265
+ ) : "") + " " + M(e.value.style.chart.legend.showPercentage ? D.value.includes(a) ? `${e.value.style.chart.legend.showValue ? "(" : ""}${Yt(t.proportion * 100)}%${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? "(" : ""}${isNaN(t.value / S.value) ? "-" : r(V)(
1266
+ e.value.style.chart.layout.labels.percentage.formatter,
1267
+ Ze.value(t),
1268
+ r(z)({
1269
+ v: Ze.value(t),
1270
+ s: "%",
1271
+ r: e.value.style.chart.legend.roundingPercentage
1272
+ })
1273
+ )}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, Ca)
1274
+ ]),
1275
+ _: 2
1276
+ }, [
1277
+ l.$slots.pattern ? {
1278
+ name: "legend-pattern",
1279
+ fn: P(({ legend: t, index: a }) => [
1280
+ Pe(hl, {
1281
+ shape: t.shape,
1282
+ radius: 30,
1283
+ stroke: "none",
1284
+ plot: { x: 30, y: 30 },
1285
+ fill: `url(#pattern_${m.value}_${a})`
1286
+ }, null, 8, ["shape", "fill"])
1287
+ ]),
1288
+ key: "0"
1289
+ } : void 0
1290
+ ]), 1032, ["legendSet", "config"])) : v("", !0),
1291
+ b(l.$slots, "legend", { legend: Ke.value }, void 0, !0)
1292
+ ], 512),
1293
+ l.$slots.source ? (s(), u("div", {
1294
+ key: 7,
1295
+ ref_key: "source",
1296
+ ref: Le,
1297
+ dir: "auto"
1298
+ }, [
1299
+ b(l.$slots, "source", {}, void 0, !0)
1300
+ ], 512)) : v("", !0),
1301
+ Pe(r(kt), {
1302
+ show: y.value.showTooltip && me.value,
1303
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1304
+ color: e.value.style.chart.tooltip.color,
1305
+ fontSize: e.value.style.chart.tooltip.fontSize,
1306
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
1307
+ borderColor: e.value.style.chart.tooltip.borderColor,
1308
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
1309
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1310
+ position: e.value.style.chart.tooltip.position,
1311
+ offsetY: e.value.style.chart.tooltip.offsetY,
1312
+ parent: U.value,
1313
+ content: be.value,
1314
+ isCustom: de.value,
1315
+ isFullscreen: ne.value
1316
+ }, {
1317
+ "tooltip-before": P(() => [
1318
+ b(l.$slots, "tooltip-before", ue(re({ ...xe.value })), void 0, !0)
1319
+ ]),
1320
+ "tooltip-after": P(() => [
1321
+ b(l.$slots, "tooltip-after", ue(re({ ...xe.value })), void 0, !0)
1322
+ ]),
1323
+ _: 3
1324
+ }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen"]),
1325
+ ie.value ? (s(), le(r(pt), {
1326
+ key: 8,
1327
+ hideDetails: "",
1328
+ config: {
1329
+ open: y.value.showTable,
1330
+ maxHeight: 1e4,
1331
+ body: {
1332
+ backgroundColor: e.value.style.chart.backgroundColor,
1333
+ color: e.value.style.chart.color
1334
+ },
1335
+ head: {
1336
+ backgroundColor: e.value.style.chart.backgroundColor,
1337
+ color: e.value.style.chart.color
1338
+ }
1339
+ }
1340
+ }, {
1341
+ content: P(() => [
1342
+ (s(), le(r(gt), {
1343
+ key: `table_${Oe.value}`,
1344
+ colNames: ye.value.colNames,
1345
+ head: ye.value.head,
1346
+ body: ye.value.body,
1347
+ config: ye.value.config,
1348
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
1349
+ onClose: o[4] || (o[4] = (t) => y.value.showTable = !1)
1350
+ }, {
1351
+ th: P(({ th: t }) => [
1352
+ h("div", {
1353
+ innerHTML: t,
1354
+ style: { display: "flex", "align-items": "center" }
1355
+ }, null, 8, Pa)
1356
+ ]),
1357
+ td: P(({ td: t }) => [
1358
+ Gt(M(t.name ? t.name : isNaN(Number(t)) ? t.includes("%") ? t : r(V)(
1359
+ e.value.style.chart.layout.labels.percentage.formatter,
1360
+ t,
1361
+ r(z)({
1362
+ v: t,
1363
+ s: "%",
1364
+ r: e.value.style.chart.layout.labels.percentage.rounding
1365
+ })
1366
+ ) : r(V)(
1367
+ e.value.style.chart.layout.labels.value.formatter,
1368
+ t,
1369
+ r(z)({
1370
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
1371
+ v: t,
1372
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
1373
+ r: e.value.style.chart.layout.labels.value.rounding
1374
+ })
1375
+ )), 1)
1376
+ ]),
1377
+ _: 1
1378
+ }, 8, ["colNames", "head", "body", "config", "title"]))
1379
+ ]),
1380
+ _: 1
1381
+ }, 8, ["config"])) : v("", !0)
1382
+ ], 46, pl));
1383
+ }
1384
+ }, Da = /* @__PURE__ */ fl(Ta, [["__scopeId", "data-v-ae2bf9b9"]]);
1385
+ export {
1386
+ Da as default
1387
+ };