vue-data-ui 2.12.6 → 2.12.7-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/{Arrow-Bd9ZVBnX.js → Arrow-C5-RFd0F.js} +1 -1
  2. package/dist/BaseDraggableDialog-CKbomZCX.js +180 -0
  3. package/dist/{BaseIcon-CNbwMh_-.js → BaseIcon-DhWmrDAn.js} +1 -1
  4. package/dist/{ColorPicker-B_FoQwtO.js → ColorPicker-F4TctKaQ.js} +23 -24
  5. package/dist/{DataTable-Rajdtaf6.js → DataTable-Y5HbiUZU.js} +11 -11
  6. package/dist/{Legend-BxtDQCIv.js → Legend-DtTYopxf.js} +8 -8
  7. package/dist/NonSvgPenAndPaper-PC9Yu1K_.js +467 -0
  8. package/dist/PackageVersion-DaWGaZxE.js +10 -0
  9. package/dist/{PenAndPaper-BkP3J-Ft.js → PenAndPaper-C-CpE0NC.js} +8 -10
  10. package/dist/RecursiveCircles-Dn3TGoL6.js +96 -0
  11. package/dist/RecursiveLabels-NTMB9w5C.js +49 -0
  12. package/dist/RecursiveLinks-ld_gDZH4.js +64 -0
  13. package/dist/{Shape-C69a0f29.js → Shape-B6kIkp2s.js} +2 -2
  14. package/dist/{Slicer-7qFdY-bT.js → Slicer-DXpA-pZk.js} +2 -2
  15. package/dist/SparkTooltip-DcdMxgqn.js +68 -0
  16. package/dist/{Title-CzaCeCOm.js → Title-Bc66VstS.js} +2 -2
  17. package/dist/Tooltip-B07vY6jm.js +149 -0
  18. package/dist/{usePrinter-C5bLp34h.js → UserOptions-C8X2STEg.js} +172 -231
  19. package/dist/{dom-to-png-Bm0D0yPL.js → dom-to-png-DH-7H-9g.js} +1 -1
  20. package/dist/{img-BN9AzqUr.js → img-CEn9LJxg.js} +1 -1
  21. package/dist/{index-BFzQMJda.js → index-BHEd2dgu.js} +21 -21
  22. package/dist/{pdf-uTbs813M.js → pdf-BfkyEFza.js} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/useChartAccessibility-9icAAmYg.js +12 -0
  25. package/dist/useMouse-AicQS8Vf.js +13 -0
  26. package/dist/{useNestedProp-v7KPpwuP.js → useNestedProp-CZztHZIm.js} +1 -1
  27. package/dist/{usePanZoom-CUkkqW81.js → usePanZoom-BQMvRXEQ.js} +16 -17
  28. package/dist/usePrinter-C8URL2IU.js +53 -0
  29. package/dist/vClickOutside-C6WiFswA.js +13 -0
  30. package/dist/{vue-data-ui-D1k8FeRp.js → vue-data-ui-C0tGhjs9.js} +63 -63
  31. package/dist/vue-data-ui.js +19 -19
  32. package/dist/{vue-ui-3d-bar-DoklA4DT.js → vue-ui-3d-bar-CriyJ0Da.js} +397 -402
  33. package/dist/{vue-ui-accordion-BUz4JIIX.js → vue-ui-accordion-DntThSTF.js} +3 -3
  34. package/dist/{vue-ui-age-pyramid-4kyBq-Dy.js → vue-ui-age-pyramid-BwgozppD.js} +215 -218
  35. package/dist/{vue-ui-annotator-Bq1ZeFfb.js → vue-ui-annotator-B7jNrpQ0.js} +2 -2
  36. package/dist/{vue-ui-bullet-DU10avvA.js → vue-ui-bullet-C20X1YRt.js} +137 -140
  37. package/dist/{vue-ui-candlestick-BI1t3flz.js → vue-ui-candlestick-B264jwvu.js} +265 -271
  38. package/dist/{vue-ui-carousel-table-VowLf_oc.js → vue-ui-carousel-table-ECSEPy9m.js} +137 -137
  39. package/dist/{vue-ui-chestnut-BHjV3d94.js → vue-ui-chestnut-BxjeL4B6.js} +397 -400
  40. package/dist/{vue-ui-chord-CPr7r-2_.js → vue-ui-chord-CJNnQbPC.js} +356 -364
  41. package/dist/vue-ui-circle-pack-0RLVrL7y.js +656 -0
  42. package/dist/{vue-ui-cursor-C9teAbVI.js → vue-ui-cursor-c9pZbUX7.js} +2 -2
  43. package/dist/{vue-ui-dashboard-CwDYB8tP.js → vue-ui-dashboard-DJTFcJry.js} +62 -62
  44. package/dist/{vue-ui-digits-CHmkL0hn.js → vue-ui-digits-Cwy7WTqM.js} +2 -2
  45. package/dist/vue-ui-donut-BIFf4SLq.js +1292 -0
  46. package/dist/vue-ui-donut-evolution-mc_-1JSs.js +864 -0
  47. package/dist/{vue-ui-dumbbell-DTKLLd1N.js → vue-ui-dumbbell-D50S44wU.js} +265 -270
  48. package/dist/{vue-ui-flow-BLBhsU2n.js → vue-ui-flow-CxDTjjYn.js} +291 -300
  49. package/dist/{vue-ui-funnel-CIrWdeBk.js → vue-ui-funnel-DeC0U017.js} +216 -219
  50. package/dist/{vue-ui-galaxy-ByhKyIV4.js → vue-ui-galaxy-n0MW2u-q.js} +227 -235
  51. package/dist/{vue-ui-gauge-BbfBMpng.js → vue-ui-gauge-AYMCSEtU.js} +240 -243
  52. package/dist/{vue-ui-gizmo-BM-_QfHM.js → vue-ui-gizmo-Ckz1h7XW.js} +57 -58
  53. package/dist/{vue-ui-heatmap-BA4z4hsw.js → vue-ui-heatmap-m0SgFsTu.js} +239 -242
  54. package/dist/{vue-ui-history-plot-8vM_IUy8.js → vue-ui-history-plot-BrcF_YLL.js} +257 -262
  55. package/dist/{vue-ui-kpi-D57QLK6A.js → vue-ui-kpi-DiVxDYiV.js} +29 -30
  56. package/dist/{vue-ui-mini-loader-CR4c-xJQ.js → vue-ui-mini-loader-CqbUMft8.js} +2 -2
  57. package/dist/vue-ui-molecule-BCUC8QED.js +580 -0
  58. package/dist/{vue-ui-mood-radar-Brc9cxoD.js → vue-ui-mood-radar-DrrjD9S1.js} +180 -186
  59. package/dist/{vue-ui-nested-donuts-W3Z5F--L.js → vue-ui-nested-donuts-8RTss1yH.js} +366 -374
  60. package/dist/{vue-ui-onion-BNBlGNlF.js → vue-ui-onion-CmPLnisN.js} +252 -258
  61. package/dist/{vue-ui-parallel-coordinate-plot-B5G3jyvg.js → vue-ui-parallel-coordinate-plot-BsbEUu_g.js} +292 -298
  62. package/dist/{vue-ui-quadrant-CUy9mVIA.js → vue-ui-quadrant-CdM3bVZs.js} +403 -409
  63. package/dist/{vue-ui-quick-chart-D4_8mRXU.js → vue-ui-quick-chart-C-lgCI6O.js} +611 -616
  64. package/dist/{vue-ui-radar-BUk56jGL.js → vue-ui-radar-Dq94lb99.js} +270 -277
  65. package/dist/{vue-ui-rating-B9TQl5KP.js → vue-ui-rating-DceDRLFc.js} +2 -2
  66. package/dist/vue-ui-relation-circle-DsKddA_I.js +525 -0
  67. package/dist/{vue-ui-ridgeline-Cl06bGom.js → vue-ui-ridgeline-CVR7NvJ_.js} +313 -317
  68. package/dist/{vue-ui-rings-B6bpFlFp.js → vue-ui-rings-B0soMLZ5.js} +260 -266
  69. package/dist/{vue-ui-scatter--WUuVw5G.js → vue-ui-scatter-Bq4_NUfW.js} +368 -374
  70. package/dist/{vue-ui-skeleton-B_YI7Yuc.js → vue-ui-skeleton-CG3Pn3Zg.js} +19 -19
  71. package/dist/{vue-ui-smiley-Bbam2fDz.js → vue-ui-smiley-aGKTgh42.js} +2 -2
  72. package/dist/{vue-ui-spark-trend-DavXuwGt.js → vue-ui-spark-trend--6lA4742.js} +114 -117
  73. package/dist/{vue-ui-sparkbar-9N1FU9-J.js → vue-ui-sparkbar-BXx7Vglf.js} +104 -106
  74. package/dist/{vue-ui-sparkgauge-_9ntq4EK.js → vue-ui-sparkgauge-zM4_Tgqb.js} +72 -74
  75. package/dist/{vue-ui-sparkhistogram-BEzOV4HV.js → vue-ui-sparkhistogram-BDNrZbWN.js} +93 -95
  76. package/dist/vue-ui-sparkline-CzzyDmYJ.js +459 -0
  77. package/dist/{vue-ui-sparkstackbar-BSWcs3v0.js → vue-ui-sparkstackbar-tBSUQ_09.js} +102 -105
  78. package/dist/{vue-ui-stackbar-gG5BLlAr.js → vue-ui-stackbar-BriZOfj6.js} +409 -412
  79. package/dist/{vue-ui-strip-plot-BJouRmxh.js → vue-ui-strip-plot-DzYyFp3o.js} +240 -246
  80. package/dist/{vue-ui-table-D9Ry8s4N.js → vue-ui-table-C2qosrZR.js} +3 -3
  81. package/dist/{vue-ui-table-heatmap-Bizzpi31.js → vue-ui-table-heatmap-COKfg2KT.js} +90 -90
  82. package/dist/{vue-ui-table-sparkline-Dg54Ovs2.js → vue-ui-table-sparkline-D7C5AiCp.js} +212 -212
  83. package/dist/{vue-ui-thermometer-6MSdF_Gm.js → vue-ui-thermometer-CDG6vSMm.js} +154 -157
  84. package/dist/{vue-ui-timer-ByaKokk8.js → vue-ui-timer-DOoO0CVB.js} +180 -181
  85. package/dist/vue-ui-tiremarks-BSPIy1A3.js +341 -0
  86. package/dist/vue-ui-treemap-DsMmxgin.js +947 -0
  87. package/dist/{vue-ui-vertical-bar-CE4oBwBv.js → vue-ui-vertical-bar-B2_ZHuyv.js} +381 -386
  88. package/dist/{vue-ui-waffle-DNEEnY_G.js → vue-ui-waffle-YhkwHcUX.js} +312 -318
  89. package/dist/vue-ui-wheel-CWHJwyyL.js +335 -0
  90. package/dist/vue-ui-word-cloud-BLgEqHRF.js +642 -0
  91. package/dist/{vue-ui-world-Brhq17TE.js → vue-ui-world-BQelvSLD.js} +389 -400
  92. package/dist/{vue-ui-xy-K2G7QQxG.js → vue-ui-xy-D1luVUXJ.js} +845 -846
  93. package/dist/vue-ui-xy-canvas-C7Pu9RFN.js +1206 -0
  94. package/package.json +6 -6
  95. package/dist/BaseDraggableDialog-Bzwlfmy1.js +0 -186
  96. package/dist/PackageVersion-BjrblLPQ.js +0 -10
  97. package/dist/Tooltip-CWmRmhJr.js +0 -158
  98. package/dist/useChartAccessibility-BWojgys7.js +0 -13
  99. package/dist/vue-ui-circle-pack-D_jYpsuD.js +0 -659
  100. package/dist/vue-ui-donut-WRUDvvZa.js +0 -1292
  101. package/dist/vue-ui-donut-evolution-BQxV5D_L.js +0 -871
  102. package/dist/vue-ui-molecule-Bq69N7rC.js +0 -782
  103. package/dist/vue-ui-relation-circle-T6aTibIU.js +0 -528
  104. package/dist/vue-ui-sparkline-D__GCUAz.js +0 -519
  105. package/dist/vue-ui-tiremarks-Z8pjUT1g.js +0 -344
  106. package/dist/vue-ui-treemap-pRJ3be5l.js +0 -956
  107. package/dist/vue-ui-wheel-DWPYZxdT.js +0 -338
  108. package/dist/vue-ui-word-cloud-DAR7R8F8.js +0 -648
  109. package/dist/vue-ui-xy-canvas-ml44sPHS.js +0 -1673
