vue-data-ui 3.22.8 → 3.22.10

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