vue-data-ui 3.25.5 → 3.25.7

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 (210) hide show
  1. package/dist/{BaseDraggableDialog-BM_R41j8.js → BaseDraggableDialog-Gm4Q30j0.js} +1 -1
  2. package/dist/{BaseIcon-t83PDe9k.js → BaseIcon-D8R6_sKH.js} +5 -5
  3. package/dist/{BaseLegendToggle-__JnV08B.js → BaseLegendToggle-CXQrLjd-.js} +1 -1
  4. package/dist/{BaseZoomControls-Xo16vFa4.js → BaseZoomControls-BTzjVDPM.js} +1 -1
  5. package/dist/{ColorPicker-Bn3MY7eL.js → ColorPicker-CUy15T72.js} +1 -1
  6. package/dist/{DataTable-COIO9gi4.js → DataTable-oiM9uWrQ.js} +1 -1
  7. package/dist/{HillActions-Cl-dNBZR.js → HillActions-Dn8aKOVJ.js} +1 -1
  8. package/dist/{NonSvgPenAndPaper-KXRhcsxM.js → NonSvgPenAndPaper-DFXjpRyl.js} +2 -2
  9. package/dist/{PackageVersion-M2Ws-VwJ.js → PackageVersion-UfoQuPMf.js} +1 -1
  10. package/dist/{PenAndPaper-BgH3m_LP.js → PenAndPaper-KFzKlvbi.js} +2 -2
  11. package/dist/{SlicerPreview-GvsdvE-h.js → SlicerPreview-B6iHOC9L.js} +1 -1
  12. package/dist/{UserOptions-f3Q0nqrj.js → UserOptions-2x4VklMW.js} +1 -1
  13. package/dist/components/vue-ui-3d-bar.js +1 -1
  14. package/dist/components/vue-ui-accordion.js +1 -1
  15. package/dist/components/vue-ui-age-pyramid.js +1 -1
  16. package/dist/components/vue-ui-annotator.js +1 -1
  17. package/dist/components/vue-ui-bullet.js +1 -1
  18. package/dist/components/vue-ui-bump.js +1 -1
  19. package/dist/components/vue-ui-candlestick.js +1 -1
  20. package/dist/components/vue-ui-carousel-table.js +1 -1
  21. package/dist/components/vue-ui-chestnut.js +1 -1
  22. package/dist/components/vue-ui-chord.js +1 -1
  23. package/dist/components/vue-ui-circle-pack.js +1 -1
  24. package/dist/components/vue-ui-cursor.js +1 -1
  25. package/dist/components/vue-ui-dag.js +1 -1
  26. package/dist/components/vue-ui-dashboard.js +1 -1
  27. package/dist/components/vue-ui-digits.js +1 -1
  28. package/dist/components/vue-ui-donut-evolution.js +1 -1
  29. package/dist/components/vue-ui-donut.js +1 -1
  30. package/dist/components/vue-ui-dumbbell.js +1 -1
  31. package/dist/components/vue-ui-flow.js +1 -1
  32. package/dist/components/vue-ui-funnel.js +1 -1
  33. package/dist/components/vue-ui-galaxy.js +1 -1
  34. package/dist/components/vue-ui-gauge.js +1 -1
  35. package/dist/components/vue-ui-geo.js +1 -1
  36. package/dist/components/vue-ui-gizmo.js +1 -1
  37. package/dist/components/vue-ui-heatmap.js +1 -1
  38. package/dist/components/vue-ui-hill.js +1 -1
  39. package/dist/components/vue-ui-history-plot.js +1 -1
  40. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  41. package/dist/components/vue-ui-icon.js +1 -1
  42. package/dist/components/vue-ui-kpi.js +1 -1
  43. package/dist/components/vue-ui-label.js +1 -1
  44. package/dist/components/vue-ui-mini-loader.js +1 -1
  45. package/dist/components/vue-ui-molecule.js +1 -1
  46. package/dist/components/vue-ui-mood-radar.js +1 -1
  47. package/dist/components/vue-ui-nested-donuts.js +1 -1
  48. package/dist/components/vue-ui-onion.js +1 -1
  49. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  50. package/dist/components/vue-ui-quadrant.js +1 -1
  51. package/dist/components/vue-ui-quick-chart.js +1 -1
  52. package/dist/components/vue-ui-radar.js +1 -1
  53. package/dist/components/vue-ui-rating.js +1 -1
  54. package/dist/components/vue-ui-relation-circle.js +1 -1
  55. package/dist/components/vue-ui-ridgeline.js +1 -1
  56. package/dist/components/vue-ui-rings.js +1 -1
  57. package/dist/components/vue-ui-scatter.js +1 -1
  58. package/dist/components/vue-ui-skeleton.js +1 -1
  59. package/dist/components/vue-ui-smiley.js +1 -1
  60. package/dist/components/vue-ui-spark-trend.js +1 -1
  61. package/dist/components/vue-ui-sparkbar.js +1 -1
  62. package/dist/components/vue-ui-sparkgauge.js +1 -1
  63. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  64. package/dist/components/vue-ui-sparkline.js +1 -1
  65. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  66. package/dist/components/vue-ui-stackbar.js +1 -1
  67. package/dist/components/vue-ui-stackline.js +1 -1
  68. package/dist/components/vue-ui-strip-plot.js +1 -1
  69. package/dist/components/vue-ui-table-heatmap.js +1 -1
  70. package/dist/components/vue-ui-table-sparkline.js +1 -1
  71. package/dist/components/vue-ui-table.js +1 -1
  72. package/dist/components/vue-ui-thermometer.js +1 -1
  73. package/dist/components/vue-ui-timer.js +1 -1
  74. package/dist/components/vue-ui-tiremarks.js +1 -1
  75. package/dist/components/vue-ui-treemap.js +1 -1
  76. package/dist/components/vue-ui-vertical-bar.js +1 -1
  77. package/dist/components/vue-ui-waffle.js +1 -1
  78. package/dist/components/vue-ui-wheel.js +1 -1
  79. package/dist/components/vue-ui-word-cloud.js +1 -1
  80. package/dist/components/vue-ui-world.js +1 -1
  81. package/dist/components/vue-ui-xy-canvas.js +1 -1
  82. package/dist/components/vue-ui-xy.js +1 -1
  83. package/dist/{package-ta2JoIjx.js → package-B-3S5q00.js} +1 -1
  84. package/dist/{render-common-bvOuxfN3.js → render-common-CAXK7ycr.js} +1 -1
  85. package/dist/ssr/vue-ui-donut.js +1 -1
  86. package/dist/ssr/vue-ui-xy.js +1 -1
  87. package/dist/ssr.js +2 -2
  88. package/dist/style.css +1 -1
  89. package/dist/types/vue-data-ui.d.ts +10 -0
  90. package/dist/{useConfig-C_mX5pOZ.js → useConfig-CIQZ6_r7.js} +11 -1
  91. package/dist/{useObjectBindings-uXpBcVyo.js → useObjectBindings---mHNfbS.js} +2 -2
  92. package/dist/utils.js +1 -1
  93. package/dist/{vue-data-ui-BjdCpsRV.js → vue-data-ui-DlWT702n.js} +70 -70
  94. package/dist/vue-data-ui.js +71 -71
  95. package/dist/vue-ui-3d-bar-DbOk2kpM.js +1831 -0
  96. package/dist/{vue-ui-accordion-DRf3NQyH.js → vue-ui-accordion-BSmBUjwZ.js} +2 -2
  97. package/dist/vue-ui-age-pyramid-C7_mGIRk.js +1293 -0
  98. package/dist/{vue-ui-annotator-DZ0O8Xa5.js → vue-ui-annotator-CTQHAPho.js} +676 -676
  99. package/dist/vue-ui-bullet-CDy_dkYz.js +702 -0
  100. package/dist/{vue-ui-bump-DoHnD1Xy.js → vue-ui-bump-DP24leiD.js} +380 -380
  101. package/dist/vue-ui-candlestick-kJLmYaR7.js +1859 -0
  102. package/dist/{vue-ui-carousel-table-k1cBJ1i1.js → vue-ui-carousel-table-BQzAQDw6.js} +2 -2
  103. package/dist/vue-ui-chestnut-DnnRp3Kl.js +2016 -0
  104. package/dist/vue-ui-chord-DO15ZDCS.js +1347 -0
  105. package/dist/vue-ui-circle-pack-DYTllMPV.js +1635 -0
  106. package/dist/{vue-ui-cursor-CQWLyEx0.js → vue-ui-cursor-CtViSjNp.js} +2 -2
  107. package/dist/{vue-ui-dag-BqlsutMj.js → vue-ui-dag-NXtGYzqg.js} +792 -792
  108. package/dist/{vue-ui-dashboard-Be3MmkgS.js → vue-ui-dashboard-D3_4QohV.js} +67 -67
  109. package/dist/{vue-ui-digits-BqdfbcKX.js → vue-ui-digits-CB09pLQx.js} +2 -2
  110. package/dist/vue-ui-donut-evolution-DhrtxvAd.js +1552 -0
  111. package/dist/{vue-ui-donut-gzGZ42uH.js → vue-ui-donut-eysaEyTy.js} +2 -2
  112. package/dist/vue-ui-donut-yTE6D8yV.js +2415 -0
  113. package/dist/vue-ui-dumbbell-CmGIeULQ.js +1533 -0
  114. package/dist/vue-ui-flow-qYAq3Rmn.js +1217 -0
  115. package/dist/vue-ui-funnel-CLAii4wi.js +749 -0
  116. package/dist/vue-ui-galaxy-BVX-o2f-.js +1085 -0
  117. package/dist/vue-ui-gauge-D76-4Z_0.js +934 -0
  118. package/dist/{vue-ui-geo-Ca8kPYr-.js → vue-ui-geo-BQ7-UnuG.js} +429 -429
  119. package/dist/{vue-ui-gizmo-wUqHJICb.js → vue-ui-gizmo-C47zjcs-.js} +2 -2
  120. package/dist/vue-ui-heatmap-XJef60IZ.js +1558 -0
  121. package/dist/{vue-ui-hill-D6Y9Xy2K.js → vue-ui-hill-D5BYGPXB.js} +470 -470
  122. package/dist/vue-ui-history-plot-D-d-1ZiM.js +1698 -0
  123. package/dist/{vue-ui-horizontal-bar-3on3-H3B.js → vue-ui-horizontal-bar-BgFHi6_7.js} +511 -511
  124. package/dist/{vue-ui-kpi-CUpRRIUf.js → vue-ui-kpi-Cb8QJeaj.js} +2 -2
  125. package/dist/{vue-ui-label-DR2qUZOG.js → vue-ui-label-ClMQ5Gez.js} +1 -1
  126. package/dist/{vue-ui-mini-loader-D8W-fERs.js → vue-ui-mini-loader-DtPOVIkK.js} +1 -1
  127. package/dist/vue-ui-molecule-BzwMl-in.js +929 -0
  128. package/dist/{vue-ui-mood-radar-TW251icr.js → vue-ui-mood-radar-BUR_YCcr.js} +376 -376
  129. package/dist/vue-ui-nested-donuts-BEB4nfsD.js +1503 -0
  130. package/dist/vue-ui-onion-CG6myK7a.js +1235 -0
  131. package/dist/{vue-ui-parallel-coordinate-plot-RM25bxtf.js → vue-ui-parallel-coordinate-plot-CSO4johj.js} +407 -407
  132. package/dist/vue-ui-quadrant-CKav0I6g.js +1967 -0
  133. package/dist/{vue-ui-quick-chart-Cswm3_eI.js → vue-ui-quick-chart-BAQNS9_2.js} +4 -4
  134. package/dist/vue-ui-radar-ClPAgf5I.js +1374 -0
  135. package/dist/vue-ui-rating-CWFMoYpE.js +359 -0
  136. package/dist/vue-ui-relation-circle-Da2MhrVe.js +905 -0
  137. package/dist/vue-ui-ridgeline-D7gFs8yR.js +1630 -0
  138. package/dist/vue-ui-rings-DkDJ0k5b.js +1252 -0
  139. package/dist/vue-ui-scatter-yv4JzJID.js +2405 -0
  140. package/dist/{vue-ui-skeleton-D_u8EWeW.js → vue-ui-skeleton-oFnh5zWs.js} +698 -698
  141. package/dist/vue-ui-smiley-DJVusLnp.js +376 -0
  142. package/dist/vue-ui-spark-trend-IqZWPvSB.js +457 -0
  143. package/dist/vue-ui-sparkbar-_FW47iYj.js +401 -0
  144. package/dist/vue-ui-sparkgauge--2vk2Y23.js +268 -0
  145. package/dist/vue-ui-sparkhistogram-CFEIPa5n.js +589 -0
  146. package/dist/{vue-ui-sparkline-9qkNNZG6.js → vue-ui-sparkline-Cs9CJR6W.js} +511 -511
  147. package/dist/vue-ui-sparkstackbar-Cvbue77A.js +738 -0
  148. package/dist/vue-ui-stackbar-C5ANS2hd.js +2355 -0
  149. package/dist/vue-ui-stackline-7yajJFW4.js +2469 -0
  150. package/dist/vue-ui-strip-plot-BT6Eqhup.js +1740 -0
  151. package/dist/vue-ui-table-CiccGbRB.js +1352 -0
  152. package/dist/{vue-ui-table-heatmap-XmDK1aHJ.js → vue-ui-table-heatmap-DnP3pzh2.js} +2 -2
  153. package/dist/vue-ui-table-sparkline-Bp7RiZh4.js +738 -0
  154. package/dist/{vue-ui-thermometer-CLx3SPRv.js → vue-ui-thermometer-CawumQKP.js} +192 -192
  155. package/dist/{vue-ui-timer-BDWUNb6t.js → vue-ui-timer-CXinMW7q.js} +153 -153
  156. package/dist/vue-ui-tiremarks-BnI2uhki.js +540 -0
  157. package/dist/vue-ui-treemap-DTlFbfD6.js +1733 -0
  158. package/dist/vue-ui-waffle-CjgRkQAp.js +1621 -0
  159. package/dist/vue-ui-wheel-B02tiG0p.js +873 -0
  160. package/dist/vue-ui-word-cloud-BZnCOMHx.js +1710 -0
  161. package/dist/{vue-ui-world-C2atz4Xm.js → vue-ui-world-DO2VZ-T-.js} +524 -524
  162. package/dist/vue-ui-xy-BC9GVdWE.js +5283 -0
  163. package/dist/{vue-ui-xy-CpA0W6zM.js → vue-ui-xy-CD6BiP_g.js} +2 -2
  164. package/dist/vue-ui-xy-canvas-DANPuyf4.js +1824 -0
  165. package/dist/{vue_ui_age_pyramid-BY6c-oX_.js → vue_ui_age_pyramid-B2R66DgQ.js} +15 -6
  166. package/package.json +1 -1
  167. package/dist/vue-ui-3d-bar-C0aLR6lw.js +0 -1831
  168. package/dist/vue-ui-age-pyramid-DUcB3lYs.js +0 -1243
  169. package/dist/vue-ui-bullet-DIOCMF2H.js +0 -702
  170. package/dist/vue-ui-candlestick-Cf8TYPl5.js +0 -1859
  171. package/dist/vue-ui-chestnut-BMAuaeif.js +0 -2016
  172. package/dist/vue-ui-chord-DCe2iPjk.js +0 -1347
  173. package/dist/vue-ui-circle-pack-Eb5hS_z3.js +0 -1635
  174. package/dist/vue-ui-donut-CuQVKuZa.js +0 -2415
  175. package/dist/vue-ui-donut-evolution-DckruxZ9.js +0 -1552
  176. package/dist/vue-ui-dumbbell-BYU-hh2E.js +0 -1531
  177. package/dist/vue-ui-flow-DLRcNDLc.js +0 -1217
  178. package/dist/vue-ui-funnel-DjoqNN1U.js +0 -749
  179. package/dist/vue-ui-galaxy-BhR4IOra.js +0 -1085
  180. package/dist/vue-ui-gauge-Cq161Kwp.js +0 -934
  181. package/dist/vue-ui-heatmap-Bl5ymvi9.js +0 -1555
  182. package/dist/vue-ui-history-plot-CvVjsdCL.js +0 -1698
  183. package/dist/vue-ui-molecule-BExVLLgE.js +0 -929
  184. package/dist/vue-ui-nested-donuts-CWzJKr3S.js +0 -1503
  185. package/dist/vue-ui-onion-VaYZQK5i.js +0 -1235
  186. package/dist/vue-ui-quadrant-Dmtwow7n.js +0 -1967
  187. package/dist/vue-ui-radar-C3GYthqu.js +0 -1374
  188. package/dist/vue-ui-rating-CBdDXL80.js +0 -359
  189. package/dist/vue-ui-relation-circle-BA0qy0kp.js +0 -905
  190. package/dist/vue-ui-ridgeline-C5skjBTe.js +0 -1630
  191. package/dist/vue-ui-rings-BJ8yEQMw.js +0 -1252
  192. package/dist/vue-ui-scatter-DXg8ESgr.js +0 -2405
  193. package/dist/vue-ui-smiley-DQOp87rr.js +0 -376
  194. package/dist/vue-ui-spark-trend-CjCufXof.js +0 -457
  195. package/dist/vue-ui-sparkbar-BniEM15a.js +0 -401
  196. package/dist/vue-ui-sparkgauge-BtyCrqTQ.js +0 -268
  197. package/dist/vue-ui-sparkhistogram-DQdn3PW1.js +0 -589
  198. package/dist/vue-ui-sparkstackbar-BXQlOdOk.js +0 -738
  199. package/dist/vue-ui-stackbar-CkjicNDv.js +0 -2355
  200. package/dist/vue-ui-stackline-BB1IZta8.js +0 -2469
  201. package/dist/vue-ui-strip-plot-DGLGuH6e.js +0 -1740
  202. package/dist/vue-ui-table-BXz_HY2g.js +0 -1352
  203. package/dist/vue-ui-table-sparkline-MTEw3imE.js +0 -738
  204. package/dist/vue-ui-tiremarks-DoaypTC-.js +0 -540
  205. package/dist/vue-ui-treemap-Bv7PgpiC.js +0 -1733
  206. package/dist/vue-ui-waffle-z2DhvSAx.js +0 -1621
  207. package/dist/vue-ui-wheel-DYLBJuFb.js +0 -873
  208. package/dist/vue-ui-word-cloud-CbpEhSdL.js +0 -1710
  209. package/dist/vue-ui-xy-B3DQ6t46.js +0 -5283
  210. package/dist/vue-ui-xy-canvas-CJefORWc.js +0 -1824
