vue-data-ui 3.26.3 → 3.26.5

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 (179) hide show
  1. package/dist/{Arrow-Bt3aGRMb.js → Arrow-BQbcOtfC.js} +1 -1
  2. package/dist/{BaseDraggableDialog-C1Slb3Yh.js → BaseDraggableDialog-BCFCiP_6.js} +2 -2
  3. package/dist/{BaseIcon-BV75ei8X.js → BaseIcon-CIK6Sqo3.js} +1 -1
  4. package/dist/{BaseLegendToggle-DtS_Oj3B.js → BaseLegendToggle-Doa5rYP2.js} +1 -1
  5. package/dist/{BaseZoomControls-DIhoeyZu.js → BaseZoomControls-BGQM8B5F.js} +2 -2
  6. package/dist/{ColorPicker--Y89hTnE.js → ColorPicker-Cb7qpvFt.js} +2 -2
  7. package/dist/{DataTable-DX5fToAo.js → DataTable-B6LDCXBz.js} +2 -2
  8. package/dist/{HillActions-D6weVdns.js → HillActions-CwdgCb7Q.js} +1 -1
  9. package/dist/{Legend-Dv90gh-6.js → Legend-D9FGXIbQ.js} +2 -2
  10. package/dist/{NonSvgPenAndPaper-D2BM5C1-.js → NonSvgPenAndPaper-9T4MSwXC.js} +3 -3
  11. package/dist/{PackageVersion-DDtcwca2.js → PackageVersion-CslTvFsC.js} +1 -1
  12. package/dist/{PenAndPaper-DkQ4sEhs.js → PenAndPaper-C1EcBgJW.js} +3 -3
  13. package/dist/{Shape-B_kDj1gF.js → Shape-BZgQLgu5.js} +1 -1
  14. package/dist/{SlicerPreview-BgyIezm0.js → SlicerPreview-DyYv_G-_.js} +2 -2
  15. package/dist/{SparkTooltip-BNpyQ021.js → SparkTooltip-D4cRlyuq.js} +1 -1
  16. package/dist/{Title-C2JKI5td.js → Title-Bd98RysU.js} +1 -1
  17. package/dist/{Tooltip-2NAb_Rrx.js → Tooltip-DmQeI5WE.js} +1 -1
  18. package/dist/{UserOptions-Dgn3StKw.js → UserOptions-B_yBcZ1-.js} +2 -2
  19. package/dist/components/arrow.js +1 -1
  20. package/dist/components/vue-ui-3d-bar.js +1 -1
  21. package/dist/components/vue-ui-accordion.js +1 -1
  22. package/dist/components/vue-ui-age-pyramid.js +1 -1
  23. package/dist/components/vue-ui-annotator.js +1 -1
  24. package/dist/components/vue-ui-bullet.js +1 -1
  25. package/dist/components/vue-ui-bump.js +1 -1
  26. package/dist/components/vue-ui-candlestick.js +1 -1
  27. package/dist/components/vue-ui-carousel-table.js +1 -1
  28. package/dist/components/vue-ui-chestnut.js +1 -1
  29. package/dist/components/vue-ui-chord.js +1 -1
  30. package/dist/components/vue-ui-circle-pack.js +1 -1
  31. package/dist/components/vue-ui-cursor.js +1 -1
  32. package/dist/components/vue-ui-dag.js +1 -1
  33. package/dist/components/vue-ui-dashboard.js +1 -1
  34. package/dist/components/vue-ui-digits.js +1 -1
  35. package/dist/components/vue-ui-donut-evolution.js +1 -1
  36. package/dist/components/vue-ui-donut.js +1 -1
  37. package/dist/components/vue-ui-dumbbell.js +1 -1
  38. package/dist/components/vue-ui-flow.js +1 -1
  39. package/dist/components/vue-ui-funnel.js +1 -1
  40. package/dist/components/vue-ui-galaxy.js +1 -1
  41. package/dist/components/vue-ui-gauge.js +1 -1
  42. package/dist/components/vue-ui-geo.js +1 -1
  43. package/dist/components/vue-ui-gizmo.js +1 -1
  44. package/dist/components/vue-ui-heatmap.js +1 -1
  45. package/dist/components/vue-ui-hill.js +1 -1
  46. package/dist/components/vue-ui-history-plot.js +1 -1
  47. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  48. package/dist/components/vue-ui-icon.js +1 -1
  49. package/dist/components/vue-ui-kpi.js +1 -1
  50. package/dist/components/vue-ui-label.js +1 -1
  51. package/dist/components/vue-ui-mini-loader.js +1 -1
  52. package/dist/components/vue-ui-molecule.js +1 -1
  53. package/dist/components/vue-ui-mood-radar.js +1 -1
  54. package/dist/components/vue-ui-nested-donuts.js +1 -1
  55. package/dist/components/vue-ui-onion.js +1 -1
  56. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  57. package/dist/components/vue-ui-quadrant.js +1 -1
  58. package/dist/components/vue-ui-quick-chart.js +1 -1
  59. package/dist/components/vue-ui-radar.js +1 -1
  60. package/dist/components/vue-ui-rating.js +1 -1
  61. package/dist/components/vue-ui-relation-circle.js +1 -1
  62. package/dist/components/vue-ui-ridgeline.js +1 -1
  63. package/dist/components/vue-ui-rings.js +1 -1
  64. package/dist/components/vue-ui-scatter.js +1 -1
  65. package/dist/components/vue-ui-skeleton.js +1 -1
  66. package/dist/components/vue-ui-smiley.js +1 -1
  67. package/dist/components/vue-ui-spark-trend.js +1 -1
  68. package/dist/components/vue-ui-sparkbar.js +1 -1
  69. package/dist/components/vue-ui-sparkgauge.js +1 -1
  70. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  71. package/dist/components/vue-ui-sparkline.js +1 -1
  72. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  73. package/dist/components/vue-ui-stackbar.js +1 -1
  74. package/dist/components/vue-ui-stackline.js +1 -1
  75. package/dist/components/vue-ui-strip-plot.js +1 -1
  76. package/dist/components/vue-ui-table-heatmap.js +1 -1
  77. package/dist/components/vue-ui-table-sparkline.js +1 -1
  78. package/dist/components/vue-ui-table.js +1 -1
  79. package/dist/components/vue-ui-thermometer.js +1 -1
  80. package/dist/components/vue-ui-timer.js +1 -1
  81. package/dist/components/vue-ui-tiremarks.js +1 -1
  82. package/dist/components/vue-ui-treemap.js +1 -1
  83. package/dist/components/vue-ui-vertical-bar.js +1 -1
  84. package/dist/components/vue-ui-waffle.js +1 -1
  85. package/dist/components/vue-ui-wheel.js +1 -1
  86. package/dist/components/vue-ui-word-cloud.js +1 -1
  87. package/dist/components/vue-ui-world.js +1 -1
  88. package/dist/components/vue-ui-xy-canvas.js +1 -1
  89. package/dist/components/vue-ui-xy.js +1 -1
  90. package/dist/{dom-to-png-DKdtTkNC.js → dom-to-png-B_RJohlM.js} +1 -1
  91. package/dist/{exposedLib-DN6QRAx2.js → exposedLib-C-JlvWAt.js} +1 -1
  92. package/dist/{img-CaIaBHA0.js → img-KURaWjZI.js} +1 -1
  93. package/dist/{labelUtils-CD5XzcAo.js → labelUtils-DShv2Mbg.js} +1 -1
  94. package/dist/{lib-CklJ7rIN.js → lib-TWIH5fGr.js} +4 -4
  95. package/dist/{package-DDthpXJc.js → package-DbTqd5lc.js} +1 -1
  96. package/dist/{pdf-6hacmnKW.js → pdf-CLl24Afl.js} +1 -1
  97. package/dist/{render-common-CF9qAkaI.js → render-common-CKv-jztN.js} +2 -2
  98. package/dist/ssr/vue-ui-donut.js +1 -1
  99. package/dist/ssr/vue-ui-xy.js +1 -1
  100. package/dist/ssr.js +2 -2
  101. package/dist/style.css +1 -1
  102. package/dist/types/vue-data-ui.d.ts +10 -1
  103. package/dist/{useNestedProp-Tc9i6ZcN.js → useNestedProp-BxOdWM0c.js} +1 -1
  104. package/dist/{usePrinter-Dp3X1vqr.js → usePrinter-8Y1Rju0Y.js} +2 -2
  105. package/dist/utils.js +2 -2
  106. package/dist/{vue-data-ui-DZ_ypVjD.js → vue-data-ui-C3G5Zdl5.js} +70 -70
  107. package/dist/vue-data-ui.js +73 -73
  108. package/dist/{vue-ui-3d-bar-AE72RbGo.js → vue-ui-3d-bar-Cl6-fBV8.js} +6 -6
  109. package/dist/{vue-ui-accordion-15kKhkup.js → vue-ui-accordion-AyyZDab3.js} +3 -3
  110. package/dist/{vue-ui-age-pyramid-BprwHR2l.js → vue-ui-age-pyramid-DOtWAL8s.js} +6 -6
  111. package/dist/{vue-ui-annotator-J4Wo2_DR.js → vue-ui-annotator-BCVjlojM.js} +6 -6
  112. package/dist/{vue-ui-bullet-jJk6aC2d.js → vue-ui-bullet-B_1Ctjvq.js} +7 -7
  113. package/dist/{vue-ui-bump-DDek6Y8i.js → vue-ui-bump-kOK6x4al.js} +6 -6
  114. package/dist/{vue-ui-candlestick-C_T-4PvR.js → vue-ui-candlestick-KvhjbAxt.js} +7 -7
  115. package/dist/{vue-ui-carousel-table-pbg0DNs-.js → vue-ui-carousel-table-ArMiO0cG.js} +4 -4
  116. package/dist/{vue-ui-chestnut-BIZo9bFQ.js → vue-ui-chestnut-DSM0U27X.js} +5 -5
  117. package/dist/{vue-ui-chord-1a-LgYke.js → vue-ui-chord-64akfaem.js} +8 -8
  118. package/dist/{vue-ui-circle-pack-DnxnFOLU.js → vue-ui-circle-pack-CaR_aNEh.js} +6 -6
  119. package/dist/{vue-ui-cursor-B1G3bO3u.js → vue-ui-cursor-DCgqYZiz.js} +3 -3
  120. package/dist/{vue-ui-dag-BJH34mhH.js → vue-ui-dag-8uKK0Rlp.js} +7 -7
  121. package/dist/{vue-ui-dashboard-BxrQFKw2.js → vue-ui-dashboard-DeccYtSY.js} +69 -69
  122. package/dist/{vue-ui-digits-COK65t4o.js → vue-ui-digits-BvK7bVuJ.js} +3 -3
  123. package/dist/{vue-ui-donut-CsBzv7rk.js → vue-ui-donut-8joMj08Z.js} +2 -2
  124. package/dist/{vue-ui-donut-LulYXjY-.js → vue-ui-donut-CvbfzzdT.js} +10 -10
  125. package/dist/{vue-ui-donut-evolution-CrwqKE7G.js → vue-ui-donut-evolution-DgITf95R.js} +9 -9
  126. package/dist/{vue-ui-dumbbell-D2j6gJAr.js → vue-ui-dumbbell-U2L4ZYhB.js} +7 -7
  127. package/dist/{vue-ui-flow-BGb7lpAW.js → vue-ui-flow-DD20fJu_.js} +7 -7
  128. package/dist/{vue-ui-funnel-CJfc8cXT.js → vue-ui-funnel-Cx8hVlZV.js} +6 -6
  129. package/dist/{vue-ui-galaxy-CA2FF651.js → vue-ui-galaxy-VZFZnHPv.js} +9 -9
  130. package/dist/{vue-ui-gauge-D9Ek-tFP.js → vue-ui-gauge-Copa7G58.js} +6 -6
  131. package/dist/{vue-ui-geo-rtEZJFHY.js → vue-ui-geo-DeDQ6ubl.js} +7 -7
  132. package/dist/{vue-ui-gizmo-B_SU2Jgd.js → vue-ui-gizmo-D5oUKIsP.js} +3 -3
  133. package/dist/{vue-ui-heatmap-BySwsSk3.js → vue-ui-heatmap-BukWtNsd.js} +27 -20
  134. package/dist/{vue-ui-hill-Cxf-0GE7.js → vue-ui-hill-DONFacXR.js} +6 -6
  135. package/dist/{vue-ui-history-plot-BZtZ_398.js → vue-ui-history-plot-BMy_y9S6.js} +8 -8
  136. package/dist/{vue-ui-horizontal-bar-DsdB1Lke.js → vue-ui-horizontal-bar-bcPSs999.js} +10 -10
  137. package/dist/{vue-ui-kpi--YE_hJM-.js → vue-ui-kpi-Bol0OWs3.js} +3 -3
  138. package/dist/{vue-ui-label-DfBFm4hK.js → vue-ui-label-cwjXaEDQ.js} +3 -3
  139. package/dist/{vue-ui-mini-loader-pzS7SsP4.js → vue-ui-mini-loader-kdpasmXb.js} +2 -2
  140. package/dist/{vue-ui-molecule-CIm_6t6E.js → vue-ui-molecule-BiAI5lbh.js} +5 -5
  141. package/dist/{vue-ui-mood-radar-ki4ZlohZ.js → vue-ui-mood-radar-f4xXkiBs.js} +7 -7
  142. package/dist/{vue-ui-nested-donuts-Ctbq_pnj.js → vue-ui-nested-donuts-ZmGGEvRk.js} +9 -9
  143. package/dist/{vue-ui-onion-DjznoyvR.js → vue-ui-onion-D6IKPpL-.js} +9 -9
  144. package/dist/{vue-ui-parallel-coordinate-plot-CW27xBHo.js → vue-ui-parallel-coordinate-plot-BbfModz3.js} +9 -9
  145. package/dist/{vue-ui-quadrant-D9270b-4.js → vue-ui-quadrant-CueHa1Pm.js} +9 -9
  146. package/dist/{vue-ui-quick-chart-BwA8ZYnt.js → vue-ui-quick-chart-C8ZxX1Zw.js} +7 -7
  147. package/dist/{vue-ui-radar-CIqWnSkX.js → vue-ui-radar-BcD7Zqvb.js} +8 -8
  148. package/dist/{vue-ui-rating-BYLWm5aG.js → vue-ui-rating-V_OnJN9Y.js} +2 -2
  149. package/dist/{vue-ui-relation-circle-DfcHFOBp.js → vue-ui-relation-circle-DlN4r83K.js} +6 -6
  150. package/dist/{vue-ui-ridgeline-BK23FH_o.js → vue-ui-ridgeline-BlQnTWXi.js} +9 -9
  151. package/dist/{vue-ui-rings-Bo7e_oIT.js → vue-ui-rings-Bf9IKwDr.js} +10 -10
  152. package/dist/{vue-ui-scatter-B2qUgPxs.js → vue-ui-scatter-arPbS9MH.js} +9 -9
  153. package/dist/{vue-ui-skeleton--bojbC6J.js → vue-ui-skeleton-dyXWT6JX.js} +3 -3
  154. package/dist/{vue-ui-smiley-qHvZQJcB.js → vue-ui-smiley-w6nH1I0E.js} +2 -2
  155. package/dist/{vue-ui-spark-trend-DUWAGYCO.js → vue-ui-spark-trend-Bso9bwmY.js} +3 -3
  156. package/dist/{vue-ui-sparkbar-DIN_e8Hd.js → vue-ui-sparkbar-CL06Yt56.js} +3 -3
  157. package/dist/{vue-ui-sparkgauge-CAC8JU-B.js → vue-ui-sparkgauge-BHDM5Hbr.js} +3 -3
  158. package/dist/{vue-ui-sparkhistogram-hSkVMj5Q.js → vue-ui-sparkhistogram-3Tw8PEms.js} +4 -4
  159. package/dist/{vue-ui-sparkline-BosCT_mQ.js → vue-ui-sparkline-znaswFQj.js} +3 -3
  160. package/dist/{vue-ui-sparkstackbar-DB4FwqUL.js → vue-ui-sparkstackbar-BOzVoWoa.js} +4 -4
  161. package/dist/vue-ui-stackbar-BTOvMsP8.js +2755 -0
  162. package/dist/{vue-ui-stackline-D9USdD0o.js → vue-ui-stackline-qcLrNL09.js} +10 -10
  163. package/dist/{vue-ui-strip-plot-CCnX8Iaq.js → vue-ui-strip-plot-BLNaCPm8.js} +7 -7
  164. package/dist/{vue-ui-table-Wjqv8Y_Y.js → vue-ui-table-D295mJIf.js} +5 -5
  165. package/dist/{vue-ui-table-heatmap-Bu9RiTU0.js → vue-ui-table-heatmap-CXeMKqKz.js} +5 -5
  166. package/dist/{vue-ui-table-sparkline-82kb3CVs.js → vue-ui-table-sparkline-BYuwQrwA.js} +4 -4
  167. package/dist/{vue-ui-thermometer-B4VN0-6d.js → vue-ui-thermometer-BwJ0oF-H.js} +6 -6
  168. package/dist/{vue-ui-timer-8xeqZhkj.js → vue-ui-timer-BULpjYiI.js} +5 -5
  169. package/dist/{vue-ui-tiremarks-B6eWE0Q8.js → vue-ui-tiremarks-B7bTeU8h.js} +6 -6
  170. package/dist/{vue-ui-treemap-C0ll73wT.js → vue-ui-treemap-DkqDz9W4.js} +9 -9
  171. package/dist/{vue-ui-waffle-Cw8O3BUF.js → vue-ui-waffle-Cn7WBzqh.js} +10 -10
  172. package/dist/{vue-ui-wheel-B0eYItCQ.js → vue-ui-wheel-Cy7kBvEx.js} +6 -6
  173. package/dist/{vue-ui-word-cloud-D0zkMkNk.js → vue-ui-word-cloud-tRqc2ZMR.js} +7 -7
  174. package/dist/{vue-ui-world-CRhkj77G.js → vue-ui-world-B755-zji.js} +7 -7
  175. package/dist/{vue-ui-xy-CXLKh2F2.js → vue-ui-xy-BiHIJ7rK.js} +2 -2
  176. package/dist/{vue-ui-xy-DFczQEnY.js → vue-ui-xy-DWYTZz_v.js} +10 -10
  177. package/dist/{vue-ui-xy-canvas-NzaEYHDR.js → vue-ui-xy-canvas-DGuMC_Rf.js} +11 -11
  178. package/package.json +2 -2
  179. package/dist/vue-ui-stackbar-COywI2qU.js +0 -2660
