vue-data-ui 3.22.9 → 3.22.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 (216) hide show
  1. package/dist/{Arrow-DdymhUfY.js → Arrow-DKx74WtM.js} +1 -1
  2. package/dist/{BaseDraggableDialog-Av7Uxq5V.js → BaseDraggableDialog-3n8udWmh.js} +2 -2
  3. package/dist/{BaseIcon-UdRAvP2h.js → BaseIcon-CP5RWnqt.js} +1 -1
  4. package/dist/{BaseLegendToggle-DWtet-Hh.js → BaseLegendToggle-DsWphmIb.js} +1 -1
  5. package/dist/{BaseZoomControls-BY2KLqs6.js → BaseZoomControls-C9_ygNN4.js} +2 -2
  6. package/dist/{ColorPicker-DR_ummtM.js → ColorPicker-3N_HVgXs.js} +2 -2
  7. package/dist/{DataTable-BxpTMgfK.js → DataTable-DzPEVvSo.js} +2 -2
  8. package/dist/{Legend-ROt6ugzW.js → Legend-C0xAnJdO.js} +2 -2
  9. package/dist/{NonSvgPenAndPaper-B6EG_Sga.js → NonSvgPenAndPaper-B_mE5UbR.js} +3 -3
  10. package/dist/{PackageVersion-D__dRVRA.js → PackageVersion-1MNr72Bz.js} +1 -1
  11. package/dist/{PenAndPaper-DsXi7GJ-.js → PenAndPaper-CSMVXpg2.js} +3 -3
  12. package/dist/{Shape-UpH0a4Ur.js → Shape-BfnXr1nJ.js} +3 -3
  13. package/dist/Slicer-C6qNUmZ4.js +1149 -0
  14. package/dist/{SlicerPreview-CTz41lOu.js → SlicerPreview-BIdvqU32.js} +554 -553
  15. package/dist/{SparkTooltip-BTLN-Kex.js → SparkTooltip-uoUiL_P8.js} +1 -1
  16. package/dist/{Title-CcNiYzEo.js → Title-BuPs74IB.js} +1 -1
  17. package/dist/{Tooltip-CxOrWlFy.js → Tooltip-CA1rtSyl.js} +1 -1
  18. package/dist/{UserOptions-trvJ26nz.js → UserOptions-B69xBEVP.js} +6 -5
  19. package/dist/components/arrow.js +1 -1
  20. package/dist/components/vue-ui-3d-bar.js +1 -1
  21. package/dist/components/vue-ui-accordion.js +1 -1
  22. package/dist/components/vue-ui-age-pyramid.js +1 -1
  23. package/dist/components/vue-ui-annotator.js +1 -1
  24. package/dist/components/vue-ui-bullet.js +1 -1
  25. package/dist/components/vue-ui-bump.js +1 -1
  26. package/dist/components/vue-ui-candlestick.js +1 -1
  27. package/dist/components/vue-ui-carousel-table.js +1 -1
  28. package/dist/components/vue-ui-chestnut.js +1 -1
  29. package/dist/components/vue-ui-chord.js +1 -1
  30. package/dist/components/vue-ui-circle-pack.js +1 -1
  31. package/dist/components/vue-ui-cursor.js +1 -1
  32. package/dist/components/vue-ui-dag.js +1 -1
  33. package/dist/components/vue-ui-dashboard.js +1 -1
  34. package/dist/components/vue-ui-digits.js +1 -1
  35. package/dist/components/vue-ui-donut-evolution.js +1 -1
  36. package/dist/components/vue-ui-donut.js +1 -1
  37. package/dist/components/vue-ui-dumbbell.js +1 -1
  38. package/dist/components/vue-ui-flow.js +1 -1
  39. package/dist/components/vue-ui-funnel.js +1 -1
  40. package/dist/components/vue-ui-galaxy.js +1 -1
  41. package/dist/components/vue-ui-gauge.js +1 -1
  42. package/dist/components/vue-ui-geo.js +1 -1
  43. package/dist/components/vue-ui-gizmo.js +1 -1
  44. package/dist/components/vue-ui-heatmap.js +1 -1
  45. package/dist/components/vue-ui-history-plot.js +1 -1
  46. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  47. package/dist/components/vue-ui-icon.js +1 -1
  48. package/dist/components/vue-ui-kpi.js +1 -1
  49. package/dist/components/vue-ui-mini-loader.js +1 -1
  50. package/dist/components/vue-ui-molecule.js +1 -1
  51. package/dist/components/vue-ui-mood-radar.js +1 -1
  52. package/dist/components/vue-ui-nested-donuts.js +1 -1
  53. package/dist/components/vue-ui-onion.js +1 -1
  54. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  55. package/dist/components/vue-ui-quadrant.js +1 -1
  56. package/dist/components/vue-ui-quick-chart.js +1 -1
  57. package/dist/components/vue-ui-radar.js +1 -1
  58. package/dist/components/vue-ui-rating.js +1 -1
  59. package/dist/components/vue-ui-relation-circle.js +1 -1
  60. package/dist/components/vue-ui-ridgeline.js +1 -1
  61. package/dist/components/vue-ui-rings.js +1 -1
  62. package/dist/components/vue-ui-scatter.js +1 -1
  63. package/dist/components/vue-ui-skeleton.js +1 -1
  64. package/dist/components/vue-ui-smiley.js +1 -1
  65. package/dist/components/vue-ui-spark-trend.js +1 -1
  66. package/dist/components/vue-ui-sparkbar.js +1 -1
  67. package/dist/components/vue-ui-sparkgauge.js +1 -1
  68. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  69. package/dist/components/vue-ui-sparkline.js +1 -1
  70. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  71. package/dist/components/vue-ui-stackbar.js +1 -1
  72. package/dist/components/vue-ui-stackline.js +1 -1
  73. package/dist/components/vue-ui-strip-plot.js +1 -1
  74. package/dist/components/vue-ui-table-heatmap.js +1 -1
  75. package/dist/components/vue-ui-table-sparkline.js +1 -1
  76. package/dist/components/vue-ui-table.js +1 -1
  77. package/dist/components/vue-ui-thermometer.js +1 -1
  78. package/dist/components/vue-ui-timer.js +1 -1
  79. package/dist/components/vue-ui-tiremarks.js +1 -1
  80. package/dist/components/vue-ui-treemap.js +1 -1
  81. package/dist/components/vue-ui-vertical-bar.js +1 -1
  82. package/dist/components/vue-ui-waffle.js +1 -1
  83. package/dist/components/vue-ui-wheel.js +1 -1
  84. package/dist/components/vue-ui-word-cloud.js +1 -1
  85. package/dist/components/vue-ui-world.js +1 -1
  86. package/dist/components/vue-ui-xy-canvas.js +1 -1
  87. package/dist/components/vue-ui-xy.js +1 -1
  88. package/dist/{dom-to-png-BbwhsRIr.js → dom-to-png-BdAFKZQg.js} +1 -1
  89. package/dist/exposedLib-Ciw6TGtP.js +25 -0
  90. package/dist/{geoProjections-BbN7z57k.js → geoProjections-BCP_PoiB.js} +94 -94
  91. package/dist/{img-DnP3eXuv.js → img-Bikk1dGb.js} +1 -1
  92. package/dist/{labelUtils-DBEh078l.js → labelUtils-BUhssos9.js} +1 -1
  93. package/dist/{lib-JqW18y5I.js → lib-CFm_J26b.js} +121 -110
  94. package/dist/{package-ByOT60IK.js → package-Bf-Nk9qU.js} +1 -1
  95. package/dist/{pdf-hj3gzrE7.js → pdf-zmz3l2uy.js} +1 -1
  96. package/dist/{render-common-D18VrP0h.js → render-common-DEb-WjM1.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/types/vue-data-ui.d.ts +1 -0
  103. package/dist/{useAutoSizeLabelsInsideViewbox-BGnDfZdg.js → useAutoSizeLabelsInsideViewbox-C9RNjsGv.js} +4 -4
  104. package/dist/{useConfig-DYM3f6EI.js → useConfig-C0V0eG7L.js} +1 -0
  105. package/dist/{useFitSvgText-CT3nmlaS.js → useFitSvgText-CXTzBplU.js} +3 -1
  106. package/dist/{useNestedProp-DIuuzG1r.js → useNestedProp-BY6DNN3i.js} +2 -2
  107. package/dist/{useObjectBindings-CD31syQb.js → useObjectBindings-Djwpii4d.js} +1 -1
  108. package/dist/{usePrinter-CqqHmnBI.js → usePrinter-BH-xle1O.js} +2 -2
  109. package/dist/{canvas-lib-BOP_HS11.js → useResponsive-ZtArZtUf.js} +19 -1
  110. package/dist/{useSvgExport-SVIsDot8.js → useSvgExport-Ba9qBr9M.js} +6 -5
  111. package/dist/{useTableResponsive-B24Uwt2E.js → useTableResponsive-BAqJPR68.js} +2 -1
  112. package/dist/{useTimeLabels-BmBRv27Y.js → useTimeLabels-B9CEuiLZ.js} +1 -1
  113. package/dist/utils.js +26 -24
  114. package/dist/{vue-data-ui-ub3fCh6P.js → vue-data-ui-Bme9usjG.js} +68 -68
  115. package/dist/vue-data-ui.js +77 -77
  116. package/dist/vue-ui-3d-bar-Ds1BPxqb.js +1824 -0
  117. package/dist/{vue-ui-accordion-CjAGqEJg.js → vue-ui-accordion-nNxnZTg9.js} +4 -4
  118. package/dist/vue-ui-age-pyramid-CNCrH8Kd.js +1246 -0
  119. package/dist/{vue-ui-annotator-BIucnT0L.js → vue-ui-annotator-BfZ8RTzJ.js} +17 -11
  120. package/dist/vue-ui-bullet-DscMmM2b.js +709 -0
  121. package/dist/vue-ui-bump-BvwU1_-N.js +1248 -0
  122. package/dist/{vue-ui-candlestick-DULUMU-Q.js → vue-ui-candlestick-Cp6r8ktf.js} +288 -288
  123. package/dist/vue-ui-carousel-table-CbtccW1g.js +455 -0
  124. package/dist/vue-ui-chestnut-C3Hmf1-m.js +2042 -0
  125. package/dist/{vue-ui-chord-DL1M7cgL.js → vue-ui-chord-DJk9j45J.js} +45 -46
  126. package/dist/{vue-ui-circle-pack-C1Pgq6si.js → vue-ui-circle-pack-CJe2wETT.js} +50 -51
  127. package/dist/{vue-ui-cursor-d2uLAKTQ.js → vue-ui-cursor-BAi9omna.js} +6 -6
  128. package/dist/{vue-ui-dag-CVh9FpZr.js → vue-ui-dag-D7BEbS71.js} +41 -39
  129. package/dist/{vue-ui-dashboard-BH0N3ebj.js → vue-ui-dashboard-BYFQjwgC.js} +70 -70
  130. package/dist/{vue-ui-digits-R6wi3J-Y.js → vue-ui-digits-Bx8nZl9d.js} +4 -4
  131. package/dist/{vue-ui-donut-BWDeVzLc.js → vue-ui-donut-BUX4ybT6.js} +208 -208
  132. package/dist/vue-ui-donut-evolution-MWDjQPQ5.js +1521 -0
  133. package/dist/vue-ui-donut-jXRV-3ON.js +2418 -0
  134. package/dist/vue-ui-dumbbell-CnwsHaIy.js +1564 -0
  135. package/dist/{vue-ui-flow-CNczKwTh.js → vue-ui-flow-CKXGk4Lm.js} +74 -75
  136. package/dist/vue-ui-funnel-CJwD7s7e.js +781 -0
  137. package/dist/{vue-ui-galaxy-v3cTbUiM.js → vue-ui-galaxy-DL85_SWR.js} +275 -276
  138. package/dist/{vue-ui-gauge-DxvMjfoc.js → vue-ui-gauge-Dkx-aUQr.js} +177 -178
  139. package/dist/{vue-ui-geo-BgmLkZZ2.js → vue-ui-geo-fkLF1rHB.js} +28 -27
  140. package/dist/{vue-ui-gizmo-n1kmcGeE.js → vue-ui-gizmo-S8w_p769.js} +9 -9
  141. package/dist/{vue-ui-heatmap-dSTh8ah_.js → vue-ui-heatmap-Dopkbn2N.js} +330 -331
  142. package/dist/{vue-ui-history-plot-N8BqMFVU.js → vue-ui-history-plot-DDYpEapS.js} +413 -414
  143. package/dist/vue-ui-horizontal-bar-Bi8WvKeD.js +1689 -0
  144. package/dist/{vue-ui-kpi-BKrUk9o8.js → vue-ui-kpi-BeJ-ajaS.js} +4 -4
  145. package/dist/{vue-ui-mini-loader-D5we7V_W.js → vue-ui-mini-loader-D9pprk2c.js} +3 -3
  146. package/dist/vue-ui-molecule-CBTgGZ-s.js +932 -0
  147. package/dist/{vue-ui-mood-radar-CpBRHQo_.js → vue-ui-mood-radar-CF83PcCx.js} +260 -261
  148. package/dist/vue-ui-nested-donuts-D5dO-Uyg.js +1492 -0
  149. package/dist/vue-ui-onion-BxjaQKo8.js +1199 -0
  150. package/dist/vue-ui-parallel-coordinate-plot-Dz6ozRAM.js +1415 -0
  151. package/dist/vue-ui-quadrant-Bnxpa6m5.js +1985 -0
  152. package/dist/{vue-ui-quick-chart-BO98uEPl.js → vue-ui-quick-chart-CAE0-NYj.js} +112 -113
  153. package/dist/vue-ui-radar-O4BhBOyp.js +1286 -0
  154. package/dist/{vue-ui-rating-CN-ZiAES.js → vue-ui-rating-DbxK-ftN.js} +101 -101
  155. package/dist/vue-ui-relation-circle-BZ0Xf-Nc.js +923 -0
  156. package/dist/vue-ui-ridgeline-DHVTPiM6.js +1627 -0
  157. package/dist/vue-ui-rings-DAfY1V--.js +1251 -0
  158. package/dist/vue-ui-scatter-Cb63SWJT.js +2421 -0
  159. package/dist/{vue-ui-skeleton-DC2bZ0nk.js → vue-ui-skeleton-DoIqQtIV.js} +100 -100
  160. package/dist/{vue-ui-smiley-Dyyu1je3.js → vue-ui-smiley-Da2jgkb7.js} +18 -18
  161. package/dist/vue-ui-spark-trend-Db-FsXch.js +442 -0
  162. package/dist/{vue-ui-sparkbar-DhIo1qsW.js → vue-ui-sparkbar-Ce55FP_3.js} +67 -67
  163. package/dist/{vue-ui-sparkgauge-D0Fo3Hts.js → vue-ui-sparkgauge-hB59dXm7.js} +65 -65
  164. package/dist/vue-ui-sparkhistogram-DjnaStBw.js +575 -0
  165. package/dist/{vue-ui-sparkline-ApivEMBP.js → vue-ui-sparkline-D1dyhLvG.js} +54 -55
  166. package/dist/vue-ui-sparkstackbar-BhOBFjts.js +674 -0
  167. package/dist/{vue-ui-stackbar-Ds4hXATH.js → vue-ui-stackbar-BZKw8WYn.js} +123 -122
  168. package/dist/vue-ui-stackline-DLFNVbAz.js +2425 -0
  169. package/dist/{vue-ui-strip-plot-C3ZHf4bD.js → vue-ui-strip-plot-DyN2WELD.js} +68 -69
  170. package/dist/vue-ui-table-DL_R4ppI.js +1339 -0
  171. package/dist/{vue-ui-table-heatmap-CNXNXXBU.js → vue-ui-table-heatmap-C9gF__Np.js} +16 -16
  172. package/dist/{vue-ui-table-sparkline-B9JJ4pFF.js → vue-ui-table-sparkline-CT-0w9-a.js} +26 -24
  173. package/dist/vue-ui-thermometer-MP0dliC3.js +769 -0
  174. package/dist/{vue-ui-timer-5NAWw5BN.js → vue-ui-timer-B5S-6Da4.js} +7 -8
  175. package/dist/{vue-ui-tiremarks-Caz_g1c5.js → vue-ui-tiremarks-DcJiLDsm.js} +20 -21
  176. package/dist/{vue-ui-treemap-F9upPyOI.js → vue-ui-treemap-CjldCPnX.js} +615 -603
  177. package/dist/vue-ui-waffle-dZM-9z1J.js +1367 -0
  178. package/dist/{vue-ui-wheel-DD6Q39BA.js → vue-ui-wheel-or7a6-Ce.js} +47 -48
  179. package/dist/{vue-ui-word-cloud-BZLT5svo.js → vue-ui-word-cloud-8BwQ0cuB.js} +40 -37
  180. package/dist/{vue-ui-world-DbEJN5NA.js → vue-ui-world-Q0KZb7A_.js} +210 -210
  181. package/dist/{vue-ui-xy-Cn9Q8YPr.js → vue-ui-xy-4uzwZJcj.js} +141 -141
  182. package/dist/{vue-ui-xy-BYMAITk_.js → vue-ui-xy-DZIs53tH.js} +791 -783
  183. package/dist/vue-ui-xy-canvas-Dz9aii7f.js +1790 -0
  184. package/package.json +2 -2
  185. package/dist/Slicer-CW_XPIKL.js +0 -1150
  186. package/dist/exposedLib-VXFp3Z2c.js +0 -19
  187. package/dist/useResponsive-BfnK0KxU.js +0 -19
  188. package/dist/vue-ui-3d-bar-taPI41_I.js +0 -1825
  189. package/dist/vue-ui-age-pyramid-jvQZbF8E.js +0 -1247
  190. package/dist/vue-ui-bullet-CIATzlsk.js +0 -710
  191. package/dist/vue-ui-bump-D8MxltQE.js +0 -1249
  192. package/dist/vue-ui-carousel-table-BSmdexG7.js +0 -455
  193. package/dist/vue-ui-chestnut-BIh1nQ7q.js +0 -2042
  194. package/dist/vue-ui-donut-BoZdciGh.js +0 -2419
  195. package/dist/vue-ui-donut-evolution-CpC9EMro.js +0 -1522
  196. package/dist/vue-ui-dumbbell-DGA5Bfnl.js +0 -1564
  197. package/dist/vue-ui-funnel-CaD2tZCT.js +0 -782
  198. package/dist/vue-ui-horizontal-bar-CwiQxYzv.js +0 -1689
  199. package/dist/vue-ui-molecule--kK1JfnP.js +0 -931
  200. package/dist/vue-ui-nested-donuts-8Ehwcuns.js +0 -1493
  201. package/dist/vue-ui-onion-Cf6JiYTH.js +0 -1200
  202. package/dist/vue-ui-parallel-coordinate-plot-Blnqp1DB.js +0 -1416
  203. package/dist/vue-ui-quadrant-CxU0jiOm.js +0 -1984
  204. package/dist/vue-ui-radar-eH2Qih4_.js +0 -1287
  205. package/dist/vue-ui-relation-circle-BIcP-aAt.js +0 -924
  206. package/dist/vue-ui-ridgeline-ChXHzEJw.js +0 -1628
  207. package/dist/vue-ui-rings-J990vNbX.js +0 -1252
  208. package/dist/vue-ui-scatter-BeJB0EKg.js +0 -2422
  209. package/dist/vue-ui-spark-trend-CpDX85H3.js +0 -443
  210. package/dist/vue-ui-sparkhistogram-CUjFiuAh.js +0 -576
  211. package/dist/vue-ui-sparkstackbar-DsKQJx_n.js +0 -674
  212. package/dist/vue-ui-stackline-DJbcVvmN.js +0 -2425
  213. package/dist/vue-ui-table-uudidrYt.js +0 -1338
  214. package/dist/vue-ui-thermometer-Bvw3oQb3.js +0 -770
  215. package/dist/vue-ui-waffle-Bk9AsrPp.js +0 -1368
  216. package/dist/vue-ui-xy-canvas-Dcm2ftwm.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-CFm_J26b.js";
3
+ import { n as de, r as fe, t as pe } from "./useTimeLabels-B9CEuiLZ.js";
4
+ import { t as me } from "./useConfig-C0V0eG7L.js";
5
+ import { t as he } from "./usePrinter-BH-xle1O.js";
6
+ import { n as ge, t as _e } from "./BaseScanner-DZvpgOjM.js";
7
+ import { t as ve } from "./useNestedProp-BY6DNN3i.js";
8
+ import { t as ye } from "./useThemeCheck-C43Tcqmk.js";
9
+ import { t as be } from "./img-Bikk1dGb.js";
10
+ import { n as xe } from "./Title-BuPs74IB.js";
11
+ import { t as Se } from "./_plugin-vue_export-helper-B3ysoDQm.js";
12
+ import { a as f, c as p, i as Ce, l as we, n as Te, o as Ee, r as De, s as Oe, t as ke } from "./useResponsive-ZtArZtUf.js";
13
+ import { t as Ae } from "./BaseIcon-CP5RWnqt.js";
14
+ import { t as je } from "./SlicerPreview-BIdvqU32.js";
15
+ import { t as Me } from "./vue-ui-accordion-nNxnZTg9.js";
16
+ import { t as Ne } from "./BaseLegendToggle-DsWphmIb.js";
17
+ import { t as Pe } from "./useUserOptionState-DK-_1ddE.js";
18
+ import { t as Fe } from "./useChartAccessibility-DYqac8yF.js";
19
+ import { t as Ie } from "./Legend-C0xAnJdO.js";
20
+ import { t as Le } from "./vue_ui_xy_canvas-Cb6dg3eK.js";
21
+ 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";
22
+ //#region src/components/vue-ui-xy-canvas.vue
23
+ var nt = /* @__PURE__ */ e({ default: () => pt }), rt = ["id"], it = ["id"], at = {
24
+ class: "sr-only",
25
+ "aria-live": "polite",
26
+ "aria-atomic": "true"
27
+ }, ot = ["id"], st = ["aria-label", "aria-describedby"], ct = {
28
+ key: 0,
29
+ style: {
30
+ position: "absolute",
31
+ top: "100%",
32
+ left: "0",
33
+ width: "100%"
34
+ },
35
+ "data-dom-to-png-ignore": "",
36
+ "aria-hidden": "true"
37
+ }, lt = ["id"], ut = ["onClick"], dt = {
38
+ key: 4,
39
+ class: "vue-data-ui-watermark"
40
+ }, ft = ["innerHTML"], pt = /*#__PURE__*/ Se({
41
+ __name: "vue-ui-xy-canvas",
42
+ props: {
43
+ dataset: {
44
+ type: Array,
45
+ default() {
46
+ return [];
47
+ }
48
+ },
49
+ config: {
50
+ type: Object,
51
+ default() {
52
+ return {};
53
+ }
54
+ },
55
+ selectedXIndex: {
56
+ type: Number,
57
+ default: void 0
58
+ }
59
+ },
60
+ emits: [
61
+ "selectLegend",
62
+ "selectX",
63
+ "copyAlt"
64
+ ],
65
+ setup(e, { expose: Se, emit: nt }) {
66
+ let pt = Ue(() => import("./Tooltip-CA1rtSyl.js")), mt = Ue(() => import("./DataTable-DzPEVvSo.js")), ht = Ue(() => import("./UserOptions-B69xBEVP.js").then((e) => e.n)), gt = Ue(() => import("./NonSvgPenAndPaper-B_mE5UbR.js")), _t = Ue(() => import("./BaseDraggableDialog-3n8udWmh.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({
67
+ x: 0,
68
+ y: 0
69
+ }), B = m(() => Array.isArray($t.value) && $t.value.length > 0), Gt = nt, Kt = et();
70
+ Ye(() => {
71
+ Kt["chart-background"] && console.warn("VueUiXyCanvas does not support the #chart-background slot.");
72
+ });
73
+ let V = x(on()), qt = m(() => {
74
+ let e = V.value.style.chart.title.text || "XY chart", t = Y.value.end - Y.value.start;
75
+ return `${e}. ${J.value.filter((e) => !N.value.includes(e.absoluteIndex)).length} series. ${t} visible data points.`;
76
+ }), Jt = m(() => {
77
+ if (z.value === null) return "";
78
+ let e = z.value + Y.value.start;
79
+ 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) => {
80
+ let t = e.series[z.value], n = t?.value ?? t ?? null;
81
+ return `${e.name}: ${n}`;
82
+ }).join(". ")}.`;
83
+ }), Yt = m(() => V.value.userOptions.useCursorPointer), Xt = m(() => !!V.value.debug), Zt = m(() => oe({
84
+ defaultConfig: {
85
+ userOptions: { show: !1 },
86
+ table: { show: !1 },
87
+ style: { chart: {
88
+ backgroundColor: "#99999930",
89
+ grid: {
90
+ x: {
91
+ axisColor: "#6A6A6A",
92
+ timeLabels: { show: !1 },
93
+ axisName: "",
94
+ horizontalLines: { color: "#6A6A6A" }
95
+ },
96
+ y: {
97
+ axisColor: "#6A6A6A",
98
+ axisLabels: { show: !1 },
99
+ axisName: "",
100
+ verticalLines: { color: "#6A6A6A" }
101
+ },
102
+ zeroLine: { color: "#6A6A6A" }
103
+ },
104
+ legend: { backgroundColor: "#99999930" },
105
+ paddingProportions: { left: .05 },
106
+ scale: {
107
+ max: null,
108
+ min: null
109
+ },
110
+ zoom: {
111
+ endIndex: null,
112
+ startIndex: null
113
+ }
114
+ } }
115
+ },
116
+ userConfig: V.value.skeletonConfig ?? {}
117
+ })), { loading: Qt, FINAL_DATASET: $t } = ge({
118
+ ...$e(E),
119
+ FINAL_CONFIG: V,
120
+ prepareConfig: on,
121
+ skeletonDataset: E.config?.skeletonDataset ?? [{
122
+ name: "",
123
+ series: [
124
+ 0,
125
+ 1,
126
+ 2,
127
+ 3,
128
+ 5,
129
+ 8,
130
+ 13,
131
+ 21,
132
+ 34,
133
+ 55,
134
+ 89,
135
+ 134
136
+ ],
137
+ type: "line",
138
+ smooth: !0,
139
+ color: "#BABABA"
140
+ }, {
141
+ name: "",
142
+ series: [
143
+ 0,
144
+ .5,
145
+ 1,
146
+ 1.5,
147
+ 2.5,
148
+ 4,
149
+ 6.5,
150
+ 10.5,
151
+ 17,
152
+ 27.5,
153
+ 44.5,
154
+ 67
155
+ ],
156
+ type: "bar",
157
+ color: "#AAAAAA"
158
+ }],
159
+ skeletonConfig: oe({
160
+ defaultConfig: V.value,
161
+ userConfig: Zt.value
162
+ })
163
+ }), { userOptionsVisible: en, setUserOptionsVisibility: tn, keepUserOptionState: nn } = Pe({ config: V.value }), { svgRef: H } = Fe({ config: V.value.style.chart.title });
164
+ function rn() {
165
+ tn(!0);
166
+ }
167
+ function an() {
168
+ tn(!1), Gt("selectX", {
169
+ dataset: null,
170
+ index: null,
171
+ indexLabel: null
172
+ }), M.value = null;
173
+ }
174
+ function on() {
175
+ let e = ve({
176
+ userConfig: E.config,
177
+ defaultConfig: vt
178
+ }), t = {}, n = e.theme;
179
+ if (n) if (!yt.value(e)) bt(e), t = e;
180
+ else {
181
+ let r = ve({
182
+ userConfig: Le[n] || E.config,
183
+ defaultConfig: e
184
+ });
185
+ t = {
186
+ ...ve({
187
+ userConfig: E.config,
188
+ defaultConfig: r
189
+ }),
190
+ customPalette: e.customPalette.length ? e.customPalette : a[n] || c
191
+ };
192
+ }
193
+ else t = e;
194
+ 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({
195
+ defaultConfig: t.style.chart.grid.x.timeLabels,
196
+ userConfig: E.config.style.chart.grid.y.timeLabels
197
+ })), t;
198
+ }
199
+ w(() => E.config, (e) => {
200
+ 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;
201
+ }, { deep: !0 }), w(() => E.dataset, async (e) => {
202
+ !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);
203
+ }, { deep: !0 });
204
+ let sn = x(V.value.style.chart.aspectRatio), { isPrinting: cn, isImaging: ln, generatePdf: un, generateImage: dn } = he({
205
+ elementId: `xy_canvas_${D.value}`,
206
+ fileName: V.value.style.chart.title.text || "vue-ui-xy-canvas",
207
+ options: V.value.userOptions.print
208
+ }), U = x({
209
+ showTable: V.value.table.show,
210
+ showDataLabels: V.value.style.chart.dataLabels.show,
211
+ stacked: V.value.style.chart.stacked,
212
+ showTooltip: V.value.style.chart.tooltip.show
213
+ });
214
+ function fn(e) {
215
+ Ot.value = e, Dt.value += 1;
216
+ }
217
+ 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);
218
+ function hn(e) {
219
+ R.value = e, $();
220
+ }
221
+ let gn = x(0), _n = x(0);
222
+ function vn() {
223
+ if (!k.value || !V.value.style.chart.grid.x.timeLabels.show) return 0;
224
+ let e = Q.value || [], t = Y.value.start ?? 0, n = Y.value.end ?? 0;
225
+ if (!Math.max(0, n - t)) return 0;
226
+ 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}`;
227
+ k.value.save(), k.value.font = i;
228
+ let a = 0;
229
+ for (let r = t; r < n; r += 1) {
230
+ let t = e[r]?.text ?? `${r + 1}`, n = k.value.measureText(String(t));
231
+ n.width > a && (a = n.width);
232
+ }
233
+ k.value.restore();
234
+ 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;
235
+ return Math.max(0, u + c + 4);
236
+ }
237
+ function yn() {
238
+ gn.value = vn();
239
+ }
240
+ function bn() {
241
+ _n.value && cancelAnimationFrame(_n.value), _n.value = requestAnimationFrame(() => {
242
+ requestAnimationFrame(() => {
243
+ yn();
244
+ });
245
+ });
246
+ }
247
+ Je(() => {
248
+ _n.value && cancelAnimationFrame(_n.value);
249
+ });
250
+ let G = m(() => {
251
+ 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;
252
+ return {
253
+ canvasWidth: A.value,
254
+ canvasHeight: j.value,
255
+ left: A.value * V.value.style.chart.paddingProportions.left,
256
+ top: t,
257
+ right: A.value - A.value * V.value.style.chart.paddingProportions.right,
258
+ bottom: i,
259
+ width: e,
260
+ height: a,
261
+ slot: e / (Y.value.end - Y.value.start)
262
+ };
263
+ });
264
+ function xn(e, t) {
265
+ return e / t;
266
+ }
267
+ function Sn({ hasAutoScale: e, series: t, min: n, max: r, scale: i, yOffset: a, individualHeight: o, stackIndex: s = null }) {
268
+ return t.map((t, n) => {
269
+ let r = i.min < 0 ? Math.abs(i.min) : 0, c = xn(t + r, r + i.max), l, u;
270
+ e && (l = i.min, u = xn(t - l, i.max - l));
271
+ let d = 0;
272
+ return d = s === null ? G.value.bottom - G.value.height * (e ? u : c) : G.value.bottom - a - o * (e ? u : c), {
273
+ x: G.value.left + G.value.slot * n + G.value.slot / 2,
274
+ y: d,
275
+ value: t
276
+ };
277
+ });
278
+ }
279
+ let K = m(() => {
280
+ 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));
281
+ return {
282
+ absoluteMin: r,
283
+ max: t,
284
+ min: e,
285
+ scale: n,
286
+ yLabels: n.ticks.map((e) => ({
287
+ y: G.value.bottom - G.value.height * ((e + r) / (n.max + r)),
288
+ x: G.value.left - 8,
289
+ value: e
290
+ })),
291
+ zero: i
292
+ };
293
+ }), Cn = m(() => J.value.map((e) => `
294
+ <div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
295
+ <svg viewBox="0 0 10 10" height="12" width="12">
296
+ <circle cx="5" cy="5" r="5" fill="${e.color}"/>
297
+ </svg>
298
+ <span>${e.name ? e.name + ": " : ""}</span>
299
+ <span>${ae(V.value.style.chart.dataLabels.formatter, e.series[M.value] ?? "-", d({
300
+ p: e.prefix || "",
301
+ v: e.series[M.value] ?? "-",
302
+ s: e.suffix || "",
303
+ r: e.rounding || 0
304
+ }), {
305
+ datapoint: e,
306
+ seriesIndex: M.value
307
+ })}</span>
308
+ </div>
309
+ `)), wn = m(() => V.value.style.chart.line.cutNullValues), q = m(() => $t.value.map((e, t) => ({
310
+ ...e,
311
+ series: u({
312
+ data: s(e.series, [], wn.value),
313
+ threshold: V.value.downsample.threshold
314
+ }),
315
+ absoluteIndex: t,
316
+ color: le(e.color || pn.value[t] || c[t] || c[t % c.length])
317
+ }))), Tn = m(() => {
318
+ if (!V.value.style.chart.zoom.minimap.show) return [];
319
+ let e = q.value.filter((e) => !N.value.includes(e.absoluteIndex)), t = Math.max(...e.map((e) => e.series.length)), n = [];
320
+ 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));
321
+ let r = Math.min(...n);
322
+ return n.map((e) => e + (r < 0 ? Math.abs(r) : 0));
323
+ }), En = m(() => V.value.style.chart.zoom.minimap.show ? q.value.map((e) => ({
324
+ ...e,
325
+ isVisible: !N.value.includes(e.absoluteIndex)
326
+ })) : []);
327
+ w(W, (e) => {
328
+ e && kn();
329
+ });
330
+ let J = m(() => te(q.value.filter((e, t) => !N.value.includes(e.absoluteIndex))).map((e, t) => ({
331
+ ...e,
332
+ series: e.series.slice(Y.value.start, Y.value.end)
333
+ })).map((e, t) => {
334
+ 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;
335
+ n === r && (n = n >= 0 ? r - 1 : n, r = r >= 0 ? r : n + 1);
336
+ let i = {
337
+ ratios: e.series.filter((e) => ![null, void 0].includes(e)).map((e) => (e - n) / (r - n)),
338
+ valueMin: n,
339
+ valueMax: r
340
+ }, a = e.scaleSteps || V.value.style.chart.scale.ticks, o;
341
+ o = e.autoScaling ? ie(i.valueMin, i.valueMax, a) : ie(i.valueMin < 0 ? i.valueMin : 0, i.valueMax <= 0 ? 0 : i.valueMax, a);
342
+ 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;
343
+ d = e.autoScaling && U.value.stacked && r <= 0 ? G.value.bottom - s - l : G.value.bottom - s - l * (u / (o.max + u));
344
+ let ee = o.ticks.map((e, t) => ({
345
+ y: G.value.bottom - s - l * (t / (o.ticks.length - 1)),
346
+ x: G.value.left - 8,
347
+ value: e
348
+ })), te = Sn({
349
+ hasAutoScale: U.value.stacked && e.autoScaling,
350
+ series: e.series,
351
+ min: U.value.stacked ? n : K.value.min,
352
+ max: U.value.stacked ? r : K.value.max,
353
+ scale: U.value.stacked ? o : K.value.scale,
354
+ yOffset: s,
355
+ individualHeight: l,
356
+ stackIndex: U.value.stacked ? t : null
357
+ });
358
+ return {
359
+ ...e,
360
+ coordinatesLine: te,
361
+ min: n,
362
+ max: r,
363
+ localScale: o,
364
+ localZero: d,
365
+ localMin: u,
366
+ localYLabels: ee,
367
+ yOffset: s,
368
+ individualHeight: l
369
+ };
370
+ })), Y = x({
371
+ start: 0,
372
+ end: W.value
373
+ }), X = x({
374
+ start: 0,
375
+ end: W.value
376
+ }), Dn = x(null);
377
+ function On() {
378
+ return new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(() => e())));
379
+ }
380
+ Je(() => {
381
+ Dn.value && cancelAnimationFrame(Dn.value);
382
+ });
383
+ async function kn() {
384
+ Mn(), await Ge(), Dn.value && cancelAnimationFrame(Dn.value), Dn.value = requestAnimationFrame(async () => {
385
+ await On(), Mn();
386
+ });
387
+ }
388
+ let An = m(() => V.value.style.chart.zoom.preview.enable && (X.value.start !== Y.value.start || X.value.end !== Y.value.end));
389
+ function jn(e, t) {
390
+ X.value[e] = t;
391
+ }
392
+ async function Mn() {
393
+ if (!Rt.value) {
394
+ Rt.value = !0;
395
+ try {
396
+ 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);
397
+ 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));
398
+ } finally {
399
+ queueMicrotask(() => {
400
+ Bt.value = !1;
401
+ }), Rt.value = !1;
402
+ }
403
+ }
404
+ }
405
+ function Nn(e) {
406
+ Rt.value || Bt.value || e !== Y.value.start && (Y.value.start = e, X.value.start = e, In());
407
+ }
408
+ function Pn(e) {
409
+ if (Rt.value || Bt.value) return;
410
+ let t = Fn(e);
411
+ t !== Y.value.end && (Y.value.end = t, X.value.end = t, In());
412
+ }
413
+ function Fn(e) {
414
+ let t = W.value;
415
+ 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;
416
+ }
417
+ function In() {
418
+ 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));
419
+ (!Number.isFinite(t) || !Number.isFinite(n) || n <= t) && (t = 0, n = e), Y.value = {
420
+ start: t,
421
+ end: n
422
+ }, X.value.start = t, X.value.end = n, I.value && (I.value.setStartValue(t), I.value.setEndValue(n));
423
+ }
424
+ let Ln = m(() => J.value.filter((e) => [
425
+ "line",
426
+ "plot",
427
+ void 0
428
+ ].includes(e.type))), Z = m(() => J.value.filter((e) => e.type === "bar"));
429
+ function Rn() {
430
+ if (!H.value || !xt.value) return;
431
+ let e = xt.value.offsetWidth, t = xt.value.offsetHeight;
432
+ 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), $();
433
+ }
434
+ w(B, async (e) => {
435
+ if (!e) {
436
+ Et.value = null, St.value = !1, M.value = null, L.value = null;
437
+ return;
438
+ }
439
+ await Ge(), H.value && !k.value && (k.value = H.value.getContext("2d", { willReadFrequently: !0 })), P.value = !0, F.value = !0, await kn(), Rn(), $();
440
+ });
441
+ function zn() {
442
+ 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)) {
443
+ 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) => {
444
+ for (let t = 0; t < Y.value.end - Y.value.start + 1; t += 1) f(k.value, [{
445
+ x: G.value.left + G.value.slot * t,
446
+ y: G.value.bottom - e.yOffset - e.individualHeight
447
+ }, {
448
+ x: G.value.left + G.value.slot * t,
449
+ y: G.value.bottom - e.yOffset
450
+ }], { color: V.value.style.chart.grid.y.verticalLines.color });
451
+ }) : 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) => {
452
+ 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, [{
453
+ x: G.value.left + G.value.slot * (t - Y.value.start) + G.value.slot / 2,
454
+ y: G.value.bottom - e.yOffset - e.individualHeight
455
+ }, {
456
+ x: G.value.left + G.value.slot * (t - Y.value.start) + G.value.slot / 2,
457
+ y: G.value.bottom - e.yOffset
458
+ }], { color: V.value.style.chart.grid.y.verticalLines.color });
459
+ }), V.value.style.chart.grid.x.horizontalLines.show && (V.value.style.chart.grid.x.horizontalLines.alternate ? J.value.forEach((e) => {
460
+ e.localYLabels.forEach((t, n) => {
461
+ n < e.localYLabels.length - 1 && Oe(k.value, [
462
+ {
463
+ x: G.value.left,
464
+ y: t.y
465
+ },
466
+ {
467
+ x: G.value.right,
468
+ y: t.y
469
+ },
470
+ {
471
+ x: G.value.right,
472
+ y: e.localYLabels[n + 1].y
473
+ },
474
+ {
475
+ x: G.value.left,
476
+ y: e.localYLabels[n + 1].y
477
+ }
478
+ ], {
479
+ fillColor: n % 2 == 0 ? "transparent" : ue(V.value.style.chart.grid.x.horizontalLines.color, V.value.style.chart.grid.x.horizontalLines.opacity),
480
+ strokeColor: "transparent"
481
+ });
482
+ });
483
+ }) : J.value.forEach((e) => {
484
+ e.localYLabels.slice(Y.value.start, Y.value.end).forEach((e) => {
485
+ f(k.value, [{
486
+ x: G.value.left,
487
+ y: e.y
488
+ }, {
489
+ x: G.value.right,
490
+ y: e.y
491
+ }], { color: V.value.style.chart.grid.x.horizontalLines.color });
492
+ });
493
+ })), V.value.style.chart.grid.zeroLine.show && J.value.forEach((e) => {
494
+ f(k.value, [{
495
+ x: G.value.left,
496
+ y: e.localZero
497
+ }, {
498
+ x: G.value.right,
499
+ y: e.localZero
500
+ }], {
501
+ color: V.value.style.chart.grid.zeroLine.color,
502
+ lineDash: V.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
503
+ });
504
+ }), V.value.style.chart.grid.y.axisLabels.show && J.value.forEach((e) => {
505
+ f(k.value, [{
506
+ x: G.value.left,
507
+ y: G.value.bottom - e.yOffset
508
+ }, {
509
+ x: G.value.left,
510
+ y: G.value.bottom - e.yOffset - e.individualHeight
511
+ }], { color: e.color }), f(k.value, [{
512
+ x: G.value.right,
513
+ y: G.value.bottom - e.yOffset
514
+ }, {
515
+ x: G.value.right,
516
+ y: G.value.bottom - e.yOffset - e.individualHeight
517
+ }], { color: e.color });
518
+ }), J.value.forEach((e) => {
519
+ p(k.value, e.name, A.value / 35, G.value.bottom - e.yOffset - e.individualHeight / 2, {
520
+ align: "center",
521
+ rotation: -90,
522
+ color: e.color,
523
+ font: `${Math.round(A.value / 40 * V.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${V.value.style.fontFamily}`
524
+ });
525
+ });
526
+ else {
527
+ 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, [{
528
+ x: G.value.left + G.value.slot * e,
529
+ y: G.value.top
530
+ }, {
531
+ x: G.value.left + G.value.slot * e,
532
+ y: G.value.bottom
533
+ }], { color: V.value.style.chart.grid.y.verticalLines.color });
534
+ 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, [{
535
+ x: G.value.left + G.value.slot * (e - Y.value.start) + G.value.slot / 2,
536
+ y: G.value.top
537
+ }, {
538
+ x: G.value.left + G.value.slot * (e - Y.value.start) + G.value.slot / 2,
539
+ y: G.value.bottom
540
+ }], { color: V.value.style.chart.grid.y.verticalLines.color });
541
+ V.value.style.chart.grid.x.horizontalLines.show && (V.value.style.chart.grid.x.horizontalLines.alternate ? K.value.yLabels.forEach((e, t) => {
542
+ t < K.value.yLabels.length - 1 && Oe(k.value, [
543
+ {
544
+ x: G.value.left,
545
+ y: e.y
546
+ },
547
+ {
548
+ x: G.value.right,
549
+ y: e.y
550
+ },
551
+ {
552
+ x: G.value.right,
553
+ y: K.value.yLabels[t + 1].y
554
+ },
555
+ {
556
+ x: G.value.left,
557
+ y: K.value.yLabels[t + 1].y
558
+ }
559
+ ], {
560
+ fillColor: t % 2 == 0 ? "transparent" : ue(V.value.style.chart.grid.x.horizontalLines.color, V.value.style.chart.grid.x.horizontalLines.opacity),
561
+ strokeColor: "transparent"
562
+ });
563
+ }) : K.value.yLabels.forEach((e) => {
564
+ f(k.value, [{
565
+ x: G.value.left,
566
+ y: e.y
567
+ }, {
568
+ x: G.value.right,
569
+ y: e.y
570
+ }], { color: V.value.style.chart.grid.x.horizontalLines.color });
571
+ })), V.value.style.chart.grid.y.showAxis && f(k.value, [{
572
+ x: G.value.left,
573
+ y: G.value.top
574
+ }, {
575
+ x: G.value.left,
576
+ y: G.value.bottom
577
+ }], {
578
+ color: V.value.style.chart.grid.y.axisColor,
579
+ lineWidth: V.value.style.chart.grid.y.axisThickness
580
+ }), V.value.style.chart.grid.x.showAxis && f(k.value, [{
581
+ x: G.value.left,
582
+ y: G.value.bottom
583
+ }, {
584
+ x: G.value.right,
585
+ y: G.value.bottom
586
+ }], {
587
+ color: V.value.style.chart.grid.x.axisColor,
588
+ lineWidth: V.value.style.chart.grid.x.axisThickness
589
+ }), V.value.style.chart.grid.zeroLine.show && f(k.value, [{
590
+ x: G.value.left,
591
+ y: K.value.zero
592
+ }, {
593
+ x: G.value.right,
594
+ y: K.value.zero
595
+ }], {
596
+ color: V.value.style.chart.grid.zeroLine.color,
597
+ lineDash: V.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
598
+ });
599
+ }
600
+ 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, {
601
+ 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}`,
602
+ color: V.value.style.chart.color,
603
+ align: "center",
604
+ rotation: 90
605
+ }), V.value.style.chart.grid.x.axisName && p(k.value, V.value.style.chart.grid.x.axisName, A.value / 2, j.value, {
606
+ 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}`,
607
+ color: V.value.style.chart.color,
608
+ align: "center"
609
+ });
610
+ }
611
+ }
612
+ function Bn(e) {
613
+ for (let t = 0; t < e.coordinatesLine.length; t += 1) {
614
+ 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;
615
+ Te(k.value, {
616
+ x: e.coordinatesLine[t].x,
617
+ y: e.coordinatesLine[t].y
618
+ }, n, {
619
+ color: V.value.style.chart.backgroundColor,
620
+ fillStyle: e.color,
621
+ strokeColor: "transparent"
622
+ });
623
+ }
624
+ }
625
+ function Vn() {
626
+ J.value.forEach((e) => {
627
+ e.showYMarker && sr(e) && p(k.value, ae(V.value.style.chart.dataLabels.formatter, sr(e).value, d({
628
+ p: e.prefix || V.value.style.chart.grid.y.axisLabels.prefix || "",
629
+ v: sr(e).value,
630
+ s: e.suffix || V.value.style.chart.grid.y.axisLabels.suffix || "",
631
+ r: e.rounding || V.value.style.chart.grid.y.axisLabels.rounding || 0
632
+ }), {
633
+ datapoint: sr(e),
634
+ seriesIndex: null
635
+ }), G.value.left - 8 + V.value.style.chart.grid.y.axisLabels.offsetX, sr(e).y, {
636
+ align: "right",
637
+ 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}`,
638
+ color: e.color
639
+ });
640
+ });
641
+ }
642
+ function Hn() {
643
+ V.value.style.chart.grid.y.axisLabels.show && (U.value.stacked ? J.value.forEach((e) => {
644
+ e.localYLabels.forEach((t, n) => {
645
+ p(k.value, ae(V.value.style.chart.dataLabels.formatter, t.value, d({
646
+ p: e.prefix || V.value.style.chart.grid.y.axisLabels.prefix || "",
647
+ v: t.value,
648
+ s: e.suffix || V.value.style.chart.grid.y.axisLabels.suffix || "",
649
+ r: e.rounding || V.value.style.chart.grid.y.axisLabels.rounding || 0
650
+ }), {
651
+ datapoint: t,
652
+ seriesIndex: n
653
+ }), t.x + V.value.style.chart.grid.y.axisLabels.offsetX, t.y, {
654
+ align: "right",
655
+ 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}`,
656
+ color: e.color,
657
+ globalAlpha: e.showYMarker && ![null, void 0].includes(M.value ?? R.value) ? .2 : 1
658
+ });
659
+ });
660
+ }) : K.value.yLabels.forEach((e, t) => {
661
+ p(k.value, ae(V.value.style.chart.dataLabels.formatter, e.value, d({
662
+ p: V.value.style.chart.grid.y.axisLabels.prefix || "",
663
+ v: e.value,
664
+ s: V.value.style.chart.grid.y.axisLabels.suffix || "",
665
+ r: V.value.style.chart.grid.y.axisLabels.rounding || 0
666
+ }), {
667
+ datapoint: e,
668
+ seriesIndex: t
669
+ }), e.x + V.value.style.chart.grid.y.axisLabels.offsetX, e.y, {
670
+ align: "right",
671
+ 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}`,
672
+ color: V.value.style.chart.grid.y.axisLabels.color,
673
+ globalAlpha: J.value.some((e) => e.showYMarker) && ![null, void 0].includes(M.value ?? R.value) ? .2 : 1
674
+ });
675
+ }));
676
+ }
677
+ function Un(e) {
678
+ 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({
679
+ p: e.prefix || "",
680
+ v: e.coordinatesLine[t].value,
681
+ s: e.suffix || "",
682
+ r: e.rounding || 0
683
+ }), {
684
+ datapoint: e.coordinatesLine[t],
685
+ seriesIndex: t
686
+ }), e.coordinatesLine[t].x, e.coordinatesLine[t].y + V.value.style.chart.dataLabels.offsetY, {
687
+ align: "center",
688
+ font: `${V.value.style.chart.dataLabels.bold ? "bold " : ""}${Math.round(A.value / 40 * V.value.style.chart.dataLabels.fontSizeRatio)}px ${V.value.style.fontFamily}`,
689
+ color: V.value.style.chart.dataLabels.useSerieColor ? e.color : V.value.style.chart.dataLabels.color,
690
+ strokeColor: V.value.style.chart.backgroundColor,
691
+ lineWidth: .5
692
+ });
693
+ }
694
+ let Q = x([]), Wn = 0;
695
+ tt(() => {
696
+ let e = ++Wn;
697
+ (async () => {
698
+ let t = await pe({
699
+ values: V.value.style.chart.grid.x.timeLabels.values,
700
+ maxDatapoints: W.value,
701
+ formatter: V.value.style.chart.grid.x.timeLabels.datetimeFormatter,
702
+ start: 0,
703
+ end: W.value
704
+ });
705
+ e === Wn && (Q.value = t);
706
+ })();
707
+ }), tt(() => {
708
+ 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();
709
+ }, { flush: "post" });
710
+ let Gn = x({
711
+ months: [],
712
+ shortMonths: [],
713
+ days: [],
714
+ shortDays: []
715
+ }), Kn = 0;
716
+ tt(() => {
717
+ let e = ++Kn, t = V.value.style.chart.grid.x.timeLabels.datetimeFormatter;
718
+ (async () => {
719
+ let n = await fe(t.locale).catch(() => fe("en"));
720
+ e === Kn && (Gn.value = n.data);
721
+ })();
722
+ });
723
+ let qn = m(() => {
724
+ let e = V.value.style.chart.grid.x.timeLabels.datetimeFormatter, t = de({
725
+ useUTC: e.useUTC,
726
+ locale: Gn.value,
727
+ januaryAsYear: e.januaryAsYear
728
+ });
729
+ return (e, n) => {
730
+ let r = V.value.style.chart.grid.x.timeLabels.values?.[e];
731
+ return r == null ? "" : t.formatDate(new Date(r), n);
732
+ };
733
+ }), Jn = m(() => (V.value.style.chart.grid.x.timeLabels.values || []).map((e, t) => ({
734
+ text: qn.value(t, V.value.style.chart.zoom.timeFormat),
735
+ absoluteIndex: t
736
+ }))), Yn = m(() => (V.value.style.chart.grid.x.timeLabels.values || []).map((e, t) => ({
737
+ text: qn.value(t, V.value.style.chart.tooltip.timeFormat),
738
+ absoluteIndex: t
739
+ })));
740
+ function Xn() {
741
+ 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, {
742
+ align: V.value.style.chart.grid.x.timeLabels.rotation === 0 ? "center" : V.value.style.chart.grid.x.timeLabels.rotation > 0 ? "left" : "right",
743
+ 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}`,
744
+ 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,
745
+ rotation: V.value.style.chart.grid.x.timeLabels.rotation
746
+ });
747
+ }
748
+ function Zn() {
749
+ f(k.value, [{
750
+ x: G.value.left + G.value.slot * (M.value ?? R.value) + G.value.slot / 2,
751
+ y: G.value.top
752
+ }, {
753
+ x: G.value.left + G.value.slot * (M.value ?? R.value) + G.value.slot / 2,
754
+ y: G.value.bottom
755
+ }], {
756
+ color: V.value.style.chart.selector.color,
757
+ lineDash: V.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
758
+ lineWidth: 2,
759
+ linceCap: "round"
760
+ });
761
+ }
762
+ function Qn() {
763
+ L.value && f(k.value, [{
764
+ x: G.value.left,
765
+ y: L.value
766
+ }, {
767
+ x: G.value.right,
768
+ y: L.value
769
+ }], {
770
+ color: V.value.style.chart.selector.color,
771
+ lineDash: V.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
772
+ lineWidth: 2,
773
+ linceCap: "round"
774
+ });
775
+ }
776
+ function $n() {
777
+ Z.value.forEach((e, t) => {
778
+ for (let n = 0; n < e.coordinatesLine.length; n += 1) Oe(k.value, [
779
+ {
780
+ 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)),
781
+ y: U.value.stacked ? e.localZero : K.value.zero
782
+ },
783
+ {
784
+ 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),
785
+ y: U.value.stacked ? e.localZero : K.value.zero
786
+ },
787
+ {
788
+ 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),
789
+ y: e.coordinatesLine[n].y
790
+ },
791
+ {
792
+ 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)),
793
+ y: e.coordinatesLine[n].y
794
+ }
795
+ ], {
796
+ strokeColor: V.value.style.chart.backgroundColor,
797
+ gradient: {
798
+ type: "linear",
799
+ start: {
800
+ x: e.coordinatesLine[n].x,
801
+ y: e.coordinatesLine[n].y
802
+ },
803
+ end: {
804
+ x: e.coordinatesLine[n].x,
805
+ y: U.value.stacked ? e.localZero : K.value.zero
806
+ },
807
+ stops: [{
808
+ offset: 0,
809
+ color: e.color
810
+ }, {
811
+ offset: 1,
812
+ color: V.value.style.chart.bar.gradient.show ? r(e.color, .5) : e.color
813
+ }]
814
+ }
815
+ }), U.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && p(k.value, ae(V.value.style.chart.dataLabels.formatter, e.coordinatesLine[n].value, d({
816
+ p: e.prefix || "",
817
+ v: e.coordinatesLine[n].value,
818
+ s: e.suffix || "",
819
+ r: e.rounding || 0
820
+ }), {
821
+ datapoint: e.coordinatesLine[n],
822
+ seriesIndex: n
823
+ }), 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, {
824
+ align: "center",
825
+ font: `${Math.round(A.value / 40 * V.value.style.chart.dataLabels.fontSizeRatio)}px ${V.value.style.fontFamily}`,
826
+ color: V.value.style.chart.dataLabels.useSerieColor ? e.color : V.value.style.chart.dataLabels.color,
827
+ strokeColor: V.value.style.chart.backgroundColor,
828
+ lineWidth: .8
829
+ });
830
+ });
831
+ }
832
+ function er(e, t) {
833
+ let n = e.coordinatesLine.map((t, n) => e.series[n] != null && Number.isFinite(t?.y) ? t : null), r = [], i = [], a = [];
834
+ for (let e = 0; e < n.length; e += 1) {
835
+ let o = n[e];
836
+ if (o) a.push(o);
837
+ else {
838
+ if (a.length >= 2) {
839
+ let e = a[0], n = a[a.length - 1];
840
+ r.push([
841
+ {
842
+ x: e.x,
843
+ y: t
844
+ },
845
+ ...a,
846
+ {
847
+ x: n.x,
848
+ y: t
849
+ }
850
+ ]);
851
+ } else a.length === 1 && i.push(a[0]);
852
+ a = [];
853
+ }
854
+ }
855
+ if (a.length >= 2) {
856
+ let e = a[0], n = a[a.length - 1];
857
+ r.push([
858
+ {
859
+ x: e.x,
860
+ y: t
861
+ },
862
+ ...a,
863
+ {
864
+ x: n.x,
865
+ y: t
866
+ }
867
+ ]);
868
+ } else a.length === 1 && i.push(a[0]);
869
+ return {
870
+ polygons: r,
871
+ singles: i
872
+ };
873
+ }
874
+ function tr(e) {
875
+ let t = e.coordinatesLine.map((t, n) => e.series[n] != null && Number.isFinite(t?.y) ? t : null), n = [], r = [];
876
+ for (let e = 0; e < t.length; e += 1) {
877
+ let i = t[e];
878
+ i ? r.push(i) : (r.length >= 2 && n.push(r), r = []);
879
+ }
880
+ return r.length >= 2 && n.push(r), n;
881
+ }
882
+ function nr(e) {
883
+ if (wn.value) {
884
+ let t = tr(e);
885
+ for (let n of t) f(k.value, n, {
886
+ color: e.color,
887
+ lineWidth: 3
888
+ });
889
+ } else f(k.value, e.coordinatesLine, {
890
+ color: e.color,
891
+ lineWidth: 3
892
+ });
893
+ }
894
+ function rr(e) {
895
+ let t = !!wn.value;
896
+ if (e.useArea) {
897
+ let n = U.value.stacked ? e.localZero : K.value.zero;
898
+ if (t) {
899
+ let { polygons: t, singles: r } = er(e, n);
900
+ for (let n of t) Ee(k.value, n, {
901
+ fillColor: ue(e.color, V.value.style.chart.area.opacity),
902
+ strokeColor: "transparent"
903
+ });
904
+ let i = A.value / 200 * V.value.style.chart.line.plots.radiusRatio;
905
+ for (let t of r) Te(k.value, {
906
+ x: t.x,
907
+ y: t.y
908
+ }, i, {
909
+ color: V.value.style.chart.backgroundColor,
910
+ fillStyle: e.color,
911
+ strokeColor: "transparent"
912
+ });
913
+ } else {
914
+ let t = {
915
+ x: e.coordinatesLine[0].x,
916
+ y: n
917
+ }, r = {
918
+ x: e.coordinatesLine.at(-1).x,
919
+ y: n
920
+ };
921
+ Ee(k.value, [
922
+ t,
923
+ ...e.coordinatesLine,
924
+ r
925
+ ], {
926
+ fillColor: ue(e.color, V.value.style.chart.area.opacity),
927
+ strokeColor: "transparent"
928
+ });
929
+ }
930
+ nr(e);
931
+ return;
932
+ }
933
+ nr(e);
934
+ }
935
+ function ir() {
936
+ J.value.forEach((e, t) => {
937
+ f(k.value, [{
938
+ x: G.value.left,
939
+ y: G.value.bottom - e.yOffset
940
+ }, {
941
+ x: G.value.right,
942
+ y: G.value.bottom - e.yOffset
943
+ }], {
944
+ color: V.value.style.chart.grid.x.horizontalLines.color,
945
+ lineWidth: 1
946
+ });
947
+ });
948
+ }
949
+ function ar() {
950
+ 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));
951
+ Oe(k.value, [
952
+ {
953
+ x: e + l * o,
954
+ y: t
955
+ },
956
+ {
957
+ x: e + l * o + (u - l) * o,
958
+ y: t
959
+ },
960
+ {
961
+ x: e + l * o + (u - l) * o,
962
+ y: t + r
963
+ },
964
+ {
965
+ x: e + l * o,
966
+ y: t + r
967
+ }
968
+ ], {
969
+ fillColor: V.value.style.chart.zoom.preview.fill,
970
+ strokeColor: V.value.style.chart.zoom.preview.stroke,
971
+ lineDash: [
972
+ ,
973
+ ,
974
+ ,
975
+ ,
976
+ ].fill(V.value.style.chart.zoom.preview.strokeDasharray),
977
+ lineWidth: V.value.style.chart.zoom.preview.strokeWidth
978
+ });
979
+ }
980
+ function $() {
981
+ !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) => {
982
+ (e.type === "line" || !e.type) && rr(e), F.value && (Bn(e), U.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && Un(e));
983
+ }), H.value && (Et.value = De(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) => {
984
+ let t = M.value ?? R.value, n = e.coordinatesLine[t];
985
+ (e.type === "line" || !e.type || e.type === "plot") && n && Number.isFinite(n.x) && Number.isFinite(n.y) && Te(k.value, {
986
+ x: n.x,
987
+ y: n.y
988
+ }, A.value / 150 * V.value.style.chart.line.plots.radiusRatio, {
989
+ color: V.value.style.chart.backgroundColor,
990
+ fillStyle: e.color,
991
+ strokeColor: "transparent"
992
+ });
993
+ })), 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);
994
+ }
995
+ let or = Ce(() => {
996
+ F.value = !0, Rn();
997
+ }, W.value > 200 ? 10 : 1, !F.value);
998
+ function sr(e) {
999
+ if ([null, void 0].includes(M.value ?? R.value) || !e.coordinatesLine[M.value ?? R.value]) return !1;
1000
+ let { y: t, value: n } = e.coordinatesLine[M.value ?? R.value];
1001
+ return {
1002
+ y: t,
1003
+ value: n
1004
+ };
1005
+ }
1006
+ function cr(e) {
1007
+ if (!B.value || !H.value || mn.value) return;
1008
+ let { left: t, top: n } = H.value.getBoundingClientRect(), r = e.clientX - t;
1009
+ 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) {
1010
+ pr();
1011
+ return;
1012
+ }
1013
+ let i = r * 2 - G.value.left, a = Math.floor(i / G.value.slot);
1014
+ if (M.value = a, z.value = a, St.value = !0, Ht.value = !1, !F.value) return;
1015
+ let o = "", s = V.value.style.chart.tooltip.customFormat, c = J.value.map((e) => ({
1016
+ shape: e.shape || null,
1017
+ name: e.name,
1018
+ color: e.color,
1019
+ type: e.type || "line",
1020
+ value: e.series.find((e, t) => t === M.value)
1021
+ }));
1022
+ wt.value = {
1023
+ 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 : "",
1024
+ datapoint: c,
1025
+ seriesIndex: M.value,
1026
+ series: J.value,
1027
+ config: V.value
1028
+ }, _r({
1029
+ seriesIndex: M.value,
1030
+ datapoint: c
1031
+ }), ne(s) && se(() => s({
1032
+ seriesIndex: M.value,
1033
+ datapoint: c,
1034
+ series: J.value,
1035
+ config: V.value
1036
+ })) ? Ct.value = s({
1037
+ seriesIndex: M.value,
1038
+ datapoint: c,
1039
+ series: J.value,
1040
+ config: V.value
1041
+ }) : (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;
1042
+ }
1043
+ function lr(e) {
1044
+ return J.value.map((t) => ({
1045
+ shape: t.shape || null,
1046
+ name: t.name,
1047
+ color: t.color,
1048
+ type: t.type || "line",
1049
+ value: t.series.find((t, n) => n === e)
1050
+ }));
1051
+ }
1052
+ function ur(e) {
1053
+ let t = "", n = V.value.style.chart.tooltip.customFormat, r = lr(e);
1054
+ return _r({
1055
+ seriesIndex: e,
1056
+ datapoint: r
1057
+ }), ne(n) && se(() => n({
1058
+ seriesIndex: e,
1059
+ datapoint: r,
1060
+ series: J.value,
1061
+ config: V.value
1062
+ })) ? n({
1063
+ seriesIndex: e,
1064
+ datapoint: r,
1065
+ series: J.value,
1066
+ config: V.value
1067
+ }) : (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);
1068
+ }
1069
+ function dr(e) {
1070
+ if (!H.value || !G.value?.slot) return;
1071
+ 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;
1072
+ Wt.value = {
1073
+ x: t.left + i * n,
1074
+ y: t.top + a * r
1075
+ };
1076
+ }
1077
+ function fr(e, { fromKeyboard: t = !1 } = {}) {
1078
+ !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, $()));
1079
+ }
1080
+ function pr() {
1081
+ St.value = !1, M.value = null, z.value = null, Ct.value = "", L.value = null, Ht.value = !1, $();
1082
+ }
1083
+ function mr() {
1084
+ Ut.value = !0;
1085
+ }
1086
+ function hr() {
1087
+ Ut.value = !1, pr();
1088
+ }
1089
+ function gr(e) {
1090
+ if (!H.value || Rr.value || document.activeElement !== H.value) return;
1091
+ let t = e.key === "ArrowLeft", n = e.key === "ArrowRight";
1092
+ if (!t && !n) return;
1093
+ let r = Y.value.end - Y.value.start;
1094
+ if (r <= 0) return;
1095
+ e.preventDefault(), e.stopPropagation();
1096
+ let i = z.value;
1097
+ 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 });
1098
+ }
1099
+ function _r({ seriesIndex: e, datapoint: t }) {
1100
+ let n = Y.value.start + e;
1101
+ Gt("selectX", {
1102
+ dataset: t,
1103
+ index: n,
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 };