vue-data-ui 3.25.2 → 3.25.4

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