vue-data-ui 3.15.12 → 3.16.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 (218) hide show
  1. package/README.md +132 -59
  2. package/dist/A11yDataTable-KcVAX2cP.js +54 -0
  3. package/dist/{Arrow-DlPyR6HQ.js → Arrow-Bn-9n3bm.js} +1 -1
  4. package/dist/{BaseDraggableDialog-DSpKTn3R.js → BaseDraggableDialog-CIb-iD9g.js} +2 -2
  5. package/dist/{BaseIcon-CNx8Tzl5.js → BaseIcon-Cb3zzG6s.js} +1 -1
  6. package/dist/{BaseLegendToggle-Y61xahI4.js → BaseLegendToggle-BQVIawmA.js} +1 -1
  7. package/dist/{BaseZoomControls-CoFievy9.js → BaseZoomControls-DievbOeJ.js} +2 -2
  8. package/dist/ColorPicker-B0mV4xzu.js +255 -0
  9. package/dist/{DataTable-Bo1pmAqG.js → DataTable-DT2kIdQ6.js} +2 -2
  10. package/dist/Legend-CS7Xo5LK.js +101 -0
  11. package/dist/{NonSvgPenAndPaper-CGk_xThe.js → NonSvgPenAndPaper-VyJFyJ6X.js} +3 -3
  12. package/dist/{PackageVersion-DN9d0ME5.js → PackageVersion-DPO-OOVI.js} +1 -1
  13. package/dist/{PenAndPaper-DWV1FMIi.js → PenAndPaper-Ct3qJ4lA.js} +109 -101
  14. package/dist/{Shape-CSyWYgXc.js → Shape-BKRUOeKk.js} +1 -1
  15. package/dist/{Slicer-DZJA9IG-.js → Slicer-DUycDH_N.js} +2 -2
  16. package/dist/{SlicerPreview-I2J0UUF_.js → SlicerPreview-DTjwV0iY.js} +2 -2
  17. package/dist/{SparkTooltip-BiseJed3.js → SparkTooltip-BorBpltj.js} +1 -1
  18. package/dist/{Title-BfyrP-jp.js → Title-BeMKE1cj.js} +1 -1
  19. package/dist/{Tooltip-DL3QgjZf.js → Tooltip-Bf-kM3_A.js} +86 -68
  20. package/dist/{UserOptions-CrLqEimB.js → UserOptions-rW2fRf3V.js} +228 -222
  21. package/dist/components/arrow.js +1 -1
  22. package/dist/components/vue-ui-3d-bar.js +1 -1
  23. package/dist/components/vue-ui-accordion.js +1 -1
  24. package/dist/components/vue-ui-age-pyramid.js +1 -1
  25. package/dist/components/vue-ui-annotator.js +1 -1
  26. package/dist/components/vue-ui-bullet.js +1 -1
  27. package/dist/components/vue-ui-bump.js +1 -1
  28. package/dist/components/vue-ui-candlestick.js +1 -1
  29. package/dist/components/vue-ui-carousel-table.js +1 -1
  30. package/dist/components/vue-ui-chestnut.js +1 -1
  31. package/dist/components/vue-ui-chord.js +1 -1
  32. package/dist/components/vue-ui-circle-pack.js +1 -1
  33. package/dist/components/vue-ui-cursor.js +1 -1
  34. package/dist/components/vue-ui-dag.js +1 -1
  35. package/dist/components/vue-ui-dashboard.js +1 -1
  36. package/dist/components/vue-ui-digits.js +1 -1
  37. package/dist/components/vue-ui-donut-evolution.js +1 -1
  38. package/dist/components/vue-ui-donut.js +1 -1
  39. package/dist/components/vue-ui-dumbbell.js +1 -1
  40. package/dist/components/vue-ui-flow.js +1 -1
  41. package/dist/components/vue-ui-funnel.js +1 -1
  42. package/dist/components/vue-ui-galaxy.js +1 -1
  43. package/dist/components/vue-ui-gauge.js +1 -1
  44. package/dist/components/vue-ui-geo.js +1 -1
  45. package/dist/components/vue-ui-gizmo.js +1 -1
  46. package/dist/components/vue-ui-heatmap.js +1 -1
  47. package/dist/components/vue-ui-history-plot.js +1 -1
  48. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  49. package/dist/components/vue-ui-icon.js +1 -1
  50. package/dist/components/vue-ui-kpi.js +1 -1
  51. package/dist/components/vue-ui-mini-loader.js +1 -1
  52. package/dist/components/vue-ui-molecule.js +1 -1
  53. package/dist/components/vue-ui-mood-radar.js +1 -1
  54. package/dist/components/vue-ui-nested-donuts.js +1 -1
  55. package/dist/components/vue-ui-onion.js +1 -1
  56. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  57. package/dist/components/vue-ui-quadrant.js +1 -1
  58. package/dist/components/vue-ui-quick-chart.js +1 -1
  59. package/dist/components/vue-ui-radar.js +1 -1
  60. package/dist/components/vue-ui-rating.js +1 -1
  61. package/dist/components/vue-ui-relation-circle.js +1 -1
  62. package/dist/components/vue-ui-ridgeline.js +1 -1
  63. package/dist/components/vue-ui-rings.js +1 -1
  64. package/dist/components/vue-ui-scatter.js +1 -1
  65. package/dist/components/vue-ui-skeleton.js +1 -1
  66. package/dist/components/vue-ui-smiley.js +1 -1
  67. package/dist/components/vue-ui-spark-trend.js +1 -1
  68. package/dist/components/vue-ui-sparkbar.js +1 -1
  69. package/dist/components/vue-ui-sparkgauge.js +1 -1
  70. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  71. package/dist/components/vue-ui-sparkline.js +1 -1
  72. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  73. package/dist/components/vue-ui-stackbar.js +1 -1
  74. package/dist/components/vue-ui-stackline.js +1 -1
  75. package/dist/components/vue-ui-strip-plot.js +1 -1
  76. package/dist/components/vue-ui-table-heatmap.js +1 -1
  77. package/dist/components/vue-ui-table-sparkline.js +1 -1
  78. package/dist/components/vue-ui-table.js +1 -1
  79. package/dist/components/vue-ui-thermometer.js +1 -1
  80. package/dist/components/vue-ui-timer.js +1 -1
  81. package/dist/components/vue-ui-tiremarks.js +1 -1
  82. package/dist/components/vue-ui-treemap.js +1 -1
  83. package/dist/components/vue-ui-vertical-bar.js +1 -1
  84. package/dist/components/vue-ui-waffle.js +1 -1
  85. package/dist/components/vue-ui-wheel.js +1 -1
  86. package/dist/components/vue-ui-word-cloud.js +1 -1
  87. package/dist/components/vue-ui-world.js +1 -1
  88. package/dist/components/vue-ui-xy-canvas.js +1 -1
  89. package/dist/components/vue-ui-xy.js +1 -1
  90. package/dist/{dom-to-png-BAqzNjb1.js → dom-to-png-CtxhhdWb.js} +1 -1
  91. package/dist/{exposedLib-H4lmBl1t.js → exposedLib-DlqmhBx3.js} +1 -1
  92. package/dist/{img-BYYzY_QU.js → img-LXxMLmCg.js} +1 -1
  93. package/dist/{labelUtils-CTXUc3V9.js → labelUtils-CqTHa20R.js} +1 -1
  94. package/dist/{lib-GwPnJSrY.js → lib-DBptbyyI.js} +106 -84
  95. package/dist/{pdf-z-YiJeJQ.js → pdf-B4tTdfvl.js} +1 -1
  96. package/dist/style.css +1 -1
  97. package/dist/types/vue-data-ui.d.ts +59 -0
  98. package/dist/{useAutoSizeLabelsInsideViewbox-80fzdfxt.js → useAutoSizeLabelsInsideViewbox-DX7LdvFX.js} +1 -1
  99. package/dist/{useConfig-CIgyKZ6R.js → useConfig-DO94Aj5s.js} +953 -700
  100. package/dist/{useNestedProp-BBT0mbHh.js → useNestedProp-Bf5XFbs8.js} +1 -1
  101. package/dist/{useObjectBindings-BlXBVtRa.js → useObjectBindings-DQ8g8Jwi.js} +1 -1
  102. package/dist/usePrefersMotion-CUKm8_t8.js +15 -0
  103. package/dist/{usePrinter-DiK5R6k-.js → usePrinter-CEpYU3r5.js} +2 -2
  104. package/dist/utils.js +3 -3
  105. package/dist/{vue-data-ui-C2kPofmi.js → vue-data-ui-DXGkXRnC.js} +68 -68
  106. package/dist/vue-data-ui.js +72 -72
  107. package/dist/vue-ui-3d-bar-BaFpQnd5.js +1597 -0
  108. package/dist/{vue-ui-accordion-BGHTqIBt.js → vue-ui-accordion-nvggWcGN.js} +4 -4
  109. package/dist/vue-ui-age-pyramid-CRM498Pc.js +1069 -0
  110. package/dist/{vue-ui-annotator-B1GWVtPp.js → vue-ui-annotator-CkPi9moo.js} +7 -7
  111. package/dist/{vue-ui-bullet-DPoGGtaG.js → vue-ui-bullet-BBiwof3c.js} +158 -150
  112. package/dist/vue-ui-bump-Brxpu4xV.js +1147 -0
  113. package/dist/vue-ui-candlestick-DAnZv77-.js +1587 -0
  114. package/dist/{vue-ui-carousel-table-CmiHTJ8E.js → vue-ui-carousel-table-BHRZBYY0.js} +168 -160
  115. package/dist/vue-ui-chestnut-CbrYnRgm.js +1812 -0
  116. package/dist/vue-ui-chord-CaX_IUVs.js +1326 -0
  117. package/dist/vue-ui-circle-pack-CR3h53sc.js +988 -0
  118. package/dist/{vue-ui-cursor-B4mHR7QC.js → vue-ui-cursor-Cjfazw7Z.js} +4 -4
  119. package/dist/vue-ui-dag-B9vH3c66.js +3047 -0
  120. package/dist/{vue-ui-dashboard-Bo5FX73U.js → vue-ui-dashboard-DWll05qs.js} +70 -70
  121. package/dist/{vue-ui-digits-mpo2IcM5.js → vue-ui-digits-DcM67rMx.js} +76 -66
  122. package/dist/vue-ui-donut-Be5G38P5.js +2229 -0
  123. package/dist/vue-ui-donut-evolution-BLSesj3c.js +1358 -0
  124. package/dist/vue-ui-dumbbell-DIMiCY4r.js +1380 -0
  125. package/dist/vue-ui-flow-zvZylhgr.js +1202 -0
  126. package/dist/{vue-ui-funnel-BRkaEkBb.js → vue-ui-funnel-CSri-oWm.js} +7 -7
  127. package/dist/vue-ui-galaxy-CGykxsAI.js +1012 -0
  128. package/dist/{vue-ui-gauge-J2VYHsQe.js → vue-ui-gauge-D1MNB9Jq.js} +8 -8
  129. package/dist/vue-ui-geo-DdJDGhG2.js +1437 -0
  130. package/dist/{vue-ui-gizmo-DEec3-v9.js → vue-ui-gizmo-BZYRHGFm.js} +77 -68
  131. package/dist/vue-ui-heatmap-CryOx6XK.js +1500 -0
  132. package/dist/vue-ui-history-plot-C85iw9Kl.js +1449 -0
  133. package/dist/vue-ui-horizontal-bar-BoBZOybC.js +1637 -0
  134. package/dist/vue-ui-kpi-DHrolXw6.js +109 -0
  135. package/dist/{vue-ui-mini-loader-CoOHvZUk.js → vue-ui-mini-loader-Bc3fEQ9j.js} +3 -3
  136. package/dist/{vue-ui-molecule-Chq1qWDK.js → vue-ui-molecule-DJ_BQ4DK.js} +6 -6
  137. package/dist/vue-ui-mood-radar-CBE02TpQ.js +1086 -0
  138. package/dist/vue-ui-nested-donuts-YTFtb4CL.js +1595 -0
  139. package/dist/vue-ui-onion-B9l81-PS.js +1124 -0
  140. package/dist/vue-ui-parallel-coordinate-plot-C1e_rs8J.js +1252 -0
  141. package/dist/vue-ui-quadrant-C1qsLCRn.js +1759 -0
  142. package/dist/vue-ui-quick-chart-DFoz3WiA.js +2216 -0
  143. package/dist/vue-ui-radar-Cmo3p-UA.js +1139 -0
  144. package/dist/{vue-ui-rating-zV58MDQh.js → vue-ui-rating-BAHhYt_A.js} +3 -3
  145. package/dist/vue-ui-relation-circle-BqwznVwf.js +782 -0
  146. package/dist/vue-ui-ridgeline-CDk9eXJq.js +1473 -0
  147. package/dist/vue-ui-rings-BRkGoQdL.js +1156 -0
  148. package/dist/vue-ui-scatter-BxDtWASQ.js +1831 -0
  149. package/dist/{vue-ui-skeleton-CbqNz9IE.js → vue-ui-skeleton-D6kTb9aO.js} +4 -4
  150. package/dist/{vue-ui-smiley-BK5EKp9u.js → vue-ui-smiley-CzVaLlpB.js} +3 -3
  151. package/dist/vue-ui-spark-trend-D8Mf2A1w.js +378 -0
  152. package/dist/{vue-ui-sparkbar-DUDWvTo-.js → vue-ui-sparkbar-BbYj56c3.js} +86 -84
  153. package/dist/vue-ui-sparkgauge-DXzOSLRb.js +256 -0
  154. package/dist/vue-ui-sparkhistogram-DMfSx1iH.js +474 -0
  155. package/dist/vue-ui-sparkline-D-rQ9PsC.js +1327 -0
  156. package/dist/vue-ui-sparkstackbar-DK5n8IKP.js +621 -0
  157. package/dist/vue-ui-stackbar-BHthy6jf.js +2070 -0
  158. package/dist/vue-ui-stackline-C6-WNpKD.js +2164 -0
  159. package/dist/vue-ui-strip-plot-CHu-1ilI.js +1183 -0
  160. package/dist/{vue-ui-table-BHuXI4Eq.js → vue-ui-table-DW9JGsLq.js} +6 -6
  161. package/dist/{vue-ui-table-heatmap-y88sBfu3.js → vue-ui-table-heatmap-LYqoBit9.js} +6 -6
  162. package/dist/{vue-ui-table-sparkline-ClpLLKi2.js → vue-ui-table-sparkline-CXK1dFr-.js} +5 -5
  163. package/dist/{vue-ui-thermometer-sjruUGQx.js → vue-ui-thermometer-BN8tflOz.js} +272 -256
  164. package/dist/{vue-ui-timer-CgdgMKIc.js → vue-ui-timer-DGT0UBOF.js} +6 -6
  165. package/dist/{vue-ui-tiremarks-UBDpAIVr.js → vue-ui-tiremarks-BZ-osQqY.js} +204 -191
  166. package/dist/vue-ui-treemap-98KaVRyd.js +1723 -0
  167. package/dist/vue-ui-waffle-Cb7oJnIc.js +1321 -0
  168. package/dist/vue-ui-wheel-sfew1fjw.js +738 -0
  169. package/dist/vue-ui-word-cloud-vq1t9JHr.js +1548 -0
  170. package/dist/{vue-ui-world-D-3wgoTn.js → vue-ui-world-CN0f6elD.js} +8 -8
  171. package/dist/vue-ui-xy-BdzEiImZ.js +3877 -0
  172. package/dist/vue-ui-xy-canvas-CWQzUQzY.js +1810 -0
  173. package/package.json +2 -2
  174. package/dist/ColorPicker-j0ySewhI.js +0 -244
  175. package/dist/Legend-1LMMsPxL.js +0 -90
  176. package/dist/vue-ui-3d-bar-BhNgFaJA.js +0 -1484
  177. package/dist/vue-ui-age-pyramid-CuYRf5v-.js +0 -997
  178. package/dist/vue-ui-bump-C_fKharc.js +0 -1059
  179. package/dist/vue-ui-candlestick-BY-_E7eZ.js +0 -1487
  180. package/dist/vue-ui-chestnut-C-bQYaNI.js +0 -1557
  181. package/dist/vue-ui-chord-uQYQgyGM.js +0 -1220
  182. package/dist/vue-ui-circle-pack-CdbDcuDw.js +0 -907
  183. package/dist/vue-ui-dag-DsHUvjvm.js +0 -2885
  184. package/dist/vue-ui-donut-CzCgCVsx.js +0 -2139
  185. package/dist/vue-ui-donut-evolution-C_ck_TOR.js +0 -1297
  186. package/dist/vue-ui-dumbbell-CVSA90b2.js +0 -1293
  187. package/dist/vue-ui-flow-CsbSaFnu.js +0 -1075
  188. package/dist/vue-ui-galaxy-DWKHDciu.js +0 -914
  189. package/dist/vue-ui-geo-DykhEWVq.js +0 -1331
  190. package/dist/vue-ui-heatmap-BEDirv8T.js +0 -1334
  191. package/dist/vue-ui-history-plot-Bs96PebH.js +0 -1292
  192. package/dist/vue-ui-horizontal-bar-ClQcB9nL.js +0 -1522
  193. package/dist/vue-ui-kpi-DlUEHKuw.js +0 -101
  194. package/dist/vue-ui-mood-radar-A2LBLgUi.js +0 -967
  195. package/dist/vue-ui-nested-donuts-DFX251aT.js +0 -1513
  196. package/dist/vue-ui-onion-CW0YO9Ro.js +0 -1045
  197. package/dist/vue-ui-parallel-coordinate-plot-UFg10bHP.js +0 -1134
  198. package/dist/vue-ui-quadrant-C1pLW2zA.js +0 -1647
  199. package/dist/vue-ui-quick-chart-FaxttnJY.js +0 -2030
  200. package/dist/vue-ui-radar-DE70LPBZ.js +0 -1067
  201. package/dist/vue-ui-relation-circle-iuRXIyRU.js +0 -704
  202. package/dist/vue-ui-ridgeline-CwvDh5pG.js +0 -1385
  203. package/dist/vue-ui-rings-80ZUki42.js +0 -1083
  204. package/dist/vue-ui-scatter-FdAAYJOK.js +0 -1670
  205. package/dist/vue-ui-spark-trend-C68p8-Xp.js +0 -349
  206. package/dist/vue-ui-sparkgauge-DdRtHQDe.js +0 -245
  207. package/dist/vue-ui-sparkhistogram-C9DvzQae.js +0 -396
  208. package/dist/vue-ui-sparkline-B2RDrdiR.js +0 -1273
  209. package/dist/vue-ui-sparkstackbar-BsIOHUE5.js +0 -475
  210. package/dist/vue-ui-stackbar-BZl0kEkb.js +0 -2001
  211. package/dist/vue-ui-stackline-2VKxwFei.js +0 -2099
  212. package/dist/vue-ui-strip-plot-B9nBSRyY.js +0 -1080
  213. package/dist/vue-ui-treemap-BS5EilZf.js +0 -1645
  214. package/dist/vue-ui-waffle-CbX5K9Q2.js +0 -1211
  215. package/dist/vue-ui-wheel-BIJ09H5D.js +0 -723
  216. package/dist/vue-ui-word-cloud-DJmJ-oYT.js +0 -1466
  217. package/dist/vue-ui-xy-canvas-4auyhlTr.js +0 -1717
  218. package/dist/vue-ui-xy-f67V1xjd.js +0 -3713
