vue-data-ui 3.23.0 → 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 (206) hide show
  1. package/dist/{Arrow-o2qHNvrC.js → Arrow-CF0VFcBH.js} +1 -1
  2. package/dist/{BaseDraggableDialog-qTnfhLBz.js → BaseDraggableDialog-LoqqwRtV.js} +2 -2
  3. package/dist/{BaseIcon-91MZoczJ.js → BaseIcon-BfndwIWE.js} +1 -1
  4. package/dist/{BaseLegendToggle-CtAPwzr2.js → BaseLegendToggle-DZVucLnv.js} +1 -1
  5. package/dist/{BaseZoomControls-rdzlicuz.js → BaseZoomControls-BZvCnZEi.js} +2 -2
  6. package/dist/{ColorPicker-CIAkdPrj.js → ColorPicker--ayG2YHf.js} +2 -2
  7. package/dist/{DataTable-D4tM9s5Y.js → DataTable-BbKgJ5UI.js} +2 -2
  8. package/dist/{HillActions-BWhxHlrj.js → HillActions-BD9j_sOU.js} +1 -1
  9. package/dist/{Legend-CQTRlzK-.js → Legend-CQxUgOd-.js} +2 -2
  10. package/dist/{NonSvgPenAndPaper-Cawacw1W.js → NonSvgPenAndPaper-4ypecDg1.js} +6 -6
  11. package/dist/{PackageVersion--QCMh5k_.js → PackageVersion-DXU7nRr9.js} +1 -1
  12. package/dist/{PenAndPaper-cE4J8-rA.js → PenAndPaper-DAE-tnEQ.js} +6 -6
  13. package/dist/{Shape-BPMV94Ij.js → Shape-C21CMlWS.js} +1 -1
  14. package/dist/SlicerPreview-wUw1hFwe.js +1703 -0
  15. package/dist/{SparkTooltip-BaYtEKS6.js → SparkTooltip-CjsbIhzi.js} +1 -1
  16. package/dist/{Title-BODtwViI.js → Title-BE3qg9xl.js} +1 -1
  17. package/dist/{Tooltip-CMTGxeYO.js → Tooltip-DhjyfHwz.js} +2 -2
  18. package/dist/{UserOptions-3ujTo3LD.js → UserOptions-Dt98of5H.js} +2 -2
  19. package/dist/components/arrow.js +1 -1
  20. package/dist/components/vue-ui-3d-bar.js +1 -1
  21. package/dist/components/vue-ui-accordion.js +1 -1
  22. package/dist/components/vue-ui-age-pyramid.js +1 -1
  23. package/dist/components/vue-ui-annotator.js +1 -1
  24. package/dist/components/vue-ui-bullet.js +1 -1
  25. package/dist/components/vue-ui-bump.js +1 -1
  26. package/dist/components/vue-ui-candlestick.js +1 -1
  27. package/dist/components/vue-ui-carousel-table.js +1 -1
  28. package/dist/components/vue-ui-chestnut.js +1 -1
  29. package/dist/components/vue-ui-chord.js +1 -1
  30. package/dist/components/vue-ui-circle-pack.js +1 -1
  31. package/dist/components/vue-ui-cursor.js +1 -1
  32. package/dist/components/vue-ui-dag.js +1 -1
  33. package/dist/components/vue-ui-dashboard.js +1 -1
  34. package/dist/components/vue-ui-digits.js +1 -1
  35. package/dist/components/vue-ui-donut-evolution.js +1 -1
  36. package/dist/components/vue-ui-donut.js +1 -1
  37. package/dist/components/vue-ui-dumbbell.js +1 -1
  38. package/dist/components/vue-ui-flow.js +1 -1
  39. package/dist/components/vue-ui-funnel.js +1 -1
  40. package/dist/components/vue-ui-galaxy.js +1 -1
  41. package/dist/components/vue-ui-gauge.js +1 -1
  42. package/dist/components/vue-ui-geo.js +1 -1
  43. package/dist/components/vue-ui-gizmo.js +1 -1
  44. package/dist/components/vue-ui-heatmap.js +1 -1
  45. package/dist/components/vue-ui-hill.js +1 -1
  46. package/dist/components/vue-ui-history-plot.js +1 -1
  47. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  48. package/dist/components/vue-ui-icon.js +1 -1
  49. package/dist/components/vue-ui-kpi.js +1 -1
  50. package/dist/components/vue-ui-mini-loader.js +1 -1
  51. package/dist/components/vue-ui-molecule.js +1 -1
  52. package/dist/components/vue-ui-mood-radar.js +1 -1
  53. package/dist/components/vue-ui-nested-donuts.js +1 -1
  54. package/dist/components/vue-ui-onion.js +1 -1
  55. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  56. package/dist/components/vue-ui-quadrant.js +1 -1
  57. package/dist/components/vue-ui-quick-chart.js +1 -1
  58. package/dist/components/vue-ui-radar.js +1 -1
  59. package/dist/components/vue-ui-rating.js +1 -1
  60. package/dist/components/vue-ui-relation-circle.js +1 -1
  61. package/dist/components/vue-ui-ridgeline.js +1 -1
  62. package/dist/components/vue-ui-rings.js +1 -1
  63. package/dist/components/vue-ui-scatter.js +1 -1
  64. package/dist/components/vue-ui-skeleton.js +1 -1
  65. package/dist/components/vue-ui-smiley.js +1 -1
  66. package/dist/components/vue-ui-spark-trend.js +1 -1
  67. package/dist/components/vue-ui-sparkbar.js +1 -1
  68. package/dist/components/vue-ui-sparkgauge.js +1 -1
  69. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  70. package/dist/components/vue-ui-sparkline.js +1 -1
  71. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  72. package/dist/components/vue-ui-stackbar.js +1 -1
  73. package/dist/components/vue-ui-stackline.js +1 -1
  74. package/dist/components/vue-ui-strip-plot.js +1 -1
  75. package/dist/components/vue-ui-table-heatmap.js +1 -1
  76. package/dist/components/vue-ui-table-sparkline.js +1 -1
  77. package/dist/components/vue-ui-table.js +1 -1
  78. package/dist/components/vue-ui-thermometer.js +1 -1
  79. package/dist/components/vue-ui-timer.js +1 -1
  80. package/dist/components/vue-ui-tiremarks.js +1 -1
  81. package/dist/components/vue-ui-treemap.js +1 -1
  82. package/dist/components/vue-ui-vertical-bar.js +1 -1
  83. package/dist/components/vue-ui-waffle.js +1 -1
  84. package/dist/components/vue-ui-wheel.js +1 -1
  85. package/dist/components/vue-ui-word-cloud.js +1 -1
  86. package/dist/components/vue-ui-world.js +1 -1
  87. package/dist/components/vue-ui-xy-canvas.js +1 -1
  88. package/dist/components/vue-ui-xy.js +1 -1
  89. package/dist/composables.js +1 -1
  90. package/dist/{dom-to-png-4tdMNGPX.js → dom-to-png-BYIvdTe8.js} +1 -1
  91. package/dist/{exposedLib-DWLRqRhv.js → exposedLib-C0DPCgFj.js} +7 -4
  92. package/dist/{geoProjections-BCP_PoiB.js → geoProjections-CEo3dVaL.js} +1 -1
  93. package/dist/{img-DIQG5q8T.js → img-Bnokohej.js} +1 -1
  94. package/dist/{labelUtils-C5lnc_xc.js → labelUtils-BeVpDvTJ.js} +1 -1
  95. package/dist/{lib-BuMGJ_a0.js → lib-Bttd6u5E.js} +21 -11
  96. package/dist/{package-BMc_ZieJ.js → package-bsfpO6y3.js} +1 -1
  97. package/dist/{pdf-Cnz4NKM9.js → pdf-CVIDfCrS.js} +1 -1
  98. package/dist/{render-common-Ktg2LZFG.js → render-common-C0PEe9so.js} +2 -2
  99. package/dist/ssr/vue-ui-donut.js +1 -1
  100. package/dist/ssr/vue-ui-xy.js +1 -1
  101. package/dist/ssr.js +2 -2
  102. package/dist/style.css +1 -1
  103. package/dist/types/vue-data-ui.d.ts +9 -0
  104. package/dist/{useSvgExport-Ba9qBr9M.js → useChartExport-DNiwdPmb.js} +48 -2
  105. package/dist/{useConfig-BilxnBNr.js → useConfig-DlNpz6P8.js} +13 -1
  106. package/dist/{useNestedProp--NSEmhOH.js → useNestedProp-vPNvh7rV.js} +5 -3
  107. package/dist/{useObjectBindings-Cwq7NcQz.js → useObjectBindings-BeWS5v0i.js} +1 -1
  108. package/dist/{usePrinter-BFvi4jVy.js → usePrinter-DN5bYhTG.js} +2 -2
  109. package/dist/{useTimeLabels-B9CEuiLZ.js → useTimeLabels-d2f-W1L4.js} +2 -4
  110. package/dist/{useTooltipPosition-BsRysTrw.js → useTooltipPosition-DifeoeQW.js} +13 -13
  111. package/dist/utils.js +3 -3
  112. package/dist/{vue-data-ui-EsawKe_W.js → vue-data-ui-BNxtW8pK.js} +69 -69
  113. package/dist/vue-data-ui.js +74 -74
  114. package/dist/{vue-ui-3d-bar-RSUS2xpL.js → vue-ui-3d-bar-BYumVxZG.js} +147 -165
  115. package/dist/{vue-ui-accordion-61MlW-Ge.js → vue-ui-accordion-DegI2lzR.js} +4 -4
  116. package/dist/vue-ui-age-pyramid-tJx_hCsS.js +1241 -0
  117. package/dist/{vue-ui-annotator-DBRT85HG.js → vue-ui-annotator-DfG79D4r.js} +41 -68
  118. package/dist/vue-ui-bullet-DrWG4jRy.js +700 -0
  119. package/dist/{vue-ui-bump-Dvv3iSKr.js → vue-ui-bump-mKysp0KO.js} +222 -272
  120. package/dist/vue-ui-candlestick-PgKcBZdy.js +1837 -0
  121. package/dist/vue-ui-carousel-table-DRvycNBl.js +467 -0
  122. package/dist/{vue-ui-chestnut-ArloORzP.js → vue-ui-chestnut-Dpklo-VE.js} +311 -365
  123. package/dist/vue-ui-chord-7PPVH_iG.js +1345 -0
  124. package/dist/vue-ui-circle-pack-DW4Os6_8.js +1636 -0
  125. package/dist/{vue-ui-cursor-CxgE6Phh.js → vue-ui-cursor-DIt7vOwc.js} +4 -4
  126. package/dist/{vue-ui-dag-C9Sf9vH7.js → vue-ui-dag-Cl0WdSLb.js} +812 -840
  127. package/dist/{vue-ui-dashboard-bGmaglAj.js → vue-ui-dashboard-BwxRLR4E.js} +70 -70
  128. package/dist/{vue-ui-digits-DgDE-_Fn.js → vue-ui-digits-Bp1OH_t1.js} +5 -5
  129. package/dist/{vue-ui-donut-B_n6wF6B.js → vue-ui-donut-BZUT7QYt.js} +352 -377
  130. package/dist/vue-ui-donut-evolution-CQy3ZKXk.js +1549 -0
  131. package/dist/{vue-ui-donut-Bmo149AR.js → vue-ui-donut-y6tOAVyY.js} +18 -17
  132. package/dist/{vue-ui-dumbbell-BX4Ao_wR.js → vue-ui-dumbbell-BtKZcAOV.js} +370 -420
  133. package/dist/{vue-ui-flow-Bshw8pT_.js → vue-ui-flow-BF_cndsv.js} +191 -216
  134. package/dist/vue-ui-funnel-z3AeiDu6.js +750 -0
  135. package/dist/{vue-ui-galaxy-CvXgy-dy.js → vue-ui-galaxy-ClWaSOmM.js} +276 -302
  136. package/dist/vue-ui-gauge-CJstpakj.js +932 -0
  137. package/dist/{vue-ui-geo-C-gSZL2q.js → vue-ui-geo-B1tOD3HC.js} +398 -449
  138. package/dist/{vue-ui-gizmo-CJdxyPID.js → vue-ui-gizmo-foatosAv.js} +4 -4
  139. package/dist/{vue-ui-heatmap-DEEKv8ip.js → vue-ui-heatmap-By33A9dZ.js} +479 -502
  140. package/dist/{vue-ui-hill-D7LYAgAL.js → vue-ui-hill-ewqkK9s5.js} +570 -593
  141. package/dist/vue-ui-history-plot-FEIwXlsz.js +1698 -0
  142. package/dist/{vue-ui-horizontal-bar-CfFye5tL.js → vue-ui-horizontal-bar-D51sAeVu.js} +307 -332
  143. package/dist/{vue-ui-kpi-DCBnNfTb.js → vue-ui-kpi-y3EkgqJQ.js} +4 -4
  144. package/dist/{vue-ui-mini-loader-CtWpqnLW.js → vue-ui-mini-loader-CtTewZJG.js} +3 -3
  145. package/dist/vue-ui-molecule-paWHp18h.js +935 -0
  146. package/dist/{vue-ui-mood-radar-sl6DMxqR.js → vue-ui-mood-radar-wBRTZI5k.js} +341 -390
  147. package/dist/vue-ui-nested-donuts-CB-HOLo2.js +1503 -0
  148. package/dist/vue-ui-onion-B2Q2n55x.js +1233 -0
  149. package/dist/{vue-ui-parallel-coordinate-plot-DE9wTmQQ.js → vue-ui-parallel-coordinate-plot-GpkXiIZA.js} +189 -214
  150. package/dist/{vue-ui-quadrant-SaY_RPSE.js → vue-ui-quadrant-DOPuejDE.js} +254 -284
  151. package/dist/{vue-ui-quick-chart-CJ9rejnj.js → vue-ui-quick-chart-CgHX9njq.js} +108 -109
  152. package/dist/{vue-ui-radar-CaNen5Fj.js → vue-ui-radar-BLvG-_zE.js} +407 -434
  153. package/dist/{vue-ui-rating--K7rX2an.js → vue-ui-rating-BDVSVFA0.js} +10 -11
  154. package/dist/vue-ui-relation-circle-plOXwxJ5.js +903 -0
  155. package/dist/vue-ui-ridgeline-BbrnXvBo.js +1614 -0
  156. package/dist/{vue-ui-rings-BevKD8P-.js → vue-ui-rings-B3cKfMWy.js} +419 -444
  157. package/dist/vue-ui-scatter-BY7waF2T.js +2403 -0
  158. package/dist/{vue-ui-skeleton-B9ZP1w-i.js → vue-ui-skeleton-DwKxd7fk.js} +4 -4
  159. package/dist/{vue-ui-smiley-DYnqqk6u.js → vue-ui-smiley-5iHJeTPc.js} +64 -65
  160. package/dist/{vue-ui-spark-trend-R0ebpg-G.js → vue-ui-spark-trend-MpvrV5Wd.js} +11 -11
  161. package/dist/{vue-ui-sparkbar-DYC3By0v.js → vue-ui-sparkbar-s-2rBmEz.js} +97 -100
  162. package/dist/{vue-ui-sparkgauge-Bw6no-In.js → vue-ui-sparkgauge-B-BYVv4p.js} +4 -4
  163. package/dist/{vue-ui-sparkhistogram-DvRKy8rq.js → vue-ui-sparkhistogram-D7D4NHdi.js} +18 -19
  164. package/dist/{vue-ui-sparkline-Dz1uzBos.js → vue-ui-sparkline-RbeYtLWp.js} +11 -11
  165. package/dist/{vue-ui-sparkstackbar-DlnPdZih.js → vue-ui-sparkstackbar-ohN7mtbg.js} +194 -198
  166. package/dist/{vue-ui-stackbar-B-THcavY.js → vue-ui-stackbar-D2bpvQYt.js} +530 -552
  167. package/dist/{vue-ui-stackline-3dBPoI0h.js → vue-ui-stackline-Bo1oE8yq.js} +592 -614
  168. package/dist/vue-ui-strip-plot-CZ-C4a5x.js +1734 -0
  169. package/dist/vue-ui-table-3PPiJPV6.js +1352 -0
  170. package/dist/{vue-ui-table-heatmap-DVwMqzje.js → vue-ui-table-heatmap-D1bbPXKG.js} +56 -57
  171. package/dist/{vue-ui-table-sparkline-CABJzK8p.js → vue-ui-table-sparkline-l1cUX3ny.js} +13 -15
  172. package/dist/{vue-ui-thermometer-CVQ-H69Q.js → vue-ui-thermometer-DltAELO7.js} +240 -261
  173. package/dist/{vue-ui-timer-Bm8LpsnI.js → vue-ui-timer-DWNdx47q.js} +6 -6
  174. package/dist/vue-ui-tiremarks-GYhji_fa.js +538 -0
  175. package/dist/{vue-ui-treemap-DP0Sx8Y8.js → vue-ui-treemap-DjNlnOG5.js} +521 -547
  176. package/dist/vue-ui-waffle-BAA9EX6O.js +1386 -0
  177. package/dist/vue-ui-wheel-DrefGLos.js +871 -0
  178. package/dist/{vue-ui-word-cloud-B2sxtel9.js → vue-ui-word-cloud-CQZ8AyOi.js} +382 -405
  179. package/dist/{vue-ui-world-BBQZLnzm.js → vue-ui-world-Y7a3VEjq.js} +426 -451
  180. package/dist/{vue-ui-xy-DZj5DT-q.js → vue-ui-xy-CJcdttNL.js} +879 -905
  181. package/dist/{vue-ui-xy-ChZg7AtI.js → vue-ui-xy-DPxtkYGc.js} +329 -326
  182. package/dist/{vue-ui-xy-canvas-BN2u0bOJ.js → vue-ui-xy-canvas-1rbwMA1m.js} +30 -27
  183. package/package.json +4 -4
  184. package/dist/Slicer-5yIrdoJv.js +0 -1149
  185. package/dist/SlicerPreview-DvjLV2TW.js +0 -1689
  186. package/dist/vue-ui-age-pyramid-CgnPWA93.js +0 -1263
  187. package/dist/vue-ui-bullet-Bc3-WaN1.js +0 -724
  188. package/dist/vue-ui-candlestick-DvvsrIdp.js +0 -1864
  189. package/dist/vue-ui-carousel-table-DtsNVim8.js +0 -463
  190. package/dist/vue-ui-chord-xX5gWZy8.js +0 -1396
  191. package/dist/vue-ui-circle-pack-D8wykmqg.js +0 -1638
  192. package/dist/vue-ui-donut-evolution-D6vH_hfx.js +0 -1598
  193. package/dist/vue-ui-funnel-CjYosIik.js +0 -797
  194. package/dist/vue-ui-gauge-CByT0_vF.js +0 -953
  195. package/dist/vue-ui-history-plot-BhcU94Pt.js +0 -1722
  196. package/dist/vue-ui-molecule-D3igGyOy.js +0 -958
  197. package/dist/vue-ui-nested-donuts-aS4YzaB3.js +0 -1528
  198. package/dist/vue-ui-onion-EhPTZpW_.js +0 -1258
  199. package/dist/vue-ui-relation-circle-FLs8vOxQ.js +0 -925
  200. package/dist/vue-ui-ridgeline-Beg5hshN.js +0 -1663
  201. package/dist/vue-ui-scatter-CNA7jF-o.js +0 -2428
  202. package/dist/vue-ui-strip-plot-ACeYOoHj.js +0 -1757
  203. package/dist/vue-ui-table-rFy16bp0.js +0 -1347
  204. package/dist/vue-ui-tiremarks-DB3f5qiz.js +0 -559
  205. package/dist/vue-ui-waffle-iPpdk1Bm.js +0 -1412
  206. package/dist/vue-ui-wheel-BJkEYfLj.js +0 -892
