vue-data-ui 3.22.9 → 3.22.10

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