vue-data-ui 3.9.11 → 3.9.13

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 (164) hide show
  1. package/dist/{Arrow-Cbn8f8m4.js → Arrow-f1dKmuRH.js} +1 -1
  2. package/dist/{BaseDraggableDialog-C167SnU0.js → BaseDraggableDialog-CAJxIF6g.js} +2 -2
  3. package/dist/{BaseIcon-r3_sTK1A.js → BaseIcon-4i3dd7Ty.js} +1 -1
  4. package/dist/{BaseZoomControls-D8N7fb-c.js → BaseZoomControls-C0H509ZF.js} +6 -6
  5. package/dist/{ColorPicker-Bq2C5Dll.js → ColorPicker-B9oF4-O6.js} +8 -8
  6. package/dist/{DataTable-DNeCys3I.js → DataTable-WrXCJkfE.js} +2 -2
  7. package/dist/{Legend-Dxz13z4E.js → Legend-D6z73edh.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-ZnkWbBri.js → NonSvgPenAndPaper-7clRuQVF.js} +11 -11
  9. package/dist/{PackageVersion-DPLuuWzw.js → PackageVersion-D3cMhAlf.js} +1 -1
  10. package/dist/{PenAndPaper-CsqBamFZ.js → PenAndPaper-DxIUvoQ8.js} +17 -17
  11. package/dist/{Shape-_iTOIp3x.js → Shape-DAHhCEdg.js} +1 -1
  12. package/dist/{Slicer-DBYna_by.js → Slicer-Bn8azYkD.js} +70 -70
  13. package/dist/{SlicerPreview-pHjYklxh.js → SlicerPreview-oV3dMuV1.js} +2 -2
  14. package/dist/{SparkTooltip-BaSHhfes.js → SparkTooltip-D7iYVquk.js} +3 -3
  15. package/dist/{Title-DFtCaCah.js → Title-BhURirpm.js} +1 -1
  16. package/dist/{Tooltip-B79qvriT.js → Tooltip-TDyKgLB6.js} +1 -1
  17. package/dist/{UserOptions-B-2A_KRb.js → UserOptions-CzJWRC4s.js} +2 -2
  18. package/dist/components/arrow.js +1 -1
  19. package/dist/components/vue-ui-3d-bar.js +1 -1
  20. package/dist/components/vue-ui-accordion.js +1 -1
  21. package/dist/components/vue-ui-age-pyramid.js +1 -1
  22. package/dist/components/vue-ui-annotator.js +1 -1
  23. package/dist/components/vue-ui-bullet.js +1 -1
  24. package/dist/components/vue-ui-candlestick.js +1 -1
  25. package/dist/components/vue-ui-carousel-table.js +1 -1
  26. package/dist/components/vue-ui-chestnut.js +1 -1
  27. package/dist/components/vue-ui-chord.js +1 -1
  28. package/dist/components/vue-ui-circle-pack.js +1 -1
  29. package/dist/components/vue-ui-cursor.js +1 -1
  30. package/dist/components/vue-ui-dag.js +1 -1
  31. package/dist/components/vue-ui-dashboard.js +1 -1
  32. package/dist/components/vue-ui-digits.js +1 -1
  33. package/dist/components/vue-ui-donut-evolution.js +1 -1
  34. package/dist/components/vue-ui-donut.js +1 -1
  35. package/dist/components/vue-ui-dumbbell.js +1 -1
  36. package/dist/components/vue-ui-flow.js +1 -1
  37. package/dist/components/vue-ui-funnel.js +1 -1
  38. package/dist/components/vue-ui-galaxy.js +1 -1
  39. package/dist/components/vue-ui-gauge.js +1 -1
  40. package/dist/components/vue-ui-geo.js +1 -1
  41. package/dist/components/vue-ui-gizmo.js +1 -1
  42. package/dist/components/vue-ui-heatmap.js +1 -1
  43. package/dist/components/vue-ui-history-plot.js +1 -1
  44. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  45. package/dist/components/vue-ui-icon.js +1 -1
  46. package/dist/components/vue-ui-kpi.js +1 -1
  47. package/dist/components/vue-ui-mini-loader.js +1 -1
  48. package/dist/components/vue-ui-molecule.js +1 -1
  49. package/dist/components/vue-ui-mood-radar.js +1 -1
  50. package/dist/components/vue-ui-nested-donuts.js +1 -1
  51. package/dist/components/vue-ui-onion.js +1 -1
  52. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  53. package/dist/components/vue-ui-quadrant.js +1 -1
  54. package/dist/components/vue-ui-quick-chart.js +1 -1
  55. package/dist/components/vue-ui-radar.js +1 -1
  56. package/dist/components/vue-ui-rating.js +1 -1
  57. package/dist/components/vue-ui-relation-circle.js +1 -1
  58. package/dist/components/vue-ui-ridgeline.js +1 -1
  59. package/dist/components/vue-ui-rings.js +1 -1
  60. package/dist/components/vue-ui-scatter.js +1 -1
  61. package/dist/components/vue-ui-skeleton.js +1 -1
  62. package/dist/components/vue-ui-smiley.js +1 -1
  63. package/dist/components/vue-ui-spark-trend.js +1 -1
  64. package/dist/components/vue-ui-sparkbar.js +1 -1
  65. package/dist/components/vue-ui-sparkgauge.js +1 -1
  66. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  67. package/dist/components/vue-ui-sparkline.js +1 -1
  68. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  69. package/dist/components/vue-ui-stackbar.js +1 -1
  70. package/dist/components/vue-ui-stackline.js +1 -1
  71. package/dist/components/vue-ui-strip-plot.js +1 -1
  72. package/dist/components/vue-ui-table-heatmap.js +1 -1
  73. package/dist/components/vue-ui-table-sparkline.js +1 -1
  74. package/dist/components/vue-ui-table.js +1 -1
  75. package/dist/components/vue-ui-thermometer.js +1 -1
  76. package/dist/components/vue-ui-timer.js +1 -1
  77. package/dist/components/vue-ui-tiremarks.js +1 -1
  78. package/dist/components/vue-ui-treemap.js +1 -1
  79. package/dist/components/vue-ui-vertical-bar.js +1 -1
  80. package/dist/components/vue-ui-waffle.js +1 -1
  81. package/dist/components/vue-ui-wheel.js +1 -1
  82. package/dist/components/vue-ui-word-cloud.js +1 -1
  83. package/dist/components/vue-ui-world.js +1 -1
  84. package/dist/components/vue-ui-xy-canvas.js +1 -1
  85. package/dist/components/vue-ui-xy.js +1 -1
  86. package/dist/{dom-to-png-Cm7R2Zu2.js → dom-to-png-C2K57N1M.js} +1 -1
  87. package/dist/{img-BJzUSmkm.js → img-DKigoPDs.js} +1 -1
  88. package/dist/labelUtils-PMU3ZGCb.js +30 -0
  89. package/dist/{lib-W9waxHL3.js → lib-BwysEpWI.js} +81 -77
  90. package/dist/{pdf-BJR-8Moh.js → pdf-BHGnVnBG.js} +1 -1
  91. package/dist/style.css +1 -1
  92. package/dist/types/vue-data-ui.d.ts +20 -0
  93. package/dist/{useAutoSizeLabelsInsideViewbox-DAdqpHf1.js → useAutoSizeLabelsInsideViewbox-DO2dxQ78.js} +1 -1
  94. package/dist/{useNestedProp-D-jUHecl.js → useNestedProp--5lL-kf1.js} +209 -197
  95. package/dist/{usePrinter-DhoMn87n.js → usePrinter-BJzHDpYF.js} +2 -2
  96. package/dist/{vue-data-ui-B2w3blNC.js → vue-data-ui-DE3O1T8n.js} +67 -67
  97. package/dist/vue-data-ui.js +83 -83
  98. package/dist/{vue-ui-3d-bar-Cpp-5jo0.js → vue-ui-3d-bar-CVvhPzdH.js} +6 -6
  99. package/dist/{vue-ui-accordion-B6BX2vhq.js → vue-ui-accordion-tQNKwbVi.js} +3 -3
  100. package/dist/{vue-ui-age-pyramid-BH8z1r48.js → vue-ui-age-pyramid-DxTHqM7w.js} +25 -25
  101. package/dist/{vue-ui-annotator-DB6dpuUU.js → vue-ui-annotator-Da5aL57a.js} +7 -7
  102. package/dist/{vue-ui-bullet-CmLA4Lxs.js → vue-ui-bullet-DhpTML7L.js} +22 -22
  103. package/dist/{vue-ui-candlestick-IspjAN-a.js → vue-ui-candlestick-BDOKQqMm.js} +85 -85
  104. package/dist/{vue-ui-carousel-table-9mdO6mvP.js → vue-ui-carousel-table-BW6bKPsX.js} +13 -13
  105. package/dist/{vue-ui-chestnut-CC1bTcaA.js → vue-ui-chestnut-Cc-lke6P.js} +31 -31
  106. package/dist/{vue-ui-chord-B0pp0mDm.js → vue-ui-chord-CB6w31Ex.js} +8 -8
  107. package/dist/{vue-ui-circle-pack-CWhq37at.js → vue-ui-circle-pack-CfihOmNV.js} +6 -6
  108. package/dist/{vue-ui-cursor-DOWNTk2K.js → vue-ui-cursor-Dnpe76BQ.js} +3 -3
  109. package/dist/{vue-ui-dag-DlLdvPIA.js → vue-ui-dag-Dq3hKon7.js} +7 -7
  110. package/dist/{vue-ui-dashboard-BRAyn8IO.js → vue-ui-dashboard-eMwyGsuD.js} +68 -68
  111. package/dist/{vue-ui-digits-DQz1eJc-.js → vue-ui-digits-B5QhIbFD.js} +2 -2
  112. package/dist/vue-ui-donut-D3---CiY.js +2082 -0
  113. package/dist/{vue-ui-donut-evolution-C95OcKhs.js → vue-ui-donut-evolution-C6H1Vr6m.js} +8 -8
  114. package/dist/{vue-ui-dumbbell-L8fXdkQm.js → vue-ui-dumbbell-L1p0npq4.js} +33 -33
  115. package/dist/{vue-ui-flow-CPnYumnP.js → vue-ui-flow-CgAIlvZF.js} +38 -38
  116. package/dist/{vue-ui-funnel-BPnUog47.js → vue-ui-funnel-CpgqO34n.js} +6 -6
  117. package/dist/{vue-ui-galaxy-BjtDkIAw.js → vue-ui-galaxy-DAi1I2Cr.js} +316 -291
  118. package/dist/{vue-ui-gauge-CHqgIzG0.js → vue-ui-gauge-DY78U-uO.js} +7 -7
  119. package/dist/{vue-ui-geo-C3O4GHZF.js → vue-ui-geo-Befu6fkT.js} +20 -20
  120. package/dist/{vue-ui-gizmo-Dr0gsAOM.js → vue-ui-gizmo-BM_oOeYY.js} +3 -3
  121. package/dist/{vue-ui-heatmap-BBshmoO7.js → vue-ui-heatmap-C_ze3bzX.js} +80 -80
  122. package/dist/{vue-ui-history-plot-BiUyd40D.js → vue-ui-history-plot-C-_zpLPH.js} +50 -50
  123. package/dist/{vue-ui-horizontal-bar-BDtke67D.js → vue-ui-horizontal-bar-DvLMeP44.js} +47 -47
  124. package/dist/{vue-ui-kpi-BnCqocoi.js → vue-ui-kpi-IcOqABQz.js} +3 -3
  125. package/dist/{vue-ui-mini-loader-Dzqusv9i.js → vue-ui-mini-loader-DxlOXn6v.js} +2 -2
  126. package/dist/{vue-ui-molecule-DH-sHfQ-.js → vue-ui-molecule-N938wMMB.js} +5 -5
  127. package/dist/{vue-ui-mood-radar-BWASgbMe.js → vue-ui-mood-radar-D1hHnpLB.js} +7 -7
  128. package/dist/{vue-ui-nested-donuts-4ey-UxN-.js → vue-ui-nested-donuts-DeTGEb4T.js} +597 -595
  129. package/dist/{vue-ui-onion-40DoblSj.js → vue-ui-onion-BwY998zT.js} +376 -332
  130. package/dist/{vue-ui-parallel-coordinate-plot-BIV0-SLG.js → vue-ui-parallel-coordinate-plot-B4v3AheY.js} +43 -43
  131. package/dist/{vue-ui-quadrant-Dvuwg4h7.js → vue-ui-quadrant-4f1p9gSO.js} +8 -8
  132. package/dist/{vue-ui-quick-chart-CZgZOWsW.js → vue-ui-quick-chart-CGbEBTS1.js} +52 -52
  133. package/dist/{vue-ui-radar-BfoE3AZN.js → vue-ui-radar-B15r4HoM.js} +57 -57
  134. package/dist/{vue-ui-rating-BciQHmzs.js → vue-ui-rating-CaRZVE71.js} +2 -2
  135. package/dist/{vue-ui-relation-circle-EVMDQTCn.js → vue-ui-relation-circle-CFEL1uYt.js} +7 -7
  136. package/dist/{vue-ui-ridgeline-BO-JV7Qz.js → vue-ui-ridgeline-LGH61-xE.js} +8 -8
  137. package/dist/{vue-ui-rings-B0wMY8Cu.js → vue-ui-rings-DNdUdKax.js} +270 -246
  138. package/dist/{vue-ui-scatter-CyjpTjlf.js → vue-ui-scatter-Duxs0Ie_.js} +8 -8
  139. package/dist/{vue-ui-skeleton-C8Aq8dTp.js → vue-ui-skeleton-UoBAzUyN.js} +3 -3
  140. package/dist/{vue-ui-smiley-C0Bqip2_.js → vue-ui-smiley-BhpJbcM8.js} +2 -2
  141. package/dist/{vue-ui-spark-trend-B1pD2N9Z.js → vue-ui-spark-trend-2c75iF9Y.js} +96 -96
  142. package/dist/{vue-ui-sparkbar-DFlGdgrX.js → vue-ui-sparkbar-B2E5nzBF.js} +3 -3
  143. package/dist/{vue-ui-sparkgauge-BMRbWZ_X.js → vue-ui-sparkgauge-DFkpaMkk.js} +13 -13
  144. package/dist/{vue-ui-sparkhistogram-jI9-0GyS.js → vue-ui-sparkhistogram-K6lo-KnY.js} +4 -4
  145. package/dist/{vue-ui-sparkline-DLB7uHga.js → vue-ui-sparkline-CsByZZt4.js} +11 -11
  146. package/dist/{vue-ui-sparkstackbar-E8mYJ8eg.js → vue-ui-sparkstackbar-ByUb6nk-.js} +3 -3
  147. package/dist/{vue-ui-stackbar-zhHYnvVo.js → vue-ui-stackbar-D7SnQvr4.js} +41 -41
  148. package/dist/{vue-ui-stackline-rFr4hLbc.js → vue-ui-stackline-BnRxf3k_.js} +130 -130
  149. package/dist/{vue-ui-strip-plot-DA8uwUaL.js → vue-ui-strip-plot-CJWXdisu.js} +28 -28
  150. package/dist/{vue-ui-table-CldDVgkf.js → vue-ui-table-BHWwypkc.js} +27 -27
  151. package/dist/{vue-ui-table-heatmap-CDnzIKGy.js → vue-ui-table-heatmap-DvHKKwJA.js} +12 -12
  152. package/dist/{vue-ui-table-sparkline-D3XfL4kK.js → vue-ui-table-sparkline-uK0q-dO9.js} +11 -11
  153. package/dist/{vue-ui-thermometer-CU86DLRC.js → vue-ui-thermometer-Bxn0JNeJ.js} +31 -31
  154. package/dist/{vue-ui-timer-CPZBXUbs.js → vue-ui-timer-7o5Jrxf3.js} +5 -5
  155. package/dist/{vue-ui-tiremarks-CLiEtCKe.js → vue-ui-tiremarks-DHoUaHOe.js} +6 -6
  156. package/dist/{vue-ui-treemap-Dht5s1nE.js → vue-ui-treemap-B_4cIAAI.js} +51 -51
  157. package/dist/{vue-ui-waffle-BQM8XJln.js → vue-ui-waffle-CddfqNWD.js} +381 -352
  158. package/dist/{vue-ui-wheel-CX-gWpDL.js → vue-ui-wheel-CGYJA-33.js} +6 -6
  159. package/dist/{vue-ui-word-cloud-dolAsuyP.js → vue-ui-word-cloud-oszTieHn.js} +32 -32
  160. package/dist/{vue-ui-world-su4gjhTo.js → vue-ui-world-DQjHEyKe.js} +31 -31
  161. package/dist/{vue-ui-xy-BSBAegJ1.js → vue-ui-xy-D5A8tR-O.js} +9 -9
  162. package/dist/{vue-ui-xy-canvas-9tgX_s2v.js → vue-ui-xy-canvas-Bzd8pZdH.js} +100 -100
  163. package/package.json +1 -1
  164. package/dist/vue-ui-donut-BjSuCwQE.js +0 -2078
