vue-data-ui 3.22.13 → 3.23.0

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