vue-data-ui 3.23.1 → 3.23.2

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 (171) hide show
  1. package/dist/{PackageVersion-D6d8SCp9.js → PackageVersion-DXU7nRr9.js} +1 -1
  2. package/dist/components/vue-ui-3d-bar.js +1 -1
  3. package/dist/components/vue-ui-accordion.js +1 -1
  4. package/dist/components/vue-ui-age-pyramid.js +1 -1
  5. package/dist/components/vue-ui-annotator.js +1 -1
  6. package/dist/components/vue-ui-bullet.js +1 -1
  7. package/dist/components/vue-ui-bump.js +1 -1
  8. package/dist/components/vue-ui-candlestick.js +1 -1
  9. package/dist/components/vue-ui-carousel-table.js +1 -1
  10. package/dist/components/vue-ui-chestnut.js +1 -1
  11. package/dist/components/vue-ui-chord.js +1 -1
  12. package/dist/components/vue-ui-circle-pack.js +1 -1
  13. package/dist/components/vue-ui-cursor.js +1 -1
  14. package/dist/components/vue-ui-dag.js +1 -1
  15. package/dist/components/vue-ui-dashboard.js +1 -1
  16. package/dist/components/vue-ui-digits.js +1 -1
  17. package/dist/components/vue-ui-donut-evolution.js +1 -1
  18. package/dist/components/vue-ui-donut.js +1 -1
  19. package/dist/components/vue-ui-dumbbell.js +1 -1
  20. package/dist/components/vue-ui-flow.js +1 -1
  21. package/dist/components/vue-ui-funnel.js +1 -1
  22. package/dist/components/vue-ui-galaxy.js +1 -1
  23. package/dist/components/vue-ui-gauge.js +1 -1
  24. package/dist/components/vue-ui-geo.js +1 -1
  25. package/dist/components/vue-ui-gizmo.js +1 -1
  26. package/dist/components/vue-ui-heatmap.js +1 -1
  27. package/dist/components/vue-ui-hill.js +1 -1
  28. package/dist/components/vue-ui-history-plot.js +1 -1
  29. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  30. package/dist/components/vue-ui-kpi.js +1 -1
  31. package/dist/components/vue-ui-mini-loader.js +1 -1
  32. package/dist/components/vue-ui-molecule.js +1 -1
  33. package/dist/components/vue-ui-mood-radar.js +1 -1
  34. package/dist/components/vue-ui-nested-donuts.js +1 -1
  35. package/dist/components/vue-ui-onion.js +1 -1
  36. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  37. package/dist/components/vue-ui-quadrant.js +1 -1
  38. package/dist/components/vue-ui-quick-chart.js +1 -1
  39. package/dist/components/vue-ui-radar.js +1 -1
  40. package/dist/components/vue-ui-rating.js +1 -1
  41. package/dist/components/vue-ui-relation-circle.js +1 -1
  42. package/dist/components/vue-ui-ridgeline.js +1 -1
  43. package/dist/components/vue-ui-rings.js +1 -1
  44. package/dist/components/vue-ui-scatter.js +1 -1
  45. package/dist/components/vue-ui-skeleton.js +1 -1
  46. package/dist/components/vue-ui-smiley.js +1 -1
  47. package/dist/components/vue-ui-spark-trend.js +1 -1
  48. package/dist/components/vue-ui-sparkbar.js +1 -1
  49. package/dist/components/vue-ui-sparkgauge.js +1 -1
  50. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  51. package/dist/components/vue-ui-sparkline.js +1 -1
  52. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  53. package/dist/components/vue-ui-stackbar.js +1 -1
  54. package/dist/components/vue-ui-stackline.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/{package-KvlL5CqE.js → package-bsfpO6y3.js} +1 -1
  71. package/dist/{render-common-oDYGTc5P.js → render-common-C0PEe9so.js} +1 -1
  72. package/dist/ssr/vue-ui-donut.js +1 -1
  73. package/dist/ssr/vue-ui-xy.js +1 -1
  74. package/dist/ssr.js +2 -2
  75. package/dist/style.css +1 -1
  76. package/dist/types/vue-data-ui.d.ts +6 -0
  77. package/dist/{useSvgExport-DH-FfcqQ.js → useChartExport-DNiwdPmb.js} +47 -1
  78. package/dist/{useConfig-D3scuR88.js → useConfig-DlNpz6P8.js} +6 -0
  79. package/dist/{useObjectBindings-Brg8mm5J.js → useObjectBindings-BeWS5v0i.js} +1 -1
  80. package/dist/utils.js +1 -1
  81. package/dist/{vue-data-ui-DGWDPCwC.js → vue-data-ui-BNxtW8pK.js} +68 -68
  82. package/dist/vue-data-ui.js +69 -69
  83. package/dist/{vue-ui-3d-bar-C_Su9fve.js → vue-ui-3d-bar-BYumVxZG.js} +164 -182
  84. package/dist/{vue-ui-accordion-BxGriZik.js → vue-ui-accordion-DegI2lzR.js} +1 -1
  85. package/dist/vue-ui-age-pyramid-tJx_hCsS.js +1241 -0
  86. package/dist/{vue-ui-annotator-CCtnM8Rv.js → vue-ui-annotator-DfG79D4r.js} +2 -2
  87. package/dist/vue-ui-bullet-DrWG4jRy.js +700 -0
  88. package/dist/{vue-ui-bump-CcdzJZ9n.js → vue-ui-bump-mKysp0KO.js} +213 -263
  89. package/dist/vue-ui-candlestick-PgKcBZdy.js +1837 -0
  90. package/dist/vue-ui-carousel-table-DRvycNBl.js +467 -0
  91. package/dist/vue-ui-chestnut-Dpklo-VE.js +2014 -0
  92. package/dist/vue-ui-chord-7PPVH_iG.js +1345 -0
  93. package/dist/vue-ui-circle-pack-DW4Os6_8.js +1636 -0
  94. package/dist/{vue-ui-cursor-BqHr0n1Z.js → vue-ui-cursor-DIt7vOwc.js} +2 -2
  95. package/dist/{vue-ui-dag-jMLVoQkb.js → vue-ui-dag-Cl0WdSLb.js} +492 -515
  96. package/dist/{vue-ui-dashboard-DVAUFETR.js → vue-ui-dashboard-BwxRLR4E.js} +65 -65
  97. package/dist/{vue-ui-digits-Dy4gG6qm.js → vue-ui-digits-Bp1OH_t1.js} +2 -2
  98. package/dist/{vue-ui-donut-C0cWRLbU.js → vue-ui-donut-BZUT7QYt.js} +333 -359
  99. package/dist/vue-ui-donut-evolution-CQy3ZKXk.js +1549 -0
  100. package/dist/{vue-ui-donut-CYpxGBhl.js → vue-ui-donut-y6tOAVyY.js} +2 -2
  101. package/dist/{vue-ui-dumbbell-DxVbRjKR.js → vue-ui-dumbbell-BtKZcAOV.js} +378 -428
  102. package/dist/{vue-ui-flow-DWaZF4FS.js → vue-ui-flow-BF_cndsv.js} +182 -207
  103. package/dist/vue-ui-funnel-z3AeiDu6.js +750 -0
  104. package/dist/{vue-ui-galaxy-CWBP9oH9.js → vue-ui-galaxy-ClWaSOmM.js} +308 -334
  105. package/dist/vue-ui-gauge-CJstpakj.js +932 -0
  106. package/dist/{vue-ui-geo-ZA7CBy8f.js → vue-ui-geo-B1tOD3HC.js} +362 -413
  107. package/dist/{vue-ui-gizmo-SQCou0bQ.js → vue-ui-gizmo-foatosAv.js} +2 -2
  108. package/dist/{vue-ui-heatmap-CHd9gs_p.js → vue-ui-heatmap-By33A9dZ.js} +292 -315
  109. package/dist/vue-ui-hill-ewqkK9s5.js +1745 -0
  110. package/dist/{vue-ui-history-plot-BwnlC1mx.js → vue-ui-history-plot-FEIwXlsz.js} +258 -283
  111. package/dist/{vue-ui-horizontal-bar-BUar2HUH.js → vue-ui-horizontal-bar-D51sAeVu.js} +273 -298
  112. package/dist/{vue-ui-kpi-BF_9WWoo.js → vue-ui-kpi-y3EkgqJQ.js} +2 -2
  113. package/dist/{vue-ui-mini-loader-CvfukjXi.js → vue-ui-mini-loader-CtTewZJG.js} +1 -1
  114. package/dist/vue-ui-molecule-paWHp18h.js +935 -0
  115. package/dist/{vue-ui-mood-radar-_zpbmvJs.js → vue-ui-mood-radar-wBRTZI5k.js} +337 -386
  116. package/dist/vue-ui-nested-donuts-CB-HOLo2.js +1503 -0
  117. package/dist/{vue-ui-onion-CB5RYIy5.js → vue-ui-onion-B2Q2n55x.js} +257 -282
  118. package/dist/{vue-ui-parallel-coordinate-plot-BUwt-apg.js → vue-ui-parallel-coordinate-plot-GpkXiIZA.js} +190 -215
  119. package/dist/{vue-ui-quadrant-CoROD3er.js → vue-ui-quadrant-DOPuejDE.js} +213 -243
  120. package/dist/{vue-ui-quick-chart-BcH7eY4-.js → vue-ui-quick-chart-CgHX9njq.js} +52 -61
  121. package/dist/{vue-ui-radar-DGbaXGme.js → vue-ui-radar-BLvG-_zE.js} +343 -370
  122. package/dist/{vue-ui-rating-Bo3zD3yW.js → vue-ui-rating-BDVSVFA0.js} +8 -9
  123. package/dist/vue-ui-relation-circle-plOXwxJ5.js +903 -0
  124. package/dist/{vue-ui-ridgeline-BCaGcyfk.js → vue-ui-ridgeline-BbrnXvBo.js} +267 -317
  125. package/dist/{vue-ui-rings-BJUBn8_b.js → vue-ui-rings-B3cKfMWy.js} +407 -432
  126. package/dist/vue-ui-scatter-BY7waF2T.js +2403 -0
  127. package/dist/{vue-ui-skeleton-EeJcGbCo.js → vue-ui-skeleton-DwKxd7fk.js} +2 -2
  128. package/dist/{vue-ui-smiley-D0gibt5c.js → vue-ui-smiley-5iHJeTPc.js} +62 -63
  129. package/dist/{vue-ui-spark-trend-BRoQ7JpQ.js → vue-ui-spark-trend-MpvrV5Wd.js} +2 -2
  130. package/dist/{vue-ui-sparkbar-DFp2k7-7.js → vue-ui-sparkbar-s-2rBmEz.js} +97 -100
  131. package/dist/{vue-ui-sparkgauge-D0Bq85Hs.js → vue-ui-sparkgauge-B-BYVv4p.js} +2 -2
  132. package/dist/{vue-ui-sparkhistogram-BPln7v63.js → vue-ui-sparkhistogram-D7D4NHdi.js} +7 -8
  133. package/dist/{vue-ui-sparkline-C6Q45Dqp.js → vue-ui-sparkline-RbeYtLWp.js} +6 -7
  134. package/dist/{vue-ui-sparkstackbar-CjK4bcQg.js → vue-ui-sparkstackbar-ohN7mtbg.js} +191 -195
  135. package/dist/{vue-ui-stackbar-Ca8EPf3e.js → vue-ui-stackbar-D2bpvQYt.js} +524 -549
  136. package/dist/{vue-ui-stackline-Pz5WWlWT.js → vue-ui-stackline-Bo1oE8yq.js} +570 -595
  137. package/dist/vue-ui-strip-plot-CZ-C4a5x.js +1734 -0
  138. package/dist/{vue-ui-table-Bjg-ujJu.js → vue-ui-table-3PPiJPV6.js} +3 -3
  139. package/dist/{vue-ui-table-heatmap-ljeYW8Wc.js → vue-ui-table-heatmap-D1bbPXKG.js} +48 -49
  140. package/dist/{vue-ui-table-sparkline-iRFmtK5S.js → vue-ui-table-sparkline-l1cUX3ny.js} +7 -9
  141. package/dist/{vue-ui-thermometer-D8uiOaeA.js → vue-ui-thermometer-DltAELO7.js} +240 -261
  142. package/dist/{vue-ui-timer-CYw983oL.js → vue-ui-timer-DWNdx47q.js} +2 -2
  143. package/dist/vue-ui-tiremarks-GYhji_fa.js +538 -0
  144. package/dist/{vue-ui-treemap-h4VbnqPA.js → vue-ui-treemap-DjNlnOG5.js} +498 -524
  145. package/dist/vue-ui-waffle-BAA9EX6O.js +1386 -0
  146. package/dist/{vue-ui-wheel-tLvJadk5.js → vue-ui-wheel-DrefGLos.js} +188 -209
  147. package/dist/{vue-ui-word-cloud-BjpGSsod.js → vue-ui-word-cloud-CQZ8AyOi.js} +375 -398
  148. package/dist/{vue-ui-world-B4fCS3jN.js → vue-ui-world-Y7a3VEjq.js} +428 -453
  149. package/dist/{vue-ui-xy-7ZT9IRD8.js → vue-ui-xy-CJcdttNL.js} +857 -883
  150. package/dist/{vue-ui-xy-gyNS0yH0.js → vue-ui-xy-DPxtkYGc.js} +2 -2
  151. package/dist/{vue-ui-xy-canvas-BnLEwBpi.js → vue-ui-xy-canvas-1rbwMA1m.js} +13 -12
  152. package/package.json +1 -1
  153. package/dist/Slicer-CIk57nL4.js +0 -1163
  154. package/dist/vue-ui-age-pyramid-D4k1MkAL.js +0 -1264
  155. package/dist/vue-ui-bullet-DLZr2Uk8.js +0 -724
  156. package/dist/vue-ui-candlestick-EEEt7ORC.js +0 -1866
  157. package/dist/vue-ui-carousel-table-BicIpNAD.js +0 -463
  158. package/dist/vue-ui-chestnut-BI7mC5dd.js +0 -2068
  159. package/dist/vue-ui-chord-DXaq8ZMu.js +0 -1396
  160. package/dist/vue-ui-circle-pack-XHJBMG51.js +0 -1659
  161. package/dist/vue-ui-donut-evolution-DwR47A2r.js +0 -1603
  162. package/dist/vue-ui-funnel-Bmpx5GHR.js +0 -797
  163. package/dist/vue-ui-gauge-ByE_txav.js +0 -953
  164. package/dist/vue-ui-hill-BT183G-_.js +0 -1768
  165. package/dist/vue-ui-molecule-Bi2CKHer.js +0 -958
  166. package/dist/vue-ui-nested-donuts-qHZAJ70u.js +0 -1528
  167. package/dist/vue-ui-relation-circle-DaU1eTsG.js +0 -925
  168. package/dist/vue-ui-scatter-Pcft1bUt.js +0 -2428
  169. package/dist/vue-ui-strip-plot-Dw4MGDSO.js +0 -1757
  170. package/dist/vue-ui-tiremarks-CekiW2Ru.js +0 -559
  171. package/dist/vue-ui-waffle-cu0w_s6L.js +0 -1412
