vue-data-ui 3.23.10 → 3.23.11

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 (200) hide show
  1. package/README.md +40 -40
  2. package/dist/{Arrow-bwmME0jw.js → Arrow-DrF4NNJO.js} +1 -1
  3. package/dist/{BaseDraggableDialog-DBVHlhQZ.js → BaseDraggableDialog-Dr_Q6Yt5.js} +2 -2
  4. package/dist/{BaseIcon-B4n7br_R.js → BaseIcon-BbElSC8_.js} +1 -1
  5. package/dist/{BaseLegendToggle-wRhcG_-q.js → BaseLegendToggle-CtEdLr4R.js} +1 -1
  6. package/dist/{BaseZoomControls-BZjzzyQo.js → BaseZoomControls-Cvq4UmNG.js} +2 -2
  7. package/dist/{ColorPicker-B9kUMLSz.js → ColorPicker-ChOgAmCi.js} +2 -2
  8. package/dist/{DataTable-DMsScfkx.js → DataTable-CmyEubtT.js} +2 -2
  9. package/dist/{HillActions-IWPfuceW.js → HillActions-3HneGJhS.js} +1 -1
  10. package/dist/{Legend-DWEFXq9E.js → Legend-BJtY2RA9.js} +2 -2
  11. package/dist/{NonSvgPenAndPaper-Crs4-xWz.js → NonSvgPenAndPaper-DmxzHJtV.js} +3 -3
  12. package/dist/{PackageVersion-DNTJUKh1.js → PackageVersion-C0b7KAMa.js} +1 -1
  13. package/dist/{PenAndPaper-DJ607Hx6.js → PenAndPaper-CIa1F5Jq.js} +3 -3
  14. package/dist/{Shape-BAhF1ToV.js → Shape-BAL5bQmA.js} +1 -1
  15. package/dist/{SlicerPreview-sXtk2ZZ2.js → SlicerPreview-BRRyc1p7.js} +426 -426
  16. package/dist/{SparkTooltip-BE50SZQH.js → SparkTooltip-Bou05CV_.js} +1 -1
  17. package/dist/{Title-BGLPsoA9.js → Title-CaVA8EIw.js} +1 -1
  18. package/dist/{Tooltip-DO4-MVhc.js → Tooltip-CVxJe3UW.js} +1 -1
  19. package/dist/{UserOptions-HQyukyl2.js → UserOptions-WH7-49V0.js} +2 -2
  20. package/dist/components/arrow.js +1 -1
  21. package/dist/components/vue-ui-3d-bar.js +1 -1
  22. package/dist/components/vue-ui-accordion.js +1 -1
  23. package/dist/components/vue-ui-age-pyramid.js +1 -1
  24. package/dist/components/vue-ui-annotator.js +1 -1
  25. package/dist/components/vue-ui-bullet.js +1 -1
  26. package/dist/components/vue-ui-bump.js +1 -1
  27. package/dist/components/vue-ui-candlestick.js +1 -1
  28. package/dist/components/vue-ui-carousel-table.js +1 -1
  29. package/dist/components/vue-ui-chestnut.js +1 -1
  30. package/dist/components/vue-ui-chord.js +1 -1
  31. package/dist/components/vue-ui-circle-pack.js +1 -1
  32. package/dist/components/vue-ui-cursor.js +1 -1
  33. package/dist/components/vue-ui-dag.js +1 -1
  34. package/dist/components/vue-ui-dashboard.js +1 -1
  35. package/dist/components/vue-ui-digits.js +1 -1
  36. package/dist/components/vue-ui-donut-evolution.js +1 -1
  37. package/dist/components/vue-ui-donut.js +1 -1
  38. package/dist/components/vue-ui-dumbbell.js +1 -1
  39. package/dist/components/vue-ui-flow.js +1 -1
  40. package/dist/components/vue-ui-funnel.js +1 -1
  41. package/dist/components/vue-ui-galaxy.js +1 -1
  42. package/dist/components/vue-ui-gauge.js +1 -1
  43. package/dist/components/vue-ui-geo.js +1 -1
  44. package/dist/components/vue-ui-gizmo.js +1 -1
  45. package/dist/components/vue-ui-heatmap.js +1 -1
  46. package/dist/components/vue-ui-hill.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-Cg_3vpOo.js → dom-to-png-COvyU2SG.js} +1 -1
  91. package/dist/exposedLib-DrUEXSyf.js +28 -0
  92. package/dist/{img-tU9mMt9W.js → img-Bkzj3lDD.js} +1 -1
  93. package/dist/{labelUtils-C_lMnQRs.js → labelUtils-iX76cA2-.js} +1 -1
  94. package/dist/{lib-AT2PUyyh.js → lib-Dqr_-I6Y.js} +165 -162
  95. package/dist/{package-enC-Nivt.js → package-D7_0M69J.js} +1 -1
  96. package/dist/{pdf-ColHHJFH.js → pdf-Bk_9lTdQ.js} +1 -1
  97. package/dist/{render-common-CqcoYfCA.js → render-common-B0f5NTO9.js} +12 -12
  98. package/dist/ssr/vue-ui-donut.js +1 -1
  99. package/dist/ssr/vue-ui-xy.js +1 -1
  100. package/dist/ssr.js +2 -2
  101. package/dist/style.css +1 -1
  102. package/dist/types/vue-data-ui.d.ts +13 -2
  103. package/dist/types/vue-ui-dag.d.ts +2 -0
  104. package/dist/{useNestedProp-CW0vJS1B.js → useNestedProp-CulPqtou.js} +1 -1
  105. package/dist/{usePrinter-BFS7d6eb.js → usePrinter-CEiH1b6R.js} +2 -2
  106. package/dist/utils.js +9 -9
  107. package/dist/{vue-data-ui-DD7J3yor.js → vue-data-ui-BlZHZHoH.js} +69 -69
  108. package/dist/vue-data-ui.js +73 -73
  109. package/dist/vue-ui-3d-bar-CtT2BovY.js +1829 -0
  110. package/dist/{vue-ui-accordion-DJNjilyy.js → vue-ui-accordion-C6L7glHU.js} +3 -3
  111. package/dist/{vue-ui-age-pyramid-DI8b5E2H.js → vue-ui-age-pyramid-BhGNgnLB.js} +27 -27
  112. package/dist/{vue-ui-annotator-7ZVfFskI.js → vue-ui-annotator-BwIu0JUV.js} +9 -9
  113. package/dist/vue-ui-bullet-BI7KJyJx.js +700 -0
  114. package/dist/{vue-ui-bump-DzB3WQnq.js → vue-ui-bump-BCQ97z1G.js} +237 -237
  115. package/dist/{vue-ui-candlestick--YWEtek_.js → vue-ui-candlestick-Cs7I5MQS.js} +245 -245
  116. package/dist/{vue-ui-carousel-table-Dn3RZU0p.js → vue-ui-carousel-table-CDjAjc4b.js} +108 -108
  117. package/dist/{vue-ui-chestnut-BIsXeXiU.js → vue-ui-chestnut-d6GxjfcP.js} +86 -86
  118. package/dist/vue-ui-chord-BuConnPN.js +1345 -0
  119. package/dist/vue-ui-circle-pack-CmxANHap.js +1633 -0
  120. package/dist/{vue-ui-cursor-C-P2D5i6.js → vue-ui-cursor-CQcnZYBv.js} +3 -3
  121. package/dist/{vue-ui-dag-CThnMMWA.js → vue-ui-dag-DKUZN-aQ.js} +923 -885
  122. package/dist/{vue-ui-dashboard-D0NNTRO3.js → vue-ui-dashboard-ciI4wMe6.js} +69 -69
  123. package/dist/{vue-ui-digits-9tGjGzZh.js → vue-ui-digits-DWf1vzYE.js} +3 -3
  124. package/dist/{vue-ui-donut-DLN9uPOi.js → vue-ui-donut-CvCViwSI.js} +64 -64
  125. package/dist/{vue-ui-donut-EZu8p7HF.js → vue-ui-donut-DZTtuFAG.js} +85 -85
  126. package/dist/{vue-ui-donut-evolution-mu-iGTIn.js → vue-ui-donut-evolution-BvZX3Gi8.js} +347 -347
  127. package/dist/{vue-ui-dumbbell-Dvldi3Oo.js → vue-ui-dumbbell-BZywCpHd.js} +229 -229
  128. package/dist/vue-ui-flow-D5jcKr_S.js +1214 -0
  129. package/dist/vue-ui-funnel-7zX5QnQx.js +747 -0
  130. package/dist/{vue-ui-galaxy-D6eYN8Ut.js → vue-ui-galaxy-BuGd-Ojm.js} +64 -64
  131. package/dist/vue-ui-gauge-BlDQIpBk.js +932 -0
  132. package/dist/{vue-ui-geo-CQqNemR6.js → vue-ui-geo-PWGZw4Un.js} +34 -34
  133. package/dist/{vue-ui-gizmo-ClunTUxX.js → vue-ui-gizmo-CTxB3PAl.js} +10 -10
  134. package/dist/{vue-ui-heatmap-B_pSQNzO.js → vue-ui-heatmap-sFF5IbM8.js} +472 -472
  135. package/dist/{vue-ui-hill-Byp0Tnny.js → vue-ui-hill-DO3r2s-i.js} +10 -10
  136. package/dist/vue-ui-history-plot-Cj-Olvhn.js +1695 -0
  137. package/dist/vue-ui-horizontal-bar-B34aYuDZ.js +1708 -0
  138. package/dist/{vue-ui-kpi-BKw5t-rX.js → vue-ui-kpi-Co6y1YlE.js} +3 -3
  139. package/dist/{vue-ui-mini-loader-BNm0MQDw.js → vue-ui-mini-loader-BVSIAFYi.js} +2 -2
  140. package/dist/{vue-ui-molecule-DRwQV5hN.js → vue-ui-molecule-ERAB4YzZ.js} +176 -176
  141. package/dist/{vue-ui-mood-radar-Bj3KTWYj.js → vue-ui-mood-radar-BPp7L6OP.js} +20 -20
  142. package/dist/{vue-ui-nested-donuts-83Wh2w6z.js → vue-ui-nested-donuts-CX5ut2yp.js} +104 -104
  143. package/dist/vue-ui-onion-CWYJTUCq.js +1233 -0
  144. package/dist/vue-ui-parallel-coordinate-plot-DJrV-dVt.js +1430 -0
  145. package/dist/{vue-ui-quadrant-_J-Qr7-K.js → vue-ui-quadrant-wj8Up03L.js} +32 -32
  146. package/dist/{vue-ui-quick-chart-DcOUq4ym.js → vue-ui-quick-chart-CPYdScHL.js} +153 -153
  147. package/dist/{vue-ui-radar-FlRlsoAd.js → vue-ui-radar-D3gLQcI5.js} +41 -41
  148. package/dist/{vue-ui-rating-eCxEZD8C.js → vue-ui-rating-dBCk6ECe.js} +26 -26
  149. package/dist/vue-ui-relation-circle-DeNBOPjz.js +903 -0
  150. package/dist/vue-ui-ridgeline-DQcZJ_hv.js +1614 -0
  151. package/dist/vue-ui-rings-CF9NfFW2.js +1250 -0
  152. package/dist/vue-ui-scatter-U_xxKOte.js +2403 -0
  153. package/dist/{vue-ui-skeleton-CNOam3kC.js → vue-ui-skeleton-GA4wzjXV.js} +3 -3
  154. package/dist/{vue-ui-smiley-YdyidjBH.js → vue-ui-smiley-D1pW2Fdy.js} +23 -23
  155. package/dist/{vue-ui-spark-trend-CS5GLtYL.js → vue-ui-spark-trend-BXRGMn5-.js} +23 -23
  156. package/dist/{vue-ui-sparkbar-DDHwgP4k.js → vue-ui-sparkbar-96D0eR-o.js} +24 -24
  157. package/dist/{vue-ui-sparkgauge-BcQu9V3h.js → vue-ui-sparkgauge-BWBek2u2.js} +61 -61
  158. package/dist/{vue-ui-sparkhistogram-CPsA5P6c.js → vue-ui-sparkhistogram-Cqs068RX.js} +15 -15
  159. package/dist/vue-ui-sparkline-B8cyY_P1.js +1584 -0
  160. package/dist/{vue-ui-sparkstackbar-4tsTxMe2.js → vue-ui-sparkstackbar-C0BkLc2b.js} +207 -207
  161. package/dist/vue-ui-stackbar-DtsOc7B_.js +2332 -0
  162. package/dist/{vue-ui-stackline-BNCWO_jG.js → vue-ui-stackline-MSs0pdhE.js} +605 -605
  163. package/dist/{vue-ui-strip-plot-2Y1c02Ek.js → vue-ui-strip-plot-Df-TomML.js} +57 -57
  164. package/dist/vue-ui-table-BKSRQGVK.js +1352 -0
  165. package/dist/{vue-ui-table-heatmap-BacaEjQy.js → vue-ui-table-heatmap-CglQqfWH.js} +84 -84
  166. package/dist/{vue-ui-table-sparkline-B8oAU5yr.js → vue-ui-table-sparkline-B7Dh-fN2.js} +11 -11
  167. package/dist/vue-ui-thermometer-DXuLn8NC.js +756 -0
  168. package/dist/{vue-ui-timer-CWZgSpP8.js → vue-ui-timer-orCjVwS4.js} +12 -12
  169. package/dist/{vue-ui-tiremarks-LLVCPyg9.js → vue-ui-tiremarks-DNoQ6Fl2.js} +12 -12
  170. package/dist/{vue-ui-treemap-ehBl9JMC.js → vue-ui-treemap-90_Clj0e.js} +44 -44
  171. package/dist/vue-ui-waffle-BSQXyJ1S.js +1610 -0
  172. package/dist/{vue-ui-wheel-C4OHPrtC.js → vue-ui-wheel-CfU0Nnn0.js} +28 -28
  173. package/dist/{vue-ui-word-cloud-CDHn3Kwa.js → vue-ui-word-cloud-AgMvmPlI.js} +32 -32
  174. package/dist/{vue-ui-world-ao1xf04I.js → vue-ui-world-D0Z9B6M2.js} +116 -116
  175. package/dist/{vue-ui-xy-_U3wmtCf.js → vue-ui-xy-5Te2TfRK.js} +304 -304
  176. package/dist/vue-ui-xy-canvas-BHpBO5dS.js +1823 -0
  177. package/dist/{vue-ui-xy-DmJDCl3c.js → vue-ui-xy-ua_mFu_a.js} +99 -99
  178. package/package.json +1 -1
  179. package/dist/exposedLib-vfRiIvq_.js +0 -28
  180. package/dist/vue-ui-3d-bar-DgrcdAgz.js +0 -1829
  181. package/dist/vue-ui-bullet-Dyd5F1Wa.js +0 -700
  182. package/dist/vue-ui-chord-BimXqVsF.js +0 -1345
  183. package/dist/vue-ui-circle-pack-DKQEhL-L.js +0 -1633
  184. package/dist/vue-ui-flow-DYZBT5Cb.js +0 -1214
  185. package/dist/vue-ui-funnel--NaxO0cZ.js +0 -747
  186. package/dist/vue-ui-gauge-DTIEl2Xb.js +0 -932
  187. package/dist/vue-ui-history-plot-CMu8ST1E.js +0 -1695
  188. package/dist/vue-ui-horizontal-bar-BQn7WxQ-.js +0 -1708
  189. package/dist/vue-ui-onion-C27GpneA.js +0 -1233
  190. package/dist/vue-ui-parallel-coordinate-plot-BklOszr1.js +0 -1430
  191. package/dist/vue-ui-relation-circle-DnsxHv7t.js +0 -903
  192. package/dist/vue-ui-ridgeline-TopTLyaE.js +0 -1614
  193. package/dist/vue-ui-rings-obVfb09j.js +0 -1250
  194. package/dist/vue-ui-scatter-BHSuA506.js +0 -2403
  195. package/dist/vue-ui-sparkline-CnbO-GkM.js +0 -1584
  196. package/dist/vue-ui-stackbar-2_SrMFNT.js +0 -2332
  197. package/dist/vue-ui-table-DJZxHo5N.js +0 -1352
  198. package/dist/vue-ui-thermometer-BGtxNU9T.js +0 -756
  199. package/dist/vue-ui-waffle-DpBAXbhh.js +0 -1610
  200. package/dist/vue-ui-xy-canvas-Bx-9y53V.js +0 -1823