@@ -1,1598 +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-BuMGJ_a0.js";
3
- import { n as ve, t as ye } from "./useHints-Dq_w2E8B.js";
4
- import { t as be } from "./useTimeLabels-B9CEuiLZ.js";
5
- import { t as xe } from "./useConfig-BilxnBNr.js";
6
- import { t as Se } from "./usePrinter-BFvi4jVy.js";
7
- import { n as Ce, t as we } from "./BaseScanner-DZvpgOjM.js";
8
- import { t as Te } from "./useSvgExport-Ba9qBr9M.js";
9
- import { t as Ee } from "./useNestedProp--NSEmhOH.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-DIQG5q8T.js";
15
- import { n as Me } from "./Title-BODtwViI.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-CtAPwzr2.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-CQTRlzK-.js";
24
- import { t as He } from "./vue_ui_donut_evolution-D1yAAIHr.js";
25
- import { t as Ue } from "./Slicer-5yIrdoJv.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-61MlW-Ge.js").then((e) => e.n)), Gt = h(() => import("./BaseIcon-91MZoczJ.js").then((e) => e.n)), Kt = h(() => import("./DataTable-D4tM9s5Y.js")), qt = h(() => import("./PackageVersion--QCMh5k_.js").then((e) => e.t)), Jt = h(() => import("./PenAndPaper-cE4J8-rA.js").then((e) => e.t)), Yt = h(() => import("./UserOptions-3ujTo3LD.js").then((e) => e.n)), Xt = h(() => import("./vue-ui-donut-B_n6wF6B.js").then((e) => e.n)), Zt = h(() => import("./BaseDraggableDialog-qTnfhLBz.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 = r(n.concat([i]).concat(a));
717
- e ? e(o) : t({
718
- csvContent: o,
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
- Ae({
767
- timeLabelsEls: un,
768
- timeLabels: J,
769
- slicer: V,
770
- configRef: R,
771
- rotationPath: [
772
- "style",
773
- "chart",
774
- "layout",
775
- "grid",
776
- "xAxis",
777
- "dataLabels",
778
- "rotation"
779
- ],
780
- autoRotatePath: [
781
- "style",
782
- "chart",
783
- "layout",
784
- "grid",
785
- "xAxis",
786
- "dataLabels",
787
- "autoRotate",
788
- "enable"
789
- ],
790
- isAutoSize: !1,
791
- width: u(() => B.value.width),
792
- height: u(() => B.value.height),
793
- rotation: R.value.style.chart.layout.grid.xAxis.dataLabels.autoRotate.angle
794
- });
795
- let Vr = u(() => {
796
- let e = R.value.table.useDialog && !R.value.table.show, t = H.value.showTable;
797
- return {
798
- component: e ? Zt : Wt,
799
- title: `${R.value.style.chart.title.text}${R.value.style.chart.title.subtitle.text ? `: ${R.value.style.chart.title.subtitle.text}` : ""}`,
800
- props: e ? {
801
- backgroundColor: R.value.table.th.backgroundColor,
802
- color: R.value.table.th.color,
803
- headerColor: R.value.table.th.color,
804
- headerBg: R.value.table.th.backgroundColor,
805
- isFullscreen: $.value,
806
- fullscreenParent: P.value,
807
- forcedWidth: Math.min(800, window.innerWidth * .8),
808
- isCursorPointer: z.value
809
- } : {
810
- hideDetails: !0,
811
- config: {
812
- open: t,
813
- maxHeight: 1e4,
814
- body: {
815
- backgroundColor: R.value.style.chart.backgroundColor,
816
- color: R.value.style.chart.color
817
- },
818
- head: {
819
- backgroundColor: R.value.style.chart.backgroundColor,
820
- color: R.value.style.chart.color
821
- }
822
- }
823
- }
824
- };
825
- });
826
- et(() => H.value.showTable, (e) => {
827
- R.value.table.show || (e && R.value.table.useDialog && mn.value ? mn.value.open() : "close" in mn.value && mn.value.close());
828
- });
829
- function Hr() {
830
- H.value.showTable = !1, hn.value && hn.value.setTableIconState(!1);
831
- }
832
- let Ur = u(() => xr.value.map((e) => ({
833
- ...e,
834
- name: e.display
835
- }))), Wr = u(() => R.value.style.chart.backgroundColor), Gr = u(() => R.value.style.chart.legend), { exportSvg: Kr, getSvg: qr } = Te({
836
- svg: Zn,
837
- title: u(() => R.value.style.chart.title),
838
- legend: Gr,
839
- legendItems: Ur,
840
- backgroundColor: Wr
841
- });
842
- async function Jr({ isCb: e }) {
843
- _n.value = !0, await _();
844
- try {
845
- if (e) {
846
- let { blob: e, url: t, text: n, dataUrl: r } = await qr();
847
- await Promise.resolve(R.value.userOptions.callbacks.svg({
848
- blob: e,
849
- url: t,
850
- text: n,
851
- dataUrl: r
852
- }));
853
- } else await Promise.resolve(Kr());
854
- } finally {
855
- _n.value = !1;
856
- }
857
- }
858
- function Yr(e) {
859
- if (e?.stage === "start") {
860
- gn.value = !0;
861
- return;
862
- }
863
- if (e?.stage === "end") {
864
- gn.value = !1;
865
- return;
866
- }
867
- nr();
868
- }
869
- async function Xr() {
870
- if (Fn("copyAlt", {
871
- config: R.value,
872
- dataset: Z.value
873
- }), !R.value.userOptions.callbacks.altCopy) {
874
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
875
- return;
876
- }
877
- await Promise.resolve(R.value.userOptions.callbacks.altCopy({
878
- config: R.value,
879
- dataset: Z.value
880
- }));
881
- }
882
- function Zr() {
883
- L.value = null, Pn.value = !0;
884
- }
885
- function Qr() {
886
- L.value = null, j.value = null, M.value = null, Pn.value = !1;
887
- }
888
- function $r(e) {
889
- if (!Zn.value || Nr.value || document.activeElement !== Zn.value || !Z.value.length) return;
890
- let t = e.key === "ArrowLeft", n = e.key === "ArrowRight", r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
891
- if (!t && !n && !r && !i) return;
892
- if (e.preventDefault(), e.stopPropagation(), i) {
893
- L.value = null, j.value = null, M.value = null;
894
- return;
895
- }
896
- if (r) {
897
- if (L.value === null) return;
898
- let e = Z.value[L.value];
899
- if (!e) return;
900
- br(e, L.value);
901
- return;
902
- }
903
- 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;
904
- 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;
905
- let ee = Z.value[a];
906
- ee && vr(ee);
907
- }
908
- let ei = u(() => ({
909
- headers: Q.value?.colNames ?? [],
910
- rows: Q.value?.bodyA11y ?? []
911
- }));
912
- return Ne({
913
- getData: kr,
914
- getImage: Br,
915
- generatePdf: tr,
916
- generateCsv: Ar,
917
- generateImage: nr,
918
- generateSvg: Jr,
919
- hideSeries: Or,
920
- showSeries: Dr,
921
- toggleTable: Mr,
922
- toggleAnnotator: Pr,
923
- toggleFullscreen: jr,
924
- copyAlt: Xr
925
- }), (e, t) => (x(), p("div", {
926
- ref_key: "donutEvolutionChart",
927
- ref: P,
928
- class: v(`vue-data-ui-component vue-ui-donut-evolution ${$.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${R.value.useCssAnimation ? "" : "vue-ui-dna"}`),
929
- style: b(`font-family:${R.value.style.fontFamily};width:100%; text-align:center;background:${R.value.style.chart.backgroundColor}`),
930
- id: k.value,
931
- onMouseenter: t[5] ||= () => E(Yn)(!0),
932
- onMouseleave: t[6] ||= () => E(Yn)(!1)
933
- }, [
934
- m("div", {
935
- id: `chart-instructions-${k.value}`,
936
- class: "sr-only"
937
- }, [m("p", null, T(R.value.a11y.translations.keyboardNavigation), 1)], 8, it),
938
- ei.value?.rows?.length ? (x(), d(Re, {
939
- key: 0,
940
- uid: k.value,
941
- head: ei.value.headers,
942
- body: ei.value.rows,
943
- notice: R.value.a11y.translations.tableAvailable,
944
- caption: R.value.a11y.translations.tableCaption
945
- }, null, 8, [
946
- "uid",
947
- "head",
948
- "body",
949
- "notice",
950
- "caption"
951
- ])) : f("", !0),
952
- R.value.userOptions.buttons.annotator ? (x(), d(E(Jt), {
953
- key: 1,
954
- svgRef: E(Zn),
955
- backgroundColor: R.value.style.chart.backgroundColor,
956
- color: R.value.style.chart.color,
957
- active: Nr.value,
958
- isCursorPointer: z.value,
959
- onClose: Pr
960
- }, {
961
- "annotator-action-close": D(() => [w(e.$slots, "annotator-action-close", {}, void 0, !0)]),
962
- "annotator-action-color": D(({ color: t }) => [w(e.$slots, "annotator-action-color", y(g({ color: t })), void 0, !0)]),
963
- "annotator-action-draw": D(({ mode: t }) => [w(e.$slots, "annotator-action-draw", y(g({ mode: t })), void 0, !0)]),
964
- "annotator-action-undo": D(({ disabled: t }) => [w(e.$slots, "annotator-action-undo", y(g({ disabled: t })), void 0, !0)]),
965
- "annotator-action-redo": D(({ disabled: t }) => [w(e.$slots, "annotator-action-redo", y(g({ disabled: t })), void 0, !0)]),
966
- "annotator-action-delete": D(({ disabled: t }) => [w(e.$slots, "annotator-action-delete", y(g({ disabled: t })), void 0, !0)]),
967
- _: 3
968
- }, 8, [
969
- "svgRef",
970
- "backgroundColor",
971
- "color",
972
- "active",
973
- "isCursorPointer"
974
- ])) : f("", !0),
975
- rr.value ? (x(), p("div", {
976
- key: 2,
977
- ref_key: "noTitle",
978
- ref: nn,
979
- class: "vue-data-ui-no-title-space",
980
- style: "height:36px; width: 100%;background:transparent"
981
- }, null, 512)) : f("", !0),
982
- R.value.style.chart.title.text ? (x(), p("div", {
983
- key: 3,
984
- ref_key: "chartTitle",
985
- ref: Dn,
986
- style: "width:100%;background:transparent;padding-bottom:24px",
987
- onMouseleave: _r
988
- }, [(x(), d(Me, {
989
- key: `title_${on.value}`,
990
- config: {
991
- title: {
992
- cy: "donut-evolution-div-title",
993
- ...R.value.style.chart.title
994
- },
995
- subtitle: {
996
- cy: "donut-evolution-div-subtitle",
997
- ...R.value.style.chart.title.subtitle
998
- }
999
- }
1000
- }, null, 8, ["config"]))], 544)) : f("", !0),
1001
- m("div", { id: `legend-top-${k.value}` }, null, 8, at),
1002
- R.value.userOptions.show && In.value && (E(Xn) || E(Jn)) ? (x(), d(E(Yt), {
1003
- ref_key: "userOptionsRef",
1004
- ref: hn,
1005
- key: `user_options_${rn.value}`,
1006
- backgroundColor: R.value.style.chart.backgroundColor,
1007
- color: R.value.style.chart.color,
1008
- isPrinting: E($n),
1009
- isImaging: E(er),
1010
- uid: k.value,
1011
- hasPdf: R.value.userOptions.buttons.pdf,
1012
- hasImg: R.value.userOptions.buttons.img,
1013
- hasSvg: R.value.userOptions.buttons.svg,
1014
- hasXls: R.value.userOptions.buttons.csv,
1015
- hasTable: R.value.userOptions.buttons.table,
1016
- hasFullscreen: R.value.userOptions.buttons.fullscreen,
1017
- hasAltCopy: R.value.userOptions.buttons.altCopy,
1018
- isFullscreen: $.value,
1019
- titles: { ...R.value.userOptions.buttonTitles },
1020
- chartElement: P.value,
1021
- position: R.value.userOptions.position,
1022
- hasAnnotator: R.value.userOptions.buttons.annotator,
1023
- isAnnotation: Nr.value,
1024
- callbacks: R.value.userOptions.callbacks,
1025
- printScale: R.value.userOptions.print.scale,
1026
- tableDialog: R.value.table.useDialog,
1027
- isCursorPointer: z.value,
1028
- onToggleFullscreen: jr,
1029
- onGeneratePdf: E(tr),
1030
- onGenerateCsv: Ar,
1031
- onGenerateImage: Yr,
1032
- onGenerateSvg: Jr,
1033
- onToggleTable: Mr,
1034
- onToggleAnnotator: Pr,
1035
- onCopyAlt: Xr,
1036
- style: b({ visibility: E(Xn) ? E(Jn) ? "visible" : "hidden" : "visible" })
1037
- }, Ge({ _: 2 }, [
1038
- e.$slots.menuIcon ? {
1039
- name: "menuIcon",
1040
- fn: D(({ isOpen: t, color: n }) => [w(e.$slots, "menuIcon", y(g({
1041
- isOpen: t,
1042
- color: n
1043
- })), void 0, !0)]),
1044
- key: "0"
1045
- } : void 0,
1046
- e.$slots.optionPdf ? {
1047
- name: "optionPdf",
1048
- fn: D(() => [w(e.$slots, "optionPdf", {}, void 0, !0)]),
1049
- key: "1"
1050
- } : void 0,
1051
- e.$slots.optionCsv ? {
1052
- name: "optionCsv",
1053
- fn: D(() => [w(e.$slots, "optionCsv", {}, void 0, !0)]),
1054
- key: "2"
1055
- } : void 0,
1056
- e.$slots.optionImg ? {
1057
- name: "optionImg",
1058
- fn: D(() => [w(e.$slots, "optionImg", {}, void 0, !0)]),
1059
- key: "3"
1060
- } : void 0,
1061
- e.$slots.optionSvg ? {
1062
- name: "optionSvg",
1063
- fn: D(() => [w(e.$slots, "optionSvg", {}, void 0, !0)]),
1064
- key: "4"
1065
- } : void 0,
1066
- e.$slots.optionTable ? {
1067
- name: "optionTable",
1068
- fn: D(() => [w(e.$slots, "optionTable", {}, void 0, !0)]),
1069
- key: "5"
1070
- } : void 0,
1071
- e.$slots.optionFullscreen ? {
1072
- name: "optionFullscreen",
1073
- fn: D(({ toggleFullscreen: t, isFullscreen: n }) => [w(e.$slots, "optionFullscreen", y(g({
1074
- toggleFullscreen: t,
1075
- isFullscreen: n
1076
- })), void 0, !0)]),
1077
- key: "6"
1078
- } : void 0,
1079
- e.$slots.optionAnnotator ? {
1080
- name: "optionAnnotator",
1081
- fn: D(({ toggleAnnotator: t, isAnnotator: n }) => [w(e.$slots, "optionAnnotator", y(g({
1082
- toggleAnnotator: t,
1083
- isAnnotator: n
1084
- })), void 0, !0)]),
1085
- key: "7"
1086
- } : void 0,
1087
- e.$slots.optionAltCopy ? {
1088
- name: "optionAltCopy",
1089
- fn: D(({ altCopy: t }) => [w(e.$slots, "optionAltCopy", y(g({ altCopy: t })), void 0, !0)]),
1090
- key: "8"
1091
- } : void 0,
1092
- e.$slots["custom-menu-before"] ? {
1093
- name: "custom-menu-before",
1094
- fn: D(() => [w(e.$slots, "custom-menu-before", {}, void 0, !0)]),
1095
- key: "9"
1096
- } : void 0,
1097
- e.$slots["custom-menu-after"] ? {
1098
- name: "custom-menu-after",
1099
- fn: D(() => [w(e.$slots, "custom-menu-after", {}, void 0, !0)]),
1100
- key: "10"
1101
- } : void 0
1102
- ]), 1032, [
1103
- "backgroundColor",
1104
- "color",
1105
- "isPrinting",
1106
- "isImaging",
1107
- "uid",
1108
- "hasPdf",
1109
- "hasImg",
1110
- "hasSvg",
1111
- "hasXls",
1112
- "hasTable",
1113
- "hasFullscreen",
1114
- "hasAltCopy",
1115
- "isFullscreen",
1116
- "titles",
1117
- "chartElement",
1118
- "position",
1119
- "hasAnnotator",
1120
- "isAnnotation",
1121
- "callbacks",
1122
- "printScale",
1123
- "tableDialog",
1124
- "isCursorPointer",
1125
- "onGeneratePdf",
1126
- "style"
1127
- ])) : f("", !0),
1128
- m("div", ot, [(x(), p("svg", {
1129
- ref_key: "svgRef",
1130
- ref: Zn,
1131
- xmlns: E(pe),
1132
- "aria-describedby": `chart-instructions-${k.value}`,
1133
- class: v({
1134
- "vue-data-ui-fullscreen--on": $.value,
1135
- "vue-data-ui-fulscreen--off": !$.value,
1136
- "vue-data-ui-no-transition": !E(zn)
1137
- }),
1138
- viewBox: `0 0 ${G.value.absoluteWidth} ${G.value.absoluteHeight}`,
1139
- style: b(`max-width:100%; overflow: visible; background:transparent;color:${R.value.style.chart.color};`),
1140
- tabindex: "0",
1141
- onFocus: Zr,
1142
- onBlur: Qr,
1143
- onKeydown: $r
1144
- }, [
1145
- qe(E(qt)),
1146
- e.$slots["chart-background"] ? (x(), p("foreignObject", {
1147
- key: 0,
1148
- x: G.value.left,
1149
- y: G.value.top,
1150
- width: G.value.width,
1151
- height: G.value.height,
1152
- style: { pointerEvents: "none" }
1153
- }, [w(e.$slots, "chart-background", {}, void 0, !0)], 8, ct)) : f("", !0),
1154
- m("defs", null, [qe(Ie, {
1155
- t: "linear",
1156
- id: `hover_${k.value}`,
1157
- x1: "0%",
1158
- y1: "0%",
1159
- x2: "0%",
1160
- y2: "100%",
1161
- stops: [[
1162
- "0%",
1163
- E(n)(R.value.style.chart.backgroundColor, R.value.style.chart.layout.highlighter.opacity),
1164
- 1
1165
- ], [
1166
- "100%",
1167
- E(n)(R.value.style.chart.layout.highlighter.color, R.value.style.chart.layout.highlighter.opacity),
1168
- 1
1169
- ]]
1170
- }, null, 8, ["id", "stops"]), qe(Ie, {
1171
- t: "radial",
1172
- id: `focus_${k.value}`,
1173
- stops: [
1174
- [
1175
- "0%",
1176
- E(n)(E(te)(R.value.style.chart.backgroundColor), 0),
1177
- 1
1178
- ],
1179
- [
1180
- "77%",
1181
- E(n)("#FFFFFF", 30),
1182
- 1
1183
- ],
1184
- [
1185
- "100%",
1186
- E(n)(E(te)(R.value.style.chart.backgroundColor), 0),
1187
- 1
1188
- ]
1189
- ]
1190
- }, null, 8, ["id", "stops"])]),
1191
- R.value.style.chart.layout.grid.show ? (x(), p("g", lt, [
1192
- m("line", {
1193
- x1: W.value ? G.value.right : G.value.left,
1194
- x2: W.value ? G.value.right : G.value.left,
1195
- y1: G.value.top,
1196
- y2: G.value.top + G.value.height,
1197
- stroke: R.value.style.chart.layout.grid.stroke,
1198
- "stroke-width": R.value.style.chart.layout.grid.strokeWidth,
1199
- "stroke-linecap": "round"
1200
- }, null, 8, ut),
1201
- m("line", {
1202
- x1: G.value.left,
1203
- x2: G.value.right,
1204
- y1: G.value.bottom,
1205
- y2: G.value.bottom,
1206
- stroke: R.value.style.chart.layout.grid.stroke,
1207
- "stroke-width": R.value.style.chart.layout.grid.strokeWidth,
1208
- "stroke-linecap": "round"
1209
- }, null, 8, dt),
1210
- 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", {
1211
- x1: G.value.left + (t + 1) * Y.value,
1212
- x2: G.value.left + (t + 1) * Y.value,
1213
- y1: G.value.top,
1214
- y2: G.value.bottom,
1215
- stroke: R.value.style.chart.layout.grid.stroke,
1216
- "stroke-width": R.value.style.chart.layout.grid.strokeWidth,
1217
- "stroke-linecap": "round"
1218
- }, null, 8, pt))), 256))])) : f("", !0)
1219
- ])) : f("", !0),
1220
- m("g", null, [R.value.style.chart.layout.grid.axis.yLabel ? (x(), p("text", {
1221
- key: 0,
1222
- ref_key: "yAxisLabel",
1223
- ref: fn,
1224
- "font-size": R.value.style.chart.layout.grid.axis.fontSize,
1225
- fill: R.value.style.chart.layout.grid.axis.color,
1226
- 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)`,
1227
- "text-anchor": "middle",
1228
- style: { transition: "none" }
1229
- }, T(R.value.style.chart.layout.grid.axis.yLabel), 9, mt)) : f("", !0), R.value.style.chart.layout.grid.axis.xLabel ? (x(), p("text", {
1230
- key: 1,
1231
- ref_key: "xAxisLabel",
1232
- ref: dn,
1233
- "text-anchor": "middle",
1234
- x: G.value.absoluteWidth / 2,
1235
- y: G.value.absoluteHeight - 3,
1236
- "font-size": R.value.style.chart.layout.grid.axis.fontSize,
1237
- fill: R.value.style.chart.layout.grid.axis.color
1238
- }, T(R.value.style.chart.layout.grid.axis.xLabel), 9, ht)) : f("", !0)]),
1239
- R.value.style.chart.layout.grid.yAxis.dataLabels.show ? (x(), p("g", {
1240
- key: 2,
1241
- ref_key: "scaleLabels",
1242
- ref: ln,
1243
- class: v({
1244
- "donut-opacity": !0,
1245
- "donut-behind": j.value !== null
1246
- })
1247
- }, [(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", {
1248
- key: 0,
1249
- class: v({ "vue-data-ui-transition": E(zn) }),
1250
- d: `M${W.value ? G.value.right : G.value.left},${e.y} ${W.value ? G.value.right + 5 : G.value.left - 5},${e.y}`,
1251
- stroke: R.value.style.chart.layout.grid.stroke,
1252
- "stroke-width": R.value.style.chart.layout.grid.strokeWidth,
1253
- "stroke-linecap": "round"
1254
- }, null, 10, gt)) : f("", !0), e.value >= X.value.min && e.value <= X.value.max ? (x(), p("text", {
1255
- key: 1,
1256
- class: v({ "vue-data-ui-transition": E(zn) }),
1257
- 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})`,
1258
- "font-size": R.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,
1259
- "text-anchor": W.value ? "start" : "end",
1260
- fill: R.value.style.chart.layout.grid.yAxis.dataLabels.color,
1261
- "font-weight": R.value.style.chart.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
1262
- }, T(E(_e)(e.value) ? E(se)(R.value.style.chart.layout.dataLabels.formatter, e.value, E(re)({
1263
- p: R.value.style.chart.layout.dataLabels.prefix,
1264
- v: e.value,
1265
- s: R.value.style.chart.layout.dataLabels.suffix,
1266
- r: R.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue
1267
- }), {
1268
- datapoint: e,
1269
- seriesIndex: t
1270
- }) : ""), 11, _t)) : f("", !0)]))), 128))], 2)) : f("", !0),
1271
- R.value.style.chart.layout.grid.xAxis.dataLabels.show ? (x(), p("g", {
1272
- key: 3,
1273
- ref_key: "timeLabelsEls",
1274
- ref: un,
1275
- class: v({ "donut-opacity": !0 })
1276
- }, [(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", {
1277
- key: 1,
1278
- class: "vue-data-ui-time-label",
1279
- "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",
1280
- "font-size": R.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
1281
- fill: R.value.style.chart.layout.grid.xAxis.dataLabels.color,
1282
- 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})`,
1283
- innerHTML: E(i)({
1284
- content: String(J.value[t].text),
1285
- fontSize: R.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
1286
- fill: R.value.style.chart.layout.grid.xAxis.dataLabels.color,
1287
- x: 0,
1288
- y: 0
1289
- })
1290
- }, null, 8, bt)) : (x(), p("text", {
1291
- key: 0,
1292
- class: "vue-data-ui-time-label",
1293
- "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",
1294
- "font-size": R.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
1295
- fill: R.value.style.chart.layout.grid.xAxis.dataLabels.color,
1296
- 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})`
1297
- }, T(J.value[t].text || ""), 9, yt))])) : f("", !0)]))), 256))], 512)) : f("", !0),
1298
- (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", {
1299
- key: 0,
1300
- class: v({
1301
- "donut-opacity": !0,
1302
- "donut-behind": j.value !== null
1303
- }),
1304
- x1: e.x,
1305
- y1: e.y,
1306
- x2: Z.value[t + 1].x,
1307
- y2: Z.value[t + 1].y,
1308
- stroke: R.value.style.chart.layout.line.stroke,
1309
- "stroke-width": R.value.style.chart.layout.line.strokeWidth,
1310
- "stroke-linecap": "round",
1311
- "stroke-linejoin": "round"
1312
- }, null, 10, xt)) : f("", !0), e.subtotal === null ? f("", !0) : (x(), p("g", St, [e.subtotal ? (x(), p("circle", {
1313
- key: 0,
1314
- cx: e.x,
1315
- cy: e.y,
1316
- r: e.activeRadius,
1317
- fill: R.value.style.chart.backgroundColor
1318
- }, null, 8, Ct)) : f("", !0)]))]))), 256)),
1319
- (x(!0), p(l, null, C(Z.value, (e, t) => (x(), p("g", { class: v({
1320
- "donut-opacity": !0,
1321
- "donut-behind": t !== j.value && j.value !== null
1322
- }) }, [e.subtotal ? (x(), p("g", wt, [j.value !== null && j.value === t ? (x(), p("g", Tt, [
1323
- (x(!0), p(l, null, C(e.donutHover, (t) => (x(), p("g", null, [Fr(t) ? (x(), p("path", {
1324
- key: 0,
1325
- d: E(oe)(t, {
1326
- x: t.center.endX,
1327
- y: t.center.endY
1328
- }, 12, 12, {
1329
- x: e.x,
1330
- y: e.y
1331
- }, !1, 20),
1332
- stroke: t.color,
1333
- "stroke-width": "1",
1334
- "stroke-linecap": "round",
1335
- "stroke-linejoin": "round",
1336
- fill: "none"
1337
- }, null, 8, Et)) : f("", !0)]))), 256)),
1338
- (x(!0), p(l, null, C(e.donutHover, (t, n) => (x(), p("g", null, [Fr(t) ? (x(), p("text", {
1339
- key: 0,
1340
- "data-cy-hover-label": "",
1341
- "text-anchor": E(ae)(t, !0, 0).anchor,
1342
- x: E(ae)(t, !0, 9).x,
1343
- y: E(ue)(t, 14, 10),
1344
- fill: R.value.style.chart.layout.grid.yAxis.dataLabels.color,
1345
- "font-size": 8,
1346
- "font-weight": "bold"
1347
- }, T(t.name) + ": " + T(gr(t, e.donut)) + " (" + T(t.value === null ? "-" : hr(t.value, t, n)) + ") ", 9, Dt)) : f("", !0)]))), 256)),
1348
- m("g", null, [m("circle", {
1349
- cx: e.x,
1350
- cy: e.y,
1351
- r: e.hoverRadius,
1352
- fill: R.value.style.chart.backgroundColor
1353
- }, null, 8, Ot)])
1354
- ])) : f("", !0)])) : f("", !0)], 2))), 256)),
1355
- (x(!0), p(l, null, C(Z.value, (e, t) => (x(), p("g", { class: v({
1356
- "donut-opacity": !0,
1357
- "donut-behind": t !== j.value && j.value !== null
1358
- }) }, [e.subtotal === null ? f("", !0) : (x(), p("g", kt, [e.subtotal === 0 ? (x(), p("circle", {
1359
- key: 0,
1360
- cx: e.x,
1361
- cy: e.y,
1362
- r: 3,
1363
- fill: R.value.style.chart.color
1364
- }, 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", {
1365
- d: e.arcSlice,
1366
- fill: `${e.color}`,
1367
- "stroke-width": 1,
1368
- stroke: R.value.style.chart.backgroundColor
1369
- }, null, 8, Mt))), 256))])) : (x(), p("g", Nt, [(x(!0), p(l, null, C(e.donut, (e, t) => (x(), p("path", {
1370
- d: e.arcSlice,
1371
- fill: `${e.color}`,
1372
- "stroke-width": .5,
1373
- stroke: R.value.style.chart.backgroundColor
1374
- }, null, 8, Pt))), 256))]))]))], 2))), 256)),
1375
- (x(!0), p(l, null, C(Z.value, (e, t) => (x(), p("g", { class: v({
1376
- "donut-opacity": !0,
1377
- "donut-behind": t !== j.value && j.value !== null || tn.value && t !== N.value.index
1378
- }) }, [e.subtotal !== null && R.value.style.chart.layout.dataLabels.show ? (x(), p("text", {
1379
- key: 0,
1380
- "text-anchor": "middle",
1381
- x: e.x,
1382
- 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,
1383
- "font-size": R.value.style.chart.layout.dataLabels.fontSize,
1384
- "font-weight": "bold",
1385
- fill: R.value.style.chart.layout.dataLabels.color
1386
- }, T(hr(e.subtotal, e, t)), 9, Ft)) : f("", !0)], 2))), 256)),
1387
- (x(!0), p(l, null, C(Z.value, (e, t) => (x(), p("rect", {
1388
- x: G.value.left + t * Y.value,
1389
- y: G.value.top,
1390
- width: Y.value,
1391
- height: G.value.height,
1392
- fill: [j.value, yr.value].includes(e.index) ? `url(#hover_${k.value})` : "transparent",
1393
- class: v({ "donut-hover": z.value && e.subtotal && [j.value, yr.value].includes(e.index) }),
1394
- style: { pointerEvents: "none" }
1395
- }, null, 10, It))), 256)),
1396
- (x(!0), p(l, null, C(Z.value, (e, t) => (x(), p("rect", {
1397
- "data-cy-trap": "",
1398
- x: G.value.left + t * Y.value,
1399
- y: G.value.top,
1400
- width: Y.value,
1401
- height: G.value.height,
1402
- fill: "transparent",
1403
- onMouseenter: (t) => vr(e),
1404
- onMouseleave: (t) => _r(e),
1405
- onClick: (n) => br(e, t),
1406
- class: v({ "donut-hover": z.value && j.value === e.index && e.subtotal })
1407
- }, null, 42, Lt))), 256)),
1408
- w(e.$slots, "svg", { svg: {
1409
- ...G.value,
1410
- isPrintingImg: E($n) || E(er) || gn.value,
1411
- isPrintingSvg: _n.value
1412
- } }, void 0, !0)
1413
- ], 46, st)), e.$slots.hint ? (x(), p("div", Rt, [w(e.$slots, "hint", y(g({
1414
- hint: R.value.a11y.translations.keyboardNavigation,
1415
- isVisible: Pn.value
1416
- })), void 0, !0)])) : f("", !0)]),
1417
- 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),
1418
- m("div", {
1419
- ref_key: "chartSlicer",
1420
- ref: jn,
1421
- style: b(`width:100%;background:${R.value.style.chart.backgroundColor}`),
1422
- "data-dom-to-png-ignore": ""
1423
- }, [q.value > 1 && R.value.style.chart.zoom.show ? (x(), d(Ue, {
1424
- ref_key: "slicerComponent",
1425
- ref: An,
1426
- key: `slicer_${an.value}`,
1427
- background: R.value.style.chart.zoom.color,
1428
- borderColor: R.value.style.chart.backgroundColor,
1429
- fontSize: R.value.style.chart.zoom.fontSize,
1430
- useResetSlot: R.value.style.chart.zoom.useResetSlot,
1431
- labelLeft: J.value[0] ? J.value[0].text : "",
1432
- labelRight: J.value.at(-1) ? J.value.at(-1).text : "",
1433
- textColor: R.value.style.chart.color,
1434
- inputColor: R.value.style.chart.zoom.color,
1435
- selectColor: R.value.style.chart.zoom.highlightColor,
1436
- max: q.value,
1437
- min: 0,
1438
- valueStart: V.value.start,
1439
- valueEnd: V.value.end,
1440
- start: V.value.start,
1441
- "onUpdate:start": t[0] ||= (e) => V.value.start = e,
1442
- end: V.value.end,
1443
- "onUpdate:end": t[1] ||= (e) => V.value.end = e,
1444
- refreshStartPoint: R.value.style.chart.zoom.startIndex === null ? 0 : R.value.style.chart.zoom.startIndex,
1445
- refreshEndPoint: R.value.style.chart.zoom.endIndex === null ? q.value : R.value.style.chart.zoom.endIndex + 1,
1446
- enableRangeHandles: R.value.style.chart.zoom.enableRangeHandles,
1447
- enableSelectionDrag: R.value.style.chart.zoom.enableSelectionDrag,
1448
- focusOnDrag: R.value.style.chart.zoom.focusOnDrag,
1449
- focusRangeRatio: R.value.style.chart.zoom.focusRangeRatio,
1450
- isCursorPointer: z.value,
1451
- maxWidth: R.value.style.chart.zoom.maxWidth,
1452
- onReset: Gn
1453
- }, {
1454
- "reset-action": D(({ reset: t }) => [w(e.$slots, "reset-action", y(g({ reset: t })), void 0, !0)]),
1455
- _: 3
1456
- }, 8, [
1457
- "background",
1458
- "borderColor",
1459
- "fontSize",
1460
- "useResetSlot",
1461
- "labelLeft",
1462
- "labelRight",
1463
- "textColor",
1464
- "inputColor",
1465
- "selectColor",
1466
- "max",
1467
- "valueStart",
1468
- "valueEnd",
1469
- "start",
1470
- "end",
1471
- "refreshStartPoint",
1472
- "refreshEndPoint",
1473
- "enableRangeHandles",
1474
- "enableSelectionDrag",
1475
- "focusOnDrag",
1476
- "focusRangeRatio",
1477
- "isCursorPointer",
1478
- "maxWidth"
1479
- ])) : f("", !0)], 4),
1480
- m("div", { id: `legend-bottom-${k.value}` }, null, 8, Bt),
1481
- pn.value && (R.value.style.chart.legend.show || e.$slots.legend) ? (x(), d(We, {
1482
- key: 6,
1483
- to: R.value.style.chart.legend.position === "top" ? `#legend-top-${k.value}` : `#legend-bottom-${k.value}`
1484
- }, [m("div", {
1485
- ref_key: "chartLegend",
1486
- ref: On
1487
- }, [w(e.$slots, "legend", { legend: xr.value }, () => [R.value.style.chart.legend.show ? (x(), d(Ve, {
1488
- key: `legend_${cn.value}`,
1489
- legendSet: xr.value,
1490
- config: Cr.value,
1491
- onClickMarker: t[2] ||= ({ legend: e }) => Tr(e.uid)
1492
- }, {
1493
- item: D(({ legend: e, index: t }) => [m("div", {
1494
- onClick: (t) => Tr(e.uid),
1495
- style: b(`opacity:${A.value.includes(e.uid) ? .5 : 1}`)
1496
- }, T(e.display), 13, Vt)]),
1497
- legendToggle: D(() => [xr.value.length > 2 && R.value.style.chart.legend.selectAllToggle.show && !E(Vn) ? (x(), d(Le, {
1498
- key: 0,
1499
- backgroundColor: R.value.style.chart.legend.selectAllToggle.backgroundColor,
1500
- color: R.value.style.chart.legend.selectAllToggle.color,
1501
- fontSize: R.value.style.chart.legend.fontSize,
1502
- checked: A.value.length > 0,
1503
- onToggle: wr
1504
- }, null, 8, [
1505
- "backgroundColor",
1506
- "color",
1507
- "fontSize",
1508
- "checked"
1509
- ])) : f("", !0)]),
1510
- _: 1
1511
- }, 8, ["legendSet", "config"])) : f("", !0)], !0)], 512)], 8, ["to"])) : f("", !0),
1512
- e.$slots.source ? (x(), p("div", {
1513
- key: 7,
1514
- ref_key: "source",
1515
- ref: kn,
1516
- dir: "auto"
1517
- }, [w(e.$slots, "source", {}, void 0, !0)], 512)) : f("", !0),
1518
- In.value && R.value.userOptions.buttons.table ? (x(), d(Ze(Vr.value.component), Je({ key: 8 }, Vr.value.props, {
1519
- ref_key: "tableUnit",
1520
- ref: mn,
1521
- onClose: Hr
1522
- }), Ge({
1523
- content: D(() => [(x(), d(E(Kt), {
1524
- key: `table_${sn.value}`,
1525
- colNames: Q.value.colNames,
1526
- head: Q.value.head,
1527
- body: Q.value.body,
1528
- config: Q.value.config,
1529
- title: R.value.table.useDialog ? "" : Vr.value.title,
1530
- withCloseButton: !R.value.table.useDialog,
1531
- isCursorPointer: z.value,
1532
- onClose: Hr
1533
- }, {
1534
- th: D(({ th: e }) => [Ke(T(e.name ?? e), 1)]),
1535
- 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)]),
1536
- _: 1
1537
- }, 8, [
1538
- "colNames",
1539
- "head",
1540
- "body",
1541
- "config",
1542
- "title",
1543
- "withCloseButton",
1544
- "isCursorPointer"
1545
- ]))]),
1546
- _: 2
1547
- }, [R.value.table.useDialog ? {
1548
- name: "title",
1549
- fn: D(() => [Ke(T(Vr.value.title), 1)]),
1550
- key: "0"
1551
- } : void 0, R.value.table.useDialog ? {
1552
- name: "actions",
1553
- fn: D(() => [m("button", {
1554
- tabindex: "0",
1555
- class: "vue-ui-user-options-button",
1556
- onClick: t[3] ||= (e) => Ar(R.value.userOptions.callbacks.csv),
1557
- style: b({ cursor: z.value ? "cursor" : "default" })
1558
- }, [qe(E(Gt), {
1559
- name: "fileCsv",
1560
- stroke: Vr.value.props.color
1561
- }, null, 8, ["stroke"])], 4)]),
1562
- key: "1"
1563
- } : void 0]), 1040)) : f("", !0),
1564
- R.value.style.chart.dialog.show ? (x(), d(E(Zt), {
1565
- key: 9,
1566
- ref_key: "dialog",
1567
- ref: Rr,
1568
- onClose: t[4] ||= (e) => {
1569
- N.value = null, tn.value = !1, M.value = null, j.value = null, yr.value = null;
1570
- },
1571
- backgroundColor: R.value.style.chart.dialog.backgroundColor,
1572
- color: R.value.style.chart.dialog.color,
1573
- headerBg: R.value.style.chart.dialog.header.backgroundColor,
1574
- headerColor: R.value.style.chart.dialog.header.color,
1575
- isFullscreen: $.value,
1576
- fullscreenParent: P.value
1577
- }, {
1578
- title: D(() => [Ke(T(J.value[Number(N.value.index)] ? J.value[Number(N.value.index)].text : ""), 1)]),
1579
- content: D(() => [N.value ? (x(), d(E(Xt), {
1580
- key: 0,
1581
- config: Lr.value,
1582
- dataset: Ir.value
1583
- }, null, 8, ["config", "dataset"])) : f("", !0)]),
1584
- _: 1
1585
- }, 8, [
1586
- "backgroundColor",
1587
- "color",
1588
- "headerBg",
1589
- "headerColor",
1590
- "isFullscreen",
1591
- "fullscreenParent"
1592
- ])) : f("", !0),
1593
- E(Vn) ? (x(), d(we, { key: 10 })) : f("", !0)
1594
- ], 46, rt));
1595
- }
1596
- }, [["__scopeId", "data-v-54b0bf03"]]);
1597
- //#endregion
1598
- export { nt as n, Wt as t };