@@ -1,1603 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { $ as t, Bt as n, D as r, G as i, Jt as a, Kt as o, Pt as s, Q as c, Rt as ee, S as te, Ut as ne, X as re, _ as ie, f as ae, h as oe, i as se, jt as ce, kt as le, p as ue, pt as de, q as fe, t as pe, tt as me, w as he, wt as ge, y as _e } from "./lib-Bttd6u5E.js";
3
- import { n as ve, t as ye } from "./useHints-Dq_w2E8B.js";
4
- import { t as be } from "./useTimeLabels-d2f-W1L4.js";
5
- import { t as xe } from "./useConfig-D3scuR88.js";
6
- import { t as Se } from "./usePrinter-DN5bYhTG.js";
7
- import { n as Ce, t as we } from "./BaseScanner-DZvpgOjM.js";
8
- import { t as Te } from "./useSvgExport-DH-FfcqQ.js";
9
- import { t as Ee } from "./useNestedProp-vPNvh7rV.js";
10
- import { t as De } from "./useThemeCheck-C43Tcqmk.js";
11
- import { t as Oe } from "./useTransitions-g_zBREk2.js";
12
- import { t as ke } from "./useStableElementSize-C7KADDKj.js";
13
- import { t as Ae } from "./useTimeLabelCollider-AEcY4Ioe.js";
14
- import { t as je } from "./img-Bnokohej.js";
15
- import { n as Me } from "./Title-BE3qg9xl.js";
16
- import { t as Ne } from "./_plugin-vue_export-helper-B3ysoDQm.js";
17
- import { l as Pe, t as Fe } from "./useResponsive-ZtArZtUf.js";
18
- import { t as Ie } from "./DefGrad-DVBqDjhO.js";
19
- import { t as Le } from "./BaseLegendToggle-DZVucLnv.js";
20
- import { t as Re } from "./A11yDataTable-DdRsVULz.js";
21
- import { t as ze } from "./useUserOptionState-DK-_1ddE.js";
22
- import { t as Be } from "./useChartAccessibility-DYqac8yF.js";
23
- import { t as Ve } from "./Legend-CQxUgOd-.js";
24
- import { t as He } from "./vue_ui_donut_evolution-D1yAAIHr.js";
25
- import { t as Ue } from "./Slicer-CIk57nL4.js";
26
- import { Fragment as l, Teleport as We, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as Ge, createTextVNode as Ke, createVNode as qe, defineAsyncComponent as h, guardReactiveProps as g, mergeProps as Je, nextTick as _, normalizeClass as v, normalizeProps as y, normalizeStyle as b, onBeforeUnmount as Ye, onMounted as Xe, openBlock as x, ref as S, renderList as C, renderSlot as w, resolveDynamicComponent as Ze, shallowRef as Qe, toDisplayString as T, toRefs as $e, unref as E, watch as et, watchEffect as tt, withCtx as D } from "vue";
27
- //#region src/components/vue-ui-donut-evolution.vue
28
- var nt = /* @__PURE__ */ e({ default: () => Wt }), rt = ["id"], it = ["id"], at = ["id"], ot = { style: { position: "relative" } }, st = [
29
- "xmlns",
30
- "aria-describedby",
31
- "viewBox"
32
- ], ct = [
33
- "x",
34
- "y",
35
- "width",
36
- "height"
37
- ], lt = { key: 1 }, ut = [
38
- "x1",
39
- "x2",
40
- "y1",
41
- "y2",
42
- "stroke",
43
- "stroke-width"
44
- ], dt = [
45
- "x1",
46
- "x2",
47
- "y1",
48
- "y2",
49
- "stroke",
50
- "stroke-width"
51
- ], ft = { key: 0 }, pt = [
52
- "x1",
53
- "x2",
54
- "y1",
55
- "y2",
56
- "stroke",
57
- "stroke-width"
58
- ], mt = [
59
- "font-size",
60
- "fill",
61
- "transform"
62
- ], ht = [
63
- "x",
64
- "y",
65
- "font-size",
66
- "fill"
67
- ], gt = [
68
- "d",
69
- "stroke",
70
- "stroke-width"
71
- ], _t = [
72
- "transform",
73
- "font-size",
74
- "text-anchor",
75
- "fill",
76
- "font-weight"
77
- ], vt = { key: 0 }, yt = [
78
- "text-anchor",
79
- "font-size",
80
- "fill",
81
- "transform"
82
- ], bt = [
83
- "text-anchor",
84
- "font-size",
85
- "fill",
86
- "transform",
87
- "innerHTML"
88
- ], xt = [
89
- "x1",
90
- "y1",
91
- "x2",
92
- "y2",
93
- "stroke",
94
- "stroke-width"
95
- ], St = { key: 1 }, Ct = [
96
- "cx",
97
- "cy",
98
- "r",
99
- "fill"
100
- ], wt = { key: 0 }, Tt = { key: 0 }, Et = ["d", "stroke"], Dt = [
101
- "text-anchor",
102
- "x",
103
- "y",
104
- "fill"
105
- ], Ot = [
106
- "cx",
107
- "cy",
108
- "r",
109
- "fill"
110
- ], kt = { key: 0 }, At = [
111
- "cx",
112
- "cy",
113
- "fill"
114
- ], jt = { key: 1 }, Mt = [
115
- "d",
116
- "fill",
117
- "stroke"
118
- ], Nt = { key: 2 }, Pt = [
119
- "d",
120
- "fill",
121
- "stroke"
122
- ], Ft = [
123
- "x",
124
- "y",
125
- "font-size",
126
- "fill"
127
- ], It = [
128
- "x",
129
- "y",
130
- "width",
131
- "height",
132
- "fill"
133
- ], Lt = [
134
- "x",
135
- "y",
136
- "width",
137
- "height",
138
- "onMouseenter",
139
- "onMouseleave",
140
- "onClick"
141
- ], Rt = {
142
- key: 0,
143
- style: {
144
- position: "absolute",
145
- top: "100%",
146
- left: "0",
147
- width: "100%"
148
- },
149
- "data-dom-to-png-ignore": "",
150
- "aria-hidden": "true"
151
- }, zt = {
152
- key: 5,
153
- class: "vue-data-ui-watermark"
154
- }, Bt = ["id"], Vt = ["onClick"], Ht = { key: 0 }, Ut = { key: 1 }, Wt = /*#__PURE__*/ Ne({
155
- __name: "vue-ui-donut-evolution",
156
- props: {
157
- config: {
158
- type: Object,
159
- default() {
160
- return {};
161
- }
162
- },
163
- dataset: {
164
- type: Array,
165
- default() {
166
- return [];
167
- }
168
- }
169
- },
170
- emits: ["selectLegend", "copyAlt"],
171
- setup(e, { expose: Ne, emit: nt }) {
172
- let Wt = h(() => import("./vue-ui-accordion-BxGriZik.js").then((e) => e.n)), Gt = h(() => import("./BaseIcon-BfndwIWE.js").then((e) => e.n)), Kt = h(() => import("./DataTable-BbKgJ5UI.js")), qt = h(() => import("./PackageVersion-D6d8SCp9.js").then((e) => e.t)), Jt = h(() => import("./PenAndPaper-DAE-tnEQ.js").then((e) => e.t)), Yt = h(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), Xt = h(() => import("./vue-ui-donut-C0cWRLbU.js").then((e) => e.n)), Zt = h(() => import("./BaseDraggableDialog-LoqqwRtV.js").then((e) => e.n)), { vue_ui_donut_evolution: Qt } = xe(), { isThemeValid: $t, warnInvalidTheme: en } = De(), O = e, k = S(fe()), A = S([]), j = S(null), M = S(null), tn = S(!1), N = S(null), P = S(null), nn = S(null), rn = S(0), an = S(0), on = S(0), sn = S(0), cn = S(0), ln = S(null), un = S(null), dn = S(null), fn = S(null), pn = S(!1), mn = S(null), hn = S(null), gn = S(!1), _n = S(!1), vn = Qe(null), yn = S(0), bn = S(0), xn = S(!1);
173
- function Sn() {
174
- vn.value = P.value?.parentNode ?? null;
175
- }
176
- function Cn() {
177
- return new Promise((e) => {
178
- requestAnimationFrame(() => {
179
- requestAnimationFrame(e);
180
- });
181
- });
182
- }
183
- async function wn() {
184
- let e = ++bn.value;
185
- await _(), await Cn(), await Cn(), e === bn.value && (yn.value += 1);
186
- }
187
- function Tn() {
188
- xn.value || (xn.value = !0, _(() => {
189
- xn.value = !1, Sn(), wn();
190
- }));
191
- }
192
- let En = ke({
193
- elementRef: vn,
194
- minimumWidth: 2,
195
- minimumHeight: 2,
196
- stableFramesRequired: 2,
197
- once: !1,
198
- onSizeAccepted: () => {
199
- wn();
200
- }
201
- }), Dn = S(null), On = S(null), kn = S(null), An = S(null), jn = S(null), Mn = S(!1), F = Qe(null), I = Qe(null), Nn = S(null), L = S(null), Pn = S(!1), Fn = nt, In = u(() => !!O.dataset && O.dataset.length);
202
- Xe(() => {
203
- pn.value = !0, Sn(), En.start(), Rn(), wn();
204
- });
205
- let Ln = u(() => !!R.value.debug);
206
- function Rn() {
207
- if (ce(O.dataset) ? (me({
208
- componentName: "VueUiDonutEvolution",
209
- type: "dataset",
210
- debug: Ln.value
211
- }), Un.value = !0) : O.dataset.length && O.dataset.forEach((e, t) => {
212
- de({
213
- datasetObject: e,
214
- requiredAttributes: ["name", "values"]
215
- }).forEach((e) => {
216
- me({
217
- componentName: "VueUiDonutEvolution",
218
- type: "datasetSerieAttribute",
219
- property: e,
220
- index: t,
221
- debug: Ln.value
222
- }), Un.value = !0;
223
- });
224
- }), ce(O.dataset) || (Un.value = R.value.loading), setTimeout(() => {
225
- Mn.value = !0;
226
- }, 10), Kn(), R.value.responsive) {
227
- let e = Pe(() => {
228
- Mn.value = !1;
229
- let { width: e, height: t } = Fe({
230
- chart: P.value,
231
- title: R.value.style.chart.title.text ? Dn.value : null,
232
- legend: R.value.style.chart.legend.show ? On.value : null,
233
- slicer: R.value.style.chart.zoom.show && Wn.value > 1 ? jn.value : null,
234
- source: kn.value
235
- });
236
- requestAnimationFrame(() => {
237
- B.value.width = e, B.value.height = t - 12, Tn(), clearTimeout(Nn.value), Nn.value = setTimeout(() => {
238
- Mn.value = !0;
239
- }, 10);
240
- });
241
- });
242
- F.value && (I.value && F.value.unobserve(I.value), F.value.disconnect()), F.value = new ResizeObserver(e), I.value = P.value.parentNode, F.value.observe(I.value);
243
- }
244
- Tn();
245
- }
246
- let R = S(Qn());
247
- ve({
248
- config: () => R.value,
249
- dataset: () => O.dataset,
250
- component: "VueUiDonutEvolution",
251
- rules: [
252
- ye.emptyArray,
253
- {
254
- test: (e) => e.length === 1,
255
- message: [
256
- "👀 There is only a single series in your dataset. Consider:",
257
- "",
258
- "▶️ Using VueUiXy instead, for a regular line chart."
259
- ]
260
- },
261
- {
262
- test: (e) => e.length > 6,
263
- message: [
264
- "👀 The number of series is > 6, which makes donuts hard to read. Consider:",
265
- "",
266
- "▶️ Grouping small values dynamically into a single \"Other\" series.",
267
- "",
268
- "▶️ Using filters to let users choose a maximum number of series to display.",
269
- "",
270
- "▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read."
271
- ]
272
- },
273
- {
274
- test: (e) => e.some((e) => e.values.length > 24),
275
- message: [
276
- "👀 Some series have a number of data points > 24, which can make the chart and donuts hard to read. Consider:",
277
- "",
278
- "▶️ Using larger time scales, or aggregated values.",
279
- "",
280
- "▶️ Filtering the time range by adding date intputs in your UI.",
281
- "",
282
- "▶️ Using VueUiXy to show longer series in a more comfortable display."
283
- ]
284
- }
285
- ]
286
- });
287
- let { transitionEnabled: zn } = Oe({
288
- config: () => R.value.transitions,
289
- dataset: () => O.dataset
290
- }), z = u(() => R.value.userOptions.useCursorPointer), Bn = u(() => a({
291
- defaultConfig: {
292
- useCssAnimation: !1,
293
- table: { show: !1 },
294
- userOptions: { show: !1 },
295
- style: { chart: {
296
- backgroundColor: "#99999930",
297
- layout: {
298
- dataLabels: { show: !1 },
299
- grid: {
300
- stroke: "#6A6A6A",
301
- axis: {
302
- yLabel: "",
303
- xLabel: ""
304
- },
305
- yAxis: {
306
- scaleMin: null,
307
- scaleMax: null,
308
- autoScale: !1,
309
- dataLabels: { show: !1 }
310
- },
311
- xAxis: { dataLabels: { show: !1 } }
312
- },
313
- line: { stroke: "#CACACA60" }
314
- },
315
- legend: {
316
- backgroundColor: "transparent",
317
- showValue: !1,
318
- showPercentage: !1
319
- },
320
- zoom: {
321
- show: !1,
322
- startIndex: null,
323
- endIndex: null
324
- }
325
- } }
326
- },
327
- userConfig: R.value.skeletonConfig ?? {}
328
- })), { loading: Vn, FINAL_DATASET: Hn, manualLoading: Un } = Ce({
329
- ...$e(O),
330
- FINAL_CONFIG: R,
331
- prepareConfig: Qn,
332
- callback: () => {
333
- Promise.resolve().then(async () => {
334
- await Kn();
335
- });
336
- },
337
- skeletonDataset: O.config?.skeletonDataset ?? [
338
- {
339
- name: "",
340
- values: [
341
- 1,
342
- 2,
343
- 3,
344
- 5,
345
- 8,
346
- 13
347
- ],
348
- color: "#AAAAAA"
349
- },
350
- {
351
- name: "",
352
- values: [
353
- 1,
354
- 2,
355
- 3,
356
- 5,
357
- 8,
358
- 13
359
- ],
360
- color: "#BABABA"
361
- },
362
- {
363
- name: "",
364
- values: [
365
- 1,
366
- 2,
367
- 3,
368
- 5,
369
- 8,
370
- 13
371
- ],
372
- color: "#CACACA"
373
- }
374
- ],
375
- skeletonConfig: a({
376
- defaultConfig: R.value,
377
- userConfig: Bn.value
378
- })
379
- }), B = S({
380
- width: R.value.style.chart.layout.width,
381
- height: R.value.style.chart.layout.height
382
- }), Wn = u(() => Math.max(...Hn.value.map((e) => e.values.length))), V = S({
383
- start: 0,
384
- end: Wn.value
385
- });
386
- function Gn() {
387
- Kn();
388
- }
389
- async function Kn() {
390
- await _(), await _();
391
- let { startIndex: e, endIndex: t } = R.value.style.chart.zoom, n = An.value;
392
- V.value = {
393
- start: 0,
394
- max: q.value
395
- }, (e != null || t != null) && n ? (e == null ? (V.value.start = 0, n.setStartValue(0)) : n.setStartValue(e), t == null ? (V.value.end = q.value, n.setEndValue(q.value)) : n.setEndValue(qn(t + 1))) : (V.value = {
396
- start: 0,
397
- end: q.value
398
- }, an.value += 1), Tn();
399
- }
400
- function qn(e) {
401
- let t = q.value;
402
- return e > t ? t : e < 0 || R.value.style.chart.zoom.startIndex !== null && e < R.value.style.chart.zoom.startIndex ? R.value.style.chart.zoom.startIndex === null ? 1 : R.value.style.chart.zoom.startIndex + 1 : e;
403
- }
404
- let { userOptionsVisible: Jn, setUserOptionsVisibility: Yn, keepUserOptionState: Xn } = ze({ config: R.value }), { svgRef: Zn } = Be({ config: R.value.style.chart.title });
405
- function Qn() {
406
- let e = Ee({
407
- userConfig: O.config,
408
- defaultConfig: Qt
409
- }), t = {}, n = e.theme;
410
- if (n) if (!$t.value(e)) en(e), t = e;
411
- else {
412
- let r = Ee({
413
- userConfig: He[n] || O.config,
414
- defaultConfig: e
415
- });
416
- t = {
417
- ...Ee({
418
- userConfig: O.config,
419
- defaultConfig: r
420
- }),
421
- customPalette: e.customPalette ? e.customPalette : o[n] || s
422
- };
423
- }
424
- else t = e;
425
- return t;
426
- }
427
- et(() => O.config, (e) => {
428
- Vn.value || (R.value = Qn()), Jn.value = !R.value.userOptions.showOnChartHover, Rn(), on.value += 1, sn.value += 1, cn.value += 1, H.value.showTable = R.value.table.show;
429
- }, { deep: !0 }), et(() => O.dataset, (e) => {
430
- Array.isArray(e) && e.length > 0 && (Un.value = !1), Gn();
431
- }, { deep: !0 });
432
- let { isPrinting: $n, isImaging: er, generatePdf: tr, generateImage: nr } = Se({
433
- elementId: k.value,
434
- fileName: R.value.style.chart.title.text || "vue-ui-donut-evolution",
435
- options: R.value.userOptions.print
436
- }), rr = u(() => R.value.userOptions.show && !R.value.style.chart.title.text), ir = u(() => he(R.value.customPalette)), H = S({ showTable: R.value.table.show });
437
- et(R, () => {
438
- H.value = { showTable: R.value.table.show };
439
- }, { immediate: !0 });
440
- let U = u(() => ({
441
- top: R.value.style.chart.layout.padding.top,
442
- right: R.value.style.chart.layout.padding.right,
443
- bottom: R.value.style.chart.layout.padding.bottom,
444
- left: R.value.style.chart.layout.padding.left
445
- })), W = u(() => R.value.style.chart.layout.grid.yAxis.position === "right");
446
- function ar() {
447
- let e = 0;
448
- ln.value && (e = Array.from(ln.value.querySelectorAll("text")).reduce((e, t) => {
449
- let n = t.getComputedTextLength();
450
- return n > e ? n : e;
451
- }, 0));
452
- let t = fn.value ? fn.value.getBoundingClientRect().width + R.value.style.chart.layout.grid.axis.yLabelOffsetX + R.value.style.chart.layout.grid.axis.fontSize : 0, n = e + t + 5;
453
- return {
454
- left: W.value ? 0 : n,
455
- right: W.value ? n : 0,
456
- scaleLabelsWidth: e,
457
- yAxisLabelWidth: t,
458
- crosshair: 5
459
- };
460
- }
461
- let or = S(0), sr = Pe((e) => {
462
- or.value = e;
463
- }, 100);
464
- tt((e) => {
465
- let t = un.value;
466
- if (!t) return;
467
- let n = new ResizeObserver((e) => {
468
- sr(e[0].contentRect.height);
469
- });
470
- n.observe(t), e(() => n.disconnect());
471
- }), Ye(() => {
472
- or.value = 0, En.stop(), clearTimeout(Nn.value), F.value && (I.value && F.value.unobserve(I.value), F.value.disconnect(), F.value = null, I.value = null);
473
- });
474
- let cr = u(() => {
475
- let e = 0;
476
- dn.value && (e = dn.value.getBBox().height);
477
- let t = 0;
478
- return un.value && (t = or.value), e + t + R.value.style.chart.layout.grid.axis.fontSize + R.value.style.chart.layout.grid.xAxis.dataLabels.offsetY;
479
- }), G = u(() => {
480
- yn.value;
481
- let e = ar(), t = R.value.style.chart.layout.dataLabels.fontSize * 3, n = B.value.width, r = B.value.height, i = U.value.left + e.left, a = n - U.value.right - e.right, o = n - i - U.value.right - e.right, s = r - U.value.top - U.value.bottom - t - cr.value, c = U.value.top + t;
482
- return {
483
- top: c,
484
- left: i,
485
- right: a,
486
- bottom: r - U.value.bottom - cr.value,
487
- absoluteHeight: r,
488
- absoluteWidth: n,
489
- centerX: i + Math.max(10, o) / 2,
490
- centerY: c + Math.max(10, s) / 2,
491
- width: Math.max(10, o),
492
- height: Math.max(10, s),
493
- scaleLabelsWidth: e.scaleLabelsWidth,
494
- yAxisLabelWidth: e.yAxisLabelWidth,
495
- crosshair: e.crosshair
496
- };
497
- }), K = u(() => (Hn.value.forEach((e, t) => {
498
- [null, void 0].includes(e.name) && me({
499
- componentName: "VueUiDonutEvolution",
500
- type: "datasetSerieAttribute",
501
- property: "name",
502
- index: t,
503
- debug: Ln.value
504
- }), [null, void 0].includes(e.values) && me({
505
- componentName: "VueUiDonutEvolution",
506
- type: "datasetSerieAttribute",
507
- property: "values",
508
- index: t,
509
- debug: Ln.value
510
- });
511
- }), Hn.value.map((e, t) => ({
512
- ...e,
513
- values: ee(e.values),
514
- color: te(e.color) || ir.value[t] || s[t] || s[t % s.length],
515
- length: (e.values || []).length,
516
- uid: fe()
517
- })))), lr = u(() => K.value.filter((e) => !A.value.includes(e.uid)).map((e) => ({
518
- ...e,
519
- values: e.values.filter((e, t) => t >= V.value.start && t <= V.value.end)
520
- }))), q = u(() => Math.max(...K.value.map((e) => e.length))), J = S([]), ur = 0;
521
- tt(() => {
522
- let e = ++ur;
523
- (async () => {
524
- let t = await be({
525
- values: R.value.style.chart.layout.grid.xAxis.dataLabels.values,
526
- maxDatapoints: q.value,
527
- formatter: R.value.style.chart.layout.grid.xAxis.dataLabels.datetimeFormatter,
528
- start: V.value.start,
529
- end: V.value.end
530
- });
531
- e === ur && (J.value = t);
532
- })();
533
- });
534
- let Y = u(() => G.value.width / (V.value.end - V.value.start)), dr = u(() => {
535
- let e = [];
536
- for (let t = 0; t < V.value.end - V.value.start; t += 1) {
537
- let n = lr.value.map((e) => e.values[t] ?? null), r = n.filter((e) => [void 0, null].includes(e)).length === n.length, i = n.reduce((e, t) => e + t, 0), a = n.map((e) => e / i), o = G.value.left + Y.value * t + Y.value / 2;
538
- e.push({
539
- index: t,
540
- percentages: a,
541
- subtotal: r || i < 0 ? null : i,
542
- values: n,
543
- x: o
544
- });
545
- }
546
- return e;
547
- }), fr = u(() => {
548
- let e = Math.max(...dr.value.map((e) => e.subtotal).filter((e) => ge(e))) ?? 1, t = Math.min(...dr.value.map((e) => e.subtotal).filter((e) => ge(e))) ?? 0, n = Math.max(R.value.style.chart.layout.grid.yAxis.scaleMax ?? 0, e), r;
549
- return r = R.value.style.chart.layout.grid.yAxis.scaleMin == null ? 0 : Math.min(t, R.value.style.chart.layout.grid.yAxis.scaleMin), R.value.style.chart.layout.grid.yAxis.autoScale && (r = t, n = e), r === n && (r = n / 2, n *= 1.5), {
550
- max: n,
551
- min: r
552
- };
553
- }), X = u(() => {
554
- let e = dr.value.length === 1 ? fr.value.max * 2 : fr.value.max;
555
- return ie(fr.value.min, e, R.value.style.chart.layout.grid.yAxis.dataLabels.steps);
556
- });
557
- et(() => X.value.ticks.join("|"), () => {
558
- Tn();
559
- }, { flush: "post" });
560
- function pr(e) {
561
- return (e - X.value.min) / (X.value.max - X.value.min);
562
- }
563
- let mr = u(() => X.value.ticks.map((e) => ({
564
- y: G.value.bottom - G.value.height * pr(e),
565
- value: e
566
- }))), Z = u(() => {
567
- let e = dr.value, t = Math.max(...e.map((e) => e.subtotal));
568
- return e.length === 1 && t * 2, e.map((t, n) => {
569
- let r = Math.min(G.value.width / 24, Y.value / 2 * .7), i = r > G.value.width / 16 ? G.value.width / 16 : r, a = j.value === t.index ? G.value.width / 16 : i, o = e.length > 4 ? r * 2 : r * 2 > Y.value / 2 * .7 ? Y.value / 2 * .7 : r * 2, s = G.value.bottom - G.value.height * pr(t.subtotal), c = lr.value.map((e) => ({
570
- color: e.color,
571
- name: e.name,
572
- value: e.values[n] ?? 0
573
- })).toSorted((e, t) => t.value - e.value);
574
- return {
575
- ...t,
576
- y: s,
577
- radius: i,
578
- activeRadius: a,
579
- hoverRadius: o,
580
- donut: le({ series: c }, t.x, s, i, i, 1.99999, 2, 1, 360, 105.25, i / 2),
581
- donutHover: le({ series: c }, t.x, s, o, o, 1.99999, 2, 1, 360, 105.25, o / 2),
582
- donutFocus: le({ series: c }, G.value.centerX, G.value.centerY, G.value.height / 3.6, G.value.height / 3.6, 1.99999, 2, 1, 360, 105.25, G.value.height / 6)
583
- };
584
- });
585
- });
586
- function hr(e, t, n) {
587
- return se(R.value.style.chart.layout.dataLabels.formatter, e, re({
588
- p: R.value.style.chart.layout.dataLabels.prefix,
589
- v: e,
590
- s: R.value.style.chart.layout.dataLabels.suffix,
591
- r: R.value.style.chart.layout.dataLabels.rounding
592
- }), {
593
- datapoint: t,
594
- index: n
595
- });
596
- }
597
- function gr(e, t) {
598
- return isNaN(e.value / ne(t, "value")) ? 0 : (e.value / ne(t, "value") * 100).toFixed(0) + "%";
599
- }
600
- function _r(e) {
601
- j.value = null, M.value = null, L.value = null, R.value.events.datapointLeave && R.value.events.datapointLeave({
602
- datapoint: e,
603
- seriesIndex: e.seriesIndex + V.value.start
604
- });
605
- }
606
- function vr(e) {
607
- R.value.events.datapointEnter && R.value.events.datapointEnter({
608
- datapoint: e,
609
- seriesIndex: e.index + V.value.start
610
- }), j.value = e.index, M.value = e, L.value = e.index;
611
- }
612
- let yr = S(null);
613
- function br(e, t) {
614
- R.value.events.datapointClick && R.value.events.datapointClick({
615
- datapoint: e,
616
- seriesIndex: e.index + V.value.start
617
- }), !(!e.subtotal || !R.value.style.chart.dialog.show) && (M.value = null, j.value = null, tn.value = !0, N.value = e, zr(e), [null, void 0].includes(t) || (yr.value = t));
618
- }
619
- let xr = u(() => K.value.map((e, t) => ({
620
- name: e.name,
621
- value: e.values.slice(V.value.start, V.value.end).reduce((e, t) => e + t, 0),
622
- shape: "circle",
623
- uid: e.uid,
624
- color: e.color
625
- })).sort((e, t) => t.value - e.value).map((e, t) => ({
626
- ...e,
627
- opacity: A.value.includes(e.uid) ? .5 : 1,
628
- segregate: () => Tr(e.uid),
629
- isSegregated: A.value.includes(e.uid),
630
- display: `${e.name}${R.value.style.chart.legend.showPercentage || R.value.style.chart.legend.showValue ? ": " : ""}${R.value.style.chart.legend.showValue ? se(R.value.style.chart.layout.dataLabels.formatter, e.value, re({
631
- p: R.value.style.chart.layout.dataLabels.prefix,
632
- v: e.value,
633
- s: R.value.style.chart.layout.dataLabels.suffix,
634
- r: R.value.style.chart.legend.roundingValue
635
- }), {
636
- datapoint: e,
637
- seriesIndex: t
638
- }) : ""}${R.value.style.chart.legend.showPercentage ? A.value.includes(e.uid) ? `${R.value.style.chart.legend.showValue ? " (" : ""}- %${R.value.style.chart.legend.showValue ? ")" : ""}` : `${R.value.style.chart.legend.showValue ? " (" : ""}${isNaN(e.value / Sr.value) ? "-" : re({
639
- v: e.value / Sr.value * 100,
640
- s: "%",
641
- r: R.value.style.chart.legend.roundingPercentage
642
- })}${R.value.style.chart.legend.showValue ? ")" : ""}` : ""}`
643
- }))), Sr = u(() => Z.value.map((e) => e.subtotal).reduce((e, t) => e + t, 0)), Cr = u(() => ({
644
- cy: "donut-div-legend",
645
- backgroundColor: R.value.style.chart.legend.backgroundColor,
646
- color: R.value.style.chart.legend.color,
647
- fontSize: R.value.style.chart.legend.fontSize,
648
- paddingBottom: 12,
649
- fontWeight: R.value.style.chart.legend.bold ? "bold" : ""
650
- }));
651
- function wr() {
652
- A.value.length ? A.value = [] : xr.value.forEach((e) => {
653
- A.value.push(e.uid);
654
- }), Fn("selectLegend", lr.value);
655
- }
656
- function Tr(e) {
657
- if (A.value.includes(e)) A.value = A.value.filter((t) => t !== e), Fn("selectLegend", lr.value);
658
- else {
659
- if (A.value.length === K.value.length - 1) return;
660
- A.value.push(e), Fn("selectLegend", lr.value);
661
- }
662
- N.value && br(Z.value.find((e, t) => t === yr.value));
663
- }
664
- function Er(e) {
665
- return K.value.length ? K.value.find((t) => t.name === e) || (R.value.debug && console.warn(`VueUiDonutEvolution - Series name not found "${e}"`), null) : (R.value.debug && console.warn("VueUiDonutEvolution - There are no series to show."), null);
666
- }
667
- function Dr(e) {
668
- let t = Er(e);
669
- t !== null && A.value.includes(t.uid) && Tr(t.uid);
670
- }
671
- function Or(e) {
672
- let t = Er(e);
673
- t !== null && (A.value.includes(t.uid) || Tr(t.uid));
674
- }
675
- let Q = u(() => {
676
- let e = [""].concat(K.value.filter((e) => !A.value.includes(e.uid)).map((e) => ({
677
- name: e.name,
678
- color: e.color
679
- })), ["Σ"]), t = [];
680
- for (let e = 0; e < q.value; e += 1) {
681
- let n = K.value.filter((e) => !A.value.includes(e.uid)).map((t) => t.values[e] ?? 0).reduce((e, t) => e + t, 0);
682
- t.push([J.value[e] ? J.value[e].text : "-"].concat(K.value.filter((e) => !A.value.includes(e.uid)).map((t) => ({
683
- value: t.values[e] ?? 0,
684
- percentage: t.values[e] ? t.values[e] / n * 100 : 0
685
- })), [`${R.value.style.chart.layout.dataLabels.prefix}${Number(n.toFixed(R.value.table.td.roundingValue))}${R.value.style.chart.layout.dataLabels.suffix}`]));
686
- }
687
- return {
688
- head: e,
689
- body: t,
690
- bodyA11y: t.map((e) => e.map((t, n) => n === 0 || n === e.length - 1 ? t : `${hr(t.value ?? 0, null, n)} (${t.percentage.toFixed(1)}%)`)),
691
- config: {
692
- th: {
693
- backgroundColor: R.value.table.th.backgroundColor,
694
- color: R.value.table.th.color,
695
- outline: R.value.table.th.outline
696
- },
697
- td: {
698
- backgroundColor: R.value.table.td.backgroundColor,
699
- color: R.value.table.td.color,
700
- outline: R.value.table.td.outline
701
- },
702
- breakpoint: R.value.table.responsiveBreakpoint
703
- },
704
- colNames: [R.value.table.columnNames.period].concat(K.value.filter((e) => !A.value.includes(e.uid)).map((e) => e.name), R.value.table.columnNames.total)
705
- };
706
- });
707
- function kr() {
708
- return K.value;
709
- }
710
- function Ar(e = null) {
711
- _(() => {
712
- let n = [
713
- [R.value.style.chart.title.text],
714
- [R.value.style.chart.title.subtitle.text],
715
- [""]
716
- ], i = [...Q.value.head.map((e) => e.name ?? e)], a = [...Q.value.body.map((e) => e.map((e) => e.value ?? e))], o = n.concat([i]).concat(a), s = r(o);
717
- e ? e(s) : t({
718
- csvContent: s,
719
- title: R.value.style.chart.title.text || "vue-ui-donut-evolution"
720
- });
721
- });
722
- }
723
- let $ = S(!1);
724
- function jr(e) {
725
- $.value = e, rn.value += 1;
726
- }
727
- function Mr() {
728
- H.value.showTable = !H.value.showTable;
729
- }
730
- let Nr = S(!1);
731
- function Pr() {
732
- Nr.value = !Nr.value;
733
- }
734
- function Fr(e) {
735
- return e.proportion * 100 > R.value.style.chart.donuts.hover.hideLabelsUnderValue;
736
- }
737
- let Ir = S([]), Lr = S({}), Rr = S(null);
738
- function zr(e) {
739
- Ir.value = e.donut.map((e) => ({
740
- name: e.name,
741
- values: [e.value],
742
- color: e.color
743
- })), Lr.value = c({
744
- ...R.value.style.chart.dialog.donutChart,
745
- responsive: !0,
746
- theme: R.value.theme
747
- }), Rr.value && Rr.value.open();
748
- }
749
- async function Br({ scale: e = 2 } = {}) {
750
- if (!P.value) return;
751
- let { width: t, height: n } = P.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await je({
752
- domElement: P.value,
753
- base64: !0,
754
- img: !0,
755
- scale: e
756
- });
757
- return {
758
- imageUri: i,
759
- base64: a,
760
- title: R.value.style.chart.title.text,
761
- width: t,
762
- height: n,
763
- aspectRatio: r
764
- };
765
- }
766
- let Vr = u(() => B.value.width), Hr = u(() => B.value.height);
767
- Ae({
768
- timeLabelsEls: un,
769
- timeLabels: J,
770
- slicer: V,
771
- configRef: R,
772
- rotationPath: [
773
- "style",
774
- "chart",
775
- "layout",
776
- "grid",
777
- "xAxis",
778
- "dataLabels",
779
- "rotation"
780
- ],
781
- autoRotatePath: [
782
- "style",
783
- "chart",
784
- "layout",
785
- "grid",
786
- "xAxis",
787
- "dataLabels",
788
- "autoRotate",
789
- "enable"
790
- ],
791
- isAutoSize: !1,
792
- width: Vr,
793
- height: Hr,
794
- rotation: R.value.style.chart.layout.grid.xAxis.dataLabels.autoRotate.angle
795
- });
796
- let Ur = u(() => {
797
- let e = R.value.table.useDialog && !R.value.table.show, t = H.value.showTable;
798
- return {
799
- component: e ? Zt : Wt,
800
- title: `${R.value.style.chart.title.text}${R.value.style.chart.title.subtitle.text ? `: ${R.value.style.chart.title.subtitle.text}` : ""}`,
801
- props: e ? {
802
- backgroundColor: R.value.table.th.backgroundColor,
803
- color: R.value.table.th.color,
804
- headerColor: R.value.table.th.color,
805
- headerBg: R.value.table.th.backgroundColor,
806
- isFullscreen: $.value,
807
- fullscreenParent: P.value,
808
- forcedWidth: Math.min(800, window.innerWidth * .8),
809
- isCursorPointer: z.value
810
- } : {
811
- hideDetails: !0,
812
- config: {
813
- open: t,
814
- maxHeight: 1e4,
815
- body: {
816
- backgroundColor: R.value.style.chart.backgroundColor,
817
- color: R.value.style.chart.color
818
- },
819
- head: {
820
- backgroundColor: R.value.style.chart.backgroundColor,
821
- color: R.value.style.chart.color
822
- }
823
- }
824
- }
825
- };
826
- });
827
- et(() => H.value.showTable, (e) => {
828
- R.value.table.show || (e && R.value.table.useDialog && mn.value ? mn.value.open() : "close" in mn.value && mn.value.close());
829
- });
830
- function Wr() {
831
- H.value.showTable = !1, hn.value && hn.value.setTableIconState(!1);
832
- }
833
- let Gr = u(() => xr.value.map((e) => ({
834
- ...e,
835
- name: e.display
836
- }))), Kr = u(() => R.value.style.chart.backgroundColor), qr = u(() => R.value.style.chart.legend), Jr = u(() => R.value.style.chart.title), { exportSvg: Yr, getSvg: Xr } = Te({
837
- svg: Zn,
838
- title: Jr,
839
- legend: qr,
840
- legendItems: Gr,
841
- backgroundColor: Kr
842
- });
843
- async function Zr({ isCb: e }) {
844
- _n.value = !0, await _();
845
- try {
846
- if (e) {
847
- let { blob: e, url: t, text: n, dataUrl: r } = await Xr();
848
- await Promise.resolve(R.value.userOptions.callbacks.svg({
849
- blob: e,
850
- url: t,
851
- text: n,
852
- dataUrl: r
853
- }));
854
- } else await Promise.resolve(Yr());
855
- } finally {
856
- _n.value = !1;
857
- }
858
- }
859
- function Qr(e) {
860
- if (e?.stage === "start") {
861
- gn.value = !0;
862
- return;
863
- }
864
- if (e?.stage === "end") {
865
- gn.value = !1;
866
- return;
867
- }
868
- nr();
869
- }
870
- async function $r() {
871
- if (Fn("copyAlt", {
872
- config: R.value,
873
- dataset: Z.value
874
- }), !R.value.userOptions.callbacks.altCopy) {
875
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
876
- return;
877
- }
878
- await Promise.resolve(R.value.userOptions.callbacks.altCopy({
879
- config: R.value,
880
- dataset: Z.value
881
- }));
882
- }
883
- function ei() {
884
- L.value = null, Pn.value = !0;
885
- }
886
- function ti() {
887
- L.value = null, j.value = null, M.value = null, Pn.value = !1;
888
- }
889
- function ni(e) {
890
- if (!Zn.value || Nr.value || document.activeElement !== Zn.value || !Z.value.length) return;
891
- let t = e.key === "ArrowLeft", n = e.key === "ArrowRight", r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
892
- if (!t && !n && !r && !i) return;
893
- if (e.preventDefault(), e.stopPropagation(), i) {
894
- L.value = null, j.value = null, M.value = null;
895
- return;
896
- }
897
- if (r) {
898
- if (L.value === null) return;
899
- let e = Z.value[L.value];
900
- if (!e) return;
901
- br(e, L.value);
902
- return;
903
- }
904
- let a = L.value, o = j.value, s = a !== null && a >= 0 && a < Z.value.length, c = o !== null && o >= 0 && o < Z.value.length;
905
- s ? n ? (a += 1, a >= Z.value.length && (a = 0)) : t && (--a, a < 0 && (a = Z.value.length - 1)) : c ? (a = n ? o + 1 : o - 1, a >= Z.value.length && (a = 0), a < 0 && (a = Z.value.length - 1)) : a = n ? 0 : Z.value.length - 1;
906
- let ee = Z.value[a];
907
- ee && vr(ee);
908
- }
909
- let ri = u(() => ({
910
- headers: Q.value?.colNames ?? [],
911
- rows: Q.value?.bodyA11y ?? []
912
- }));
913
- return Ne({
914
- getData: kr,
915
- getImage: Br,
916
- generatePdf: tr,
917
- generateCsv: Ar,
918
- generateImage: nr,
919
- generateSvg: Zr,
920
- hideSeries: Or,
921
- showSeries: Dr,
922
- toggleTable: Mr,
923
- toggleAnnotator: Pr,
924
- toggleFullscreen: jr,
925
- copyAlt: $r
926
- }), (e, t) => (x(), p("div", {
927
- ref_key: "donutEvolutionChart",
928
- ref: P,
929
- class: v(`vue-data-ui-component vue-ui-donut-evolution ${$.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${R.value.useCssAnimation ? "" : "vue-ui-dna"}`),
930
- style: b(`font-family:${R.value.style.fontFamily};width:100%; text-align:center;background:${R.value.style.chart.backgroundColor}`),
931
- id: k.value,
932
- onMouseenter: t[5] ||= () => E(Yn)(!0),
933
- onMouseleave: t[6] ||= () => E(Yn)(!1)
934
- }, [
935
- m("div", {
936
- id: `chart-instructions-${k.value}`,
937
- class: "sr-only"
938
- }, [m("p", null, T(R.value.a11y.translations.keyboardNavigation), 1)], 8, it),
939
- ri.value?.rows?.length ? (x(), d(Re, {
940
- key: 0,
941
- uid: k.value,
942
- head: ri.value.headers,
943
- body: ri.value.rows,
944
- notice: R.value.a11y.translations.tableAvailable,
945
- caption: R.value.a11y.translations.tableCaption
946
- }, null, 8, [
947
- "uid",
948
- "head",
949
- "body",
950
- "notice",
951
- "caption"
952
- ])) : f("", !0),
953
- R.value.userOptions.buttons.annotator ? (x(), d(E(Jt), {
954
- key: 1,
955
- svgRef: E(Zn),
956
- backgroundColor: R.value.style.chart.backgroundColor,
957
- color: R.value.style.chart.color,
958
- active: Nr.value,
959
- isCursorPointer: z.value,
960
- onClose: Pr
961
- }, {
962
- "annotator-action-close": D(() => [w(e.$slots, "annotator-action-close", {}, void 0, !0)]),
963
- "annotator-action-color": D(({ color: t }) => [w(e.$slots, "annotator-action-color", y(g({ color: t })), void 0, !0)]),
964
- "annotator-action-draw": D(({ mode: t }) => [w(e.$slots, "annotator-action-draw", y(g({ mode: t })), void 0, !0)]),
965
- "annotator-action-undo": D(({ disabled: t }) => [w(e.$slots, "annotator-action-undo", y(g({ disabled: t })), void 0, !0)]),
966
- "annotator-action-redo": D(({ disabled: t }) => [w(e.$slots, "annotator-action-redo", y(g({ disabled: t })), void 0, !0)]),
967
- "annotator-action-delete": D(({ disabled: t }) => [w(e.$slots, "annotator-action-delete", y(g({ disabled: t })), void 0, !0)]),
968
- _: 3
969
- }, 8, [
970
- "svgRef",
971
- "backgroundColor",
972
- "color",
973
- "active",
974
- "isCursorPointer"
975
- ])) : f("", !0),
976
- rr.value ? (x(), p("div", {
977
- key: 2,
978
- ref_key: "noTitle",
979
- ref: nn,
980
- class: "vue-data-ui-no-title-space",
981
- style: "height:36px; width: 100%;background:transparent"
982
- }, null, 512)) : f("", !0),
983
- R.value.style.chart.title.text ? (x(), p("div", {
984
- key: 3,
985
- ref_key: "chartTitle",
986
- ref: Dn,
987
- style: "width:100%;background:transparent;padding-bottom:24px",
988
- onMouseleave: _r
989
- }, [(x(), d(Me, {
990
- key: `title_${on.value}`,
991
- config: {
992
- title: {
993
- cy: "donut-evolution-div-title",
994
- ...R.value.style.chart.title
995
- },
996
- subtitle: {
997
- cy: "donut-evolution-div-subtitle",
998
- ...R.value.style.chart.title.subtitle
999
- }
1000
- }
1001
- }, null, 8, ["config"]))], 544)) : f("", !0),
1002
- m("div", { id: `legend-top-${k.value}` }, null, 8, at),
1003
- R.value.userOptions.show && In.value && (E(Xn) || E(Jn)) ? (x(), d(E(Yt), {
1004
- ref_key: "userOptionsRef",
1005
- ref: hn,
1006
- key: `user_options_${rn.value}`,
1007
- backgroundColor: R.value.style.chart.backgroundColor,
1008
- color: R.value.style.chart.color,
1009
- isPrinting: E($n),
1010
- isImaging: E(er),
1011
- uid: k.value,
1012
- hasPdf: R.value.userOptions.buttons.pdf,
1013
- hasImg: R.value.userOptions.buttons.img,
1014
- hasSvg: R.value.userOptions.buttons.svg,
1015
- hasXls: R.value.userOptions.buttons.csv,
1016
- hasTable: R.value.userOptions.buttons.table,
1017
- hasFullscreen: R.value.userOptions.buttons.fullscreen,
1018
- hasAltCopy: R.value.userOptions.buttons.altCopy,
1019
- isFullscreen: $.value,
1020
- titles: { ...R.value.userOptions.buttonTitles },
1021
- chartElement: P.value,
1022
- position: R.value.userOptions.position,
1023
- hasAnnotator: R.value.userOptions.buttons.annotator,
1024
- isAnnotation: Nr.value,
1025
- callbacks: R.value.userOptions.callbacks,
1026
- printScale: R.value.userOptions.print.scale,
1027
- tableDialog: R.value.table.useDialog,
1028
- isCursorPointer: z.value,
1029
- onToggleFullscreen: jr,
1030
- onGeneratePdf: E(tr),
1031
- onGenerateCsv: Ar,
1032
- onGenerateImage: Qr,
1033
- onGenerateSvg: Zr,
1034
- onToggleTable: Mr,
1035
- onToggleAnnotator: Pr,
1036
- onCopyAlt: $r,
1037
- style: b({ visibility: E(Xn) ? E(Jn) ? "visible" : "hidden" : "visible" })
1038
- }, Ge({ _: 2 }, [
1039
- e.$slots.menuIcon ? {
1040
- name: "menuIcon",
1041
- fn: D(({ isOpen: t, color: n }) => [w(e.$slots, "menuIcon", y(g({
1042
- isOpen: t,
1043
- color: n
1044
- })), void 0, !0)]),
1045
- key: "0"
1046
- } : void 0,
1047
- e.$slots.optionPdf ? {
1048
- name: "optionPdf",
1049
- fn: D(() => [w(e.$slots, "optionPdf", {}, void 0, !0)]),
1050
- key: "1"
1051
- } : void 0,
1052
- e.$slots.optionCsv ? {
1053
- name: "optionCsv",
1054
- fn: D(() => [w(e.$slots, "optionCsv", {}, void 0, !0)]),
1055
- key: "2"
1056
- } : void 0,
1057
- e.$slots.optionImg ? {
1058
- name: "optionImg",
1059
- fn: D(() => [w(e.$slots, "optionImg", {}, void 0, !0)]),
1060
- key: "3"
1061
- } : void 0,
1062
- e.$slots.optionSvg ? {
1063
- name: "optionSvg",
1064
- fn: D(() => [w(e.$slots, "optionSvg", {}, void 0, !0)]),
1065
- key: "4"
1066
- } : void 0,
1067
- e.$slots.optionTable ? {
1068
- name: "optionTable",
1069
- fn: D(() => [w(e.$slots, "optionTable", {}, void 0, !0)]),
1070
- key: "5"
1071
- } : void 0,
1072
- e.$slots.optionFullscreen ? {
1073
- name: "optionFullscreen",
1074
- fn: D(({ toggleFullscreen: t, isFullscreen: n }) => [w(e.$slots, "optionFullscreen", y(g({
1075
- toggleFullscreen: t,
1076
- isFullscreen: n
1077
- })), void 0, !0)]),
1078
- key: "6"
1079
- } : void 0,
1080
- e.$slots.optionAnnotator ? {
1081
- name: "optionAnnotator",
1082
- fn: D(({ toggleAnnotator: t, isAnnotator: n }) => [w(e.$slots, "optionAnnotator", y(g({
1083
- toggleAnnotator: t,
1084
- isAnnotator: n
1085
- })), void 0, !0)]),
1086
- key: "7"
1087
- } : void 0,
1088
- e.$slots.optionAltCopy ? {
1089
- name: "optionAltCopy",
1090
- fn: D(({ altCopy: t }) => [w(e.$slots, "optionAltCopy", y(g({ altCopy: t })), void 0, !0)]),
1091
- key: "8"
1092
- } : void 0,
1093
- e.$slots["custom-menu-before"] ? {
1094
- name: "custom-menu-before",
1095
- fn: D(() => [w(e.$slots, "custom-menu-before", {}, void 0, !0)]),
1096
- key: "9"
1097
- } : void 0,
1098
- e.$slots["custom-menu-after"] ? {
1099
- name: "custom-menu-after",
1100
- fn: D(() => [w(e.$slots, "custom-menu-after", {}, void 0, !0)]),
1101
- key: "10"
1102
- } : void 0
1103
- ]), 1032, [
1104
- "backgroundColor",
1105
- "color",
1106
- "isPrinting",
1107
- "isImaging",
1108
- "uid",
1109
- "hasPdf",
1110
- "hasImg",
1111
- "hasSvg",
1112
- "hasXls",
1113
- "hasTable",
1114
- "hasFullscreen",
1115
- "hasAltCopy",
1116
- "isFullscreen",
1117
- "titles",
1118
- "chartElement",
1119
- "position",
1120
- "hasAnnotator",
1121
- "isAnnotation",
1122
- "callbacks",
1123
- "printScale",
1124
- "tableDialog",
1125
- "isCursorPointer",
1126
- "onGeneratePdf",
1127
- "style"
1128
- ])) : f("", !0),
1129
- m("div", ot, [(x(), p("svg", {
1130
- ref_key: "svgRef",
1131
- ref: Zn,
1132
- xmlns: E(pe),
1133
- "aria-describedby": `chart-instructions-${k.value}`,
1134
- class: v({
1135
- "vue-data-ui-fullscreen--on": $.value,
1136
- "vue-data-ui-fulscreen--off": !$.value,
1137
- "vue-data-ui-no-transition": !E(zn)
1138
- }),
1139
- viewBox: `0 0 ${G.value.absoluteWidth} ${G.value.absoluteHeight}`,
1140
- style: b(`max-width:100%; overflow: visible; background:transparent;color:${R.value.style.chart.color};`),
1141
- tabindex: "0",
1142
- onFocus: ei,
1143
- onBlur: ti,
1144
- onKeydown: ni
1145
- }, [
1146
- qe(E(qt)),
1147
- e.$slots["chart-background"] ? (x(), p("foreignObject", {
1148
- key: 0,
1149
- x: G.value.left,
1150
- y: G.value.top,
1151
- width: G.value.width,
1152
- height: G.value.height,
1153
- style: { pointerEvents: "none" }
1154
- }, [w(e.$slots, "chart-background", {}, void 0, !0)], 8, ct)) : f("", !0),
1155
- m("defs", null, [qe(Ie, {
1156
- t: "linear",
1157
- id: `hover_${k.value}`,
1158
- x1: "0%",
1159
- y1: "0%",
1160
- x2: "0%",
1161
- y2: "100%",
1162
- stops: [[
1163
- "0%",
1164
- E(n)(R.value.style.chart.backgroundColor, R.value.style.chart.layout.highlighter.opacity),
1165
- 1
1166
- ], [
1167
- "100%",
1168
- E(n)(R.value.style.chart.layout.highlighter.color, R.value.style.chart.layout.highlighter.opacity),
1169
- 1
1170
- ]]
1171
- }, null, 8, ["id", "stops"]), qe(Ie, {
1172
- t: "radial",
1173
- id: `focus_${k.value}`,
1174
- stops: [
1175
- [
1176
- "0%",
1177
- E(n)(E(te)(R.value.style.chart.backgroundColor), 0),
1178
- 1
1179
- ],
1180
- [
1181
- "77%",
1182
- E(n)("#FFFFFF", 30),
1183
- 1
1184
- ],
1185
- [
1186
- "100%",
1187
- E(n)(E(te)(R.value.style.chart.backgroundColor), 0),
1188
- 1
1189
- ]
1190
- ]
1191
- }, null, 8, ["id", "stops"])]),
1192
- R.value.style.chart.layout.grid.show ? (x(), p("g", lt, [
1193
- m("line", {
1194
- x1: W.value ? G.value.right : G.value.left,
1195
- x2: W.value ? G.value.right : G.value.left,
1196
- y1: G.value.top,
1197
- y2: G.value.top + G.value.height,
1198
- stroke: R.value.style.chart.layout.grid.stroke,
1199
- "stroke-width": R.value.style.chart.layout.grid.strokeWidth,
1200
- "stroke-linecap": "round"
1201
- }, null, 8, ut),
1202
- m("line", {
1203
- x1: G.value.left,
1204
- x2: G.value.right,
1205
- y1: G.value.bottom,
1206
- y2: G.value.bottom,
1207
- stroke: R.value.style.chart.layout.grid.stroke,
1208
- "stroke-width": R.value.style.chart.layout.grid.strokeWidth,
1209
- "stroke-linecap": "round"
1210
- }, null, 8, dt),
1211
- R.value.style.chart.layout.grid.showVerticalLines ? (x(), p("g", ft, [(x(!0), p(l, null, C(V.value.end - V.value.start, (e, t) => (x(), p("line", {
1212
- x1: G.value.left + (t + 1) * Y.value,
1213
- x2: G.value.left + (t + 1) * Y.value,
1214
- y1: G.value.top,
1215
- y2: G.value.bottom,
1216
- stroke: R.value.style.chart.layout.grid.stroke,
1217
- "stroke-width": R.value.style.chart.layout.grid.strokeWidth,
1218
- "stroke-linecap": "round"
1219
- }, null, 8, pt))), 256))])) : f("", !0)
1220
- ])) : f("", !0),
1221
- m("g", null, [R.value.style.chart.layout.grid.axis.yLabel ? (x(), p("text", {
1222
- key: 0,
1223
- ref_key: "yAxisLabel",
1224
- ref: fn,
1225
- "font-size": R.value.style.chart.layout.grid.axis.fontSize,
1226
- fill: R.value.style.chart.layout.grid.axis.color,
1227
- transform: `translate(${W.value ? G.value.absoluteWidth - R.value.style.chart.layout.grid.axis.fontSize / 2 - R.value.style.chart.layout.grid.axis.yLabelOffsetX : R.value.style.chart.layout.grid.axis.fontSize}, ${G.value.top + G.value.height / 2}) rotate(-90)`,
1228
- "text-anchor": "middle",
1229
- style: { transition: "none" }
1230
- }, T(R.value.style.chart.layout.grid.axis.yLabel), 9, mt)) : f("", !0), R.value.style.chart.layout.grid.axis.xLabel ? (x(), p("text", {
1231
- key: 1,
1232
- ref_key: "xAxisLabel",
1233
- ref: dn,
1234
- "text-anchor": "middle",
1235
- x: G.value.absoluteWidth / 2,
1236
- y: G.value.absoluteHeight - 3,
1237
- "font-size": R.value.style.chart.layout.grid.axis.fontSize,
1238
- fill: R.value.style.chart.layout.grid.axis.color
1239
- }, T(R.value.style.chart.layout.grid.axis.xLabel), 9, ht)) : f("", !0)]),
1240
- R.value.style.chart.layout.grid.yAxis.dataLabels.show ? (x(), p("g", {
1241
- key: 2,
1242
- ref_key: "scaleLabels",
1243
- ref: ln,
1244
- class: v({
1245
- "donut-opacity": !0,
1246
- "donut-behind": j.value !== null
1247
- })
1248
- }, [(x(!0), p(l, null, C(mr.value, (e, t) => (x(), p("g", { key: `sl_${t}` }, [e.value >= X.value.min && e.value <= X.value.max ? (x(), p("path", {
1249
- key: 0,
1250
- class: v({ "vue-data-ui-transition": E(zn) }),
1251
- d: `M${W.value ? G.value.right : G.value.left},${e.y} ${W.value ? G.value.right + 5 : G.value.left - 5},${e.y}`,
1252
- stroke: R.value.style.chart.layout.grid.stroke,
1253
- "stroke-width": R.value.style.chart.layout.grid.strokeWidth,
1254
- "stroke-linecap": "round"
1255
- }, null, 10, gt)) : f("", !0), e.value >= X.value.min && e.value <= X.value.max ? (x(), p("text", {
1256
- key: 1,
1257
- class: v({ "vue-data-ui-transition": E(zn) }),
1258
- transform: `translate(${W.value ? G.value.right - R.value.style.chart.layout.grid.yAxis.dataLabels.offsetX + 7 : G.value.left + R.value.style.chart.layout.grid.yAxis.dataLabels.offsetX - 7}, ${e.y + R.value.style.chart.layout.grid.yAxis.dataLabels.fontSize / 3})`,
1259
- "font-size": R.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,
1260
- "text-anchor": W.value ? "start" : "end",
1261
- fill: R.value.style.chart.layout.grid.yAxis.dataLabels.color,
1262
- "font-weight": R.value.style.chart.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
1263
- }, T(E(_e)(e.value) ? E(se)(R.value.style.chart.layout.dataLabels.formatter, e.value, E(re)({
1264
- p: R.value.style.chart.layout.dataLabels.prefix,
1265
- v: e.value,
1266
- s: R.value.style.chart.layout.dataLabels.suffix,
1267
- r: R.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue
1268
- }), {
1269
- datapoint: e,
1270
- seriesIndex: t
1271
- }) : ""), 11, _t)) : f("", !0)]))), 128))], 2)) : f("", !0),
1272
- R.value.style.chart.layout.grid.xAxis.dataLabels.show ? (x(), p("g", {
1273
- key: 3,
1274
- ref_key: "timeLabelsEls",
1275
- ref: un,
1276
- class: v({ "donut-opacity": !0 })
1277
- }, [(x(!0), p(l, null, C(V.value.end - V.value.start, (e, t) => (x(), p("g", null, [(R.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast && (t === 0 || t === q.value - 1) || !R.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast) && J.value[t] && J.value[t].text ? (x(), p("g", vt, [String(J.value[t].text).includes("\n") ? (x(), p("text", {
1278
- key: 1,
1279
- class: "vue-data-ui-time-label",
1280
- "text-anchor": R.value.style.chart.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : R.value.style.chart.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
1281
- "font-size": R.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
1282
- fill: R.value.style.chart.layout.grid.xAxis.dataLabels.color,
1283
- transform: `translate(${G.value.left + Y.value * t + Y.value / 2}, ${G.value.bottom + R.value.style.chart.layout.grid.xAxis.dataLabels.fontSize + R.value.style.chart.layout.grid.xAxis.dataLabels.offsetY}), rotate(${R.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`,
1284
- innerHTML: E(i)({
1285
- content: String(J.value[t].text),
1286
- fontSize: R.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
1287
- fill: R.value.style.chart.layout.grid.xAxis.dataLabels.color,
1288
- x: 0,
1289
- y: 0
1290
- })
1291
- }, null, 8, bt)) : (x(), p("text", {
1292
- key: 0,
1293
- class: "vue-data-ui-time-label",
1294
- "text-anchor": R.value.style.chart.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : R.value.style.chart.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
1295
- "font-size": R.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
1296
- fill: R.value.style.chart.layout.grid.xAxis.dataLabels.color,
1297
- transform: `translate(${G.value.left + Y.value * t + Y.value / 2}, ${G.value.bottom + R.value.style.chart.layout.grid.xAxis.dataLabels.fontSize + R.value.style.chart.layout.grid.xAxis.dataLabels.offsetY}), rotate(${R.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`
1298
- }, T(J.value[t].text || ""), 9, yt))])) : f("", !0)]))), 256))], 512)) : f("", !0),
1299
- (x(!0), p(l, null, C(Z.value, (e, t) => (x(), p("g", null, [R.value.style.chart.layout.line.show && t < Z.value.length - 1 && ![e.subtotal, Z.value[t + 1].subtotal].includes(null) ? (x(), p("line", {
1300
- key: 0,
1301
- class: v({
1302
- "donut-opacity": !0,
1303
- "donut-behind": j.value !== null
1304
- }),
1305
- x1: e.x,
1306
- y1: e.y,
1307
- x2: Z.value[t + 1].x,
1308
- y2: Z.value[t + 1].y,
1309
- stroke: R.value.style.chart.layout.line.stroke,
1310
- "stroke-width": R.value.style.chart.layout.line.strokeWidth,
1311
- "stroke-linecap": "round",
1312
- "stroke-linejoin": "round"
1313
- }, null, 10, xt)) : f("", !0), e.subtotal === null ? f("", !0) : (x(), p("g", St, [e.subtotal ? (x(), p("circle", {
1314
- key: 0,
1315
- cx: e.x,
1316
- cy: e.y,
1317
- r: e.activeRadius,
1318
- fill: R.value.style.chart.backgroundColor
1319
- }, null, 8, Ct)) : f("", !0)]))]))), 256)),
1320
- (x(!0), p(l, null, C(Z.value, (e, t) => (x(), p("g", { class: v({
1321
- "donut-opacity": !0,
1322
- "donut-behind": t !== j.value && j.value !== null
1323
- }) }, [e.subtotal ? (x(), p("g", wt, [j.value !== null && j.value === t ? (x(), p("g", Tt, [
1324
- (x(!0), p(l, null, C(e.donutHover, (t) => (x(), p("g", null, [Fr(t) ? (x(), p("path", {
1325
- key: 0,
1326
- d: E(oe)(t, {
1327
- x: t.center.endX,
1328
- y: t.center.endY
1329
- }, 12, 12, {
1330
- x: e.x,
1331
- y: e.y
1332
- }, !1, 20),
1333
- stroke: t.color,
1334
- "stroke-width": "1",
1335
- "stroke-linecap": "round",
1336
- "stroke-linejoin": "round",
1337
- fill: "none"
1338
- }, null, 8, Et)) : f("", !0)]))), 256)),
1339
- (x(!0), p(l, null, C(e.donutHover, (t, n) => (x(), p("g", null, [Fr(t) ? (x(), p("text", {
1340
- key: 0,
1341
- "data-cy-hover-label": "",
1342
- "text-anchor": E(ae)(t, !0, 0).anchor,
1343
- x: E(ae)(t, !0, 9).x,
1344
- y: E(ue)(t, 14, 10),
1345
- fill: R.value.style.chart.layout.grid.yAxis.dataLabels.color,
1346
- "font-size": 8,
1347
- "font-weight": "bold"
1348
- }, T(t.name) + ": " + T(gr(t, e.donut)) + " (" + T(t.value === null ? "-" : hr(t.value, t, n)) + ") ", 9, Dt)) : f("", !0)]))), 256)),
1349
- m("g", null, [m("circle", {
1350
- cx: e.x,
1351
- cy: e.y,
1352
- r: e.hoverRadius,
1353
- fill: R.value.style.chart.backgroundColor
1354
- }, null, 8, Ot)])
1355
- ])) : f("", !0)])) : f("", !0)], 2))), 256)),
1356
- (x(!0), p(l, null, C(Z.value, (e, t) => (x(), p("g", { class: v({
1357
- "donut-opacity": !0,
1358
- "donut-behind": t !== j.value && j.value !== null
1359
- }) }, [e.subtotal === null ? f("", !0) : (x(), p("g", kt, [e.subtotal === 0 ? (x(), p("circle", {
1360
- key: 0,
1361
- cx: e.x,
1362
- cy: e.y,
1363
- r: 3,
1364
- fill: R.value.style.chart.color
1365
- }, null, 8, At)) : j.value !== null && j.value === t ? (x(), p("g", jt, [(x(!0), p(l, null, C(e.donutHover, (e, t) => (x(), p("path", {
1366
- d: e.arcSlice,
1367
- fill: `${e.color}`,
1368
- "stroke-width": 1,
1369
- stroke: R.value.style.chart.backgroundColor
1370
- }, null, 8, Mt))), 256))])) : (x(), p("g", Nt, [(x(!0), p(l, null, C(e.donut, (e, t) => (x(), p("path", {
1371
- d: e.arcSlice,
1372
- fill: `${e.color}`,
1373
- "stroke-width": .5,
1374
- stroke: R.value.style.chart.backgroundColor
1375
- }, null, 8, Pt))), 256))]))]))], 2))), 256)),
1376
- (x(!0), p(l, null, C(Z.value, (e, t) => (x(), p("g", { class: v({
1377
- "donut-opacity": !0,
1378
- "donut-behind": t !== j.value && j.value !== null || tn.value && t !== N.value.index
1379
- }) }, [e.subtotal !== null && R.value.style.chart.layout.dataLabels.show ? (x(), p("text", {
1380
- key: 0,
1381
- "text-anchor": "middle",
1382
- x: e.x,
1383
- y: j.value === e.index && e.subtotal ? e.y + R.value.style.chart.layout.dataLabels.fontSize / 3 : e.y - e.radius - R.value.style.chart.layout.dataLabels.fontSize + R.value.style.chart.layout.dataLabels.offsetY,
1384
- "font-size": R.value.style.chart.layout.dataLabels.fontSize,
1385
- "font-weight": "bold",
1386
- fill: R.value.style.chart.layout.dataLabels.color
1387
- }, T(hr(e.subtotal, e, t)), 9, Ft)) : f("", !0)], 2))), 256)),
1388
- (x(!0), p(l, null, C(Z.value, (e, t) => (x(), p("rect", {
1389
- x: G.value.left + t * Y.value,
1390
- y: G.value.top,
1391
- width: Y.value,
1392
- height: G.value.height,
1393
- fill: [j.value, yr.value].includes(e.index) ? `url(#hover_${k.value})` : "transparent",
1394
- class: v({ "donut-hover": z.value && e.subtotal && [j.value, yr.value].includes(e.index) }),
1395
- style: { pointerEvents: "none" }
1396
- }, null, 10, It))), 256)),
1397
- (x(!0), p(l, null, C(Z.value, (e, t) => (x(), p("rect", {
1398
- "data-cy-trap": "",
1399
- x: G.value.left + t * Y.value,
1400
- y: G.value.top,
1401
- width: Y.value,
1402
- height: G.value.height,
1403
- fill: "transparent",
1404
- onMouseenter: (t) => vr(e),
1405
- onMouseleave: (t) => _r(e),
1406
- onClick: (n) => br(e, t),
1407
- class: v({ "donut-hover": z.value && j.value === e.index && e.subtotal })
1408
- }, null, 42, Lt))), 256)),
1409
- w(e.$slots, "svg", { svg: {
1410
- ...G.value,
1411
- isPrintingImg: E($n) || E(er) || gn.value,
1412
- isPrintingSvg: _n.value
1413
- } }, void 0, !0)
1414
- ], 46, st)), e.$slots.hint ? (x(), p("div", Rt, [w(e.$slots, "hint", y(g({
1415
- hint: R.value.a11y.translations.keyboardNavigation,
1416
- isVisible: Pn.value
1417
- })), void 0, !0)])) : f("", !0)]),
1418
- e.$slots.watermark ? (x(), p("div", zt, [w(e.$slots, "watermark", y(g({ isPrinting: E($n) || E(er) || gn.value || _n.value })), void 0, !0)])) : f("", !0),
1419
- m("div", {
1420
- ref_key: "chartSlicer",
1421
- ref: jn,
1422
- style: b(`width:100%;background:${R.value.style.chart.backgroundColor}`),
1423
- "data-dom-to-png-ignore": ""
1424
- }, [q.value > 1 && R.value.style.chart.zoom.show ? (x(), d(Ue, {
1425
- ref_key: "slicerComponent",
1426
- ref: An,
1427
- key: `slicer_${an.value}`,
1428
- background: R.value.style.chart.zoom.color,
1429
- borderColor: R.value.style.chart.backgroundColor,
1430
- fontSize: R.value.style.chart.zoom.fontSize,
1431
- useResetSlot: R.value.style.chart.zoom.useResetSlot,
1432
- labelLeft: J.value[0] ? J.value[0].text : "",
1433
- labelRight: J.value.at(-1) ? J.value.at(-1).text : "",
1434
- textColor: R.value.style.chart.color,
1435
- inputColor: R.value.style.chart.zoom.color,
1436
- selectColor: R.value.style.chart.zoom.highlightColor,
1437
- max: q.value,
1438
- min: 0,
1439
- valueStart: V.value.start,
1440
- valueEnd: V.value.end,
1441
- start: V.value.start,
1442
- "onUpdate:start": t[0] ||= (e) => V.value.start = e,
1443
- end: V.value.end,
1444
- "onUpdate:end": t[1] ||= (e) => V.value.end = e,
1445
- refreshStartPoint: R.value.style.chart.zoom.startIndex === null ? 0 : R.value.style.chart.zoom.startIndex,
1446
- refreshEndPoint: R.value.style.chart.zoom.endIndex === null ? q.value : R.value.style.chart.zoom.endIndex + 1,
1447
- enableRangeHandles: R.value.style.chart.zoom.enableRangeHandles,
1448
- enableSelectionDrag: R.value.style.chart.zoom.enableSelectionDrag,
1449
- focusOnDrag: R.value.style.chart.zoom.focusOnDrag,
1450
- focusRangeRatio: R.value.style.chart.zoom.focusRangeRatio,
1451
- isCursorPointer: z.value,
1452
- maxWidth: R.value.style.chart.zoom.maxWidth,
1453
- minimapLeftInsetRatio: G.value.absoluteWidth > 0 && R.value.style.chart.zoom.autoFit ? G.value.left / G.value.absoluteWidth : null,
1454
- minimapRightInsetRatio: G.value.absoluteWidth > 0 && R.value.style.chart.zoom.autoFit ? (G.value.absoluteWidth - G.value.right) / G.value.absoluteWidth : null,
1455
- onReset: Gn
1456
- }, {
1457
- "reset-action": D(({ reset: t }) => [w(e.$slots, "reset-action", y(g({ reset: t })), void 0, !0)]),
1458
- _: 3
1459
- }, 8, [
1460
- "background",
1461
- "borderColor",
1462
- "fontSize",
1463
- "useResetSlot",
1464
- "labelLeft",
1465
- "labelRight",
1466
- "textColor",
1467
- "inputColor",
1468
- "selectColor",
1469
- "max",
1470
- "valueStart",
1471
- "valueEnd",
1472
- "start",
1473
- "end",
1474
- "refreshStartPoint",
1475
- "refreshEndPoint",
1476
- "enableRangeHandles",
1477
- "enableSelectionDrag",
1478
- "focusOnDrag",
1479
- "focusRangeRatio",
1480
- "isCursorPointer",
1481
- "maxWidth",
1482
- "minimapLeftInsetRatio",
1483
- "minimapRightInsetRatio"
1484
- ])) : f("", !0)], 4),
1485
- m("div", { id: `legend-bottom-${k.value}` }, null, 8, Bt),
1486
- pn.value && (R.value.style.chart.legend.show || e.$slots.legend) ? (x(), d(We, {
1487
- key: 6,
1488
- to: R.value.style.chart.legend.position === "top" ? `#legend-top-${k.value}` : `#legend-bottom-${k.value}`
1489
- }, [m("div", {
1490
- ref_key: "chartLegend",
1491
- ref: On
1492
- }, [w(e.$slots, "legend", { legend: xr.value }, () => [R.value.style.chart.legend.show ? (x(), d(Ve, {
1493
- key: `legend_${cn.value}`,
1494
- legendSet: xr.value,
1495
- config: Cr.value,
1496
- onClickMarker: t[2] ||= ({ legend: e }) => Tr(e.uid)
1497
- }, {
1498
- item: D(({ legend: e, index: t }) => [m("div", {
1499
- onClick: (t) => Tr(e.uid),
1500
- style: b(`opacity:${A.value.includes(e.uid) ? .5 : 1}`)
1501
- }, T(e.display), 13, Vt)]),
1502
- legendToggle: D(() => [xr.value.length > 2 && R.value.style.chart.legend.selectAllToggle.show && !E(Vn) ? (x(), d(Le, {
1503
- key: 0,
1504
- backgroundColor: R.value.style.chart.legend.selectAllToggle.backgroundColor,
1505
- color: R.value.style.chart.legend.selectAllToggle.color,
1506
- fontSize: R.value.style.chart.legend.fontSize,
1507
- checked: A.value.length > 0,
1508
- onToggle: wr
1509
- }, null, 8, [
1510
- "backgroundColor",
1511
- "color",
1512
- "fontSize",
1513
- "checked"
1514
- ])) : f("", !0)]),
1515
- _: 1
1516
- }, 8, ["legendSet", "config"])) : f("", !0)], !0)], 512)], 8, ["to"])) : f("", !0),
1517
- e.$slots.source ? (x(), p("div", {
1518
- key: 7,
1519
- ref_key: "source",
1520
- ref: kn,
1521
- dir: "auto"
1522
- }, [w(e.$slots, "source", {}, void 0, !0)], 512)) : f("", !0),
1523
- In.value && R.value.userOptions.buttons.table ? (x(), d(Ze(Ur.value.component), Je({ key: 8 }, Ur.value.props, {
1524
- ref_key: "tableUnit",
1525
- ref: mn,
1526
- onClose: Wr
1527
- }), Ge({
1528
- content: D(() => [(x(), d(E(Kt), {
1529
- key: `table_${sn.value}`,
1530
- colNames: Q.value.colNames,
1531
- head: Q.value.head,
1532
- body: Q.value.body,
1533
- config: Q.value.config,
1534
- title: R.value.table.useDialog ? "" : Ur.value.title,
1535
- withCloseButton: !R.value.table.useDialog,
1536
- isCursorPointer: z.value,
1537
- onClose: Wr
1538
- }, {
1539
- th: D(({ th: e }) => [Ke(T(e.name ?? e), 1)]),
1540
- td: D(({ td: e }) => [e.value === null ? (x(), p("span", Ht, "-")) : (x(), p("b", Ut, T(isNaN(e.value) ? "" : R.value.style.chart.layout.dataLabels.prefix) + T(!isNaN(e.value) && e.value !== null ? Number(e.value.toFixed(R.value.table.td.roundingValue)).toLocaleString() : e) + T(isNaN(e.value) ? "" : R.value.style.chart.layout.dataLabels.suffix), 1)), m("span", null, T(e.percentage && !isNaN(e.percentage) ? `(${Number(e.percentage.toFixed(R.value.table.td.roundingPercentage)).toLocaleString()}%)` : ""), 1)]),
1541
- _: 1
1542
- }, 8, [
1543
- "colNames",
1544
- "head",
1545
- "body",
1546
- "config",
1547
- "title",
1548
- "withCloseButton",
1549
- "isCursorPointer"
1550
- ]))]),
1551
- _: 2
1552
- }, [R.value.table.useDialog ? {
1553
- name: "title",
1554
- fn: D(() => [Ke(T(Ur.value.title), 1)]),
1555
- key: "0"
1556
- } : void 0, R.value.table.useDialog ? {
1557
- name: "actions",
1558
- fn: D(() => [m("button", {
1559
- tabindex: "0",
1560
- class: "vue-ui-user-options-button",
1561
- onClick: t[3] ||= (e) => Ar(R.value.userOptions.callbacks.csv),
1562
- style: b({ cursor: z.value ? "cursor" : "default" })
1563
- }, [qe(E(Gt), {
1564
- name: "fileCsv",
1565
- stroke: Ur.value.props.color
1566
- }, null, 8, ["stroke"])], 4)]),
1567
- key: "1"
1568
- } : void 0]), 1040)) : f("", !0),
1569
- R.value.style.chart.dialog.show ? (x(), d(E(Zt), {
1570
- key: 9,
1571
- ref_key: "dialog",
1572
- ref: Rr,
1573
- onClose: t[4] ||= (e) => {
1574
- N.value = null, tn.value = !1, M.value = null, j.value = null, yr.value = null;
1575
- },
1576
- backgroundColor: R.value.style.chart.dialog.backgroundColor,
1577
- color: R.value.style.chart.dialog.color,
1578
- headerBg: R.value.style.chart.dialog.header.backgroundColor,
1579
- headerColor: R.value.style.chart.dialog.header.color,
1580
- isFullscreen: $.value,
1581
- fullscreenParent: P.value
1582
- }, {
1583
- title: D(() => [Ke(T(J.value[Number(N.value.index)] ? J.value[Number(N.value.index)].text : ""), 1)]),
1584
- content: D(() => [N.value ? (x(), d(E(Xt), {
1585
- key: 0,
1586
- config: Lr.value,
1587
- dataset: Ir.value
1588
- }, null, 8, ["config", "dataset"])) : f("", !0)]),
1589
- _: 1
1590
- }, 8, [
1591
- "backgroundColor",
1592
- "color",
1593
- "headerBg",
1594
- "headerColor",
1595
- "isFullscreen",
1596
- "fullscreenParent"
1597
- ])) : f("", !0),
1598
- E(Vn) ? (x(), d(we, { key: 10 })) : f("", !0)
1599
- ], 46, rt));
1600
- }
1601
- }, [["__scopeId", "data-v-7d5348e7"]]);
1602
- //#endregion
1603
- export { nt as n, Wt as t };