@@ -0,0 +1,1823 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { $ as t, At as n, Bt as r, D as i, Dt as a, Ht as o, It as s, Jt as c, Nt as l, S as u, St as ee, X as te, Xt as ne, _ as re, ft as ie, i as ae, lt as oe, nt as se, o as ce, q as le, w as ue, yt as de } from "./lib-Dqr_-I6Y.js";
3
+ import { n as fe, t as pe } from "./useHints-Dq_w2E8B.js";
4
+ import { n as me, r as he, t as ge } from "./useTimeLabels-d2f-W1L4.js";
5
+ import { t as _e } from "./useConfig-DwdGsXTx.js";
6
+ import { t as ve } from "./usePrinter-CEiH1b6R.js";
7
+ import { n as ye, t as be } from "./BaseScanner-DZvpgOjM.js";
8
+ import { t as xe } from "./useNestedProp-CulPqtou.js";
9
+ import { t as Se } from "./useThemeCheck-C43Tcqmk.js";
10
+ import { t as Ce } from "./img-Bkzj3lDD.js";
11
+ import { n as we } from "./Title-CaVA8EIw.js";
12
+ import { t as Te } from "./_plugin-vue_export-helper-B3ysoDQm.js";
13
+ import { a as d, c as f, i as Ee, l as De, n as Oe, o as ke, r as Ae, s as je, t as Me } from "./useResponsive-ZtArZtUf.js";
14
+ import { t as Ne } from "./BaseIcon-BbElSC8_.js";
15
+ import { t as Pe } from "./SlicerPreview-BRRyc1p7.js";
16
+ import { t as Fe } from "./vue-ui-accordion-C6L7glHU.js";
17
+ import { t as Ie } from "./BaseLegendToggle-CtEdLr4R.js";
18
+ import { t as Le } from "./useUserOptionState-DK-_1ddE.js";
19
+ import { t as Re } from "./useChartAccessibility-DYqac8yF.js";
20
+ import { t as ze } from "./Legend-BJtY2RA9.js";
21
+ import { t as Be } from "./vue_ui_xy_canvas-Cb6dg3eK.js";
22
+ import { Teleport as Ve, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as He, createElementVNode as g, createSlots as Ue, createTextVNode as We, createVNode as Ge, defineAsyncComponent as Ke, guardReactiveProps as _, mergeProps as qe, nextTick as Je, normalizeClass as Ye, normalizeProps as v, normalizeStyle as Xe, onBeforeUnmount as Ze, onMounted as Qe, openBlock as y, ref as b, renderSlot as x, resolveDynamicComponent as $e, shallowRef as et, toDisplayString as tt, toRefs as nt, unref as S, useSlots as rt, watch as C, watchEffect as it, withCtx as w } from "vue";
23
+ //#region src/components/vue-ui-xy-canvas.vue
24
+ var at = /* @__PURE__ */ e({ default: () => _t }), ot = ["id"], st = ["id"], ct = {
25
+ class: "sr-only",
26
+ "aria-live": "polite",
27
+ "aria-atomic": "true"
28
+ }, lt = ["id"], ut = ["aria-label", "aria-describedby"], dt = {
29
+ key: 0,
30
+ style: {
31
+ position: "absolute",
32
+ top: "100%",
33
+ left: "0",
34
+ width: "100%"
35
+ },
36
+ "data-dom-to-png-ignore": "",
37
+ "aria-hidden": "true"
38
+ }, ft = ["id"], pt = ["onClick"], mt = {
39
+ key: 4,
40
+ class: "vue-data-ui-watermark"
41
+ }, ht = { key: 0 }, gt = { key: 1 }, _t = /*#__PURE__*/ Te({
42
+ __name: "vue-ui-xy-canvas",
43
+ props: {
44
+ dataset: {
45
+ type: Array,
46
+ default() {
47
+ return [];
48
+ }
49
+ },
50
+ config: {
51
+ type: Object,
52
+ default() {
53
+ return {};
54
+ }
55
+ },
56
+ selectedXIndex: {
57
+ type: Number,
58
+ default: void 0
59
+ }
60
+ },
61
+ emits: [
62
+ "selectLegend",
63
+ "selectX",
64
+ "copyAlt"
65
+ ],
66
+ setup(e, { expose: Te, emit: at }) {
67
+ let _t = Ke(() => import("./Tooltip-CVxJe3UW.js")), vt = Ke(() => import("./DataTable-CmyEubtT.js")), yt = Ke(() => import("./UserOptions-WH7-49V0.js").then((e) => e.n)), bt = Ke(() => import("./NonSvgPenAndPaper-DmxzHJtV.js")), xt = Ke(() => import("./BaseDraggableDialog-Dr_Q6Yt5.js").then((e) => e.n)), { vue_ui_xy_canvas: St } = _e(), { isThemeValid: Ct, warnInvalidTheme: wt } = Se(), T = e, E = b(le()), D = b(null), Tt = b(null), O = b(null), k = b(1), A = b(1), Et = b(!1), j = b(null), Dt = b(""), Ot = b(null), M = b([]), kt = b(1), N = b(!0), P = b(!0), At = b(null), jt = b(0), Mt = b(!1), Nt = b(null), Pt = b(null), F = b(null), Ft = b(null), It = b(0), Lt = b(0), Rt = b(0), I = b(null), zt = b(!1), Bt = b(null), Vt = b(null), Ht = b(!1), Ut = b(!1), Wt = b(!1), L = b(null), Gt = b(!1), Kt = b(!1), qt = b(!1), R = b(null), Jt = b({
68
+ x: 0,
69
+ y: 0
70
+ }), z = p(() => Array.isArray(rn.value) && rn.value.length > 0), Yt = at, Xt = rt(), B = b(un());
71
+ fe({
72
+ config: () => B.value,
73
+ dataset: () => T.dataset,
74
+ component: "VueUiXyCanvas",
75
+ rules: [
76
+ pe.emptyArray,
77
+ {
78
+ test: (e) => e.every((e) => e.series.length < 300),
79
+ message: [
80
+ "👀 Series have < 300 datapoints. Consider:",
81
+ "",
82
+ "▶️ Using VueUiXy instead, if you need more options, or more customization possibilities."
83
+ ]
84
+ },
85
+ {
86
+ test: (e) => e.some((e) => e.series.length > 1e4),
87
+ message: [
88
+ "👀 The dataset has > 10_000 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.",
89
+ "",
90
+ "▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance can be impacted. JS runtime might crash with > 100_000 datapoints."
91
+ ]
92
+ }
93
+ ]
94
+ });
95
+ let Zt = p(() => {
96
+ let e = B.value.style.chart.title.text || "XY chart", t = J.value.end - J.value.start;
97
+ return `${e}. ${q.value.filter((e) => !M.value.includes(e.absoluteIndex)).length} series. ${t} visible data points.`;
98
+ }), Qt = p(() => {
99
+ if (R.value === null) return "";
100
+ let e = R.value + J.value.start;
101
+ return `${B.value.style.chart.grid.x.timeLabels.values.slice(J.value.start, J.value.end)[R.value] ? B.value.style.chart.tooltip.useDefaultTimeFormat ? Z.value.slice(J.value.start, J.value.end)[R.value]?.text : $n.value[R.value]?.text : Z.value[e]?.text ?? `Point ${e + 1}`}. ${q.value.filter((e) => !M.value.includes(e.absoluteIndex)).map((e) => {
102
+ let t = e.series[R.value], n = t?.value ?? t ?? null;
103
+ return `${e.name}: ${n}`;
104
+ }).join(". ")}.`;
105
+ }), $t = p(() => B.value.userOptions.useCursorPointer), en = p(() => B.value.debug);
106
+ Qe(() => {
107
+ Xt["chart-background"] && en.value && console.warn("VueUiXyCanvas does not support the #chart-background slot.");
108
+ });
109
+ let tn = p(() => ne({
110
+ defaultConfig: {
111
+ userOptions: { show: !1 },
112
+ table: { show: !1 },
113
+ style: { chart: {
114
+ backgroundColor: "#99999930",
115
+ grid: {
116
+ x: {
117
+ axisColor: "#6A6A6A",
118
+ timeLabels: { show: !1 },
119
+ axisName: "",
120
+ horizontalLines: { color: "#6A6A6A" }
121
+ },
122
+ y: {
123
+ axisColor: "#6A6A6A",
124
+ axisLabels: { show: !1 },
125
+ axisName: "",
126
+ verticalLines: { color: "#6A6A6A" }
127
+ },
128
+ zeroLine: { color: "#6A6A6A" }
129
+ },
130
+ legend: { backgroundColor: "#99999930" },
131
+ paddingProportions: { left: .05 },
132
+ scale: {
133
+ max: null,
134
+ min: null
135
+ },
136
+ zoom: {
137
+ endIndex: null,
138
+ startIndex: null
139
+ }
140
+ } }
141
+ },
142
+ userConfig: B.value.skeletonConfig ?? {}
143
+ })), { loading: nn, FINAL_DATASET: rn } = ye({
144
+ ...nt(T),
145
+ FINAL_CONFIG: B,
146
+ prepareConfig: un,
147
+ skeletonDataset: T.config?.skeletonDataset ?? [{
148
+ name: "",
149
+ series: [
150
+ 0,
151
+ 1,
152
+ 2,
153
+ 3,
154
+ 5,
155
+ 8,
156
+ 13,
157
+ 21,
158
+ 34,
159
+ 55,
160
+ 89,
161
+ 134
162
+ ],
163
+ type: "line",
164
+ smooth: !0,
165
+ color: "#BABABA"
166
+ }, {
167
+ name: "",
168
+ series: [
169
+ 0,
170
+ .5,
171
+ 1,
172
+ 1.5,
173
+ 2.5,
174
+ 4,
175
+ 6.5,
176
+ 10.5,
177
+ 17,
178
+ 27.5,
179
+ 44.5,
180
+ 67
181
+ ],
182
+ type: "bar",
183
+ color: "#AAAAAA"
184
+ }],
185
+ skeletonConfig: ne({
186
+ defaultConfig: B.value,
187
+ userConfig: tn.value
188
+ })
189
+ }), { userOptionsVisible: an, setUserOptionsVisibility: on, keepUserOptionState: sn } = Le({ config: B.value }), { svgRef: V } = Re({ config: B.value.style.chart.title });
190
+ function cn() {
191
+ on(!0);
192
+ }
193
+ function ln() {
194
+ on(!1), Yt("selectX", {
195
+ dataset: null,
196
+ index: null,
197
+ indexLabel: null
198
+ }), j.value = null;
199
+ }
200
+ function un() {
201
+ let e = xe({
202
+ userConfig: T.config,
203
+ defaultConfig: St
204
+ }), t = {}, n = e.theme;
205
+ if (n) if (!Ct.value(e)) wt(e), t = e;
206
+ else {
207
+ let r = xe({
208
+ userConfig: Be[n] || T.config,
209
+ defaultConfig: e
210
+ });
211
+ t = {
212
+ ...xe({
213
+ userConfig: T.config,
214
+ defaultConfig: r
215
+ }),
216
+ customPalette: e.customPalette.length ? e.customPalette : c[n] || s
217
+ };
218
+ }
219
+ else t = e;
220
+ return T.config && de(T.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."), t.style.chart.grid.x.timeLabels = xe({
221
+ defaultConfig: t.style.chart.grid.x.timeLabels,
222
+ userConfig: T.config.style.chart.grid.y.timeLabels
223
+ })), t;
224
+ }
225
+ C(() => T.config, (e) => {
226
+ nn.value || (B.value = un()), an.value = !B.value.userOptions.showOnChartHover, Tr(), It.value += 1, Lt.value += 1, Rt.value += 1, H.value.showTable = B.value.table.show, H.value.showDataLabels = B.value.style.chart.dataLabels.show, H.value.stacked = B.value.style.chart.stacked, H.value.showTooltip = B.value.style.chart.tooltip.show;
227
+ }, { deep: !0 }), C(() => T.dataset, async (e) => {
228
+ !Array.isArray(e) || e.length === 0 || (await Je(), V.value && !O.value && (O.value = V.value.getContext("2d", { willReadFrequently: !0 })), N.value = !0, P.value = !0, await Nn(), Hn(), It.value += 1, Lt.value += 1, Rt.value += 1);
229
+ }, { deep: !0 });
230
+ let dn = b(B.value.style.chart.aspectRatio), { isPrinting: fn, isImaging: pn, generatePdf: mn, generateImage: hn } = ve({
231
+ elementId: `xy_canvas_${E.value}`,
232
+ fileName: B.value.style.chart.title.text || "vue-ui-xy-canvas",
233
+ options: B.value.userOptions.print
234
+ }), H = b({
235
+ showTable: B.value.table.show,
236
+ showDataLabels: B.value.style.chart.dataLabels.show,
237
+ stacked: B.value.style.chart.stacked,
238
+ showTooltip: B.value.style.chart.tooltip.show
239
+ });
240
+ function gn(e) {
241
+ Mt.value = e, jt.value += 1;
242
+ }
243
+ let _n = p(() => ue(B.value.customPalette)), vn = p(() => M.value.length === K.value.length), U = p(() => K.value ? Math.max(...K.value.filter((e, t) => vn.value ? !0 : !M.value.includes(e.absoluteIndex)).map((e) => e.series.length)) : 0);
244
+ function yn(e) {
245
+ L.value = e, Q();
246
+ }
247
+ let bn = b(0), xn = b(0);
248
+ function Sn() {
249
+ if (!O.value || !B.value.style.chart.grid.x.timeLabels.show) return 0;
250
+ let e = Z.value || [], t = J.value.start ?? 0, n = J.value.end ?? 0;
251
+ if (!Math.max(0, n - t)) return 0;
252
+ let r = Math.round(k.value / 40 * B.value.style.chart.grid.x.timeLabels.fontSizeRatio), i = `${B.value.style.chart.grid.x.timeLabels.bold ? "bold " : ""}${r}px ${B.value.style.fontFamily}`;
253
+ O.value.save(), O.value.font = i;
254
+ let a = 0;
255
+ for (let r = t; r < n; r += 1) {
256
+ let t = e[r]?.text ?? `${r + 1}`, n = O.value.measureText(String(t));
257
+ n.width > a && (a = n.width);
258
+ }
259
+ O.value.restore();
260
+ let o = (B.value.style.chart.grid.x.timeLabels.rotation || 0) * Math.PI / 180, s = r, c = Math.abs(Math.sin(o)) * a + Math.abs(Math.cos(o)) * s, l = B.value.style.chart.grid.x.timeLabels.offsetY || 1, u = k.value / l;
261
+ return Math.max(0, u + c + 4);
262
+ }
263
+ function Cn() {
264
+ bn.value = Sn();
265
+ }
266
+ function wn() {
267
+ xn.value && cancelAnimationFrame(xn.value), xn.value = requestAnimationFrame(() => {
268
+ requestAnimationFrame(() => {
269
+ Cn();
270
+ });
271
+ });
272
+ }
273
+ Ze(() => {
274
+ xn.value && cancelAnimationFrame(xn.value);
275
+ });
276
+ let W = p(() => {
277
+ let e = k.value - k.value * (B.value.style.chart.paddingProportions.left + B.value.style.chart.paddingProportions.right), t = A.value * B.value.style.chart.paddingProportions.top, n = A.value * B.value.style.chart.paddingProportions.bottom, r = bn.value, i = A.value - n - r, a = A.value - (t + n) - r;
278
+ return {
279
+ canvasWidth: k.value,
280
+ canvasHeight: A.value,
281
+ left: k.value * B.value.style.chart.paddingProportions.left,
282
+ top: t,
283
+ right: k.value - k.value * B.value.style.chart.paddingProportions.right,
284
+ bottom: i,
285
+ width: e,
286
+ height: a,
287
+ slot: e / (J.value.end - J.value.start)
288
+ };
289
+ });
290
+ function Tn(e, t) {
291
+ return e / t;
292
+ }
293
+ function En({ hasAutoScale: e, series: t, min: n, max: r, scale: i, yOffset: a, individualHeight: o, stackIndex: s = null }) {
294
+ return t.map((t, n) => {
295
+ let r = i.min < 0 ? Math.abs(i.min) : 0, c = Tn(t + r, r + i.max), l, u;
296
+ e && (l = i.min, u = Tn(t - l, i.max - l));
297
+ let ee = 0;
298
+ return ee = s === null ? W.value.bottom - W.value.height * (e ? u : c) : W.value.bottom - a - o * (e ? u : c), {
299
+ x: W.value.left + W.value.slot * n + W.value.slot / 2,
300
+ y: ee,
301
+ value: t
302
+ };
303
+ });
304
+ }
305
+ let G = p(() => {
306
+ let e = B.value.style.chart.scale.min === null ? Math.min(...K.value.filter((e, t) => !M.value.includes(e.absoluteIndex)).flatMap((e) => e.series.slice(J.value.start, J.value.end))) : B.value.style.chart.scale.min, t = B.value.style.chart.scale.max === null ? Math.max(...K.value.filter((e, t) => !M.value.includes(e.absoluteIndex)).flatMap((e) => e.series.slice(J.value.start, J.value.end))) : B.value.style.chart.scale.max, n = re(e < 0 ? e : 0, t === e ? e + 1 < 0 ? 0 : e + 1 : t < 0 ? 0 : t, B.value.style.chart.scale.ticks), r = n.min < 0 ? Math.abs(n.min) : 0, i = W.value.bottom - W.value.height * (r / (n.max + r));
307
+ return {
308
+ absoluteMin: r,
309
+ max: t,
310
+ min: e,
311
+ scale: n,
312
+ yLabels: n.ticks.map((e) => ({
313
+ y: W.value.bottom - W.value.height * ((e + r) / (n.max + r)),
314
+ x: W.value.left - 8,
315
+ value: e
316
+ })),
317
+ zero: i
318
+ };
319
+ }), Dn = p(() => q.value.map((e) => `
320
+ <div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
321
+ <svg viewBox="0 0 10 10" height="12" width="12">
322
+ <circle cx="5" cy="5" r="5" fill="${e.color}"/>
323
+ </svg>
324
+ <span>${e.name ? e.name + ": " : ""}</span>
325
+ <span>${ae(B.value.style.chart.dataLabels.formatter, e.series[j.value] ?? "-", te({
326
+ p: e.prefix || "",
327
+ v: e.series[j.value] ?? "-",
328
+ s: e.suffix || "",
329
+ r: e.rounding || 0
330
+ }), {
331
+ datapoint: e,
332
+ seriesIndex: j.value
333
+ })}</span>
334
+ </div>
335
+ `)), On = p(() => B.value.style.chart.line.cutNullValues), K = p(() => rn.value.map((e, t) => ({
336
+ ...e,
337
+ series: a({
338
+ data: r(e.series, [], On.value),
339
+ threshold: B.value.downsample.threshold
340
+ }),
341
+ absoluteIndex: t,
342
+ color: u(e.color || _n.value[t] || s[t] || s[t % s.length])
343
+ }))), kn = p(() => {
344
+ if (!B.value.style.chart.zoom.minimap.show) return [];
345
+ let e = K.value.filter((e) => !M.value.includes(e.absoluteIndex)), t = Math.max(...e.map((e) => e.series.length)), n = [];
346
+ for (let r = 0; r < t; r += 1) n.push(e.map((e) => e.series[r] || 0).reduce((e, t) => (e || 0) + (t || 0), 0));
347
+ let r = Math.min(...n);
348
+ return n.map((e) => e + (r < 0 ? Math.abs(r) : 0));
349
+ }), An = p(() => B.value.style.chart.zoom.minimap.show ? K.value.map((e) => ({
350
+ ...e,
351
+ isVisible: !M.value.includes(e.absoluteIndex)
352
+ })) : []);
353
+ C(U, (e) => {
354
+ e && Nn();
355
+ });
356
+ let q = p(() => ce(K.value.filter((e, t) => !M.value.includes(e.absoluteIndex))).map((e, t) => ({
357
+ ...e,
358
+ series: e.series.slice(J.value.start, J.value.end)
359
+ })).map((e, t) => {
360
+ let n = [null, void 0].includes(e.scaleMin) ? Math.min(...e.series) || 0 : e.scaleMin, r = [null, void 0].includes(e.scaleMax) ? Math.max(...e.series) || 1 : e.scaleMax;
361
+ n === r && (n = n >= 0 ? r - 1 : n, r = r >= 0 ? r : n + 1);
362
+ let i = {
363
+ ratios: e.series.filter((e) => ![null, void 0].includes(e)).map((e) => (e - n) / (r - n)),
364
+ valueMin: n,
365
+ valueMax: r
366
+ }, a = e.scaleSteps || B.value.style.chart.scale.ticks, o;
367
+ o = e.autoScaling ? re(i.valueMin, i.valueMax, a) : re(i.valueMin < 0 ? i.valueMin : 0, i.valueMax <= 0 ? 0 : i.valueMax, a);
368
+ let s = H.value.stacked ? W.value.height * (1 - e.cumulatedStackRatio) : 0, c = H.value.stacked ? W.value.height / B.value.style.chart.stackGap : 0, l = H.value.stacked ? W.value.height * e.stackRatio - c : W.value.height, u = o.min < 0 ? Math.abs(o.min) : 0, ee;
369
+ ee = e.autoScaling && H.value.stacked && r <= 0 ? W.value.bottom - s - l : W.value.bottom - s - l * (u / (o.max + u));
370
+ let te = o.ticks.map((e, t) => ({
371
+ y: W.value.bottom - s - l * (t / (o.ticks.length - 1)),
372
+ x: W.value.left - 8,
373
+ value: e
374
+ })), ne = En({
375
+ hasAutoScale: H.value.stacked && e.autoScaling,
376
+ series: e.series,
377
+ min: H.value.stacked ? n : G.value.min,
378
+ max: H.value.stacked ? r : G.value.max,
379
+ scale: H.value.stacked ? o : G.value.scale,
380
+ yOffset: s,
381
+ individualHeight: l,
382
+ stackIndex: H.value.stacked ? t : null
383
+ });
384
+ return {
385
+ ...e,
386
+ coordinatesLine: ne,
387
+ min: n,
388
+ max: r,
389
+ localScale: o,
390
+ localZero: ee,
391
+ localMin: u,
392
+ localYLabels: te,
393
+ yOffset: s,
394
+ individualHeight: l
395
+ };
396
+ })), J = b({
397
+ start: 0,
398
+ end: U.value
399
+ }), Y = b({
400
+ start: 0,
401
+ end: U.value
402
+ }), jn = b(null);
403
+ function Mn() {
404
+ return new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(() => e())));
405
+ }
406
+ Ze(() => {
407
+ jn.value && cancelAnimationFrame(jn.value);
408
+ });
409
+ async function Nn() {
410
+ In(), await Je(), jn.value && cancelAnimationFrame(jn.value), jn.value = requestAnimationFrame(async () => {
411
+ await Mn(), In();
412
+ });
413
+ }
414
+ let Pn = p(() => B.value.style.chart.zoom.preview.enable && (Y.value.start !== J.value.start || Y.value.end !== J.value.end));
415
+ function Fn(e, t) {
416
+ Y.value[e] = t;
417
+ }
418
+ async function In() {
419
+ if (!Ht.value) {
420
+ Ht.value = !0;
421
+ try {
422
+ let { startIndex: e, endIndex: t } = B.value.style.chart.zoom, n = Math.max(...K.value.map((e) => e.series.length)), r = e ?? 0, i = t == null ? n : Math.min(zn(t + 1), n);
423
+ Wt.value = !0, J.value.start = r, J.value.end = i, Y.value.start = r, Y.value.end = i, Bn(), Ut.value = !0, await Je(), F.value && (F.value.setStartValue(J.value.start), F.value.setEndValue(J.value.end));
424
+ } finally {
425
+ queueMicrotask(() => {
426
+ Wt.value = !1;
427
+ }), Ht.value = !1;
428
+ }
429
+ }
430
+ }
431
+ function Ln(e) {
432
+ Ht.value || Wt.value || e !== J.value.start && (J.value.start = e, Y.value.start = e, Bn());
433
+ }
434
+ function Rn(e) {
435
+ if (Ht.value || Wt.value) return;
436
+ let t = zn(e);
437
+ t !== J.value.end && (J.value.end = t, Y.value.end = t, Bn());
438
+ }
439
+ function zn(e) {
440
+ let t = U.value;
441
+ return e > t ? t : e < 0 || e < J.value.start ? B.value.style.chart.zoom.startIndex === null ? 1 : B.value.style.chart.zoom.startIndex + 1 : e;
442
+ }
443
+ function Bn() {
444
+ let e = Math.max(1, Math.max(...K.value.map((e) => e.series.length))), t = Math.max(0, Math.min(J.value.start ?? 0, e - 1)), n = Math.max(t + 1, Math.min(J.value.end ?? e, e));
445
+ (!Number.isFinite(t) || !Number.isFinite(n) || n <= t) && (t = 0, n = e), J.value = {
446
+ start: t,
447
+ end: n
448
+ }, Y.value.start = t, Y.value.end = n, F.value && (F.value.setStartValue(t), F.value.setEndValue(n));
449
+ }
450
+ let Vn = p(() => q.value.filter((e) => [
451
+ "line",
452
+ "plot",
453
+ void 0
454
+ ].includes(e.type))), X = p(() => q.value.filter((e) => e.type === "bar"));
455
+ function Hn() {
456
+ if (!V.value || !Tt.value) return;
457
+ let e = Tt.value.offsetWidth, t = Tt.value.offsetHeight;
458
+ V.value.width = e * kt.value * 2, V.value.height = t * kt.value * 2, k.value = e * kt.value * 2, A.value = t * kt.value * 2, O.value?.scale(kt.value, kt.value), Q();
459
+ }
460
+ C(z, async (e) => {
461
+ if (!e) {
462
+ At.value = null, Et.value = !1, j.value = null, I.value = null;
463
+ return;
464
+ }
465
+ await Je(), V.value && !O.value && (O.value = V.value.getContext("2d", { willReadFrequently: !0 })), N.value = !0, P.value = !0, await Nn(), Hn(), Q();
466
+ });
467
+ function Un() {
468
+ if (O.value && (O.value.clearRect(0, 0, 1e4, 1e4), O.value.fillStyle = B.value.style.chart.backgroundColor, O.value.fillRect(0, 0, W.value.canvasWidth, W.value.canvasHeight), z.value)) {
469
+ if (H.value.stacked) B.value.style.chart.grid.y.verticalLines.show && J.value.end - J.value.start < B.value.style.chart.grid.y.verticalLines.hideUnderXLength ? q.value.forEach((e) => {
470
+ for (let t = 0; t < J.value.end - J.value.start + 1; t += 1) d(O.value, [{
471
+ x: W.value.left + W.value.slot * t,
472
+ y: W.value.bottom - e.yOffset - e.individualHeight
473
+ }, {
474
+ x: W.value.left + W.value.slot * t,
475
+ y: W.value.bottom - e.yOffset
476
+ }], { color: B.value.style.chart.grid.y.verticalLines.color });
477
+ }) : B.value.style.chart.grid.y.verticalLines.show && J.value.end - J.value.start >= B.value.style.chart.grid.y.verticalLines.hideUnderXLength && q.value.forEach((e) => {
478
+ for (let t = J.value.start; t < J.value.end; t += 1) t % Math.floor((J.value.end - J.value.start) / B.value.style.chart.grid.x.timeLabels.modulo) === 0 && d(O.value, [{
479
+ x: W.value.left + W.value.slot * (t - J.value.start) + W.value.slot / 2,
480
+ y: W.value.bottom - e.yOffset - e.individualHeight
481
+ }, {
482
+ x: W.value.left + W.value.slot * (t - J.value.start) + W.value.slot / 2,
483
+ y: W.value.bottom - e.yOffset
484
+ }], { color: B.value.style.chart.grid.y.verticalLines.color });
485
+ }), B.value.style.chart.grid.x.horizontalLines.show && (B.value.style.chart.grid.x.horizontalLines.alternate ? q.value.forEach((e) => {
486
+ e.localYLabels.forEach((t, n) => {
487
+ n < e.localYLabels.length - 1 && je(O.value, [
488
+ {
489
+ x: W.value.left,
490
+ y: t.y
491
+ },
492
+ {
493
+ x: W.value.right,
494
+ y: t.y
495
+ },
496
+ {
497
+ x: W.value.right,
498
+ y: e.localYLabels[n + 1].y
499
+ },
500
+ {
501
+ x: W.value.left,
502
+ y: e.localYLabels[n + 1].y
503
+ }
504
+ ], {
505
+ fillColor: n % 2 == 0 ? "transparent" : o(B.value.style.chart.grid.x.horizontalLines.color, B.value.style.chart.grid.x.horizontalLines.opacity),
506
+ strokeColor: "transparent"
507
+ });
508
+ });
509
+ }) : q.value.forEach((e) => {
510
+ e.localYLabels.slice(J.value.start, J.value.end).forEach((e) => {
511
+ d(O.value, [{
512
+ x: W.value.left,
513
+ y: e.y
514
+ }, {
515
+ x: W.value.right,
516
+ y: e.y
517
+ }], { color: B.value.style.chart.grid.x.horizontalLines.color });
518
+ });
519
+ })), B.value.style.chart.grid.zeroLine.show && q.value.forEach((e) => {
520
+ d(O.value, [{
521
+ x: W.value.left,
522
+ y: e.localZero
523
+ }, {
524
+ x: W.value.right,
525
+ y: e.localZero
526
+ }], {
527
+ color: B.value.style.chart.grid.zeroLine.color,
528
+ lineDash: B.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
529
+ });
530
+ }), B.value.style.chart.grid.y.axisLabels.show && q.value.forEach((e) => {
531
+ d(O.value, [{
532
+ x: W.value.left,
533
+ y: W.value.bottom - e.yOffset
534
+ }, {
535
+ x: W.value.left,
536
+ y: W.value.bottom - e.yOffset - e.individualHeight
537
+ }], { color: e.color }), d(O.value, [{
538
+ x: W.value.right,
539
+ y: W.value.bottom - e.yOffset
540
+ }, {
541
+ x: W.value.right,
542
+ y: W.value.bottom - e.yOffset - e.individualHeight
543
+ }], { color: e.color });
544
+ }), q.value.forEach((e) => {
545
+ f(O.value, e.name, k.value / 35, W.value.bottom - e.yOffset - e.individualHeight / 2, {
546
+ align: "center",
547
+ rotation: -90,
548
+ color: e.color,
549
+ font: `${Math.round(k.value / 40 * B.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${B.value.style.fontFamily}`
550
+ });
551
+ });
552
+ else {
553
+ if (B.value.style.chart.grid.y.verticalLines.show && J.value.end - J.value.start < B.value.style.chart.grid.y.verticalLines.hideUnderXLength) for (let e = 0; e < J.value.end - J.value.start + 1; e += 1) d(O.value, [{
554
+ x: W.value.left + W.value.slot * e,
555
+ y: W.value.top
556
+ }, {
557
+ x: W.value.left + W.value.slot * e,
558
+ y: W.value.bottom
559
+ }], { color: B.value.style.chart.grid.y.verticalLines.color });
560
+ else if (B.value.style.chart.grid.y.verticalLines.show && J.value.end - J.value.start >= B.value.style.chart.grid.y.verticalLines.hideUnderXLength) for (let e = J.value.start; e < J.value.end; e += 1) e % Math.floor((J.value.end - J.value.start) / B.value.style.chart.grid.x.timeLabels.modulo) === 0 && d(O.value, [{
561
+ x: W.value.left + W.value.slot * (e - J.value.start) + W.value.slot / 2,
562
+ y: W.value.top
563
+ }, {
564
+ x: W.value.left + W.value.slot * (e - J.value.start) + W.value.slot / 2,
565
+ y: W.value.bottom
566
+ }], { color: B.value.style.chart.grid.y.verticalLines.color });
567
+ B.value.style.chart.grid.x.horizontalLines.show && (B.value.style.chart.grid.x.horizontalLines.alternate ? G.value.yLabels.forEach((e, t) => {
568
+ t < G.value.yLabels.length - 1 && je(O.value, [
569
+ {
570
+ x: W.value.left,
571
+ y: e.y
572
+ },
573
+ {
574
+ x: W.value.right,
575
+ y: e.y
576
+ },
577
+ {
578
+ x: W.value.right,
579
+ y: G.value.yLabels[t + 1].y
580
+ },
581
+ {
582
+ x: W.value.left,
583
+ y: G.value.yLabels[t + 1].y
584
+ }
585
+ ], {
586
+ fillColor: t % 2 == 0 ? "transparent" : o(B.value.style.chart.grid.x.horizontalLines.color, B.value.style.chart.grid.x.horizontalLines.opacity),
587
+ strokeColor: "transparent"
588
+ });
589
+ }) : G.value.yLabels.forEach((e) => {
590
+ d(O.value, [{
591
+ x: W.value.left,
592
+ y: e.y
593
+ }, {
594
+ x: W.value.right,
595
+ y: e.y
596
+ }], { color: B.value.style.chart.grid.x.horizontalLines.color });
597
+ })), B.value.style.chart.grid.y.showAxis && d(O.value, [{
598
+ x: W.value.left,
599
+ y: W.value.top
600
+ }, {
601
+ x: W.value.left,
602
+ y: W.value.bottom
603
+ }], {
604
+ color: B.value.style.chart.grid.y.axisColor,
605
+ lineWidth: B.value.style.chart.grid.y.axisThickness
606
+ }), B.value.style.chart.grid.x.showAxis && d(O.value, [{
607
+ x: W.value.left,
608
+ y: W.value.bottom
609
+ }, {
610
+ x: W.value.right,
611
+ y: W.value.bottom
612
+ }], {
613
+ color: B.value.style.chart.grid.x.axisColor,
614
+ lineWidth: B.value.style.chart.grid.x.axisThickness
615
+ }), B.value.style.chart.grid.zeroLine.show && d(O.value, [{
616
+ x: W.value.left,
617
+ y: G.value.zero
618
+ }, {
619
+ x: W.value.right,
620
+ y: G.value.zero
621
+ }], {
622
+ color: B.value.style.chart.grid.zeroLine.color,
623
+ lineDash: B.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
624
+ });
625
+ }
626
+ B.value.style.chart.grid.y.axisName && f(O.value, B.value.style.chart.grid.y.axisName, k.value - k.value / 40 * B.value.style.chart.grid.y.axisLabels.fontSizeRatio * 1.2, W.value.bottom - W.value.height / 2, {
627
+ font: `${B.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(k.value / 40 * B.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${B.value.style.fontFamily}`,
628
+ color: B.value.style.chart.color,
629
+ align: "center",
630
+ rotation: 90
631
+ }), B.value.style.chart.grid.x.axisName && f(O.value, B.value.style.chart.grid.x.axisName, k.value / 2, A.value, {
632
+ font: `${B.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(k.value / 40 * B.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${B.value.style.fontFamily}`,
633
+ color: B.value.style.chart.color,
634
+ align: "center"
635
+ });
636
+ }
637
+ }
638
+ function Wn(e) {
639
+ for (let t = 0; t < e.coordinatesLine.length; t += 1) {
640
+ let n = (j.value === t || L.value === t ? k.value / 150 : B.value.style.chart.line.plots.show || e.type === "plot" ? k.value / 200 : 0) * B.value.style.chart.line.plots.radiusRatio;
641
+ Oe(O.value, {
642
+ x: e.coordinatesLine[t].x,
643
+ y: e.coordinatesLine[t].y
644
+ }, n, {
645
+ color: B.value.style.chart.backgroundColor,
646
+ fillStyle: e.color,
647
+ strokeColor: "transparent"
648
+ });
649
+ }
650
+ }
651
+ function Gn() {
652
+ q.value.forEach((e) => {
653
+ e.showYMarker && dr(e) && f(O.value, ae(B.value.style.chart.dataLabels.formatter, dr(e).value, te({
654
+ p: e.prefix || B.value.style.chart.grid.y.axisLabels.prefix || "",
655
+ v: dr(e).value,
656
+ s: e.suffix || B.value.style.chart.grid.y.axisLabels.suffix || "",
657
+ r: e.rounding || B.value.style.chart.grid.y.axisLabels.rounding || 0
658
+ }), {
659
+ datapoint: dr(e),
660
+ seriesIndex: null
661
+ }), W.value.left - 8 + B.value.style.chart.grid.y.axisLabels.offsetX, dr(e).y, {
662
+ align: "right",
663
+ font: `${B.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(k.value / 40 * B.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${B.value.style.fontFamily}`,
664
+ color: e.color
665
+ });
666
+ });
667
+ }
668
+ function Kn() {
669
+ B.value.style.chart.grid.y.axisLabels.show && (H.value.stacked ? q.value.forEach((e) => {
670
+ e.localYLabels.forEach((t, n) => {
671
+ f(O.value, ae(B.value.style.chart.dataLabels.formatter, t.value, te({
672
+ p: e.prefix || B.value.style.chart.grid.y.axisLabels.prefix || "",
673
+ v: t.value,
674
+ s: e.suffix || B.value.style.chart.grid.y.axisLabels.suffix || "",
675
+ r: e.rounding || B.value.style.chart.grid.y.axisLabels.rounding || 0
676
+ }), {
677
+ datapoint: t,
678
+ seriesIndex: n
679
+ }), t.x + B.value.style.chart.grid.y.axisLabels.offsetX, t.y, {
680
+ align: "right",
681
+ font: `${B.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(k.value / 40 * B.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${B.value.style.fontFamily}`,
682
+ color: e.color,
683
+ globalAlpha: e.showYMarker && ![null, void 0].includes(j.value ?? L.value) ? .2 : 1
684
+ });
685
+ });
686
+ }) : G.value.yLabels.forEach((e, t) => {
687
+ f(O.value, ae(B.value.style.chart.dataLabels.formatter, e.value, te({
688
+ p: B.value.style.chart.grid.y.axisLabels.prefix || "",
689
+ v: e.value,
690
+ s: B.value.style.chart.grid.y.axisLabels.suffix || "",
691
+ r: B.value.style.chart.grid.y.axisLabels.rounding || 0
692
+ }), {
693
+ datapoint: e,
694
+ seriesIndex: t
695
+ }), e.x + B.value.style.chart.grid.y.axisLabels.offsetX, e.y, {
696
+ align: "right",
697
+ font: `${B.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(k.value / 40 * B.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${B.value.style.fontFamily}`,
698
+ color: B.value.style.chart.grid.y.axisLabels.color,
699
+ globalAlpha: q.value.some((e) => e.showYMarker) && ![null, void 0].includes(j.value ?? L.value) ? .2 : 1
700
+ });
701
+ }));
702
+ }
703
+ function qn(e) {
704
+ for (let t = 0; t < e.coordinatesLine.length; t += 1) f(O.value, ae(B.value.style.chart.dataLabels.formatter, e.coordinatesLine[t].value, te({
705
+ p: e.prefix || "",
706
+ v: e.coordinatesLine[t].value,
707
+ s: e.suffix || "",
708
+ r: e.rounding || 0
709
+ }), {
710
+ datapoint: e.coordinatesLine[t],
711
+ seriesIndex: t
712
+ }), e.coordinatesLine[t].x, e.coordinatesLine[t].y + B.value.style.chart.dataLabels.offsetY, {
713
+ align: "center",
714
+ font: `${B.value.style.chart.dataLabels.bold ? "bold " : ""}${Math.round(k.value / 40 * B.value.style.chart.dataLabels.fontSizeRatio)}px ${B.value.style.fontFamily}`,
715
+ color: B.value.style.chart.dataLabels.useSerieColor ? e.color : B.value.style.chart.dataLabels.color,
716
+ strokeColor: B.value.style.chart.backgroundColor,
717
+ lineWidth: .5
718
+ });
719
+ }
720
+ let Z = b([]), Jn = 0;
721
+ it(() => {
722
+ let e = ++Jn;
723
+ (async () => {
724
+ let t = await ge({
725
+ values: B.value.style.chart.grid.x.timeLabels.values,
726
+ maxDatapoints: U.value,
727
+ formatter: B.value.style.chart.grid.x.timeLabels.datetimeFormatter,
728
+ start: 0,
729
+ end: U.value
730
+ });
731
+ e === Jn && (Z.value = t);
732
+ })();
733
+ }), it(() => {
734
+ B.value.style.chart.grid.x.timeLabels.show, B.value.style.chart.grid.x.timeLabels.rotation, B.value.style.chart.grid.x.timeLabels.offsetY, B.value.style.chart.grid.x.timeLabels.fontSizeRatio, B.value.style.chart.grid.x.timeLabels.bold, J.value.start, J.value.end, k.value, A.value, (Z.value || []).map((e) => e?.text ?? "").join("|"), wn();
735
+ }, { flush: "post" });
736
+ let Yn = b({
737
+ months: [],
738
+ shortMonths: [],
739
+ days: [],
740
+ shortDays: []
741
+ }), Xn = 0;
742
+ it(() => {
743
+ let e = ++Xn, t = B.value.style.chart.grid.x.timeLabels.datetimeFormatter;
744
+ (async () => {
745
+ let n = await he(t.locale).catch(() => he("en"));
746
+ e === Xn && (Yn.value = n.data);
747
+ })();
748
+ });
749
+ let Zn = p(() => {
750
+ let e = B.value.style.chart.grid.x.timeLabels.datetimeFormatter, t = me({
751
+ useUTC: e.useUTC,
752
+ locale: Yn.value,
753
+ januaryAsYear: e.januaryAsYear
754
+ });
755
+ return (e, n) => {
756
+ let r = B.value.style.chart.grid.x.timeLabels.values?.[e];
757
+ return r == null ? "" : t.formatDate(new Date(r), n);
758
+ };
759
+ }), Qn = p(() => (B.value.style.chart.grid.x.timeLabels.values || []).map((e, t) => ({
760
+ text: Zn.value(t, B.value.style.chart.zoom.timeFormat),
761
+ absoluteIndex: t
762
+ }))), $n = p(() => (B.value.style.chart.grid.x.timeLabels.values || []).map((e, t) => ({
763
+ text: Zn.value(t, B.value.style.chart.tooltip.timeFormat),
764
+ absoluteIndex: t
765
+ })));
766
+ function er() {
767
+ for (let e = J.value.start; e < J.value.end; e += 1) (J.value.end - J.value.start < B.value.style.chart.grid.x.timeLabels.modulo || J.value.end - J.value.start >= B.value.style.chart.grid.x.timeLabels.modulo && (e % Math.floor((J.value.end - J.value.start) / B.value.style.chart.grid.x.timeLabels.modulo) === 0 || (e === j.value + J.value.start || e === L.value) && B.value.style.chart.grid.x.timeLabels.showMarker)) && f(O.value, Z.value[e] ? Z.value[e].text : e + 1, W.value.left + W.value.slot * (e - J.value.start) + W.value.slot / 2, W.value.bottom + k.value / B.value.style.chart.grid.x.timeLabels.offsetY, {
768
+ align: B.value.style.chart.grid.x.timeLabels.rotation === 0 ? "center" : B.value.style.chart.grid.x.timeLabels.rotation > 0 ? "left" : "right",
769
+ font: `${B.value.style.chart.grid.x.timeLabels.bold ? "bold " : ""}${Math.round(k.value / 40 * B.value.style.chart.grid.x.timeLabels.fontSizeRatio)}px ${B.value.style.fontFamily}`,
770
+ color: B.value.style.chart.grid.x.timeLabels.showMarker ? o(B.value.style.chart.grid.x.timeLabels.color, j.value !== null || L.value !== null ? j.value + J.value.start === e || L.value === e ? 100 : 20 : 100) : B.value.style.chart.grid.x.timeLabels.color,
771
+ rotation: B.value.style.chart.grid.x.timeLabels.rotation
772
+ });
773
+ }
774
+ function tr() {
775
+ d(O.value, [{
776
+ x: W.value.left + W.value.slot * (j.value ?? L.value) + W.value.slot / 2,
777
+ y: W.value.top
778
+ }, {
779
+ x: W.value.left + W.value.slot * (j.value ?? L.value) + W.value.slot / 2,
780
+ y: W.value.bottom
781
+ }], {
782
+ color: B.value.style.chart.selector.color,
783
+ lineDash: B.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
784
+ lineWidth: 2,
785
+ linceCap: "round"
786
+ });
787
+ }
788
+ function nr() {
789
+ I.value && d(O.value, [{
790
+ x: W.value.left,
791
+ y: I.value
792
+ }, {
793
+ x: W.value.right,
794
+ y: I.value
795
+ }], {
796
+ color: B.value.style.chart.selector.color,
797
+ lineDash: B.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
798
+ lineWidth: 2,
799
+ linceCap: "round"
800
+ });
801
+ }
802
+ function rr() {
803
+ X.value.forEach((e, t) => {
804
+ for (let r = 0; r < e.coordinatesLine.length; r += 1) je(O.value, [
805
+ {
806
+ x: W.value.left + W.value.slot * r + W.value.slot / 10 + (H.value.stacked ? 0 : W.value.slot / X.value.length * t - (t === 0 ? 0 : W.value.slot / (5 * X.value.length) * t)),
807
+ y: H.value.stacked ? e.localZero : G.value.zero
808
+ },
809
+ {
810
+ x: W.value.left + W.value.slot * r + W.value.slot / 10 + (H.value.stacked ? 0 : W.value.slot / X.value.length * t - (t === 0 ? 0 : W.value.slot / (5 * X.value.length) * t)) + W.value.slot * .8 / (H.value.stacked ? 1 : X.value.length),
811
+ y: H.value.stacked ? e.localZero : G.value.zero
812
+ },
813
+ {
814
+ x: W.value.left + W.value.slot * r + W.value.slot / 10 + (H.value.stacked ? 0 : W.value.slot / X.value.length * t - (t === 0 ? 0 : W.value.slot / (5 * X.value.length) * t)) + W.value.slot * .8 / (H.value.stacked ? 1 : X.value.length),
815
+ y: e.coordinatesLine[r].y
816
+ },
817
+ {
818
+ x: W.value.left + W.value.slot * r + W.value.slot / 10 + (H.value.stacked ? 0 : W.value.slot / X.value.length * t - (t === 0 ? 0 : W.value.slot / (5 * X.value.length) * t)),
819
+ y: e.coordinatesLine[r].y
820
+ }
821
+ ], {
822
+ strokeColor: B.value.style.chart.backgroundColor,
823
+ gradient: {
824
+ type: "linear",
825
+ start: {
826
+ x: e.coordinatesLine[r].x,
827
+ y: e.coordinatesLine[r].y
828
+ },
829
+ end: {
830
+ x: e.coordinatesLine[r].x,
831
+ y: H.value.stacked ? e.localZero : G.value.zero
832
+ },
833
+ stops: [{
834
+ offset: 0,
835
+ color: e.color
836
+ }, {
837
+ offset: 1,
838
+ color: B.value.style.chart.bar.gradient.show ? n(e.color, .5) : e.color
839
+ }]
840
+ }
841
+ }), H.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && f(O.value, ae(B.value.style.chart.dataLabels.formatter, e.coordinatesLine[r].value, te({
842
+ p: e.prefix || "",
843
+ v: e.coordinatesLine[r].value,
844
+ s: e.suffix || "",
845
+ r: e.rounding || 0
846
+ }), {
847
+ datapoint: e.coordinatesLine[r],
848
+ seriesIndex: r
849
+ }), W.value.left + W.value.slot * r + W.value.slot / 10 + (H.value.stacked ? 0 : W.value.slot / X.value.length * t - (t === 0 ? 0 : W.value.slot / (5 * X.value.length) * t)) + W.value.slot * .4 / (H.value.stacked ? 1 : X.value.length), (e.coordinatesLine[r].value < 0 ? H.value.stacked ? e.localZero : G.value.zero : e.coordinatesLine[r].y) + B.value.style.chart.dataLabels.offsetY, {
850
+ align: "center",
851
+ font: `${Math.round(k.value / 40 * B.value.style.chart.dataLabels.fontSizeRatio)}px ${B.value.style.fontFamily}`,
852
+ color: B.value.style.chart.dataLabels.useSerieColor ? e.color : B.value.style.chart.dataLabels.color,
853
+ strokeColor: B.value.style.chart.backgroundColor,
854
+ lineWidth: .8
855
+ });
856
+ });
857
+ }
858
+ function ir(e, t) {
859
+ let n = e.coordinatesLine.map((t, n) => e.series[n] != null && Number.isFinite(t?.y) ? t : null), r = [], i = [], a = [];
860
+ for (let e = 0; e < n.length; e += 1) {
861
+ let o = n[e];
862
+ if (o) a.push(o);
863
+ else {
864
+ if (a.length >= 2) {
865
+ let e = a[0], n = a[a.length - 1];
866
+ r.push([
867
+ {
868
+ x: e.x,
869
+ y: t
870
+ },
871
+ ...a,
872
+ {
873
+ x: n.x,
874
+ y: t
875
+ }
876
+ ]);
877
+ } else a.length === 1 && i.push(a[0]);
878
+ a = [];
879
+ }
880
+ }
881
+ if (a.length >= 2) {
882
+ let e = a[0], n = a[a.length - 1];
883
+ r.push([
884
+ {
885
+ x: e.x,
886
+ y: t
887
+ },
888
+ ...a,
889
+ {
890
+ x: n.x,
891
+ y: t
892
+ }
893
+ ]);
894
+ } else a.length === 1 && i.push(a[0]);
895
+ return {
896
+ polygons: r,
897
+ singles: i
898
+ };
899
+ }
900
+ function ar(e) {
901
+ let t = e.coordinatesLine.map((t, n) => e.series[n] != null && Number.isFinite(t?.y) ? t : null), n = [], r = [];
902
+ for (let e = 0; e < t.length; e += 1) {
903
+ let i = t[e];
904
+ i ? r.push(i) : (r.length >= 2 && n.push(r), r = []);
905
+ }
906
+ return r.length >= 2 && n.push(r), n;
907
+ }
908
+ function or(e) {
909
+ if (On.value) {
910
+ let t = ar(e);
911
+ for (let n of t) d(O.value, n, {
912
+ color: e.color,
913
+ lineWidth: 3
914
+ });
915
+ } else d(O.value, e.coordinatesLine, {
916
+ color: e.color,
917
+ lineWidth: 3
918
+ });
919
+ }
920
+ function sr(e) {
921
+ let t = !!On.value;
922
+ if (e.useArea) {
923
+ let n = H.value.stacked ? e.localZero : G.value.zero;
924
+ if (t) {
925
+ let { polygons: t, singles: r } = ir(e, n);
926
+ for (let n of t) ke(O.value, n, {
927
+ fillColor: o(e.color, B.value.style.chart.area.opacity),
928
+ strokeColor: "transparent"
929
+ });
930
+ let i = k.value / 200 * B.value.style.chart.line.plots.radiusRatio;
931
+ for (let t of r) Oe(O.value, {
932
+ x: t.x,
933
+ y: t.y
934
+ }, i, {
935
+ color: B.value.style.chart.backgroundColor,
936
+ fillStyle: e.color,
937
+ strokeColor: "transparent"
938
+ });
939
+ } else {
940
+ let t = {
941
+ x: e.coordinatesLine[0].x,
942
+ y: n
943
+ }, r = {
944
+ x: e.coordinatesLine.at(-1).x,
945
+ y: n
946
+ };
947
+ ke(O.value, [
948
+ t,
949
+ ...e.coordinatesLine,
950
+ r
951
+ ], {
952
+ fillColor: o(e.color, B.value.style.chart.area.opacity),
953
+ strokeColor: "transparent"
954
+ });
955
+ }
956
+ or(e);
957
+ return;
958
+ }
959
+ or(e);
960
+ }
961
+ function cr() {
962
+ q.value.forEach((e, t) => {
963
+ d(O.value, [{
964
+ x: W.value.left,
965
+ y: W.value.bottom - e.yOffset
966
+ }, {
967
+ x: W.value.right,
968
+ y: W.value.bottom - e.yOffset
969
+ }], {
970
+ color: B.value.style.chart.grid.x.horizontalLines.color,
971
+ lineWidth: 1
972
+ });
973
+ });
974
+ }
975
+ function lr() {
976
+ let { left: e, top: t, width: n, height: r } = W.value, i = J.value.start, a = J.value.end - i, o = n / a, s = Y.value.start - i, c = Y.value.end - i, l = Math.max(0, Math.min(a, s)), u = Math.max(0, Math.min(a, c));
977
+ je(O.value, [
978
+ {
979
+ x: e + l * o,
980
+ y: t
981
+ },
982
+ {
983
+ x: e + l * o + (u - l) * o,
984
+ y: t
985
+ },
986
+ {
987
+ x: e + l * o + (u - l) * o,
988
+ y: t + r
989
+ },
990
+ {
991
+ x: e + l * o,
992
+ y: t + r
993
+ }
994
+ ], {
995
+ fillColor: B.value.style.chart.zoom.preview.fill,
996
+ strokeColor: B.value.style.chart.zoom.preview.stroke,
997
+ lineDash: [
998
+ ,
999
+ ,
1000
+ ,
1001
+ ,
1002
+ ].fill(B.value.style.chart.zoom.preview.strokeDasharray),
1003
+ lineWidth: B.value.style.chart.zoom.preview.strokeWidth
1004
+ });
1005
+ }
1006
+ function Q() {
1007
+ !z.value || !V.value || !O.value || (Un(), N.value ? ((j.value !== null || L.value !== null) && B.value.style.chart.selector.show && tr(), rr(), H.value.stacked && B.value.style.chart.grid.x.showAxis && cr(), Vn.value.forEach((e) => {
1008
+ (e.type === "line" || !e.type) && sr(e), P.value && (Wn(e), H.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && qn(e));
1009
+ }), V.value && (At.value = Ae(V.value))) : (At.value && (O.value.clearRect(0, 0, 1e4, 1e4), O.value.drawImage(At.value, 0, 0)), (j.value !== null || L.value !== null) && B.value.style.chart.selector.show && tr(), (j.value !== null || L.value !== null) && q.value.forEach((e) => {
1010
+ let t = j.value ?? L.value, n = e.coordinatesLine[t];
1011
+ (e.type === "line" || !e.type || e.type === "plot") && n && Number.isFinite(n.x) && Number.isFinite(n.y) && Oe(O.value, {
1012
+ x: n.x,
1013
+ y: n.y
1014
+ }, k.value / 150 * B.value.style.chart.line.plots.radiusRatio, {
1015
+ color: B.value.style.chart.backgroundColor,
1016
+ fillStyle: e.color,
1017
+ strokeColor: "transparent"
1018
+ });
1019
+ })), B.value.style.chart.grid.x.timeLabels.show && er(), B.value.style.chart.selector.show && B.value.style.chart.selector.showHorizontalSelector && nr(), Kn(), Gn(), B.value.style.chart.zoom.preview.enable && (J.value.start !== Y.value.start || J.value.end !== Y.value.end) && lr(), N.value = !1);
1020
+ }
1021
+ let ur = Ee(() => {
1022
+ P.value = !0, Hn();
1023
+ }, U.value > 200 ? 10 : 1, !P.value);
1024
+ function dr(e) {
1025
+ if ([null, void 0].includes(j.value ?? L.value) || !e.coordinatesLine[j.value ?? L.value]) return !1;
1026
+ let { y: t, value: n } = e.coordinatesLine[j.value ?? L.value];
1027
+ return {
1028
+ y: t,
1029
+ value: n
1030
+ };
1031
+ }
1032
+ function fr(e) {
1033
+ if (!z.value || !V.value || vn.value) return;
1034
+ let { left: t, top: n } = V.value.getBoundingClientRect(), r = e.clientX - t;
1035
+ if (I.value = (e.clientY - n) * 2, (I.value < W.value.top || I.value > W.value.bottom) && (I.value = null), r * 2 < W.value.left || r * 2 > W.value.right) {
1036
+ _r();
1037
+ return;
1038
+ }
1039
+ let i = r * 2 - W.value.left, a = Math.floor(i / W.value.slot);
1040
+ if (j.value = a, R.value = a, Et.value = !0, Kt.value = !1, !P.value) return;
1041
+ let o = "", s = B.value.style.chart.tooltip.customFormat, c = q.value.map((e) => ({
1042
+ shape: e.shape || null,
1043
+ name: e.name,
1044
+ color: e.color,
1045
+ type: e.type || "line",
1046
+ value: e.series.find((e, t) => t === j.value)
1047
+ }));
1048
+ Ot.value = {
1049
+ timeLabel: B.value.style.chart.grid.x.timeLabels.values.slice(J.value.start, J.value.end)[j.value] ? B.value.style.chart.tooltip.useDefaultTimeFormat ? Z.value.slice(J.value.start, J.value.end)[j.value]?.text : $n.value[j.value]?.text : "",
1050
+ datapoint: c,
1051
+ seriesIndex: j.value,
1052
+ series: q.value,
1053
+ config: B.value
1054
+ }, xr({
1055
+ seriesIndex: j.value,
1056
+ datapoint: c
1057
+ }), ee(s) && oe(() => s({
1058
+ seriesIndex: j.value,
1059
+ datapoint: c,
1060
+ series: q.value,
1061
+ config: B.value
1062
+ })) ? Dt.value = s({
1063
+ seriesIndex: j.value,
1064
+ datapoint: c,
1065
+ series: q.value,
1066
+ config: B.value
1067
+ }) : (B.value.style.chart.grid.x.timeLabels.values.slice(J.value.start, J.value.end)[j.value] ? o += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${B.value.style.chart.tooltip.borderColor}; width:100%">${B.value.style.chart.tooltip.useDefaultTimeFormat ? Z.value.slice(J.value.start, J.value.end)[j.value]?.text : $n.value[j.value]?.text}</div>` : o += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${B.value.style.chart.tooltip.borderColor}; width:100%">${Z.value[j.value + J.value.start]?.text ?? ""}</div>`, o += Dn.value.join(""), Dt.value = o), P.value = !1;
1068
+ }
1069
+ function pr(e) {
1070
+ return q.value.map((t) => ({
1071
+ shape: t.shape || null,
1072
+ name: t.name,
1073
+ color: t.color,
1074
+ type: t.type || "line",
1075
+ value: t.series.find((t, n) => n === e)
1076
+ }));
1077
+ }
1078
+ function mr(e) {
1079
+ let t = "", n = B.value.style.chart.tooltip.customFormat, r = pr(e);
1080
+ return xr({
1081
+ seriesIndex: e,
1082
+ datapoint: r
1083
+ }), ee(n) && oe(() => n({
1084
+ seriesIndex: e,
1085
+ datapoint: r,
1086
+ series: q.value,
1087
+ config: B.value
1088
+ })) ? n({
1089
+ seriesIndex: e,
1090
+ datapoint: r,
1091
+ series: q.value,
1092
+ config: B.value
1093
+ }) : (B.value.style.chart.grid.x.timeLabels.values.slice(J.value.start, J.value.end)[e] ? t += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${B.value.style.chart.tooltip.borderColor}; width:100%">${B.value.style.chart.tooltip.useDefaultTimeFormat ? Z.value.slice(J.value.start, J.value.end)[e]?.text : $n.value[e]?.text}</div>` : t += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${B.value.style.chart.tooltip.borderColor}; width:100%">${Z.value[e + J.value.start]?.text ?? ""}</div>`, t += Dn.value.join(""), t);
1094
+ }
1095
+ function hr(e) {
1096
+ if (!V.value || !W.value?.slot) return;
1097
+ let t = V.value.getBoundingClientRect(), n = t.width / W.value.canvasWidth, r = t.height / W.value.canvasHeight, i = W.value.left + W.value.slot * e + W.value.slot / 2, a = W.value.top + W.value.height / 2;
1098
+ Jt.value = {
1099
+ x: t.left + i * n,
1100
+ y: t.top + a * r
1101
+ };
1102
+ }
1103
+ function gr(e, { fromKeyboard: t = !1 } = {}) {
1104
+ !z.value || vn.value || e != null && (e < 0 || e >= J.value.end - J.value.start || (j.value = e, R.value = e, Et.value = !0, Kt.value = t, Dt.value = mr(e), t && hr(e), P.value = !1, Q()));
1105
+ }
1106
+ function _r() {
1107
+ Et.value = !1, j.value = null, R.value = null, Dt.value = "", I.value = null, Kt.value = !1, Q();
1108
+ }
1109
+ function vr() {
1110
+ qt.value = !0;
1111
+ }
1112
+ function yr() {
1113
+ qt.value = !1, _r();
1114
+ }
1115
+ function br(e) {
1116
+ if (!V.value || Vr.value || document.activeElement !== V.value) return;
1117
+ let t = e.key === "ArrowLeft", n = e.key === "ArrowRight";
1118
+ if (!t && !n) return;
1119
+ let r = J.value.end - J.value.start;
1120
+ if (r <= 0) return;
1121
+ e.preventDefault(), e.stopPropagation();
1122
+ let i = R.value;
1123
+ i !== null && i >= 0 && i < r ? n ? (i += 1, i >= r && (i = 0)) : (--i, i < 0 && (i = r - 1)) : i = n ? 0 : r - 1, gr(i, { fromKeyboard: !0 });
1124
+ }
1125
+ function xr({ seriesIndex: e, datapoint: t }) {
1126
+ let n = J.value.start + e;
1127
+ Yt("selectX", {
1128
+ dataset: t,
1129
+ index: n,
1130
+ indexLabel: ""
1131
+ });
1132
+ }
1133
+ C(() => T.selectedXIndex, (e) => {
1134
+ if ([null, void 0].includes(T.selectedXIndex)) {
1135
+ _r();
1136
+ return;
1137
+ }
1138
+ let t = e - J.value.start;
1139
+ t < 0 || e >= J.value.end ? _r() : gr(t, { fromKeyboard: !1 });
1140
+ }, { immediate: !0 }), C(() => j.value, (e) => {
1141
+ ur();
1142
+ }), C(() => J.value, (e) => {
1143
+ N.value = !0, Q();
1144
+ }, { deep: !0 }), C(() => Y.value, (e) => {
1145
+ Q();
1146
+ }, { deep: !0 }), C(() => H.value.showDataLabels, (e) => {
1147
+ N.value = !0, Q();
1148
+ }), C(() => I.value, (e) => {
1149
+ e && Q();
1150
+ }), C(() => H.value.stacked, (e) => {
1151
+ N.value = !0, P.value = !0, ur();
1152
+ });
1153
+ function Sr() {
1154
+ _r();
1155
+ }
1156
+ let $ = et(null), Cr = et(null), wr = et(null);
1157
+ Qe(() => {
1158
+ zt.value = !0, Tr();
1159
+ });
1160
+ function Tr() {
1161
+ if (l(T.dataset) && se({
1162
+ componentName: "VueUiXyCanvas",
1163
+ type: "dataset",
1164
+ debug: en.value
1165
+ }), Je(() => {
1166
+ V.value && !O.value && (O.value = V.value.getContext("2d", { willReadFrequently: !0 })), O.value && z.value && (N.value = !0, P.value = !0, Hn());
1167
+ }), B.value.responsive) {
1168
+ let e = De(() => {
1169
+ let { width: e, height: t } = Me({
1170
+ chart: D.value,
1171
+ title: B.value.style.chart.title.text ? Nt.value : null,
1172
+ legend: B.value.style.chart.legend.show ? Pt.value : null,
1173
+ slicer: B.value.style.chart.zoom.show && U.value > 6 ? F.value?.$el : null,
1174
+ source: Ft.value
1175
+ });
1176
+ requestAnimationFrame(() => {
1177
+ dn.value = `${e} / ${t}`;
1178
+ });
1179
+ });
1180
+ $.value && (Cr.value && $.value.unobserve(Cr.value), $.value.disconnect()), $.value = new ResizeObserver(e), Cr.value = D.value.parentNode, $.value.observe(Cr.value);
1181
+ }
1182
+ wr.value && wr.value.disconnect(), wr.value = new ResizeObserver(async (e) => {
1183
+ for (let t of e) t.contentBoxSize && Tt.value && (N.value = !0, ur());
1184
+ }), wr.value.observe(Tt.value), Nn();
1185
+ }
1186
+ Ze(() => {
1187
+ wr.value && wr.value.disconnect(), $.value && (Cr.value && $.value.unobserve(Cr.value), $.value.disconnect());
1188
+ });
1189
+ function Er() {
1190
+ M.value.length ? M.value = [] : jr.value.forEach((e, t) => {
1191
+ M.value.push(t);
1192
+ }), N.value = !0, ur(), Yt("selectLegend", q.value);
1193
+ }
1194
+ function Dr(e) {
1195
+ M.value.includes(e) ? M.value = M.value.filter((t) => t !== e) : M.value.push(e), N.value = !0, ur(), Yt("selectLegend", q.value);
1196
+ }
1197
+ function Or(e) {
1198
+ return K.value.length ? K.value.find((t) => t.name === e) || (en.value && console.warn(`VueUiXyCanvas - Series name not found "${e}"`), null) : (en.value && console.warn("VueUiXyCanvas - There are no series to show."), null);
1199
+ }
1200
+ function kr(e) {
1201
+ let t = Or(e);
1202
+ t !== null && M.value.includes(t.absoluteIndex) && Dr(t.absoluteIndex);
1203
+ }
1204
+ function Ar(e) {
1205
+ let t = Or(e);
1206
+ t !== null && (M.value.includes(t.absoluteIndex) || Dr(t.absoluteIndex));
1207
+ }
1208
+ let jr = p(() => K.value.map((e, t) => ({
1209
+ ...e,
1210
+ name: e.name,
1211
+ color: u(e.color) || _n.value[t] || s[t] || s[t % s.length],
1212
+ shape: e.shape || "circle",
1213
+ prefix: e.prefix || "",
1214
+ suffix: e.suffix || "",
1215
+ rounding: e.rounding || 0
1216
+ })).map((e) => ({
1217
+ ...e,
1218
+ opacity: M.value.includes(e.absoluteIndex) ? .5 : 1,
1219
+ segregate: () => Dr(e.absoluteIndex),
1220
+ isSegregated: M.value.includes(e.absoluteIndex)
1221
+ }))), Mr = p(() => ({
1222
+ cy: "donut-div-legend",
1223
+ backgroundColor: B.value.style.chart.legend.backgroundColor,
1224
+ color: B.value.style.chart.legend.color,
1225
+ fontSize: B.value.style.chart.legend.fontSize,
1226
+ paddingBottom: 12,
1227
+ fontWeight: B.value.style.chart.legend.bold ? "bold" : ""
1228
+ })), Nr = p(() => {
1229
+ let e = [""].concat(q.value.map((e) => e.name), "__SUM__"), t = [];
1230
+ for (let e = 0; e < U.value; e += 1) {
1231
+ let n = q.value.map((t) => t.series[e] ?? 0).reduce((e, t) => e + t, 0);
1232
+ t.push([B.value.style.chart.grid.x.timeLabels.values.slice(J.value.start, J.value.end)[e] ? Z?.value?.slice(J.value.start, J.value.end)?.[e]?.text ?? e + 1 : e + 1].concat(q.value.map((t) => (t.series[e] ?? 0).toFixed(B.value.table.rounding)), (n ?? 0).toFixed(B.value.table.rounding)));
1233
+ }
1234
+ let n = {
1235
+ th: {
1236
+ backgroundColor: B.value.table.th.backgroundColor,
1237
+ color: B.value.table.th.color,
1238
+ outline: B.value.table.th.outline
1239
+ },
1240
+ td: {
1241
+ backgroundColor: B.value.table.td.backgroundColor,
1242
+ color: B.value.table.td.color,
1243
+ outline: B.value.table.td.outline
1244
+ },
1245
+ breakpoint: B.value.table.responsiveBreakpoint
1246
+ }, r = [B.value.table.columnNames.period].concat(q.value.map((e) => e.name), B.value.table.columnNames.total);
1247
+ return {
1248
+ head: e,
1249
+ body: t.slice(0, J.value.end - J.value.start),
1250
+ config: n,
1251
+ colNames: r
1252
+ };
1253
+ }), Pr = p(() => {
1254
+ if (q.value.length === 0) return {
1255
+ head: [],
1256
+ body: [],
1257
+ config: {},
1258
+ columnNames: []
1259
+ };
1260
+ let e = q.value.map((e) => ({
1261
+ label: e.name,
1262
+ color: e.color,
1263
+ type: e.type
1264
+ })), t = [];
1265
+ for (let e = J.value.start; e < J.value.end; e += 1) {
1266
+ let n = [B.value.style.chart.grid.x.timeLabels.values[e] ? Z.value[e].text : e + 1];
1267
+ q.value.forEach((t) => {
1268
+ n.push(Number((t.series[e] || 0).toFixed(B.value.table.rounding)));
1269
+ }), t.push(n);
1270
+ }
1271
+ return {
1272
+ head: e,
1273
+ body: t
1274
+ };
1275
+ });
1276
+ function Fr(e = null) {
1277
+ let n = [
1278
+ [B.value.style.chart.title.text],
1279
+ [B.value.style.chart.title.subtitle.text],
1280
+ [""]
1281
+ ], r = ["", ...Pr.value.head.map((e) => e.label)], a = Pr.value.body, o = n.concat([r]).concat(a), s = i(o);
1282
+ e ? e(s) : t({
1283
+ csvContent: s,
1284
+ title: B.value.style.chart.title.text || "vue-ui-xy-canvas"
1285
+ });
1286
+ }
1287
+ function Ir() {
1288
+ return q.value;
1289
+ }
1290
+ function Lr() {
1291
+ H.value.showTable = !H.value.showTable;
1292
+ }
1293
+ function Rr() {
1294
+ H.value.showDataLabels = !H.value.showDataLabels;
1295
+ }
1296
+ function zr() {
1297
+ H.value.stacked = !H.value.stacked;
1298
+ }
1299
+ function Br() {
1300
+ H.value.showTooltip = !H.value.showTooltip;
1301
+ }
1302
+ let Vr = b(!1);
1303
+ function Hr() {
1304
+ Vr.value = !Vr.value;
1305
+ }
1306
+ async function Ur({ scale: e = 2 } = {}) {
1307
+ if (!D.value) return;
1308
+ let { imageUri: t, base64: n } = await Ce({
1309
+ domElement: D.value,
1310
+ base64: !0,
1311
+ img: !0,
1312
+ scale: e
1313
+ }), r = D.value.getBoundingClientRect(), i = {
1314
+ width: r.width,
1315
+ height: r.height,
1316
+ aspectRatio: r.height ? r.width / r.height : 0
1317
+ }, a = await ie(t, e) ?? i;
1318
+ return {
1319
+ imageUri: t,
1320
+ base64: n,
1321
+ title: B.value.style.chart.title.text,
1322
+ ...a
1323
+ };
1324
+ }
1325
+ let Wr = p(() => {
1326
+ let e = B.value.table.useDialog && !B.value.table.show, t = H.value.showTable;
1327
+ return {
1328
+ component: e ? xt : Fe,
1329
+ title: `${B.value.style.chart.title.text}${B.value.style.chart.title.subtitle.text ? `: ${B.value.style.chart.title.subtitle.text}` : ""}`,
1330
+ props: e ? {
1331
+ backgroundColor: B.value.table.th.backgroundColor,
1332
+ color: B.value.table.th.color,
1333
+ headerColor: B.value.table.th.color,
1334
+ headerBg: B.value.table.th.backgroundColor,
1335
+ isFullscreen: Mt.value,
1336
+ fullscreenParent: D.value,
1337
+ forcedWidth: Math.min(800, window.innerWidth * .8),
1338
+ isCursorPointer: $t.value
1339
+ } : {
1340
+ hideDetails: !0,
1341
+ config: {
1342
+ open: t,
1343
+ maxHeight: 1e4,
1344
+ body: {
1345
+ backgroundColor: B.value.style.chart.backgroundColor,
1346
+ color: B.value.style.chart.color
1347
+ },
1348
+ head: {
1349
+ backgroundColor: B.value.style.chart.backgroundColor,
1350
+ color: B.value.style.chart.color
1351
+ }
1352
+ }
1353
+ }
1354
+ };
1355
+ });
1356
+ C(() => H.value.showTable, (e) => {
1357
+ B.value.table.show || (e && B.value.table.useDialog && Bt.value ? Bt.value.open() : "close" in Bt.value && Bt.value.close());
1358
+ });
1359
+ function Gr() {
1360
+ H.value.showTable = !1, Vt.value && Vt.value.setTableIconState(!1);
1361
+ }
1362
+ function Kr(e) {
1363
+ if (e?.stage === "start") {
1364
+ Gt.value = !0;
1365
+ return;
1366
+ }
1367
+ if (e?.stage === "end") {
1368
+ Gt.value = !1;
1369
+ return;
1370
+ }
1371
+ hn();
1372
+ }
1373
+ async function qr() {
1374
+ if (Yt("copyAlt", {
1375
+ config: B.value,
1376
+ dataset: q.value
1377
+ }), !B.value.userOptions.callbacks.altCopy) {
1378
+ console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1379
+ return;
1380
+ }
1381
+ await Promise.resolve(B.value.userOptions.callbacks.altCopy({
1382
+ config: B.value,
1383
+ dataset: q.value
1384
+ }));
1385
+ }
1386
+ return Te({
1387
+ getData: Ir,
1388
+ getImage: Ur,
1389
+ generateCsv: Fr,
1390
+ generatePdf: mn,
1391
+ generateImage: hn,
1392
+ hideSeries: Ar,
1393
+ showSeries: kr,
1394
+ toggleTable: Lr,
1395
+ toggleLabels: Rr,
1396
+ toggleStack: zr,
1397
+ toggleTooltip: Br,
1398
+ toggleAnnotator: Hr,
1399
+ toggleFullscreen: gn,
1400
+ copyAlt: qr
1401
+ }), (t, n) => (y(), He("div", {
1402
+ style: Xe(`width:100%; position:relative; ${B.value.responsive ? "height: 100%" : ""}; background:${B.value.style.chart.backgroundColor};`),
1403
+ ref_key: "xy",
1404
+ ref: D,
1405
+ id: `xy_canvas_${E.value}`,
1406
+ class: Ye(`vue-data-ui-component vue-ui-xy-canvas ${Mt.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
1407
+ onMouseenter: cn,
1408
+ onMouseleave: ln
1409
+ }, [
1410
+ g("div", {
1411
+ id: `chart-instructions-${E.value}`,
1412
+ class: "sr-only"
1413
+ }, [g("p", null, tt(B.value.a11y.translations.keyboardNavigation), 1)], 8, st),
1414
+ g("div", ct, tt(Qt.value), 1),
1415
+ B.value.style.chart.title.text ? (y(), He("div", {
1416
+ key: 0,
1417
+ ref_key: "chartTitle",
1418
+ ref: Nt,
1419
+ style: Xe(`width:100%;background:${B.value.style.chart.backgroundColor};`)
1420
+ }, [(y(), m(we, {
1421
+ key: `title_${It.value}`,
1422
+ config: {
1423
+ title: {
1424
+ cy: "xy-canvas-title",
1425
+ ...B.value.style.chart.title
1426
+ },
1427
+ subtitle: {
1428
+ cy: "xy-canvas-subtitle",
1429
+ ...B.value.style.chart.title.subtitle
1430
+ }
1431
+ }
1432
+ }, null, 8, ["config"]))], 4)) : h("", !0),
1433
+ g("div", { id: `legend-top-${E.value}` }, null, 8, lt),
1434
+ B.value.userOptions.show && z.value && (S(sn) || S(an)) ? (y(), m(S(yt), {
1435
+ ref_key: "userOptionsRef",
1436
+ ref: Vt,
1437
+ key: `user_option_${jt.value}`,
1438
+ backgroundColor: B.value.style.chart.backgroundColor,
1439
+ color: B.value.style.chart.color,
1440
+ isPrinting: S(fn),
1441
+ isImaging: S(pn),
1442
+ uid: E.value,
1443
+ hasTooltip: B.value.userOptions.buttons.tooltip && B.value.style.chart.tooltip.show,
1444
+ hasPdf: B.value.userOptions.buttons.pdf,
1445
+ hasImg: B.value.userOptions.buttons.img,
1446
+ hasXls: B.value.userOptions.buttons.csv,
1447
+ hasLabel: B.value.userOptions.buttons.labels,
1448
+ hasStack: e.dataset.length > 1 && B.value.userOptions.buttons.stack,
1449
+ hasFullscreen: B.value.userOptions.buttons.fullscreen,
1450
+ hasAltCopy: B.value.userOptions.buttons.altCopy,
1451
+ hasTable: J.value.end - J.value.start <= 730 && B.value.userOptions.buttons.table,
1452
+ isFullscreen: Mt.value,
1453
+ isTooltip: H.value.showTooltip,
1454
+ isStacked: H.value.stacked,
1455
+ titles: { ...B.value.userOptions.buttonTitles },
1456
+ chartElement: D.value,
1457
+ position: B.value.userOptions.position,
1458
+ hasAnnotator: B.value.userOptions.buttons.annotator,
1459
+ isAnnotation: Vr.value,
1460
+ callbacks: B.value.userOptions.callbacks,
1461
+ printScale: B.value.userOptions.print.scale,
1462
+ tableDialog: B.value.table.useDialog,
1463
+ isCursorPointer: $t.value,
1464
+ onToggleFullscreen: gn,
1465
+ onGeneratePdf: S(mn),
1466
+ onGenerateCsv: Fr,
1467
+ onGenerateImage: Kr,
1468
+ onToggleTable: Lr,
1469
+ onToggleLabels: Rr,
1470
+ onToggleStack: zr,
1471
+ onToggleTooltip: Br,
1472
+ onToggleAnnotator: Hr,
1473
+ onCopyAlt: qr,
1474
+ style: Xe({ visibility: S(sn) ? S(an) ? "visible" : "hidden" : "visible" })
1475
+ }, Ue({ _: 2 }, [
1476
+ t.$slots.menuIcon ? {
1477
+ name: "menuIcon",
1478
+ fn: w(({ isOpen: e, color: n }) => [x(t.$slots, "menuIcon", v(_({
1479
+ isOpen: e,
1480
+ color: n
1481
+ })), void 0, !0)]),
1482
+ key: "0"
1483
+ } : void 0,
1484
+ t.$slots.optionTooltip ? {
1485
+ name: "optionTooltip",
1486
+ fn: w(() => [x(t.$slots, "optionTooltip", {}, void 0, !0)]),
1487
+ key: "1"
1488
+ } : void 0,
1489
+ t.$slots.optionPdf ? {
1490
+ name: "optionPdf",
1491
+ fn: w(() => [x(t.$slots, "optionPdf", {}, void 0, !0)]),
1492
+ key: "2"
1493
+ } : void 0,
1494
+ t.$slots.optionCsv ? {
1495
+ name: "optionCsv",
1496
+ fn: w(() => [x(t.$slots, "optionCsv", {}, void 0, !0)]),
1497
+ key: "3"
1498
+ } : void 0,
1499
+ t.$slots.optionImg ? {
1500
+ name: "optionImg",
1501
+ fn: w(() => [x(t.$slots, "optionImg", {}, void 0, !0)]),
1502
+ key: "4"
1503
+ } : void 0,
1504
+ t.$slots.optionTable ? {
1505
+ name: "optionTable",
1506
+ fn: w(() => [x(t.$slots, "optionTable", {}, void 0, !0)]),
1507
+ key: "5"
1508
+ } : void 0,
1509
+ t.$slots.optionLabels ? {
1510
+ name: "optionLabels",
1511
+ fn: w(() => [x(t.$slots, "optionLabels", {}, void 0, !0)]),
1512
+ key: "6"
1513
+ } : void 0,
1514
+ t.$slots.optionStack ? {
1515
+ name: "optionStack",
1516
+ fn: w(() => [x(t.$slots, "optionStack", {}, void 0, !0)]),
1517
+ key: "7"
1518
+ } : void 0,
1519
+ t.$slots.optionFullscreen ? {
1520
+ name: "optionFullscreen",
1521
+ fn: w(({ toggleFullscreen: e, isFullscreen: n }) => [x(t.$slots, "optionFullscreen", v(_({
1522
+ toggleFullscreen: e,
1523
+ isFullscreen: n
1524
+ })), void 0, !0)]),
1525
+ key: "8"
1526
+ } : void 0,
1527
+ t.$slots.optionAnnotator ? {
1528
+ name: "optionAnnotator",
1529
+ fn: w(({ toggleAnnotator: e, isAnnotator: n }) => [x(t.$slots, "optionAnnotator", v(_({
1530
+ toggleAnnotator: e,
1531
+ isAnnotator: n
1532
+ })), void 0, !0)]),
1533
+ key: "9"
1534
+ } : void 0,
1535
+ t.$slots.optionAltCopy ? {
1536
+ name: "optionAltCopy",
1537
+ fn: w(({ altCopy: e }) => [x(t.$slots, "optionAltCopy", v(_({ altCopy: e })), void 0, !0)]),
1538
+ key: "10"
1539
+ } : void 0,
1540
+ t.$slots["custom-menu-before"] ? {
1541
+ name: "custom-menu-before",
1542
+ fn: w(() => [x(t.$slots, "custom-menu-before", {}, void 0, !0)]),
1543
+ key: "11"
1544
+ } : void 0,
1545
+ t.$slots["custom-menu-after"] ? {
1546
+ name: "custom-menu-after",
1547
+ fn: w(() => [x(t.$slots, "custom-menu-after", {}, void 0, !0)]),
1548
+ key: "12"
1549
+ } : void 0
1550
+ ]), 1032, /* @__PURE__ */ "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".split("."))) : h("", !0),
1551
+ g("div", {
1552
+ class: "vue-ui-xy-canvas",
1553
+ style: Xe(`position: relative; aspect-ratio: ${dn.value}`),
1554
+ ref_key: "container",
1555
+ ref: Tt
1556
+ }, [
1557
+ g("canvas", {
1558
+ ref_key: "canvas",
1559
+ ref: V,
1560
+ "aria-label": Zt.value,
1561
+ "aria-describedby": `chart-instructions-${E.value}`,
1562
+ role: "img",
1563
+ "aria-live": "polite",
1564
+ tabindex: "0",
1565
+ style: {
1566
+ width: "100%",
1567
+ height: "100%"
1568
+ },
1569
+ onMousemove: n[0] ||= (e) => fr(e),
1570
+ onMouseleave: Sr,
1571
+ onFocus: vr,
1572
+ onBlur: yr,
1573
+ onKeydown: br
1574
+ }, null, 40, ut),
1575
+ t.$slots.hint ? (y(), He("div", dt, [x(t.$slots, "hint", v(_({
1576
+ hint: B.value.a11y.translations.keyboardNavigation,
1577
+ isVisible: qt.value
1578
+ })), void 0, !0)])) : h("", !0),
1579
+ x(t.$slots, "skeleton", {}, () => [S(nn) ? (y(), m(be, { key: 0 })) : h("", !0)], !0),
1580
+ Ge(S(_t), {
1581
+ teleportTo: B.value.style.chart.tooltip.teleportTo,
1582
+ show: H.value.showTooltip && Et.value,
1583
+ backgroundColor: B.value.style.chart.tooltip.backgroundColor,
1584
+ color: B.value.style.chart.tooltip.color,
1585
+ fontSize: B.value.style.chart.tooltip.fontSize,
1586
+ borderRadius: B.value.style.chart.tooltip.borderRadius,
1587
+ borderColor: B.value.style.chart.tooltip.borderColor,
1588
+ borderWidth: B.value.style.chart.tooltip.borderWidth,
1589
+ position: B.value.style.chart.tooltip.position,
1590
+ offsetX: B.value.style.chart.tooltip.offsetX,
1591
+ offsetY: B.value.style.chart.tooltip.offsetY,
1592
+ parent: t.$refs.xy,
1593
+ content: Dt.value,
1594
+ isFullscreen: Mt.value,
1595
+ backgroundOpacity: B.value.style.chart.tooltip.backgroundOpacity,
1596
+ isCustom: S(ee)(B.value.style.chart.tooltip.customFormat),
1597
+ smooth: B.value.style.chart.tooltip.smooth,
1598
+ backdropFilter: B.value.style.chart.tooltip.backdropFilter,
1599
+ smoothForce: B.value.style.chart.tooltip.smoothForce,
1600
+ smoothSnapThreshold: B.value.style.chart.tooltip.smoothSnapThreshold,
1601
+ isA11yMode: Kt.value,
1602
+ a11yPosition: Jt.value
1603
+ }, {
1604
+ "tooltip-before": w(() => [x(t.$slots, "tooltip-before", v(_({ ...Ot.value })), void 0, !0)]),
1605
+ tooltip: w(() => [x(t.$slots, "tooltip", v(_({ ...Ot.value })), void 0, !0)]),
1606
+ "tooltip-after": w(() => [x(t.$slots, "tooltip-after", v(_({ ...Ot.value })), void 0, !0)]),
1607
+ _: 3
1608
+ }, 8, [
1609
+ "teleportTo",
1610
+ "show",
1611
+ "backgroundColor",
1612
+ "color",
1613
+ "fontSize",
1614
+ "borderRadius",
1615
+ "borderColor",
1616
+ "borderWidth",
1617
+ "position",
1618
+ "offsetX",
1619
+ "offsetY",
1620
+ "parent",
1621
+ "content",
1622
+ "isFullscreen",
1623
+ "backgroundOpacity",
1624
+ "isCustom",
1625
+ "smooth",
1626
+ "backdropFilter",
1627
+ "smoothForce",
1628
+ "smoothSnapThreshold",
1629
+ "isA11yMode",
1630
+ "a11yPosition"
1631
+ ])
1632
+ ], 4),
1633
+ B.value.style.chart.zoom.show && U.value > 6 && z.value && Ut.value && !S(nn) ? (y(), m(Pe, {
1634
+ key: 2,
1635
+ ref_key: "chartSlicer",
1636
+ ref: F,
1637
+ "data-dom-to-png-ignore-layout": "",
1638
+ allMinimaps: An.value,
1639
+ background: B.value.style.chart.zoom.color,
1640
+ borderColor: B.value.style.chart.backgroundColor,
1641
+ customFormat: B.value.style.chart.zoom.customFormat,
1642
+ cutNullValues: On.value,
1643
+ enableRangeHandles: B.value.style.chart.zoom.enableRangeHandles,
1644
+ enableSelectionDrag: B.value.style.chart.zoom.enableSelectionDrag,
1645
+ end: J.value.end,
1646
+ focusOnDrag: B.value.style.chart.zoom.focusOnDrag,
1647
+ focusRangeRatio: B.value.style.chart.zoom.focusRangeRatio,
1648
+ fontSize: B.value.style.chart.zoom.fontSize,
1649
+ immediate: !B.value.style.chart.zoom.preview.enable,
1650
+ inputColor: B.value.style.chart.zoom.color,
1651
+ isPreview: Pn.value,
1652
+ labelLeft: B.value.style.chart.grid.x.timeLabels.values[J.value.start] ? Z.value[J.value.start]?.text : "",
1653
+ labelRight: B.value.style.chart.grid.x.timeLabels.values[J.value.end - 1] ? Z.value[J.value.end - 1]?.text : "",
1654
+ max: U.value,
1655
+ min: 0,
1656
+ minimap: kn.value,
1657
+ minimapCompact: B.value.style.chart.zoom.minimap.compact,
1658
+ minimapFrameColor: B.value.style.chart.zoom.minimap.frameColor,
1659
+ minimapIndicatorColor: B.value.style.chart.zoom.minimap.indicatorColor,
1660
+ minimapLineColor: B.value.style.chart.zoom.minimap.lineColor,
1661
+ minimapMerged: B.value.style.chart.zoom.minimap.merged,
1662
+ minimapSelectedColor: B.value.style.chart.zoom.minimap.selectedColor,
1663
+ minimapSelectedColorOpacity: B.value.style.chart.zoom.minimap.selectedColorOpacity,
1664
+ minimapSelectedIndex: j.value,
1665
+ minimapSelectionRadius: B.value.style.chart.zoom.minimap.selectionRadius,
1666
+ preciseLabels: Qn.value?.length ? Qn.value : Z.value,
1667
+ refreshEndPoint: B.value.style.chart.zoom.endIndex === null ? U.value : B.value.style.chart.zoom.endIndex + 1,
1668
+ refreshStartPoint: B.value.style.chart.zoom.startIndex === null ? 0 : B.value.style.chart.zoom.startIndex,
1669
+ selectColor: B.value.style.chart.zoom.highlightColor,
1670
+ selectedSeries: K.value,
1671
+ smoothMinimap: B.value.style.chart.zoom.minimap.smooth,
1672
+ start: J.value.start,
1673
+ timeLabels: Z.value,
1674
+ usePreciseLabels: B.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !B.value.style.chart.zoom.useDefaultFormat,
1675
+ textColor: B.value.style.chart.color,
1676
+ useResetSlot: B.value.style.chart.zoom.useResetSlot,
1677
+ valueEnd: J.value.end,
1678
+ valueStart: J.value.start,
1679
+ verticalHandles: B.value.style.chart.zoom.minimap.verticalHandles,
1680
+ maxWidth: B.value.style.chart.zoom.maxWidth,
1681
+ minimapLeftInsetRatio: W.value.canvasWidth > 0 && B.value.style.chart.zoom.autoFit ? W.value.left / W.value.canvasWidth : null,
1682
+ minimapRightInsetRatio: W.value.canvasWidth > 0 && B.value.style.chart.zoom.autoFit ? (W.value.canvasWidth - W.value.right) / W.value.canvasWidth : null,
1683
+ additionalMinimapHeight: B.value.style.chart.zoom.minimap.additionalHeight,
1684
+ handleType: B.value.style.chart.zoom.minimap.handleType,
1685
+ handleIconColor: B.value.style.chart.zoom.minimap.handleIconColor,
1686
+ handleBorderWidth: B.value.style.chart.zoom.minimap.handleBorderWidth,
1687
+ handleBorderColor: B.value.style.chart.zoom.minimap.handleBorderColor,
1688
+ handleFill: B.value.style.chart.zoom.minimap.handleFill,
1689
+ handleWidth: B.value.style.chart.zoom.minimap.handleWidth,
1690
+ onFutureEnd: n[1] ||= (e) => Fn("end", e),
1691
+ onFutureStart: n[2] ||= (e) => Fn("start", e),
1692
+ onReset: Nn,
1693
+ onTrapMouse: yn,
1694
+ "onUpdate:end": Rn,
1695
+ "onUpdate:start": Ln
1696
+ }, {
1697
+ "reset-action": w(({ reset: e }) => [x(t.$slots, "reset-action", v(_({ reset: e })), void 0, !0)]),
1698
+ _: 3
1699
+ }, 8, /* @__PURE__ */ "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.minimapLeftInsetRatio.minimapRightInsetRatio.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth".split("."))) : h("", !0),
1700
+ g("div", { id: `legend-bottom-${E.value}` }, null, 8, ft),
1701
+ zt.value && (B.value.style.chart.legend.show || t.$slots.legend) ? (y(), m(Ve, {
1702
+ key: 3,
1703
+ to: B.value.style.chart.legend.position === "top" ? `#legend-top-${E.value}` : `#legend-bottom-${E.value}`
1704
+ }, [g("div", {
1705
+ ref_key: "chartLegend",
1706
+ ref: Pt
1707
+ }, [x(t.$slots, "legend", { legend: jr.value }, () => [B.value.style.chart.legend.show && z.value ? (y(), m(ze, {
1708
+ legendSet: jr.value,
1709
+ config: Mr.value,
1710
+ key: `legend_${Rt.value}`,
1711
+ isCursorPointer: $t.value,
1712
+ onClickMarker: n[3] ||= ({ i: e }) => Dr(e)
1713
+ }, {
1714
+ item: w(({ legend: e, index: t }) => [g("div", {
1715
+ onClick: (t) => e.segregate(),
1716
+ style: Xe(`opacity:${M.value.includes(t) ? .5 : 1}`)
1717
+ }, tt(e.name), 13, pt)]),
1718
+ legendToggle: w(() => [jr.value.length > 2 && B.value.style.chart.legend.selectAllToggle.show && !S(nn) ? (y(), m(Ie, {
1719
+ key: 0,
1720
+ backgroundColor: B.value.style.chart.legend.selectAllToggle.backgroundColor,
1721
+ color: B.value.style.chart.legend.selectAllToggle.color,
1722
+ fontSize: B.value.style.chart.legend.fontSize,
1723
+ checked: M.value.length > 0,
1724
+ isCursorPointer: $t.value,
1725
+ onToggle: Er
1726
+ }, null, 8, [
1727
+ "backgroundColor",
1728
+ "color",
1729
+ "fontSize",
1730
+ "checked",
1731
+ "isCursorPointer"
1732
+ ])) : h("", !0)]),
1733
+ _: 1
1734
+ }, 8, [
1735
+ "legendSet",
1736
+ "config",
1737
+ "isCursorPointer"
1738
+ ])) : h("", !0)], !0)], 512)], 8, ["to"])) : h("", !0),
1739
+ t.$slots.watermark ? (y(), He("div", mt, [x(t.$slots, "watermark", v(_({ isPrinting: S(fn) || S(pn) || Gt.value })), void 0, !0)])) : h("", !0),
1740
+ t.$slots.source ? (y(), He("div", {
1741
+ key: 5,
1742
+ ref_key: "source",
1743
+ ref: Ft,
1744
+ dir: "auto"
1745
+ }, [x(t.$slots, "source", {}, void 0, !0)], 512)) : h("", !0),
1746
+ z.value && B.value.userOptions.buttons.table ? (y(), m($e(Wr.value.component), qe({ key: 6 }, Wr.value.props, {
1747
+ ref_key: "tableUnit",
1748
+ ref: Bt,
1749
+ onClose: Gr
1750
+ }), Ue({
1751
+ content: w(() => [(y(), m(S(vt), {
1752
+ key: `table_${Lt.value}`,
1753
+ colNames: Nr.value.colNames,
1754
+ head: Nr.value.head,
1755
+ body: Nr.value.body,
1756
+ config: Nr.value.config,
1757
+ title: B.value.table.useDialog ? "" : Wr.value.title,
1758
+ withCloseButton: !B.value.table.useDialog,
1759
+ isCursorPointer: $t.value,
1760
+ onClose: Gr
1761
+ }, {
1762
+ th: w(({ th: e }) => [e === "__SUM__" ? (y(), He("div", ht, [Ge(Ne, {
1763
+ name: "sigma",
1764
+ stroke: Nr.value.config.th.color,
1765
+ size: 16
1766
+ }, null, 8, ["stroke"])])) : (y(), He("div", gt, tt(e), 1))]),
1767
+ td: w(({ td: e }) => [We(tt(e), 1)]),
1768
+ _: 1
1769
+ }, 8, [
1770
+ "colNames",
1771
+ "head",
1772
+ "body",
1773
+ "config",
1774
+ "title",
1775
+ "withCloseButton",
1776
+ "isCursorPointer"
1777
+ ]))]),
1778
+ _: 2
1779
+ }, [B.value.table.useDialog ? {
1780
+ name: "title",
1781
+ fn: w(() => [We(tt(Wr.value.title), 1)]),
1782
+ key: "0"
1783
+ } : void 0, B.value.table.useDialog ? {
1784
+ name: "actions",
1785
+ fn: w(() => [g("button", {
1786
+ tabindex: "0",
1787
+ class: "vue-ui-user-options-button",
1788
+ onClick: n[4] ||= (e) => Fr(B.value.userOptions.callbacks.csv),
1789
+ style: Xe({ cursor: $t.value ? "pointer" : "default" })
1790
+ }, [Ge(Ne, {
1791
+ name: "fileCsv",
1792
+ stroke: Wr.value.props.color
1793
+ }, null, 8, ["stroke"])], 4)]),
1794
+ key: "1"
1795
+ } : void 0]), 1040)) : h("", !0),
1796
+ B.value.userOptions.buttons.annotator && q.value.length ? (y(), m(S(bt), {
1797
+ key: 7,
1798
+ parent: D.value,
1799
+ backgroundColor: B.value.style.chart.backgroundColor,
1800
+ color: B.value.style.chart.color,
1801
+ active: Vr.value,
1802
+ isCursorPointer: $t.value,
1803
+ onClose: Hr
1804
+ }, {
1805
+ "annotator-action-close": w(() => [x(t.$slots, "annotator-action-close", {}, void 0, !0)]),
1806
+ "annotator-action-color": w(({ color: e }) => [x(t.$slots, "annotator-action-color", v(_({ color: e })), void 0, !0)]),
1807
+ "annotator-action-draw": w(({ mode: e }) => [x(t.$slots, "annotator-action-draw", v(_({ mode: e })), void 0, !0)]),
1808
+ "annotator-action-undo": w(({ disabled: e }) => [x(t.$slots, "annotator-action-undo", v(_({ disabled: e })), void 0, !0)]),
1809
+ "annotator-action-redo": w(({ disabled: e }) => [x(t.$slots, "annotator-action-redo", v(_({ disabled: e })), void 0, !0)]),
1810
+ "annotator-action-delete": w(({ disabled: e }) => [x(t.$slots, "annotator-action-delete", v(_({ disabled: e })), void 0, !0)]),
1811
+ _: 3
1812
+ }, 8, [
1813
+ "parent",
1814
+ "backgroundColor",
1815
+ "color",
1816
+ "active",
1817
+ "isCursorPointer"
1818
+ ])) : h("", !0)
1819
+ ], 46, ot));
1820
+ }
1821
+ }, [["__scopeId", "data-v-c47c665d"]]);
1822
+ //#endregion
1823
+ export { at as n, _t as t };