vue-data-ui 3.4.9 → 3.5.1

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 (151) hide show
  1. package/README.md +114 -37
  2. package/dist/{ColorPicker-J5wOPCeB.js → ColorPicker-ChuwChMo.js} +58 -56
  3. package/dist/{NonSvgPenAndPaper-C7TRn0_3.js → NonSvgPenAndPaper-DVgKKLIf.js} +1 -1
  4. package/dist/{PackageVersion-CTUqGqWV.js → PackageVersion-DQvyATVa.js} +1 -1
  5. package/dist/PenAndPaper-SZQIAgkg.js +388 -0
  6. package/dist/{Title-l36lOBMx.js → Title-isbiM8i8.js} +1 -1
  7. package/dist/components/vue-ui-3d-bar.js +1 -1
  8. package/dist/components/vue-ui-accordion.js +1 -1
  9. package/dist/components/vue-ui-age-pyramid.js +1 -1
  10. package/dist/components/vue-ui-annotator.js +1 -1
  11. package/dist/components/vue-ui-bullet.js +1 -1
  12. package/dist/components/vue-ui-candlestick.js +1 -1
  13. package/dist/components/vue-ui-carousel-table.js +1 -1
  14. package/dist/components/vue-ui-chestnut.js +1 -1
  15. package/dist/components/vue-ui-chord.js +1 -1
  16. package/dist/components/vue-ui-circle-pack.js +1 -1
  17. package/dist/components/vue-ui-cursor.js +1 -1
  18. package/dist/components/vue-ui-dashboard.js +1 -1
  19. package/dist/components/vue-ui-digits.js +1 -1
  20. package/dist/components/vue-ui-donut-evolution.js +1 -1
  21. package/dist/components/vue-ui-donut.js +1 -1
  22. package/dist/components/vue-ui-dumbbell.js +1 -1
  23. package/dist/components/vue-ui-flow.js +1 -1
  24. package/dist/components/vue-ui-funnel.js +1 -1
  25. package/dist/components/vue-ui-galaxy.js +1 -1
  26. package/dist/components/vue-ui-gauge.js +1 -1
  27. package/dist/components/vue-ui-gizmo.js +1 -1
  28. package/dist/components/vue-ui-heatmap.js +1 -1
  29. package/dist/components/vue-ui-history-plot.js +1 -1
  30. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  31. package/dist/components/vue-ui-kpi.js +1 -1
  32. package/dist/components/vue-ui-mini-loader.js +1 -1
  33. package/dist/components/vue-ui-molecule.js +1 -1
  34. package/dist/components/vue-ui-mood-radar.js +1 -1
  35. package/dist/components/vue-ui-nested-donuts.js +1 -1
  36. package/dist/components/vue-ui-onion.js +1 -1
  37. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  38. package/dist/components/vue-ui-quadrant.js +1 -1
  39. package/dist/components/vue-ui-quick-chart.js +1 -1
  40. package/dist/components/vue-ui-radar.js +1 -1
  41. package/dist/components/vue-ui-rating.js +1 -1
  42. package/dist/components/vue-ui-relation-circle.js +1 -1
  43. package/dist/components/vue-ui-ridgeline.js +1 -1
  44. package/dist/components/vue-ui-rings.js +1 -1
  45. package/dist/components/vue-ui-scatter.js +1 -1
  46. package/dist/components/vue-ui-skeleton.js +1 -1
  47. package/dist/components/vue-ui-smiley.js +1 -1
  48. package/dist/components/vue-ui-spark-trend.js +1 -1
  49. package/dist/components/vue-ui-sparkbar.js +1 -1
  50. package/dist/components/vue-ui-sparkgauge.js +1 -1
  51. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  52. package/dist/components/vue-ui-sparkline.js +1 -1
  53. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  54. package/dist/components/vue-ui-stackbar.js +1 -1
  55. package/dist/components/vue-ui-strip-plot.js +1 -1
  56. package/dist/components/vue-ui-table-heatmap.js +1 -1
  57. package/dist/components/vue-ui-table-sparkline.js +1 -1
  58. package/dist/components/vue-ui-table.js +1 -1
  59. package/dist/components/vue-ui-thermometer.js +1 -1
  60. package/dist/components/vue-ui-timer.js +1 -1
  61. package/dist/components/vue-ui-tiremarks.js +1 -1
  62. package/dist/components/vue-ui-treemap.js +1 -1
  63. package/dist/components/vue-ui-vertical-bar.js +1 -1
  64. package/dist/components/vue-ui-waffle.js +1 -1
  65. package/dist/components/vue-ui-wheel.js +1 -1
  66. package/dist/components/vue-ui-word-cloud.js +1 -1
  67. package/dist/components/vue-ui-world.js +1 -1
  68. package/dist/components/vue-ui-xy-canvas.js +1 -1
  69. package/dist/components/vue-ui-xy.js +1 -1
  70. package/dist/style.css +1 -1
  71. package/dist/types/vue-data-ui.d.ts +17 -8
  72. package/dist/{useNestedProp-BjZe1Y85.js → useNestedProp-DjGXw6S9.js} +22 -8
  73. package/dist/{vue-data-ui-DjxWWa78.js → vue-data-ui-B_RxfmEm.js} +113 -107
  74. package/dist/vue-data-ui.js +64 -64
  75. package/dist/{vue-ui-3d-bar-CLE7f9pl.js → vue-ui-3d-bar-CMNYyVa2.js} +454 -434
  76. package/dist/{vue-ui-accordion-CZ0thhxa.js → vue-ui-accordion-CqhVCfc2.js} +1 -1
  77. package/dist/{vue-ui-age-pyramid-D73uIOPm.js → vue-ui-age-pyramid-Vqa9iYXE.js} +180 -160
  78. package/dist/{vue-ui-annotator-BylDgUVb.js → vue-ui-annotator-nNv10fBm.js} +3 -3
  79. package/dist/{vue-ui-bullet-Bybo0xK2.js → vue-ui-bullet-BWEBeYV5.js} +190 -170
  80. package/dist/{vue-ui-candlestick-D_FyMdqH.js → vue-ui-candlestick-BoLzL0g1.js} +201 -181
  81. package/dist/{vue-ui-carousel-table-BvMlNdVo.js → vue-ui-carousel-table-Bi6wvUUU.js} +2 -2
  82. package/dist/{vue-ui-chestnut-DA0g0bDV.js → vue-ui-chestnut-BGz1TLXG.js} +375 -355
  83. package/dist/vue-ui-chord-CebhS7ln.js +1153 -0
  84. package/dist/{vue-ui-circle-pack-BPDm-ro5.js → vue-ui-circle-pack-7PJVyKjp.js} +289 -269
  85. package/dist/{vue-ui-cursor-ik59bfC4.js → vue-ui-cursor-qYLAwvzn.js} +1 -1
  86. package/dist/vue-ui-dashboard-DcmMvhgM.js +432 -0
  87. package/dist/{vue-ui-digits-ByNNcWXi.js → vue-ui-digits-DyE8eU1m.js} +1 -1
  88. package/dist/vue-ui-donut-CxZcJFTo.js +1681 -0
  89. package/dist/{vue-ui-donut-evolution-Ca3Svr0B.js → vue-ui-donut-evolution-BVYL-BUJ.js} +480 -444
  90. package/dist/{vue-ui-dumbbell-CxCE2luV.js → vue-ui-dumbbell-QxZn86A3.js} +210 -190
  91. package/dist/{vue-ui-flow-DEvwXd4W.js → vue-ui-flow-DEI5LRch.js} +339 -319
  92. package/dist/{vue-ui-funnel-Bgcx7xia.js → vue-ui-funnel-B_A5orFg.js} +218 -198
  93. package/dist/{vue-ui-galaxy-BWr1EMob.js → vue-ui-galaxy-CUoDRr-O.js} +313 -277
  94. package/dist/{vue-ui-gauge-DQricvo2.js → vue-ui-gauge-46tSRZN5.js} +311 -291
  95. package/dist/{vue-ui-gizmo-C-fKe3io.js → vue-ui-gizmo-BOgbsXao.js} +2 -2
  96. package/dist/{vue-ui-heatmap-B-o_i7Hu.js → vue-ui-heatmap-DKKjl1A2.js} +303 -283
  97. package/dist/{vue-ui-history-plot-DzQ9DPUJ.js → vue-ui-history-plot-C6p_aThr.js} +478 -442
  98. package/dist/{vue-ui-kpi-BGGff8LM.js → vue-ui-kpi-B1yJ83aF.js} +2 -2
  99. package/dist/{vue-ui-mini-loader-CSF-7TJL.js → vue-ui-mini-loader-BudcNBg-.js} +1 -1
  100. package/dist/{vue-ui-molecule-I2OhrCR2.js → vue-ui-molecule-L90GnHee.js} +156 -136
  101. package/dist/{vue-ui-mood-radar-BAT7kZUy.js → vue-ui-mood-radar-Dhigm5rw.js} +266 -246
  102. package/dist/{vue-ui-nested-donuts-CjhJDAQi.js → vue-ui-nested-donuts-D0MCLs5n.js} +597 -557
  103. package/dist/vue-ui-onion-B7yPJ3gL.js +915 -0
  104. package/dist/vue-ui-parallel-coordinate-plot-DY21ivNe.js +1051 -0
  105. package/dist/{vue-ui-quadrant-DGnasrCR.js → vue-ui-quadrant-b0vMRaq-.js} +532 -495
  106. package/dist/{vue-ui-quick-chart-Cam_sWet.js → vue-ui-quick-chart-VK2EN7sh.js} +288 -268
  107. package/dist/{vue-ui-radar-DNI9WI2R.js → vue-ui-radar-B5Vkoz9M.js} +412 -373
  108. package/dist/{vue-ui-rating-CiMoFM_c.js → vue-ui-rating-BH4DW1ZY.js} +1 -1
  109. package/dist/{vue-ui-relation-circle-Dj1jhcsl.js → vue-ui-relation-circle-XHbE-ZUX.js} +228 -208
  110. package/dist/{vue-ui-ridgeline-adIls6bj.js → vue-ui-ridgeline-CAMNq-p_.js} +517 -481
  111. package/dist/vue-ui-rings-ImGOqm_J.js +855 -0
  112. package/dist/vue-ui-scatter-CterNJYe.js +1590 -0
  113. package/dist/{vue-ui-skeleton-DUdI2uOO.js → vue-ui-skeleton-CykXHWj-.js} +2 -2
  114. package/dist/{vue-ui-smiley-sGFRbn31.js → vue-ui-smiley-DnGm6qrK.js} +1 -1
  115. package/dist/{vue-ui-spark-trend-DxpRfUJz.js → vue-ui-spark-trend-N1AsNQJA.js} +2 -2
  116. package/dist/{vue-ui-sparkbar-B44oER5n.js → vue-ui-sparkbar-Bvsi5DTT.js} +2 -2
  117. package/dist/{vue-ui-sparkgauge-ix12NZ7M.js → vue-ui-sparkgauge-DyJmWCWT.js} +2 -2
  118. package/dist/{vue-ui-sparkhistogram-Cs-QDYBR.js → vue-ui-sparkhistogram-5eKrkmSb.js} +143 -140
  119. package/dist/{vue-ui-sparkline-Cb8ZmyUq.js → vue-ui-sparkline-ChKAzlVq.js} +2 -2
  120. package/dist/vue-ui-sparkstackbar-BXNy6nuw.js +441 -0
  121. package/dist/vue-ui-stackbar-1IwvUYBO.js +1827 -0
  122. package/dist/{vue-ui-strip-plot-BjG-Jxnb.js → vue-ui-strip-plot-B1wGxP8-.js} +245 -225
  123. package/dist/{vue-ui-table-DdBdLrAL.js → vue-ui-table-DSsIrT4L.js} +3 -3
  124. package/dist/{vue-ui-table-heatmap-BqCEBoUf.js → vue-ui-table-heatmap-DXFHy7-E.js} +1 -1
  125. package/dist/{vue-ui-table-sparkline-EpCo2Be5.js → vue-ui-table-sparkline-DpqY_4ay.js} +2 -2
  126. package/dist/vue-ui-thermometer-CMKvSA8p.js +584 -0
  127. package/dist/{vue-ui-timer-Br3wp8hG.js → vue-ui-timer-BpdCY_wg.js} +3 -3
  128. package/dist/vue-ui-tiremarks-CNipzVli.js +450 -0
  129. package/dist/vue-ui-treemap-DPE8SY0_.js +1330 -0
  130. package/dist/{vue-ui-vertical-bar-yfbEfLqy.js → vue-ui-vertical-bar-ZU1GCbX0.js} +484 -448
  131. package/dist/{vue-ui-waffle-m-9sqQik.js → vue-ui-waffle-z7nuSuSV.js} +398 -362
  132. package/dist/vue-ui-wheel-DLRoRjeM.js +663 -0
  133. package/dist/{vue-ui-word-cloud-vNwswYZD.js → vue-ui-word-cloud-D2r5E3pP.js} +248 -228
  134. package/dist/{vue-ui-world-BsCNyZy_.js → vue-ui-world-goXYnTyM.js} +287 -267
  135. package/dist/{vue-ui-xy-CIrw1lWQ.js → vue-ui-xy-NDDbNbds.js} +1263 -1227
  136. package/dist/{vue-ui-xy-canvas-DXnLFwW3.js → vue-ui-xy-canvas-2a6NlQe3.js} +338 -322
  137. package/package.json +4 -4
  138. package/dist/PenAndPaper-DSvu9dwa.js +0 -373
  139. package/dist/vue-ui-chord-CDgzolI-.js +0 -1133
  140. package/dist/vue-ui-dashboard-CeJwbiON.js +0 -412
  141. package/dist/vue-ui-donut-DjQXHBJE.js +0 -1645
  142. package/dist/vue-ui-onion-DTY2p87s.js +0 -873
  143. package/dist/vue-ui-parallel-coordinate-plot-C8aWTcNn.js +0 -1014
  144. package/dist/vue-ui-rings-CnTMFK6R.js +0 -813
  145. package/dist/vue-ui-scatter-fzR2c0St.js +0 -1554
  146. package/dist/vue-ui-sparkstackbar-BiRZ51OU.js +0 -424
  147. package/dist/vue-ui-stackbar-DubS6Pg8.js +0 -1708
  148. package/dist/vue-ui-thermometer-DTnfnf9z.js +0 -564
  149. package/dist/vue-ui-tiremarks-CrC_tlIx.js +0 -430
  150. package/dist/vue-ui-treemap-kyuyi2ES.js +0 -1294
  151. package/dist/vue-ui-wheel-BasM7FWt.js +0 -643