@@ -0,0 +1,1292 @@
1
+ import { defineAsyncComponent as K, useSlots as Mt, computed as f, shallowRef as W, ref as _, onMounted as tt, onBeforeUnmount as Nt, watch as lt, createElementBlock as r, openBlock as o, normalizeStyle as b, normalizeClass as _e, createBlock as Q, createCommentVNode as i, renderSlot as p, createElementVNode as y, createVNode as xe, unref as u, createSlots as at, withCtx as C, normalizeProps as oe, guardReactiveProps as se, Fragment as g, renderList as S, mergeProps as ot, toDisplayString as P, createTextVNode as st, nextTick as Yt } from "vue";
2
+ import { u as Xt, o as It, e as ut, g as Dt, c as Vt, b as Bt, d as nt, p as Z, m as Gt, _ as Rt, f as N, X as Wt, s as ve, w as Et, j as Ut, M as L, i as D, k as ce, n as w, t as jt, a as Ht, q as qt, r as Jt, x as Kt, S as rt } from "./index-BHEd2dgu.js";
3
+ import { t as Qt, u as Zt } from "./useResponsive-JZ9xq-JV.js";
4
+ import { u as it } from "./useNestedProp-CZztHZIm.js";
5
+ import { u as el } from "./usePrinter-C8URL2IU.js";
6
+ import { u as tl } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as ll } from "./useChartAccessibility-9icAAmYg.js";
8
+ import al from "./Legend-DtTYopxf.js";
9
+ import ol from "./Title-Bc66VstS.js";
10
+ import sl from "./Shape-B6kIkp2s.js";
11
+ import { _ as ul } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
+ const nl = ["id"], rl = ["xmlns", "viewBox"], il = ["width", "height"], vl = { key: 1 }, cl = ["id"], dl = ["stop-color"], hl = ["offset", "stop-color"], yl = ["offset", "stop-color"], fl = ["stop-color"], pl = { key: 2 }, gl = ["id", "cx", "cy"], ml = ["stop-color", "stop-opacity"], bl = ["stop-color"], wl = ["id"], kl = ["id"], _l = ["id"], xl = ["flood-color"], $l = ["id"], Cl = ["flood-color"], Tl = ["d", "stroke", "filter"], Pl = ["d", "stroke", "filter"], Al = ["cx", "cy", "r", "fill", "filter"], Fl = { key: 6 }, Sl = ["stroke", "d"], Ll = { key: 0 }, zl = ["d", "fill", "stroke", "stroke-width", "filter"], Ol = ["d", "fill", "stroke", "stroke-width", "filter"], Ml = { key: 0 }, Nl = ["stroke", "d"], Yl = { key: 0 }, Xl = ["d", "stroke", "stroke-width", "filter"], Il = { key: 1 }, Dl = ["d", "fill", "stroke", "stroke-width", "filter"], Vl = ["d", "fill", "stroke", "stroke-width", "filter"], Bl = { key: 1 }, Gl = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Rl = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Wl = ["cx", "cy", "r", "stroke"], El = ["cx", "cy", "r", "fill"], Ul = { key: 0 }, jl = ["d", "fill", "onMouseenter", "onClick"], Hl = { key: 1 }, ql = ["cx", "cy", "r"], Jl = ["x", "y", "fill", "font-size"], Kl = ["x", "y", "fill", "font-size"], Ql = ["x", "y", "fill", "font-size"], Zl = ["x", "y", "fill", "font-size"], ea = ["filter"], ta = { key: 0 }, la = ["x", "y"], aa = { key: 1 }, oa = ["cx", "cy", "fill", "stroke", "filter", "onClick"], sa = ["cx", "cy", "fill", "stroke", "filter", "onClick"], ua = ["text-anchor", "x", "y", "fill", "font-size", "onClick"], na = ["text-anchor", "x", "y", "fill", "font-size", "onClick"], ra = ["text-anchor", "x", "y", "fill", "font-size", "onClick"], ia = ["text-anchor", "x", "y", "fill", "font-size", "onClick"], va = { key: 2 }, ca = ["x", "y", "width"], da = ["x", "y", "width"], ha = {
13
+ key: 5,
14
+ class: "vue-data-ui-watermark"
15
+ }, ya = ["onClick"], fa = {
16
+ key: 0,
17
+ style: { "font-variant-numeric": "tabular-nums" }
18
+ }, pa = { key: 1 }, ga = ["innerHTML"], ma = {
19
+ __name: "vue-ui-donut",
20
+ props: {
21
+ config: {
22
+ type: Object,
23
+ default() {
24
+ return {};
25
+ }
26
+ },
27
+ dataset: {
28
+ type: Array,
29
+ default() {
30
+ return [];
31
+ }
32
+ }
33
+ },
34
+ emits: ["selectLegend", "selectDatapoint"],
35
+ setup($e, { expose: vt, emit: ct }) {
36
+ const dt = K(() => import("./vue-ui-accordion-DntThSTF.js")), ht = K(() => import("./DataTable-Y5HbiUZU.js")), yt = K(() => import("./PackageVersion-DaWGaZxE.js")), ft = K(() => import("./PenAndPaper-C-CpE0NC.js")), pt = K(() => import("./vue-ui-skeleton-CG3Pn3Zg.js")), gt = K(() => import("./Tooltip-B07vY6jm.js")), mt = K(() => import("./UserOptions-C8X2STEg.js")), { vue_ui_donut: bt } = Xt(), wt = Mt(), z = $e, ue = f({
37
+ get() {
38
+ return !!z.dataset && z.dataset.length;
39
+ },
40
+ set(l) {
41
+ return l;
42
+ }
43
+ }), ne = W(null), Ce = W(null), Te = W(null), E = W(null), ee = W(null), Pe = W(null), Ae = W(null), Fe = _(0), Se = _(0), Le = _(0);
44
+ tt(() => {
45
+ ze();
46
+ }), Nt(() => {
47
+ E.value && (ee.value && E.value.unobserve(ee.value), E.value.disconnect());
48
+ });
49
+ function ze() {
50
+ if (It(z.dataset) ? ut({
51
+ componentName: "VueUiDonut",
52
+ type: "dataset"
53
+ }) : z.dataset.forEach((l, s) => {
54
+ Dt({
55
+ datasetObject: l,
56
+ requiredAttributes: ["name", "values"]
57
+ }).forEach((t) => {
58
+ ue.value = !1, ut({
59
+ componentName: "VueUiDonut",
60
+ type: "datasetSerieAttribute",
61
+ property: t,
62
+ index: s
63
+ });
64
+ });
65
+ }), e.value.responsive) {
66
+ const l = Qt(() => {
67
+ const { width: s, height: t } = Zt({
68
+ chart: ne.value,
69
+ title: e.value.style.chart.title.text ? Ce.value : null,
70
+ legend: e.value.style.chart.legend.show ? Te.value : null,
71
+ source: Pe.value,
72
+ noTitle: Ae.value,
73
+ padding: Xe.value
74
+ });
75
+ requestAnimationFrame(() => {
76
+ n.value.width = s, n.value.height = t;
77
+ });
78
+ });
79
+ E.value && (ee.value && E.value.unobserve(ee.value), E.value.disconnect()), E.value = new ResizeObserver(l), ee.value = ne.value.parentNode, E.value.observe(ee.value);
80
+ }
81
+ }
82
+ const h = _(Vt()), kt = _(null), de = _(!1), pe = _(""), O = _(null), Oe = _(0);
83
+ function Me() {
84
+ const l = it({
85
+ userConfig: z.config,
86
+ defaultConfig: bt
87
+ });
88
+ return l.theme ? {
89
+ ...it({
90
+ userConfig: Ht.vue_ui_donut[l.theme] || z.config,
91
+ defaultConfig: l
92
+ }),
93
+ customPalette: jt[l.theme] || Z
94
+ } : l;
95
+ }
96
+ const e = f({
97
+ get: () => Me(),
98
+ set: (l) => l
99
+ }), T = _(!0), B = W([]);
100
+ function _t(l, s = 1e3, t = 50) {
101
+ return new Promise((a) => {
102
+ const v = l.length;
103
+ B.value = Array(v).fill(0);
104
+ let m = 0;
105
+ l.forEach((k, $) => {
106
+ setTimeout(() => {
107
+ const R = performance.now();
108
+ function I(ie) {
109
+ const fe = Math.min((ie - R) / s, 1), Ot = rt(fe);
110
+ B.value[$] = k * Ot, B.value = [...B.value], fe < 1 ? requestAnimationFrame(I) : (B.value[$] = k, B.value = [...B.value], m += 1, m === v && a());
111
+ }
112
+ requestAnimationFrame(I);
113
+ }, $ * t);
114
+ });
115
+ });
116
+ }
117
+ tt(async () => {
118
+ const l = z.dataset.map((s) => s.values.reduce((t, a) => t + a, 0));
119
+ e.value.startAnimation.show && await _t(
120
+ l,
121
+ e.value.startAnimation.durationMs,
122
+ e.value.startAnimation.staggerMs
123
+ ), T.value = !1;
124
+ });
125
+ const { userOptionsVisible: ge, setUserOptionsVisibility: Ne, keepUserOptionState: Ye } = tl({ config: e.value }), { svgRef: me } = ll({ config: e.value.style.chart.title });
126
+ function xt() {
127
+ Ne(!0);
128
+ }
129
+ function $t() {
130
+ Ne(!1);
131
+ }
132
+ lt(() => z.config, (l) => {
133
+ e.value = Me(), ge.value = !e.value.userOptions.showOnChartHover, ze(), Fe.value += 1, Se.value += 1, Le.value += 1, d.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, d.value.showTable = e.value.table.show, d.value.showTooltip = e.value.style.chart.tooltip.show;
134
+ }, { deep: !0 });
135
+ const Xe = f(() => {
136
+ const { top: l, right: s, bottom: t, left: a } = e.value.style.chart.padding;
137
+ return {
138
+ css: `padding:${l}px ${s}px ${t}px ${a}px`,
139
+ top: l,
140
+ right: s,
141
+ bottom: t,
142
+ left: a
143
+ };
144
+ }), { isPrinting: Ie, isImaging: De, generatePdf: Ve, generateImage: Be } = el({
145
+ elementId: `donut__${h.value}`,
146
+ fileName: e.value.style.chart.title.text || "vue-ui-donut",
147
+ options: e.value.userOptions.print
148
+ }), Ct = f(() => e.value.userOptions.show && !e.value.style.chart.title.text), Ge = f(() => Bt(e.value.customPalette)), d = _({
149
+ dataLabels: {
150
+ show: e.value.style.chart.layout.labels.dataLabels.show
151
+ },
152
+ showTable: e.value.table.show,
153
+ showTooltip: e.value.style.chart.tooltip.show
154
+ }), n = _({
155
+ height: 360,
156
+ width: 512
157
+ }), te = f(() => {
158
+ const l = e.value.style.chart.layout.donut.strokeWidth / 512, s = Math.min(n.value.width, n.value.height) * l, t = s > x.value ? x.value : s;
159
+ return Math.max(t, 3);
160
+ }), Re = ct, G = f(() => z.dataset.map((l, s) => ({
161
+ name: l.name,
162
+ color: nt(l.color) || Ge.value[s] || Z[s] || Z[s % Z.length],
163
+ value: l.values.reduce((t, a) => t + a, 0),
164
+ absoluteValues: l.values,
165
+ comment: l.comment || "",
166
+ patternIndex: s,
167
+ seriesIndex: s,
168
+ ghost: !1,
169
+ pattern: `pattern_${h.value}_${s}`
170
+ }))), M = W(G.value);
171
+ lt(() => G.value, (l) => M.value = l);
172
+ function Tt() {
173
+ return G.value.map((l) => ({
174
+ name: l.name,
175
+ color: l.color,
176
+ value: l.value
177
+ }));
178
+ }
179
+ const V = _([]), q = _(!1);
180
+ function We({ from: l, to: s, duration: t, onUpdate: a, onDone: v, easing: m = rt }) {
181
+ const k = performance.now();
182
+ function $(R) {
183
+ const I = Math.min((R - k) / t, 1), ie = m(I), fe = l + (s - l) * ie;
184
+ a(fe, I), I < 1 ? requestAnimationFrame($) : (a(s, 1), v && v());
185
+ }
186
+ requestAnimationFrame($);
187
+ }
188
+ function Ee(l) {
189
+ const s = G.value.find((v, m) => m === l);
190
+ let a = M.value.find((v, m) => m === l).value;
191
+ if (V.value.includes(l)) {
192
+ let m = function() {
193
+ M.value = M.value.map(
194
+ ($, R) => l === R ? { ...$, value: v } : $
195
+ );
196
+ }, k = function() {
197
+ q.value = !0, We({
198
+ from: a,
199
+ to: v,
200
+ duration: e.value.serieToggleAnimation.durationMs,
201
+ onUpdate: ($, R) => {
202
+ M.value = M.value.map(
203
+ (I, ie) => l === ie ? { ...I, value: $ } : I
204
+ );
205
+ },
206
+ onDone: () => {
207
+ m(), q.value = !1;
208
+ }
209
+ });
210
+ };
211
+ V.value = V.value.filter(($) => $ !== l);
212
+ const v = s.value;
213
+ e.value.serieToggleAnimation.show && e.value.type === "classic" ? k() : m();
214
+ } else if (V.value.length < G.value.length - 1) {
215
+ let v = function() {
216
+ V.value.push(l), M.value = M.value.map(
217
+ (k, $) => l === $ ? { ...k, value: 0 } : k
218
+ );
219
+ }, m = function() {
220
+ q.value = !0, We({
221
+ from: a,
222
+ to: 0,
223
+ duration: e.value.serieToggleAnimation.durationMs,
224
+ onUpdate: (k, $) => {
225
+ M.value = M.value.map(
226
+ (R, I) => l === I ? { ...R, value: k } : R
227
+ );
228
+ },
229
+ onDone: () => {
230
+ v(), q.value = !1;
231
+ }
232
+ });
233
+ };
234
+ e.value.serieToggleAnimation.show && e.value.type === "classic" ? m() : v();
235
+ }
236
+ Re("selectLegend", U.value.map((v) => ({
237
+ name: v.name,
238
+ color: v.color,
239
+ value: v.value
240
+ })));
241
+ }
242
+ const Pt = f(() => z.dataset.reduce((l, s) => l + s.values.reduce((t, a) => t + a, 0), 0)), U = f(() => {
243
+ if (T.value) {
244
+ const l = B.value.map((t, a) => ({
245
+ ...G.value[a],
246
+ value: t,
247
+ color: G.value[a].color,
248
+ ghost: !1
249
+ })), s = Pt.value - B.value.reduce((t, a) => t + a, 0);
250
+ return s > 0 && l.push({
251
+ name: "__ghost__",
252
+ value: s,
253
+ color: "transparent",
254
+ ghost: !0
255
+ }), l;
256
+ } else
257
+ return M.value.forEach((l, s) => {
258
+ if ([null, void 0].includes(l.values))
259
+ return {
260
+ ...l,
261
+ values: []
262
+ };
263
+ }), M.value.map((l, s) => ({
264
+ ...l,
265
+ seriesIndex: s
266
+ })).filter((l, s) => !V.value.includes(s));
267
+ }), Ue = f(() => z.dataset.map((l, s) => ({
268
+ name: l.name,
269
+ color: nt(l.color) || Ge.value[s] || Z[s] || Z[s % Z.length],
270
+ value: (l.values || []).reduce((t, a) => t + a, 0),
271
+ shape: "circle",
272
+ patternIndex: s
273
+ })).map((l, s) => ({
274
+ ...l,
275
+ proportion: l.value / z.dataset.map((t) => (t.values || []).reduce((a, v) => a + v, 0)).reduce((t, a) => t + a, 0),
276
+ opacity: V.value.includes(s) ? 0.5 : 1,
277
+ segregate: () => !q.value && Ee(s),
278
+ isSegregated: V.value.includes(s)
279
+ }))), At = f(() => ({
280
+ cy: "donut-div-legend",
281
+ backgroundColor: e.value.style.chart.legend.backgroundColor,
282
+ color: e.value.style.chart.legend.color,
283
+ fontSize: e.value.style.chart.legend.fontSize,
284
+ paddingBottom: 12,
285
+ fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
286
+ })), x = f(() => {
287
+ const l = Math.min(n.value.width / 3, n.value.height / 3);
288
+ return l < 55 ? 55 : l;
289
+ }), A = f(() => Gt({ series: U.value }, n.value.width / 2, n.value.height / 2, x.value, x.value, 1.99999, 2, 1, 360, 105.25, te.value)), Y = f(() => A.value.filter((l) => !l.ghost)), c = f(() => {
290
+ const l = Math.max(...U.value.map((t) => t.value)), s = U.value.map((t) => t.value / l);
291
+ return Rt({
292
+ series: s,
293
+ center: {
294
+ x: n.value.width / 2,
295
+ y: n.value.height / 2
296
+ },
297
+ maxRadius: Math.min(n.value.width, n.value.height) / 3,
298
+ hasGhost: T.value
299
+ });
300
+ });
301
+ function le(l) {
302
+ return l.x > n.value.width / 2 + 6 ? "start" : l.x < n.value.width / 2 - 6 ? "end" : "middle";
303
+ }
304
+ function Ft(l) {
305
+ 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;
306
+ }
307
+ function X(l) {
308
+ return l.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
309
+ }
310
+ function be(l, s) {
311
+ const t = l.value / St(s);
312
+ return isNaN(t) ? 0 : D(
313
+ e.value.style.chart.layout.labels.percentage.formatter,
314
+ t * 100,
315
+ N({
316
+ v: t * 100,
317
+ s: "%",
318
+ r: e.value.style.chart.layout.labels.percentage.rounding
319
+ }),
320
+ { datapoint: l }
321
+ );
322
+ }
323
+ function St(l) {
324
+ return [...l].map((s) => s.value).reduce((s, t) => s + t, 0);
325
+ }
326
+ const F = f(() => U.value.map((l) => l.value).reduce((l, s) => l + s, 0)), je = f(() => F.value / U.value.length), He = f(() => (l) => q.value ? l.proportion * 100 : l.value / F.value * 100), we = _(null), re = _(!1);
327
+ function qe({ datapoint: l, relativeIndex: s, seriesIndex: t, show: a = !1 }) {
328
+ we.value = { datapoint: l, seriesIndex: t, config: e.value, series: G.value }, de.value = a, O.value = s;
329
+ let v = "";
330
+ const m = e.value.style.chart.tooltip.customFormat;
331
+ if (re.value = !1, Kt(m))
332
+ try {
333
+ const k = m({
334
+ seriesIndex: t,
335
+ datapoint: l,
336
+ series: G.value,
337
+ config: e.value
338
+ });
339
+ typeof k == "string" && (pe.value = k, re.value = !0);
340
+ } catch {
341
+ console.warn("Custom format cannot be applied."), re.value = !1;
342
+ }
343
+ if (!re.value) {
344
+ if (v += `<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>`, v += `<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}"/>${wt.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${h.value}_${t})"/>` : ""}</svg>`, e.value.style.chart.tooltip.showValue && (v += `<b>${D(
345
+ e.value.style.chart.layout.labels.value.formatter,
346
+ l.value,
347
+ N({
348
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
349
+ v: l.value,
350
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
351
+ r: e.value.style.chart.tooltip.roundingValue
352
+ }),
353
+ {
354
+ datapoint: l,
355
+ relativeIndex: s,
356
+ seriesIndex: t
357
+ }
358
+ )}</b>`), e.value.style.chart.tooltip.showPercentage) {
359
+ const k = D(
360
+ e.value.style.chart.layout.labels.percentage.formatter,
361
+ l.proportion * 100,
362
+ N({
363
+ v: l.proportion * 100,
364
+ s: "%",
365
+ r: e.value.style.chart.tooltip.roundingPercentage
366
+ }),
367
+ {
368
+ datapoint: l,
369
+ relativeIndex: s,
370
+ seriesIndex: t
371
+ }
372
+ );
373
+ e.value.style.chart.tooltip.showValue ? v += `<span>(${k})</span></div>` : v += `<b>${k}</b></div>`;
374
+ }
375
+ e.value.style.chart.comments.showInTooltip && l.comment && (v += `<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>`), pe.value = `<div>${v}</div>`;
376
+ }
377
+ }
378
+ function J(l) {
379
+ return e.value.useBlurOnHover && ![null, void 0].includes(O.value) && O.value !== l ? `url(#blur_${h.value})` : "";
380
+ }
381
+ const j = f(() => {
382
+ const l = U.value.map((t) => ({
383
+ name: t.name,
384
+ color: t.color
385
+ })), s = U.value.map((t) => t.value);
386
+ return { head: l, body: s };
387
+ });
388
+ function Je() {
389
+ Yt(() => {
390
+ const l = j.value.head.map((a, v) => [[
391
+ a.name
392
+ ], [j.value.body[v]], [isNaN(j.value.body[v] / F.value) ? "-" : j.value.body[v] / F.value * 100]]), s = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(l), t = qt(s);
393
+ Jt({ csvContent: t, title: e.value.style.chart.title.text || "vue-ui-donut" });
394
+ });
395
+ }
396
+ const he = f(() => {
397
+ const l = [
398
+ ' <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>',
399
+ N({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: F.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
400
+ "100%"
401
+ ], s = j.value.head.map((v, m) => [
402
+ {
403
+ color: v.color,
404
+ name: v.name
405
+ },
406
+ j.value.body[m],
407
+ isNaN(j.value.body[m] / F.value) ? "-" : (j.value.body[m] / F.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
408
+ ]), t = {
409
+ th: {
410
+ backgroundColor: e.value.table.th.backgroundColor,
411
+ color: e.value.table.th.color,
412
+ outline: e.value.table.th.outline
413
+ },
414
+ td: {
415
+ backgroundColor: e.value.table.td.backgroundColor,
416
+ color: e.value.table.td.color,
417
+ outline: e.value.table.td.outline
418
+ },
419
+ breakpoint: e.value.table.responsiveBreakpoint
420
+ };
421
+ return {
422
+ colNames: [
423
+ e.value.table.columnNames.series,
424
+ e.value.table.columnNames.value,
425
+ e.value.table.columnNames.percentage
426
+ ],
427
+ head: l,
428
+ body: s,
429
+ config: t
430
+ };
431
+ }), ae = _(!1);
432
+ function Lt(l) {
433
+ ae.value = l, Oe.value += 1;
434
+ }
435
+ const Ke = f(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent));
436
+ function zt(l) {
437
+ return l.toFixed(e.value.style.chart.legend.roundingPercentage).split("").map((s) => "-").join("");
438
+ }
439
+ function H(l, s) {
440
+ Re("selectDatapoint", { datapoint: l, index: s });
441
+ }
442
+ function Qe() {
443
+ d.value.showTable = !d.value.showTable;
444
+ }
445
+ function Ze() {
446
+ d.value.dataLabels.show = !d.value.dataLabels.show;
447
+ }
448
+ function et() {
449
+ d.value.showTooltip = !d.value.showTooltip;
450
+ }
451
+ const ye = _(!1);
452
+ function ke() {
453
+ ye.value = !ye.value;
454
+ }
455
+ return vt({
456
+ getData: Tt,
457
+ generatePdf: Ve,
458
+ generateCsv: Je,
459
+ generateImage: Be,
460
+ toggleTable: Qe,
461
+ toggleLabels: Ze,
462
+ toggleTooltip: et,
463
+ toggleAnnotator: ke
464
+ }), (l, s) => (o(), r("div", {
465
+ ref_key: "donutChart",
466
+ ref: ne,
467
+ class: _e(`vue-ui-donut ${ae.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
468
+ style: b(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height:100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
469
+ id: `donut__${h.value}`,
470
+ onMouseenter: xt,
471
+ onMouseleave: $t
472
+ }, [
473
+ e.value.userOptions.buttons.annotator && u(me) ? (o(), Q(u(ft), {
474
+ key: 0,
475
+ color: e.value.style.chart.color,
476
+ backgroundColor: e.value.style.chart.backgroundColor,
477
+ active: ye.value,
478
+ svgRef: u(me),
479
+ onClose: ke
480
+ }, null, 8, ["color", "backgroundColor", "active", "svgRef"])) : i("", !0),
481
+ p(l.$slots, "userConfig", {}, void 0, !0),
482
+ Ct.value ? (o(), r("div", {
483
+ key: 1,
484
+ ref_key: "noTitle",
485
+ ref: Ae,
486
+ class: "vue-data-ui-no-title-space",
487
+ style: "height:36px; width: 100%;background:transparent"
488
+ }, null, 512)) : i("", !0),
489
+ e.value.style.chart.title.text ? (o(), r("div", {
490
+ key: 2,
491
+ ref_key: "chartTitle",
492
+ ref: Ce,
493
+ style: "width:100%;background:transparent;padding-bottom:24px"
494
+ }, [
495
+ (o(), Q(ol, {
496
+ key: `title_${Fe.value}`,
497
+ config: {
498
+ title: {
499
+ cy: "donut-div-title",
500
+ ...e.value.style.chart.title
501
+ },
502
+ subtitle: {
503
+ cy: "donut-div-subtitle",
504
+ ...e.value.style.chart.title.subtitle
505
+ }
506
+ }
507
+ }, null, 8, ["config"]))
508
+ ], 512)) : i("", !0),
509
+ e.value.userOptions.show && ue.value && (u(Ye) || u(ge)) ? (o(), Q(u(mt), {
510
+ ref_key: "details",
511
+ ref: kt,
512
+ key: `user_option_${Oe.value}`,
513
+ backgroundColor: e.value.style.chart.backgroundColor,
514
+ color: e.value.style.chart.color,
515
+ isPrinting: u(Ie),
516
+ isImaging: u(De),
517
+ uid: h.value,
518
+ hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
519
+ hasPdf: e.value.userOptions.buttons.pdf,
520
+ hasImg: e.value.userOptions.buttons.img,
521
+ hasXls: e.value.userOptions.buttons.csv,
522
+ hasTable: e.value.userOptions.buttons.table,
523
+ hasLabel: e.value.userOptions.buttons.labels,
524
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
525
+ isFullscreen: ae.value,
526
+ chartElement: ne.value,
527
+ position: e.value.userOptions.position,
528
+ isTooltip: d.value.showTooltip,
529
+ titles: { ...e.value.userOptions.buttonTitles },
530
+ hasAnnotator: e.value.userOptions.buttons.annotator,
531
+ isAnnotation: ye.value,
532
+ onToggleFullscreen: Lt,
533
+ onGeneratePdf: u(Ve),
534
+ onGenerateCsv: Je,
535
+ onGenerateImage: u(Be),
536
+ onToggleTable: Qe,
537
+ onToggleLabels: Ze,
538
+ onToggleTooltip: et,
539
+ onToggleAnnotator: ke,
540
+ style: b({
541
+ visibility: u(Ye) ? u(ge) ? "visible" : "hidden" : "visible"
542
+ })
543
+ }, at({ _: 2 }, [
544
+ l.$slots.menuIcon ? {
545
+ name: "menuIcon",
546
+ fn: C(({ isOpen: t, color: a }) => [
547
+ p(l.$slots, "menuIcon", oe(se({ isOpen: t, color: a })), void 0, !0)
548
+ ]),
549
+ key: "0"
550
+ } : void 0,
551
+ l.$slots.optionTooltip ? {
552
+ name: "optionTooltip",
553
+ fn: C(() => [
554
+ p(l.$slots, "optionTooltip", {}, void 0, !0)
555
+ ]),
556
+ key: "1"
557
+ } : void 0,
558
+ l.$slots.optionPdf ? {
559
+ name: "optionPdf",
560
+ fn: C(() => [
561
+ p(l.$slots, "optionPdf", {}, void 0, !0)
562
+ ]),
563
+ key: "2"
564
+ } : void 0,
565
+ l.$slots.optionCsv ? {
566
+ name: "optionCsv",
567
+ fn: C(() => [
568
+ p(l.$slots, "optionCsv", {}, void 0, !0)
569
+ ]),
570
+ key: "3"
571
+ } : void 0,
572
+ l.$slots.optionImg ? {
573
+ name: "optionImg",
574
+ fn: C(() => [
575
+ p(l.$slots, "optionImg", {}, void 0, !0)
576
+ ]),
577
+ key: "4"
578
+ } : void 0,
579
+ l.$slots.optionTable ? {
580
+ name: "optionTable",
581
+ fn: C(() => [
582
+ p(l.$slots, "optionTable", {}, void 0, !0)
583
+ ]),
584
+ key: "5"
585
+ } : void 0,
586
+ l.$slots.optionLabels ? {
587
+ name: "optionLabels",
588
+ fn: C(() => [
589
+ p(l.$slots, "optionLabels", {}, void 0, !0)
590
+ ]),
591
+ key: "6"
592
+ } : void 0,
593
+ l.$slots.optionFullscreen ? {
594
+ name: "optionFullscreen",
595
+ fn: C(({ toggleFullscreen: t, isFullscreen: a }) => [
596
+ p(l.$slots, "optionFullscreen", oe(se({ toggleFullscreen: t, isFullscreen: a })), void 0, !0)
597
+ ]),
598
+ key: "7"
599
+ } : void 0,
600
+ l.$slots.optionAnnotator ? {
601
+ name: "optionAnnotator",
602
+ fn: C(({ toggleAnnotator: t, isAnnotator: a }) => [
603
+ p(l.$slots, "optionAnnotator", oe(se({ toggleAnnotator: t, isAnnotator: a })), void 0, !0)
604
+ ]),
605
+ key: "8"
606
+ } : void 0
607
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : i("", !0),
608
+ ue.value ? (o(), r("svg", {
609
+ key: 4,
610
+ ref_key: "svgRef",
611
+ ref: me,
612
+ xmlns: u(Wt),
613
+ class: _e({ "vue-data-ui-fullscreen--on": ae.value, "vue-data-ui-fulscreen--off": !ae.value }),
614
+ viewBox: `0 0 ${n.value.width <= 0 ? 10 : n.value.width} ${n.value.height <= 0 ? 10 : n.value.height}`,
615
+ style: b(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};${Xe.value.css}`)
616
+ }, [
617
+ xe(u(yt)),
618
+ l.$slots["chart-background"] ? (o(), r("foreignObject", {
619
+ key: 0,
620
+ x: 0,
621
+ y: 0,
622
+ width: n.value.width <= 0 ? 10 : n.value.width,
623
+ height: n.value.height <= 0 ? 10 : n.value.height,
624
+ style: {
625
+ pointerEvents: "none"
626
+ }
627
+ }, [
628
+ p(l.$slots, "chart-background", {}, void 0, !0)
629
+ ], 8, il)) : i("", !0),
630
+ e.value.type === "classic" && !isNaN(te.value / x.value) ? (o(), r("defs", vl, [
631
+ e.value.style.chart.useGradient ? (o(), r("radialGradient", {
632
+ key: 0,
633
+ id: `gradient_${h.value}`
634
+ }, [
635
+ y("stop", {
636
+ offset: "0%",
637
+ "stop-color": u(ve)(e.value.style.chart.backgroundColor, 0),
638
+ "stop-opacity": "0"
639
+ }, null, 8, dl),
640
+ y("stop", {
641
+ offset: `${(1 - te.value / x.value) * 100}%`,
642
+ "stop-color": u(ve)("#FFFFFF", 0),
643
+ "stop-opacity": "0"
644
+ }, null, 8, hl),
645
+ y("stop", {
646
+ offset: `${(1 - te.value / x.value / 2) * 100}%`,
647
+ "stop-color": u(ve)("#FFFFFF", e.value.style.chart.gradientIntensity)
648
+ }, null, 8, yl),
649
+ y("stop", {
650
+ offset: "100%",
651
+ "stop-color": u(ve)(e.value.style.chart.backgroundColor, 0),
652
+ "stop-opacity": "0"
653
+ }, null, 8, fl)
654
+ ], 8, cl)) : i("", !0)
655
+ ])) : i("", !0),
656
+ e.value.type === "polar" ? (o(), r("defs", pl, [
657
+ (o(!0), r(g, null, S(c.value, (t, a) => (o(), r("radialGradient", {
658
+ id: `polar_gradient_${a}_${h.value}`,
659
+ cx: (isNaN(t.middlePoint.x / n.value.width * 100) ? 0 : t.middlePoint.x / n.value.width * 100) + "%",
660
+ cy: (isNaN(t.middlePoint.y / n.value.height * 100) ? 0 : t.middlePoint.y / n.value.height * 100) + "%",
661
+ r: "62%"
662
+ }, [
663
+ y("stop", {
664
+ offset: "0%",
665
+ "stop-color": u(Et)(A.value[a].color, 0.05),
666
+ "stop-opacity": e.value.style.chart.gradientIntensity / 100
667
+ }, null, 8, ml),
668
+ y("stop", {
669
+ offset: "100%",
670
+ "stop-color": A.value[a].color
671
+ }, null, 8, bl)
672
+ ], 8, gl))), 256))
673
+ ])) : i("", !0),
674
+ y("defs", null, [
675
+ y("filter", {
676
+ id: `blur_${h.value}`,
677
+ x: "-50%",
678
+ y: "-50%",
679
+ width: "200%",
680
+ height: "200%"
681
+ }, [
682
+ y("feGaussianBlur", {
683
+ in: "SourceGraphic",
684
+ stdDeviation: 2,
685
+ id: `blur_std_${h.value}`
686
+ }, null, 8, kl),
687
+ s[6] || (s[6] = y("feColorMatrix", {
688
+ type: "saturate",
689
+ values: "0"
690
+ }, null, -1))
691
+ ], 8, wl),
692
+ y("filter", {
693
+ id: `shadow_${h.value}`,
694
+ "color-interpolation-filters": "sRGB"
695
+ }, [
696
+ y("feDropShadow", {
697
+ dx: "0",
698
+ dy: "0",
699
+ stdDeviation: "10",
700
+ "flood-opacity": "0.5",
701
+ "flood-color": e.value.style.chart.layout.donut.shadowColor
702
+ }, null, 8, xl)
703
+ ], 8, _l),
704
+ y("filter", {
705
+ id: `drop_shadow_${h.value}`,
706
+ "color-interpolation-filters": "sRGB",
707
+ x: "-50%",
708
+ y: "-50%",
709
+ width: "200%",
710
+ height: "200%"
711
+ }, [
712
+ y("feDropShadow", {
713
+ dx: "0",
714
+ dy: "0",
715
+ stdDeviation: "3",
716
+ "flood-opacity": "1",
717
+ "flood-color": e.value.style.chart.layout.donut.shadowColor
718
+ }, null, 8, Cl)
719
+ ], 8, $l)
720
+ ]),
721
+ e.value.type === "classic" ? (o(!0), r(g, { key: 3 }, S(A.value.filter((t) => !t.ghost), (t, a) => (o(), r("g", null, [
722
+ X(t) && d.value.dataLabels.show ? (o(), r("path", {
723
+ key: 0,
724
+ d: u(Ut)(t, { x: n.value.width / 2, y: n.value.height / 2 }, 16, 16, !1, !1, te.value, 12, e.value.style.chart.layout.curvedMarkers),
725
+ stroke: t.color,
726
+ "stroke-width": "1",
727
+ "stroke-linecap": "round",
728
+ "stroke-linejoin": "round",
729
+ fill: "none",
730
+ filter: J(a)
731
+ }, null, 8, Tl)) : i("", !0)
732
+ ]))), 256)) : i("", !0),
733
+ e.value.type === "polar" ? (o(!0), r(g, { key: 4 }, S(A.value.filter((t) => !t.ghost), (t, a) => (o(), r("g", null, [
734
+ X(t) && d.value.dataLabels.show ? (o(), r("path", {
735
+ key: 0,
736
+ d: `M ${u(L)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x},${u(L)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y} ${c.value[a].middlePoint.x},${c.value[a].middlePoint.y}`,
737
+ stroke: t.color,
738
+ "stroke-width": "1",
739
+ "stroke-linecap": "round",
740
+ "stroke-linejoin": "round",
741
+ fill: "none",
742
+ filter: J(a),
743
+ style: b({
744
+ transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
745
+ })
746
+ }, null, 12, Pl)) : i("", !0)
747
+ ]))), 256)) : i("", !0),
748
+ e.value.type === "classic" && e.value.style.chart.layout.donut.useShadow ? (o(), r("circle", {
749
+ key: 5,
750
+ cx: n.value.width / 2,
751
+ cy: n.value.height / 2,
752
+ r: x.value <= 0 ? 10 : x.value,
753
+ fill: e.value.style.chart.backgroundColor,
754
+ filter: `url(#shadow_${h.value})`
755
+ }, null, 8, Al)) : i("", !0),
756
+ l.$slots.pattern ? (o(), r("g", Fl, [
757
+ (o(!0), r(g, null, S($e.dataset, (t, a) => (o(), r("defs", {
758
+ key: `pattern-${t.patternIndex}`
759
+ }, [
760
+ p(l.$slots, "pattern", ot({ ref_for: !0 }, { seriesIndex: a, patternId: `pattern_${h.value}_${a}` }), void 0, !0)
761
+ ]))), 128))
762
+ ])) : i("", !0),
763
+ F.value && e.value.type === "classic" ? (o(), r(g, { key: 7 }, [
764
+ (o(!0), r(g, null, S(Y.value, (t, a) => (o(), r("path", {
765
+ stroke: e.value.style.chart.backgroundColor,
766
+ d: t.arcSlice,
767
+ fill: "#FFFFFF"
768
+ }, null, 8, Sl))), 256)),
769
+ l.$slots.pattern ? (o(), r("g", Ll, [
770
+ (o(!0), r(g, null, S(Y.value, (t, a) => (o(), r("path", {
771
+ class: "vue-ui-donut-arc-path",
772
+ d: t.arcSlice,
773
+ fill: `url(#${t.pattern})`,
774
+ stroke: e.value.style.chart.backgroundColor,
775
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
776
+ filter: J(a)
777
+ }, null, 8, zl))), 256))
778
+ ])) : i("", !0),
779
+ (o(!0), r(g, null, S(Y.value, (t, a) => (o(), r("path", {
780
+ class: "vue-ui-donut-arc-path",
781
+ d: t.arcSlice,
782
+ fill: u(ve)(t.color, 80),
783
+ stroke: e.value.style.chart.backgroundColor,
784
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
785
+ filter: J(a)
786
+ }, null, 8, Ol))), 256))
787
+ ], 64)) : i("", !0),
788
+ F.value && e.value.type === "polar" ? (o(), r(g, { key: 8 }, [
789
+ A.value.length > 1 ? (o(), r("g", Ml, [
790
+ (o(!0), r(g, null, S(Y.value, (t, a) => (o(), r("path", {
791
+ stroke: e.value.style.chart.backgroundColor,
792
+ d: c.value[a].path,
793
+ fill: "#FFFFFF",
794
+ style: b({
795
+ transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
796
+ })
797
+ }, null, 12, Nl))), 256)),
798
+ e.value.style.chart.layout.donut.useShadow ? (o(), r("g", Yl, [
799
+ (o(!0), r(g, null, S(Y.value, (t, a) => (o(), r("path", {
800
+ class: "vue-ui-donut-arc-path",
801
+ d: c.value[a].path,
802
+ fill: "transparent",
803
+ stroke: e.value.style.chart.backgroundColor,
804
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
805
+ filter: `url(#drop_shadow_${h.value})`,
806
+ style: b({
807
+ transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
808
+ })
809
+ }, null, 12, Xl))), 256))
810
+ ])) : i("", !0),
811
+ l.$slots.pattern ? (o(), r("g", Il, [
812
+ (o(!0), r(g, null, S(Y.value, (t, a) => (o(), r("path", {
813
+ class: "vue-ui-donut-arc-path",
814
+ d: c.value[a].path,
815
+ fill: `url(#${t.pattern})`,
816
+ stroke: e.value.style.chart.backgroundColor,
817
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
818
+ filter: J(a),
819
+ style: b({
820
+ transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
821
+ })
822
+ }, null, 12, Dl))), 256))
823
+ ])) : i("", !0),
824
+ (o(!0), r(g, null, S(Y.value, (t, a) => (o(), r("path", {
825
+ class: "vue-ui-donut-arc-path",
826
+ d: c.value[a].path,
827
+ fill: e.value.style.chart.useGradient ? `url(#polar_gradient_${a}_${h.value})` : t.color,
828
+ stroke: e.value.style.chart.backgroundColor,
829
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
830
+ filter: J(a),
831
+ style: b({
832
+ transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
833
+ })
834
+ }, null, 12, Vl))), 256))
835
+ ])) : (o(), r("g", Bl, [
836
+ l.$slots.pattern ? (o(), r("circle", {
837
+ key: 0,
838
+ cx: n.value.width / 2,
839
+ cy: n.value.height / 2,
840
+ r: x.value,
841
+ fill: `url(#pattern_${h.value}_${A.value[0].patternIndex})`,
842
+ stroke: e.value.style.chart.backgroundColor,
843
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth
844
+ }, null, 8, Gl)) : i("", !0),
845
+ y("circle", {
846
+ cx: n.value.width / 2,
847
+ cy: n.value.height / 2,
848
+ r: x.value,
849
+ fill: e.value.style.chart.useGradient ? `url(#polar_gradient_0_${h.value})` : A.value[0].color,
850
+ stroke: e.value.style.chart.backgroundColor,
851
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth
852
+ }, null, 8, Rl)
853
+ ]))
854
+ ], 64)) : (o(), r("circle", {
855
+ key: 9,
856
+ cx: n.value.width / 2,
857
+ cy: n.value.height / 2,
858
+ r: x.value <= 0 ? 10 : x.value,
859
+ fill: "transparent",
860
+ stroke: e.value.style.chart.backgroundColor
861
+ }, null, 8, Wl)),
862
+ e.value.style.chart.useGradient && e.value.type === "classic" ? (o(), r("circle", {
863
+ key: 10,
864
+ cx: n.value.width / 2,
865
+ cy: n.value.height / 2,
866
+ r: (
867
+ /* This might require adjustments */
868
+ x.value <= 0 ? 10 : x.value
869
+ ),
870
+ fill: `url(#gradient_${h.value})`
871
+ }, null, 8, El)) : i("", !0),
872
+ F.value ? (o(), r(g, { key: 11 }, [
873
+ A.value.length > 1 || e.value.type === "classic" ? (o(), r("g", Ul, [
874
+ (o(!0), r(g, null, S(A.value.filter((t) => !t.ghost), (t, a) => (o(), r("path", {
875
+ d: e.value.type === "classic" ? t.arcSlice : c.value[a].path,
876
+ fill: O.value === a ? "rgba(0,0,0,0.1)" : "transparent",
877
+ onMouseenter: (v) => qe({
878
+ datapoint: t,
879
+ relativeIndex: a,
880
+ seriesIndex: t.seriesIndex,
881
+ show: !0
882
+ }),
883
+ onMouseleave: s[0] || (s[0] = (v) => {
884
+ de.value = !1, O.value = null;
885
+ }),
886
+ onClick: (v) => H(t, a)
887
+ }, null, 40, jl))), 256))
888
+ ])) : (o(), r("g", Hl, [
889
+ y("circle", {
890
+ cx: n.value.width / 2,
891
+ cy: n.value.height / 2,
892
+ r: x.value,
893
+ fill: "transparent",
894
+ onMouseenter: s[1] || (s[1] = (t) => qe({
895
+ datapoint: A.value[0],
896
+ relativeIndex: 0,
897
+ seriesIndex: A.value[0].seriesIndex,
898
+ show: !0
899
+ })),
900
+ onMouseleave: s[2] || (s[2] = (t) => {
901
+ de.value = !1, O.value = null;
902
+ }),
903
+ onClick: s[3] || (s[3] = (t) => H(A.value[0], l.i))
904
+ }, null, 40, ql)
905
+ ]))
906
+ ], 64)) : i("", !0),
907
+ e.value.type === "classic" ? (o(), r(g, { key: 12 }, [
908
+ e.value.style.chart.layout.labels.hollow.total.show ? (o(), r("text", {
909
+ key: 0,
910
+ "text-anchor": "middle",
911
+ x: n.value.width / 2,
912
+ 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,
913
+ fill: e.value.style.chart.layout.labels.hollow.total.color,
914
+ "font-size": e.value.style.chart.layout.labels.hollow.total.fontSize,
915
+ style: b(`font-weight:${e.value.style.chart.layout.labels.hollow.total.bold ? "bold" : ""}`)
916
+ }, P(e.value.style.chart.layout.labels.hollow.total.text), 13, Jl)) : i("", !0),
917
+ e.value.style.chart.layout.labels.hollow.total.show ? (o(), r("text", {
918
+ key: 1,
919
+ "text-anchor": "middle",
920
+ x: n.value.width / 2,
921
+ 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,
922
+ fill: e.value.style.chart.layout.labels.hollow.total.value.color,
923
+ "font-size": e.value.style.chart.layout.labels.hollow.total.value.fontSize,
924
+ style: b(`font-weight:${e.value.style.chart.layout.labels.hollow.total.value.bold ? "bold" : ""}`)
925
+ }, P(u(D)(
926
+ e.value.style.chart.layout.labels.hollow.total.value.formatter,
927
+ F.value,
928
+ u(N)({
929
+ p: e.value.style.chart.layout.labels.hollow.total.value.prefix,
930
+ v: F.value,
931
+ s: e.value.style.chart.layout.labels.hollow.total.value.suffix
932
+ })
933
+ )), 13, Kl)) : i("", !0),
934
+ e.value.style.chart.layout.labels.hollow.average.show ? (o(), r("text", {
935
+ key: 2,
936
+ "text-anchor": "middle",
937
+ x: n.value.width / 2,
938
+ 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,
939
+ fill: e.value.style.chart.layout.labels.hollow.average.color,
940
+ "font-size": e.value.style.chart.layout.labels.hollow.average.fontSize,
941
+ style: b(`font-weight:${e.value.style.chart.layout.labels.hollow.average.bold ? "bold" : ""}`)
942
+ }, P(e.value.style.chart.layout.labels.hollow.average.text), 13, Ql)) : i("", !0),
943
+ e.value.style.chart.layout.labels.hollow.average.show ? (o(), r("text", {
944
+ key: 3,
945
+ "text-anchor": "middle",
946
+ x: n.value.width / 2,
947
+ 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,
948
+ fill: e.value.style.chart.layout.labels.hollow.average.value.color,
949
+ "font-size": e.value.style.chart.layout.labels.hollow.average.value.fontSize,
950
+ style: b(`font-weight:${e.value.style.chart.layout.labels.hollow.average.value.bold ? "bold" : ""}`)
951
+ }, P(q.value || T.value ? "--" : u(D)(
952
+ e.value.style.chart.layout.labels.hollow.average.value.formatter,
953
+ je.value,
954
+ u(N)({
955
+ p: e.value.style.chart.layout.labels.hollow.average.value.prefix,
956
+ v: je.value,
957
+ s: e.value.style.chart.layout.labels.hollow.average.value.suffix,
958
+ r: e.value.style.chart.layout.labels.hollow.average.value.rounding
959
+ })
960
+ )), 13, Zl)) : i("", !0)
961
+ ], 64)) : i("", !0),
962
+ (o(!0), r(g, null, S(Y.value.filter((t) => !t.ghost), (t, a) => (o(), r("g", {
963
+ filter: J(a),
964
+ class: _e({ animated: e.value.useCssAnimation })
965
+ }, [
966
+ e.value.style.chart.layout.labels.dataLabels.useLabelSlots ? (o(), r("g", ta, [
967
+ (o(), r("foreignObject", {
968
+ x: u(w)(t, !0).anchor === "end" ? u(w)(t).x - 120 : u(w)(t, !0).anchor === "middle" ? u(w)(t).x - 60 : u(w)(t).x,
969
+ y: u(ce)(t) - (Ke.value ? 20 : 0),
970
+ width: "120",
971
+ height: "60",
972
+ style: { overflow: "visible" }
973
+ }, [
974
+ y("div", null, [
975
+ p(l.$slots, "dataLabel", ot({ ref_for: !0 }, {
976
+ datapoint: t,
977
+ isBlur: !e.value.useBlurOnHover || [null, void 0].includes(O.value) || O.value === a,
978
+ isSafari: Ke.value,
979
+ isVisible: X(t) && d.value.dataLabels.show,
980
+ textAlign: u(w)(t, !0, 16, !0).anchor,
981
+ flexAlign: u(w)(t, !0, 16).anchor,
982
+ percentage: be(t, Y.value)
983
+ }), void 0, !0)
984
+ ])
985
+ ], 8, la))
986
+ ])) : (o(), r("g", aa, [
987
+ e.value.type === "classic" ? (o(), r(g, { key: 0 }, [
988
+ X(t) && d.value.dataLabels.show ? (o(), r("circle", {
989
+ key: 0,
990
+ cx: u(w)(t).x,
991
+ cy: u(ce)(t) - 3.5,
992
+ fill: t.color,
993
+ stroke: e.value.style.chart.backgroundColor,
994
+ "stroke-width": 1,
995
+ r: 3,
996
+ filter: !e.value.useBlurOnHover || [null, void 0].includes(O.value) || O.value === a ? "" : `url(#blur_${h.value})`,
997
+ onClick: (v) => H(t, a)
998
+ }, null, 8, oa)) : i("", !0)
999
+ ], 64)) : i("", !0),
1000
+ e.value.type === "polar" ? (o(), r(g, { key: 1 }, [
1001
+ X(t) && d.value.dataLabels.show ? (o(), r("circle", {
1002
+ key: 0,
1003
+ cx: u(L)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
1004
+ cy: u(L)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y,
1005
+ fill: t.color,
1006
+ stroke: e.value.style.chart.backgroundColor,
1007
+ "stroke-width": 1,
1008
+ r: 3,
1009
+ filter: !e.value.useBlurOnHover || [null, void 0].includes(O.value) || O.value === a ? "" : `url(#blur_${h.value})`,
1010
+ onClick: (v) => H(t, a),
1011
+ style: b({
1012
+ transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1013
+ })
1014
+ }, null, 12, sa)) : i("", !0)
1015
+ ], 64)) : i("", !0),
1016
+ e.value.type === "classic" ? (o(), r(g, { key: 2 }, [
1017
+ X(t) && d.value.dataLabels.show ? (o(), r("text", {
1018
+ key: 0,
1019
+ "text-anchor": u(w)(t, !0, 12).anchor,
1020
+ x: u(w)(t, !0, 12).x,
1021
+ y: u(ce)(t),
1022
+ fill: e.value.style.chart.layout.labels.percentage.color,
1023
+ "font-size": e.value.style.chart.layout.labels.percentage.fontSize,
1024
+ style: b(`font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}`),
1025
+ onClick: (v) => H(t, a)
1026
+ }, P(be(t, Y.value)) + " " + P(e.value.style.chart.layout.labels.value.show ? `(${u(D)(
1027
+ e.value.style.chart.layout.labels.value.formatter,
1028
+ t.value,
1029
+ u(N)({
1030
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
1031
+ v: t.value,
1032
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
1033
+ r: e.value.style.chart.layout.labels.value.rounding
1034
+ }),
1035
+ { datapoint: t }
1036
+ )})` : ""), 13, ua)) : i("", !0),
1037
+ X(t) && d.value.dataLabels.show ? (o(), r("text", {
1038
+ key: 1,
1039
+ "text-anchor": u(w)(t).anchor,
1040
+ x: u(w)(t, !0, 12).x,
1041
+ y: u(ce)(t) + e.value.style.chart.layout.labels.percentage.fontSize,
1042
+ fill: e.value.style.chart.layout.labels.name.color,
1043
+ "font-size": e.value.style.chart.layout.labels.name.fontSize,
1044
+ style: b(`font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}`),
1045
+ onClick: (v) => H(t, a)
1046
+ }, P(t.name), 13, na)) : i("", !0)
1047
+ ], 64)) : i("", !0),
1048
+ e.value.type === "polar" ? (o(), r(g, { key: 3 }, [
1049
+ X(t) && d.value.dataLabels.show ? (o(), r("text", {
1050
+ key: 0,
1051
+ "text-anchor": le(c.value[a].middlePoint),
1052
+ x: u(L)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
1053
+ y: u(L)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y,
1054
+ fill: e.value.style.chart.layout.labels.percentage.color,
1055
+ "font-size": e.value.style.chart.layout.labels.percentage.fontSize,
1056
+ style: b({
1057
+ transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1058
+ fontWeight: e.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"
1059
+ }),
1060
+ onClick: (v) => H(t, a)
1061
+ }, P(be(t, Y.value)) + " " + P(e.value.style.chart.layout.labels.value.show ? `(${u(D)(
1062
+ e.value.style.chart.layout.labels.value.formatter,
1063
+ t.value,
1064
+ u(N)({
1065
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
1066
+ v: t.value,
1067
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
1068
+ r: e.value.style.chart.layout.labels.value.rounding
1069
+ }),
1070
+ { datapoint: t }
1071
+ )})` : ""), 13, ra)) : i("", !0),
1072
+ X(t) && d.value.dataLabels.show ? (o(), r("text", {
1073
+ key: 1,
1074
+ "text-anchor": le(c.value[a].middlePoint),
1075
+ x: u(L)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
1076
+ y: u(L)({ initX: c.value[a].middlePoint.x, initY: c.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,
1077
+ fill: e.value.style.chart.layout.labels.name.color,
1078
+ "font-size": e.value.style.chart.layout.labels.name.fontSize,
1079
+ style: b({
1080
+ transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1081
+ fontWeight: e.value.style.chart.layout.labels.name.bold ? "bold" : "normal"
1082
+ }),
1083
+ onClick: (v) => H(t, a)
1084
+ }, P(t.name), 13, ia)) : i("", !0)
1085
+ ], 64)) : i("", !0)
1086
+ ])),
1087
+ d.value.dataLabels.show && e.value.style.chart.comments.show && t.comment ? (o(), r("g", va, [
1088
+ X(t) && e.value.type === "classic" ? (o(), r("foreignObject", {
1089
+ key: 0,
1090
+ x: e.value.style.chart.comments.offsetX + (u(w)(t, !0).anchor === "end" ? u(w)(t).x - e.value.style.chart.comments.width : u(w)(t, !0).anchor === "middle" ? u(w)(t).x - e.value.style.chart.comments.width / 2 : u(w)(t).x),
1091
+ y: u(ce)(t) + 24 + e.value.style.chart.comments.offsetY,
1092
+ width: e.value.style.chart.comments.width,
1093
+ height: "200",
1094
+ style: { overflow: "visible", "pointer-events": "none" }
1095
+ }, [
1096
+ y("div", null, [
1097
+ p(l.$slots, "plot-comment", {
1098
+ plot: { ...t, textAlign: u(w)(t, !0, 16, !0).anchor, flexAlign: u(w)(t, !0, 16).anchor, isFirstLoad: T.value }
1099
+ }, void 0, !0)
1100
+ ])
1101
+ ], 8, ca)) : i("", !0),
1102
+ X(t) && e.value.type === "polar" ? (o(), r("foreignObject", {
1103
+ key: 1,
1104
+ x: e.value.style.chart.comments.offsetX + (le(c.value[a].middlePoint) === "end" ? u(L)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x - e.value.style.chart.comments.width : le(c.value[a].middlePoint) === "middle" ? u(L)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x - e.value.style.chart.comments.width / 2 : u(L)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x),
1105
+ y: Ft(c.value[a]) + e.value.style.chart.comments.offsetY,
1106
+ width: e.value.style.chart.comments.width,
1107
+ height: "200",
1108
+ style: b({
1109
+ transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1110
+ overflow: "visible",
1111
+ pointerEvents: "none"
1112
+ })
1113
+ }, [
1114
+ y("div", null, [
1115
+ p(l.$slots, "plot-comment", {
1116
+ plot: { ...t, textAlign: le(c.value[a].middlePoint), flexAlign: le(c.value[a].middlePoint), isFirstLoad: T.value }
1117
+ }, void 0, !0)
1118
+ ])
1119
+ ], 12, da)) : i("", !0)
1120
+ ])) : i("", !0)
1121
+ ], 10, ea))), 256)),
1122
+ p(l.$slots, "svg", { svg: n.value }, void 0, !0)
1123
+ ], 14, rl)) : i("", !0),
1124
+ l.$slots.watermark ? (o(), r("div", ha, [
1125
+ p(l.$slots, "watermark", oe(se({ isPrinting: u(Ie) || u(De) })), void 0, !0)
1126
+ ])) : i("", !0),
1127
+ ue.value ? i("", !0) : (o(), Q(u(pt), {
1128
+ key: 6,
1129
+ config: {
1130
+ type: "donut",
1131
+ style: {
1132
+ backgroundColor: e.value.style.chart.backgroundColor,
1133
+ donut: {
1134
+ color: "#CCCCCC",
1135
+ strokeWidth: te.value * 0.8
1136
+ }
1137
+ }
1138
+ }
1139
+ }, null, 8, ["config"])),
1140
+ y("div", {
1141
+ ref_key: "chartLegend",
1142
+ ref: Te
1143
+ }, [
1144
+ e.value.style.chart.legend.show ? (o(), Q(al, {
1145
+ key: `legend_${Le.value}`,
1146
+ legendSet: Ue.value,
1147
+ config: At.value,
1148
+ onClickMarker: s[4] || (s[4] = ({ i: t }) => Ee(t))
1149
+ }, at({
1150
+ item: C(({ legend: t, index: a }) => [
1151
+ y("div", {
1152
+ style: b(`opacity:${V.value.includes(a) ? 0.5 : 1}`),
1153
+ onClick: (v) => t.segregate()
1154
+ }, [
1155
+ st(P(t.name) + ": " + P(u(D)(
1156
+ e.value.style.chart.layout.labels.value.formatter,
1157
+ t.value,
1158
+ u(N)({
1159
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
1160
+ v: t.value,
1161
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
1162
+ r: e.value.style.chart.legend.roundingValue
1163
+ }),
1164
+ {
1165
+ datapoint: t,
1166
+ index: a
1167
+ }
1168
+ )) + " ", 1),
1169
+ V.value.includes(a) ? (o(), r("span", pa, " ( " + P(zt(t.proportion * 100)) + " % ) ", 1)) : (o(), r("span", fa, " (" + P(isNaN(t.value / F.value) ? "-" : u(D)(
1170
+ e.value.style.chart.layout.labels.percentage.formatter,
1171
+ He.value(t),
1172
+ u(N)({
1173
+ v: He.value(t),
1174
+ s: "%",
1175
+ r: e.value.style.chart.legend.roundingPercentage
1176
+ })
1177
+ )) + ") ", 1))
1178
+ ], 12, ya)
1179
+ ]),
1180
+ _: 2
1181
+ }, [
1182
+ l.$slots.pattern ? {
1183
+ name: "legend-pattern",
1184
+ fn: C(({ legend: t, index: a }) => [
1185
+ xe(sl, {
1186
+ shape: t.shape,
1187
+ radius: 30,
1188
+ stroke: "none",
1189
+ plot: { x: 30, y: 30 },
1190
+ fill: `url(#pattern_${h.value}_${a})`
1191
+ }, null, 8, ["shape", "fill"])
1192
+ ]),
1193
+ key: "0"
1194
+ } : void 0
1195
+ ]), 1032, ["legendSet", "config"])) : i("", !0),
1196
+ p(l.$slots, "legend", { legend: Ue.value }, void 0, !0)
1197
+ ], 512),
1198
+ l.$slots.source ? (o(), r("div", {
1199
+ key: 7,
1200
+ ref_key: "source",
1201
+ ref: Pe,
1202
+ dir: "auto"
1203
+ }, [
1204
+ p(l.$slots, "source", {}, void 0, !0)
1205
+ ], 512)) : i("", !0),
1206
+ xe(u(gt), {
1207
+ show: d.value.showTooltip && de.value,
1208
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1209
+ color: e.value.style.chart.tooltip.color,
1210
+ fontSize: e.value.style.chart.tooltip.fontSize,
1211
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
1212
+ borderColor: e.value.style.chart.tooltip.borderColor,
1213
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
1214
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1215
+ position: e.value.style.chart.tooltip.position,
1216
+ offsetY: e.value.style.chart.tooltip.offsetY,
1217
+ parent: ne.value,
1218
+ content: pe.value,
1219
+ isCustom: re.value,
1220
+ isFullscreen: ae.value
1221
+ }, {
1222
+ "tooltip-before": C(() => [
1223
+ p(l.$slots, "tooltip-before", oe(se({ ...we.value })), void 0, !0)
1224
+ ]),
1225
+ "tooltip-after": C(() => [
1226
+ p(l.$slots, "tooltip-after", oe(se({ ...we.value })), void 0, !0)
1227
+ ]),
1228
+ _: 3
1229
+ }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen"]),
1230
+ ue.value ? (o(), Q(u(dt), {
1231
+ key: 8,
1232
+ hideDetails: "",
1233
+ config: {
1234
+ open: d.value.showTable,
1235
+ maxHeight: 1e4,
1236
+ body: {
1237
+ backgroundColor: e.value.style.chart.backgroundColor,
1238
+ color: e.value.style.chart.color
1239
+ },
1240
+ head: {
1241
+ backgroundColor: e.value.style.chart.backgroundColor,
1242
+ color: e.value.style.chart.color
1243
+ }
1244
+ }
1245
+ }, {
1246
+ content: C(() => [
1247
+ (o(), Q(u(ht), {
1248
+ key: `table_${Se.value}`,
1249
+ colNames: he.value.colNames,
1250
+ head: he.value.head,
1251
+ body: he.value.body,
1252
+ config: he.value.config,
1253
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
1254
+ onClose: s[5] || (s[5] = (t) => d.value.showTable = !1)
1255
+ }, {
1256
+ th: C(({ th: t }) => [
1257
+ y("div", {
1258
+ innerHTML: t,
1259
+ style: { display: "flex", "align-items": "center" }
1260
+ }, null, 8, ga)
1261
+ ]),
1262
+ td: C(({ td: t }) => [
1263
+ st(P(t.name ? t.name : isNaN(Number(t)) ? t.includes("%") ? t : u(D)(
1264
+ e.value.style.chart.layout.labels.percentage.formatter,
1265
+ t,
1266
+ u(N)({
1267
+ v: t,
1268
+ s: "%",
1269
+ r: e.value.style.chart.layout.labels.percentage.rounding
1270
+ })
1271
+ ) : u(D)(
1272
+ e.value.style.chart.layout.labels.value.formatter,
1273
+ t,
1274
+ u(N)({
1275
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
1276
+ v: t,
1277
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
1278
+ r: e.value.style.chart.layout.labels.value.rounding
1279
+ })
1280
+ )), 1)
1281
+ ]),
1282
+ _: 1
1283
+ }, 8, ["colNames", "head", "body", "config", "title"]))
1284
+ ]),
1285
+ _: 1
1286
+ }, 8, ["config"])) : i("", !0)
1287
+ ], 46, nl));
1288
+ }
1289
+ }, Sa = /* @__PURE__ */ ul(ma, [["__scopeId", "data-v-ce420fe5"]]);
1290
+ export {
1291
+ Sa as default
1292
+ };