vue-data-ui 3.6.0 → 3.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/README.md +26 -26
  2. package/dist/{Arrow-BGVin3AS.js → Arrow-CWYIBV-7.js} +1 -1
  3. package/dist/{BaseDraggableDialog-DhKIof09.js → BaseDraggableDialog-CRF94NJQ.js} +2 -2
  4. package/dist/{BaseIcon-DLFL0M4-.js → BaseIcon-CofSxalQ.js} +1 -1
  5. package/dist/{ColorPicker-CjIJvLdc.js → ColorPicker-e1-OSGlQ.js} +10 -10
  6. package/dist/{DataTable-UCyd_BQI.js → DataTable-CHaOCmsE.js} +2 -2
  7. package/dist/{Legend-D9ZTJKjh.js → Legend-Web3GjlR.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-a2UzZL0y.js → NonSvgPenAndPaper-CjYFLlns.js} +3 -3
  9. package/dist/{PackageVersion-D_4Hr4S4.js → PackageVersion-C82JCJOX.js} +1 -1
  10. package/dist/{PenAndPaper-BJSMejV9.js → PenAndPaper-HCZQTkqi.js} +20 -20
  11. package/dist/{Shape-CNXKB8O0.js → Shape-DE6X_t31.js} +3 -3
  12. package/dist/{Slicer-CJfhtoVn.js → Slicer-BFBBG6xv.js} +23 -23
  13. package/dist/{SlicerPreview-wXjV4LWO.js → SlicerPreview-D76aSViW.js} +2 -2
  14. package/dist/{SparkTooltip-BEewz-_Q.js → SparkTooltip-B2rpVWE1.js} +6 -6
  15. package/dist/{Title-Bb1VWCtR.js → Title-DfFUb9hd.js} +1 -1
  16. package/dist/{Tooltip-oWCO1HKy.js → Tooltip-WD0Ros6G.js} +1 -1
  17. package/dist/{UserOptions-BqmUW9Kp.js → UserOptions-B3I-s3Lw.js} +2 -2
  18. package/dist/components/arrow.js +1 -1
  19. package/dist/components/vue-ui-3d-bar.js +3 -3
  20. package/dist/components/vue-ui-accordion.js +1 -1
  21. package/dist/components/vue-ui-age-pyramid.js +3 -3
  22. package/dist/components/vue-ui-annotator.js +1 -1
  23. package/dist/components/vue-ui-bullet.js +3 -3
  24. package/dist/components/vue-ui-candlestick.js +3 -3
  25. package/dist/components/vue-ui-carousel-table.js +1 -1
  26. package/dist/components/vue-ui-chestnut.js +3 -3
  27. package/dist/components/vue-ui-chord.js +3 -3
  28. package/dist/components/vue-ui-circle-pack.js +3 -3
  29. package/dist/components/vue-ui-cursor.js +1 -1
  30. package/dist/components/vue-ui-dashboard.js +1 -1
  31. package/dist/components/vue-ui-digits.js +1 -1
  32. package/dist/components/vue-ui-donut-evolution.js +2 -2
  33. package/dist/components/vue-ui-donut.js +3 -3
  34. package/dist/components/vue-ui-dumbbell.js +3 -3
  35. package/dist/components/vue-ui-flow.js +3 -3
  36. package/dist/components/vue-ui-funnel.js +2 -2
  37. package/dist/components/vue-ui-galaxy.js +1 -1
  38. package/dist/components/vue-ui-gauge.js +1 -1
  39. package/dist/components/vue-ui-gizmo.js +1 -1
  40. package/dist/components/vue-ui-heatmap.js +1 -1
  41. package/dist/components/vue-ui-history-plot.js +3 -3
  42. package/dist/components/vue-ui-horizontal-bar.js +3 -3
  43. package/dist/components/vue-ui-icon.js +1 -1
  44. package/dist/components/vue-ui-kpi.js +1 -1
  45. package/dist/components/vue-ui-mini-loader.js +1 -1
  46. package/dist/components/vue-ui-molecule.js +3 -3
  47. package/dist/components/vue-ui-mood-radar.js +3 -3
  48. package/dist/components/vue-ui-nested-donuts.js +2 -2
  49. package/dist/components/vue-ui-onion.js +3 -3
  50. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  51. package/dist/components/vue-ui-quadrant.js +3 -3
  52. package/dist/components/vue-ui-quick-chart.js +3 -3
  53. package/dist/components/vue-ui-radar.js +3 -3
  54. package/dist/components/vue-ui-rating.js +1 -1
  55. package/dist/components/vue-ui-relation-circle.js +3 -3
  56. package/dist/components/vue-ui-ridgeline.js +3 -3
  57. package/dist/components/vue-ui-rings.js +3 -3
  58. package/dist/components/vue-ui-scatter.js +3 -3
  59. package/dist/components/vue-ui-skeleton.js +1 -1
  60. package/dist/components/vue-ui-smiley.js +1 -1
  61. package/dist/components/vue-ui-spark-trend.js +1 -1
  62. package/dist/components/vue-ui-sparkbar.js +2 -2
  63. package/dist/components/vue-ui-sparkgauge.js +3 -3
  64. package/dist/components/vue-ui-sparkhistogram.js +3 -3
  65. package/dist/components/vue-ui-sparkline.js +3 -3
  66. package/dist/components/vue-ui-sparkstackbar.js +2 -2
  67. package/dist/components/vue-ui-stackbar.js +3 -3
  68. package/dist/components/vue-ui-stackline.js +1 -1
  69. package/dist/components/vue-ui-strip-plot.js +3 -3
  70. package/dist/components/vue-ui-table-heatmap.js +1 -1
  71. package/dist/components/vue-ui-table-sparkline.js +2 -2
  72. package/dist/components/vue-ui-table.js +1 -1
  73. package/dist/components/vue-ui-thermometer.js +3 -3
  74. package/dist/components/vue-ui-timer.js +1 -1
  75. package/dist/components/vue-ui-tiremarks.js +2 -2
  76. package/dist/components/vue-ui-treemap.js +3 -3
  77. package/dist/components/vue-ui-vertical-bar.js +1 -1
  78. package/dist/components/vue-ui-waffle.js +2 -2
  79. package/dist/components/vue-ui-wheel.js +1 -1
  80. package/dist/components/vue-ui-word-cloud.js +3 -3
  81. package/dist/components/vue-ui-world.js +1 -1
  82. package/dist/components/vue-ui-xy-canvas.js +3 -3
  83. package/dist/components/vue-ui-xy.js +3 -3
  84. package/dist/{dom-to-png--BNgrTZV.js → dom-to-png-CH2DfsJe.js} +1 -1
  85. package/dist/{img-BecE5qXd.js → img-DUzJeMlr.js} +1 -1
  86. package/dist/{lib-C_mNZmhD.js → lib-C5BH09_g.js} +111 -110
  87. package/dist/{pdf-DuG5j3Wv.js → pdf-BSWQncok.js} +1 -1
  88. package/dist/style.css +1 -1
  89. package/dist/types/vue-data-ui.d.ts +2 -0
  90. package/dist/{useAutoSizeLabelsInsideViewbox-BhzfwQ_k.js → useAutoSizeLabelsInsideViewbox-DOALwU4q.js} +7 -7
  91. package/dist/{useNestedProp-CIoDlpHu.js → useNestedProp-CWo6bftQ.js} +1 -1
  92. package/dist/{usePrinter-DTzqpYKF.js → usePrinter-DCJzEiS8.js} +2 -2
  93. package/dist/useThemeCheck-DGJ31Vi5.js +32 -0
  94. package/dist/{useTimeLabels-BGFjWgrv.js → useTimeLabels-C5qMhpbe.js} +50 -49
  95. package/dist/{vue-data-ui-BWuOXu_s.js → vue-data-ui-d-OXgGG3.js} +78 -78
  96. package/dist/vue-data-ui.js +225 -205
  97. package/dist/{vue-ui-3d-bar-BNQAuLqF.js → vue-ui-3d-bar-BLbSbx2V.js} +546 -517
  98. package/dist/{vue-ui-accordion-SSLXLlNz.js → vue-ui-accordion-DSdZUn2C.js} +3 -3
  99. package/dist/vue-ui-age-pyramid-DQ-xc-if.js +960 -0
  100. package/dist/{vue-ui-annotator-34Ld0u5M.js → vue-ui-annotator-DRaH8hXn.js} +7 -7
  101. package/dist/vue-ui-bullet-BvMdxLkK.js +657 -0
  102. package/dist/{vue-ui-candlestick-BcChw-8c.js → vue-ui-candlestick-DIWeygxV.js} +596 -561
  103. package/dist/{vue-ui-carousel-table-Cp_od0lI.js → vue-ui-carousel-table-DM2HJFMH.js} +48 -48
  104. package/dist/{vue-ui-chestnut-DTaIsP72.js → vue-ui-chestnut-DNOG6dqY.js} +534 -505
  105. package/dist/vue-ui-chord-D2wPt2JV.js +1182 -0
  106. package/dist/vue-ui-circle-pack-D_GDv7OV.js +832 -0
  107. package/dist/{vue-ui-cursor-lW-dVs_k.js → vue-ui-cursor-BMe8ZiV6.js} +2 -2
  108. package/dist/{vue-ui-dashboard-DIymn9Cx.js → vue-ui-dashboard-BMby447A.js} +140 -140
  109. package/dist/{vue-ui-digits-YHA3fA0j.js → vue-ui-digits-D382I0-w.js} +2 -2
  110. package/dist/{vue-ui-donut-BaDmbWLh.js → vue-ui-donut-BqiNPW3q.js} +634 -602
  111. package/dist/vue-ui-donut-evolution-BL7HtdsP.js +1243 -0
  112. package/dist/vue-ui-dumbbell-BlTDnM8L.js +1258 -0
  113. package/dist/vue-ui-flow-BxIv20FH.js +1026 -0
  114. package/dist/vue-ui-funnel-Tnjg4srR.js +743 -0
  115. package/dist/vue-ui-galaxy-CYDVXdNj.js +837 -0
  116. package/dist/vue-ui-gauge-DAcpazK7.js +864 -0
  117. package/dist/{vue-ui-gizmo-E33_xZte.js → vue-ui-gizmo-Bg2TpPwm.js} +3 -3
  118. package/dist/{vue-ui-heatmap-DJXMvFPp.js → vue-ui-heatmap-BPEE_cLi.js} +501 -466
  119. package/dist/vue-ui-history-plot-BhfbLer8.js +1239 -0
  120. package/dist/{vue-ui-kpi-C-XuLBVQ.js → vue-ui-kpi-CKMZDc3n.js} +3 -3
  121. package/dist/{vue-ui-mini-loader-DawncJvl.js → vue-ui-mini-loader-BN72OfS0.js} +2 -2
  122. package/dist/vue-ui-molecule-DnzXYuUi.js +782 -0
  123. package/dist/vue-ui-mood-radar-CXyQEfeM.js +930 -0
  124. package/dist/vue-ui-nested-donuts-Dq8JoU5d.js +1454 -0
  125. package/dist/vue-ui-onion-D0KUHi-Z.js +944 -0
  126. package/dist/vue-ui-parallel-coordinate-plot-DNc2L4Rg.js +1080 -0
  127. package/dist/{vue-ui-quadrant-B2bLWyCm.js → vue-ui-quadrant-Cp8loNVN.js} +510 -481
  128. package/dist/{vue-ui-quick-chart-J_RmCwI_.js → vue-ui-quick-chart-kuTdgAKG.js} +795 -758
  129. package/dist/vue-ui-radar-x2Ry_IGa.js +1013 -0
  130. package/dist/{vue-ui-rating-CBS8zaQd.js → vue-ui-rating-DtzmtJwF.js} +26 -26
  131. package/dist/vue-ui-relation-circle-DbYE9UHq.js +671 -0
  132. package/dist/vue-ui-ridgeline-yaMl8iIE.js +1302 -0
  133. package/dist/vue-ui-rings-BowsO9I8.js +884 -0
  134. package/dist/vue-ui-scatter-C_nz0A4x.js +1619 -0
  135. package/dist/{vue-ui-skeleton-DsrlMELy.js → vue-ui-skeleton-DdXq2gl1.js} +3 -3
  136. package/dist/{vue-ui-smiley-P_8WIBDD.js → vue-ui-smiley-OYyM-ukP.js} +2 -2
  137. package/dist/vue-ui-spark-trend-BLticwHl.js +364 -0
  138. package/dist/vue-ui-sparkbar-DC2sDr9_.js +381 -0
  139. package/dist/vue-ui-sparkgauge-BENUfyuR.js +260 -0
  140. package/dist/vue-ui-sparkhistogram-BY0jsNsc.js +411 -0
  141. package/dist/vue-ui-sparkline-fS36LGCB.js +549 -0
  142. package/dist/vue-ui-sparkstackbar-C59ocU83.js +470 -0
  143. package/dist/vue-ui-stackbar-BtWWtzDp.js +1867 -0
  144. package/dist/vue-ui-stackline-CsGEHOOr.js +1963 -0
  145. package/dist/{vue-ui-strip-plot-CTtivaxm.js → vue-ui-strip-plot-n_rEdwkM.js} +343 -314
  146. package/dist/{vue-ui-table-CHt3AQiq.js → vue-ui-table-Kv2YL5OU.js} +5 -5
  147. package/dist/vue-ui-table-heatmap-vQEFrjCX.js +307 -0
  148. package/dist/{vue-ui-table-sparkline-D5MckwMl.js → vue-ui-table-sparkline-B8CCAdco.js} +292 -263
  149. package/dist/vue-ui-thermometer-C1Hr_LrY.js +613 -0
  150. package/dist/{vue-ui-timer-B-Xa6ALH.js → vue-ui-timer-CmnO99_j.js} +25 -25
  151. package/dist/vue-ui-tiremarks-DbZbhw6Q.js +477 -0
  152. package/dist/vue-ui-treemap-BGMpUu5v.js +1359 -0
  153. package/dist/{vue-ui-vertical-bar-D9XQe_ud.js → vue-ui-vertical-bar-CWlGQoB3.js} +520 -485
  154. package/dist/{vue-ui-waffle-Bk98w86A.js → vue-ui-waffle-BVVrMghT.js} +376 -347
  155. package/dist/vue-ui-wheel-B2pFBeKR.js +690 -0
  156. package/dist/vue-ui-word-cloud-BqKSDn2J.js +904 -0
  157. package/dist/{vue-ui-world-xOY__pp8.js → vue-ui-world-glj9mQAg.js} +57 -57
  158. package/dist/vue-ui-xy-BdXV4naK.js +3455 -0
  159. package/dist/vue-ui-xy-canvas-Cr13t9M5.js +1599 -0
  160. package/dist/vue_ui_vertical_bar-CELc39b8.js +18 -0
  161. package/package.json +5 -5
  162. package/dist/themes-DH-N_ePR.js +0 -54
  163. package/dist/vue-ui-age-pyramid-DsOlpJBh.js +0 -933
  164. package/dist/vue-ui-bullet-Ci4lO4_W.js +0 -630
  165. package/dist/vue-ui-chord-BKC--Nbq.js +0 -1153
  166. package/dist/vue-ui-circle-pack-B3sfU0Vo.js +0 -803
  167. package/dist/vue-ui-donut-evolution-BqUzmyW2.js +0 -1208
  168. package/dist/vue-ui-dumbbell-CWKTrzsm.js +0 -1231
  169. package/dist/vue-ui-flow-SMbuDPdL.js +0 -991
  170. package/dist/vue-ui-funnel-3fRlMBzq.js +0 -716
  171. package/dist/vue-ui-galaxy-CFZ1xYD5.js +0 -808
  172. package/dist/vue-ui-gauge-DJpbjfpL.js +0 -835
  173. package/dist/vue-ui-history-plot-CvPMx5Lg.js +0 -1204
  174. package/dist/vue-ui-molecule-CasngKZI.js +0 -753
  175. package/dist/vue-ui-mood-radar-DGz2TQi4.js +0 -903
  176. package/dist/vue-ui-nested-donuts-Bjjz2sWG.js +0 -1419
  177. package/dist/vue-ui-onion-DwTIY6i1.js +0 -915
  178. package/dist/vue-ui-parallel-coordinate-plot-DedxvtPN.js +0 -1051
  179. package/dist/vue-ui-radar-D1rz2RnH.js +0 -984
  180. package/dist/vue-ui-relation-circle-DUfRwwo1.js +0 -641
  181. package/dist/vue-ui-ridgeline-DKPWMWRc.js +0 -1273
  182. package/dist/vue-ui-rings-BY0EQGLb.js +0 -855
  183. package/dist/vue-ui-scatter-ky9p5Pgh.js +0 -1590
  184. package/dist/vue-ui-spark-trend-DkJn_3FI.js +0 -337
  185. package/dist/vue-ui-sparkbar-qB1fmgej.js +0 -352
  186. package/dist/vue-ui-sparkgauge-BezFN_Rc.js +0 -233
  187. package/dist/vue-ui-sparkhistogram-DGt5b8FR.js +0 -384
  188. package/dist/vue-ui-sparkline-D7Wx1ejg.js +0 -514
  189. package/dist/vue-ui-sparkstackbar-DtO7-yim.js +0 -441
  190. package/dist/vue-ui-stackbar-Dr48I48D.js +0 -1832
  191. package/dist/vue-ui-stackline-Juns5Yh4.js +0 -1928
  192. package/dist/vue-ui-table-heatmap-Cn-56b5F.js +0 -282
  193. package/dist/vue-ui-thermometer-BOidpwAZ.js +0 -584
  194. package/dist/vue-ui-tiremarks-BsTyVS2P.js +0 -450
  195. package/dist/vue-ui-treemap-BWTaY91B.js +0 -1330
  196. package/dist/vue-ui-wheel-nj73b_Dc.js +0 -663
  197. package/dist/vue-ui-word-cloud-Dcaogr-D.js +0 -875
  198. package/dist/vue-ui-xy-BT67faLv.js +0 -3424
  199. package/dist/vue-ui-xy-canvas-BoB7-4QK.js +0 -1564