@@ -1,1645 +0,0 @@
1
- import { defineAsyncComponent as ee, useSlots as kl, computed as y, shallowRef as H, ref as g, onMounted as St, onBeforeUnmount as Tt, toRefs as xl, watch as fe, createElementBlock as r, openBlock as n, normalizeStyle as $, normalizeClass as Ue, createBlock as te, createCommentVNode as v, renderSlot as b, createElementVNode as h, createVNode as Se, unref as u, createSlots as We, withCtx as C, normalizeProps as ue, guardReactiveProps as re, Fragment as w, renderList as L, mergeProps as qe, toDisplayString as V, withDirectives as Pt, createTextVNode as Te, vShow as Ft, Teleport as _l, resolveDynamicComponent as $l, nextTick as Cl } from "vue";
2
- import { o as Lt, f as He, g as Al, c as Sl, t as Tl, e as Pl, x as Fl, h as It, p as ie, a as E, d as O, T as Mt, Z as Ll, X as Il, s as Pe, i as Ml, V as zl, _ as P, W as ge, Y as x, $ as zt, l as Ol, b as Dl, O as je, P as Nl, Q as Yl, G as Xl, a0 as Ot } from "./lib-C_mNZmhD.js";
3
- import { t as Bl, u as Vl } from "./useResponsive-DfdjqQps.js";
4
- import { u as El, a as Dt } from "./useNestedProp-BjZe1Y85.js";
5
- import { u as Rl } from "./usePrinter-DTzqpYKF.js";
6
- import { u as Gl, B as Ul } from "./BaseScanner-BgWxam9d.js";
7
- import { u as Wl } from "./useSvgExport-DrjCWun4.js";
8
- import { u as ql } from "./useUserOptionState-BIvW1Kz7.js";
9
- import { u as Hl } from "./useChartAccessibility-9icAAmYg.js";
10
- import jl from "./img-BecE5qXd.js";
11
- import { _ as Ql } from "./Shape-CNXKB8O0.js";
12
- import Zl from "./Title-l36lOBMx.js";
13
- import { t as Jl } from "./themes-AUNCOb2G.js";
14
- import Kl from "./Legend-G6GMcdAc.js";
15
- import { _ as ea } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
- const ta = ["id"], la = ["id"], aa = ["xmlns", "viewBox"], oa = ["width", "height"], sa = { key: 1 }, na = ["id"], ua = ["stop-color"], ra = ["offset", "stop-color"], ia = ["offset", "stop-color"], va = ["stop-color"], da = { key: 2 }, ca = ["id", "cx", "cy"], ha = ["stop-color", "stop-opacity"], ya = ["stop-color"], fa = ["id"], ga = ["id"], pa = ["id"], ma = ["flood-color"], ba = ["id"], wa = ["flood-color"], ka = ["d", "stroke", "filter"], xa = ["d", "stroke", "filter"], _a = ["cx", "cy", "r", "fill", "filter"], $a = { key: 6 }, Ca = ["stroke", "d"], Aa = ["d", "fill", "stroke", "stroke-width", "filter"], Sa = { key: 0 }, Ta = ["d", "fill", "stroke", "stroke-width", "filter"], Pa = { key: 0 }, Fa = ["stroke", "d"], La = { key: 0 }, Ia = ["d", "stroke", "stroke-width", "filter"], Ma = { key: 1 }, za = ["d", "fill", "stroke", "stroke-width", "filter"], Oa = ["d", "fill", "stroke", "stroke-width", "filter"], Da = { key: 1 }, Na = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Ya = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Xa = { key: 0 }, Ba = ["d", "fill", "stroke", "stroke-width"], Va = ["cx", "cy", "r", "stroke"], Ea = ["cx", "cy", "r", "fill"], Ra = ["cx", "cy", "r"], Ga = { key: 0 }, Ua = ["d", "stroke", "fill", "onMouseenter", "onMouseleave", "onClick"], Wa = { key: 1 }, qa = ["cx", "cy", "r"], Ha = ["x", "y", "fill", "font-size"], ja = ["x", "y", "fill", "font-size"], Qa = ["x", "y", "fill", "font-size"], Za = ["x", "y", "fill", "font-size"], Ja = ["filter"], Ka = { key: 0 }, eo = ["x", "y"], to = { key: 1 }, lo = ["cx", "cy", "fill", "stroke", "filter", "onClick", "onMouseenter", "onMouseleave"], ao = ["cx", "cy", "fill", "stroke", "filter", "onClick", "onMouseenter", "onMouseleave"], oo = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave"], so = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "innerHTML"], no = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave"], uo = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "innerHTML"], ro = { key: 2 }, io = ["x", "y", "width"], vo = ["x", "y", "width"], co = {
17
- key: 4,
18
- class: "vue-data-ui-watermark"
19
- }, ho = ["id"], yo = ["onClick"], fo = {
20
- key: 7,
21
- class: "vue-ui-donut-hollow"
22
- }, go = ["innerHTML"], po = {
23
- __name: "vue-ui-donut",
24
- props: {
25
- config: {
26
- type: Object,
27
- default() {
28
- return {};
29
- }
30
- },
31
- dataset: {
32
- type: Array,
33
- default() {
34
- return [];
35
- }
36
- }
37
- },
38
- emits: ["selectLegend", "selectDatapoint"],
39
- setup(Qe, { expose: Nt, emit: Yt }) {
40
- const Xt = ee(() => import("./Tooltip-oWCO1HKy.js")), Bt = ee(() => import("./BaseIcon-BmMbm4d0.js")), Vt = ee(() => import("./vue-ui-accordion-CZ0thhxa.js")), Et = ee(() => import("./DataTable-BT7VF2ua.js")), Rt = ee(() => import("./PenAndPaper-DSvu9dwa.js")), Gt = ee(() => import("./UserOptions-CGnQt6Fd.js")), Ut = ee(() => import("./PackageVersion-CTUqGqWV.js")), Wt = ee(() => import("./BaseDraggableDialog-ymf2sfB8.js")), { vue_ui_donut: qt } = El(), Ht = kl(), k = Qe, we = y({
41
- get() {
42
- return !!k.dataset && k.dataset.length;
43
- },
44
- set(t) {
45
- return t;
46
- }
47
- }), D = H(null), ke = g(null), jt = g(null), Qt = g(null), Ze = H(null), Je = H(null), j = H(null), ve = H(null), Ke = H(null), et = H(null), tt = g(0), lt = g(0), at = g(0), ot = g(!1), pe = g(null), Fe = g(null), xe = y({
48
- get: () => e.value.style.chart.layout.labels.percentage.fontSize,
49
- set: (t) => t
50
- }), Q = y({
51
- get: () => e.value.style.chart.layout.labels.name.fontSize,
52
- set: (t) => t
53
- });
54
- let Le = !1;
55
- const R = () => {
56
- !e.value.autoSize || Le || (Le = !0, requestAnimationFrame(() => {
57
- Le = !1;
58
- const t = e.value, o = ke.value, l = le.value;
59
- if (!t.autoSize || !o || !l) return;
60
- const [a, i, c, m] = l.getAttribute("viewBox").split(" ").map(Number), A = { x: a, y: i, width: c, height: m }, M = [
61
- {
62
- selector: ".vue-data-ui-datalabel-value",
63
- baseSize: t.style.chart.layout.labels.percentage.fontSize,
64
- minSize: t.style.chart.layout.labels.percentage.minFontSize,
65
- sizeRef: xe
66
- },
67
- {
68
- selector: ".vue-data-ui-datalabel-name",
69
- baseSize: t.style.chart.layout.labels.name.fontSize,
70
- minSize: t.style.chart.layout.labels.name.minFontSize,
71
- sizeRef: Q
72
- }
73
- ];
74
- M.map((B) => o.querySelectorAll(B.selector).length).reduce((B, K) => B + K, 0) !== 0 && M.forEach(({ selector: B, baseSize: K, minSize: Ge, sizeRef: ml }) => {
75
- o.querySelectorAll(B).forEach((bl) => {
76
- const wl = Ol({
77
- el: bl,
78
- bounds: A,
79
- currentFontSize: K,
80
- minFontSize: Ge,
81
- attempts: 200,
82
- padding: 1
83
- });
84
- ml.value = wl;
85
- });
86
- });
87
- }));
88
- };
89
- St(async () => {
90
- ot.value = !0, st(), requestAnimationFrame(R);
91
- });
92
- let Ie;
93
- St(() => {
94
- D.value && (Ie = new ResizeObserver((t) => {
95
- for (const o of t) {
96
- const { width: l, height: a } = o.contentRect;
97
- if (l > 0 && a > 0) {
98
- R();
99
- break;
100
- }
101
- }
102
- }), Ie.observe(D.value.parentElement));
103
- }), Tt(() => {
104
- Ie?.disconnect();
105
- }), Tt(() => {
106
- j.value && (ve.value && j.value.unobserve(ve.value), j.value.disconnect());
107
- });
108
- const Me = y(() => !!e.value.debug);
109
- function st() {
110
- if (Lt(k.dataset) ? (He({
111
- componentName: "VueUiDonut",
112
- type: "dataset",
113
- debug: Me.value
114
- }), we.value = !1, $e.value = !0) : (k.dataset.forEach((t, o) => {
115
- Al({
116
- datasetObject: t,
117
- requiredAttributes: ["name", "values"]
118
- }).forEach((l) => {
119
- He({
120
- componentName: "VueUiDonut",
121
- type: "datasetSerieAttribute",
122
- property: l,
123
- index: o,
124
- debug: Me.value
125
- }), we.value = !1, $e.value = !0;
126
- });
127
- }), k.dataset.forEach((t, o) => {
128
- (!t.name || t.name === "") && He({
129
- componentName: "VueUiDonut",
130
- type: "datasetAttributeEmpty",
131
- property: "name",
132
- index: o,
133
- debug: Me.value
134
- });
135
- })), Lt(k.dataset) || ($e.value = e.value.loading), e.value.responsive) {
136
- const t = Bl(() => {
137
- const { width: o, height: l } = Vl({
138
- chart: D.value,
139
- title: e.value.style.chart.title.text ? Ze.value : null,
140
- legend: e.value.style.chart.legend.show ? Je.value : null,
141
- source: Ke.value,
142
- noTitle: et.value,
143
- padding: e.value.autoSize ? void 0 : vt.value
144
- });
145
- requestAnimationFrame(() => {
146
- s.value.width = o, s.value.height = l, R();
147
- });
148
- });
149
- j.value && (ve.value && j.value.unobserve(ve.value), j.value.disconnect()), j.value = new ResizeObserver(t), ve.value = D.value.parentNode, j.value.observe(ve.value);
150
- }
151
- }
152
- const f = g(Sl());
153
- g(null);
154
- const ze = g(!1), Oe = g(""), N = g(null), nt = g(0);
155
- function De() {
156
- const t = Dt({
157
- userConfig: k.config,
158
- defaultConfig: qt
159
- });
160
- let o = {};
161
- return t.theme ? o = {
162
- ...Dt({
163
- userConfig: Jl.vue_ui_donut[t.theme] || k.config,
164
- defaultConfig: t
165
- }),
166
- customPalette: Dl[t.theme] || ie
167
- } : o = t, k.config && je(k.config, "events.datapointEnter") ? o.events.datapointEnter = k.config.events.datapointEnter : o.events.datapointEnter = null, k.config && je(k.config, "events.datapointLeave") ? o.events.datapointLeave = k.config.events.datapointLeave : o.events.datapointLeave = null, k.config && je(k.config, "events.datapointClick") ? o.events.datapointClick = k.config.events.datapointClick : o.events.datapointClick = null, o;
168
- }
169
- const e = g(De()), { loading: _e, FINAL_DATASET: de, manualLoading: $e, skeletonDataset: Zt } = Gl({
170
- ...xl(k),
171
- FINAL_CONFIG: e,
172
- prepareConfig: De,
173
- skeletonDataset: [
174
- {
175
- name: "",
176
- values: [3],
177
- color: "#BABABA"
178
- },
179
- {
180
- name: "",
181
- values: [2],
182
- color: "#AAAAAA"
183
- },
184
- {
185
- name: "",
186
- values: [1],
187
- color: "#CACACA"
188
- }
189
- ],
190
- skeletonConfig: Tl({
191
- defaultConfig: e.value,
192
- userConfig: {
193
- useCssAnimation: !1,
194
- table: { show: !1 },
195
- startAnimation: {
196
- show: !1
197
- },
198
- userOptions: { show: !1 },
199
- style: {
200
- chart: {
201
- backgroundColor: "#99999930",
202
- layout: {
203
- labels: {
204
- dataLabels: { show: !1 },
205
- hollow: {
206
- average: { show: !1 },
207
- total: { show: !1 }
208
- },
209
- value: { show: !1 }
210
- }
211
- },
212
- legend: {
213
- backgroundColor: "transparent",
214
- showValue: !1,
215
- showPercentage: !1
216
- },
217
- title: {
218
- color: "#1A1A1A",
219
- subtitle: {
220
- color: "#5A5A5A"
221
- }
222
- }
223
- }
224
- }
225
- }
226
- })
227
- }), S = g(!0), W = H([]);
228
- function Jt(t, o = 1e3, l = 50) {
229
- return new Promise((a) => {
230
- const i = t.length;
231
- W.value = Array(i).fill(0);
232
- let c = 0;
233
- t.forEach((m, A) => {
234
- setTimeout(() => {
235
- const M = performance.now();
236
- function z(B) {
237
- const K = Math.min((B - M) / o, 1), Ge = Ot(K);
238
- W.value[A] = m * Ge, W.value = [...W.value], K < 1 ? (requestAnimationFrame(z), requestAnimationFrame(R)) : (W.value[A] = m, W.value = [...W.value], c += 1, c === i && a(), requestAnimationFrame(R));
239
- }
240
- requestAnimationFrame(z);
241
- }, A * l);
242
- });
243
- });
244
- }
245
- const ut = g(!1);
246
- fe(
247
- () => _e.value,
248
- async (t) => {
249
- if (t || ut.value) return;
250
- const o = de.value === Zt, l = e.value.startAnimation?.show;
251
- if (!o && l) {
252
- ut.value = !0;
253
- const a = de.value.map(
254
- (i) => i.values.reduce((c, m) => c + m, 0)
255
- );
256
- await Jt(
257
- a,
258
- e.value.startAnimation.durationMs,
259
- e.value.startAnimation.staggerMs
260
- );
261
- }
262
- S.value = !1;
263
- },
264
- { immediate: !0 }
265
- );
266
- const { userOptionsVisible: Ne, setUserOptionsVisibility: rt, keepUserOptionState: it } = ql({ config: e.value }), { svgRef: le } = Hl({ config: e.value.style.chart.title });
267
- function Kt() {
268
- rt(!0);
269
- }
270
- function el() {
271
- rt(!1);
272
- }
273
- fe(() => k.config, (t) => {
274
- _e.value || (e.value = De()), Ne.value = !e.value.userOptions.showOnChartHover, st(), tt.value += 1, lt.value += 1, at.value += 1, p.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, p.value.showTable = e.value.table.show, p.value.showTooltip = e.value.style.chart.tooltip.show, s.value.height = e.value.style.chart.height, s.value.width = e.value.style.chart.width;
275
- }, { deep: !0 });
276
- const vt = y(() => {
277
- const { top: t, right: o, bottom: l, left: a } = e.value.style.chart.padding;
278
- return {
279
- css: `padding:${t}px ${o}px ${l}px ${a}px`,
280
- top: t,
281
- right: o,
282
- bottom: l,
283
- left: a
284
- };
285
- }), { isPrinting: dt, isImaging: ct, generatePdf: ht, generateImage: yt } = Rl({
286
- elementId: `donut__${f.value}`,
287
- fileName: e.value.style.chart.title.text || "vue-ui-donut",
288
- options: e.value.userOptions.print
289
- }), tl = y(() => e.value.userOptions.show && !e.value.style.chart.title.text), ft = y(() => Pl(e.value.customPalette)), p = g({
290
- dataLabels: {
291
- show: e.value.style.chart.layout.labels.dataLabels.show
292
- },
293
- showTable: e.value.table.show,
294
- showTooltip: e.value.style.chart.tooltip.show
295
- });
296
- fe(e, () => {
297
- p.value = {
298
- dataLabels: {
299
- show: e.value.style.chart.layout.labels.dataLabels.show
300
- },
301
- showTable: e.value.table.show,
302
- showTooltip: e.value.style.chart.tooltip.show
303
- };
304
- }, { immediate: !0 });
305
- const s = g({
306
- height: e.value.style.chart.height,
307
- width: e.value.style.chart.width
308
- }), ae = y(() => {
309
- if (e.value.pie)
310
- return _.value;
311
- const t = e.value.style.chart.layout.donut.strokeWidth / 512, o = Math.min(s.value.width, s.value.height) * t, l = o > _.value ? _.value : o;
312
- return Math.max(l, 12 * (1 + t));
313
- }), gt = Yt, G = y(() => de.value.map((t, o) => ({
314
- name: t.name,
315
- color: It(t.color) || ft.value[o] || ie[o] || ie[o % ie.length],
316
- value: Fl(t.values.reduce((l, a) => l + a, 0)),
317
- absoluteValues: t.values,
318
- comment: t.comment || "",
319
- patternIndex: o,
320
- seriesIndex: o,
321
- ghost: !1,
322
- pattern: `pattern_${f.value}_${o}`
323
- })));
324
- fe(() => k.dataset, (t) => {
325
- Array.isArray(t) && t.length > 0 && ($e.value = !1);
326
- }, { immediate: !0 });
327
- const I = H(G.value);
328
- fe(() => G.value, (t) => {
329
- I.value = t, requestAnimationFrame(R);
330
- });
331
- function ll() {
332
- return G.value.map((t) => ({
333
- name: t.name,
334
- color: t.color,
335
- value: t.value
336
- }));
337
- }
338
- const U = g([]), oe = g(!1);
339
- function pt({ from: t, to: o, duration: l, onUpdate: a, onDone: i, easing: c = Ot }) {
340
- const m = performance.now();
341
- function A(M) {
342
- const z = Math.min((M - m) / l, 1), B = c(z), K = t + (o - t) * B;
343
- a(K, z), z < 1 ? requestAnimationFrame(A) : (a(o, 1), i && i());
344
- }
345
- requestAnimationFrame(A);
346
- }
347
- function mt(t) {
348
- const o = G.value.find((i, c) => c === t);
349
- let a = I.value.find((i, c) => c === t).value;
350
- if (U.value.includes(t)) {
351
- let c = function() {
352
- I.value = I.value.map(
353
- (A, M) => t === M ? { ...A, value: i } : A
354
- );
355
- }, m = function() {
356
- oe.value = !0, pt({
357
- from: a,
358
- to: i,
359
- duration: e.value.serieToggleAnimation.durationMs,
360
- onUpdate: (A, M) => {
361
- I.value = I.value.map(
362
- (z, B) => t === B ? { ...z, value: A } : z
363
- ), requestAnimationFrame(R);
364
- },
365
- onDone: () => {
366
- c(), oe.value = !1;
367
- }
368
- });
369
- };
370
- U.value = U.value.filter((A) => A !== t);
371
- const i = o.value;
372
- e.value.serieToggleAnimation.show && e.value.type === "classic" ? m() : (c(), requestAnimationFrame(R));
373
- } else if (U.value.length < G.value.length - 1) {
374
- let i = function() {
375
- U.value.push(t), I.value = I.value.map(
376
- (m, A) => t === A ? { ...m, value: 0 } : m
377
- );
378
- }, c = function() {
379
- oe.value = !0, pt({
380
- from: a,
381
- to: 0,
382
- duration: e.value.serieToggleAnimation.durationMs,
383
- onUpdate: (m, A) => {
384
- I.value = I.value.map(
385
- (M, z) => t === z ? { ...M, value: m } : M
386
- ), requestAnimationFrame(R);
387
- },
388
- onDone: () => {
389
- i(), requestAnimationFrame(R), oe.value = !1;
390
- }
391
- });
392
- };
393
- e.value.serieToggleAnimation.show && e.value.type === "classic" ? c() : i();
394
- }
395
- gt("selectLegend", q.value.map((i) => ({
396
- name: i.name,
397
- color: i.color,
398
- value: i.value
399
- })));
400
- }
401
- const al = y(() => de.value.reduce((t, o) => t + o.values.reduce((l, a) => l + a, 0), 0)), q = y(() => {
402
- if (S.value && !_e.value) {
403
- const t = W.value.map((l, a) => ({
404
- ...G.value[a],
405
- value: l,
406
- color: G.value[a].color,
407
- ghost: !1
408
- })), o = al.value - W.value.reduce((l, a) => l + a, 0);
409
- return o > 0 && t.push({
410
- name: "__ghost__",
411
- value: o,
412
- color: "transparent",
413
- ghost: !0
414
- }), t;
415
- } else
416
- return I.value.forEach((t, o) => {
417
- if ([null, void 0].includes(t.values))
418
- return {
419
- ...t,
420
- values: []
421
- };
422
- }), I.value.map((t, o) => ({
423
- ...t,
424
- seriesIndex: o
425
- })).filter((t, o) => !U.value.includes(o));
426
- }), Ye = y(() => de.value.map((t, o) => {
427
- const l = (t.values || []).reduce((i, c) => i + c, 0), a = l / de.value.map((i) => (i.values || []).reduce((c, m) => c + m, 0)).reduce((i, c) => i + c, 0);
428
- return {
429
- name: t.name,
430
- color: It(t.color) || ft.value[o] || ie[o] || ie[o % ie.length],
431
- value: l,
432
- shape: "circle",
433
- patternIndex: o,
434
- proportion: a
435
- };
436
- }).map((t, o) => ({
437
- ...t,
438
- opacity: U.value.includes(o) ? 0.5 : 1,
439
- segregate: () => !oe.value && mt(o),
440
- isSegregated: U.value.includes(o),
441
- display: `${t.name}${e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ": " : ""}${e.value.style.chart.legend.showValue ? E(e.value.style.chart.layout.labels.value.formatter, t.value, O({
442
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
443
- v: t.value,
444
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
445
- r: e.value.style.chart.legend.roundingValue
446
- }), { datapoint: t, index: o }) : ""}${e.value.style.chart.legend.showPercentage ? U.value.includes(o) ? `${e.value.style.chart.legend.showValue ? "(" : ""}${il(t.proportion * 100)}%${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? " (" : ""}${isNaN(t.value / F.value) ? "-" : E(e.value.style.chart.layout.labels.percentage.formatter, bt(t), O({
447
- v: bt(t),
448
- s: "%",
449
- r: e.value.style.chart.legend.roundingPercentage
450
- }))}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""}`
451
- }))), ol = y(() => ({
452
- cy: "donut-div-legend",
453
- backgroundColor: e.value.style.chart.legend.backgroundColor,
454
- color: e.value.style.chart.legend.color,
455
- fontSize: e.value.style.chart.legend.fontSize,
456
- paddingBottom: 12,
457
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
458
- })), _ = y(() => {
459
- const t = e.value.style.chart.layout.donut.radiusRatio, o = Math.max(0.1, Math.min(0.50001, t)), l = Math.min(s.value.width * o, s.value.height * o);
460
- return Math.max(12, l);
461
- }), T = y(() => Mt({ series: q.value }, s.value.width / 2, s.value.height / 2, _.value, _.value, 1.99999, 2, 1, 360, 105.25, ae.value)), sl = y(() => Math.abs(q.value.map((t) => t.value).reduce((t, o) => t + o, 0)) > 0), nl = y(() => Mt({
462
- series: [
463
- {
464
- value: 1,
465
- color: e.value.style.chart.layout.donut.emptyFill,
466
- name: "_",
467
- seriesIndex: 0,
468
- patternIndex: -1,
469
- ghost: !1,
470
- absoluteValues: [1]
471
- }
472
- ]
473
- }, s.value.width / 2, s.value.height / 2, _.value, _.value, 1.99999, 2, 1, 360, 105.25, ae.value)), Y = y(() => T.value.filter((t) => !t.ghost)), d = y(() => {
474
- const t = Math.max(...q.value.map((l) => l.value)), o = q.value.map((l) => l.value / t);
475
- return Ll({
476
- series: o,
477
- center: {
478
- x: s.value.width / 2,
479
- y: s.value.height / 2
480
- },
481
- maxRadius: Math.min(s.value.width, s.value.height) / 3,
482
- hasGhost: S.value
483
- });
484
- });
485
- function ce(t) {
486
- return t.x > s.value.width / 2 + 6 ? "start" : t.x < s.value.width / 2 - 6 ? "end" : "middle";
487
- }
488
- function ul(t) {
489
- return t.middlePoint.y > s.value.height / 2 ? P({ initX: t.middlePoint.x, initY: t.middlePoint.y, offset: 100, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y : P({ initX: t.middlePoint.x, initY: t.middlePoint.y, offset: 0, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y - 100;
490
- }
491
- function X(t) {
492
- return t.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
493
- }
494
- function Xe(t, o) {
495
- const l = t.value / rl(o);
496
- return isNaN(l) ? 0 : E(
497
- e.value.style.chart.layout.labels.percentage.formatter,
498
- l * 100,
499
- O({
500
- v: l * 100,
501
- s: "%",
502
- r: e.value.style.chart.layout.labels.percentage.rounding
503
- }),
504
- { datapoint: t }
505
- );
506
- }
507
- function rl(t) {
508
- return [...t].map((o) => o.value).reduce((o, l) => o + l, 0);
509
- }
510
- const F = y(() => q.value.map((t) => t.value).reduce((t, o) => t + o, 0)), Be = y(() => F.value / q.value.length);
511
- function bt(t) {
512
- return oe.value ? t.proportion * 100 : t.value / F.value * 100;
513
- }
514
- const Ve = g(null), me = g(!1);
515
- function he({ datapoint: t, seriesIndex: o }) {
516
- e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: o }), ze.value = !1, N.value = null;
517
- }
518
- function ye({ datapoint: t, relativeIndex: o, seriesIndex: l, show: a = !1 }) {
519
- e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: l }), Ve.value = { datapoint: t, seriesIndex: l, config: e.value, series: G.value }, ze.value = a, N.value = o;
520
- let i = "";
521
- const c = e.value.style.chart.tooltip.customFormat;
522
- if (me.value = !1, Xl(c))
523
- try {
524
- const m = c({
525
- seriesIndex: l,
526
- datapoint: t,
527
- series: G.value,
528
- config: e.value
529
- });
530
- typeof m == "string" && (Oe.value = m, me.value = !0);
531
- } catch {
532
- console.warn("Custom format cannot be applied."), me.value = !1;
533
- }
534
- if (!me.value) {
535
- if (i += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`, i += `<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="${t.color}"/>${Ht.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${f.value}_${l})"/>` : ""}</svg>`, e.value.style.chart.tooltip.showValue && (i += `<b>${E(
536
- e.value.style.chart.layout.labels.value.formatter,
537
- t.value,
538
- O({
539
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
540
- v: t.value,
541
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
542
- r: e.value.style.chart.tooltip.roundingValue
543
- }),
544
- {
545
- datapoint: t,
546
- relativeIndex: o,
547
- seriesIndex: l
548
- }
549
- )}</b>`), e.value.style.chart.tooltip.showPercentage) {
550
- const m = E(
551
- e.value.style.chart.layout.labels.percentage.formatter,
552
- t.proportion * 100,
553
- O({
554
- v: t.proportion * 100,
555
- s: "%",
556
- r: e.value.style.chart.tooltip.roundingPercentage
557
- }),
558
- {
559
- datapoint: t,
560
- relativeIndex: o,
561
- seriesIndex: l
562
- }
563
- );
564
- e.value.style.chart.tooltip.showValue ? i += `<span>(${m})</span></div>` : i += `<b>${m}</b></div>`;
565
- }
566
- e.value.style.chart.comments.showInTooltip && t.comment && (i += `<div class="vue-data-ui-tooltip-comment" style="background:${t.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${t.color}">${t.comment}</div>`), Oe.value = `<div>${i}</div>`;
567
- }
568
- }
569
- function se(t) {
570
- return e.value.useBlurOnHover && ![null, void 0].includes(N.value) && N.value !== t ? `url(#blur_${f.value})` : "";
571
- }
572
- const Z = y(() => {
573
- const t = q.value.map((l) => ({
574
- name: l.name,
575
- color: l.color
576
- })), o = q.value.map((l) => l.value);
577
- return { head: t, body: o };
578
- });
579
- function Ee(t = null) {
580
- Cl(() => {
581
- const o = Z.value.head.map((i, c) => [[
582
- i.name
583
- ], [Z.value.body[c]], [isNaN(Z.value.body[c] / F.value) ? "-" : Z.value.body[c] / F.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), a = Nl(l);
584
- t ? t(a) : Yl({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-donut" });
585
- });
586
- }
587
- const Ce = y(() => {
588
- const t = [
589
- ' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',
590
- O({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: F.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
591
- "100%"
592
- ], o = Z.value.head.map((i, c) => [
593
- {
594
- color: i.color,
595
- name: i.name || "-"
596
- },
597
- Z.value.body[c],
598
- isNaN(Z.value.body[c] / F.value) ? "-" : (Z.value.body[c] / F.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
599
- ]), l = {
600
- th: {
601
- backgroundColor: e.value.table.th.backgroundColor,
602
- color: e.value.table.th.color,
603
- outline: e.value.table.th.outline
604
- },
605
- td: {
606
- backgroundColor: e.value.table.td.backgroundColor,
607
- color: e.value.table.td.color,
608
- outline: e.value.table.td.outline
609
- },
610
- breakpoint: e.value.table.responsiveBreakpoint
611
- };
612
- return {
613
- colNames: [
614
- e.value.table.columnNames.series,
615
- e.value.table.columnNames.value,
616
- e.value.table.columnNames.percentage
617
- ],
618
- head: t,
619
- body: o,
620
- config: l
621
- };
622
- }), ne = g(!1);
623
- function wt(t) {
624
- ne.value = t, nt.value += 1;
625
- }
626
- const kt = y(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent));
627
- function il(t) {
628
- return t.toFixed(e.value.style.chart.legend.roundingPercentage).split("").map((o) => "-").join("");
629
- }
630
- function J(t, o) {
631
- e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: t.seriesIndex }), gt("selectDatapoint", { datapoint: t, index: o });
632
- }
633
- function xt() {
634
- p.value.showTable = !p.value.showTable;
635
- }
636
- function _t() {
637
- p.value.dataLabels.show = !p.value.dataLabels.show;
638
- }
639
- function $t() {
640
- p.value.showTooltip = !p.value.showTooltip;
641
- }
642
- const Ae = g(!1);
643
- function Re() {
644
- Ae.value = !Ae.value;
645
- }
646
- async function vl({ scale: t = 2 } = {}) {
647
- if (!D.value) return;
648
- const { width: o, height: l } = D.value.getBoundingClientRect(), a = o / l, { imageUri: i, base64: c } = await jl({ domElement: D.value, base64: !0, img: !0, scale: t });
649
- return {
650
- imageUri: i,
651
- base64: c,
652
- title: e.value.style.chart.title.text,
653
- width: o,
654
- height: l,
655
- aspectRatio: a
656
- };
657
- }
658
- function dl() {
659
- if (!ke.value) return;
660
- const { x: t, y: o, width: l, height: a } = ke.value.getBBox();
661
- le.value && le.value.setAttribute("viewBox", `${t} ${o} ${l + Math.min(0, t)} ${a + Math.min(0, o)}`);
662
- }
663
- const be = y(() => {
664
- const t = e.value.table.useDialog && !e.value.table.show, o = p.value.showTable;
665
- return {
666
- component: t ? Wt : Vt,
667
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
668
- props: t ? {
669
- backgroundColor: e.value.table.th.backgroundColor,
670
- color: e.value.table.th.color,
671
- headerColor: e.value.table.th.color,
672
- headerBg: e.value.table.th.backgroundColor,
673
- isFullscreen: ne.value,
674
- fullscreenParent: D.value,
675
- forcedWidth: Math.min(500, window.innerWidth * 0.8)
676
- } : {
677
- hideDetails: !0,
678
- config: {
679
- open: o,
680
- maxHeight: 1e4,
681
- body: {
682
- backgroundColor: e.value.style.chart.backgroundColor,
683
- color: e.value.style.chart.color
684
- },
685
- head: {
686
- backgroundColor: e.value.style.chart.backgroundColor,
687
- color: e.value.style.chart.color
688
- }
689
- }
690
- }
691
- };
692
- });
693
- fe(() => p.value.showTable, (t) => {
694
- e.value.table.show || (t && e.value.table.useDialog && pe.value ? pe.value.open() : "close" in pe.value && pe.value.close());
695
- });
696
- function Ct() {
697
- p.value.showTable = !1, Fe.value && Fe.value.setTableIconState(!1);
698
- }
699
- const cl = y(() => Ye.value.map((t) => ({
700
- ...t,
701
- name: t.display
702
- }))), hl = y(() => e.value.style.chart.backgroundColor), yl = y(() => e.value.style.chart.legend), fl = y(() => e.value.style.chart.title), { exportSvg: gl, getSvg: pl } = Wl({
703
- svg: le,
704
- title: fl,
705
- legend: yl,
706
- legendItems: cl,
707
- backgroundColor: hl
708
- });
709
- async function At({ isCb: t }) {
710
- if (t) {
711
- const { blob: o, url: l, text: a, dataUrl: i } = await pl();
712
- e.value.userOptions.callbacks.svg({ blob: o, url: l, text: a, dataUrl: i });
713
- } else
714
- gl();
715
- }
716
- return Nt({
717
- autoSize: dl,
718
- getData: ll,
719
- getImage: vl,
720
- generatePdf: ht,
721
- generateCsv: Ee,
722
- generateImage: yt,
723
- generateSvg: At,
724
- toggleTable: xt,
725
- toggleLabels: _t,
726
- toggleTooltip: $t,
727
- toggleAnnotator: Re,
728
- toggleFullscreen: wt
729
- }), (t, o) => (n(), r("div", {
730
- ref_key: "donutChart",
731
- ref: D,
732
- class: Ue(`vue-data-ui-component vue-ui-donut ${ne.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
733
- style: $(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height:100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
734
- id: `donut__${f.value}`,
735
- onMouseenter: Kt,
736
- onMouseleave: el
737
- }, [
738
- e.value.userOptions.buttons.annotator && u(le) ? (n(), te(u(Rt), {
739
- key: 0,
740
- color: e.value.style.chart.color,
741
- backgroundColor: e.value.style.chart.backgroundColor,
742
- active: Ae.value,
743
- svgRef: u(le),
744
- onClose: Re
745
- }, null, 8, ["color", "backgroundColor", "active", "svgRef"])) : v("", !0),
746
- b(t.$slots, "userConfig", {}, void 0, !0),
747
- tl.value ? (n(), r("div", {
748
- key: 1,
749
- ref_key: "noTitle",
750
- ref: et,
751
- class: "vue-data-ui-no-title-space",
752
- style: "height:36px; width: 100%;background:transparent"
753
- }, null, 512)) : v("", !0),
754
- e.value.style.chart.title.text ? (n(), r("div", {
755
- key: 2,
756
- ref_key: "chartTitle",
757
- ref: Ze,
758
- style: "width:100%;background:transparent;padding-bottom:24px"
759
- }, [
760
- (n(), te(Zl, {
761
- key: `title_${tt.value}`,
762
- config: {
763
- title: {
764
- cy: "donut-div-title",
765
- ...e.value.style.chart.title
766
- },
767
- subtitle: {
768
- cy: "donut-div-subtitle",
769
- ...e.value.style.chart.title.subtitle
770
- }
771
- }
772
- }, null, 8, ["config"]))
773
- ], 512)) : v("", !0),
774
- h("div", {
775
- id: `legend-top-${f.value}`
776
- }, null, 8, la),
777
- e.value.userOptions.show && we.value && (u(it) || u(Ne)) ? (n(), te(u(Gt), {
778
- ref_key: "userOptionsRef",
779
- ref: Fe,
780
- key: `user_option_${nt.value}`,
781
- backgroundColor: e.value.style.chart.backgroundColor,
782
- color: e.value.style.chart.color,
783
- isPrinting: u(dt),
784
- isImaging: u(ct),
785
- uid: f.value,
786
- hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
787
- hasPdf: e.value.userOptions.buttons.pdf,
788
- hasImg: e.value.userOptions.buttons.img,
789
- hasSvg: e.value.userOptions.buttons.svg,
790
- hasXls: e.value.userOptions.buttons.csv,
791
- hasTable: e.value.userOptions.buttons.table,
792
- hasLabel: e.value.userOptions.buttons.labels,
793
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
794
- isFullscreen: ne.value,
795
- chartElement: D.value,
796
- position: e.value.userOptions.position,
797
- callbacks: e.value.userOptions.callbacks,
798
- isTooltip: p.value.showTooltip,
799
- titles: { ...e.value.userOptions.buttonTitles },
800
- hasAnnotator: e.value.userOptions.buttons.annotator,
801
- isAnnotation: Ae.value,
802
- printScale: e.value.userOptions.print.scale,
803
- tableDialog: e.value.table.useDialog,
804
- onToggleFullscreen: wt,
805
- onGeneratePdf: u(ht),
806
- onGenerateCsv: Ee,
807
- onGenerateImage: u(yt),
808
- onGenerateSvg: At,
809
- onToggleTable: xt,
810
- onToggleLabels: _t,
811
- onToggleTooltip: $t,
812
- onToggleAnnotator: Re,
813
- style: $({ visibility: u(it) ? u(Ne) ? "visible" : "hidden" : "visible" })
814
- }, We({ _: 2 }, [
815
- t.$slots.menuIcon ? {
816
- name: "menuIcon",
817
- fn: C(({ isOpen: l, color: a }) => [
818
- b(t.$slots, "menuIcon", ue(re({ isOpen: l, color: a })), void 0, !0)
819
- ]),
820
- key: "0"
821
- } : void 0,
822
- t.$slots.optionTooltip ? {
823
- name: "optionTooltip",
824
- fn: C(() => [
825
- b(t.$slots, "optionTooltip", {}, void 0, !0)
826
- ]),
827
- key: "1"
828
- } : void 0,
829
- t.$slots.optionPdf ? {
830
- name: "optionPdf",
831
- fn: C(() => [
832
- b(t.$slots, "optionPdf", {}, void 0, !0)
833
- ]),
834
- key: "2"
835
- } : void 0,
836
- t.$slots.optionCsv ? {
837
- name: "optionCsv",
838
- fn: C(() => [
839
- b(t.$slots, "optionCsv", {}, void 0, !0)
840
- ]),
841
- key: "3"
842
- } : void 0,
843
- t.$slots.optionImg ? {
844
- name: "optionImg",
845
- fn: C(() => [
846
- b(t.$slots, "optionImg", {}, void 0, !0)
847
- ]),
848
- key: "4"
849
- } : void 0,
850
- t.$slots.optionSvg ? {
851
- name: "optionSvg",
852
- fn: C(() => [
853
- b(t.$slots, "optionSvg", {}, void 0, !0)
854
- ]),
855
- key: "5"
856
- } : void 0,
857
- t.$slots.optionTable ? {
858
- name: "optionTable",
859
- fn: C(() => [
860
- b(t.$slots, "optionTable", {}, void 0, !0)
861
- ]),
862
- key: "6"
863
- } : void 0,
864
- t.$slots.optionLabels ? {
865
- name: "optionLabels",
866
- fn: C(() => [
867
- b(t.$slots, "optionLabels", {}, void 0, !0)
868
- ]),
869
- key: "7"
870
- } : void 0,
871
- t.$slots.optionFullscreen ? {
872
- name: "optionFullscreen",
873
- fn: C(({ toggleFullscreen: l, isFullscreen: a }) => [
874
- b(t.$slots, "optionFullscreen", ue(re({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
875
- ]),
876
- key: "8"
877
- } : void 0,
878
- t.$slots.optionAnnotator ? {
879
- name: "optionAnnotator",
880
- fn: C(({ toggleAnnotator: l, isAnnotator: a }) => [
881
- b(t.$slots, "optionAnnotator", ue(re({ toggleAnnotator: l, isAnnotator: a })), void 0, !0)
882
- ]),
883
- key: "9"
884
- } : void 0
885
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "chartElement", "position", "callbacks", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : v("", !0),
886
- (n(), r("svg", {
887
- ref_key: "svgRef",
888
- ref: le,
889
- xmlns: u(Il),
890
- class: Ue({ "vue-data-ui-fullscreen--on": ne.value, "vue-data-ui-fulscreen--off": !ne.value, "vue-data-ui-svg": !0 }),
891
- viewBox: `0 0 ${s.value.width <= 0 ? 10 : s.value.width} ${s.value.height <= 0 ? 10 : s.value.height}`,
892
- style: $(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};${vt.value.css}`)
893
- }, [
894
- h("g", {
895
- ref_key: "G",
896
- ref: ke,
897
- class: "vue-data-ui-g"
898
- }, [
899
- Se(u(Ut)),
900
- t.$slots["chart-background"] ? (n(), r("foreignObject", {
901
- key: 0,
902
- x: 0,
903
- y: 0,
904
- width: s.value.width <= 0 ? 10 : s.value.width,
905
- height: s.value.height <= 0 ? 10 : s.value.height,
906
- style: {
907
- pointerEvents: "none"
908
- }
909
- }, [
910
- b(t.$slots, "chart-background", {}, void 0, !0)
911
- ], 8, oa)) : v("", !0),
912
- e.value.type === "classic" && !isNaN(ae.value / _.value) ? (n(), r("defs", sa, [
913
- e.value.style.chart.useGradient ? (n(), r("radialGradient", {
914
- key: 0,
915
- id: `gradient_${f.value}`
916
- }, [
917
- h("stop", {
918
- offset: "0%",
919
- "stop-color": u(Pe)(e.value.style.chart.backgroundColor, 0),
920
- "stop-opacity": "0"
921
- }, null, 8, ua),
922
- h("stop", {
923
- offset: `${(1 - ae.value / _.value) * 100}%`,
924
- "stop-color": u(Pe)("#FFFFFF", 0),
925
- "stop-opacity": "0"
926
- }, null, 8, ra),
927
- h("stop", {
928
- offset: `${(1 - ae.value / _.value / 2) * 100}%`,
929
- "stop-color": u(Pe)("#FFFFFF", e.value.style.chart.gradientIntensity)
930
- }, null, 8, ia),
931
- h("stop", {
932
- offset: "100%",
933
- "stop-color": u(Pe)(e.value.style.chart.backgroundColor, 0),
934
- "stop-opacity": "0"
935
- }, null, 8, va)
936
- ], 8, na)) : v("", !0)
937
- ])) : v("", !0),
938
- e.value.type === "polar" ? (n(), r("defs", da, [
939
- (n(!0), r(w, null, L(d.value, (l, a) => (n(), r("radialGradient", {
940
- id: `polar_gradient_${a}_${f.value}`,
941
- cx: (isNaN(l.middlePoint.x / s.value.width * 100) ? 0 : l.middlePoint.x / s.value.width * 100) + "%",
942
- cy: (isNaN(l.middlePoint.y / s.value.height * 100) ? 0 : l.middlePoint.y / s.value.height * 100) + "%",
943
- r: "62%"
944
- }, [
945
- h("stop", {
946
- offset: "0%",
947
- "stop-color": u(Ml)(T.value[a].color, 0.05),
948
- "stop-opacity": e.value.style.chart.gradientIntensity / 100
949
- }, null, 8, ha),
950
- h("stop", {
951
- offset: "100%",
952
- "stop-color": T.value[a].color
953
- }, null, 8, ya)
954
- ], 8, ca))), 256))
955
- ])) : v("", !0),
956
- h("defs", null, [
957
- h("filter", {
958
- id: `blur_${f.value}`,
959
- x: "-50%",
960
- y: "-50%",
961
- width: "200%",
962
- height: "200%"
963
- }, [
964
- h("feGaussianBlur", {
965
- in: "SourceGraphic",
966
- stdDeviation: 2,
967
- id: `blur_std_${f.value}`
968
- }, null, 8, ga),
969
- o[5] || (o[5] = h("feColorMatrix", {
970
- type: "saturate",
971
- values: "0"
972
- }, null, -1))
973
- ], 8, fa),
974
- h("filter", {
975
- id: `shadow_${f.value}`,
976
- "color-interpolation-filters": "sRGB"
977
- }, [
978
- h("feDropShadow", {
979
- dx: "0",
980
- dy: "0",
981
- stdDeviation: "10",
982
- "flood-opacity": "0.5",
983
- "flood-color": e.value.style.chart.layout.donut.shadowColor
984
- }, null, 8, ma)
985
- ], 8, pa),
986
- h("filter", {
987
- id: `drop_shadow_${f.value}`,
988
- "color-interpolation-filters": "sRGB",
989
- x: "-50%",
990
- y: "-50%",
991
- width: "200%",
992
- height: "200%"
993
- }, [
994
- h("feDropShadow", {
995
- dx: "0",
996
- dy: "0",
997
- stdDeviation: "3",
998
- "flood-opacity": "1",
999
- "flood-color": e.value.style.chart.layout.donut.shadowColor
1000
- }, null, 8, wa)
1001
- ], 8, ba)
1002
- ]),
1003
- e.value.type === "classic" ? (n(!0), r(w, { key: 3 }, L(T.value.filter((l) => !l.ghost), (l, a) => (n(), r("g", null, [
1004
- X(l) && p.value.dataLabels.show ? (n(), r("path", {
1005
- key: 0,
1006
- d: u(zl)(l, { x: s.value.width / 2, y: s.value.height / 2 }, 16, 16, !1, !1, ae.value, 12, e.value.style.chart.layout.curvedMarkers),
1007
- stroke: l.color,
1008
- "stroke-width": "1",
1009
- "stroke-linecap": "round",
1010
- "stroke-linejoin": "round",
1011
- fill: "none",
1012
- filter: se(a)
1013
- }, null, 8, ka)) : v("", !0)
1014
- ]))), 256)) : v("", !0),
1015
- e.value.type === "polar" ? (n(!0), r(w, { key: 4 }, L(T.value.filter((l) => !l.ghost), (l, a) => (n(), r("g", null, [
1016
- X(l) && p.value.dataLabels.show ? (n(), r("path", {
1017
- key: 0,
1018
- d: `M ${u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 24, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x},${u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 24, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y} ${d.value[a].middlePoint.x},${d.value[a].middlePoint.y}`,
1019
- stroke: l.color,
1020
- "stroke-width": "1",
1021
- "stroke-linecap": "round",
1022
- "stroke-linejoin": "round",
1023
- fill: "none",
1024
- filter: se(a),
1025
- style: $({
1026
- transition: S.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1027
- })
1028
- }, null, 12, xa)) : v("", !0)
1029
- ]))), 256)) : v("", !0),
1030
- e.value.type === "classic" && e.value.style.chart.layout.donut.useShadow ? (n(), r("circle", {
1031
- key: 5,
1032
- cx: s.value.width / 2,
1033
- cy: s.value.height / 2,
1034
- r: _.value <= 0 ? 10 : _.value,
1035
- fill: e.value.style.chart.backgroundColor,
1036
- filter: `url(#shadow_${f.value})`
1037
- }, null, 8, _a)) : v("", !0),
1038
- t.$slots.pattern ? (n(), r("g", $a, [
1039
- (n(!0), r(w, null, L(Qe.dataset, (l, a) => (n(), r("defs", {
1040
- key: `pattern-${l.patternIndex}`
1041
- }, [
1042
- b(t.$slots, "pattern", qe({ ref_for: !0 }, { seriesIndex: a, patternId: `pattern_${f.value}_${a}` }), void 0, !0)
1043
- ]))), 128))
1044
- ])) : v("", !0),
1045
- F.value && e.value.type === "classic" ? (n(), r(w, { key: 7 }, [
1046
- (n(!0), r(w, null, L(Y.value, (l, a) => (n(), r("path", {
1047
- stroke: e.value.style.chart.backgroundColor,
1048
- d: l.arcSlice,
1049
- fill: "#FFFFFF"
1050
- }, null, 8, Ca))), 256)),
1051
- (n(!0), r(w, null, L(Y.value, (l, a) => (n(), r("path", {
1052
- class: "vue-ui-donut-arc-path",
1053
- d: l.arcSlice,
1054
- fill: l.color,
1055
- stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1056
- "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1057
- filter: se(a)
1058
- }, null, 8, Aa))), 256)),
1059
- t.$slots.pattern ? (n(), r("g", Sa, [
1060
- (n(!0), r(w, null, L(Y.value, (l, a) => (n(), r("path", {
1061
- class: "vue-ui-donut-arc-path",
1062
- d: l.arcSlice,
1063
- fill: `url(#${l.pattern})`,
1064
- stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1065
- "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1066
- filter: se(a)
1067
- }, null, 8, Ta))), 256))
1068
- ])) : v("", !0)
1069
- ], 64)) : v("", !0),
1070
- F.value && e.value.type === "polar" ? (n(), r(w, { key: 8 }, [
1071
- T.value.length > 1 ? (n(), r("g", Pa, [
1072
- (n(!0), r(w, null, L(Y.value, (l, a) => (n(), r("path", {
1073
- stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1074
- d: d.value[a].path,
1075
- fill: "#FFFFFF",
1076
- style: $({
1077
- transition: S.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1078
- })
1079
- }, null, 12, Fa))), 256)),
1080
- e.value.style.chart.layout.donut.useShadow ? (n(), r("g", La, [
1081
- (n(!0), r(w, null, L(Y.value, (l, a) => (n(), r("path", {
1082
- class: "vue-ui-donut-arc-path",
1083
- d: d.value[a].path,
1084
- fill: "transparent",
1085
- stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1086
- "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1087
- filter: `url(#drop_shadow_${f.value})`,
1088
- style: $({
1089
- transition: S.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1090
- })
1091
- }, null, 12, Ia))), 256))
1092
- ])) : v("", !0),
1093
- t.$slots.pattern ? (n(), r("g", Ma, [
1094
- (n(!0), r(w, null, L(Y.value, (l, a) => (n(), r("path", {
1095
- class: "vue-ui-donut-arc-path",
1096
- d: d.value[a].path,
1097
- fill: `url(#${l.pattern})`,
1098
- stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1099
- "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1100
- filter: se(a),
1101
- style: $({
1102
- transition: S.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1103
- transformOrigin: "center"
1104
- })
1105
- }, null, 12, za))), 256))
1106
- ])) : v("", !0),
1107
- (n(!0), r(w, null, L(Y.value, (l, a) => (n(), r("path", {
1108
- class: "vue-ui-donut-arc-path",
1109
- d: d.value[a].path,
1110
- fill: e.value.style.chart.useGradient ? `url(#polar_gradient_${a}_${f.value})` : l.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
- filter: se(a),
1114
- style: $({
1115
- transition: S.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1116
- })
1117
- }, null, 12, Oa))), 256))
1118
- ])) : (n(), r("g", Da, [
1119
- t.$slots.pattern ? (n(), r("circle", {
1120
- key: 0,
1121
- cx: s.value.width / 2,
1122
- cy: s.value.height / 2,
1123
- r: _.value,
1124
- fill: `url(#pattern_${f.value}_${T.value[0].patternIndex})`,
1125
- stroke: e.value.style.chart.backgroundColor,
1126
- "stroke-width": e.value.style.chart.layout.donut.borderWidth
1127
- }, null, 8, Na)) : v("", !0),
1128
- h("circle", {
1129
- cx: s.value.width / 2,
1130
- cy: s.value.height / 2,
1131
- r: _.value,
1132
- fill: e.value.style.chart.useGradient ? `url(#polar_gradient_0_${f.value})` : T.value[0].color,
1133
- stroke: e.value.style.chart.backgroundColor,
1134
- "stroke-width": e.value.style.chart.layout.donut.borderWidth
1135
- }, null, 8, Ya)
1136
- ]))
1137
- ], 64)) : (n(), r(w, { key: 9 }, [
1138
- e.value.type === "classic" && !sl.value ? (n(), r("g", Xa, [
1139
- (n(!0), r(w, null, L(nl.value, (l, a) => (n(), r("path", {
1140
- class: "vue-ui-donut-arc-path",
1141
- d: l.arcSlice,
1142
- fill: l.color,
1143
- stroke: e.value.style.chart.backgroundColor,
1144
- "stroke-width": e.value.style.chart.layout.donut.borderWidth
1145
- }, null, 8, Ba))), 256))
1146
- ])) : v("", !0),
1147
- h("circle", {
1148
- cx: s.value.width / 2,
1149
- cy: s.value.height / 2,
1150
- r: _.value <= 0 ? 10 : _.value,
1151
- fill: "transparent",
1152
- stroke: e.value.style.chart.backgroundColor
1153
- }, null, 8, Va)
1154
- ], 64)),
1155
- e.value.style.chart.useGradient && e.value.type === "classic" ? (n(), r("circle", {
1156
- key: 10,
1157
- cx: s.value.width / 2,
1158
- cy: s.value.height / 2,
1159
- r: (
1160
- /* This might require adjustments */
1161
- _.value <= 0 ? 10 : _.value
1162
- ),
1163
- fill: `url(#gradient_${f.value})`
1164
- }, null, 8, Ea)) : v("", !0),
1165
- h("circle", {
1166
- ref_key: "circle_hollow",
1167
- ref: Qt,
1168
- style: { pointerEvents: "none" },
1169
- fill: "none",
1170
- cx: s.value.width / 2,
1171
- cy: s.value.height / 2,
1172
- r: Math.max(0.1, ae.value * 1.7)
1173
- }, null, 8, Ra),
1174
- F.value ? (n(), r(w, { key: 11 }, [
1175
- T.value.length > 1 || e.value.type === "classic" ? (n(), r("g", Ga, [
1176
- (n(!0), r(w, null, L(T.value.filter((l) => !l.ghost), (l, a) => (n(), r("path", {
1177
- d: e.value.type === "classic" ? l.arcSlice : d.value[a].path,
1178
- stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1179
- fill: N.value === a ? e.value.style.chart.layout.donut.selectedColor : "transparent",
1180
- onMouseenter: (i) => ye({
1181
- datapoint: l,
1182
- relativeIndex: a,
1183
- seriesIndex: l.seriesIndex,
1184
- show: !0
1185
- }),
1186
- onMouseleave: (i) => he({ datapoint: l, seriesIndex: l.seriesIndex }),
1187
- onClick: (i) => J(l, a)
1188
- }, null, 40, Ua))), 256))
1189
- ])) : (n(), r("g", Wa, [
1190
- h("circle", {
1191
- cx: s.value.width / 2,
1192
- cy: s.value.height / 2,
1193
- r: _.value,
1194
- fill: "transparent",
1195
- onMouseenter: o[0] || (o[0] = (l) => ye({
1196
- datapoint: T.value[0],
1197
- relativeIndex: 0,
1198
- seriesIndex: T.value[0].seriesIndex,
1199
- show: !0
1200
- })),
1201
- onMouseleave: o[1] || (o[1] = (l) => he({ datapoint: T.value[0], seriesIndex: T.value[0].seriesIndex })),
1202
- onClick: o[2] || (o[2] = (l) => J(T.value[0], t.i))
1203
- }, null, 40, qa)
1204
- ]))
1205
- ], 64)) : v("", !0),
1206
- e.value.type === "classic" ? (n(), r("g", {
1207
- key: 12,
1208
- ref_key: "G_hollow",
1209
- ref: jt,
1210
- class: "vue-data-ui-donut-hollow-labels"
1211
- }, [
1212
- e.value.style.chart.layout.labels.hollow.total.show ? (n(), r("text", {
1213
- key: 0,
1214
- "text-anchor": "middle",
1215
- x: s.value.width / 2,
1216
- y: s.value.height / 2 - (e.value.style.chart.layout.labels.hollow.average.show ? e.value.style.chart.layout.labels.hollow.total.fontSize : 0) + e.value.style.chart.layout.labels.hollow.total.offsetY,
1217
- fill: e.value.style.chart.layout.labels.hollow.total.color,
1218
- "font-size": e.value.style.chart.layout.labels.hollow.total.fontSize,
1219
- style: $(`font-weight:${e.value.style.chart.layout.labels.hollow.total.bold ? "bold" : ""}`)
1220
- }, V(e.value.style.chart.layout.labels.hollow.total.text), 13, Ha)) : v("", !0),
1221
- e.value.style.chart.layout.labels.hollow.total.show ? (n(), r("text", {
1222
- key: 1,
1223
- "text-anchor": "middle",
1224
- x: s.value.width / 2,
1225
- y: s.value.height / 2 + e.value.style.chart.layout.labels.hollow.total.fontSize - (e.value.style.chart.layout.labels.hollow.average.show ? e.value.style.chart.layout.labels.hollow.total.fontSize : 0) + e.value.style.chart.layout.labels.hollow.total.value.offsetY,
1226
- fill: e.value.style.chart.layout.labels.hollow.total.value.color,
1227
- "font-size": e.value.style.chart.layout.labels.hollow.total.value.fontSize,
1228
- style: $(`font-weight:${e.value.style.chart.layout.labels.hollow.total.value.bold ? "bold" : ""}`)
1229
- }, V(u(E)(
1230
- e.value.style.chart.layout.labels.hollow.total.value.formatter,
1231
- F.value,
1232
- u(O)({
1233
- p: e.value.style.chart.layout.labels.hollow.total.value.prefix,
1234
- v: F.value,
1235
- s: e.value.style.chart.layout.labels.hollow.total.value.suffix
1236
- })
1237
- )), 13, ja)) : v("", !0),
1238
- e.value.style.chart.layout.labels.hollow.average.show ? (n(), r("text", {
1239
- key: 2,
1240
- "text-anchor": "middle",
1241
- x: s.value.width / 2,
1242
- y: s.value.height / 2 + (e.value.style.chart.layout.labels.hollow.total.show ? e.value.style.chart.layout.labels.hollow.average.fontSize : 0) + e.value.style.chart.layout.labels.hollow.average.offsetY,
1243
- fill: e.value.style.chart.layout.labels.hollow.average.color,
1244
- "font-size": e.value.style.chart.layout.labels.hollow.average.fontSize,
1245
- style: $(`font-weight:${e.value.style.chart.layout.labels.hollow.average.bold ? "bold" : ""}`)
1246
- }, V(e.value.style.chart.layout.labels.hollow.average.text), 13, Qa)) : v("", !0),
1247
- e.value.style.chart.layout.labels.hollow.average.show ? (n(), r("text", {
1248
- key: 3,
1249
- "text-anchor": "middle",
1250
- x: s.value.width / 2,
1251
- y: s.value.height / 2 + (e.value.style.chart.layout.labels.hollow.total.show ? e.value.style.chart.layout.labels.hollow.average.fontSize : 0) + e.value.style.chart.layout.labels.hollow.average.fontSize + e.value.style.chart.layout.labels.hollow.average.value.offsetY,
1252
- fill: e.value.style.chart.layout.labels.hollow.average.value.color,
1253
- "font-size": e.value.style.chart.layout.labels.hollow.average.value.fontSize,
1254
- style: $(`font-weight:${e.value.style.chart.layout.labels.hollow.average.value.bold ? "bold" : ""}`)
1255
- }, V(oe.value || S.value ? "--" : u(E)(
1256
- e.value.style.chart.layout.labels.hollow.average.value.formatter,
1257
- Be.value,
1258
- u(O)({
1259
- p: e.value.style.chart.layout.labels.hollow.average.value.prefix,
1260
- v: Be.value,
1261
- s: e.value.style.chart.layout.labels.hollow.average.value.suffix,
1262
- r: e.value.style.chart.layout.labels.hollow.average.value.rounding
1263
- })
1264
- )), 13, Za)) : v("", !0)
1265
- ], 512)) : v("", !0),
1266
- (n(!0), r(w, null, L(Y.value.filter((l) => !l.ghost), (l, a) => (n(), r("g", {
1267
- filter: se(a),
1268
- class: Ue({ animated: e.value.useCssAnimation }),
1269
- key: l.seriesIndex
1270
- }, [
1271
- e.value.style.chart.layout.labels.dataLabels.useLabelSlots ? (n(), r("g", Ka, [
1272
- (n(), r("foreignObject", {
1273
- x: u(x)(l, !0).anchor === "end" ? u(x)(l).x - 120 : u(x)(l, !0).anchor === "middle" ? u(x)(l).x - 60 : u(x)(l).x,
1274
- y: u(ge)(l) - (kt.value ? 20 : 0),
1275
- width: "120",
1276
- height: "60",
1277
- style: { overflow: "visible" }
1278
- }, [
1279
- h("div", null, [
1280
- b(t.$slots, "dataLabel", qe({ ref_for: !0 }, {
1281
- datapoint: l,
1282
- isBlur: !e.value.useBlurOnHover || [null, void 0].includes(N.value) || N.value === a,
1283
- isSafari: kt.value,
1284
- isVisible: X(l) && p.value.dataLabels.show,
1285
- textAlign: u(x)(l, !0, 16, !0).anchor,
1286
- flexAlign: u(x)(l, !0, 16).anchor,
1287
- percentage: Xe(l, Y.value)
1288
- }), void 0, !0)
1289
- ])
1290
- ], 8, eo))
1291
- ])) : (n(), r("g", to, [
1292
- e.value.type === "classic" ? (n(), r(w, { key: 0 }, [
1293
- X(l) && p.value.dataLabels.show ? (n(), r("circle", {
1294
- key: 0,
1295
- cx: u(x)(l).x,
1296
- cy: u(ge)(l) - 3.5,
1297
- fill: l.color,
1298
- stroke: e.value.style.chart.backgroundColor,
1299
- "stroke-width": 1,
1300
- r: 3,
1301
- filter: !e.value.useBlurOnHover || [null, void 0].includes(N.value) || N.value === a ? "" : `url(#blur_${f.value})`,
1302
- onClick: (i) => J(l, a),
1303
- onMouseenter: (i) => ye({
1304
- datapoint: l,
1305
- relativeIndex: a,
1306
- seriesIndex: l.seriesIndex,
1307
- show: !0
1308
- }),
1309
- onMouseleave: (i) => he({ datapoint: l, seriesIndex: l.seriesIndex })
1310
- }, null, 40, lo)) : v("", !0)
1311
- ], 64)) : v("", !0),
1312
- e.value.type === "polar" ? (n(), r(w, { key: 1 }, [
1313
- X(l) && p.value.dataLabels.show ? (n(), r("circle", {
1314
- key: 0,
1315
- cx: u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 24, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x,
1316
- cy: u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 24, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y,
1317
- fill: l.color,
1318
- stroke: e.value.style.chart.backgroundColor,
1319
- "stroke-width": 1,
1320
- r: 3,
1321
- filter: !e.value.useBlurOnHover || [null, void 0].includes(N.value) || N.value === a ? "" : `url(#blur_${f.value})`,
1322
- onClick: (i) => J(l, a),
1323
- onMouseenter: (i) => ye({
1324
- datapoint: l,
1325
- relativeIndex: a,
1326
- seriesIndex: l.seriesIndex,
1327
- show: !0
1328
- }),
1329
- onMouseleave: (i) => he({ datapoint: l, seriesIndex: l.seriesIndex }),
1330
- style: $({
1331
- transition: S.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1332
- })
1333
- }, null, 44, ao)) : v("", !0)
1334
- ], 64)) : v("", !0),
1335
- e.value.type === "classic" ? (n(), r(w, { key: 2 }, [
1336
- Pt(h("text", {
1337
- class: "vue-data-ui-datalabel-value",
1338
- "text-anchor": u(x)(l, !0, 12).anchor,
1339
- x: u(x)(l, !0, 12).x,
1340
- y: u(ge)(l),
1341
- fill: e.value.style.chart.layout.labels.percentage.color,
1342
- "font-size": xe.value + "px",
1343
- style: $(`font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}`),
1344
- onClick: (i) => J(l, a),
1345
- onMouseenter: (i) => ye({
1346
- datapoint: l,
1347
- relativeIndex: a,
1348
- seriesIndex: l.seriesIndex,
1349
- show: !0
1350
- }),
1351
- onMouseleave: (i) => he({ datapoint: l, seriesIndex: l.seriesIndex })
1352
- }, V(Xe(l, Y.value)) + " " + V(e.value.style.chart.layout.labels.value.show ? `(${u(E)(
1353
- e.value.style.chart.layout.labels.value.formatter,
1354
- l.value,
1355
- u(O)({
1356
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
1357
- v: l.value,
1358
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
1359
- r: e.value.style.chart.layout.labels.value.rounding
1360
- }),
1361
- { datapoint: l }
1362
- )})` : ""), 45, oo), [
1363
- [Ft, X(l) && p.value.dataLabels.show]
1364
- ]),
1365
- Pt(h("text", {
1366
- class: "vue-data-ui-datalabel-name",
1367
- "text-anchor": u(x)(l).anchor,
1368
- x: u(x)(l, !0, 12).x,
1369
- y: u(ge)(l) + Q.value * 1.2,
1370
- fill: e.value.style.chart.layout.labels.name.color,
1371
- "font-size": Q.value + "px",
1372
- style: $(`font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}`),
1373
- onClick: (i) => J(l, a),
1374
- innerHTML: u(zt)({
1375
- content: l.name,
1376
- fontSize: Q.value,
1377
- fill: e.value.style.chart.layout.labels.name.color,
1378
- x: u(x)(l, !0, 12).x,
1379
- y: u(ge)(l) + Q.value
1380
- })
1381
- }, null, 12, so), [
1382
- [Ft, X(l) && p.value.dataLabels.show]
1383
- ]),
1384
- o[6] || (o[6] = Te(' @mouseenter="useTooltip({ datapoint: arc, relativeIndex: i, seriesIndex: arc.seriesIndex, show: true })" @mouseleave="handleDatapointLeave({ datapoint: arc, seriesIndex: arc.seriesIndex })" /> ', -1))
1385
- ], 64)) : v("", !0),
1386
- e.value.type === "polar" ? (n(), r(w, { key: 3 }, [
1387
- X(l) && p.value.dataLabels.show ? (n(), r("text", {
1388
- key: 0,
1389
- class: "vue-data-ui-datalabel-value",
1390
- "text-anchor": ce(d.value[a].middlePoint),
1391
- x: u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x,
1392
- y: u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y,
1393
- fill: e.value.style.chart.layout.labels.percentage.color,
1394
- "font-size": xe.value,
1395
- style: $({
1396
- transition: S.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1397
- fontWeight: e.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"
1398
- }),
1399
- onClick: (i) => J(l, a),
1400
- onMouseenter: (i) => ye({
1401
- datapoint: l,
1402
- relativeIndex: a,
1403
- seriesIndex: l.seriesIndex,
1404
- show: !0
1405
- }),
1406
- onMouseleave: (i) => he({ datapoint: l, seriesIndex: l.seriesIndex })
1407
- }, V(Xe(l, Y.value)) + " " + V(e.value.style.chart.layout.labels.value.show ? `(${u(E)(
1408
- e.value.style.chart.layout.labels.value.formatter,
1409
- l.value,
1410
- u(O)({
1411
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
1412
- v: l.value,
1413
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
1414
- r: e.value.style.chart.layout.labels.value.rounding
1415
- }),
1416
- { datapoint: l }
1417
- )})` : ""), 45, no)) : v("", !0),
1418
- X(l) && p.value.dataLabels.show ? (n(), r("text", {
1419
- key: 1,
1420
- class: "vue-data-ui-datalabel-name",
1421
- "text-anchor": ce(d.value[a].middlePoint),
1422
- x: u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x,
1423
- y: u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y + Q.value * 1.2,
1424
- fill: e.value.style.chart.layout.labels.name.color,
1425
- "font-size": Q.value,
1426
- style: $({
1427
- transition: S.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1428
- fontWeight: e.value.style.chart.layout.labels.name.bold ? "bold" : "normal"
1429
- }),
1430
- onClick: (i) => J(l, a),
1431
- innerHTML: u(zt)({
1432
- content: l.name,
1433
- fontSize: xe.value,
1434
- fill: e.value.style.chart.layout.labels.name.color,
1435
- x: u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x,
1436
- y: u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y + Q.value * 1.2
1437
- })
1438
- }, null, 12, uo)) : v("", !0),
1439
- o[7] || (o[7] = Te(' @mouseenter="useTooltip({ datapoint: arc, relativeIndex: i, seriesIndex: arc.seriesIndex, show: true })" @mouseleave="handleDatapointLeave({ datapoint: arc, seriesIndex: arc.seriesIndex })" /> ', -1))
1440
- ], 64)) : v("", !0)
1441
- ])),
1442
- p.value.dataLabels.show && e.value.style.chart.comments.show && l.comment ? (n(), r("g", ro, [
1443
- X(l) && e.value.type === "classic" ? (n(), r("foreignObject", {
1444
- key: 0,
1445
- x: e.value.style.chart.comments.offsetX + (u(x)(l, !0).anchor === "end" ? u(x)(l).x - e.value.style.chart.comments.width : u(x)(l, !0).anchor === "middle" ? u(x)(l).x - e.value.style.chart.comments.width / 2 : u(x)(l).x),
1446
- y: u(ge)(l) + 24 + e.value.style.chart.comments.offsetY,
1447
- width: e.value.style.chart.comments.width,
1448
- height: "200",
1449
- style: { overflow: "visible", "pointer-events": "none" }
1450
- }, [
1451
- h("div", null, [
1452
- b(t.$slots, "plot-comment", {
1453
- plot: { ...l, textAlign: u(x)(l, !0, 16, !0).anchor, flexAlign: u(x)(l, !0, 16).anchor, isFirstLoad: S.value }
1454
- }, void 0, !0)
1455
- ])
1456
- ], 8, io)) : v("", !0),
1457
- X(l) && e.value.type === "polar" ? (n(), r("foreignObject", {
1458
- key: 1,
1459
- x: e.value.style.chart.comments.offsetX + (ce(d.value[a].middlePoint) === "end" ? u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x - e.value.style.chart.comments.width : ce(d.value[a].middlePoint) === "middle" ? u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x - e.value.style.chart.comments.width / 2 : u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x),
1460
- y: ul(d.value[a]) + e.value.style.chart.comments.offsetY,
1461
- width: e.value.style.chart.comments.width,
1462
- height: "200",
1463
- style: $({
1464
- transition: S.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1465
- overflow: "visible",
1466
- pointerEvents: "none"
1467
- })
1468
- }, [
1469
- h("div", null, [
1470
- b(t.$slots, "plot-comment", {
1471
- plot: { ...l, textAlign: ce(d.value[a].middlePoint), flexAlign: ce(d.value[a].middlePoint), isFirstLoad: S.value }
1472
- }, void 0, !0)
1473
- ])
1474
- ], 12, vo)) : v("", !0)
1475
- ])) : v("", !0)
1476
- ], 10, Ja))), 128)),
1477
- b(t.$slots, "svg", { svg: s.value }, void 0, !0)
1478
- ], 512)
1479
- ], 14, aa)),
1480
- t.$slots.watermark ? (n(), r("div", co, [
1481
- b(t.$slots, "watermark", ue(re({ isPrinting: u(dt) || u(ct) })), void 0, !0)
1482
- ])) : v("", !0),
1483
- h("div", {
1484
- id: `legend-bottom-${f.value}`
1485
- }, null, 8, ho),
1486
- ot.value ? (n(), te(_l, {
1487
- key: 5,
1488
- to: e.value.style.chart.legend.position === "top" ? `#legend-top-${f.value}` : `#legend-bottom-${f.value}`
1489
- }, [
1490
- h("div", {
1491
- ref_key: "chartLegend",
1492
- ref: Je
1493
- }, [
1494
- e.value.style.chart.legend.show ? (n(), te(Kl, {
1495
- key: `legend_${at.value}`,
1496
- legendSet: Ye.value,
1497
- config: ol.value,
1498
- onClickMarker: o[3] || (o[3] = ({ i: l }) => mt(l))
1499
- }, We({
1500
- item: C(({ legend: l, index: a }) => [
1501
- h("div", {
1502
- style: $(`opacity:${U.value.includes(a) ? 0.5 : 1}`),
1503
- onClick: (i) => l.segregate()
1504
- }, V(l.display), 13, yo)
1505
- ]),
1506
- _: 2
1507
- }, [
1508
- t.$slots.pattern ? {
1509
- name: "legend-pattern",
1510
- fn: C(({ legend: l, index: a }) => [
1511
- Se(Ql, {
1512
- shape: l.shape,
1513
- radius: 30,
1514
- stroke: "none",
1515
- plot: { x: 30, y: 30 },
1516
- fill: `url(#pattern_${f.value}_${a})`
1517
- }, null, 8, ["shape", "fill"])
1518
- ]),
1519
- key: "0"
1520
- } : void 0
1521
- ]), 1032, ["legendSet", "config"])) : v("", !0),
1522
- b(t.$slots, "legend", { legend: Ye.value }, void 0, !0)
1523
- ], 512)
1524
- ], 8, ["to"])) : v("", !0),
1525
- t.$slots.source ? (n(), r("div", {
1526
- key: 6,
1527
- ref_key: "source",
1528
- ref: Ke,
1529
- dir: "auto"
1530
- }, [
1531
- b(t.$slots, "source", {}, void 0, !0)
1532
- ], 512)) : v("", !0),
1533
- t.$slots.hollow ? (n(), r("div", fo, [
1534
- b(t.$slots, "hollow", ue(re({
1535
- total: F.value,
1536
- average: Be.value,
1537
- dataset: G.value
1538
- })), void 0, !0)
1539
- ])) : v("", !0),
1540
- Se(u(Xt), {
1541
- show: p.value.showTooltip && ze.value,
1542
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1543
- color: e.value.style.chart.tooltip.color,
1544
- fontSize: e.value.style.chart.tooltip.fontSize,
1545
- borderRadius: e.value.style.chart.tooltip.borderRadius,
1546
- borderColor: e.value.style.chart.tooltip.borderColor,
1547
- borderWidth: e.value.style.chart.tooltip.borderWidth,
1548
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1549
- position: e.value.style.chart.tooltip.position,
1550
- offsetY: e.value.style.chart.tooltip.offsetY,
1551
- parent: D.value,
1552
- content: Oe.value,
1553
- isCustom: me.value,
1554
- isFullscreen: ne.value,
1555
- smooth: e.value.style.chart.tooltip.smooth,
1556
- backdropFilter: e.value.style.chart.tooltip.backdropFilter,
1557
- smoothForce: e.value.style.chart.tooltip.smoothForce,
1558
- smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThrehsold
1559
- }, {
1560
- "tooltip-before": C(() => [
1561
- b(t.$slots, "tooltip-before", ue(re({ ...Ve.value })), void 0, !0)
1562
- ]),
1563
- "tooltip-after": C(() => [
1564
- b(t.$slots, "tooltip-after", ue(re({ ...Ve.value })), void 0, !0)
1565
- ]),
1566
- _: 3
1567
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
1568
- we.value && e.value.userOptions.buttons.table ? (n(), te($l(be.value.component), qe({ key: 8 }, be.value.props, {
1569
- ref_key: "tableUnit",
1570
- ref: pe,
1571
- onClose: Ct
1572
- }), We({
1573
- content: C(() => [
1574
- (n(), te(u(Et), {
1575
- key: `table_${lt.value}`,
1576
- colNames: Ce.value.colNames,
1577
- head: Ce.value.head,
1578
- body: Ce.value.body,
1579
- config: Ce.value.config,
1580
- title: e.value.table.useDialog ? "" : be.value.title,
1581
- withCloseButton: !e.value.table.useDialog,
1582
- onClose: Ct
1583
- }, {
1584
- th: C(({ th: l }) => [
1585
- h("div", {
1586
- innerHTML: l,
1587
- style: { display: "flex", "align-items": "center" }
1588
- }, null, 8, go)
1589
- ]),
1590
- td: C(({ td: l }) => [
1591
- Te(V(l.name ? l.name : isNaN(Number(l)) ? l.includes("%") ? l : u(E)(
1592
- e.value.style.chart.layout.labels.percentage.formatter,
1593
- l,
1594
- u(O)({
1595
- v: l,
1596
- s: "%",
1597
- r: e.value.style.chart.layout.labels.percentage.rounding
1598
- })
1599
- ) : u(E)(
1600
- e.value.style.chart.layout.labels.value.formatter,
1601
- l,
1602
- u(O)({
1603
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
1604
- v: l,
1605
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
1606
- r: e.value.style.chart.layout.labels.value.rounding
1607
- })
1608
- )), 1)
1609
- ]),
1610
- _: 1
1611
- }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
1612
- ]),
1613
- _: 2
1614
- }, [
1615
- e.value.table.useDialog ? {
1616
- name: "title",
1617
- fn: C(() => [
1618
- Te(V(be.value.title), 1)
1619
- ]),
1620
- key: "0"
1621
- } : void 0,
1622
- e.value.table.useDialog ? {
1623
- name: "actions",
1624
- fn: C(() => [
1625
- h("button", {
1626
- tabindex: "0",
1627
- class: "vue-ui-user-options-button",
1628
- onClick: o[4] || (o[4] = (l) => Ee(e.value.userOptions.callbacks.csv))
1629
- }, [
1630
- Se(u(Bt), {
1631
- name: "excel",
1632
- stroke: be.value.props.color
1633
- }, null, 8, ["stroke"])
1634
- ])
1635
- ]),
1636
- key: "1"
1637
- } : void 0
1638
- ]), 1040)) : v("", !0),
1639
- u(_e) ? (n(), te(Ul, { key: 9 })) : v("", !0)
1640
- ], 46, ta));
1641
- }
1642
- }, Mo = /* @__PURE__ */ ea(po, [["__scopeId", "data-v-2942bdc6"]]);
1643
- export {
1644
- Mo as default
1645
- };