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,1513 +0,0 @@
1
- import { defineAsyncComponent as B, computed as w, ref as c, toRefs as Cl, watch as se, onMounted as $l, shallowRef as At, onBeforeUnmount as Ll, openBlock as n, createElementBlock as r, unref as d, normalizeStyle as ne, normalizeClass as H, createBlock as V, withCtx as f, renderSlot as b, normalizeProps as O, guardReactiveProps as F, createCommentVNode as L, createElementVNode as m, createSlots as Tt, createVNode as Ee, Fragment as _, renderList as x, toDisplayString as U, withDirectives as _t, vShow as xt, Teleport as Al, resolveDynamicComponent as Tl, mergeProps as _l, createTextVNode as St, nextTick as Re } from "vue";
2
- import { j as xl, t as Pt, m as Sl, p as Ge, o as Pl, q as Q, n as Ol, a7 as E, s as Fl, a3 as Ye, k as be, l as D, X as Dl, u as Il, a as Ot, a5 as Ft, a6 as me, B as Dt, T as It, a0 as Nl, a1 as Vl, U as zl, ah as Nt, K as We } from "./lib-GwPnJSrY.js";
3
- import { b as Ml } from "./labelUtils-CTXUc3V9.js";
4
- import { t as Bl, u as Ul } from "./useResponsive-DfdjqQps.js";
5
- import { u as El } from "./useConfig-CIgyKZ6R.js";
6
- import { u as Rl, B as Gl } from "./BaseScanner-BhhkKVoj.js";
7
- import { u as Yl } from "./usePrinter-DiK5R6k-.js";
8
- import { u as Wl } from "./useSvgExport-ByUukOZt.js";
9
- import { u as Xe } from "./useNestedProp-BBT0mbHh.js";
10
- import { u as Xl } from "./useThemeCheck-D1ZYXUwG.js";
11
- import { u as ql } from "./useUserOptionState-BIvW1Kz7.js";
12
- import { u as Hl } from "./useChartAccessibility-9icAAmYg.js";
13
- import Kl from "./img-BYYzY_QU.js";
14
- import jl from "./Title-BfyrP-jp.js";
15
- import Jl from "./vue_ui_nested_donuts-DvTrWT_C.js";
16
- import Ql from "./Legend-1LMMsPxL.js";
17
- import { B as Zl } from "./BaseLegendToggle-Y61xahI4.js";
18
- import { _ as ea } from "./_plugin-vue_export-helper-CHgC5LLL.js";
19
- const ta = ["id"], la = ["id"], aa = ["xmlns", "viewBox"], oa = ["width", "height"], sa = ["id"], na = ["offset", "stop-color"], ua = ["offset", "stop-opacity"], ra = ["id"], ia = ["id"], da = ["id"], ca = ["flood-color"], va = ["id", "d"], ha = ["d", "fill", "stroke", "stroke-width", "filter"], fa = ["d", "fill", "stroke", "stroke-width"], pa = { key: 1 }, ga = ["d", "fill"], ya = { key: 2 }, ba = ["font-size", "font-weight", "fill", "dy"], ma = ["href"], wa = ["x", "y", "font-size", "font-weight", "fill"], ka = { key: 3 }, Ca = ["filter"], $a = ["opacity", "text-anchor", "x", "y", "fill", "font-size", "font-weight"], La = ["opacity", "text-anchor", "x", "y", "fill", "font-size", "font-weight"], Aa = ["d", "fill", "onMouseenter", "onClick", "onMouseleave"], Ta = {
20
- key: 4,
21
- class: "vue-data-ui-watermark"
22
- }, _a = ["id"], xa = {
23
- key: 0,
24
- class: "vue-ui-nested-donuts-legend-title"
25
- }, Sa = ["onClick"], Pa = ["innerHTML"], Oa = {
26
- __name: "vue-ui-nested-donuts",
27
- props: {
28
- config: {
29
- type: Object,
30
- default() {
31
- return {};
32
- }
33
- },
34
- dataset: {
35
- type: Array,
36
- default() {
37
- return [];
38
- }
39
- }
40
- },
41
- emits: ["selectLegend", "selectDatapoint", "copyAlt"],
42
- setup(Vt, { expose: zt, emit: Mt }) {
43
- const Bt = B(() => import("./Tooltip-DL3QgjZf.js")), Ut = B(() => import("./BaseIcon-CNx8Tzl5.js")), Et = B(() => import("./vue-ui-accordion-BGHTqIBt.js")), Rt = B(() => import("./DataTable-Bo1pmAqG.js")), Gt = B(() => import("./UserOptions-CrLqEimB.js")), Yt = B(() => import("./PenAndPaper-DWV1FMIi.js")), Wt = B(() => import("./PackageVersion-DN9d0ME5.js")), Xt = B(() => import("./BaseDraggableDialog-DSpKTn3R.js")), { vue_ui_nested_donuts: qt } = El(), { isThemeValid: Ht, warnInvalidTheme: Kt } = Xl(), S = Vt, we = w({
44
- get() {
45
- return !!S.dataset && S.dataset.length;
46
- },
47
- set(t) {
48
- return t;
49
- }
50
- }), y = c(xl()), ke = c(!1), Ce = c(""), $e = c(null), qe = c(0), I = c(null), He = c(null), Le = c(null), Ke = c(null), je = c(null), Je = c(0), Qe = c(0), Ze = c(0), R = c(!0), G = c([]), Z = c([]), et = c(!1), ee = c(null), Ae = c(null), ue = c(!1), re = c(!1), Y = c(!1);
51
- function tt(t) {
52
- Y.value = t, qe.value += 1;
53
- }
54
- const e = c(xe()), W = w(() => e.value.userOptions.useCursorPointer), lt = {
55
- name: "",
56
- series: [
57
- {
58
- name: "",
59
- values: [3],
60
- color: "#BABABA"
61
- },
62
- {
63
- name: "",
64
- values: [2],
65
- color: "#AAAAAA"
66
- },
67
- {
68
- name: "",
69
- values: [1],
70
- color: "#CACACA"
71
- }
72
- ]
73
- }, jt = w(() => Pt({
74
- defaultConfig: {
75
- useCssAnimation: !1,
76
- table: { show: !1 },
77
- startAnimation: { show: !1 },
78
- userOptions: { show: !1 },
79
- style: {
80
- chart: {
81
- backgroundColor: "#99999930",
82
- layout: {
83
- labels: {
84
- dataLabels: { show: !1 }
85
- }
86
- },
87
- legend: { backgroundColor: "transparent", showValue: !1, showPercentage: !1 },
88
- title: {
89
- color: "#1A1A1A",
90
- subtitle: {
91
- color: "#5A5A5A"
92
- }
93
- }
94
- }
95
- }
96
- },
97
- userConfig: e.value.skeletonConfig ?? {}
98
- })), { loading: ie, FINAL_DATASET: X, manualLoading: Te } = Rl({
99
- ...Cl(S),
100
- FINAL_CONFIG: e,
101
- prepareConfig: xe,
102
- callback: () => {
103
- Promise.resolve().then(async () => {
104
- await nt();
105
- });
106
- },
107
- skeletonDataset: S.config?.skeletonDataset ?? [lt, lt],
108
- skeletonConfig: Pt({
109
- defaultConfig: e.value,
110
- userConfig: jt.value
111
- })
112
- }), { userOptionsVisible: _e, setUserOptionsVisibility: at, keepUserOptionState: ot } = ql({ config: e.value }), { svgRef: te } = Hl({
113
- config: e.value.style.chart.title
114
- });
115
- function xe() {
116
- const t = Xe({
117
- userConfig: S.config,
118
- defaultConfig: qt
119
- });
120
- let s = {};
121
- const l = t.theme;
122
- if (l)
123
- if (!Ht.value(t))
124
- Kt(t), s = t;
125
- else {
126
- const o = Xe({
127
- userConfig: Jl[l] || S.config,
128
- defaultConfig: t
129
- });
130
- s = {
131
- ...Xe({
132
- userConfig: S.config,
133
- defaultConfig: o
134
- }),
135
- customPalette: t.customPalette.length ? t.customPalette : Sl[l] || Ge
136
- };
137
- }
138
- else
139
- s = t;
140
- return s;
141
- }
142
- se(
143
- () => S.config,
144
- (t) => {
145
- ie.value || (e.value = xe()), _e.value = !e.value.userOptions.showOnChartHover, ut(), Je.value += 1, Qe.value += 1, Ze.value += 1, A.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, A.value.showTable = e.value.table.show, A.value.showTooltip = e.value.style.chart.tooltip.show, h.value.width = e.value.style.chart.width, h.value.height = e.value.style.chart.height;
146
- },
147
- { deep: !0 }
148
- );
149
- const st = w(() => {
150
- const { top: t, right: s, bottom: l, left: o } = e.value.style.chart.padding;
151
- return {
152
- css: `padding:${t}px ${s}px ${l}px ${o}px`,
153
- top: t,
154
- right: s,
155
- bottom: l,
156
- left: o
157
- };
158
- });
159
- function Jt(t, s = 1e3, l = 50) {
160
- return new Promise((o) => {
161
- const a = t.length;
162
- G.value = Array(a).fill(0), Z.value = [];
163
- let u = 0;
164
- t.forEach((v, g) => {
165
- setTimeout(() => {
166
- const $ = performance.now();
167
- function i(k) {
168
- const T = Math.min((k - $) / s, 1), ae = Nt(T), oe = v * ae;
169
- G.value[g] = oe, G.value = [...G.value];
170
- const ge = [];
171
- let Ve = 0;
172
- S.dataset.forEach((ye, ze) => {
173
- const bl = We(ye.series.reduce(
174
- (Be, Ue) => Be + We(E(Ue.values).reduce((wl, kl) => wl + kl, 0)),
175
- 0
176
- )), ml = We(G.value.slice(Ve, Ve + ye.series.length).reduce((Be, Ue) => Be + Ue, 0)), Me = bl - ml;
177
- Me > Number.MIN_VALUE && ge.push({
178
- name: "__ghost__",
179
- arcOf: ye.name,
180
- arcOfId: `${y.value}_${ze}`,
181
- id: `ghost_${y.value}_${ze}`,
182
- seriesIndex: -1,
183
- datasetIndex: ze,
184
- color: "transparent",
185
- value: Me,
186
- fullValue: Me,
187
- absoluteValues: [],
188
- ghost: !0
189
- }), Ve += ye.series.length;
190
- }), Z.value = ge, T < 1 ? requestAnimationFrame(i) : (u += 1, u === a && o());
191
- }
192
- requestAnimationFrame(i);
193
- }, g * l);
194
- });
195
- });
196
- }
197
- async function nt() {
198
- if (e.value.startAnimation?.show) {
199
- const s = X.value.flatMap((l) => l.series).map(
200
- (l) => E(l.values).reduce((o, a) => o + a, 0)
201
- );
202
- G.value = s.map(() => 0), R.value = !0, Z.value = X.value.map((l, o) => {
203
- const a = l.series.reduce(
204
- (u, v) => u + E(v.values).reduce((g, $) => g + $, 0),
205
- 0
206
- );
207
- return {
208
- name: "__ghost__",
209
- arcOf: l.name,
210
- arcOfId: `${y.value}_${o}`,
211
- id: `ghost_${y.value}_${o}`,
212
- seriesIndex: -1,
213
- datasetIndex: o,
214
- color: "transparent",
215
- value: a,
216
- fullValue: a,
217
- absoluteValues: [],
218
- ghost: !0
219
- };
220
- }), await Re(), Jt(
221
- s,
222
- e.value.startAnimation.durationMs,
223
- e.value.startAnimation.staggerMs
224
- ).then(() => {
225
- R.value = !1, Z.value = [];
226
- });
227
- } else
228
- R.value = !1;
229
- }
230
- $l(async () => {
231
- et.value = !0, ut(), await nt();
232
- });
233
- const z = At(null), K = At(null), j = w(() => !!e.value.debug);
234
- function ut() {
235
- if (Pl(S.dataset) ? (Q({
236
- componentName: "VueUiNestedDonuts",
237
- type: "dataset",
238
- debug: j.value
239
- }), we.value = !1, Te.value = !0) : Te.value = e.value.loading, e.value.responsive) {
240
- const t = Bl(() => {
241
- const { width: s, height: l } = Ul({
242
- chart: I.value,
243
- title: e.value.style.chart.title.text ? He.value : null,
244
- legend: e.value.style.chart.legend.show ? Le.value : null,
245
- source: Ke.value,
246
- noTitle: je.value,
247
- padding: st.value
248
- });
249
- requestAnimationFrame(() => {
250
- h.value.width = s, h.value.height = l;
251
- });
252
- });
253
- z.value && (K.value && z.value.unobserve(K.value), z.value.disconnect()), z.value = new ResizeObserver(t), K.value = I.value.parentNode, z.value.observe(K.value);
254
- }
255
- }
256
- Ll(() => {
257
- z.value && (K.value && z.value.unobserve(K.value), z.value.disconnect());
258
- });
259
- const { isPrinting: Se, isImaging: Pe, generatePdf: rt, generateImage: it } = Yl({
260
- elementId: `nested_donuts_${y.value}`,
261
- fileName: e.value.style.chart.title.text || "vue-ui-nested-donuts",
262
- options: e.value.userOptions.print
263
- }), Qt = w(() => e.value.userOptions.show && !e.value.style.chart.title.text), Zt = w(() => Ol(e.value.customPalette)), A = c({
264
- dataLabels: {
265
- show: e.value.style.chart.layout.labels.dataLabels.show
266
- },
267
- showTable: e.value.table.show,
268
- showTooltip: e.value.style.chart.tooltip.show
269
- });
270
- se(e, () => {
271
- A.value = {
272
- dataLabels: {
273
- show: e.value.style.chart.layout.labels.dataLabels.show
274
- },
275
- showTable: e.value.table.show,
276
- showTooltip: e.value.style.chart.tooltip.show
277
- };
278
- }, { immediate: !0 });
279
- const h = c({
280
- width: e.value.style.chart.width,
281
- height: e.value.style.chart.height
282
- }), Oe = Mt;
283
- function el({ datapoint: t, index: s, seriesIndex: l }) {
284
- e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: l }), Oe("selectDatapoint", { datapoint: t, index: s });
285
- }
286
- function dt({
287
- from: t,
288
- to: s,
289
- duration: l,
290
- onUpdate: o,
291
- onDone: a,
292
- easing: u = Nt
293
- }) {
294
- const v = performance.now();
295
- function g($) {
296
- const i = Math.min(($ - v) / l, 1), k = u(i), T = t + (s - t) * k;
297
- o(T, i), i < 1 ? requestAnimationFrame(g) : (o(s, 1), a && a());
298
- }
299
- requestAnimationFrame(g);
300
- }
301
- const p = c([]), P = w(() => {
302
- ie.value, X.value.forEach((s, l) => {
303
- [null, void 0].includes(s.name) && Q({
304
- componentName: "VueUiNestedDonuts",
305
- type: "datasetSerieAttribute",
306
- property: "name",
307
- index: l,
308
- debug: j.value
309
- }), [null, void 0].includes(s.series) ? Q({
310
- componentName: "VueUiNestedDonuts",
311
- type: "datasetSerieAttribute",
312
- property: "series",
313
- index: l,
314
- debug: j.value
315
- }) : s.series.length === 0 ? Q({
316
- componentName: "VueUiNestedDonuts",
317
- type: "datasetAttributeEmpty",
318
- property: `series at index ${l}`,
319
- debug: j.value
320
- }) : s.series.forEach((o, a) => {
321
- [null, void 0].includes(o.name) && Q({
322
- componentName: "VueUiNestedDonuts",
323
- type: "datasetSerieAttribute",
324
- property: "name",
325
- index: a,
326
- key: "serie",
327
- debug: j.value
328
- }), [null, void 0].includes(o.values) && Q({
329
- componentName: "VueUiNestedDonuts",
330
- type: "datasetSerieAttribute",
331
- property: "values",
332
- index: a,
333
- key: "serie",
334
- debug: j.value
335
- });
336
- });
337
- });
338
- let t = 0;
339
- return X.value.map((s, l) => ({
340
- ...s,
341
- total: s.series.filter((o) => !p.value.includes(o.id)).map((o) => E(o.values).reduce((a, u) => a + u, 0)).reduce((o, a) => o + a, 0),
342
- datasetIndex: l,
343
- id: `${y.value}_${l}`,
344
- series: s.series.map((o, a) => {
345
- const u = E(o.values).reduce((v, g) => v + g, 0);
346
- return {
347
- name: o.name,
348
- arcOf: s.name,
349
- arcOfId: `${y.value}_${l}`,
350
- id: `${y.value}_${l}_${a}`,
351
- seriesIndex: a,
352
- datasetIndex: l,
353
- color: Fl(o.color) || Zt.value[a] || Ge[a % Ge.length],
354
- value: R.value ? G.value[t++] ?? 0 : u,
355
- absoluteValues: o.values || []
356
- };
357
- })
358
- }));
359
- });
360
- se(() => S.dataset, (t) => {
361
- Array.isArray(t) && t.length > 0 && (Te.value = !1);
362
- }, { immediate: !0 });
363
- const N = w(() => Math.min(h.value.height, h.value.width) * (e.value.style.chart.layout.donut.strokeWidth / 512)), ct = w(() => [...P.value].map((t, s) => {
364
- const l = t.series.filter((o) => !p.value.includes(o.id)).map((o) => o.value).reduce((o, a) => o + a, 0);
365
- return {
366
- ...t,
367
- total: l,
368
- series: t.series.filter((o) => !p.value.includes(o.id)).map((o) => ({
369
- ...o,
370
- proportion: o.value / l
371
- }))
372
- };
373
- }));
374
- function tl(t, s, l) {
375
- let o = 0;
376
- for (let a = 0; a < t.length; a += 1)
377
- l.includes(t[a]) && (o += 1);
378
- return o < s;
379
- }
380
- const C = c(ct.value);
381
- se(
382
- () => ct.value,
383
- (t) => C.value = t
384
- );
385
- function ll(t) {
386
- const s = t.map((l) => l.id);
387
- if (t.some((l) => p.value.includes(l.id))) {
388
- const l = new Set(s);
389
- p.value = p.value.filter((o) => !l.has(o));
390
- } else
391
- p.value.push(...s);
392
- }
393
- function q(t) {
394
- Oe("selectLegend", t);
395
- const s = S.dataset.flatMap(
396
- (i, k) => i.series.map((T, ae) => ({
397
- value: E(T.values).reduce((oe, ge) => oe + ge, 0),
398
- id: `${y.value}_${k}_${ae}`,
399
- arcOfId: `${y.value}_${k}`
400
- }))
401
- ).find((i) => i.id === t.id);
402
- if (!s) return;
403
- const l = P.value.flatMap((i) => i.series).find((i) => i.id === t.id)?.value ?? 0, o = C.value.flatMap((i) => i.series).find((i) => i.id === t.id);
404
- let u = o ? o.value : 0;
405
- const v = P.value.find(
406
- (i) => i.id === s.arcOfId
407
- );
408
- if (!v) return;
409
- const g = v.series.map((i) => i.id), $ = tl(
410
- g,
411
- g.length - 1,
412
- p.value
413
- );
414
- p.value.includes(t.id) ? (p.value = p.value.filter((i) => i !== t.id), e.value.serieToggleAnimation.show ? dt({
415
- from: u,
416
- to: l,
417
- duration: e.value.serieToggleAnimation.durationMs,
418
- onUpdate: (i) => {
419
- C.value = C.value.map((k) => ({
420
- ...k,
421
- series: k.series.map((T) => T.id === t.id ? { ...T, value: i } : T)
422
- }));
423
- }
424
- }) : C.value = C.value.map((i) => ({
425
- ...i,
426
- series: i.series.map((k) => k.id === t.id ? { ...k, value: l } : k)
427
- }))) : $ && (e.value.serieToggleAnimation.show ? dt({
428
- from: u,
429
- to: 0,
430
- duration: e.value.serieToggleAnimation.durationMs,
431
- onUpdate: (i) => {
432
- C.value = C.value.map((k) => ({
433
- ...k,
434
- series: k.series.map((T) => T.id === t.id ? { ...T, value: i } : T)
435
- }));
436
- },
437
- onDone: () => {
438
- p.value.push(t.id);
439
- }
440
- }) : (C.value = C.value.map((i) => ({
441
- ...i,
442
- series: i.series.map((k) => k.id === t.id ? { ...k, value: 0 } : k)
443
- })), p.value.push(t.id)));
444
- }
445
- function vt(t) {
446
- if (!P.value.length)
447
- return e.value.debug && console.warn("VueUiNestedDonuts - There are no series to show."), null;
448
- const s = P.value.flatMap((l) => l.series).filter((l) => l.name === t);
449
- return s || (e.value.debug && console.warn(`VueUiNestedDonuts - Series name not found "${t}"`), null);
450
- }
451
- function al(t) {
452
- const s = vt(t);
453
- s !== null && (Array.isArray(s) ? s.forEach((l) => {
454
- p.value.includes(l.id) && q({ id: l.id });
455
- }) : p.value.includes(s.id) && q({ id: s.id }));
456
- }
457
- function ol(t) {
458
- const s = vt(t);
459
- s !== null && (Array.isArray(s) ? s.forEach((l) => {
460
- p.value.includes(l.id) || q({ id: l.id });
461
- }) : p.value.includes(s.id) || q({ id: s.id }));
462
- }
463
- const de = w(() => N.value / P.value.length * e.value.style.chart.layout.donut.spacingRatio), ht = w(() => C.value.map((t, s) => N.value - s * N.value / P.value.length)), J = w(() => C.value.map((t, s) => {
464
- const l = Math.abs(t.series.map(($) => $.value).reduce(($, i) => $ + i, 0)) > 0, o = N.value - s * N.value / C.value.length, a = R.value ? Z.value.find(($) => $.datasetIndex === s) : null, u = [...t.series, ...a ? [a] : []].map(($) => ({
465
- ...$,
466
- value: $.value < 1e-11 ? Number.MIN_VALUE : $.value
467
- })), v = Ye(
468
- { series: [
469
- { name: "_", color: e.value.style.chart.layout.donut.emptyFill, value: 1 }
470
- ] },
471
- h.value.width / 2,
472
- h.value.height / 2,
473
- o,
474
- o,
475
- 1.99999,
476
- 2,
477
- 1,
478
- 360,
479
- 105.25,
480
- de.value
481
- ), g = `M ${h.value.width / 2},${h.value.height / 2 + o}
482
- a ${o},${o} 0 1,1 0,${-2 * o}
483
- a ${o},${o} 0 1,1 0,${2 * o}`;
484
- return {
485
- ...t,
486
- hasData: l,
487
- radius: o,
488
- skeleton: v,
489
- fullCirclePath: g,
490
- donut: Ye(
491
- { series: u },
492
- h.value.width / 2,
493
- h.value.height / 2,
494
- o,
495
- o,
496
- 1.99999,
497
- 2,
498
- 1,
499
- 360,
500
- 105.25,
501
- de.value
502
- )
503
- };
504
- })), ft = w(() => [...P.value].map((t, s) => {
505
- const l = s * N.value / P.value.length;
506
- return {
507
- sizeRatio: l,
508
- donut: Ye(
509
- { series: [{ value: 1 }] },
510
- h.value.width / 2,
511
- h.value.height / 2,
512
- N.value - l,
513
- N.value - l,
514
- 1.99999,
515
- 2,
516
- 1,
517
- 360,
518
- 105.25,
519
- N.value / P.value.length * e.value.style.chart.layout.donut.spacingRatio
520
- )[0]
521
- };
522
- })), pt = c(null), ce = c(null), ve = c(null), Fe = c(null);
523
- function sl({ datapoint: t, seriesIndex: s }) {
524
- e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: s }), ke.value = !1, pt.value = null, $e.value = null, ce.value = null, ve.value = null;
525
- }
526
- function gt({
527
- val: t,
528
- percentage: s,
529
- showVal: l,
530
- showPercentage: o,
531
- config: a
532
- }) {
533
- return Ml({
534
- config: a,
535
- val: t,
536
- percentage: s,
537
- showVal: l,
538
- showPercentage: o
539
- });
540
- }
541
- function nl({ datapoint: t, _relativeIndex: s, seriesIndex: l }) {
542
- e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: l }), pt.value = t.arcOfId, ce.value = t.id, ve.value = l, $e.value = t.id, Fe.value = {
543
- datapoint: t,
544
- seriesIndex: l,
545
- series: C.value,
546
- config: e.value
547
- };
548
- const o = e.value.style.chart.tooltip.customFormat;
549
- if (It(o) && zl(
550
- () => o({
551
- seriesIndex: l,
552
- datapoint: t,
553
- series: C.value,
554
- config: e.value
555
- })
556
- ))
557
- Ce.value = o({
558
- seriesIndex: l,
559
- datapoint: t,
560
- series: C.value,
561
- config: e.value
562
- });
563
- else {
564
- let a = "";
565
- if (e.value.style.chart.tooltip.showAllItemsAtIndex && p.value.length === 0) {
566
- const u = C.value.map((v) => v.series.find((g) => g.seriesIndex === l));
567
- u.forEach((v, g) => {
568
- if (!v) return "";
569
- a += `
570
- <div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${g < u.length - 1 ? `border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor}` : ""}">
571
- <div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
572
- <svg viewBox="0 0 20 20" height="${e.value.style.chart.tooltip.fontSize}" width="${e.value.style.chart.tooltip.fontSize}">
573
- <circle cx="10" cy="10" r="10" fill="${v.color}"/>
574
- </svg>
575
- <span>
576
- ${v.arcOf ?? ""} - ${v.name}
577
- </span>
578
- </div>
579
- <span>
580
- <b>
581
- ${gt({
582
- config: e.value.style.chart.tooltip,
583
- showVal: e.value.style.chart.tooltip.showValue,
584
- showPercentage: e.value.style.chart.tooltip.showPercentage,
585
- val: be(
586
- e.value.style.chart.layout.labels.dataLabels.formatter,
587
- t.value,
588
- D({
589
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
590
- v: t.value,
591
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
592
- r: e.value.style.chart.tooltip.roundingValue
593
- }),
594
- { datapoint: t, seriesIndex: l }
595
- ),
596
- percentage: D({
597
- v: v.proportion * 100,
598
- s: "%",
599
- r: e.value.style.chart.tooltip.roundingPercentage
600
- })
601
- })}
602
- </b>
603
- </span>
604
- </div>
605
- `;
606
- });
607
- } else
608
- a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.arcOf ?? ""} - ${t.name}</div>`, a += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>`, e.value.style.chart.tooltip.showValue && (a += `<b>${be(
609
- e.value.style.chart.layout.labels.dataLabels.formatter,
610
- t.value,
611
- D({
612
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
613
- v: t.value,
614
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
615
- r: e.value.style.chart.tooltip.roundingValue
616
- }),
617
- { datapoint: t, seriesIndex: l }
618
- )}</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? a += `<span>(${D({
619
- v: t.proportion * 100,
620
- s: "%",
621
- r: e.value.style.chart.tooltip.roundingPercentage
622
- })})</span></div>` : a += `<b>${D({
623
- v: t.proportion * 100,
624
- s: "%",
625
- r: e.value.style.chart.tooltip.roundingPercentage
626
- })}</b></div>`);
627
- Ce.value = `<div style="font-size:${e.value.style.chart.tooltip.fontSize}px">${a}</div>`;
628
- }
629
- ke.value = !0;
630
- }
631
- function yt(t) {
632
- return t.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
633
- }
634
- function bt(t, s) {
635
- if (!e.value.useBlurOnHover)
636
- return "";
637
- if (e.value.style.chart.tooltip.showAllItemsAtIndex && p.value.length === 0)
638
- return [null, void 0].includes(ve.value) || ve.value === s ? "" : `url(#blur_${y.value})`;
639
- if (!e.value.style.chart.tooltip.showAllItemsAtIndex || p.value.length)
640
- return [null, void 0].includes(ce.value) || ce.value === t.id ? "" : `url(#blur_${y.value})`;
641
- }
642
- const he = w(() => P.value.map((t, s) => {
643
- const l = t.series.filter(
644
- (a) => !p.value.includes(a.id)
645
- ), o = R.value ? l.map((a) => {
646
- const u = X.value[s].series.findIndex(
647
- (v) => v.name === a.name
648
- );
649
- return E(
650
- X.value[s].series[u].values
651
- ).reduce((v, g) => v + g, 0);
652
- }).reduce((a, u) => a + u, 0) : l.map((a) => a.value).reduce((a, u) => a + u, 0);
653
- return t.series.map((a, u) => {
654
- const v = E(X.value[s].series[u].values).reduce(
655
- (ae, oe) => ae + oe,
656
- 0
657
- ), g = R.value ? v : a.value, $ = be(
658
- e.value.style.chart.layout.labels.dataLabels.formatter,
659
- g,
660
- D({
661
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
662
- v: g,
663
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
664
- r: e.value.style.chart.legend.roundingValue
665
- }),
666
- { datapoint: a, seriesIndex: u }
667
- ), i = isNaN(g / o) || p.value.includes(a.id) ? "-" : D({
668
- v: g / o * 100,
669
- s: "%",
670
- r: e.value.style.chart.legend.roundingPercentage
671
- }), k = gt({
672
- val: $,
673
- percentage: i,
674
- showVal: e.value.style.chart.legend.showValue,
675
- showPercentage: e.value.style.chart.legend.showPercentage,
676
- config: e.value.style.chart.legend
677
- }), T = `${a.name}${e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ": " : ""}${k}`;
678
- return {
679
- name: a.name,
680
- color: a.color,
681
- value: g,
682
- display: T,
683
- svgDisplay: `${a.arcOf ? `${a.arcOf} - ` : ""}${T}`,
684
- shape: "circle",
685
- arcOf: a.arcOf,
686
- id: a.id,
687
- seriesIndex: u,
688
- datasetIndex: s,
689
- total: o,
690
- opacity: p.value.includes(a.id) ? 0.5 : 1,
691
- segregate: () => q(a),
692
- isSegregated: p.value.includes(a.id)
693
- };
694
- });
695
- })), ul = w(() => ({
696
- cy: "nested-donuts-legend",
697
- backgroundColor: e.value.style.chart.legend.backgroundColor,
698
- color: e.value.style.chart.legend.color,
699
- fontSize: e.value.style.chart.legend.fontSize,
700
- paddingBottom: 12,
701
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
702
- })), M = w(() => {
703
- const t = C.value.flatMap((l) => l.series.map((o) => ({
704
- name: `${l.name} - ${o.name}`,
705
- color: o.color,
706
- total: l.total
707
- }))), s = C.value.flatMap((l) => l.series.map((o) => o.value));
708
- return { head: t, body: s };
709
- });
710
- function De(t = null) {
711
- Re(() => {
712
- const s = M.value.head.map((a, u) => [
713
- [a.name],
714
- [M.value.body[u]],
715
- [
716
- isNaN(M.value.body[u] / a.total) ? "-" : M.value.body[u] / a.total * 100
717
- ]
718
- ]), l = [
719
- [e.value.style.chart.title.text],
720
- [e.value.style.chart.title.subtitle.text],
721
- [[""], ["val"], ["%"]]
722
- ].concat(s), o = Nl(l);
723
- t ? t(o) : Vl({
724
- csvContent: o,
725
- title: e.value.style.chart.title.text || "vue-ui-nested-donuts"
726
- });
727
- });
728
- }
729
- const fe = w(() => {
730
- const t = [
731
- e.value.table.columnNames.series,
732
- e.value.table.columnNames.value,
733
- e.value.table.columnNames.percentage
734
- ], s = M.value.head.map((a, u) => {
735
- const v = D({
736
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
737
- v: M.value.body[u],
738
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
739
- r: e.value.table.td.roundingValue
740
- });
741
- return [
742
- {
743
- color: a.color,
744
- name: a.name
745
- },
746
- v,
747
- isNaN(M.value.body[u] / a.total) ? "-" : D({
748
- v: M.value.body[u] / a.total * 100,
749
- s: "%",
750
- r: e.value.table.td.roundingPercentage
751
- })
752
- ];
753
- }), l = {
754
- th: {
755
- backgroundColor: e.value.table.th.backgroundColor,
756
- color: e.value.table.th.color,
757
- outline: e.value.table.th.outline
758
- },
759
- td: {
760
- backgroundColor: e.value.table.td.backgroundColor,
761
- color: e.value.table.td.color,
762
- outline: e.value.table.td.outline
763
- },
764
- breakpoint: e.value.table.responsiveBreakpoint
765
- };
766
- return {
767
- colNames: [
768
- e.value.table.columnNames.series,
769
- e.value.table.columnNames.value,
770
- e.value.table.columnNames.percentage
771
- ],
772
- head: t,
773
- body: s,
774
- config: l
775
- };
776
- });
777
- function rl() {
778
- return P.value;
779
- }
780
- function mt() {
781
- A.value.showTable = !A.value.showTable;
782
- }
783
- function wt() {
784
- A.value.dataLabels.show = !A.value.dataLabels.show;
785
- }
786
- function kt() {
787
- A.value.showTooltip = !A.value.showTooltip;
788
- }
789
- const pe = c(!1);
790
- function Ie() {
791
- pe.value = !pe.value;
792
- }
793
- async function il({ scale: t = 2 } = {}) {
794
- if (!I.value) return;
795
- const { width: s, height: l } = I.value.getBoundingClientRect(), o = s / l, { imageUri: a, base64: u } = await Kl({ domElement: I.value, base64: !0, img: !0, scale: t });
796
- return {
797
- imageUri: a,
798
- base64: u,
799
- title: e.value.style.chart.title.text,
800
- width: s,
801
- height: l,
802
- aspectRatio: o
803
- };
804
- }
805
- const Ne = c(null);
806
- function dl() {
807
- if (!Ne.value) return;
808
- const { x: t, y: s, width: l, height: o } = Ne.value.getBBox();
809
- te.value && te.value.setAttribute("viewBox", `${t} ${s} ${l + Math.min(0, t)} ${o + Math.min(0, s)}`);
810
- }
811
- const le = w(() => {
812
- const t = e.value.table.useDialog && !e.value.table.show, s = A.value.showTable;
813
- return {
814
- component: t ? Xt : Et,
815
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
816
- props: t ? {
817
- backgroundColor: e.value.table.th.backgroundColor,
818
- color: e.value.table.th.color,
819
- headerColor: e.value.table.th.color,
820
- headerBg: e.value.table.th.backgroundColor,
821
- isFullscreen: Y.value,
822
- fullscreenParent: I.value,
823
- forcedWidth: Math.min(800, window.innerWidth * 0.8),
824
- isCursorPointer: W.value
825
- } : {
826
- hideDetails: !0,
827
- config: {
828
- open: s,
829
- maxHeight: 1e4,
830
- body: {
831
- backgroundColor: e.value.style.chart.backgroundColor,
832
- color: e.value.style.chart.color
833
- },
834
- head: {
835
- backgroundColor: e.value.style.chart.backgroundColor,
836
- color: e.value.style.chart.color
837
- }
838
- }
839
- }
840
- };
841
- });
842
- se(() => A.value.showTable, (t) => {
843
- e.value.table.show || (t && e.value.table.useDialog && ee.value ? ee.value.open() : "close" in ee.value && ee.value.close());
844
- });
845
- function Ct() {
846
- A.value.showTable = !1, Ae.value && Ae.value.setTableIconState(!1);
847
- }
848
- const cl = w(() => e.value.style.chart.backgroundColor), vl = w(() => e.value.style.chart.legend), hl = w(() => e.value.style.chart.title), fl = w(() => he.value.flat().map((t) => ({
849
- ...t,
850
- name: t.svgDisplay
851
- }))), { exportSvg: pl, getSvg: gl } = Wl({
852
- svg: te,
853
- title: hl,
854
- legend: vl,
855
- legendItems: fl,
856
- backgroundColor: cl
857
- });
858
- async function $t({ isCb: t }) {
859
- re.value = !0, await Re();
860
- try {
861
- if (t) {
862
- const { blob: s, url: l, text: o, dataUrl: a } = await gl();
863
- await Promise.resolve(e.value.userOptions.callbacks.svg({ blob: s, url: l, text: o, dataUrl: a }));
864
- } else
865
- await Promise.resolve(pl());
866
- } finally {
867
- re.value = !1;
868
- }
869
- }
870
- function yl(t) {
871
- if (t?.stage === "start") {
872
- ue.value = !0;
873
- return;
874
- }
875
- if (t?.stage === "end") {
876
- ue.value = !1;
877
- return;
878
- }
879
- it();
880
- }
881
- async function Lt() {
882
- if (Oe("copyAlt", {
883
- config: e.value,
884
- dataset: C.value
885
- }), !e.value.userOptions.callbacks.altCopy) {
886
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
887
- return;
888
- }
889
- await Promise.resolve(e.value.userOptions.callbacks.altCopy({
890
- config: e.value,
891
- dataset: C.value
892
- }));
893
- }
894
- return zt({
895
- autoSize: dl,
896
- getData: rl,
897
- getImage: il,
898
- generatePdf: rt,
899
- generateCsv: De,
900
- generateImage: it,
901
- generateSvg: $t,
902
- hideSeries: ol,
903
- showSeries: al,
904
- toggleTable: mt,
905
- toggleLabels: wt,
906
- toggleTooltip: kt,
907
- toggleAnnotator: Ie,
908
- toggleFullscreen: tt,
909
- copyAlt: Lt
910
- }), (t, s) => (n(), r("div", {
911
- ref_key: "nestedDonutsChart",
912
- ref: I,
913
- class: H(`vue-data-ui-component vue-ui-nested-donuts ${Y.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
914
- style: ne(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
915
- id: `nested_donuts_${y.value}`,
916
- onMouseenter: s[2] || (s[2] = () => d(at)(!0)),
917
- onMouseleave: s[3] || (s[3] = () => d(at)(!1))
918
- }, [
919
- e.value.userOptions.buttons.annotator ? (n(), V(d(Yt), {
920
- key: 0,
921
- svgRef: d(te),
922
- backgroundColor: e.value.style.chart.backgroundColor,
923
- color: e.value.style.chart.color,
924
- active: pe.value,
925
- isCursorPointer: W.value,
926
- onClose: Ie
927
- }, {
928
- "annotator-action-close": f(() => [
929
- b(t.$slots, "annotator-action-close", {}, void 0, !0)
930
- ]),
931
- "annotator-action-color": f(({ color: l }) => [
932
- b(t.$slots, "annotator-action-color", O(F({ color: l })), void 0, !0)
933
- ]),
934
- "annotator-action-draw": f(({ mode: l }) => [
935
- b(t.$slots, "annotator-action-draw", O(F({ mode: l })), void 0, !0)
936
- ]),
937
- "annotator-action-undo": f(({ disabled: l }) => [
938
- b(t.$slots, "annotator-action-undo", O(F({ disabled: l })), void 0, !0)
939
- ]),
940
- "annotator-action-redo": f(({ disabled: l }) => [
941
- b(t.$slots, "annotator-action-redo", O(F({ disabled: l })), void 0, !0)
942
- ]),
943
- "annotator-action-delete": f(({ disabled: l }) => [
944
- b(t.$slots, "annotator-action-delete", O(F({ disabled: l })), void 0, !0)
945
- ]),
946
- _: 3
947
- }, 8, ["svgRef", "backgroundColor", "color", "active", "isCursorPointer"])) : L("", !0),
948
- Qt.value ? (n(), r("div", {
949
- key: 1,
950
- ref_key: "noTitle",
951
- ref: je,
952
- class: "vue-data-ui-no-title-space",
953
- style: "height:36px; width: 100%;background:transparent"
954
- }, null, 512)) : L("", !0),
955
- e.value.style.chart.title.text ? (n(), r("div", {
956
- key: 2,
957
- ref_key: "chartTitle",
958
- ref: He
959
- }, [
960
- (n(), V(jl, {
961
- key: `title_${Je.value}`,
962
- config: {
963
- title: {
964
- cy: "donut-div-title",
965
- ...e.value.style.chart.title
966
- },
967
- subtitle: {
968
- cy: "donut-div-subtitle",
969
- ...e.value.style.chart.title.subtitle
970
- }
971
- }
972
- }, null, 8, ["config"]))
973
- ], 512)) : L("", !0),
974
- m("div", {
975
- id: `legend-top-${y.value}`
976
- }, null, 8, la),
977
- e.value.userOptions.show && we.value && (d(ot) || d(_e)) ? (n(), V(d(Gt), {
978
- ref_key: "userOptionsRef",
979
- ref: Ae,
980
- key: `user_option_${qe.value}`,
981
- backgroundColor: e.value.style.chart.backgroundColor,
982
- color: e.value.style.chart.color,
983
- isPrinting: d(Se),
984
- isImaging: d(Pe),
985
- uid: y.value,
986
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
987
- hasPdf: e.value.userOptions.buttons.pdf,
988
- hasXls: e.value.userOptions.buttons.csv,
989
- hasImg: e.value.userOptions.buttons.img,
990
- hasSvg: e.value.userOptions.buttons.svg,
991
- hasTable: e.value.userOptions.buttons.table,
992
- hasLabel: e.value.userOptions.buttons.labels,
993
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
994
- hasAltCopy: e.value.userOptions.buttons.altCopy,
995
- isFullscreen: Y.value,
996
- isTooltip: A.value.showTooltip,
997
- titles: { ...e.value.userOptions.buttonTitles },
998
- chartElement: I.value,
999
- position: e.value.userOptions.position,
1000
- hasAnnotator: e.value.userOptions.buttons.annotator,
1001
- isAnnotation: pe.value,
1002
- callbacks: e.value.userOptions.callbacks,
1003
- printScale: e.value.userOptions.print.scale,
1004
- tableDialog: e.value.table.useDialog,
1005
- isCursorPointer: W.value,
1006
- onToggleFullscreen: tt,
1007
- onGeneratePdf: d(rt),
1008
- onGenerateCsv: De,
1009
- onGenerateImage: yl,
1010
- onGenerateSvg: $t,
1011
- onToggleTable: mt,
1012
- onToggleLabels: wt,
1013
- onToggleTooltip: kt,
1014
- onToggleAnnotator: Ie,
1015
- onCopyAlt: Lt,
1016
- style: ne({
1017
- visibility: d(ot) ? d(_e) ? "visible" : "hidden" : "visible"
1018
- })
1019
- }, Tt({ _: 2 }, [
1020
- t.$slots.menuIcon ? {
1021
- name: "menuIcon",
1022
- fn: f(({ isOpen: l, color: o }) => [
1023
- b(t.$slots, "menuIcon", O(F({ isOpen: l, color: o })), void 0, !0)
1024
- ]),
1025
- key: "0"
1026
- } : void 0,
1027
- t.$slots.optionTooltip ? {
1028
- name: "optionTooltip",
1029
- fn: f(() => [
1030
- b(t.$slots, "optionTooltip", {}, void 0, !0)
1031
- ]),
1032
- key: "1"
1033
- } : void 0,
1034
- t.$slots.optionPdf ? {
1035
- name: "optionPdf",
1036
- fn: f(() => [
1037
- b(t.$slots, "optionPdf", {}, void 0, !0)
1038
- ]),
1039
- key: "2"
1040
- } : void 0,
1041
- t.$slots.optionCsv ? {
1042
- name: "optionCsv",
1043
- fn: f(() => [
1044
- b(t.$slots, "optionCsv", {}, void 0, !0)
1045
- ]),
1046
- key: "3"
1047
- } : void 0,
1048
- t.$slots.optionImg ? {
1049
- name: "optionImg",
1050
- fn: f(() => [
1051
- b(t.$slots, "optionImg", {}, void 0, !0)
1052
- ]),
1053
- key: "4"
1054
- } : void 0,
1055
- t.$slots.optionSvg ? {
1056
- name: "optionSvg",
1057
- fn: f(() => [
1058
- b(t.$slots, "optionSvg", {}, void 0, !0)
1059
- ]),
1060
- key: "5"
1061
- } : void 0,
1062
- t.$slots.optionTable ? {
1063
- name: "optionTable",
1064
- fn: f(() => [
1065
- b(t.$slots, "optionTable", {}, void 0, !0)
1066
- ]),
1067
- key: "6"
1068
- } : void 0,
1069
- t.$slots.optionLabels ? {
1070
- name: "optionLabels",
1071
- fn: f(() => [
1072
- b(t.$slots, "optionLabels", {}, void 0, !0)
1073
- ]),
1074
- key: "7"
1075
- } : void 0,
1076
- t.$slots.optionFullscreen ? {
1077
- name: "optionFullscreen",
1078
- fn: f(({ toggleFullscreen: l, isFullscreen: o }) => [
1079
- b(t.$slots, "optionFullscreen", O(F({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
1080
- ]),
1081
- key: "8"
1082
- } : void 0,
1083
- t.$slots.optionAnnotator ? {
1084
- name: "optionAnnotator",
1085
- fn: f(({ toggleAnnotator: l, isAnnotator: o }) => [
1086
- b(t.$slots, "optionAnnotator", O(F({ toggleAnnotator: l, isAnnotator: o })), void 0, !0)
1087
- ]),
1088
- key: "9"
1089
- } : void 0,
1090
- t.$slots.optionAltCopy ? {
1091
- name: "optionAltCopy",
1092
- fn: f(({ altCopy: l }) => [
1093
- b(t.$slots, "optionAltCopy", O(F({ altCopy: l })), void 0, !0)
1094
- ]),
1095
- key: "10"
1096
- } : void 0
1097
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasSvg", "hasTable", "hasLabel", "hasFullscreen", "hasAltCopy", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "isCursorPointer", "onGeneratePdf", "style"])) : L("", !0),
1098
- (n(), r("svg", {
1099
- ref_key: "svgRef",
1100
- ref: te,
1101
- xmlns: d(Dl),
1102
- class: H({
1103
- "vue-data-ui-fullscreen--on": Y.value,
1104
- "vue-data-ui-fulscreen--off": !Y.value,
1105
- "vue-data-ui-svg": !0
1106
- }),
1107
- viewBox: `0 0 ${h.value.width <= 0 ? 1e-3 : h.value.width} ${h.value.height < 0 ? 1e-3 : h.value.height}`,
1108
- style: ne(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};${st.value.css}`)
1109
- }, [
1110
- m("g", {
1111
- ref_key: "G",
1112
- ref: Ne,
1113
- class: "vue-data-ui-g"
1114
- }, [
1115
- Ee(d(Wt)),
1116
- t.$slots["chart-background"] ? (n(), r("foreignObject", {
1117
- key: 0,
1118
- x: 0,
1119
- y: 0,
1120
- width: h.value.width <= 0 ? 1e-3 : h.value.width,
1121
- height: h.value.height < 0 ? 1e-3 : h.value.height,
1122
- style: {
1123
- pointerEvents: "none"
1124
- }
1125
- }, [
1126
- b(t.$slots, "chart-background", {}, void 0, !0)
1127
- ], 8, oa)) : L("", !0),
1128
- m("defs", null, [
1129
- (n(!0), r(_, null, x(ft.value, (l, o) => (n(), r("radialGradient", {
1130
- id: `radial_${y.value}_${o}`
1131
- }, [
1132
- s[4] || (s[4] = m("stop", {
1133
- offset: "0%",
1134
- "stop-color": "#FFFFFF",
1135
- "stop-opacity": "0"
1136
- }, null, -1)),
1137
- m("stop", {
1138
- offset: `${(1 - de.value / ht.value[o]) * 100}%`,
1139
- "stop-color": d(Il)("#FFFFFF", 0),
1140
- "stop-opacity": "0"
1141
- }, null, 8, na),
1142
- m("stop", {
1143
- offset: `${(1 - de.value / ht.value[o] / 2) * 100}%`,
1144
- "stop-color": "#FFFFFF",
1145
- "stop-opacity": e.value.style.chart.gradientIntensity / 100
1146
- }, null, 8, ua),
1147
- s[5] || (s[5] = m("stop", {
1148
- offset: "100%",
1149
- "stop-color": "#FFFFFF",
1150
- "stop-opacity": "0"
1151
- }, null, -1))
1152
- ], 8, sa))), 256))
1153
- ]),
1154
- m("defs", null, [
1155
- m("filter", {
1156
- id: `blur_${y.value}`,
1157
- x: "-50%",
1158
- y: "-50%",
1159
- width: "200%",
1160
- height: "200%"
1161
- }, [
1162
- m("feGaussianBlur", {
1163
- in: "SourceGraphic",
1164
- stdDeviation: 2,
1165
- id: `blur_std_${y.value}`
1166
- }, null, 8, ia),
1167
- s[6] || (s[6] = m("feColorMatrix", {
1168
- type: "saturate",
1169
- values: "0"
1170
- }, null, -1))
1171
- ], 8, ra),
1172
- m("filter", {
1173
- id: `shadow_${y.value}`,
1174
- "color-interpolation-filters": "sRGB"
1175
- }, [
1176
- m("feDropShadow", {
1177
- dx: "0",
1178
- dy: "0",
1179
- stdDeviation: "10",
1180
- "flood-opacity": "0.5",
1181
- "flood-color": e.value.style.chart.layout.donut.shadowColor
1182
- }, null, 8, ca)
1183
- ], 8, da)
1184
- ]),
1185
- m("defs", null, [
1186
- (n(!0), r(_, null, x(J.value, (l, o) => (n(), r("path", {
1187
- key: `path-full-${o}`,
1188
- id: `path-full-${o}-${y.value}`,
1189
- d: l.fullCirclePath,
1190
- fill: "none"
1191
- }, null, 8, va))), 128))
1192
- ]),
1193
- (n(!0), r(_, null, x(J.value, (l, o) => (n(), r("g", null, [
1194
- l.hasData ? (n(!0), r(_, { key: 0 }, x(l.donut.filter((a) => !a.ghost), (a, u) => (n(), r("g", null, [
1195
- m("path", {
1196
- class: "vue-ui-donut-arc-path",
1197
- d: a.arcSlice,
1198
- fill: a.color,
1199
- stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1200
- "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1201
- filter: bt(a, u)
1202
- }, null, 8, ha)
1203
- ]))), 256)) : (n(!0), r(_, { key: 1 }, x(l.skeleton, (a, u) => (n(), r("g", null, [
1204
- m("path", {
1205
- class: "vue-ui-donut-arc-path",
1206
- d: a.arcSlice,
1207
- fill: a.color,
1208
- stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1209
- "stroke-width": e.value.style.chart.layout.donut.borderWidth
1210
- }, null, 8, fa)
1211
- ]))), 256))
1212
- ]))), 256)),
1213
- e.value.style.chart.useGradient ? (n(), r("g", pa, [
1214
- (n(!0), r(_, null, x(ft.value, (l, o) => (n(), r("g", null, [
1215
- m("path", {
1216
- d: l.donut.arcSlice,
1217
- fill: `url(#radial_${y.value}_${o})`,
1218
- stroke: "transparent",
1219
- "stroke-width": "0"
1220
- }, null, 8, ga)
1221
- ]))), 256))
1222
- ])) : L("", !0),
1223
- e.value.style.chart.layout.labels.dataLabels.showDonutName ? (n(), r("g", ya, [
1224
- e.value.style.chart.layout.labels.dataLabels.curvedDonutName ? (n(!0), r(_, { key: 0 }, x(J.value, (l, o) => (n(), r("g", null, [
1225
- (n(!0), r(_, null, x(l.donut, (a, u) => (n(), r("g", null, [
1226
- u === 0 && h.value.width && h.value.height ? (n(), r("text", {
1227
- key: 0,
1228
- class: H({ animated: e.value.useCssAnimation }),
1229
- "text-anchor": "middle",
1230
- "font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
1231
- "font-weight": e.value.style.chart.layout.labels.dataLabels.boldDonutName ? "bold" : "normal",
1232
- fill: e.value.style.chart.layout.labels.dataLabels.color,
1233
- dy: e.value.style.chart.layout.labels.dataLabels.donutNameOffsetY
1234
- }, [
1235
- m("textPath", {
1236
- href: `#path-full-${o}-${y.value}`,
1237
- startOffset: "50%",
1238
- "text-anchor": "middle",
1239
- method: "align",
1240
- spacing: "auto"
1241
- }, U(e.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation ? d(Ot)({
1242
- source: l.name,
1243
- length: e.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize
1244
- }) : l.name), 9, ma)
1245
- ], 10, ba)) : L("", !0)
1246
- ]))), 256))
1247
- ]))), 256)) : (n(!0), r(_, { key: 1 }, x(J.value, (l, o) => (n(), r("g", null, [
1248
- (n(!0), r(_, null, x(l.donut, (a, u) => (n(), r("g", null, [
1249
- u === 0 && h.value.width && h.value.height ? (n(), r("text", {
1250
- key: 0,
1251
- class: H({ animated: e.value.useCssAnimation }),
1252
- x: h.value.width / 2,
1253
- y: a.startY - e.value.style.chart.layout.labels.dataLabels.fontSize + e.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,
1254
- "text-anchor": "middle",
1255
- "font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
1256
- "font-weight": e.value.style.chart.layout.labels.dataLabels.boldDonutName ? "bold" : "normal",
1257
- fill: e.value.style.chart.layout.labels.dataLabels.color
1258
- }, U(e.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation ? d(Ot)({
1259
- source: l.name,
1260
- length: e.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize
1261
- }) : l.name), 11, wa)) : L("", !0)
1262
- ]))), 256))
1263
- ]))), 256))
1264
- ])) : L("", !0),
1265
- e.value.style.chart.layout.labels.dataLabels.show ? (n(), r("g", ka, [
1266
- (n(!0), r(_, null, x(J.value, (l, o) => (n(), r("g", null, [
1267
- (n(!0), r(_, null, x(l.donut.filter((a) => !a.ghost), (a, u) => (n(), r("g", {
1268
- filter: bt(a, u)
1269
- }, [
1270
- _t(m("text", {
1271
- class: H({ animated: e.value.useCssAnimation }),
1272
- opacity: yt(a) ? 1 : 0,
1273
- "text-anchor": d(me)(a, !0).anchor,
1274
- x: d(me)(
1275
- a,
1276
- !1,
1277
- e.value.style.chart.layout.labels.dataLabels.offsetX
1278
- ).x || 0,
1279
- y: d(Ft)(
1280
- a,
1281
- e.value.style.chart.layout.labels.dataLabels.offsetY,
1282
- e.value.style.chart.layout.labels.dataLabels.offsetY
1283
- ) + (e.value.style.chart.layout.labels.dataLabels.showValueFirst && e.value.style.chart.layout.labels.dataLabels.showValue ? e.value.style.chart.layout.labels.dataLabels.fontSize : 0),
1284
- fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? a.color : e.value.style.chart.layout.labels.dataLabels.color,
1285
- "font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
1286
- "font-weight": e.value.style.chart.layout.labels.dataLabels.boldPercentage ? "bold" : "normal"
1287
- }, U(d(Dt)(
1288
- d(D)({
1289
- v: a.proportion * 100,
1290
- s: "%",
1291
- r: e.value.style.chart.layout.labels.dataLabels.roundingPercentage
1292
- }),
1293
- e.value.style.chart.layout.labels.dataLabels.usePercentageParens ? "(" : "",
1294
- e.value.style.chart.layout.labels.dataLabels.usePercentageParens ? ")" : ""
1295
- )), 11, $a), [
1296
- [xt, A.value.dataLabels.show && e.value.style.chart.layout.labels.dataLabels.showPercentage]
1297
- ]),
1298
- _t(m("text", {
1299
- class: H({ animated: e.value.useCssAnimation }),
1300
- opacity: yt(a) ? 1 : 0,
1301
- "text-anchor": d(me)(a, !0).anchor,
1302
- x: d(me)(
1303
- a,
1304
- !1,
1305
- e.value.style.chart.layout.labels.dataLabels.offsetX
1306
- ).x || 0,
1307
- y: d(Ft)(
1308
- a,
1309
- e.value.style.chart.layout.labels.dataLabels.offsetY,
1310
- e.value.style.chart.layout.labels.dataLabels.offsetY
1311
- ) + (e.value.style.chart.layout.labels.dataLabels.showValueFirst || !e.value.style.chart.layout.labels.dataLabels.showPercentage ? 0 : e.value.style.chart.layout.labels.dataLabels.fontSize),
1312
- fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? a.color : e.value.style.chart.layout.labels.dataLabels.color,
1313
- "font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
1314
- "font-weight": e.value.style.chart.layout.labels.dataLabels.boldValue ? "bold" : "normal"
1315
- }, U(d(Dt)(
1316
- d(be)(
1317
- e.value.style.chart.layout.labels.dataLabels.formatter,
1318
- a.value,
1319
- d(D)({
1320
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
1321
- v: a.value,
1322
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
1323
- r: e.value.style.chart.layout.labels.dataLabels.roundingValue
1324
- }),
1325
- { datapoint: a, seriesIndex: o, datapointIndex: u }
1326
- ),
1327
- e.value.style.chart.layout.labels.dataLabels.useValueParens ? "(" : "",
1328
- e.value.style.chart.layout.labels.dataLabels.useValueParens ? ")" : ""
1329
- )), 11, La), [
1330
- [xt, A.value.dataLabels.show && e.value.style.chart.layout.labels.dataLabels.showValue]
1331
- ])
1332
- ], 8, Ca))), 256))
1333
- ]))), 256))
1334
- ])) : L("", !0),
1335
- (n(!0), r(_, null, x(J.value, (l, o) => (n(), r("g", null, [
1336
- (n(!0), r(_, null, x(l.donut, (a, u) => (n(), r("g", null, [
1337
- m("path", {
1338
- d: a.arcSlice,
1339
- fill: $e.value === a.id ? e.value.style.chart.layout.donut.selectedColor : "transparent",
1340
- onMouseenter: (v) => nl({
1341
- datapoint: a,
1342
- seriesIndex: a.seriesIndex
1343
- }),
1344
- onClick: (v) => el({ datapoint: a, index: u, seriesIndex: a.seriesIndex }),
1345
- onMouseleave: (v) => sl({ datapoint: a, seriesIndex: a.seriesIndex })
1346
- }, null, 40, Aa)
1347
- ]))), 256))
1348
- ]))), 256)),
1349
- b(t.$slots, "svg", {
1350
- svg: {
1351
- ...h.value,
1352
- isPrintingImg: d(Se) | d(Pe) | ue.value,
1353
- isPrintingSvg: re.value
1354
- }
1355
- }, void 0, !0)
1356
- ], 512)
1357
- ], 14, aa)),
1358
- t.$slots.watermark ? (n(), r("div", Ta, [
1359
- b(t.$slots, "watermark", O(F({ isPrinting: d(Se) || d(Pe) || ue.value || re.value })), void 0, !0)
1360
- ])) : L("", !0),
1361
- Ee(d(Bt), {
1362
- teleportTo: e.value.style.chart.tooltip.teleportTo,
1363
- show: A.value.showTooltip && ke.value,
1364
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1365
- color: e.value.style.chart.tooltip.color,
1366
- borderRadius: e.value.style.chart.tooltip.borderRadius,
1367
- borderColor: e.value.style.chart.tooltip.borderColor,
1368
- borderWidth: e.value.style.chart.tooltip.borderWidth,
1369
- fontSize: e.value.style.chart.tooltip.fontSize,
1370
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1371
- position: e.value.style.chart.tooltip.position,
1372
- offsetY: e.value.style.chart.tooltip.offsetY,
1373
- parent: I.value,
1374
- content: Ce.value,
1375
- isFullscreen: Y.value,
1376
- isCustom: d(It)(e.value.style.chart.tooltip.customFormat),
1377
- smooth: e.value.style.chart.tooltip.smooth,
1378
- backdropFilter: e.value.style.chart.tooltip.backdropFilter,
1379
- smoothForce: e.value.style.chart.tooltip.smoothForce,
1380
- smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold
1381
- }, {
1382
- "tooltip-before": f(() => [
1383
- b(t.$slots, "tooltip-before", O(F({ ...Fe.value })), void 0, !0)
1384
- ]),
1385
- "tooltip-after": f(() => [
1386
- b(t.$slots, "tooltip-after", O(F({ ...Fe.value })), void 0, !0)
1387
- ]),
1388
- _: 3
1389
- }, 8, ["teleportTo", "show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
1390
- m("div", {
1391
- id: `legend-bottom-${y.value}`
1392
- }, null, 8, _a),
1393
- et.value ? (n(), V(Al, {
1394
- key: 5,
1395
- to: e.value.style.chart.legend.position === "top" ? `#legend-top-${y.value}` : `#legend-bottom-${y.value}`
1396
- }, [
1397
- e.value.style.chart.legend.show ? (n(), r("div", {
1398
- key: 0,
1399
- ref_key: "chartLegend",
1400
- ref: Le,
1401
- class: H({ "vue-ui-nested-donuts-legend": he.value.length > 1 })
1402
- }, [
1403
- (n(!0), r(_, null, x(he.value, (l, o) => (n(), V(Ql, {
1404
- key: `legend_${o}_${Ze.value}`,
1405
- legendSet: l,
1406
- config: ul.value,
1407
- isCursorPointer: W.value,
1408
- onClickMarker: s[0] || (s[0] = ({ legend: a }) => q(a))
1409
- }, {
1410
- legendTitle: f(({ titleSet: a }) => [
1411
- a[0] && a[0].arcOf ? (n(), r("div", xa, U(a[0].arcOf), 1)) : L("", !0)
1412
- ]),
1413
- item: f(({ legend: a, index: u }) => [
1414
- m("div", {
1415
- onClick: (v) => q(a),
1416
- style: ne(`opacity:${p.value.includes(a.id) ? 0.5 : 1}`)
1417
- }, U(a.display), 13, Sa)
1418
- ]),
1419
- legendToggle: f(() => [
1420
- l.length > 2 && e.value.style.chart.legend.selectAllToggle.show && !d(ie) ? (n(), V(Zl, {
1421
- key: `toggle-${o}`,
1422
- backgroundColor: e.value.style.chart.legend.selectAllToggle.backgroundColor,
1423
- color: e.value.style.chart.legend.selectAllToggle.color,
1424
- fontSize: e.value.style.chart.legend.fontSize,
1425
- checked: l.some((a) => p.value.includes(a.id)),
1426
- isCursorPointer: W.value,
1427
- onToggle: (a) => ll(l)
1428
- }, null, 8, ["backgroundColor", "color", "fontSize", "checked", "isCursorPointer", "onToggle"])) : L("", !0)
1429
- ]),
1430
- _: 2
1431
- }, 1032, ["legendSet", "config", "isCursorPointer"]))), 128))
1432
- ], 2)) : L("", !0)
1433
- ], 8, ["to"])) : L("", !0),
1434
- e.value.style.chart.legend.show ? L("", !0) : (n(), r("div", {
1435
- key: 6,
1436
- ref_key: "chartLegend",
1437
- ref: Le
1438
- }, [
1439
- b(t.$slots, "legend", { legend: he.value }, void 0, !0)
1440
- ], 512)),
1441
- t.$slots.source ? (n(), r("div", {
1442
- key: 7,
1443
- ref_key: "source",
1444
- ref: Ke,
1445
- dir: "auto"
1446
- }, [
1447
- b(t.$slots, "source", {}, void 0, !0)
1448
- ], 512)) : L("", !0),
1449
- we.value && e.value.userOptions.buttons.table ? (n(), V(Tl(le.value.component), _l({ key: 8 }, le.value.props, {
1450
- ref_key: "tableUnit",
1451
- ref: ee,
1452
- onClose: Ct
1453
- }), Tt({
1454
- content: f(() => [
1455
- (n(), V(d(Rt), {
1456
- key: `table_${Qe.value}`,
1457
- colNames: fe.value.colNames,
1458
- head: fe.value.head,
1459
- body: fe.value.body,
1460
- config: fe.value.config,
1461
- title: e.value.table.useDialog ? "" : le.value.title,
1462
- withCloseButton: !e.value.table.useDialog,
1463
- isCursorPointer: W.value,
1464
- onClose: Ct
1465
- }, {
1466
- th: f(({ th: l }) => [
1467
- m("div", {
1468
- innerHTML: l,
1469
- style: { display: "flex", "align-items": "center" }
1470
- }, null, 8, Pa)
1471
- ]),
1472
- td: f(({ td: l }) => [
1473
- St(U(l.name || l), 1)
1474
- ]),
1475
- _: 1
1476
- }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton", "isCursorPointer"]))
1477
- ]),
1478
- _: 2
1479
- }, [
1480
- e.value.table.useDialog ? {
1481
- name: "title",
1482
- fn: f(() => [
1483
- St(U(le.value.title), 1)
1484
- ]),
1485
- key: "0"
1486
- } : void 0,
1487
- e.value.table.useDialog ? {
1488
- name: "actions",
1489
- fn: f(() => [
1490
- m("button", {
1491
- tabindex: "0",
1492
- class: "vue-ui-user-options-button",
1493
- onClick: s[1] || (s[1] = (l) => De(e.value.userOptions.callbacks.csv)),
1494
- style: ne({ cursor: W.value ? "pointer" : "default" })
1495
- }, [
1496
- Ee(d(Ut), {
1497
- name: "fileCsv",
1498
- stroke: le.value.props.color
1499
- }, null, 8, ["stroke"])
1500
- ], 4)
1501
- ]),
1502
- key: "1"
1503
- } : void 0
1504
- ]), 1040)) : L("", !0),
1505
- b(t.$slots, "skeleton", {}, () => [
1506
- d(ie) ? (n(), V(Gl, { key: 0 })) : L("", !0)
1507
- ], !0)
1508
- ], 46, ta));
1509
- }
1510
- }, ja = /* @__PURE__ */ ea(Oa, [["__scopeId", "data-v-51e05a92"]]);
1511
- export {
1512
- ja as default
1513
- };