@@ -1,2078 +0,0 @@
1
- import { computed as g, defineAsyncComponent as Me, useSlots as Vl, shallowRef as Fe, ref as k, onMounted as al, onBeforeUnmount as ol, toRefs as Ul, watch as Re, createElementBlock as i, openBlock as u, normalizeStyle as I, normalizeClass as Rt, createBlock as Pe, createCommentVNode as f, renderSlot as w, createElementVNode as b, createVNode as kt, unref as n, withCtx as x, normalizeProps as oe, guardReactiveProps as ne, createSlots as Vt, Fragment as _, renderList as W, mergeProps as Ut, toDisplayString as de, withDirectives as Ct, vShow as xt, Teleport as Hl, resolveDynamicComponent as Gl, createTextVNode as nl, nextTick as jl } from "vue";
2
- import { o as sl, g as Ht, k as ql, c as Wl, t as Ql, j as Jl, T as Kl, l as ul, p as Ee, a as ee, d as Q, a2 as rl, at as Zl, X as ea, s as $t, h as ta, a3 as la, ab as z, a4 as xe, a5 as A, aq as il, f as aa, i as oa, a0 as Gt, u as na, q as sa, x as ua, af as cl, au as ra } from "./lib-W9waxHL3.js";
3
- import { t as ia, u as ca } from "./useResponsive-DfdjqQps.js";
4
- import { u as va, a as jt } from "./useNestedProp-D-jUHecl.js";
5
- import { u as da } from "./usePrinter-DhoMn87n.js";
6
- import { u as ha, B as fa } from "./BaseScanner-BMpwQAfz.js";
7
- import { u as ya } from "./useSvgExport-ByUukOZt.js";
8
- import { u as ga } from "./useThemeCheck-DGJ31Vi5.js";
9
- import { u as pa } from "./useUserOptionState-BIvW1Kz7.js";
10
- import { u as ba } from "./useChartAccessibility-9icAAmYg.js";
11
- import ma from "./img-BJzUSmkm.js";
12
- import { _ as wa } from "./Shape-_iTOIp3x.js";
13
- import ka from "./Title-DFtCaCah.js";
14
- import Ca from "./Legend-Dxz13z4E.js";
15
- import { _ as xa } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
- function $a(at) {
17
- const {
18
- FINAL_CONFIG: ot,
19
- noGhostDonut: At,
20
- svg: Ve,
21
- padding: nt,
22
- labels_inline_fontSize: _t,
23
- minSize: st,
24
- findArcMidpoint: Tt,
25
- calcMarkerOffsetX: Lt,
26
- calcMarkerOffsetY: St,
27
- animatingIndex: Mt,
28
- segregated: Ft,
29
- isSmallArc: Pt
30
- } = at;
31
- return { smallArcLayoutsClassic: g(() => {
32
- if (ot.value.type !== "classic") return {};
33
- const Ue = {}, $ = At.value || [];
34
- if (!$.length) return Ue;
35
- const D = Ve.value.width / 2, T = Ve.value.height / 2, Ie = nt.value.top + 16, ut = Ve.value.height - nt.value.bottom - 16, He = _t.value, rt = He / 3, it = He * 1.5, se = 8, me = 6, Ge = D - (st.value + me), je = D + (st.value + me), ct = !!ot.value.style.chart.layout.curvedMarkers;
36
- function vt({ midX: h, midY: y, bandX: p, bandY: c }) {
37
- if (!ct)
38
- return `M ${h} ${y} L ${h} ${c} L ${p} ${c}`;
39
- const L = p < D ? -1 : 1, R = p - h, S = c - y, re = Math.sqrt(R * R + S * S) || 1, we = h - D, e = y - T, ie = Math.sqrt(we * we + e * e) || 1, J = we / ie, he = e / ie, M = ie + 9;
40
- function ke({ x: ze, y: Ae }) {
41
- const le = ze - D, ae = Ae - T, _e = Math.sqrt(le * le + ae * ae) || 1;
42
- if (_e >= M) return { x: ze, y: Ae };
43
- const Te = M / _e;
44
- return {
45
- x: D + le * Te,
46
- y: T + ae * Te
47
- };
48
- }
49
- if (re < 56) {
50
- const ze = R / re;
51
- let le = -(S / re), ae = ze;
52
- const _e = (h + p) * 0.5, Te = (y + c) * 0.5, bt = _e + le, Je = Te + ae, m = (bt - D) * (bt - D) + (Je - T) * (Je - T), s = _e - le, ye = Te - ae;
53
- (s - D) * (s - D) + (ye - T) * (ye - T) > m && (le = -le, ae = -ae);
54
- const X = 0.78, H = h + R * X, Bt = y + S * X, O = Math.max(0, Math.min(1, (re - 18) / 44)), ce = O * O * (3 - 2 * O);
55
- let ve = 2.5 + ce * 4, Ke = 1 + ce * 2.5;
56
- ve *= 0.9;
57
- const Xe = {
58
- x: H + le * ve + J * Ke,
59
- y: Bt + ae * ve + he * Ke
60
- }, Ze = ke(Xe);
61
- return `M ${h} ${y} Q ${Ze.x} ${Ze.y} ${p} ${c}`;
62
- }
63
- let te = re * 0.34;
64
- te < 20 && (te = 20), te > 46 && (te = 46);
65
- let Be = re * 0.46;
66
- Be < 22 && (Be = 22), Be > 70 && (Be = 70);
67
- const Qe = {
68
- x: h + J * te,
69
- y: y + he * te
70
- }, yt = D + L * Math.max(Math.abs(p - D), M), gt = {
71
- x: p - L * Math.min(Be, Math.abs(yt - p) * 0.75),
72
- y: c
73
- }, fe = ke(Qe), pt = ke(gt);
74
- return `M ${h} ${y} C ${fe.x} ${fe.y} ${pt.x} ${pt.y} ${p} ${c}`;
75
- }
76
- function dt(h) {
77
- const y = String(h ?? "").split(/\n/g), p = Math.max(0, y.length - 1), c = He * 1.2, L = p * c;
78
- return it + L;
79
- }
80
- function ht({ arc: h, index: y }) {
81
- const { x: p, y: c } = Tt(h.path), L = Lt(h).x, R = St(h) - 3.5, S = dt(h.name);
82
- return {
83
- arc: h,
84
- index: y,
85
- midX: p,
86
- midY: c,
87
- inlineMarkerX: L,
88
- inlineMarkerY: R,
89
- labelHeight: S
90
- };
91
- }
92
- function De(h) {
93
- const { arc: y } = h, p = y.seriesIndex ?? 0;
94
- return Mt.value === p || Ft.value.includes(p) ? !1 : Pt(y, p);
95
- }
96
- function qe(h) {
97
- const y = h.inlineMarkerY < T, p = h.inlineMarkerX < D;
98
- return y && p ? "TL" : y && !p ? "TR" : !y && p ? "BL" : "BR";
99
- }
100
- function $e(h, y) {
101
- if (y.startsWith("T")) {
102
- h.sort((c, L) => c.inlineMarkerY - L.inlineMarkerY || c.index - L.index);
103
- return;
104
- }
105
- h.sort((c, L) => L.inlineMarkerY - c.inlineMarkerY || c.index - L.index);
106
- }
107
- function E({ side: h, markerX: y, markerY: p, labelY: c, connectorPath: L }) {
108
- return {
109
- side: h,
110
- labelX: h === "left" ? y - se : y + se,
111
- labelY: c + rt,
112
- textAnchor: h === "left" ? "end" : "start",
113
- markerX: y,
114
- markerY: p,
115
- connectorPath: L
116
- };
117
- }
118
- function ue({
119
- candidateList: h,
120
- side: y,
121
- bandMarkerX: p,
122
- startY: c,
123
- direction: L
124
- }) {
125
- let R = c;
126
- h.forEach((S) => {
127
- const { index: re, midX: we, midY: e, labelHeight: ie } = S;
128
- let J;
129
- L === "down" ? (J = R, R += ie) : (R -= ie, J = R);
130
- const he = J, ft = vt({
131
- midX: we,
132
- midY: e,
133
- bandX: p,
134
- bandY: he
135
- });
136
- Ue[re] = E({
137
- side: y,
138
- markerX: p,
139
- markerY: he,
140
- labelY: J,
141
- connectorPath: ft
142
- });
143
- });
144
- }
145
- const We = $.map((h, y) => ht({ arc: h, index: y })).filter(De), B = {
146
- TL: [],
147
- TR: [],
148
- BL: [],
149
- BR: []
150
- };
151
- return We.forEach((h) => {
152
- B[qe(h)].push(h);
153
- }), Object.keys(B).forEach((h) => {
154
- $e(B[h], h);
155
- }), ue({
156
- candidateList: B.TL,
157
- side: "left",
158
- bandMarkerX: Ge,
159
- startY: Ie,
160
- direction: "down"
161
- }), ue({
162
- candidateList: B.TR,
163
- side: "right",
164
- bandMarkerX: je,
165
- startY: Ie,
166
- direction: "down"
167
- }), B.BL.length > 1 && ue({
168
- candidateList: B.BL,
169
- side: "left",
170
- bandMarkerX: Ge,
171
- startY: ut,
172
- direction: "up"
173
- }), B.BR.length > 1 && ue({
174
- candidateList: B.BR,
175
- side: "right",
176
- bandMarkerX: je,
177
- startY: ut,
178
- direction: "up"
179
- }), Ue;
180
- }) };
181
- }
182
- const vl = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", layout: { labels: { percentage: { color: "#CCCCCC" }, name: { color: "#CCCCCC" }, hollow: { total: { color: "#CCCCCC", value: { color: "#CCCCCC" } }, average: { color: "#CCCCCC", value: { color: "#CCCCCC" } } } } }, legend: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, title: { color: "#CCCCCC", subtitle: { color: "#757575" } }, tooltip: { backgroundColor: "#1A1A1A", backgroundOpacity: 70, color: "#CCCCCC", borderColor: "#5A5A5A" } } }, table: { th: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, td: { backgroundColor: "#1A1A1A", color: "#CCCCCC" } } }, dl = { style: { chart: { backgroundColor: "#FFF8E1", color: "#424242", layout: { labels: { percentage: { color: "#424242" }, name: { color: "#424242" }, hollow: { total: { color: "#424242", value: { color: "#424242" } }, average: { color: "#424242", value: { color: "#424242" } } } } }, legend: { backgroundColor: "#FFF8E1", color: "#424242" }, title: { color: "#424242", subtitle: { color: "#757575" } }, tooltip: { backgroundColor: "#FFECB3", backgroundOpacity: 30, color: "#424242", borderColor: "#FF8A65" } } }, table: { th: { backgroundColor: "#FFF8E1", color: "#424242" }, td: { backgroundColor: "#FFF8E1", color: "#424242" } } }, hl = { style: { chart: { backgroundColor: "#1E1E1E", color: "#BDBDBD", layout: { labels: { percentage: { color: "#BDBDBD" }, name: { color: "#BDBDBD" }, hollow: { total: { color: "#BDBDBD", value: { color: "#BDBDBD" } }, average: { color: "#BDBDBD", value: { color: "#BDBDBD" } } } } }, legend: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, title: { color: "#FFF8E1", subtitle: { color: "#BDBDBD" } }, tooltip: { backgroundColor: "#1E1E1E", backgroundOpacity: 30, color: "#FFF8E1", borderColor: "#FF8A65" } } }, table: { th: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, td: { backgroundColor: "#1E1E1E", color: "#BDBDBD" } } }, fl = { style: { chart: { backgroundColor: "#f6f6fb", color: "#50606C", layout: { labels: { percentage: { color: "#61747E" }, name: { color: "#8A9892" }, hollow: { total: { color: "#8A9892", value: { color: "#61747E" } }, average: { color: "#8A9892", value: { color: "#61747E" } } } } }, legend: { backgroundColor: "#f6f6fb", color: "#61747E" }, title: { color: "#50606C", subtitle: { color: "#718890" } }, tooltip: { backgroundColor: "#f6f6fb", color: "#50606C" } } }, table: { th: { backgroundColor: "#f6f6fb", color: "#50606C" }, td: { backgroundColor: "#f6f6fb", color: "#50606C" } } }, yl = { style: { chart: { backgroundColor: "#1A1A1A", color: "#99AA99", layout: { labels: { percentage: { color: "#AACCAA" }, name: { color: "#99CC99" }, hollow: { total: { color: "#99CC99", value: { color: "#AACCAA" } }, average: { color: "#99CC99", value: { color: "#AACCAA" } } } } }, legend: { backgroundColor: "#1A1A1A", color: "#99AA99" }, title: { color: "#66CC66", subtitle: { color: "#99AA99" } }, tooltip: { backgroundColor: "#2A2F2A", color: "#AACCAA", borderColor: "#66CC66" } } }, table: { th: { backgroundColor: "#1A1A1A", color: "#99AA99" }, td: { backgroundColor: "#1A1A1A", color: "#AACCAA" } } }, gl = { style: { chart: { backgroundColor: "#fbfafa", color: "#8A9892", layout: { labels: { percentage: { color: "#A0AC94" }, name: { color: "#8A9892" }, hollow: { total: { color: "#8A9892", value: { color: "#A0AC94" } }, average: { color: "#8A9892", value: { color: "#A0AC94" } } } } }, legend: { backgroundColor: "#fbfafa", color: "#99AA99" }, title: { color: "#8A9892", subtitle: { color: "#99AA99" } }, tooltip: { backgroundColor: "#fbfafa", color: "#8A9892" } } }, table: { th: { backgroundColor: "#fbfafa", color: "#8F837A" }, td: { backgroundColor: "#fbfafa", color: "#8F837A" } } }, pl = {
183
- default: {},
184
- dark: vl,
185
- celebration: dl,
186
- celebrationNight: hl,
187
- concrete: fl,
188
- hack: yl,
189
- zen: gl
190
- }, sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
191
- __proto__: null,
192
- celebration: dl,
193
- celebrationNight: hl,
194
- concrete: fl,
195
- dark: vl,
196
- default: pl,
197
- hack: yl,
198
- zen: gl
199
- }, Symbol.toStringTag, { value: "Module" })), Aa = ["id"], _a = ["id"], Ta = ["xmlns", "viewBox"], La = ["width", "height"], Sa = { key: 1 }, Ma = ["id"], Fa = ["stop-color"], Pa = ["offset", "stop-color"], Ia = ["offset", "stop-color"], Da = ["stop-color"], Ba = { key: 2 }, za = ["id", "cx", "cy"], Oa = ["stop-color", "stop-opacity"], Ya = ["stop-color"], Ea = ["id"], Xa = ["id"], Na = ["id"], Ra = ["flood-color"], Va = ["id"], Ua = ["flood-color"], Ha = ["d", "stroke", "filter"], Ga = ["d", "stroke", "filter"], ja = ["cx", "cy", "r", "fill", "filter"], qa = { key: 6 }, Wa = ["stroke", "d"], Qa = ["d", "fill", "stroke", "stroke-width", "filter"], Ja = { key: 0 }, Ka = ["d", "fill", "stroke", "stroke-width", "filter"], Za = { key: 0 }, eo = ["stroke", "d"], to = { key: 0 }, lo = ["d", "stroke", "stroke-width", "filter"], ao = { key: 1 }, oo = ["d", "fill", "stroke", "stroke-width", "filter"], no = ["d", "fill", "stroke", "stroke-width", "filter"], so = { key: 1 }, uo = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], ro = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], io = { key: 0 }, co = ["d", "fill", "stroke", "stroke-width"], vo = ["cx", "cy", "r", "stroke"], ho = ["cx", "cy", "r", "fill"], fo = ["cx", "cy", "r"], yo = { key: 0 }, go = ["d", "stroke", "fill", "onMouseenter", "onMouseleave", "onClick"], po = { key: 1 }, bo = ["cx", "cy", "r"], mo = ["x", "y", "fill", "font-size"], wo = ["x", "y", "fill", "font-size"], ko = ["x", "y", "fill", "font-size"], Co = ["x", "y", "fill", "font-size"], xo = ["filter", "opacity"], $o = { key: 0 }, Ao = ["x", "y"], _o = { key: 1 }, To = ["cx", "cy", "fill", "stroke", "filter", "onClick", "onMouseenter", "onMouseleave"], Lo = ["text-anchor", "x", "y", "onClick", "onMouseenter", "onMouseleave", "innerHTML"], So = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave"], Mo = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave", "innerHTML"], Fo = ["cx", "cy", "fill", "stroke", "filter", "onClick", "onMouseenter", "onMouseleave"], Po = ["text-anchor", "x", "y", "onClick", "onMouseenter", "onMouseleave", "innerHTML"], Io = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave"], Do = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave", "innerHTML"], Bo = { key: 2 }, zo = ["x", "y", "width"], Oo = ["x", "y", "width"], Yo = {
200
- key: 4,
201
- class: "vue-data-ui-watermark"
202
- }, Eo = ["id"], Xo = ["onClick"], No = {
203
- key: 7,
204
- class: "vue-ui-donut-hollow"
205
- }, Ro = ["innerHTML"], Vo = {
206
- __name: "vue-ui-donut",
207
- props: {
208
- config: {
209
- type: Object,
210
- default() {
211
- return {};
212
- }
213
- },
214
- dataset: {
215
- type: Array,
216
- default() {
217
- return [];
218
- }
219
- }
220
- },
221
- emits: ["selectLegend", "selectDatapoint"],
222
- setup(at, { expose: ot, emit: At }) {
223
- const Ve = Me(() => import("./Tooltip-B79qvriT.js")), nt = Me(() => import("./BaseIcon-r3_sTK1A.js")), _t = Me(() => import("./vue-ui-accordion-B6BX2vhq.js")), st = Me(() => import("./DataTable-DNeCys3I.js")), Tt = Me(() => import("./PenAndPaper-CsqBamFZ.js")), Lt = Me(() => import("./UserOptions-B-2A_KRb.js")), St = Me(() => import("./PackageVersion-DPLuuWzw.js")), Mt = Me(() => import("./BaseDraggableDialog-C167SnU0.js")), { vue_ui_donut: Ft } = va(), { isThemeValid: Pt, warnInvalidTheme: qt } = ga(), Ue = Vl(), $ = at, D = g({
224
- get() {
225
- return !!$.dataset && $.dataset.length;
226
- },
227
- set(l) {
228
- return l;
229
- }
230
- }), T = Fe(null), Ie = k(null), ut = k(null), He = k(null), rt = Fe(null), it = Fe(null), se = Fe(null), me = Fe(null), Ge = Fe(null), je = Fe(null), ct = k(0), vt = k(0), dt = k(0), ht = k(!1), De = k(null), qe = k(null), $e = g({
231
- get: () => e.value.style.chart.layout.labels.percentage.fontSize,
232
- set: (l) => l
233
- }), E = g({
234
- get: () => e.value.style.chart.layout.labels.name.fontSize,
235
- set: (l) => l
236
- }), ue = g({
237
- get: () => e.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
238
- set: (l) => l
239
- });
240
- let We = !1;
241
- const B = () => {
242
- !e.value.autoSize || We || (We = !0, requestAnimationFrame(() => {
243
- We = !1;
244
- const l = e.value, o = Ie.value, t = fe.value;
245
- if (!l.autoSize || !o || !t) return;
246
- const [a, r, v, C] = t.getAttribute("viewBox").split(" ").map(Number), P = { x: a, y: r, width: v, height: C }, U = [
247
- {
248
- selector: ".vue-data-ui-datalabel-value",
249
- baseSize: l.style.chart.layout.labels.percentage.fontSize,
250
- minSize: l.style.chart.layout.labels.percentage.minFontSize,
251
- sizeRef: $e
252
- },
253
- {
254
- selector: ".vue-data-ui-datalabel-name",
255
- baseSize: l.style.chart.layout.labels.name.fontSize,
256
- minSize: l.style.chart.layout.labels.name.minFontSize,
257
- sizeRef: E
258
- },
259
- {
260
- selector: ".vue-data-ui-datalabel-inline",
261
- baseSize: l.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
262
- minSize: l.style.chart.layout.labels.name.minFontSize,
263
- sizeRef: ue
264
- }
265
- ];
266
- U.map((N) => o.querySelectorAll(N.selector).length).reduce((N, Z) => N + Z, 0) !== 0 && U.forEach(({ selector: N, baseSize: Z, minSize: Ne, sizeRef: Nt }) => {
267
- o.querySelectorAll(N).forEach((Nl) => {
268
- const Rl = aa({
269
- el: Nl,
270
- bounds: P,
271
- currentFontSize: Z,
272
- minFontSize: Ne,
273
- attempts: 200,
274
- padding: 1
275
- });
276
- Nt.value = Rl;
277
- });
278
- });
279
- }));
280
- };
281
- al(async () => {
282
- ht.value = !0, p(), requestAnimationFrame(B);
283
- });
284
- let h;
285
- al(() => {
286
- T.value && (h = new ResizeObserver((l) => {
287
- for (const o of l) {
288
- const { width: t, height: a } = o.contentRect;
289
- if (t > 0 && a > 0) {
290
- B();
291
- break;
292
- }
293
- }
294
- }), h.observe(T.value.parentElement));
295
- }), ol(() => {
296
- h?.disconnect();
297
- }), ol(() => {
298
- se.value && (me.value && se.value.unobserve(me.value), se.value.disconnect());
299
- });
300
- const y = g(() => !!e.value.debug);
301
- function p() {
302
- if (sl($.dataset) ? (Ht({
303
- componentName: "VueUiDonut",
304
- type: "dataset",
305
- debug: y.value
306
- }), D.value = !1, he.value = !0) : ($.dataset.forEach((l, o) => {
307
- ql({
308
- datasetObject: l,
309
- requiredAttributes: ["name", "values"]
310
- }).forEach((t) => {
311
- Ht({
312
- componentName: "VueUiDonut",
313
- type: "datasetSerieAttribute",
314
- property: t,
315
- index: o,
316
- debug: y.value
317
- }), D.value = !1, he.value = !0;
318
- });
319
- }), $.dataset.forEach((l, o) => {
320
- (!l.name || l.name === "") && Ht({
321
- componentName: "VueUiDonut",
322
- type: "datasetAttributeEmpty",
323
- property: "name",
324
- index: o,
325
- debug: y.value
326
- });
327
- })), sl($.dataset) || (he.value = e.value.loading), e.value.responsive) {
328
- const l = ia(() => {
329
- const { width: o, height: t } = ca({
330
- chart: T.value,
331
- title: e.value.style.chart.title.text ? rt.value : null,
332
- legend: e.value.style.chart.legend.show ? it.value : null,
333
- source: Ge.value,
334
- noTitle: je.value,
335
- padding: e.value.autoSize ? void 0 : Ae.value
336
- });
337
- requestAnimationFrame(() => {
338
- s.value.width = o, s.value.height = t, B();
339
- });
340
- });
341
- se.value && (me.value && se.value.unobserve(me.value), se.value.disconnect()), se.value = new ResizeObserver(l), me.value = T.value.parentNode, se.value.observe(me.value);
342
- }
343
- }
344
- const c = k(Wl()), L = k(!1), R = k(""), S = k(null), re = k(0);
345
- function we() {
346
- const l = jt({
347
- userConfig: $.config,
348
- defaultConfig: Ft
349
- });
350
- let o = {};
351
- const t = l.theme;
352
- if (!t)
353
- o = l;
354
- else if (!Pt.value(l))
355
- qt(l), o = l;
356
- else {
357
- const a = jt({
358
- userConfig: pl[t] || $.config,
359
- defaultConfig: l
360
- });
361
- o = {
362
- ...jt({
363
- userConfig: $.config,
364
- defaultConfig: a
365
- }),
366
- customPalette: l.customPalette.length ? l.customPalette : oa[t] || Ee
367
- };
368
- }
369
- return $.config && Gt($.config, "events.datapointEnter") ? o.events.datapointEnter = $.config.events.datapointEnter : o.events.datapointEnter = null, $.config && Gt($.config, "events.datapointLeave") ? o.events.datapointLeave = $.config.events.datapointLeave : o.events.datapointLeave = null, $.config && Gt($.config, "events.datapointClick") ? o.events.datapointClick = $.config.events.datapointClick : o.events.datapointClick = null, o;
370
- }
371
- const e = k(we()), { loading: ie, FINAL_DATASET: J, manualLoading: he, skeletonDataset: ft } = ha({
372
- ...Ul($),
373
- FINAL_CONFIG: e,
374
- prepareConfig: we,
375
- skeletonDataset: [
376
- {
377
- name: "",
378
- values: [3],
379
- color: "#BABABA"
380
- },
381
- {
382
- name: "",
383
- values: [2],
384
- color: "#AAAAAA"
385
- },
386
- {
387
- name: "",
388
- values: [1],
389
- color: "#CACACA"
390
- }
391
- ],
392
- skeletonConfig: Ql({
393
- defaultConfig: e.value,
394
- userConfig: {
395
- useCssAnimation: !1,
396
- table: { show: !1 },
397
- startAnimation: {
398
- show: !1
399
- },
400
- userOptions: { show: !1 },
401
- style: {
402
- chart: {
403
- backgroundColor: "#99999930",
404
- layout: {
405
- labels: {
406
- dataLabels: { show: !1 },
407
- hollow: {
408
- average: { show: !1 },
409
- total: { show: !1 }
410
- },
411
- value: { show: !1 }
412
- }
413
- },
414
- legend: {
415
- backgroundColor: "transparent",
416
- showValue: !1,
417
- showPercentage: !1
418
- },
419
- title: {
420
- color: "#1A1A1A",
421
- subtitle: {
422
- color: "#5A5A5A"
423
- }
424
- }
425
- }
426
- }
427
- }
428
- })
429
- }), M = k(!0), ke = k(0), It = k(!1);
430
- let te = null;
431
- function Be(l = 1e3) {
432
- return new Promise((o) => {
433
- const t = performance.now();
434
- function a(r) {
435
- const v = r - t, C = Math.min(
436
- v / l,
437
- 1
438
- ), P = cl(C);
439
- ke.value = P, C < 1 ? te = requestAnimationFrame(a) : (ke.value = 1, te = null, o());
440
- }
441
- te !== null && cancelAnimationFrame(te), ke.value = 0, te = requestAnimationFrame(a);
442
- });
443
- }
444
- Re(
445
- () => ie.value,
446
- async (l) => {
447
- if (l || It.value)
448
- return;
449
- const o = J.value === ft, t = e.value.startAnimation?.show;
450
- if (!o && t) {
451
- It.value = !0;
452
- const a = e.value.startAnimation.durationMs || 1e3;
453
- await Be(a);
454
- } else
455
- ke.value = 1;
456
- M.value = !1;
457
- },
458
- { immediate: !0 }
459
- );
460
- const { userOptionsVisible: Qe, setUserOptionsVisibility: yt, keepUserOptionState: gt } = pa({ config: e.value }), { svgRef: fe } = ba({ config: e.value.style.chart.title });
461
- function pt() {
462
- yt(!0);
463
- }
464
- function ze() {
465
- yt(!1);
466
- }
467
- Re(() => $.config, (l) => {
468
- ie.value || (e.value = we()), Qe.value = !e.value.userOptions.showOnChartHover, p(), ct.value += 1, vt.value += 1, dt.value += 1, m.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, m.value.showTable = e.value.table.show, m.value.showTooltip = e.value.style.chart.tooltip.show, s.value.height = e.value.style.chart.height, s.value.width = e.value.style.chart.width;
469
- }, { deep: !0 });
470
- const Ae = g(() => {
471
- const { top: l, right: o, bottom: t, left: a } = e.value.style.chart.padding;
472
- return {
473
- css: `padding:${l}px ${o}px ${t}px ${a}px`,
474
- top: l,
475
- right: o,
476
- bottom: t,
477
- left: a
478
- };
479
- }), { isPrinting: le, isImaging: ae, generatePdf: _e, generateImage: Te } = da({
480
- elementId: `donut__${c.value}`,
481
- fileName: e.value.style.chart.title.text || "vue-ui-donut",
482
- options: e.value.userOptions.print
483
- }), bt = g(() => e.value.userOptions.show && !e.value.style.chart.title.text), Je = g(() => Jl(e.value.customPalette)), m = k({
484
- dataLabels: {
485
- show: e.value.style.chart.layout.labels.dataLabels.show
486
- },
487
- showTable: e.value.table.show,
488
- showTooltip: e.value.style.chart.tooltip.show
489
- });
490
- Re(e, () => {
491
- m.value = {
492
- dataLabels: {
493
- show: e.value.style.chart.layout.labels.dataLabels.show
494
- },
495
- showTable: e.value.table.show,
496
- showTooltip: e.value.style.chart.tooltip.show
497
- };
498
- }, { immediate: !0 });
499
- const s = k({
500
- height: e.value.style.chart.height,
501
- width: e.value.style.chart.width
502
- }), ye = g(() => {
503
- if (e.value.pie)
504
- return F.value;
505
- const l = e.value.style.chart.layout.donut.strokeWidth / 512, o = Math.min(s.value.width, s.value.height) * l, t = o > F.value ? F.value : o;
506
- return Math.max(t, 12 * (1 + l));
507
- }), Dt = At, X = g(() => J.value.sort((l, o) => {
508
- const t = Array.isArray(l.values) ? l.values.reduce((r, v) => r + v, 0) : l.value ?? 0, a = Array.isArray(o.values) ? o.values.reduce((r, v) => r + v, 0) : o.value ?? 0;
509
- return l.ghost && !o.ghost ? 1 : o.ghost && !l.ghost ? -1 : a - t;
510
- }).map((l, o) => ({
511
- name: l.name,
512
- color: ul(l.color) || Je.value[o] || Ee[o] || Ee[o % Ee.length],
513
- value: Kl(l.values.reduce((t, a) => t + a, 0)),
514
- absoluteValues: l.values,
515
- comment: l.comment || "",
516
- patternIndex: o,
517
- seriesIndex: o,
518
- ghost: !1,
519
- pattern: `pattern_${c.value}_${o}`
520
- })));
521
- Re(() => $.dataset, (l) => {
522
- Array.isArray(l) && l.length > 0 && (he.value = !1);
523
- }, { immediate: !0 });
524
- const H = Fe(X.value);
525
- Re(() => X.value, (l) => {
526
- H.value = l, requestAnimationFrame(B);
527
- });
528
- function Bt() {
529
- return X.value.map((l) => ({
530
- name: l.name,
531
- color: l.color,
532
- value: l.value
533
- }));
534
- }
535
- const O = k([]), ce = k(!1), ve = k(null);
536
- function Ke({ from: l, to: o, duration: t, onUpdate: a, onDone: r, easing: v = cl }) {
537
- const C = performance.now();
538
- function P(U) {
539
- const q = Math.min((U - C) / t, 1), N = v(q), Z = l + (o - l) * N;
540
- a(Z, q), q < 1 ? requestAnimationFrame(P) : (a(o, 1), r && r());
541
- }
542
- requestAnimationFrame(P);
543
- }
544
- function Xe(l) {
545
- const o = X.value.find((r, v) => v === l);
546
- let a = H.value.find((r, v) => v === l).value;
547
- if (O.value.includes(l)) {
548
- let v = function() {
549
- H.value = H.value.map(
550
- (P, U) => l === U ? { ...P, value: r } : P
551
- );
552
- }, C = function() {
553
- ce.value = !0, ve.value = l, Ke({
554
- from: a,
555
- to: r,
556
- duration: e.value.serieToggleAnimation.durationMs,
557
- onUpdate: (P, U) => {
558
- H.value = H.value.map(
559
- (q, N) => l === N ? { ...q, value: P } : q
560
- ), requestAnimationFrame(B);
561
- },
562
- onDone: () => {
563
- v(), ce.value = !1, ve.value = null;
564
- }
565
- });
566
- };
567
- O.value = O.value.filter((P) => P !== l);
568
- const r = o.value;
569
- e.value.serieToggleAnimation.show && e.value.type === "classic" ? C() : (v(), requestAnimationFrame(B));
570
- } else if (O.value.length < X.value.length - 1) {
571
- let r = function() {
572
- O.value.push(l), H.value = H.value.map(
573
- (C, P) => l === P ? { ...C, value: 0 } : C
574
- );
575
- }, v = function() {
576
- ce.value = !0, ve.value = l, Ke({
577
- from: a,
578
- to: 0,
579
- duration: e.value.serieToggleAnimation.durationMs,
580
- onUpdate: (C, P) => {
581
- H.value = H.value.map(
582
- (U, q) => l === q ? { ...U, value: C } : U
583
- ), requestAnimationFrame(B);
584
- },
585
- onDone: () => {
586
- r(), requestAnimationFrame(B), ce.value = !1, ve.value = null;
587
- }
588
- });
589
- };
590
- e.value.serieToggleAnimation.show && e.value.type === "classic" ? v() : r();
591
- }
592
- Dt("selectLegend", Ce.value.map((r) => ({
593
- name: r.name,
594
- color: r.color,
595
- value: r.value
596
- })));
597
- }
598
- function Ze(l) {
599
- if (!X.value.length)
600
- return e.value.debug && console.warn("VueUiDonut - There are no series to show."), null;
601
- const o = X.value.find((t) => t.name === l);
602
- return o || (e.value.debug && console.warn(`VueUiDonut - Series name not found "${l}"`), null);
603
- }
604
- function bl(l) {
605
- const o = Ze(l);
606
- o !== null && O.value.includes(o.seriesIndex) && Xe(o.seriesIndex);
607
- }
608
- function ml(l) {
609
- const o = Ze(l);
610
- o !== null && (O.value.includes(o.seriesIndex) || Xe(o.seriesIndex));
611
- }
612
- const wl = g(
613
- () => J.value.reduce(
614
- (l, o) => l + o.values.reduce((t, a) => t + a, 0),
615
- 0
616
- )
617
- ), Ce = g(() => {
618
- if (M.value && !ie.value) {
619
- const l = ke.value, o = X.value.map((a) => ({
620
- ...a,
621
- value: a.value * l,
622
- color: a.color,
623
- ghost: !1
624
- })), t = wl.value * (1 - l);
625
- return t > 0 && o.push({
626
- name: "__ghost__",
627
- value: t,
628
- color: "transparent",
629
- ghost: !0
630
- }), o;
631
- } else
632
- return H.value.forEach((l) => {
633
- if ([null, void 0].includes(l.values))
634
- return {
635
- ...l,
636
- values: []
637
- };
638
- }), H.value.map((l, o) => ({
639
- ...l,
640
- seriesIndex: o
641
- })).filter((l, o) => !O.value.includes(o));
642
- }), zt = g(() => J.value.map((l, o) => {
643
- const t = (l.values || []).reduce((r, v) => r + v, 0), a = t / J.value.map((r) => (r.values || []).reduce((v, C) => v + C, 0)).reduce((r, v) => r + v, 0);
644
- return {
645
- name: l.name,
646
- color: ul(l.color) || Je.value[o] || Ee[o] || Ee[o % Ee.length],
647
- value: t,
648
- shape: "circle",
649
- patternIndex: o,
650
- proportion: a
651
- };
652
- }).map((l, o) => ({
653
- ...l,
654
- opacity: O.value.includes(o) ? 0.5 : 1,
655
- segregate: () => !ce.value && Xe(o),
656
- isSegregated: O.value.includes(o),
657
- display: `${l.name}${e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ": " : ""}${e.value.style.chart.legend.showValue ? ee(e.value.style.chart.layout.labels.value.formatter, l.value, Q({
658
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
659
- v: l.value,
660
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
661
- r: e.value.style.chart.legend.roundingValue
662
- }), { datapoint: l, index: o }) : ""}${e.value.style.chart.legend.showPercentage ? O.value.includes(o) ? `${e.value.style.chart.legend.showValue ? "(" : ""}${Pl(l.proportion * 100)}%${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? " (" : ""}${isNaN(l.value / j.value) ? "-" : ee(e.value.style.chart.layout.labels.percentage.formatter, Wt(l), Q({
663
- v: Wt(l),
664
- s: "%",
665
- r: e.value.style.chart.legend.roundingPercentage
666
- }))}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""}`
667
- }))), kl = g(() => ({
668
- cy: "donut-div-legend",
669
- backgroundColor: e.value.style.chart.legend.backgroundColor,
670
- color: e.value.style.chart.legend.color,
671
- fontSize: e.value.style.chart.legend.fontSize,
672
- paddingBottom: 12,
673
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
674
- })), F = g(() => {
675
- const l = e.value.style.chart.layout.donut.radiusRatio, o = Math.max(0.1, Math.min(0.50001, l)), t = Math.min(s.value.width * o, s.value.height * o);
676
- return Math.max(12, t);
677
- }), V = g(() => rl({ series: Ce.value }, s.value.width / 2, s.value.height / 2, F.value, F.value, 1.99999, 2, 1, 360, 105.25, ye.value)), Cl = g(() => Math.abs(Ce.value.map((l) => l.value).reduce((l, o) => l + o, 0)) > 0), xl = g(() => rl({
678
- series: [
679
- {
680
- value: 1,
681
- color: e.value.style.chart.layout.donut.emptyFill,
682
- name: "_",
683
- seriesIndex: 0,
684
- patternIndex: -1,
685
- ghost: !1,
686
- absoluteValues: [1]
687
- }
688
- ]
689
- }, s.value.width / 2, s.value.height / 2, F.value, F.value, 1.99999, 2, 1, 360, 105.25, ye.value)), G = g(() => V.value.filter((l) => !l.ghost)), d = g(() => {
690
- const l = Math.max(...Ce.value.map((t) => t.value)), o = Ce.value.map((t) => t.value / l);
691
- return Zl({
692
- series: o,
693
- center: {
694
- x: s.value.width / 2,
695
- y: s.value.height / 2
696
- },
697
- maxRadius: Math.min(s.value.width, s.value.height) / 3,
698
- hasGhost: M.value
699
- });
700
- });
701
- function Le(l) {
702
- return l.x > s.value.width / 2 + 6 ? "start" : l.x < s.value.width / 2 - 6 ? "end" : "middle";
703
- }
704
- function $l(l) {
705
- return l.middlePoint.y > s.value.height / 2 ? z({ initX: l.middlePoint.x, initY: l.middlePoint.y, offset: 100, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y : z({ initX: l.middlePoint.x, initY: l.middlePoint.y, offset: 0, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y - 100;
706
- }
707
- function K(l) {
708
- return l.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
709
- }
710
- function Al(l, o) {
711
- const t = e.value.style.chart.layout.labels.dataLabels.hideUnderValue, a = e.value.style.chart.layout.labels.dataLabels.smallArcClusterThreshold, v = (Tl.value[o] ?? l.proportion ?? 0) * 100;
712
- return v > t && v <= a;
713
- }
714
- const { smallArcLayoutsClassic: Y } = $a({
715
- FINAL_CONFIG: e,
716
- noGhostDonut: G,
717
- svg: s,
718
- padding: Ae,
719
- labels_inline_fontSize: ue,
720
- minSize: F,
721
- findArcMidpoint: ra,
722
- calcMarkerOffsetX: A,
723
- calcMarkerOffsetY: xe,
724
- animatingIndex: ve,
725
- segregated: O,
726
- isSmallArc: Al
727
- });
728
- function et(l, o) {
729
- const t = l.value / _l(o);
730
- return isNaN(t) ? 0 : ee(
731
- e.value.style.chart.layout.labels.percentage.formatter,
732
- t * 100,
733
- Q({
734
- v: t * 100,
735
- s: "%",
736
- r: e.value.style.chart.layout.labels.percentage.rounding
737
- }),
738
- { datapoint: l }
739
- );
740
- }
741
- function _l(l) {
742
- return [...l].map((o) => o.value).reduce((o, t) => o + t, 0);
743
- }
744
- const j = g(() => Ce.value.map((l) => l.value).reduce((l, o) => l + o, 0)), Tl = g(() => {
745
- const l = X.value.reduce((o, t) => o + t.value, 0);
746
- return l <= 0 ? [] : X.value.map((o) => o.value / l);
747
- }), Ot = g(() => j.value / Ce.value.length);
748
- function Wt(l) {
749
- return ce.value ? l.proportion * 100 : l.value / j.value * 100;
750
- }
751
- const Yt = k(null), tt = k(!1);
752
- function ge({ datapoint: l, seriesIndex: o }) {
753
- e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: l, seriesIndex: o }), L.value = !1, S.value = null;
754
- }
755
- function pe({ datapoint: l, relativeIndex: o, seriesIndex: t, show: a = !1 }) {
756
- e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: l, seriesIndex: t }), Yt.value = { datapoint: l, seriesIndex: t, config: e.value, series: X.value }, L.value = a, S.value = o;
757
- let r = "";
758
- const v = e.value.style.chart.tooltip.customFormat;
759
- if (tt.value = !1, ua(v))
760
- try {
761
- const C = v({
762
- seriesIndex: t,
763
- datapoint: l,
764
- series: X.value,
765
- config: e.value
766
- });
767
- typeof C == "string" && (R.value = C, tt.value = !0);
768
- } catch {
769
- console.warn("Custom format cannot be applied."), tt.value = !1;
770
- }
771
- if (!tt.value) {
772
- if (r += `<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>`, r += `<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}"/>${Ue.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${c.value}_${t})"/>` : ""}</svg>`, e.value.style.chart.tooltip.showValue && (r += `<b>${ee(
773
- e.value.style.chart.layout.labels.value.formatter,
774
- l.value,
775
- Q({
776
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
777
- v: l.value,
778
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
779
- r: e.value.style.chart.tooltip.roundingValue
780
- }),
781
- {
782
- datapoint: l,
783
- relativeIndex: o,
784
- seriesIndex: t
785
- }
786
- )}</b>`), e.value.style.chart.tooltip.showPercentage) {
787
- const C = ee(
788
- e.value.style.chart.layout.labels.percentage.formatter,
789
- l.proportion * 100,
790
- Q({
791
- v: l.proportion * 100,
792
- s: "%",
793
- r: e.value.style.chart.tooltip.roundingPercentage
794
- }),
795
- {
796
- datapoint: l,
797
- relativeIndex: o,
798
- seriesIndex: t
799
- }
800
- );
801
- e.value.style.chart.tooltip.showValue ? r += `<span>(${C})</span></div>` : r += `<b>${C}</b></div>`;
802
- }
803
- e.value.style.chart.comments.showInTooltip && l.comment && (r += `<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>`), R.value = `<div>${r}</div>`;
804
- }
805
- }
806
- function Ll(l, o) {
807
- const t = Y.value[o];
808
- if (t)
809
- return {
810
- textAnchor: t.textAnchor,
811
- x: t.labelX,
812
- y: t.labelY
813
- };
814
- const a = A(l, !0, 12);
815
- return {
816
- textAnchor: a.anchor,
817
- x: a.x,
818
- y: xe(l)
819
- };
820
- }
821
- function Sl(l, o, t) {
822
- const { textAnchor: a, x: r } = Ll(l, o), v = et(l, G.value), C = e.value.style.chart.layout.labels.value.show ? ` (${ee(
823
- e.value.style.chart.layout.labels.value.formatter,
824
- l.value,
825
- Q({
826
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
827
- v: l.value,
828
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
829
- r: e.value.style.chart.layout.labels.value.rounding
830
- }),
831
- { datapoint: l }
832
- )})` : "", P = `${v}${C}`, U = `
833
- <tspan
834
- class="vue-data-ui-datalabel-inline"
835
- fill="${e.value.style.chart.layout.labels.percentage.color}"
836
- font-size="${t ? ue.value : $e.value}px"
837
- style="font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}"
838
- >${P}</tspan>
839
- `, q = String(l.name ?? "").split(/\n/g);
840
- let N = "";
841
- return q.forEach((Z, Ne) => {
842
- Ne === 0 ? N += `
843
- <tspan
844
- class="${t ? "vue-data-ui-datalabel-inline" : "vue-data-ui-datalabel-name"}"
845
- fill="${e.value.style.chart.layout.labels.name.color}"
846
- font-size="${t ? ue.value : E.value}px"
847
- style="font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}"
848
- >${Z}</tspan>
849
- ` : N += `
850
- <tspan
851
- class="${t ? "vue-data-ui-datalabel-inline" : "vue-data-ui-datalabel-name"}"
852
- x="${r}"
853
- dy="${(t ? ue.value : E.value) * 1.2}"
854
- fill="${e.value.style.chart.layout.labels.name.color}"
855
- font-size="${t ? ue.value : E.value}px"
856
- style="font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}"
857
- >${Z}</tspan>
858
- `;
859
- }), a === "end" ? `${N}${U}` : `${U}${N}`;
860
- }
861
- function Ml(l, o) {
862
- const t = d.value[o].middlePoint, a = Le(t), r = z({
863
- initX: t.x,
864
- initY: t.y,
865
- offset: 42,
866
- centerX: s.value.width / 2,
867
- centerY: s.value.height / 2
868
- }), v = r.x;
869
- r.y;
870
- const C = et(l, G.value), P = e.value.style.chart.layout.labels.value.show ? ` (${ee(
871
- e.value.style.chart.layout.labels.value.formatter,
872
- l.value,
873
- Q({
874
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
875
- v: l.value,
876
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
877
- r: e.value.style.chart.layout.labels.value.rounding
878
- }),
879
- { datapoint: l }
880
- )})` : "", U = `${C}${P}`, q = `
881
- <tspan
882
- class="vue-data-ui-datalabel-value"
883
- fill="${e.value.style.chart.layout.labels.percentage.color}"
884
- font-size="${$e.value}px"
885
- style="font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"}"
886
- >${U}</tspan>
887
- `, N = String(l.name ?? "").split(/\n/g);
888
- let Z = "";
889
- return N.forEach((Ne, Nt) => {
890
- Nt === 0 ? Z += `
891
- <tspan
892
- class="vue-data-ui-datalabel-name"
893
- fill="${e.value.style.chart.layout.labels.name.color}"
894
- font-size="${E.value}px"
895
- style="font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : "normal"}"
896
- >${Ne}</tspan>
897
- ` : Z += `
898
- <tspan
899
- class="vue-data-ui-datalabel-name"
900
- x="${v}"
901
- dy="${E.value * 1.2}"
902
- fill="${e.value.style.chart.layout.labels.name.color}"
903
- font-size="${E.value}px"
904
- style="font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : "normal"}"
905
- >${Ne}</tspan>
906
- `;
907
- }), a === "end" ? `${Z}${q}` : `${q}${Z}`;
908
- }
909
- function Oe(l) {
910
- return e.value.useBlurOnHover && ![null, void 0].includes(S.value) && S.value !== l ? `url(#blur_${c.value})` : "";
911
- }
912
- function Fl(l) {
913
- if (!ce.value || ve.value === null || l.seriesIndex !== ve.value)
914
- return 1;
915
- const o = (l.proportion ?? 0) * 100, t = e.value.style.chart.layout.labels.dataLabels.hideUnderValue, r = e.value.style.chart.layout.labels.dataLabels.smallArcClusterThreshold + 2, v = t;
916
- return o >= r ? 1 : o <= v ? 0 : (o - v) / (r - v);
917
- }
918
- const Se = g(() => {
919
- const l = Ce.value.map((t) => ({
920
- name: t.name,
921
- color: t.color
922
- })), o = Ce.value.map((t) => t.value);
923
- return { head: l, body: o };
924
- });
925
- function Et(l = null) {
926
- jl(() => {
927
- const o = Se.value.head.map((r, v) => [[
928
- r.name
929
- ], [Se.value.body[v]], [isNaN(Se.value.body[v] / j.value) ? "-" : Se.value.body[v] / j.value * 100]]), t = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), a = na(t);
930
- l ? l(a) : sa({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-donut" });
931
- });
932
- }
933
- const mt = g(() => {
934
- const l = [
935
- ' <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>',
936
- Q({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: j.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
937
- "100%"
938
- ], o = Se.value.head.map((r, v) => [
939
- {
940
- color: r.color,
941
- name: r.name || "-"
942
- },
943
- Se.value.body[v],
944
- isNaN(Se.value.body[v] / j.value) ? "-" : (Se.value.body[v] / j.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
945
- ]), t = {
946
- th: {
947
- backgroundColor: e.value.table.th.backgroundColor,
948
- color: e.value.table.th.color,
949
- outline: e.value.table.th.outline
950
- },
951
- td: {
952
- backgroundColor: e.value.table.td.backgroundColor,
953
- color: e.value.table.td.color,
954
- outline: e.value.table.td.outline
955
- },
956
- breakpoint: e.value.table.responsiveBreakpoint
957
- };
958
- return {
959
- colNames: [
960
- e.value.table.columnNames.series,
961
- e.value.table.columnNames.value,
962
- e.value.table.columnNames.percentage
963
- ],
964
- head: l,
965
- body: o,
966
- config: t
967
- };
968
- }), Ye = k(!1);
969
- function Qt(l) {
970
- Ye.value = l, re.value += 1;
971
- }
972
- const Jt = g(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent));
973
- function Pl(l) {
974
- return l.toFixed(e.value.style.chart.legend.roundingPercentage).split("").map((o) => "-").join("");
975
- }
976
- function be(l, o) {
977
- e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: l.seriesIndex }), Dt("selectDatapoint", { datapoint: l, index: o });
978
- }
979
- function Kt() {
980
- m.value.showTable = !m.value.showTable;
981
- }
982
- function Zt() {
983
- m.value.dataLabels.show = !m.value.dataLabels.show;
984
- }
985
- function el() {
986
- m.value.showTooltip = !m.value.showTooltip;
987
- }
988
- const wt = k(!1);
989
- function Xt() {
990
- wt.value = !wt.value;
991
- }
992
- async function Il({ scale: l = 2 } = {}) {
993
- if (!T.value) return;
994
- const { width: o, height: t } = T.value.getBoundingClientRect(), a = o / t, { imageUri: r, base64: v } = await ma({ domElement: T.value, base64: !0, img: !0, scale: l });
995
- return {
996
- imageUri: r,
997
- base64: v,
998
- title: e.value.style.chart.title.text,
999
- width: o,
1000
- height: t,
1001
- aspectRatio: a
1002
- };
1003
- }
1004
- function Dl() {
1005
- if (!Ie.value) return;
1006
- const { x: l, y: o, width: t, height: a } = Ie.value.getBBox();
1007
- fe.value && fe.value.setAttribute("viewBox", `${l} ${o} ${t + Math.min(0, l)} ${a + Math.min(0, o)}`);
1008
- }
1009
- const lt = g(() => {
1010
- const l = e.value.table.useDialog && !e.value.table.show, o = m.value.showTable;
1011
- return {
1012
- component: l ? Mt : _t,
1013
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
1014
- props: l ? {
1015
- backgroundColor: e.value.table.th.backgroundColor,
1016
- color: e.value.table.th.color,
1017
- headerColor: e.value.table.th.color,
1018
- headerBg: e.value.table.th.backgroundColor,
1019
- isFullscreen: Ye.value,
1020
- fullscreenParent: T.value,
1021
- forcedWidth: Math.min(500, window.innerWidth * 0.8)
1022
- } : {
1023
- hideDetails: !0,
1024
- config: {
1025
- open: o,
1026
- maxHeight: 1e4,
1027
- body: {
1028
- backgroundColor: e.value.style.chart.backgroundColor,
1029
- color: e.value.style.chart.color
1030
- },
1031
- head: {
1032
- backgroundColor: e.value.style.chart.backgroundColor,
1033
- color: e.value.style.chart.color
1034
- }
1035
- }
1036
- }
1037
- };
1038
- });
1039
- Re(() => m.value.showTable, (l) => {
1040
- e.value.table.show || (l && e.value.table.useDialog && De.value ? De.value.open() : "close" in De.value && De.value.close());
1041
- });
1042
- function tl() {
1043
- m.value.showTable = !1, qe.value && qe.value.setTableIconState(!1);
1044
- }
1045
- const Bl = g(() => zt.value.map((l) => ({
1046
- ...l,
1047
- name: l.display
1048
- }))), zl = g(() => e.value.style.chart.backgroundColor), Ol = g(() => e.value.style.chart.legend), Yl = g(() => e.value.style.chart.title), { exportSvg: El, getSvg: Xl } = ya({
1049
- svg: fe,
1050
- title: Yl,
1051
- legend: Ol,
1052
- legendItems: Bl,
1053
- backgroundColor: zl
1054
- });
1055
- async function ll({ isCb: l }) {
1056
- if (l) {
1057
- const { blob: o, url: t, text: a, dataUrl: r } = await Xl();
1058
- e.value.userOptions.callbacks.svg({ blob: o, url: t, text: a, dataUrl: r });
1059
- } else
1060
- El();
1061
- }
1062
- return ot({
1063
- autoSize: Dl,
1064
- getData: Bt,
1065
- getImage: Il,
1066
- generatePdf: _e,
1067
- generateCsv: Et,
1068
- generateImage: Te,
1069
- generateSvg: ll,
1070
- hideSeries: ml,
1071
- showSeries: bl,
1072
- toggleTable: Kt,
1073
- toggleLabels: Zt,
1074
- toggleTooltip: el,
1075
- toggleAnnotator: Xt,
1076
- toggleFullscreen: Qt
1077
- }), (l, o) => (u(), i("div", {
1078
- ref_key: "donutChart",
1079
- ref: T,
1080
- class: Rt(`vue-data-ui-component vue-ui-donut ${Ye.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
1081
- style: I(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height:100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
1082
- id: `donut__${c.value}`,
1083
- onMouseenter: pt,
1084
- onMouseleave: ze
1085
- }, [
1086
- e.value.userOptions.buttons.annotator && n(fe) ? (u(), Pe(n(Tt), {
1087
- key: 0,
1088
- color: e.value.style.chart.color,
1089
- backgroundColor: e.value.style.chart.backgroundColor,
1090
- active: wt.value,
1091
- svgRef: n(fe),
1092
- onClose: Xt
1093
- }, {
1094
- "annotator-action-close": x(() => [
1095
- w(l.$slots, "annotator-action-close", {}, void 0, !0)
1096
- ]),
1097
- "annotator-action-color": x(({ color: t }) => [
1098
- w(l.$slots, "annotator-action-color", oe(ne({ color: t })), void 0, !0)
1099
- ]),
1100
- "annotator-action-draw": x(({ mode: t }) => [
1101
- w(l.$slots, "annotator-action-draw", oe(ne({ mode: t })), void 0, !0)
1102
- ]),
1103
- "annotator-action-undo": x(({ disabled: t }) => [
1104
- w(l.$slots, "annotator-action-undo", oe(ne({ disabled: t })), void 0, !0)
1105
- ]),
1106
- "annotator-action-redo": x(({ disabled: t }) => [
1107
- w(l.$slots, "annotator-action-redo", oe(ne({ disabled: t })), void 0, !0)
1108
- ]),
1109
- "annotator-action-delete": x(({ disabled: t }) => [
1110
- w(l.$slots, "annotator-action-delete", oe(ne({ disabled: t })), void 0, !0)
1111
- ]),
1112
- _: 3
1113
- }, 8, ["color", "backgroundColor", "active", "svgRef"])) : f("", !0),
1114
- w(l.$slots, "userConfig", {}, void 0, !0),
1115
- bt.value ? (u(), i("div", {
1116
- key: 1,
1117
- ref_key: "noTitle",
1118
- ref: je,
1119
- class: "vue-data-ui-no-title-space",
1120
- style: "height:36px; width: 100%;background:transparent"
1121
- }, null, 512)) : f("", !0),
1122
- e.value.style.chart.title.text ? (u(), i("div", {
1123
- key: 2,
1124
- ref_key: "chartTitle",
1125
- ref: rt,
1126
- style: "width:100%;background:transparent;padding-bottom:24px"
1127
- }, [
1128
- (u(), Pe(ka, {
1129
- key: `title_${ct.value}`,
1130
- config: {
1131
- title: {
1132
- cy: "donut-div-title",
1133
- ...e.value.style.chart.title
1134
- },
1135
- subtitle: {
1136
- cy: "donut-div-subtitle",
1137
- ...e.value.style.chart.title.subtitle
1138
- }
1139
- }
1140
- }, null, 8, ["config"]))
1141
- ], 512)) : f("", !0),
1142
- b("div", {
1143
- id: `legend-top-${c.value}`
1144
- }, null, 8, _a),
1145
- e.value.userOptions.show && D.value && (n(gt) || n(Qe)) ? (u(), Pe(n(Lt), {
1146
- ref_key: "userOptionsRef",
1147
- ref: qe,
1148
- key: `user_option_${re.value}`,
1149
- backgroundColor: e.value.style.chart.backgroundColor,
1150
- color: e.value.style.chart.color,
1151
- isPrinting: n(le),
1152
- isImaging: n(ae),
1153
- uid: c.value,
1154
- hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
1155
- hasPdf: e.value.userOptions.buttons.pdf,
1156
- hasImg: e.value.userOptions.buttons.img,
1157
- hasSvg: e.value.userOptions.buttons.svg,
1158
- hasXls: e.value.userOptions.buttons.csv,
1159
- hasTable: e.value.userOptions.buttons.table,
1160
- hasLabel: e.value.userOptions.buttons.labels,
1161
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
1162
- isFullscreen: Ye.value,
1163
- chartElement: T.value,
1164
- position: e.value.userOptions.position,
1165
- callbacks: e.value.userOptions.callbacks,
1166
- isTooltip: m.value.showTooltip,
1167
- titles: { ...e.value.userOptions.buttonTitles },
1168
- hasAnnotator: e.value.userOptions.buttons.annotator,
1169
- isAnnotation: wt.value,
1170
- printScale: e.value.userOptions.print.scale,
1171
- tableDialog: e.value.table.useDialog,
1172
- onToggleFullscreen: Qt,
1173
- onGeneratePdf: n(_e),
1174
- onGenerateCsv: Et,
1175
- onGenerateImage: n(Te),
1176
- onGenerateSvg: ll,
1177
- onToggleTable: Kt,
1178
- onToggleLabels: Zt,
1179
- onToggleTooltip: el,
1180
- onToggleAnnotator: Xt,
1181
- style: I({ visibility: n(gt) ? n(Qe) ? "visible" : "hidden" : "visible" })
1182
- }, Vt({ _: 2 }, [
1183
- l.$slots.menuIcon ? {
1184
- name: "menuIcon",
1185
- fn: x(({ isOpen: t, color: a }) => [
1186
- w(l.$slots, "menuIcon", oe(ne({ isOpen: t, color: a })), void 0, !0)
1187
- ]),
1188
- key: "0"
1189
- } : void 0,
1190
- l.$slots.optionTooltip ? {
1191
- name: "optionTooltip",
1192
- fn: x(() => [
1193
- w(l.$slots, "optionTooltip", {}, void 0, !0)
1194
- ]),
1195
- key: "1"
1196
- } : void 0,
1197
- l.$slots.optionPdf ? {
1198
- name: "optionPdf",
1199
- fn: x(() => [
1200
- w(l.$slots, "optionPdf", {}, void 0, !0)
1201
- ]),
1202
- key: "2"
1203
- } : void 0,
1204
- l.$slots.optionCsv ? {
1205
- name: "optionCsv",
1206
- fn: x(() => [
1207
- w(l.$slots, "optionCsv", {}, void 0, !0)
1208
- ]),
1209
- key: "3"
1210
- } : void 0,
1211
- l.$slots.optionImg ? {
1212
- name: "optionImg",
1213
- fn: x(() => [
1214
- w(l.$slots, "optionImg", {}, void 0, !0)
1215
- ]),
1216
- key: "4"
1217
- } : void 0,
1218
- l.$slots.optionSvg ? {
1219
- name: "optionSvg",
1220
- fn: x(() => [
1221
- w(l.$slots, "optionSvg", {}, void 0, !0)
1222
- ]),
1223
- key: "5"
1224
- } : void 0,
1225
- l.$slots.optionTable ? {
1226
- name: "optionTable",
1227
- fn: x(() => [
1228
- w(l.$slots, "optionTable", {}, void 0, !0)
1229
- ]),
1230
- key: "6"
1231
- } : void 0,
1232
- l.$slots.optionLabels ? {
1233
- name: "optionLabels",
1234
- fn: x(() => [
1235
- w(l.$slots, "optionLabels", {}, void 0, !0)
1236
- ]),
1237
- key: "7"
1238
- } : void 0,
1239
- l.$slots.optionFullscreen ? {
1240
- name: "optionFullscreen",
1241
- fn: x(({ toggleFullscreen: t, isFullscreen: a }) => [
1242
- w(l.$slots, "optionFullscreen", oe(ne({ toggleFullscreen: t, isFullscreen: a })), void 0, !0)
1243
- ]),
1244
- key: "8"
1245
- } : void 0,
1246
- l.$slots.optionAnnotator ? {
1247
- name: "optionAnnotator",
1248
- fn: x(({ toggleAnnotator: t, isAnnotator: a }) => [
1249
- w(l.$slots, "optionAnnotator", oe(ne({ toggleAnnotator: t, isAnnotator: a })), void 0, !0)
1250
- ]),
1251
- key: "9"
1252
- } : void 0
1253
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "chartElement", "position", "callbacks", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : f("", !0),
1254
- (u(), i("svg", {
1255
- ref_key: "svgRef",
1256
- ref: fe,
1257
- xmlns: n(ea),
1258
- class: Rt({ "vue-data-ui-fullscreen--on": Ye.value, "vue-data-ui-fulscreen--off": !Ye.value, "vue-data-ui-svg": !0 }),
1259
- viewBox: `0 0 ${s.value.width <= 0 ? 10 : s.value.width} ${s.value.height <= 0 ? 10 : s.value.height}`,
1260
- style: I(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};${Ae.value.css}`)
1261
- }, [
1262
- b("g", {
1263
- ref_key: "G",
1264
- ref: Ie,
1265
- class: "vue-data-ui-g"
1266
- }, [
1267
- kt(n(St)),
1268
- l.$slots["chart-background"] ? (u(), i("foreignObject", {
1269
- key: 0,
1270
- x: 0,
1271
- y: 0,
1272
- width: s.value.width <= 0 ? 10 : s.value.width,
1273
- height: s.value.height <= 0 ? 10 : s.value.height,
1274
- style: {
1275
- pointerEvents: "none"
1276
- }
1277
- }, [
1278
- w(l.$slots, "chart-background", {}, void 0, !0)
1279
- ], 8, La)) : f("", !0),
1280
- e.value.type === "classic" && !isNaN(ye.value / F.value) ? (u(), i("defs", Sa, [
1281
- e.value.style.chart.useGradient ? (u(), i("radialGradient", {
1282
- key: 0,
1283
- id: `gradient_${c.value}`
1284
- }, [
1285
- b("stop", {
1286
- offset: "0%",
1287
- "stop-color": n($t)(e.value.style.chart.backgroundColor, 0),
1288
- "stop-opacity": "0"
1289
- }, null, 8, Fa),
1290
- b("stop", {
1291
- offset: `${(1 - ye.value / F.value) * 100}%`,
1292
- "stop-color": n($t)("#FFFFFF", 0),
1293
- "stop-opacity": "0"
1294
- }, null, 8, Pa),
1295
- b("stop", {
1296
- offset: `${(1 - ye.value / F.value / 2) * 100}%`,
1297
- "stop-color": n($t)("#FFFFFF", e.value.style.chart.gradientIntensity)
1298
- }, null, 8, Ia),
1299
- b("stop", {
1300
- offset: "100%",
1301
- "stop-color": n($t)(e.value.style.chart.backgroundColor, 0),
1302
- "stop-opacity": "0"
1303
- }, null, 8, Da)
1304
- ], 8, Ma)) : f("", !0)
1305
- ])) : f("", !0),
1306
- e.value.type === "polar" ? (u(), i("defs", Ba, [
1307
- (u(!0), i(_, null, W(d.value, (t, a) => (u(), i("radialGradient", {
1308
- id: `polar_gradient_${a}_${c.value}`,
1309
- cx: (isNaN(t.middlePoint.x / s.value.width * 100) ? 0 : t.middlePoint.x / s.value.width * 100) + "%",
1310
- cy: (isNaN(t.middlePoint.y / s.value.height * 100) ? 0 : t.middlePoint.y / s.value.height * 100) + "%",
1311
- r: "62%"
1312
- }, [
1313
- b("stop", {
1314
- offset: "0%",
1315
- "stop-color": n(ta)(V.value[a].color, 0.05),
1316
- "stop-opacity": e.value.style.chart.gradientIntensity / 100
1317
- }, null, 8, Oa),
1318
- b("stop", {
1319
- offset: "100%",
1320
- "stop-color": V.value[a].color
1321
- }, null, 8, Ya)
1322
- ], 8, za))), 256))
1323
- ])) : f("", !0),
1324
- b("defs", null, [
1325
- b("filter", {
1326
- id: `blur_${c.value}`,
1327
- x: "-50%",
1328
- y: "-50%",
1329
- width: "200%",
1330
- height: "200%"
1331
- }, [
1332
- b("feGaussianBlur", {
1333
- in: "SourceGraphic",
1334
- stdDeviation: 2,
1335
- id: `blur_std_${c.value}`
1336
- }, null, 8, Xa),
1337
- o[5] || (o[5] = b("feColorMatrix", {
1338
- type: "saturate",
1339
- values: "0"
1340
- }, null, -1))
1341
- ], 8, Ea),
1342
- b("filter", {
1343
- id: `shadow_${c.value}`,
1344
- "color-interpolation-filters": "sRGB"
1345
- }, [
1346
- b("feDropShadow", {
1347
- dx: "0",
1348
- dy: "0",
1349
- stdDeviation: "10",
1350
- "flood-opacity": "0.5",
1351
- "flood-color": e.value.style.chart.layout.donut.shadowColor
1352
- }, null, 8, Ra)
1353
- ], 8, Na),
1354
- b("filter", {
1355
- id: `drop_shadow_${c.value}`,
1356
- "color-interpolation-filters": "sRGB",
1357
- x: "-50%",
1358
- y: "-50%",
1359
- width: "200%",
1360
- height: "200%"
1361
- }, [
1362
- b("feDropShadow", {
1363
- dx: "0",
1364
- dy: "0",
1365
- stdDeviation: "3",
1366
- "flood-opacity": "1",
1367
- "flood-color": e.value.style.chart.layout.donut.shadowColor
1368
- }, null, 8, Ua)
1369
- ], 8, Va)
1370
- ]),
1371
- e.value.type === "classic" ? (u(!0), i(_, { key: 3 }, W(V.value.filter((t) => !t.ghost), (t, a) => (u(), i("g", null, [
1372
- K(t) && m.value.dataLabels.show ? (u(), i("path", {
1373
- key: 0,
1374
- d: n(Y)[a]?.connectorPath || n(la)(
1375
- t,
1376
- { x: s.value.width / 2, y: s.value.height / 2 },
1377
- 16,
1378
- 16,
1379
- !1,
1380
- !1,
1381
- ye.value,
1382
- 12,
1383
- e.value.style.chart.layout.curvedMarkers
1384
- ),
1385
- stroke: t.color,
1386
- "stroke-width": "1",
1387
- "stroke-linecap": "round",
1388
- "stroke-linejoin": "round",
1389
- fill: "none",
1390
- filter: Oe(a)
1391
- }, null, 8, Ha)) : f("", !0)
1392
- ]))), 256)) : f("", !0),
1393
- e.value.type === "polar" ? (u(!0), i(_, { key: 4 }, W(V.value.filter((t) => !t.ghost), (t, a) => (u(), i("g", null, [
1394
- K(t) && m.value.dataLabels.show ? (u(), i("path", {
1395
- key: 0,
1396
- d: `M ${n(z)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 24, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x},${n(z)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 24, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y} ${d.value[a].middlePoint.x},${d.value[a].middlePoint.y}`,
1397
- stroke: t.color,
1398
- "stroke-width": "1",
1399
- "stroke-linecap": "round",
1400
- "stroke-linejoin": "round",
1401
- fill: "none",
1402
- filter: Oe(a),
1403
- style: I({
1404
- transition: M.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1405
- })
1406
- }, null, 12, Ga)) : f("", !0)
1407
- ]))), 256)) : f("", !0),
1408
- e.value.type === "classic" && e.value.style.chart.layout.donut.useShadow ? (u(), i("circle", {
1409
- key: 5,
1410
- cx: s.value.width / 2,
1411
- cy: s.value.height / 2,
1412
- r: F.value <= 0 ? 10 : F.value,
1413
- fill: e.value.style.chart.backgroundColor,
1414
- filter: `url(#shadow_${c.value})`
1415
- }, null, 8, ja)) : f("", !0),
1416
- l.$slots.pattern ? (u(), i("g", qa, [
1417
- (u(!0), i(_, null, W(at.dataset, (t, a) => (u(), i("defs", {
1418
- key: `pattern-${t.patternIndex}`
1419
- }, [
1420
- w(l.$slots, "pattern", Ut({ ref_for: !0 }, { seriesIndex: a, patternId: `pattern_${c.value}_${a}` }), void 0, !0)
1421
- ]))), 128))
1422
- ])) : f("", !0),
1423
- j.value && e.value.type === "classic" ? (u(), i(_, { key: 7 }, [
1424
- (u(!0), i(_, null, W(G.value, (t, a) => (u(), i("path", {
1425
- stroke: e.value.style.chart.backgroundColor,
1426
- d: t.arcSlice,
1427
- fill: "#FFFFFF"
1428
- }, null, 8, Wa))), 256)),
1429
- (u(!0), i(_, null, W(G.value, (t, a) => (u(), i("path", {
1430
- class: "vue-ui-donut-arc-path",
1431
- d: t.arcSlice,
1432
- fill: t.color,
1433
- stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1434
- "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1435
- filter: Oe(a)
1436
- }, null, 8, Qa))), 256)),
1437
- l.$slots.pattern ? (u(), i("g", Ja, [
1438
- (u(!0), i(_, null, W(G.value, (t, a) => (u(), i("path", {
1439
- class: "vue-ui-donut-arc-path",
1440
- d: t.arcSlice,
1441
- fill: `url(#${t.pattern})`,
1442
- stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1443
- "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1444
- filter: Oe(a)
1445
- }, null, 8, Ka))), 256))
1446
- ])) : f("", !0)
1447
- ], 64)) : f("", !0),
1448
- j.value && e.value.type === "polar" ? (u(), i(_, { key: 8 }, [
1449
- V.value.length > 1 ? (u(), i("g", Za, [
1450
- (u(!0), i(_, null, W(G.value, (t, a) => (u(), i("path", {
1451
- stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1452
- d: d.value[a].path,
1453
- fill: "#FFFFFF",
1454
- style: I({
1455
- transition: M.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1456
- })
1457
- }, null, 12, eo))), 256)),
1458
- e.value.style.chart.layout.donut.useShadow ? (u(), i("g", to, [
1459
- (u(!0), i(_, null, W(G.value, (t, a) => (u(), i("path", {
1460
- class: "vue-ui-donut-arc-path",
1461
- d: d.value[a].path,
1462
- fill: "transparent",
1463
- stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1464
- "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1465
- filter: `url(#drop_shadow_${c.value})`,
1466
- style: I({
1467
- transition: M.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1468
- })
1469
- }, null, 12, lo))), 256))
1470
- ])) : f("", !0),
1471
- l.$slots.pattern ? (u(), i("g", ao, [
1472
- (u(!0), i(_, null, W(G.value, (t, a) => (u(), i("path", {
1473
- class: "vue-ui-donut-arc-path",
1474
- d: d.value[a].path,
1475
- fill: `url(#${t.pattern})`,
1476
- stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1477
- "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1478
- filter: Oe(a),
1479
- style: I({
1480
- transition: M.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1481
- transformOrigin: "center"
1482
- })
1483
- }, null, 12, oo))), 256))
1484
- ])) : f("", !0),
1485
- (u(!0), i(_, null, W(G.value, (t, a) => (u(), i("path", {
1486
- class: "vue-ui-donut-arc-path",
1487
- d: d.value[a].path,
1488
- fill: e.value.style.chart.useGradient ? `url(#polar_gradient_${a}_${c.value})` : t.color,
1489
- stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1490
- "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1491
- filter: Oe(a),
1492
- style: I({
1493
- transition: M.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1494
- })
1495
- }, null, 12, no))), 256))
1496
- ])) : (u(), i("g", so, [
1497
- l.$slots.pattern ? (u(), i("circle", {
1498
- key: 0,
1499
- cx: s.value.width / 2,
1500
- cy: s.value.height / 2,
1501
- r: F.value,
1502
- fill: `url(#pattern_${c.value}_${V.value[0].patternIndex})`,
1503
- stroke: e.value.style.chart.backgroundColor,
1504
- "stroke-width": e.value.style.chart.layout.donut.borderWidth
1505
- }, null, 8, uo)) : f("", !0),
1506
- b("circle", {
1507
- cx: s.value.width / 2,
1508
- cy: s.value.height / 2,
1509
- r: F.value,
1510
- fill: e.value.style.chart.useGradient ? `url(#polar_gradient_0_${c.value})` : V.value[0].color,
1511
- stroke: e.value.style.chart.backgroundColor,
1512
- "stroke-width": e.value.style.chart.layout.donut.borderWidth
1513
- }, null, 8, ro)
1514
- ]))
1515
- ], 64)) : (u(), i(_, { key: 9 }, [
1516
- e.value.type === "classic" && !Cl.value ? (u(), i("g", io, [
1517
- (u(!0), i(_, null, W(xl.value, (t, a) => (u(), i("path", {
1518
- class: "vue-ui-donut-arc-path",
1519
- d: t.arcSlice,
1520
- fill: t.color,
1521
- stroke: e.value.style.chart.backgroundColor,
1522
- "stroke-width": e.value.style.chart.layout.donut.borderWidth
1523
- }, null, 8, co))), 256))
1524
- ])) : f("", !0),
1525
- b("circle", {
1526
- cx: s.value.width / 2,
1527
- cy: s.value.height / 2,
1528
- r: F.value <= 0 ? 10 : F.value,
1529
- fill: "transparent",
1530
- stroke: e.value.style.chart.backgroundColor
1531
- }, null, 8, vo)
1532
- ], 64)),
1533
- e.value.style.chart.useGradient && e.value.type === "classic" ? (u(), i("circle", {
1534
- key: 10,
1535
- cx: s.value.width / 2,
1536
- cy: s.value.height / 2,
1537
- r: (
1538
- /* This might require adjustments */
1539
- F.value <= 0 ? 10 : F.value
1540
- ),
1541
- fill: `url(#gradient_${c.value})`
1542
- }, null, 8, ho)) : f("", !0),
1543
- b("circle", {
1544
- ref_key: "circle_hollow",
1545
- ref: He,
1546
- style: { pointerEvents: "none" },
1547
- fill: "none",
1548
- cx: s.value.width / 2,
1549
- cy: s.value.height / 2,
1550
- r: Math.max(0.1, ye.value * 1.7)
1551
- }, null, 8, fo),
1552
- j.value ? (u(), i(_, { key: 11 }, [
1553
- V.value.length > 1 || e.value.type === "classic" ? (u(), i("g", yo, [
1554
- (u(!0), i(_, null, W(V.value.filter((t) => !t.ghost), (t, a) => (u(), i("path", {
1555
- d: e.value.type === "classic" ? t.arcSlice : d.value[a].path,
1556
- stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1557
- fill: S.value === a ? e.value.style.chart.layout.donut.selectedColor : "transparent",
1558
- onMouseenter: (r) => pe({
1559
- datapoint: t,
1560
- relativeIndex: a,
1561
- seriesIndex: t.seriesIndex,
1562
- show: !0
1563
- }),
1564
- onMouseleave: (r) => ge({ datapoint: t, seriesIndex: t.seriesIndex }),
1565
- onClick: (r) => be(t, a)
1566
- }, null, 40, go))), 256))
1567
- ])) : (u(), i("g", po, [
1568
- b("circle", {
1569
- cx: s.value.width / 2,
1570
- cy: s.value.height / 2,
1571
- r: F.value,
1572
- fill: "transparent",
1573
- onMouseenter: o[0] || (o[0] = (t) => pe({
1574
- datapoint: V.value[0],
1575
- relativeIndex: 0,
1576
- seriesIndex: V.value[0].seriesIndex,
1577
- show: !0
1578
- })),
1579
- onMouseleave: o[1] || (o[1] = (t) => ge({ datapoint: V.value[0], seriesIndex: V.value[0].seriesIndex })),
1580
- onClick: o[2] || (o[2] = (t) => be(V.value[0], l.i))
1581
- }, null, 40, bo)
1582
- ]))
1583
- ], 64)) : f("", !0),
1584
- e.value.type === "classic" ? (u(), i("g", {
1585
- key: 12,
1586
- ref_key: "G_hollow",
1587
- ref: ut,
1588
- class: "vue-data-ui-donut-hollow-labels"
1589
- }, [
1590
- e.value.style.chart.layout.labels.hollow.total.show ? (u(), i("text", {
1591
- key: 0,
1592
- "text-anchor": "middle",
1593
- x: s.value.width / 2,
1594
- y: s.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,
1595
- fill: e.value.style.chart.layout.labels.hollow.total.color,
1596
- "font-size": e.value.style.chart.layout.labels.hollow.total.fontSize,
1597
- style: I(`font-weight:${e.value.style.chart.layout.labels.hollow.total.bold ? "bold" : ""}`)
1598
- }, de(e.value.style.chart.layout.labels.hollow.total.text), 13, mo)) : f("", !0),
1599
- e.value.style.chart.layout.labels.hollow.total.show ? (u(), i("text", {
1600
- key: 1,
1601
- "text-anchor": "middle",
1602
- x: s.value.width / 2,
1603
- y: s.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,
1604
- fill: e.value.style.chart.layout.labels.hollow.total.value.color,
1605
- "font-size": e.value.style.chart.layout.labels.hollow.total.value.fontSize,
1606
- style: I(`font-weight:${e.value.style.chart.layout.labels.hollow.total.value.bold ? "bold" : ""}`)
1607
- }, de(n(ee)(
1608
- e.value.style.chart.layout.labels.hollow.total.value.formatter,
1609
- j.value,
1610
- n(Q)({
1611
- p: e.value.style.chart.layout.labels.hollow.total.value.prefix,
1612
- v: j.value,
1613
- s: e.value.style.chart.layout.labels.hollow.total.value.suffix
1614
- })
1615
- )), 13, wo)) : f("", !0),
1616
- e.value.style.chart.layout.labels.hollow.average.show ? (u(), i("text", {
1617
- key: 2,
1618
- "text-anchor": "middle",
1619
- x: s.value.width / 2,
1620
- y: s.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,
1621
- fill: e.value.style.chart.layout.labels.hollow.average.color,
1622
- "font-size": e.value.style.chart.layout.labels.hollow.average.fontSize,
1623
- style: I(`font-weight:${e.value.style.chart.layout.labels.hollow.average.bold ? "bold" : ""}`)
1624
- }, de(e.value.style.chart.layout.labels.hollow.average.text), 13, ko)) : f("", !0),
1625
- e.value.style.chart.layout.labels.hollow.average.show ? (u(), i("text", {
1626
- key: 3,
1627
- "text-anchor": "middle",
1628
- x: s.value.width / 2,
1629
- y: s.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,
1630
- fill: e.value.style.chart.layout.labels.hollow.average.value.color,
1631
- "font-size": e.value.style.chart.layout.labels.hollow.average.value.fontSize,
1632
- style: I(`font-weight:${e.value.style.chart.layout.labels.hollow.average.value.bold ? "bold" : ""}`)
1633
- }, de(ce.value || M.value ? "--" : n(ee)(
1634
- e.value.style.chart.layout.labels.hollow.average.value.formatter,
1635
- Ot.value,
1636
- n(Q)({
1637
- p: e.value.style.chart.layout.labels.hollow.average.value.prefix,
1638
- v: Ot.value,
1639
- s: e.value.style.chart.layout.labels.hollow.average.value.suffix,
1640
- r: e.value.style.chart.layout.labels.hollow.average.value.rounding
1641
- })
1642
- )), 13, Co)) : f("", !0)
1643
- ], 512)) : f("", !0),
1644
- (u(!0), i(_, null, W(G.value.filter((t) => !t.ghost), (t, a) => (u(), i("g", {
1645
- filter: Oe(a),
1646
- class: Rt({ animated: e.value.useCssAnimation }),
1647
- key: t.seriesIndex,
1648
- opacity: Fl(t)
1649
- }, [
1650
- e.value.style.chart.layout.labels.dataLabels.useLabelSlots ? (u(), i("g", $o, [
1651
- (u(), i("foreignObject", {
1652
- x: n(A)(t, !0).anchor === "end" ? n(A)(t).x - 120 : n(A)(t, !0).anchor === "middle" ? n(A)(t).x - 60 : n(A)(t).x,
1653
- y: n(xe)(t) - (Jt.value ? 20 : 0),
1654
- width: "120",
1655
- height: "60",
1656
- style: { overflow: "visible" }
1657
- }, [
1658
- b("div", null, [
1659
- w(l.$slots, "dataLabel", Ut({ ref_for: !0 }, {
1660
- datapoint: t,
1661
- isBlur: !e.value.useBlurOnHover || [null, void 0].includes(S.value) || S.value === a,
1662
- isSafari: Jt.value,
1663
- isVisible: K(t) && m.value.dataLabels.show,
1664
- textAlign: n(A)(t, !0, 16, !0).anchor,
1665
- flexAlign: n(A)(t, !0, 16).anchor,
1666
- percentage: et(t, G.value)
1667
- }), void 0, !0)
1668
- ])
1669
- ], 8, Ao))
1670
- ])) : (u(), i("g", _o, [
1671
- e.value.type === "classic" ? (u(), i(_, { key: 0 }, [
1672
- K(t) && m.value.dataLabels.show ? (u(), i("circle", {
1673
- key: 0,
1674
- cx: n(Y)[a]?.markerX ?? n(A)(t).x,
1675
- cy: n(Y)[a]?.markerY ?? n(xe)(t) - 3.5,
1676
- fill: t.color,
1677
- stroke: e.value.style.chart.backgroundColor,
1678
- "stroke-width": 1,
1679
- r: 3,
1680
- filter: !e.value.useBlurOnHover || [null, void 0].includes(S.value) || S.value === a ? "" : `url(#blur_${c.value})`,
1681
- onClick: (r) => be(t, a),
1682
- onMouseenter: (r) => pe({
1683
- datapoint: t,
1684
- relativeIndex: a,
1685
- seriesIndex: t.seriesIndex,
1686
- show: !0
1687
- }),
1688
- onMouseleave: (r) => ge({ datapoint: t, seriesIndex: t.seriesIndex })
1689
- }, null, 40, To)) : f("", !0),
1690
- e.value.style.chart.layout.labels.dataLabels.oneLine || n(Y)[a] ? Ct((u(), i("text", {
1691
- key: 1,
1692
- class: "vue-data-ui-datalabel-inline",
1693
- "text-anchor": n(Y)[a]?.textAnchor || n(A)(t, !0, 12).anchor,
1694
- x: n(Y)[a]?.labelX ?? n(A)(t, !0, 12).x,
1695
- y: n(Y)[a]?.labelY ?? n(xe)(t),
1696
- onClick: (r) => be(t, a),
1697
- onMouseenter: (r) => pe({
1698
- datapoint: t,
1699
- relativeIndex: a,
1700
- seriesIndex: t.seriesIndex,
1701
- show: !0
1702
- }),
1703
- onMouseleave: (r) => ge({ datapoint: t, seriesIndex: t.seriesIndex }),
1704
- innerHTML: Sl(t, a, !!n(Y)[a])
1705
- }, null, 40, Lo)), [
1706
- [xt, K(t) && m.value.dataLabels.show]
1707
- ]) : (u(), i(_, { key: 2 }, [
1708
- Ct(b("text", {
1709
- class: "vue-data-ui-datalabel-value",
1710
- "text-anchor": n(Y)[a]?.textAnchor || n(A)(t, !0, 12).anchor,
1711
- x: n(Y)[a]?.labelX ?? n(A)(t, !0, 12).x,
1712
- y: n(Y)[a]?.labelY ?? n(xe)(t),
1713
- fill: e.value.style.chart.layout.labels.percentage.color,
1714
- "font-size": $e.value + "px",
1715
- style: I(`font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}`),
1716
- onClick: (r) => be(t, a),
1717
- onMouseenter: (r) => pe({
1718
- datapoint: t,
1719
- relativeIndex: a,
1720
- seriesIndex: t.seriesIndex,
1721
- show: !0
1722
- }),
1723
- onMouseleave: (r) => ge({ datapoint: t, seriesIndex: t.seriesIndex })
1724
- }, de(et(t, G.value)) + " " + de(e.value.style.chart.layout.labels.value.show ? `(${n(ee)(
1725
- e.value.style.chart.layout.labels.value.formatter,
1726
- t.value,
1727
- n(Q)({
1728
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
1729
- v: t.value,
1730
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
1731
- r: e.value.style.chart.layout.labels.value.rounding
1732
- }),
1733
- { datapoint: t }
1734
- )})` : ""), 45, So), [
1735
- [xt, K(t) && m.value.dataLabels.show]
1736
- ]),
1737
- Ct(b("text", {
1738
- class: "vue-data-ui-datalabel-name",
1739
- "text-anchor": n(Y)[a]?.textAnchor || n(A)(t).anchor,
1740
- x: n(Y)[a]?.labelX ?? n(A)(t, !0, 12).x,
1741
- y: (n(Y)[a]?.labelY ?? n(xe)(t)) + E.value * 1.2,
1742
- fill: e.value.style.chart.layout.labels.name.color,
1743
- "font-size": E.value + "px",
1744
- style: I(`font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}`),
1745
- onClick: (r) => be(t, a),
1746
- onMouseenter: (r) => pe({
1747
- datapoint: t,
1748
- relativeIndex: a,
1749
- seriesIndex: t.seriesIndex,
1750
- show: !0
1751
- }),
1752
- onMouseleave: (r) => ge({ datapoint: t, seriesIndex: t.seriesIndex }),
1753
- innerHTML: n(il)({
1754
- content: t.name,
1755
- fontSize: E.value,
1756
- fill: e.value.style.chart.layout.labels.name.color,
1757
- x: n(Y)[a]?.labelX ?? n(A)(t, !0, 12).x,
1758
- y: (n(Y)[a]?.labelY ?? n(xe)(t)) + E.value
1759
- })
1760
- }, null, 44, Mo), [
1761
- [xt, K(t) && m.value.dataLabels.show]
1762
- ])
1763
- ], 64))
1764
- ], 64)) : f("", !0),
1765
- e.value.type === "polar" ? (u(), i(_, { key: 1 }, [
1766
- K(t) && m.value.dataLabels.show ? (u(), i("circle", {
1767
- key: 0,
1768
- cx: n(z)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 24, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x,
1769
- cy: n(z)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 24, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y,
1770
- fill: t.color,
1771
- stroke: e.value.style.chart.backgroundColor,
1772
- "stroke-width": 1,
1773
- r: 3,
1774
- filter: !e.value.useBlurOnHover || [null, void 0].includes(S.value) || S.value === a ? "" : `url(#blur_${c.value})`,
1775
- onClick: (r) => be(t, a),
1776
- onMouseenter: (r) => pe({
1777
- datapoint: t,
1778
- relativeIndex: a,
1779
- seriesIndex: t.seriesIndex,
1780
- show: !0
1781
- }),
1782
- onMouseleave: (r) => ge({ datapoint: t, seriesIndex: t.seriesIndex }),
1783
- style: I({
1784
- transition: M.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1785
- })
1786
- }, null, 44, Fo)) : f("", !0),
1787
- e.value.style.chart.layout.labels.dataLabels.oneLine ? Ct((u(), i("text", {
1788
- key: 1,
1789
- class: "vue-data-ui-datalabel-inline",
1790
- "text-anchor": Le(d.value[a].middlePoint),
1791
- x: n(z)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x,
1792
- y: n(z)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y,
1793
- style: I({
1794
- transition: M.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1795
- }),
1796
- onClick: (r) => be(t, a),
1797
- onMouseenter: (r) => pe({
1798
- datapoint: t,
1799
- relativeIndex: a,
1800
- seriesIndex: t.seriesIndex,
1801
- show: !0
1802
- }),
1803
- onMouseleave: (r) => ge({ datapoint: t, seriesIndex: t.seriesIndex }),
1804
- innerHTML: Ml(t, a)
1805
- }, null, 44, Po)), [
1806
- [xt, K(t) && m.value.dataLabels.show]
1807
- ]) : (u(), i(_, { key: 2 }, [
1808
- K(t) && m.value.dataLabels.show ? (u(), i("text", {
1809
- key: 0,
1810
- class: "vue-data-ui-datalabel-value",
1811
- "text-anchor": Le(d.value[a].middlePoint),
1812
- x: n(z)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x,
1813
- y: n(z)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y,
1814
- fill: e.value.style.chart.layout.labels.percentage.color,
1815
- "font-size": $e.value,
1816
- style: I({
1817
- transition: M.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1818
- fontWeight: e.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"
1819
- }),
1820
- onClick: (r) => be(t, a),
1821
- onMouseenter: (r) => pe({
1822
- datapoint: t,
1823
- relativeIndex: a,
1824
- seriesIndex: t.seriesIndex,
1825
- show: !0
1826
- }),
1827
- onMouseleave: (r) => ge({ datapoint: t, seriesIndex: t.seriesIndex })
1828
- }, de(et(t, G.value)) + " " + de(e.value.style.chart.layout.labels.value.show ? `(${n(ee)(
1829
- e.value.style.chart.layout.labels.value.formatter,
1830
- t.value,
1831
- n(Q)({
1832
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
1833
- v: t.value,
1834
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
1835
- r: e.value.style.chart.layout.labels.value.rounding
1836
- }),
1837
- { datapoint: t }
1838
- )})` : ""), 45, Io)) : f("", !0),
1839
- K(t) && m.value.dataLabels.show ? (u(), i("text", {
1840
- key: 1,
1841
- class: "vue-data-ui-datalabel-name",
1842
- "text-anchor": Le(d.value[a].middlePoint),
1843
- x: n(z)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x,
1844
- y: n(z)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y + E.value * 1.2,
1845
- fill: e.value.style.chart.layout.labels.name.color,
1846
- "font-size": E.value,
1847
- style: I({
1848
- transition: M.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1849
- fontWeight: e.value.style.chart.layout.labels.name.bold ? "bold" : "normal"
1850
- }),
1851
- onClick: (r) => be(t, a),
1852
- onMouseenter: (r) => pe({
1853
- datapoint: t,
1854
- relativeIndex: a,
1855
- seriesIndex: t.seriesIndex,
1856
- show: !0
1857
- }),
1858
- onMouseleave: (r) => ge({ datapoint: t, seriesIndex: t.seriesIndex }),
1859
- innerHTML: n(il)({
1860
- content: t.name,
1861
- fontSize: $e.value,
1862
- fill: e.value.style.chart.layout.labels.name.color,
1863
- x: n(z)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x,
1864
- y: n(z)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y + E.value * 1.2
1865
- })
1866
- }, null, 44, Do)) : f("", !0)
1867
- ], 64))
1868
- ], 64)) : f("", !0)
1869
- ])),
1870
- m.value.dataLabels.show && e.value.style.chart.comments.show && t.comment ? (u(), i("g", Bo, [
1871
- K(t) && e.value.type === "classic" ? (u(), i("foreignObject", {
1872
- key: 0,
1873
- x: e.value.style.chart.comments.offsetX + (n(A)(t, !0).anchor === "end" ? n(A)(t).x - e.value.style.chart.comments.width : n(A)(t, !0).anchor === "middle" ? n(A)(t).x - e.value.style.chart.comments.width / 2 : n(A)(t).x),
1874
- y: n(xe)(t) + 24 + e.value.style.chart.comments.offsetY,
1875
- width: e.value.style.chart.comments.width,
1876
- height: "200",
1877
- style: { overflow: "visible", "pointer-events": "none" }
1878
- }, [
1879
- b("div", null, [
1880
- w(l.$slots, "plot-comment", {
1881
- plot: { ...t, textAlign: n(A)(t, !0, 16, !0).anchor, flexAlign: n(A)(t, !0, 16).anchor, isFirstLoad: M.value }
1882
- }, void 0, !0)
1883
- ])
1884
- ], 8, zo)) : f("", !0),
1885
- K(t) && e.value.type === "polar" ? (u(), i("foreignObject", {
1886
- key: 1,
1887
- x: e.value.style.chart.comments.offsetX + (Le(d.value[a].middlePoint) === "end" ? n(z)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x - e.value.style.chart.comments.width : Le(d.value[a].middlePoint) === "middle" ? n(z)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x - e.value.style.chart.comments.width / 2 : n(z)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x),
1888
- y: $l(d.value[a]) + e.value.style.chart.comments.offsetY,
1889
- width: e.value.style.chart.comments.width,
1890
- height: "200",
1891
- style: I({
1892
- transition: M.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1893
- overflow: "visible",
1894
- pointerEvents: "none"
1895
- })
1896
- }, [
1897
- b("div", null, [
1898
- w(l.$slots, "plot-comment", {
1899
- plot: { ...t, textAlign: Le(d.value[a].middlePoint), flexAlign: Le(d.value[a].middlePoint), isFirstLoad: M.value }
1900
- }, void 0, !0)
1901
- ])
1902
- ], 12, Oo)) : f("", !0)
1903
- ])) : f("", !0)
1904
- ], 10, xo))), 128)),
1905
- w(l.$slots, "svg", { svg: s.value }, void 0, !0)
1906
- ], 512)
1907
- ], 14, Ta)),
1908
- l.$slots.watermark ? (u(), i("div", Yo, [
1909
- w(l.$slots, "watermark", oe(ne({ isPrinting: n(le) || n(ae) })), void 0, !0)
1910
- ])) : f("", !0),
1911
- b("div", {
1912
- id: `legend-bottom-${c.value}`
1913
- }, null, 8, Eo),
1914
- ht.value ? (u(), Pe(Hl, {
1915
- key: 5,
1916
- to: e.value.style.chart.legend.position === "top" ? `#legend-top-${c.value}` : `#legend-bottom-${c.value}`
1917
- }, [
1918
- b("div", {
1919
- ref_key: "chartLegend",
1920
- ref: it
1921
- }, [
1922
- e.value.style.chart.legend.show ? (u(), Pe(Ca, {
1923
- key: `legend_${dt.value}`,
1924
- legendSet: zt.value,
1925
- config: kl.value,
1926
- onClickMarker: o[3] || (o[3] = ({ i: t }) => Xe(t))
1927
- }, Vt({
1928
- item: x(({ legend: t, index: a }) => [
1929
- b("div", {
1930
- style: I(`opacity:${O.value.includes(a) ? 0.5 : 1}`),
1931
- onClick: (r) => t.segregate()
1932
- }, de(t.display), 13, Xo)
1933
- ]),
1934
- _: 2
1935
- }, [
1936
- l.$slots.pattern ? {
1937
- name: "legend-pattern",
1938
- fn: x(({ legend: t, index: a }) => [
1939
- kt(wa, {
1940
- shape: t.shape,
1941
- radius: 30,
1942
- stroke: "none",
1943
- plot: { x: 30, y: 30 },
1944
- fill: `url(#pattern_${c.value}_${a})`
1945
- }, null, 8, ["shape", "fill"])
1946
- ]),
1947
- key: "0"
1948
- } : void 0
1949
- ]), 1032, ["legendSet", "config"])) : f("", !0),
1950
- w(l.$slots, "legend", { legend: zt.value }, void 0, !0)
1951
- ], 512)
1952
- ], 8, ["to"])) : f("", !0),
1953
- l.$slots.source ? (u(), i("div", {
1954
- key: 6,
1955
- ref_key: "source",
1956
- ref: Ge,
1957
- dir: "auto"
1958
- }, [
1959
- w(l.$slots, "source", {}, void 0, !0)
1960
- ], 512)) : f("", !0),
1961
- l.$slots.hollow ? (u(), i("div", No, [
1962
- w(l.$slots, "hollow", oe(ne({
1963
- total: j.value,
1964
- average: Ot.value,
1965
- dataset: X.value
1966
- })), void 0, !0)
1967
- ])) : f("", !0),
1968
- kt(n(Ve), {
1969
- show: m.value.showTooltip && L.value,
1970
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1971
- color: e.value.style.chart.tooltip.color,
1972
- fontSize: e.value.style.chart.tooltip.fontSize,
1973
- borderRadius: e.value.style.chart.tooltip.borderRadius,
1974
- borderColor: e.value.style.chart.tooltip.borderColor,
1975
- borderWidth: e.value.style.chart.tooltip.borderWidth,
1976
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1977
- position: e.value.style.chart.tooltip.position,
1978
- offsetY: e.value.style.chart.tooltip.offsetY,
1979
- parent: T.value,
1980
- content: R.value,
1981
- isCustom: tt.value,
1982
- isFullscreen: Ye.value,
1983
- smooth: e.value.style.chart.tooltip.smooth,
1984
- backdropFilter: e.value.style.chart.tooltip.backdropFilter,
1985
- smoothForce: e.value.style.chart.tooltip.smoothForce,
1986
- smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThrehsold
1987
- }, {
1988
- "tooltip-before": x(() => [
1989
- w(l.$slots, "tooltip-before", oe(ne({ ...Yt.value })), void 0, !0)
1990
- ]),
1991
- "tooltip-after": x(() => [
1992
- w(l.$slots, "tooltip-after", oe(ne({ ...Yt.value })), void 0, !0)
1993
- ]),
1994
- _: 3
1995
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
1996
- D.value && e.value.userOptions.buttons.table ? (u(), Pe(Gl(lt.value.component), Ut({ key: 8 }, lt.value.props, {
1997
- ref_key: "tableUnit",
1998
- ref: De,
1999
- onClose: tl
2000
- }), Vt({
2001
- content: x(() => [
2002
- (u(), Pe(n(st), {
2003
- key: `table_${vt.value}`,
2004
- colNames: mt.value.colNames,
2005
- head: mt.value.head,
2006
- body: mt.value.body,
2007
- config: mt.value.config,
2008
- title: e.value.table.useDialog ? "" : lt.value.title,
2009
- withCloseButton: !e.value.table.useDialog,
2010
- onClose: tl
2011
- }, {
2012
- th: x(({ th: t }) => [
2013
- b("div", {
2014
- innerHTML: t,
2015
- style: { display: "flex", "align-items": "center" }
2016
- }, null, 8, Ro)
2017
- ]),
2018
- td: x(({ td: t }) => [
2019
- nl(de(t.name ? t.name : isNaN(Number(t)) ? t.includes("%") ? t : n(ee)(
2020
- e.value.style.chart.layout.labels.percentage.formatter,
2021
- t,
2022
- n(Q)({
2023
- v: t,
2024
- s: "%",
2025
- r: e.value.style.chart.layout.labels.percentage.rounding
2026
- })
2027
- ) : n(ee)(
2028
- e.value.style.chart.layout.labels.value.formatter,
2029
- t,
2030
- n(Q)({
2031
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
2032
- v: t,
2033
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
2034
- r: e.value.style.chart.layout.labels.value.rounding
2035
- })
2036
- )), 1)
2037
- ]),
2038
- _: 1
2039
- }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
2040
- ]),
2041
- _: 2
2042
- }, [
2043
- e.value.table.useDialog ? {
2044
- name: "title",
2045
- fn: x(() => [
2046
- nl(de(lt.value.title), 1)
2047
- ]),
2048
- key: "0"
2049
- } : void 0,
2050
- e.value.table.useDialog ? {
2051
- name: "actions",
2052
- fn: x(() => [
2053
- b("button", {
2054
- tabindex: "0",
2055
- class: "vue-ui-user-options-button",
2056
- onClick: o[4] || (o[4] = (t) => Et(e.value.userOptions.callbacks.csv))
2057
- }, [
2058
- kt(n(nt), {
2059
- name: "excel",
2060
- stroke: lt.value.props.color
2061
- }, null, 8, ["stroke"])
2062
- ])
2063
- ]),
2064
- key: "1"
2065
- } : void 0
2066
- ]), 1040)) : f("", !0),
2067
- n(ie) ? (u(), Pe(fa, { key: 9 })) : f("", !0)
2068
- ], 46, Aa));
2069
- }
2070
- }, Uo = /* @__PURE__ */ xa(Vo, [["__scopeId", "data-v-5483f9f6"]]), un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2071
- __proto__: null,
2072
- default: Uo
2073
- }, Symbol.toStringTag, { value: "Module" }));
2074
- export {
2075
- Uo as V,
2076
- un as a,
2077
- sn as v
2078
- };