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,1810 @@
1
+ import { defineAsyncComponent as ze, ref as c, computed as g, useSlots as vl, onMounted as Jt, toRefs as cl, watch as E, nextTick as Te, onBeforeUnmount as ot, watchEffect as st, shallowRef as ut, openBlock as I, createElementBlock as $e, normalizeClass as dl, normalizeStyle as ve, createElementVNode as H, toDisplayString as Ae, createBlock as q, createCommentVNode as W, unref as z, createSlots as Qt, withCtx as x, renderSlot as k, normalizeProps as K, guardReactiveProps as J, createVNode as ea, Teleport as hl, resolveDynamicComponent as fl, mergeProps as ml, createTextVNode as ta } from "vue";
2
+ import { j as yl, t as aa, m as gl, p as se, $ as pl, n as bl, D as nt, k as ce, l as de, s as la, H as xl, a8 as Ll, J as Cl, o as kl, q as wl, T as rt, u as Ie, x as Sl, a0 as zl, a1 as Tl, U as oa } from "./lib-DBptbyyI.js";
3
+ import { c as $l, a as it, d as Al, t as Il, u as Ml, l as T, r as _e, b as Q, p as sa } from "./useResponsive-DfdjqQps.js";
4
+ import { u as Fl, a as ua, b as Pl } from "./useTimeLabels-C-A2uZKi.js";
5
+ import { u as Rl } from "./useConfig-DO94Aj5s.js";
6
+ import { u as Dl, B as Ol } from "./BaseScanner-BhhkKVoj.js";
7
+ import { u as El } from "./usePrinter-CEpYU3r5.js";
8
+ import { u as Xe } from "./useNestedProp-Bf5XFbs8.js";
9
+ import { u as Nl } from "./useThemeCheck-D1ZYXUwG.js";
10
+ import { u as Bl } from "./useUserOptionState-BIvW1Kz7.js";
11
+ import { u as Hl } from "./useChartAccessibility-9icAAmYg.js";
12
+ import Wl from "./img-LXxMLmCg.js";
13
+ import _l from "./vue_ui_xy_canvas-6BBDSowT.js";
14
+ import Xl from "./Legend-CS7Xo5LK.js";
15
+ import Vl from "./Title-BeMKE1cj.js";
16
+ import Ul from "./BaseIcon-Cb3zzG6s.js";
17
+ import Yl from "./vue-ui-accordion-nvggWcGN.js";
18
+ import { S as ql } from "./SlicerPreview-DTjwV0iY.js";
19
+ import { B as jl } from "./BaseLegendToggle-BQVIawmA.js";
20
+ import { _ as Gl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
21
+ const Zl = ["id"], Kl = ["id"], Jl = {
22
+ class: "sr-only",
23
+ "aria-live": "polite",
24
+ "aria-atomic": "true"
25
+ }, Ql = ["id"], eo = ["aria-label", "aria-describedby"], to = {
26
+ key: 0,
27
+ style: { position: "absolute", top: "100%", left: "0", width: "100%" },
28
+ "data-dom-to-png-ignore": "",
29
+ "aria-hidden": "true"
30
+ }, ao = ["id"], lo = ["onClick"], oo = {
31
+ key: 4,
32
+ class: "vue-data-ui-watermark"
33
+ }, so = ["innerHTML"], uo = {
34
+ __name: "vue-ui-xy-canvas",
35
+ props: {
36
+ dataset: {
37
+ type: Array,
38
+ default() {
39
+ return [];
40
+ }
41
+ },
42
+ config: {
43
+ type: Object,
44
+ default() {
45
+ return {};
46
+ }
47
+ },
48
+ selectedXIndex: {
49
+ type: Number,
50
+ default: void 0
51
+ }
52
+ },
53
+ emits: ["selectLegend", "selectX", "copyAlt"],
54
+ setup(vt, { expose: na, emit: ra }) {
55
+ const ia = ze(() => import("./Tooltip-Bf-kM3_A.js")), va = ze(() => import("./DataTable-DT2kIdQ6.js")), ca = ze(() => import("./UserOptions-rW2fRf3V.js")), da = ze(() => import("./NonSvgPenAndPaper-VyJFyJ6X.js")), ha = ze(() => import("./BaseDraggableDialog-CIb-iD9g.js")), { vue_ui_xy_canvas: fa } = Rl(), { isThemeValid: ma, warnInvalidTheme: ya } = Nl(), D = vt, j = c(yl()), G = c(null), ue = c(null), v = c(null), y = c(1), ee = c(1), he = c(!1), f = c(null), fe = c(""), ct = c(null), p = c([]), ne = c(1), N = c(!0), _ = c(!0), Me = c(null), dt = c(0), me = c(!1), ht = c(null), ft = c(null), te = c(null), mt = c(null), Ve = c(0), Ue = c(0), Ye = c(0), X = c(null), yt = c(!1), ye = c(null), qe = c(null), ge = c(!1), gt = c(!1), Fe = c(!1), $ = c(null), je = c(!1), Pe = c(!1), Ge = c(!1), V = c(null), pt = c({ x: 0, y: 0 }), U = g(() => Array.isArray(Ze.value) && Ze.value.length > 0), Re = ra, ga = vl();
56
+ Jt(() => {
57
+ ga["chart-background"] && console.warn("VueUiXyCanvas does not support the #chart-background slot.");
58
+ });
59
+ const t = c(Je()), pa = g(() => {
60
+ const e = t.value.style.chart.title.text || "XY chart", a = s.value.end - s.value.start, l = h.value.filter((u) => !p.value.includes(u.absoluteIndex)).length;
61
+ return `${e}. ${l} series. ${a} visible data points.`;
62
+ }), ba = g(() => {
63
+ if (V.value === null) return "";
64
+ const e = V.value + s.value.start, a = t.value.style.chart.grid.x.timeLabels.values.slice(s.value.start, s.value.end)[V.value] ? t.value.style.chart.tooltip.useDefaultTimeFormat ? S.value.slice(s.value.start, s.value.end)[V.value]?.text : tt.value[V.value]?.text : S.value[e]?.text ?? `Point ${e + 1}`, l = h.value.filter((u) => !p.value.includes(u.absoluteIndex)).map((u) => {
65
+ const n = u.series[V.value], i = n?.value ?? n ?? null;
66
+ return `${u.name}: ${i}`;
67
+ }).join(". ");
68
+ return `${a}. ${l}.`;
69
+ }), le = g(() => t.value.userOptions.useCursorPointer), xa = g(() => !!t.value.debug), La = g(() => aa({
70
+ defaultConfig: {
71
+ userOptions: { show: !1 },
72
+ table: { show: !1 },
73
+ style: {
74
+ chart: {
75
+ backgroundColor: "#99999930",
76
+ grid: {
77
+ x: {
78
+ axisColor: "#6A6A6A",
79
+ timeLabels: { show: !1 },
80
+ axisName: "",
81
+ horizontalLines: {
82
+ color: "#6A6A6A"
83
+ }
84
+ },
85
+ y: {
86
+ axisColor: "#6A6A6A",
87
+ axisLabels: { show: !1 },
88
+ axisName: "",
89
+ verticalLines: {
90
+ color: "#6A6A6A"
91
+ }
92
+ },
93
+ zeroLine: {
94
+ color: "#6A6A6A"
95
+ }
96
+ },
97
+ legend: {
98
+ backgroundColor: "#99999930"
99
+ },
100
+ paddingProportions: {
101
+ left: 0.05
102
+ },
103
+ scale: {
104
+ max: null,
105
+ min: null
106
+ },
107
+ zoom: {
108
+ endIndex: null,
109
+ startIndex: null
110
+ }
111
+ }
112
+ }
113
+ },
114
+ userConfig: t.value.skeletonConfig ?? {}
115
+ })), { loading: De, FINAL_DATASET: Ze } = Dl({
116
+ ...cl(D),
117
+ FINAL_CONFIG: t,
118
+ prepareConfig: Je,
119
+ skeletonDataset: D.config?.skeletonDataset ?? [
120
+ {
121
+ name: "",
122
+ series: [0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 134],
123
+ type: "line",
124
+ smooth: !0,
125
+ color: "#BABABA"
126
+ },
127
+ {
128
+ name: "",
129
+ series: [0, 0.5, 1, 1.5, 2.5, 4, 6.5, 10.5, 17, 27.5, 44.5, 67],
130
+ type: "bar",
131
+ color: "#AAAAAA"
132
+ }
133
+ ],
134
+ skeletonConfig: aa({
135
+ defaultConfig: t.value,
136
+ userConfig: La.value
137
+ })
138
+ }), { userOptionsVisible: Ke, setUserOptionsVisibility: bt, keepUserOptionState: xt } = Bl({ config: t.value }), { svgRef: L } = Hl({ config: t.value.style.chart.title });
139
+ function Ca() {
140
+ bt(!0);
141
+ }
142
+ function ka() {
143
+ bt(!1), Re("selectX", { seriesIndex: null, datapoint: null }), f.value = null;
144
+ }
145
+ function Je() {
146
+ const e = Xe({
147
+ userConfig: D.config,
148
+ defaultConfig: fa
149
+ });
150
+ let a = {};
151
+ const l = e.theme;
152
+ if (l)
153
+ if (!ma.value(e))
154
+ ya(e), a = e;
155
+ else {
156
+ const u = Xe({
157
+ userConfig: _l[l] || D.config,
158
+ defaultConfig: e
159
+ });
160
+ a = {
161
+ ...Xe({
162
+ userConfig: D.config,
163
+ defaultConfig: u
164
+ }),
165
+ customPalette: e.customPalette.length ? e.customPalette : gl[l] || se
166
+ };
167
+ }
168
+ else
169
+ a = e;
170
+ return D.config && pl(D.config, "style.chart.grid.y.timeLabels") && (console.warn("VueUiXyCanvas: you are using the deprecated config.style.chart.grid.y.timeLabels. It is recommended to move this configuration to config.style.chart.grid.x.timeLabels."), a.style.chart.grid.x.timeLabels = Xe({
171
+ defaultConfig: a.style.chart.grid.x.timeLabels,
172
+ userConfig: D.config.style.chart.grid.y.timeLabels
173
+ })), a;
174
+ }
175
+ E(() => D.config, (e) => {
176
+ De.value || (t.value = Je()), Ke.value = !t.value.userOptions.showOnChartHover, Xt(), Ve.value += 1, Ue.value += 1, Ye.value += 1, d.value.showTable = t.value.table.show, d.value.showDataLabels = t.value.style.chart.dataLabels.show, d.value.stacked = t.value.style.chart.stacked, d.value.showTooltip = t.value.style.chart.tooltip.show;
177
+ }, { deep: !0 }), E(() => D.dataset, async (e) => {
178
+ !Array.isArray(e) || e.length === 0 || (await Te(), L.value && !v.value && (v.value = L.value.getContext("2d", { willReadFrequently: !0 })), N.value = !0, _.value = !0, await xe(), Ee(), Ve.value += 1, Ue.value += 1, Ye.value += 1);
179
+ }, { deep: !0 });
180
+ const Lt = c(t.value.style.chart.aspectRatio), { isPrinting: Ct, isImaging: kt, generatePdf: wt, generateImage: St } = El({
181
+ elementId: `xy_canvas_${j.value}`,
182
+ fileName: t.value.style.chart.title.text || "vue-ui-xy-canvas",
183
+ options: t.value.userOptions.print
184
+ }), d = c({
185
+ showTable: t.value.table.show,
186
+ showDataLabels: t.value.style.chart.dataLabels.show,
187
+ stacked: t.value.style.chart.stacked,
188
+ showTooltip: t.value.style.chart.tooltip.show
189
+ });
190
+ function zt(e) {
191
+ me.value = e, dt.value += 1;
192
+ }
193
+ const Tt = g(() => bl(t.value.customPalette)), Qe = g(() => p.value.length === M.value.length), O = g(() => M.value ? Math.max(...M.value.filter((e, a) => Qe.value ? !0 : !p.value.includes(e.absoluteIndex)).map((e) => e.series.length)) : 0);
194
+ function wa(e) {
195
+ $.value = e, Z();
196
+ }
197
+ const $t = c(0), pe = c(0);
198
+ function Sa() {
199
+ if (!v.value || !t.value.style.chart.grid.x.timeLabels.show) return 0;
200
+ const e = S.value || [], a = s.value.start ?? 0, l = s.value.end ?? 0;
201
+ if (!Math.max(0, l - a)) return 0;
202
+ const n = Math.round(
203
+ y.value / 40 * t.value.style.chart.grid.x.timeLabels.fontSizeRatio
204
+ ), i = `${t.value.style.chart.grid.x.timeLabels.bold ? "bold " : ""}${n}px ${t.value.style.fontFamily}`;
205
+ v.value.save(), v.value.font = i;
206
+ let r = 0;
207
+ for (let Y = a; Y < l; Y += 1) {
208
+ const B = e[Y]?.text ?? `${Y + 1}`, We = v.value.measureText(String(B));
209
+ We.width > r && (r = We.width);
210
+ }
211
+ v.value.restore();
212
+ const C = (t.value.style.chart.grid.x.timeLabels.rotation || 0) * Math.PI / 180, b = n, w = Math.abs(Math.sin(C)) * r + Math.abs(Math.cos(C)) * b, R = t.value.style.chart.grid.x.timeLabels.offsetY || 1, oe = y.value / R;
213
+ return Math.max(0, oe + w + 4);
214
+ }
215
+ function za() {
216
+ $t.value = Sa();
217
+ }
218
+ function Ta() {
219
+ pe.value && cancelAnimationFrame(pe.value), pe.value = requestAnimationFrame(() => {
220
+ requestAnimationFrame(() => {
221
+ za();
222
+ });
223
+ });
224
+ }
225
+ ot(() => {
226
+ pe.value && cancelAnimationFrame(pe.value);
227
+ });
228
+ const o = g(() => {
229
+ const e = y.value - y.value * (t.value.style.chart.paddingProportions.left + t.value.style.chart.paddingProportions.right), a = ee.value * t.value.style.chart.paddingProportions.top, l = ee.value * t.value.style.chart.paddingProportions.bottom, u = $t.value, n = ee.value - l - u, i = ee.value - (a + l) - u;
230
+ return {
231
+ canvasWidth: y.value,
232
+ canvasHeight: ee.value,
233
+ left: y.value * t.value.style.chart.paddingProportions.left,
234
+ top: a,
235
+ right: y.value - y.value * t.value.style.chart.paddingProportions.right,
236
+ bottom: n,
237
+ width: e,
238
+ height: i,
239
+ slot: e / (s.value.end - s.value.start)
240
+ };
241
+ });
242
+ function At(e, a) {
243
+ return e / a;
244
+ }
245
+ function $a({ hasAutoScale: e, series: a, min: l, max: u, scale: n, yOffset: i, individualHeight: r, stackIndex: m = null }) {
246
+ return a.map((C, b) => {
247
+ const w = n.min < 0 ? Math.abs(n.min) : 0, R = At(C + w, w + n.max);
248
+ let oe, Y;
249
+ e && (oe = n.min, Y = At(C - oe, n.max - oe));
250
+ let B = 0;
251
+ return m === null ? B = o.value.bottom - o.value.height * (e ? Y : R) : B = o.value.bottom - i - r * (e ? Y : R), {
252
+ x: o.value.left + o.value.slot * b + o.value.slot / 2,
253
+ y: B,
254
+ value: C
255
+ };
256
+ });
257
+ }
258
+ const A = g(() => {
259
+ const e = t.value.style.chart.scale.min !== null ? t.value.style.chart.scale.min : Math.min(...M.value.filter((r, m) => !p.value.includes(r.absoluteIndex)).flatMap((r) => r.series.slice(s.value.start, s.value.end))), a = t.value.style.chart.scale.max !== null ? t.value.style.chart.scale.max : Math.max(...M.value.filter((r, m) => !p.value.includes(r.absoluteIndex)).flatMap((r) => r.series.slice(s.value.start, s.value.end))), l = nt(e < 0 ? e : 0, a === e ? e + 1 < 0 ? 0 : e + 1 : a < 0 ? 0 : a, t.value.style.chart.scale.ticks), u = l.min < 0 ? Math.abs(l.min) : 0, n = o.value.bottom - o.value.height * (u / (l.max + u)), i = l.ticks.map((r) => ({
260
+ y: o.value.bottom - o.value.height * ((r + u) / (l.max + u)),
261
+ x: o.value.left - 8,
262
+ value: r
263
+ }));
264
+ return {
265
+ absoluteMin: u,
266
+ max: a,
267
+ min: e,
268
+ scale: l,
269
+ yLabels: i,
270
+ zero: n
271
+ };
272
+ }), It = g(() => h.value.map((e) => `
273
+ <div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
274
+ <svg viewBox="0 0 10 10" height="12" width="12">
275
+ <circle cx="5" cy="5" r="5" fill="${e.color}"/>
276
+ </svg>
277
+ <span>${e.name ? e.name + ": " : ""}</span>
278
+ <span>${ce(
279
+ t.value.style.chart.dataLabels.formatter,
280
+ e.series[f.value] ?? "-",
281
+ de({
282
+ p: e.prefix || "",
283
+ v: e.series[f.value] ?? "-",
284
+ s: e.suffix || "",
285
+ r: e.rounding || 0
286
+ }),
287
+ { datapoint: e, seriesIndex: f.value }
288
+ )}</span>
289
+ </div>
290
+ `)), Oe = g(() => t.value.style.chart.line.cutNullValues), M = g(() => Ze.value.map((e, a) => ({
291
+ ...e,
292
+ series: xl({
293
+ data: Ll(e.series, [], Oe.value),
294
+ threshold: t.value.downsample.threshold
295
+ }),
296
+ absoluteIndex: a,
297
+ color: la(e.color || Tt.value[a] || se[a] || se[a % se.length])
298
+ }))), Aa = g(() => {
299
+ if (!t.value.style.chart.zoom.minimap.show) return [];
300
+ const e = M.value.filter((n) => !p.value.includes(n.absoluteIndex)), a = Math.max(...e.map((n) => n.series.length)), l = [];
301
+ for (let n = 0; n < a; n += 1)
302
+ l.push(e.map((i) => i.series[n] || 0).reduce((i, r) => (i || 0) + (r || 0), 0));
303
+ const u = Math.min(...l);
304
+ return l.map((n) => n + (u < 0 ? Math.abs(u) : 0));
305
+ }), Ia = g(() => t.value.style.chart.zoom.minimap.show ? M.value.map((a) => ({
306
+ ...a,
307
+ isVisible: !p.value.includes(a.absoluteIndex)
308
+ })) : []);
309
+ E(O, (e) => {
310
+ e && xe();
311
+ });
312
+ const h = g(() => Cl(M.value.filter((e, a) => !p.value.includes(e.absoluteIndex))).map((e, a) => ({
313
+ ...e,
314
+ series: e.series.slice(s.value.start, s.value.end)
315
+ })).map((e, a) => {
316
+ let l = [null, void 0].includes(e.scaleMin) ? Math.min(...e.series) || 0 : e.scaleMin, u = [null, void 0].includes(e.scaleMax) ? Math.max(...e.series) || 1 : e.scaleMax;
317
+ l === u && (l = l >= 0 ? u - 1 : l, u = u >= 0 ? u : l + 1), e.series.filter((B) => ![null, void 0].includes(B)).map((B) => (B - l) / (u - l));
318
+ const n = {
319
+ valueMin: l,
320
+ valueMax: u
321
+ }, i = e.scaleSteps || t.value.style.chart.scale.ticks;
322
+ let r;
323
+ e.autoScaling ? r = nt(n.valueMin, n.valueMax, i) : r = nt(n.valueMin < 0 ? n.valueMin : 0, n.valueMax <= 0 ? 0 : n.valueMax, i);
324
+ const m = d.value.stacked ? o.value.height * (1 - e.cumulatedStackRatio) : 0, C = d.value.stacked ? o.value.height / t.value.style.chart.stackGap : 0, b = d.value.stacked ? o.value.height * e.stackRatio - C : o.value.height, w = r.min < 0 ? Math.abs(r.min) : 0;
325
+ let R;
326
+ e.autoScaling && d.value.stacked && u <= 0 ? R = o.value.bottom - m - b : R = o.value.bottom - m - b * (w / (r.max + w));
327
+ const oe = r.ticks.map((B, We) => ({
328
+ y: o.value.bottom - m - b * (We / (r.ticks.length - 1)),
329
+ x: o.value.left - 8,
330
+ value: B
331
+ })), Y = $a({
332
+ hasAutoScale: d.value.stacked && e.autoScaling,
333
+ series: e.series,
334
+ min: d.value.stacked ? l : A.value.min,
335
+ max: d.value.stacked ? u : A.value.max,
336
+ scale: d.value.stacked ? r : A.value.scale,
337
+ yOffset: m,
338
+ individualHeight: b,
339
+ stackIndex: d.value.stacked ? a : null
340
+ });
341
+ return {
342
+ ...e,
343
+ coordinatesLine: Y,
344
+ min: l,
345
+ max: u,
346
+ localScale: r,
347
+ localZero: R,
348
+ localMin: w,
349
+ localYLabels: oe,
350
+ yOffset: m,
351
+ individualHeight: b
352
+ };
353
+ })), s = c({
354
+ start: 0,
355
+ end: O.value
356
+ }), F = c({ start: 0, end: O.value }), be = c(null);
357
+ function Ma() {
358
+ return new Promise((e) => requestAnimationFrame(
359
+ () => requestAnimationFrame(() => e())
360
+ ));
361
+ }
362
+ ot(() => {
363
+ be.value && cancelAnimationFrame(be.value);
364
+ });
365
+ async function xe() {
366
+ Ft(), await Te(), be.value && cancelAnimationFrame(be.value), be.value = requestAnimationFrame(async () => {
367
+ await Ma(), Ft();
368
+ });
369
+ }
370
+ const Fa = g(() => t.value.style.chart.zoom.preview.enable && (F.value.start !== s.value.start || F.value.end !== s.value.end));
371
+ function Mt(e, a) {
372
+ F.value[e] = a;
373
+ }
374
+ async function Ft() {
375
+ if (!ge.value) {
376
+ ge.value = !0;
377
+ try {
378
+ const { startIndex: e, endIndex: a } = t.value.style.chart.zoom, l = Math.max(...M.value.map((i) => i.series.length)), u = e ?? 0, n = a != null ? Math.min(Pt(a + 1), l) : l;
379
+ Fe.value = !0, s.value.start = u, s.value.end = n, F.value.start = u, F.value.end = n, et(), gt.value = !0, await Te(), te.value && (te.value.setStartValue(s.value.start), te.value.setEndValue(s.value.end));
380
+ } finally {
381
+ queueMicrotask(() => {
382
+ Fe.value = !1;
383
+ }), ge.value = !1;
384
+ }
385
+ }
386
+ }
387
+ function Pa(e) {
388
+ ge.value || Fe.value || e !== s.value.start && (s.value.start = e, F.value.start = e, et());
389
+ }
390
+ function Ra(e) {
391
+ if (ge.value || Fe.value) return;
392
+ const a = Pt(e);
393
+ a !== s.value.end && (s.value.end = a, F.value.end = a, et());
394
+ }
395
+ function Pt(e) {
396
+ const a = O.value;
397
+ return e > a ? a : e < 0 || e < s.value.start ? t.value.style.chart.zoom.startIndex !== null ? t.value.style.chart.zoom.startIndex + 1 : 1 : e;
398
+ }
399
+ function et() {
400
+ const e = Math.max(
401
+ 1,
402
+ Math.max(...M.value.map((u) => u.series.length))
403
+ );
404
+ let a = Math.max(0, Math.min(s.value.start ?? 0, e - 1)), l = Math.max(a + 1, Math.min(s.value.end ?? e, e));
405
+ (!Number.isFinite(a) || !Number.isFinite(l) || l <= a) && (a = 0, l = e), s.value = { start: a, end: l }, F.value.start = a, F.value.end = l, te.value && (te.value.setStartValue(a), te.value.setEndValue(l));
406
+ }
407
+ const Da = g(() => h.value.filter((e) => ["line", "plot", void 0].includes(e.type))), P = g(() => h.value.filter((e) => e.type === "bar"));
408
+ function Ee() {
409
+ if (!L.value || !ue.value) return;
410
+ const e = ue.value.offsetWidth, a = ue.value.offsetHeight;
411
+ L.value.width = e * ne.value * 2, L.value.height = a * ne.value * 2, y.value = e * ne.value * 2, ee.value = a * ne.value * 2, v.value?.scale(ne.value, ne.value), Z();
412
+ }
413
+ E(U, async (e) => {
414
+ if (!e) {
415
+ Me.value = null, he.value = !1, f.value = null, X.value = null;
416
+ return;
417
+ }
418
+ await Te(), L.value && !v.value && (v.value = L.value.getContext("2d", { willReadFrequently: !0 })), N.value = !0, _.value = !0, await xe(), Ee(), Z();
419
+ });
420
+ function Oa() {
421
+ if (v.value && (v.value.clearRect(0, 0, 1e4, 1e4), v.value.fillStyle = t.value.style.chart.backgroundColor, v.value.fillRect(0, 0, o.value.canvasWidth, o.value.canvasHeight), !!U.value)) {
422
+ if (d.value.stacked)
423
+ t.value.style.chart.grid.y.verticalLines.show && s.value.end - s.value.start < t.value.style.chart.grid.y.verticalLines.hideUnderXLength ? h.value.forEach((e) => {
424
+ for (let a = 0; a < s.value.end - s.value.start + 1; a += 1)
425
+ T(
426
+ v.value,
427
+ [
428
+ {
429
+ x: o.value.left + o.value.slot * a,
430
+ y: o.value.bottom - e.yOffset - e.individualHeight
431
+ },
432
+ {
433
+ x: o.value.left + o.value.slot * a,
434
+ y: o.value.bottom - e.yOffset
435
+ }
436
+ ],
437
+ {
438
+ color: t.value.style.chart.grid.y.verticalLines.color
439
+ }
440
+ );
441
+ }) : t.value.style.chart.grid.y.verticalLines.show && s.value.end - s.value.start >= t.value.style.chart.grid.y.verticalLines.hideUnderXLength && h.value.forEach((e) => {
442
+ for (let a = s.value.start; a < s.value.end; a += 1)
443
+ a % Math.floor((s.value.end - s.value.start) / t.value.style.chart.grid.x.timeLabels.modulo) === 0 && T(
444
+ v.value,
445
+ [
446
+ {
447
+ x: o.value.left + o.value.slot * (a - s.value.start) + o.value.slot / 2,
448
+ y: o.value.bottom - e.yOffset - e.individualHeight
449
+ },
450
+ {
451
+ x: o.value.left + o.value.slot * (a - s.value.start) + o.value.slot / 2,
452
+ y: o.value.bottom - e.yOffset
453
+ }
454
+ ],
455
+ {
456
+ color: t.value.style.chart.grid.y.verticalLines.color
457
+ }
458
+ );
459
+ }), t.value.style.chart.grid.x.horizontalLines.show && (t.value.style.chart.grid.x.horizontalLines.alternate ? h.value.forEach((e) => {
460
+ e.localYLabels.forEach((a, l) => {
461
+ l < e.localYLabels.length - 1 && _e(
462
+ v.value,
463
+ [
464
+ { x: o.value.left, y: a.y },
465
+ { x: o.value.right, y: a.y },
466
+ { x: o.value.right, y: e.localYLabels[l + 1].y },
467
+ { x: o.value.left, y: e.localYLabels[l + 1].y }
468
+ ],
469
+ {
470
+ fillColor: l % 2 === 0 ? "transparent" : Ie(t.value.style.chart.grid.x.horizontalLines.color, t.value.style.chart.grid.x.horizontalLines.opacity),
471
+ strokeColor: "transparent"
472
+ }
473
+ );
474
+ });
475
+ }) : h.value.forEach((e) => {
476
+ e.localYLabels.slice(s.value.start, s.value.end).forEach((a) => {
477
+ T(
478
+ v.value,
479
+ [
480
+ { x: o.value.left, y: a.y },
481
+ { x: o.value.right, y: a.y }
482
+ ],
483
+ {
484
+ color: t.value.style.chart.grid.x.horizontalLines.color
485
+ }
486
+ );
487
+ });
488
+ })), t.value.style.chart.grid.zeroLine.show && h.value.forEach((e) => {
489
+ T(
490
+ v.value,
491
+ [
492
+ { x: o.value.left, y: e.localZero },
493
+ { x: o.value.right, y: e.localZero }
494
+ ],
495
+ {
496
+ color: t.value.style.chart.grid.zeroLine.color,
497
+ lineDash: t.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
498
+ }
499
+ );
500
+ }), t.value.style.chart.grid.y.axisLabels.show && h.value.forEach((e) => {
501
+ T(
502
+ v.value,
503
+ [
504
+ { x: o.value.left, y: o.value.bottom - e.yOffset },
505
+ { x: o.value.left, y: o.value.bottom - e.yOffset - e.individualHeight }
506
+ ],
507
+ {
508
+ color: e.color
509
+ }
510
+ ), T(
511
+ v.value,
512
+ [
513
+ { x: o.value.right, y: o.value.bottom - e.yOffset },
514
+ { x: o.value.right, y: o.value.bottom - e.yOffset - e.individualHeight }
515
+ ],
516
+ {
517
+ color: e.color
518
+ }
519
+ );
520
+ }), h.value.forEach((e) => {
521
+ Q(
522
+ v.value,
523
+ e.name,
524
+ y.value / 35,
525
+ o.value.bottom - e.yOffset - e.individualHeight / 2,
526
+ {
527
+ align: "center",
528
+ rotation: -90,
529
+ color: e.color,
530
+ font: `${Math.round(y.value / 40 * t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`
531
+ }
532
+ );
533
+ });
534
+ else {
535
+ if (t.value.style.chart.grid.y.verticalLines.show && s.value.end - s.value.start < t.value.style.chart.grid.y.verticalLines.hideUnderXLength)
536
+ for (let e = 0; e < s.value.end - s.value.start + 1; e += 1)
537
+ T(
538
+ v.value,
539
+ [
540
+ { x: o.value.left + o.value.slot * e, y: o.value.top },
541
+ { x: o.value.left + o.value.slot * e, y: o.value.bottom }
542
+ ],
543
+ {
544
+ color: t.value.style.chart.grid.y.verticalLines.color
545
+ }
546
+ );
547
+ else if (t.value.style.chart.grid.y.verticalLines.show && s.value.end - s.value.start >= t.value.style.chart.grid.y.verticalLines.hideUnderXLength)
548
+ for (let e = s.value.start; e < s.value.end; e += 1)
549
+ e % Math.floor((s.value.end - s.value.start) / t.value.style.chart.grid.x.timeLabels.modulo) === 0 && T(
550
+ v.value,
551
+ [
552
+ { x: o.value.left + o.value.slot * (e - s.value.start) + o.value.slot / 2, y: o.value.top },
553
+ { x: o.value.left + o.value.slot * (e - s.value.start) + o.value.slot / 2, y: o.value.bottom }
554
+ ],
555
+ {
556
+ color: t.value.style.chart.grid.y.verticalLines.color
557
+ }
558
+ );
559
+ t.value.style.chart.grid.x.horizontalLines.show && (t.value.style.chart.grid.x.horizontalLines.alternate ? A.value.yLabels.forEach((e, a) => {
560
+ a < A.value.yLabels.length - 1 && _e(
561
+ v.value,
562
+ [
563
+ { x: o.value.left, y: e.y },
564
+ { x: o.value.right, y: e.y },
565
+ { x: o.value.right, y: A.value.yLabels[a + 1].y },
566
+ { x: o.value.left, y: A.value.yLabels[a + 1].y }
567
+ ],
568
+ {
569
+ fillColor: a % 2 === 0 ? "transparent" : Ie(t.value.style.chart.grid.x.horizontalLines.color, t.value.style.chart.grid.x.horizontalLines.opacity),
570
+ strokeColor: "transparent"
571
+ }
572
+ );
573
+ }) : A.value.yLabels.forEach((e) => {
574
+ T(
575
+ v.value,
576
+ [
577
+ { x: o.value.left, y: e.y },
578
+ { x: o.value.right, y: e.y }
579
+ ],
580
+ {
581
+ color: t.value.style.chart.grid.x.horizontalLines.color
582
+ }
583
+ );
584
+ })), t.value.style.chart.grid.y.showAxis && T(
585
+ v.value,
586
+ [
587
+ { x: o.value.left, y: o.value.top },
588
+ { x: o.value.left, y: o.value.bottom }
589
+ ],
590
+ {
591
+ color: t.value.style.chart.grid.y.axisColor,
592
+ lineWidth: t.value.style.chart.grid.y.axisThickness
593
+ }
594
+ ), t.value.style.chart.grid.x.showAxis && T(
595
+ v.value,
596
+ [
597
+ { x: o.value.left, y: o.value.bottom },
598
+ { x: o.value.right, y: o.value.bottom }
599
+ ],
600
+ {
601
+ color: t.value.style.chart.grid.x.axisColor,
602
+ lineWidth: t.value.style.chart.grid.x.axisThickness
603
+ }
604
+ ), t.value.style.chart.grid.zeroLine.show && T(
605
+ v.value,
606
+ [
607
+ { x: o.value.left, y: A.value.zero },
608
+ { x: o.value.right, y: A.value.zero }
609
+ ],
610
+ {
611
+ color: t.value.style.chart.grid.zeroLine.color,
612
+ lineDash: t.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
613
+ }
614
+ );
615
+ }
616
+ t.value.style.chart.grid.y.axisName && Q(
617
+ v.value,
618
+ t.value.style.chart.grid.y.axisName,
619
+ y.value - y.value / 40 * t.value.style.chart.grid.y.axisLabels.fontSizeRatio * 1.2,
620
+ o.value.bottom - o.value.height / 2,
621
+ {
622
+ font: `${t.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,
623
+ color: t.value.style.chart.color,
624
+ align: "center",
625
+ rotation: 90
626
+ }
627
+ ), t.value.style.chart.grid.x.axisName && Q(
628
+ v.value,
629
+ t.value.style.chart.grid.x.axisName,
630
+ y.value / 2,
631
+ ee.value,
632
+ {
633
+ font: `${t.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,
634
+ color: t.value.style.chart.color,
635
+ align: "center"
636
+ }
637
+ );
638
+ }
639
+ }
640
+ function Ea(e) {
641
+ for (let a = 0; a < e.coordinatesLine.length; a += 1) {
642
+ const l = (f.value === a || $.value === a ? y.value / 150 : t.value.style.chart.line.plots.show || e.type === "plot" ? y.value / 200 : 0) * t.value.style.chart.line.plots.radiusRatio;
643
+ it(
644
+ v.value,
645
+ { x: e.coordinatesLine[a].x, y: e.coordinatesLine[a].y },
646
+ l,
647
+ {
648
+ color: t.value.style.chart.backgroundColor,
649
+ fillStyle: e.color
650
+ }
651
+ );
652
+ }
653
+ }
654
+ function Na() {
655
+ h.value.forEach((e) => {
656
+ e.showYMarker && Ce(e) && Q(
657
+ v.value,
658
+ ce(
659
+ t.value.style.chart.dataLabels.formatter,
660
+ Ce(e).value,
661
+ de({
662
+ p: e.prefix || t.value.style.chart.grid.y.axisLabels.prefix || "",
663
+ v: Ce(e).value,
664
+ s: e.suffix || t.value.style.chart.grid.y.axisLabels.suffix || "",
665
+ r: e.rounding || t.value.style.chart.grid.y.axisLabels.rounding || 0
666
+ }),
667
+ { datapoint: Ce(e), seriesIndex: null }
668
+ ),
669
+ o.value.left - 8 + t.value.style.chart.grid.y.axisLabels.offsetX,
670
+ Ce(e).y,
671
+ {
672
+ align: "right",
673
+ font: `${t.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,
674
+ color: e.color
675
+ }
676
+ );
677
+ });
678
+ }
679
+ function Ba() {
680
+ t.value.style.chart.grid.y.axisLabels.show && (d.value.stacked ? h.value.forEach((e) => {
681
+ e.localYLabels.forEach((a, l) => {
682
+ Q(
683
+ v.value,
684
+ ce(
685
+ t.value.style.chart.dataLabels.formatter,
686
+ a.value,
687
+ de({
688
+ p: e.prefix || t.value.style.chart.grid.y.axisLabels.prefix || "",
689
+ v: a.value,
690
+ s: e.suffix || t.value.style.chart.grid.y.axisLabels.suffix || "",
691
+ r: e.rounding || t.value.style.chart.grid.y.axisLabels.rounding || 0
692
+ }),
693
+ { datapoint: a, seriesIndex: l }
694
+ ),
695
+ a.x + t.value.style.chart.grid.y.axisLabels.offsetX,
696
+ a.y,
697
+ {
698
+ align: "right",
699
+ font: `${t.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,
700
+ color: e.color,
701
+ globalAlpha: e.showYMarker && ![null, void 0].includes(f.value ?? $.value) ? 0.2 : 1
702
+ }
703
+ );
704
+ });
705
+ }) : A.value.yLabels.forEach((e, a) => {
706
+ Q(
707
+ v.value,
708
+ ce(
709
+ t.value.style.chart.dataLabels.formatter,
710
+ e.value,
711
+ de({
712
+ p: t.value.style.chart.grid.y.axisLabels.prefix || "",
713
+ v: e.value,
714
+ s: t.value.style.chart.grid.y.axisLabels.suffix || "",
715
+ r: t.value.style.chart.grid.y.axisLabels.rounding || 0
716
+ }),
717
+ { datapoint: e, seriesIndex: a }
718
+ ),
719
+ e.x + t.value.style.chart.grid.y.axisLabels.offsetX,
720
+ e.y,
721
+ {
722
+ align: "right",
723
+ font: `${t.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,
724
+ color: t.value.style.chart.grid.y.axisLabels.color,
725
+ globalAlpha: h.value.some((l) => l.showYMarker) && ![null, void 0].includes(f.value ?? $.value) ? 0.2 : 1
726
+ }
727
+ );
728
+ }));
729
+ }
730
+ function Ha(e) {
731
+ for (let a = 0; a < e.coordinatesLine.length; a += 1)
732
+ Q(
733
+ v.value,
734
+ ce(
735
+ t.value.style.chart.dataLabels.formatter,
736
+ e.coordinatesLine[a].value,
737
+ de({
738
+ p: e.prefix || "",
739
+ v: e.coordinatesLine[a].value,
740
+ s: e.suffix || "",
741
+ r: e.rounding || 0
742
+ }),
743
+ { datapoint: e.coordinatesLine[a], seriesIndex: a }
744
+ ),
745
+ e.coordinatesLine[a].x,
746
+ e.coordinatesLine[a].y + t.value.style.chart.dataLabels.offsetY,
747
+ {
748
+ align: "center",
749
+ font: `${t.value.style.chart.dataLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,
750
+ color: t.value.style.chart.dataLabels.useSerieColor ? e.color : t.value.style.chart.dataLabels.color,
751
+ strokeColor: t.value.style.chart.backgroundColor,
752
+ lineWidth: 0.5
753
+ }
754
+ );
755
+ }
756
+ const S = c([]);
757
+ let Rt = 0;
758
+ st(() => {
759
+ const e = ++Rt;
760
+ (async () => {
761
+ const a = await Fl({
762
+ values: t.value.style.chart.grid.x.timeLabels.values,
763
+ maxDatapoints: O.value,
764
+ formatter: t.value.style.chart.grid.x.timeLabels.datetimeFormatter,
765
+ start: 0,
766
+ end: O.value
767
+ });
768
+ e === Rt && (S.value = a);
769
+ })();
770
+ }), st(() => {
771
+ t.value.style.chart.grid.x.timeLabels.show, t.value.style.chart.grid.x.timeLabels.rotation, t.value.style.chart.grid.x.timeLabels.offsetY, t.value.style.chart.grid.x.timeLabels.fontSizeRatio, t.value.style.chart.grid.x.timeLabels.bold, s.value.start, s.value.end, y.value, ee.value, (S.value || []).map((e) => e?.text ?? "").join("|"), Ta();
772
+ }, { flush: "post" });
773
+ const Dt = c({ months: [], shortMonths: [], days: [], shortDays: [] });
774
+ let Ot = 0;
775
+ st(() => {
776
+ const e = ++Ot, a = t.value.style.chart.grid.x.timeLabels.datetimeFormatter;
777
+ (async () => {
778
+ const l = await ua(a.locale).catch(() => ua("en"));
779
+ e === Ot && (Dt.value = l.data);
780
+ })();
781
+ });
782
+ const Et = g(() => {
783
+ const e = t.value.style.chart.grid.x.timeLabels.datetimeFormatter, a = Pl({
784
+ useUTC: e.useUTC,
785
+ locale: Dt.value,
786
+ januaryAsYear: e.januaryAsYear
787
+ });
788
+ return (l, u) => {
789
+ const i = t.value.style.chart.grid.x.timeLabels.values?.[l];
790
+ return i == null ? "" : a.formatDate(new Date(i), u);
791
+ };
792
+ }), Nt = g(() => (t.value.style.chart.grid.x.timeLabels.values || []).map((a, l) => ({
793
+ text: Et.value(l, t.value.style.chart.zoom.timeFormat),
794
+ absoluteIndex: l
795
+ }))), tt = g(() => (t.value.style.chart.grid.x.timeLabels.values || []).map((a, l) => ({
796
+ text: Et.value(l, t.value.style.chart.tooltip.timeFormat),
797
+ absoluteIndex: l
798
+ })));
799
+ function Wa() {
800
+ for (let e = s.value.start; e < s.value.end; e += 1)
801
+ (s.value.end - s.value.start < t.value.style.chart.grid.x.timeLabels.modulo || s.value.end - s.value.start >= t.value.style.chart.grid.x.timeLabels.modulo && (e % Math.floor((s.value.end - s.value.start) / t.value.style.chart.grid.x.timeLabels.modulo) === 0 || (e === f.value + s.value.start || e === $.value) && t.value.style.chart.grid.x.timeLabels.showMarker)) && Q(
802
+ v.value,
803
+ S.value[e] ? S.value[e].text : e + 1,
804
+ o.value.left + o.value.slot * (e - s.value.start) + o.value.slot / 2,
805
+ o.value.bottom + y.value / t.value.style.chart.grid.x.timeLabels.offsetY,
806
+ {
807
+ align: t.value.style.chart.grid.x.timeLabels.rotation === 0 ? "center" : t.value.style.chart.grid.x.timeLabels.rotation > 0 ? "left" : "right",
808
+ font: `${t.value.style.chart.grid.x.timeLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * t.value.style.chart.grid.x.timeLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,
809
+ color: t.value.style.chart.grid.x.timeLabels.showMarker ? Ie(t.value.style.chart.grid.x.timeLabels.color, f.value !== null || $.value !== null ? f.value + s.value.start === e || $.value === e ? 100 : 20 : 100) : t.value.style.chart.grid.x.timeLabels.color,
810
+ rotation: t.value.style.chart.grid.x.timeLabels.rotation
811
+ }
812
+ );
813
+ }
814
+ function Bt() {
815
+ T(
816
+ v.value,
817
+ [
818
+ { x: o.value.left + o.value.slot * (f.value ?? $.value) + o.value.slot / 2, y: o.value.top },
819
+ { x: o.value.left + o.value.slot * (f.value ?? $.value) + o.value.slot / 2, y: o.value.bottom }
820
+ ],
821
+ {
822
+ color: t.value.style.chart.selector.color,
823
+ lineDash: t.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
824
+ lineWidth: 2
825
+ }
826
+ );
827
+ }
828
+ function _a() {
829
+ X.value && T(
830
+ v.value,
831
+ [
832
+ { x: o.value.left, y: X.value },
833
+ { x: o.value.right, y: X.value }
834
+ ],
835
+ {
836
+ color: t.value.style.chart.selector.color,
837
+ lineDash: t.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
838
+ lineWidth: 2
839
+ }
840
+ );
841
+ }
842
+ function Xa() {
843
+ P.value.forEach((e, a) => {
844
+ for (let l = 0; l < e.coordinatesLine.length; l += 1)
845
+ _e(
846
+ v.value,
847
+ [
848
+ {
849
+ x: o.value.left + o.value.slot * l + o.value.slot / 10 + (d.value.stacked ? 0 : o.value.slot / P.value.length * a - (a === 0 ? 0 : o.value.slot / (5 * P.value.length) * a)),
850
+ y: d.value.stacked ? e.localZero : A.value.zero
851
+ },
852
+ {
853
+ x: o.value.left + o.value.slot * l + o.value.slot / 10 + (d.value.stacked ? 0 : o.value.slot / P.value.length * a - (a === 0 ? 0 : o.value.slot / (5 * P.value.length) * a)) + o.value.slot * 0.8 / (d.value.stacked ? 1 : P.value.length),
854
+ y: d.value.stacked ? e.localZero : A.value.zero
855
+ },
856
+ {
857
+ x: o.value.left + o.value.slot * l + o.value.slot / 10 + (d.value.stacked ? 0 : o.value.slot / P.value.length * a - (a === 0 ? 0 : o.value.slot / (5 * P.value.length) * a)) + o.value.slot * 0.8 / (d.value.stacked ? 1 : P.value.length),
858
+ y: e.coordinatesLine[l].y
859
+ },
860
+ {
861
+ x: o.value.left + o.value.slot * l + o.value.slot / 10 + (d.value.stacked ? 0 : o.value.slot / P.value.length * a - (a === 0 ? 0 : o.value.slot / (5 * P.value.length) * a)),
862
+ y: e.coordinatesLine[l].y
863
+ }
864
+ ],
865
+ {
866
+ strokeColor: t.value.style.chart.backgroundColor,
867
+ gradient: {
868
+ type: "linear",
869
+ start: {
870
+ x: e.coordinatesLine[l].x,
871
+ y: e.coordinatesLine[l].y
872
+ },
873
+ end: {
874
+ x: e.coordinatesLine[l].x,
875
+ y: d.value.stacked ? e.localZero : A.value.zero
876
+ },
877
+ stops: [
878
+ { offset: 0, color: e.color },
879
+ { offset: 1, color: t.value.style.chart.bar.gradient.show ? Sl(e.color, 0.5) : e.color }
880
+ ]
881
+ }
882
+ }
883
+ ), d.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && Q(
884
+ v.value,
885
+ ce(
886
+ t.value.style.chart.dataLabels.formatter,
887
+ e.coordinatesLine[l].value,
888
+ de({
889
+ p: e.prefix || "",
890
+ v: e.coordinatesLine[l].value,
891
+ s: e.suffix || "",
892
+ r: e.rounding || 0
893
+ }),
894
+ { datapoint: e.coordinatesLine[l], seriesIndex: l }
895
+ ),
896
+ o.value.left + o.value.slot * l + o.value.slot / 10 + (d.value.stacked ? 0 : o.value.slot / P.value.length * a - (a === 0 ? 0 : o.value.slot / (5 * P.value.length) * a)) + o.value.slot * 0.4 / (d.value.stacked ? 1 : P.value.length),
897
+ (e.coordinatesLine[l].value < 0 ? d.value.stacked ? e.localZero : A.value.zero : e.coordinatesLine[l].y) + t.value.style.chart.dataLabels.offsetY,
898
+ {
899
+ align: "center",
900
+ font: `${Math.round(y.value / 40 * t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,
901
+ color: t.value.style.chart.dataLabels.useSerieColor ? e.color : t.value.style.chart.dataLabels.color,
902
+ strokeColor: t.value.style.chart.backgroundColor,
903
+ lineWidth: 0.8
904
+ }
905
+ );
906
+ });
907
+ }
908
+ function Va(e, a) {
909
+ const l = e.coordinatesLine.map((r, m) => {
910
+ const C = e.series[m];
911
+ return C != null && Number.isFinite(r?.y) ? r : null;
912
+ }), u = [], n = [];
913
+ let i = [];
914
+ for (let r = 0; r < l.length; r += 1) {
915
+ const m = l[r];
916
+ if (m)
917
+ i.push(m);
918
+ else {
919
+ if (i.length >= 2) {
920
+ const C = i[0], b = i[i.length - 1];
921
+ u.push([
922
+ { x: C.x, y: a },
923
+ ...i,
924
+ { x: b.x, y: a }
925
+ ]);
926
+ } else i.length === 1 && n.push(i[0]);
927
+ i = [];
928
+ }
929
+ }
930
+ if (i.length >= 2) {
931
+ const r = i[0], m = i[i.length - 1];
932
+ u.push([
933
+ { x: r.x, y: a },
934
+ ...i,
935
+ { x: m.x, y: a }
936
+ ]);
937
+ } else i.length === 1 && n.push(i[0]);
938
+ return { polygons: u, singles: n };
939
+ }
940
+ function Ua(e) {
941
+ const a = e.coordinatesLine.map((n, i) => {
942
+ const r = e.series[i];
943
+ return r != null && Number.isFinite(n?.y) ? n : null;
944
+ }), l = [];
945
+ let u = [];
946
+ for (let n = 0; n < a.length; n += 1) {
947
+ const i = a[n];
948
+ i ? u.push(i) : (u.length >= 2 && l.push(u), u = []);
949
+ }
950
+ return u.length >= 2 && l.push(u), l;
951
+ }
952
+ function Ht(e) {
953
+ if (Oe.value) {
954
+ const a = Ua(e);
955
+ for (const l of a)
956
+ T(v.value, l, {
957
+ color: e.color,
958
+ lineWidth: 3
959
+ });
960
+ } else
961
+ T(v.value, e.coordinatesLine, {
962
+ color: e.color,
963
+ lineWidth: 3
964
+ });
965
+ }
966
+ function Ya(e) {
967
+ const a = !!Oe.value;
968
+ if (e.useArea) {
969
+ const l = d.value.stacked ? e.localZero : A.value.zero;
970
+ if (a) {
971
+ const { polygons: u, singles: n } = Va(e, l);
972
+ for (const r of u)
973
+ sa(v.value, r, {
974
+ fillColor: Ie(e.color, t.value.style.chart.area.opacity),
975
+ strokeColor: "transparent"
976
+ });
977
+ const i = y.value / 200 * t.value.style.chart.line.plots.radiusRatio;
978
+ for (const r of n)
979
+ it(
980
+ v.value,
981
+ { x: r.x, y: r.y },
982
+ i,
983
+ {
984
+ color: t.value.style.chart.backgroundColor,
985
+ fillStyle: e.color
986
+ }
987
+ );
988
+ } else {
989
+ const u = { x: e.coordinatesLine[0].x, y: l }, n = { x: e.coordinatesLine.at(-1).x, y: l };
990
+ sa(
991
+ v.value,
992
+ [u, ...e.coordinatesLine, n],
993
+ {
994
+ fillColor: Ie(e.color, t.value.style.chart.area.opacity),
995
+ strokeColor: "transparent"
996
+ }
997
+ );
998
+ }
999
+ Ht(e);
1000
+ return;
1001
+ }
1002
+ Ht(e);
1003
+ }
1004
+ function qa() {
1005
+ h.value.forEach((e, a) => {
1006
+ T(
1007
+ v.value,
1008
+ [
1009
+ { x: o.value.left, y: o.value.bottom - e.yOffset },
1010
+ { x: o.value.right, y: o.value.bottom - e.yOffset }
1011
+ ],
1012
+ {
1013
+ color: t.value.style.chart.grid.x.horizontalLines.color,
1014
+ lineWidth: 1
1015
+ }
1016
+ );
1017
+ });
1018
+ }
1019
+ function ja() {
1020
+ const { left: e, top: a, width: l, height: u } = o.value, n = s.value.start, r = s.value.end - n, m = l / r, C = F.value.start - n, b = F.value.end - n, w = Math.max(0, Math.min(r, C)), R = Math.max(0, Math.min(r, b));
1021
+ _e(
1022
+ v.value,
1023
+ [
1024
+ { x: e + w * m, y: a },
1025
+ { x: e + w * m + (R - w) * m, y: a },
1026
+ { x: e + w * m + (R - w) * m, y: a + u },
1027
+ { x: e + w * m, y: a + u }
1028
+ ],
1029
+ {
1030
+ fillColor: t.value.style.chart.zoom.preview.fill,
1031
+ strokeColor: t.value.style.chart.zoom.preview.stroke,
1032
+ lineDash: Array(4).fill(t.value.style.chart.zoom.preview.strokeDasharray),
1033
+ lineWidth: t.value.style.chart.zoom.preview.strokeWidth
1034
+ }
1035
+ );
1036
+ }
1037
+ function Z() {
1038
+ !U.value || !L.value || !v.value || (Oa(), N.value ? ((f.value !== null || $.value !== null) && t.value.style.chart.selector.show && Bt(), Xa(), d.value.stacked && t.value.style.chart.grid.x.showAxis && qa(), Da.value.forEach((e) => {
1039
+ (e.type === "line" || !e.type) && Ya(e), _.value && (Ea(e), d.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && Ha(e));
1040
+ }), L.value && (Me.value = $l(L.value))) : (Me.value && (v.value.clearRect(0, 0, 1e4, 1e4), v.value.drawImage(Me.value, 0, 0)), (f.value !== null || $.value !== null) && t.value.style.chart.selector.show && Bt(), (f.value !== null || $.value !== null) && h.value.forEach((e) => {
1041
+ const a = f.value ?? $.value, l = e.coordinatesLine[a];
1042
+ (e.type === "line" || !e.type || e.type === "plot") && l && Number.isFinite(l.x) && Number.isFinite(l.y) && it(
1043
+ v.value,
1044
+ { x: l.x, y: l.y },
1045
+ y.value / 150 * t.value.style.chart.line.plots.radiusRatio,
1046
+ {
1047
+ color: t.value.style.chart.backgroundColor,
1048
+ fillStyle: e.color
1049
+ }
1050
+ );
1051
+ })), t.value.style.chart.grid.x.timeLabels.show && Wa(), t.value.style.chart.selector.show && t.value.style.chart.selector.showHorizontalSelector && _a(), Ba(), Na(), t.value.style.chart.zoom.preview.enable && (s.value.start !== F.value.start || s.value.end !== F.value.end) && ja(), N.value = !1);
1052
+ }
1053
+ const Le = Al(() => {
1054
+ _.value = !0, Ee();
1055
+ }, O.value > 200 ? 10 : 1, !_.value);
1056
+ function Ce(e) {
1057
+ if ([null, void 0].includes(f.value ?? $.value) || !e.coordinatesLine[f.value ?? $.value]) return !1;
1058
+ const { y: a, value: l } = e.coordinatesLine[f.value ?? $.value];
1059
+ return { y: a, value: l };
1060
+ }
1061
+ function Ga(e) {
1062
+ if (!U.value || !L.value || Qe.value) return;
1063
+ const { left: a, top: l } = L.value.getBoundingClientRect(), u = e.clientX - a;
1064
+ if (X.value = (e.clientY - l) * 2, (X.value < o.value.top || X.value > o.value.bottom) && (X.value = null), u * 2 < o.value.left || u * 2 > o.value.right) {
1065
+ ke();
1066
+ return;
1067
+ }
1068
+ const n = u * 2 - o.value.left, i = Math.floor(n / o.value.slot);
1069
+ if (f.value = i, V.value = i, he.value = !0, Pe.value = !1, !_.value) return;
1070
+ let r = "";
1071
+ const m = t.value.style.chart.tooltip.customFormat, C = h.value.map((b) => ({
1072
+ shape: b.shape || null,
1073
+ name: b.name,
1074
+ color: b.color,
1075
+ type: b.type || "line",
1076
+ value: b.series.find((w, R) => R === f.value)
1077
+ }));
1078
+ _t({ seriesIndex: f.value, datapoint: C }), rt(m) && oa(() => m({
1079
+ seriesIndex: f.value,
1080
+ datapoint: C,
1081
+ series: h.value,
1082
+ config: t.value
1083
+ })) ? fe.value = m({
1084
+ seriesIndex: f.value,
1085
+ datapoint: C,
1086
+ series: h.value,
1087
+ config: t.value
1088
+ }) : (t.value.style.chart.grid.x.timeLabels.values.slice(s.value.start, s.value.end)[f.value] ? r += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; width:100%">${t.value.style.chart.tooltip.useDefaultTimeFormat ? S.value.slice(s.value.start, s.value.end)[f.value]?.text : tt.value[f.value]?.text}</div>` : r += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; width:100%">${S.value[f.value + s.value.start]?.text ?? ""}</div>`, r += It.value.join(""), fe.value = r), _.value = !1;
1089
+ }
1090
+ function Za(e) {
1091
+ return h.value.map((a) => ({
1092
+ shape: a.shape || null,
1093
+ name: a.name,
1094
+ color: a.color,
1095
+ type: a.type || "line",
1096
+ value: a.series.find((l, u) => u === e)
1097
+ }));
1098
+ }
1099
+ function Ka(e) {
1100
+ let a = "";
1101
+ const l = t.value.style.chart.tooltip.customFormat, u = Za(e);
1102
+ return _t({ seriesIndex: e, datapoint: u }), rt(l) && oa(() => l({
1103
+ seriesIndex: e,
1104
+ datapoint: u,
1105
+ series: h.value,
1106
+ config: t.value
1107
+ })) ? l({
1108
+ seriesIndex: e,
1109
+ datapoint: u,
1110
+ series: h.value,
1111
+ config: t.value
1112
+ }) : (t.value.style.chart.grid.x.timeLabels.values.slice(s.value.start, s.value.end)[e] ? a += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; width:100%">${t.value.style.chart.tooltip.useDefaultTimeFormat ? S.value.slice(s.value.start, s.value.end)[e]?.text : tt.value[e]?.text}</div>` : a += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; width:100%">${S.value[e + s.value.start]?.text ?? ""}</div>`, a += It.value.join(""), a);
1113
+ }
1114
+ function Ja(e) {
1115
+ if (!L.value || !o.value?.slot) return;
1116
+ const a = L.value.getBoundingClientRect(), l = a.width / o.value.canvasWidth, u = a.height / o.value.canvasHeight, n = o.value.left + o.value.slot * e + o.value.slot / 2, i = o.value.top + o.value.height / 2;
1117
+ pt.value = {
1118
+ x: a.left + n * l,
1119
+ y: a.top + i * u
1120
+ };
1121
+ }
1122
+ function Wt(e, { fromKeyboard: a = !1 } = {}) {
1123
+ !U.value || Qe.value || e != null && (e < 0 || e >= s.value.end - s.value.start || (f.value = e, V.value = e, he.value = !0, Pe.value = a, fe.value = Ka(e), a && Ja(e), _.value = !1, Z()));
1124
+ }
1125
+ function ke() {
1126
+ he.value = !1, f.value = null, V.value = null, fe.value = "", X.value = null, Pe.value = !1, Z();
1127
+ }
1128
+ function Qa() {
1129
+ Ge.value = !0;
1130
+ }
1131
+ function el() {
1132
+ Ge.value = !1, ke();
1133
+ }
1134
+ function tl(e) {
1135
+ if (!L.value || we.value || document.activeElement !== L.value) return;
1136
+ const a = e.key === "ArrowLeft", l = e.key === "ArrowRight";
1137
+ if (!a && !l) return;
1138
+ const u = s.value.end - s.value.start;
1139
+ if (u <= 0) return;
1140
+ e.preventDefault(), e.stopPropagation();
1141
+ let n = V.value;
1142
+ n !== null && n >= 0 && n < u ? l ? (n += 1, n >= u && (n = 0)) : (n -= 1, n < 0 && (n = u - 1)) : l ? n = 0 : n = u - 1, Wt(n, { fromKeyboard: !0 });
1143
+ }
1144
+ function _t({ seriesIndex: e, datapoint: a }) {
1145
+ const l = s.value.start + e;
1146
+ Re("selectX", {
1147
+ dataset: a,
1148
+ index: l,
1149
+ indexLabel: ""
1150
+ });
1151
+ }
1152
+ E(() => D.selectedXIndex, (e) => {
1153
+ if ([null, void 0].includes(D.selectedXIndex)) {
1154
+ ke();
1155
+ return;
1156
+ }
1157
+ const a = e - s.value.start;
1158
+ a < 0 || e >= s.value.end ? ke() : Wt(a, { fromKeyboard: !1 });
1159
+ }, { immediate: !0 }), E(() => f.value, (e) => {
1160
+ Le();
1161
+ }), E(() => s.value, (e) => {
1162
+ N.value = !0, Z();
1163
+ }, {
1164
+ deep: !0
1165
+ }), E(() => F.value, (e) => {
1166
+ Z();
1167
+ }, { deep: !0 }), E(() => d.value.showDataLabels, (e) => {
1168
+ N.value = !0, Z();
1169
+ }), E(() => X.value, (e) => {
1170
+ e && Z();
1171
+ }), E(() => d.value.stacked, (e) => {
1172
+ N.value = !0, _.value = !0, Le();
1173
+ });
1174
+ function al() {
1175
+ ke();
1176
+ }
1177
+ const ae = ut(null), re = ut(null), ie = ut(null);
1178
+ Jt(() => {
1179
+ yt.value = !0, Xt();
1180
+ });
1181
+ function Xt() {
1182
+ if (kl(D.dataset) && xa.value && wl({ componentName: "VueUiXyCanvas", type: "dataset" }), Te(() => {
1183
+ L.value && !v.value && (v.value = L.value.getContext("2d", { willReadFrequently: !0 })), v.value && U.value && (N.value = !0, _.value = !0, Ee());
1184
+ }), t.value.responsive) {
1185
+ const e = Il(() => {
1186
+ const { width: a, height: l } = Ml({
1187
+ chart: G.value,
1188
+ title: t.value.style.chart.title.text ? ht.value : null,
1189
+ legend: t.value.style.chart.legend.show ? ft.value : null,
1190
+ slicer: t.value.style.chart.zoom.show && O.value > 6 ? te.value?.$el : null,
1191
+ source: mt.value
1192
+ });
1193
+ requestAnimationFrame(() => {
1194
+ Lt.value = `${a} / ${l}`;
1195
+ });
1196
+ });
1197
+ ae.value && (re.value && ae.value.unobserve(re.value), ae.value.disconnect()), ae.value = new ResizeObserver(e), re.value = G.value.parentNode, ae.value.observe(re.value);
1198
+ }
1199
+ ie.value && ie.value.disconnect(), ie.value = new ResizeObserver(async (e) => {
1200
+ for (const a of e)
1201
+ a.contentBoxSize && ue.value && (N.value = !0, Le());
1202
+ }), ie.value.observe(ue.value), xe();
1203
+ }
1204
+ ot(() => {
1205
+ ie.value && ie.value.disconnect(), ae.value && (re.value && ae.value.unobserve(re.value), ae.value.disconnect());
1206
+ });
1207
+ function ll() {
1208
+ p.value.length ? p.value = [] : Be.value.forEach((e, a) => {
1209
+ p.value.push(a);
1210
+ }), N.value = !0, Le();
1211
+ }
1212
+ function Ne(e) {
1213
+ Re("selectLegend", h.value.find((a) => a.absoluteIndex === e)), p.value.includes(e) ? p.value = p.value.filter((a) => a !== e) : p.value.push(e), N.value = !0, Le();
1214
+ }
1215
+ function Vt(e) {
1216
+ if (!M.value.length)
1217
+ return t.value.debug && console.warn("VueUiXyCanvas - There are no series to show."), null;
1218
+ const a = M.value.find((l) => l.name === e);
1219
+ return a || (t.value.debug && console.warn(`VueUiXyCanvas - Series name not found "${e}"`), null);
1220
+ }
1221
+ function ol(e) {
1222
+ const a = Vt(e);
1223
+ a !== null && p.value.includes(a.absoluteIndex) && Ne(a.absoluteIndex);
1224
+ }
1225
+ function sl(e) {
1226
+ const a = Vt(e);
1227
+ a !== null && (p.value.includes(a.absoluteIndex) || Ne(a.absoluteIndex));
1228
+ }
1229
+ const Be = g(() => M.value.map((e, a) => ({
1230
+ ...e,
1231
+ name: e.name,
1232
+ color: la(e.color) || Tt.value[a] || se[a] || se[a % se.length],
1233
+ shape: e.shape || "circle",
1234
+ prefix: e.prefix || "",
1235
+ suffix: e.suffix || "",
1236
+ rounding: e.rounding || 0
1237
+ })).map((e) => ({
1238
+ ...e,
1239
+ opacity: p.value.includes(e.absoluteIndex) ? 0.5 : 1,
1240
+ segregate: () => Ne(e.absoluteIndex),
1241
+ isSegregated: p.value.includes(e.absoluteIndex)
1242
+ }))), ul = g(() => ({
1243
+ cy: "donut-div-legend",
1244
+ backgroundColor: t.value.style.chart.legend.backgroundColor,
1245
+ color: t.value.style.chart.legend.color,
1246
+ fontSize: t.value.style.chart.legend.fontSize,
1247
+ paddingBottom: 12,
1248
+ fontWeight: t.value.style.chart.legend.bold ? "bold" : ""
1249
+ })), He = g(() => {
1250
+ const e = [""].concat(h.value.map((n) => n.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');
1251
+ let a = [];
1252
+ for (let n = 0; n < O.value; n += 1) {
1253
+ const i = h.value.map((r) => r.series[n] ?? 0).reduce((r, m) => r + m, 0);
1254
+ a.push(
1255
+ [
1256
+ t.value.style.chart.grid.x.timeLabels.values.slice(s.value.start, s.value.end)[n] ? S?.value?.slice(s.value.start, s.value.end)?.[n]?.text ?? n + 1 : n + 1
1257
+ ].concat(
1258
+ h.value.map(
1259
+ (r) => (r.series[n] ?? 0).toFixed(t.value.table.rounding)
1260
+ )
1261
+ ).concat((i ?? 0).toFixed(t.value.table.rounding))
1262
+ );
1263
+ }
1264
+ const l = {
1265
+ th: {
1266
+ backgroundColor: t.value.table.th.backgroundColor,
1267
+ color: t.value.table.th.color,
1268
+ outline: t.value.table.th.outline
1269
+ },
1270
+ td: {
1271
+ backgroundColor: t.value.table.td.backgroundColor,
1272
+ color: t.value.table.td.color,
1273
+ outline: t.value.table.td.outline
1274
+ },
1275
+ breakpoint: t.value.table.responsiveBreakpoint
1276
+ }, u = [t.value.table.columnNames.period].concat(h.value.map((n) => n.name)).concat(t.value.table.columnNames.total);
1277
+ return { head: e, body: a.slice(0, s.value.end - s.value.start), config: l, colNames: u };
1278
+ }), Ut = g(() => {
1279
+ if (h.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
1280
+ const e = h.value.map((l) => ({
1281
+ label: l.name,
1282
+ color: l.color,
1283
+ type: l.type
1284
+ })), a = [];
1285
+ for (let l = s.value.start; l < s.value.end; l += 1) {
1286
+ const u = [t.value.style.chart.grid.x.timeLabels.values[l] ? S.value[l].text : l + 1];
1287
+ h.value.forEach((n) => {
1288
+ u.push(Number((n.series[l] || 0).toFixed(t.value.table.rounding)));
1289
+ }), a.push(u);
1290
+ }
1291
+ return { head: e, body: a };
1292
+ });
1293
+ function at(e = null) {
1294
+ const a = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [""]], l = ["", ...Ut.value.head.map((r) => r.label)], u = Ut.value.body, n = a.concat([l]).concat(u), i = zl(n);
1295
+ e ? e(i) : Tl({ csvContent: i, title: t.value.style.chart.title.text || "vue-ui-xy-canvas" });
1296
+ }
1297
+ function nl() {
1298
+ return h.value;
1299
+ }
1300
+ function Yt() {
1301
+ d.value.showTable = !d.value.showTable;
1302
+ }
1303
+ function qt() {
1304
+ d.value.showDataLabels = !d.value.showDataLabels;
1305
+ }
1306
+ function jt() {
1307
+ d.value.stacked = !d.value.stacked;
1308
+ }
1309
+ function Gt() {
1310
+ d.value.showTooltip = !d.value.showTooltip;
1311
+ }
1312
+ const we = c(!1);
1313
+ function lt() {
1314
+ we.value = !we.value;
1315
+ }
1316
+ async function rl({ scale: e = 2 } = {}) {
1317
+ if (!G.value) return;
1318
+ const { width: a, height: l } = G.value.getBoundingClientRect(), u = a / l, { imageUri: n, base64: i } = await Wl({ domElement: G.value, base64: !0, img: !0, scale: e });
1319
+ return {
1320
+ imageUri: n,
1321
+ base64: i,
1322
+ title: t.value.style.chart.title.text,
1323
+ width: a,
1324
+ height: l,
1325
+ aspectRatio: u
1326
+ };
1327
+ }
1328
+ const Se = g(() => {
1329
+ const e = t.value.table.useDialog && !t.value.table.show, a = d.value.showTable;
1330
+ return {
1331
+ component: e ? ha : Yl,
1332
+ title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? `: ${t.value.style.chart.title.subtitle.text}` : ""}`,
1333
+ props: e ? {
1334
+ backgroundColor: t.value.table.th.backgroundColor,
1335
+ color: t.value.table.th.color,
1336
+ headerColor: t.value.table.th.color,
1337
+ headerBg: t.value.table.th.backgroundColor,
1338
+ isFullscreen: me.value,
1339
+ fullscreenParent: G.value,
1340
+ forcedWidth: Math.min(800, window.innerWidth * 0.8),
1341
+ isCursorPointer: le.value
1342
+ } : {
1343
+ hideDetails: !0,
1344
+ config: {
1345
+ open: a,
1346
+ maxHeight: 1e4,
1347
+ body: {
1348
+ backgroundColor: t.value.style.chart.backgroundColor,
1349
+ color: t.value.style.chart.color
1350
+ },
1351
+ head: {
1352
+ backgroundColor: t.value.style.chart.backgroundColor,
1353
+ color: t.value.style.chart.color
1354
+ }
1355
+ }
1356
+ }
1357
+ };
1358
+ });
1359
+ E(() => d.value.showTable, (e) => {
1360
+ t.value.table.show || (e && t.value.table.useDialog && ye.value ? ye.value.open() : "close" in ye.value && ye.value.close());
1361
+ });
1362
+ function Zt() {
1363
+ d.value.showTable = !1, qe.value && qe.value.setTableIconState(!1);
1364
+ }
1365
+ function il(e) {
1366
+ if (e?.stage === "start") {
1367
+ je.value = !0;
1368
+ return;
1369
+ }
1370
+ if (e?.stage === "end") {
1371
+ je.value = !1;
1372
+ return;
1373
+ }
1374
+ St();
1375
+ }
1376
+ async function Kt() {
1377
+ if (Re("copyAlt", {
1378
+ config: t.value,
1379
+ dataset: h.value
1380
+ }), !t.value.userOptions.callbacks.altCopy) {
1381
+ console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1382
+ return;
1383
+ }
1384
+ await Promise.resolve(t.value.userOptions.callbacks.altCopy({
1385
+ config: t.value,
1386
+ dataset: h.value
1387
+ }));
1388
+ }
1389
+ return na({
1390
+ getData: nl,
1391
+ getImage: rl,
1392
+ generateCsv: at,
1393
+ generatePdf: wt,
1394
+ generateImage: St,
1395
+ hideSeries: sl,
1396
+ showSeries: ol,
1397
+ toggleTable: Yt,
1398
+ toggleLabels: qt,
1399
+ toggleStack: jt,
1400
+ toggleTooltip: Gt,
1401
+ toggleAnnotator: lt,
1402
+ toggleFullscreen: zt,
1403
+ copyAlt: Kt
1404
+ }), (e, a) => (I(), $e("div", {
1405
+ style: ve(`width:100%; position:relative; ${t.value.responsive ? "height: 100%" : ""}; background:${t.value.style.chart.backgroundColor};`),
1406
+ ref_key: "xy",
1407
+ ref: G,
1408
+ id: `xy_canvas_${j.value}`,
1409
+ class: dl(`vue-data-ui-component vue-ui-xy-canvas ${me.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
1410
+ onMouseenter: Ca,
1411
+ onMouseleave: ka
1412
+ }, [
1413
+ H("div", {
1414
+ id: `chart-instructions-${j.value}`,
1415
+ class: "sr-only"
1416
+ }, [
1417
+ H("p", null, Ae(t.value.a11y.translations.keyboardNavigation), 1)
1418
+ ], 8, Kl),
1419
+ H("div", Jl, Ae(ba.value), 1),
1420
+ t.value.style.chart.title.text ? (I(), $e("div", {
1421
+ key: 0,
1422
+ ref_key: "chartTitle",
1423
+ ref: ht,
1424
+ style: ve(`width:100%;background:${t.value.style.chart.backgroundColor};`)
1425
+ }, [
1426
+ (I(), q(Vl, {
1427
+ key: `title_${Ve.value}`,
1428
+ config: {
1429
+ title: {
1430
+ cy: "xy-canvas-title",
1431
+ ...t.value.style.chart.title
1432
+ },
1433
+ subtitle: {
1434
+ cy: "xy-canvas-subtitle",
1435
+ ...t.value.style.chart.title.subtitle
1436
+ }
1437
+ }
1438
+ }, null, 8, ["config"]))
1439
+ ], 4)) : W("", !0),
1440
+ H("div", {
1441
+ id: `legend-top-${j.value}`
1442
+ }, null, 8, Ql),
1443
+ t.value.userOptions.show && U.value && (z(xt) || z(Ke)) ? (I(), q(z(ca), {
1444
+ ref_key: "userOptionsRef",
1445
+ ref: qe,
1446
+ key: `user_option_${dt.value}`,
1447
+ backgroundColor: t.value.style.chart.backgroundColor,
1448
+ color: t.value.style.chart.color,
1449
+ isPrinting: z(Ct),
1450
+ isImaging: z(kt),
1451
+ uid: j.value,
1452
+ hasTooltip: t.value.userOptions.buttons.tooltip && t.value.style.chart.tooltip.show,
1453
+ hasPdf: t.value.userOptions.buttons.pdf,
1454
+ hasImg: t.value.userOptions.buttons.img,
1455
+ hasXls: t.value.userOptions.buttons.csv,
1456
+ hasLabel: t.value.userOptions.buttons.labels,
1457
+ hasStack: vt.dataset.length > 1 && t.value.userOptions.buttons.stack,
1458
+ hasFullscreen: t.value.userOptions.buttons.fullscreen,
1459
+ hasAltCopy: t.value.userOptions.buttons.altCopy,
1460
+ hasTable: s.value.end - s.value.start <= 730 && t.value.userOptions.buttons.table,
1461
+ isFullscreen: me.value,
1462
+ isTooltip: d.value.showTooltip,
1463
+ isStacked: d.value.stacked,
1464
+ titles: { ...t.value.userOptions.buttonTitles },
1465
+ chartElement: G.value,
1466
+ position: t.value.userOptions.position,
1467
+ hasAnnotator: t.value.userOptions.buttons.annotator,
1468
+ isAnnotation: we.value,
1469
+ callbacks: t.value.userOptions.callbacks,
1470
+ printScale: t.value.userOptions.print.scale,
1471
+ tableDialog: t.value.table.useDialog,
1472
+ isCursorPointer: le.value,
1473
+ onToggleFullscreen: zt,
1474
+ onGeneratePdf: z(wt),
1475
+ onGenerateCsv: at,
1476
+ onGenerateImage: il,
1477
+ onToggleTable: Yt,
1478
+ onToggleLabels: qt,
1479
+ onToggleStack: jt,
1480
+ onToggleTooltip: Gt,
1481
+ onToggleAnnotator: lt,
1482
+ onCopyAlt: Kt,
1483
+ style: ve({
1484
+ visibility: z(xt) ? z(Ke) ? "visible" : "hidden" : "visible"
1485
+ })
1486
+ }, Qt({ _: 2 }, [
1487
+ e.$slots.menuIcon ? {
1488
+ name: "menuIcon",
1489
+ fn: x(({ isOpen: l, color: u }) => [
1490
+ k(e.$slots, "menuIcon", K(J({ isOpen: l, color: u })), void 0, !0)
1491
+ ]),
1492
+ key: "0"
1493
+ } : void 0,
1494
+ e.$slots.optionTooltip ? {
1495
+ name: "optionTooltip",
1496
+ fn: x(() => [
1497
+ k(e.$slots, "optionTooltip", {}, void 0, !0)
1498
+ ]),
1499
+ key: "1"
1500
+ } : void 0,
1501
+ e.$slots.optionPdf ? {
1502
+ name: "optionPdf",
1503
+ fn: x(() => [
1504
+ k(e.$slots, "optionPdf", {}, void 0, !0)
1505
+ ]),
1506
+ key: "2"
1507
+ } : void 0,
1508
+ e.$slots.optionCsv ? {
1509
+ name: "optionCsv",
1510
+ fn: x(() => [
1511
+ k(e.$slots, "optionCsv", {}, void 0, !0)
1512
+ ]),
1513
+ key: "3"
1514
+ } : void 0,
1515
+ e.$slots.optionImg ? {
1516
+ name: "optionImg",
1517
+ fn: x(() => [
1518
+ k(e.$slots, "optionImg", {}, void 0, !0)
1519
+ ]),
1520
+ key: "4"
1521
+ } : void 0,
1522
+ e.$slots.optionTable ? {
1523
+ name: "optionTable",
1524
+ fn: x(() => [
1525
+ k(e.$slots, "optionTable", {}, void 0, !0)
1526
+ ]),
1527
+ key: "5"
1528
+ } : void 0,
1529
+ e.$slots.optionLabels ? {
1530
+ name: "optionLabels",
1531
+ fn: x(() => [
1532
+ k(e.$slots, "optionLabels", {}, void 0, !0)
1533
+ ]),
1534
+ key: "6"
1535
+ } : void 0,
1536
+ e.$slots.optionStack ? {
1537
+ name: "optionStack",
1538
+ fn: x(() => [
1539
+ k(e.$slots, "optionStack", {}, void 0, !0)
1540
+ ]),
1541
+ key: "7"
1542
+ } : void 0,
1543
+ e.$slots.optionFullscreen ? {
1544
+ name: "optionFullscreen",
1545
+ fn: x(({ toggleFullscreen: l, isFullscreen: u }) => [
1546
+ k(e.$slots, "optionFullscreen", K(J({ toggleFullscreen: l, isFullscreen: u })), void 0, !0)
1547
+ ]),
1548
+ key: "8"
1549
+ } : void 0,
1550
+ e.$slots.optionAnnotator ? {
1551
+ name: "optionAnnotator",
1552
+ fn: x(({ toggleAnnotator: l, isAnnotator: u }) => [
1553
+ k(e.$slots, "optionAnnotator", K(J({ toggleAnnotator: l, isAnnotator: u })), void 0, !0)
1554
+ ]),
1555
+ key: "9"
1556
+ } : void 0,
1557
+ e.$slots.optionAltCopy ? {
1558
+ name: "optionAltCopy",
1559
+ fn: x(({ altCopy: l }) => [
1560
+ k(e.$slots, "optionAltCopy", K(J({ altCopy: l })), void 0, !0)
1561
+ ]),
1562
+ key: "10"
1563
+ } : void 0
1564
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasLabel", "hasStack", "hasFullscreen", "hasAltCopy", "hasTable", "isFullscreen", "isTooltip", "isStacked", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "isCursorPointer", "onGeneratePdf", "style"])) : W("", !0),
1565
+ H("div", {
1566
+ class: "vue-ui-xy-canvas",
1567
+ style: ve(`position: relative; aspect-ratio: ${Lt.value}`),
1568
+ ref_key: "container",
1569
+ ref: ue
1570
+ }, [
1571
+ H("canvas", {
1572
+ ref_key: "canvas",
1573
+ ref: L,
1574
+ "aria-label": pa.value,
1575
+ "aria-describedby": `chart-instructions-${j.value}`,
1576
+ role: "img",
1577
+ "aria-live": "polite",
1578
+ tabindex: "0",
1579
+ style: { width: "100%", height: "100%" },
1580
+ onMousemove: a[0] || (a[0] = (l) => Ga(l)),
1581
+ onMouseleave: al,
1582
+ onFocus: Qa,
1583
+ onBlur: el,
1584
+ onKeydown: tl
1585
+ }, null, 40, eo),
1586
+ e.$slots.hint ? (I(), $e("div", to, [
1587
+ k(e.$slots, "hint", K(J({ hint: t.value.a11y.translations.keyboardNavigation, isVisible: Ge.value })), void 0, !0)
1588
+ ])) : W("", !0),
1589
+ k(e.$slots, "skeleton", {}, () => [
1590
+ z(De) ? (I(), q(Ol, { key: 0 })) : W("", !0)
1591
+ ], !0),
1592
+ ea(z(ia), {
1593
+ teleportTo: t.value.style.chart.tooltip.teleportTo,
1594
+ show: d.value.showTooltip && he.value,
1595
+ backgroundColor: t.value.style.chart.tooltip.backgroundColor,
1596
+ color: t.value.style.chart.tooltip.color,
1597
+ fontSize: t.value.style.chart.tooltip.fontSize,
1598
+ borderRadius: t.value.style.chart.tooltip.borderRadius,
1599
+ borderColor: t.value.style.chart.tooltip.borderColor,
1600
+ borderWidth: t.value.style.chart.tooltip.borderWidth,
1601
+ position: t.value.style.chart.tooltip.position,
1602
+ offsetY: t.value.style.chart.tooltip.offsetY,
1603
+ parent: e.$refs.xy,
1604
+ content: fe.value,
1605
+ isFullscreen: me.value,
1606
+ backgroundOpacity: t.value.style.chart.tooltip.backgroundOpacity,
1607
+ isCustom: z(rt)(t.value.style.chart.tooltip.customFormat),
1608
+ smooth: t.value.style.chart.tooltip.smooth,
1609
+ backdropFilter: t.value.style.chart.tooltip.backdropFilter,
1610
+ smoothForce: t.value.style.chart.tooltip.smoothForce,
1611
+ smoothSnapThreshold: t.value.style.chart.tooltip.smoothSnapThreshold,
1612
+ isA11yMode: Pe.value,
1613
+ a11yPosition: pt.value
1614
+ }, {
1615
+ "tooltip-before": x(() => [
1616
+ k(e.$slots, "tooltip-before", K(J({ ...ct.value })), void 0, !0)
1617
+ ]),
1618
+ "tooltip-after": x(() => [
1619
+ k(e.$slots, "tooltip-after", K(J({ ...ct.value })), void 0, !0)
1620
+ ]),
1621
+ _: 3
1622
+ }, 8, ["teleportTo", "show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "position", "offsetY", "parent", "content", "isFullscreen", "backgroundOpacity", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold", "isA11yMode", "a11yPosition"])
1623
+ ], 4),
1624
+ t.value.style.chart.zoom.show && O.value > 6 && U.value && gt.value && !z(De) ? (I(), q(ql, {
1625
+ key: 2,
1626
+ ref_key: "chartSlicer",
1627
+ ref: te,
1628
+ allMinimaps: Ia.value,
1629
+ background: t.value.style.chart.zoom.color,
1630
+ borderColor: t.value.style.chart.backgroundColor,
1631
+ customFormat: t.value.style.chart.zoom.customFormat,
1632
+ cutNullValues: Oe.value,
1633
+ enableRangeHandles: t.value.style.chart.zoom.enableRangeHandles,
1634
+ enableSelectionDrag: t.value.style.chart.zoom.enableSelectionDrag,
1635
+ end: s.value.end,
1636
+ focusOnDrag: t.value.style.chart.zoom.focusOnDrag,
1637
+ focusRangeRatio: t.value.style.chart.zoom.focusRangeRatio,
1638
+ fontSize: t.value.style.chart.zoom.fontSize,
1639
+ immediate: !t.value.style.chart.zoom.preview.enable,
1640
+ inputColor: t.value.style.chart.zoom.color,
1641
+ isPreview: Fa.value,
1642
+ labelLeft: t.value.style.chart.grid.x.timeLabels.values[s.value.start] ? S.value[s.value.start]?.text : "",
1643
+ labelRight: t.value.style.chart.grid.x.timeLabels.values[s.value.end - 1] ? S.value[s.value.end - 1]?.text : "",
1644
+ max: O.value,
1645
+ min: 0,
1646
+ minimap: Aa.value,
1647
+ minimapCompact: t.value.style.chart.zoom.minimap.compact,
1648
+ minimapFrameColor: t.value.style.chart.zoom.minimap.frameColor,
1649
+ minimapIndicatorColor: t.value.style.chart.zoom.minimap.indicatorColor,
1650
+ minimapLineColor: t.value.style.chart.zoom.minimap.lineColor,
1651
+ minimapMerged: t.value.style.chart.zoom.minimap.merged,
1652
+ minimapSelectedColor: t.value.style.chart.zoom.minimap.selectedColor,
1653
+ minimapSelectedColorOpacity: t.value.style.chart.zoom.minimap.selectedColorOpacity,
1654
+ minimapSelectedIndex: f.value,
1655
+ minimapSelectionRadius: t.value.style.chart.zoom.minimap.selectionRadius,
1656
+ preciseLabels: Nt.value?.length ? Nt.value : S.value,
1657
+ refreshEndPoint: t.value.style.chart.zoom.endIndex !== null ? t.value.style.chart.zoom.endIndex + 1 : O.value,
1658
+ refreshStartPoint: t.value.style.chart.zoom.startIndex !== null ? t.value.style.chart.zoom.startIndex : 0,
1659
+ selectColor: t.value.style.chart.zoom.highlightColor,
1660
+ selectedSeries: M.value,
1661
+ smoothMinimap: t.value.style.chart.zoom.minimap.smooth,
1662
+ start: s.value.start,
1663
+ timeLabels: S.value,
1664
+ usePreciseLabels: t.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !t.value.style.chart.zoom.useDefaultFormat,
1665
+ textColor: t.value.style.chart.color,
1666
+ useResetSlot: t.value.style.chart.zoom.useResetSlot,
1667
+ valueEnd: s.value.end,
1668
+ valueStart: s.value.start,
1669
+ verticalHandles: t.value.style.chart.zoom.minimap.verticalHandles,
1670
+ maxWidth: t.value.style.chart.zoom.maxWidth,
1671
+ additionalMinimapHeight: t.value.style.chart.zoom.minimap.additionalHeight,
1672
+ handleType: t.value.style.chart.zoom.minimap.handleType,
1673
+ handleIconColor: t.value.style.chart.zoom.minimap.handleIconColor,
1674
+ handleBorderWidth: t.value.style.chart.zoom.minimap.handleBorderWidth,
1675
+ handleBorderColor: t.value.style.chart.zoom.minimap.handleBorderColor,
1676
+ handleFill: t.value.style.chart.zoom.minimap.handleFill,
1677
+ handleWidth: t.value.style.chart.zoom.minimap.handleWidth,
1678
+ onFutureEnd: a[1] || (a[1] = (l) => Mt("end", l)),
1679
+ onFutureStart: a[2] || (a[2] = (l) => Mt("start", l)),
1680
+ onReset: xe,
1681
+ onTrapMouse: wa,
1682
+ "onUpdate:end": Ra,
1683
+ "onUpdate:start": Pa
1684
+ }, {
1685
+ "reset-action": x(({ reset: l }) => [
1686
+ k(e.$slots, "reset-action", K(J({ reset: l })), void 0, !0)
1687
+ ]),
1688
+ _: 3
1689
+ }, 8, ["allMinimaps", "background", "borderColor", "customFormat", "cutNullValues", "enableRangeHandles", "enableSelectionDrag", "end", "focusOnDrag", "focusRangeRatio", "fontSize", "immediate", "inputColor", "isPreview", "labelLeft", "labelRight", "max", "minimap", "minimapCompact", "minimapFrameColor", "minimapIndicatorColor", "minimapLineColor", "minimapMerged", "minimapSelectedColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "minimapSelectionRadius", "preciseLabels", "refreshEndPoint", "refreshStartPoint", "selectColor", "selectedSeries", "smoothMinimap", "start", "timeLabels", "usePreciseLabels", "textColor", "useResetSlot", "valueEnd", "valueStart", "verticalHandles", "maxWidth", "additionalMinimapHeight", "handleType", "handleIconColor", "handleBorderWidth", "handleBorderColor", "handleFill", "handleWidth"])) : W("", !0),
1690
+ H("div", {
1691
+ id: `legend-bottom-${j.value}`
1692
+ }, null, 8, ao),
1693
+ yt.value ? (I(), q(hl, {
1694
+ key: 3,
1695
+ to: t.value.style.chart.legend.position === "top" ? `#legend-top-${j.value}` : `#legend-bottom-${j.value}`
1696
+ }, [
1697
+ H("div", {
1698
+ ref_key: "chartLegend",
1699
+ ref: ft
1700
+ }, [
1701
+ t.value.style.chart.legend.show && U.value ? (I(), q(Xl, {
1702
+ legendSet: Be.value,
1703
+ config: ul.value,
1704
+ key: `legend_${Ye.value}`,
1705
+ isCursorPointer: le.value,
1706
+ onClickMarker: a[3] || (a[3] = ({ i: l }) => Ne(l))
1707
+ }, {
1708
+ item: x(({ legend: l, index: u }) => [
1709
+ H("div", {
1710
+ onClick: (n) => l.segregate(),
1711
+ style: ve(`opacity:${p.value.includes(u) ? 0.5 : 1}`)
1712
+ }, Ae(l.name), 13, lo)
1713
+ ]),
1714
+ legendToggle: x(() => [
1715
+ Be.value.length > 2 && t.value.style.chart.legend.selectAllToggle.show && !z(De) ? (I(), q(jl, {
1716
+ key: 0,
1717
+ backgroundColor: t.value.style.chart.legend.selectAllToggle.backgroundColor,
1718
+ color: t.value.style.chart.legend.selectAllToggle.color,
1719
+ fontSize: t.value.style.chart.legend.fontSize,
1720
+ checked: p.value.length > 0,
1721
+ isCursorPointer: le.value,
1722
+ onToggle: ll
1723
+ }, null, 8, ["backgroundColor", "color", "fontSize", "checked", "isCursorPointer"])) : W("", !0)
1724
+ ]),
1725
+ _: 1
1726
+ }, 8, ["legendSet", "config", "isCursorPointer"])) : k(e.$slots, "legend", {
1727
+ key: 1,
1728
+ legend: Be.value
1729
+ }, void 0, !0)
1730
+ ], 512)
1731
+ ], 8, ["to"])) : W("", !0),
1732
+ e.$slots.watermark ? (I(), $e("div", oo, [
1733
+ k(e.$slots, "watermark", K(J({ isPrinting: z(Ct) || z(kt) || je.value })), void 0, !0)
1734
+ ])) : W("", !0),
1735
+ e.$slots.source ? (I(), $e("div", {
1736
+ key: 5,
1737
+ ref_key: "source",
1738
+ ref: mt,
1739
+ dir: "auto"
1740
+ }, [
1741
+ k(e.$slots, "source", {}, void 0, !0)
1742
+ ], 512)) : W("", !0),
1743
+ U.value && t.value.userOptions.buttons.table ? (I(), q(fl(Se.value.component), ml({ key: 6 }, Se.value.props, {
1744
+ ref_key: "tableUnit",
1745
+ ref: ye,
1746
+ onClose: Zt
1747
+ }), Qt({
1748
+ content: x(() => [
1749
+ (I(), q(z(va), {
1750
+ key: `table_${Ue.value}`,
1751
+ colNames: He.value.colNames,
1752
+ head: He.value.head,
1753
+ body: He.value.body,
1754
+ config: He.value.config,
1755
+ title: t.value.table.useDialog ? "" : Se.value.title,
1756
+ withCloseButton: !t.value.table.useDialog,
1757
+ isCursorPointer: le.value,
1758
+ onClose: Zt
1759
+ }, {
1760
+ th: x(({ th: l }) => [
1761
+ H("div", { innerHTML: l }, null, 8, so)
1762
+ ]),
1763
+ td: x(({ td: l }) => [
1764
+ ta(Ae(l), 1)
1765
+ ]),
1766
+ _: 1
1767
+ }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton", "isCursorPointer"]))
1768
+ ]),
1769
+ _: 2
1770
+ }, [
1771
+ t.value.table.useDialog ? {
1772
+ name: "title",
1773
+ fn: x(() => [
1774
+ ta(Ae(Se.value.title), 1)
1775
+ ]),
1776
+ key: "0"
1777
+ } : void 0,
1778
+ t.value.table.useDialog ? {
1779
+ name: "actions",
1780
+ fn: x(() => [
1781
+ H("button", {
1782
+ tabindex: "0",
1783
+ class: "vue-ui-user-options-button",
1784
+ onClick: a[4] || (a[4] = (l) => at(t.value.userOptions.callbacks.csv)),
1785
+ style: ve({ cursor: le.value ? "pointer" : "default" })
1786
+ }, [
1787
+ ea(Ul, {
1788
+ name: "fileCsv",
1789
+ stroke: Se.value.props.color
1790
+ }, null, 8, ["stroke"])
1791
+ ], 4)
1792
+ ]),
1793
+ key: "1"
1794
+ } : void 0
1795
+ ]), 1040)) : W("", !0),
1796
+ t.value.userOptions.buttons.annotator && h.value.length ? (I(), q(z(da), {
1797
+ key: 7,
1798
+ parent: G.value,
1799
+ backgroundColor: t.value.style.chart.backgroundColor,
1800
+ color: t.value.style.chart.color,
1801
+ active: we.value,
1802
+ isCursorPointer: le.value,
1803
+ onClose: lt
1804
+ }, null, 8, ["parent", "backgroundColor", "color", "active", "isCursorPointer"])) : W("", !0)
1805
+ ], 46, Zl));
1806
+ }
1807
+ }, $o = /* @__PURE__ */ Gl(uo, [["__scopeId", "data-v-959fa836"]]);
1808
+ export {
1809
+ $o as default
1810
+ };