vue-data-ui 2.17.5 → 2.17.6

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