vue-data-ui 3.15.12 → 3.16.1

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