@@ -1,2415 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { $ as t, Ct as n, D as r, Ft as i, K as a, Lt as o, Mt as s, Pt as c, S as l, Ut as u, Wt as ee, X as d, Yt as te, Zt as f, b as ne, f as p, h as m, ht as h, i as g, j as re, nt as ie, ot as ae, p as _, q as oe, s as se, st as ce, t as le, tt as ue, w as de } from "./lib-Dql7cqyA.js";
3
- import { n as fe, t as pe } from "./useHints-Dq_w2E8B.js";
4
- import { t as me } from "./useConfig-C_mX5pOZ.js";
5
- import { t as he } from "./usePrinter-DISD7q5m.js";
6
- import { n as ge, t as _e } from "./BaseScanner-DZvpgOjM.js";
7
- import { t as ve } from "./useNestedProp-Chvyfpl-.js";
8
- import { t as ye } from "./useThemeCheck-C43Tcqmk.js";
9
- import { t as be } from "./useChartExport-iwOqiIWX.js";
10
- import { t as xe } from "./img-DhGApYG0.js";
11
- import { n as Se } from "./Title-CPHi-evi.js";
12
- import { t as Ce } from "./Shape-CIqU-p2F.js";
13
- import { t as we } from "./_plugin-vue_export-helper-B3ysoDQm.js";
14
- import { l as Te, t as Ee } from "./useResponsive-ZtArZtUf.js";
15
- import { t as De } from "./DefGrad-DVBqDjhO.js";
16
- import { t as Oe } from "./BaseLegendToggle-__JnV08B.js";
17
- import { t as ke } from "./A11yDataTable-DdRsVULz.js";
18
- import { t as Ae } from "./useUserOptionState-DK-_1ddE.js";
19
- import { t as je } from "./useChartAccessibility-DYqac8yF.js";
20
- import { n as Me, t as Ne } from "./labelUtils-BXX2NzRe.js";
21
- import { t as Pe } from "./vue_ui_donut-BDGqG07h.js";
22
- import { t as Fe } from "./Legend-X4kF4PvW.js";
23
- import { Fragment as v, Teleport as Ie, computed as y, createBlock as b, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createSlots as Le, createTextVNode as Re, createVNode as ze, defineAsyncComponent as Be, guardReactiveProps as w, mergeProps as Ve, nextTick as He, normalizeClass as Ue, normalizeProps as T, normalizeStyle as E, onBeforeUnmount as We, onMounted as Ge, openBlock as D, ref as O, renderList as k, renderSlot as A, resolveDynamicComponent as Ke, shallowRef as qe, toDisplayString as j, toRefs as Je, unref as M, useSlots as Ye, vShow as Xe, watch as Ze, withCtx as N, withDirectives as Qe } from "vue";
24
- //#region src/useSmallArcLayouts.js
25
- function $e(e) {
26
- let { FINAL_CONFIG: t, noGhostDonut: n, svg: r, padding: i, labels_inline_fontSize: a, minSize: o, findArcMidpoint: s, calcMarkerOffsetX: c, calcMarkerOffsetY: l, animatingIndex: u, segregated: ee, isSmallArc: d } = e;
27
- return { smallArcLayoutsClassic: y(() => {
28
- if (t.value.type !== "classic") return {};
29
- let e = {}, te = n.value || [];
30
- if (!te.length) return e;
31
- let f = r.value.width / 2, ne = r.value.height / 2, p = i.value.top + 16, m = r.value.height - i.value.bottom - 16, h = a.value, g = h / 3, re = h * 1.5, ie = f - (o.value + 6), ae = f + (o.value + 6), _ = !!t.value.style.chart.layout.curvedMarkers;
32
- function oe({ midX: e, midY: t, bandX: n, bandY: r }) {
33
- if (!_) return `M ${e} ${t} L ${e} ${r} L ${n} ${r}`;
34
- let i = n < f ? -1 : 1, a = n - e, o = r - t, s = Math.sqrt(a * a + o * o) || 1, c = e - f, l = t - ne, u = Math.sqrt(c * c + l * l) || 1, ee = c / u, d = l / u, te = u + 9;
35
- function p({ x: e, y: t }) {
36
- let n = e - f, r = t - ne, i = Math.sqrt(n * n + r * r) || 1;
37
- if (i >= te) return {
38
- x: e,
39
- y: t
40
- };
41
- let a = te / i;
42
- return {
43
- x: f + n * a,
44
- y: ne + r * a
45
- };
46
- }
47
- if (s < 56) {
48
- let i = a / s, c = -(o / s), l = i, u = (e + n) * .5, te = (t + r) * .5, m = u + c, h = te + l, g = (m - f) * (m - f) + (h - ne) * (h - ne), re = u - c, ie = te - l;
49
- (re - f) * (re - f) + (ie - ne) * (ie - ne) > g && (c = -c, l = -l);
50
- let ae = .78, _ = e + a * ae, oe = t + o * ae, se = Math.max(0, Math.min(1, (s - 18) / 44)), ce = se * se * (3 - 2 * se), le = 2.5 + ce * 4, ue = 1 + ce * 2.5;
51
- le *= .9;
52
- let de = p({
53
- x: _ + c * le + ee * ue,
54
- y: oe + l * le + d * ue
55
- });
56
- return `M ${e} ${t} Q ${de.x} ${de.y} ${n} ${r}`;
57
- }
58
- let m = s * .34;
59
- m < 20 && (m = 20), m > 46 && (m = 46);
60
- let h = s * .46;
61
- h < 22 && (h = 22), h > 70 && (h = 70);
62
- let g = {
63
- x: e + ee * m,
64
- y: t + d * m
65
- }, re = f + i * Math.max(Math.abs(n - f), te), ie = {
66
- x: n - i * Math.min(h, Math.abs(re - n) * .75),
67
- y: r
68
- }, ae = p(g), oe = p(ie);
69
- return `M ${e} ${t} C ${ae.x} ${ae.y} ${oe.x} ${oe.y} ${n} ${r}`;
70
- }
71
- function se(e) {
72
- let t = String(e ?? "").split(/\n/g), n = Math.max(0, t.length - 1) * (h * 1.2);
73
- return re + n;
74
- }
75
- function ce({ arc: e, index: t }) {
76
- let { x: n, y: r } = s(e.path);
77
- return {
78
- arc: e,
79
- index: t,
80
- midX: n,
81
- midY: r,
82
- inlineMarkerX: c(e).x,
83
- inlineMarkerY: l(e) - 3.5,
84
- labelHeight: se(e.name)
85
- };
86
- }
87
- function le(e) {
88
- let { arc: t } = e, n = t.seriesIndex ?? 0;
89
- return u.value === n || ee.value.includes(n) ? !1 : d(t, n);
90
- }
91
- function ue(e) {
92
- let t = e.inlineMarkerY < ne, n = e.inlineMarkerX < f;
93
- return t && n ? "TL" : t && !n ? "TR" : !t && n ? "BL" : "BR";
94
- }
95
- function de(e, t) {
96
- if (t.startsWith("T")) {
97
- e.sort((e, t) => e.inlineMarkerY - t.inlineMarkerY || e.index - t.index);
98
- return;
99
- }
100
- e.sort((e, t) => t.inlineMarkerY - e.inlineMarkerY || e.index - t.index);
101
- }
102
- function fe({ side: e, markerX: t, markerY: n, labelY: r, connectorPath: i }) {
103
- return {
104
- side: e,
105
- labelX: e === "left" ? t - 8 : t + 8,
106
- labelY: r + g,
107
- textAnchor: e === "left" ? "end" : "start",
108
- markerX: t,
109
- markerY: n,
110
- connectorPath: i
111
- };
112
- }
113
- function pe({ candidateList: t, side: n, bandMarkerX: r, startY: i, direction: a }) {
114
- let o = i;
115
- t.forEach((t) => {
116
- let { index: i, midX: s, midY: c, labelHeight: l } = t, u;
117
- a === "down" ? (u = o, o += l) : (o -= l, u = o);
118
- let ee = u, d = oe({
119
- midX: s,
120
- midY: c,
121
- bandX: r,
122
- bandY: ee
123
- });
124
- e[i] = fe({
125
- side: n,
126
- markerX: r,
127
- markerY: ee,
128
- labelY: u,
129
- connectorPath: d
130
- });
131
- });
132
- }
133
- let me = te.map((e, t) => ce({
134
- arc: e,
135
- index: t
136
- })).filter(le), he = {
137
- TL: [],
138
- TR: [],
139
- BL: [],
140
- BR: []
141
- };
142
- return me.forEach((e) => {
143
- he[ue(e)].push(e);
144
- }), Object.keys(he).forEach((e) => {
145
- de(he[e], e);
146
- }), pe({
147
- candidateList: he.TL,
148
- side: "left",
149
- bandMarkerX: ie,
150
- startY: p,
151
- direction: "down"
152
- }), pe({
153
- candidateList: he.TR,
154
- side: "right",
155
- bandMarkerX: ae,
156
- startY: p,
157
- direction: "down"
158
- }), he.BL.length > 1 && pe({
159
- candidateList: he.BL,
160
- side: "left",
161
- bandMarkerX: ie,
162
- startY: m,
163
- direction: "up"
164
- }), he.BR.length > 1 && pe({
165
- candidateList: he.BR,
166
- side: "right",
167
- bandMarkerX: ae,
168
- startY: m,
169
- direction: "up"
170
- }), e;
171
- }) };
172
- }
173
- //#endregion
174
- //#region src/components/vue-ui-donut.vue
175
- var et = /* @__PURE__ */ e({ default: () => hn }), tt = ["id"], nt = ["id"], rt = ["id"], it = { style: { position: "relative" } }, at = [
176
- "xmlns",
177
- "aria-describedby",
178
- "viewBox"
179
- ], ot = ["width", "height"], st = { key: 1 }, ct = { key: 2 }, lt = ["id"], ut = ["id"], dt = ["id"], ft = ["flood-color"], pt = ["id"], mt = ["flood-color"], ht = [
180
- "d",
181
- "stroke",
182
- "filter"
183
- ], gt = [
184
- "d",
185
- "stroke",
186
- "filter"
187
- ], _t = [
188
- "cx",
189
- "cy",
190
- "r",
191
- "fill",
192
- "filter"
193
- ], vt = { key: 6 }, yt = ["stroke", "d"], bt = [
194
- "d",
195
- "fill",
196
- "stroke",
197
- "stroke-width",
198
- "filter"
199
- ], xt = { key: 0 }, St = [
200
- "d",
201
- "fill",
202
- "stroke",
203
- "stroke-width",
204
- "filter"
205
- ], Ct = { key: 0 }, wt = ["stroke", "d"], Tt = { key: 0 }, Et = [
206
- "d",
207
- "stroke",
208
- "stroke-width",
209
- "filter"
210
- ], Dt = { key: 1 }, Ot = [
211
- "d",
212
- "fill",
213
- "stroke",
214
- "stroke-width",
215
- "filter"
216
- ], kt = [
217
- "d",
218
- "fill",
219
- "stroke",
220
- "stroke-width",
221
- "filter"
222
- ], At = { key: 1 }, jt = [
223
- "cx",
224
- "cy",
225
- "r",
226
- "fill",
227
- "stroke",
228
- "stroke-width"
229
- ], Mt = [
230
- "cx",
231
- "cy",
232
- "r",
233
- "fill",
234
- "stroke",
235
- "stroke-width"
236
- ], Nt = { key: 0 }, Pt = [
237
- "d",
238
- "fill",
239
- "stroke",
240
- "stroke-width"
241
- ], Ft = [
242
- "cx",
243
- "cy",
244
- "r",
245
- "stroke"
246
- ], It = [
247
- "cx",
248
- "cy",
249
- "r",
250
- "fill"
251
- ], Lt = [
252
- "cx",
253
- "cy",
254
- "r"
255
- ], Rt = { key: 0 }, zt = [
256
- "d",
257
- "stroke",
258
- "fill",
259
- "onMouseenter",
260
- "onMouseleave",
261
- "onClick"
262
- ], Bt = { key: 1 }, Vt = [
263
- "cx",
264
- "cy",
265
- "r"
266
- ], Ht = [
267
- "x",
268
- "y",
269
- "fill",
270
- "font-size"
271
- ], Ut = [
272
- "x",
273
- "y",
274
- "fill",
275
- "font-size"
276
- ], Wt = [
277
- "x",
278
- "y",
279
- "fill",
280
- "font-size"
281
- ], Gt = [
282
- "x",
283
- "y",
284
- "fill",
285
- "font-size"
286
- ], Kt = ["filter", "opacity"], qt = { key: 0 }, Jt = ["x", "y"], Yt = { key: 1 }, Xt = [
287
- "cx",
288
- "cy",
289
- "fill",
290
- "stroke",
291
- "filter",
292
- "onClick",
293
- "onMouseenter",
294
- "onMouseleave"
295
- ], Zt = [
296
- "text-anchor",
297
- "x",
298
- "y",
299
- "onClick",
300
- "onMouseenter",
301
- "onMouseleave",
302
- "innerHTML"
303
- ], Qt = [
304
- "text-anchor",
305
- "x",
306
- "y",
307
- "fill",
308
- "font-size",
309
- "onClick",
310
- "onMouseenter",
311
- "onMouseleave"
312
- ], $t = [
313
- "text-anchor",
314
- "x",
315
- "y",
316
- "fill",
317
- "font-size",
318
- "onClick",
319
- "onMouseenter",
320
- "onMouseleave",
321
- "innerHTML"
322
- ], en = [
323
- "cx",
324
- "cy",
325
- "fill",
326
- "stroke",
327
- "filter",
328
- "onClick",
329
- "onMouseenter",
330
- "onMouseleave"
331
- ], tn = [
332
- "text-anchor",
333
- "x",
334
- "y",
335
- "onClick",
336
- "onMouseenter",
337
- "onMouseleave",
338
- "innerHTML"
339
- ], nn = [
340
- "text-anchor",
341
- "x",
342
- "y",
343
- "fill",
344
- "font-size",
345
- "onClick",
346
- "onMouseenter",
347
- "onMouseleave"
348
- ], rn = [
349
- "text-anchor",
350
- "x",
351
- "y",
352
- "fill",
353
- "font-size",
354
- "onClick",
355
- "onMouseenter",
356
- "onMouseleave",
357
- "innerHTML"
358
- ], an = { key: 2 }, on = [
359
- "x",
360
- "y",
361
- "width"
362
- ], sn = [
363
- "x",
364
- "y",
365
- "width"
366
- ], cn = {
367
- key: 0,
368
- style: {
369
- position: "absolute",
370
- top: "100%",
371
- left: "0",
372
- width: "100%"
373
- },
374
- "data-dom-to-png-ignore": "",
375
- "aria-hidden": "true"
376
- }, ln = {
377
- key: 5,
378
- class: "vue-data-ui-watermark"
379
- }, un = ["id"], dn = ["onClick"], fn = {
380
- key: 8,
381
- class: "vue-ui-donut-hollow"
382
- }, pn = { key: 0 }, mn = { key: 1 }, hn = /*#__PURE__*/ we({
383
- __name: "vue-ui-donut",
384
- props: {
385
- config: {
386
- type: Object,
387
- default() {
388
- return {};
389
- }
390
- },
391
- dataset: {
392
- type: Array,
393
- default() {
394
- return [];
395
- }
396
- }
397
- },
398
- emits: [
399
- "selectLegend",
400
- "selectDatapoint",
401
- "copyAlt"
402
- ],
403
- setup(e, { expose: we, emit: et }) {
404
- let hn = Be(() => import("./Tooltip-hhrkQ3Lk.js")), gn = Be(() => import("./BaseIcon-t83PDe9k.js").then((e) => e.n)), _n = Be(() => import("./vue-ui-accordion-DRf3NQyH.js").then((e) => e.n)), vn = Be(() => import("./DataTable-COIO9gi4.js")), yn = Be(() => import("./PenAndPaper-BgH3m_LP.js").then((e) => e.t)), bn = Be(() => import("./UserOptions-f3Q0nqrj.js").then((e) => e.n)), xn = Be(() => import("./PackageVersion-M2Ws-VwJ.js").then((e) => e.t)), Sn = Be(() => import("./BaseDraggableDialog-BM_R41j8.js").then((e) => e.n)), { vue_ui_donut: Cn } = me(), { isThemeValid: wn, warnInvalidTheme: Tn } = ye(), En = Ye(), P = e, Dn = y({
405
- get() {
406
- return !!P.dataset && P.dataset.length;
407
- },
408
- set(e) {
409
- return e;
410
- }
411
- }), F = qe(null), On = O(null), kn = O(null), An = O(null), jn = qe(null), Mn = qe(null), Nn = qe(null), Pn = qe(null), Fn = qe(null), In = qe(null), Ln = O(0), Rn = O(0), zn = O(0), Bn = O(!1), Vn = O(null), Hn = O(null), Un = O(null), Wn = O({
412
- x: 0,
413
- y: 0
414
- }), Gn = O("pointer"), Kn = O(!1), qn = y({
415
- get: () => z.value.style.chart.layout.labels.percentage.fontSize,
416
- set: (e) => e
417
- }), I = y({
418
- get: () => z.value.style.chart.layout.labels.name.fontSize,
419
- set: (e) => e
420
- }), Jn = y({
421
- get: () => z.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
422
- set: (e) => e
423
- }), Yn = !1, Xn = () => {
424
- !z.value.autoSize || Yn || (Yn = !0, requestAnimationFrame(() => {
425
- Yn = !1;
426
- let e = z.value, t = On.value, n = V.value;
427
- if (!e.autoSize || !t || !n) return;
428
- let [r, i, a, o] = n.getAttribute("viewBox").split(" ").map(Number), s = {
429
- x: r,
430
- y: i,
431
- width: a,
432
- height: o
433
- }, c = [
434
- {
435
- selector: ".vue-data-ui-datalabel-value",
436
- baseSize: e.style.chart.layout.labels.percentage.fontSize,
437
- minSize: e.style.chart.layout.labels.percentage.minFontSize,
438
- sizeRef: qn
439
- },
440
- {
441
- selector: ".vue-data-ui-datalabel-name",
442
- baseSize: e.style.chart.layout.labels.name.fontSize,
443
- minSize: e.style.chart.layout.labels.name.minFontSize,
444
- sizeRef: I
445
- },
446
- {
447
- selector: ".vue-data-ui-datalabel-inline",
448
- baseSize: e.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
449
- minSize: e.style.chart.layout.labels.name.minFontSize,
450
- sizeRef: Jn
451
- }
452
- ];
453
- c.map((e) => t.querySelectorAll(e.selector).length).reduce((e, t) => e + t, 0) !== 0 && c.forEach(({ selector: e, baseSize: n, minSize: r, sizeRef: i }) => {
454
- t.querySelectorAll(e).forEach((e) => {
455
- i.value = se({
456
- el: e,
457
- bounds: s,
458
- currentFontSize: n,
459
- minFontSize: r,
460
- attempts: 200,
461
- padding: 1
462
- });
463
- });
464
- });
465
- }));
466
- };
467
- Ge(async () => {
468
- Bn.value = !0, $n(), requestAnimationFrame(Xn);
469
- });
470
- let Zn;
471
- Ge(() => {
472
- F.value && (Zn = new ResizeObserver((e) => {
473
- for (let t of e) {
474
- let { width: e, height: n } = t.contentRect;
475
- if (e > 0 && n > 0) {
476
- Xn();
477
- break;
478
- }
479
- }
480
- }), Zn.observe(F.value.parentElement));
481
- }), We(() => {
482
- Zn?.disconnect();
483
- }), We(() => {
484
- Nn.value && (Pn.value && Nn.value.unobserve(Pn.value), Nn.value.disconnect());
485
- });
486
- let Qn = y(() => z.value.debug);
487
- function $n() {
488
- if (c(P.dataset) ? (ie({
489
- componentName: "VueUiDonut",
490
- type: "dataset",
491
- debug: Qn.value
492
- }), Dn.value = !1, cr.value = !0) : (P.dataset.forEach((e, t) => {
493
- h({
494
- datasetObject: e,
495
- requiredAttributes: ["name", "values"]
496
- }).forEach((e) => {
497
- ie({
498
- componentName: "VueUiDonut",
499
- type: "datasetSerieAttribute",
500
- property: e,
501
- index: t,
502
- debug: Qn.value
503
- }), Dn.value = !1, cr.value = !0;
504
- });
505
- }), Qn.value && P.dataset.forEach((e, t) => {
506
- (!e.name || e.name === "") && ie({
507
- componentName: "VueUiDonut",
508
- type: "datasetAttributeEmpty",
509
- property: "name",
510
- index: t
511
- });
512
- })), c(P.dataset) || (cr.value = z.value.loading), z.value.responsive) {
513
- let e = Te(() => {
514
- let { width: e, height: t } = Ee({
515
- chart: F.value,
516
- title: z.value.style.chart.title.text ? jn.value : null,
517
- legend: z.value.style.chart.legend.show ? Mn.value : null,
518
- source: Fn.value,
519
- noTitle: In.value,
520
- padding: z.value.autoSize ? void 0 : yr.value
521
- });
522
- requestAnimationFrame(() => {
523
- U.value.width = e, U.value.height = t, Xn();
524
- });
525
- });
526
- Nn.value && (Pn.value && Nn.value.unobserve(Pn.value), Nn.value.disconnect()), Nn.value = new ResizeObserver(e), Pn.value = F.value.parentNode, Nn.value.observe(Pn.value);
527
- }
528
- }
529
- let L = O(oe()), er = O(!1), tr = O(""), R = O(null), nr = O(0);
530
- function rr() {
531
- let e = ve({
532
- userConfig: P.config,
533
- defaultConfig: Cn
534
- }), t = {}, n = e.theme;
535
- if (!n) t = e;
536
- else if (!wn.value(e)) Tn(e), t = e;
537
- else {
538
- let r = ve({
539
- userConfig: Pe[n] || P.config,
540
- defaultConfig: e
541
- });
542
- t = {
543
- ...ve({
544
- userConfig: P.config,
545
- defaultConfig: r
546
- }),
547
- customPalette: e.customPalette.length ? e.customPalette : te[n] || o
548
- };
549
- }
550
- return t;
551
- }
552
- let z = O(rr());
553
- fe({
554
- config: () => z.value,
555
- dataset: () => P.dataset,
556
- component: "VueUiDonut",
557
- rules: [
558
- pe.singleSeries,
559
- pe.emptyArray,
560
- {
561
- test: (e) => e.length > 6,
562
- message: [
563
- "👀 The number of series is > 6. Consider:",
564
- "",
565
- "▶️ Grouping small values dynamically into a single \"Other\" series.",
566
- "",
567
- "▶️ Using filters to let users choose a maximum number of series to display.",
568
- "",
569
- "▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read."
570
- ]
571
- }
572
- ]
573
- });
574
- let ir = y(() => z.value.userOptions.useCursorPointer), ar = y(() => f({
575
- defaultConfig: {
576
- useCssAnimation: !1,
577
- table: { show: !1 },
578
- startAnimation: { show: !1 },
579
- userOptions: { show: !1 },
580
- style: { chart: {
581
- backgroundColor: "#99999930",
582
- layout: { labels: {
583
- dataLabels: { show: !1 },
584
- hollow: {
585
- average: { show: !1 },
586
- total: { show: !1 }
587
- },
588
- value: { show: !1 }
589
- } },
590
- legend: {
591
- backgroundColor: "transparent",
592
- showValue: !1,
593
- showPercentage: !1
594
- },
595
- title: {
596
- color: "#1A1A1A",
597
- subtitle: { color: "#5A5A5A" }
598
- }
599
- } }
600
- },
601
- userConfig: z.value.skeletonConfig ?? {}
602
- })), { loading: or, FINAL_DATASET: sr, manualLoading: cr, skeletonDataset: lr } = ge({
603
- ...Je(P),
604
- FINAL_CONFIG: z,
605
- prepareConfig: rr,
606
- skeletonDataset: P.config?.skeletonDataset ?? [
607
- {
608
- name: "",
609
- values: [3],
610
- color: "#BABABA"
611
- },
612
- {
613
- name: "",
614
- values: [2],
615
- color: "#AAAAAA"
616
- },
617
- {
618
- name: "",
619
- values: [1],
620
- color: "#CACACA"
621
- }
622
- ],
623
- skeletonConfig: f({
624
- defaultConfig: z.value,
625
- userConfig: ar.value
626
- })
627
- }), B = O(!0), ur = O(0), dr = O(!1), fr = null;
628
- function pr(e = 1e3) {
629
- return new Promise((t) => {
630
- let n = performance.now();
631
- function r(i) {
632
- let a = i - n, o = Math.min(a / e, 1), s = ue(o);
633
- ur.value = s, o < 1 ? fr = requestAnimationFrame(r) : (ur.value = 1, fr = null, t());
634
- }
635
- fr !== null && cancelAnimationFrame(fr), ur.value = 0, fr = requestAnimationFrame(r);
636
- });
637
- }
638
- Ze(() => or.value, async (e) => {
639
- if (e || dr.value) return;
640
- let t = sr.value === lr, n = z.value.startAnimation?.show;
641
- !t && n ? (dr.value = !0, await pr(z.value.startAnimation.durationMs || 1e3)) : ur.value = 1, B.value = !1;
642
- }, { immediate: !0 });
643
- let { userOptionsVisible: mr, setUserOptionsVisibility: hr, keepUserOptionState: gr } = Ae({ config: z.value }), { svgRef: V } = je({ config: z.value.style.chart.title });
644
- function _r() {
645
- hr(!0);
646
- }
647
- function vr() {
648
- hr(!1);
649
- }
650
- Ze(() => P.config, (e) => {
651
- or.value || (z.value = rr()), mr.value = !z.value.userOptions.showOnChartHover, $n(), Ln.value += 1, Rn.value += 1, zn.value += 1, H.value.dataLabels.show = z.value.style.chart.layout.labels.dataLabels.show, H.value.showTable = z.value.table.show, H.value.showTooltip = z.value.style.chart.tooltip.show, U.value.height = z.value.style.chart.height, U.value.width = z.value.style.chart.width;
652
- }, { deep: !0 });
653
- let yr = y(() => {
654
- let { top: e, right: t, bottom: n, left: r } = z.value.style.chart.padding;
655
- return {
656
- css: `padding:${e}px ${t}px ${n}px ${r}px`,
657
- top: e,
658
- right: t,
659
- bottom: n,
660
- left: r
661
- };
662
- }), { isPrinting: br, isImaging: xr, generatePdf: Sr, generateImage: Cr } = he({
663
- elementId: `donut__${L.value}`,
664
- fileName: z.value.style.chart.title.text || "vue-ui-donut",
665
- options: z.value.userOptions.print
666
- }), wr = y(() => z.value.userOptions.show && !z.value.style.chart.title.text), Tr = y(() => de(z.value.customPalette)), H = O({
667
- dataLabels: { show: z.value.style.chart.layout.labels.dataLabels.show },
668
- showTable: z.value.table.show,
669
- showTooltip: z.value.style.chart.tooltip.show
670
- });
671
- Ze(z, () => {
672
- H.value = {
673
- dataLabels: { show: z.value.style.chart.layout.labels.dataLabels.show },
674
- showTable: z.value.table.show,
675
- showTooltip: z.value.style.chart.tooltip.show
676
- };
677
- }, { immediate: !0 });
678
- let U = O({
679
- height: z.value.style.chart.height,
680
- width: z.value.style.chart.width
681
- }), Er = y(() => {
682
- if (z.value.pie) return q.value;
683
- let e = z.value.style.chart.layout.donut.strokeWidth / 512, t = Math.min(U.value.width, U.value.height) * e, n = t > q.value ? q.value : t;
684
- return Math.max(n, 12 * (1 + e));
685
- }), Dr = et, W = y(() => sr.value.sort((e, t) => {
686
- let n = Array.isArray(e.values) ? e.values.reduce((e, t) => e + t, 0) : e.value ?? 0, r = Array.isArray(t.values) ? t.values.reduce((e, t) => e + t, 0) : t.value ?? 0;
687
- return e.ghost && !t.ghost ? 1 : t.ghost && !e.ghost ? -1 : r - n;
688
- }).map((e, t) => ({
689
- name: e.name,
690
- color: l(e.color) || Tr.value[t] || o[t] || o[t % o.length],
691
- value: ne(e.values.reduce((e, t) => e + t, 0)),
692
- absoluteValues: e.values,
693
- comment: e.comment || "",
694
- patternIndex: t,
695
- seriesIndex: t,
696
- ghost: !1,
697
- pattern: `pattern_${L.value}_${t}`
698
- })));
699
- Ze(() => P.dataset, (e) => {
700
- Array.isArray(e) && e.length > 0 && (cr.value = !1);
701
- }, { immediate: !0 });
702
- let G = qe(W.value);
703
- Ze(() => W.value, (e) => {
704
- G.value = e, requestAnimationFrame(Xn);
705
- });
706
- function Or() {
707
- return W.value.map((e) => ({
708
- name: e.name,
709
- color: e.color,
710
- value: e.value
711
- }));
712
- }
713
- let K = O([]), kr = O(!1), Ar = O(null);
714
- function jr() {
715
- Dr("selectLegend", zr.value.map((e) => ({
716
- name: e.name,
717
- color: e.color,
718
- value: e.value
719
- })));
720
- }
721
- function Mr({ from: e, to: t, duration: n, onUpdate: r, onDone: i, easing: a = ue }) {
722
- let o = performance.now();
723
- function s(c) {
724
- let l = Math.min((c - o) / n, 1), u = a(l);
725
- r(e + (t - e) * u, l), l < 1 ? requestAnimationFrame(s) : (r(t, 1), i && i());
726
- }
727
- requestAnimationFrame(s);
728
- }
729
- function Nr() {
730
- K.value.length ? K.value = [] : Br.value.forEach((e, t) => {
731
- K.value.push(t);
732
- }), jr();
733
- }
734
- function Pr(e) {
735
- let t = W.value.find((t, n) => n === e), n = G.value.find((t, n) => n === e).value;
736
- if (K.value.includes(e)) {
737
- K.value = K.value.filter((t) => t !== e);
738
- let r = t.value;
739
- function i() {
740
- G.value = G.value.map((t, n) => e === n ? {
741
- ...t,
742
- value: r
743
- } : t), jr();
744
- }
745
- function a() {
746
- kr.value = !0, Ar.value = e, Mr({
747
- from: n,
748
- to: r,
749
- duration: z.value.serieToggleAnimation.durationMs,
750
- onUpdate: (t, n) => {
751
- G.value = G.value.map((n, r) => e === r ? {
752
- ...n,
753
- value: t
754
- } : n), requestAnimationFrame(Xn);
755
- },
756
- onDone: () => {
757
- i(), kr.value = !1, Ar.value = null;
758
- }
759
- });
760
- }
761
- z.value.serieToggleAnimation.show && z.value.type === "classic" ? a() : (i(), requestAnimationFrame(Xn));
762
- } else if (K.value.length < W.value.length - 1) {
763
- function t() {
764
- K.value.push(e), G.value = G.value.map((t, n) => e === n ? {
765
- ...t,
766
- value: 0
767
- } : t), jr();
768
- }
769
- function r() {
770
- kr.value = !0, Ar.value = e, Mr({
771
- from: n,
772
- to: 0,
773
- duration: z.value.serieToggleAnimation.durationMs,
774
- onUpdate: (t, n) => {
775
- G.value = G.value.map((n, r) => e === r ? {
776
- ...n,
777
- value: t
778
- } : n), requestAnimationFrame(Xn);
779
- },
780
- onDone: () => {
781
- t(), requestAnimationFrame(Xn), kr.value = !1, Ar.value = null;
782
- }
783
- });
784
- }
785
- z.value.serieToggleAnimation.show && z.value.type === "classic" ? r() : t();
786
- }
787
- }
788
- function Fr(e) {
789
- return W.value.length ? W.value.find((t) => t.name === e) || (Qn.value && console.warn(`VueUiDonut - Series name not found "${e}"`), null) : (Qn.value && console.warn("VueUiDonut - There are no series to show."), null);
790
- }
791
- function Ir(e) {
792
- let t = Fr(e);
793
- t !== null && K.value.includes(t.seriesIndex) && Pr(t.seriesIndex);
794
- }
795
- function Lr(e) {
796
- let t = Fr(e);
797
- t !== null && (K.value.includes(t.seriesIndex) || Pr(t.seriesIndex));
798
- }
799
- let Rr = y(() => sr.value.reduce((e, t) => e + t.values.reduce((e, t) => e + t, 0), 0)), zr = y(() => {
800
- if (B.value && !or.value) {
801
- let e = ur.value, t = W.value.map((t) => ({
802
- ...t,
803
- value: t.value * e,
804
- color: t.color,
805
- ghost: !1
806
- })), n = Rr.value * (1 - e);
807
- return n > 0 && t.push({
808
- name: "__ghost__",
809
- value: n,
810
- color: "transparent",
811
- ghost: !0
812
- }), t;
813
- }
814
- return G.value.forEach((e) => {
815
- if ([null, void 0].includes(e.values)) return {
816
- ...e,
817
- values: []
818
- };
819
- }), G.value.map((e, t) => ({
820
- ...e,
821
- seriesIndex: t
822
- })).filter((e, t) => !K.value.includes(t));
823
- }), Br = y(() => sr.value.map((e, t) => {
824
- let n = (e.values || []).reduce((e, t) => e + t, 0), r = n / sr.value.map((e) => (e.values || []).reduce((e, t) => e + t, 0)).reduce((e, t) => e + t, 0);
825
- return {
826
- name: e.name,
827
- color: l(e.color) || Tr.value[t] || o[t] || o[t % o.length],
828
- value: n,
829
- shape: "circle",
830
- patternIndex: t,
831
- proportion: r
832
- };
833
- }).map((e, t) => {
834
- let n = g(z.value.style.chart.layout.labels.value.formatter, e.value, d({
835
- p: z.value.style.chart.layout.labels.dataLabels.prefix,
836
- v: e.value,
837
- s: z.value.style.chart.layout.labels.dataLabels.suffix,
838
- r: z.value.style.chart.legend.roundingValue
839
- }), {
840
- datapoint: e,
841
- index: t
842
- }), r = g(z.value.style.chart.layout.labels.percentage.formatter, Zr(e), d({
843
- v: Zr(e),
844
- s: "%",
845
- r: z.value.style.chart.legend.roundingPercentage
846
- })), i = mi({
847
- val: n,
848
- percentage: K.value.includes(t) ? `${pi(e.proportion * 100)}%` : r,
849
- showVal: z.value.style.chart.legend.showValue,
850
- showPercentage: z.value.style.chart.legend.showPercentage,
851
- config: z.value.style.chart.legend
852
- });
853
- return {
854
- ...e,
855
- opacity: K.value.includes(t) ? .5 : 1,
856
- segregate: () => !kr.value && Pr(t),
857
- isSegregated: K.value.includes(t),
858
- display: `${e.name}${z.value.style.chart.legend.showPercentage || z.value.style.chart.legend.showValue ? ": " : ""}${i}`
859
- };
860
- })), Vr = y(() => ({
861
- cy: "donut-div-legend",
862
- backgroundColor: z.value.style.chart.legend.backgroundColor,
863
- color: z.value.style.chart.legend.color,
864
- fontSize: z.value.style.chart.legend.fontSize,
865
- paddingBottom: 12,
866
- fontWeight: z.value.style.chart.legend.bold ? "bold" : ""
867
- })), q = y(() => {
868
- let e = z.value.style.chart.layout.donut.radiusRatio, t = Math.max(.1, Math.min(.50001, e)), n = Math.min(U.value.width * t, U.value.height * t);
869
- return Math.max(12, n);
870
- }), J = y(() => s({ series: zr.value }, U.value.width / 2, U.value.height / 2, q.value, q.value, 1.99999, 2, 1, 360, 105.25, Er.value)), Hr = y(() => Math.abs(zr.value.map((e) => e.value).reduce((e, t) => e + t, 0)) > 0), Ur = y(() => s({ series: [{
871
- value: 1,
872
- color: z.value.style.chart.layout.donut.emptyFill,
873
- name: "_",
874
- seriesIndex: 0,
875
- patternIndex: -1,
876
- ghost: !1,
877
- absoluteValues: [1]
878
- }] }, U.value.width / 2, U.value.height / 2, q.value, q.value, 1.99999, 2, 1, 360, 105.25, Er.value)), Y = y(() => J.value.filter((e) => !e.ghost)), X = y(() => {
879
- let e = Math.max(...zr.value.map((e) => e.value)), t = zr.value.map((t) => t.value / e);
880
- return re({
881
- series: t,
882
- center: {
883
- x: U.value.width / 2,
884
- y: U.value.height / 2
885
- },
886
- maxRadius: Math.min(U.value.width, U.value.height) / 3,
887
- hasGhost: B.value
888
- });
889
- });
890
- function Wr(e) {
891
- return e.x > U.value.width / 2 + 6 ? "start" : e.x < U.value.width / 2 - 6 ? "end" : "middle";
892
- }
893
- function Gr(e) {
894
- return e.middlePoint.y > U.value.height / 2 ? i({
895
- initX: e.middlePoint.x,
896
- initY: e.middlePoint.y,
897
- offset: 100,
898
- centerX: U.value.width / 2,
899
- centerY: U.value.height / 2
900
- }).y : i({
901
- initX: e.middlePoint.x,
902
- initY: e.middlePoint.y,
903
- offset: 0,
904
- centerX: U.value.width / 2,
905
- centerY: U.value.height / 2
906
- }).y - 100;
907
- }
908
- function Z(e) {
909
- return e.proportion * 100 > z.value.style.chart.layout.labels.dataLabels.hideUnderValue;
910
- }
911
- function Kr(e, t) {
912
- let n = z.value.style.chart.layout.labels.dataLabels.hideUnderValue, r = z.value.style.chart.layout.labels.dataLabels.smallArcClusterThreshold, i = (Yr.value[t] ?? e.proportion ?? 0) * 100;
913
- return i > n && i <= r;
914
- }
915
- let { smallArcLayoutsClassic: Q } = $e({
916
- FINAL_CONFIG: z,
917
- noGhostDonut: Y,
918
- svg: U,
919
- padding: yr,
920
- labels_inline_fontSize: Jn,
921
- minSize: q,
922
- findArcMidpoint: ae,
923
- calcMarkerOffsetX: p,
924
- calcMarkerOffsetY: _,
925
- animatingIndex: Ar,
926
- segregated: K,
927
- isSmallArc: Kr
928
- });
929
- function qr(e, t) {
930
- let n = e.value / Jr(t);
931
- return isNaN(n) ? 0 : g(z.value.style.chart.layout.labels.percentage.formatter, n * 100, d({
932
- v: n * 100,
933
- s: "%",
934
- r: z.value.style.chart.layout.labels.percentage.rounding
935
- }), { datapoint: e });
936
- }
937
- function Jr(e) {
938
- return [...e].map((e) => e.value).reduce((e, t) => e + t, 0);
939
- }
940
- let $ = y(() => zr.value.map((e) => e.value).reduce((e, t) => e + t, 0)), Yr = y(() => {
941
- let e = W.value.reduce((e, t) => e + t.value, 0);
942
- return e <= 0 ? [] : W.value.map((t) => t.value / e);
943
- }), Xr = y(() => $.value / zr.value.length);
944
- function Zr(e) {
945
- return kr.value ? e.proportion * 100 : e.value / $.value * 100;
946
- }
947
- let Qr = O(null), $r = O(!1);
948
- function ei({ datapoint: e, seriesIndex: t }) {
949
- z.value.events.datapointLeave && z.value.events.datapointLeave({
950
- datapoint: e,
951
- seriesIndex: t
952
- }), er.value = !1, R.value = null, Un.value = null, Gn.value = "pointer";
953
- }
954
- function ti({ datapoint: e, relativeIndex: t, seriesIndex: r, show: i = !1, triggerMode: a = "pointer" }) {
955
- z.value.events.datapointEnter && z.value.events.datapointEnter({
956
- datapoint: e,
957
- seriesIndex: r
958
- }), Gn.value = a, Un.value = t, Qr.value = {
959
- datapoint: e,
960
- seriesIndex: r,
961
- config: z.value,
962
- series: W.value
963
- }, er.value = i, R.value = t;
964
- let o = "", s = z.value.style.chart.tooltip.customFormat;
965
- if ($r.value = !1, n(s)) try {
966
- let t = s({
967
- seriesIndex: r,
968
- datapoint: e,
969
- series: W.value,
970
- config: z.value
971
- });
972
- typeof t == "string" && (tr.value = t, $r.value = !0);
973
- } catch {
974
- console.warn("Custom format cannot be applied."), $r.value = !1;
975
- }
976
- $r.value || (o += `<div style="width:100%;text-align:center;border-bottom:1px solid ${z.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`, o += `<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="${e.color}"/>${En.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${L.value}_${r})"/>` : ""}</svg>`, o += `<b>${mi({
977
- showVal: z.value.style.chart.tooltip.showValue,
978
- showPercentage: z.value.style.chart.tooltip.showPercentage,
979
- val: `<span>${g(z.value.style.chart.layout.labels.value.formatter, e.value, d({
980
- p: z.value.style.chart.layout.labels.dataLabels.prefix,
981
- v: e.value,
982
- s: z.value.style.chart.layout.labels.dataLabels.suffix,
983
- r: z.value.style.chart.tooltip.roundingValue
984
- }), {
985
- datapoint: e,
986
- relativeIndex: t,
987
- seriesIndex: r
988
- })}</span>`,
989
- percentage: g(z.value.style.chart.layout.labels.percentage.formatter, e.proportion * 100, d({
990
- v: e.proportion * 100,
991
- s: "%",
992
- r: z.value.style.chart.tooltip.roundingPercentage
993
- }), {
994
- datapoint: e,
995
- relativeIndex: t,
996
- seriesIndex: r
997
- }),
998
- config: z.value.style.chart.tooltip
999
- })}</b></div>`, z.value.style.chart.comments.showInTooltip && e.comment && (o += `<div class="vue-data-ui-tooltip-comment" style="background:${e.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${e.color}">${e.comment}</div>`), tr.value = `<div>${o}</div>`);
1000
- }
1001
- function ni(e, t) {
1002
- let n = Q.value[t];
1003
- if (n) return {
1004
- textAnchor: n.textAnchor,
1005
- x: n.labelX,
1006
- y: n.labelY
1007
- };
1008
- let r = p(e, !0, 12);
1009
- return {
1010
- textAnchor: r.anchor,
1011
- x: r.x,
1012
- y: _(e)
1013
- };
1014
- }
1015
- function ri(e, t, n) {
1016
- let { textAnchor: r, x: i } = ni(e, t), a = hi(e), o = `
1017
- <tspan
1018
- class="vue-data-ui-datalabel-inline"
1019
- fill="${z.value.style.chart.layout.labels.percentage.color}"
1020
- font-size="${n ? Jn.value : qn.value}px"
1021
- style="font-weight:${z.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}"
1022
- >${a}</tspan>
1023
- `, s = String(e.name ?? "").split(/\n/g), c = "";
1024
- return s.forEach((e, t) => {
1025
- c += t === 0 ? `
1026
- <tspan
1027
- class="${n ? "vue-data-ui-datalabel-inline" : "vue-data-ui-datalabel-name"}"
1028
- fill="${z.value.style.chart.layout.labels.name.color}"
1029
- font-size="${n ? Jn.value : I.value}px"
1030
- style="font-weight:${z.value.style.chart.layout.labels.name.bold ? "bold" : ""}"
1031
- >${e}</tspan>
1032
- ` : `
1033
- <tspan
1034
- class="${n ? "vue-data-ui-datalabel-inline" : "vue-data-ui-datalabel-name"}"
1035
- x="${i}"
1036
- dy="${(n ? Jn.value : I.value) * 1.2}"
1037
- fill="${z.value.style.chart.layout.labels.name.color}"
1038
- font-size="${n ? Jn.value : I.value}px"
1039
- style="font-weight:${z.value.style.chart.layout.labels.name.bold ? "bold" : ""}"
1040
- >${e}</tspan>
1041
- `;
1042
- }), r === "end" ? `${z.value.style.chart.layout.labels.name.show ? c : ""}${o}` : `${o}${z.value.style.chart.layout.labels.name.show ? c : ""}`;
1043
- }
1044
- function ii(e, t) {
1045
- let n = X.value[t].middlePoint, r = Wr(n), a = i({
1046
- initX: n.x,
1047
- initY: n.y,
1048
- offset: 42,
1049
- centerX: U.value.width / 2,
1050
- centerY: U.value.height / 2
1051
- }), o = a.x;
1052
- a.y;
1053
- let s = hi(e), c = `
1054
- <tspan
1055
- class="vue-data-ui-datalabel-value"
1056
- fill="${z.value.style.chart.layout.labels.percentage.color}"
1057
- font-size="${qn.value}px"
1058
- style="font-weight:${z.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"}"
1059
- >${s}</tspan>
1060
- `, l = String(e.name ?? "").split(/\n/g), u = "";
1061
- return l.forEach((e, t) => {
1062
- u += t === 0 ? `
1063
- <tspan
1064
- class="vue-data-ui-datalabel-name"
1065
- fill="${z.value.style.chart.layout.labels.name.color}"
1066
- font-size="${I.value}px"
1067
- style="font-weight:${z.value.style.chart.layout.labels.name.bold ? "bold" : "normal"}"
1068
- >${e}</tspan>
1069
- ` : `
1070
- <tspan
1071
- class="vue-data-ui-datalabel-name"
1072
- x="${o}"
1073
- dy="${I.value * 1.2}"
1074
- fill="${z.value.style.chart.layout.labels.name.color}"
1075
- font-size="${I.value}px"
1076
- style="font-weight:${z.value.style.chart.layout.labels.name.bold ? "bold" : "normal"}"
1077
- >${e}</tspan>
1078
- `;
1079
- }), r === "end" ? `${z.value.style.chart.layout.labels.name.show ? u : ""}${c}` : `${c}${z.value.style.chart.layout.labels.name.show ? u : ""}`;
1080
- }
1081
- function ai(e) {
1082
- return z.value.useBlurOnHover && ![null, void 0].includes(R.value) && R.value !== e ? `url(#blur_${L.value})` : "";
1083
- }
1084
- function oi(e) {
1085
- if (!kr.value || Ar.value === null || e.seriesIndex !== Ar.value) return 1;
1086
- let t = (e.proportion ?? 0) * 100, n = z.value.style.chart.layout.labels.dataLabels.hideUnderValue, r = z.value.style.chart.layout.labels.dataLabels.smallArcClusterThreshold + 2, i = n;
1087
- return t >= r ? 1 : t <= i ? 0 : (t - i) / (r - i);
1088
- }
1089
- let si = y(() => ({
1090
- head: zr.value.map((e) => ({
1091
- name: e.name,
1092
- color: e.color
1093
- })),
1094
- body: zr.value.map((e) => e.value)
1095
- }));
1096
- function ci(e = null) {
1097
- He(() => {
1098
- let n = si.value.head.map((e, t) => [
1099
- [e.name],
1100
- [si.value.body[t]],
1101
- [isNaN(si.value.body[t] / $.value) ? "-" : si.value.body[t] / $.value * 100]
1102
- ]), i = [
1103
- [z.value.style.chart.title.text],
1104
- [z.value.style.chart.title.subtitle.text],
1105
- [
1106
- [""],
1107
- ["val"],
1108
- ["%"]
1109
- ]
1110
- ].concat(n), a = r(i);
1111
- e ? e(a) : t({
1112
- csvContent: a,
1113
- title: z.value.style.chart.title.text || "vue-ui-donut"
1114
- });
1115
- });
1116
- }
1117
- let li = y(() => {
1118
- let e = [
1119
- "__SUM__",
1120
- d({
1121
- p: z.value.style.chart.layout.labels.dataLabels.prefix,
1122
- v: $.value,
1123
- s: z.value.style.chart.layout.labels.dataLabels.suffix,
1124
- r: z.value.table.td.roundingValue
1125
- }),
1126
- "100%"
1127
- ], t = si.value.head.map((e, t) => [
1128
- {
1129
- color: e.color,
1130
- name: e.name || "-"
1131
- },
1132
- si.value.body[t],
1133
- isNaN(si.value.body[t] / $.value) ? "-" : (si.value.body[t] / $.value * 100).toFixed(z.value.table.td.roundingPercentage) + "%"
1134
- ]), n = t.map((e) => e.map((e, t) => t === 0 ? e.name : e)), r = {
1135
- th: {
1136
- backgroundColor: z.value.table.th.backgroundColor,
1137
- color: z.value.table.th.color,
1138
- outline: z.value.table.th.outline
1139
- },
1140
- td: {
1141
- backgroundColor: z.value.table.td.backgroundColor,
1142
- color: z.value.table.td.color,
1143
- outline: z.value.table.td.outline
1144
- },
1145
- breakpoint: z.value.table.responsiveBreakpoint
1146
- };
1147
- return {
1148
- colNames: [
1149
- z.value.table.columnNames.series,
1150
- z.value.table.columnNames.value,
1151
- z.value.table.columnNames.percentage
1152
- ],
1153
- head: e,
1154
- body: t,
1155
- a11yBody: n,
1156
- config: r
1157
- };
1158
- }), ui = O(!1);
1159
- function di(e) {
1160
- ui.value = e, nr.value += 1;
1161
- }
1162
- let fi = y(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent));
1163
- function pi(e) {
1164
- return Me({
1165
- num: e,
1166
- rounding: z.value.style.chart.legend.roundingPercentage
1167
- });
1168
- }
1169
- function mi({ val: e, percentage: t, showVal: n, showPercentage: r, config: i }) {
1170
- return Ne({
1171
- config: i,
1172
- val: e,
1173
- percentage: t,
1174
- showVal: n,
1175
- showPercentage: r
1176
- });
1177
- }
1178
- function hi(e) {
1179
- return mi({
1180
- val: g(z.value.style.chart.layout.labels.value.formatter, e.value, d({
1181
- p: z.value.style.chart.layout.labels.dataLabels.prefix,
1182
- v: e.value,
1183
- s: z.value.style.chart.layout.labels.dataLabels.suffix,
1184
- r: z.value.style.chart.layout.labels.value.rounding
1185
- }), { datapoint: e }),
1186
- percentage: qr(e, Y.value),
1187
- showVal: z.value.style.chart.layout.labels.value.show,
1188
- showPercentage: z.value.style.chart.layout.labels.percentage.show,
1189
- config: z.value.style.chart.layout.labels.dataLabels
1190
- });
1191
- }
1192
- function gi(e, t) {
1193
- z.value.events.datapointClick && z.value.events.datapointClick({
1194
- datapoint: e,
1195
- seriesIndex: e.seriesIndex
1196
- }), Dr("selectDatapoint", {
1197
- datapoint: e,
1198
- index: t
1199
- });
1200
- }
1201
- function _i() {
1202
- H.value.showTable = !H.value.showTable;
1203
- }
1204
- function vi() {
1205
- H.value.dataLabels.show = !H.value.dataLabels.show;
1206
- }
1207
- function yi() {
1208
- H.value.showTooltip = !H.value.showTooltip;
1209
- }
1210
- let bi = O(!1);
1211
- function xi() {
1212
- bi.value = !bi.value;
1213
- }
1214
- async function Si({ scale: e = 2 } = {}) {
1215
- if (!F.value) return;
1216
- let { width: t, height: n } = F.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await xe({
1217
- domElement: F.value,
1218
- base64: !0,
1219
- img: !0,
1220
- scale: e
1221
- });
1222
- return {
1223
- imageUri: i,
1224
- base64: a,
1225
- title: z.value.style.chart.title.text,
1226
- width: t,
1227
- height: n,
1228
- aspectRatio: r
1229
- };
1230
- }
1231
- function Ci() {
1232
- if (!On.value) return;
1233
- let { x: e, y: t, width: n, height: r } = On.value.getBBox();
1234
- V.value && V.value.setAttribute("viewBox", `${e} ${t} ${n + Math.min(0, e)} ${r + Math.min(0, t)}`);
1235
- }
1236
- let wi = y(() => {
1237
- let e = z.value.table.useDialog && !z.value.table.show, t = H.value.showTable;
1238
- return {
1239
- component: e ? Sn : _n,
1240
- title: `${z.value.style.chart.title.text}${z.value.style.chart.title.subtitle.text ? `: ${z.value.style.chart.title.subtitle.text}` : ""}`,
1241
- props: e ? {
1242
- backgroundColor: z.value.table.th.backgroundColor,
1243
- color: z.value.table.th.color,
1244
- headerColor: z.value.table.th.color,
1245
- headerBg: z.value.table.th.backgroundColor,
1246
- isFullscreen: ui.value,
1247
- fullscreenParent: F.value,
1248
- forcedWidth: Math.min(500, window.innerWidth * .8),
1249
- isCursorPointer: ir.value
1250
- } : {
1251
- hideDetails: !0,
1252
- config: {
1253
- open: t,
1254
- maxHeight: 1e4,
1255
- body: {
1256
- backgroundColor: z.value.style.chart.backgroundColor,
1257
- color: z.value.style.chart.color
1258
- },
1259
- head: {
1260
- backgroundColor: z.value.style.chart.backgroundColor,
1261
- color: z.value.style.chart.color
1262
- }
1263
- }
1264
- }
1265
- };
1266
- });
1267
- Ze(() => H.value.showTable, (e) => {
1268
- z.value.table.show || (e && z.value.table.useDialog && Vn.value ? Vn.value.open() : "close" in Vn.value && Vn.value.close());
1269
- });
1270
- function Ti() {
1271
- H.value.showTable = !1, Hn.value && Hn.value.setTableIconState(!1);
1272
- }
1273
- let Ei = y(() => Br.value.map((e) => ({
1274
- ...e,
1275
- name: e.display
1276
- }))), Di = y(() => z.value.style.chart.backgroundColor), Oi = y(() => z.value.style.chart.legend), ki = y(() => z.value.style.chart.title), { isCallbackImaging: Ai, isCallbackSvg: ji, generateSvg: Mi, onGenerateImage: Ni } = be({
1277
- svg: V,
1278
- title: ki,
1279
- legend: Oi,
1280
- legendItems: Ei,
1281
- backgroundColor: Di,
1282
- getSvgCallback: () => z.value.userOptions.callbacks.svg,
1283
- generateImage: Cr
1284
- });
1285
- async function Pi() {
1286
- if (Dr("copyAlt", {
1287
- config: z.value,
1288
- dataset: G.value
1289
- }), !z.value.userOptions.callbacks.altCopy) {
1290
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1291
- return;
1292
- }
1293
- await Promise.resolve(z.value.userOptions.callbacks.altCopy({
1294
- config: z.value,
1295
- dataset: G.value
1296
- }));
1297
- }
1298
- function Fi() {
1299
- Un.value = null, Kn.value = !0;
1300
- }
1301
- function Ii() {
1302
- Un.value = null, Gn.value = "pointer", er.value = !1, R.value = null, Kn.value = !1;
1303
- }
1304
- function Li(e) {
1305
- if (!V.value || bi.value || document.activeElement !== V.value || !Y.value.length) return;
1306
- let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
1307
- if (!t && !n && !r && !i) return;
1308
- if (e.preventDefault(), e.stopPropagation(), i) {
1309
- Un.value = null, Gn.value = "pointer", er.value = !1, R.value = null;
1310
- return;
1311
- }
1312
- if (r) {
1313
- if (Un.value === null) return;
1314
- let e = Y.value[Un.value];
1315
- if (!e) return;
1316
- gi(e, Un.value);
1317
- return;
1318
- }
1319
- let a = Un.value, o = R.value, s = a !== null && a >= 0 && a < Y.value.length, c = o !== null && o >= 0 && o < Y.value.length;
1320
- s ? n ? (a += 1, a >= Y.value.length && (a = 0)) : t && (--a, a < 0 && (a = Y.value.length - 1)) : c ? (a = n ? o + 1 : o - 1, a >= Y.value.length && (a = 0), a < 0 && (a = Y.value.length - 1)) : a = n ? 0 : Y.value.length - 1;
1321
- let l = Y.value[a];
1322
- l && (Un.value = a, Ri(a), ti({
1323
- datapoint: l,
1324
- relativeIndex: a,
1325
- seriesIndex: l.seriesIndex,
1326
- show: !0,
1327
- triggerMode: "keyboard"
1328
- }));
1329
- }
1330
- function Ri(e) {
1331
- if (!Number.isFinite(e) || !V.value) return;
1332
- let t = U.value.width / 2, n = U.value.height / 2;
1333
- if (z.value.type === "classic") {
1334
- let r = Y.value[e];
1335
- if (!r?.arcSlice) return;
1336
- let i = ae(r.arcSlice);
1337
- if (!i) return;
1338
- t = i.x, n = i.y;
1339
- } else {
1340
- let r = X.value[e]?.middlePoint;
1341
- if (!r) return;
1342
- t = r.x, n = r.y;
1343
- }
1344
- let r = V.value.getBoundingClientRect();
1345
- Wn.value = {
1346
- x: r.left + t / U.value.width * r.width,
1347
- y: r.top + n / U.value.height * r.height
1348
- };
1349
- }
1350
- let zi = y(() => ({
1351
- headers: li.value?.colNames ?? [],
1352
- rows: li.value?.a11yBody ?? []
1353
- }));
1354
- return we({
1355
- autoSize: Ci,
1356
- getData: Or,
1357
- getImage: Si,
1358
- generatePdf: Sr,
1359
- generateCsv: ci,
1360
- generateImage: Cr,
1361
- generateSvg: Mi,
1362
- hideSeries: Lr,
1363
- showSeries: Ir,
1364
- toggleTable: _i,
1365
- toggleLabels: vi,
1366
- toggleTooltip: yi,
1367
- toggleAnnotator: xi,
1368
- toggleFullscreen: di,
1369
- copyAlt: Pi
1370
- }), (t, n) => (D(), S("div", {
1371
- ref_key: "donutChart",
1372
- ref: F,
1373
- class: Ue(`vue-data-ui-component vue-ui-donut ${ui.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${z.value.useCssAnimation ? "" : "vue-ui-dna"}`),
1374
- style: E(`font-family:${z.value.style.fontFamily};width:100%; ${z.value.responsive ? "height:100%;" : ""} text-align:center;background:${z.value.style.chart.backgroundColor}`),
1375
- id: `donut__${L.value}`,
1376
- onMouseenter: _r,
1377
- onMouseleave: vr
1378
- }, [
1379
- C("div", {
1380
- id: `chart-instructions-${L.value}`,
1381
- class: "sr-only"
1382
- }, [C("p", null, j(z.value.a11y.translations.keyboardNavigation), 1)], 8, nt),
1383
- zi.value?.rows?.length ? (D(), b(ke, {
1384
- key: 0,
1385
- uid: L.value,
1386
- head: zi.value.headers,
1387
- body: zi.value.rows,
1388
- notice: z.value.a11y.translations.tableAvailable,
1389
- caption: z.value.a11y.translations.tableCaption
1390
- }, null, 8, [
1391
- "uid",
1392
- "head",
1393
- "body",
1394
- "notice",
1395
- "caption"
1396
- ])) : x("", !0),
1397
- z.value.userOptions.buttons.annotator && M(V) ? (D(), b(M(yn), {
1398
- key: 1,
1399
- color: z.value.style.chart.color,
1400
- backgroundColor: z.value.style.chart.backgroundColor,
1401
- active: bi.value,
1402
- svgRef: M(V),
1403
- isCursorPointer: ir.value,
1404
- palette: z.value.userOptions.annotatorPalette,
1405
- onClose: xi
1406
- }, {
1407
- "annotator-action-close": N(() => [A(t.$slots, "annotator-action-close", {}, void 0, !0)]),
1408
- "annotator-action-color": N(({ color: e }) => [A(t.$slots, "annotator-action-color", T(w({ color: e })), void 0, !0)]),
1409
- "annotator-action-draw": N(({ mode: e }) => [A(t.$slots, "annotator-action-draw", T(w({ mode: e })), void 0, !0)]),
1410
- "annotator-action-undo": N(({ disabled: e }) => [A(t.$slots, "annotator-action-undo", T(w({ disabled: e })), void 0, !0)]),
1411
- "annotator-action-redo": N(({ disabled: e }) => [A(t.$slots, "annotator-action-redo", T(w({ disabled: e })), void 0, !0)]),
1412
- "annotator-action-delete": N(({ disabled: e }) => [A(t.$slots, "annotator-action-delete", T(w({ disabled: e })), void 0, !0)]),
1413
- _: 3
1414
- }, 8, [
1415
- "color",
1416
- "backgroundColor",
1417
- "active",
1418
- "svgRef",
1419
- "isCursorPointer",
1420
- "palette"
1421
- ])) : x("", !0),
1422
- A(t.$slots, "userConfig", {}, void 0, !0),
1423
- wr.value ? (D(), S("div", {
1424
- key: 2,
1425
- ref_key: "noTitle",
1426
- ref: In,
1427
- class: "vue-data-ui-no-title-space",
1428
- style: "height:36px; width: 100%;background:transparent"
1429
- }, null, 512)) : x("", !0),
1430
- z.value.style.chart.title.text ? (D(), S("div", {
1431
- key: 3,
1432
- ref_key: "chartTitle",
1433
- ref: jn,
1434
- style: "width:100%;background:transparent;padding-bottom:24px"
1435
- }, [(D(), b(Se, {
1436
- key: `title_${Ln.value}`,
1437
- config: {
1438
- title: {
1439
- cy: "donut-div-title",
1440
- ...z.value.style.chart.title
1441
- },
1442
- subtitle: {
1443
- cy: "donut-div-subtitle",
1444
- ...z.value.style.chart.title.subtitle
1445
- }
1446
- }
1447
- }, null, 8, ["config"]))], 512)) : x("", !0),
1448
- C("div", { id: `legend-top-${L.value}` }, null, 8, rt),
1449
- z.value.userOptions.show && Dn.value && (M(gr) || M(mr)) ? (D(), b(M(bn), {
1450
- ref_key: "userOptionsRef",
1451
- ref: Hn,
1452
- key: `user_option_${nr.value}`,
1453
- backgroundColor: z.value.style.chart.backgroundColor,
1454
- color: z.value.style.chart.color,
1455
- isPrinting: M(br),
1456
- isImaging: M(xr),
1457
- uid: L.value,
1458
- hasTooltip: z.value.style.chart.tooltip.show && z.value.userOptions.buttons.tooltip,
1459
- hasPdf: z.value.userOptions.buttons.pdf,
1460
- hasImg: z.value.userOptions.buttons.img,
1461
- hasSvg: z.value.userOptions.buttons.svg,
1462
- hasXls: z.value.userOptions.buttons.csv,
1463
- hasTable: z.value.userOptions.buttons.table,
1464
- hasLabel: z.value.userOptions.buttons.labels,
1465
- hasFullscreen: z.value.userOptions.buttons.fullscreen,
1466
- hasAltCopy: z.value.userOptions.buttons.altCopy,
1467
- isFullscreen: ui.value,
1468
- chartElement: F.value,
1469
- position: z.value.userOptions.position,
1470
- callbacks: z.value.userOptions.callbacks,
1471
- isTooltip: H.value.showTooltip,
1472
- titles: { ...z.value.userOptions.buttonTitles },
1473
- hasAnnotator: z.value.userOptions.buttons.annotator,
1474
- isAnnotation: bi.value,
1475
- printScale: z.value.userOptions.print.scale,
1476
- tableDialog: z.value.table.useDialog,
1477
- isCursorPointer: ir.value,
1478
- onToggleFullscreen: di,
1479
- onGeneratePdf: M(Sr),
1480
- onGenerateCsv: ci,
1481
- onGenerateImage: M(Ni),
1482
- onGenerateSvg: M(Mi),
1483
- onToggleTable: _i,
1484
- onToggleLabels: vi,
1485
- onToggleTooltip: yi,
1486
- onToggleAnnotator: xi,
1487
- onCopyAlt: Pi,
1488
- style: E({ visibility: M(gr) ? M(mr) ? "visible" : "hidden" : "visible" })
1489
- }, Le({ _: 2 }, [
1490
- t.$slots.menuIcon ? {
1491
- name: "menuIcon",
1492
- fn: N(({ isOpen: e, color: n }) => [A(t.$slots, "menuIcon", T(w({
1493
- isOpen: e,
1494
- color: n
1495
- })), void 0, !0)]),
1496
- key: "0"
1497
- } : void 0,
1498
- t.$slots.optionTooltip ? {
1499
- name: "optionTooltip",
1500
- fn: N(() => [A(t.$slots, "optionTooltip", {}, void 0, !0)]),
1501
- key: "1"
1502
- } : void 0,
1503
- t.$slots.optionPdf ? {
1504
- name: "optionPdf",
1505
- fn: N(() => [A(t.$slots, "optionPdf", {}, void 0, !0)]),
1506
- key: "2"
1507
- } : void 0,
1508
- t.$slots.optionCsv ? {
1509
- name: "optionCsv",
1510
- fn: N(() => [A(t.$slots, "optionCsv", {}, void 0, !0)]),
1511
- key: "3"
1512
- } : void 0,
1513
- t.$slots.optionImg ? {
1514
- name: "optionImg",
1515
- fn: N(() => [A(t.$slots, "optionImg", {}, void 0, !0)]),
1516
- key: "4"
1517
- } : void 0,
1518
- t.$slots.optionSvg ? {
1519
- name: "optionSvg",
1520
- fn: N(() => [A(t.$slots, "optionSvg", {}, void 0, !0)]),
1521
- key: "5"
1522
- } : void 0,
1523
- t.$slots.optionTable ? {
1524
- name: "optionTable",
1525
- fn: N(() => [A(t.$slots, "optionTable", {}, void 0, !0)]),
1526
- key: "6"
1527
- } : void 0,
1528
- t.$slots.optionLabels ? {
1529
- name: "optionLabels",
1530
- fn: N(() => [A(t.$slots, "optionLabels", {}, void 0, !0)]),
1531
- key: "7"
1532
- } : void 0,
1533
- t.$slots.optionFullscreen ? {
1534
- name: "optionFullscreen",
1535
- fn: N(({ toggleFullscreen: e, isFullscreen: n }) => [A(t.$slots, "optionFullscreen", T(w({
1536
- toggleFullscreen: e,
1537
- isFullscreen: n
1538
- })), void 0, !0)]),
1539
- key: "8"
1540
- } : void 0,
1541
- t.$slots.optionAnnotator ? {
1542
- name: "optionAnnotator",
1543
- fn: N(({ toggleAnnotator: e, isAnnotator: n }) => [A(t.$slots, "optionAnnotator", T(w({
1544
- toggleAnnotator: e,
1545
- isAnnotator: n
1546
- })), void 0, !0)]),
1547
- key: "9"
1548
- } : void 0,
1549
- t.$slots.optionAltCopy ? {
1550
- name: "optionAltCopy",
1551
- fn: N(({ altCopy: e }) => [A(t.$slots, "optionAltCopy", T(w({ altCopy: e })), void 0, !0)]),
1552
- key: "10"
1553
- } : void 0,
1554
- t.$slots["custom-menu-before"] ? {
1555
- name: "custom-menu-before",
1556
- fn: N(() => [A(t.$slots, "custom-menu-before", {}, void 0, !0)]),
1557
- key: "11"
1558
- } : void 0,
1559
- t.$slots["custom-menu-after"] ? {
1560
- name: "custom-menu-after",
1561
- fn: N(() => [A(t.$slots, "custom-menu-after", {}, void 0, !0)]),
1562
- key: "12"
1563
- } : void 0
1564
- ]), 1032, /* @__PURE__ */ "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.onGenerateImage.onGenerateSvg.style".split("."))) : x("", !0),
1565
- C("div", it, [(D(), S("svg", {
1566
- ref_key: "svgRef",
1567
- ref: V,
1568
- xmlns: M(le),
1569
- "aria-describedby": `chart-instructions-${L.value}`,
1570
- class: Ue({
1571
- "vue-data-ui-fullscreen--on": ui.value,
1572
- "vue-data-ui-fulscreen--off": !ui.value,
1573
- "vue-data-ui-svg": !0
1574
- }),
1575
- viewBox: `0 0 ${U.value.width <= 0 ? 10 : U.value.width} ${U.value.height <= 0 ? 10 : U.value.height}`,
1576
- style: E(`max-width:100%; overflow: visible; background:transparent;color:${z.value.style.chart.color};${yr.value.css}`),
1577
- tabindex: "0",
1578
- onFocus: Fi,
1579
- onBlur: Ii,
1580
- onKeydown: Li
1581
- }, [C("g", {
1582
- ref_key: "G",
1583
- ref: On,
1584
- class: "vue-data-ui-g"
1585
- }, [
1586
- ze(M(xn)),
1587
- t.$slots["chart-background"] ? (D(), S("foreignObject", {
1588
- key: 0,
1589
- x: 0,
1590
- y: 0,
1591
- width: U.value.width <= 0 ? 10 : U.value.width,
1592
- height: U.value.height <= 0 ? 10 : U.value.height,
1593
- style: { pointerEvents: "none" }
1594
- }, [A(t.$slots, "chart-background", {}, void 0, !0)], 8, ot)) : x("", !0),
1595
- z.value.type === "classic" && !isNaN(Er.value / q.value) ? (D(), S("defs", st, [z.value.style.chart.useGradient ? (D(), b(De, {
1596
- key: 0,
1597
- t: "radial",
1598
- id: `gradient_${L.value}`,
1599
- stops: [
1600
- [
1601
- "0%",
1602
- M(u)(z.value.style.chart.backgroundColor, 0),
1603
- 0
1604
- ],
1605
- [
1606
- `${(1 - Er.value / q.value) * 100}%`,
1607
- M(u)("#FFFFFF", 0),
1608
- 0
1609
- ],
1610
- [
1611
- `${(1 - Er.value / q.value / 2) * 100}%`,
1612
- M(u)("#FFFFFF", z.value.style.chart.gradientIntensity),
1613
- 1
1614
- ],
1615
- [
1616
- "100%",
1617
- M(u)(z.value.style.chart.backgroundColor, 0),
1618
- 0
1619
- ]
1620
- ]
1621
- }, null, 8, ["id", "stops"])) : x("", !0)])) : x("", !0),
1622
- z.value.type === "polar" ? (D(), S("defs", ct, [(D(!0), S(v, null, k(X.value, (e, t) => (D(), b(De, {
1623
- t: "radial",
1624
- id: `polar_gradient_${t}_${L.value}`,
1625
- key: `pg_${t}_${L.value}`,
1626
- cx: (isNaN(e.middlePoint.x / U.value.width * 100) ? 0 : e.middlePoint.x / U.value.width * 100) + "%",
1627
- cy: (isNaN(e.middlePoint.y / U.value.height * 100) ? 0 : e.middlePoint.y / U.value.height * 100) + "%",
1628
- r: "62%",
1629
- stops: [[
1630
- "0%",
1631
- M(ee)(J.value[t].color, .05),
1632
- z.value.style.chart.gradientIntensity / 100
1633
- ], [
1634
- "100%",
1635
- J.value[t].color,
1636
- 1
1637
- ]]
1638
- }, null, 8, [
1639
- "id",
1640
- "cx",
1641
- "cy",
1642
- "stops"
1643
- ]))), 128))])) : x("", !0),
1644
- C("defs", null, [
1645
- C("filter", {
1646
- id: `blur_${L.value}`,
1647
- x: "-50%",
1648
- y: "-50%",
1649
- width: "200%",
1650
- height: "200%"
1651
- }, [C("feGaussianBlur", {
1652
- in: "SourceGraphic",
1653
- stdDeviation: 2,
1654
- id: `blur_std_${L.value}`
1655
- }, null, 8, ut), n[5] ||= C("feColorMatrix", {
1656
- type: "saturate",
1657
- values: "0"
1658
- }, null, -1)], 8, lt),
1659
- C("filter", {
1660
- id: `shadow_${L.value}`,
1661
- "color-interpolation-filters": "sRGB"
1662
- }, [C("feDropShadow", {
1663
- dx: "0",
1664
- dy: "0",
1665
- stdDeviation: "10",
1666
- "flood-opacity": "0.5",
1667
- "flood-color": z.value.style.chart.layout.donut.shadowColor
1668
- }, null, 8, ft)], 8, dt),
1669
- C("filter", {
1670
- id: `drop_shadow_${L.value}`,
1671
- "color-interpolation-filters": "sRGB",
1672
- x: "-50%",
1673
- y: "-50%",
1674
- width: "200%",
1675
- height: "200%"
1676
- }, [C("feDropShadow", {
1677
- dx: "0",
1678
- dy: "0",
1679
- stdDeviation: "3",
1680
- "flood-opacity": "1",
1681
- "flood-color": z.value.style.chart.layout.donut.shadowColor
1682
- }, null, 8, mt)], 8, pt)
1683
- ]),
1684
- z.value.type === "classic" ? (D(!0), S(v, { key: 3 }, k(J.value.filter((e) => !e.ghost), (e, t) => (D(), S("g", null, [Z(e) && H.value.dataLabels.show ? (D(), S("path", {
1685
- key: 0,
1686
- d: M(Q)[t]?.connectorPath || M(m)(e, {
1687
- x: U.value.width / 2,
1688
- y: U.value.height / 2
1689
- }, 16, 16, !1, !1, Er.value, 12, z.value.style.chart.layout.curvedMarkers),
1690
- stroke: e.color,
1691
- "stroke-width": "1",
1692
- "stroke-linecap": "round",
1693
- "stroke-linejoin": "round",
1694
- fill: "none",
1695
- filter: ai(t)
1696
- }, null, 8, ht)) : x("", !0)]))), 256)) : x("", !0),
1697
- z.value.type === "polar" ? (D(!0), S(v, { key: 4 }, k(J.value.filter((e) => !e.ghost), (e, t) => (D(), S("g", null, [Z(e) && H.value.dataLabels.show ? (D(), S("path", {
1698
- key: 0,
1699
- d: `M ${M(i)({
1700
- initX: X.value[t].middlePoint.x,
1701
- initY: X.value[t].middlePoint.y,
1702
- offset: 24,
1703
- centerX: U.value.width / 2,
1704
- centerY: U.value.height / 2
1705
- }).x},${M(i)({
1706
- initX: X.value[t].middlePoint.x,
1707
- initY: X.value[t].middlePoint.y,
1708
- offset: 24,
1709
- centerX: U.value.width / 2,
1710
- centerY: U.value.height / 2
1711
- }).y} ${X.value[t].middlePoint.x},${X.value[t].middlePoint.y}`,
1712
- stroke: e.color,
1713
- "stroke-width": "1",
1714
- "stroke-linecap": "round",
1715
- "stroke-linejoin": "round",
1716
- fill: "none",
1717
- filter: ai(t),
1718
- style: E({ transition: B.value || !z.value.serieToggleAnimation.show ? "none" : `all ${z.value.serieToggleAnimation.durationMs}ms ease-in-out` })
1719
- }, null, 12, gt)) : x("", !0)]))), 256)) : x("", !0),
1720
- z.value.type === "classic" && z.value.style.chart.layout.donut.useShadow ? (D(), S("circle", {
1721
- key: 5,
1722
- cx: U.value.width / 2,
1723
- cy: U.value.height / 2,
1724
- r: q.value <= 0 ? 10 : q.value,
1725
- fill: z.value.style.chart.backgroundColor,
1726
- filter: `url(#shadow_${L.value})`
1727
- }, null, 8, _t)) : x("", !0),
1728
- t.$slots.pattern ? (D(), S("g", vt, [(D(!0), S(v, null, k(e.dataset, (e, n) => (D(), S("defs", { key: `pattern-${e.patternIndex}` }, [A(t.$slots, "pattern", Ve({ ref_for: !0 }, {
1729
- seriesIndex: n,
1730
- patternId: `pattern_${L.value}_${n}`
1731
- }), void 0, !0)]))), 128))])) : x("", !0),
1732
- $.value && z.value.type === "classic" ? (D(), S(v, { key: 7 }, [
1733
- (D(!0), S(v, null, k(Y.value, (e, t) => (D(), S("path", {
1734
- stroke: z.value.style.chart.backgroundColor,
1735
- d: e.arcSlice,
1736
- fill: "#FFFFFF"
1737
- }, null, 8, yt))), 256)),
1738
- (D(!0), S(v, null, k(Y.value, (e, t) => (D(), S("path", {
1739
- class: "vue-ui-donut-arc-path",
1740
- d: e.arcSlice,
1741
- fill: e.color,
1742
- stroke: z.value.style.chart.layout.donut.borderColorAuto ? z.value.style.chart.backgroundColor : z.value.style.chart.layout.donut.borderColor,
1743
- "stroke-width": z.value.style.chart.layout.donut.borderWidth,
1744
- filter: ai(t)
1745
- }, null, 8, bt))), 256)),
1746
- t.$slots.pattern ? (D(), S("g", xt, [(D(!0), S(v, null, k(Y.value, (e, t) => (D(), S("path", {
1747
- class: "vue-ui-donut-arc-path",
1748
- d: e.arcSlice,
1749
- fill: `url(#${e.pattern})`,
1750
- stroke: z.value.style.chart.layout.donut.borderColorAuto ? z.value.style.chart.backgroundColor : z.value.style.chart.layout.donut.borderColor,
1751
- "stroke-width": z.value.style.chart.layout.donut.borderWidth,
1752
- filter: ai(t)
1753
- }, null, 8, St))), 256))])) : x("", !0)
1754
- ], 64)) : x("", !0),
1755
- $.value && z.value.type === "polar" ? (D(), S(v, { key: 8 }, [J.value.length > 1 ? (D(), S("g", Ct, [
1756
- (D(!0), S(v, null, k(Y.value, (e, t) => (D(), S("path", {
1757
- stroke: z.value.style.chart.layout.donut.borderColorAuto ? z.value.style.chart.backgroundColor : z.value.style.chart.layout.donut.borderColor,
1758
- d: X.value[t].path,
1759
- fill: "#FFFFFF",
1760
- style: E({ transition: B.value || !z.value.serieToggleAnimation.show ? "none" : `all ${z.value.serieToggleAnimation.durationMs}ms ease-in-out` })
1761
- }, null, 12, wt))), 256)),
1762
- z.value.style.chart.layout.donut.useShadow ? (D(), S("g", Tt, [(D(!0), S(v, null, k(Y.value, (e, t) => (D(), S("path", {
1763
- class: "vue-ui-donut-arc-path",
1764
- d: X.value[t].path,
1765
- fill: "transparent",
1766
- stroke: z.value.style.chart.layout.donut.borderColorAuto ? z.value.style.chart.backgroundColor : z.value.style.chart.layout.donut.borderColor,
1767
- "stroke-width": z.value.style.chart.layout.donut.borderWidth,
1768
- filter: `url(#drop_shadow_${L.value})`,
1769
- style: E({ transition: B.value || !z.value.serieToggleAnimation.show ? "none" : `all ${z.value.serieToggleAnimation.durationMs}ms ease-in-out` })
1770
- }, null, 12, Et))), 256))])) : x("", !0),
1771
- t.$slots.pattern ? (D(), S("g", Dt, [(D(!0), S(v, null, k(Y.value, (e, t) => (D(), S("path", {
1772
- class: "vue-ui-donut-arc-path",
1773
- d: X.value[t].path,
1774
- fill: `url(#${e.pattern})`,
1775
- stroke: z.value.style.chart.layout.donut.borderColorAuto ? z.value.style.chart.backgroundColor : z.value.style.chart.layout.donut.borderColor,
1776
- "stroke-width": z.value.style.chart.layout.donut.borderWidth,
1777
- filter: ai(t),
1778
- style: E({
1779
- transition: B.value || !z.value.serieToggleAnimation.show ? "none" : `all ${z.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1780
- transformOrigin: "center"
1781
- })
1782
- }, null, 12, Ot))), 256))])) : x("", !0),
1783
- (D(!0), S(v, null, k(Y.value, (e, t) => (D(), S("path", {
1784
- class: "vue-ui-donut-arc-path",
1785
- d: X.value[t].path,
1786
- fill: z.value.style.chart.useGradient ? `url(#polar_gradient_${t}_${L.value})` : e.color,
1787
- stroke: z.value.style.chart.layout.donut.borderColorAuto ? z.value.style.chart.backgroundColor : z.value.style.chart.layout.donut.borderColor,
1788
- "stroke-width": z.value.style.chart.layout.donut.borderWidth,
1789
- filter: ai(t),
1790
- style: E({ transition: B.value || !z.value.serieToggleAnimation.show ? "none" : `all ${z.value.serieToggleAnimation.durationMs}ms ease-in-out` })
1791
- }, null, 12, kt))), 256))
1792
- ])) : (D(), S("g", At, [t.$slots.pattern ? (D(), S("circle", {
1793
- key: 0,
1794
- cx: U.value.width / 2,
1795
- cy: U.value.height / 2,
1796
- r: q.value,
1797
- fill: `url(#pattern_${L.value}_${J.value[0].patternIndex})`,
1798
- stroke: z.value.style.chart.backgroundColor,
1799
- "stroke-width": z.value.style.chart.layout.donut.borderWidth
1800
- }, null, 8, jt)) : x("", !0), C("circle", {
1801
- cx: U.value.width / 2,
1802
- cy: U.value.height / 2,
1803
- r: q.value,
1804
- fill: z.value.style.chart.useGradient ? `url(#polar_gradient_0_${L.value})` : J.value[0].color,
1805
- stroke: z.value.style.chart.backgroundColor,
1806
- "stroke-width": z.value.style.chart.layout.donut.borderWidth
1807
- }, null, 8, Mt)]))], 64)) : (D(), S(v, { key: 9 }, [z.value.type === "classic" && !Hr.value ? (D(), S("g", Nt, [(D(!0), S(v, null, k(Ur.value, (e, t) => (D(), S("path", {
1808
- class: "vue-ui-donut-arc-path",
1809
- d: e.arcSlice,
1810
- fill: e.color,
1811
- stroke: z.value.style.chart.backgroundColor,
1812
- "stroke-width": z.value.style.chart.layout.donut.borderWidth
1813
- }, null, 8, Pt))), 256))])) : x("", !0), C("circle", {
1814
- cx: U.value.width / 2,
1815
- cy: U.value.height / 2,
1816
- r: q.value <= 0 ? 10 : q.value,
1817
- fill: "transparent",
1818
- stroke: z.value.style.chart.backgroundColor
1819
- }, null, 8, Ft)], 64)),
1820
- z.value.style.chart.useGradient && z.value.type === "classic" ? (D(), S("circle", {
1821
- key: 10,
1822
- cx: U.value.width / 2,
1823
- cy: U.value.height / 2,
1824
- r: q.value <= 0 ? 10 : q.value,
1825
- fill: `url(#gradient_${L.value})`
1826
- }, null, 8, It)) : x("", !0),
1827
- C("circle", {
1828
- ref_key: "circle_hollow",
1829
- ref: An,
1830
- style: { pointerEvents: "none" },
1831
- fill: "none",
1832
- cx: U.value.width / 2,
1833
- cy: U.value.height / 2,
1834
- r: Math.max(.1, Er.value * 1.7)
1835
- }, null, 8, Lt),
1836
- $.value ? (D(), S(v, { key: 11 }, [J.value.length > 1 || z.value.type === "classic" ? (D(), S("g", Rt, [(D(!0), S(v, null, k(J.value.filter((e) => !e.ghost), (e, t) => (D(), S("path", {
1837
- d: z.value.type === "classic" ? e.arcSlice : X.value[t].path,
1838
- stroke: z.value.style.chart.layout.donut.borderColorAuto ? z.value.style.chart.backgroundColor : z.value.style.chart.layout.donut.borderColor,
1839
- fill: R.value === t ? z.value.style.chart.layout.donut.selectedColor : "transparent",
1840
- onMouseenter: (n) => ti({
1841
- datapoint: e,
1842
- relativeIndex: t,
1843
- seriesIndex: e.seriesIndex,
1844
- show: !0
1845
- }),
1846
- onMouseleave: (t) => ei({
1847
- datapoint: e,
1848
- seriesIndex: e.seriesIndex
1849
- }),
1850
- onClick: (n) => gi(e, t)
1851
- }, null, 40, zt))), 256))])) : (D(), S("g", Bt, [C("circle", {
1852
- cx: U.value.width / 2,
1853
- cy: U.value.height / 2,
1854
- r: q.value,
1855
- fill: "transparent",
1856
- onMouseenter: n[0] ||= (e) => ti({
1857
- datapoint: J.value[0],
1858
- relativeIndex: 0,
1859
- seriesIndex: J.value[0].seriesIndex,
1860
- show: !0
1861
- }),
1862
- onMouseleave: n[1] ||= (e) => ei({
1863
- datapoint: J.value[0],
1864
- seriesIndex: J.value[0].seriesIndex
1865
- }),
1866
- onClick: n[2] ||= (e) => gi(J.value[0], t.i)
1867
- }, null, 40, Vt)]))], 64)) : x("", !0),
1868
- z.value.type === "classic" ? (D(), S("g", {
1869
- key: 12,
1870
- ref_key: "G_hollow",
1871
- ref: kn,
1872
- class: "vue-data-ui-donut-hollow-labels"
1873
- }, [
1874
- z.value.style.chart.layout.labels.hollow.total.show ? (D(), S("text", {
1875
- key: 0,
1876
- "text-anchor": "middle",
1877
- x: U.value.width / 2,
1878
- y: U.value.height / 2 - (z.value.style.chart.layout.labels.hollow.average.show ? z.value.style.chart.layout.labels.hollow.total.fontSize : 0) + z.value.style.chart.layout.labels.hollow.total.offsetY,
1879
- fill: z.value.style.chart.layout.labels.hollow.total.color,
1880
- "font-size": z.value.style.chart.layout.labels.hollow.total.fontSize,
1881
- style: E(`font-weight:${z.value.style.chart.layout.labels.hollow.total.bold ? "bold" : ""}`)
1882
- }, j(z.value.style.chart.layout.labels.hollow.total.text), 13, Ht)) : x("", !0),
1883
- z.value.style.chart.layout.labels.hollow.total.show ? (D(), S("text", {
1884
- key: 1,
1885
- "text-anchor": "middle",
1886
- x: U.value.width / 2,
1887
- y: U.value.height / 2 + z.value.style.chart.layout.labels.hollow.total.fontSize - (z.value.style.chart.layout.labels.hollow.average.show ? z.value.style.chart.layout.labels.hollow.total.fontSize : 0) + z.value.style.chart.layout.labels.hollow.total.value.offsetY,
1888
- fill: z.value.style.chart.layout.labels.hollow.total.value.color,
1889
- "font-size": z.value.style.chart.layout.labels.hollow.total.value.fontSize,
1890
- style: E(`font-weight:${z.value.style.chart.layout.labels.hollow.total.value.bold ? "bold" : ""}`)
1891
- }, j(M(g)(z.value.style.chart.layout.labels.hollow.total.value.formatter, $.value, M(d)({
1892
- p: z.value.style.chart.layout.labels.hollow.total.value.prefix,
1893
- v: $.value,
1894
- s: z.value.style.chart.layout.labels.hollow.total.value.suffix
1895
- }))), 13, Ut)) : x("", !0),
1896
- z.value.style.chart.layout.labels.hollow.average.show ? (D(), S("text", {
1897
- key: 2,
1898
- "text-anchor": "middle",
1899
- x: U.value.width / 2,
1900
- y: U.value.height / 2 + (z.value.style.chart.layout.labels.hollow.total.show ? z.value.style.chart.layout.labels.hollow.average.fontSize : 0) + z.value.style.chart.layout.labels.hollow.average.offsetY,
1901
- fill: z.value.style.chart.layout.labels.hollow.average.color,
1902
- "font-size": z.value.style.chart.layout.labels.hollow.average.fontSize,
1903
- style: E(`font-weight:${z.value.style.chart.layout.labels.hollow.average.bold ? "bold" : ""}`)
1904
- }, j(z.value.style.chart.layout.labels.hollow.average.text), 13, Wt)) : x("", !0),
1905
- z.value.style.chart.layout.labels.hollow.average.show ? (D(), S("text", {
1906
- key: 3,
1907
- "text-anchor": "middle",
1908
- x: U.value.width / 2,
1909
- y: U.value.height / 2 + (z.value.style.chart.layout.labels.hollow.total.show ? z.value.style.chart.layout.labels.hollow.average.fontSize : 0) + z.value.style.chart.layout.labels.hollow.average.fontSize + z.value.style.chart.layout.labels.hollow.average.value.offsetY,
1910
- fill: z.value.style.chart.layout.labels.hollow.average.value.color,
1911
- "font-size": z.value.style.chart.layout.labels.hollow.average.value.fontSize,
1912
- style: E(`font-weight:${z.value.style.chart.layout.labels.hollow.average.value.bold ? "bold" : ""}`)
1913
- }, j(kr.value || B.value ? "--" : M(g)(z.value.style.chart.layout.labels.hollow.average.value.formatter, M(ce)(Xr.value), M(d)({
1914
- p: z.value.style.chart.layout.labels.hollow.average.value.prefix,
1915
- v: M(ce)(Xr.value),
1916
- s: z.value.style.chart.layout.labels.hollow.average.value.suffix,
1917
- r: z.value.style.chart.layout.labels.hollow.average.value.rounding
1918
- }))), 13, Gt)) : x("", !0)
1919
- ], 512)) : x("", !0),
1920
- (D(!0), S(v, null, k(Y.value.filter((e) => !e.ghost), (e, n) => (D(), S("g", {
1921
- filter: ai(n),
1922
- key: e.seriesIndex,
1923
- opacity: oi(e)
1924
- }, [z.value.style.chart.layout.labels.dataLabels.useLabelSlots ? (D(), S("g", qt, [(D(), S("foreignObject", {
1925
- x: M(p)(e, !0).anchor === "end" ? M(p)(e).x - 120 : M(p)(e, !0).anchor === "middle" ? M(p)(e).x - 60 : M(p)(e).x,
1926
- y: M(_)(e) - (fi.value ? 20 : 0),
1927
- width: "120",
1928
- height: "60",
1929
- style: { overflow: "visible" }
1930
- }, [C("div", null, [A(t.$slots, "dataLabel", Ve({ ref_for: !0 }, {
1931
- datapoint: e,
1932
- isBlur: !z.value.useBlurOnHover || [null, void 0].includes(R.value) || R.value === n,
1933
- isSafari: fi.value,
1934
- isVisible: Z(e) && H.value.dataLabels.show,
1935
- textAlign: M(p)(e, !0, 16, !0).anchor,
1936
- flexAlign: M(p)(e, !0, 16).anchor,
1937
- percentage: qr(e, Y.value)
1938
- }), void 0, !0)])], 8, Jt))])) : (D(), S("g", Yt, [z.value.type === "classic" ? (D(), S(v, { key: 0 }, [Z(e) && H.value.dataLabels.show ? (D(), S("circle", {
1939
- key: 0,
1940
- cx: M(Q)[n]?.markerX ?? M(p)(e).x,
1941
- cy: M(Q)[n]?.markerY ?? M(_)(e) - 3.5,
1942
- fill: e.color,
1943
- stroke: z.value.style.chart.backgroundColor,
1944
- "stroke-width": 1,
1945
- r: 3,
1946
- filter: !z.value.useBlurOnHover || [null, void 0].includes(R.value) || R.value === n ? "" : `url(#blur_${L.value})`,
1947
- onClick: (t) => gi(e, n),
1948
- onMouseenter: (t) => ti({
1949
- datapoint: e,
1950
- relativeIndex: n,
1951
- seriesIndex: e.seriesIndex,
1952
- show: !0
1953
- }),
1954
- onMouseleave: (t) => ei({
1955
- datapoint: e,
1956
- seriesIndex: e.seriesIndex
1957
- })
1958
- }, null, 40, Xt)) : x("", !0), z.value.style.chart.layout.labels.dataLabels.oneLine || M(Q)[n] ? Qe((D(), S("text", {
1959
- key: 1,
1960
- class: "vue-data-ui-datalabel-inline",
1961
- "text-anchor": M(Q)[n]?.textAnchor || M(p)(e, !0, 12).anchor,
1962
- x: M(Q)[n]?.labelX ?? M(p)(e, !0, 12).x,
1963
- y: M(Q)[n]?.labelY ?? M(_)(e),
1964
- onClick: (t) => gi(e, n),
1965
- onMouseenter: (t) => ti({
1966
- datapoint: e,
1967
- relativeIndex: n,
1968
- seriesIndex: e.seriesIndex,
1969
- show: !0
1970
- }),
1971
- onMouseleave: (t) => ei({
1972
- datapoint: e,
1973
- seriesIndex: e.seriesIndex
1974
- }),
1975
- innerHTML: ri(e, n, !!M(Q)[n])
1976
- }, null, 40, Zt)), [[Xe, Z(e) && H.value.dataLabels.show]]) : (D(), S(v, { key: 2 }, [Qe(C("text", {
1977
- class: "vue-data-ui-datalabel-value",
1978
- "text-anchor": M(Q)[n]?.textAnchor || M(p)(e, !0, 12).anchor,
1979
- x: M(Q)[n]?.labelX ?? M(p)(e, !0, 12).x,
1980
- y: M(Q)[n]?.labelY ?? M(_)(e),
1981
- fill: z.value.style.chart.layout.labels.percentage.color,
1982
- "font-size": qn.value + "px",
1983
- style: E(`font-weight:${z.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}`),
1984
- onClick: (t) => gi(e, n),
1985
- onMouseenter: (t) => ti({
1986
- datapoint: e,
1987
- relativeIndex: n,
1988
- seriesIndex: e.seriesIndex,
1989
- show: !0
1990
- }),
1991
- onMouseleave: (t) => ei({
1992
- datapoint: e,
1993
- seriesIndex: e.seriesIndex
1994
- })
1995
- }, j(hi(e)), 45, Qt), [[Xe, Z(e) && H.value.dataLabels.show]]), Qe(C("text", {
1996
- class: "vue-data-ui-datalabel-name",
1997
- "text-anchor": M(Q)[n]?.textAnchor || M(p)(e).anchor,
1998
- x: M(Q)[n]?.labelX ?? M(p)(e, !0, 12).x,
1999
- y: (M(Q)[n]?.labelY ?? M(_)(e)) + I.value * 1.2,
2000
- fill: z.value.style.chart.layout.labels.name.color,
2001
- "font-size": I.value + "px",
2002
- style: E(`font-weight:${z.value.style.chart.layout.labels.name.bold ? "bold" : ""}`),
2003
- onClick: (t) => gi(e, n),
2004
- onMouseenter: (t) => ti({
2005
- datapoint: e,
2006
- relativeIndex: n,
2007
- seriesIndex: e.seriesIndex,
2008
- show: !0
2009
- }),
2010
- onMouseleave: (t) => ei({
2011
- datapoint: e,
2012
- seriesIndex: e.seriesIndex
2013
- }),
2014
- innerHTML: M(a)({
2015
- content: e.name,
2016
- fontSize: I.value,
2017
- fill: z.value.style.chart.layout.labels.name.color,
2018
- x: M(Q)[n]?.labelX ?? M(p)(e, !0, 12).x,
2019
- y: (M(Q)[n]?.labelY ?? M(_)(e)) + I.value
2020
- })
2021
- }, null, 44, $t), [[Xe, Z(e, !0, 12) && H.value.dataLabels.show && z.value.style.chart.layout.labels.name.show]])], 64))], 64)) : x("", !0), z.value.type === "polar" ? (D(), S(v, { key: 1 }, [Z(e) && H.value.dataLabels.show ? (D(), S("circle", {
2022
- key: 0,
2023
- cx: M(i)({
2024
- initX: X.value[n].middlePoint.x,
2025
- initY: X.value[n].middlePoint.y,
2026
- offset: 24,
2027
- centerX: U.value.width / 2,
2028
- centerY: U.value.height / 2
2029
- }).x,
2030
- cy: M(i)({
2031
- initX: X.value[n].middlePoint.x,
2032
- initY: X.value[n].middlePoint.y,
2033
- offset: 24,
2034
- centerX: U.value.width / 2,
2035
- centerY: U.value.height / 2
2036
- }).y,
2037
- fill: e.color,
2038
- stroke: z.value.style.chart.backgroundColor,
2039
- "stroke-width": 1,
2040
- r: 3,
2041
- filter: !z.value.useBlurOnHover || [null, void 0].includes(R.value) || R.value === n ? "" : `url(#blur_${L.value})`,
2042
- onClick: (t) => gi(e, n),
2043
- onMouseenter: (t) => ti({
2044
- datapoint: e,
2045
- relativeIndex: n,
2046
- seriesIndex: e.seriesIndex,
2047
- show: !0
2048
- }),
2049
- onMouseleave: (t) => ei({
2050
- datapoint: e,
2051
- seriesIndex: e.seriesIndex
2052
- }),
2053
- style: E({ transition: B.value || !z.value.serieToggleAnimation.show ? "none" : `all ${z.value.serieToggleAnimation.durationMs}ms ease-in-out` })
2054
- }, null, 44, en)) : x("", !0), z.value.style.chart.layout.labels.dataLabels.oneLine ? Qe((D(), S("text", {
2055
- key: 1,
2056
- class: "vue-data-ui-datalabel-inline",
2057
- "text-anchor": Wr(X.value[n].middlePoint),
2058
- x: M(i)({
2059
- initX: X.value[n].middlePoint.x,
2060
- initY: X.value[n].middlePoint.y,
2061
- offset: 42,
2062
- centerX: U.value.width / 2,
2063
- centerY: U.value.height / 2
2064
- }).x,
2065
- y: M(i)({
2066
- initX: X.value[n].middlePoint.x,
2067
- initY: X.value[n].middlePoint.y,
2068
- offset: 42,
2069
- centerX: U.value.width / 2,
2070
- centerY: U.value.height / 2
2071
- }).y,
2072
- style: E({ transition: B.value || !z.value.serieToggleAnimation.show ? "none" : `all ${z.value.serieToggleAnimation.durationMs}ms ease-in-out` }),
2073
- onClick: (t) => gi(e, n),
2074
- onMouseenter: (t) => ti({
2075
- datapoint: e,
2076
- relativeIndex: n,
2077
- seriesIndex: e.seriesIndex,
2078
- show: !0
2079
- }),
2080
- onMouseleave: (t) => ei({
2081
- datapoint: e,
2082
- seriesIndex: e.seriesIndex
2083
- }),
2084
- innerHTML: ii(e, n)
2085
- }, null, 44, tn)), [[Xe, Z(e) && H.value.dataLabels.show]]) : (D(), S(v, { key: 2 }, [Z(e) && H.value.dataLabels.show ? (D(), S("text", {
2086
- key: 0,
2087
- class: "vue-data-ui-datalabel-value",
2088
- "text-anchor": Wr(X.value[n].middlePoint),
2089
- x: M(i)({
2090
- initX: X.value[n].middlePoint.x,
2091
- initY: X.value[n].middlePoint.y,
2092
- offset: 42,
2093
- centerX: U.value.width / 2,
2094
- centerY: U.value.height / 2
2095
- }).x,
2096
- y: M(i)({
2097
- initX: X.value[n].middlePoint.x,
2098
- initY: X.value[n].middlePoint.y,
2099
- offset: 42,
2100
- centerX: U.value.width / 2,
2101
- centerY: U.value.height / 2
2102
- }).y,
2103
- fill: z.value.style.chart.layout.labels.percentage.color,
2104
- "font-size": qn.value,
2105
- style: E({
2106
- transition: B.value || !z.value.serieToggleAnimation.show ? "none" : `all ${z.value.serieToggleAnimation.durationMs}ms ease-in-out`,
2107
- fontWeight: z.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"
2108
- }),
2109
- onClick: (t) => gi(e, n),
2110
- onMouseenter: (t) => ti({
2111
- datapoint: e,
2112
- relativeIndex: n,
2113
- seriesIndex: e.seriesIndex,
2114
- show: !0
2115
- }),
2116
- onMouseleave: (t) => ei({
2117
- datapoint: e,
2118
- seriesIndex: e.seriesIndex
2119
- })
2120
- }, j(hi(e)), 45, nn)) : x("", !0), Z(e, !0, 12) && H.value.dataLabels.show && z.value.style.chart.layout.labels.name.show ? (D(), S("text", {
2121
- key: 1,
2122
- class: "vue-data-ui-datalabel-name",
2123
- "text-anchor": Wr(X.value[n].middlePoint),
2124
- x: M(i)({
2125
- initX: X.value[n].middlePoint.x,
2126
- initY: X.value[n].middlePoint.y,
2127
- offset: 42,
2128
- centerX: U.value.width / 2,
2129
- centerY: U.value.height / 2
2130
- }).x,
2131
- y: M(i)({
2132
- initX: X.value[n].middlePoint.x,
2133
- initY: X.value[n].middlePoint.y,
2134
- offset: 42,
2135
- centerX: U.value.width / 2,
2136
- centerY: U.value.height / 2
2137
- }).y + I.value * 1.2,
2138
- fill: z.value.style.chart.layout.labels.name.color,
2139
- "font-size": I.value,
2140
- style: E({
2141
- transition: B.value || !z.value.serieToggleAnimation.show ? "none" : `all ${z.value.serieToggleAnimation.durationMs}ms ease-in-out`,
2142
- fontWeight: z.value.style.chart.layout.labels.name.bold ? "bold" : "normal"
2143
- }),
2144
- onClick: (t) => gi(e, n),
2145
- onMouseenter: (t) => ti({
2146
- datapoint: e,
2147
- relativeIndex: n,
2148
- seriesIndex: e.seriesIndex,
2149
- show: !0
2150
- }),
2151
- onMouseleave: (t) => ei({
2152
- datapoint: e,
2153
- seriesIndex: e.seriesIndex
2154
- }),
2155
- innerHTML: M(a)({
2156
- content: e.name,
2157
- fontSize: I.value,
2158
- fill: z.value.style.chart.layout.labels.name.color,
2159
- x: M(i)({
2160
- initX: X.value[n].middlePoint.x,
2161
- initY: X.value[n].middlePoint.y,
2162
- offset: 42,
2163
- centerX: U.value.width / 2,
2164
- centerY: U.value.height / 2
2165
- }).x,
2166
- y: M(i)({
2167
- initX: X.value[n].middlePoint.x,
2168
- initY: X.value[n].middlePoint.y,
2169
- offset: 42,
2170
- centerX: U.value.width / 2,
2171
- centerY: U.value.height / 2
2172
- }).y + I.value * 1.2
2173
- })
2174
- }, null, 44, rn)) : x("", !0)], 64))], 64)) : x("", !0)])), H.value.dataLabels.show && z.value.style.chart.comments.show && e.comment ? (D(), S("g", an, [Z(e) && z.value.type === "classic" ? (D(), S("foreignObject", {
2175
- key: 0,
2176
- x: z.value.style.chart.comments.offsetX + (M(p)(e, !0).anchor === "end" ? M(p)(e).x - z.value.style.chart.comments.width : M(p)(e, !0).anchor === "middle" ? M(p)(e).x - z.value.style.chart.comments.width / 2 : M(p)(e).x),
2177
- y: M(_)(e) + 24 + z.value.style.chart.comments.offsetY,
2178
- width: z.value.style.chart.comments.width,
2179
- height: "200",
2180
- style: {
2181
- overflow: "visible",
2182
- "pointer-events": "none"
2183
- }
2184
- }, [C("div", null, [A(t.$slots, "plot-comment", { plot: {
2185
- ...e,
2186
- textAlign: M(p)(e, !0, 16, !0).anchor,
2187
- flexAlign: M(p)(e, !0, 16).anchor,
2188
- isFirstLoad: B.value
2189
- } }, void 0, !0)])], 8, on)) : x("", !0), Z(e) && z.value.type === "polar" ? (D(), S("foreignObject", {
2190
- key: 1,
2191
- x: z.value.style.chart.comments.offsetX + (Wr(X.value[n].middlePoint) === "end" ? M(i)({
2192
- initX: X.value[n].middlePoint.x,
2193
- initY: X.value[n].middlePoint.y,
2194
- offset: 42,
2195
- centerX: U.value.width / 2,
2196
- centerY: U.value.height / 2
2197
- }).x - z.value.style.chart.comments.width : Wr(X.value[n].middlePoint) === "middle" ? M(i)({
2198
- initX: X.value[n].middlePoint.x,
2199
- initY: X.value[n].middlePoint.y,
2200
- offset: 42,
2201
- centerX: U.value.width / 2,
2202
- centerY: U.value.height / 2
2203
- }).x - z.value.style.chart.comments.width / 2 : M(i)({
2204
- initX: X.value[n].middlePoint.x,
2205
- initY: X.value[n].middlePoint.y,
2206
- offset: 42,
2207
- centerX: U.value.width / 2,
2208
- centerY: U.value.height / 2
2209
- }).x),
2210
- y: Gr(X.value[n]) + z.value.style.chart.comments.offsetY,
2211
- width: z.value.style.chart.comments.width,
2212
- height: "200",
2213
- style: E({
2214
- transition: B.value || !z.value.serieToggleAnimation.show ? "none" : `all ${z.value.serieToggleAnimation.durationMs}ms ease-in-out`,
2215
- overflow: "visible",
2216
- pointerEvents: "none"
2217
- })
2218
- }, [C("div", null, [A(t.$slots, "plot-comment", { plot: {
2219
- ...e,
2220
- textAlign: Wr(X.value[n].middlePoint),
2221
- flexAlign: Wr(X.value[n].middlePoint),
2222
- isFirstLoad: B.value
2223
- } }, void 0, !0)])], 12, sn)) : x("", !0)])) : x("", !0)], 8, Kt))), 128)),
2224
- A(t.$slots, "svg", { svg: {
2225
- ...U.value,
2226
- datapoints: J.value,
2227
- isPrintingImg: M(br) || M(xr) || M(Ai),
2228
- isPrintingSvg: M(ji)
2229
- } }, void 0, !0)
2230
- ], 512)], 46, at)), t.$slots.hint ? (D(), S("div", cn, [A(t.$slots, "hint", T(w({
2231
- hint: z.value.a11y.translations.keyboardNavigation,
2232
- isVisible: Kn.value
2233
- })), void 0, !0)])) : x("", !0)]),
2234
- t.$slots.watermark ? (D(), S("div", ln, [A(t.$slots, "watermark", T(w({ isPrinting: M(br) || M(xr) || M(Ai) || M(ji) })), void 0, !0)])) : x("", !0),
2235
- C("div", { id: `legend-bottom-${L.value}` }, null, 8, un),
2236
- Bn.value && (z.value.style.chart.legend.show || t.$slots.legend) ? (D(), b(Ie, {
2237
- key: 6,
2238
- to: z.value.style.chart.legend.position === "top" ? `#legend-top-${L.value}` : `#legend-bottom-${L.value}`
2239
- }, [C("div", {
2240
- ref_key: "chartLegend",
2241
- ref: Mn
2242
- }, [A(t.$slots, "legend", { legend: Br.value }, () => [z.value.style.chart.legend.show ? (D(), b(Fe, {
2243
- key: `legend_${zn.value}`,
2244
- legendSet: Br.value,
2245
- config: Vr.value,
2246
- onClickMarker: n[3] ||= ({ i: e }) => Pr(e),
2247
- isCursorPointer: ir.value
2248
- }, Le({
2249
- item: N(({ legend: e, index: t }) => [C("div", {
2250
- style: E(`opacity:${K.value.includes(t) ? .5 : 1}`),
2251
- onClick: (t) => e.segregate()
2252
- }, j(e.display), 13, dn)]),
2253
- legendToggle: N(() => [Br.value.length > 2 && z.value.style.chart.legend.selectAllToggle.show && !M(or) ? (D(), b(Oe, {
2254
- key: 0,
2255
- backgroundColor: z.value.style.chart.legend.selectAllToggle.backgroundColor,
2256
- color: z.value.style.chart.legend.selectAllToggle.color,
2257
- fontSize: z.value.style.chart.legend.fontSize,
2258
- checked: K.value.length > 0,
2259
- isCursorPointer: ir.value,
2260
- onToggle: Nr
2261
- }, null, 8, [
2262
- "backgroundColor",
2263
- "color",
2264
- "fontSize",
2265
- "checked",
2266
- "isCursorPointer"
2267
- ])) : x("", !0)]),
2268
- _: 2
2269
- }, [t.$slots.pattern ? {
2270
- name: "legend-pattern",
2271
- fn: N(({ legend: e, index: t }) => [ze(Ce, {
2272
- shape: e.shape,
2273
- radius: 30,
2274
- stroke: "none",
2275
- plot: {
2276
- x: 30,
2277
- y: 30
2278
- },
2279
- fill: `url(#pattern_${L.value}_${t})`
2280
- }, null, 8, ["shape", "fill"])]),
2281
- key: "0"
2282
- } : void 0]), 1032, [
2283
- "legendSet",
2284
- "config",
2285
- "isCursorPointer"
2286
- ])) : x("", !0)], !0)], 512)], 8, ["to"])) : x("", !0),
2287
- t.$slots.source ? (D(), S("div", {
2288
- key: 7,
2289
- ref_key: "source",
2290
- ref: Fn,
2291
- dir: "auto"
2292
- }, [A(t.$slots, "source", {}, void 0, !0)], 512)) : x("", !0),
2293
- t.$slots.hollow ? (D(), S("div", fn, [A(t.$slots, "hollow", T(w({
2294
- total: $.value,
2295
- average: Xr.value,
2296
- dataset: W.value,
2297
- ...U.value
2298
- })), void 0, !0)])) : x("", !0),
2299
- ze(M(hn), {
2300
- teleportTo: z.value.style.chart.tooltip.teleportTo,
2301
- show: H.value.showTooltip && er.value,
2302
- backgroundColor: z.value.style.chart.tooltip.backgroundColor,
2303
- color: z.value.style.chart.tooltip.color,
2304
- fontSize: z.value.style.chart.tooltip.fontSize,
2305
- borderRadius: z.value.style.chart.tooltip.borderRadius,
2306
- borderColor: z.value.style.chart.tooltip.borderColor,
2307
- borderWidth: z.value.style.chart.tooltip.borderWidth,
2308
- backgroundOpacity: z.value.style.chart.tooltip.backgroundOpacity,
2309
- position: z.value.style.chart.tooltip.position,
2310
- offsetX: z.value.style.chart.tooltip.offsetX,
2311
- offsetY: z.value.style.chart.tooltip.offsetY,
2312
- parent: F.value,
2313
- content: tr.value,
2314
- isCustom: $r.value,
2315
- isFullscreen: ui.value,
2316
- smooth: z.value.style.chart.tooltip.smooth,
2317
- backdropFilter: z.value.style.chart.tooltip.backdropFilter,
2318
- smoothForce: z.value.style.chart.tooltip.smoothForce,
2319
- smoothSnapThreshold: z.value.style.chart.tooltip.smoothSnapThrehsold,
2320
- isA11yMode: Gn.value === "keyboard",
2321
- a11yPosition: Wn.value
2322
- }, {
2323
- "tooltip-before": N(() => [A(t.$slots, "tooltip-before", T(w({ ...Qr.value })), void 0, !0)]),
2324
- tooltip: N(() => [A(t.$slots, "tooltip", T(w({ ...Qr.value })), void 0, !0)]),
2325
- "tooltip-after": N(() => [A(t.$slots, "tooltip-after", T(w({ ...Qr.value })), void 0, !0)]),
2326
- _: 3
2327
- }, 8, [
2328
- "teleportTo",
2329
- "show",
2330
- "backgroundColor",
2331
- "color",
2332
- "fontSize",
2333
- "borderRadius",
2334
- "borderColor",
2335
- "borderWidth",
2336
- "backgroundOpacity",
2337
- "position",
2338
- "offsetX",
2339
- "offsetY",
2340
- "parent",
2341
- "content",
2342
- "isCustom",
2343
- "isFullscreen",
2344
- "smooth",
2345
- "backdropFilter",
2346
- "smoothForce",
2347
- "smoothSnapThreshold",
2348
- "isA11yMode",
2349
- "a11yPosition"
2350
- ]),
2351
- Dn.value && z.value.userOptions.buttons.table ? (D(), b(Ke(wi.value.component), Ve({ key: 9 }, wi.value.props, {
2352
- ref_key: "tableUnit",
2353
- ref: Vn,
2354
- onClose: Ti
2355
- }), Le({
2356
- content: N(() => [(D(), b(M(vn), {
2357
- key: `table_${Rn.value}`,
2358
- colNames: li.value.colNames,
2359
- head: li.value.head,
2360
- body: li.value.body,
2361
- config: li.value.config,
2362
- title: z.value.table.useDialog ? "" : wi.value.title,
2363
- withCloseButton: !z.value.table.useDialog,
2364
- isCursorPointer: ir.value,
2365
- onClose: Ti
2366
- }, {
2367
- th: N(({ th: e }) => [e === "__SUM__" ? (D(), S("div", pn, [ze(M(gn), {
2368
- name: "sigma",
2369
- stroke: li.value.config.th.color,
2370
- size: 16
2371
- }, null, 8, ["stroke"])])) : (D(), S("div", mn, j(e), 1))]),
2372
- td: N(({ td: e }) => [Re(j(e.name ? e.name : isNaN(Number(e)) ? e.includes("%") ? e : M(g)(z.value.style.chart.layout.labels.percentage.formatter, e, M(d)({
2373
- v: e,
2374
- s: "%",
2375
- r: z.value.style.chart.layout.labels.percentage.rounding
2376
- })) : M(g)(z.value.style.chart.layout.labels.value.formatter, e, M(d)({
2377
- p: z.value.style.chart.layout.labels.dataLabels.prefix,
2378
- v: e,
2379
- s: z.value.style.chart.layout.labels.dataLabels.suffix,
2380
- r: z.value.style.chart.layout.labels.value.rounding
2381
- }))), 1)]),
2382
- _: 1
2383
- }, 8, [
2384
- "colNames",
2385
- "head",
2386
- "body",
2387
- "config",
2388
- "title",
2389
- "withCloseButton",
2390
- "isCursorPointer"
2391
- ]))]),
2392
- _: 2
2393
- }, [z.value.table.useDialog ? {
2394
- name: "title",
2395
- fn: N(() => [Re(j(wi.value.title), 1)]),
2396
- key: "0"
2397
- } : void 0, z.value.table.useDialog ? {
2398
- name: "actions",
2399
- fn: N(() => [C("button", {
2400
- tabindex: "0",
2401
- class: "vue-ui-user-options-button",
2402
- onClick: n[4] ||= (e) => ci(z.value.userOptions.callbacks.csv),
2403
- style: E({ cursor: ir.value ? "pointer" : "default" })
2404
- }, [ze(M(gn), {
2405
- name: "fileCsv",
2406
- stroke: wi.value.props.color
2407
- }, null, 8, ["stroke"])], 4)]),
2408
- key: "1"
2409
- } : void 0]), 1040)) : x("", !0),
2410
- A(t.$slots, "skeleton", {}, () => [M(or) ? (D(), b(_e, { key: 0 })) : x("", !0)], !0)
2411
- ], 46, tt));
2412
- }
2413
- }, [["__scopeId", "data-v-0262beb0"]]);
2414
- //#endregion
2415
- export { et as n, hn as t };