@@ -1,2660 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { $ as t, $t as n, Ct as r, D as a, Et as o, J as s, Pt as c, Qt as l, Rt as u, S as d, Vt as f, X as ee, Y as te, Zt as ne, _ as re, at as ie, c as ae, et as oe, ft as se, gt as ce, ht as le, i as ue, nt as de, r as fe, t as pe, tn as me, ut as he, v as ge, vt as _e, w as ve } from "./lib-CklJ7rIN.js";
3
- import { n as ye, t as be } from "./useHints-Dq_w2E8B.js";
4
- import { n as xe, r as Se, t as Ce } from "./useTimeLabels-d2f-W1L4.js";
5
- import { t as we } from "./useConfig-DObkR9Aa.js";
6
- import { t as Te } from "./usePrinter-Dp3X1vqr.js";
7
- import { n as Ee, t as De } from "./BaseScanner-Dzc8VT3j.js";
8
- import { t as Oe } from "./useNestedProp-Tc9i6ZcN.js";
9
- import { t as ke } from "./useThemeCheck-C43Tcqmk.js";
10
- import { t as Ae } from "./useChartExport-iwOqiIWX.js";
11
- import { t as je } from "./useTransitions-g_zBREk2.js";
12
- import { t as Me } from "./useStableElementSize-C7KADDKj.js";
13
- import { t as Ne } from "./useTimeLabelCollider-AEcY4Ioe.js";
14
- import { t as Pe } from "./img-CaIaBHA0.js";
15
- import { n as Fe } from "./Title-C2JKI5td.js";
16
- import { t as Ie } from "./Shape-B_kDj1gF.js";
17
- import { t as Le } from "./_plugin-vue_export-helper-B3ysoDQm.js";
18
- import { l as Re, t as ze } from "./useResponsive-ZtArZtUf.js";
19
- import { t as Be } from "./DefGrad-DVBqDjhO.js";
20
- import { t as Ve } from "./SlicerPreview-BgyIezm0.js";
21
- import { t as He } from "./BaseLegendToggle-DtS_Oj3B.js";
22
- import { t as Ue } from "./A11yDataTable-DdRsVULz.js";
23
- import { t as We } from "./useUserOptionState-DK-_1ddE.js";
24
- import { t as Ge } from "./useChartAccessibility-DYqac8yF.js";
25
- import { t as Ke } from "./Legend-Dv90gh-6.js";
26
- import { t as qe } from "./vue_ui_stackbar-DdjDL6aq.js";
27
- import { Fragment as p, Teleport as Je, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as Ye, createSlots as Xe, createTextVNode as Ze, createVNode as Qe, defineAsyncComponent as $e, guardReactiveProps as v, mergeProps as et, nextTick as tt, normalizeClass as y, normalizeProps as b, normalizeStyle as x, onBeforeUnmount as nt, onMounted as rt, openBlock as S, ref as C, renderList as w, renderSlot as T, resolveDynamicComponent as it, shallowRef as at, toDisplayString as E, toRefs as ot, unref as D, useSlots as st, watch as ct, watchEffect as lt, withCtx as O } from "vue";
28
- //#region src/components/vue-ui-stackbar.vue
29
- var ut = /* @__PURE__ */ e({ default: () => cn }), dt = ["id"], ft = ["id"], pt = ["id"], mt = { style: { position: "relative" } }, ht = [
30
- "xmlns",
31
- "aria-describedby",
32
- "viewBox"
33
- ], gt = [
34
- "x",
35
- "y",
36
- "width",
37
- "height"
38
- ], _t = { key: 1 }, vt = [
39
- "x",
40
- "y",
41
- "width",
42
- "height",
43
- "stroke",
44
- "stroke-width",
45
- "stroke-linecap",
46
- "stroke-linejoin",
47
- "stroke-dasharray"
48
- ], yt = [
49
- "x1",
50
- "x2",
51
- "y1",
52
- "y2",
53
- "stroke",
54
- "stroke-width",
55
- "stroke-dasharray"
56
- ], bt = [
57
- "x1",
58
- "x2",
59
- "y1",
60
- "y2",
61
- "stroke",
62
- "stroke-width",
63
- "stroke-dasharray"
64
- ], xt = [
65
- "x1",
66
- "x2",
67
- "y1",
68
- "y2",
69
- "stroke",
70
- "stroke-width",
71
- "stroke-dasharray"
72
- ], St = [
73
- "x1",
74
- "x2",
75
- "y1",
76
- "y2",
77
- "stroke",
78
- "stroke-width",
79
- "stroke-dasharray"
80
- ], Ct = { key: 0 }, wt = [
81
- "x",
82
- "y",
83
- "height",
84
- "rx",
85
- "width",
86
- "fill",
87
- "stroke",
88
- "stroke-width"
89
- ], Tt = { key: 0 }, Et = [
90
- "x",
91
- "y",
92
- "height",
93
- "rx",
94
- "width",
95
- "fill",
96
- "stroke",
97
- "stroke-width"
98
- ], Dt = [
99
- "x",
100
- "y",
101
- "width",
102
- "rx",
103
- "height",
104
- "fill",
105
- "stroke",
106
- "stroke-width"
107
- ], Ot = { key: 0 }, kt = [
108
- "x",
109
- "y",
110
- "width",
111
- "rx",
112
- "height",
113
- "fill",
114
- "stroke",
115
- "stroke-width"
116
- ], At = [
117
- "x1",
118
- "x2",
119
- "y1",
120
- "y2",
121
- "stroke",
122
- "stroke-width"
123
- ], jt = [
124
- "x1",
125
- "x2",
126
- "y1",
127
- "y2",
128
- "stroke",
129
- "stroke-width"
130
- ], Mt = [
131
- "x",
132
- "y",
133
- "font-size",
134
- "fill",
135
- "font-weight"
136
- ], Nt = [
137
- "transform",
138
- "font-size",
139
- "fill",
140
- "font-weight"
141
- ], Pt = [
142
- "transform",
143
- "font-size",
144
- "fill",
145
- "font-weight"
146
- ], Ft = [
147
- "transform",
148
- "font-size",
149
- "font-weight",
150
- "fill"
151
- ], It = [
152
- "transform",
153
- "font-size",
154
- "fill",
155
- "font-weight"
156
- ], Lt = [
157
- "transform",
158
- "font-size",
159
- "font-weight",
160
- "fill"
161
- ], Rt = ["stroke", "d"], zt = [
162
- "transform",
163
- "font-size",
164
- "font-weight",
165
- "fill",
166
- "text-anchor"
167
- ], Bt = ["d", "stroke"], Vt = [
168
- "font-size",
169
- "font-weight",
170
- "fill",
171
- "text-anchor",
172
- "transform"
173
- ], Ht = { key: 0 }, Ut = { key: 1 }, Wt = [
174
- "text-anchor",
175
- "font-size",
176
- "font-weight",
177
- "fill",
178
- "transform",
179
- "onClick"
180
- ], Gt = [
181
- "text-anchor",
182
- "font-size",
183
- "fill",
184
- "transform",
185
- "innerHTML",
186
- "onClick"
187
- ], Kt = { key: 0 }, qt = { key: 1 }, Jt = [
188
- "font-size",
189
- "font-weight",
190
- "fill",
191
- "stroke",
192
- "transform",
193
- "onClick"
194
- ], Yt = [
195
- "font-size",
196
- "font-weight",
197
- "fill",
198
- "transform",
199
- "onClick",
200
- "innerHTML"
201
- ], Xt = [
202
- "x",
203
- "y",
204
- "width",
205
- "height",
206
- "onClick",
207
- "onMouseenter",
208
- "onMouseleave",
209
- "fill"
210
- ], Zt = [
211
- "x",
212
- "y",
213
- "width",
214
- "height",
215
- "onClick",
216
- "onMouseenter",
217
- "onMouseleave",
218
- "fill"
219
- ], Qt = [
220
- "x",
221
- "y",
222
- "width",
223
- "height",
224
- "fill",
225
- "fill-opacity",
226
- "stroke",
227
- "stroke-opacity",
228
- "stroke-width",
229
- "stroke-dasharray"
230
- ], $t = ["data-start", "data-end"], en = {
231
- key: 0,
232
- style: {
233
- position: "absolute",
234
- top: "100%",
235
- left: "0",
236
- width: "100%"
237
- },
238
- "data-dom-to-png-ignore": "",
239
- "aria-hidden": "true"
240
- }, tn = {
241
- key: 4,
242
- class: "vue-data-ui-watermark"
243
- }, nn = [
244
- "x",
245
- "y",
246
- "height",
247
- "width",
248
- "fill",
249
- "stroke"
250
- ], rn = ["id"], an = ["onClick"], on = { key: 0 }, sn = { key: 1 }, cn = /*#__PURE__*/ Le({
251
- __name: "vue-ui-stackbar",
252
- props: {
253
- config: {
254
- type: Object,
255
- default() {
256
- return {};
257
- }
258
- },
259
- dataset: {
260
- type: Array,
261
- default() {
262
- return [];
263
- }
264
- },
265
- selectedXIndex: {
266
- type: Number,
267
- default: void 0
268
- },
269
- zoomState: {
270
- type: Object,
271
- default: null
272
- }
273
- },
274
- emits: [
275
- "selectDatapoint",
276
- "selectLegend",
277
- "selectTimeLabel",
278
- "selectX",
279
- "zoomStart",
280
- "zoomEnd",
281
- "zoomReset",
282
- "update:zoomState",
283
- "copyAlt"
284
- ],
285
- setup(e, { expose: Le, emit: ut }) {
286
- let cn = $e(() => import("./Tooltip-2NAb_Rrx.js")), ln = $e(() => import("./BaseIcon-BV75ei8X.js").then((e) => e.n)), un = $e(() => import("./vue-ui-accordion-15kKhkup.js").then((e) => e.n)), dn = $e(() => import("./DataTable-DX5fToAo.js")), fn = $e(() => import("./PenAndPaper-DkQ4sEhs.js").then((e) => e.t)), pn = $e(() => import("./UserOptions-Dgn3StKw.js").then((e) => e.n)), mn = $e(() => import("./PackageVersion-DDtcwca2.js").then((e) => e.t)), hn = $e(() => import("./BaseDraggableDialog-C1Slb3Yh.js").then((e) => e.n)), { vue_ui_stackbar: gn } = we(), { isThemeValid: _n, warnInvalidTheme: vn } = ke(), yn = st(), k = e, A = ut, bn = m({
287
- get() {
288
- return !!k.dataset && k.dataset.length;
289
- },
290
- set(e) {
291
- return e;
292
- }
293
- }), xn = C(null), j = C(ee()), Sn = C(!1), Cn = C(null), wn = C(""), M = C([]), Tn = C(0), En = C(null), Dn = C(null), On = C(null), kn = C(null), An = C(!1), N = C(null), jn = C(!1), Mn = C(0), Nn = C(0), Pn = C(0), Fn = C(!1), In = C(null), Ln = C(null), Rn = C(null), zn = C(null), Bn = C(null), Vn = C(null), Hn = C(null), Un = C(null), Wn = at(null), Gn = C(!1), Kn = C(0), qn = C(0), P = C(null), Jn = C({
294
- x: 0,
295
- y: 0
296
- }), Yn = C("pointer"), Xn = Me({
297
- elementRef: Wn,
298
- minimumWidth: 2,
299
- minimumHeight: 2,
300
- stableFramesRequired: 2,
301
- once: !1,
302
- onSizeAccepted: () => {
303
- $n();
304
- }
305
- });
306
- function Zn() {
307
- Wn.value = xn.value?.parentNode ?? null;
308
- }
309
- function Qn() {
310
- return new Promise((e) => {
311
- requestAnimationFrame(() => {
312
- requestAnimationFrame(e);
313
- });
314
- });
315
- }
316
- async function $n() {
317
- let e = ++qn.value;
318
- Gn.value = !1, await tt(), await Qn(), await Qn(), e === qn.value && (Kn.value += 1, Gn.value = !0);
319
- }
320
- let er = C(null);
321
- rt(() => {
322
- Fn.value = !0, Zn(), Xn.start(), Tr();
323
- });
324
- let F = C(ur()), I = m(() => F.value.userOptions), L = m(() => F.value.style.chart.grid), R = m(() => F.value.style.chart.bars), z = m(() => F.value.style.chart.grid.x.timeLabels), B = m(() => F.value.style.chart.tooltip), V = m(() => F.value.style.chart);
325
- ye({
326
- config: () => F.value,
327
- dataset: () => k.dataset,
328
- component: "VueUiStackbar",
329
- rules: [
330
- be.emptyArray,
331
- {
332
- test: (e) => e.some((e) => e.series.length > 60),
333
- message: [
334
- "👀 Some series have > 60 datapoints. Consider",
335
- "",
336
- "▶️ Using VueUiStackline instead, for better readability.",
337
- "",
338
- "▶️ Aggregating data to larger time units, to reduce the number of datapoints.",
339
- "",
340
- "▶️ Using filters to constraint the data to a specific time range."
341
- ]
342
- },
343
- {
344
- test: (e) => e.length > 6,
345
- message: [
346
- "👀 The number of series > 6, which can make the chart hard to read. Consider:",
347
- "",
348
- "▶️ Grouping small values into an \"Other\" category.",
349
- "",
350
- "▶️ Using filters to let users choose a maximum number of series to display."
351
- ]
352
- }
353
- ]
354
- });
355
- let { transitionEnabled: H } = je({
356
- config: () => F.value.transitions,
357
- dataset: () => k.dataset
358
- }), U = m(() => F.value.userOptions.useCursorPointer), tr = m(() => me({
359
- defaultConfig: {
360
- userOptions: { show: !1 },
361
- useCssAnimation: !1,
362
- table: { show: !1 },
363
- tooltip: { show: !1 },
364
- style: { chart: {
365
- backgroundColor: "#99999930",
366
- bars: {
367
- totalValues: { show: !1 },
368
- dataLabels: { show: !1 }
369
- },
370
- grid: {
371
- frame: { stroke: "#6A6A6A" },
372
- scale: {
373
- scaleMin: 0,
374
- scaleMax: 40
375
- },
376
- x: {
377
- axisColor: "#6A6A6A",
378
- linesColor: "#6A6A6A",
379
- axisName: { show: !1 },
380
- timeLabels: { show: !1 }
381
- },
382
- y: {
383
- axisColor: "#6A6A6A",
384
- linesColor: "#6A6A6A",
385
- axisName: { show: !1 },
386
- axisLabels: { show: !1 }
387
- }
388
- },
389
- legend: { backgroundColor: "transparent" },
390
- padding: {
391
- left: 24,
392
- right: 24,
393
- bottom: 12
394
- },
395
- zoom: {
396
- show: !1,
397
- startIndex: null,
398
- endIndex: null
399
- }
400
- } }
401
- },
402
- userConfig: F.value.skeletonConfig ?? {}
403
- })), { loading: nr, FINAL_DATASET: rr, manualLoading: ir } = Ee({
404
- ...ot(k),
405
- FINAL_CONFIG: F,
406
- prepareConfig: ur,
407
- callback: () => {
408
- Promise.resolve().then(async () => {
409
- (!V.value.zoom.keepState || !Sa.value || Y.value.start === 0 && Y.value.end === 0) && await Ca();
410
- });
411
- },
412
- skeletonDataset: k.config?.skeletonDataset ?? [{
413
- name: "",
414
- series: [
415
- 2,
416
- 3,
417
- 5,
418
- 8,
419
- 13,
420
- 21
421
- ],
422
- color: "#BABABA"
423
- }, {
424
- name: "",
425
- series: [
426
- 1,
427
- 2,
428
- 3,
429
- 5,
430
- 8,
431
- 13
432
- ],
433
- color: "#CACACA"
434
- }],
435
- skeletonConfig: me({
436
- defaultConfig: F.value,
437
- userConfig: tr.value
438
- })
439
- }), { userOptionsVisible: ar, setUserOptionsVisibility: or, keepUserOptionState: sr } = We({ config: F.value }), { svgRef: W } = Ge({ config: V.value.title });
440
- function cr() {
441
- or(!0);
442
- }
443
- function lr() {
444
- or(!1), A("selectX", {
445
- index: null,
446
- indexLabel: null,
447
- dataset: null
448
- }), N.value = null, P.value = null, Sn.value = !1;
449
- }
450
- function ur() {
451
- let e = Oe({
452
- userConfig: k.config,
453
- defaultConfig: gn
454
- }), t = {};
455
- k.config && r(k.config, "style.chart.grid.x.timeLabels.showFirstAndLast") && (e.style.chart.grid.x.timeLabels.showFirstAndLast = !!k.config.style.chart.grid.x.timeLabels.showFirstAndLast);
456
- let a = e.theme;
457
- if (a) {
458
- if (!_n.value(e)) vn(e), t = e;
459
- else {
460
- let r = Oe({
461
- userConfig: qe[a] || k.config,
462
- defaultConfig: e
463
- });
464
- t = {
465
- ...Oe({
466
- userConfig: k.config,
467
- defaultConfig: r
468
- }),
469
- customPalette: e.customPalette.length ? e.customPalette : n[a] || f
470
- };
471
- }
472
- } else t = e;
473
- return t;
474
- }
475
- let dr = m(() => R.value.dataLabels.hideUnderValue != null), fr = m(() => R.value.dataLabels.hideUnderPercentage != null);
476
- function pr(e) {
477
- let t = oe(e);
478
- return t?.style?.chart && delete t.style.chart.tooltip, JSON.stringify(t);
479
- }
480
- let mr = pr(k.config);
481
- ct(() => k.config, (e, t) => {
482
- let n = pr(e), r = n !== mr;
483
- mr = n;
484
- let a = ur();
485
- if (!r) {
486
- F.value.style.chart.tooltip = a.style.chart.tooltip, G.value.showTooltip = F.value.style.chart.tooltip.show;
487
- return;
488
- }
489
- nr.value || (F.value = a), ar.value = !F.value.userOptions.showOnChartHover, G.value.dataLabels.show = R.value.dataLabels.show, G.value.showTable = F.value.table.show, G.value.showTooltip = B.value.show, Tr({ resetSlicer: !V.value.zoom.keepState }), Mn.value += 1, Nn.value += 1, Pn.value += 1, Zn(), !V.value.zoom.keepState || !Sa.value || Y.value.start === 0 && Y.value.end === 0 ? Ca() : ii();
490
- }, { deep: !0 }), ct(() => k.dataset, (e) => {
491
- Array.isArray(e) && e.length > 0 && (ir.value = !1), Zn(), V.value.zoom.keepState ? ii() : si();
492
- }, { deep: !0 });
493
- let G = C({
494
- dataLabels: { show: R.value.dataLabels.show },
495
- showTable: F.value.table.show,
496
- showTooltip: B.value.show
497
- });
498
- ct(F, () => {
499
- G.value = {
500
- dataLabels: { show: R.value.dataLabels.show },
501
- showTable: F.value.table.show,
502
- showTooltip: B.value.show
503
- };
504
- }, { immediate: !0 });
505
- let { isPrinting: hr, isImaging: gr, generatePdf: _r, generateImage: vr } = Te({
506
- elementId: `stackbar_${j.value}`,
507
- fileName: V.value.title.text || "vue-ui-stackbar",
508
- options: F.value.userOptions.print
509
- }), yr = C({
510
- width: V.value.width,
511
- height: V.value.height,
512
- paddingRatio: {
513
- top: V.value.padding.top / V.value.height,
514
- right: V.value.padding.right / V.value.width,
515
- bottom: V.value.padding.bottom / V.value.height,
516
- left: V.value.padding.left / V.value.width
517
- }
518
- }), br = m(() => ve(F.value.customPalette)), xr = at(null), Sr = at(null), Cr = C(null), wr = m(() => F.value.debug);
519
- function Tr({ resetSlicer: e = !0 } = {}) {
520
- if (u(k.dataset) ? (ie({
521
- componentName: "VueUiStackbar",
522
- type: "dataset",
523
- debug: wr.value
524
- }), ir.value = !0) : k.dataset.forEach((e, t) => {
525
- _e({
526
- datasetObject: e,
527
- requiredAttributes: ["name", "series"]
528
- }).forEach((e) => {
529
- bn.value = !1, ie({
530
- componentName: "VueUiStackbar",
531
- type: "datasetSerieAttribute",
532
- property: e,
533
- index: t,
534
- debug: wr.value
535
- }), ir.value = !0;
536
- });
537
- }), u(k.dataset) || (ir.value = F.value.loading), setTimeout(() => {
538
- jn.value = !0;
539
- }, 10), F.value.responsive) {
540
- let e = Re(() => {
541
- jn.value = !1;
542
- let { width: e, height: t } = ze({
543
- chart: xn.value,
544
- title: V.value.title.text ? En.value : null,
545
- legend: V.value.legend.show ? Dn.value : null,
546
- slicer: V.value.zoom.show && J.value > 6 ? On.value.$el : null,
547
- source: kn.value
548
- });
549
- requestAnimationFrame(() => {
550
- yr.value.width = e, yr.value.height = t - 12, clearTimeout(Cr.value), Cr.value = setTimeout(() => {
551
- jn.value = !0;
552
- }, 10);
553
- });
554
- });
555
- xr.value && (Sr.value && xr.value.unobserve(Sr.value), xr.value.disconnect()), xr.value = new ResizeObserver(e), Sr.value = xn.value.parentNode, xr.value.observe(Sr.value);
556
- }
557
- $n(), e && Ca();
558
- }
559
- nt(() => {
560
- Xn.stop(), xr.value && (Sr.value && xr.value.unobserve(Sr.value), xr.value.disconnect());
561
- });
562
- let Er = m(() => L.value.y.position === "right");
563
- function Dr() {
564
- let e = 0;
565
- F.value.orientation === "vertical" && Bn.value && (e = Array.from(Bn.value.querySelectorAll("text")).reduce((e, t) => {
566
- let n = t.getComputedTextLength();
567
- return n > e ? n : e;
568
- }, 0)), F.value.orientation === "horizontal" && Vn.value && (e = Array.from(Vn.value.querySelectorAll("text")).reduce((e, t) => {
569
- let n = t.getComputedTextLength();
570
- return n > e ? n : e;
571
- }, 0));
572
- let t = zn.value ? zn.value.getBoundingClientRect().width + L.value.y.axisName.fontSize + L.value.y.axisName.offsetX : 0;
573
- return {
574
- left: Er.value ? 0 : e + t,
575
- right: Er.value ? e + t : 0,
576
- scaleLabelsWidth: e,
577
- yAxisLabelWidth: t
578
- };
579
- }
580
- let Or = C(0), kr = C(0), Ar = Re((e) => {
581
- kr.value = e + R.value.totalValues.fontSize;
582
- }, 100);
583
- function jr() {
584
- if (F.value.orientation !== "horizontal") return 0;
585
- let e = Un.value;
586
- if (!e) return 0;
587
- let t = Array.from(e.querySelectorAll("text"));
588
- if (!t.length) return 0;
589
- let n = -Infinity;
590
- for (let e of t) try {
591
- let t = e.getBBox(), r = t.x + t.width;
592
- r > n && (n = r);
593
- } catch {}
594
- return Math.max(0, n - (K.value?.right ?? 0));
595
- }
596
- lt((e) => {
597
- if (F.value.orientation !== "horizontal") return;
598
- let t = Un.value;
599
- if (!t) return;
600
- let n = () => {
601
- let e = jr();
602
- Ar(e);
603
- };
604
- n();
605
- let r = new ResizeObserver(n);
606
- r.observe(t);
607
- let a = new MutationObserver(n);
608
- a.observe(t, {
609
- childList: !0,
610
- subtree: !0,
611
- characterData: !0
612
- }), e(() => {
613
- r.disconnect(), a.disconnect();
614
- });
615
- }), nt(() => {
616
- Or.value = 0, kr.value = 0;
617
- });
618
- let Mr = C(0), Nr = C(0);
619
- function Pr(e) {
620
- let t = Number.isFinite(e) ? e : 0;
621
- Mr.value !== t && (Mr.value = t);
622
- }
623
- function Fr() {
624
- let e = F.value.orientation === "vertical" ? Vn.value : Bn.value;
625
- if (!e) {
626
- Pr(0);
627
- return;
628
- }
629
- try {
630
- Pr(e.getBBox()?.height);
631
- } catch {
632
- Pr(0);
633
- }
634
- }
635
- function Ir() {
636
- Nr.value && cancelAnimationFrame(Nr.value), Nr.value = requestAnimationFrame(() => {
637
- requestAnimationFrame(() => {
638
- Fr();
639
- });
640
- });
641
- }
642
- nt(() => {
643
- Nr.value && cancelAnimationFrame(Nr.value);
644
- });
645
- let Lr = m(() => {
646
- let e = 0;
647
- if (Rn.value) try {
648
- e = Rn.value.getBBox().height;
649
- } catch {
650
- e = 0;
651
- }
652
- let t = z.value.show ? Mr.value : 0;
653
- return e + t;
654
- }), K = m(() => {
655
- Kn.value;
656
- let { height: e, width: t } = yr.value, { right: n } = yr.value.paddingRatio, r = R.value.totalValues.show && k.dataset && k.dataset.length > 1 ? R.value.totalValues.fontSize * 1.3 : 0, a = 0, o = 0, s = 0, c = 0;
657
- if (L.value.y.axisLabels.show) {
658
- let e = Dr();
659
- a = e.left, o = e.right, s = e.scaleLabelsWidth, c = e.yAxisLabelWidth;
660
- }
661
- let l = V.value.padding.top + r, u = t - t * n - kr.value - o, d = e - V.value.padding.bottom - Lr.value - r, f = V.value.padding.left + a, ee = t - f - t * n - kr.value - o, te = e - l - V.value.padding.bottom - Lr.value - r;
662
- return {
663
- chartHeight: e,
664
- chartWidth: t,
665
- top: l,
666
- right: u,
667
- bottom: d,
668
- left: f,
669
- width: Math.max(0, ee),
670
- height: Math.max(0, te),
671
- offsetLeft: a,
672
- offsetRightAxis: o,
673
- scaleLabelsWidth: s,
674
- yAxisLabelWidth: c
675
- };
676
- }), Rr = m(() => {
677
- let { left: e, top: t, width: n, height: r } = K.value, a = Y.value.start, o = Y.value.end, s = Math.max(1, o - a), c = Math.max(0, Math.min(s, (X.value.start ?? a) - a)), l = Math.max(0, Math.min(s, (X.value.end ?? o) - a)), u = Math.max(0, l - c), d = {
678
- fill: V.value.zoom.preview.fill,
679
- stroke: V.value.zoom.preview.stroke,
680
- "stroke-width": V.value.zoom.preview.strokeWidth,
681
- "stroke-dasharray": V.value.zoom.preview.strokeDasharray,
682
- "stroke-linecap": "round",
683
- "stroke-linejoin": "round",
684
- style: {
685
- pointerEvents: "none",
686
- transition: "none !important",
687
- animation: "none !important"
688
- }
689
- };
690
- if (F.value.orientation === "horizontal") {
691
- let a = r / s;
692
- return {
693
- x: e,
694
- y: t + c * a,
695
- width: n,
696
- height: u * a,
697
- ...d
698
- };
699
- }
700
- {
701
- let a = n / s;
702
- return {
703
- x: e + c * a,
704
- y: t,
705
- width: u * a,
706
- height: r,
707
- ...d
708
- };
709
- }
710
- }), q = m(() => rr.value.map((e, t) => {
711
- let n = ee(), r = String(e.key ?? e.id ?? e.name ?? n), a = d(e.color) || br.value[t] || f[t] || f[t % f.length];
712
- return {
713
- ...e,
714
- datasetKey: r,
715
- series: JSON.parse(JSON.stringify(e.series)).map((e) => R.value.distributed ? Math.abs(e) : e),
716
- signedSeries: e.series.map((e) => e >= 0 ? 1 : -1),
717
- absoluteIndex: t,
718
- id: n,
719
- color: a
720
- };
721
- })), J = m(() => {
722
- let e = Math.max(...q.value.filter((e) => !M.value.includes(e.id)).map((e) => e.series.length));
723
- return isFinite(e) ? e : Math.max(...q.value.map((e) => e.series.length));
724
- });
725
- function zr(e) {
726
- er.value = e;
727
- }
728
- let Y = C({
729
- start: 0,
730
- end: Math.max(...rr.value.map((e) => e.series.length))
731
- }), X = C({
732
- start: 0,
733
- end: Math.max(...rr.value.map((e) => e.series.length))
734
- }), Br = C(!1), Vr = C(!1), Hr = C(null), Ur = C(null), Wr = C(null), Gr = C(!1), Kr = C({
735
- time: 0,
736
- x: 0,
737
- y: 0,
738
- pointerType: null
739
- }), qr = m(() => V.value.zoom?.dragToZoom), Jr = m(() => qr.value.show && bn.value && Sa.value && J.value > 1 && !nr.value), Yr = null, Xr = {}, Zr = m(() => V.value.zoom.preview.enable && (X.value.start !== Y.value.start || X.value.end !== Y.value.end));
740
- function Qr(e, t) {
741
- X.value[e] = t;
742
- }
743
- function $r(e, t = Y.value) {
744
- if (!e || typeof e != "object") return null;
745
- let n = e.start !== void 0 && e.start !== null, r = e.end !== void 0 && e.end !== null;
746
- if (!n && !r) return null;
747
- let a = Number(n ? e.start : t.start), o = Number(r ? e.end : t.end);
748
- return !Number.isFinite(a) || !Number.isFinite(o) ? null : {
749
- start: a,
750
- end: o
751
- };
752
- }
753
- function ei(e) {
754
- let t = $r(e);
755
- t && A("update:zoomState", t);
756
- }
757
- function ti() {
758
- Yr &&= (cancelAnimationFrame(Yr), null), Xr = {};
759
- }
760
- function ni(e) {
761
- let t = $r(e);
762
- if (!t) return null;
763
- let { start: n, end: r } = t;
764
- return (n !== Number(Y.value.start) || r !== Number(Y.value.end)) && (ti(), Y.value = {
765
- start: n,
766
- end: r
767
- }, X.value = {
768
- start: n,
769
- end: r
770
- }, ii()), {
771
- start: Number(Y.value.start),
772
- end: Number(Y.value.end)
773
- };
774
- }
775
- function ri(e) {
776
- let t = ni(e);
777
- return t ? (A("update:zoomState", t), t) : null;
778
- }
779
- function ii() {
780
- let e = J.value, t = Math.max(0, Math.min(Y.value.start ?? 0, e - 1)), n = Math.max(t + 1, Math.min(Y.value.end ?? e, e));
781
- (!Number.isFinite(t) || !Number.isFinite(n) || n <= t) && (t = 0, n = e), Y.value.start = t, Y.value.end = n, X.value.start = t, X.value.end = n, On.value && On.value.setRangeValues(t, n);
782
- }
783
- let ai = C(null);
784
- function oi() {
785
- return new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(() => e())));
786
- }
787
- nt(() => {
788
- ai.value && cancelAnimationFrame(ai.value), ti(), Ka();
789
- });
790
- async function si({ force: e = !1, publish: t = !1 } = {}) {
791
- if (V.value.zoom.keepState && !e && Sa.value && (Y.value.start !== 0 || Y.value.end !== 0)) {
792
- ii();
793
- return;
794
- }
795
- let n = !e;
796
- Ca(n), await tt(), ai.value && cancelAnimationFrame(ai.value), ai.value = requestAnimationFrame(async () => {
797
- await oi(), Ca(n), ai.value = null, t && (ei({
798
- start: Number(Y.value.start),
799
- end: Number(Y.value.end)
800
- }), A("zoomReset"));
801
- });
802
- }
803
- let Z = m(() => {
804
- let e;
805
- return e = F.value.orientation === "vertical" ? K.value.width / (Y.value.end - Y.value.start) : K.value.height / (Y.value.end - Y.value.start), e <= 0 ? 0 : e;
806
- }), ci = m(() => ne(q.value.filter((e) => !M.value.includes(e.id))).slice(Y.value.start, Y.value.end)), li = m(() => M.value.length === q.value.length), ui = m(() => V.value.zoom.minimap.show ? ne(q.value.map((e) => ({
807
- ...e,
808
- series: e.series.map((e) => e ?? 0)
809
- })).filter((e) => li.value ? !0 : !M.value.includes(e.id))) : []), di = m(() => V.value.zoom.minimap.show ? [{
810
- name: "",
811
- series: ui.value,
812
- color: "#000000",
813
- isVisible: !0
814
- }] : []), fi = m(() => ne(q.value.filter((e) => !M.value.includes(e.id)).map((e) => ({
815
- ...e,
816
- series: e.series.map((t, n) => e.signedSeries[n] === -1 && t >= 0 ? -t : t)
817
- }))).slice(Y.value.start, Y.value.end)), pi = m(() => {
818
- let e = q.value.filter((e) => !M.value.includes(e.id));
819
- return {
820
- positive: ne(e.map((e) => ({
821
- ...e,
822
- series: e.series.slice(Y.value.start, Y.value.end).map((e) => e >= 0 ? e : 0)
823
- }))),
824
- negative: ne(e.map((e) => ({
825
- ...e,
826
- series: e.series.slice(Y.value.start, Y.value.end).map((e) => e < 0 ? e : 0)
827
- })))
828
- };
829
- }), mi = m(() => {
830
- let e = L.value.scale.scaleMax !== null && !R.value.distributed ? L.value.scale.scaleMax : Math.max(...pi.value.positive), t = Math.min(...pi.value.negative), n = L.value.scale.scaleMin !== null && !R.value.distributed ? L.value.scale.scaleMin : [
831
- -Infinity,
832
- Infinity,
833
- NaN,
834
- void 0,
835
- null
836
- ].includes(t) ? 0 : t;
837
- return !R.value.distributed && (L.value.scale.scaleMax !== null || L.value.scale.scaleMin !== null) ? ge(n > 0 ? 0 : n, e < 0 ? 0 : e, L.value.scale.ticks) : re(n > 0 ? 0 : n, e < 0 ? 0 : e, L.value.scale.ticks);
838
- }), hi = m(() => mi.value.ticks), Q = m(() => {
839
- let e = mi.value, t = e.max + Math.abs(e.min);
840
- return hi.value.map((n) => ({
841
- zero: K.value.bottom - K.value.height * (Math.abs(e.min) / t),
842
- y: K.value.bottom - K.value.height * ((n + Math.abs(e.min)) / t),
843
- x: Er.value ? K.value.right + 8 : K.value.left - 8,
844
- horizontal_zero: K.value.left + K.value.width * (Math.abs(e.min) / t),
845
- horizontal_x: K.value.left + K.value.width * ((n + Math.abs(e.min)) / t),
846
- horizontal_y: K.value.bottom - 8,
847
- value: n
848
- }));
849
- }), gi = m(() => {
850
- let e = L.value.y.axisLabels, { prefix: n, suffix: r } = R.value.dataLabels;
851
- return hi.value.map((a) => String(ue(e.formatter, a, t({
852
- p: n,
853
- v: a,
854
- s: r,
855
- r: e.rounding
856
- }), { datapoint: { value: a } }) ?? "")).join("|");
857
- });
858
- ct(() => [
859
- gi.value,
860
- F.value.orientation,
861
- L.value.y.axisLabels.show,
862
- L.value.y.axisLabels.fontSize,
863
- L.value.y.axisLabels.bold,
864
- L.value.y.position
865
- ], () => {
866
- L.value.y.axisLabels.show && $n();
867
- }, { flush: "post" });
868
- let _i = C([]), vi = C([]), yi = 0;
869
- lt(() => {
870
- let e = ++yi;
871
- (async () => {
872
- let t = await Ce({
873
- values: z.value.values,
874
- maxDatapoints: J.value,
875
- formatter: z.value.datetimeFormatter,
876
- start: Y.value.start,
877
- end: Y.value.end
878
- });
879
- e === yi && (_i.value = t);
880
- })();
881
- });
882
- let bi = 0;
883
- lt(() => {
884
- let e = ++bi;
885
- (async () => {
886
- let t = await Ce({
887
- values: z.value.values,
888
- maxDatapoints: J.value,
889
- formatter: z.value.datetimeFormatter,
890
- start: 0,
891
- end: J.value
892
- });
893
- e === bi && (vi.value = t);
894
- })();
895
- });
896
- let xi = m(() => {
897
- let e = Math.max(1, Math.floor(Number(z.value.modulo) || 1)), t = (_i.value || []).map((e) => e?.text ?? ""), n = (vi.value || []).map((e) => e?.text ?? ""), r = Y.value.start ?? 0, a = r > 0 || t.length < n.length;
898
- return le({
899
- configuredModulo: e,
900
- visibleTexts: t,
901
- allTexts: n,
902
- startAbs: r,
903
- isZoomed: a
904
- });
905
- });
906
- function Si(e) {
907
- let t = z.value, n = _i.value || [], r = vi.value || [], a = Y.value.start ?? 0, o = J.value, s = n.map((e) => e?.text ?? ""), c = r.map((e) => e?.text ?? ""), l = ae(!!t.showOnlyFirstAndLast, !!t.showOnlyAtModulo, xi.value, s, c, a, e, o);
908
- if (!t.showFirstAndLast || t.showOnlyFirstAndLast || !l.length) return l;
909
- let u = l.length - 1;
910
- return l.map((e, t) => t !== 0 && t !== u ? e : {
911
- ...e,
912
- text: s[t] ?? ""
913
- });
914
- }
915
- let Ci = m(() => Si(N.value)), wi = m(() => Si(null));
916
- lt(() => {
917
- F.value.orientation, z.value.show, z.value.fontSize, z.value.rotation, z.value.offsetY, wi.value?.map((e) => e?.text ?? "").join("|"), gi.value, yr.value.width, yr.value.height, Vn.value, Bn.value, Rn.value, Ir();
918
- }, { flush: "post" });
919
- let Ti = C({
920
- months: [],
921
- shortMonths: [],
922
- days: [],
923
- shortDays: []
924
- }), Ei = 0;
925
- lt(() => {
926
- let e = ++Ei, t = z.value.datetimeFormatter;
927
- (async () => {
928
- let n = await Se(t.locale).catch(() => Se("en"));
929
- e === Ei && (Ti.value = n.data);
930
- })();
931
- });
932
- let Di = m(() => {
933
- let e = z.value.datetimeFormatter, t = xe({
934
- useUTC: e.useUTC,
935
- locale: Ti.value,
936
- januaryAsYear: e.januaryAsYear
937
- });
938
- return (e, n) => {
939
- let r = z.value.values?.[e];
940
- return r == null ? "" : t.formatDate(new Date(r), n);
941
- };
942
- }), Oi = m(() => (z.value.values || []).map((e, t) => ({
943
- text: Di.value(t, V.value.zoom.timeFormat),
944
- absoluteIndex: t
945
- }))), ki = m(() => (z.value.values || []).map((e, t) => ({
946
- text: Di.value(t, B.value.timeFormat),
947
- absoluteIndex: t
948
- }))), Ai = m(() => {
949
- let e = /* @__PURE__ */ new Map();
950
- return (z.value.values || []).forEach((t) => {
951
- if ([
952
- null,
953
- void 0,
954
- ""
955
- ].includes(t)) return;
956
- let n = String(t);
957
- e.set(n, (e.get(n) || 0) + 1);
958
- }), e;
959
- });
960
- function ji(e) {
961
- let t = (z.value.values || [])[e];
962
- if ([
963
- null,
964
- void 0,
965
- ""
966
- ].includes(t)) return `fallback-${e}`;
967
- let n = String(t);
968
- return (Ai.value.get(n) || 0) > 1 ? `${n}-${e}` : n;
969
- }
970
- function Mi(e, t) {
971
- return `${e.datasetKey}:${ji(t)}`;
972
- }
973
- let $ = m(() => {
974
- if (!bn.value && !nr.value) return [];
975
- let e = Array(J.value).fill(0), t = Array(J.value).fill(0), n = Array(J.value).fill(0), r = Array(J.value).fill(0), a = Math.max(...pi.value.positive) || 0, o = Math.min(...pi.value.negative), s = [
976
- -Infinity,
977
- Infinity,
978
- NaN,
979
- void 0,
980
- null
981
- ].includes(o) ? 0 : o, { min: c, max: l } = !R.value.distributed && (L.value.scale.scaleMax !== null || L.value.scale.scaleMin !== null) ? ge(L.value.scale.scaleMin === null ? s > 0 ? 0 : s : L.value.scale.scaleMin, L.value.scale.scaleMax === null ? a < 0 ? 0 : a : L.value.scale.scaleMax, L.value.scale.ticks) : re(L.value.scale.scaleMin === null ? s > 0 ? 0 : s : L.value.scale.scaleMin, L.value.scale.scaleMax === null ? a < 0 ? 0 : a : L.value.scale.scaleMax, L.value.scale.ticks), u = l + (c >= 0 ? 0 : Math.abs(c)) || 1, d = K.value.height, f = K.value.width, ee = Q.value[0] ? Q.value[0].zero : K.value.bottom, te = Q.value[0] ? Q.value[0].horizontal_zero : K.value.left, ne = Array(ui.value.length).fill(0), ie = Array(ui.value.length).fill(0);
982
- return q.value.filter((e) => !M.value.includes(e.id)).map((a) => {
983
- let o = a.series.slice(), s = o.map((e, t) => ne[t]), c = o.map((e, t) => ie[t]);
984
- o.forEach((e, t) => {
985
- (Number(e) || 0) >= 0 ? ne[t] += Number(e) || 0 : ie[t] += Math.abs(Number(e) || 0);
986
- });
987
- let l = a.series.slice(Y.value.start, Y.value.end), re = a.signedSeries.slice(Y.value.start, Y.value.end), ae = l.map((e, t) => Mi(a, Y.value.start + t)), oe = o.map((e, t) => Mi(a, t)), se = l.map((e, t) => K.value.left + Z.value * t + Z.value * R.value.gapRatio / 4), ce = (ui.value || []).filter(Number.isFinite), le = ce.length ? Math.max(...ce) : 0, ue = ce.length ? Math.min(...ce) : 0;
988
- function de({ minimapH: e }) {
989
- let t = 1e-9, n = le > 0;
990
- if (n && ue < 0) {
991
- let n = Math.max(le, Math.abs(ue)) || t;
992
- return {
993
- pxPerUnit: e / 2 / n,
994
- zero: e / 2
995
- };
996
- }
997
- return n ? {
998
- pxPerUnit: e / Math.max(t, le),
999
- zero: e
1000
- } : {
1001
- pxPerUnit: e / Math.max(t, Math.abs(ue)),
1002
- zero: 0
1003
- };
1004
- }
1005
- let fe = ({ left: e, unitW: t }) => {
1006
- let n = t * (R.value.gapRatio / 4);
1007
- return o.map((r, a) => e + t * a + n);
1008
- }, pe = l.map((e, t) => K.value.top + Z.value * t + Z.value * R.value.gapRatio / 4), me = l.map((t, r) => {
1009
- let a = R.value.distributed ? (t || 0) / ci.value[r] : (t || 0) / u, o, s;
1010
- return t > 0 ? (s = d * a, o = ee - s - e[r], e[r] += s) : (s = d * a, o = ee + n[r], n[r] += Math.abs(s)), o;
1011
- }), he = ({ minimapH: e }) => {
1012
- if (R.value.distributed) return o.map((t, n) => {
1013
- let r = Math.abs(Number(t) || 0), a = Math.abs(ui.value?.[n] || 0) || 1e-9;
1014
- return e - (s[n] + r) / a * e;
1015
- });
1016
- let { pxPerUnit: t, zero: n } = de({ minimapH: e });
1017
- return o.map((e, r) => {
1018
- let a = Number(e) || 0;
1019
- return a >= 0 ? n - (s[r] + a) * t : n + c[r] * t;
1020
- });
1021
- }, ge = l.map((e, n) => {
1022
- let a = R.value.distributed ? (e || 0) / ci.value[n] : (e || 0) / u, o, s;
1023
- return e > 0 ? (s = f * a, o = te + t[n], t[n] += s) : (s = f * a, o = te - Math.abs(s) - r[n], r[n] += Math.abs(s)), o;
1024
- }), _e = l.map((e, t) => {
1025
- let n = R.value.distributed ? (e || 0) / ci.value[t] : (e || 0) / u;
1026
- return e > 0 ? d * n : d * Math.abs(n);
1027
- }), ve = ({ minimapH: e }) => {
1028
- if (R.value.distributed) return o.map((t, n) => Math.abs(Number(t) || 0) / (Math.abs(ui.value?.[n] || 0) || 1e-9) * e);
1029
- let { pxPerUnit: t } = de({ minimapH: e });
1030
- return o.map((e) => Math.abs(Number(e) || 0) * t);
1031
- }, ye = l.map((e, t) => {
1032
- let n = R.value.distributed ? (e || 0) / ci.value[t] : (e || 0) / u;
1033
- return e > 0 ? f * n : f * Math.abs(n);
1034
- }), be = l.map((e) => Math.abs(e)).reduce((e, t) => e + t, 0);
1035
- return {
1036
- ...a,
1037
- proportions: l.map((e, t) => R.value.distributed ? (e || 0) / ci.value[t] : (e || 0) / be),
1038
- series: l,
1039
- signedSeries: re,
1040
- rectKeys: ae,
1041
- minimapRectKeys: oe,
1042
- x: se,
1043
- y: me,
1044
- height: _e,
1045
- horizontal_width: ye,
1046
- horizontal_y: pe,
1047
- horizontal_x: ge,
1048
- xMinimap: fe,
1049
- yMinimap: he,
1050
- heightMinimap: ve
1051
- };
1052
- });
1053
- }), Ni = m(() => fi.value.map((e, t) => ({
1054
- value: e,
1055
- sign: e >= 0 ? 1 : -1
1056
- })));
1057
- function Pi(e, n, r, a, o) {
1058
- let s = o === -1 && e >= 0 ? -e : e;
1059
- return ue(R.value.dataLabels.formatter, s, t({
1060
- p: R.value.dataLabels.prefix,
1061
- v: s,
1062
- s: R.value.dataLabels.suffix,
1063
- r: R.value.dataLabels.rounding
1064
- }), {
1065
- datapoint: n,
1066
- seriesIndex: r,
1067
- datapointIndex: a
1068
- });
1069
- }
1070
- function Fi(e, n, r, a) {
1071
- return ue(R.value.dataLabels.formatter, e, t({
1072
- v: isNaN(e) ? 0 : e,
1073
- s: "%",
1074
- r: R.value.dataLabels.rounding
1075
- }), {
1076
- datapoint: n,
1077
- seriesIndex: r,
1078
- datapointIndex: a
1079
- });
1080
- }
1081
- function Ii(e) {
1082
- let t = JSON.parse(JSON.stringify($.value)).map((t) => ({
1083
- name: t.name,
1084
- value: t.series[e] === 0 ? 0 : t.series[e] || null,
1085
- proportion: t.proportions[e] || null,
1086
- color: t.color,
1087
- id: t.id
1088
- }));
1089
- F.value.events.datapointClick && F.value.events.datapointClick({
1090
- datapoint: t,
1091
- seriesIndex: e + Y.value.start
1092
- }), A("selectDatapoint", {
1093
- datapoint: t,
1094
- period: _i.value[e]
1095
- });
1096
- }
1097
- function Li(e) {
1098
- return JSON.parse(JSON.stringify($.value)).map((t) => ({
1099
- name: t.name,
1100
- absoluteIndex: t.absoluteIndex,
1101
- value: t.series[e] === 0 ? 0 : (t.signedSeries[e] === -1 && t.series[e] >= 0 ? -t.series[e] : t.series[e]) || null,
1102
- proportion: t.proportions[e] || null,
1103
- color: t.color,
1104
- id: t.id,
1105
- timeLabel: vi.value[e]
1106
- }));
1107
- }
1108
- function Ri(e) {
1109
- if (F.value.events.datapointLeave) {
1110
- let t = Li(e);
1111
- F.value.events.datapointLeave({
1112
- datapoint: t,
1113
- seriesIndex: e + Y.value.start
1114
- });
1115
- }
1116
- Sn.value = !1, N.value = null, P.value === e && (P.value = null);
1117
- }
1118
- let zi = m(() => Array(J.value).fill(0).map((e, t) => Li(t)));
1119
- ct(() => k.selectedXIndex, (e) => {
1120
- if ([null, void 0].includes(k.selectedXIndex)) {
1121
- N.value = null;
1122
- return;
1123
- }
1124
- let t = e - Y.value.start;
1125
- t < 0 || e >= Y.value.end ? N.value = null : N.value = t ?? null;
1126
- }, { immediate: !0 });
1127
- function Bi(e) {
1128
- if (!B.value.showTimeLabel) return null;
1129
- let t = _i.value?.[e]?.text || null, n = ki.value?.[e]?.text || null, r = vi.value?.[e]?.text || null;
1130
- return B.value.useDefaultTimeFormat ? t : n || r;
1131
- }
1132
- function Vi(e, n = "pointer") {
1133
- if (li.value) return;
1134
- Yn.value = n, P.value = e, N.value = e, Sn.value = !0;
1135
- let r = B.value.customFormat, a = Li(e);
1136
- Oa({
1137
- seriesIndex: e,
1138
- datapoint: a
1139
- }), F.value.events.datapointEnter && F.value.events.datapointEnter({
1140
- datapoint: a,
1141
- seriesIndex: e + Y.value.start
1142
- }), Cn.value = {
1143
- timeLabel: Bi(e),
1144
- datapoint: a,
1145
- seriesIndex: e,
1146
- config: F.value,
1147
- series: $.value
1148
- };
1149
- let s = a.map((e) => Math.abs(e.value)).reduce((e, t) => e + t, 0), c = a.map((e) => he(e.value)).reduce((e, t) => e + t, 0);
1150
- if (o(r) && se(() => r({
1151
- seriesIndex: e,
1152
- datapoint: a,
1153
- series: $.value,
1154
- config: F.value
1155
- }))) wn.value = r({
1156
- seriesIndex: e,
1157
- datapoint: a,
1158
- series: $.value,
1159
- config: F.value
1160
- });
1161
- else {
1162
- let { showValue: n, showTotal: r, totalTranslation: o, showPercentage: l, borderColor: u, roundingValue: d, roundingPercentage: f } = B.value, ee = "", te = Bi(e);
1163
- te && (ee += `<div style="width:100%;text-align:center;border-bottom:1px solid ${u};padding-bottom:6px;margin-bottom:3px;">${te}</div>`), r && (ee += `<div class="vue-data-ui-tooltip-total" style="display:flex;flex-direction:row;align-items:center;gap:4px">
1164
- <span>${o}:</span>
1165
- <span>
1166
- ${ue(R.value.dataLabels.formatter, c, t({
1167
- p: R.value.dataLabels.prefix,
1168
- v: c,
1169
- s: R.value.dataLabels.suffix,
1170
- r: d
1171
- }), { datapoint: {
1172
- name: o,
1173
- value: c
1174
- } })}
1175
- </span>
1176
- </div>`);
1177
- let ne = [n && l ? "(" : "", n && l ? ")" : ""];
1178
- a.reverse().forEach((e) => {
1179
- ee += `
1180
- <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
1181
- <svg viewBox="0 0 60 60" height="14" width="14"><rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="${R.value.gradient.show ? `url(#gradient_${e.id})` : e.color}"/>${yn.pattern ? `<rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="url(#pattern_${j.value}_${e.absoluteIndex})"/>` : ""}</svg>
1182
- ${e.name}${n || l ? ":" : ""} ${n ? ue(R.value.dataLabels.formatter, e.value, t({
1183
- p: R.value.dataLabels.prefix,
1184
- v: e.value,
1185
- s: R.value.dataLabels.suffix,
1186
- r: d
1187
- }, { datapoint: e })) : ""} ${ne[0]}${l ? t({
1188
- v: isNaN(e.value / s) ? 0 : Math.abs(e.value) / s * 100,
1189
- s: "%",
1190
- r: f
1191
- }) : ""}${ne[1]}
1192
- </div>
1193
- `;
1194
- }), wn.value = `<div>${ee}</div>`;
1195
- }
1196
- }
1197
- let Hi = m(() => yr.value.width), Ui = m(() => yr.value.height);
1198
- Ne({
1199
- timeLabelsEls: F.value.orientation === "vertical" ? Vn : Bn,
1200
- timeLabels: _i,
1201
- slicer: Y,
1202
- configRef: F,
1203
- rotationPath: [
1204
- "style",
1205
- "chart",
1206
- "grid",
1207
- "x",
1208
- "timeLabels",
1209
- "rotation"
1210
- ],
1211
- autoRotatePath: [
1212
- "style",
1213
- "chart",
1214
- "grid",
1215
- "x",
1216
- "timeLabels",
1217
- "autoRotate",
1218
- "enable"
1219
- ],
1220
- isAutoSize: !1,
1221
- width: Hi,
1222
- height: Ui,
1223
- rotation: z.value.autoRotate.angle
1224
- });
1225
- function Wi(e) {
1226
- An.value = e, Tn.value += 1;
1227
- }
1228
- function Gi() {
1229
- G.value.showTable = !G.value.showTable;
1230
- }
1231
- function Ki() {
1232
- G.value.dataLabels.show = !G.value.dataLabels.show;
1233
- }
1234
- function qi() {
1235
- G.value.showTooltip = !G.value.showTooltip;
1236
- }
1237
- function Ji() {
1238
- return $.value;
1239
- }
1240
- let Yi = m(() => {
1241
- if ($.value.length === 0) return {
1242
- head: [],
1243
- body: [],
1244
- config: {},
1245
- columnNames: []
1246
- };
1247
- let e = $.value.map(({ name: e, color: t }) => ({
1248
- label: e,
1249
- color: t
1250
- })), t = [];
1251
- return _i.value.forEach((e) => {
1252
- let n = [z.value.values[e.absoluteIndex] ? e.text : i + 1];
1253
- q.value.forEach((t) => {
1254
- n.push(Number((t.series[e.absoluteIndex] || 0).toFixed(F.value.table.td.roundingValue)));
1255
- }), t.push(n);
1256
- }), {
1257
- head: e,
1258
- body: t
1259
- };
1260
- });
1261
- function Xi(e = null) {
1262
- let t = [
1263
- [V.value.title.text],
1264
- [V.value.title.subtitle.text],
1265
- [""]
1266
- ], n = ["", ...Yi.value.head.map((e) => e.label)], r = Yi.value.body, o = t.concat([n]).concat(r), s = a(o);
1267
- e ? e(s) : de({
1268
- csvContent: s,
1269
- title: V.value.title.text || "vue-ui-stackbar"
1270
- });
1271
- }
1272
- let Zi = m(() => {
1273
- let e = [""].concat($.value.map((e) => e.name), "__SUM__"), t = [], n = Y.value.end - Y.value.start;
1274
- for (let e = 0; e < n; e += 1) {
1275
- let n = Y.value.start + e, r = $.value.map((t) => t.series[e] ?? 0).reduce((e, t) => e + t, 0);
1276
- t.push([z.value.values[n] && _i.value[e]?.text || n + 1].concat($.value.map((t) => (t.series[e] ?? 0).toFixed(F.value.table.td.roundingValue)), (r ?? 0).toFixed(F.value.table.td.roundingValue)));
1277
- }
1278
- let r = {
1279
- th: {
1280
- backgroundColor: F.value.table.th.backgroundColor,
1281
- color: F.value.table.th.color,
1282
- outline: F.value.table.th.outline
1283
- },
1284
- td: {
1285
- backgroundColor: F.value.table.td.backgroundColor,
1286
- color: F.value.table.td.color,
1287
- outline: F.value.table.td.outline
1288
- },
1289
- breakpoint: F.value.table.responsiveBreakpoint
1290
- }, a = [F.value.table.columnNames.period].concat($.value.map((e) => e.name), F.value.table.columnNames.total);
1291
- return {
1292
- head: e,
1293
- body: t.slice(0, Y.value.end - Y.value.start),
1294
- config: r,
1295
- colNames: a
1296
- };
1297
- });
1298
- function Qi() {
1299
- M.value.length ? M.value = [] : ra.value.forEach((e) => {
1300
- M.value.push(e.id);
1301
- }), A("selectLegend", $.value);
1302
- }
1303
- function $i(e) {
1304
- if (M.value.includes(e.id)) M.value = M.value.filter((t) => t !== e.id);
1305
- else {
1306
- if (M.value.length === q.value.length - 1) return;
1307
- M.value.push(e.id);
1308
- }
1309
- A("selectLegend", $.value);
1310
- }
1311
- function ea(e) {
1312
- return q.value.length ? q.value.find((t) => t.name === e) || (wr.value && console.warn(`VueUiStackbar - Series name not found "${e}"`), null) : (wr.value && console.warn("VueUiStackbar - There are no series to show."), null);
1313
- }
1314
- function ta(e) {
1315
- let t = ea(e);
1316
- t !== null && M.value.includes(t.id) && $i({ id: t.id });
1317
- }
1318
- function na(e) {
1319
- let t = ea(e);
1320
- t !== null && (M.value.includes(t.id) || $i({ id: t.id }));
1321
- }
1322
- let ra = m(() => q.value.map((e, t) => ({
1323
- ...e,
1324
- shape: "square"
1325
- })).map((e) => ({
1326
- ...e,
1327
- opacity: M.value.includes(e.id) ? .5 : 1,
1328
- segregate: () => $i(e),
1329
- isSegregated: M.value.includes(e.id)
1330
- }))), ia = m(() => ({
1331
- cy: "stackbar-legend",
1332
- backgroundColor: V.value.legend.backgroundColor,
1333
- color: V.value.legend.color,
1334
- fontSize: V.value.legend.fontSize,
1335
- paddingBottom: 12,
1336
- fontWeight: V.value.legend.bold ? "bold" : ""
1337
- })), aa = C(!1);
1338
- function oa() {
1339
- aa.value = !aa.value;
1340
- }
1341
- function sa(e, t) {
1342
- let n = JSON.parse(JSON.stringify($.value)).map((e) => ({
1343
- name: e.name,
1344
- value: e.series[t] === 0 ? 0 : (e.signedSeries[t] === -1 && e.series[t] >= 0 ? -e.series[t] : e.series[t]) || null,
1345
- proportion: e.proportions[t] || null,
1346
- color: e.color,
1347
- id: e.id
1348
- }));
1349
- A("selectTimeLabel", {
1350
- datapoint: n,
1351
- absoluteIndex: e.absoluteIndex,
1352
- label: e.text
1353
- });
1354
- }
1355
- let ca = m(() => Math.max(...$.value.flatMap((e) => e.series)));
1356
- function la(e, t) {
1357
- return R.value.showDistributedPercentage && R.value.distributed ? fr.value ? t * 100 >= R.value.dataLabels.hideUnderPercentage : !R.value.dataLabels.hideEmptyPercentages || t > 0 : fr.value ? (dr.value && wr.value && console.warn("Vue Data UI - VueUiStackbar - You cannot set both dataLabels.hideUnderPercentage and dataLabels.hideUnderValue. Note that dataLabels.hideUnderPercentage takes precedence in this case."), e > ca.value * R.value.dataLabels.hideUnderPercentage / 100) : dr.value ? Math.abs(e) >= R.value.dataLabels.hideUnderValue : !R.value.dataLabels.hideEmptyValues || e !== 0;
1358
- }
1359
- async function ua({ scale: e = 2 } = {}) {
1360
- if (!xn.value) return;
1361
- let { imageUri: t, base64: n } = await Pe({
1362
- domElement: xn.value,
1363
- base64: !0,
1364
- img: !0,
1365
- scale: e
1366
- }), r = xn.value.getBoundingClientRect(), a = {
1367
- width: r.width,
1368
- height: r.height,
1369
- aspectRatio: r.height ? r.width / r.height : 0
1370
- }, o = await ce(t, e) ?? a;
1371
- return {
1372
- imageUri: t,
1373
- base64: n,
1374
- title: V.value.title.text,
1375
- ...o
1376
- };
1377
- }
1378
- let da = m(() => {
1379
- let e = F.value.table.useDialog && !F.value.table.show, t = G.value.showTable;
1380
- return {
1381
- component: e ? hn : un,
1382
- title: `${V.value.title.text}${V.value.title.subtitle.text ? `: ${V.value.title.subtitle.text}` : ""}`,
1383
- props: e ? {
1384
- backgroundColor: F.value.table.th.backgroundColor,
1385
- color: F.value.table.th.color,
1386
- headerColor: F.value.table.th.color,
1387
- headerBg: F.value.table.th.backgroundColor,
1388
- isFullscreen: An.value,
1389
- fullscreenParent: xn.value,
1390
- forcedWidth: Math.min(800, window.innerWidth * .8),
1391
- isCursorPointer: U.value
1392
- } : {
1393
- hideDetails: !0,
1394
- config: {
1395
- open: t,
1396
- maxHeight: 1e4,
1397
- body: {
1398
- backgroundColor: V.value.backgroundColor,
1399
- color: V.value.color
1400
- },
1401
- head: {
1402
- backgroundColor: V.value.backgroundColor,
1403
- color: V.value.color
1404
- }
1405
- }
1406
- }
1407
- };
1408
- });
1409
- ct(() => G.value.showTable, (e) => {
1410
- F.value.table.show || (e && F.value.table.useDialog && In.value ? In.value.open() : "close" in In.value && In.value.close());
1411
- });
1412
- function fa() {
1413
- G.value.showTable = !1, Ln.value && Ln.value.setTableIconState(!1);
1414
- }
1415
- let pa = m(() => V.value.backgroundColor), ma = m(() => V.value.legend), ha = m(() => V.value.title), { isCallbackImaging: ga, isCallbackSvg: _a, generateSvg: va, onGenerateImage: ya } = Ae({
1416
- svg: W,
1417
- title: ha,
1418
- legend: ma,
1419
- legendItems: ra,
1420
- backgroundColor: pa,
1421
- getSvgCallback: () => F.value.userOptions.callbacks.svg,
1422
- generateImage: vr
1423
- });
1424
- function ba(e, t = Y.value.start) {
1425
- let n = J.value, r = Number(t);
1426
- return e > n ? n : e < 0 || e <= r ? Math.min(r + 1, n) : e;
1427
- }
1428
- let xa = C(!1), Sa = C(!1);
1429
- function Ca(e = !0) {
1430
- if (!xa.value) {
1431
- xa.value = !0;
1432
- try {
1433
- let { startIndex: t, endIndex: n, keepState: r } = V.value.zoom, a = r ? Math.max(0, J.value) : J.value;
1434
- if (r && a <= 0) return;
1435
- let o = t ?? 0, s = n == null ? a : Math.min(ba(n + 1, o), a);
1436
- wa.value = !0, Y.value.start = o, Y.value.end = s, X.value.start = o, X.value.end = s, ii(), Sa.value = !0, e && k.zoomState && ni(k.zoomState);
1437
- } finally {
1438
- queueMicrotask(() => {
1439
- wa.value = !1;
1440
- }), xa.value = !1;
1441
- }
1442
- }
1443
- }
1444
- let wa = C(!1);
1445
- ct([() => k.zoomState, Sa], ([e, t]) => {
1446
- t && e && ni(e);
1447
- }, {
1448
- deep: !0,
1449
- immediate: !0
1450
- });
1451
- function Ta(e) {
1452
- Xr = {
1453
- ...Xr,
1454
- ...e
1455
- }, Yr && cancelAnimationFrame(Yr), Yr = requestAnimationFrame(() => {
1456
- let e = {
1457
- ...Y.value,
1458
- ...Xr
1459
- };
1460
- Xr = {}, Yr = null, Y.value = e, X.value = { ...e }, ii(), ei({
1461
- start: Number(Y.value.start),
1462
- end: Number(Y.value.end)
1463
- });
1464
- });
1465
- }
1466
- function Ea(e) {
1467
- if (xa.value || wa.value) return;
1468
- let t = Number(e);
1469
- Number.isFinite(t) && (A("zoomStart", {
1470
- index: t,
1471
- isZoom: t !== 0
1472
- }), t !== Y.value.start && Ta({ start: t }));
1473
- }
1474
- function Da(e) {
1475
- if (xa.value || wa.value) return;
1476
- let t = Xr.start === void 0 ? Y.value.start : Xr.start, n = ba(Number(e), t);
1477
- Number.isFinite(n) && (A("zoomEnd", {
1478
- index: n,
1479
- isZoom: n !== J.value
1480
- }), (n !== Y.value.end || Xr.start !== void 0) && Ta({ end: n }));
1481
- }
1482
- function Oa({ seriesIndex: e, datapoint: t }) {
1483
- let n = Y.value.start + e;
1484
- A("selectX", {
1485
- dataset: t,
1486
- index: n,
1487
- indexLabel: z.value.values[n]
1488
- });
1489
- }
1490
- function ka() {
1491
- return { y0: Q.value?.[0]?.zero ?? K.value.bottom };
1492
- }
1493
- function Aa(e) {
1494
- let { y0: t } = ka(), n = R.value.totalValues, r = Math.max(2, n.fontSize * .3 + n.offsetY), a = Infinity, o = !1;
1495
- for (let t of $.value || []) {
1496
- let n = t?.series?.[e] ?? 0, r = t?.height?.[e] ?? 0, s = t?.y?.[e];
1497
- n > 0 && r > 0 && Number.isFinite(s) && (o = !0, s < a && (a = s));
1498
- }
1499
- let s = (o && Number.isFinite(a) ? a : t) - r;
1500
- return Math.min(Math.max(s, 0), K.value.bottom);
1501
- }
1502
- function ja(e) {
1503
- let { x0: t } = ka(), n = Math.max(2, R.value.totalValues.fontSize * .3 + R.value.totalValues.offsetX), r = -Infinity, a = !1;
1504
- for (let t of $.value || []) {
1505
- let n = t?.series?.[e] ?? 0, o = t?.horizontal_x?.[e], s = t?.horizontal_width?.[e], c = Number.isFinite(s) ? Math.max(0, s) : 0;
1506
- Number.isFinite(o) && n > 0 && c > 0 && (a = !0, r = Math.max(r, o + c));
1507
- }
1508
- return (a && Number.isFinite(r) ? r : t) + n;
1509
- }
1510
- async function Ma() {
1511
- if (A("copyAlt", {
1512
- config: F.value,
1513
- dataset: $.value
1514
- }), !F.value.userOptions.callbacks.altCopy) {
1515
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1516
- return;
1517
- }
1518
- await Promise.resolve(F.value.userOptions.callbacks.altCopy({
1519
- config: F.value,
1520
- dataset: $.value
1521
- }));
1522
- }
1523
- let Na = C(!1);
1524
- function Pa() {
1525
- P.value = null, Na.value = !0;
1526
- }
1527
- function Fa() {
1528
- Vr.value = !1, P.value = null, Sn.value = !1, N.value = null, A("selectX", {
1529
- index: null,
1530
- indexLabel: null,
1531
- dataset: null
1532
- }), Na.value = !1;
1533
- }
1534
- function Ia(e) {
1535
- let t = W.value;
1536
- if (!t) return null;
1537
- if (t.createSVGPoint && t.getScreenCTM) {
1538
- let n = t.createSVGPoint();
1539
- n.x = e.clientX, n.y = e.clientY;
1540
- let r = t.getScreenCTM();
1541
- if (r) {
1542
- let e = n.matrixTransform(r.inverse());
1543
- return {
1544
- x: e.x,
1545
- y: e.y
1546
- };
1547
- }
1548
- }
1549
- let n = t.getBoundingClientRect(), r = t.viewBox?.baseVal || {
1550
- x: 0,
1551
- y: 0,
1552
- width: n.width,
1553
- height: n.height
1554
- }, a = Math.min(n.width / r.width, n.height / r.height);
1555
- if (!Number.isFinite(a) || a <= 0) return null;
1556
- let o = r.width * a, s = r.height * a, c = (n.width - o) / 2, l = (n.height - s) / 2;
1557
- return {
1558
- x: (e.clientX - n.left - c) / a + r.x,
1559
- y: (e.clientY - n.top - l) / a + r.y
1560
- };
1561
- }
1562
- let La = m(() => F.value.orientation === "horizontal"), Ra = m(() => {
1563
- if (!Br.value || Hr.value == null || Ur.value == null) return null;
1564
- let e = Math.min(Hr.value, Ur.value), t = Math.abs(Ur.value - Hr.value);
1565
- return La.value ? {
1566
- x: K.value.left,
1567
- y: e,
1568
- width: K.value.width,
1569
- height: t
1570
- } : {
1571
- x: e,
1572
- y: K.value.top,
1573
- width: t,
1574
- height: K.value.height
1575
- };
1576
- }), za = m(() => Sa.value ? Number(Y.value.start) !== 0 || Number(Y.value.end) !== Number(J.value) : !1);
1577
- function Ba() {
1578
- return La.value ? K.value.top : K.value.left;
1579
- }
1580
- function Va() {
1581
- return La.value ? K.value.bottom : K.value.right;
1582
- }
1583
- function Ha() {
1584
- return La.value ? K.value.height : K.value.width;
1585
- }
1586
- function Ua(e) {
1587
- return La.value ? e.y : e.x;
1588
- }
1589
- function Wa(e) {
1590
- return Math.min(Math.max(e, Ba()), Va());
1591
- }
1592
- function Ga() {
1593
- N.value = null, er.value = null, P.value = null, Yn.value = "pointer", Sn.value = !1;
1594
- }
1595
- function Ka(e) {
1596
- let t = e?.pointerId == null ? Wr.value : e.pointerId;
1597
- t != null && W.value?.hasPointerCapture?.(t) && W.value.releasePointerCapture(t), Br.value = !1, Hr.value = null, Ur.value = null, Wr.value = null;
1598
- }
1599
- function qa() {
1600
- Gr.value = !0, setTimeout(() => {
1601
- Gr.value = !1;
1602
- }, 0);
1603
- }
1604
- function Ja(e) {
1605
- Gr.value && (Gr.value = !1, e.preventDefault(), e.stopPropagation());
1606
- }
1607
- function Ya(e) {
1608
- if (!Jr.value || !za.value || !e) return !1;
1609
- let t = Date.now(), n = e.pointerType || "mouse", r = Kr.value, a = n === "touch" ? 450 : 350, o = n === "touch" ? 28 : 10, s = Math.hypot(e.clientX - r.x, e.clientY - r.y);
1610
- return r.time > 0 && r.pointerType === n && t - r.time <= a && s <= o ? (Kr.value = {
1611
- time: 0,
1612
- x: 0,
1613
- y: 0,
1614
- pointerType: null
1615
- }, qa(), Ka(e), si({
1616
- force: !0,
1617
- publish: !0
1618
- }), !0) : (Kr.value = {
1619
- time: t,
1620
- x: e.clientX,
1621
- y: e.clientY,
1622
- pointerType: n
1623
- }, !1);
1624
- }
1625
- function Xa(e) {
1626
- let t = Math.max(0, Number(Y.value.end) - Number(Y.value.start));
1627
- if (t <= 0 || Z.value <= 0) return null;
1628
- let n = Math.floor((Wa(e) - Ba()) / Z.value);
1629
- return Math.max(0, Math.min(t - 1, n));
1630
- }
1631
- function Za(e, t) {
1632
- let n = Xa(e), r = Xa(t);
1633
- if (n == null || r == null) return null;
1634
- let a = Math.min(n, r), o = Math.max(n, r);
1635
- return o <= a ? null : {
1636
- start: Number(Y.value.start) + a,
1637
- end: Number(Y.value.start) + o + 1
1638
- };
1639
- }
1640
- function Qa(e) {
1641
- let t = ri(e);
1642
- return t ? (A("zoomStart", {
1643
- index: t.start,
1644
- isZoom: t.start !== 0
1645
- }), A("zoomEnd", {
1646
- index: t.end,
1647
- isZoom: t.end !== J.value
1648
- }), t) : null;
1649
- }
1650
- function $a(e) {
1651
- if (!Jr.value || aa.value || e.button !== void 0 && e.button !== 0 || Wr.value != null && e.pointerId !== Wr.value) return;
1652
- let t = Ia(e);
1653
- if (!t) return;
1654
- let { left: n, right: r, top: a, bottom: o } = K.value;
1655
- if (t.x < n || t.x > r || t.y < a || t.y > o || Number(Y.value.end) - Number(Y.value.start) <= 1) return;
1656
- Vr.value = !0, W.value?.focus?.({ preventScroll: !0 }), Ga();
1657
- let s = Wa(Ua(t));
1658
- Wr.value = e.pointerId, Br.value = !0, Hr.value = s, Ur.value = s;
1659
- }
1660
- function eo(e) {
1661
- if (!Jr.value || !Br.value || Wr.value != null && e.pointerId !== Wr.value) return;
1662
- let t = Ia(e);
1663
- t && (Ur.value = Wa(Ua(t)), Hr.value != null && Math.abs(Ur.value - Hr.value) >= 2 && !W.value?.hasPointerCapture?.(e.pointerId) && W.value?.setPointerCapture?.(e.pointerId));
1664
- }
1665
- function to(e) {
1666
- if (!Jr.value || !Br.value || Wr.value != null && e.pointerId !== Wr.value) return;
1667
- let t = Ia(e);
1668
- t && (Ur.value = Wa(Ua(t)));
1669
- let n = Hr.value, r = Ur.value;
1670
- if ((n == null || r == null ? 0 : Math.abs(r - n)) < Math.max(4, Ha() * .01)) {
1671
- if (Ya(e)) return;
1672
- Ka(e);
1673
- return;
1674
- }
1675
- let a = Za(n, r);
1676
- if (!a) {
1677
- Ka(e);
1678
- return;
1679
- }
1680
- Ka(e), Qa(a) && (Kr.value = {
1681
- time: 0,
1682
- x: 0,
1683
- y: 0,
1684
- pointerType: null
1685
- }, Ga(), qa());
1686
- }
1687
- function no(e) {
1688
- if (!W.value || aa.value || document.activeElement !== W.value || (Vr.value = !1, li.value) || !Y.value.end && Y.value.end !== 0) return;
1689
- let t = F.value.orientation === "vertical", n = F.value.orientation === "horizontal", r = t && e.key === "ArrowLeft" || n && e.key === "ArrowUp", a = t && e.key === "ArrowRight" || n && e.key === "ArrowDown", o = e.key === "Enter" || e.key === " ", s = e.key === "Escape";
1690
- if (!r && !a && !o && !s) return;
1691
- let c = Y.value.end - Y.value.start;
1692
- if (c <= 0) return;
1693
- if (e.preventDefault(), e.stopPropagation(), s) {
1694
- if (Jr.value && (za.value || Br.value)) {
1695
- Ka(), si({
1696
- force: !0,
1697
- publish: !0
1698
- });
1699
- return;
1700
- }
1701
- P.value = null, Sn.value = !1, N.value = null, A("selectX", {
1702
- index: null,
1703
- indexLabel: null,
1704
- dataset: null
1705
- });
1706
- return;
1707
- }
1708
- if (o) {
1709
- if (P.value === null) return;
1710
- Ii(P.value);
1711
- return;
1712
- }
1713
- let l = P.value, u = N.value;
1714
- l !== null && l >= 0 && l < c ? a ? (l += 1, l >= c && (l = 0)) : r && (--l, l < 0 && (l = c - 1)) : u !== null && u >= 0 && u < c ? (l = a ? u + 1 : u - 1, l >= c && (l = 0), l < 0 && (l = c - 1)) : l = a ? 0 : c - 1, P.value = l, ro(l), Vi(l, "keyboard");
1715
- }
1716
- function ro(e) {
1717
- if (!Number.isFinite(e)) return;
1718
- let t, n;
1719
- F.value.orientation === "vertical" ? (t = K.value.left + e * Z.value + Z.value / 2, n = K.value.top + K.value.height / 2) : (t = K.value.left + K.value.width / 2, n = K.value.top + e * Z.value + Z.value / 2);
1720
- let r = l(t, n, W.value);
1721
- r && (Jn.value = r);
1722
- }
1723
- let io = m(() => ({
1724
- headers: Zi.value?.colNames ?? [],
1725
- rows: Zi.value?.body ?? []
1726
- }));
1727
- return Le({
1728
- getData: Ji,
1729
- getImage: ua,
1730
- generatePdf: _r,
1731
- generateCsv: Xi,
1732
- generateImage: vr,
1733
- generateSvg: va,
1734
- hideSeries: na,
1735
- showSeries: ta,
1736
- toggleTable: Gi,
1737
- toggleLabels: Ki,
1738
- toggleTooltip: qi,
1739
- toggleAnnotator: oa,
1740
- toggleFullscreen: Wi,
1741
- copyAlt: Ma,
1742
- resetZoom: () => si({
1743
- force: !0,
1744
- publish: !0
1745
- }),
1746
- setZoomState: ri
1747
- }), (n, r) => (S(), _("div", {
1748
- id: `stackbar_${j.value}`,
1749
- ref_key: "stackbarChart",
1750
- ref: xn,
1751
- class: y({
1752
- "vue-data-ui-component": !0,
1753
- "vue-ui-stackbar": !0,
1754
- "vue-data-ui-wrapper-fullscreen": An.value
1755
- }),
1756
- style: x(`background:${V.value.backgroundColor};color:${V.value.color};font-family:${F.value.style.fontFamily}; position: relative; ${F.value.responsive ? "height: 100%" : ""}`),
1757
- onMouseenter: cr,
1758
- onMouseleave: lr
1759
- }, [
1760
- Ye("div", {
1761
- id: `chart-instructions-${j.value}`,
1762
- class: "sr-only"
1763
- }, [Ye("p", null, E(F.value.a11y.translations.keyboardNavigation), 1)], 8, ft),
1764
- io.value?.rows?.length ? (S(), h(Ue, {
1765
- key: 0,
1766
- uid: j.value,
1767
- head: io.value.headers,
1768
- body: io.value.rows,
1769
- notice: F.value.a11y.translations.tableAvailable,
1770
- caption: F.value.a11y.translations.tableCaption
1771
- }, null, 8, [
1772
- "uid",
1773
- "head",
1774
- "body",
1775
- "notice",
1776
- "caption"
1777
- ])) : g("", !0),
1778
- I.value.buttons.annotator ? (S(), h(D(fn), {
1779
- key: 1,
1780
- svgRef: D(W),
1781
- backgroundColor: V.value.backgroundColor,
1782
- color: V.value.color,
1783
- active: aa.value,
1784
- isCursorPointer: U.value,
1785
- palette: I.value.annotatorPalette,
1786
- onClose: oa
1787
- }, {
1788
- "annotator-action-close": O(() => [T(n.$slots, "annotator-action-close", {}, void 0, !0)]),
1789
- "annotator-action-color": O(({ color: e }) => [T(n.$slots, "annotator-action-color", b(v({ color: e })), void 0, !0)]),
1790
- "annotator-action-draw": O(({ mode: e }) => [T(n.$slots, "annotator-action-draw", b(v({ mode: e })), void 0, !0)]),
1791
- "annotator-action-undo": O(({ disabled: e }) => [T(n.$slots, "annotator-action-undo", b(v({ disabled: e })), void 0, !0)]),
1792
- "annotator-action-redo": O(({ disabled: e }) => [T(n.$slots, "annotator-action-redo", b(v({ disabled: e })), void 0, !0)]),
1793
- "annotator-action-delete": O(({ disabled: e }) => [T(n.$slots, "annotator-action-delete", b(v({ disabled: e })), void 0, !0)]),
1794
- _: 3
1795
- }, 8, [
1796
- "svgRef",
1797
- "backgroundColor",
1798
- "color",
1799
- "active",
1800
- "isCursorPointer",
1801
- "palette"
1802
- ])) : g("", !0),
1803
- T(n.$slots, "userConfig", {}, void 0, !0),
1804
- V.value.title.text ? (S(), _("div", {
1805
- key: 2,
1806
- ref_key: "chartTitle",
1807
- ref: En,
1808
- style: "width:100%;background:transparent;padding-bottom:24px"
1809
- }, [(S(), h(Fe, {
1810
- key: `title_${Mn.value}`,
1811
- config: {
1812
- title: {
1813
- cy: "stackbar-title",
1814
- ...V.value.title
1815
- },
1816
- subtitle: {
1817
- cy: "stackbar-subtitle",
1818
- ...V.value.title.subtitle
1819
- }
1820
- }
1821
- }, null, 8, ["config"]))], 512)) : g("", !0),
1822
- Ye("div", { id: `legend-top-${j.value}` }, null, 8, pt),
1823
- I.value.show && bn.value && (D(sr) || D(ar)) ? (S(), h(D(pn), {
1824
- ref_key: "userOptionsRef",
1825
- ref: Ln,
1826
- key: `user_option_${Tn.value}`,
1827
- backgroundColor: V.value.backgroundColor,
1828
- color: V.value.color,
1829
- isPrinting: D(hr),
1830
- isImaging: D(gr),
1831
- uid: j.value,
1832
- hasTooltip: B.value.show && I.value.buttons.tooltip,
1833
- hasPdf: I.value.buttons.pdf,
1834
- hasImg: I.value.buttons.img,
1835
- hasSvg: I.value.buttons.svg,
1836
- hasXls: I.value.buttons.csv,
1837
- hasTable: I.value.buttons.table,
1838
- hasLabel: I.value.buttons.labels,
1839
- hasFullscreen: I.value.buttons.fullscreen,
1840
- hasAltCopy: I.value.buttons.altCopy,
1841
- isFullscreen: An.value,
1842
- chartElement: xn.value,
1843
- position: I.value.position,
1844
- isTooltip: G.value.showTooltip,
1845
- titles: { ...I.value.buttonTitles },
1846
- hasAnnotator: I.value.buttons.annotator,
1847
- isAnnotation: aa.value,
1848
- callbacks: I.value.callbacks,
1849
- printScale: I.value.print.scale,
1850
- tableDialog: F.value.table.useDialog,
1851
- isCursorPointer: U.value,
1852
- onToggleFullscreen: Wi,
1853
- onGeneratePdf: D(_r),
1854
- onGenerateCsv: Xi,
1855
- onGenerateImage: D(ya),
1856
- onGenerateSvg: D(va),
1857
- onToggleTable: Gi,
1858
- onToggleLabels: Ki,
1859
- onToggleTooltip: qi,
1860
- onToggleAnnotator: oa,
1861
- onCopyAlt: Ma,
1862
- style: x({ visibility: D(sr) ? D(ar) ? "visible" : "hidden" : "visible" })
1863
- }, Xe({ _: 2 }, [
1864
- n.$slots.menuIcon ? {
1865
- name: "menuIcon",
1866
- fn: O(({ isOpen: e, color: t }) => [T(n.$slots, "menuIcon", b(v({
1867
- isOpen: e,
1868
- color: t
1869
- })), void 0, !0)]),
1870
- key: "0"
1871
- } : void 0,
1872
- n.$slots.optionTooltip ? {
1873
- name: "optionTooltip",
1874
- fn: O(() => [T(n.$slots, "optionTooltip", {}, void 0, !0)]),
1875
- key: "1"
1876
- } : void 0,
1877
- n.$slots.optionPdf ? {
1878
- name: "optionPdf",
1879
- fn: O(() => [T(n.$slots, "optionPdf", {}, void 0, !0)]),
1880
- key: "2"
1881
- } : void 0,
1882
- n.$slots.optionCsv ? {
1883
- name: "optionCsv",
1884
- fn: O(() => [T(n.$slots, "optionCsv", {}, void 0, !0)]),
1885
- key: "3"
1886
- } : void 0,
1887
- n.$slots.optionImg ? {
1888
- name: "optionImg",
1889
- fn: O(() => [T(n.$slots, "optionImg", {}, void 0, !0)]),
1890
- key: "4"
1891
- } : void 0,
1892
- n.$slots.optionSvg ? {
1893
- name: "optionSvg",
1894
- fn: O(() => [T(n.$slots, "optionSvg", {}, void 0, !0)]),
1895
- key: "5"
1896
- } : void 0,
1897
- n.$slots.optionTable ? {
1898
- name: "optionTable",
1899
- fn: O(() => [T(n.$slots, "optionTable", {}, void 0, !0)]),
1900
- key: "6"
1901
- } : void 0,
1902
- n.$slots.optionLabels ? {
1903
- name: "optionLabels",
1904
- fn: O(() => [T(n.$slots, "optionLabels", {}, void 0, !0)]),
1905
- key: "7"
1906
- } : void 0,
1907
- n.$slots.optionFullscreen ? {
1908
- name: "optionFullscreen",
1909
- fn: O(({ toggleFullscreen: e, isFullscreen: t }) => [T(n.$slots, "optionFullscreen", b(v({
1910
- toggleFullscreen: e,
1911
- isFullscreen: t
1912
- })), void 0, !0)]),
1913
- key: "8"
1914
- } : void 0,
1915
- n.$slots.optionAnnotator ? {
1916
- name: "optionAnnotator",
1917
- fn: O(({ toggleAnnotator: e, isAnnotator: t }) => [T(n.$slots, "optionAnnotator", b(v({
1918
- toggleAnnotator: e,
1919
- isAnnotator: t
1920
- })), void 0, !0)]),
1921
- key: "9"
1922
- } : void 0,
1923
- n.$slots.optionAltCopy ? {
1924
- name: "optionAltCopy",
1925
- fn: O(({ altCopy: e }) => [T(n.$slots, "optionAltCopy", b(v({ altCopy: e })), void 0, !0)]),
1926
- key: "10"
1927
- } : void 0,
1928
- n.$slots["custom-menu-before"] ? {
1929
- name: "custom-menu-before",
1930
- fn: O(() => [T(n.$slots, "custom-menu-before", {}, void 0, !0)]),
1931
- key: "11"
1932
- } : void 0,
1933
- n.$slots["custom-menu-after"] ? {
1934
- name: "custom-menu-after",
1935
- fn: O(() => [T(n.$slots, "custom-menu-after", {}, void 0, !0)]),
1936
- key: "12"
1937
- } : void 0
1938
- ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.isTooltip.titles.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style".split("."))) : g("", !0),
1939
- Ye("div", mt, [(S(), _("svg", {
1940
- ref_key: "svgRef",
1941
- ref: W,
1942
- xmlns: D(pe),
1943
- "aria-describedby": `chart-instructions-${j.value}`,
1944
- viewBox: `0 0 ${K.value.chartWidth <= 0 ? 10 : K.value.chartWidth} ${K.value.chartHeight <= 0 ? 10 : K.value.chartHeight}`,
1945
- class: y({
1946
- "vue-data-ui-loading": D(nr),
1947
- "vue-data-ui-fullscreen--on": An.value,
1948
- "vue-data-ui-fulscreen--off": !An.value,
1949
- "vue-data-ui-no-transition": !D(H),
1950
- "vue-ui-stackbar-chart-zoom-pointer-focus": Jr.value && Vr.value
1951
- }),
1952
- style: x({
1953
- maxWidth: "100%",
1954
- overflow: "visible",
1955
- background: "transparent",
1956
- color: V.value.color,
1957
- cursor: Jr.value ? Br.value ? La.value ? "row-resize" : "col-resize" : "crosshair" : void 0,
1958
- touchAction: Jr.value ? La.value ? "pan-x" : "pan-y" : void 0,
1959
- userSelect: Jr.value ? "none" : void 0
1960
- }),
1961
- tabindex: "0",
1962
- onFocus: Pa,
1963
- onBlur: Fa,
1964
- onKeydown: no,
1965
- onPointerdown: $a,
1966
- onPointermove: eo,
1967
- onPointerup: to,
1968
- onPointercancel: Ka,
1969
- onClickCapture: Ja
1970
- }, [
1971
- Qe(D(mn)),
1972
- n.$slots["chart-background"] ? (S(), _("foreignObject", {
1973
- key: 0,
1974
- x: K.value.left,
1975
- y: K.value.top,
1976
- width: K.value.width <= 0 ? 10 : K.value.width,
1977
- height: K.value.height <= 0 ? 10 : K.value.height,
1978
- style: { pointerEvents: "none" }
1979
- }, [T(n.$slots, "chart-background", {}, void 0, !0)], 8, gt)) : g("", !0),
1980
- R.value.gradient.show ? (S(), _("defs", _t, [(S(!0), _(p, null, w($.value, (e, t) => (S(), h(Be, {
1981
- t: "linear",
1982
- id: `gradient_${e.id}`,
1983
- key: `gradient_${e.id}_${t}`,
1984
- x1: "0%",
1985
- y1: "0%",
1986
- x2: "0%",
1987
- y2: "100%",
1988
- stops: [
1989
- [
1990
- "0%",
1991
- e.color,
1992
- 1
1993
- ],
1994
- [
1995
- "61.8%",
1996
- D(c)(e.color, R.value.gradient.intensity / 100),
1997
- 1
1998
- ],
1999
- [
2000
- "100%",
2001
- e.color,
2002
- 1
2003
- ]
2004
- ]
2005
- }, null, 8, ["id", "stops"]))), 128))])) : g("", !0),
2006
- L.value.frame.show ? (S(), _("rect", {
2007
- key: 2,
2008
- style: {
2009
- pointerEvents: "none",
2010
- transition: "none",
2011
- animation: "none !important"
2012
- },
2013
- x: Math.max(0, K.value.left),
2014
- y: Math.max(0, K.value.top),
2015
- width: Math.max(0, K.value.width),
2016
- height: Math.max(0, K.value.height),
2017
- fill: "transparent",
2018
- stroke: L.value.frame.stroke,
2019
- "stroke-width": L.value.frame.strokeWidth,
2020
- "stroke-linecap": L.value.frame.strokeLinecap,
2021
- "stroke-linejoin": L.value.frame.strokeLinejoin,
2022
- "stroke-dasharray": L.value.frame.strokeDasharray
2023
- }, null, 8, vt)) : g("", !0),
2024
- L.value.x.showHorizontalLines && F.value.orientation === "vertical" ? (S(!0), _(p, { key: 3 }, w(Q.value, (e, t) => (S(), _("line", {
2025
- x1: K.value.left,
2026
- x2: K.value.right,
2027
- y1: e.y,
2028
- y2: e.y,
2029
- stroke: L.value.x.linesColor,
2030
- "stroke-width": L.value.x.linesThickness,
2031
- "stroke-dasharray": L.value.x.linesStrokeDasharray,
2032
- "stroke-linecap": "round"
2033
- }, null, 8, yt))), 256)) : g("", !0),
2034
- L.value.x.showHorizontalLines && F.value.orientation === "horizontal" ? (S(!0), _(p, { key: 4 }, w(Y.value.end - Y.value.start + 1, (e, t) => (S(), _("line", {
2035
- x1: K.value.left,
2036
- x2: K.value.right,
2037
- y1: K.value.top + Z.value * t,
2038
- y2: K.value.top + Z.value * t,
2039
- stroke: L.value.x.linesColor,
2040
- "stroke-width": L.value.x.linesThickness,
2041
- "stroke-dasharray": L.value.x.linesStrokeDasharray,
2042
- "stroke-linecap": "round"
2043
- }, null, 8, bt))), 256)) : g("", !0),
2044
- L.value.y.showVerticalLines && F.value.orientation === "vertical" ? (S(!0), _(p, { key: 5 }, w(Y.value.end - Y.value.start + 1, (e, t) => (S(), _("line", {
2045
- x1: K.value.left + Z.value * t,
2046
- x2: K.value.left + Z.value * t,
2047
- y1: K.value.top,
2048
- y2: K.value.bottom,
2049
- stroke: L.value.y.linesColor,
2050
- "stroke-width": L.value.y.linesThickness,
2051
- "stroke-dasharray": L.value.y.linesStrokeDasharray,
2052
- "stroke-linecap": "round"
2053
- }, null, 8, xt))), 256)) : g("", !0),
2054
- L.value.y.showVerticalLines && F.value.orientation === "horizontal" ? (S(!0), _(p, { key: 6 }, w(Q.value, (e, t) => (S(), _("line", {
2055
- x1: e.horizontal_x,
2056
- x2: e.horizontal_x,
2057
- y1: K.value.top,
2058
- y2: K.value.bottom,
2059
- stroke: L.value.y.linesColor,
2060
- "stroke-width": L.value.y.linesThickness,
2061
- "stroke-dasharray": L.value.y.linesStrokeDasharray,
2062
- "stroke-linecap": "round"
2063
- }, null, 8, St))), 256)) : g("", !0),
2064
- (S(!0), _(p, null, w($.value, (e, t) => (S(), _("g", { key: `stackbar-group-${e.datasetKey}-${t}-${j.value}` }, [n.$slots.pattern ? (S(), _("defs", Ct, [T(n.$slots, "pattern", et({ ref_for: !0 }, {
2065
- seriesIndex: e.absoluteIndex,
2066
- patternId: `pattern_${j.value}_${e.absoluteIndex}`
2067
- }), void 0, !0)])) : g("", !0), F.value.orientation === "vertical" ? (S(), _(p, { key: 1 }, [(S(!0), _(p, null, w(e.x, (t, n) => (S(), _("rect", {
2068
- key: `stackbar-rect-${e.rectKeys[n]}`,
2069
- x: t,
2070
- y: D(he)(e.y[n]),
2071
- height: e.height[n] < 0 ? 1e-4 : e.height[n] || 0,
2072
- rx: R.value.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : R.value.borderRadius,
2073
- width: Z.value * (1 - R.value.gapRatio / 2),
2074
- fill: R.value.gradient.show ? `url(#gradient_${e.id})` : e.color,
2075
- stroke: V.value.backgroundColor,
2076
- "stroke-width": R.value.strokeWidth,
2077
- "stroke-linecap": "round",
2078
- "stroke-linejoin": "round",
2079
- class: y({ "vue-data-ui-bar-transition": jn.value })
2080
- }, null, 10, wt))), 128)), n.$slots.pattern ? (S(), _("g", Tt, [(S(!0), _(p, null, w(e.x, (t, n) => (S(), _("rect", {
2081
- key: `stackbar-pattern-rect-${e.rectKeys[n]}`,
2082
- x: t,
2083
- y: D(he)(e.y[n]),
2084
- height: e.height[n] < 0 ? 1e-4 : e.height[n] || 0,
2085
- rx: R.value.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : R.value.borderRadius,
2086
- width: Z.value * (1 - R.value.gapRatio / 2),
2087
- fill: `url(#pattern_${j.value}_${e.absoluteIndex})`,
2088
- stroke: V.value.backgroundColor,
2089
- "stroke-width": R.value.strokeWidth,
2090
- "stroke-linecap": "round",
2091
- "stroke-linejoin": "round",
2092
- class: y({ "vue-data-ui-bar-transition": jn.value })
2093
- }, null, 10, Et))), 128))])) : g("", !0)], 64)) : (S(), _(p, { key: 2 }, [(S(!0), _(p, null, w(e.horizontal_x, (t, n) => (S(), _("rect", {
2094
- key: `stackbar-rect-${e.rectKeys[n]}`,
2095
- x: D(he)(t, K.value.left),
2096
- y: e.horizontal_y[n] < 0 ? 0 : e.horizontal_y[n],
2097
- width: D(he)(e.horizontal_width[n] < 0 ? 1e-4 : e.horizontal_width[n]),
2098
- rx: R.value.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : R.value.borderRadius,
2099
- height: Z.value * (1 - R.value.gapRatio / 2),
2100
- fill: R.value.gradient.show ? `url(#gradient_${e.id})` : e.color,
2101
- stroke: V.value.backgroundColor,
2102
- "stroke-width": R.value.strokeWidth,
2103
- "stroke-linecap": "round",
2104
- "stroke-linejoin": "round",
2105
- class: y({ "vue-data-ui-bar-transition": jn.value })
2106
- }, null, 10, Dt))), 128)), n.$slots.pattern ? (S(), _("g", Ot, [(S(!0), _(p, null, w(e.horizontal_x, (t, n) => (S(), _("rect", {
2107
- key: `stackbar-pattern-rect-${e.rectKeys[n]}`,
2108
- x: D(he)(t, K.value.left),
2109
- y: e.horizontal_y[n] < 0 ? 0 : e.horizontal_y[n],
2110
- width: D(he)(e.horizontal_width[n] < 0 ? 1e-4 : e.horizontal_width[n]),
2111
- rx: R.value.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : R.value.borderRadius,
2112
- height: Z.value * (1 - R.value.gapRatio / 2),
2113
- fill: `url(#pattern_${j.value}_${e.absoluteIndex})`,
2114
- stroke: V.value.backgroundColor,
2115
- "stroke-width": R.value.strokeWidth,
2116
- "stroke-linecap": "round",
2117
- "stroke-linejoin": "round",
2118
- class: y({ "vue-data-ui-bar-transition": jn.value })
2119
- }, null, 10, kt))), 128))])) : g("", !0)], 64))]))), 128)),
2120
- L.value.x.showAxis ? (S(), _("line", {
2121
- key: 7,
2122
- x1: K.value.left,
2123
- x2: K.value.right,
2124
- y1: K.value.bottom,
2125
- y2: K.value.bottom,
2126
- stroke: L.value.x.axisColor,
2127
- "stroke-width": L.value.x.axisThickness,
2128
- "stroke-linecap": "round",
2129
- "stroke-linejoin": "round"
2130
- }, null, 8, At)) : g("", !0),
2131
- L.value.y.showAxis && !R.value.distributed ? (S(), _("line", {
2132
- key: 8,
2133
- x1: Er.value ? K.value.right : K.value.left,
2134
- x2: Er.value ? K.value.right : K.value.left,
2135
- y1: K.value.top,
2136
- y2: K.value.bottom,
2137
- stroke: L.value.y.axisColor,
2138
- "stroke-width": L.value.y.axisThickness,
2139
- "stroke-linecap": "round",
2140
- "stroke-linejoin": "round"
2141
- }, null, 8, jt)) : g("", !0),
2142
- L.value.x.axisName.show && L.value.x.axisName.text ? (S(), _("text", {
2143
- key: 9,
2144
- ref_key: "xAxisLabel",
2145
- ref: Rn,
2146
- x: K.value.left + K.value.width / 2,
2147
- y: K.value.chartHeight - 3,
2148
- "font-size": L.value.x.axisName.fontSize,
2149
- fill: L.value.x.axisName.color,
2150
- "font-weight": L.value.x.axisName.bold ? "bold" : "normal",
2151
- "text-anchor": "middle"
2152
- }, E(L.value.x.axisName.text), 9, Mt)) : g("", !0),
2153
- L.value.y.axisName.show && L.value.y.axisName.text ? (S(), _("text", {
2154
- key: 10,
2155
- ref_key: "yAxisLabel",
2156
- ref: zn,
2157
- transform: `translate(${Er.value ? yr.value.width - L.value.y.axisName.fontSize / 2 - L.value.y.axisName.offsetX : L.value.y.axisName.fontSize + L.value.y.axisName.offsetX}, ${K.value.top + K.value.height / 2}) rotate(-90)`,
2158
- "font-size": L.value.y.axisName.fontSize,
2159
- fill: L.value.y.axisName.color,
2160
- "font-weight": L.value.y.axisName.bold ? "bold" : "normal",
2161
- "text-anchor": "middle"
2162
- }, E(L.value.y.axisName.text), 9, Nt)) : g("", !0),
2163
- G.value.dataLabels.show && F.value.orientation === "vertical" ? (S(), _(p, { key: 11 }, [(S(!0), _(p, null, w($.value, (e, t) => (S(), _("g", { key: `dp_${e.id}` }, [(S(!0), _(p, null, w(e.x, (n, r) => (S(), _(p, { key: `rect_${e.id}_${Y.value.start + r}` }, [la(e.series[r], e.proportions[r]) ? (S(), _("text", {
2164
- key: 0,
2165
- class: y({ "vue-data-ui-transition": D(H) }),
2166
- transform: `translate(${n + Z.value * (1 - R.value.gapRatio / 2) / 2}, ${e.y[r] + e.height[r] / 2 + R.value.dataLabels.fontSize / 3})`,
2167
- "font-size": R.value.dataLabels.fontSize,
2168
- fill: R.value.dataLabels.adaptColorToBackground ? D(fe)(e.color) : R.value.dataLabels.color,
2169
- "font-weight": R.value.dataLabels.bold ? "bold" : "normal",
2170
- "text-anchor": "middle"
2171
- }, E(R.value.showDistributedPercentage && R.value.distributed ? Fi(e.proportions[r] * 100, e, t, r) : Pi(e.series[r], e, t, r, e.signedSeries[r])), 11, Pt)) : g("", !0)], 64))), 128))]))), 128)), R.value.totalValues.show && $.value.length > 1 ? (S(), _("g", {
2172
- key: 0,
2173
- ref_key: "sumTop",
2174
- ref: Hn
2175
- }, [(S(!0), _(p, null, w(Ni.value, (e, t) => (S(), _(p, { key: `tl_${t + Y.value.start}` }, [!R.value.dataLabels.hideEmptyValues || e.value !== 0 ? (S(), _("text", {
2176
- key: 0,
2177
- class: y({ "vue-data-ui-transition": D(H) }),
2178
- transform: `translate(${K.value.left + Z.value * t + Z.value / 2}, ${Aa(t)})`,
2179
- "text-anchor": "middle",
2180
- "font-size": R.value.totalValues.fontSize,
2181
- "font-weight": R.value.totalValues.bold ? "bold" : "normal",
2182
- fill: R.value.totalValues.color
2183
- }, E(Pi(e.value, e, t, e.sign)), 11, Ft)) : g("", !0)], 64))), 128))], 512)) : g("", !0)], 64)) : g("", !0),
2184
- G.value.dataLabels.show && F.value.orientation === "horizontal" ? (S(), _(p, { key: 12 }, [(S(!0), _(p, null, w($.value, (e, t) => (S(), _("g", null, [(S(!0), _(p, null, w(e.horizontal_x, (n, r) => (S(), _(p, null, [la(e.series[r], e.proportions[r]) ? (S(), _("text", {
2185
- key: 0,
2186
- class: y({ "vue-data-ui-transition": D(H) }),
2187
- transform: `translate(${n + (e.horizontal_width[r] < 0 ? 1e-4 : e.horizontal_width[r]) / 2}, ${e.horizontal_y[r] + Z.value * (1 - R.value.gapRatio / 2) / 2 + R.value.dataLabels.fontSize / 3})`,
2188
- "font-size": R.value.dataLabels.fontSize,
2189
- fill: R.value.dataLabels.adaptColorToBackground ? D(fe)(e.color) : R.value.dataLabels.color,
2190
- "font-weight": R.value.dataLabels.bold ? "bold" : "normal",
2191
- "text-anchor": "middle"
2192
- }, E(R.value.showDistributedPercentage && R.value.distributed ? Fi(e.proportions[r] * 100, e, t, r) : Pi(e.series[r], e, t, r, e.signedSeries[r])), 11, It)) : g("", !0)], 64))), 256))]))), 256)), R.value.totalValues.show && $.value.length > 1 ? (S(), _("g", {
2193
- key: 0,
2194
- ref_key: "sumRight",
2195
- ref: Un
2196
- }, [(S(!0), _(p, null, w(Ni.value, (e, t) => (S(), _(p, null, [!R.value.dataLabels.hideEmptyValues || e.value !== 0 ? (S(), _("text", {
2197
- key: 0,
2198
- class: y({ "vue-data-ui-transition": D(H) }),
2199
- transform: `translate(${ja(t)}, ${K.value.top + Z.value * t + Z.value / 2 + R.value.totalValues.fontSize / 3})`,
2200
- "text-anchor": "start",
2201
- "font-size": R.value.totalValues.fontSize,
2202
- "font-weight": R.value.totalValues.bold ? "bold" : "normal",
2203
- fill: R.value.totalValues.color
2204
- }, E(Pi(e.value, e, t, e.sign)), 11, Lt)) : g("", !0)], 64))), 256))], 512)) : g("", !0)], 64)) : g("", !0),
2205
- L.value.y.axisLabels.show && !R.value.distributed && F.value.orientation === "vertical" ? (S(), _("g", {
2206
- key: 13,
2207
- ref_key: "scaleLabels",
2208
- ref: Bn
2209
- }, [(S(!0), _(p, null, w(Q.value, (e, t) => (S(), _("path", {
2210
- key: `ty_${t}`,
2211
- stroke: L.value.x.axisColor,
2212
- class: y({ "vue-data-ui-transition": D(H) }),
2213
- d: `M${Er.value ? K.value.right : K.value.left},${e.y} ${Er.value ? K.value.right + 6 : K.value.left - 6},${e.y}`,
2214
- "stroke-width": 1,
2215
- "stroke-linecap": "round"
2216
- }, null, 10, Rt))), 128)), (S(!0), _(p, null, w(Q.value, (e, n) => (S(), _("text", {
2217
- class: y({ "vue-data-ui-transition": D(H) }),
2218
- key: `tl_${n}`,
2219
- transform: `translate(${e.x}, ${e.y + L.value.y.axisLabels.fontSize / 3})`,
2220
- "font-size": L.value.y.axisLabels.fontSize,
2221
- "font-weight": L.value.y.axisLabels.bold ? "bold" : "normal",
2222
- fill: L.value.y.axisLabels.color,
2223
- "text-anchor": Er.value ? "start" : "end"
2224
- }, E(D(ue)(L.value.y.axisLabels.formatter, e.value, D(t)({
2225
- p: R.value.dataLabels.prefix,
2226
- v: e.value,
2227
- s: R.value.dataLabels.suffix,
2228
- r: L.value.y.axisLabels.rounding
2229
- }), { datapoint: e })), 11, zt))), 128))], 512)) : g("", !0),
2230
- L.value.y.axisLabels.show && !R.value.distributed && F.value.orientation === "horizontal" ? (S(), _("g", {
2231
- key: 14,
2232
- ref_key: "scaleLabels",
2233
- ref: Bn
2234
- }, [(S(!0), _(p, null, w(Q.value, (e, t) => (S(), _("path", {
2235
- key: `scy_${t}`,
2236
- d: `M${e.horizontal_x},${K.value.bottom} ${e.horizontal_x},${K.value.bottom + 6}`,
2237
- class: y({ "vue-data-ui-transition": D(H) }),
2238
- stroke: L.value.x.axisColor,
2239
- "stroke-width": 1,
2240
- "stroke-linecap": "round"
2241
- }, null, 10, Bt))), 128)), (S(!0), _(p, null, w(Q.value, (e, n) => (S(), _("text", {
2242
- class: y(["vue-data-ui-time-label", { "vue-data-ui-transition": D(H) }]),
2243
- key: `tly_${n}`,
2244
- "font-size": z.value.fontSize,
2245
- "font-weight": L.value.y.axisLabels.bold ? "bold" : "normal",
2246
- fill: L.value.y.axisLabels.color,
2247
- "text-anchor": z.value.rotation > 0 ? "start" : z.value.rotation < 0 ? "end" : "middle",
2248
- transform: `translate(${e.horizontal_x}, ${K.value.bottom + z.value.fontSize * 1.3 + z.value.offsetY}), rotate(${z.value.rotation})`
2249
- }, E(D(ue)(L.value.y.axisLabels.formatter, e.value, D(t)({
2250
- p: R.value.dataLabels.prefix,
2251
- v: e.value,
2252
- s: R.value.dataLabels.suffix,
2253
- r: L.value.y.axisLabels.rounding
2254
- }), { datapoint: e })), 11, Vt))), 128))], 512)) : g("", !0),
2255
- z.value.show && F.value.orientation === "vertical" ? (S(), _("g", {
2256
- key: 15,
2257
- ref_key: "timeLabelsEls",
2258
- ref: Vn
2259
- }, [n.$slots["time-label"] ? (S(), _("g", Ht, [(S(!0), _(p, null, w(Ci.value, (e, t) => (S(), _("g", null, [T(n.$slots, "time-label", et({ ref_for: !0 }, {
2260
- x: K.value.left + Z.value * t + Z.value / 2,
2261
- y: K.value.bottom + L.value.x.timeLabels.fontSize * 1.3 + L.value.x.timeLabels.offsetY,
2262
- fontSize: L.value.x.timeLabels.fontSize,
2263
- fill: L.value.x.timeLabels.color,
2264
- transform: `translate(${K.value.left + Z.value * t + Z.value / 2}, ${K.value.bottom + z.value.fontSize * 1.3 + z.value.offsetY}), rotate(${z.value.rotation})`,
2265
- absoluteIndex: e.absoluteIndex,
2266
- content: e.text,
2267
- textAnchor: L.value.x.timeLabels.rotation > 0 ? "start" : L.value.x.timeLabels.rotation < 0 ? "end" : "middle",
2268
- show: !0
2269
- }), void 0, !0)]))), 256))])) : (S(), _("g", Ut, [(S(!0), _(p, null, w(Ci.value, (e, t) => (S(), _("g", null, [String(e.text).includes("\n") ? (S(), _("text", {
2270
- class: y({ "vue-data-ui-transition": D(H) }),
2271
- key: t + "-multi",
2272
- "text-anchor": L.value.x.timeLabels.rotation > 0 ? "start" : L.value.x.timeLabels.rotation < 0 ? "end" : "middle",
2273
- "font-size": L.value.x.timeLabels.fontSize,
2274
- fill: L.value.x.timeLabels.color,
2275
- transform: `
2276
- translate(
2277
- ${K.value.left + Z.value * t + Z.value / 2},
2278
- ${K.value.bottom + z.value.fontSize * 1.3 + z.value.offsetY}
2279
- ),
2280
- rotate(${z.value.rotation})
2281
- `,
2282
- style: x({ cursor: U.value ? "pointer" : "default" }),
2283
- innerHTML: D(s)({
2284
- content: String(e.text),
2285
- fontSize: L.value.x.timeLabels.fontSize,
2286
- fill: L.value.x.timeLabels.color,
2287
- x: 0,
2288
- y: 0
2289
- }),
2290
- onClick: () => sa(e, t)
2291
- }, null, 14, Gt)) : (S(), _("text", {
2292
- class: "vue-data-ui-time-label",
2293
- key: t,
2294
- "text-anchor": L.value.x.timeLabels.rotation > 0 ? "start" : L.value.x.timeLabels.rotation < 0 ? "end" : "middle",
2295
- "font-size": L.value.x.timeLabels.fontSize,
2296
- "font-weight": L.value.x.timeLabels.bold ? "bold" : "normal",
2297
- fill: L.value.x.timeLabels.color,
2298
- transform: `translate(${K.value.left + Z.value * t + Z.value / 2}, ${K.value.bottom + z.value.fontSize * 1.3 + z.value.offsetY}), rotate(${z.value.rotation})`,
2299
- style: x({ cursor: U.value ? "pointer" : "default" }),
2300
- onClick: () => sa(e, t)
2301
- }, E(e.text), 13, Wt))]))), 256))]))], 512)) : g("", !0),
2302
- z.value.show && F.value.orientation === "horizontal" ? (S(), _("g", {
2303
- key: 16,
2304
- ref_key: "timeLabelsEls",
2305
- ref: Vn
2306
- }, [n.$slots["time-label"] ? (S(), _("g", Kt, [(S(!0), _(p, null, w(Ci.value, (e, t) => (S(), _("g", null, [T(n.$slots, "time-label", et({ ref_for: !0 }, {
2307
- x: K.value.left - 8,
2308
- y: K.value.top + Z.value * t + Z.value / 2 + L.value.y.axisLabels.fontSize / 3,
2309
- fontSize: L.value.x.timeLabels.fontSize,
2310
- fill: L.value.x.timeLabels.color,
2311
- transform: null,
2312
- absoluteIndex: e.absoluteIndex,
2313
- content: e.text,
2314
- textAnchor: "end",
2315
- show: !0
2316
- }), void 0, !0)]))), 256))])) : (S(), _("g", qt, [(S(!0), _(p, null, w(Ci.value, (e, t) => (S(), _("g", null, [String(e.text).includes("\n") ? (S(), _("text", {
2317
- key: 1,
2318
- "text-anchor": "end",
2319
- "font-size": L.value.y.axisLabels.fontSize,
2320
- "font-weight": L.value.y.axisLabels.bold ? "bold" : "normal",
2321
- fill: L.value.y.axisLabels.color,
2322
- transform: `translate(${K.value.left - 8}, ${K.value.top + Z.value * t + Z.value / 2 + L.value.y.axisLabels.fontSize / 3})`,
2323
- style: x({ cursor: U.value ? "pointer" : "default" }),
2324
- onClick: () => sa(e, t),
2325
- innerHTML: D(te)({
2326
- content: String(e.text),
2327
- fontSize: L.value.y.axisLabels.fontSize,
2328
- fill: L.value.y.axisLabels.color,
2329
- stroke: V.value.backgroundColor,
2330
- x: K.value.left - 8,
2331
- y: 0
2332
- })
2333
- }, null, 12, Yt)) : (S(), _("text", {
2334
- key: 0,
2335
- "text-anchor": "end",
2336
- "font-size": L.value.y.axisLabels.fontSize,
2337
- "font-weight": L.value.y.axisLabels.bold ? "bold" : "normal",
2338
- fill: L.value.y.axisLabels.color,
2339
- stroke: V.value.backgroundColor,
2340
- "stroke-linecap": "round",
2341
- "stroke-linejoin": "round",
2342
- "stroke-width": "3",
2343
- "paint-order": "stroke fill",
2344
- transform: `translate(${K.value.left - 8}, ${K.value.top + Z.value * t + Z.value / 2 + L.value.y.axisLabels.fontSize / 3})`,
2345
- style: x({ cursor: U.value ? "pointer" : "default" }),
2346
- onClick: () => sa(e, t)
2347
- }, E(e.text), 13, Jt))]))), 256))]))], 512)) : g("", !0),
2348
- G.value.showTooltip && F.value.orientation === "vertical" ? (S(!0), _(p, { key: 17 }, w(Y.value.end - Y.value.start, (e, t) => (S(), _("rect", {
2349
- x: K.value.left + t * Z.value,
2350
- y: K.value.top,
2351
- width: Z.value,
2352
- height: K.value.height < 0 ? 0 : K.value.height,
2353
- onClick: () => Ii(t),
2354
- onMouseenter: () => Vi(t, "pointer"),
2355
- onMouseleave: () => Ri(t),
2356
- fill: t === N.value || t === er.value ? V.value.highlighter.color : "transparent",
2357
- style: x({ opacity: V.value.highlighter.opacity / 100 })
2358
- }, null, 44, Xt))), 256)) : g("", !0),
2359
- G.value.showTooltip && F.value.orientation === "horizontal" ? (S(!0), _(p, { key: 18 }, w(Y.value.end - Y.value.start, (e, t) => (S(), _("rect", {
2360
- x: K.value.left,
2361
- y: K.value.top + t * Z.value,
2362
- width: K.value.width < 0 ? 0 : K.value.width,
2363
- height: Z.value,
2364
- onClick: () => Ii(t),
2365
- onMouseenter: () => Vi(t, "pointer"),
2366
- onMouseleave: () => Ri(t),
2367
- fill: t === N.value || t === er.value ? V.value.highlighter.color : "transparent",
2368
- style: x({ opacity: V.value.highlighter.opacity / 100 })
2369
- }, null, 44, Zt))), 256)) : g("", !0),
2370
- Ra.value ? (S(), _("rect", {
2371
- key: 19,
2372
- x: Ra.value.x,
2373
- y: Ra.value.y,
2374
- width: Ra.value.width,
2375
- height: Ra.value.height,
2376
- fill: qr.value.selection.fill,
2377
- "fill-opacity": qr.value.selection.fillOpacity,
2378
- stroke: qr.value.selection.stroke,
2379
- "stroke-opacity": qr.value.selection.strokeOpacity,
2380
- "stroke-width": qr.value.selection.strokeWidth,
2381
- "stroke-dasharray": qr.value.selection.strokeDasharray,
2382
- "stroke-linecap": "round",
2383
- "stroke-linejoin": "round",
2384
- "pointer-events": "none"
2385
- }, null, 8, Qt)) : g("", !0),
2386
- Zr.value ? (S(), _("rect", et({ key: 20 }, Rr.value, {
2387
- "data-start": Y.value.start,
2388
- "data-end": Y.value.end
2389
- }), null, 16, $t)) : g("", !0),
2390
- T(n.$slots, "svg", { svg: {
2391
- drawingArea: K.value,
2392
- slicer: Y.value,
2393
- data: $.value,
2394
- isPrintingImg: D(hr) || D(gr) || D(ga),
2395
- isPrintingSvg: D(_a),
2396
- barWidth: Z.value
2397
- } }, void 0, !0)
2398
- ], 46, ht)), n.$slots.hint ? (S(), _("div", en, [T(n.$slots, "hint", b(v({
2399
- hint: F.value.a11y.translations.keyboardNavigation,
2400
- isVisible: Na.value
2401
- })), void 0, !0)])) : g("", !0)]),
2402
- n.$slots.watermark ? (S(), _("div", tn, [T(n.$slots, "watermark", b(v({ isPrinting: D(hr) || D(gr) || D(ga) || D(_a) })), void 0, !0)])) : g("", !0),
2403
- V.value.zoom.show && bn.value && Sa.value && J.value > 6 ? (S(), h(Ve, {
2404
- key: 5,
2405
- ref_key: "chartSlicer",
2406
- ref: On,
2407
- "data-dom-to-png-ignore-layout": "",
2408
- allMinimaps: di.value,
2409
- background: V.value.zoom.color,
2410
- borderColor: V.value.backgroundColor,
2411
- customFormat: V.value.zoom.customFormat,
2412
- cutNullValues: !1,
2413
- forceZeroCenter: !0,
2414
- enableRangeHandles: V.value.zoom.enableRangeHandles,
2415
- enableSelectionDrag: V.value.zoom.enableSelectionDrag,
2416
- end: Y.value.end,
2417
- focusOnDrag: V.value.zoom.focusOnDrag,
2418
- focusRangeRatio: V.value.zoom.focusRangeRatio,
2419
- fontSize: V.value.zoom.fontSize,
2420
- immediate: !V.value.zoom.preview.enable,
2421
- inputColor: V.value.zoom.color,
2422
- isPreview: Zr.value,
2423
- labelLeft: z.value.values[Y.value.start] ? _i.value?.[0]?.text ?? "" : "",
2424
- labelRight: z.value.values[Y.value.end - 1] ? _i.value?.at(-1)?.text ?? "" : "",
2425
- max: Math.max(...e.dataset.map((e) => e.series.length)),
2426
- min: 0,
2427
- minimap: ui.value,
2428
- minimapCompact: V.value.zoom.minimap.compact,
2429
- minimapFrameColor: V.value.zoom.minimap.frameColor,
2430
- minimapIndicatorColor: V.value.zoom.minimap.indicatorColor,
2431
- minimapMerged: !1,
2432
- minimapSelectedColor: V.value.zoom.minimap.selectedColor,
2433
- minimapSelectedColorOpacity: V.value.zoom.minimap.selectedColorOpacity,
2434
- minimapSelectedIndex: N.value,
2435
- minimapSelectionRadius: 1,
2436
- preciseLabels: Oi.value.length ? Oi.value : vi.value,
2437
- refreshEndPoint: V.value.zoom.endIndex === null ? Math.max(...e.dataset.map((e) => e.series.length)) : V.value.zoom.endIndex + 1,
2438
- refreshStartPoint: V.value.zoom.startIndex === null ? 0 : V.value.zoom.startIndex,
2439
- selectColor: V.value.zoom.highlightColor,
2440
- selectedSeries: zi.value,
2441
- smoothMinimap: !1,
2442
- start: Y.value.start,
2443
- textColor: V.value.color,
2444
- timeLabels: vi.value,
2445
- usePreciseLabels: z.value.datetimeFormatter.enable && !V.value.zoom.useDefaultFormat,
2446
- valueEnd: Y.value.end,
2447
- valueStart: Y.value.start,
2448
- verticalHandles: V.value.zoom.minimap.verticalHandles,
2449
- maxWidth: V.value.zoom.maxWidth,
2450
- minimapLeftInsetRatio: K.value.chartWidth > 0 && V.value.zoom.autoFit ? K.value.left / K.value.chartWidth : null,
2451
- minimapRightInsetRatio: K.value.chartWidth > 0 && V.value.zoom.autoFit ? (K.value.chartWidth - K.value.right) / K.value.chartWidth : null,
2452
- isCursorPointer: U.value,
2453
- additionalMinimapHeight: V.value.zoom.minimap.additionalHeight,
2454
- handleType: V.value.zoom.minimap.handleType,
2455
- handleIconColor: V.value.zoom.minimap.handleIconColor,
2456
- handleBorderWidth: V.value.zoom.minimap.handleBorderWidth,
2457
- handleBorderColor: V.value.zoom.minimap.handleBorderColor,
2458
- handleFill: V.value.zoom.minimap.handleFill,
2459
- handleWidth: V.value.zoom.minimap.handleWidth,
2460
- "onUpdate:end": Da,
2461
- "onUpdate:start": Ea,
2462
- onTrapMouse: zr,
2463
- onReset: r[0] ||= () => si({
2464
- force: !0,
2465
- publish: !0
2466
- }),
2467
- onFutureEnd: r[1] ||= (e) => Qr("end", e),
2468
- onFutureStart: r[2] ||= (e) => Qr("start", e)
2469
- }, {
2470
- "reset-action": O(({ reset: e }) => [T(n.$slots, "reset-action", b(v({ reset: e })), void 0, !0)]),
2471
- slotMap: O(({ width: e, height: t, unitW: n }) => [(S(!0), _(p, null, w($.value, (e) => (S(), _("g", { key: e.id }, [(S(!0), _(p, null, w(e.xMinimap({
2472
- left: 0,
2473
- unitW: n
2474
- }), (r, a) => (S(), _("rect", {
2475
- key: `minimap-rect-${e.minimapRectKeys[a]}`,
2476
- x: a === 0 ? r - n * (R.value.gapRatio / 4) : r - n / 2,
2477
- y: Math.max(0, Math.min(t, e.yMinimap({ minimapH: t })[a])),
2478
- height: e.heightMinimap({ minimapH: t })[a],
2479
- width: [0, J.value - 1].includes(a) ? n * (1 - R.value.gapRatio / 2) / 2 : n * (1 - R.value.gapRatio / 2),
2480
- fill: R.value.gradient.show ? `url(#gradient_${e.id})` : e.color,
2481
- stroke: V.value.backgroundColor,
2482
- "stroke-width": .5,
2483
- rx: "0",
2484
- "stroke-linecap": "round",
2485
- "stroke-linejoin": "round",
2486
- style: x({ opacity: a >= X.value.start && a <= X.value.end ? 1 : .62 })
2487
- }, null, 12, nn))), 128))]))), 128))]),
2488
- _: 3
2489
- }, 8, /* @__PURE__ */ "allMinimaps.background.borderColor.customFormat.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.immediate.inputColor.isPreview.labelLeft.labelRight.max.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.preciseLabels.refreshEndPoint.refreshStartPoint.selectColor.selectedSeries.start.textColor.timeLabels.usePreciseLabels.valueEnd.valueStart.verticalHandles.maxWidth.minimapLeftInsetRatio.minimapRightInsetRatio.isCursorPointer.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth".split("."))) : g("", !0),
2490
- Qe(D(cn), {
2491
- teleportTo: B.value.teleportTo,
2492
- show: G.value.showTooltip && Sn.value,
2493
- backgroundColor: B.value.backgroundColor,
2494
- color: B.value.color,
2495
- fontSize: B.value.fontSize,
2496
- borderRadius: B.value.borderRadius,
2497
- borderColor: B.value.borderColor,
2498
- borderWidth: B.value.borderWidth,
2499
- backgroundOpacity: B.value.backgroundOpacity,
2500
- position: B.value.position,
2501
- offsetX: B.value.offsetX,
2502
- offsetY: B.value.offsetY,
2503
- parent: xn.value,
2504
- content: wn.value,
2505
- isFullscreen: An.value,
2506
- isCustom: D(o)(B.value.customFormat),
2507
- smooth: B.value.smooth,
2508
- backdropFilter: B.value.backdropFilter,
2509
- smoothForce: B.value.smoothForce,
2510
- smoothSnapThreshold: B.value.smoothSnapThreshold,
2511
- isA11yMode: Yn.value === "keyboard",
2512
- a11yPosition: Jn.value
2513
- }, {
2514
- "tooltip-before": O(() => [T(n.$slots, "tooltip-before", b(v({ ...Cn.value })), void 0, !0)]),
2515
- tooltip: O(() => [T(n.$slots, "tooltip", b(v({ ...Cn.value })), void 0, !0)]),
2516
- "tooltip-after": O(() => [T(n.$slots, "tooltip-after", b(v({ ...Cn.value })), void 0, !0)]),
2517
- _: 3
2518
- }, 8, [
2519
- "teleportTo",
2520
- "show",
2521
- "backgroundColor",
2522
- "color",
2523
- "fontSize",
2524
- "borderRadius",
2525
- "borderColor",
2526
- "borderWidth",
2527
- "backgroundOpacity",
2528
- "position",
2529
- "offsetX",
2530
- "offsetY",
2531
- "parent",
2532
- "content",
2533
- "isFullscreen",
2534
- "isCustom",
2535
- "smooth",
2536
- "backdropFilter",
2537
- "smoothForce",
2538
- "smoothSnapThreshold",
2539
- "isA11yMode",
2540
- "a11yPosition"
2541
- ]),
2542
- Ye("div", { id: `legend-bottom-${j.value}` }, null, 8, rn),
2543
- Fn.value && (ma.value.show || n.$slots.legend) ? (S(), h(Je, {
2544
- key: 6,
2545
- to: ma.value.position === "top" ? `#legend-top-${j.value}` : `#legend-bottom-${j.value}`
2546
- }, [Ye("div", {
2547
- ref_key: "chartLegend",
2548
- ref: Dn
2549
- }, [T(n.$slots, "legend", { legend: ra.value }, () => [ma.value.show ? (S(), h(Ke, {
2550
- key: 0,
2551
- legendSet: ra.value,
2552
- config: ia.value,
2553
- isCursorPointer: U.value,
2554
- onClickMarker: r[3] ||= ({ legend: e }) => e.segregate()
2555
- }, Xe({
2556
- item: O(({ legend: e }) => [D(nr) ? g("", !0) : (S(), _("div", {
2557
- key: 0,
2558
- onClick: (t) => e.segregate(),
2559
- style: x(`opacity:${M.value.includes(e.id) ? .5 : 1}`)
2560
- }, E(e.name), 13, an))]),
2561
- legendToggle: O(() => [ra.value.length > 2 && ma.value.selectAllToggle.show && !D(nr) ? (S(), h(He, {
2562
- key: 0,
2563
- backgroundColor: ma.value.selectAllToggle.backgroundColor,
2564
- color: ma.value.selectAllToggle.color,
2565
- fontSize: ma.value.fontSize,
2566
- checked: M.value.length > 0,
2567
- isCursorPointer: U.value,
2568
- onToggle: Qi
2569
- }, null, 8, [
2570
- "backgroundColor",
2571
- "color",
2572
- "fontSize",
2573
- "checked",
2574
- "isCursorPointer"
2575
- ])) : g("", !0)]),
2576
- _: 2
2577
- }, [n.$slots.pattern ? {
2578
- name: "legend-pattern",
2579
- fn: O(({ legend: e, index: t }) => [Qe(Ie, {
2580
- shape: e.shape,
2581
- radius: 30,
2582
- stroke: "none",
2583
- plot: {
2584
- x: 30,
2585
- y: 30
2586
- },
2587
- fill: `url(#pattern_${j.value}_${t})`
2588
- }, null, 8, ["shape", "fill"])]),
2589
- key: "0"
2590
- } : void 0]), 1032, [
2591
- "legendSet",
2592
- "config",
2593
- "isCursorPointer"
2594
- ])) : g("", !0)], !0)], 512)], 8, ["to"])) : g("", !0),
2595
- n.$slots.source ? (S(), _("div", {
2596
- key: 7,
2597
- ref_key: "source",
2598
- ref: kn,
2599
- dir: "auto"
2600
- }, [T(n.$slots, "source", {}, void 0, !0)], 512)) : g("", !0),
2601
- bn.value && I.value.buttons.table ? (S(), h(it(da.value.component), et({ key: 8 }, da.value.props, {
2602
- ref_key: "tableUnit",
2603
- ref: In,
2604
- onClose: fa
2605
- }), Xe({
2606
- content: O(() => [Qe(D(dn), {
2607
- colNames: Zi.value.colNames,
2608
- head: Zi.value.head,
2609
- body: Zi.value.body,
2610
- config: Zi.value.config,
2611
- title: F.value.table.useDialog ? "" : da.value.title,
2612
- withCloseButton: !F.value.table.useDialog,
2613
- isCursorPointer: U.value,
2614
- onClose: fa
2615
- }, {
2616
- th: O(({ th: e }) => [e === "__SUM__" ? (S(), _("div", on, [Qe(D(ln), {
2617
- name: "sigma",
2618
- stroke: Zi.value.config.th.color,
2619
- size: 16
2620
- }, null, 8, ["stroke"])])) : (S(), _("div", sn, E(e), 1))]),
2621
- td: O(({ td: e }) => [Ze(E(isNaN(Number(e)) ? e : D(t)({
2622
- p: R.value.dataLabels.prefix,
2623
- v: e,
2624
- s: R.value.dataLabels.suffix,
2625
- r: F.value.table.td.roundingValue
2626
- })), 1)]),
2627
- _: 1
2628
- }, 8, [
2629
- "colNames",
2630
- "head",
2631
- "body",
2632
- "config",
2633
- "title",
2634
- "withCloseButton",
2635
- "isCursorPointer"
2636
- ])]),
2637
- _: 2
2638
- }, [F.value.table.useDialog ? {
2639
- name: "title",
2640
- fn: O(() => [Ze(E(da.value.title), 1)]),
2641
- key: "0"
2642
- } : void 0, F.value.table.useDialog ? {
2643
- name: "actions",
2644
- fn: O(() => [Ye("button", {
2645
- tabindex: "0",
2646
- class: "vue-ui-user-options-button",
2647
- onClick: r[4] ||= (e) => Xi(I.value.callbacks.csv),
2648
- style: x({ cursor: U.value ? "pointer" : "default" })
2649
- }, [Qe(D(ln), {
2650
- name: "fileCsv",
2651
- stroke: da.value.props.color
2652
- }, null, 8, ["stroke"])], 4)]),
2653
- key: "1"
2654
- } : void 0]), 1040)) : g("", !0),
2655
- T(n.$slots, "skeleton", {}, () => [D(nr) ? (S(), h(De, { key: 0 })) : g("", !0)], !0)
2656
- ], 46, dt));
2657
- }
2658
- }, [["__scopeId", "data-v-6d6f8f3a"]]);
2659
- //#endregion
2660
- export { ut as n, cn as t };