vue-data-ui 3.5.2 → 3.7.0

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