@@ -0,0 +1,1867 @@
1
+ import { defineAsyncComponent as j, useSlots as Pl, computed as b, ref as d, onMounted as ia, toRefs as Ol, watch as ze, shallowRef as ua, onBeforeUnmount as gt, watchEffect as ca, nextTick as El, createElementBlock as n, openBlock as s, normalizeStyle as ne, normalizeClass as ve, createBlock as ee, createCommentVNode as y, renderSlot as C, createElementVNode as te, createVNode as _e, unref as m, withCtx as L, normalizeProps as U, guardReactiveProps as H, createSlots as bt, Fragment as x, renderList as w, mergeProps as Me, toDisplayString as B, Teleport as Rl, resolveDynamicComponent as Il, createTextVNode as ha } from "vue";
2
+ import { u as Bl, a as yt } from "./useNestedProp-CWo6bftQ.js";
3
+ import { c as va, t as Vl, i as Ul, p as He, W as de, j as Hl, o as da, g as ga, k as Xl, l as Yl, am as Te, G as ba, F as ya, K as Wl, X as ql, n as Gl, I as ie, w as fa, a as ge, d as ae, U as Jl, a3 as Zl, x as ma, u as Kl, q as Ql, R as jl } from "./lib-C5BH09_g.js";
4
+ import { t as ft, u as eo } from "./useResponsive-DfdjqQps.js";
5
+ import { u as to } from "./usePrinter-DCJzEiS8.js";
6
+ import { u as ao, B as lo } from "./BaseScanner-BgWxam9d.js";
7
+ import { u as pa, a as oo, l as ro } from "./useTimeLabels-C5qMhpbe.js";
8
+ import { u as so } from "./useSvgExport-DrjCWun4.js";
9
+ import { u as no } from "./useThemeCheck-DGJ31Vi5.js";
10
+ import { u as io } from "./useUserOptionState-BIvW1Kz7.js";
11
+ import { u as uo } from "./useChartAccessibility-9icAAmYg.js";
12
+ import { u as co } from "./useTimeLabelCollider-CIsgDrl9.js";
13
+ import ho from "./img-DUzJeMlr.js";
14
+ import vo from "./Title-DfFUb9hd.js";
15
+ import { _ as go } from "./Shape-DE6X_t31.js";
16
+ import bo from "./Legend-Web3GjlR.js";
17
+ import { S as yo } from "./SlicerPreview-D76aSViW.js";
18
+ import { _ as fo } from "./_plugin-vue_export-helper-CHgC5LLL.js";
19
+ const xa = { table: { th: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, td: { backgroundColor: "#1A1A1A", color: "#CCCCCC" } }, style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", title: { color: "#CCCCCC", subtitle: { color: "#757575" } }, legend: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, zoom: { color: "#4A4A4A", highlightColor: "#9A9A9A", minimap: { selectedColor: "#8A8A8A", lineColor: "#424242", indicatorColor: "#CCCCCC" } }, highlighter: { color: "#CCCCCC" }, tooltip: { backgroundColor: "#1A1A1A", backgroundOpacity: 70, color: "#CCCCCC", borderColor: "#5A5A5A" }, bars: { totalValues: { color: "#CCCCCC" } }, grid: { frame: { stroke: "#5A5A5A" }, x: { axisColor: "#5A5A5A", linesColor: "#4A4A4A", axisName: { color: "#CCCCCC" }, timeLabels: { color: "#CCCCCC" } }, y: { axisColor: "#5A5A5A", linesColor: "#4A4A4A", axisName: { color: "#CCCCCC" }, axisLabels: { color: "#CCCCCC" } } } } } }, ka = { table: { th: { backgroundColor: "#FFF8E1", color: "#424242" }, td: { backgroundColor: "#FFF8E1", color: "#424242" } }, style: { chart: { backgroundColor: "#FFF8E1", color: "#424242", title: { color: "#424242", subtitle: { color: "#757575" } }, legend: { backgroundColor: "#FFF8E1", color: "#424242" }, zoom: { color: "#5D4037", highlightColor: "#FF8A65" }, highlighter: { color: "#424242" }, tooltip: { backgroundColor: "#FFECB3", backgroundOpacity: 30, color: "#424242", borderColor: "#FF8A65" }, bars: { totalValues: { color: "#424242" } }, grid: { x: { axisColor: "#5D403780", axisName: { color: "#424242" }, timeLabels: { color: "#424242" } }, y: { axisColor: "#5D403780", axisName: { color: "#424242" }, axisLabels: { color: "#424242" } } } } } }, Ca = { table: { th: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, td: { backgroundColor: "#1E1E1E", color: "#BDBDBD" } }, style: { chart: { backgroundColor: "#1E1E1E", color: "#BDBDBD", title: { color: "#FFF8E1", subtitle: { color: "#BDBDBD" } }, legend: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, zoom: { color: "#5D4037", highlightColor: "#FF8A65" }, highlighter: { color: "#FFF8E1" }, tooltip: { backgroundColor: "#1E1E1E", backgroundOpacity: 30, color: "#FFF8E1", borderColor: "#FF8A65" }, bars: { totalValues: { color: "#BDBDBD" } }, grid: { x: { axisColor: "#5D403740", axisName: { color: "#BDBDBD" }, timeLabels: { color: "#BDBDBD" } }, y: { axisColor: "#5D4037", axisName: { color: "#BDBDBD" }, axisLabels: { color: "#BDBDBD" } } } } } }, wa = { table: { th: { backgroundColor: "#1A1A1A", color: "#99AA99" }, td: { backgroundColor: "#1A1A1A", color: "#AACCAA" } }, style: { chart: { backgroundColor: "#1A1A1A", color: "#99AA99", title: { color: "#66CC66", subtitle: { color: "#99AA99" } }, legend: { backgroundColor: "#1A1A1A", color: "#99AA99" }, zoom: { color: "#5F6A5F", highlightColor: "#66CC66" }, highlighter: { color: "#66CC66" }, tooltip: { backgroundColor: "#2A2F2A", color: "#AACCAA", borderColor: "#66CC66" }, bars: { totalValues: { color: "#99AA99" } }, grid: { x: { axisColor: "#5F6A5F", axisName: { color: "#66CC66" }, timeLabels: { color: "#99AA99" } }, y: { axisColor: "#5F6A5F", axisName: { color: "#66CC66" }, axisLabels: { color: "#99AA99" } } } } } }, La = { table: { th: { backgroundColor: "#1A1A1A", color: "#99AA99" }, td: { backgroundColor: "#1A1A1A", color: "#AACCAA" } }, style: { chart: { backgroundColor: "#fbfafa", color: "#8A9892", title: { color: "#8A9892", subtitle: { color: "#99AA99" } }, legend: { backgroundColor: "#fbfafa", color: "#99AA99" }, zoom: { color: "#E0CFC3", highlightColor: "#8F837A" }, highlighter: { color: "#8F837A" }, tooltip: { backgroundColor: "#fbfafa", color: "#8A9892" }, bars: { borderRadius: 4, totalValues: { show: !1 }, dataLabels: { show: !1 } }, grid: { x: { showAxis: !1, axisName: { color: "#8F837A" }, timeLabels: { show: !1 } }, y: { showAxis: !1, axisName: { color: "#8F837A" }, axisLabels: { show: !1 } } } } } }, Aa = { table: { th: { backgroundColor: "#1A1A1A", color: "#99AA99" }, td: { backgroundColor: "#1A1A1A", color: "#AACCAA" } }, style: { chart: { backgroundColor: "#f6f6fb", color: "#50606C", title: { color: "#50606C", subtitle: { color: "#718890" } }, legend: { backgroundColor: "#f6f6fb", color: "#61747E" }, zoom: { color: "#92B0AB", highlightColor: "#50606C" }, highlighter: { color: "#7DA9B5" }, tooltip: { backgroundColor: "#f6f6fb", color: "#50606C" }, bars: { totalValues: { color: "#50606C" } }, grid: { x: { showHorizontalLines: !0, axisColor: "#829C98", axisName: { color: "#50606C" }, timeLabels: { color: "#61747E" } }, y: { showVerticalLines: !0, axisColor: "#829C98", axisName: { color: "#50606C" }, axisLabels: { color: "#61747E" } } } } } }, Sa = {
20
+ default: {},
21
+ dark: xa,
22
+ celebration: ka,
23
+ celebrationNight: Ca,
24
+ hack: wa,
25
+ zen: La,
26
+ concrete: Aa
27
+ }, Nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
28
+ __proto__: null,
29
+ celebration: ka,
30
+ celebrationNight: Ca,
31
+ concrete: Aa,
32
+ dark: xa,
33
+ default: Sa,
34
+ hack: wa,
35
+ zen: La
36
+ }, Symbol.toStringTag, { value: "Module" })), mo = ["id"], po = ["id"], xo = ["xmlns", "viewBox"], ko = ["x", "y", "width", "height"], Co = { key: 1 }, wo = ["id"], Lo = ["stop-color"], Ao = ["stop-color"], So = ["stop-color"], zo = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"], _o = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Mo = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], To = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], $o = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Fo = { key: 0 }, Do = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], No = { key: 0 }, Po = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], Oo = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], Eo = { key: 0 }, Ro = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], Io = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Bo = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Vo = ["x", "y", "font-size", "fill", "font-weight"], Uo = ["transform", "font-size", "fill", "font-weight"], Ho = ["x", "y", "font-size", "fill", "font-weight"], Xo = ["x", "y", "font-size", "font-weight", "fill"], Yo = ["x", "y", "font-size", "fill", "font-weight"], Wo = ["x", "y", "font-size", "font-weight", "fill"], qo = ["x1", "x2", "y1", "y2", "stroke"], Go = ["x", "y", "font-size", "font-weight", "fill"], Jo = ["x1", "x2", "y1", "y2", "stroke"], Zo = ["font-size", "font-weight", "fill", "text-anchor", "transform"], Ko = { key: 0 }, Qo = { key: 1 }, jo = ["text-anchor", "font-size", "font-weight", "fill", "transform", "onClick"], er = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], tr = { key: 0 }, ar = { key: 1 }, lr = ["font-size", "font-weight", "fill", "x", "y", "onClick"], or = ["font-size", "font-weight", "fill", "x", "y", "onClick", "innerHTML"], rr = ["x", "y", "width", "height", "onClick", "onMouseenter", "onMouseleave", "fill"], sr = ["x", "y", "width", "height", "onClick", "onMouseenter", "onMouseleave", "fill"], nr = ["data-start", "data-end"], ir = {
37
+ key: 3,
38
+ class: "vue-data-ui-watermark"
39
+ }, ur = ["x", "y", "height", "width", "fill", "stroke"], cr = ["id"], hr = ["onClick"], vr = ["innerHTML"], dr = {
40
+ __name: "vue-ui-stackbar",
41
+ props: {
42
+ config: {
43
+ type: Object,
44
+ default() {
45
+ return {};
46
+ }
47
+ },
48
+ dataset: {
49
+ type: Array,
50
+ default() {
51
+ return [];
52
+ }
53
+ },
54
+ selectedXIndex: {
55
+ type: Number,
56
+ default: void 0
57
+ }
58
+ },
59
+ emits: ["selectDatapoint", "selectLegend", "selectTimeLabel", "selectX"],
60
+ setup(Xe, { expose: za, emit: _a }) {
61
+ const Ma = j(() => import("./Tooltip-WD0Ros6G.js")), Ta = j(() => import("./BaseIcon-CofSxalQ.js")), $a = j(() => import("./vue-ui-accordion-DSdZUn2C.js")), Fa = j(() => import("./DataTable-CHaOCmsE.js")), Da = j(() => import("./PenAndPaper-HCZQTkqi.js")), Na = j(() => import("./UserOptions-B3I-s3Lw.js")), Pa = j(() => import("./PackageVersion-C82JCJOX.js")), Oa = j(() => import("./BaseDraggableDialog-CRF94NJQ.js")), { vue_ui_stackbar: Ea } = Bl(), { isThemeValid: Ra, warnInvalidTheme: Ia } = no(), Ba = Pl(), k = Xe, be = _a, ye = b({
62
+ get() {
63
+ return !!k.dataset && k.dataset.length;
64
+ },
65
+ set(a) {
66
+ return a;
67
+ }
68
+ }), J = d(null), V = d(va()), Ye = d(!1), We = d(null), qe = d(""), F = d([]), mt = d(0), pt = d(null), xt = d(null), fe = d(null), kt = d(null), me = d(!1), G = d(null), le = d(!1), Ct = d(0), Va = d(0), Ua = d(0), wt = d(!1), pe = d(null), Ge = d(null), Je = d(null), Ze = d(null), oe = d(null), re = d(null), Ha = d(null), Ke = d(null), Qe = d(null);
69
+ ia(() => {
70
+ wt.value = !0, ot();
71
+ });
72
+ const e = d(at()), { loading: xe, FINAL_DATASET: je, manualLoading: $e } = ao({
73
+ ...Ol(k),
74
+ FINAL_CONFIG: e,
75
+ prepareConfig: at,
76
+ callback: () => {
77
+ Promise.resolve().then(async () => {
78
+ await Be();
79
+ });
80
+ },
81
+ skeletonDataset: [
82
+ {
83
+ name: "",
84
+ series: [2, 3, 5, 8, 13, 21],
85
+ color: "#BABABA"
86
+ },
87
+ {
88
+ name: "",
89
+ series: [1, 2, 3, 5, 8, 13],
90
+ color: "#CACACA"
91
+ }
92
+ ],
93
+ skeletonConfig: Vl({
94
+ defaultConfig: e.value,
95
+ userConfig: {
96
+ userOptions: { show: !1 },
97
+ useCssAnimation: !1,
98
+ table: { show: !1 },
99
+ tooltip: { show: !1 },
100
+ style: {
101
+ chart: {
102
+ backgroundColor: "#99999930",
103
+ bars: {
104
+ totalValues: { show: !1 },
105
+ dataLabels: { show: !1 }
106
+ },
107
+ grid: {
108
+ frame: {
109
+ stroke: "#6A6A6A"
110
+ },
111
+ scale: {
112
+ scaleMin: 0,
113
+ scaleMax: 40
114
+ },
115
+ x: {
116
+ axisColor: "#6A6A6A",
117
+ linesColor: "#6A6A6A",
118
+ axisName: { show: !1 },
119
+ timeLabels: { show: !1 }
120
+ },
121
+ y: {
122
+ axisColor: "#6A6A6A",
123
+ linesColor: "#6A6A6A",
124
+ axisName: { show: !1 },
125
+ axisLabels: { show: !1 }
126
+ }
127
+ },
128
+ legend: {
129
+ backgroundColor: "transparent"
130
+ },
131
+ padding: {
132
+ left: 24,
133
+ right: 24,
134
+ bottom: 12
135
+ },
136
+ zoom: {
137
+ show: !1,
138
+ startIndex: null,
139
+ endIndex: null
140
+ }
141
+ }
142
+ }
143
+ }
144
+ })
145
+ }), { userOptionsVisible: et, setUserOptionsVisibility: Lt, keepUserOptionState: At } = io({ config: e.value }), { svgRef: tt } = uo({ config: e.value.style.chart.title });
146
+ function Xa() {
147
+ Lt(!0);
148
+ }
149
+ function Ya() {
150
+ Lt(!1), be("selectX", { seriesIndex: null, datapoint: null }), G.value = null;
151
+ }
152
+ function at() {
153
+ const a = yt({
154
+ userConfig: k.config,
155
+ defaultConfig: Ea
156
+ });
157
+ let l = {};
158
+ const t = a.theme;
159
+ if (t)
160
+ if (!Ra.value(a))
161
+ Ia(a), l = a;
162
+ else {
163
+ const o = yt({
164
+ userConfig: Sa[t] || k.config,
165
+ defaultConfig: a
166
+ });
167
+ l = {
168
+ ...yt({
169
+ userConfig: k.config,
170
+ defaultConfig: o
171
+ }),
172
+ customPalette: a.customPalette.length ? a.customPalette : Ul[t] || He
173
+ };
174
+ }
175
+ else
176
+ l = a;
177
+ return k.config && de(k.config, "style.chart.grid.scale.scaleMin") ? l.style.chart.grid.scale.scaleMin = k.config.style.chart.grid.scale.scaleMin : l.style.chart.grid.scale.scaleMin = null, k.config && de(k.config, "style.chart.grid.scale.scaleMax") ? l.style.chart.grid.scale.scaleMax = k.config.style.chart.grid.scale.scaleMax : l.style.chart.grid.scale.scaleMax = null, k.config && de(k.config, "style.chart.zoom.startIndex") ? l.style.chart.zoom.startIndex = k.config.style.chart.zoom.startIndex : l.style.chart.zoom.startIndex = null, k.config && de(k.config, "style.chart.zoom.endIndex") ? l.style.chart.zoom.endIndex = k.config.style.chart.zoom.endIndex : l.style.chart.zoom.endIndex = null, k.config && de(k.config, "style.chart.bars.dataLabels.hideUnderValue") ? l.style.chart.bars.dataLabels.hideUnderValue = k.config.style.chart.bars.dataLabels.hideUnderValue : l.style.chart.bars.dataLabels.hideUnderValue = null, k.config && de(k.config, "style.chart.bars.dataLabels.hideUnderPercentage") ? l.style.chart.bars.dataLabels.hideUnderPercentage = k.config.style.chart.bars.dataLabels.hideUnderPercentage : l.style.chart.bars.dataLabels.hideUnderPercentage = null, l;
178
+ }
179
+ const St = b(() => e.value.style.chart.bars.dataLabels.hideUnderValue !== null), zt = b(() => e.value.style.chart.bars.dataLabels.hideUnderPercentage !== null);
180
+ ze(() => k.config, (a) => {
181
+ xe.value || (e.value = at()), et.value = !e.value.userOptions.showOnChartHover, ot(), Ct.value += 1, Va.value += 1, Ua.value += 1, T.value.dataLabels.show = e.value.style.chart.bars.dataLabels.show, T.value.showTable = e.value.table.show, T.value.showTooltip = e.value.style.chart.tooltip.show, Ne();
182
+ }, { deep: !0 }), ze(() => k.dataset, (a) => {
183
+ Array.isArray(a) && a.length > 0 && ($e.value = !1), Ot();
184
+ }, { deep: !0 });
185
+ const T = d({
186
+ dataLabels: {
187
+ show: e.value.style.chart.bars.dataLabels.show
188
+ },
189
+ showTable: e.value.table.show,
190
+ showTooltip: e.value.style.chart.tooltip.show
191
+ });
192
+ ze(e, () => {
193
+ T.value = {
194
+ dataLabels: {
195
+ show: e.value.style.chart.bars.dataLabels.show
196
+ },
197
+ showTable: e.value.table.show,
198
+ showTooltip: e.value.style.chart.tooltip.show
199
+ };
200
+ }, { immediate: !0 });
201
+ const { isPrinting: _t, isImaging: Mt, generatePdf: Tt, generateImage: $t } = to({
202
+ elementId: `stackbar_${V.value}`,
203
+ fileName: e.value.style.chart.title.text || "vue-ui-stackbar",
204
+ options: e.value.userOptions.print
205
+ }), ue = d({
206
+ width: e.value.style.chart.width,
207
+ height: e.value.style.chart.height,
208
+ paddingRatio: {
209
+ top: e.value.style.chart.padding.top / e.value.style.chart.height,
210
+ right: e.value.style.chart.padding.right / e.value.style.chart.width,
211
+ bottom: e.value.style.chart.padding.bottom / e.value.style.chart.height,
212
+ left: e.value.style.chart.padding.left / e.value.style.chart.width
213
+ }
214
+ }), Wa = b(() => Hl(e.value.customPalette)), K = ua(null), ce = ua(null), Ft = d(null);
215
+ ia(() => {
216
+ ot();
217
+ });
218
+ const lt = b(() => !!e.value.debug);
219
+ function ot() {
220
+ if (da(k.dataset) ? (ga({
221
+ componentName: "VueUiStackbar",
222
+ type: "dataset",
223
+ debug: lt.value
224
+ }), $e.value = !0) : k.dataset.forEach((a, l) => {
225
+ Xl({
226
+ datasetObject: a,
227
+ requiredAttributes: ["name", "series"]
228
+ }).forEach((t) => {
229
+ ye.value = !1, ga({
230
+ componentName: "VueUiStackbar",
231
+ type: "datasetSerieAttribute",
232
+ property: t,
233
+ index: l,
234
+ debug: lt.value
235
+ }), $e.value = !0;
236
+ });
237
+ }), da(k.dataset) || ($e.value = e.value.loading), setTimeout(() => {
238
+ le.value = !0;
239
+ }, 10), e.value.responsive) {
240
+ const a = ft(() => {
241
+ le.value = !1;
242
+ const { width: l, height: t } = eo({
243
+ chart: J.value,
244
+ title: e.value.style.chart.title.text ? pt.value : null,
245
+ legend: e.value.style.chart.legend.show ? xt.value : null,
246
+ slicer: e.value.style.chart.zoom.show && D.value > 6 ? fe.value.$el : null,
247
+ source: kt.value
248
+ });
249
+ requestAnimationFrame(() => {
250
+ ue.value.width = l, ue.value.height = t - 12, clearTimeout(Ft.value), Ft.value = setTimeout(() => {
251
+ le.value = !0;
252
+ }, 10);
253
+ });
254
+ });
255
+ K.value && (ce.value && K.value.unobserve(ce.value), K.value.disconnect()), K.value = new ResizeObserver(a), ce.value = J.value.parentNode, K.value.observe(ce.value);
256
+ }
257
+ Be();
258
+ }
259
+ gt(() => {
260
+ K.value && (ce.value && K.value.unobserve(ce.value), K.value.disconnect());
261
+ });
262
+ function qa() {
263
+ let a = 0;
264
+ e.value.orientation === "vertical" && oe.value && (a = Array.from(oe.value.querySelectorAll("text")).reduce((o, c) => {
265
+ const r = c.getComputedTextLength();
266
+ return r > o ? r : o;
267
+ }, 0)), e.value.orientation === "horizontal" && re.value && (a = Array.from(re.value.querySelectorAll("text")).reduce((o, c) => {
268
+ const r = c.getComputedTextLength();
269
+ return r > o ? r : o;
270
+ }, 0));
271
+ const l = Ze.value ? Ze.value.getBoundingClientRect().width : 0;
272
+ return a + l + (l ? 24 : 0);
273
+ }
274
+ const Fe = d(0), De = d(0), Ga = ft((a) => {
275
+ Fe.value = a;
276
+ }, 100);
277
+ ca((a) => {
278
+ const l = e.value.orientation === "vertical" ? re.value : oe.value;
279
+ if (!l) return;
280
+ const t = new ResizeObserver((o) => {
281
+ Ga(o[0].contentRect.height);
282
+ });
283
+ t.observe(l), a(() => t.disconnect());
284
+ });
285
+ const Ja = ft((a) => {
286
+ De.value = a + e.value.style.chart.bars.totalValues.fontSize;
287
+ }, 100);
288
+ function Za() {
289
+ if (e.value.orientation !== "horizontal") return 0;
290
+ const a = Ke.value;
291
+ if (!a) return 0;
292
+ const l = Array.from(a.querySelectorAll("text"));
293
+ if (!l.length) return 0;
294
+ let t = -1 / 0;
295
+ for (const c of l)
296
+ try {
297
+ const r = c.getBBox(), f = r.x + r.width;
298
+ f > t && (t = f);
299
+ } catch {
300
+ }
301
+ return Math.max(0, t - (u.value?.right ?? 0));
302
+ }
303
+ ca((a) => {
304
+ if (e.value.orientation !== "horizontal") return;
305
+ const l = Ke.value;
306
+ if (!l) return;
307
+ const t = () => {
308
+ const r = Za();
309
+ Ja(r);
310
+ };
311
+ t();
312
+ const o = new ResizeObserver(t);
313
+ o.observe(l);
314
+ const c = new MutationObserver(t);
315
+ c.observe(l, { childList: !0, subtree: !0, characterData: !0 }), a(() => {
316
+ o.disconnect(), c.disconnect();
317
+ });
318
+ }), gt(() => {
319
+ Fe.value = 0, De.value = 0;
320
+ });
321
+ const Dt = b(() => {
322
+ let a = 0;
323
+ Je.value && (a = Je.value.getBBox().height);
324
+ let l = 0;
325
+ return e.value.orientation === "vertical" && re.value && (l = Fe.value), e.value.orientation === "horizontal" && oe.value && (l = Fe.value), a + l;
326
+ }), u = b(() => {
327
+ const { height: a, width: l } = ue.value, { right: t } = ue.value.paddingRatio;
328
+ let o = e.value.style.chart.bars.totalValues.show && k.dataset && k.dataset.length > 1 ? e.value.style.chart.bars.totalValues.fontSize * 1.3 : 0, c = 0;
329
+ e.value.style.chart.grid.y.axisLabels.show && (c = qa());
330
+ const r = e.value.style.chart.padding.top + o, f = l - l * t - De.value, A = a - e.value.style.chart.padding.bottom - Dt.value - o, M = e.value.style.chart.padding.left + c, N = l - M - l * t - De.value, $ = a - r - e.value.style.chart.padding.bottom - Dt.value - o;
331
+ return {
332
+ chartHeight: a,
333
+ chartWidth: l,
334
+ top: r,
335
+ right: f,
336
+ bottom: A,
337
+ left: M,
338
+ width: Math.max(0, N),
339
+ height: Math.max(0, $)
340
+ };
341
+ }), Ka = b(() => {
342
+ const { left: a, top: l, width: t, height: o } = u.value, c = h.value.start, r = h.value.end, f = Math.max(1, r - c), A = Math.max(0, Math.min(f, (R.value.start ?? c) - c)), M = Math.max(0, Math.min(f, (R.value.end ?? r) - c)), N = Math.max(0, M - A), $ = {
343
+ fill: e.value.style.chart.zoom.preview.fill,
344
+ stroke: e.value.style.chart.zoom.preview.stroke,
345
+ "stroke-width": e.value.style.chart.zoom.preview.strokeWidth,
346
+ "stroke-dasharray": e.value.style.chart.zoom.preview.strokeDasharray,
347
+ "stroke-linecap": "round",
348
+ "stroke-linejoin": "round",
349
+ style: {
350
+ pointerEvents: "none",
351
+ transition: "none !important",
352
+ animation: "none !important"
353
+ }
354
+ };
355
+ if (e.value.orientation === "horizontal") {
356
+ const E = o / f;
357
+ return {
358
+ x: a,
359
+ y: l + A * E,
360
+ width: t,
361
+ height: N * E,
362
+ ...$
363
+ };
364
+ } else {
365
+ const E = t / f;
366
+ return {
367
+ x: a + A * E,
368
+ y: l,
369
+ width: N * E,
370
+ height: o,
371
+ ...$
372
+ };
373
+ }
374
+ }), X = b(() => je.value.map((a, l) => {
375
+ const t = Yl(a.color) || Wa.value[l] || He[l] || He[l % He.length];
376
+ return {
377
+ ...a,
378
+ // In distributed mode, all values are converted to positive
379
+ series: JSON.parse(JSON.stringify(a.series)).map((o) => e.value.style.chart.bars.distributed ? Math.abs(o) : o),
380
+ // Store signs to manage display of neg values in distributed mode
381
+ signedSeries: a.series.map((o) => o >= 0 ? 1 : -1),
382
+ absoluteIndex: l,
383
+ id: va(),
384
+ color: t
385
+ };
386
+ })), D = b(() => Math.max(...X.value.filter((a) => !F.value.includes(a.id)).map((a) => a.series.length)));
387
+ function Qa(a) {
388
+ Qe.value = a;
389
+ }
390
+ const h = d({
391
+ start: 0,
392
+ end: Math.max(...je.value.map((a) => a.series.length))
393
+ }), R = d({ start: 0, end: Math.max(...je.value.map((a) => a.series.length)) }), Nt = b(() => e.value.style.chart.zoom.preview.enable && (R.value.start !== h.value.start || R.value.end !== h.value.end));
394
+ function Pt(a, l) {
395
+ R.value[a] = l;
396
+ }
397
+ function Ne() {
398
+ const a = D.value;
399
+ let l = Math.max(0, Math.min(h.value.start ?? 0, a - 1)), t = Math.max(l + 1, Math.min(h.value.end ?? a, a));
400
+ (!Number.isFinite(l) || !Number.isFinite(t) || t <= l) && (l = 0, t = a), h.value.start = l, h.value.end = t, R.value.start = l, R.value.end = t, fe.value && (fe.value.setStartValue(l), fe.value.setEndValue(t));
401
+ }
402
+ const ke = d(null);
403
+ function ja() {
404
+ return new Promise((a) => requestAnimationFrame(
405
+ () => requestAnimationFrame(() => a())
406
+ ));
407
+ }
408
+ gt(() => {
409
+ ke.value && cancelAnimationFrame(ke.value);
410
+ });
411
+ async function Ot() {
412
+ Be(), await El(), ke.value && cancelAnimationFrame(ke.value), ke.value = requestAnimationFrame(async () => {
413
+ await ja(), Be();
414
+ });
415
+ }
416
+ const p = b(() => {
417
+ let a;
418
+ return e.value.orientation === "vertical" ? a = u.value.width / (h.value.end - h.value.start) : a = u.value.height / (h.value.end - h.value.start), a <= 0 ? 0 : a;
419
+ }), Ce = b(() => Te(X.value.filter((a) => !F.value.includes(a.id))).slice(h.value.start, h.value.end)), se = b(() => e.value.style.chart.zoom.minimap.show ? Te(X.value.map((a) => ({
420
+ ...a,
421
+ series: a.series.map((l) => l ?? 0)
422
+ })).filter((a) => !F.value.includes(a.id))) : []), el = b(() => e.value.style.chart.zoom.minimap.show ? [{
423
+ name: "",
424
+ series: se.value,
425
+ color: "#000000",
426
+ isVisible: !0
427
+ }] : []), tl = b(() => Te(X.value.filter((a) => !F.value.includes(a.id)).map((a) => ({
428
+ ...a,
429
+ series: a.series.map((l, t) => a.signedSeries[t] === -1 && l >= 0 ? -l : l)
430
+ }))).slice(h.value.start, h.value.end)), Pe = b(() => {
431
+ const a = X.value.filter((l) => !F.value.includes(l.id));
432
+ return {
433
+ positive: Te(a.map((l) => ({
434
+ ...l,
435
+ series: l.series.slice(h.value.start, h.value.end).map((t) => t >= 0 ? t : 0)
436
+ }))),
437
+ negative: Te(a.map((l) => ({
438
+ ...l,
439
+ series: l.series.slice(h.value.start, h.value.end).map((t) => t < 0 ? t : 0)
440
+ })))
441
+ };
442
+ }), Y = b(() => {
443
+ const a = e.value.style.chart.grid.scale.scaleMax !== null && !e.value.style.chart.bars.distributed ? e.value.style.chart.grid.scale.scaleMax : Math.max(...Pe.value.positive), l = Math.min(...Pe.value.negative), t = e.value.style.chart.grid.scale.scaleMin !== null && !e.value.style.chart.bars.distributed ? e.value.style.chart.grid.scale.scaleMin : [-1 / 0, 1 / 0, NaN, void 0, null].includes(l) ? 0 : l, o = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? ba(t > 0 ? 0 : t, a < 0 ? 0 : a, e.value.style.chart.grid.scale.ticks) : ya(t > 0 ? 0 : t, a < 0 ? 0 : a, e.value.style.chart.grid.scale.ticks);
444
+ return o.ticks.map((c) => ({
445
+ zero: u.value.bottom - u.value.height * (Math.abs(o.min) / (o.max + Math.abs(o.min))),
446
+ y: u.value.bottom - u.value.height * ((c + Math.abs(o.min)) / (o.max + Math.abs(o.min))),
447
+ x: u.value.left - 8,
448
+ horizontal_zero: u.value.left + u.value.width * (Math.abs(o.min) / (o.max + Math.abs(o.min))),
449
+ horizontal_x: u.value.left + u.value.width * ((c + Math.abs(o.min)) / (o.max + Math.abs(o.min))),
450
+ horizontal_y: u.value.bottom - 8,
451
+ value: c
452
+ }));
453
+ }), O = b(() => pa({
454
+ values: e.value.style.chart.grid.x.timeLabels.values,
455
+ maxDatapoints: D.value,
456
+ formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
457
+ start: h.value.start,
458
+ end: h.value.end
459
+ })), we = b(() => pa({
460
+ values: e.value.style.chart.grid.x.timeLabels.values,
461
+ maxDatapoints: D.value,
462
+ formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
463
+ start: 0,
464
+ end: D.value
465
+ })), al = b(() => {
466
+ const a = e.value.style.chart.grid.x.timeLabels.modulo;
467
+ return O.value.length ? Math.min(a, [...new Set(O.value.map((l) => l.text))].length) : a;
468
+ }), Et = b(() => {
469
+ const a = e.value.style.chart.grid.x.timeLabels, l = O.value || [], t = we.value || [], o = h.value.start ?? 0, c = G.value, r = D.value, f = l.map((M) => M?.text ?? ""), A = t.map((M) => M?.text ?? "");
470
+ return Wl(
471
+ !!a.showOnlyFirstAndLast,
472
+ !!a.showOnlyAtModulo,
473
+ Math.max(1, al.value || 1),
474
+ f,
475
+ A,
476
+ o,
477
+ c,
478
+ r
479
+ );
480
+ }), Rt = b(() => {
481
+ const a = e.value.style.chart.grid.x.timeLabels.datetimeFormatter, l = oo({
482
+ useUTC: a.useUTC,
483
+ locale: ro[a.locale] || { months: [], shortMonths: [], days: [], shortDays: [] },
484
+ januaryAsYear: a.januaryAsYear
485
+ });
486
+ return (t, o) => {
487
+ const r = e.value.style.chart.grid.x.timeLabels.values?.[t];
488
+ return r == null ? "" : (l.formatDate(new Date(r), o), l.formatDate(new Date(r), o));
489
+ };
490
+ }), It = b(() => (e.value.style.chart.grid.x.timeLabels.values || []).map((l, t) => ({
491
+ text: Rt.value(t, e.value.style.chart.zoom.timeFormat),
492
+ absoluteIndex: t
493
+ }))), rt = b(() => (e.value.style.chart.grid.x.timeLabels.values || []).map((l, t) => ({
494
+ text: Rt.value(t, e.value.style.chart.tooltip.timeFormat),
495
+ absoluteIndex: t
496
+ }))), S = b(() => {
497
+ if (!ye.value && !xe.value) return [];
498
+ let a = Array(D.value).fill(0), l = Array(D.value).fill(0), t = Array(D.value).fill(0), o = Array(D.value).fill(0);
499
+ const c = Math.max(...Pe.value.positive) || 0, r = Math.min(...Pe.value.negative), f = [-1 / 0, 1 / 0, NaN, void 0, null].includes(r) ? 0 : r, A = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? ba(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : f > 0 ? 0 : f, e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : c < 0 ? 0 : c, e.value.style.chart.grid.scale.ticks) : ya(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : f > 0 ? 0 : f, e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : c < 0 ? 0 : c, e.value.style.chart.grid.scale.ticks), { min: M, max: N } = A, $ = N + (M >= 0 ? 0 : Math.abs(M)) || 1, E = u.value.height, I = u.value.width, Se = Y.value[0] ? Y.value[0].zero : u.value.bottom, W = Y.value[0] ? Y.value[0].horizontal_zero : u.value.left;
500
+ let la = Array(se.value.length).fill(0), oa = Array(se.value.length).fill(0);
501
+ return X.value.filter((he) => !F.value.includes(he.id)).map((he) => {
502
+ const Q = he.series.slice(), ra = Q.map((v, g) => la[g]), Cl = Q.map((v, g) => oa[g]);
503
+ Q.forEach((v, g) => {
504
+ (Number(v) || 0) >= 0 ? la[g] += Number(v) || 0 : oa[g] += Math.abs(Number(v) || 0);
505
+ });
506
+ const Z = he.series.slice(h.value.start, h.value.end), wl = he.signedSeries.slice(h.value.start, h.value.end), Ll = Z.map((v, g) => u.value.left + p.value * g + p.value * e.value.style.chart.bars.gapRatio / 4), Ue = (se.value || []).filter(Number.isFinite), ht = Ue.length ? Math.max(...Ue) : 0, vt = Ue.length ? Math.min(...Ue) : 0;
507
+ function sa({ minimapH: v }) {
508
+ const z = ht > 0, P = vt < 0;
509
+ if (z && P) {
510
+ const q = Math.max(ht, Math.abs(vt)) || 1e-9;
511
+ return {
512
+ pxPerUnit: v / 2 / q,
513
+ zero: v / 2
514
+ };
515
+ }
516
+ if (z) {
517
+ const q = Math.max(1e-9, ht);
518
+ return {
519
+ pxPerUnit: v / q,
520
+ zero: v
521
+ };
522
+ }
523
+ const _ = Math.max(1e-9, Math.abs(vt));
524
+ return {
525
+ pxPerUnit: v / _,
526
+ zero: 0
527
+ };
528
+ }
529
+ const Al = ({ left: v, unitW: g }) => {
530
+ const z = g * (e.value.style.chart.bars.gapRatio / 4);
531
+ return Q.map((P, _) => v + g * _ + z);
532
+ }, Sl = Z.map((v, g) => u.value.top + p.value * g + p.value * e.value.style.chart.bars.gapRatio / 4), zl = Z.map((v, g) => {
533
+ const z = e.value.style.chart.bars.distributed ? (v || 0) / Ce.value[g] : (v || 0) / $;
534
+ let P, _;
535
+ return v > 0 ? (_ = E * z, P = Se - _ - a[g], a[g] += _) : (_ = E * z, P = Se + t[g], t[g] += Math.abs(_)), P;
536
+ }), _l = ({ minimapH: v }) => {
537
+ if (e.value.style.chart.bars.distributed)
538
+ return Q.map((_, q) => {
539
+ const dt = Math.abs(Number(_) || 0), na = Math.abs(se.value?.[q] || 0) || 1e-9, Nl = (ra[q] + dt) / na;
540
+ return v - Nl * v;
541
+ });
542
+ const { pxPerUnit: g, zero: z } = sa({ minimapH: v });
543
+ return Q.map((P, _) => {
544
+ const q = Number(P) || 0;
545
+ return q >= 0 ? z - (ra[_] + q) * g : z + Cl[_] * g;
546
+ });
547
+ }, Ml = Z.map((v, g) => {
548
+ const z = e.value.style.chart.bars.distributed ? (v || 0) / Ce.value[g] : (v || 0) / $;
549
+ let P, _;
550
+ return v > 0 ? (_ = I * z, P = W + l[g], l[g] += _) : (_ = I * z, P = W - Math.abs(_) - o[g], o[g] += Math.abs(_)), P;
551
+ }), Tl = Z.map((v, g) => {
552
+ const z = e.value.style.chart.bars.distributed ? (v || 0) / Ce.value[g] : (v || 0) / $;
553
+ return v > 0 ? E * z : E * Math.abs(z);
554
+ }), $l = ({ minimapH: v }) => {
555
+ if (e.value.style.chart.bars.distributed)
556
+ return Q.map((P, _) => {
557
+ const q = Math.abs(Number(P) || 0), dt = Math.abs(se.value?.[_] || 0) || 1e-9;
558
+ return q / dt * v;
559
+ });
560
+ const { pxPerUnit: g } = sa({ minimapH: v });
561
+ return Q.map((z) => Math.abs(Number(z) || 0) * g);
562
+ }, Fl = Z.map((v, g) => {
563
+ const z = e.value.style.chart.bars.distributed ? (v || 0) / Ce.value[g] : (v || 0) / $;
564
+ return v > 0 ? I * z : I * Math.abs(z);
565
+ }), Dl = Z.map((v) => Math.abs(v)).reduce((v, g) => v + g, 0);
566
+ return {
567
+ ...he,
568
+ proportions: Z.map((v, g) => e.value.style.chart.bars.distributed ? (v || 0) / Ce.value[g] : (v || 0) / Dl),
569
+ series: Z,
570
+ signedSeries: wl,
571
+ x: Ll,
572
+ y: zl,
573
+ height: Tl,
574
+ horizontal_width: Fl,
575
+ horizontal_y: Sl,
576
+ horizontal_x: Ml,
577
+ xMinimap: Al,
578
+ yMinimap: _l,
579
+ heightMinimap: $l
580
+ };
581
+ });
582
+ }), Bt = b(() => tl.value.map((a, l) => ({
583
+ value: a,
584
+ sign: a >= 0 ? 1 : -1
585
+ })));
586
+ function Oe(a, l, t, o, c) {
587
+ const r = c === -1 && a >= 0 ? -a : a;
588
+ return ge(
589
+ e.value.style.chart.bars.dataLabels.formatter,
590
+ r,
591
+ ae({
592
+ p: e.value.style.chart.bars.dataLabels.prefix,
593
+ v: r,
594
+ s: e.value.style.chart.bars.dataLabels.suffix,
595
+ r: e.value.style.chart.bars.dataLabels.rounding
596
+ }),
597
+ { datapoint: l, seriesIndex: t, datapointIndex: o }
598
+ );
599
+ }
600
+ function Vt(a, l, t, o) {
601
+ return ge(
602
+ e.value.style.chart.bars.dataLabels.formatter,
603
+ a,
604
+ ae({
605
+ v: isNaN(a) ? 0 : a,
606
+ s: "%",
607
+ r: e.value.style.chart.bars.dataLabels.rounding
608
+ }),
609
+ { datapoint: l, seriesIndex: t, datapointIndex: o }
610
+ );
611
+ }
612
+ function Ut(a) {
613
+ const l = JSON.parse(JSON.stringify(S.value)).map((t) => ({
614
+ name: t.name,
615
+ value: t.series[a] === 0 ? 0 : t.series[a] || null,
616
+ proportion: t.proportions[a] || null,
617
+ color: t.color,
618
+ id: t.id
619
+ }));
620
+ e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: a + h.value.start }), be("selectDatapoint", { datapoint: l, period: O.value[a] });
621
+ }
622
+ function st(a) {
623
+ return JSON.parse(JSON.stringify(S.value)).map((l) => ({
624
+ name: l.name,
625
+ absoluteIndex: l.absoluteIndex,
626
+ value: l.series[a] === 0 ? 0 : (l.signedSeries[a] === -1 && l.series[a] >= 0 ? -l.series[a] : l.series[a]) || null,
627
+ proportion: l.proportions[a] || null,
628
+ color: l.color,
629
+ id: l.id,
630
+ timeLabel: we.value[a]
631
+ }));
632
+ }
633
+ function Ht(a) {
634
+ if (e.value.events.datapointLeave) {
635
+ const l = st(a);
636
+ e.value.events.datapointLeave({ datapoint: l, seriesIndex: a + h.value.start });
637
+ }
638
+ Ye.value = null, G.value = null;
639
+ }
640
+ const ll = b(() => Array(D.value).fill(0).map((a, l) => st(l)));
641
+ ze(() => k.selectedXIndex, (a) => {
642
+ if ([null, void 0].includes(k.selectedXIndex)) {
643
+ G.value = null;
644
+ return;
645
+ }
646
+ const l = a - h.value.start;
647
+ l < 0 || a >= h.value.end ? G.value = null : G.value = l ?? null;
648
+ }, { immediate: !0 });
649
+ function Xt(a) {
650
+ G.value = a, Ye.value = !0;
651
+ const l = e.value.style.chart.tooltip.customFormat, t = st(a);
652
+ pl({ seriesIndex: a, datapoint: t }), e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: a + h.value.start }), We.value = {
653
+ datapoint: t,
654
+ seriesIndex: a,
655
+ config: e.value,
656
+ series: S.value
657
+ };
658
+ const o = t.map((r) => Math.abs(r.value)).reduce((r, f) => r + f, 0), c = t.map((r) => ie(r.value)).reduce((r, f) => r + f, 0);
659
+ if (ma(l) && jl(() => l({
660
+ seriesIndex: a,
661
+ datapoint: t,
662
+ series: S.value,
663
+ config: e.value
664
+ })))
665
+ qe.value = l({
666
+ seriesIndex: a,
667
+ datapoint: t,
668
+ series: S.value,
669
+ config: e.value
670
+ });
671
+ else {
672
+ const {
673
+ showValue: r,
674
+ showTotal: f,
675
+ totalTranslation: A,
676
+ showPercentage: M,
677
+ borderColor: N,
678
+ roundingValue: $,
679
+ roundingPercentage: E
680
+ } = e.value.style.chart.tooltip;
681
+ let I = "";
682
+ (O.value[a] && O.value[a].text || rt.value[a] && rt.value[a].text && e.value.style.chart.tooltip.showTimeLabel) && (I += `<div style="width:100%;text-align:center;border-bottom:1px solid ${N};padding-bottom:6px;margin-bottom:3px;">${e.value.style.chart.tooltip.useDefaultTimeFormat ? O.value[a]?.text : rt.value[a]?.text || we.value[a]?.text || ""}</div>`), f && (I += `<div class="vue-data-ui-tooltip-total" style="display:flex;flex-direction:row;align-items:center;gap:4px">
683
+ <span>${A}:</span>
684
+ <span>
685
+ ${ge(
686
+ e.value.style.chart.bars.dataLabels.formatter,
687
+ c,
688
+ ae({
689
+ p: e.value.style.chart.bars.dataLabels.prefix,
690
+ v: c,
691
+ s: e.value.style.chart.bars.dataLabels.suffix,
692
+ r: $
693
+ }),
694
+ { datapoint: { name: A, value: c } }
695
+ )}
696
+ </span>
697
+ </div>`);
698
+ const Se = [
699
+ r && M ? "(" : "",
700
+ r && M ? ")" : ""
701
+ ];
702
+ t.reverse().forEach((W) => {
703
+ I += `
704
+ <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
705
+ <svg viewBox="0 0 60 60" height="14" width="14"><rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="${e.value.style.chart.bars.gradient.show ? `url(#gradient_${W.id})` : W.color}"/>${Ba.pattern ? `<rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="url(#pattern_${V.value}_${W.absoluteIndex})"/>` : ""}</svg>
706
+ ${W.name}${r || M ? ":" : ""} ${r ? ge(
707
+ e.value.style.chart.bars.dataLabels.formatter,
708
+ W.value,
709
+ ae({
710
+ p: e.value.style.chart.bars.dataLabels.prefix,
711
+ v: W.value,
712
+ s: e.value.style.chart.bars.dataLabels.suffix,
713
+ r: $
714
+ })
715
+ ) : ""} ${Se[0]}${M ? ae({
716
+ v: isNaN(W.value / o) ? 0 : Math.abs(W.value) / o * 100,
717
+ // Negs are absed to show relative proportion to absolute total. It's opinionated.
718
+ s: "%",
719
+ r: E
720
+ }) : ""}${Se[1]}
721
+ </div>
722
+ `;
723
+ }), qe.value = `<div>${I}</div>`;
724
+ }
725
+ }
726
+ const ol = b(() => ue.value.width), rl = b(() => ue.value.height);
727
+ co({
728
+ timeLabelsEls: e.value.orientation === "vertical" ? re : oe,
729
+ timeLabels: O,
730
+ slicer: h,
731
+ configRef: e,
732
+ rotationPath: ["style", "chart", "grid", "x", "timeLabels", "rotation"],
733
+ autoRotatePath: ["style", "chart", "grid", "x", "timeLabels", "autoRotate", "enable"],
734
+ isAutoSize: !1,
735
+ width: ol,
736
+ height: rl,
737
+ rotation: e.value.style.chart.grid.x.timeLabels.autoRotate.angle
738
+ });
739
+ function Yt(a) {
740
+ me.value = a, mt.value += 1;
741
+ }
742
+ function Wt() {
743
+ T.value.showTable = !T.value.showTable;
744
+ }
745
+ function qt() {
746
+ T.value.dataLabels.show = !T.value.dataLabels.show;
747
+ }
748
+ function Gt() {
749
+ T.value.showTooltip = !T.value.showTooltip;
750
+ }
751
+ function sl() {
752
+ return S.value;
753
+ }
754
+ const Jt = b(() => {
755
+ if (S.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
756
+ const a = S.value.map(({ name: t, color: o }) => ({
757
+ label: t,
758
+ color: o
759
+ })), l = [];
760
+ return O.value.forEach((t) => {
761
+ const o = [e.value.style.chart.grid.x.timeLabels.values[t.absoluteIndex] ? t.text : i + 1];
762
+ X.value.forEach((c) => {
763
+ o.push(Number((c.series[t.absoluteIndex] || 0).toFixed(e.value.table.td.roundingValue)));
764
+ }), l.push(o);
765
+ }), { head: a, body: l };
766
+ });
767
+ function nt(a = null) {
768
+ const l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], t = ["", ...Jt.value.head.map((f) => f.label)], o = Jt.value.body, c = l.concat([t]).concat(o), r = Kl(c);
769
+ a ? a(r) : Ql({ csvContent: r, title: e.value.style.chart.title.text || "vue-ui-stackbar" });
770
+ }
771
+ const Ee = b(() => {
772
+ const a = [""].concat(S.value.map((c) => c.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');
773
+ let l = [];
774
+ for (let c = 0; c < D.value; c += 1) {
775
+ const r = S.value.map((f) => f.series[c] ?? 0).reduce((f, A) => f + A, 0);
776
+ l.push([e.value.style.chart.grid.x.timeLabels.values.slice(h.value.start, h.value.end)[c] ? O.value[c].text : c + 1].concat(S.value.map((f) => (f.series[c] ?? 0).toFixed(e.value.table.td.roundingValue))).concat((r ?? 0).toFixed(e.value.table.td.roundingValue)));
777
+ }
778
+ const t = {
779
+ th: {
780
+ backgroundColor: e.value.table.th.backgroundColor,
781
+ color: e.value.table.th.color,
782
+ outline: e.value.table.th.outline
783
+ },
784
+ td: {
785
+ backgroundColor: e.value.table.td.backgroundColor,
786
+ color: e.value.table.td.color,
787
+ outline: e.value.table.td.outline
788
+ },
789
+ breakpoint: e.value.table.responsiveBreakpoint
790
+ }, o = [e.value.table.columnNames.period].concat(S.value.map((c) => c.name)).concat(e.value.table.columnNames.total);
791
+ return { head: a, body: l.slice(0, h.value.end - h.value.start), config: t, colNames: o };
792
+ });
793
+ function it(a) {
794
+ if (F.value.includes(a.id))
795
+ F.value = F.value.filter((l) => l !== a.id);
796
+ else {
797
+ if (F.value.length === X.value.length - 1) return;
798
+ F.value.push(a.id);
799
+ }
800
+ be("selectLegend", S.value);
801
+ }
802
+ function Zt(a) {
803
+ if (!X.value.length)
804
+ return e.value.debug && console.warn("VueUiStackbar - There are no series to show."), null;
805
+ const l = X.value.find((t) => t.name === a);
806
+ return l || (e.value.debug && console.warn(`VueUiStackbar - Series name not found "${a}"`), null);
807
+ }
808
+ function nl(a) {
809
+ const l = Zt(a);
810
+ l !== null && F.value.includes(l.id) && it({ id: l.id });
811
+ }
812
+ function il(a) {
813
+ const l = Zt(a);
814
+ l !== null && (F.value.includes(l.id) || it({ id: l.id }));
815
+ }
816
+ const ut = b(() => X.value.map((a, l) => ({
817
+ ...a,
818
+ shape: "square"
819
+ })).map((a) => ({
820
+ ...a,
821
+ opacity: F.value.includes(a.id) ? 0.5 : 1,
822
+ segregate: () => it(a),
823
+ isSegregated: F.value.includes(a.id)
824
+ }))), ul = b(() => ({
825
+ cy: "stackbar-legend",
826
+ backgroundColor: e.value.style.chart.legend.backgroundColor,
827
+ color: e.value.style.chart.legend.color,
828
+ fontSize: e.value.style.chart.legend.fontSize,
829
+ paddingBottom: 12,
830
+ fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
831
+ })), Re = d(!1);
832
+ function ct() {
833
+ Re.value = !Re.value;
834
+ }
835
+ function Ie(a, l) {
836
+ const t = JSON.parse(JSON.stringify(S.value)).map((o) => ({
837
+ name: o.name,
838
+ value: o.series[l] === 0 ? 0 : (o.signedSeries[l] === -1 && o.series[l] >= 0 ? -o.series[l] : o.series[l]) || null,
839
+ proportion: o.proportions[l] || null,
840
+ color: o.color,
841
+ id: o.id
842
+ }));
843
+ be("selectTimeLabel", {
844
+ datapoint: t,
845
+ absoluteIndex: a.absoluteIndex,
846
+ label: a.text
847
+ });
848
+ }
849
+ const cl = b(() => Math.max(...S.value.flatMap((a) => a.series)));
850
+ function Kt(a, l) {
851
+ return e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? zt.value ? l * 100 >= e.value.style.chart.bars.dataLabels.hideUnderPercentage : e.value.style.chart.bars.dataLabels.hideEmptyPercentages ? l > 0 : !0 : zt.value ? (St.value && lt.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."), a > cl.value * e.value.style.chart.bars.dataLabels.hideUnderPercentage / 100) : St.value ? Math.abs(a) >= e.value.style.chart.bars.dataLabels.hideUnderValue : e.value.style.chart.bars.dataLabels.hideEmptyValues ? a !== 0 : !0;
852
+ }
853
+ async function hl({ scale: a = 2 } = {}) {
854
+ if (!J.value) return;
855
+ const { width: l, height: t } = J.value.getBoundingClientRect(), o = l / t, { imageUri: c, base64: r } = await ho({ domElement: J.value, base64: !0, img: !0, scale: a });
856
+ return {
857
+ imageUri: c,
858
+ base64: r,
859
+ title: e.value.style.chart.title.text,
860
+ width: l,
861
+ height: t,
862
+ aspectRatio: o
863
+ };
864
+ }
865
+ const Le = b(() => {
866
+ const a = e.value.table.useDialog && !e.value.table.show, l = T.value.showTable;
867
+ return {
868
+ component: a ? Oa : $a,
869
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
870
+ props: a ? {
871
+ backgroundColor: e.value.table.th.backgroundColor,
872
+ color: e.value.table.th.color,
873
+ headerColor: e.value.table.th.color,
874
+ headerBg: e.value.table.th.backgroundColor,
875
+ isFullscreen: me.value,
876
+ fullscreenParent: J.value,
877
+ forcedWidth: Math.min(800, window.innerWidth * 0.8)
878
+ } : {
879
+ hideDetails: !0,
880
+ config: {
881
+ open: l,
882
+ maxHeight: 1e4,
883
+ body: {
884
+ backgroundColor: e.value.style.chart.backgroundColor,
885
+ color: e.value.style.chart.color
886
+ },
887
+ head: {
888
+ backgroundColor: e.value.style.chart.backgroundColor,
889
+ color: e.value.style.chart.color
890
+ }
891
+ }
892
+ }
893
+ };
894
+ });
895
+ ze(() => T.value.showTable, (a) => {
896
+ e.value.table.show || (a && e.value.table.useDialog && pe.value ? pe.value.open() : "close" in pe.value && pe.value.close());
897
+ });
898
+ function Qt() {
899
+ T.value.showTable = !1, Ge.value && Ge.value.setTableIconState(!1);
900
+ }
901
+ const vl = b(() => e.value.style.chart.backgroundColor), dl = b(() => e.value.style.chart.legend), gl = b(() => e.value.style.chart.title), { exportSvg: bl, getSvg: yl } = so({
902
+ svg: tt,
903
+ title: gl,
904
+ legend: dl,
905
+ legendItems: ut,
906
+ backgroundColor: vl
907
+ });
908
+ async function jt({ isCb: a }) {
909
+ if (a) {
910
+ const { blob: l, url: t, text: o, dataUrl: c } = await yl();
911
+ e.value.userOptions.callbacks.svg({ blob: l, url: t, text: o, dataUrl: c });
912
+ } else
913
+ bl();
914
+ }
915
+ function ea(a) {
916
+ const l = D.value;
917
+ return a > l ? l : a < 0 || a < h.value.start ? e.value.style.chart.zoom.startIndex !== null ? h.value.start + 1 : 1 : a;
918
+ }
919
+ const Ae = d(!1), ta = d(!1);
920
+ function Be() {
921
+ if (!Ae.value) {
922
+ Ae.value = !0;
923
+ try {
924
+ const { startIndex: a, endIndex: l } = e.value.style.chart.zoom, t = D.value, o = a ?? 0, c = l != null ? Math.min(ea(l + 1), t) : t;
925
+ Ve.value = !0, h.value.start = o, h.value.end = c, R.value.start = o, R.value.end = c, Ne(), ta.value = !0;
926
+ } finally {
927
+ queueMicrotask(() => {
928
+ Ve.value = !1;
929
+ }), Ae.value = !1;
930
+ }
931
+ }
932
+ }
933
+ const Ve = d(!1);
934
+ function fl(a) {
935
+ Ae.value || Ve.value || a !== h.value.start && (h.value.start = a, R.value.start = a, Ne());
936
+ }
937
+ function ml(a) {
938
+ if (Ae.value || Ve.value) return;
939
+ const l = ea(a);
940
+ l !== h.value.end && (h.value.end = l, R.value.end = l, Ne());
941
+ }
942
+ function pl({ seriesIndex: a, datapoint: l }) {
943
+ const t = h.value.start + a;
944
+ be("selectX", {
945
+ dataset: l,
946
+ index: t,
947
+ indexLabel: e.value.style.chart.grid.x.timeLabels.values[t]
948
+ });
949
+ }
950
+ function aa() {
951
+ return { y0: Y.value?.[0]?.zero ?? u.value.bottom };
952
+ }
953
+ function xl(a) {
954
+ const { y0: l } = aa(), t = e.value.style.chart.bars.totalValues, o = Math.max(2, t.fontSize * 0.3 + t.offsetY);
955
+ let c = 1 / 0, r = !1;
956
+ for (const N of S.value || []) {
957
+ const $ = N?.series?.[a] ?? 0, E = N?.height?.[a] ?? 0, I = N?.y?.[a];
958
+ $ > 0 && E > 0 && Number.isFinite(I) && (r = !0, I < c && (c = I));
959
+ }
960
+ const A = (r && Number.isFinite(c) ? c : l) - o;
961
+ return Math.min(
962
+ Math.max(A, 0),
963
+ u.value.bottom
964
+ );
965
+ }
966
+ function kl(a) {
967
+ const { x0: l } = aa(), t = Math.max(2, e.value.style.chart.bars.totalValues.fontSize * 0.3 + e.value.style.chart.bars.totalValues.offsetX);
968
+ let o = -1 / 0, c = !1;
969
+ for (const f of S.value || []) {
970
+ const A = f?.series?.[a] ?? 0, M = f?.horizontal_x?.[a], N = f?.horizontal_width?.[a], $ = Number.isFinite(N) ? Math.max(0, N) : 0;
971
+ Number.isFinite(M) && A > 0 && $ > 0 && (c = !0, o = Math.max(o, M + $));
972
+ }
973
+ return (c && Number.isFinite(o) ? o : l) + t;
974
+ }
975
+ return za({
976
+ getData: sl,
977
+ getImage: hl,
978
+ generatePdf: Tt,
979
+ generateCsv: nt,
980
+ generateImage: $t,
981
+ generateSvg: jt,
982
+ hideSeries: il,
983
+ showSeries: nl,
984
+ toggleTable: Wt,
985
+ toggleLabels: qt,
986
+ toggleTooltip: Gt,
987
+ toggleAnnotator: ct,
988
+ toggleFullscreen: Yt
989
+ }), (a, l) => (s(), n("div", {
990
+ id: `stackbar_${V.value}`,
991
+ ref_key: "stackbarChart",
992
+ ref: J,
993
+ class: ve({ "vue-data-ui-component": !0, "vue-ui-stackbar": !0, "vue-data-ui-wrapper-fullscreen": me.value }),
994
+ style: ne(`background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color};font-family:${e.value.style.fontFamily}; position: relative; ${e.value.responsive ? "height: 100%" : ""}`),
995
+ onMouseenter: Xa,
996
+ onMouseleave: Ya
997
+ }, [
998
+ e.value.userOptions.buttons.annotator ? (s(), ee(m(Da), {
999
+ key: 0,
1000
+ svgRef: m(tt),
1001
+ backgroundColor: e.value.style.chart.backgroundColor,
1002
+ color: e.value.style.chart.color,
1003
+ active: Re.value,
1004
+ onClose: ct
1005
+ }, {
1006
+ "annotator-action-close": L(() => [
1007
+ C(a.$slots, "annotator-action-close", {}, void 0, !0)
1008
+ ]),
1009
+ "annotator-action-color": L(({ color: t }) => [
1010
+ C(a.$slots, "annotator-action-color", U(H({ color: t })), void 0, !0)
1011
+ ]),
1012
+ "annotator-action-draw": L(({ mode: t }) => [
1013
+ C(a.$slots, "annotator-action-draw", U(H({ mode: t })), void 0, !0)
1014
+ ]),
1015
+ "annotator-action-undo": L(({ disabled: t }) => [
1016
+ C(a.$slots, "annotator-action-undo", U(H({ disabled: t })), void 0, !0)
1017
+ ]),
1018
+ "annotator-action-redo": L(({ disabled: t }) => [
1019
+ C(a.$slots, "annotator-action-redo", U(H({ disabled: t })), void 0, !0)
1020
+ ]),
1021
+ "annotator-action-delete": L(({ disabled: t }) => [
1022
+ C(a.$slots, "annotator-action-delete", U(H({ disabled: t })), void 0, !0)
1023
+ ]),
1024
+ _: 3
1025
+ }, 8, ["svgRef", "backgroundColor", "color", "active"])) : y("", !0),
1026
+ C(a.$slots, "userConfig", {}, void 0, !0),
1027
+ e.value.style.chart.title.text ? (s(), n("div", {
1028
+ key: 1,
1029
+ ref_key: "chartTitle",
1030
+ ref: pt,
1031
+ style: "width:100%;background:transparent;padding-bottom:24px"
1032
+ }, [
1033
+ (s(), ee(vo, {
1034
+ key: `title_${Ct.value}`,
1035
+ config: {
1036
+ title: {
1037
+ cy: "stackbar-title",
1038
+ ...e.value.style.chart.title
1039
+ },
1040
+ subtitle: {
1041
+ cy: "stackbar-subtitle",
1042
+ ...e.value.style.chart.title.subtitle
1043
+ }
1044
+ }
1045
+ }, null, 8, ["config"]))
1046
+ ], 512)) : y("", !0),
1047
+ te("div", {
1048
+ id: `legend-top-${V.value}`
1049
+ }, null, 8, po),
1050
+ e.value.userOptions.show && ye.value && (m(At) || m(et)) ? (s(), ee(m(Na), {
1051
+ ref_key: "userOptionsRef",
1052
+ ref: Ge,
1053
+ key: `user_option_${mt.value}`,
1054
+ backgroundColor: e.value.style.chart.backgroundColor,
1055
+ color: e.value.style.chart.color,
1056
+ isPrinting: m(_t),
1057
+ isImaging: m(Mt),
1058
+ uid: V.value,
1059
+ hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
1060
+ hasPdf: e.value.userOptions.buttons.pdf,
1061
+ hasImg: e.value.userOptions.buttons.img,
1062
+ hasSvg: e.value.userOptions.buttons.svg,
1063
+ hasXls: e.value.userOptions.buttons.csv,
1064
+ hasTable: e.value.userOptions.buttons.table,
1065
+ hasLabel: e.value.userOptions.buttons.labels,
1066
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
1067
+ isFullscreen: me.value,
1068
+ chartElement: J.value,
1069
+ position: e.value.userOptions.position,
1070
+ isTooltip: T.value.showTooltip,
1071
+ titles: { ...e.value.userOptions.buttonTitles },
1072
+ hasAnnotator: e.value.userOptions.buttons.annotator,
1073
+ isAnnotation: Re.value,
1074
+ callbacks: e.value.userOptions.callbacks,
1075
+ printScale: e.value.userOptions.print.scale,
1076
+ tableDialog: e.value.table.useDialog,
1077
+ onToggleFullscreen: Yt,
1078
+ onGeneratePdf: m(Tt),
1079
+ onGenerateCsv: nt,
1080
+ onGenerateImage: m($t),
1081
+ onGenerateSvg: jt,
1082
+ onToggleTable: Wt,
1083
+ onToggleLabels: qt,
1084
+ onToggleTooltip: Gt,
1085
+ onToggleAnnotator: ct,
1086
+ style: ne({
1087
+ visibility: m(At) ? m(et) ? "visible" : "hidden" : "visible"
1088
+ })
1089
+ }, bt({ _: 2 }, [
1090
+ a.$slots.menuIcon ? {
1091
+ name: "menuIcon",
1092
+ fn: L(({ isOpen: t, color: o }) => [
1093
+ C(a.$slots, "menuIcon", U(H({ isOpen: t, color: o })), void 0, !0)
1094
+ ]),
1095
+ key: "0"
1096
+ } : void 0,
1097
+ a.$slots.optionTooltip ? {
1098
+ name: "optionTooltip",
1099
+ fn: L(() => [
1100
+ C(a.$slots, "optionTooltip", {}, void 0, !0)
1101
+ ]),
1102
+ key: "1"
1103
+ } : void 0,
1104
+ a.$slots.optionPdf ? {
1105
+ name: "optionPdf",
1106
+ fn: L(() => [
1107
+ C(a.$slots, "optionPdf", {}, void 0, !0)
1108
+ ]),
1109
+ key: "2"
1110
+ } : void 0,
1111
+ a.$slots.optionCsv ? {
1112
+ name: "optionCsv",
1113
+ fn: L(() => [
1114
+ C(a.$slots, "optionCsv", {}, void 0, !0)
1115
+ ]),
1116
+ key: "3"
1117
+ } : void 0,
1118
+ a.$slots.optionImg ? {
1119
+ name: "optionImg",
1120
+ fn: L(() => [
1121
+ C(a.$slots, "optionImg", {}, void 0, !0)
1122
+ ]),
1123
+ key: "4"
1124
+ } : void 0,
1125
+ a.$slots.optionSvg ? {
1126
+ name: "optionSvg",
1127
+ fn: L(() => [
1128
+ C(a.$slots, "optionSvg", {}, void 0, !0)
1129
+ ]),
1130
+ key: "5"
1131
+ } : void 0,
1132
+ a.$slots.optionTable ? {
1133
+ name: "optionTable",
1134
+ fn: L(() => [
1135
+ C(a.$slots, "optionTable", {}, void 0, !0)
1136
+ ]),
1137
+ key: "6"
1138
+ } : void 0,
1139
+ a.$slots.optionLabels ? {
1140
+ name: "optionLabels",
1141
+ fn: L(() => [
1142
+ C(a.$slots, "optionLabels", {}, void 0, !0)
1143
+ ]),
1144
+ key: "7"
1145
+ } : void 0,
1146
+ a.$slots.optionFullscreen ? {
1147
+ name: "optionFullscreen",
1148
+ fn: L(({ toggleFullscreen: t, isFullscreen: o }) => [
1149
+ C(a.$slots, "optionFullscreen", U(H({ toggleFullscreen: t, isFullscreen: o })), void 0, !0)
1150
+ ]),
1151
+ key: "8"
1152
+ } : void 0,
1153
+ a.$slots.optionAnnotator ? {
1154
+ name: "optionAnnotator",
1155
+ fn: L(({ toggleAnnotator: t, isAnnotator: o }) => [
1156
+ C(a.$slots, "optionAnnotator", U(H({ toggleAnnotator: t, isAnnotator: o })), void 0, !0)
1157
+ ]),
1158
+ key: "9"
1159
+ } : void 0
1160
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : y("", !0),
1161
+ (s(), n("svg", {
1162
+ ref_key: "svgRef",
1163
+ ref: tt,
1164
+ xmlns: m(ql),
1165
+ viewBox: `0 0 ${u.value.chartWidth <= 0 ? 10 : u.value.chartWidth} ${u.value.chartHeight <= 0 ? 10 : u.value.chartHeight}`,
1166
+ class: ve({ "vue-data-ui-loading": m(xe) }),
1167
+ style: ne(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
1168
+ }, [
1169
+ _e(m(Pa)),
1170
+ a.$slots["chart-background"] ? (s(), n("foreignObject", {
1171
+ key: 0,
1172
+ x: u.value.left,
1173
+ y: u.value.top,
1174
+ width: u.value.width <= 0 ? 10 : u.value.width,
1175
+ height: u.value.height <= 0 ? 10 : u.value.height,
1176
+ style: {
1177
+ pointerEvents: "none"
1178
+ }
1179
+ }, [
1180
+ C(a.$slots, "chart-background", {}, void 0, !0)
1181
+ ], 8, ko)) : y("", !0),
1182
+ e.value.style.chart.bars.gradient.show ? (s(), n("defs", Co, [
1183
+ (s(!0), n(x, null, w(S.value, (t, o) => (s(), n("linearGradient", {
1184
+ id: `gradient_${t.id}`,
1185
+ x1: "0%",
1186
+ y1: "0%",
1187
+ x2: "0%",
1188
+ y2: "100%"
1189
+ }, [
1190
+ te("stop", {
1191
+ offset: "0%",
1192
+ "stop-color": t.color
1193
+ }, null, 8, Lo),
1194
+ te("stop", {
1195
+ offset: "61.8%",
1196
+ "stop-color": m(Gl)(t.color, e.value.style.chart.bars.gradient.intensity / 100)
1197
+ }, null, 8, Ao),
1198
+ te("stop", {
1199
+ offset: "100%",
1200
+ "stop-color": t.color
1201
+ }, null, 8, So)
1202
+ ], 8, wo))), 256))
1203
+ ])) : y("", !0),
1204
+ e.value.style.chart.grid.frame.show ? (s(), n("rect", {
1205
+ key: 2,
1206
+ style: { pointerEvents: "none", transition: "none", animation: "none !important" },
1207
+ x: Math.max(0, u.value.left),
1208
+ y: Math.max(0, u.value.top),
1209
+ width: Math.max(0, u.value.width),
1210
+ height: Math.max(0, u.value.height),
1211
+ fill: "transparent",
1212
+ stroke: e.value.style.chart.grid.frame.stroke,
1213
+ "stroke-width": e.value.style.chart.grid.frame.strokeWidth,
1214
+ "stroke-linecap": e.value.style.chart.grid.frame.strokeLinecap,
1215
+ "stroke-linejoin": e.value.style.chart.grid.frame.strokeLinejoin,
1216
+ "stroke-dasharray": e.value.style.chart.grid.frame.strokeDasharray
1217
+ }, null, 8, zo)) : y("", !0),
1218
+ e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "vertical" ? (s(!0), n(x, { key: 3 }, w(Y.value, (t, o) => (s(), n("line", {
1219
+ x1: u.value.left,
1220
+ x2: u.value.right,
1221
+ y1: t.y,
1222
+ y2: t.y,
1223
+ stroke: e.value.style.chart.grid.x.linesColor,
1224
+ "stroke-width": e.value.style.chart.grid.x.linesThickness,
1225
+ "stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
1226
+ "stroke-linecap": "round"
1227
+ }, null, 8, _o))), 256)) : y("", !0),
1228
+ e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "horizontal" ? (s(!0), n(x, { key: 4 }, w(h.value.end - h.value.start + 1, (t, o) => (s(), n("line", {
1229
+ x1: u.value.left,
1230
+ x2: u.value.right,
1231
+ y1: u.value.top + p.value * o,
1232
+ y2: u.value.top + p.value * o,
1233
+ stroke: e.value.style.chart.grid.x.linesColor,
1234
+ "stroke-width": e.value.style.chart.grid.x.linesThickness,
1235
+ "stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
1236
+ "stroke-linecap": "round"
1237
+ }, null, 8, Mo))), 256)) : y("", !0),
1238
+ e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "vertical" ? (s(!0), n(x, { key: 5 }, w(h.value.end - h.value.start + 1, (t, o) => (s(), n("line", {
1239
+ x1: u.value.left + p.value * o,
1240
+ x2: u.value.left + p.value * o,
1241
+ y1: u.value.top,
1242
+ y2: u.value.bottom,
1243
+ stroke: e.value.style.chart.grid.y.linesColor,
1244
+ "stroke-width": e.value.style.chart.grid.y.linesThickness,
1245
+ "stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
1246
+ "stroke-linecap": "round"
1247
+ }, null, 8, To))), 256)) : y("", !0),
1248
+ e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "horizontal" ? (s(!0), n(x, { key: 6 }, w(Y.value, (t, o) => (s(), n("line", {
1249
+ x1: t.horizontal_x,
1250
+ x2: t.horizontal_x,
1251
+ y1: u.value.top,
1252
+ y2: u.value.bottom,
1253
+ stroke: e.value.style.chart.grid.y.linesColor,
1254
+ "stroke-width": e.value.style.chart.grid.y.linesThickness,
1255
+ "stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
1256
+ "stroke-linecap": "round"
1257
+ }, null, 8, $o))), 256)) : y("", !0),
1258
+ (s(!0), n(x, null, w(S.value, (t, o) => (s(), n("g", null, [
1259
+ a.$slots.pattern ? (s(), n("defs", Fo, [
1260
+ C(a.$slots, "pattern", Me({ ref_for: !0 }, { seriesIndex: t.absoluteIndex, patternId: `pattern_${V.value}_${t.absoluteIndex}` }), void 0, !0)
1261
+ ])) : y("", !0),
1262
+ e.value.orientation === "vertical" ? (s(), n(x, { key: 1 }, [
1263
+ (s(!0), n(x, null, w(t.x, (c, r) => (s(), n("rect", {
1264
+ x: c,
1265
+ y: m(ie)(t.y[r]),
1266
+ height: t.height[r] < 0 ? 1e-4 : t.height[r] || 0,
1267
+ rx: e.value.style.chart.bars.borderRadius > t.height[r] / 2 ? (t.height[r] < 0 ? 0 : t.height[r]) / 2 : e.value.style.chart.bars.borderRadius,
1268
+ width: p.value * (1 - e.value.style.chart.bars.gapRatio / 2),
1269
+ fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
1270
+ stroke: e.value.style.chart.backgroundColor,
1271
+ "stroke-width": e.value.style.chart.bars.strokeWidth,
1272
+ "stroke-linecap": "round",
1273
+ "stroke-linejoin": "round",
1274
+ class: ve({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": le.value })
1275
+ }, null, 10, Do))), 256)),
1276
+ a.$slots.pattern ? (s(), n("g", No, [
1277
+ (s(!0), n(x, null, w(t.x, (c, r) => (s(), n("rect", {
1278
+ x: c,
1279
+ y: m(ie)(t.y[r]),
1280
+ height: t.height[r] < 0 ? 1e-4 : t.height[r] || 0,
1281
+ rx: e.value.style.chart.bars.borderRadius > t.height[r] / 2 ? (t.height[r] < 0 ? 0 : t.height[r]) / 2 : e.value.style.chart.bars.borderRadius,
1282
+ width: p.value * (1 - e.value.style.chart.bars.gapRatio / 2),
1283
+ fill: `url(#pattern_${V.value}_${t.absoluteIndex})`,
1284
+ stroke: e.value.style.chart.backgroundColor,
1285
+ "stroke-width": e.value.style.chart.bars.strokeWidth,
1286
+ "stroke-linecap": "round",
1287
+ "stroke-linejoin": "round",
1288
+ class: ve({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": le.value })
1289
+ }, null, 10, Po))), 256))
1290
+ ])) : y("", !0)
1291
+ ], 64)) : (s(), n(x, { key: 2 }, [
1292
+ (s(!0), n(x, null, w(t.horizontal_x, (c, r) => (s(), n("rect", {
1293
+ x: m(ie)(c, u.value.left),
1294
+ y: t.horizontal_y[r] < 0 ? 0 : t.horizontal_y[r],
1295
+ width: m(ie)(t.horizontal_width[r] < 0 ? 1e-4 : t.horizontal_width[r]),
1296
+ rx: e.value.style.chart.bars.borderRadius > t.height[r] / 2 ? (t.height[r] < 0 ? 0 : t.height[r]) / 2 : e.value.style.chart.bars.borderRadius,
1297
+ height: p.value * (1 - e.value.style.chart.bars.gapRatio / 2),
1298
+ fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
1299
+ stroke: e.value.style.chart.backgroundColor,
1300
+ "stroke-width": e.value.style.chart.bars.strokeWidth,
1301
+ "stroke-linecap": "round",
1302
+ "stroke-linejoin": "round",
1303
+ class: ve({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": le.value })
1304
+ }, null, 10, Oo))), 256)),
1305
+ a.$slots.pattern ? (s(), n("g", Eo, [
1306
+ (s(!0), n(x, null, w(t.horizontal_x, (c, r) => (s(), n("rect", {
1307
+ x: m(ie)(c, u.value.left),
1308
+ y: t.horizontal_y[r] < 0 ? 0 : t.horizontal_y[r],
1309
+ width: m(ie)(t.horizontal_width[r] < 0 ? 1e-4 : t.horizontal_width[r]),
1310
+ rx: e.value.style.chart.bars.borderRadius > t.height[r] / 2 ? (t.height[r] < 0 ? 0 : t.height[r]) / 2 : e.value.style.chart.bars.borderRadius,
1311
+ height: p.value * (1 - e.value.style.chart.bars.gapRatio / 2),
1312
+ fill: `url(#pattern_${V.value}_${t.absoluteIndex})`,
1313
+ stroke: e.value.style.chart.backgroundColor,
1314
+ "stroke-width": e.value.style.chart.bars.strokeWidth,
1315
+ "stroke-linecap": "round",
1316
+ "stroke-linejoin": "round",
1317
+ class: ve({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": le.value })
1318
+ }, null, 10, Ro))), 256))
1319
+ ])) : y("", !0)
1320
+ ], 64))
1321
+ ]))), 256)),
1322
+ e.value.style.chart.grid.x.showAxis ? (s(), n("line", {
1323
+ key: 7,
1324
+ x1: u.value.left,
1325
+ x2: u.value.right,
1326
+ y1: u.value.bottom,
1327
+ y2: u.value.bottom,
1328
+ stroke: e.value.style.chart.grid.x.axisColor,
1329
+ "stroke-width": e.value.style.chart.grid.x.axisThickness,
1330
+ "stroke-linecap": "round",
1331
+ "stroke-linejoin": "round"
1332
+ }, null, 8, Io)) : y("", !0),
1333
+ e.value.style.chart.grid.y.showAxis && !e.value.style.chart.bars.distributed ? (s(), n("line", {
1334
+ key: 8,
1335
+ x1: u.value.left,
1336
+ x2: u.value.left,
1337
+ y1: u.value.top,
1338
+ y2: u.value.bottom,
1339
+ stroke: e.value.style.chart.grid.y.axisColor,
1340
+ "stroke-width": e.value.style.chart.grid.y.axisThickness,
1341
+ "stroke-linecap": "round",
1342
+ "stroke-linejoin": "round"
1343
+ }, null, 8, Bo)) : y("", !0),
1344
+ e.value.style.chart.grid.x.axisName.show && e.value.style.chart.grid.x.axisName.text ? (s(), n("text", {
1345
+ key: 9,
1346
+ ref_key: "xAxisLabel",
1347
+ ref: Je,
1348
+ x: u.value.left + u.value.width / 2,
1349
+ y: u.value.chartHeight - 3,
1350
+ "font-size": e.value.style.chart.grid.x.axisName.fontSize,
1351
+ fill: e.value.style.chart.grid.x.axisName.color,
1352
+ "font-weight": e.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
1353
+ "text-anchor": "middle"
1354
+ }, B(e.value.style.chart.grid.x.axisName.text), 9, Vo)) : y("", !0),
1355
+ e.value.style.chart.grid.y.axisName.show && e.value.style.chart.grid.y.axisName.text ? (s(), n("text", {
1356
+ key: 10,
1357
+ ref_key: "yAxisLabel",
1358
+ ref: Ze,
1359
+ transform: `translate(${e.value.style.chart.grid.y.axisName.fontSize}, ${u.value.top + u.value.height / 2}) rotate(-90)`,
1360
+ "font-size": e.value.style.chart.grid.y.axisName.fontSize,
1361
+ fill: e.value.style.chart.grid.y.axisName.color,
1362
+ "font-weight": e.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
1363
+ "text-anchor": "middle"
1364
+ }, B(e.value.style.chart.grid.y.axisName.text), 9, Uo)) : y("", !0),
1365
+ T.value.dataLabels.show && e.value.orientation === "vertical" ? (s(), n(x, { key: 11 }, [
1366
+ (s(!0), n(x, null, w(S.value, (t, o) => (s(), n("g", null, [
1367
+ (s(!0), n(x, null, w(t.x, (c, r) => (s(), n(x, null, [
1368
+ Kt(t.series[r], t.proportions[r]) ? (s(), n("text", {
1369
+ key: 0,
1370
+ x: c + p.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2,
1371
+ y: t.y[r] + t.height[r] / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
1372
+ "font-size": e.value.style.chart.bars.dataLabels.fontSize,
1373
+ fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? m(fa)(t.color) : e.value.style.chart.bars.dataLabels.color,
1374
+ "font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
1375
+ "text-anchor": "middle"
1376
+ }, B(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Vt(t.proportions[r] * 100, t, o, r) : Oe(t.series[r], t, o, r, t.signedSeries[r])), 9, Ho)) : y("", !0)
1377
+ ], 64))), 256))
1378
+ ]))), 256)),
1379
+ e.value.style.chart.bars.totalValues.show && S.value.length > 1 ? (s(), n("g", {
1380
+ key: 0,
1381
+ ref_key: "sumTop",
1382
+ ref: Ha
1383
+ }, [
1384
+ (s(!0), n(x, null, w(Bt.value, (t, o) => (s(), n(x, null, [
1385
+ !e.value.style.chart.bars.dataLabels.hideEmptyValues || t.value !== 0 ? (s(), n("text", {
1386
+ key: 0,
1387
+ x: u.value.left + p.value * o + p.value / 2,
1388
+ y: xl(o),
1389
+ "text-anchor": "middle",
1390
+ "font-size": e.value.style.chart.bars.totalValues.fontSize,
1391
+ "font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
1392
+ fill: e.value.style.chart.bars.totalValues.color
1393
+ }, B(Oe(t.value, t, o, t.sign)), 9, Xo)) : y("", !0)
1394
+ ], 64))), 256))
1395
+ ], 512)) : y("", !0)
1396
+ ], 64)) : y("", !0),
1397
+ T.value.dataLabels.show && e.value.orientation === "horizontal" ? (s(), n(x, { key: 12 }, [
1398
+ (s(!0), n(x, null, w(S.value, (t, o) => (s(), n("g", null, [
1399
+ (s(!0), n(x, null, w(t.horizontal_x, (c, r) => (s(), n(x, null, [
1400
+ Kt(t.series[r], t.proportions[r]) ? (s(), n("text", {
1401
+ key: 0,
1402
+ x: c + (t.horizontal_width[r] < 0 ? 1e-4 : t.horizontal_width[r]) / 2,
1403
+ y: t.horizontal_y[r] + p.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
1404
+ "font-size": e.value.style.chart.bars.dataLabels.fontSize,
1405
+ fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? m(fa)(t.color) : e.value.style.chart.bars.dataLabels.color,
1406
+ "font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
1407
+ "text-anchor": "middle"
1408
+ }, B(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Vt(t.proportions[r] * 100, t, o, r) : Oe(t.series[r], t, o, r, t.signedSeries[r])), 9, Yo)) : y("", !0)
1409
+ ], 64))), 256))
1410
+ ]))), 256)),
1411
+ e.value.style.chart.bars.totalValues.show && S.value.length > 1 ? (s(), n("g", {
1412
+ key: 0,
1413
+ ref_key: "sumRight",
1414
+ ref: Ke
1415
+ }, [
1416
+ (s(!0), n(x, null, w(Bt.value, (t, o) => (s(), n(x, null, [
1417
+ !e.value.style.chart.bars.dataLabels.hideEmptyValues || t.value !== 0 ? (s(), n("text", {
1418
+ key: 0,
1419
+ x: kl(o),
1420
+ y: u.value.top + p.value * o + p.value / 2 + e.value.style.chart.bars.totalValues.fontSize / 3,
1421
+ "text-anchor": "start",
1422
+ "font-size": e.value.style.chart.bars.totalValues.fontSize,
1423
+ "font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
1424
+ fill: e.value.style.chart.bars.totalValues.color
1425
+ }, B(Oe(t.value, t, o, t.sign)), 9, Wo)) : y("", !0)
1426
+ ], 64))), 256))
1427
+ ], 512)) : y("", !0)
1428
+ ], 64)) : y("", !0),
1429
+ e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "vertical" ? (s(), n("g", {
1430
+ key: 13,
1431
+ ref_key: "scaleLabels",
1432
+ ref: oe
1433
+ }, [
1434
+ (s(!0), n(x, null, w(Y.value, (t, o) => (s(), n("line", {
1435
+ x1: u.value.left,
1436
+ x2: u.value.left - 6,
1437
+ y1: t.y,
1438
+ y2: t.y,
1439
+ stroke: e.value.style.chart.grid.x.axisColor,
1440
+ "stroke-width": 1
1441
+ }, null, 8, qo))), 256)),
1442
+ (s(!0), n(x, null, w(Y.value, (t, o) => (s(), n("text", {
1443
+ x: t.x,
1444
+ y: t.y + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1445
+ "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
1446
+ "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1447
+ fill: e.value.style.chart.grid.y.axisLabels.color,
1448
+ "text-anchor": "end"
1449
+ }, B(m(ge)(
1450
+ e.value.style.chart.grid.y.axisLabels.formatter,
1451
+ t.value,
1452
+ m(ae)({
1453
+ p: e.value.style.chart.bars.dataLabels.prefix,
1454
+ v: t.value,
1455
+ s: e.value.style.chart.bars.dataLabels.suffix,
1456
+ r: e.value.style.chart.grid.y.axisLabels.rounding
1457
+ }),
1458
+ { datapoint: t }
1459
+ )), 9, Go))), 256))
1460
+ ], 512)) : y("", !0),
1461
+ e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "horizontal" ? (s(), n("g", {
1462
+ key: 14,
1463
+ ref_key: "scaleLabels",
1464
+ ref: oe
1465
+ }, [
1466
+ (s(!0), n(x, null, w(Y.value, (t, o) => (s(), n("line", {
1467
+ x1: t.horizontal_x,
1468
+ x2: t.horizontal_x,
1469
+ y1: u.value.bottom,
1470
+ y2: u.value.bottom + 6,
1471
+ stroke: e.value.style.chart.grid.x.axisColor,
1472
+ "stroke-width": 1,
1473
+ "stroke-linecap": "round"
1474
+ }, null, 8, Jo))), 256)),
1475
+ (s(!0), n(x, null, w(Y.value, (t, o) => (s(), n("text", {
1476
+ class: "vue-data-ui-time-label",
1477
+ "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
1478
+ "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1479
+ fill: e.value.style.chart.grid.y.axisLabels.color,
1480
+ "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1481
+ transform: `translate(${t.horizontal_x}, ${u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`
1482
+ }, B(m(ge)(
1483
+ e.value.style.chart.grid.y.axisLabels.formatter,
1484
+ t.value,
1485
+ m(ae)({
1486
+ p: e.value.style.chart.bars.dataLabels.prefix,
1487
+ v: t.value,
1488
+ s: e.value.style.chart.bars.dataLabels.suffix,
1489
+ r: e.value.style.chart.grid.y.axisLabels.rounding
1490
+ }),
1491
+ { datapoint: t }
1492
+ )), 9, Zo))), 256))
1493
+ ], 512)) : y("", !0),
1494
+ e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "vertical" ? (s(), n("g", {
1495
+ key: 15,
1496
+ ref_key: "timeLabelsEls",
1497
+ ref: re
1498
+ }, [
1499
+ a.$slots["time-label"] ? (s(), n("g", Ko, [
1500
+ (s(!0), n(x, null, w(Et.value, (t, o) => (s(), n("g", null, [
1501
+ C(a.$slots, "time-label", Me({ ref_for: !0 }, {
1502
+ x: u.value.left + p.value * o + p.value / 2,
1503
+ y: u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY,
1504
+ fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
1505
+ fill: e.value.style.chart.grid.x.timeLabels.color,
1506
+ transform: `translate(${u.value.left + p.value * o + p.value / 2}, ${u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`,
1507
+ absoluteIndex: t.absoluteIndex,
1508
+ content: t.text,
1509
+ textAnchor: e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1510
+ show: !0
1511
+ }), void 0, !0)
1512
+ ]))), 256))
1513
+ ])) : (s(), n("g", Qo, [
1514
+ (s(!0), n(x, null, w(Et.value, (t, o) => (s(), n("g", null, [
1515
+ String(t.text).includes(`
1516
+ `) ? (s(), n("text", {
1517
+ key: o + "-multi",
1518
+ "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1519
+ "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
1520
+ fill: e.value.style.chart.grid.x.timeLabels.color,
1521
+ transform: `
1522
+ translate(
1523
+ ${u.value.left + p.value * o + p.value / 2},
1524
+ ${u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}
1525
+ ),
1526
+ rotate(${e.value.style.chart.grid.x.timeLabels.rotation})
1527
+ `,
1528
+ style: { cursor: "pointer" },
1529
+ innerHTML: m(Jl)({
1530
+ content: String(t.text),
1531
+ fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
1532
+ fill: e.value.style.chart.grid.x.timeLabels.color,
1533
+ x: 0,
1534
+ y: 0
1535
+ }),
1536
+ onClick: () => Ie(t, o)
1537
+ }, null, 8, er)) : (s(), n("text", {
1538
+ class: "vue-data-ui-time-label",
1539
+ key: o,
1540
+ "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1541
+ "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
1542
+ "font-weight": e.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
1543
+ fill: e.value.style.chart.grid.x.timeLabels.color,
1544
+ transform: `translate(${u.value.left + p.value * o + p.value / 2}, ${u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`,
1545
+ style: { cursor: "pointer" },
1546
+ onClick: () => Ie(t, o)
1547
+ }, B(t.text), 9, jo))
1548
+ ]))), 256))
1549
+ ]))
1550
+ ], 512)) : y("", !0),
1551
+ e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "horizontal" ? (s(), n("g", {
1552
+ key: 16,
1553
+ ref_key: "timeLabelsEls",
1554
+ ref: re
1555
+ }, [
1556
+ a.$slots["time-label"] ? (s(), n("g", tr, [
1557
+ (s(!0), n(x, null, w(O.value, (t, o) => (s(), n("g", null, [
1558
+ C(a.$slots, "time-label", Me({ ref_for: !0 }, {
1559
+ x: u.value.left - 8,
1560
+ y: u.value.top + p.value * o + p.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1561
+ fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
1562
+ fill: e.value.style.chart.grid.x.timeLabels.color,
1563
+ transform: null,
1564
+ absoluteIndex: t.absoluteIndex,
1565
+ content: t.text,
1566
+ textAnchor: "end",
1567
+ show: !0
1568
+ }), void 0, !0)
1569
+ ]))), 256))
1570
+ ])) : (s(), n("g", ar, [
1571
+ (s(!0), n(x, null, w(O.value, (t, o) => (s(), n("g", null, [
1572
+ String(t.text).includes(`
1573
+ `) ? (s(), n("text", {
1574
+ key: 1,
1575
+ "text-anchor": "end",
1576
+ "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
1577
+ "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1578
+ fill: e.value.style.chart.grid.y.axisLabels.color,
1579
+ x: u.value.left - 8,
1580
+ y: u.value.top + p.value * o + p.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1581
+ style: { cursor: "pointer" },
1582
+ onClick: () => Ie(t, o),
1583
+ innerHTML: m(Zl)({
1584
+ content: String(t.text),
1585
+ fontSize: e.value.style.chart.grid.y.axisLabels.fontSize,
1586
+ fill: e.value.style.chart.grid.y.axisLabels.color,
1587
+ x: u.value.left - 8,
1588
+ y: 0
1589
+ })
1590
+ }, null, 8, or)) : (s(), n("text", {
1591
+ key: 0,
1592
+ "text-anchor": "end",
1593
+ "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
1594
+ "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1595
+ fill: e.value.style.chart.grid.y.axisLabels.color,
1596
+ x: u.value.left - 8,
1597
+ y: u.value.top + p.value * o + p.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1598
+ style: {
1599
+ cursor: "pointer"
1600
+ },
1601
+ onClick: () => Ie(t, o)
1602
+ }, B(t.text), 9, lr))
1603
+ ]))), 256))
1604
+ ]))
1605
+ ], 512)) : y("", !0),
1606
+ T.value.showTooltip && e.value.orientation === "vertical" ? (s(!0), n(x, { key: 17 }, w(h.value.end - h.value.start, (t, o) => (s(), n("rect", {
1607
+ x: u.value.left + o * p.value,
1608
+ y: u.value.top,
1609
+ width: p.value,
1610
+ height: u.value.height < 0 ? 0 : u.value.height,
1611
+ onClick: () => Ut(o),
1612
+ onMouseenter: () => Xt(o),
1613
+ onMouseleave: () => Ht(o),
1614
+ fill: o === G.value || o === Qe.value ? e.value.style.chart.highlighter.color : "transparent",
1615
+ style: ne({ opacity: e.value.style.chart.highlighter.opacity / 100 })
1616
+ }, null, 44, rr))), 256)) : y("", !0),
1617
+ T.value.showTooltip && e.value.orientation === "horizontal" ? (s(!0), n(x, { key: 18 }, w(h.value.end - h.value.start, (t, o) => (s(), n("rect", {
1618
+ x: u.value.left,
1619
+ y: u.value.top + o * p.value,
1620
+ width: u.value.width < 0 ? 0 : u.value.width,
1621
+ height: p.value,
1622
+ onClick: () => Ut(o),
1623
+ onMouseenter: () => Xt(o),
1624
+ onMouseleave: () => Ht(o),
1625
+ fill: o === G.value || o === Qe.value ? e.value.style.chart.highlighter.color : "transparent",
1626
+ style: ne({ opacity: e.value.style.chart.highlighter.opacity / 100 })
1627
+ }, null, 44, sr))), 256)) : y("", !0),
1628
+ Nt.value ? (s(), n("rect", Me({ key: 19 }, Ka.value, {
1629
+ "data-start": h.value.start,
1630
+ "data-end": h.value.end
1631
+ }), null, 16, nr)) : y("", !0),
1632
+ C(a.$slots, "svg", {
1633
+ svg: {
1634
+ drawingArea: u.value,
1635
+ data: S.value
1636
+ }
1637
+ }, void 0, !0)
1638
+ ], 14, xo)),
1639
+ a.$slots.watermark ? (s(), n("div", ir, [
1640
+ C(a.$slots, "watermark", U(H({ isPrinting: m(_t) || m(Mt) })), void 0, !0)
1641
+ ])) : y("", !0),
1642
+ e.value.style.chart.zoom.show && D.value > 6 && ye.value && ta.value ? (s(), ee(yo, {
1643
+ key: 4,
1644
+ ref_key: "chartSlicer",
1645
+ ref: fe,
1646
+ allMinimaps: el.value,
1647
+ background: e.value.style.chart.zoom.color,
1648
+ borderColor: e.value.style.chart.backgroundColor,
1649
+ customFormat: e.value.style.chart.zoom.customFormat,
1650
+ cutNullValues: !1,
1651
+ enableRangeHandles: e.value.style.chart.zoom.enableRangeHandles,
1652
+ enableSelectionDrag: e.value.style.chart.zoom.enableSelectionDrag,
1653
+ end: h.value.end,
1654
+ focusOnDrag: e.value.style.chart.zoom.focusOnDrag,
1655
+ focusRangeRatio: e.value.style.chart.zoom.focusRangeRatio,
1656
+ fontSize: e.value.style.chart.zoom.fontSize,
1657
+ immediate: !e.value.style.chart.zoom.preview.enable,
1658
+ inputColor: e.value.style.chart.zoom.color,
1659
+ isPreview: Nt.value,
1660
+ labelLeft: e.value.style.chart.grid.x.timeLabels.values[h.value.start] ? O.value[0].text : "",
1661
+ labelRight: e.value.style.chart.grid.x.timeLabels.values[h.value.end - 1] ? O.value.at(-1).text : "",
1662
+ max: Math.max(...Xe.dataset.map((t) => t.series.length)),
1663
+ min: 0,
1664
+ minimap: se.value,
1665
+ minimapCompact: e.value.style.chart.zoom.minimap.compact,
1666
+ minimapFrameColor: e.value.style.chart.zoom.minimap.frameColor,
1667
+ minimapIndicatorColor: e.value.style.chart.zoom.minimap.indicatorColor,
1668
+ minimapMerged: !1,
1669
+ minimapSelectedColor: e.value.style.chart.zoom.minimap.selectedColor,
1670
+ minimapSelectedColorOpacity: e.value.style.chart.zoom.minimap.selectedColorOpacity,
1671
+ minimapSelectedIndex: G.value,
1672
+ minimapSelectionRadius: 1,
1673
+ preciseLabels: It.value.length ? It.value : we.value,
1674
+ refreshEndPoint: e.value.style.chart.zoom.endIndex !== null ? e.value.style.chart.zoom.endIndex + 1 : Math.max(...Xe.dataset.map((t) => t.series.length)),
1675
+ refreshStartPoint: e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex : 0,
1676
+ selectColor: e.value.style.chart.zoom.highlightColor,
1677
+ selectedSeries: ll.value,
1678
+ smoothMinimap: !1,
1679
+ start: h.value.start,
1680
+ textColor: e.value.style.chart.color,
1681
+ timeLabels: we.value,
1682
+ usePreciseLabels: e.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !e.value.style.chart.zoom.useDefaultFormat,
1683
+ valueEnd: h.value.end,
1684
+ valueStart: h.value.start,
1685
+ verticalHandles: e.value.style.chart.zoom.minimap.verticalHandles,
1686
+ "onUpdate:end": ml,
1687
+ "onUpdate:start": fl,
1688
+ onTrapMouse: Qa,
1689
+ onReset: Ot,
1690
+ onFutureEnd: l[0] || (l[0] = (t) => Pt("end", t)),
1691
+ onFutureStart: l[1] || (l[1] = (t) => Pt("start", t))
1692
+ }, {
1693
+ "reset-action": L(({ reset: t }) => [
1694
+ C(a.$slots, "reset-action", U(H({ reset: t })), void 0, !0)
1695
+ ]),
1696
+ slotMap: L(({ width: t, height: o, unitW: c }) => [
1697
+ (s(!0), n(x, null, w(S.value, (r) => (s(), n("g", {
1698
+ key: r.id
1699
+ }, [
1700
+ (s(!0), n(x, null, w(r.xMinimap({ left: 0, unitW: c }), (f, A) => (s(), n("rect", {
1701
+ key: A,
1702
+ x: A === 0 ? f - c * (e.value.style.chart.bars.gapRatio / 4) : f - c / 2,
1703
+ y: Math.max(0, Math.min(o, r.yMinimap({ minimapH: o })[A])),
1704
+ height: r.heightMinimap({ minimapH: o })[A],
1705
+ width: [0, D.value - 1].includes(A) ? c * (1 - e.value.style.chart.bars.gapRatio / 2) / 2 : c * (1 - e.value.style.chart.bars.gapRatio / 2),
1706
+ fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${r.id})` : r.color,
1707
+ stroke: e.value.style.chart.backgroundColor,
1708
+ "stroke-width": 0.5,
1709
+ rx: "0",
1710
+ "stroke-linecap": "round",
1711
+ "stroke-linejoin": "round",
1712
+ style: ne({
1713
+ opacity: A >= R.value.start && A <= R.value.end ? 1 : 0.62
1714
+ })
1715
+ }, null, 12, ur))), 128))
1716
+ ]))), 128))
1717
+ ]),
1718
+ _: 3
1719
+ }, 8, ["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"])) : y("", !0),
1720
+ _e(m(Ma), {
1721
+ show: T.value.showTooltip && Ye.value,
1722
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1723
+ color: e.value.style.chart.tooltip.color,
1724
+ fontSize: e.value.style.chart.tooltip.fontSize,
1725
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
1726
+ borderColor: e.value.style.chart.tooltip.borderColor,
1727
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
1728
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1729
+ position: e.value.style.chart.tooltip.position,
1730
+ offsetY: e.value.style.chart.tooltip.offsetY,
1731
+ parent: J.value,
1732
+ content: qe.value,
1733
+ isFullscreen: me.value,
1734
+ isCustom: m(ma)(e.value.style.chart.tooltip.customFormat),
1735
+ smooth: e.value.style.chart.tooltip.smooth,
1736
+ backdropFilter: e.value.style.chart.tooltip.backdropFilter,
1737
+ smoothForce: e.value.style.chart.tooltip.smoothForce,
1738
+ smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold
1739
+ }, {
1740
+ "tooltip-before": L(() => [
1741
+ C(a.$slots, "tooltip-before", U(H({ ...We.value })), void 0, !0)
1742
+ ]),
1743
+ "tooltip-after": L(() => [
1744
+ C(a.$slots, "tooltip-after", U(H({ ...We.value })), void 0, !0)
1745
+ ]),
1746
+ _: 3
1747
+ }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
1748
+ te("div", {
1749
+ id: `legend-bottom-${V.value}`
1750
+ }, null, 8, cr),
1751
+ wt.value ? (s(), ee(Rl, {
1752
+ key: 5,
1753
+ to: e.value.style.chart.legend.position === "top" ? `#legend-top-${V.value}` : `#legend-bottom-${V.value}`
1754
+ }, [
1755
+ te("div", {
1756
+ ref_key: "chartLegend",
1757
+ ref: xt
1758
+ }, [
1759
+ e.value.style.chart.legend.show ? (s(), ee(bo, {
1760
+ key: 0,
1761
+ legendSet: ut.value,
1762
+ config: ul.value,
1763
+ onClickMarker: l[2] || (l[2] = ({ legend: t }) => t.segregate())
1764
+ }, bt({
1765
+ item: L(({ legend: t }) => [
1766
+ m(xe) ? y("", !0) : (s(), n("div", {
1767
+ key: 0,
1768
+ onClick: (o) => t.segregate(),
1769
+ style: ne(`opacity:${F.value.includes(t.id) ? 0.5 : 1}`)
1770
+ }, B(t.name), 13, hr))
1771
+ ]),
1772
+ _: 2
1773
+ }, [
1774
+ a.$slots.pattern ? {
1775
+ name: "legend-pattern",
1776
+ fn: L(({ legend: t, index: o }) => [
1777
+ _e(go, {
1778
+ shape: t.shape,
1779
+ radius: 30,
1780
+ stroke: "none",
1781
+ plot: { x: 30, y: 30 },
1782
+ fill: `url(#pattern_${V.value}_${o})`
1783
+ }, null, 8, ["shape", "fill"])
1784
+ ]),
1785
+ key: "0"
1786
+ } : void 0
1787
+ ]), 1032, ["legendSet", "config"])) : C(a.$slots, "legend", {
1788
+ key: 1,
1789
+ legend: ut.value
1790
+ }, void 0, !0)
1791
+ ], 512)
1792
+ ], 8, ["to"])) : y("", !0),
1793
+ a.$slots.source ? (s(), n("div", {
1794
+ key: 6,
1795
+ ref_key: "source",
1796
+ ref: kt,
1797
+ dir: "auto"
1798
+ }, [
1799
+ C(a.$slots, "source", {}, void 0, !0)
1800
+ ], 512)) : y("", !0),
1801
+ ye.value && e.value.userOptions.buttons.table ? (s(), ee(Il(Le.value.component), Me({ key: 7 }, Le.value.props, {
1802
+ ref_key: "tableUnit",
1803
+ ref: pe,
1804
+ onClose: Qt
1805
+ }), bt({
1806
+ content: L(() => [
1807
+ _e(m(Fa), {
1808
+ colNames: Ee.value.colNames,
1809
+ head: Ee.value.head,
1810
+ body: Ee.value.body,
1811
+ config: Ee.value.config,
1812
+ title: e.value.table.useDialog ? "" : Le.value.title,
1813
+ withCloseButton: !e.value.table.useDialog,
1814
+ onClose: Qt
1815
+ }, {
1816
+ th: L(({ th: t }) => [
1817
+ te("div", { innerHTML: t }, null, 8, vr)
1818
+ ]),
1819
+ td: L(({ td: t }) => [
1820
+ ha(B(isNaN(Number(t)) ? t : m(ae)({
1821
+ p: e.value.style.chart.bars.dataLabels.prefix,
1822
+ v: t,
1823
+ s: e.value.style.chart.bars.dataLabels.suffix,
1824
+ r: e.value.table.td.roundingValue
1825
+ })), 1)
1826
+ ]),
1827
+ _: 1
1828
+ }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"])
1829
+ ]),
1830
+ _: 2
1831
+ }, [
1832
+ e.value.table.useDialog ? {
1833
+ name: "title",
1834
+ fn: L(() => [
1835
+ ha(B(Le.value.title), 1)
1836
+ ]),
1837
+ key: "0"
1838
+ } : void 0,
1839
+ e.value.table.useDialog ? {
1840
+ name: "actions",
1841
+ fn: L(() => [
1842
+ te("button", {
1843
+ tabindex: "0",
1844
+ class: "vue-ui-user-options-button",
1845
+ onClick: l[3] || (l[3] = (t) => nt(e.value.userOptions.callbacks.csv))
1846
+ }, [
1847
+ _e(m(Ta), {
1848
+ name: "excel",
1849
+ stroke: Le.value.props.color
1850
+ }, null, 8, ["stroke"])
1851
+ ])
1852
+ ]),
1853
+ key: "1"
1854
+ } : void 0
1855
+ ]), 1040)) : y("", !0),
1856
+ m(xe) ? (s(), ee(lo, { key: 8 })) : y("", !0)
1857
+ ], 46, mo));
1858
+ }
1859
+ }, gr = /* @__PURE__ */ fo(dr, [["__scopeId", "data-v-9cdb5942"]]), Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1860
+ __proto__: null,
1861
+ default: gr
1862
+ }, Symbol.toStringTag, { value: "Module" }));
1863
+ export {
1864
+ Nr as a,
1865
+ Pr as b,
1866
+ gr as v
1867
+ };