@@ -0,0 +1,3877 @@
1
+ import { defineAsyncComponent as Re, useSlots as Nu, getCurrentInstance as Fu, ref as g, shallowRef as Vu, computed as b, onMounted as It, toRefs as Bu, watch as vt, watchEffect as sl, nextTick as Pt, onBeforeUnmount as Il, openBlock as i, createElementBlock as r, normalizeStyle as w, normalizeClass as Je, createElementVNode as y, toDisplayString as ue, createBlock as _e, createCommentVNode as h, unref as v, withCtx as X, renderSlot as F, normalizeProps as ge, guardReactiveProps as be, createSlots as lo, createVNode as dt, Fragment as d, renderList as k, mergeProps as Qe, Teleport as Ru, resolveDynamicComponent as Hu, withDirectives as Du, vModelCheckbox as Wu, createTextVNode as ao } from "vue";
2
+ import { j as Pl, q as Ol, t as oo, n as Eu, D as uo, E as so, s as Nl, p as Fl, F as nl, G as W, H as Vl, I as Yu, J as Xu, K as O, L as no, c as io, M as ro, b as co, N as Gu, O as qu, P as Uu, Q as vo, R as ho, k as ve, S as Zu, T as fo, U as Ku, z as mo, A as Ie, l as Pe, v as je, u as Ce, V as Ju, a as Qu, W as He, d as il, Y as Se, Z as ju, _ as De, $ as Ot, m as es, o as go, a0 as ts, a1 as ls, a2 as ht, a3 as as } from "./lib-DBptbyyI.js";
3
+ import { u as bo, a as po, b as os } from "./useTimeLabels-C-A2uZKi.js";
4
+ import { u as us } from "./useConfig-DO94Aj5s.js";
5
+ import { u as ss } from "./usePrinter-CEpYU3r5.js";
6
+ import { u as ns, B as is } from "./BaseScanner-BhhkKVoj.js";
7
+ import { u as rs } from "./useSvgExport-ByUukOZt.js";
8
+ import { u as Nt } from "./useNestedProp-Bf5XFbs8.js";
9
+ import { u as cs } from "./useThemeCheck-D1ZYXUwG.js";
10
+ import { u as vs } from "./useStableElementSize-DCNs0Tx7.js";
11
+ import { u as ds } from "./useTimeLabelCollider-CIsgDrl9.js";
12
+ import hs from "./img-LXxMLmCg.js";
13
+ import fs from "./Title-BeMKE1cj.js";
14
+ import ms from "./vue_ui_xy-esktmpg-.js";
15
+ import { _ as rl } from "./Shape-BKRUOeKk.js";
16
+ import { S as gs } from "./SlicerPreview-DTjwV0iY.js";
17
+ import bs from "./vue-ui-accordion-nvggWcGN.js";
18
+ import { B as ps } from "./BaseLegendToggle-BQVIawmA.js";
19
+ import { A as ys } from "./A11yDataTable-KcVAX2cP.js";
20
+ import { _ as xs } from "./_plugin-vue_export-helper-CHgC5LLL.js";
21
+ const ks = ["id"], _s = ["id"], ws = ["id"], Ss = { style: { position: "relative" } }, $s = ["viewBox", "aria-label", "aria-describedby"], Ls = ["x", "y", "width", "height"], Ms = { key: 1 }, As = { class: "vue-ui-xy-grid" }, Cs = ["stroke", "x1", "x2", "y1", "y2"], Ts = ["stroke", "x1", "x2", "y1", "y2"], zs = { key: 1 }, Is = ["x1", "x2", "y1", "y2", "stroke"], Ps = ["x1", "x2", "y1", "y2", "stroke"], Os = ["x1", "x2", "y1", "y2", "stroke"], Ns = { key: 3 }, Fs = ["d", "stroke"], Vs = { key: 4 }, Bs = ["d", "stroke"], Rs = ["id"], Hs = ["stop-color"], Ds = ["stop-color"], Ws = ["stop-color"], Es = ["id"], Ys = ["stop-color"], Xs = ["stop-color"], Gs = ["stop-color"], qs = ["id"], Us = ["stop-color"], Zs = ["stop-color"], Ks = ["id"], Js = ["stop-color"], Qs = ["stop-color"], js = ["id"], en = ["stop-color"], tn = ["stop-color"], ln = { key: 0 }, an = ["id"], on = ["stop-color", "offset"], un = ["x", "y", "height", "width", "fill"], sn = ["x", "y", "width"], nn = { key: 0 }, rn = ["x", "y", "height", "width", "fill"], cn = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], vn = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], dn = ["width", "x", "y"], hn = ["stroke", "x1", "x2", "y1", "y2"], fn = { key: 3 }, mn = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], gn = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"], bn = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], pn = ["fill", "font-size", "transform"], yn = ["x1", "x2", "y1", "y2", "stroke"], xn = ["x", "y", "font-size", "fill"], kn = ["x1", "x2", "y1", "y2", "stroke"], _n = ["x", "y", "font-size", "fill"], wn = ["width", "x", "y"], Sn = { style: { width: "100%" } }, $n = ["d", "stroke", "stroke-width", "stroke-dasharray"], Ln = ["d", "stroke", "stroke-width", "stroke-dasharray"], Mn = { key: 6 }, An = { key: 7 }, Cn = ["d", "fill", "fill-opacity"], Tn = { key: 0 }, zn = ["d", "fill"], In = ["d", "fill"], Pn = ["d", "fill"], On = ["d", "fill"], Nn = ["d", "stroke", "stroke-width", "stroke-dasharray"], Fn = ["d", "stroke", "stroke-width", "stroke-dasharray"], Vn = ["d", "stroke", "stroke-width", "stroke-dasharray"], Bn = ["d", "stroke", "stroke-width", "stroke-dasharray"], Rn = ["width", "x", "y"], Hn = { style: { width: "100%" } }, Dn = { key: 8 }, Wn = ["x", "y", "font-size", "fill"], En = ["x", "y", "font-size", "fill", "font-weight"], Yn = { key: 9 }, Xn = ["x", "y", "font-size", "fill"], Gn = { key: 10 }, qn = ["x", "y"], Un = ["innerHTML"], Zn = ["x", "y"], Kn = ["innerHTML"], Jn = ["x1", "x2", "y1", "y2", "stroke"], Qn = { key: 11 }, jn = ["x", "y", "font-size", "fill"], ei = { key: 12 }, ti = ["x", "y"], li = ["innerHTML"], ai = ["x", "y"], oi = ["innerHTML"], ui = ["x1", "x2", "y1", "y2", "stroke"], si = ["x", "y", "font-size", "fill", "innerHTML"], ni = ["x", "y", "font-size", "fill", "innerHTML"], ii = ["x", "y", "font-size", "fill", "innerHTML"], ri = ["x", "y", "font-size", "fill", "innerHTML"], ci = { key: 0 }, vi = ["id"], di = ["fill", "stroke"], hi = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], fi = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], mi = ["x", "y", "font-size", "fill", "stroke"], gi = ["id"], bi = ["stop-color"], pi = ["stop-color"], yi = ["x", "y", "width", "height", "fill", "onMouseenter"], xi = ["font-size", "fill", "transform"], ki = ["x", "y", "font-size", "fill"], _i = ["text-anchor", "font-size", "fill", "transform", "onClick"], wi = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], Si = { key: 15 }, $i = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], Li = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], Mi = ["y", "x", "width", "height", "fill"], Ai = ["id", "x", "y", "font-size", "fill", "text-anchor"], Ci = {
22
+ key: 16,
23
+ style: { "pointer-events": "none" }
24
+ }, Ti = ["x", "y"], zi = ["innerHTML"], Ii = ["cx", "cy", "r", "fill"], Pi = ["data-start", "data-end"], Oi = {
25
+ key: 0,
26
+ style: { position: "absolute", top: "100%", left: "0", width: "100%" },
27
+ "data-dom-to-png-ignore": "",
28
+ "aria-hidden": "true"
29
+ }, Ni = {
30
+ key: 5,
31
+ class: "vue-data-ui-watermark"
32
+ }, Fi = {
33
+ class: "vue-ui-xy-tag-arrow",
34
+ height: "20",
35
+ viewBox: "0 0 10 20",
36
+ style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
37
+ }, Vi = ["fill"], Bi = ["innerHTML"], Ri = {
38
+ class: "vue-ui-xy-tag-arrow",
39
+ height: "100%",
40
+ viewBox: "0 0 10 20",
41
+ style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
42
+ }, Hi = ["fill"], Di = ["innerHTML"], Wi = {
43
+ class: "vue-ui-xy-tag-arrow",
44
+ height: "20",
45
+ viewBox: "0 0 10 20",
46
+ style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
47
+ }, Ei = ["fill"], Yi = ["innerHTML"], Xi = {
48
+ class: "vue-ui-xy-tag-arrow",
49
+ height: "100%",
50
+ viewBox: "0 0 10 20",
51
+ style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
52
+ }, Gi = ["fill"], qi = ["innerHTML"], Ui = ["id"], Zi = ["onClick", "onKeydown"], Ki = {
53
+ key: 0,
54
+ viewBox: "0 0 20 12",
55
+ height: "1em",
56
+ width: "1.43em",
57
+ "aria-hidden": "true"
58
+ }, Ji = ["stroke", "fill"], Qi = {
59
+ key: 1,
60
+ viewBox: "0 0 40 40",
61
+ height: "1em",
62
+ width: "1em",
63
+ "aria-hidden": "true"
64
+ }, ji = ["fill"], er = ["fill"], tr = {
65
+ key: 2,
66
+ viewBox: "0 0 12 12",
67
+ height: "1em",
68
+ width: "1em",
69
+ "aria-hidden": "true"
70
+ }, lr = {
71
+ style: { display: "flex", "flex-direction": "row", gap: "6px", "align-items": "center", "padding-left": "6px" },
72
+ "data-dom-to-png-ignore": ""
73
+ }, ar = ["innerHTML"], or = {
74
+ __name: "vue-ui-xy",
75
+ props: {
76
+ config: {
77
+ type: Object,
78
+ default() {
79
+ return {};
80
+ }
81
+ },
82
+ dataset: {
83
+ type: Array,
84
+ default() {
85
+ return [];
86
+ }
87
+ },
88
+ selectedXIndex: {
89
+ type: Number,
90
+ default: void 0
91
+ }
92
+ },
93
+ emits: ["selectTimeLabel", "selectX", "selectLegend", "zoomStart", "zoomEnd", "zoomReset", "copyAlt"],
94
+ setup(cl, { expose: yo, emit: xo }) {
95
+ const T = cl, ko = Re(() => import("./DataTable-DT2kIdQ6.js")), _o = Re(() => import("./Tooltip-Bf-kM3_A.js")), wo = Re(() => import("./UserOptions-rW2fRf3V.js")), Bl = Re(() => import("./BaseIcon-Cb3zzG6s.js")), So = Re(() => import("./vue-ui-table-sparkline-CXK1dFr-.js")), $o = Re(() => import("./PackageVersion-DPO-OOVI.js")), Lo = Re(() => import("./PenAndPaper-Ct3qJ4lA.js")), Mo = Re(() => import("./BaseDraggableDialog-CIb-iD9g.js")), We = xo, Rl = Nu(), Ao = Fu(), { vue_ui_xy: ft } = us(), { isThemeValid: Co, warnInvalidTheme: To } = cs(), $e = g(null), mt = g(null), Te = g(null), et = g(null), gt = g(null), bt = g(null), zo = g(null), vl = g(null), dl = g(null), Ft = g(null), hl = g(null), fl = g(null), Ne = g(null), ml = g(null), Io = g(0), C = g(null), Hl = g(!0), de = g(600), ee = g(1e3), Vt = g("0 0 1000 600"), Po = g({ x: 0, y: 0 }), pt = g({ line: "line", bar: "bar", plot: "plot" }), tt = g(!1), Ee = g(!1), Dl = g(!1), Ye = g(null), G = g([]), z = g(Pl()), Wl = g(0), El = g(0), Yl = g(0), yt = g(!0), gl = g(0), P = g(null), Xl = g(!1), bl = g(!0), Bt = g(!0), ae = g(null), Oe = g({}), Rt = g(null), Gl = g(!1), lt = g(null), Ht = g(!1), Dt = g(!1), _ = g(null), at = g(null), ql = g({ x: 0, y: 0 }), Ul = Vu(null), Zl = g(!1), Kl = g(0), Jl = g(0), Ql = vs({
96
+ elementRef: Ul,
97
+ minimumWidth: 2,
98
+ minimumHeight: 2,
99
+ stableFramesRequired: 2,
100
+ once: !1,
101
+ onSizeAccepted: () => {
102
+ ot();
103
+ }
104
+ });
105
+ function xt() {
106
+ Ul.value = $e.value?.parentNode ?? null;
107
+ }
108
+ function jl() {
109
+ return new Promise((l) => {
110
+ requestAnimationFrame(() => {
111
+ requestAnimationFrame(l);
112
+ });
113
+ });
114
+ }
115
+ async function ot() {
116
+ const l = ++Jl.value;
117
+ Zl.value = !1, await Pt(), await jl(), await jl(), l === Jl.value && (Kl.value += 1, Zl.value = !0);
118
+ }
119
+ const Oo = b(() => ({
120
+ height: de.value,
121
+ width: ee.value
122
+ }));
123
+ function ea(l) {
124
+ return Number.isFinite(l) ? Math.max(0, Math.floor(l)) : 0;
125
+ }
126
+ function pl(l, o, e = 0) {
127
+ return Number.isFinite(l) && Number.isFinite(o) && Math.abs(o) > 1e-9 ? l / o : e;
128
+ }
129
+ const ta = g(!1), x = g({
130
+ xAxis: 18,
131
+ yAxis: 12,
132
+ dataLabels: 20,
133
+ plotLabels: 10
134
+ }), Le = g({ plot: 3, line: 3 });
135
+ It(() => {
136
+ Gl.value = !0, T.dataset.length && T.dataset.forEach((l, o) => {
137
+ [null, void 0].includes(l.series) && Ol({
138
+ componentName: "VueUiXy",
139
+ type: "datasetSerieAttribute",
140
+ property: "series (number[])",
141
+ index: o,
142
+ debug: kt.value
143
+ });
144
+ }), xt(), Ql.start(), ot();
145
+ });
146
+ function yl() {
147
+ if (!Object.keys(T.config || {}).length)
148
+ return ft;
149
+ const l = Nt({
150
+ userConfig: T.config,
151
+ defaultConfig: ft
152
+ });
153
+ T.config && Ot(T.config, "chart.highlightArea") && (Array.isArray(T.config.chart.highlightArea) ? l.chart.highlightArea = T.config.chart.highlightArea : l.chart.highlightArea = [T.config.chart.highlightArea]), T.config && Ot(T.config, "chart.annotations") && Array.isArray(T.config.chart.annotations) && T.config.chart.annotations.length ? l.chart.annotations = T.config.chart.annotations.map((a) => Nt({
154
+ defaultConfig: ft.chart.annotations[0],
155
+ userConfig: a
156
+ })) : l.chart.annotations = [], T.config && Ot(T.config, "chart.grid.position") && T.config.chart.grid.position === "start" && T.dataset.length && T.dataset.some((a) => a.type === "bar") && (l.chart.grid.position = "middle", Ot(T.config, "debug") && console.warn("Vue Data UI - VueUiXy - config.chart.grid.position was overriden to `middle` because your dataset contains a bar")), T.config && Ot(T.config, "chart.highlightArea") && (Array.isArray(T.config.chart.highlightArea) ? l.chart.highlightArea = T.config.chart.highlightArea.map((a) => la({
157
+ defaultConfig: ft.chart.highlightArea,
158
+ userConfig: a
159
+ })) : l.chart.highlightArea = la({
160
+ defaultConfig: ft.chart.highlightArea,
161
+ userConfig: T.config.chart.highlightArea
162
+ }));
163
+ const o = l.theme;
164
+ if (!o) return l;
165
+ if (!Co.value(l))
166
+ return To(l), l;
167
+ const e = Nt({
168
+ userConfig: ms[o] || T.config,
169
+ defaultConfig: l
170
+ }), s = Nt({
171
+ userConfig: T.config,
172
+ defaultConfig: e
173
+ });
174
+ return {
175
+ ...s,
176
+ customPalette: s.customPalette.length ? s.customPalette : es[o] || Fl
177
+ };
178
+ }
179
+ function la({ defaultConfig: l, userConfig: o }) {
180
+ return Nt({
181
+ defaultConfig: l,
182
+ userConfig: o
183
+ });
184
+ }
185
+ const xl = b({
186
+ get() {
187
+ return !!T.dataset && T.dataset.length;
188
+ },
189
+ set(l) {
190
+ return l;
191
+ }
192
+ }), t = g(yl()), Xe = b(() => t.value.chart.userOptions.useCursorPointer), f = g({
193
+ dataLabels: { show: !0 },
194
+ showTooltip: !0,
195
+ showTable: !1,
196
+ isStacked: !1,
197
+ useIndividualScale: !1
198
+ });
199
+ function kl() {
200
+ ta.value ? (f.value.showTooltip = t.value.chart.tooltip.show === !0, f.value.showTable = t.value.showTable === !0, f.value.isStacked = t.value.chart.grid.labels.yAxis.stacked, f.value.useIndividualScale == null && (f.value.useIndividualScale = t.value.chart.grid.labels.yAxis.useIndividualScale)) : (f.value = {
201
+ dataLabels: { show: !0 },
202
+ showTooltip: t.value.chart.tooltip.show === !0,
203
+ showTable: t.value.showTable === !0,
204
+ isStacked: t.value.chart.grid.labels.yAxis.stacked,
205
+ useIndividualScale: t.value.chart.grid.labels.yAxis.useIndividualScale
206
+ }, ta.value = !0);
207
+ }
208
+ const kt = b(() => !!t.value.debug), No = b(() => oo({
209
+ defaultConfig: {
210
+ useCssAnimation: !1,
211
+ showTable: !1,
212
+ chart: {
213
+ annotations: [],
214
+ highlightArea: [],
215
+ backgroundColor: "#99999930",
216
+ grid: {
217
+ stroke: "#6A6A6A",
218
+ labels: {
219
+ show: !1,
220
+ axis: {
221
+ yLabel: "",
222
+ xLabel: ""
223
+ },
224
+ xAxisLabels: { show: !1 },
225
+ yAxis: {
226
+ commonScaleSteps: 10,
227
+ useNiceScale: !0,
228
+ scaleMin: 0,
229
+ scaleMax: 134
230
+ },
231
+ zeroLine: { show: !0 }
232
+ }
233
+ },
234
+ padding: {
235
+ top: 12,
236
+ bottom: 24,
237
+ left: 24,
238
+ right: 24
239
+ },
240
+ userOptions: { show: !1 },
241
+ zoom: {
242
+ show: !1,
243
+ startIndex: null,
244
+ endIndex: null
245
+ }
246
+ },
247
+ bar: {
248
+ serieName: { show: !1 },
249
+ labels: { show: !1 },
250
+ border: {
251
+ useSerieColor: !1,
252
+ stroke: "#999999"
253
+ }
254
+ },
255
+ line: {
256
+ dot: {
257
+ useSerieColor: !1,
258
+ fill: "#8A8A8A"
259
+ },
260
+ labels: { show: !1 }
261
+ }
262
+ },
263
+ userConfig: t.value.skeletonConfig ?? {}
264
+ })), Fo = b(() => T.config?.skeletonDataset ?? [
265
+ {
266
+ name: "",
267
+ series: [0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 134],
268
+ type: "line",
269
+ smooth: !0,
270
+ color: "#BABABA"
271
+ },
272
+ {
273
+ name: "",
274
+ series: [0, 0.5, 1, 1.5, 2.5, 4, 6.5, 10.5, 17, 27.5, 44.5, 67],
275
+ type: "bar",
276
+ color: "#CACACA"
277
+ }
278
+ ]), { loading: ne, FINAL_DATASET: pe, manualLoading: Wt } = ns({
279
+ ...Bu(T),
280
+ FINAL_CONFIG: t,
281
+ prepareConfig: yl,
282
+ callback: () => {
283
+ Promise.resolve().then(async () => {
284
+ await Jt(), f.value.showTable = t.value.showTable;
285
+ });
286
+ },
287
+ skeletonDataset: Fo.value,
288
+ skeletonConfig: oo({
289
+ defaultConfig: t.value,
290
+ userConfig: No.value
291
+ })
292
+ });
293
+ function Vo(l) {
294
+ const o = /* @__PURE__ */ new WeakMap();
295
+ return (e, ...s) => {
296
+ let a = o.get(e);
297
+ const n = JSON.stringify(s);
298
+ if (a && a.has(n)) return a.get(n);
299
+ const u = l(e, ...s);
300
+ return a || (a = /* @__PURE__ */ new Map(), o.set(e, a)), a.set(n, u), u;
301
+ };
302
+ }
303
+ const Bo = Vo((l, o) => Vl({ data: l, threshold: o })), Fe = (l) => Bo(l, t.value.downsample.threshold), ze = b({
304
+ get: () => Math.max(...pe.value.map((l) => Fe(l.series).length)),
305
+ set: (l) => l
306
+ }), m = g({ start: 0, end: ze.value }), Me = g({ start: 0, end: ze.value }), aa = b(() => t.value.chart.zoom.preview.enable && (Me.value.start !== m.value.start || Me.value.end !== m.value.end));
307
+ function oa(l, o) {
308
+ Me.value[l] = o;
309
+ }
310
+ function ut() {
311
+ const l = Math.max(
312
+ 1,
313
+ ...pe.value.map((s) => Fe(s.series).length)
314
+ );
315
+ let o = Math.max(0, Math.min(m.value.start ?? 0, l - 1)), e = Math.max(o + 1, Math.min(m.value.end ?? l, l));
316
+ (!Number.isFinite(o) || !Number.isFinite(e) || e <= o) && (o = 0, e = l), m.value = { start: o, end: e }, Me.value.start = o, Me.value.end = e, Te.value && (Te.value.setStartValue(o), Te.value.setEndValue(e));
317
+ }
318
+ const Ro = b(() => {
319
+ const { left: l, top: o, width: e, height: s } = c.value, a = m.value.start, u = m.value.end - a, S = e / u, M = Me.value.start - a, I = Me.value.end - a, V = Math.max(0, Math.min(u, M)), D = Math.max(0, Math.min(u, I));
320
+ return {
321
+ x: l + V * S,
322
+ y: o,
323
+ width: (D - V) * S,
324
+ height: s,
325
+ fill: t.value.chart.zoom.preview.fill,
326
+ stroke: t.value.chart.zoom.preview.stroke,
327
+ "stroke-width": t.value.chart.zoom.preview.strokeWidth,
328
+ "stroke-dasharray": t.value.chart.zoom.preview.strokeDasharray,
329
+ "stroke-linecap": "round",
330
+ "stroke-linejoin": "round",
331
+ style: {
332
+ pointerEvents: "none",
333
+ transition: "none !important",
334
+ animation: "none !important"
335
+ }
336
+ };
337
+ });
338
+ vt(() => T.selectedXIndex, (l) => {
339
+ if ([null, void 0].includes(T.selectedXIndex)) {
340
+ _.value = null;
341
+ return;
342
+ }
343
+ const o = l - m.value.start;
344
+ o < 0 || l >= m.value.end ? _.value = null : _.value = o ?? null;
345
+ }, { immediate: !0 });
346
+ const { isPrinting: Et, isImaging: _l, generatePdf: ua, generateImage: sa } = ss({
347
+ elementId: `vue-ui-xy_${z.value}`,
348
+ fileName: t.value.chart.title.text || "vue-ui-xy",
349
+ options: t.value.chart.userOptions.print
350
+ }), Ho = g(!1), Yt = b(() => Eu(t.value.customPalette)), st = b(() => {
351
+ const l = t.value.chart.grid.labels.yAxis.scaleMin;
352
+ if (l == null) return null;
353
+ const o = Number(l);
354
+ return Number.isFinite(o) ? o : null;
355
+ }), Do = b(() => st.value !== null ? c.value.bottom : he.value), _t = b(() => {
356
+ const l = t.value.chart.grid.labels.yAxis.scaleMax;
357
+ if (l == null) return null;
358
+ const o = Number(l);
359
+ return Number.isFinite(o) ? o : null;
360
+ }), na = b(() => st.value !== null || _t.value !== null), ia = b(() => {
361
+ const l = Ve.value.filter((o) => !G.value.includes(o.id)).flatMap((o) => Array.isArray(o.series) ? o.series : []).filter(Number.isFinite);
362
+ return l.length ? {
363
+ min: Math.min(...l),
364
+ max: Math.max(...l)
365
+ } : { min: 0, max: 1 };
366
+ });
367
+ function ra(l, o) {
368
+ let e = Number.isFinite(l) ? l : 0, s = Number.isFinite(o) ? o : 1;
369
+ return e === s ? s = e + 1 : e > s && ([e, s] = [s, e]), { min: e, max: s };
370
+ }
371
+ const Xt = b(() => {
372
+ const { min: l, max: o } = ia.value;
373
+ if (!na.value) {
374
+ const u = l;
375
+ return u > 0 ? 0 : u;
376
+ }
377
+ const e = st.value !== null ? st.value : l > 0 ? 0 : l, s = _t.value !== null ? _t.value : o, a = l < e ? l : e, n = o > s ? o : s;
378
+ return ra(a, n).min;
379
+ }), Gt = b(() => {
380
+ const { min: l, max: o } = ia.value;
381
+ if (!na.value) {
382
+ const u = o;
383
+ return Xt.value === u ? u + 1 : u;
384
+ }
385
+ const e = st.value !== null ? st.value : l > 0 ? 0 : l, s = _t.value !== null ? _t.value : o, a = l < e ? l : e, n = o > s ? o : s;
386
+ return ra(a, n).max;
387
+ }), Ae = b(() => t.value.chart.grid.labels.yAxis.useNiceScale ? uo(Xt.value, Gt.value < 0 ? 0 : Gt.value, t.value.chart.grid.labels.yAxis.commonScaleSteps) : so(Xt.value, Gt.value < 0 ? 0 : Gt.value, t.value.chart.grid.labels.yAxis.commonScaleSteps)), wt = b(() => [null, void 0].includes(t.value.chart.grid.labels.yAxis.scaleMin) ? Ae.value.min >= 0 ? 0 : Math.abs(Ae.value.min) : -Ae.value.min), Ve = b(() => Hl.value ? pe.value.map((l, o) => {
388
+ const e = Fe(l.series), s = `uniqueId_${o}`;
389
+ return {
390
+ ...l,
391
+ slotAbsoluteIndex: o,
392
+ series: e.map((a) => nl(a) ? a : null).slice(m.value.start, m.value.end),
393
+ color: Nl(l.color ? l.color : Yt.value[o] ? Yt.value[o] : Fl[o]),
394
+ id: s,
395
+ scaleLabel: l.scaleLabel || s
396
+ };
397
+ }) : pe.value), ie = b(() => Ve.value.map((l, o) => ({
398
+ absoluteIndex: o,
399
+ ...l,
400
+ series: l.series.map((e) => e + wt.value),
401
+ absoluteValues: l.series,
402
+ segregate: () => Mt(l),
403
+ isSegregated: G.value.includes(l.id)
404
+ }))), ye = b(() => Ve.value.map((l, o) => ({
405
+ ...l,
406
+ series: l.series.map((e) => e + wt.value),
407
+ absoluteValues: l.series
408
+ })).filter((l) => !G.value.includes(l.id))), Wo = b(() => G.value.length === ie.value.length);
409
+ function Eo() {
410
+ let l = 0;
411
+ hl.value && (l = Array.from(hl.value.querySelectorAll("text")).reduce((a, n) => {
412
+ const u = n.getComputedTextLength();
413
+ return (u > a ? u : a) + t.value.chart.grid.labels.yAxis.scaleValueOffsetX;
414
+ }, 0));
415
+ const o = dl.value ? dl.value.getBoundingClientRect().width + t.value.chart.grid.labels.axis.yLabelOffsetX + x.value.yAxis : 0, e = t.value.chart.grid.labels.yAxis.crosshairSize;
416
+ return l + o + e;
417
+ }
418
+ const St = g(0), nt = g(0);
419
+ function ca() {
420
+ const l = Ft.value;
421
+ if (!l) {
422
+ St.value = 0, nt.value = 0;
423
+ return;
424
+ }
425
+ try {
426
+ const o = l.getBBox();
427
+ St.value = o?.height ?? 0, nt.value = o?.x ?? 0;
428
+ } catch {
429
+ St.value = 0, nt.value = 0;
430
+ }
431
+ }
432
+ const va = b(() => {
433
+ let l = 0;
434
+ if (vl.value)
435
+ try {
436
+ l = vl.value.getBBox().height || 0;
437
+ } catch {
438
+ l = 0;
439
+ }
440
+ return l + St.value + x.value.xAxis;
441
+ }), Yo = b(() => pe.value.some((l) => l.useProgression)), c = b(() => {
442
+ Kl.value;
443
+ let l = 0;
444
+ const o = 36;
445
+ t.value.chart.grid.labels.show && (f.value.useIndividualScale && !f.value.isStacked ? l = (pe.value.length - G.value.length) * (t.value.chart.grid.labels.yAxis.labelWidth + o) : f.value.useIndividualScale && f.value.isStacked ? l = t.value.chart.grid.labels.yAxis.labelWidth + o : l = Eo());
446
+ const e = t.value.chart.labels.fontSize * 1.1, s = Yo.value ? 24 : 6;
447
+ Ft.value && nt.value < 0 && (l += Math.abs(nt.value));
448
+ const a = ee.value - l - t.value.chart.grid.labels.yAxis.crosshairSize - s - t.value.chart.padding?.left - t.value.chart.padding?.right, n = t.value.chart.grid.position === "middle" ? 0 : a / $.value / 2;
449
+ return {
450
+ top: t.value.chart.padding?.top + e,
451
+ right: ee.value - s - t.value.chart.padding?.right,
452
+ bottom: de.value - va.value - t.value.chart.padding?.bottom - t.value.chart.grid.labels.axis.xLabelOffsetY,
453
+ left: l + t.value.chart.grid.labels.yAxis.crosshairSize - n + t.value.chart.padding?.left,
454
+ height: de.value - va.value - t.value.chart.padding?.top - t.value.chart.padding?.bottom - e - t.value.chart.grid.labels.axis.xLabelOffsetY,
455
+ width: a,
456
+ scaleLabelX: l,
457
+ individualOffsetX: o
458
+ };
459
+ }), Xo = b(() => {
460
+ const l = t.value.chart.grid.position === "middle" ? 1 : 0, o = $.value + l, e = W(c.value?.top), s = W(c.value?.bottom);
461
+ return Array.from({ length: o }).map((a, n) => {
462
+ const u = c.value.width / $.value * n + c.value?.left + q.value;
463
+ return `M${u},${e} L${u},${s}`;
464
+ }).join(" ");
465
+ }), Go = b(() => {
466
+ if (!t.value.chart.grid.labels.xAxis.showCrosshairs) return "";
467
+ const l = c.value.width / $.value, o = t.value.chart.grid.labels.xAxis.crosshairSize, e = t.value.chart.grid.labels.xAxis.crosshairsAlwaysAtZero;
468
+ return Kt.value.map((s, a) => {
469
+ if (!s || !s.text) return null;
470
+ const n = c.value?.left + l * a + l / 2, u = e ? he.value - (he.value === c.value?.bottom ? 0 : o / 2) : c.value?.bottom, S = e ? he.value + o / (he.value === c.value?.bottom ? 1 : 2) : c.value?.bottom + o;
471
+ return `M${n},${u} L${n},${S}`;
472
+ }).filter(Boolean).join(" ");
473
+ });
474
+ function da() {
475
+ return !!Ao?.vnode.props?.onSelectTimeLabel;
476
+ }
477
+ function qo(l, o, e) {
478
+ if (!Rt.value) {
479
+ const s = document.createElement("canvas");
480
+ Rt.value = s.getContext("2d");
481
+ }
482
+ return Rt.value.font = `normal ${l}px sans-serif`, Rt.value;
483
+ }
484
+ function ha() {
485
+ const l = $e.value.querySelectorAll(".vue-ui-xy-tag");
486
+ l.length && Array.from(l).forEach((o) => o.style.opacity = "0");
487
+ }
488
+ function qt(l, o, e, s, a) {
489
+ e && (Oe.value[`${l}_${o}_${s}_${a}`] = e);
490
+ }
491
+ const Ut = g(!1);
492
+ async function fa(l = !1) {
493
+ await Pt(), Ut.value = l, Xl.value && (Bt.value = l);
494
+ }
495
+ function wl() {
496
+ tt.value = !tt.value;
497
+ }
498
+ const se = g([]), Zt = g([]);
499
+ let ma = 0;
500
+ sl(() => {
501
+ const l = ++ma;
502
+ (async () => {
503
+ const o = Math.max(
504
+ ...pe.value.map(
505
+ (s) => Vl({
506
+ data: s.series,
507
+ threshold: t.value.downsample.threshold
508
+ }).length
509
+ )
510
+ ), e = await bo({
511
+ values: t.value.chart.grid.labels.xAxisLabels.values,
512
+ maxDatapoints: o,
513
+ formatter: t.value.chart.grid.labels.xAxisLabels.datetimeFormatter,
514
+ start: m.value.start,
515
+ end: m.value.end
516
+ });
517
+ l === ma && (se.value = e);
518
+ })();
519
+ });
520
+ let ga = 0;
521
+ sl(() => {
522
+ const l = ++ga;
523
+ (async () => {
524
+ const o = Math.max(
525
+ ...pe.value.map(
526
+ (s) => Vl({
527
+ data: s.series,
528
+ threshold: t.value.downsample.threshold
529
+ }).length
530
+ )
531
+ ), e = await bo({
532
+ values: t.value.chart.grid.labels.xAxisLabels.values,
533
+ maxDatapoints: o,
534
+ formatter: t.value.chart.grid.labels.xAxisLabels.datetimeFormatter,
535
+ start: 0,
536
+ end: ze.value
537
+ });
538
+ l === ga && (Zt.value = e);
539
+ })();
540
+ });
541
+ const Uo = b(() => {
542
+ const l = t.value.chart.grid.labels.xAxisLabels.modulo;
543
+ return se.value.length ? Math.min(l, [...new Set(se.value.map((o) => o.text))].length) : l;
544
+ }), Kt = b(() => {
545
+ const l = t.value.chart.grid.labels.xAxisLabels, o = se.value || [], e = Zt.value || [], s = m.value.start ?? 0, a = _.value, n = $.value, u = o.map((M) => M?.text ?? ""), S = e.map((M) => M?.text ?? "");
546
+ return Yu(
547
+ !!l.showOnlyFirstAndLast,
548
+ !!l.showOnlyAtModulo,
549
+ Math.max(1, Uo.value || 1),
550
+ u,
551
+ S,
552
+ s,
553
+ a,
554
+ n
555
+ );
556
+ }), Zo = b(() => (Kt.value || []).map((l) => l?.text ?? "").join("|"));
557
+ It(() => {
558
+ requestAnimationFrame(() => {
559
+ ca();
560
+ }), vt(
561
+ [
562
+ () => Zo.value,
563
+ () => t.value.chart.grid.labels.xAxisLabels.rotation,
564
+ () => x.value.xAxis,
565
+ () => ee.value,
566
+ () => de.value
567
+ ],
568
+ async () => {
569
+ await Pt(), requestAnimationFrame(() => {
570
+ ca();
571
+ });
572
+ },
573
+ { flush: "post" }
574
+ );
575
+ }), Il(() => {
576
+ St.value = 0, nt.value = 0, Ql.stop();
577
+ });
578
+ function ba(l, o) {
579
+ const e = ye.value.map((s) => ({
580
+ shape: s.shape || null,
581
+ name: s.name,
582
+ color: s.color,
583
+ type: s.type,
584
+ value: s.absoluteValues.find((a, n) => n === o),
585
+ comments: s.comments || [],
586
+ prefix: s.prefix || t.value.chart.labels.prefix,
587
+ suffix: s.suffix || t.value.chart.labels.suffix
588
+ }));
589
+ We("selectTimeLabel", {
590
+ datapoint: e,
591
+ absoluteIndex: l.absoluteIndex,
592
+ label: l.text
593
+ });
594
+ }
595
+ const $ = b(() => {
596
+ const l = ea((m.value.end ?? 0) - (m.value.start ?? 0));
597
+ return Math.max(1, l);
598
+ });
599
+ function Ko(l) {
600
+ P.value = l;
601
+ }
602
+ function pa() {
603
+ f.value.isStacked = !f.value.isStacked, f.value.isStacked ? f.value.useIndividualScale = !0 : f.value.useIndividualScale = t.value.chart.grid.labels.yAxis.useIndividualScale;
604
+ }
605
+ function Sl(l) {
606
+ kt.value && l.autoScaling && (t.value.chart.grid.labels.yAxis.useIndividualScale || console.warn(`VueUiXy (datapoint: ${l.name}) : autoScaling only works when config.chart.grid.labels.yAxis.useIndividualScale is set to true`), t.value.chart.grid.labels.yAxis.stacked || console.warn(`VueUiXy (datapoint: ${l.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`));
607
+ }
608
+ function Jo(l, o) {
609
+ const e = ea(l), s = Array(e).fill(0);
610
+ for (let a = 0; a < o.length && a < e; a += 1) s[a] = o[a] ?? 0;
611
+ return s;
612
+ }
613
+ function ya(l) {
614
+ const o = Math.max(...pe.value.map((e) => Fe(e.series).length));
615
+ return l > o ? o : l < 0 || t.value.chart.zoom.startIndex !== null && l < t.value.chart.zoom.startIndex ? t.value.chart.zoom.startIndex !== null ? t.value.chart.zoom.startIndex + 1 : 1 : l;
616
+ }
617
+ const $t = g(!1), xa = g(!1), ka = g(0), _a = g(0);
618
+ function wa(l, o) {
619
+ const e = Number(l), s = Number(o);
620
+ return !Number.isFinite(e) || !Number.isFinite(s) ? !1 : !Object.is(e, s);
621
+ }
622
+ function Jt() {
623
+ if (!$t.value) {
624
+ $t.value = !0;
625
+ try {
626
+ const { startIndex: l, endIndex: o } = t.value.chart.zoom, e = Math.max(...pe.value.map((n) => Fe(n.series).length));
627
+ ka.value = 0, _a.value = e;
628
+ const s = l ?? 0, a = o != null ? Math.min(ya(o + 1), e) : e;
629
+ Qt.value = !0, m.value.start = s, m.value.end = a, Me.value.start = s, Me.value.end = a, ut(), xa.value = !0;
630
+ } finally {
631
+ queueMicrotask(() => {
632
+ Qt.value = !1;
633
+ }), $t.value = !1;
634
+ }
635
+ }
636
+ }
637
+ const Qt = g(!1);
638
+ function Qo(l) {
639
+ if ($t.value || Qt.value) return;
640
+ const o = Number(l);
641
+ We("zoomStart", {
642
+ index: o,
643
+ isZoom: wa(o, ka.value)
644
+ }), Number.isFinite(o) && o !== m.value.start && (m.value.start = o, Me.value.start = o, ut());
645
+ }
646
+ function jo(l) {
647
+ if ($t.value || Qt.value) return;
648
+ const o = ya(l);
649
+ We("zoomEnd", {
650
+ index: o,
651
+ isZoom: wa(o, _a.value)
652
+ }), o !== m.value.end && (m.value.end = o, Me.value.end = o, ut());
653
+ }
654
+ async function eu() {
655
+ await Jt(), We("zoomReset");
656
+ }
657
+ function xe(l) {
658
+ return ![null, void 0, NaN, 1 / 0, -1 / 0].includes(l);
659
+ }
660
+ const Sa = b(() => Ae.value.max + wt.value);
661
+ function Ge(l) {
662
+ return l / (xe(Sa.value) ? Sa.value : 1);
663
+ }
664
+ const he = b(() => isNaN(Ge(wt.value)) ? c.value?.bottom : c.value?.bottom - c.value.height * Ge(wt.value));
665
+ function $a(l) {
666
+ const o = ![null, void 0].includes(t.value.chart.grid.labels.yAxis.scaleMin) && t.value.chart.grid.labels.yAxis.scaleMin > 0 && Xt.value >= 0 ? c.value?.bottom : he.value;
667
+ return l.value >= 0 ? O(o - l.y <= 0 ? 1e-5 : o - l.y) : O(l.y - he.value <= 0 ? 1e-5 : l.y - he.value);
668
+ }
669
+ function La(l) {
670
+ return l.value >= 0 ? O(l.zeroPosition - l.y <= 0 ? 1e-5 : l.zeroPosition - l.y) : O(l.y - l.zeroPosition <= 0 ? 1e-5 : l.zeroPosition - l.y);
671
+ }
672
+ const J = b(() => {
673
+ const l = Math.max(1, $.value), o = Math.max(1, c.value.width), e = Math.max(1, Ve.value.filter((s) => s.type === "bar" && !G.value.includes(s.id)).length);
674
+ return {
675
+ bar: pl(o, l * e, 1),
676
+ plot: pl(o, l, 1),
677
+ line: pl(o, l, 1)
678
+ };
679
+ });
680
+ function Be() {
681
+ return f.value.useIndividualScale && f.value.isStacked ? J.value.line - c.value.width / $.value * 0.1 : J.value.bar;
682
+ }
683
+ function jt(l) {
684
+ return f.value.useIndividualScale && f.value.isStacked ? l.x + c.value.width / $.value * 0.05 : l.x + J.value.bar / 2;
685
+ }
686
+ function Ma(l) {
687
+ return l.value >= 0 ? l.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(he.value) ? c?.bottom.value : he.value;
688
+ }
689
+ function Aa(l) {
690
+ return l.value >= 0 ? l.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(l.zeroPosition) ? 0 : l.zeroPosition;
691
+ }
692
+ const it = g(null);
693
+ function Ca(l) {
694
+ const o = ae.value;
695
+ if (!o) return null;
696
+ if (o.createSVGPoint && o.getScreenCTM) {
697
+ const D = o.createSVGPoint();
698
+ D.x = l.clientX, D.y = l.clientY;
699
+ const N = o.getScreenCTM();
700
+ if (N) {
701
+ const p = D.matrixTransform(N.inverse());
702
+ return { x: p.x, y: p.y, ok: !0 };
703
+ }
704
+ }
705
+ const e = o.getBoundingClientRect(), s = o.viewBox?.baseVal || { x: 0, y: 0, width: e.width, height: e.height }, a = Math.min(e.width / s.width, e.height / s.height), n = s.width * a, u = s.height * a, S = (e.width - n) / 2, M = (e.height - u) / 2, I = (l.clientX - e?.left - S) / a + s.x, V = (l.clientY - e?.top - M) / a + s.y;
706
+ return { x: I, y: V, ok: !0 };
707
+ }
708
+ let qe = 0;
709
+ function tu(l) {
710
+ at.value = null, !tt.value && (qe && cancelAnimationFrame(qe), qe = requestAnimationFrame(() => {
711
+ qe = 0;
712
+ const o = Ca(l);
713
+ if (!o || !ae.value) {
714
+ Lt();
715
+ return;
716
+ }
717
+ const { left: e, right: s, top: a, bottom: n, width: u } = c.value;
718
+ if (o.x < e || o.x > s || o.y < a || o.y > n) {
719
+ Lt();
720
+ return;
721
+ }
722
+ const S = o.x - e, M = u / $.value, I = Math.floor(S / M);
723
+ I >= 0 && I < $.value ? it.value !== I && (it.value = I, Ml(!0, I)) : Lt();
724
+ }));
725
+ }
726
+ function Lt() {
727
+ qe && (cancelAnimationFrame(qe), qe = 0), it.value = null, Ml(!1, null);
728
+ }
729
+ function Ta(l) {
730
+ const o = Ca(l);
731
+ if (o && ae.value) {
732
+ const { left: e, right: s, top: a, bottom: n, width: u } = c.value;
733
+ if (o.x >= e && o.x <= s && o.y >= a && o.y <= n) {
734
+ const S = u / Math.max(1, $.value), M = Math.floor((o.x - e) / S);
735
+ if (M >= 0 && M < $.value) {
736
+ za(M);
737
+ return;
738
+ }
739
+ }
740
+ }
741
+ it.value != null && za(it.value);
742
+ }
743
+ function za(l) {
744
+ const o = ye.value.map((e) => ({
745
+ name: e.name,
746
+ value: [null, void 0, NaN].includes(e.absoluteValues[l]) ? null : e.absoluteValues[l],
747
+ color: e.color,
748
+ type: e.type
749
+ }));
750
+ We(
751
+ "selectX",
752
+ {
753
+ dataset: o,
754
+ index: l,
755
+ indexLabel: t.value.chart.grid.labels.xAxisLabels.values[l]
756
+ }
757
+ ), t.value.events.datapointClick && t.value.events.datapointClick({ datapoint: o, seriesIndex: l + m.value.start });
758
+ }
759
+ function lu() {
760
+ return ie.value.map((l) => ({
761
+ values: l.absoluteValues,
762
+ color: l.color,
763
+ name: l.name,
764
+ type: l.type
765
+ }));
766
+ }
767
+ async function au({ scale: l = 2 } = {}) {
768
+ if (!$e.value) return;
769
+ const { width: o, height: e } = $e.value.getBoundingClientRect(), s = o / e, { imageUri: a, base64: n } = await hs({ domElement: $e.value, base64: !0, img: !0, scale: l });
770
+ return {
771
+ imageUri: a,
772
+ base64: n,
773
+ title: t.value.chart.title.text,
774
+ width: o,
775
+ height: e,
776
+ aspectRatio: s
777
+ };
778
+ }
779
+ function ou() {
780
+ G.value.length ? G.value = [] : ie.value.forEach((l) => {
781
+ G.value.push(l.id);
782
+ });
783
+ }
784
+ function uu(l, o) {
785
+ (l.key === "Enter" || l.key === " ") && (l.preventDefault(), Mt(o));
786
+ }
787
+ function Mt(l) {
788
+ if (G.value.includes(l.id))
789
+ G.value = G.value.filter((o) => o !== l.id);
790
+ else {
791
+ if (G.value.length + 1 === Ve.value.length) return;
792
+ G.value.push(l.id);
793
+ }
794
+ We("selectLegend", ye.value.map((o) => ({
795
+ name: o.name,
796
+ values: o.absoluteValues,
797
+ color: o.color,
798
+ type: o.type
799
+ }))), gl.value += 1;
800
+ }
801
+ function Ia(l) {
802
+ if (!ie.value.length)
803
+ return t.value.debug && console.warn("VueUiXy - There are no series to show."), null;
804
+ const o = ie.value.find((e) => e.name === l);
805
+ return o || (t.value.debug && console.warn(`VueUiXy - Series name not found "${l}"`), null);
806
+ }
807
+ function su(l) {
808
+ const o = Ia(l);
809
+ o !== null && G.value.includes(o.id) && Mt({ id: o.id });
810
+ }
811
+ function nu(l) {
812
+ const o = Ia(l);
813
+ o !== null && (G.value.includes(o.id) || Mt({ id: o.id }));
814
+ }
815
+ const iu = b(() => {
816
+ const l = t.value.chart.title.text || "Chart visualization", o = t.value.chart.title.subtitle.text || "";
817
+ return `${l}. ${o}`;
818
+ }), Pa = b(() => ({
819
+ linePlot: $.value > t.value.line.dot.hideAboveMaxSerieLength
820
+ })), ru = b(() => t.value.chart.userOptions.show && (!t.value.chart.title.show || !t.value.chart.title.text)), cu = b(() => {
821
+ if (Array.isArray(t.value.chart.highlightArea))
822
+ return t.value.chart.highlightArea.map((o) => {
823
+ const e = Math.min(o.to, ze.value - 1);
824
+ return {
825
+ ...o,
826
+ span: o.from === e ? 1 : e < o.from ? 0 : e - o.from + 1
827
+ };
828
+ });
829
+ const l = {
830
+ ...t.value.chart.highlightArea,
831
+ to: Math.min(t.value.chart.highlightArea.to, ze.value - 1)
832
+ };
833
+ return [{ ...l, span: l.from === l.to ? 1 : l.to < l.from ? 0 : l.to - l.from + 1 }];
834
+ }), Oa = b(() => Hl.value ? pe.value.map((l, o) => ({
835
+ ...l,
836
+ series: Fe(l.series),
837
+ id: `uniqueId_${o}`,
838
+ color: Nl(l.color ? l.color : Yt.value[o] ? Yt.value[o] : Fl[o])
839
+ })) : pe.value), vu = b(() => ye.value.map((l) => {
840
+ const o = l.absoluteValues.map((e) => [void 0, null].includes(e) ? 0 : e);
841
+ return {
842
+ id: l.id,
843
+ name: l.name,
844
+ color: l.color,
845
+ values: Jo($.value, o)
846
+ };
847
+ })), du = b(() => ({
848
+ responsiveBreakpoint: t.value.table.responsiveBreakpoint,
849
+ roundingValues: t.value.table.rounding,
850
+ showAverage: !1,
851
+ showMedian: !1,
852
+ showTotal: !1,
853
+ fontFamily: t.value.chart.fontFamily,
854
+ prefix: t.value.chart.labels.prefix,
855
+ suffix: t.value.chart.labels.suffix,
856
+ colNames: se.value.map((l, o) => t.value.table.useDefaultTimeFormat ? l.text : rt.value(o + m.value.start, t.value.table.timeFormat)),
857
+ thead: {
858
+ backgroundColor: t.value.table.th.backgroundColor,
859
+ color: t.value.table.th.color,
860
+ outline: t.value.table.th.outline
861
+ },
862
+ tbody: {
863
+ backgroundColor: t.value.table.td.backgroundColor,
864
+ color: t.value.table.td.color,
865
+ outline: t.value.table.td.outline
866
+ },
867
+ userOptions: {
868
+ show: !1
869
+ },
870
+ sparkline: {
871
+ animation: { show: !1 }
872
+ }
873
+ })), q = b(() => t.value.chart.grid.position === "middle" ? 0 : c.value.width / $.value / 2), Ue = b(() => Xu(ie.value.filter((l) => !G.value.includes(l.id))));
874
+ function hu(l, o) {
875
+ const e = /* @__PURE__ */ Object.create(null);
876
+ for (let s = 0; s < l.length; s += 1) {
877
+ const a = l[s], n = String(o(a));
878
+ e[n] || (e[n] = []), e[n].push(a);
879
+ }
880
+ return e;
881
+ }
882
+ const L = b(() => {
883
+ const l = hu(Ue.value, (e) => e.scaleLabel), o = {};
884
+ for (const [e, s] of Object.entries(l)) {
885
+ const a = s.flatMap((n) => n.absoluteValues);
886
+ o[e] = {
887
+ min: Math.min(...a) || 0,
888
+ max: Math.max(...a) || 1,
889
+ groupId: `scale_group_${Pl()}`
890
+ };
891
+ }
892
+ return o;
893
+ }), fu = b(() => {
894
+ const l = Ve.value.filter((o) => o.type === "bar").filter((o) => !G.value.includes(o.id)).length;
895
+ return c.value.width / $.value / l - el.value * l;
896
+ }), el = b(() => J.value.line * t.value.bar.periodGap), tl = b(() => Math.max(1e-5, Be() - (f.value.useIndividualScale && f.value.isStacked ? 0 : el.value))), ll = b(() => tl.value * Math.min(Math.abs(t.value.bar.innerGap), 0.95)), mu = b(() => {
897
+ if (!t.value.chart.zoom.minimap.show) return [];
898
+ const l = Oa.value.filter((a) => !G.value.includes(a.id)), o = Math.max(...l.map((a) => a.series.length)), e = [];
899
+ for (let a = 0; a < o; a += 1)
900
+ e.push(l.map((n) => n.series[a] || 0).reduce((n, u) => (n || 0) + (u || 0), 0));
901
+ const s = Math.min(...e);
902
+ return e.map((a) => a + (s < 0 ? Math.abs(s) : 0));
903
+ }), gu = b(() => t.value.chart.zoom.minimap.show ? Oa.value.map((o) => ({
904
+ ...o,
905
+ isVisible: !G.value.includes(o.id)
906
+ })) : []), Ze = b(() => ye.value.map((l) => ({
907
+ slotAbsoluteIndex: l.slotAbsoluteIndex,
908
+ shape: l.shape || null,
909
+ name: l.name,
910
+ color: l.color,
911
+ type: l.type,
912
+ value: l.absoluteValues.find((o, e) => e === _.value),
913
+ comments: l.comments || [],
914
+ prefix: l.prefix || t.value.chart.labels.prefix,
915
+ suffix: l.suffix || t.value.chart.labels.suffix
916
+ }))), Na = b(() => Ae.value.ticks.map((l) => ({
917
+ y: l >= 0 ? he.value - c.value.height * Ge(l) : he.value + c.value.height * Ge(Math.abs(l)),
918
+ value: l,
919
+ prefix: t.value.chart.labels.prefix,
920
+ suffix: t.value.chart.labels.suffix
921
+ }))), Fa = b(() => {
922
+ const l = t.value.chart.annotations;
923
+ if (!l || !Array.isArray(l) || l.every((V) => !V.show)) return [];
924
+ const o = l.filter(
925
+ (V) => V.show && (V.yAxis.yTop != null || V.yAxis.yBottom != null)
926
+ );
927
+ if (!o.length) return [];
928
+ const { left: e, right: s } = c.value, a = he.value, n = c.value.height, u = Ae.value.min, M = Ae.value.max - u, I = (V) => {
929
+ const D = (V - 0) / M;
930
+ return a - D * n;
931
+ };
932
+ return o.map((V) => {
933
+ const { yAxis: { yTop: D, yBottom: N, label: p } } = V, te = D != null && N != null && D !== N, B = D == null ? null : I(D), Q = N == null ? null : I(N), Y = qo(p.fontSize);
934
+ Y.font = `${p.fontSize}px sans-serif`;
935
+ const H = Y.measureText(p.text).width, U = p.fontSize, j = (p.position === "start" ? e + p.padding?.left : s - p.padding?.right) + p.offsetX, we = (B != null && Q != null ? Math.min(B, Q) : B ?? Q) - p.fontSize / 3 + p.offsetY - p.padding?.top;
936
+ let Z;
937
+ p.textAnchor === "middle" ? Z = j - H / 2 - p.padding?.left : p.textAnchor === "end" ? Z = j - H - p.padding?.right : Z = j - p.padding?.left;
938
+ const me = we - U * 0.75 - p.padding?.top;
939
+ return {
940
+ show: ![B, Q, me].includes(NaN),
941
+ id: `annotation_y_${Pl()}`,
942
+ hasArea: te,
943
+ areaHeight: te ? Math.abs(B - Q) : 0,
944
+ yTop: B,
945
+ yBottom: Q,
946
+ config: V.yAxis,
947
+ x1: e,
948
+ x2: s,
949
+ _text: { x: j, y: we },
950
+ _box: {
951
+ x: Z,
952
+ y: me,
953
+ width: H + p.padding?.left + p.padding?.right,
954
+ height: U + p.padding?.top + p.padding?.bottom,
955
+ fill: p.backgroundColor,
956
+ stroke: p.border.stroke,
957
+ rx: p.border.rx,
958
+ ry: p.border.ry,
959
+ strokeWidth: p.border.strokeWidth
960
+ }
961
+ };
962
+ });
963
+ });
964
+ function Va(l, o) {
965
+ const e = l[o - 1], s = l[o + 1];
966
+ let a = !!e && !!s && e.value == null && s.value == null || !e && !!s && s.value == null || !!e && !s && e.value == null;
967
+ return xe(l[o].value) && a && t.value.line.cutNullValues;
968
+ }
969
+ function $l({
970
+ datapoint: l,
971
+ totalSeries: o,
972
+ gap: e,
973
+ usableHeight: s,
974
+ autoScaleValueMin: a,
975
+ autoScaleValueMax: n,
976
+ individualExtremes: u,
977
+ forceExactScale: S = !1
978
+ }) {
979
+ const M = l.scaleSteps || t.value.chart.grid.labels.yAxis.commonScaleSteps, I = 1.0000001, V = S || !t.value.chart.grid.labels.yAxis.useNiceScale ? so : uo, D = u.max === u.min ? u.max * I : u.max, N = n === a ? n * I : n, p = V(
980
+ u.min,
981
+ D,
982
+ M
983
+ ), te = V(
984
+ a,
985
+ N,
986
+ M
987
+ ), B = p.min >= 0 ? 0 : Math.abs(p.min), Q = 0, Y = p.max + Math.abs(B), H = te.max + Math.abs(Q), U = l.stackIndex, j = o - 1 - U, K = f.value.isStacked ? 1 - l.cumulatedStackRatio : 0, we = f.value.isStacked ? s * K + e * j : 0, Z = f.value.isStacked ? s * l.stackRatio : c.value.height, me = c.value?.bottom - we - Z * B / Y, E = c.value?.bottom - we - Z * Q / H;
988
+ return {
989
+ scaleSteps: M,
990
+ individualScale: p,
991
+ autoScaleSteps: te,
992
+ individualZero: B,
993
+ autoScaleZero: Q,
994
+ individualMax: Y,
995
+ autoScaleMax: H,
996
+ yOffset: we,
997
+ individualHeight: Z,
998
+ zeroPosition: me,
999
+ autoScaleZeroPosition: E
1000
+ };
1001
+ }
1002
+ const ke = b(() => {
1003
+ const l = Ue.value.filter((u) => ["bar", "line", "plot"].includes(u.type)), o = l.length, e = t.value.chart.grid.labels.yAxis.gap, a = f.value.isStacked ? e * (o - 1) : 0, n = c.value.height - a;
1004
+ return l.filter((u) => u.type === "bar").map((u, S) => {
1005
+ Sl(u);
1006
+ const M = L.value[u.scaleLabel].min, I = L.value[u.scaleLabel].max;
1007
+ u.absoluteValues.filter((R) => ![null, void 0].includes(R)).map((R) => (R - M) / (I - M));
1008
+ const V = {
1009
+ valueMin: M,
1010
+ valueMax: I < 0 ? 0 : I
1011
+ }, D = {
1012
+ max: u.scaleMax || Math.max(...u.absoluteValues) || 1,
1013
+ min: u.scaleMin || Math.min(...u.absoluteValues.filter((R) => ![void 0, null].includes(R))) > 0 ? 0 : Math.min(...u.absoluteValues.filter((R) => ![null, void 0].includes(R)))
1014
+ }, {
1015
+ individualScale: N,
1016
+ autoScaleSteps: p,
1017
+ individualZero: te,
1018
+ individualMax: B,
1019
+ autoScaleMax: Q,
1020
+ yOffset: Y,
1021
+ individualHeight: H,
1022
+ zeroPosition: U,
1023
+ autoScaleZeroPosition: j
1024
+ } = $l({
1025
+ datapoint: u,
1026
+ totalSeries: o,
1027
+ gap: e,
1028
+ usableHeight: n,
1029
+ autoScaleValueMin: V.valueMin,
1030
+ autoScaleValueMax: V.valueMax,
1031
+ individualExtremes: D
1032
+ }), K = ie.value.filter((R) => R.type === "bar").filter((R) => !G.value.includes(R.id)).length, we = u.series.map((R, re) => {
1033
+ const Tt = f.value.useIndividualScale ? (u.absoluteValues[re] + te) / B : Ge(R), Ke = f.value.useIndividualScale && f.value.isStacked ? c.value?.left + c.value.width / $.value * re : c.value?.left + J.value.bar * S + J.value.bar * re * K - fu.value / 2 - S * el.value;
1034
+ return {
1035
+ yOffset: O(Y),
1036
+ individualHeight: O(H),
1037
+ x: O(Ke),
1038
+ y: c.value?.bottom - Y - H * Tt,
1039
+ value: u.absoluteValues[re],
1040
+ zeroPosition: O(U),
1041
+ individualMax: O(B),
1042
+ comment: u.comments && u.comments.slice(m.value.start, m.value.end)[re] || ""
1043
+ };
1044
+ }), Z = u.absoluteValues.map((R) => p.min >= 0 ? (R - Math.abs(p.min)) / (p.max - Math.abs(p.min)) : (R + Math.abs(p.min)) / (p.max + Math.abs(p.min))), me = u.series.map((R, re) => {
1045
+ const Tt = f.value.useIndividualScale && f.value.isStacked ? c.value?.left + c.value.width / $.value * re : c.value?.left - J.value.bar / 2 + J.value.bar * S + J.value.bar * re * ie.value.filter((Ke) => Ke.type === "bar").filter((Ke) => !G.value.includes(Ke.id)).length;
1046
+ return {
1047
+ yOffset: O(Y),
1048
+ individualHeight: O(H),
1049
+ x: O(Tt),
1050
+ y: O(c.value?.bottom - O(Y) - (O(H) * Z[re] || 0)),
1051
+ value: u.absoluteValues[re],
1052
+ zeroPosition: O(U),
1053
+ individualMax: O(B),
1054
+ comment: u.comments && u.comments.slice(m.value.start, m.value.end)[re] || ""
1055
+ };
1056
+ }), E = N.ticks.map((R) => ({
1057
+ y: R >= 0 ? U - H * (R / B) : U + H * Math.abs(R) / B,
1058
+ value: R,
1059
+ prefix: u.prefix || t.value.chart.labels.prefix,
1060
+ suffix: u.suffix || t.value.chart.labels.suffix,
1061
+ datapoint: u
1062
+ })), le = p.ticks.map((R) => {
1063
+ const re = (R - p.min) / (p.max - p.min);
1064
+ return {
1065
+ y: R >= 0 ? j - H * re : j + H * re,
1066
+ value: R,
1067
+ prefix: u.prefix || t.value.chart.labels.prefix,
1068
+ suffix: u.suffix || t.value.chart.labels.suffix,
1069
+ datapoint: u
1070
+ };
1071
+ });
1072
+ return L.value[u.scaleLabel].name = u.name, L.value[u.scaleLabel].groupName = u.scaleLabel, L.value[u.scaleLabel].groupColor = t.value.chart.grid.labels.yAxis.groupColor || u.color, L.value[u.scaleLabel].color = u.color, L.value[u.scaleLabel].scaleYLabels = u.autoScaling ? le : E, L.value[u.scaleLabel].zeroPosition = u.autoScaling ? j : U, L.value[u.scaleLabel].individualMax = u.autoScaling ? Q : B, L.value[u.scaleLabel].scaleLabel = u.scaleLabel, L.value[u.scaleLabel].id = u.id, L.value[u.scaleLabel].yOffset = Y, L.value[u.scaleLabel].individualHeight = H, L.value[u.scaleLabel].autoScaleYLabels = le, L.value[u.scaleLabel].unique = Ue.value.filter((R) => R.scaleLabel === u.scaleLabel).length === 1, {
1073
+ ...u,
1074
+ yOffset: Y,
1075
+ autoScaleYLabels: le,
1076
+ individualHeight: H,
1077
+ scaleYLabels: u.autoScaling ? le : E,
1078
+ individualScale: u.autoScaling ? p : N,
1079
+ individualMax: u.autoScaling ? Q : B,
1080
+ zeroPosition: u.autoScaling ? j : U,
1081
+ plots: u.autoScaling ? me : we,
1082
+ groupId: L.value[u.scaleLabel].groupId
1083
+ };
1084
+ });
1085
+ }), oe = b(() => {
1086
+ const l = Ue.value.filter((u) => ["bar", "line", "plot"].includes(u.type)), o = l.length, e = t.value.chart.grid.labels.yAxis.gap, a = f.value.isStacked ? e * (o - 1) : 0, n = c.value.height - a;
1087
+ return l.filter((u) => u.type === "line").map((u, S) => {
1088
+ Sl(u);
1089
+ const M = L.value[u.scaleLabel].min, I = L.value[u.scaleLabel].max;
1090
+ u.absoluteValues.filter((A) => ![null, void 0].includes(A)).map((A) => (A - M) / (I - M));
1091
+ const V = {
1092
+ valueMin: M,
1093
+ valueMax: I
1094
+ }, D = {
1095
+ max: u.scaleMax || Math.max(...u.absoluteValues) || 1,
1096
+ min: u.scaleMin || (Math.min(...u.absoluteValues) > 0 ? 0 : Math.min(...u.absoluteValues))
1097
+ }, {
1098
+ individualScale: N,
1099
+ autoScaleSteps: p,
1100
+ individualZero: te,
1101
+ individualMax: B,
1102
+ autoScaleMax: Q,
1103
+ yOffset: Y,
1104
+ individualHeight: H,
1105
+ zeroPosition: U,
1106
+ autoScaleZeroPosition: j
1107
+ } = $l({
1108
+ datapoint: u,
1109
+ totalSeries: o,
1110
+ gap: e,
1111
+ usableHeight: n,
1112
+ autoScaleValueMin: V.valueMin,
1113
+ autoScaleValueMax: V.valueMax,
1114
+ individualExtremes: D
1115
+ }), K = u.series.map((A, ce) => {
1116
+ const Ou = f.value.useIndividualScale ? (u.absoluteValues[ce] + Math.abs(te)) / B : Ge(A);
1117
+ return {
1118
+ x: O(c.value?.left + J.value.line / 2 + J.value.line * ce),
1119
+ y: O(c.value?.bottom - Y - H * Ou),
1120
+ value: u.absoluteValues[ce],
1121
+ comment: u.comments && u.comments.slice(m.value.start, m.value.end)[ce] || ""
1122
+ };
1123
+ }), we = u.absoluteValues.map((A) => p.min >= 0 ? (A - Math.abs(p.min)) / (p.max - Math.abs(p.min)) : (A + Math.abs(p.min)) / (p.max + Math.abs(p.min))), Z = u.series.map((A, ce) => [void 0, null].includes(u.absoluteValues[ce]) ? {
1124
+ x: O(c.value?.left + J.value.line / 2 + J.value.line * ce),
1125
+ y: U,
1126
+ value: u.absoluteValues[ce],
1127
+ comment: u.comments && u.comments.slice(m.value.start, m.value.end)[ce] || ""
1128
+ } : {
1129
+ x: O(c.value?.left + J.value.line / 2 + J.value.line * ce),
1130
+ y: O(c.value?.bottom - Y - (H * we[ce] || 0)),
1131
+ value: u.absoluteValues[ce],
1132
+ comment: u.comments && u.comments.slice(m.value.start, m.value.end)[ce] || ""
1133
+ }), me = u.dashIndices && Array.isArray(u.dashIndices) && u?.dashIndices?.length > 0, E = t.value.line.cutNullValues ? no(K) : io(K.filter((A) => A.value !== null)), le = t.value.line.cutNullValues ? no(Z) : io(Z.filter((A) => A.value !== null)), R = t.value.line.cutNullValues ? ro(K) : co(K.filter((A) => A.value !== null)), re = t.value.line.cutNullValues ? ro(Z) : co(Z.filter((A) => A.value !== null)), Tt = me ? Gu(t.value.line.cutNullValues ? K : K.filter((A) => A.value !== null), u.dashIndices.map((A) => A - m.value.start)) : [], Ke = me ? qu(t.value.line.cutNullValues ? K : K.filter((A) => A.value !== null), u.dashIndices.map((A) => A - m.value.start)) : [], ol = N.ticks.map((A) => ({
1134
+ y: A >= 0 ? U - H * (A / B) : U + H * Math.abs(A) / B,
1135
+ value: A,
1136
+ prefix: u.prefix || t.value.chart.labels.prefix,
1137
+ suffix: u.suffix || t.value.chart.labels.suffix,
1138
+ datapoint: u
1139
+ })), ul = p.ticks.map((A) => {
1140
+ const ce = (A - p.min) / (p.max - p.min);
1141
+ return {
1142
+ y: A >= 0 ? j - H * ce : j + H * ce,
1143
+ value: A,
1144
+ prefix: u.prefix || t.value.chart.labels.prefix,
1145
+ suffix: u.suffix || t.value.chart.labels.suffix,
1146
+ datapoint: u
1147
+ };
1148
+ });
1149
+ L.value[u.scaleLabel].name = u.name, L.value[u.scaleLabel].groupName = u.scaleLabel, L.value[u.scaleLabel].groupColor = t.value.chart.grid.labels.yAxis.groupColor || u.color, L.value[u.scaleLabel].color = u.color, L.value[u.scaleLabel].scaleYLabels = u.autoScaling ? ul : ol, L.value[u.scaleLabel].zeroPosition = u.autoScaling ? j : U, L.value[u.scaleLabel].individualMax = u.autoScaling ? Q : B, L.value[u.scaleLabel].scaleLabel = u.scaleLabel, L.value[u.scaleLabel].id = u.id, L.value[u.scaleLabel].yOffset = Y, L.value[u.scaleLabel].individualHeight = H, L.value[u.scaleLabel].autoScaleYLabels = ul, L.value[u.scaleLabel].unique = Ue.value.filter((A) => A.scaleLabel === u.scaleLabel).length === 1;
1150
+ const Pu = f.value.useIndividualScale ? u.autoScaling ? j : U : Do.value, zt = Math.max(
1151
+ Math.max(
1152
+ u.autoScaling ? j : ol.at(-1) ? ol.at(-1).y : 0,
1153
+ c.value?.top
1154
+ ),
1155
+ Pu
1156
+ );
1157
+ return {
1158
+ ...u,
1159
+ temperatureColors: u.temperatureColors ? u.temperatureColors.map((A) => Nl(A)) : null,
1160
+ yOffset: Y,
1161
+ autoScaleYLabels: ul,
1162
+ individualHeight: H,
1163
+ scaleYLabels: u.autoScaling ? ul : ol,
1164
+ individualScale: u.autoScaling ? p : N,
1165
+ individualMax: u.autoScaling ? Q : B,
1166
+ zeroPosition: u.autoScaling ? j : U,
1167
+ curve: u.autoScaling ? le : E,
1168
+ plots: u.autoScaling ? Z : K,
1169
+ dashedStraight: Tt,
1170
+ dashedSmooth: Ke,
1171
+ hasDashedSegments: me,
1172
+ area: u.useArea ? f.value.useIndividualScale ? t.value.line.cutNullValues ? vo(
1173
+ u.autoScaling ? Z : K,
1174
+ zt
1175
+ ) : ho(
1176
+ u.autoScaling ? Z.filter((A) => A.value !== null) : K.filter((A) => A.value !== null),
1177
+ zt
1178
+ ) : t.value.line.cutNullValues ? vo(K, zt) : ho(K.filter((A) => A.value !== null), zt) : "",
1179
+ curveAreas: u.useArea ? Uu(
1180
+ u.autoScaling ? t.value.line.cutNullValues ? Z : Z.filter((A) => A.value !== null) : t.value.line.cutNullValues ? K : K.filter((A) => A.value !== null),
1181
+ zt,
1182
+ t.value.line.cutNullValues
1183
+ ) : [],
1184
+ straight: u.autoScaling ? re : R,
1185
+ groupId: L.value[u.scaleLabel].groupId
1186
+ };
1187
+ });
1188
+ }), fe = b(() => {
1189
+ const l = Ue.value.filter((u) => ["bar", "line", "plot"].includes(u.type)), o = l.length, e = t.value.chart.grid.labels.yAxis.gap, a = f.value.isStacked ? e * (o - 1) : 0, n = c.value.height - a;
1190
+ return l.filter((u) => u.type === "plot").map((u) => {
1191
+ Sl(u);
1192
+ const S = L.value[u.scaleLabel].min, M = L.value[u.scaleLabel].max;
1193
+ u.absoluteValues.filter((E) => ![null, void 0].includes(E)).map((E) => (E - S) / (M - S));
1194
+ const I = {
1195
+ valueMin: S,
1196
+ valueMax: M
1197
+ }, V = {
1198
+ max: u.scaleMax || Math.max(...u.absoluteValues) || 1,
1199
+ min: u.scaleMin || Math.min(...u.absoluteValues) > 0 ? 0 : Math.min(...u.absoluteValues)
1200
+ }, {
1201
+ individualScale: D,
1202
+ autoScaleSteps: N,
1203
+ individualZero: p,
1204
+ individualMax: te,
1205
+ autoScaleMax: B,
1206
+ yOffset: Q,
1207
+ individualHeight: Y,
1208
+ zeroPosition: H,
1209
+ autoScaleZeroPosition: U
1210
+ } = $l({
1211
+ datapoint: u,
1212
+ totalSeries: o,
1213
+ gap: e,
1214
+ usableHeight: n,
1215
+ autoScaleValueMin: I.valueMin,
1216
+ autoScaleValueMax: I.valueMax,
1217
+ individualExtremes: V,
1218
+ forceExactScale: !0
1219
+ }), j = u.series.map((E, le) => {
1220
+ const R = f.value.useIndividualScale ? (u.absoluteValues[le] + Math.abs(p)) / te : Ge(E);
1221
+ return {
1222
+ x: O(c.value?.left + J.value.plot / 2 + J.value.plot * le),
1223
+ y: O(c.value?.bottom - Q - Y * R),
1224
+ value: u.absoluteValues[le],
1225
+ comment: u.comments && u.comments.slice(m.value.start, m.value.end)[le] || ""
1226
+ };
1227
+ }), K = u.absoluteValues.map((E) => N.min >= 0 ? (E - Math.abs(N.min)) / (N.max - Math.abs(N.min)) : (E + Math.abs(N.min)) / (N.max + Math.abs(N.min))), we = u.series.map((E, le) => ({
1228
+ x: O(c.value?.left + J.value.plot / 2 + J.value.plot * le),
1229
+ y: O(c.value?.bottom - Q - (Y * K[le] || 0)),
1230
+ value: u.absoluteValues[le],
1231
+ comment: u.comments && u.comments.slice(m.value.start, m.value.end)[le] || ""
1232
+ })), Z = D.ticks.map((E) => ({
1233
+ y: E >= 0 ? H - Y * (E / te) : H + Y * Math.abs(E) / te,
1234
+ value: E,
1235
+ prefix: u.prefix || t.value.chart.labels.prefix,
1236
+ suffix: u.suffix || t.value.chart.labels.suffix,
1237
+ datapoint: u
1238
+ })), me = N.ticks.map((E) => {
1239
+ const le = (E - N.min) / (N.max - N.min);
1240
+ return {
1241
+ y: E >= 0 ? U - Y * le : U + Y * le,
1242
+ value: E,
1243
+ prefix: u.prefix || t.value.chart.labels.prefix,
1244
+ suffix: u.suffix || t.value.chart.labels.suffix,
1245
+ datapoint: u
1246
+ };
1247
+ });
1248
+ return L.value[u.scaleLabel].name = u.name, L.value[u.scaleLabel].groupName = u.scaleLabel, L.value[u.scaleLabel].groupColor = t.value.chart.grid.labels.yAxis.groupColor || u.color, L.value[u.scaleLabel].color = u.color, L.value[u.scaleLabel].scaleYLabels = u.autoScaling ? me : Z, L.value[u.scaleLabel].zeroPosition = u.autoScaling ? U : H, L.value[u.scaleLabel].individualMax = u.autoScaling ? B : te, L.value[u.scaleLabel].scaleLabel = u.scaleLabel, L.value[u.scaleLabel].id = u.id, L.value[u.scaleLabel].yOffset = Q, L.value[u.scaleLabel].individualHeight = Y, L.value[u.scaleLabel].autoScaleYLabels = me, L.value[u.scaleLabel].unique = Ue.value.filter((E) => E.scaleLabel === u.scaleLabel).length === 1, {
1249
+ ...u,
1250
+ yOffset: Q,
1251
+ autoScaleYLabels: me,
1252
+ individualHeight: Y,
1253
+ scaleYLabels: u.autoScaling ? me : Z,
1254
+ individualScale: u.autoScaling ? N : D,
1255
+ individualMax: u.autoScaling ? B : te,
1256
+ zeroPosition: u.autoScaling ? U : H,
1257
+ plots: u.autoScaling ? we : j,
1258
+ groupId: L.value[u.scaleLabel].groupId
1259
+ };
1260
+ });
1261
+ }), At = b(() => {
1262
+ const l = oe.value.map((n) => ({
1263
+ name: n.name,
1264
+ color: n.color,
1265
+ scale: n.individualScale,
1266
+ scaleYLabels: n.scaleYLabels,
1267
+ zero: n.zeroPosition,
1268
+ max: n.individualMax,
1269
+ scaleLabel: n.scaleLabel || "",
1270
+ id: n.id,
1271
+ yOffset: n.yOffset || 0,
1272
+ individualHeight: n.individualHeight || c.value.height,
1273
+ autoScaleYLabels: n.autoScaleYLabels
1274
+ })), o = ke.value.map((n) => ({
1275
+ name: n.name,
1276
+ color: n.color,
1277
+ scale: n.individualScale,
1278
+ scaleYLabels: n.scaleYLabels,
1279
+ zero: n.zeroPosition,
1280
+ max: n.individualMax,
1281
+ scaleLabel: n.scaleLabel || "",
1282
+ id: n.id,
1283
+ yOffset: n.yOffset || 0,
1284
+ individualHeight: n.individualHeight || c.value.height
1285
+ })), e = fe.value.map((n) => ({
1286
+ name: n.name,
1287
+ color: n.color,
1288
+ scale: n.individualScale,
1289
+ scaleYLabels: n.scaleYLabels,
1290
+ // FIX
1291
+ zero: n.zeroPosition,
1292
+ max: n.individualMax,
1293
+ scaleLabel: n.scaleLabel || "",
1294
+ id: n.id,
1295
+ yOffset: n.yOffset || 0,
1296
+ individualHeight: n.individualHeight || c.value.height
1297
+ })), s = f.value.useIndividualScale && !f.value.isStacked ? Object.values(L.value) : [...l, ...o, ...e], a = s.flatMap((n) => n).length;
1298
+ return s.flatMap((n, u) => {
1299
+ let S = 0;
1300
+ S = f.value.isStacked ? c.value?.left : c.value?.left / a * (u + 1);
1301
+ const M = f.value.useIndividualScale && !f.value.isStacked ? n.unique ? n.name : n.groupName : n.name;
1302
+ return {
1303
+ unique: n.unique,
1304
+ id: n.id,
1305
+ groupId: n.groupId,
1306
+ scaleLabel: n.scaleLabel,
1307
+ name: ve(
1308
+ t.value.chart.grid.labels.yAxis.serieNameFormatter,
1309
+ M,
1310
+ M,
1311
+ n
1312
+ ),
1313
+ color: f.value.useIndividualScale && !f.value.isStacked ? n.unique ? n.color : n.groupColor : n.color,
1314
+ scale: n.scale,
1315
+ yOffset: n.yOffset,
1316
+ individualHeight: n.individualHeight,
1317
+ x: S,
1318
+ yLabels: n.scaleYLabels || n.scale.ticks.map((I) => ({
1319
+ y: I >= 0 ? n.zero - n.individualHeight * (I / n.max) : n.zero + n.individualHeight * Math.abs(I) / n.max,
1320
+ value: I
1321
+ }))
1322
+ };
1323
+ });
1324
+ }), Ba = b(() => {
1325
+ const l = t.value.line.interLine || {}, o = l.pairs || [], e = l.colors || [];
1326
+ if (!o.length) return [];
1327
+ const s = [];
1328
+ return o.forEach((a, n) => {
1329
+ const [u, S] = Array.isArray(a) ? a : [a.a, a.b];
1330
+ if (!u || !S) return;
1331
+ const M = oe.value.find((p) => p.name === u), I = oe.value.find((p) => p.name === S);
1332
+ if (!M || !I || M.type !== "line" || I.type !== "line") return;
1333
+ const V = e?.[n]?.[0] ?? M.color, D = e?.[n]?.[1] ?? I.color;
1334
+ Zu({
1335
+ lineA: M.plots,
1336
+ lineB: I.plots,
1337
+ smoothA: !!M.smooth,
1338
+ smoothB: !!I.smooth,
1339
+ colorLineA: V,
1340
+ colorLineB: D,
1341
+ sampleStepPx: 2,
1342
+ cutNullValues: t.value.line.cutNullValues
1343
+ }).forEach((p, te) => {
1344
+ s.push({ ...p, key: `inter_${u}_${S}_${n}_${te}` });
1345
+ });
1346
+ }), s;
1347
+ }), Ra = b(() => ({
1348
+ datapoint: Ze.value,
1349
+ seriesIndex: _.value,
1350
+ series: ie.value,
1351
+ bars: ke.value,
1352
+ lines: oe.value,
1353
+ plots: fe.value,
1354
+ config: t.value
1355
+ })), Ha = g({ months: [], shortMonths: [], days: [], shortDays: [] });
1356
+ let Da = 0;
1357
+ sl(() => {
1358
+ const l = ++Da, o = t.value.chart.grid.labels.xAxisLabels.datetimeFormatter;
1359
+ (async () => {
1360
+ const e = await po(o.locale).catch(() => po("en"));
1361
+ l === Da && (Ha.value = e.data);
1362
+ })();
1363
+ });
1364
+ const rt = b(() => {
1365
+ const l = t.value.chart.grid.labels.xAxisLabels.datetimeFormatter, o = os({
1366
+ useUTC: l.useUTC,
1367
+ locale: Ha.value,
1368
+ januaryAsYear: l.januaryAsYear
1369
+ });
1370
+ return (e, s) => {
1371
+ const n = t.value.chart.grid.labels.xAxisLabels.values?.[e];
1372
+ return n == null ? "" : o.formatDate(new Date(n), s);
1373
+ };
1374
+ }), Wa = b(() => (t.value.chart.grid.labels.xAxisLabels.values || []).map((o, e) => ({
1375
+ text: rt.value(e, t.value.chart.zoom.timeFormat),
1376
+ absoluteIndex: e
1377
+ }))), bu = b(() => {
1378
+ let l = "", o = Ze.value.map((a) => a.value).filter((a) => nl(a) && a !== null).reduce((a, n) => Math.abs(a) + Math.abs(n), 0);
1379
+ const e = se.value[_.value], s = t.value.chart.tooltip.customFormat;
1380
+ if (fo(s) && Ku(() => s({
1381
+ absoluteIndex: _.value + m.value.start,
1382
+ seriesIndex: _.value,
1383
+ datapoint: Ze.value,
1384
+ series: ie.value,
1385
+ bars: ke.value,
1386
+ lines: oe.value,
1387
+ plots: fe.value,
1388
+ config: t.value,
1389
+ dateLabel: e
1390
+ })))
1391
+ return s({
1392
+ absoluteIndex: _.value + m.value.start,
1393
+ seriesIndex: _.value,
1394
+ datapoint: Ze.value,
1395
+ series: ie.value,
1396
+ bars: ke.value,
1397
+ lines: oe.value,
1398
+ plots: fe.value,
1399
+ config: t.value,
1400
+ dateLabel: e
1401
+ });
1402
+ if (e && e.text && t.value.chart.tooltip.showTimeLabel) {
1403
+ const a = rt.value(_.value + m.value.start, t.value.chart.tooltip.timeFormat);
1404
+ l += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${t.value.chart.tooltip.borderColor}; width:100%">${t.value.chart.grid.labels.xAxisLabels.datetimeFormatter.enable && !t.value.chart.tooltip.useDefaultTimeFormat ? a : e.text}</div>`;
1405
+ }
1406
+ return Ze.value.forEach((a) => {
1407
+ if (nl(a.value)) {
1408
+ let n = "", u = "";
1409
+ switch (pt.value[a.type]) {
1410
+ case "bar":
1411
+ n = `<svg viewBox="0 0 40 40" height="14" width="14">${Rl.pattern ? `<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${a.color}" />` : ""}<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${Rl.pattern ? `url(#pattern_${z.value}_${a.slotAbsoluteIndex}` : a.color}" /></svg>`;
1412
+ break;
1413
+ case "line":
1414
+ !a.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(a.shape) ? u = `<circle cx="10" cy="8" r="4" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${a.color}" />` : a.shape === "triangle" ? u = `<path d="${Ie({ plot: { x: 10, y: 8 }, radius: 4, sides: 3, rotation: 0.52 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "square" ? u = `<path d="${Ie({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0.8 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "diamond" ? u = `<path d="${Ie({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "pentagon" ? u = `<path d="${Ie({ plot: { x: 10, y: 8 }, radius: 4, sides: 5, rotation: 0.95 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "hexagon" ? u = `<path d="${Ie({ plot: { x: 10, y: 8 }, radius: 4, sides: 6, rotation: 0 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "star" && (u = `<polygon stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${a.color}" points="${mo({ plot: { x: 10, y: 8 }, radius: 4 })}" />`), n = `<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="1.5" x="0" y="6.5" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" height="3" width="20" fill="${a.color}" />${u}</svg>`;
1415
+ break;
1416
+ case "plot":
1417
+ if (!a.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(a.shape)) {
1418
+ n = `<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" /></svg>`;
1419
+ break;
1420
+ }
1421
+ if (a.shape === "star") {
1422
+ n = `<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" points="${mo({ plot: { x: 6, y: 6 }, radius: 5 })}" /></svg>`;
1423
+ break;
1424
+ }
1425
+ if (a.shape === "triangle") {
1426
+ n = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Ie({ plot: { x: 6, y: 6 }, radius: 6, sides: 3, rotation: 0.52 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
1427
+ break;
1428
+ }
1429
+ if (a.shape === "square") {
1430
+ n = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Ie({ plot: { x: 6, y: 6 }, radius: 6, sides: 4, rotation: 0.8 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
1431
+ break;
1432
+ }
1433
+ if (a.shape === "diamond") {
1434
+ n = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Ie({ plot: { x: 6, y: 6 }, radius: 5, sides: 4, rotation: 0 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
1435
+ break;
1436
+ }
1437
+ if (a.shape === "pentagon") {
1438
+ n = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Ie({ plot: { x: 6, y: 6 }, radius: 5, sides: 5, rotation: 0.95 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
1439
+ break;
1440
+ }
1441
+ if (a.shape === "hexagon") {
1442
+ n = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Ie({ plot: { x: 6, y: 6 }, radius: 5, sides: 6, rotation: 0 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
1443
+ break;
1444
+ }
1445
+ }
1446
+ l += `<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${n}</div> ${a.name}: <b>${t.value.chart.tooltip.showValue ? ve(
1447
+ a.type === "line" ? t.value.line.labels.formatter : a.type === "bar" ? t.value.bar.labels.formatter : t.value.plot.labels.formatter,
1448
+ a.value,
1449
+ Pe({
1450
+ p: a.prefix,
1451
+ v: a.value,
1452
+ s: a.suffix,
1453
+ r: t.value.chart.tooltip.roundingValue
1454
+ }),
1455
+ { datapoint: a }
1456
+ ) : ""}</b> ${t.value.chart.tooltip.showPercentage ? `(${Pe({
1457
+ v: O(Math.abs(a.value) / o * 100),
1458
+ s: "%",
1459
+ r: t.value.chart.tooltip.roundingPercentage
1460
+ })})` : ""}</div>`, t.value.chart.comments.showInTooltip && a.comments.length && a.comments.slice(m.value.start, m.value.end)[_.value] && (l += `<div class="vue-data-ui-tooltip-comment" style="background:${a.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${a.color}">${a.comments.slice(m.value.start, m.value.end)[_.value]}</div>`);
1461
+ }
1462
+ }), `<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${t.value.chart.tooltip.color}">${l}</div>`;
1463
+ }), Ea = b(() => {
1464
+ if (Ve.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
1465
+ const l = ye.value.map((e) => ({
1466
+ label: e.name,
1467
+ color: e.color,
1468
+ type: e.type
1469
+ })), o = [];
1470
+ return se.value.forEach((e, s) => {
1471
+ const a = t.value.table.useDefaultTimeFormat ? [e.text] : [rt.value(s + m.value.start, t.value.table.timeFormat)];
1472
+ ye.value.forEach((n) => {
1473
+ a.push(xe(n.absoluteValues[s]) ? Number(n.absoluteValues[s].toFixed(t.value.table.rounding)) : "");
1474
+ }), o.push(a);
1475
+ }), { head: l, body: o };
1476
+ }), ct = b(() => {
1477
+ const l = t.value.table.showSum;
1478
+ let o = [""].concat(ye.value.map((n) => n.name));
1479
+ l && (o = o.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>'));
1480
+ let e = [];
1481
+ for (let n = 0; n < $.value; n += 1) {
1482
+ const u = ye.value.map((S) => S.absoluteValues[n] ?? 0).reduce((S, M) => S + M, 0);
1483
+ e.push(
1484
+ [
1485
+ t.value.table.useDefaultTimeFormat ? se.value[n]?.text ?? "-" : rt.value(n + m.value.start, t.value.table.timeFormat)
1486
+ ].concat(ye.value.map(
1487
+ (S) => ve(
1488
+ S.type === "line" ? t.value.line.labels.formatter : S.type === "bar" ? t.value.bar.labels.formatter : t.value.plot.labels.formatter,
1489
+ S.absoluteValues[n] ?? 0,
1490
+ Pe({
1491
+ p: S.prefix || t.value.chart.labels.prefix,
1492
+ v: S.absoluteValues[n] ?? 0,
1493
+ s: S.suffix || t.value.chart.labels.suffix,
1494
+ r: t.value.table.rounding
1495
+ })
1496
+ )
1497
+ )).concat(l ? (u ?? 0).toFixed(t.value.table.rounding) : [])
1498
+ );
1499
+ }
1500
+ const s = {
1501
+ th: {
1502
+ backgroundColor: t.value.table.th.backgroundColor,
1503
+ color: t.value.table.th.color,
1504
+ outline: t.value.table.th.outline
1505
+ },
1506
+ td: {
1507
+ backgroundColor: t.value.table.td.backgroundColor,
1508
+ color: t.value.table.td.color,
1509
+ outline: t.value.table.td.outline
1510
+ },
1511
+ breakpoint: t.value.table.responsiveBreakpoint
1512
+ }, a = [t.value.table.columnNames.period].concat(ye.value.map((n) => n.name)).concat(t.value.table.columnNames.total);
1513
+ return { head: o, body: e, config: s, colNames: a };
1514
+ });
1515
+ function Ll(l = null) {
1516
+ const o = [[t.value.chart.title.text], [t.value.chart.title.subtitle.text], [""]], e = ["", ...Ea.value.head.map((u) => u.label)], s = Ea.value.body, a = o.concat([e]).concat(s), n = ts(a);
1517
+ l ? l(n) : ls({ csvContent: n, title: t.value.chart.title.text || "vue-ui-xy" });
1518
+ }
1519
+ function Ml(l, o = null) {
1520
+ if (Wo.value) return;
1521
+ Dl.value = l;
1522
+ const e = ye.value.map((s) => ({
1523
+ name: s.name,
1524
+ value: [null, void 0, NaN].includes(s.absoluteValues[o]) ? null : s.absoluteValues[o],
1525
+ color: s.color,
1526
+ type: s.type
1527
+ }));
1528
+ l ? (_.value = o, t.value.events.datapointEnter && t.value.events.datapointEnter({ datapoint: e, seriesIndex: o + m.value.start })) : (_.value = null, t.value.events.datapointLeave && t.value.events.datapointLeave({ datapoint: e, seriesIndex: o + m.value.start }));
1529
+ }
1530
+ function Ya() {
1531
+ f.value.showTable = !f.value.showTable;
1532
+ }
1533
+ function Xa() {
1534
+ f.value.dataLabels.show = !f.value.dataLabels.show;
1535
+ }
1536
+ function Ga() {
1537
+ f.value.showTooltip = !f.value.showTooltip;
1538
+ }
1539
+ function qa(l) {
1540
+ Ee.value = l, Wl.value += 1;
1541
+ }
1542
+ function Ua() {
1543
+ if (!t.value.responsiveProportionalSizing) {
1544
+ x.value.dataLabels = t.value.chart.grid.labels.fontSize, x.value.yAxis = t.value.chart.grid.labels.axis.fontSize, x.value.xAxis = t.value.chart.grid.labels.xAxisLabels.fontSize, x.value.plotLabels = t.value.chart.labels.fontSize, Le.value.plot = t.value.plot.radius, Le.value.line = t.value.line.radius;
1545
+ return;
1546
+ }
1547
+ x.value.dataLabels = ht({
1548
+ relator: de.value,
1549
+ adjuster: 400,
1550
+ source: t.value.chart.grid.labels.fontSize,
1551
+ threshold: 10,
1552
+ fallback: 10
1553
+ }), x.value.yAxis = ht({
1554
+ relator: ee.value,
1555
+ adjuster: 1e3,
1556
+ source: t.value.chart.grid.labels.axis.fontSize,
1557
+ threshold: 10,
1558
+ fallback: 10
1559
+ }), x.value.xAxis = ht({
1560
+ relator: ee.value,
1561
+ adjuster: 1e3,
1562
+ source: t.value.chart.grid.labels.xAxisLabels.fontSize,
1563
+ threshold: 10,
1564
+ fallback: 10
1565
+ }), x.value.plotLabels = ht({
1566
+ relator: ee.value,
1567
+ adjuster: 800,
1568
+ source: t.value.chart.labels.fontSize,
1569
+ threshold: 10,
1570
+ fallback: 10
1571
+ }), Le.value.plot = ht({
1572
+ relator: ee.value,
1573
+ adjuster: 800,
1574
+ source: t.value.plot.radius,
1575
+ threshold: 1,
1576
+ fallback: 1
1577
+ }), Le.value.line = ht({
1578
+ relator: ee.value,
1579
+ adjuster: 800,
1580
+ source: t.value.line.radius,
1581
+ threshold: 1,
1582
+ fallback: 1
1583
+ });
1584
+ }
1585
+ function Al() {
1586
+ go(T.dataset) ? (Ol({
1587
+ componentName: "VueUiXy",
1588
+ type: "dataset",
1589
+ debug: kt.value
1590
+ }), Wt.value = !0) : T.dataset.forEach((o, e) => {
1591
+ [null, void 0].includes(o.name) && (Ol({
1592
+ componentName: "VueUiXy",
1593
+ type: "datasetSerieAttribute",
1594
+ property: "name (string)",
1595
+ index: e,
1596
+ debug: kt.value
1597
+ }), Wt.value = !0);
1598
+ }), kt.value && T.dataset.forEach((o) => {
1599
+ o.series.forEach((e, s) => {
1600
+ nl(e) || console.warn(`VueUiXy has detected an unsafe value in your dataset:
1601
+ -----> The serie '${o.name}' contains the value '${e}' at index ${s}.
1602
+ '${e}' was converted to null to allow the chart to display.`);
1603
+ });
1604
+ }), go(T.dataset) || (Wt.value = t.value.loading), Xl.value = t.value.chart.userOptions.showOnChartHover, bl.value = t.value.chart.userOptions.keepStateOnChartLeave, Bt.value = !t.value.chart.userOptions.showOnChartHover, kl();
1605
+ const l = 12;
1606
+ if (t.value.responsive) {
1607
+ const e = $e.value.parentNode;
1608
+ Ne.value && (Ne.value.unobserve(ml.value), Ne.value.disconnect());
1609
+ const { height: s, width: a } = e.getBoundingClientRect();
1610
+ let n = null, u = 0;
1611
+ t.value.chart.title.show && mt.value && (n = mt.value, u = n.getBoundingClientRect().height);
1612
+ let S = null, M = 0;
1613
+ t.value.chart.zoom.show && ze.value > 6 && xl.value && Te.value && Te.value.$el && (S = Te.value.$el, M = S.getBoundingClientRect().height);
1614
+ let I = null, V = 0;
1615
+ t.value.chart.legend.show && et.value && (I = et.value, V = I.getBoundingClientRect().height);
1616
+ let D = 0;
1617
+ gt.value && (D = gt.value.getBoundingClientRect().height);
1618
+ let N = 0;
1619
+ bt.value && (N = bt.value.getBoundingClientRect().height), de.value = s - u - V - M - D - N - l, ee.value = a, Vt.value = `0 0 ${ee.value < 0 ? 10 : ee.value} ${de.value < 0 ? 10 : de.value}`, Ua();
1620
+ const p = new ResizeObserver((te) => {
1621
+ for (const B of te)
1622
+ t.value.chart.title.show && mt.value ? u = mt.value.getBoundingClientRect().height : u = 0, Te.value && Te.value.$el ? M = Te.value.$el.getBoundingClientRect().height : M = 0, et.value ? V = et.value.getBoundingClientRect().height : V = 0, gt.value ? D = gt.value.getBoundingClientRect().height : D = 0, bt.value ? N = bt.value.getBoundingClientRect().height : N = 0, requestAnimationFrame(() => {
1623
+ de.value = B.contentRect.height - u - V - M - D - N - l, ee.value = B.contentBoxSize[0].inlineSize ?? B.contentRect.width, Vt.value = `0 0 ${ee.value < 0 ? 10 : ee.value} ${de.value < 0 ? 10 : de.value}`, Ua(), xt(), ot();
1624
+ });
1625
+ });
1626
+ Ne.value = p, ml.value = e, p.observe(e);
1627
+ } else
1628
+ de.value = t.value.chart.height, ee.value = t.value.chart.width, x.value.dataLabels = t.value.chart.grid.labels.fontSize, x.value.yAxis = t.value.chart.grid.labels.axis.fontSize, x.value.xAxis = t.value.chart.grid.labels.xAxisLabels.fontSize, x.value.plotLabels = t.value.chart.labels.fontSize, Le.value.plot = t.value.plot.radius, Le.value.line = t.value.line.radius, Vt.value = `0 0 ${ee.value} ${de.value}`;
1629
+ xt(), ot();
1630
+ }
1631
+ function Za(l) {
1632
+ Po.value = {
1633
+ x: l.clientX,
1634
+ y: l.clientY
1635
+ };
1636
+ }
1637
+ It(() => {
1638
+ Al(), Jt(), document.addEventListener("mousemove", Za, { passive: !0 }), document.addEventListener("scroll", ha, { passive: !0 });
1639
+ }), Il(() => {
1640
+ document.removeEventListener("scroll", ha, { passive: !0 }), document.removeEventListener("mousemove", Za, { passive: !0 }), Ne.value && (Ne.value.unobserve(ml.value), Ne.value.disconnect(), Ne.value = null);
1641
+ }), ds({
1642
+ timeLabelsEls: Ft,
1643
+ timeLabels: se,
1644
+ slicer: m,
1645
+ configRef: t,
1646
+ rotationPath: ["chart", "grid", "labels", "xAxisLabels", "rotation"],
1647
+ autoRotatePath: ["chart", "grid", "labels", "xAxisLabels", "autoRotate", "enable"],
1648
+ isAutoSize: Ho,
1649
+ height: de,
1650
+ width: ee,
1651
+ rotation: t.value.chart.grid.labels.xAxisLabels.autoRotate.angle
1652
+ });
1653
+ const al = g(!1), Ka = g(null), Ja = g(200), pu = b(
1654
+ () => _.value ?? P.value ?? 0
1655
+ );
1656
+ function yu() {
1657
+ const l = Math.ceil(Ja.value || 200);
1658
+ return Math.min(Math.max(l, 1), 200);
1659
+ }
1660
+ function xu() {
1661
+ const l = yu(), o = 200, e = Math.max(1, $.value), s = c.value.width / e, n = c.value?.left + pu.value * s + s / 2 - l / 2 - (o - l) / 2, u = c.value?.left - (o - l) / 2, S = c.value?.right - (o + l) / 2, M = Math.max(u, Math.min(n, S));
1662
+ return O(M);
1663
+ }
1664
+ It(() => {
1665
+ let l = null, o = null;
1666
+ const e = (n) => {
1667
+ cancelAnimationFrame(o), o = requestAnimationFrame(() => {
1668
+ Ja.value = Math.min(Math.max(Math.ceil(n || 0), 1), 200);
1669
+ });
1670
+ }, s = new ResizeObserver((n) => {
1671
+ let u = n.find((S) => S.target === l) || n[0];
1672
+ u && e(u.contentRect.width || 200);
1673
+ }), a = sl((n) => {
1674
+ const u = Ka.value;
1675
+ l && l !== u && (s.unobserve(l), l = null), u && u !== l && (Pt(() => {
1676
+ u.offsetParent !== null && e(u.offsetWidth || u.getBoundingClientRect().width || 200);
1677
+ }), s.observe(u), l = u), n(() => {
1678
+ l && (s.unobserve(l), l = null);
1679
+ });
1680
+ });
1681
+ Il(() => {
1682
+ try {
1683
+ l && s.unobserve(l), s.disconnect(), a();
1684
+ } catch {
1685
+ }
1686
+ });
1687
+ });
1688
+ const ku = b(() => {
1689
+ if ([null, void 0].includes(_.value) && [null, void 0].includes(P.value)) return "";
1690
+ const l = (_.value != null ? _.value : 0) || (P.value != null ? P.value : 0), o = t.value.chart.timeTag.customFormat;
1691
+ if (al.value = !1, fo(o))
1692
+ try {
1693
+ const e = o({
1694
+ absoluteIndex: l + m.value.start,
1695
+ seriesIndex: l,
1696
+ datapoint: Ze.value,
1697
+ bars: ke.value,
1698
+ lines: oe.value,
1699
+ plots: fe.value,
1700
+ config: t.value
1701
+ });
1702
+ if (typeof e == "string")
1703
+ return al.value = !0, e;
1704
+ } catch {
1705
+ console.warn("Custom format cannot be applied on timeTag."), al.value = !1;
1706
+ }
1707
+ if (!al.value)
1708
+ return [null, void 0].includes(se.value[l]) ? "" : t.value.chart.grid.labels.xAxisLabels.datetimeFormatter.enable && !t.value.chart.timeTag.useDefaultFormat ? rt.value(l + m.value.start, t.value.chart.timeTag.timeFormat) : se.value[l].text;
1709
+ });
1710
+ vt(() => T.dataset, (l) => {
1711
+ Array.isArray(l) && l.length > 0 && (Wt.value = !1), ze.value = Math.max(...pe.value.map((o) => Fe(o.series).length)), m.value = {
1712
+ start: 0,
1713
+ end: ze.value
1714
+ }, Io.value += 1, gl.value += 1, xt(), ot(), ut();
1715
+ }, { deep: !0 }), vt(() => T.config, (l) => {
1716
+ ne.value || (t.value = yl()), Al(), Yl.value += 1, El.value += 1, kl(), xt(), ot(), ut();
1717
+ }, { deep: !0 });
1718
+ const Cl = g(!1);
1719
+ function Qa() {
1720
+ const l = $e.value?.parentNode;
1721
+ if (!l) {
1722
+ Cl.value = !1;
1723
+ return;
1724
+ }
1725
+ const o = l.getBoundingClientRect();
1726
+ Cl.value = o.width > 2 && o.height > 2;
1727
+ }
1728
+ It(() => {
1729
+ Qa();
1730
+ const l = new ResizeObserver(() => {
1731
+ Qa(), Cl.value && (Al(), ut(), Jt());
1732
+ });
1733
+ $e.value?.parentNode && l.observe($e.value.parentNode);
1734
+ }), vt(t, () => {
1735
+ kl();
1736
+ }, { immediate: !0 });
1737
+ const Ct = b(() => {
1738
+ const l = t.value.table.useDialog && !t.value.showTable, o = f.value.showTable;
1739
+ return {
1740
+ component: l ? Mo : bs,
1741
+ title: `${t.value.chart.title.text}${t.value.chart.title.subtitle.text ? `: ${t.value.chart.title.subtitle.text}` : ""}`,
1742
+ props: l ? {
1743
+ backgroundColor: t.value.table.th.backgroundColor,
1744
+ color: t.value.table.th.color,
1745
+ headerColor: t.value.table.th.color,
1746
+ headerBg: t.value.table.th.backgroundColor,
1747
+ isFullscreen: Ee.value,
1748
+ fullscreenParent: $e.value,
1749
+ forcedWidth: Math.min(800, window.innerWidth * 0.8)
1750
+ } : {
1751
+ hideDetails: !0,
1752
+ config: {
1753
+ open: o,
1754
+ maxHeight: 1e4,
1755
+ body: {
1756
+ backgroundColor: t.value.chart.backgroundColor,
1757
+ color: t.value.chart.color
1758
+ },
1759
+ head: {
1760
+ backgroundColor: t.value.chart.backgroundColor,
1761
+ color: t.value.chart.color
1762
+ }
1763
+ }
1764
+ }
1765
+ };
1766
+ });
1767
+ vt(() => f.value.showTable, (l) => {
1768
+ t.value.showTable || (l && t.value.table.useDialog && lt.value ? lt.value.open() : lt.value && lt.value.close && lt.value.close());
1769
+ });
1770
+ function ja() {
1771
+ f.value.showTable = !1, fl.value && fl.value.setTableIconState(!1);
1772
+ }
1773
+ const _u = b(() => ie.value.map((l) => ({
1774
+ shape: l.type === "bar" ? "square" : l.shape ?? "circle",
1775
+ color: l.color,
1776
+ name: l.name
1777
+ }))), wu = b(() => t.value.chart.backgroundColor), Su = b(() => t.value.chart.legend), $u = b(() => t.value.chart.title), { exportSvg: Lu, getSvg: Mu } = rs({
1778
+ svg: ae,
1779
+ title: $u,
1780
+ legend: Su,
1781
+ legendItems: _u,
1782
+ backgroundColor: wu
1783
+ });
1784
+ async function eo({ isCb: l }) {
1785
+ Dt.value = !0, await Pt();
1786
+ try {
1787
+ if (l) {
1788
+ const { blob: o, url: e, text: s, dataUrl: a } = await Mu();
1789
+ await Promise.resolve(t.value.chart.userOptions.callbacks.svg({ blob: o, url: e, text: s, dataUrl: a }));
1790
+ } else
1791
+ await Promise.resolve(Lu());
1792
+ } finally {
1793
+ Dt.value = !1;
1794
+ }
1795
+ }
1796
+ function Au(l) {
1797
+ if (l?.stage === "start") {
1798
+ Ht.value = !0;
1799
+ return;
1800
+ }
1801
+ if (l?.stage === "end") {
1802
+ Ht.value = !1;
1803
+ return;
1804
+ }
1805
+ sa();
1806
+ }
1807
+ async function to() {
1808
+ if (We("copyAlt", {
1809
+ config: {
1810
+ ...t.value,
1811
+ formattedDates: se.value
1812
+ },
1813
+ dataset: {
1814
+ lines: oe.value,
1815
+ bars: ke.value,
1816
+ plots: fe.value
1817
+ }
1818
+ }), !t.value.chart.userOptions.callbacks.altCopy) {
1819
+ console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1820
+ return;
1821
+ }
1822
+ await Promise.resolve(t.value.chart.userOptions.callbacks.altCopy({
1823
+ config: {
1824
+ ...t.value,
1825
+ formattedDates: se.value
1826
+ },
1827
+ dataset: {
1828
+ lines: oe.value,
1829
+ bars: ke.value,
1830
+ plots: fe.value
1831
+ }
1832
+ }));
1833
+ }
1834
+ const Tl = g(!1);
1835
+ function Cu() {
1836
+ m.value.end > m.value.start && (at.value = null), Ut.value = !0, Tl.value = !0;
1837
+ }
1838
+ function Tu() {
1839
+ at.value = null, Lt(), Tl.value = !1, Ut.value = !1;
1840
+ }
1841
+ function zu(l) {
1842
+ if (!ae.value || tt.value || document.activeElement !== ae.value) return;
1843
+ const o = l.key === "ArrowLeft", e = l.key === "ArrowRight";
1844
+ if (!o && !e || !m.value.end && m.value.end !== 0) return;
1845
+ const s = m.value.end - m.value.start;
1846
+ if (s <= 0) return;
1847
+ l.preventDefault(), l.stopPropagation();
1848
+ let a = at.value;
1849
+ const n = it.value, u = a !== null && a >= 0 && a < s, S = n !== null && n >= 0 && n < s;
1850
+ u ? e ? (a += 1, a >= s && (a = 0)) : o && (a -= 1, a < 0 && (a = s - 1)) : S ? (a = e ? n + 1 : n - 1, a >= s && (a = 0), a < 0 && (a = s - 1)) : e ? a = 0 : a = s - 1, at.value = a, Iu(a), Ml(!0, a);
1851
+ }
1852
+ function Iu(l) {
1853
+ const o = m.value.end - m.value.start;
1854
+ if (o <= 0) return;
1855
+ const e = c.value.width / o, s = c.value.left + e * l + e / 2, a = c.value.top + c.value.height / 2, n = as(s, a, ae.value);
1856
+ n && (ql.value = n);
1857
+ }
1858
+ const zl = b(() => {
1859
+ if (!ct.value) return null;
1860
+ const l = t.value.table.showSum;
1861
+ let o = [t.value.table.columnNames.period].concat(ye.value.map((s) => s.name));
1862
+ l && (o = o.concat(t.value.table.columnNames.total));
1863
+ const e = ct.value.body.slice(m.value.start, m.value.end);
1864
+ return {
1865
+ headers: o,
1866
+ rows: e
1867
+ };
1868
+ });
1869
+ return yo({
1870
+ getData: lu,
1871
+ getImage: au,
1872
+ generatePdf: ua,
1873
+ generateImage: sa,
1874
+ generateSvg: eo,
1875
+ generateCsv: Ll,
1876
+ hideSeries: nu,
1877
+ showSeries: su,
1878
+ toggleStack: pa,
1879
+ toggleTable: Ya,
1880
+ toggleLabels: Xa,
1881
+ toggleTooltip: Ga,
1882
+ toggleAnnotator: wl,
1883
+ toggleFullscreen: qa,
1884
+ copyAlt: to
1885
+ }), (l, o) => (i(), r("div", {
1886
+ id: `vue-ui-xy_${z.value}`,
1887
+ class: Je(`vue-data-ui-component vue-ui-xy ${Ee.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${t.value.useCssAnimation ? "" : "vue-ui-dna"}`),
1888
+ ref_key: "chart",
1889
+ ref: $e,
1890
+ style: w(`background:${t.value.chart.backgroundColor}; color:${t.value.chart.color};width:100%;font-family:${t.value.chart.fontFamily};${t.value.responsive ? "height: 100%" : ""}`),
1891
+ onMouseenter: o[6] || (o[6] = () => fa(!0)),
1892
+ onMouseleave: o[7] || (o[7] = () => fa(!1)),
1893
+ onClick: Ta
1894
+ }, [
1895
+ y("div", {
1896
+ id: `chart-instructions-${z.value}`,
1897
+ class: "sr-only"
1898
+ }, [
1899
+ y("p", null, ue(t.value.a11y.translations.keyboardNavigation), 1)
1900
+ ], 8, _s),
1901
+ zl.value?.rows?.length ? (i(), _e(ys, {
1902
+ key: 0,
1903
+ uid: z.value,
1904
+ head: zl.value.headers,
1905
+ body: zl.value.rows,
1906
+ notice: t.value.a11y.translations.tableAvailable,
1907
+ caption: t.value.a11y.translations.tableCaption
1908
+ }, null, 8, ["uid", "head", "body", "notice", "caption"])) : h("", !0),
1909
+ t.value.chart.userOptions.buttons.annotator && ae.value ? (i(), _e(v(Lo), {
1910
+ key: 1,
1911
+ svgRef: ae.value,
1912
+ backgroundColor: t.value.chart.backgroundColor,
1913
+ color: t.value.chart.color,
1914
+ active: tt.value,
1915
+ isCursorPointer: Xe.value,
1916
+ onClose: wl
1917
+ }, {
1918
+ "annotator-action-close": X(() => [
1919
+ F(l.$slots, "annotator-action-close", {}, void 0, !0)
1920
+ ]),
1921
+ "annotator-action-color": X(({ color: e }) => [
1922
+ F(l.$slots, "annotator-action-color", ge(be({ color: e })), void 0, !0)
1923
+ ]),
1924
+ "annotator-action-draw": X(({ mode: e }) => [
1925
+ F(l.$slots, "annotator-action-draw", ge(be({ mode: e })), void 0, !0)
1926
+ ]),
1927
+ "annotator-action-undo": X(({ disabled: e }) => [
1928
+ F(l.$slots, "annotator-action-undo", ge(be({ disabled: e })), void 0, !0)
1929
+ ]),
1930
+ "annotator-action-redo": X(({ disabled: e }) => [
1931
+ F(l.$slots, "annotator-action-redo", ge(be({ disabled: e })), void 0, !0)
1932
+ ]),
1933
+ "annotator-action-delete": X(({ disabled: e }) => [
1934
+ F(l.$slots, "annotator-action-delete", ge(be({ disabled: e })), void 0, !0)
1935
+ ]),
1936
+ _: 3
1937
+ }, 8, ["svgRef", "backgroundColor", "color", "active", "isCursorPointer"])) : h("", !0),
1938
+ ru.value ? (i(), r("div", {
1939
+ key: 2,
1940
+ ref_key: "noTitle",
1941
+ ref: bt,
1942
+ class: "vue-data-ui-no-title-space",
1943
+ style: "height:36px; width: 100%; background:transparent"
1944
+ }, null, 512)) : h("", !0),
1945
+ t.value.chart.title.show ? (i(), r("div", {
1946
+ key: 3,
1947
+ ref_key: "chartTitle",
1948
+ ref: mt,
1949
+ class: "vue-ui-xy-title",
1950
+ style: w(`font-family:${t.value.chart.fontFamily}`)
1951
+ }, [
1952
+ (i(), _e(fs, {
1953
+ key: `title_${Yl.value}`,
1954
+ config: {
1955
+ title: {
1956
+ cy: "xy-div-title",
1957
+ ...t.value.chart.title
1958
+ },
1959
+ subtitle: {
1960
+ cy: "xy-div-subtitle",
1961
+ ...t.value.chart.title.subtitle
1962
+ }
1963
+ }
1964
+ }, null, 8, ["config"]))
1965
+ ], 4)) : h("", !0),
1966
+ y("div", {
1967
+ id: `legend-top-${z.value}`
1968
+ }, null, 8, ws),
1969
+ t.value.chart.userOptions.show && (bl.value || Bt.value) ? (i(), _e(v(wo), {
1970
+ ref_key: "userOptionsRef",
1971
+ ref: fl,
1972
+ key: `user_options_${Wl.value}`,
1973
+ backgroundColor: t.value.chart.backgroundColor,
1974
+ color: t.value.chart.color,
1975
+ isPrinting: v(Et),
1976
+ isImaging: v(_l),
1977
+ uid: z.value,
1978
+ hasTooltip: t.value.chart.userOptions.buttons.tooltip && t.value.chart.tooltip.show,
1979
+ hasPdf: t.value.chart.userOptions.buttons.pdf,
1980
+ hasXls: t.value.chart.userOptions.buttons.csv,
1981
+ hasImg: t.value.chart.userOptions.buttons.img,
1982
+ hasSvg: t.value.chart.userOptions.buttons.svg,
1983
+ hasLabel: t.value.chart.userOptions.buttons.labels,
1984
+ hasTable: t.value.chart.userOptions.buttons.table,
1985
+ hasStack: cl.dataset.length > 1 && t.value.chart.userOptions.buttons.stack,
1986
+ hasFullscreen: t.value.chart.userOptions.buttons.fullscreen,
1987
+ hasAltCopy: t.value.chart.userOptions.buttons.altCopy,
1988
+ isStacked: f.value.isStacked,
1989
+ isFullscreen: Ee.value,
1990
+ chartElement: l.$refs.chart,
1991
+ position: t.value.chart.userOptions.position,
1992
+ isTooltip: f.value.showTooltip,
1993
+ titles: { ...t.value.chart.userOptions.buttonTitles },
1994
+ hasAnnotator: t.value.chart.userOptions.buttons.annotator,
1995
+ isAnnotation: tt.value,
1996
+ callbacks: t.value.chart.userOptions.callbacks,
1997
+ tableDialog: t.value.table.useDialog,
1998
+ printScale: t.value.chart.userOptions.print.scale,
1999
+ isCursorPointer: Xe.value,
2000
+ onToggleFullscreen: qa,
2001
+ onGeneratePdf: v(ua),
2002
+ onGenerateCsv: Ll,
2003
+ onGenerateImage: Au,
2004
+ onGenerateSvg: eo,
2005
+ onToggleTable: Ya,
2006
+ onToggleLabels: Xa,
2007
+ onToggleStack: pa,
2008
+ onToggleTooltip: Ga,
2009
+ onToggleAnnotator: wl,
2010
+ onCopyAlt: to,
2011
+ style: w({
2012
+ visibility: bl.value ? Bt.value ? "visible" : "hidden" : "visible"
2013
+ })
2014
+ }, lo({ _: 2 }, [
2015
+ l.$slots.menuIcon ? {
2016
+ name: "menuIcon",
2017
+ fn: X(({ isOpen: e, color: s }) => [
2018
+ F(l.$slots, "menuIcon", ge(be({ isOpen: e, color: s })), void 0, !0)
2019
+ ]),
2020
+ key: "0"
2021
+ } : void 0,
2022
+ l.$slots.optionTooltip ? {
2023
+ name: "optionTooltip",
2024
+ fn: X(() => [
2025
+ F(l.$slots, "optionTooltip", {}, void 0, !0)
2026
+ ]),
2027
+ key: "1"
2028
+ } : void 0,
2029
+ l.$slots.optionPdf ? {
2030
+ name: "optionPdf",
2031
+ fn: X(() => [
2032
+ F(l.$slots, "optionPdf", {}, void 0, !0)
2033
+ ]),
2034
+ key: "2"
2035
+ } : void 0,
2036
+ l.$slots.optionCsv ? {
2037
+ name: "optionCsv",
2038
+ fn: X(() => [
2039
+ F(l.$slots, "optionCsv", {}, void 0, !0)
2040
+ ]),
2041
+ key: "3"
2042
+ } : void 0,
2043
+ l.$slots.optionImg ? {
2044
+ name: "optionImg",
2045
+ fn: X(() => [
2046
+ F(l.$slots, "optionImg", {}, void 0, !0)
2047
+ ]),
2048
+ key: "4"
2049
+ } : void 0,
2050
+ l.$slots.optionSvg ? {
2051
+ name: "optionSvg",
2052
+ fn: X(() => [
2053
+ F(l.$slots, "optionSvg", {}, void 0, !0)
2054
+ ]),
2055
+ key: "5"
2056
+ } : void 0,
2057
+ l.$slots.optionTable ? {
2058
+ name: "optionTable",
2059
+ fn: X(() => [
2060
+ F(l.$slots, "optionTable", {}, void 0, !0)
2061
+ ]),
2062
+ key: "6"
2063
+ } : void 0,
2064
+ l.$slots.optionLabels ? {
2065
+ name: "optionLabels",
2066
+ fn: X(() => [
2067
+ F(l.$slots, "optionLabels", {}, void 0, !0)
2068
+ ]),
2069
+ key: "7"
2070
+ } : void 0,
2071
+ l.$slots.optionStack ? {
2072
+ name: "optionStack",
2073
+ fn: X(({ isStack: e }) => [
2074
+ F(l.$slots, "optionStack", ge(be({ isStack: e })), void 0, !0)
2075
+ ]),
2076
+ key: "8"
2077
+ } : void 0,
2078
+ l.$slots.optionFullscreen ? {
2079
+ name: "optionFullscreen",
2080
+ fn: X(({ toggleFullscreen: e, isFullscreen: s }) => [
2081
+ F(l.$slots, "optionFullscreen", ge(be({ toggleFullscreen: e, isFullscreen: s })), void 0, !0)
2082
+ ]),
2083
+ key: "9"
2084
+ } : void 0,
2085
+ l.$slots.optionAnnotator ? {
2086
+ name: "optionAnnotator",
2087
+ fn: X(({ toggleAnnotator: e, isAnnotator: s }) => [
2088
+ F(l.$slots, "optionAnnotator", ge(be({ toggleAnnotator: e, isAnnotator: s })), void 0, !0)
2089
+ ]),
2090
+ key: "10"
2091
+ } : void 0,
2092
+ l.$slots.optionAltCopy ? {
2093
+ name: "optionAltCopy",
2094
+ fn: X(({ altCopy: e }) => [
2095
+ F(l.$slots, "optionAltCopy", ge(be({ altCopy: e })), void 0, !0)
2096
+ ]),
2097
+ key: "11"
2098
+ } : void 0
2099
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasSvg", "hasLabel", "hasTable", "hasStack", "hasFullscreen", "hasAltCopy", "isStacked", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "callbacks", "tableDialog", "printScale", "isCursorPointer", "onGeneratePdf", "style"])) : h("", !0),
2100
+ y("div", Ss, [
2101
+ (i(), r("svg", {
2102
+ ref_key: "svgRef",
2103
+ ref: ae,
2104
+ xmlns: "http://www.w3.org/2000/svg",
2105
+ class: Je([{ "vue-data-ui-fullscreen--on": Ee.value, "vue-data-ui-fulscreen--off": !Ee.value }, "vue-ui-xy-svg vue-data-ui-svg"]),
2106
+ width: "100%",
2107
+ viewBox: Vt.value,
2108
+ style: w({
2109
+ background: "transparent",
2110
+ color: t.value.chart.color,
2111
+ fontFamily: t.value.chart.fontFamily
2112
+ }),
2113
+ "aria-label": iu.value,
2114
+ "aria-describedby": `chart-instructions-${z.value}`,
2115
+ "aria-live": "polite",
2116
+ role: "img",
2117
+ tabindex: "0",
2118
+ preserveAspectRatio: "xMidYMid",
2119
+ onMousemove: tu,
2120
+ onMouseleave: Lt,
2121
+ onClick: Ta,
2122
+ onFocus: Cu,
2123
+ onBlur: Tu,
2124
+ onKeydown: zu
2125
+ }, [
2126
+ y("g", {
2127
+ ref_key: "G",
2128
+ ref: zo,
2129
+ class: "vue-data-ui-g"
2130
+ }, [
2131
+ dt(v($o)),
2132
+ l.$slots["chart-background"] ? (i(), r("foreignObject", {
2133
+ key: 0,
2134
+ x: c.value?.left + q.value < 0 ? 0 : c.value?.left + q.value,
2135
+ y: c.value?.top,
2136
+ width: c.value.width - (t.value.chart.grid.position === "middle" ? 0 : c.value.width / $.value) < 0 ? 0 : c.value.width - (t.value.chart.grid.position === "middle" ? 0 : c.value.width / $.value),
2137
+ height: c.value.height < 0 ? 0 : c.value.height,
2138
+ style: {
2139
+ pointerEvents: "none"
2140
+ }
2141
+ }, [
2142
+ F(l.$slots, "chart-background", {}, void 0, !0)
2143
+ ], 8, Ls)) : h("", !0),
2144
+ $.value > 0 ? (i(), r("g", Ms, [
2145
+ y("g", As, [
2146
+ t.value.chart.grid.labels.xAxis.showBaseline ? (i(), r("line", {
2147
+ key: 0,
2148
+ stroke: t.value.chart.grid.stroke,
2149
+ "stroke-width": "1",
2150
+ x1: c.value?.left + q.value,
2151
+ x2: c.value?.right - q.value,
2152
+ y1: v(W)(c.value?.bottom),
2153
+ y2: v(W)(c.value?.bottom),
2154
+ "stroke-linecap": "round",
2155
+ style: { animation: "none !important" }
2156
+ }, null, 8, Cs)) : h("", !0),
2157
+ f.value.useIndividualScale ? t.value.chart.grid.showHorizontalLines ? (i(!0), r(d, { key: 2 }, k(At.value, (e) => (i(), r("g", null, [
2158
+ e.id === C.value && e.yLabels.length ? (i(!0), r(d, { key: 0 }, k(e.yLabels, (s) => (i(), r("line", {
2159
+ x1: c.value?.left + q.value,
2160
+ x2: c.value?.right - q.value,
2161
+ y1: v(W)(s.y),
2162
+ y2: v(W)(s.y),
2163
+ stroke: e.color,
2164
+ "stroke-width": 0.5,
2165
+ "stroke-linecap": "round",
2166
+ style: { animation: "none !important" }
2167
+ }, null, 8, Ps))), 256)) : e.yLabels.length ? (i(!0), r(d, { key: 1 }, k(e.yLabels, (s) => (i(), r("line", {
2168
+ x1: c.value?.left + q.value,
2169
+ x2: c.value?.right - q.value,
2170
+ y1: v(W)(s.y),
2171
+ y2: v(W)(s.y),
2172
+ stroke: t.value.chart.grid.stroke,
2173
+ "stroke-width": 0.5,
2174
+ "stroke-linecap": "round",
2175
+ style: { animation: "none !important" }
2176
+ }, null, 8, Os))), 256)) : h("", !0)
2177
+ ]))), 256)) : h("", !0) : (i(), r(d, { key: 1 }, [
2178
+ t.value.chart.grid.labels.yAxis.showBaseline ? (i(), r("line", {
2179
+ key: 0,
2180
+ stroke: t.value.chart.grid.stroke,
2181
+ "stroke-width": "1",
2182
+ x1: c.value?.left + q.value,
2183
+ x2: c.value?.left + q.value,
2184
+ y1: v(W)(c.value?.top),
2185
+ y2: v(W)(c.value?.bottom),
2186
+ "stroke-linecap": "round",
2187
+ style: { animation: "none !important" }
2188
+ }, null, 8, Ts)) : h("", !0),
2189
+ t.value.chart.grid.showHorizontalLines ? (i(), r("g", zs, [
2190
+ (i(!0), r(d, null, k(Na.value, (e) => (i(), r("line", {
2191
+ x1: c.value?.left + q.value,
2192
+ x2: c.value?.right,
2193
+ y1: v(W)(e.y),
2194
+ y2: v(W)(e.y),
2195
+ stroke: t.value.chart.grid.stroke,
2196
+ "stroke-width": 0.5,
2197
+ "stroke-linecap": "round",
2198
+ style: { animation: "none !important" }
2199
+ }, null, 8, Is))), 256))
2200
+ ])) : h("", !0)
2201
+ ], 64)),
2202
+ t.value.chart.grid.showVerticalLines ? (i(), r("g", Ns, [
2203
+ y("path", {
2204
+ d: Xo.value,
2205
+ "stroke-width": 0.5,
2206
+ stroke: t.value.chart.grid.stroke,
2207
+ "stroke-linecap": "round",
2208
+ style: { animation: "none !important" }
2209
+ }, null, 8, Fs)
2210
+ ])) : h("", !0),
2211
+ t.value.chart.grid.labels.xAxisLabels.show ? (i(), r("g", Vs, [
2212
+ y("path", {
2213
+ d: Go.value,
2214
+ stroke: t.value.chart.grid.stroke,
2215
+ "stroke-width": 1,
2216
+ "stroke-linecap": "round",
2217
+ style: { animation: "none !important" }
2218
+ }, null, 8, Bs)
2219
+ ])) : h("", !0)
2220
+ ]),
2221
+ (i(!0), r(d, null, k(ke.value, (e, s) => (i(), r("defs", {
2222
+ key: `def_rect_${s}`
2223
+ }, [
2224
+ l.$slots["bar-gradient"] ? F(l.$slots, "bar-gradient", Qe({
2225
+ key: 0,
2226
+ ref_for: !0
2227
+ }, { series: e, positiveId: `rectGradient_pos_${s}_${z.value}`, negativeId: `rectGradient_neg_${s}_${z.value}` }), void 0, !0) : (i(), r(d, { key: 1 }, [
2228
+ y("linearGradient", {
2229
+ id: `rectGradient_pos_${s}_${z.value}`,
2230
+ x2: "0%",
2231
+ y2: "100%"
2232
+ }, [
2233
+ y("stop", {
2234
+ offset: "0%",
2235
+ "stop-color": e.color
2236
+ }, null, 8, Hs),
2237
+ y("stop", {
2238
+ offset: "62%",
2239
+ "stop-color": `${v(je)(e.color, 0.02)}`
2240
+ }, null, 8, Ds),
2241
+ y("stop", {
2242
+ offset: "100%",
2243
+ "stop-color": `${v(je)(e.color, 0.05)}`
2244
+ }, null, 8, Ws)
2245
+ ], 8, Rs),
2246
+ y("linearGradient", {
2247
+ id: `rectGradient_neg_${s}_${z.value}`,
2248
+ x2: "0%",
2249
+ y2: "100%"
2250
+ }, [
2251
+ y("stop", {
2252
+ offset: "0%",
2253
+ "stop-color": `${v(je)(e.color, 0.05)}`
2254
+ }, null, 8, Ys),
2255
+ y("stop", {
2256
+ offset: "38%",
2257
+ "stop-color": `${v(je)(e.color, 0.02)}`
2258
+ }, null, 8, Xs),
2259
+ y("stop", {
2260
+ offset: "100%",
2261
+ "stop-color": e.color
2262
+ }, null, 8, Gs)
2263
+ ], 8, Es)
2264
+ ], 64))
2265
+ ]))), 128)),
2266
+ (i(!0), r(d, null, k(fe.value, (e, s) => (i(), r("defs", {
2267
+ key: `def_plot_${s}`
2268
+ }, [
2269
+ y("radialGradient", {
2270
+ id: `plotGradient_${s}_${z.value}`,
2271
+ cx: "50%",
2272
+ cy: "50%",
2273
+ r: "50%",
2274
+ fx: "50%",
2275
+ fy: "50%"
2276
+ }, [
2277
+ y("stop", {
2278
+ offset: "0%",
2279
+ "stop-color": `${v(je)(e.color, 0.05)}`
2280
+ }, null, 8, Us),
2281
+ y("stop", {
2282
+ offset: "100%",
2283
+ "stop-color": e.color
2284
+ }, null, 8, Zs)
2285
+ ], 8, qs)
2286
+ ]))), 128)),
2287
+ (i(!0), r(d, null, k(oe.value, (e, s) => (i(), r(d, {
2288
+ key: `def_line_${e.id}`
2289
+ }, [
2290
+ y("defs", null, [
2291
+ y("radialGradient", {
2292
+ id: `lineGradient_${s}_${z.value}`,
2293
+ cx: "50%",
2294
+ cy: "50%",
2295
+ r: "50%",
2296
+ fx: "50%",
2297
+ fy: "50%"
2298
+ }, [
2299
+ y("stop", {
2300
+ offset: "0%",
2301
+ "stop-color": `${v(je)(e.color, 0.05)}`
2302
+ }, null, 8, Js),
2303
+ y("stop", {
2304
+ offset: "100%",
2305
+ "stop-color": e.color
2306
+ }, null, 8, Qs)
2307
+ ], 8, Ks),
2308
+ l.$slots["area-gradient"] ? F(l.$slots, "area-gradient", Qe({
2309
+ key: 0,
2310
+ ref_for: !0
2311
+ }, { series: e, id: `areaGradient_${s}_${z.value}` }), void 0, !0) : (i(), r("linearGradient", {
2312
+ key: 1,
2313
+ id: `areaGradient_${s}_${z.value}`,
2314
+ x1: "0%",
2315
+ x2: "100%",
2316
+ y1: "0%",
2317
+ y2: "0%"
2318
+ }, [
2319
+ y("stop", {
2320
+ offset: "0%",
2321
+ "stop-color": `${v(Ce)(v(je)(e.color, 0.03), t.value.line.area.opacity)}`
2322
+ }, null, 8, en),
2323
+ y("stop", {
2324
+ offset: "100%",
2325
+ "stop-color": `${v(Ce)(e.color, t.value.line.area.opacity)}`
2326
+ }, null, 8, tn)
2327
+ ], 8, js))
2328
+ ]),
2329
+ e.temperatureColors ? (i(), r("defs", ln, [
2330
+ y("linearGradient", {
2331
+ id: `temperature_grad_line_${s}_${z.value}`,
2332
+ gradientTransform: "rotate(90)"
2333
+ }, [
2334
+ (i(!0), r(d, null, k(e.temperatureColors, (a, n) => (i(), r("stop", {
2335
+ key: `temperature_grad_stop_${s}_${n}_${z.value}`,
2336
+ "stop-color": a,
2337
+ offset: v(Ju)(n, e.temperatureColors.length)
2338
+ }, null, 8, on))), 128))
2339
+ ], 8, an)
2340
+ ])) : h("", !0)
2341
+ ], 64))), 128)),
2342
+ (i(!0), r(d, null, k(cu.value, (e) => (i(), r("g", null, [
2343
+ e.show ? (i(), r(d, { key: 0 }, [
2344
+ (i(!0), r(d, null, k(e.span, (s, a) => (i(), r("g", null, [
2345
+ y("rect", {
2346
+ style: w({
2347
+ transition: "none",
2348
+ opacity: e.from + a >= m.value.start && e.from + a <= m.value.end - 1 ? 1 : 0
2349
+ }),
2350
+ x: c.value?.left + c.value.width / $.value * (e.from + a - m.value.start),
2351
+ y: c.value?.top,
2352
+ height: c.value.height < 0 ? 10 : c.value.height,
2353
+ width: c.value.width / $.value < 0 ? 1e-5 : c.value.width / $.value,
2354
+ fill: v(Ce)(e.color, e.opacity)
2355
+ }, null, 12, un)
2356
+ ]))), 256)),
2357
+ (i(!0), r(d, null, k(e.span, (s, a) => (i(), r("g", null, [
2358
+ e.caption.text && a === 0 ? (i(), r("foreignObject", {
2359
+ key: 0,
2360
+ x: c.value?.left + c.value.width / $.value * (e.from + a - m.value.start) - (e.caption.width === "auto" ? 0 : e.caption.width / 2 - c.value.width / $.value * e.span / 2),
2361
+ y: c.value?.top + e.caption.offsetY,
2362
+ style: w({
2363
+ overflow: "visible",
2364
+ opacity: e.to >= m.value.start && e.from < m.value.end ? 1 : 0
2365
+ }),
2366
+ height: "1",
2367
+ width: e.caption.width === "auto" ? c.value.width / $.value * e.span : e.caption.width
2368
+ }, [
2369
+ y("div", {
2370
+ style: w(`padding:${e.caption.padding}px;text-align:${e.caption.textAlign};font-size:${e.caption.fontSize}px;color:${e.caption.color};font-weight:${e.caption.bold ? "bold" : "normal"}`)
2371
+ }, ue(e.caption.text), 5)
2372
+ ], 12, sn)) : h("", !0)
2373
+ ]))), 256))
2374
+ ], 64)) : h("", !0)
2375
+ ]))), 256)),
2376
+ Ut.value ? (i(), r("g", nn, [
2377
+ (i(!0), r(d, null, k($.value, (e, s) => (i(), r("g", {
2378
+ key: `tooltip_trap_highlighter_${s}`
2379
+ }, [
2380
+ y("rect", {
2381
+ x: c.value?.left + c.value.width / $.value * s,
2382
+ y: c.value?.top,
2383
+ height: c.value.height < 0 ? 10 : c.value.height,
2384
+ width: c.value.width / $.value < 0 ? 1e-5 : c.value.width / $.value,
2385
+ fill: [P.value, _.value, Ye.value].includes(s) ? v(Ce)(t.value.chart.highlighter.color, t.value.chart.highlighter.opacity) : "transparent",
2386
+ style: { transition: "none !important", animation: "none !important" }
2387
+ }, null, 8, rn)
2388
+ ]))), 128))
2389
+ ])) : h("", !0),
2390
+ ke.value.length ? (i(!0), r(d, { key: 1 }, k(ke.value, (e, s) => (i(), r("g", {
2391
+ key: `serie_bar_${e.id}`,
2392
+ class: Je(`serie_bar_${s}`),
2393
+ style: w(`opacity:${C.value ? C.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2394
+ }, [
2395
+ (i(!0), r(d, null, k(e.plots, (a, n) => (i(), r("g", {
2396
+ key: `bar_plot_${s}_${n}`
2397
+ }, [
2398
+ xe(a.value) ? (i(), r("rect", {
2399
+ key: 0,
2400
+ x: jt(a) + ll.value / 2,
2401
+ y: f.value.useIndividualScale ? Aa(a) : Ma(a),
2402
+ height: f.value.useIndividualScale ? Math.abs(La(a)) : Math.abs($a(a)),
2403
+ width: tl.value - ll.value,
2404
+ rx: t.value.bar.borderRadius,
2405
+ fill: t.value.bar.useGradient ? a.value >= 0 ? `url(#rectGradient_pos_${s}_${z.value})` : `url(#rectGradient_neg_${s}_${z.value})` : e.color,
2406
+ stroke: t.value.bar.border.useSerieColor ? e.color : t.value.bar.border.stroke,
2407
+ "stroke-width": t.value.bar.border.strokeWidth,
2408
+ style: w({
2409
+ transition: v(ne) || !t.value.bar.showTransition ? void 0 : `all ${t.value.bar.transitionDurationMs}ms ease-in-out`
2410
+ })
2411
+ }, null, 12, cn)) : h("", !0),
2412
+ xe(a.value) && l.$slots.pattern ? (i(), r("rect", {
2413
+ key: 1,
2414
+ x: jt(a) - ll.value / 2,
2415
+ y: f.value.useIndividualScale ? Aa(a) : Ma(a),
2416
+ height: f.value.useIndividualScale ? Math.abs(La(a)) : Math.abs($a(a)),
2417
+ width: tl.value - ll.value,
2418
+ rx: t.value.bar.borderRadius,
2419
+ fill: `url(#pattern_${z.value}_${e.slotAbsoluteIndex})`,
2420
+ stroke: t.value.bar.border.useSerieColor ? e.color : t.value.bar.border.stroke,
2421
+ "stroke-width": t.value.bar.border.strokeWidth,
2422
+ style: w({ transition: v(ne) || !t.value.bar.showTransition ? void 0 : `all ${t.value.bar.transitionDurationMs}ms ease-in-out` })
2423
+ }, null, 12, vn)) : h("", !0),
2424
+ a.comment && t.value.chart.comments.show ? (i(), r("foreignObject", {
2425
+ key: 2,
2426
+ style: { overflow: "visible" },
2427
+ height: "12",
2428
+ width: tl.value + t.value.chart.comments.width,
2429
+ x: jt(a) - t.value.chart.comments.width / 2 + t.value.chart.comments.offsetX,
2430
+ y: v(O)(a.y) + t.value.chart.comments.offsetY + 6
2431
+ }, [
2432
+ F(l.$slots, "plot-comment", {
2433
+ plot: { ...a, color: e.color, seriesIndex: s, datapointIndex: n }
2434
+ }, void 0, !0)
2435
+ ], 8, dn)) : h("", !0)
2436
+ ]))), 128))
2437
+ ], 6))), 128)) : h("", !0),
2438
+ !f.value.useIndividualScale && t.value.chart.grid.labels.zeroLine.show ? (i(), r("line", {
2439
+ key: 2,
2440
+ stroke: t.value.chart.grid.stroke,
2441
+ "stroke-width": "1",
2442
+ x1: c.value?.left + q.value,
2443
+ x2: c.value?.right,
2444
+ y1: v(W)(he.value),
2445
+ y2: v(W)(he.value),
2446
+ "stroke-linecap": "round",
2447
+ style: { animation: "none !important" }
2448
+ }, null, 8, hn)) : h("", !0),
2449
+ t.value.chart.highlighter.useLine && (![null, void 0].includes(_.value) || ![null, void 0].includes(P.value)) ? (i(), r("g", fn, [
2450
+ y("line", {
2451
+ x1: c.value?.left + c.value.width / $.value * ((_.value !== null ? _.value : 0) || (P.value !== null ? P.value : 0)) + c.value.width / $.value / 2,
2452
+ x2: c.value?.left + c.value.width / $.value * ((_.value !== null ? _.value : 0) || (P.value !== null ? P.value : 0)) + c.value.width / $.value / 2,
2453
+ y1: v(W)(c.value?.top),
2454
+ y2: v(W)(c.value?.bottom),
2455
+ stroke: t.value.chart.highlighter.color,
2456
+ "stroke-width": t.value.chart.highlighter.lineWidth,
2457
+ "stroke-dasharray": t.value.chart.highlighter.lineDasharray,
2458
+ "stroke-linecap": "round",
2459
+ style: { transition: "none !important", animation: "none !important", "pointer-events": "none" }
2460
+ }, null, 8, mn)
2461
+ ])) : h("", !0),
2462
+ t.value.chart.grid.frame.show ? (i(), r("rect", {
2463
+ key: 4,
2464
+ style: { pointerEvents: "none", transition: "none", animation: "none !important" },
2465
+ x: c.value?.left + q.value < 0 ? 0 : c.value?.left + q.value,
2466
+ y: c.value?.top,
2467
+ width: c.value.width - (t.value.chart.grid.position === "middle" ? 0 : c.value.width / $.value) < 0 ? 0 : c.value.width - (t.value.chart.grid.position === "middle" ? 0 : c.value.width / $.value),
2468
+ height: c.value.height < 0 ? 0 : c.value.height,
2469
+ fill: "transparent",
2470
+ stroke: t.value.chart.grid.frame.stroke,
2471
+ "stroke-width": t.value.chart.grid.frame.strokeWidth,
2472
+ "stroke-linecap": t.value.chart.grid.frame.strokeLinecap,
2473
+ "stroke-linejoin": t.value.chart.grid.frame.strokeLinejoin,
2474
+ "stroke-dasharray": t.value.chart.grid.frame.strokeDasharray
2475
+ }, null, 8, gn)) : h("", !0),
2476
+ t.value.chart.grid.labels.show ? (i(), r("g", {
2477
+ key: 5,
2478
+ ref_key: "scaleLabels",
2479
+ ref: hl
2480
+ }, [
2481
+ f.value.useIndividualScale ? (i(), r(d, { key: 0 }, [
2482
+ (i(!0), r(d, null, k(At.value, (e) => (i(), r("g", null, [
2483
+ y("line", {
2484
+ x1: e.x + q.value - c.value.individualOffsetX,
2485
+ x2: e.x + q.value - c.value.individualOffsetX,
2486
+ y1: f.value.isStacked ? v(W)(c.value?.bottom - e.yOffset - e.individualHeight) : v(W)(c.value?.top),
2487
+ y2: f.value.isStacked ? v(W)(c.value?.bottom - e.yOffset) : v(W)(c.value?.bottom),
2488
+ stroke: e.color,
2489
+ "stroke-width": t.value.chart.grid.stroke,
2490
+ "stroke-linecap": "round",
2491
+ style: w(`opacity:${C.value ? C.value === e.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out; animation: none !important`)
2492
+ }, null, 12, bn)
2493
+ ]))), 256)),
2494
+ (i(!0), r(d, null, k(At.value, (e) => (i(), r("g", {
2495
+ style: w(`opacity:${C.value ? C.value === e.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out`)
2496
+ }, [
2497
+ y("text", {
2498
+ fill: e.color,
2499
+ "font-size": x.value.dataLabels * 0.8,
2500
+ "text-anchor": "middle",
2501
+ transform: `translate(${e.x - x.value.dataLabels * 0.8 / 2 + q.value}, ${f.value.isStacked ? c.value?.bottom - e.yOffset - e.individualHeight / 2 : c.value?.top + c.value.height / 2}) rotate(-90)`
2502
+ }, ue(e.name) + " " + ue(e.scaleLabel && e.unique && e.scaleLabel !== e.id ? `-
2503
+ ${e.scaleLabel}` : ""), 9, pn),
2504
+ (i(!0), r(d, null, k(e.yLabels, (s, a) => (i(), r(d, null, [
2505
+ t.value.chart.grid.labels.yAxis.showCrosshairs ? (i(), r("line", {
2506
+ key: 0,
2507
+ x1: e.x + 3 + q.value - t.value.chart.grid.labels.yAxis.crosshairSize - c.value.individualOffsetX,
2508
+ x2: e.x + q.value - c.value.individualOffsetX,
2509
+ y1: v(W)(s.y),
2510
+ y2: v(W)(s.y),
2511
+ stroke: e.color,
2512
+ "stroke-width": 1,
2513
+ "stroke-linecap": "round",
2514
+ style: { animation: "none !important" }
2515
+ }, null, 8, yn)) : h("", !0)
2516
+ ], 64))), 256)),
2517
+ (i(!0), r(d, null, k(e.yLabels, (s, a) => (i(), r("text", {
2518
+ x: e.x - 5 + q.value - c.value.individualOffsetX,
2519
+ y: v(W)(s.y) + x.value.dataLabels / 3,
2520
+ "font-size": x.value.dataLabels,
2521
+ "text-anchor": "end",
2522
+ fill: e.color
2523
+ }, ue(v(ve)(
2524
+ t.value.chart.grid.labels.yAxis.formatter,
2525
+ s.value,
2526
+ v(Pe)({
2527
+ p: s.prefix,
2528
+ v: s.value,
2529
+ s: s.suffix,
2530
+ r: t.value.chart.grid.labels.yAxis.rounding
2531
+ }),
2532
+ { datapoint: s.datapoint, seriesIndex: a }
2533
+ )), 9, xn))), 256))
2534
+ ], 4))), 256))
2535
+ ], 64)) : (i(!0), r(d, { key: 1 }, k(Na.value, (e, s) => (i(), r("g", {
2536
+ key: `yLabel_${s}`
2537
+ }, [
2538
+ xe(e) && e.value >= Ae.value.min && e.value <= Ae.value.max && t.value.chart.grid.labels.yAxis.showCrosshairs ? (i(), r("line", {
2539
+ key: 0,
2540
+ x1: c.value?.left + q.value,
2541
+ x2: c.value?.left + q.value - t.value.chart.grid.labels.yAxis.crosshairSize,
2542
+ y1: v(W)(e.y),
2543
+ y2: v(W)(e.y),
2544
+ stroke: t.value.chart.grid.stroke,
2545
+ "stroke-width": "1",
2546
+ "stroke-linecap": "round",
2547
+ style: { animation: "none !important" }
2548
+ }, null, 8, kn)) : h("", !0),
2549
+ e.value >= Ae.value.min && e.value <= Ae.value.max ? (i(), r("text", {
2550
+ key: 1,
2551
+ x: c.value.scaleLabelX - t.value.chart.grid.labels.yAxis.crosshairSize,
2552
+ y: v(O)(e.y + x.value.dataLabels / 3),
2553
+ "font-size": x.value.dataLabels,
2554
+ "text-anchor": "end",
2555
+ fill: t.value.chart.grid.labels.color
2556
+ }, ue(xe(e.value) ? v(ve)(
2557
+ t.value.chart.grid.labels.yAxis.formatter,
2558
+ e.value,
2559
+ v(Pe)({
2560
+ p: e.prefix,
2561
+ v: e.value,
2562
+ s: e.suffix,
2563
+ r: t.value.chart.grid.labels.yAxis.rounding
2564
+ })
2565
+ ) : ""), 9, _n)) : h("", !0)
2566
+ ]))), 128))
2567
+ ], 512)) : h("", !0),
2568
+ (i(!0), r(d, null, k(fe.value, (e, s) => (i(), r("g", {
2569
+ key: `serie_plot_${e.id}`,
2570
+ class: Je(`serie_plot_${s}`),
2571
+ style: w(`opacity:${C.value ? C.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2572
+ }, [
2573
+ (i(!0), r(d, null, k(e.plots, (a, n) => (i(), r("g", {
2574
+ key: `circle_plot_${s}_${n}`
2575
+ }, [
2576
+ a && xe(a.value) ? (i(), _e(rl, {
2577
+ key: 0,
2578
+ shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle",
2579
+ color: t.value.plot.useGradient ? `url(#plotGradient_${s}_${z.value})` : t.value.plot.dot.useSerieColor ? e.color : t.value.plot.dot.fill,
2580
+ plot: { x: v(O)(a.x), y: v(O)(a.y) },
2581
+ radius: _.value !== null && _.value === n || P.value !== null && P.value === n ? (Le.value.plot || 6) * 1.5 : Le.value.plot || 6,
2582
+ stroke: t.value.plot.dot.useSerieColor ? t.value.chart.backgroundColor : e.color,
2583
+ strokeWidth: t.value.plot.dot.strokeWidth,
2584
+ transition: v(ne) || !t.value.plot.showTransition || _.value !== null && _.value === n || P.value !== null && P.value === n ? void 0 : `all ${t.value.plot.transitionDurationMs}ms ease-in-out`
2585
+ }, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth", "transition"])) : h("", !0),
2586
+ a.comment && t.value.chart.comments.show ? (i(), r("foreignObject", {
2587
+ key: 1,
2588
+ style: { overflow: "visible" },
2589
+ height: "12",
2590
+ width: t.value.chart.comments.width,
2591
+ x: a.x - t.value.chart.comments.width / 2 + t.value.chart.comments.offsetX,
2592
+ y: a.y + t.value.chart.comments.offsetY + 6
2593
+ }, [
2594
+ y("div", Sn, [
2595
+ F(l.$slots, "plot-comment", {
2596
+ plot: { ...a, color: e.color, seriesIndex: s, datapointIndex: n }
2597
+ }, void 0, !0)
2598
+ ])
2599
+ ], 8, wn)) : h("", !0)
2600
+ ]))), 128))
2601
+ ], 6))), 128)),
2602
+ (i(!0), r(d, null, k(oe.value, (e, s) => (i(), r("g", {
2603
+ key: `serie_line_${e.id}`,
2604
+ class: Je(`serie_line_${s}`),
2605
+ style: w(`opacity:${C.value ? C.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2606
+ }, [
2607
+ e.smooth && e.plots.length > 1 && e.curve ? (i(), r("path", {
2608
+ key: 0,
2609
+ d: `M${e.curve}`,
2610
+ stroke: t.value.chart.backgroundColor,
2611
+ "stroke-width": t.value.line.strokeWidth + 1,
2612
+ "stroke-dasharray": e.dashed ? t.value.line.strokeWidth * 2 : 0,
2613
+ fill: "none",
2614
+ style: w({ transition: v(ne) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
2615
+ }, null, 12, $n)) : e.plots.length > 1 && e.straight ? (i(), r("path", {
2616
+ key: 1,
2617
+ d: `M${e.straight}`,
2618
+ stroke: t.value.chart.backgroundColor,
2619
+ "stroke-width": t.value.line.strokeWidth + 1,
2620
+ "stroke-dasharray": e.dashed ? t.value.line.strokeWidth * 2 : 0,
2621
+ fill: "none",
2622
+ "stroke-linecap": "round",
2623
+ "stroke-linejoin": "round",
2624
+ style: w({ transition: v(ne) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
2625
+ }, null, 12, Ln)) : h("", !0)
2626
+ ], 6))), 128)),
2627
+ l.$slots.pattern ? (i(), r("defs", Mn, [
2628
+ (i(!0), r(d, null, k(Ve.value, (e, s) => F(l.$slots, "pattern", Qe({
2629
+ key: `serie_pattern_slot_${e.id}`
2630
+ }, { ref_for: !0 }, { ...e, seriesIndex: e.slotAbsoluteIndex, patternId: `pattern_${z.value}_${s}` }), void 0, !0)), 128))
2631
+ ])) : h("", !0),
2632
+ Ba.value.length && !f.value.isStacked ? (i(), r("g", An, [
2633
+ (i(!0), r(d, null, k(Ba.value, (e) => (i(), r("path", {
2634
+ key: e.key,
2635
+ d: e.d,
2636
+ fill: e.color,
2637
+ "fill-opacity": t.value.line.interLine.fillOpacity,
2638
+ stroke: "none",
2639
+ "pointer-events": "none",
2640
+ style: w({ transition: v(ne) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
2641
+ }, null, 12, Cn))), 128))
2642
+ ])) : h("", !0),
2643
+ (i(!0), r(d, null, k(oe.value, (e, s) => (i(), r("g", {
2644
+ key: `serie_line_above_${e.id}`,
2645
+ class: Je(`serie_line_${s}`),
2646
+ style: w(`opacity:${C.value ? C.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2647
+ }, [
2648
+ e.useArea && e.plots.length > 1 ? (i(), r("g", Tn, [
2649
+ e.smooth ? (i(!0), r(d, { key: 0 }, k(e.curveAreas, (a, n) => (i(), r(d, { key: n }, [
2650
+ a ? (i(), r("path", {
2651
+ key: 0,
2652
+ d: a,
2653
+ fill: t.value.line.area.useGradient ? `url(#areaGradient_${s}_${z.value})` : v(Ce)(e.color, t.value.line.area.opacity),
2654
+ style: w({ transition: v(ne) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
2655
+ }, null, 12, zn)) : h("", !0),
2656
+ l.$slots.pattern && a ? (i(), r("path", {
2657
+ key: 1,
2658
+ d: a,
2659
+ fill: `url(#pattern_${z.value}_${e.slotAbsoluteIndex})`,
2660
+ style: w({ transition: v(ne) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
2661
+ }, null, 12, In)) : h("", !0)
2662
+ ], 64))), 128)) : (i(!0), r(d, { key: 1 }, k(e.area.split(";"), (a, n) => (i(), r(d, { key: n }, [
2663
+ a ? (i(), r("path", {
2664
+ key: 0,
2665
+ d: `M${a}Z`,
2666
+ fill: t.value.line.area.useGradient ? `url(#areaGradient_${s}_${z.value})` : v(Ce)(e.color, t.value.line.area.opacity),
2667
+ style: w({ transition: v(ne) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
2668
+ }, null, 12, Pn)) : h("", !0),
2669
+ l.$slots.pattern && a ? (i(), r("path", {
2670
+ key: 1,
2671
+ d: `M${a}Z`,
2672
+ fill: `url(#pattern_${z.value}_${e.slotAbsoluteIndex})`,
2673
+ style: w({ transition: v(ne) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
2674
+ }, null, 12, On)) : h("", !0)
2675
+ ], 64))), 128))
2676
+ ])) : h("", !0),
2677
+ !e.hasDashedSegments && e.smooth && e.plots.length > 1 && e.curve ? (i(), r("path", {
2678
+ key: 1,
2679
+ d: `M${e.curve}`,
2680
+ stroke: e.temperatureColors ? `url(#temperature_grad_line_${s}_${z.value})` : e.color,
2681
+ "stroke-width": t.value.line.strokeWidth,
2682
+ "stroke-dasharray": e.dashed ? t.value.line.strokeWidth * 2 : 0,
2683
+ fill: "none",
2684
+ "stroke-linecap": "round",
2685
+ style: w({ transition: v(ne) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
2686
+ }, null, 12, Nn)) : e.hasDashedSegments ? (i(), r(d, { key: 2 }, [
2687
+ e.smooth ? (i(!0), r(d, { key: 0 }, k(e.dashedSmooth, (a) => (i(), r("path", {
2688
+ key: a.path,
2689
+ fill: "none",
2690
+ "stroke-linecap": "round",
2691
+ "stroke-linejoin": "round",
2692
+ d: `M ${a.path}`,
2693
+ stroke: e.temperatureColors ? `url(#temperature_grad_line_${s}_${z.value})` : e.color,
2694
+ "stroke-width": t.value.line.strokeWidth,
2695
+ "stroke-dasharray": a.dashed ? t.value.line.strokeWidth * 2 : 0
2696
+ }, null, 8, Fn))), 128)) : (i(!0), r(d, { key: 1 }, k(e.dashedStraight, (a) => (i(), r("path", {
2697
+ key: a.path,
2698
+ fill: "none",
2699
+ "stroke-linecap": "round",
2700
+ "stroke-linejoin": "round",
2701
+ d: `M ${a.path}`,
2702
+ stroke: e.temperatureColors ? `url(#temperature_grad_line_${s}_${z.value})` : e.color,
2703
+ "stroke-width": t.value.line.strokeWidth,
2704
+ "stroke-dasharray": a.dashed ? t.value.line.strokeWidth * 2 : 0
2705
+ }, null, 8, Vn))), 128))
2706
+ ], 64)) : e.plots.length > 1 && e.straight ? (i(), r("path", {
2707
+ key: 3,
2708
+ d: `M${e.straight}`,
2709
+ stroke: e.temperatureColors ? `url(#temperature_grad_line_${s}_${z.value})` : e.color,
2710
+ "stroke-width": t.value.line.strokeWidth,
2711
+ "stroke-dasharray": e.dashed ? t.value.line.strokeWidth * 2 : 0,
2712
+ fill: "none",
2713
+ "stroke-linecap": "round",
2714
+ "stroke-linejoin": "round",
2715
+ style: w({ transition: v(ne) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
2716
+ }, null, 12, Bn)) : h("", !0),
2717
+ (i(!0), r(d, null, k(e.plots, (a, n) => (i(), r(d, {
2718
+ key: `circle_line_${s}_${n}`
2719
+ }, [
2720
+ !Pa.value.linePlot && a && xe(a.value) || Pa.value.linePlot && a && xe(a.value) && (_.value !== null && _.value === n || P.value !== null && P.value === n) || Va(e.plots, n) ? (i(), _e(rl, {
2721
+ key: 0,
2722
+ shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle",
2723
+ color: t.value.line.useGradient ? `url(#lineGradient_${s}_${z.value})` : t.value.line.dot.useSerieColor ? e.color : t.value.line.dot.fill,
2724
+ plot: { x: v(O)(a.x), y: v(O)(a.y) },
2725
+ radius: _.value !== null && _.value === n || P.value !== null && P.value === n ? (Le.value.line || 6) * 1.5 : (Va(e.plots, n), Le.value.line || 6),
2726
+ stroke: t.value.line.dot.useSerieColor ? t.value.chart.backgroundColor : e.color,
2727
+ strokeWidth: t.value.line.dot.strokeWidth,
2728
+ transition: v(ne) || !t.value.line.showTransition || _.value !== null && _.value === n || P.value !== null && P.value === n ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out`
2729
+ }, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth", "transition"])) : h("", !0),
2730
+ a.comment && t.value.chart.comments.show ? (i(), r("foreignObject", {
2731
+ key: 1,
2732
+ style: { overflow: "visible" },
2733
+ height: "12",
2734
+ width: t.value.chart.comments.width,
2735
+ x: a.x - t.value.chart.comments.width / 2 + t.value.chart.comments.offsetX,
2736
+ y: a.y + t.value.chart.comments.offsetY + 6
2737
+ }, [
2738
+ y("div", Hn, [
2739
+ F(l.$slots, "plot-comment", {
2740
+ plot: { ...a, color: e.color, seriesIndex: s, datapointIndex: n }
2741
+ }, void 0, !0)
2742
+ ])
2743
+ ], 8, Rn)) : h("", !0)
2744
+ ], 64))), 128))
2745
+ ], 6))), 128)),
2746
+ (t.value.bar.labels.show || t.value.bar.serieName.show) && f.value.dataLabels.show ? (i(), r("g", Dn, [
2747
+ (i(!0), r(d, null, k(ke.value, (e, s) => (i(), r(d, {
2748
+ key: `xLabel_bar_${e.id}`
2749
+ }, [
2750
+ (i(!0), r(d, null, k(e.plots, (a, n) => (i(), r(d, {
2751
+ key: `xLabel_bar_${s}_${n}`
2752
+ }, [
2753
+ a && (!Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || _.value !== null && _.value === n || P.value !== null && P.value === n) && t.value.bar.labels.show ? (i(), r("text", {
2754
+ key: 0,
2755
+ x: f.value.useIndividualScale && f.value.isStacked ? a.x + J.value.line / 2 : jt(a) + Be() / 2 - el.value / 2,
2756
+ y: v(O)(a.y) + (a.value >= 0 ? t.value.bar.labels.offsetY : -t.value.bar.labels.offsetY * 3),
2757
+ "text-anchor": "middle",
2758
+ "font-size": x.value.plotLabels,
2759
+ fill: t.value.bar.labels.color,
2760
+ style: w(`opacity:${C.value ? C.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2761
+ }, ue(xe(a.value) ? v(ve)(
2762
+ t.value.bar.labels.formatter,
2763
+ a.value,
2764
+ v(Pe)({
2765
+ p: e.prefix || t.value.chart.labels.prefix,
2766
+ v: a.value,
2767
+ s: e.suffix || t.value.chart.labels.suffix,
2768
+ r: t.value.bar.labels.rounding
2769
+ }),
2770
+ {
2771
+ datapoint: a,
2772
+ serie: e
2773
+ }
2774
+ ) : ""), 13, Wn)) : h("", !0),
2775
+ a && t.value.bar.serieName.show ? (i(), r("text", {
2776
+ key: 1,
2777
+ x: f.value.useIndividualScale && f.value.isStacked ? a.x + J.value.line / 2 : a.x + Be() * 1.1,
2778
+ y: a.y + (a.value > 0 ? t.value.bar.serieName.offsetY : -t.value.bar.serieName.offsetY * 3),
2779
+ "text-anchor": "middle",
2780
+ "font-size": x.value.plotLabels,
2781
+ fill: t.value.bar.serieName.useSerieColor ? e.color : t.value.bar.serieName.color,
2782
+ "font-weight": t.value.bar.serieName.bold ? "bold" : "normal",
2783
+ style: w(`opacity:${C.value ? C.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2784
+ }, ue(t.value.bar.serieName.useAbbreviation ? v(Qu)({
2785
+ source: e.name,
2786
+ length: t.value.bar.serieName.abbreviationSize
2787
+ }) : e.name), 13, En)) : h("", !0)
2788
+ ], 64))), 128))
2789
+ ], 64))), 128))
2790
+ ])) : h("", !0),
2791
+ t.value.plot.labels.show && f.value.dataLabels.show ? (i(), r("g", Yn, [
2792
+ (i(!0), r(d, null, k(fe.value, (e, s) => (i(), r(d, {
2793
+ key: `xLabel_plot_${e.id}`
2794
+ }, [
2795
+ (i(!0), r(d, null, k(e.plots, (a, n) => (i(), r(d, {
2796
+ key: `xLabel_plot_${s}_${n}`
2797
+ }, [
2798
+ a && !Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || _.value !== null && _.value === n || P.value !== null && P.value === n ? (i(), r("text", {
2799
+ key: 0,
2800
+ x: a.x,
2801
+ y: a.y + t.value.plot.labels.offsetY,
2802
+ "text-anchor": "middle",
2803
+ "font-size": x.value.plotLabels,
2804
+ fill: t.value.plot.labels.color,
2805
+ style: w(`opacity:${C.value ? C.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2806
+ }, ue(xe(a.value) ? v(ve)(
2807
+ t.value.plot.labels.formatter,
2808
+ a.value,
2809
+ v(Pe)({
2810
+ p: e.prefix || t.value.chart.labels.prefix,
2811
+ v: a.value,
2812
+ s: e.suffix || t.value.chart.labels.suffix,
2813
+ r: t.value.plot.labels.rounding
2814
+ }),
2815
+ {
2816
+ datapoint: a,
2817
+ serie: e
2818
+ }
2819
+ ) : ""), 13, Xn)) : h("", !0)
2820
+ ], 64))), 128))
2821
+ ], 64))), 128))
2822
+ ])) : (i(), r("g", Gn, [
2823
+ (i(!0), r(d, null, k(fe.value, (e, s) => (i(), r(d, {
2824
+ key: `xLabel_plot_${e.id}`
2825
+ }, [
2826
+ (i(!0), r(d, null, k(e.plots, (a, n) => (i(), r(d, {
2827
+ key: `xLabel_plot_${s}_${n}`
2828
+ }, [
2829
+ t.value.plot.tag.followValue ? (i(), r(d, { key: 1 }, [
2830
+ [P.value, _.value, Ye.value].includes(n) && e.useTag ? (i(), r("line", {
2831
+ key: 0,
2832
+ class: "vue-ui-xy-tag-plot",
2833
+ x1: c.value?.left,
2834
+ x2: c.value?.right,
2835
+ y1: a.y,
2836
+ y2: a.y,
2837
+ "stroke-width": 1,
2838
+ "stroke-linecap": "round",
2839
+ "stroke-dasharray": "2",
2840
+ stroke: e.color
2841
+ }, null, 8, Jn)) : h("", !0)
2842
+ ], 64)) : (i(), r(d, { key: 0 }, [
2843
+ a && n === 0 && e.useTag && e.useTag === "start" ? (i(), r("foreignObject", {
2844
+ key: 0,
2845
+ x: a.x,
2846
+ y: a.y - 20,
2847
+ height: 24,
2848
+ width: "150",
2849
+ style: w(`overflow: visible; opacity:${C.value ? C.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2850
+ }, [
2851
+ y("div", {
2852
+ style: w(`padding: 3px; background:${v(Ce)(e.color, 80)};color:${v(He)(e.color)};width:fit-content;font-size:${x.value.plotLabels}px;border-radius: 2px;`),
2853
+ innerHTML: v(ve)(
2854
+ t.value.plot.tag.formatter,
2855
+ a.value,
2856
+ e.name,
2857
+ {
2858
+ datapoint: a,
2859
+ seriesIndex: n,
2860
+ serieName: e.name
2861
+ }
2862
+ )
2863
+ }, null, 12, Un)
2864
+ ], 12, qn)) : h("", !0),
2865
+ a && n === e.plots.length - 1 && e.useTag && e.useTag === "end" ? (i(), r("foreignObject", {
2866
+ key: 1,
2867
+ x: a.x - e.name.length * (x.value.plotLabels / 2),
2868
+ y: a.y - 20,
2869
+ height: 24,
2870
+ width: "150",
2871
+ style: w(`overflow: visible; opacity:${C.value ? C.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2872
+ }, [
2873
+ y("div", {
2874
+ style: w(`padding: 3px; background:${v(Ce)(e.color, 80)};color:${v(He)(e.color)};width:fit-content;font-size:${x.value.plotLabels}px;border-radius: 2px;`),
2875
+ innerHTML: v(ve)(
2876
+ t.value.plot.tag.formatter,
2877
+ a.value,
2878
+ e.name,
2879
+ {
2880
+ datapoint: a,
2881
+ seriesIndex: n,
2882
+ serieName: e.name
2883
+ }
2884
+ )
2885
+ }, null, 12, Kn)
2886
+ ], 12, Zn)) : h("", !0)
2887
+ ], 64))
2888
+ ], 64))), 128))
2889
+ ], 64))), 128))
2890
+ ])),
2891
+ t.value.line.labels.show && f.value.dataLabels.show ? (i(), r("g", Qn, [
2892
+ (i(!0), r(d, null, k(oe.value, (e, s) => (i(), r(d, {
2893
+ key: `xLabel_line_${e.id}`
2894
+ }, [
2895
+ (i(!0), r(d, null, k(e.plots, (a, n) => (i(), r(d, {
2896
+ key: `xLabel_line_${s}_${n}`
2897
+ }, [
2898
+ a && !Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || _.value !== null && _.value === n || P.value !== null && P.value === n ? (i(), r("text", {
2899
+ key: 0,
2900
+ x: a.x,
2901
+ y: a.y + (a.value >= 0 ? t.value.line.labels.offsetY : -t.value.line.labels.offsetY * 3),
2902
+ "text-anchor": "middle",
2903
+ "font-size": x.value.plotLabels,
2904
+ fill: t.value.line.labels.color,
2905
+ style: w(`opacity:${C.value ? C.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2906
+ }, ue(xe(a.value) ? v(ve)(
2907
+ t.value.line.labels.formatter,
2908
+ a.value,
2909
+ v(Pe)({
2910
+ p: e.prefix || t.value.chart.labels.prefix,
2911
+ v: a.value,
2912
+ s: e.suffix || t.value.chart.labels.suffix,
2913
+ r: t.value.line.labels.rounding
2914
+ }),
2915
+ {
2916
+ datapoint: a,
2917
+ serie: e
2918
+ }
2919
+ ) : ""), 13, jn)) : h("", !0)
2920
+ ], 64))), 128))
2921
+ ], 64))), 128))
2922
+ ])) : (i(), r("g", ei, [
2923
+ (i(!0), r(d, null, k(oe.value, (e, s) => (i(), r(d, {
2924
+ key: `xLabel_line_${e.id}`
2925
+ }, [
2926
+ (i(!0), r(d, null, k(e.plots, (a, n) => (i(), r(d, {
2927
+ key: `xLabel_line_${s}_${n}`
2928
+ }, [
2929
+ t.value.line.tag.followValue ? (i(), r(d, { key: 1 }, [
2930
+ [P.value, _.value, Ye.value].includes(n) && e.useTag ? (i(), r("line", {
2931
+ key: 0,
2932
+ class: "vue-ui-xy-tag-line",
2933
+ x1: c.value?.left,
2934
+ x2: c.value?.right,
2935
+ y1: a.y,
2936
+ y2: a.y,
2937
+ "stroke-width": 1,
2938
+ "stroke-linecap": "round",
2939
+ "stroke-dasharray": "2",
2940
+ stroke: e.color
2941
+ }, null, 8, ui)) : h("", !0)
2942
+ ], 64)) : (i(), r(d, { key: 0 }, [
2943
+ a && n === 0 && e.useTag && e.useTag === "start" ? (i(), r("foreignObject", {
2944
+ key: 0,
2945
+ x: a.x,
2946
+ y: a.y - 20,
2947
+ height: 24,
2948
+ width: "150",
2949
+ style: w(`overflow: visible; opacity:${C.value ? C.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2950
+ }, [
2951
+ y("div", {
2952
+ style: w(`padding: 3px; background:${v(Ce)(e.color, 80)};color:${v(He)(e.color)};width:fit-content;font-size:${x.value.plotLabels}px;border-radius: 2px;`),
2953
+ innerHTML: v(ve)(
2954
+ t.value.line.tag.formatter,
2955
+ a.value,
2956
+ e.name,
2957
+ {
2958
+ datapoint: a,
2959
+ seriesIndex: n,
2960
+ serieName: e.name
2961
+ }
2962
+ )
2963
+ }, null, 12, li)
2964
+ ], 12, ti)) : h("", !0),
2965
+ a && n === e.plots.length - 1 && e.useTag && e.useTag === "end" ? (i(), r("foreignObject", {
2966
+ key: 1,
2967
+ x: a.x,
2968
+ y: a.y - 20,
2969
+ height: 24,
2970
+ width: "150",
2971
+ style: w(`overflow: visible; opacity:${C.value ? C.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2972
+ }, [
2973
+ y("div", {
2974
+ style: w(`padding: 3px; background:${v(Ce)(e.color, 80)};color:${v(He)(e.color)};width:fit-content;font-size:${x.value.plotLabels}px;border-radius: 2px;`),
2975
+ innerHTML: v(ve)(
2976
+ t.value.line.tag.formatter,
2977
+ a.value,
2978
+ e.name,
2979
+ {
2980
+ datapoint: a,
2981
+ seriesIndex: n,
2982
+ serieName: e.name
2983
+ }
2984
+ )
2985
+ }, null, 12, oi)
2986
+ ], 12, ai)) : h("", !0)
2987
+ ], 64))
2988
+ ], 64))), 128))
2989
+ ], 64))), 128))
2990
+ ])),
2991
+ (i(!0), r(d, null, k(oe.value, (e, s) => (i(), r(d, {
2992
+ key: `xLabel_line_${e.id}`
2993
+ }, [
2994
+ (i(!0), r(d, null, k(e.plots, (a, n) => (i(), r(d, {
2995
+ key: `xLabel_line_${s}_${n}`
2996
+ }, [
2997
+ a && n === 0 && e.showSerieName && e.showSerieName === "start" ? (i(), r("text", {
2998
+ key: 0,
2999
+ x: a.x - x.value.plotLabels,
3000
+ y: a.y,
3001
+ "font-size": x.value.plotLabels,
3002
+ "text-anchor": "end",
3003
+ fill: e.color,
3004
+ innerHTML: v(il)({
3005
+ content: e.name,
3006
+ fontSize: x.value.plotLabels,
3007
+ fill: e.color,
3008
+ x: a.x - x.value.plotLabels,
3009
+ y: a.y,
3010
+ maxWords: 2
3011
+ }),
3012
+ style: w(`opacity:${C.value ? C.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3013
+ }, null, 12, si)) : h("", !0),
3014
+ a && n === e.plots.length - 1 && e.showSerieName && e.showSerieName === "end" ? (i(), r("text", {
3015
+ key: 1,
3016
+ x: a.x + x.value.plotLabels,
3017
+ y: a.y,
3018
+ "font-size": x.value.plotLabels,
3019
+ "text-anchor": "start",
3020
+ fill: e.color,
3021
+ innerHTML: v(il)({
3022
+ content: e.name,
3023
+ fontSize: x.value.plotLabels,
3024
+ fill: e.color,
3025
+ x: a.x + x.value.plotLabels,
3026
+ y: a.y,
3027
+ maxWords: 2
3028
+ }),
3029
+ style: w(`opacity:${C.value ? C.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3030
+ }, null, 12, ni)) : h("", !0)
3031
+ ], 64))), 128))
3032
+ ], 64))), 128)),
3033
+ (i(!0), r(d, null, k(fe.value, (e, s) => (i(), r(d, {
3034
+ key: `xLabel_plot_${e.id}`
3035
+ }, [
3036
+ (i(!0), r(d, null, k(e.plots, (a, n) => (i(), r(d, {
3037
+ key: `xLabel_plot_${s}_${n}`
3038
+ }, [
3039
+ a && n === 0 && e.showSerieName && e.showSerieName === "start" ? (i(), r("text", {
3040
+ key: 0,
3041
+ x: a.x - x.value.plotLabels,
3042
+ y: a.y,
3043
+ "font-size": x.value.plotLabels,
3044
+ "text-anchor": "end",
3045
+ fill: e.color,
3046
+ innerHTML: v(il)({
3047
+ content: e.name,
3048
+ fontSize: x.value.plotLabels,
3049
+ fill: e.color,
3050
+ x: a.x - x.value.plotLabels,
3051
+ y: a.y,
3052
+ maxWords: 2
3053
+ }),
3054
+ style: w(`opacity:${C.value ? C.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3055
+ }, null, 12, ii)) : h("", !0),
3056
+ a && n === e.plots.length - 1 && e.showSerieName && e.showSerieName === "end" ? (i(), r("text", {
3057
+ key: 1,
3058
+ x: a.x + x.value.plotLabels,
3059
+ y: a.y,
3060
+ "font-size": x.value.plotLabels,
3061
+ "text-anchor": "start",
3062
+ fill: e.color,
3063
+ innerHTML: v(il)({
3064
+ content: e.name,
3065
+ fontSize: x.value.plotLabels,
3066
+ fill: e.color,
3067
+ x: a.x + x.value.plotLabels,
3068
+ y: a.y,
3069
+ maxWords: 2
3070
+ }),
3071
+ style: w(`opacity:${C.value ? C.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3072
+ }, null, 12, ri)) : h("", !0)
3073
+ ], 64))), 128))
3074
+ ], 64))), 128)),
3075
+ (i(!0), r(d, null, k([...fe.value, ...oe.value, ...ke.value], (e, s) => (i(), r(d, {
3076
+ key: `progression-${s}`
3077
+ }, [
3078
+ Object.hasOwn(e, "useProgression") && e.useProgression === !0 && !isNaN(v(Se)(e.plots).trend) ? (i(), r("g", ci, [
3079
+ y("defs", null, [
3080
+ y("marker", {
3081
+ id: `progression_arrow_${s}`,
3082
+ markerWidth: "9",
3083
+ markerHeight: "9",
3084
+ viewBox: "-1 -1 9 9",
3085
+ markerUnits: "userSpaceOnUse",
3086
+ refX: "7",
3087
+ refY: 7 / 2,
3088
+ orient: "auto",
3089
+ overflow: "visible"
3090
+ }, [
3091
+ y("polygon", {
3092
+ points: "0,0 7,3.5 0,7",
3093
+ fill: e.color,
3094
+ stroke: t.value.chart.backgroundColor,
3095
+ "stroke-width": "1",
3096
+ "stroke-linejoin": "round"
3097
+ }, null, 8, di)
3098
+ ], 8, vi)
3099
+ ]),
3100
+ e.plots.length > 1 ? (i(), r("line", {
3101
+ key: 0,
3102
+ x1: v(Se)(e.plots).x1 + (e.type === "bar" ? Be() : 0),
3103
+ x2: v(Se)(e.plots).x2 + (e.type === "bar" ? Be() : 0),
3104
+ y1: v(W)(v(Se)(e.plots).y1),
3105
+ y2: v(W)(v(Se)(e.plots).y2),
3106
+ "stroke-width": 1,
3107
+ stroke: t.value.chart.backgroundColor,
3108
+ "stroke-dasharray": 2,
3109
+ "stroke-linecap": "round",
3110
+ "stroke-linejoin": "round",
3111
+ "marker-end": `url(#progression_arrow_${s})`
3112
+ }, null, 8, hi)) : h("", !0),
3113
+ e.plots.length > 1 ? (i(), r("line", {
3114
+ key: 1,
3115
+ x1: v(Se)(e.plots).x1 + (e.type === "bar" ? Be() : 0),
3116
+ x2: v(Se)(e.plots).x2 + (e.type === "bar" ? Be() : 0),
3117
+ y1: v(W)(v(Se)(e.plots).y1),
3118
+ y2: v(W)(v(Se)(e.plots).y2),
3119
+ "stroke-width": 1,
3120
+ stroke: e.color,
3121
+ "stroke-dasharray": 2,
3122
+ "stroke-linecap": "round",
3123
+ "stroke-linejoin": "round",
3124
+ "marker-end": `url(#progression_arrow_${s})`
3125
+ }, null, 8, fi)) : h("", !0),
3126
+ e.plots.length > 1 ? (i(), r("text", {
3127
+ key: 2,
3128
+ "text-anchor": "middle",
3129
+ x: v(Se)(e.plots).x2 + (e.type === "bar" ? Be() : 0),
3130
+ y: v(Se)(e.plots).y2 - 12,
3131
+ "font-size": x.value.plotLabels,
3132
+ fill: e.color,
3133
+ stroke: t.value.chart.backgroundColor,
3134
+ "stroke-width": 4,
3135
+ "stroke-linecap": "round",
3136
+ "stroke-linejoin": "round",
3137
+ "paint-order": "stroke fill"
3138
+ }, ue(v(Pe)({
3139
+ v: v(Se)(e.plots).trend * 100,
3140
+ s: "%",
3141
+ r: 2
3142
+ })), 9, mi)) : h("", !0)
3143
+ ])) : h("", !0)
3144
+ ], 64))), 128)),
3145
+ f.value.useIndividualScale && !f.value.isStacked ? (i(), r(d, { key: 13 }, [
3146
+ y("defs", null, [
3147
+ (i(!0), r(d, null, k(At.value, (e, s) => (i(), r("linearGradient", {
3148
+ id: `individual_scale_gradient_${z.value}_${s}`,
3149
+ x1: "0%",
3150
+ x2: "100%",
3151
+ y1: "0%",
3152
+ y2: "0%"
3153
+ }, [
3154
+ y("stop", {
3155
+ offset: "0%",
3156
+ "stop-color": t.value.chart.backgroundColor,
3157
+ "stop-opacity": "0"
3158
+ }, null, 8, bi),
3159
+ y("stop", {
3160
+ offset: "100%",
3161
+ "stop-color": e.color,
3162
+ "stop-opacity": "0.2"
3163
+ }, null, 8, pi)
3164
+ ], 8, gi))), 256))
3165
+ ]),
3166
+ (i(!0), r(d, null, k(At.value, (e, s) => (i(), r("rect", {
3167
+ x: e.x - t.value.chart.grid.labels.yAxis.labelWidth + q.value - c.value.individualOffsetX,
3168
+ y: c.value?.top,
3169
+ width: t.value.chart.grid.labels.yAxis.labelWidth + c.value.individualOffsetX,
3170
+ height: c.value.height < 0 ? 10 : c.value.height,
3171
+ fill: C.value === e.groupId ? `url(#individual_scale_gradient_${z.value}_${s})` : "transparent",
3172
+ onMouseenter: (a) => C.value = e.groupId,
3173
+ onMouseleave: o[0] || (o[0] = (a) => C.value = null)
3174
+ }, null, 40, yi))), 256))
3175
+ ], 64)) : h("", !0),
3176
+ y("g", null, [
3177
+ t.value.chart.grid.labels.axis.yLabel && !f.value.useIndividualScale ? (i(), r("text", {
3178
+ key: 0,
3179
+ ref_key: "yAxisLabel",
3180
+ ref: dl,
3181
+ "font-size": x.value.yAxis,
3182
+ fill: t.value.chart.grid.labels.color,
3183
+ transform: `translate(${t.value.chart.grid.labels.axis.fontSize}, ${c.value?.top + c.value.height / 2}) rotate(-90)`,
3184
+ "text-anchor": "middle",
3185
+ style: { transition: "none" }
3186
+ }, ue(t.value.chart.grid.labels.axis.yLabel), 9, xi)) : h("", !0),
3187
+ t.value.chart.grid.labels.axis.xLabel ? (i(), r("text", {
3188
+ key: 1,
3189
+ ref_key: "xAxisLabel",
3190
+ ref: vl,
3191
+ "text-anchor": "middle",
3192
+ x: ee.value / 2,
3193
+ y: de.value - 3,
3194
+ "font-size": x.value.yAxis,
3195
+ fill: t.value.chart.grid.labels.color
3196
+ }, ue(t.value.chart.grid.labels.axis.xLabel), 9, ki)) : h("", !0)
3197
+ ]),
3198
+ t.value.chart.grid.labels.xAxisLabels.show ? (i(), r("g", {
3199
+ key: 14,
3200
+ ref_key: "timeLabelsEls",
3201
+ ref: Ft
3202
+ }, [
3203
+ l.$slots["time-label"] ? (i(!0), r(d, { key: 0 }, k(Kt.value, (e, s) => F(l.$slots, "time-label", Qe({
3204
+ key: `time_label_${e.id}`,
3205
+ ref_for: !0
3206
+ }, {
3207
+ x: c.value?.left + c.value.width / $.value * s + c.value.width / $.value / 2,
3208
+ y: c.value?.bottom,
3209
+ fontSize: x.value.xAxis,
3210
+ fill: t.value.chart.grid.labels.xAxisLabels.color,
3211
+ transform: `translate(${c.value?.left + c.value.width / $.value * s + c.value.width / $.value / 2}, ${c.value?.bottom + x.value.xAxis * 1.3 + t.value.chart.grid.labels.xAxisLabels.yOffset}), rotate(${t.value.chart.grid.labels.xAxisLabels.rotation})`,
3212
+ absoluteIndex: e.absoluteIndex,
3213
+ content: e.text,
3214
+ textAnchor: t.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : t.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
3215
+ show: e && e.text
3216
+ }), void 0, !0)), 128)) : (i(!0), r(d, { key: 1 }, k(Kt.value, (e, s) => (i(), r("g", {
3217
+ key: `time_label_${s}`
3218
+ }, [
3219
+ e && e.text ? (i(), r(d, { key: 0 }, [
3220
+ String(e.text).includes(`
3221
+ `) ? (i(), r("text", {
3222
+ key: 1,
3223
+ class: "vue-data-ui-time-label",
3224
+ "text-anchor": t.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : t.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
3225
+ "font-size": x.value.xAxis,
3226
+ fill: t.value.chart.grid.labels.xAxisLabels.color,
3227
+ transform: `translate(${c.value?.left + c.value.width / $.value * s + c.value.width / $.value / 2}, ${c.value?.bottom + x.value.xAxis * 1.5}), rotate(${t.value.chart.grid.labels.xAxisLabels.rotation})`,
3228
+ style: w({
3229
+ cursor: da() && Xe.value ? "pointer" : "default"
3230
+ }),
3231
+ innerHTML: v(ju)({
3232
+ content: String(e.text),
3233
+ fontSize: x.value.xAxis,
3234
+ fill: t.value.chart.grid.labels.xAxisLabels.color,
3235
+ x: 0,
3236
+ y: 0
3237
+ }),
3238
+ onClick: () => ba(e, s)
3239
+ }, null, 12, wi)) : (i(), r("text", {
3240
+ key: 0,
3241
+ class: "vue-data-ui-time-label",
3242
+ "text-anchor": t.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : t.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
3243
+ "font-size": x.value.xAxis,
3244
+ fill: t.value.chart.grid.labels.xAxisLabels.color,
3245
+ transform: `translate(${c.value?.left + c.value.width / $.value * s + c.value.width / $.value / 2}, ${c.value?.bottom + x.value.xAxis * 1.5}), rotate(${t.value.chart.grid.labels.xAxisLabels.rotation})`,
3246
+ style: w({
3247
+ cursor: da() && Xe.value ? "pointer" : "default"
3248
+ }),
3249
+ onClick: () => ba(e, s)
3250
+ }, ue(e.text || ""), 13, _i))
3251
+ ], 64)) : h("", !0)
3252
+ ]))), 128))
3253
+ ], 512)) : h("", !0),
3254
+ Fa.value.length && !f.value.isStacked ? (i(), r("g", Si, [
3255
+ (i(!0), r(d, null, k(Fa.value, (e) => (i(), r("g", {
3256
+ key: e.uid
3257
+ }, [
3258
+ e.yTop && e.show && isFinite(e.yTop) ? (i(), r("line", {
3259
+ key: 0,
3260
+ x1: e.x1,
3261
+ y1: e.yTop,
3262
+ x2: e.x2,
3263
+ y2: e.yTop,
3264
+ stroke: e.config.line.stroke,
3265
+ "stroke-width": e.config.line.strokeWidth,
3266
+ "stroke-dasharray": e.config.line.strokeDasharray,
3267
+ "stroke-linecap": "round",
3268
+ style: { animation: "none !important" }
3269
+ }, null, 8, $i)) : h("", !0),
3270
+ e.yBottom && e.show && isFinite(e.yBottom) ? (i(), r("line", {
3271
+ key: 1,
3272
+ x1: e.x1,
3273
+ y1: e.yBottom,
3274
+ x2: e.x2,
3275
+ y2: e.yBottom,
3276
+ stroke: e.config.line.stroke,
3277
+ "stroke-width": e.config.line.strokeWidth,
3278
+ "stroke-dasharray": e.config.line.strokeDasharray,
3279
+ "stroke-linecap": "round",
3280
+ style: { animation: "none !important" }
3281
+ }, null, 8, Li)) : h("", !0),
3282
+ e.hasArea && e.show && isFinite(e.yTop) && isFinite(e.yBottom) ? (i(), r("rect", {
3283
+ key: 2,
3284
+ y: Math.min(e.yTop, e.yBottom),
3285
+ x: e.x1,
3286
+ width: c.value.width,
3287
+ height: v(O)(e.areaHeight, 0),
3288
+ fill: v(Ce)(e.config.area.fill, e.config.area.opacity),
3289
+ style: { animation: "none !important" }
3290
+ }, null, 8, Mi)) : h("", !0),
3291
+ e.config.label.text && e.show && isFinite(e._box.y) ? (i(), r("rect", Qe({
3292
+ key: 3,
3293
+ class: "vue-ui-xy-annotation-label-box"
3294
+ }, { ref_for: !0 }, e._box, { style: { animation: "none !important", transition: "none !important" } }), null, 16)) : h("", !0),
3295
+ e.config.label.text && e.show && isFinite(e._text.y) ? (i(), r("text", {
3296
+ key: 4,
3297
+ id: e.id,
3298
+ class: "vue-ui-xy-annotation-label",
3299
+ x: e._text.x,
3300
+ y: e._text.y,
3301
+ "font-size": e.config.label.fontSize,
3302
+ fill: e.config.label.color,
3303
+ "text-anchor": e.config.label.textAnchor
3304
+ }, ue(e.config.label.text), 9, Ai)) : h("", !0)
3305
+ ]))), 128))
3306
+ ])) : h("", !0),
3307
+ t.value.chart.timeTag.show && (![null, void 0].includes(_.value) || ![null, void 0].includes(P.value)) ? (i(), r("g", Ci, [
3308
+ (i(), r("foreignObject", {
3309
+ x: xu(),
3310
+ y: c.value?.bottom,
3311
+ width: "200",
3312
+ height: "40",
3313
+ style: { overflow: "visible !important" }
3314
+ }, [
3315
+ y("div", {
3316
+ ref_key: "timeTagEl",
3317
+ ref: Ka,
3318
+ class: "vue-ui-xy-time-tag",
3319
+ style: w(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${t.value.chart.timeTag.backgroundColor};color:${t.value.chart.timeTag.color};font-size:${t.value.chart.timeTag.fontSize}px`),
3320
+ innerHTML: ku.value
3321
+ }, null, 12, zi)
3322
+ ], 8, Ti)),
3323
+ y("circle", {
3324
+ cx: c.value?.left + c.value.width / $.value * ((_.value !== null ? _.value : 0) || (P.value !== null ? P.value : 0)) + c.value.width / $.value / 2,
3325
+ cy: c.value?.bottom,
3326
+ r: t.value.chart.timeTag.circleMarker.radius,
3327
+ fill: t.value.chart.timeTag.circleMarker.color
3328
+ }, null, 8, Ii)
3329
+ ])) : h("", !0)
3330
+ ])) : h("", !0),
3331
+ aa.value ? (i(), r("rect", Qe({ key: 2 }, Ro.value, {
3332
+ "data-start": m.value.start,
3333
+ "data-end": m.value.end
3334
+ }), null, 16, Pi)) : h("", !0),
3335
+ F(l.$slots, "svg", {
3336
+ svg: {
3337
+ ...Oo.value,
3338
+ isPrintingImg: v(Et) | v(_l) | Ht.value,
3339
+ isPrintingSvg: Dt.value,
3340
+ data: [...oe.value, ...ke.value, ...fe.value],
3341
+ drawingArea: c.value
3342
+ }
3343
+ }, void 0, !0)
3344
+ ], 512)
3345
+ ], 46, $s)),
3346
+ l.$slots.hint ? (i(), r("div", Oi, [
3347
+ F(l.$slots, "hint", ge(be({ hint: t.value.a11y.translations.keyboardNavigation, isVisible: Tl.value })), void 0, !0)
3348
+ ])) : h("", !0)
3349
+ ]),
3350
+ l.$slots.watermark ? (i(), r("div", Ni, [
3351
+ F(l.$slots, "watermark", ge(be({ isPrinting: v(Et) || v(_l) || Ht.value || Dt.value })), void 0, !0)
3352
+ ])) : h("", !0),
3353
+ (i(!0), r(d, null, k(oe.value, (e, s) => (i(), r(d, {
3354
+ key: `tag_line_${e.id}`
3355
+ }, [
3356
+ (i(!0), r(d, null, k(e.plots, (a, n) => (i(), r(d, {
3357
+ key: `tag_line_${s}_${n}`
3358
+ }, [
3359
+ [P.value, _.value, Ye.value].includes(n) && e.useTag && e.useTag === "end" && t.value.line.tag.followValue ? (i(), r("div", {
3360
+ key: 0,
3361
+ ref_for: !0,
3362
+ ref: (u) => qt(s, n, u, "right", "line"),
3363
+ class: "vue-ui-xy-tag",
3364
+ "data-tag": "right",
3365
+ style: w({
3366
+ position: "fixed",
3367
+ top: v(De)({
3368
+ svgElement: ae.value,
3369
+ x: c.value?.right + t.value.line.tag.fontSize / 1.5,
3370
+ y: a.y,
3371
+ element: Oe.value[`${s}_${n}_right_line`],
3372
+ position: "right"
3373
+ })?.top + "px",
3374
+ left: v(De)({
3375
+ svgElement: ae.value,
3376
+ x: c.value?.right + t.value.line.tag.fontSize / 1.5,
3377
+ y: a.y,
3378
+ element: Oe.value[`${s}_${n}_right_line`],
3379
+ position: "right"
3380
+ })?.left + "px",
3381
+ height: "fit-content",
3382
+ width: "fit-content",
3383
+ background: e.color,
3384
+ color: v(He)(e.color),
3385
+ padding: "0 6px",
3386
+ fontSize: t.value.line.tag.fontSize + "px",
3387
+ opacity: 1
3388
+ })
3389
+ }, [
3390
+ (i(), r("svg", Fi, [
3391
+ y("path", {
3392
+ d: "M 0,10 10,0 10,20 Z",
3393
+ fill: e.color,
3394
+ stroke: "none"
3395
+ }, null, 8, Vi)
3396
+ ])),
3397
+ y("div", {
3398
+ class: "vue-ui-xy-tag-content",
3399
+ innerHTML: v(ve)(
3400
+ t.value.line.tag.formatter,
3401
+ a.value,
3402
+ e.name,
3403
+ {
3404
+ datapoint: a,
3405
+ seriesIndex: n,
3406
+ serieName: e.name
3407
+ }
3408
+ )
3409
+ }, null, 8, Bi)
3410
+ ], 4)) : h("", !0),
3411
+ [P.value, _.value, Ye.value].includes(n) && e.useTag && e.useTag === "start" && t.value.line.tag.followValue ? (i(), r("div", {
3412
+ key: 1,
3413
+ ref_for: !0,
3414
+ ref: (u) => qt(s, n, u, "left", "line"),
3415
+ class: "vue-ui-xy-tag",
3416
+ "data-tag": "left",
3417
+ style: w({
3418
+ position: "fixed",
3419
+ top: v(De)({
3420
+ svgElement: ae.value,
3421
+ x: c.value?.left - t.value.line.tag.fontSize / 1.5,
3422
+ y: a.y,
3423
+ element: Oe.value[`${s}_${n}_left_line`],
3424
+ position: "left"
3425
+ })?.top + "px",
3426
+ left: v(De)({
3427
+ svgElement: ae.value,
3428
+ x: c.value?.left - t.value.line.tag.fontSize / 1.5,
3429
+ y: a.y,
3430
+ element: Oe.value[`${s}_${n}_left_line`],
3431
+ position: "left"
3432
+ })?.left + "px",
3433
+ height: "fit-content",
3434
+ width: "fit-content",
3435
+ background: e.color,
3436
+ color: v(He)(e.color),
3437
+ padding: "0 6px",
3438
+ fontSize: t.value.line.tag.fontSize + "px",
3439
+ opacity: 1
3440
+ })
3441
+ }, [
3442
+ (i(), r("svg", Ri, [
3443
+ y("path", {
3444
+ d: "M 0,0 10,10 0,20 Z",
3445
+ fill: e.color,
3446
+ stroke: "none"
3447
+ }, null, 8, Hi)
3448
+ ])),
3449
+ y("div", {
3450
+ class: "vue-ui-xy-tag-content",
3451
+ innerHTML: v(ve)(
3452
+ t.value.line.tag.formatter,
3453
+ a.value,
3454
+ e.name,
3455
+ {
3456
+ datapoint: a,
3457
+ seriesIndex: n,
3458
+ serieName: e.name
3459
+ }
3460
+ )
3461
+ }, null, 8, Di)
3462
+ ], 4)) : h("", !0)
3463
+ ], 64))), 128))
3464
+ ], 64))), 128)),
3465
+ (i(!0), r(d, null, k(fe.value, (e, s) => (i(), r(d, {
3466
+ key: `tag_plot_${e.id}`
3467
+ }, [
3468
+ (i(!0), r(d, null, k(e.plots, (a, n) => (i(), r(d, {
3469
+ key: `tag_plot_${s}_${n}`
3470
+ }, [
3471
+ [P.value, _.value, Ye.value].includes(n) && e.useTag && e.useTag === "end" && t.value.plot.tag.followValue ? (i(), r("div", {
3472
+ key: 0,
3473
+ ref_for: !0,
3474
+ ref: (u) => qt(s, n, u, "right", "plot"),
3475
+ class: "vue-ui-xy-tag",
3476
+ "data-tag": "right",
3477
+ style: w({
3478
+ position: "fixed",
3479
+ top: v(De)({
3480
+ svgElement: ae.value,
3481
+ x: c.value?.right + t.value.plot.tag.fontSize / 1.5,
3482
+ y: a.y,
3483
+ element: Oe.value[`${s}_${n}_right_plot`],
3484
+ position: "right"
3485
+ })?.top + "px",
3486
+ left: v(De)({
3487
+ svgElement: ae.value,
3488
+ x: c.value?.right + t.value.plot.tag.fontSize / 1.5,
3489
+ y: a.y,
3490
+ element: Oe.value[`${s}_${n}_right_plot`],
3491
+ position: "right"
3492
+ })?.left + "px",
3493
+ height: "fit-content",
3494
+ width: "fit-content",
3495
+ background: e.color,
3496
+ color: v(He)(e.color),
3497
+ padding: "0 6px",
3498
+ fontSize: t.value.plot.tag.fontSize + "px",
3499
+ opacity: 1
3500
+ })
3501
+ }, [
3502
+ (i(), r("svg", Wi, [
3503
+ y("path", {
3504
+ d: "M 0,10 10,0 10,20 Z",
3505
+ fill: e.color,
3506
+ stroke: "none"
3507
+ }, null, 8, Ei)
3508
+ ])),
3509
+ y("div", {
3510
+ class: "vue-ui-xy-tag-content",
3511
+ innerHTML: v(ve)(
3512
+ t.value.plot.tag.formatter,
3513
+ a.value,
3514
+ e.name,
3515
+ {
3516
+ datapoint: a,
3517
+ seriesIndex: n,
3518
+ serieName: e.name
3519
+ }
3520
+ )
3521
+ }, null, 8, Yi)
3522
+ ], 4)) : h("", !0),
3523
+ [P.value, _.value, Ye.value].includes(n) && e.useTag && e.useTag === "start" && t.value.plot.tag.followValue ? (i(), r("div", {
3524
+ key: 1,
3525
+ ref_for: !0,
3526
+ ref: (u) => qt(s, n, u, "left", "plot"),
3527
+ class: "vue-ui-xy-tag",
3528
+ "data-tag": "left",
3529
+ style: w({
3530
+ position: "fixed",
3531
+ top: v(De)({
3532
+ svgElement: ae.value,
3533
+ x: c.value?.left - t.value.plot.tag.fontSize / 1.5,
3534
+ y: a.y,
3535
+ element: Oe.value[`${s}_${n}_left_plot`],
3536
+ position: "left"
3537
+ })?.top + "px",
3538
+ left: v(De)({
3539
+ svgElement: ae.value,
3540
+ x: c.value?.left - t.value.plot.tag.fontSize / 1.5,
3541
+ y: a.y,
3542
+ element: Oe.value[`${s}_${n}_left_plot`],
3543
+ position: "left"
3544
+ })?.left + "px",
3545
+ height: "fit-content",
3546
+ width: "fit-content",
3547
+ background: e.color,
3548
+ color: v(He)(e.color),
3549
+ padding: "0 6px",
3550
+ fontSize: t.value.plot.tag.fontSize + "px",
3551
+ opacity: 1
3552
+ })
3553
+ }, [
3554
+ (i(), r("svg", Xi, [
3555
+ y("path", {
3556
+ d: "M 0,0 10,10 0,20 Z",
3557
+ fill: e.color,
3558
+ stroke: "none"
3559
+ }, null, 8, Gi)
3560
+ ])),
3561
+ y("div", {
3562
+ class: "vue-ui-xy-tag-content",
3563
+ innerHTML: v(ve)(
3564
+ t.value.plot.tag.formatter,
3565
+ a.value,
3566
+ e.name,
3567
+ {
3568
+ datapoint: a,
3569
+ seriesIndex: n,
3570
+ serieName: e.name
3571
+ }
3572
+ )
3573
+ }, null, 8, qi)
3574
+ ], 4)) : h("", !0)
3575
+ ], 64))), 128))
3576
+ ], 64))), 128)),
3577
+ t.value.chart.zoom.show && ze.value > 6 && xl.value && xa.value ? (i(), _e(gs, {
3578
+ key: 6,
3579
+ ref_key: "chartSlicer",
3580
+ ref: Te,
3581
+ uuid: z.value,
3582
+ allMinimaps: gu.value,
3583
+ background: t.value.chart.zoom.color,
3584
+ borderColor: t.value.chart.backgroundColor,
3585
+ customFormat: t.value.chart.zoom.customFormat,
3586
+ cutNullValues: t.value.line.cutNullValues,
3587
+ enableRangeHandles: t.value.chart.zoom.enableRangeHandles,
3588
+ enableSelectionDrag: t.value.chart.zoom.enableSelectionDrag,
3589
+ end: m.value.end,
3590
+ focusOnDrag: t.value.chart.zoom.focusOnDrag,
3591
+ focusRangeRatio: t.value.chart.zoom.focusRangeRatio,
3592
+ fontSize: t.value.chart.zoom.fontSize,
3593
+ useResetSlot: t.value.chart.zoom.useResetSlot,
3594
+ immediate: !t.value.chart.zoom.preview.enable,
3595
+ inputColor: t.value.chart.zoom.color,
3596
+ isPreview: aa.value,
3597
+ labelLeft: se.value[0] ? se.value[0].text : "",
3598
+ labelRight: se.value.at(-1) ? se.value.at(-1).text : "",
3599
+ max: ze.value,
3600
+ min: 0,
3601
+ minimap: mu.value,
3602
+ minimapCompact: t.value.chart.zoom.minimap.compact,
3603
+ minimapFrameColor: t.value.chart.zoom.minimap.frameColor,
3604
+ minimapIndicatorColor: t.value.chart.zoom.minimap.indicatorColor,
3605
+ minimapLineColor: t.value.chart.zoom.minimap.lineColor,
3606
+ minimapMerged: t.value.chart.zoom.minimap.merged,
3607
+ minimapSelectedColor: t.value.chart.zoom.minimap.selectedColor,
3608
+ minimapSelectedColorOpacity: t.value.chart.zoom.minimap.selectedColorOpacity,
3609
+ minimapSelectedIndex: _.value,
3610
+ minimapSelectionRadius: t.value.chart.zoom.minimap.selectionRadius,
3611
+ preciseLabels: Wa.value.length ? Wa.value : Zt.value,
3612
+ refreshEndPoint: t.value.chart.zoom.endIndex !== null ? t.value.chart.zoom.endIndex + 1 : Math.max(...cl.dataset.map((e) => Fe(e.series).length)),
3613
+ refreshStartPoint: t.value.chart.zoom.startIndex !== null ? t.value.chart.zoom.startIndex : 0,
3614
+ selectColor: t.value.chart.zoom.highlightColor,
3615
+ selectedSeries: Ze.value,
3616
+ smoothMinimap: t.value.chart.zoom.minimap.smooth,
3617
+ start: m.value.start,
3618
+ textColor: t.value.chart.color,
3619
+ timeLabels: Zt.value,
3620
+ usePreciseLabels: t.value.chart.grid.labels.xAxisLabels.datetimeFormatter.enable && !t.value.chart.zoom.useDefaultFormat,
3621
+ valueEnd: m.value.end,
3622
+ valueStart: m.value.start,
3623
+ verticalHandles: t.value.chart.zoom.minimap.verticalHandles,
3624
+ minScale: t.value.chart.grid.labels.yAxis.scaleMin,
3625
+ maxScale: t.value.chart.grid.labels.yAxis.scaleMax,
3626
+ maxWidth: t.value.chart.zoom.maxWidth,
3627
+ additionalMinimapHeight: t.value.chart.zoom.minimap.additionalHeight,
3628
+ handleType: t.value.chart.zoom.minimap.handleType,
3629
+ handleIconColor: t.value.chart.zoom.minimap.handleIconColor,
3630
+ handleBorderWidth: t.value.chart.zoom.minimap.handleBorderWidth,
3631
+ handleBorderColor: t.value.chart.zoom.minimap.handleBorderColor,
3632
+ handleFill: t.value.chart.zoom.minimap.handleFill,
3633
+ handleWidth: t.value.chart.zoom.minimap.handleWidth,
3634
+ isCursorPointer: Xe.value,
3635
+ onFutureEnd: o[1] || (o[1] = (e) => oa("end", e)),
3636
+ onFutureStart: o[2] || (o[2] = (e) => oa("start", e)),
3637
+ onReset: eu,
3638
+ onTrapMouse: Ko,
3639
+ "onUpdate:end": jo,
3640
+ "onUpdate:start": Qo
3641
+ }, {
3642
+ "reset-action": X(({ reset: e }) => [
3643
+ F(l.$slots, "reset-action", ge(be({ reset: e })), void 0, !0)
3644
+ ]),
3645
+ _: 3
3646
+ }, 8, ["uuid", "allMinimaps", "background", "borderColor", "customFormat", "cutNullValues", "enableRangeHandles", "enableSelectionDrag", "end", "focusOnDrag", "focusRangeRatio", "fontSize", "useResetSlot", "immediate", "inputColor", "isPreview", "labelLeft", "labelRight", "max", "minimap", "minimapCompact", "minimapFrameColor", "minimapIndicatorColor", "minimapLineColor", "minimapMerged", "minimapSelectedColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "minimapSelectionRadius", "preciseLabels", "refreshEndPoint", "refreshStartPoint", "selectColor", "selectedSeries", "smoothMinimap", "start", "textColor", "timeLabels", "usePreciseLabels", "valueEnd", "valueStart", "verticalHandles", "minScale", "maxScale", "maxWidth", "additionalMinimapHeight", "handleType", "handleIconColor", "handleBorderWidth", "handleBorderColor", "handleFill", "handleWidth", "isCursorPointer"])) : h("", !0),
3647
+ y("div", {
3648
+ id: `legend-bottom-${z.value}`
3649
+ }, null, 8, Ui),
3650
+ Gl.value ? (i(), _e(Ru, {
3651
+ key: 7,
3652
+ to: t.value.chart.legend.position === "top" ? `#legend-top-${z.value}` : `#legend-bottom-${z.value}`
3653
+ }, [
3654
+ t.value.chart.legend.show ? (i(), r("div", {
3655
+ key: 0,
3656
+ ref_key: "chartLegend",
3657
+ ref: et,
3658
+ class: "vue-ui-xy-legend",
3659
+ style: w({
3660
+ fontSize: `var(--legend-font-size, ${t.value.chart.legend.fontSize ?? 14}px)`
3661
+ })
3662
+ }, [
3663
+ t.value.chart.legend.selectAllToggle.show && ie.value.length > 2 && !v(ne) ? (i(), _e(ps, {
3664
+ key: 0,
3665
+ backgroundColor: t.value.chart.legend.selectAllToggle.backgroundColor,
3666
+ color: t.value.chart.legend.selectAllToggle.color,
3667
+ fontSize: t.value.chart.legend.fontSize,
3668
+ checked: G.value.length > 0,
3669
+ onToggle: ou
3670
+ }, null, 8, ["backgroundColor", "color", "fontSize", "checked"])) : h("", !0),
3671
+ (i(!0), r(d, null, k(ie.value, (e, s) => (i(), r("div", {
3672
+ key: `div_legend_item_${s}`,
3673
+ onClick: (a) => Mt(e),
3674
+ onKeydown: (a) => uu(a, e),
3675
+ role: "button",
3676
+ tabindex: "0",
3677
+ class: Je({
3678
+ "vue-ui-xy-legend-item-alone": ie.value.length === 1,
3679
+ "vue-ui-xy-legend-item": !0,
3680
+ "vue-ui-xy-legend-item-segregated": G.value.includes(e.id)
3681
+ }),
3682
+ style: w({
3683
+ cursor: Xe.value ? "pointer" : "default"
3684
+ })
3685
+ }, [
3686
+ pt.value[e.type] === "line" ? (i(), r("svg", Ki, [
3687
+ y("rect", {
3688
+ x: "0",
3689
+ y: "7.5",
3690
+ rx: "1.5",
3691
+ stroke: t.value.chart.backgroundColor,
3692
+ "stroke-width": 0.5,
3693
+ height: "3",
3694
+ width: "20",
3695
+ fill: e.color
3696
+ }, null, 8, Ji),
3697
+ dt(rl, {
3698
+ plot: { x: 10, y: 9 },
3699
+ radius: 4,
3700
+ color: e.color,
3701
+ shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle",
3702
+ stroke: t.value.chart.backgroundColor,
3703
+ strokeWidth: 0.5
3704
+ }, null, 8, ["color", "shape", "stroke"])
3705
+ ])) : pt.value[e.type] === "bar" ? (i(), r("svg", Qi, [
3706
+ pt.value[e.type] === "bar" && l.$slots.pattern ? (i(), r("rect", {
3707
+ key: 0,
3708
+ x: "4",
3709
+ y: "4",
3710
+ rx: "1",
3711
+ height: "32",
3712
+ width: "32",
3713
+ stroke: "none",
3714
+ fill: e.color
3715
+ }, null, 8, ji)) : h("", !0),
3716
+ pt.value[e.type] === "bar" ? (i(), r("rect", {
3717
+ key: 1,
3718
+ x: "4",
3719
+ y: "4",
3720
+ rx: "1",
3721
+ height: "32",
3722
+ width: "32",
3723
+ stroke: "none",
3724
+ fill: l.$slots.pattern ? `url(#pattern_${z.value}_${e.slotAbsoluteIndex})` : e.color
3725
+ }, null, 8, er)) : h("", !0)
3726
+ ])) : (i(), r("svg", tr, [
3727
+ dt(rl, {
3728
+ plot: { x: 6, y: 6 },
3729
+ radius: 5,
3730
+ color: e.color,
3731
+ shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle"
3732
+ }, null, 8, ["color", "shape"])
3733
+ ])),
3734
+ y("span", {
3735
+ style: w(`color:${t.value.chart.legend.color}`)
3736
+ }, ue(e.name), 5)
3737
+ ], 46, Zi))), 128))
3738
+ ], 4)) : (i(), r("div", {
3739
+ key: 1,
3740
+ ref_key: "chartLegend",
3741
+ ref: et
3742
+ }, [
3743
+ F(l.$slots, "legend", { legend: ie.value }, void 0, !0)
3744
+ ], 512))
3745
+ ], 8, ["to"])) : h("", !0),
3746
+ l.$slots.source ? (i(), r("div", {
3747
+ key: 8,
3748
+ ref_key: "source",
3749
+ ref: gt,
3750
+ dir: "auto"
3751
+ }, [
3752
+ F(l.$slots, "source", {}, void 0, !0)
3753
+ ], 512)) : h("", !0),
3754
+ dt(v(_o), {
3755
+ teleportTo: t.value.chart.tooltip.teleportTo,
3756
+ show: f.value.showTooltip && Dl.value,
3757
+ backgroundColor: t.value.chart.tooltip.backgroundColor,
3758
+ color: t.value.chart.tooltip.color,
3759
+ fontSize: t.value.chart.tooltip.fontSize,
3760
+ borderRadius: t.value.chart.tooltip.borderRadius,
3761
+ borderColor: t.value.chart.tooltip.borderColor,
3762
+ borderWidth: t.value.chart.tooltip.borderWidth,
3763
+ backgroundOpacity: t.value.chart.tooltip.backgroundOpacity,
3764
+ position: t.value.chart.tooltip.position,
3765
+ offsetY: t.value.chart.tooltip.offsetY,
3766
+ parent: l.$refs.chart,
3767
+ content: bu.value,
3768
+ isFullscreen: Ee.value,
3769
+ isCustom: t.value.chart.tooltip.customFormat && typeof t.value.chart.tooltip.customFormat == "function",
3770
+ smooth: t.value.chart.tooltip.smooth,
3771
+ backdropFilter: t.value.chart.tooltip.backdropFilter,
3772
+ smoothForce: t.value.chart.tooltip.smoothForce,
3773
+ smoothSnapThreshold: t.value.chart.tooltip.smoothSnapThreshold,
3774
+ isA11yMode: at.value != null,
3775
+ a11yPosition: ql.value
3776
+ }, {
3777
+ "tooltip-before": X(() => [
3778
+ F(l.$slots, "tooltip-before", ge(be({ ...Ra.value })), void 0, !0)
3779
+ ]),
3780
+ "tooltip-after": X(() => [
3781
+ F(l.$slots, "tooltip-after", ge(be({ ...Ra.value })), void 0, !0)
3782
+ ]),
3783
+ _: 3
3784
+ }, 8, ["teleportTo", "show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold", "isA11yMode", "a11yPosition"]),
3785
+ xl.value && t.value.chart.userOptions.buttons.table ? (i(), _e(Hu(Ct.value.component), Qe({ key: 9 }, Ct.value.props, {
3786
+ ref_key: "tableUnit",
3787
+ ref: lt,
3788
+ onClose: ja
3789
+ }), lo({
3790
+ content: X(() => [
3791
+ y("div", {
3792
+ style: w(`${v(Et) || t.value.table.useDialog ? "" : "max-height:400px"};${t.value.table.useDialog ? "height: fit-content; " : ""};overflow:auto;width:100%;${t.value.table.useDialog ? "" : "margin-top:48px"}`)
3793
+ }, [
3794
+ y("div", lr, [
3795
+ Du(y("input", {
3796
+ type: "checkbox",
3797
+ "onUpdate:modelValue": o[4] || (o[4] = (e) => yt.value = e)
3798
+ }, null, 512), [
3799
+ [Wu, yt.value]
3800
+ ]),
3801
+ y("div", {
3802
+ onClick: o[5] || (o[5] = (e) => yt.value = !yt.value),
3803
+ style: w({
3804
+ cursor: Xe.value ? "pointer" : "default"
3805
+ })
3806
+ }, [
3807
+ dt(v(Bl), {
3808
+ name: "chartLine",
3809
+ size: 20,
3810
+ stroke: t.value.chart.color
3811
+ }, null, 8, ["stroke"])
3812
+ ], 4)
3813
+ ]),
3814
+ yt.value ? (i(), _e(v(So), {
3815
+ key: `sparkline_${gl.value}`,
3816
+ dataset: vu.value,
3817
+ config: du.value
3818
+ }, null, 8, ["dataset", "config"])) : (i(), _e(v(ko), {
3819
+ key: `table_${El.value}`,
3820
+ colNames: ct.value.colNames,
3821
+ head: ct.value.head,
3822
+ body: ct.value.body,
3823
+ config: ct.value.config,
3824
+ title: t.value.table.useDialog ? "" : Ct.value.title,
3825
+ withCloseButton: !t.value.table.useDialog,
3826
+ onClose: ja
3827
+ }, {
3828
+ th: X(({ th: e }) => [
3829
+ y("div", { innerHTML: e }, null, 8, ar)
3830
+ ]),
3831
+ td: X(({ td: e }) => [
3832
+ ao(ue(isNaN(Number(e)) ? e : v(Pe)({
3833
+ p: t.value.chart.labels.prefix,
3834
+ v: e,
3835
+ s: t.value.chart.labels.suffix,
3836
+ r: t.value.table.rounding
3837
+ })), 1)
3838
+ ]),
3839
+ _: 1
3840
+ }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
3841
+ ], 4)
3842
+ ]),
3843
+ _: 2
3844
+ }, [
3845
+ t.value.table.useDialog ? {
3846
+ name: "title",
3847
+ fn: X(() => [
3848
+ ao(ue(Ct.value.title), 1)
3849
+ ]),
3850
+ key: "0"
3851
+ } : void 0,
3852
+ t.value.table.useDialog ? {
3853
+ name: "actions",
3854
+ fn: X(() => [
3855
+ y("button", {
3856
+ tabindex: "0",
3857
+ class: "vue-ui-user-options-button",
3858
+ onClick: o[3] || (o[3] = (e) => Ll(t.value.chart.userOptions.callbacks.csv))
3859
+ }, [
3860
+ dt(v(Bl), {
3861
+ name: "fileCsv",
3862
+ stroke: Ct.value.props.color
3863
+ }, null, 8, ["stroke"])
3864
+ ])
3865
+ ]),
3866
+ key: "1"
3867
+ } : void 0
3868
+ ]), 1040)) : h("", !0),
3869
+ F(l.$slots, "skeleton", {}, () => [
3870
+ v(ne) ? (i(), _e(is, { key: 0 })) : h("", !0)
3871
+ ], !0)
3872
+ ], 46, ks));
3873
+ }
3874
+ }, $r = /* @__PURE__ */ xs(or, [["__scopeId", "data-v-bb9bd5fa"]]);
3875
+ export {
3876
+ $r as default
3877
+ };