vue-data-ui 3.26.5 → 3.27.1-beta.0

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 (531) hide show
  1. package/dist/A11yDataTable-DWNlWXzs.js +1 -0
  2. package/dist/Arrow-CJeSufxg.js +1 -0
  3. package/dist/BaseDraggableDialog-T1gEsQid.js +1 -0
  4. package/dist/BaseIcon-Cz30ODFA.js +1 -0
  5. package/dist/BaseLegendToggle-Dn_tNvn4.js +1 -0
  6. package/dist/BaseScanner-8NdoBs7B.js +1 -0
  7. package/dist/BaseZoomControls-xq3tWD3j.js +1 -0
  8. package/dist/ColorPicker-CUjEw53A.js +1 -0
  9. package/dist/DataTable-DSUA5M9p.js +1 -0
  10. package/dist/DefGrad-DKMq1REY.js +1 -0
  11. package/dist/HillActions-DdvXld3a.js +1 -0
  12. package/dist/Legend-DokTll4u.js +1 -0
  13. package/dist/NonSvgPenAndPaper-BLzQuIm6.js +1 -0
  14. package/dist/PackageVersion-D6pKL176.js +1 -0
  15. package/dist/PenAndPaper-DvJJaeU2.js +1 -0
  16. package/dist/RecursiveCircles-BftI1kwF.js +1 -0
  17. package/dist/RecursiveLabels-B0d04xSj.js +1 -0
  18. package/dist/RecursiveLinks-CZtG6uWg.js +1 -0
  19. package/dist/Shape-tkp65OcG.js +1 -0
  20. package/dist/SlicerPreview-GFRs2EWB.js +1 -0
  21. package/dist/SparkTooltip-BlJLvizH.js +1 -0
  22. package/dist/Title-BRAjxtjG.js +1 -0
  23. package/dist/Tooltip-BUXB0i6z.js +1 -0
  24. package/dist/UserOptions-D65t74CM.js +1 -0
  25. package/dist/_plugin-vue_export-helper-BDNMzG2s.js +1 -0
  26. package/dist/annotationSlots-BRR85CqJ.js +1 -0
  27. package/dist/chartImage-NwZO-elv.js +1 -0
  28. package/dist/components/arrow.js +1 -2
  29. package/dist/components/vue-ui-3d-bar.js +1 -2
  30. package/dist/components/vue-ui-accordion.js +1 -2
  31. package/dist/components/vue-ui-age-pyramid.js +1 -2
  32. package/dist/components/vue-ui-annotator.js +1 -2
  33. package/dist/components/vue-ui-bullet.js +1 -2
  34. package/dist/components/vue-ui-bump.js +1 -2
  35. package/dist/components/vue-ui-candlestick.js +1 -2
  36. package/dist/components/vue-ui-carousel-table.js +1 -2
  37. package/dist/components/vue-ui-chestnut.js +1 -2
  38. package/dist/components/vue-ui-chord.js +1 -2
  39. package/dist/components/vue-ui-circle-pack.js +1 -2
  40. package/dist/components/vue-ui-cursor.js +1 -2
  41. package/dist/components/vue-ui-dag.js +1 -2
  42. package/dist/components/vue-ui-dashboard.js +1 -2
  43. package/dist/components/vue-ui-digits.js +1 -2
  44. package/dist/components/vue-ui-donut-evolution.js +1 -2
  45. package/dist/components/vue-ui-donut.js +1 -2
  46. package/dist/components/vue-ui-dumbbell.js +1 -2
  47. package/dist/components/vue-ui-flow.js +1 -2
  48. package/dist/components/vue-ui-funnel.js +1 -2
  49. package/dist/components/vue-ui-galaxy.js +1 -2
  50. package/dist/components/vue-ui-gauge.js +1 -2
  51. package/dist/components/vue-ui-geo.js +1 -2
  52. package/dist/components/vue-ui-gizmo.js +1 -2
  53. package/dist/components/vue-ui-heatmap.js +1 -2
  54. package/dist/components/vue-ui-hill.js +1 -2
  55. package/dist/components/vue-ui-history-plot.js +1 -2
  56. package/dist/components/vue-ui-horizontal-bar.js +1 -2
  57. package/dist/components/vue-ui-icon.js +1 -2
  58. package/dist/components/vue-ui-kpi.js +1 -2
  59. package/dist/components/vue-ui-label.js +1 -2
  60. package/dist/components/vue-ui-mini-loader.js +1 -2
  61. package/dist/components/vue-ui-molecule.js +1 -2
  62. package/dist/components/vue-ui-mood-radar.js +1 -2
  63. package/dist/components/vue-ui-nested-donuts.js +1 -2
  64. package/dist/components/vue-ui-onion.js +1 -2
  65. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -2
  66. package/dist/components/vue-ui-pattern-seed.js +1 -2
  67. package/dist/components/vue-ui-pattern.js +1 -2
  68. package/dist/components/vue-ui-quadrant.js +1 -2
  69. package/dist/components/vue-ui-quick-chart.js +1 -2
  70. package/dist/components/vue-ui-radar.js +1 -2
  71. package/dist/components/vue-ui-rating.js +1 -2
  72. package/dist/components/vue-ui-relation-circle.js +1 -2
  73. package/dist/components/vue-ui-ridgeline.js +1 -2
  74. package/dist/components/vue-ui-rings.js +1 -2
  75. package/dist/components/vue-ui-scatter.js +1 -2
  76. package/dist/components/vue-ui-skeleton.js +1 -2
  77. package/dist/components/vue-ui-smiley.js +1 -2
  78. package/dist/components/vue-ui-spark-trend.js +1 -2
  79. package/dist/components/vue-ui-sparkbar.js +1 -2
  80. package/dist/components/vue-ui-sparkgauge.js +1 -2
  81. package/dist/components/vue-ui-sparkhistogram.js +1 -2
  82. package/dist/components/vue-ui-sparkline.js +1 -2
  83. package/dist/components/vue-ui-sparkstackbar.js +1 -2
  84. package/dist/components/vue-ui-stackbar.js +1 -2
  85. package/dist/components/vue-ui-stackline.js +1 -2
  86. package/dist/components/vue-ui-strip-plot.js +1 -2
  87. package/dist/components/vue-ui-table-heatmap.js +1 -2
  88. package/dist/components/vue-ui-table-sparkline.js +1 -2
  89. package/dist/components/vue-ui-table.js +1 -2
  90. package/dist/components/vue-ui-thermometer.js +1 -2
  91. package/dist/components/vue-ui-timer.js +1 -2
  92. package/dist/components/vue-ui-tiremarks.js +1 -2
  93. package/dist/components/vue-ui-treemap.js +1 -2
  94. package/dist/components/vue-ui-vertical-bar.js +1 -2
  95. package/dist/components/vue-ui-waffle.js +1 -2
  96. package/dist/components/vue-ui-wheel.js +1 -2
  97. package/dist/components/vue-ui-word-cloud.js +1 -2
  98. package/dist/components/vue-ui-world.js +1 -2
  99. package/dist/components/vue-ui-xy-canvas.js +1 -2
  100. package/dist/components/vue-ui-xy.js +1 -2
  101. package/dist/composables.js +1 -5
  102. package/dist/dom-to-png-Cp3WLHmJ.js +3 -0
  103. package/dist/exposedLib-CMTeSmyW.js +1 -0
  104. package/dist/geoProjections-Bvj-eMvq.js +1 -0
  105. package/dist/img-8sM3sVWU.js +1 -0
  106. package/dist/labelUtils-Djp5nJtN.js +1 -0
  107. package/dist/lib-zDxoqrgo.js +12 -0
  108. package/dist/package-DIR2F6AE.js +1 -0
  109. package/dist/patternUtils-_q3ArM3g.js +1 -0
  110. package/dist/pdf-Dlv_ks7R.js +1 -0
  111. package/dist/render-common-DOYi0f4Z.js +1 -0
  112. package/dist/resolveChartConfig-BSo1Oe9n.js +1 -0
  113. package/dist/rolldown-runtime-DK3Fl9T5.js +1 -0
  114. package/dist/ssr/vue-ui-donut.js +1 -2
  115. package/dist/ssr/vue-ui-xy.js +1 -2
  116. package/dist/ssr.js +1 -3
  117. package/dist/style.css +1 -1
  118. package/dist/tableIntegration-CNoJ1CIY.js +1 -0
  119. package/dist/types/composables.d.ts +12 -12
  120. package/dist/types/ssr.d.ts +84 -84
  121. package/dist/types/utils.d.ts +82 -73
  122. package/dist/types/vue-data-ui.d.ts +17969 -17813
  123. package/dist/types/vue-ui-3d-bar.d.ts +24 -91
  124. package/dist/types/vue-ui-accordion.d.ts +2 -10
  125. package/dist/types/vue-ui-age-pyramid.d.ts +27 -106
  126. package/dist/types/vue-ui-annotator.d.ts +12 -88
  127. package/dist/types/vue-ui-bullet.d.ts +21 -83
  128. package/dist/types/vue-ui-bump.d.ts +23 -90
  129. package/dist/types/vue-ui-candlestick.d.ts +27 -108
  130. package/dist/types/vue-ui-carousel-table.d.ts +11 -57
  131. package/dist/types/vue-ui-chestnut.d.ts +27 -96
  132. package/dist/types/vue-ui-chord.d.ts +31 -108
  133. package/dist/types/vue-ui-circle-pack.d.ts +30 -124
  134. package/dist/types/vue-ui-cursor.d.ts +2 -8
  135. package/dist/types/vue-ui-dag.d.ts +35 -125
  136. package/dist/types/vue-ui-dashboard.d.ts +18 -66
  137. package/dist/types/vue-ui-digits.d.ts +2 -11
  138. package/dist/types/vue-ui-donut-evolution.d.ts +31 -100
  139. package/dist/types/vue-ui-donut.d.ts +31 -121
  140. package/dist/types/vue-ui-dumbbell.d.ts +24 -92
  141. package/dist/types/vue-ui-flow.d.ts +28 -104
  142. package/dist/types/vue-ui-funnel.d.ts +18 -77
  143. package/dist/types/vue-ui-galaxy.d.ts +30 -112
  144. package/dist/types/vue-ui-gauge.d.ts +22 -87
  145. package/dist/types/vue-ui-geo.d.ts +22 -92
  146. package/dist/types/vue-ui-gizmo.d.ts +5 -20
  147. package/dist/types/vue-ui-heatmap.d.ts +25 -101
  148. package/dist/types/vue-ui-hill.d.ts +22 -88
  149. package/dist/types/vue-ui-history-plot.d.ts +30 -112
  150. package/dist/types/vue-ui-horizontal-bar.d.ts +30 -114
  151. package/dist/types/vue-ui-icon.d.ts +1 -13
  152. package/dist/types/vue-ui-kpi.d.ts +5 -23
  153. package/dist/types/vue-ui-label.d.ts +11 -48
  154. package/dist/types/vue-ui-mini-loader.d.ts +4 -13
  155. package/dist/types/vue-ui-molecule.d.ts +27 -110
  156. package/dist/types/vue-ui-mood-radar.d.ts +23 -90
  157. package/dist/types/vue-ui-nested-donuts.d.ts +28 -109
  158. package/dist/types/vue-ui-onion.d.ts +26 -104
  159. package/dist/types/vue-ui-parallel-coordinate-plot.d.ts +34 -123
  160. package/dist/types/vue-ui-pattern-seed.d.ts +1 -14
  161. package/dist/types/vue-ui-pattern.d.ts +1 -13
  162. package/dist/types/vue-ui-quadrant.d.ts +33 -123
  163. package/dist/types/vue-ui-quick-chart.d.ts +30 -110
  164. package/dist/types/vue-ui-radar.d.ts +31 -114
  165. package/dist/types/vue-ui-rating.d.ts +8 -40
  166. package/dist/types/vue-ui-relation-circle.d.ts +26 -90
  167. package/dist/types/vue-ui-ridgeline.d.ts +27 -104
  168. package/dist/types/vue-ui-rings.d.ts +21 -96
  169. package/dist/types/vue-ui-scatter.d.ts +22 -95
  170. package/dist/types/vue-ui-skeleton.d.ts +2 -10
  171. package/dist/types/vue-ui-smiley.d.ts +6 -26
  172. package/dist/types/vue-ui-spark-trend.d.ts +2 -18
  173. package/dist/types/vue-ui-sparkbar.d.ts +10 -47
  174. package/dist/types/vue-ui-sparkgauge.d.ts +5 -26
  175. package/dist/types/vue-ui-sparkhistogram.d.ts +12 -44
  176. package/dist/types/vue-ui-sparkline.d.ts +16 -61
  177. package/dist/types/vue-ui-sparkstackbar.d.ts +13 -58
  178. package/dist/types/vue-ui-stackbar.d.ts +36 -120
  179. package/dist/types/vue-ui-stackline.d.ts +29 -116
  180. package/dist/types/vue-ui-strip-plot.d.ts +22 -96
  181. package/dist/types/vue-ui-table-heatmap.d.ts +14 -60
  182. package/dist/types/vue-ui-table-sparkline.d.ts +12 -51
  183. package/dist/types/vue-ui-table.d.ts +9 -36
  184. package/dist/types/vue-ui-thermometer.d.ts +14 -68
  185. package/dist/types/vue-ui-timer.d.ts +10 -47
  186. package/dist/types/vue-ui-tiremarks.d.ts +14 -68
  187. package/dist/types/vue-ui-treemap.d.ts +26 -105
  188. package/dist/types/vue-ui-vertical-bar.d.ts +8 -19
  189. package/dist/types/vue-ui-waffle.d.ts +23 -99
  190. package/dist/types/vue-ui-wheel.d.ts +14 -68
  191. package/dist/types/vue-ui-word-cloud.d.ts +20 -95
  192. package/dist/types/vue-ui-world.d.ts +22 -96
  193. package/dist/types/vue-ui-xy-canvas.d.ts +24 -101
  194. package/dist/types/vue-ui-xy.d.ts +42 -146
  195. package/dist/unpackTheme-CNsFKCeq.js +1 -0
  196. package/dist/useAutoSizeLabelsInsideViewbox-AIRF0PlD.js +1 -0
  197. package/dist/useChartAccessibility-DOMuYJfm.js +1 -0
  198. package/dist/useChartExport-DtPNpc9M.js +1 -0
  199. package/dist/useConfig-CKdzPrcf.js +1 -0
  200. package/dist/useFitSvgText-C1QC4P5G.js +1 -0
  201. package/dist/useHints-BH9r_0Vd.js +6 -0
  202. package/dist/useNestedProp-CT9phgWx.js +1 -0
  203. package/dist/useObjectBindings-DM3xDKV3.js +1 -0
  204. package/dist/usePanZoom-BdjP5Suc.js +1 -0
  205. package/dist/usePrefersMotion-XLHwega2.js +1 -0
  206. package/dist/usePrinter-CnyKPIFM.js +1 -0
  207. package/dist/useResponsive-D2CPcpda.js +1 -0
  208. package/dist/useStableElementSize-CegFbRlF.js +1 -0
  209. package/dist/useTableResponsive-uSz_qZOB.js +1 -0
  210. package/dist/useThemeCheck-BKNRbGeC.js +1 -0
  211. package/dist/useTimeLabelCollider-XQf_S7-z.js +1 -0
  212. package/dist/useTimeLabels-Das5O74F.js +1 -0
  213. package/dist/useTooltipPosition-aoV8pZZ9.js +1 -0
  214. package/dist/useTransitions-DfSHzsdz.js +1 -0
  215. package/dist/useUserOptionState-CXlFnwPv.js +1 -0
  216. package/dist/userOptionsSlots-DYuo-E5m.js +1 -0
  217. package/dist/utils.js +1 -30
  218. package/dist/vClickOutside-BxNzkY17.js +1 -0
  219. package/dist/vue-data-ui-BG41UScx.js +1 -0
  220. package/dist/vue-data-ui.js +1 -79
  221. package/dist/vue-ui-3d-bar-DiaiNy-k.js +19 -0
  222. package/dist/vue-ui-accordion-Dy5OVFKr.js +1 -0
  223. package/dist/vue-ui-age-pyramid-OeUr1yxi.js +1 -0
  224. package/dist/vue-ui-annotator-DA_xAFql.js +331 -0
  225. package/dist/vue-ui-bullet-B9lcCTVb.js +34 -0
  226. package/dist/vue-ui-bump-DYajIrva.js +10 -0
  227. package/dist/vue-ui-candlestick-CdAZuNxo.js +22 -0
  228. package/dist/vue-ui-carousel-table-ihGH0LDH.js +1 -0
  229. package/dist/vue-ui-chestnut-B2aNXFNO.js +1 -0
  230. package/dist/vue-ui-chord-fAckHfOW.js +21 -0
  231. package/dist/vue-ui-circle-pack-BWHVImkS.js +13 -0
  232. package/dist/vue-ui-cursor-DdXKXmhr.js +1 -0
  233. package/dist/vue-ui-dag-a0fNoIcJ.js +9 -0
  234. package/dist/vue-ui-dashboard-DkdYMB7n.js +1 -0
  235. package/dist/vue-ui-digits-CL9SuIEI.js +42 -0
  236. package/dist/vue-ui-donut-BaEodt-3.js +22 -0
  237. package/dist/vue-ui-donut-DaYxdQmP.js +47 -0
  238. package/dist/vue-ui-donut-evolution-T8cRXKRQ.js +2 -0
  239. package/dist/vue-ui-dumbbell-B6HJxEZp.js +9 -0
  240. package/dist/vue-ui-flow-BlTCVFr3.js +3 -0
  241. package/dist/vue-ui-funnel-WgLFJadZ.js +1 -0
  242. package/dist/vue-ui-galaxy-B3nuI6E8.js +1 -0
  243. package/dist/vue-ui-gauge-BwTP65O4.js +1 -0
  244. package/dist/vue-ui-geo-CX3yH18H.js +1 -0
  245. package/dist/vue-ui-gizmo-CNHcBsku.js +1 -0
  246. package/dist/vue-ui-heatmap-CTdeoar7.js +1 -0
  247. package/dist/vue-ui-hill-DR5k8GWZ.js +1 -0
  248. package/dist/vue-ui-history-plot-C-9uH-Uj.js +2 -0
  249. package/dist/vue-ui-horizontal-bar-qqF7pL7U.js +4 -0
  250. package/dist/vue-ui-kpi-DVcLXGqG.js +1 -0
  251. package/dist/vue-ui-label-D1Aog-zO.js +7 -0
  252. package/dist/vue-ui-mini-loader-CX0Dx9tT.js +1 -0
  253. package/dist/vue-ui-molecule-B13qVX71.js +1 -0
  254. package/dist/vue-ui-mood-radar-C1BtB8lg.js +1 -0
  255. package/dist/vue-ui-nested-donuts-B90yrlJG.js +19 -0
  256. package/dist/vue-ui-onion-UMVO2DE_.js +5 -0
  257. package/dist/vue-ui-parallel-coordinate-plot-C0ofFivm.js +9 -0
  258. package/dist/vue-ui-pattern-DrPCu32G.js +1 -0
  259. package/dist/vue-ui-pattern-seed-B8YjAAEH.js +1 -0
  260. package/dist/vue-ui-quadrant-CPG6yAiu.js +2 -0
  261. package/dist/vue-ui-quick-chart-BTPb-Iz8.js +17 -0
  262. package/dist/vue-ui-radar-Hd-pE9ih.js +1 -0
  263. package/dist/vue-ui-rating-C_YxQYa_.js +1 -0
  264. package/dist/vue-ui-relation-circle-CHYG7ZJl.js +1 -0
  265. package/dist/vue-ui-ridgeline-DS1Gvljt.js +2 -0
  266. package/dist/vue-ui-rings-B-Hb13Uu.js +1 -0
  267. package/dist/vue-ui-scatter-BTgvOmuo.js +9 -0
  268. package/dist/vue-ui-skeleton-B-Acw3CC.js +41 -0
  269. package/dist/vue-ui-smiley-Ciwqt6ek.js +1 -0
  270. package/dist/vue-ui-spark-trend-CYqy6c0S.js +1 -0
  271. package/dist/vue-ui-sparkbar-CTXIgjmP.js +1 -0
  272. package/dist/vue-ui-sparkgauge-CObOL6s2.js +1 -0
  273. package/dist/vue-ui-sparkhistogram-ClFyDez-.js +1 -0
  274. package/dist/vue-ui-sparkline-DP_nYlW8.js +1 -0
  275. package/dist/vue-ui-sparkstackbar-B2f0ePMg.js +1 -0
  276. package/dist/vue-ui-stackbar-nMWHZ-f0.js +29 -0
  277. package/dist/vue-ui-stackline-B95y6Zc5.js +39 -0
  278. package/dist/vue-ui-strip-plot-gFNC4r-X.js +2 -0
  279. package/dist/vue-ui-table-Br2JgD_L.js +14 -0
  280. package/dist/vue-ui-table-heatmap-Btu2ejF4.js +1 -0
  281. package/dist/vue-ui-table-sparkline-B9mYHAxp.js +1 -0
  282. package/dist/vue-ui-thermometer-C6u1eLfo.js +1 -0
  283. package/dist/vue-ui-timer-DLgsfB1U.js +64 -0
  284. package/dist/vue-ui-tiremarks-8B9uE1Bx.js +1 -0
  285. package/dist/vue-ui-treemap-C4Mot-Os.js +1 -0
  286. package/dist/vue-ui-waffle-BwcwNpf7.js +1 -0
  287. package/dist/vue-ui-wheel-B3OGCXg7.js +1 -0
  288. package/dist/vue-ui-word-cloud-BPIyMBXq.js +4 -0
  289. package/dist/vue-ui-world-Cp0DeauH.js +19 -0
  290. package/dist/vue-ui-xy-BOE1jvUS.js +31 -0
  291. package/dist/vue-ui-xy-DSyKSn4L.js +24 -0
  292. package/dist/vue-ui-xy-canvas-CaxxiKSa.js +9 -0
  293. package/dist/vue_ui_3d_bar-DmAve5Ri.js +1 -0
  294. package/dist/vue_ui_age_pyramid-CL0Ef8Ov.js +1 -0
  295. package/dist/vue_ui_bullet-CwVYkpjd.js +1 -0
  296. package/dist/vue_ui_bump-KJL9GYr4.js +1 -0
  297. package/dist/vue_ui_candlestick-DKvha_Ab.js +1 -0
  298. package/dist/vue_ui_chestnut-BxxivKN7.js +1 -0
  299. package/dist/vue_ui_chord-Fq6VBRT1.js +1 -0
  300. package/dist/vue_ui_circle_pack-CfXkXi7v.js +1 -0
  301. package/dist/vue_ui_dag-1b_dLSym.js +1 -0
  302. package/dist/vue_ui_donut-T5PeOqvf.js +1 -0
  303. package/dist/vue_ui_donut_evolution-nzVwNQYv.js +1 -0
  304. package/dist/vue_ui_dumbbell-BMcxK0N3.js +1 -0
  305. package/dist/vue_ui_flow-kvV56Es9.js +1 -0
  306. package/dist/vue_ui_funnel-CaEV5hG7.js +1 -0
  307. package/dist/vue_ui_galaxy-B94QInxc.js +1 -0
  308. package/dist/vue_ui_gauge-BJhb6yqE.js +1 -0
  309. package/dist/vue_ui_geo-DL1SMQHp.js +1 -0
  310. package/dist/vue_ui_heatmap-kh5NMmwf.js +1 -0
  311. package/dist/vue_ui_hill-DQi4pQCG.js +1 -0
  312. package/dist/vue_ui_history_plot-soyqUW4Y.js +1 -0
  313. package/dist/vue_ui_horizontal_bar-C4ulIxeT.js +1 -0
  314. package/dist/vue_ui_label-dtPqyFsj.js +1 -0
  315. package/dist/vue_ui_molecule-Bw1UW1Na.js +1 -0
  316. package/dist/vue_ui_mood_radar-CXaBdJnv.js +1 -0
  317. package/dist/vue_ui_nested_donuts-CRtGsJcz.js +1 -0
  318. package/dist/vue_ui_onion-C9BedU_-.js +1 -0
  319. package/dist/vue_ui_parallel_coordinate_plot-Cs_xXAG5.js +1 -0
  320. package/dist/vue_ui_quadrant-BUv-SqzP.js +1 -0
  321. package/dist/vue_ui_quick_chart-Da1GwklM.js +1 -0
  322. package/dist/vue_ui_radar-68iK9Fam.js +1 -0
  323. package/dist/vue_ui_relation_circle-Dkv-cSB6.js +1 -0
  324. package/dist/vue_ui_ridgeline-Di26JtQu.js +1 -0
  325. package/dist/vue_ui_rings-BcDDXHpQ.js +1 -0
  326. package/dist/vue_ui_scatter-C50uFYQL.js +1 -0
  327. package/dist/vue_ui_spark_trend-BOM3zo64.js +1 -0
  328. package/dist/vue_ui_sparkbar-Bpx7QrFq.js +1 -0
  329. package/dist/vue_ui_sparkgauge-D2Hk6bvS.js +1 -0
  330. package/dist/vue_ui_sparkhistogram-ChwOkoMb.js +1 -0
  331. package/dist/vue_ui_sparkline-CvL_e9L8.js +1 -0
  332. package/dist/vue_ui_sparkstackbar-Chtog7hC.js +1 -0
  333. package/dist/vue_ui_stackbar-BkBIi_bL.js +1 -0
  334. package/dist/vue_ui_stackline-D7b63K84.js +1 -0
  335. package/dist/vue_ui_strip_plot-CwMowrhT.js +1 -0
  336. package/dist/vue_ui_table_heatmap-vfeY6r97.js +1 -0
  337. package/dist/vue_ui_table_sparkline-Dlfbza49.js +1 -0
  338. package/dist/vue_ui_thermometer-CRijq6H6.js +1 -0
  339. package/dist/vue_ui_tiremarks-8HFfABNF.js +1 -0
  340. package/dist/vue_ui_treemap-Bv4Rdl5_.js +1 -0
  341. package/dist/vue_ui_vertical_bar-BLyflvlz.js +1 -0
  342. package/dist/vue_ui_waffle-BbBLSluB.js +1 -0
  343. package/dist/vue_ui_wheel-C-479bvJ.js +1 -0
  344. package/dist/vue_ui_word_cloud-DBiJtSyL.js +1 -0
  345. package/dist/vue_ui_xy-CJBM9F6W.js +1 -0
  346. package/dist/vue_ui_xy_canvas-CT-FN9rU.js +1 -0
  347. package/package.json +2 -2
  348. package/dist/A11yDataTable-DdRsVULz.js +0 -45
  349. package/dist/Arrow-BQbcOtfC.js +0 -116
  350. package/dist/BaseDraggableDialog-BCFCiP_6.js +0 -272
  351. package/dist/BaseIcon-CIK6Sqo3.js +0 -484
  352. package/dist/BaseLegendToggle-Doa5rYP2.js +0 -56
  353. package/dist/BaseScanner-Dzc8VT3j.js +0 -30
  354. package/dist/BaseZoomControls-BGQM8B5F.js +0 -111
  355. package/dist/ColorPicker-Cb7qpvFt.js +0 -257
  356. package/dist/DataTable-B6LDCXBz.js +0 -150
  357. package/dist/DefGrad-DVBqDjhO.js +0 -48
  358. package/dist/HillActions-CwdgCb7Q.js +0 -187
  359. package/dist/Legend-D9FGXIbQ.js +0 -156
  360. package/dist/NonSvgPenAndPaper-9T4MSwXC.js +0 -577
  361. package/dist/PackageVersion-CslTvFsC.js +0 -12
  362. package/dist/PenAndPaper-C1EcBgJW.js +0 -906
  363. package/dist/RecursiveCircles-D6aDPmoe.js +0 -117
  364. package/dist/RecursiveLabels-D9rfID6q.js +0 -56
  365. package/dist/RecursiveLinks-BygcpDiT.js +0 -78
  366. package/dist/Shape-BZgQLgu5.js +0 -143
  367. package/dist/SlicerPreview-DyYv_G-_.js +0 -1730
  368. package/dist/SparkTooltip-D4cRlyuq.js +0 -93
  369. package/dist/Title-Bd98RysU.js +0 -87
  370. package/dist/Tooltip-DmQeI5WE.js +0 -312
  371. package/dist/UserOptions-B_yBcZ1-.js +0 -1412
  372. package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
  373. package/dist/dom-to-png-B_RJohlM.js +0 -237
  374. package/dist/exposedLib-C-JlvWAt.js +0 -28
  375. package/dist/geoProjections-BYthUA8l.js +0 -302
  376. package/dist/img-KURaWjZI.js +0 -129
  377. package/dist/labelUtils-DShv2Mbg.js +0 -19
  378. package/dist/lib-TWIH5fGr.js +0 -2152
  379. package/dist/package-DbTqd5lc.js +0 -4
  380. package/dist/patternUtils-CS7hn6at.js +0 -258
  381. package/dist/pdf-CLl24Afl.js +0 -90
  382. package/dist/render-common-CKv-jztN.js +0 -152
  383. package/dist/rolldown-runtime-Dy4uBu1J.js +0 -11
  384. package/dist/useAutoSizeLabelsInsideViewbox-DvDwcwi_.js +0 -122
  385. package/dist/useChartAccessibility-DYqac8yF.js +0 -12
  386. package/dist/useChartExport-iwOqiIWX.js +0 -803
  387. package/dist/useConfig-DObkR9Aa.js +0 -8008
  388. package/dist/useFitSvgText-CXTzBplU.js +0 -65
  389. package/dist/useHints-Dq_w2E8B.js +0 -66
  390. package/dist/useNestedProp-BxOdWM0c.js +0 -12
  391. package/dist/useObjectBindings-CPmyIJxB.js +0 -191
  392. package/dist/usePanZoom-CYU3B4T3.js +0 -157
  393. package/dist/usePrefersMotion-BC-CsqR1.js +0 -15
  394. package/dist/usePrinter-8Y1Rju0Y.js +0 -49
  395. package/dist/useResponsive-ZtArZtUf.js +0 -97
  396. package/dist/useStableElementSize-C7KADDKj.js +0 -77
  397. package/dist/useTableResponsive-BAqJPR68.js +0 -25
  398. package/dist/useThemeCheck-C43Tcqmk.js +0 -24
  399. package/dist/useTimeLabelCollider-AEcY4Ioe.js +0 -57
  400. package/dist/useTimeLabels-d2f-W1L4.js +0 -270
  401. package/dist/useTooltipPosition-BCrtQa9H.js +0 -189
  402. package/dist/useTransitions-g_zBREk2.js +0 -39
  403. package/dist/useUserOptionState-DK-_1ddE.js +0 -15
  404. package/dist/vClickOutside-DUrZWttG.js +0 -13
  405. package/dist/vue-data-ui-C3G5Zdl5.js +0 -191
  406. package/dist/vue-ui-3d-bar-Cl6-fBV8.js +0 -1831
  407. package/dist/vue-ui-accordion-AyyZDab3.js +0 -81
  408. package/dist/vue-ui-age-pyramid-DOtWAL8s.js +0 -1305
  409. package/dist/vue-ui-annotator-BCVjlojM.js +0 -3325
  410. package/dist/vue-ui-bullet-B_1Ctjvq.js +0 -702
  411. package/dist/vue-ui-bump-kOK6x4al.js +0 -1242
  412. package/dist/vue-ui-candlestick-KvhjbAxt.js +0 -2144
  413. package/dist/vue-ui-carousel-table-ArMiO0cG.js +0 -467
  414. package/dist/vue-ui-chestnut-DSM0U27X.js +0 -2016
  415. package/dist/vue-ui-chord-64akfaem.js +0 -1347
  416. package/dist/vue-ui-circle-pack-CaR_aNEh.js +0 -1647
  417. package/dist/vue-ui-cursor-DCgqYZiz.js +0 -283
  418. package/dist/vue-ui-dag-8uKK0Rlp.js +0 -2931
  419. package/dist/vue-ui-dashboard-DeccYtSY.js +0 -522
  420. package/dist/vue-ui-digits-BvK7bVuJ.js +0 -217
  421. package/dist/vue-ui-donut-8joMj08Z.js +0 -974
  422. package/dist/vue-ui-donut-CvbfzzdT.js +0 -2427
  423. package/dist/vue-ui-donut-evolution-DgITf95R.js +0 -1869
  424. package/dist/vue-ui-dumbbell-U2L4ZYhB.js +0 -1533
  425. package/dist/vue-ui-flow-DD20fJu_.js +0 -1229
  426. package/dist/vue-ui-funnel-Cx8hVlZV.js +0 -749
  427. package/dist/vue-ui-galaxy-VZFZnHPv.js +0 -1097
  428. package/dist/vue-ui-gauge-Copa7G58.js +0 -934
  429. package/dist/vue-ui-geo-DeDQ6ubl.js +0 -1495
  430. package/dist/vue-ui-gizmo-D5oUKIsP.js +0 -238
  431. package/dist/vue-ui-heatmap-BukWtNsd.js +0 -1613
  432. package/dist/vue-ui-hill-DONFacXR.js +0 -1747
  433. package/dist/vue-ui-history-plot-BMy_y9S6.js +0 -1710
  434. package/dist/vue-ui-horizontal-bar-bcPSs999.js +0 -1723
  435. package/dist/vue-ui-kpi-Bol0OWs3.js +0 -104
  436. package/dist/vue-ui-label-cwjXaEDQ.js +0 -1451
  437. package/dist/vue-ui-mini-loader-kdpasmXb.js +0 -133
  438. package/dist/vue-ui-molecule-BiAI5lbh.js +0 -941
  439. package/dist/vue-ui-mood-radar-f4xXkiBs.js +0 -1111
  440. package/dist/vue-ui-nested-donuts-ZmGGEvRk.js +0 -1515
  441. package/dist/vue-ui-onion-D6IKPpL-.js +0 -1247
  442. package/dist/vue-ui-parallel-coordinate-plot-BbfModz3.js +0 -1444
  443. package/dist/vue-ui-pattern-DKozfnVn.js +0 -154
  444. package/dist/vue-ui-pattern-seed-BB1honLm.js +0 -61
  445. package/dist/vue-ui-quadrant-CueHa1Pm.js +0 -1979
  446. package/dist/vue-ui-quick-chart-C8ZxX1Zw.js +0 -2775
  447. package/dist/vue-ui-radar-BcD7Zqvb.js +0 -1386
  448. package/dist/vue-ui-rating-V_OnJN9Y.js +0 -359
  449. package/dist/vue-ui-relation-circle-DlN4r83K.js +0 -905
  450. package/dist/vue-ui-ridgeline-BlQnTWXi.js +0 -1630
  451. package/dist/vue-ui-rings-Bf9IKwDr.js +0 -1264
  452. package/dist/vue-ui-scatter-arPbS9MH.js +0 -2418
  453. package/dist/vue-ui-skeleton-dyXWT6JX.js +0 -2567
  454. package/dist/vue-ui-smiley-w6nH1I0E.js +0 -376
  455. package/dist/vue-ui-spark-trend-Bso9bwmY.js +0 -457
  456. package/dist/vue-ui-sparkbar-CL06Yt56.js +0 -401
  457. package/dist/vue-ui-sparkgauge-BHDM5Hbr.js +0 -268
  458. package/dist/vue-ui-sparkhistogram-3Tw8PEms.js +0 -589
  459. package/dist/vue-ui-sparkline-znaswFQj.js +0 -2067
  460. package/dist/vue-ui-sparkstackbar-BOzVoWoa.js +0 -750
  461. package/dist/vue-ui-stackbar-BTOvMsP8.js +0 -2755
  462. package/dist/vue-ui-stackline-qcLrNL09.js +0 -2829
  463. package/dist/vue-ui-strip-plot-BLNaCPm8.js +0 -1752
  464. package/dist/vue-ui-table-D295mJIf.js +0 -1352
  465. package/dist/vue-ui-table-heatmap-CXeMKqKz.js +0 -363
  466. package/dist/vue-ui-table-sparkline-BYuwQrwA.js +0 -738
  467. package/dist/vue-ui-thermometer-BwJ0oF-H.js +0 -758
  468. package/dist/vue-ui-timer-BULpjYiI.js +0 -451
  469. package/dist/vue-ui-tiremarks-B7bTeU8h.js +0 -540
  470. package/dist/vue-ui-treemap-DkqDz9W4.js +0 -1745
  471. package/dist/vue-ui-waffle-Cn7WBzqh.js +0 -1633
  472. package/dist/vue-ui-wheel-Cy7kBvEx.js +0 -873
  473. package/dist/vue-ui-word-cloud-tRqc2ZMR.js +0 -1723
  474. package/dist/vue-ui-world-B755-zji.js +0 -3021
  475. package/dist/vue-ui-xy-BiHIJ7rK.js +0 -1387
  476. package/dist/vue-ui-xy-DWYTZz_v.js +0 -5777
  477. package/dist/vue-ui-xy-canvas-DGuMC_Rf.js +0 -2151
  478. package/dist/vue_ui_3d_bar-C4R7o-yX.js +0 -185
  479. package/dist/vue_ui_age_pyramid-B2R66DgQ.js +0 -310
  480. package/dist/vue_ui_bullet-ClzdLoOv.js +0 -186
  481. package/dist/vue_ui_bump-Vl-zYAtG.js +0 -201
  482. package/dist/vue_ui_candlestick-BXSQY82k.js +0 -461
  483. package/dist/vue_ui_chestnut-D2oUhad6.js +0 -305
  484. package/dist/vue_ui_chord-DPfS1Umc.js +0 -275
  485. package/dist/vue_ui_circle_pack-DZC_rdfn.js +0 -172
  486. package/dist/vue_ui_dag-TsJ_azQq.js +0 -258
  487. package/dist/vue_ui_donut-BDGqG07h.js +0 -358
  488. package/dist/vue_ui_donut_evolution-C6951a2f.js +0 -745
  489. package/dist/vue_ui_dumbbell-Bfe_jFyi.js +0 -304
  490. package/dist/vue_ui_flow-BewZjjKG.js +0 -238
  491. package/dist/vue_ui_funnel-_Og4EEkO.js +0 -234
  492. package/dist/vue_ui_galaxy-Ig0cc1_h.js +0 -265
  493. package/dist/vue_ui_gauge-Cf1RZc9q.js +0 -178
  494. package/dist/vue_ui_geo-B8TODs-G.js +0 -248
  495. package/dist/vue_ui_heatmap-B2BBBSWG.js +0 -319
  496. package/dist/vue_ui_hill-dnltu0L-.js +0 -368
  497. package/dist/vue_ui_history_plot-CuN63VEc.js +0 -413
  498. package/dist/vue_ui_horizontal_bar-C4J4QzXf.js +0 -341
  499. package/dist/vue_ui_label-B0QoxQrJ.js +0 -115
  500. package/dist/vue_ui_molecule-CO9L59SF.js +0 -231
  501. package/dist/vue_ui_mood_radar-BA6LAKhk.js +0 -281
  502. package/dist/vue_ui_nested_donuts-B8csIoVO.js +0 -273
  503. package/dist/vue_ui_onion-1FTFFS46.js +0 -293
  504. package/dist/vue_ui_parallel_coordinate_plot-CBiOBira.js +0 -278
  505. package/dist/vue_ui_quadrant-CDSTKTJz.js +0 -428
  506. package/dist/vue_ui_quick_chart-DByCqSYE.js +0 -180
  507. package/dist/vue_ui_radar-jafTED5j.js +0 -306
  508. package/dist/vue_ui_relation_circle-D0p4mXmv.js +0 -98
  509. package/dist/vue_ui_ridgeline-VM8_mx4J.js +0 -767
  510. package/dist/vue_ui_rings-BVgD2aMn.js +0 -320
  511. package/dist/vue_ui_scatter-I0POnicu.js +0 -479
  512. package/dist/vue_ui_spark_trend-DxVmpkmC.js +0 -82
  513. package/dist/vue_ui_sparkbar-z6qO--Kf.js +0 -64
  514. package/dist/vue_ui_sparkgauge-BX1MS3bA.js +0 -90
  515. package/dist/vue_ui_sparkhistogram-BRgvKUH6.js +0 -123
  516. package/dist/vue_ui_sparkline-b9pEUyGF.js +0 -183
  517. package/dist/vue_ui_sparkstackbar-BOjuQnZd.js +0 -175
  518. package/dist/vue_ui_stackbar-DdjDL6aq.js +0 -491
  519. package/dist/vue_ui_stackline-Bh0RuInt.js +0 -539
  520. package/dist/vue_ui_strip_plot-BaHbnnwN.js +0 -308
  521. package/dist/vue_ui_table_heatmap-w8vx5k6f.js +0 -80
  522. package/dist/vue_ui_table_sparkline-DAbkUrNz.js +0 -124
  523. package/dist/vue_ui_thermometer-DxgqWKlE.js +0 -123
  524. package/dist/vue_ui_tiremarks-CdEPieWV.js +0 -122
  525. package/dist/vue_ui_treemap-DoEtkRN6.js +0 -328
  526. package/dist/vue_ui_vertical_bar-CP-MKz1j.js +0 -247
  527. package/dist/vue_ui_waffle-DE_DiSVP.js +0 -299
  528. package/dist/vue_ui_wheel-DZ_nR--t.js +0 -133
  529. package/dist/vue_ui_word_cloud-C-qIMNLu.js +0 -254
  530. package/dist/vue_ui_xy-CcJADijP.js +0 -614
  531. package/dist/vue_ui_xy_canvas-DrNSzYWq.js +0 -487
@@ -1,2151 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { $ as t, $t as n, Ct as r, D as i, Et as a, Gt as o, Pt as s, Rt as ee, S as c, Vt as l, X as te, _ as ne, at as re, et as ie, ft as ae, gt as oe, i as se, jt as ce, nt as le, o as ue, qt as de, tn as fe, w as pe } from "./lib-TWIH5fGr.js";
3
- import { n as me, t as he } from "./useHints-Dq_w2E8B.js";
4
- import { n as ge, r as _e, t as ve } from "./useTimeLabels-d2f-W1L4.js";
5
- import { t as ye } from "./useConfig-DObkR9Aa.js";
6
- import { t as be } from "./usePrinter-8Y1Rju0Y.js";
7
- import { n as xe, t as Se } from "./BaseScanner-Dzc8VT3j.js";
8
- import { t as Ce } from "./useNestedProp-BxOdWM0c.js";
9
- import { t as we } from "./useThemeCheck-C43Tcqmk.js";
10
- import { t as Te } from "./img-KURaWjZI.js";
11
- import { n as Ee } from "./Title-Bd98RysU.js";
12
- import { t as De } from "./_plugin-vue_export-helper-B3ysoDQm.js";
13
- import { a as u, c as Oe, i as ke, l as Ae, n as je, o as Me, r as Ne, s as Pe, t as Fe } from "./useResponsive-ZtArZtUf.js";
14
- import { t as Ie } from "./BaseIcon-CIK6Sqo3.js";
15
- import { t as Le } from "./SlicerPreview-DyYv_G-_.js";
16
- import { t as Re } from "./vue-ui-accordion-AyyZDab3.js";
17
- import { t as ze } from "./BaseLegendToggle-Doa5rYP2.js";
18
- import { t as Be } from "./useUserOptionState-DK-_1ddE.js";
19
- import { t as Ve } from "./useChartAccessibility-DYqac8yF.js";
20
- import { t as He } from "./Legend-D9FGXIbQ.js";
21
- import { t as Ue } from "./vue_ui_xy_canvas-DrNSzYWq.js";
22
- import { Teleport as We, computed as d, createBlock as Ge, createCommentVNode as f, createElementBlock as Ke, createElementVNode as p, createSlots as qe, createTextVNode as Je, createVNode as Ye, defineAsyncComponent as Xe, guardReactiveProps as m, mergeProps as Ze, nextTick as Qe, normalizeClass as $e, normalizeProps as h, normalizeStyle as et, onBeforeUnmount as tt, onMounted as nt, openBlock as g, ref as _, renderSlot as v, resolveDynamicComponent as rt, shallowRef as it, toDisplayString as at, toRefs as ot, unref as y, useSlots as st, watch as b, watchEffect as ct, withCtx as x } from "vue";
23
- //#region src/components/vue-ui-xy-canvas.vue
24
- var lt = /* @__PURE__ */ e({ default: () => Ct }), ut = ["id"], dt = ["id"], ft = {
25
- class: "sr-only",
26
- "aria-live": "polite",
27
- "aria-atomic": "true"
28
- }, pt = ["id"], mt = ["aria-label", "aria-describedby"], ht = ["viewBox"], gt = [
29
- "x",
30
- "y",
31
- "width",
32
- "height",
33
- "fill",
34
- "fill-opacity",
35
- "stroke",
36
- "stroke-opacity",
37
- "stroke-width",
38
- "stroke-dasharray"
39
- ], _t = {
40
- key: 1,
41
- style: {
42
- position: "absolute",
43
- top: "100%",
44
- left: "0",
45
- width: "100%"
46
- },
47
- "data-dom-to-png-ignore": "",
48
- "aria-hidden": "true"
49
- }, vt = ["id"], yt = ["onClick"], bt = {
50
- key: 4,
51
- class: "vue-data-ui-watermark"
52
- }, xt = { key: 0 }, St = { key: 1 }, Ct = /*#__PURE__*/ De({
53
- __name: "vue-ui-xy-canvas",
54
- props: {
55
- dataset: {
56
- type: Array,
57
- default() {
58
- return [];
59
- }
60
- },
61
- config: {
62
- type: Object,
63
- default() {
64
- return {};
65
- }
66
- },
67
- selectedXIndex: {
68
- type: Number,
69
- default: void 0
70
- },
71
- zoomState: {
72
- type: Object,
73
- default: null
74
- }
75
- },
76
- emits: [
77
- "selectLegend",
78
- "selectX",
79
- "zoomStart",
80
- "zoomEnd",
81
- "zoomReset",
82
- "update:zoomState",
83
- "copyAlt"
84
- ],
85
- setup(e, { expose: De, emit: lt }) {
86
- let Ct = Xe(() => import("./Tooltip-DmQeI5WE.js")), wt = Xe(() => import("./DataTable-B6LDCXBz.js")), Tt = Xe(() => import("./UserOptions-B_yBcZ1-.js").then((e) => e.n)), Et = Xe(() => import("./NonSvgPenAndPaper-9T4MSwXC.js")), Dt = Xe(() => import("./BaseDraggableDialog-BCFCiP_6.js").then((e) => e.n)), { vue_ui_xy_canvas: Ot } = ye(), { isThemeValid: kt, warnInvalidTheme: At } = we(), S = e, jt = _(te()), Mt = _(null), Nt = _(null), C = _(null), w = _(1), Pt = _(1), Ft = _(!1), T = _(null), It = _(""), Lt = _(null), E = _([]), Rt = _(1), D = _(!0), O = _(!0), zt = _(null), Bt = _(0), Vt = _(!1), Ht = _(null), Ut = _(null), Wt = _(null), Gt = _(null), Kt = _(0), qt = _(0), Jt = _(0), k = _(null), Yt = _(!1), Xt = _(null), Zt = _(null), Qt = _(!1), $t = _(!1), en = _(!1), A = _(null), tn = _(!1), nn = _(!1), rn = _(!1), j = _(null), an = _({
87
- x: 0,
88
- y: 0
89
- }), M = d(() => Array.isArray(mn.value) && mn.value.length > 0), N = lt, on = st(), P = _(bn()), F = d(() => P.value.userOptions), I = d(() => P.value.style.chart.tooltip), L = d(() => P.value.style.chart.grid.y.verticalLines), sn = d(() => P.value.style.chart.grid.x.horizontalLines), R = d(() => P.value.style.chart.grid.y.axisLabels), z = d(() => P.value.style.chart.grid.x.timeLabels), B = d(() => P.value.style.chart.grid), V = d(() => P.value.style.chart.dataLabels), H = d(() => P.value.style.chart);
90
- me({
91
- config: () => P.value,
92
- dataset: () => S.dataset,
93
- component: "VueUiXyCanvas",
94
- rules: [
95
- he.emptyArray,
96
- {
97
- test: (e) => e.every((e) => e.series.length < 300),
98
- message: [
99
- "👀 Series have < 300 datapoints. Consider:",
100
- "",
101
- "▶️ Using VueUiXy instead, if you need more options, or more customization possibilities."
102
- ]
103
- },
104
- {
105
- test: (e) => e.some((e) => e.series.length > 1e4),
106
- message: [
107
- "👀 The dataset has > 10_000 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.",
108
- "",
109
- "▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance can be impacted. JS runtime might crash with > 100_000 datapoints."
110
- ]
111
- }
112
- ]
113
- });
114
- let cn = d(() => {
115
- let e = H.value.title.text || "XY chart", t = X.value.end - X.value.start;
116
- return `${e}. ${Y.value.filter((e) => !E.value.includes(e.absoluteIndex)).length} series. ${t} visible data points.`;
117
- }), ln = d(() => {
118
- if (j.value === null) return "";
119
- let e = j.value + X.value.start;
120
- return `${z.value.values.slice(X.value.start, X.value.end)[j.value] ? I.value.useDefaultTimeFormat ? $.value.slice(X.value.start, X.value.end)[j.value]?.text : kr.value[j.value]?.text : $.value[e]?.text ?? `Point ${e + 1}`}. ${Y.value.filter((e) => !E.value.includes(e.absoluteIndex)).map((e) => {
121
- let t = e.series[j.value], n = t?.value ?? t ?? null;
122
- return `${e.name}: ${n}`;
123
- }).join(". ")}.`;
124
- }), un = d(() => F.value.useCursorPointer), dn = d(() => P.value.debug);
125
- nt(() => {
126
- on["chart-background"] && dn.value && console.warn("VueUiXyCanvas does not support the #chart-background slot.");
127
- });
128
- let fn = d(() => fe({
129
- defaultConfig: {
130
- userOptions: { show: !1 },
131
- table: { show: !1 },
132
- style: { chart: {
133
- backgroundColor: "#99999930",
134
- grid: {
135
- x: {
136
- axisColor: "#6A6A6A",
137
- timeLabels: { show: !1 },
138
- axisName: "",
139
- horizontalLines: { color: "#6A6A6A" }
140
- },
141
- y: {
142
- axisColor: "#6A6A6A",
143
- axisLabels: { show: !1 },
144
- axisName: "",
145
- verticalLines: { color: "#6A6A6A" }
146
- },
147
- zeroLine: { color: "#6A6A6A" }
148
- },
149
- legend: { backgroundColor: "#99999930" },
150
- paddingProportions: { left: .05 },
151
- scale: {
152
- max: null,
153
- min: null
154
- },
155
- zoom: {
156
- endIndex: null,
157
- startIndex: null
158
- }
159
- } }
160
- },
161
- userConfig: P.value.skeletonConfig ?? {}
162
- })), { loading: pn, FINAL_DATASET: mn } = xe({
163
- ...ot(S),
164
- FINAL_CONFIG: P,
165
- prepareConfig: bn,
166
- skeletonDataset: S.config?.skeletonDataset ?? [{
167
- name: "",
168
- series: [
169
- 0,
170
- 1,
171
- 2,
172
- 3,
173
- 5,
174
- 8,
175
- 13,
176
- 21,
177
- 34,
178
- 55,
179
- 89,
180
- 134
181
- ],
182
- type: "line",
183
- smooth: !0,
184
- color: "#BABABA"
185
- }, {
186
- name: "",
187
- series: [
188
- 0,
189
- .5,
190
- 1,
191
- 1.5,
192
- 2.5,
193
- 4,
194
- 6.5,
195
- 10.5,
196
- 17,
197
- 27.5,
198
- 44.5,
199
- 67
200
- ],
201
- type: "bar",
202
- color: "#AAAAAA"
203
- }],
204
- skeletonConfig: fe({
205
- defaultConfig: P.value,
206
- userConfig: fn.value
207
- })
208
- }), { userOptionsVisible: hn, setUserOptionsVisibility: gn, keepUserOptionState: _n } = Be({ config: P.value }), { svgRef: U } = Ve({ config: H.value.title });
209
- function vn() {
210
- gn(!0);
211
- }
212
- function yn() {
213
- gn(!1), N("selectX", {
214
- dataset: null,
215
- index: null,
216
- indexLabel: null
217
- }), T.value = null;
218
- }
219
- function bn() {
220
- let e = Ce({
221
- userConfig: S.config,
222
- defaultConfig: Ot
223
- }), t = {}, i = e.theme;
224
- if (i) {
225
- if (!kt.value(e)) At(e), t = e;
226
- else {
227
- let r = Ce({
228
- userConfig: Ue[i] || S.config,
229
- defaultConfig: e
230
- });
231
- t = {
232
- ...Ce({
233
- userConfig: S.config,
234
- defaultConfig: r
235
- }),
236
- customPalette: e.customPalette.length ? e.customPalette : n[i] || l
237
- };
238
- }
239
- } else t = e;
240
- return S.config && r(S.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 = Ce({
241
- defaultConfig: t.style.chart.grid.x.timeLabels,
242
- userConfig: S.config.style.chart.grid.y.timeLabels
243
- })), t;
244
- }
245
- function xn(e) {
246
- let t = ie(e);
247
- return t?.style?.chart && delete t.style.chart.tooltip, JSON.stringify(t);
248
- }
249
- let Sn = xn(S.config);
250
- b(() => S.config, (e, t) => {
251
- let n = xn(e), r = n !== Sn;
252
- Sn = n;
253
- let i = bn();
254
- if (!r) {
255
- P.value.style.chart.tooltip = i.style.chart.tooltip, W.value.showTooltip = P.value.style.chart.tooltip.show;
256
- return;
257
- }
258
- pn.value || (P.value = i), hn.value = !F.value.showOnChartHover, Ci(), Kt.value += 1, qt.value += 1, Jt.value += 1, W.value.showTable = P.value.table.show, W.value.showDataLabels = V.value.show, W.value.stacked = H.value.stacked, W.value.showTooltip = I.value.show;
259
- }, { deep: !0 }), b(() => S.dataset, async (e) => {
260
- Array.isArray(e) && e.length !== 0 && (await Qe(), U.value && !C.value && (C.value = U.value.getContext("2d", { willReadFrequently: !0 })), D.value = !0, O.value = !0, await cr(), vr(), Kt.value += 1, qt.value += 1, Jt.value += 1);
261
- }, { deep: !0 });
262
- let Cn = _(H.value.aspectRatio), { isPrinting: wn, isImaging: Tn, generatePdf: En, generateImage: Dn } = be({
263
- elementId: `xy_canvas_${jt.value}`,
264
- fileName: H.value.title.text || "vue-ui-xy-canvas",
265
- options: F.value.print
266
- }), W = _({
267
- showTable: P.value.table.show,
268
- showDataLabels: V.value.show,
269
- stacked: H.value.stacked,
270
- showTooltip: I.value.show
271
- });
272
- function On(e) {
273
- Vt.value = e, Bt.value += 1;
274
- }
275
- let kn = d(() => pe(P.value.customPalette)), An = d(() => E.value.length === J.value.length), G = d(() => J.value ? Math.max(...J.value.filter((e, t) => An.value ? !0 : !E.value.includes(e.absoluteIndex)).map((e) => e.series.length)) : 0);
276
- function jn(e) {
277
- A.value = e, Br();
278
- }
279
- let Mn = _(0), Nn = _(0);
280
- function Pn() {
281
- if (!C.value || !z.value.show) return 0;
282
- let e = $.value || [], t = X.value.start ?? 0, n = X.value.end ?? 0;
283
- if (!Math.max(0, n - t)) return 0;
284
- let r = Math.round(w.value / 40 * z.value.fontSizeRatio), i = `${z.value.bold ? "bold " : ""}${r}px ${P.value.style.fontFamily}`;
285
- C.value.save(), C.value.font = i;
286
- let a = 0;
287
- for (let r = t; r < n; r += 1) {
288
- let t = e[r]?.text ?? `${r + 1}`, n = C.value.measureText(String(t));
289
- n.width > a && (a = n.width);
290
- }
291
- C.value.restore();
292
- let o = (z.value.rotation || 0) * Math.PI / 180, s = r, ee = Math.abs(Math.sin(o)) * a + Math.abs(Math.cos(o)) * s, c = z.value.offsetY || 1, l = w.value / c;
293
- return Math.max(0, l + ee + 4);
294
- }
295
- function Fn() {
296
- Mn.value = Pn();
297
- }
298
- function In() {
299
- Nn.value && cancelAnimationFrame(Nn.value), Nn.value = requestAnimationFrame(() => {
300
- requestAnimationFrame(() => {
301
- Fn();
302
- });
303
- });
304
- }
305
- tt(() => {
306
- Nn.value && cancelAnimationFrame(Nn.value);
307
- });
308
- let K = d(() => {
309
- let e = w.value - w.value * (H.value.paddingProportions.left + H.value.paddingProportions.right), t = Pt.value * H.value.paddingProportions.top, n = Pt.value * H.value.paddingProportions.bottom, r = Mn.value, i = Pt.value - n - r, a = Pt.value - (t + n) - r;
310
- return {
311
- canvasWidth: w.value,
312
- canvasHeight: Pt.value,
313
- left: w.value * H.value.paddingProportions.left,
314
- top: t,
315
- right: w.value - w.value * H.value.paddingProportions.right,
316
- bottom: i,
317
- width: e,
318
- height: a,
319
- slot: e / (X.value.end - X.value.start)
320
- };
321
- });
322
- function Ln(e, t) {
323
- return e / t;
324
- }
325
- function Rn({ hasAutoScale: e, series: t, min: n, max: r, scale: i, yOffset: a, individualHeight: o, stackIndex: s = null }) {
326
- return t.map((t, n) => {
327
- let r = i.min < 0 ? Math.abs(i.min) : 0, ee = Ln(t + r, r + i.max), c, l;
328
- e && (c = i.min, l = Ln(t - c, i.max - c));
329
- let te = 0;
330
- return te = s === null ? K.value.bottom - K.value.height * (e ? l : ee) : K.value.bottom - a - o * (e ? l : ee), {
331
- x: K.value.left + K.value.slot * n + K.value.slot / 2,
332
- y: te,
333
- value: t
334
- };
335
- });
336
- }
337
- let q = d(() => {
338
- let e = H.value.scale.min === null ? Math.min(...J.value.filter((e, t) => !E.value.includes(e.absoluteIndex)).flatMap((e) => e.series.slice(X.value.start, X.value.end))) : H.value.scale.min, t = H.value.scale.max === null ? Math.max(...J.value.filter((e, t) => !E.value.includes(e.absoluteIndex)).flatMap((e) => e.series.slice(X.value.start, X.value.end))) : H.value.scale.max, n = ne(e < 0 ? e : 0, t === e ? e + 1 < 0 ? 0 : e + 1 : t < 0 ? 0 : t, H.value.scale.ticks), r = n.min < 0 ? Math.abs(n.min) : 0, i = K.value.bottom - K.value.height * (r / (n.max + r));
339
- return {
340
- absoluteMin: r,
341
- max: t,
342
- min: e,
343
- scale: n,
344
- yLabels: n.ticks.map((e) => ({
345
- y: K.value.bottom - K.value.height * ((e + r) / (n.max + r)),
346
- x: K.value.left - 8,
347
- value: e
348
- })),
349
- zero: i
350
- };
351
- }), zn = d(() => Y.value.map((e) => `
352
- <div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
353
- <svg viewBox="0 0 10 10" height="12" width="12">
354
- <circle cx="5" cy="5" r="5" fill="${e.color}"/>
355
- </svg>
356
- <span>${e.name ? e.name + ": " : ""}</span>
357
- <span>${se(V.value.formatter, e.series[T.value] ?? "-", t({
358
- p: e.prefix || "",
359
- v: e.series[T.value] ?? "-",
360
- s: e.suffix || "",
361
- r: e.rounding || 0
362
- }), {
363
- datapoint: e,
364
- seriesIndex: T.value
365
- })}</span>
366
- </div>
367
- `)), Bn = d(() => H.value.line.cutNullValues), J = d(() => mn.value.map((e, t) => ({
368
- ...e,
369
- series: ce({
370
- data: o(e.series, [], Bn.value),
371
- threshold: P.value.downsample.threshold
372
- }),
373
- absoluteIndex: t,
374
- color: c(e.color || kn.value[t] || l[t] || l[t % l.length])
375
- }))), Vn = d(() => {
376
- if (!H.value.zoom.minimap.show) return [];
377
- let e = J.value.filter((e) => !E.value.includes(e.absoluteIndex)), t = Math.max(...e.map((e) => e.series.length)), n = [];
378
- 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));
379
- let r = Math.min(...n);
380
- return n.map((e) => e + (r < 0 ? Math.abs(r) : 0));
381
- }), Hn = d(() => H.value.zoom.minimap.show ? J.value.map((e) => ({
382
- ...e,
383
- isVisible: !E.value.includes(e.absoluteIndex)
384
- })) : []);
385
- b(G, (e) => {
386
- e && cr();
387
- });
388
- let Y = d(() => ue(J.value.filter((e, t) => !E.value.includes(e.absoluteIndex))).map((e, t) => ({
389
- ...e,
390
- series: e.series.slice(X.value.start, X.value.end)
391
- })).map((e, t) => {
392
- 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;
393
- n === r && (n = n >= 0 ? r - 1 : n, r = r >= 0 ? r : n + 1);
394
- let i = {
395
- ratios: e.series.filter((e) => ![null, void 0].includes(e)).map((e) => (e - n) / (r - n)),
396
- valueMin: n,
397
- valueMax: r
398
- }, a = e.scaleSteps || H.value.scale.ticks, o;
399
- o = e.autoScaling ? ne(i.valueMin, i.valueMax, a) : ne(i.valueMin < 0 ? i.valueMin : 0, i.valueMax <= 0 ? 0 : i.valueMax, a);
400
- let s = W.value.stacked ? K.value.height * (1 - e.cumulatedStackRatio) : 0, ee = W.value.stacked ? K.value.height / H.value.stackGap : 0, c = W.value.stacked ? K.value.height * e.stackRatio - ee : K.value.height, l = o.min < 0 ? Math.abs(o.min) : 0, te;
401
- te = e.autoScaling && W.value.stacked && r <= 0 ? K.value.bottom - s - c : K.value.bottom - s - c * (l / (o.max + l));
402
- let re = o.ticks.map((e, t) => ({
403
- y: K.value.bottom - s - c * (t / (o.ticks.length - 1)),
404
- x: K.value.left - 8,
405
- value: e
406
- })), ie = Rn({
407
- hasAutoScale: W.value.stacked && e.autoScaling,
408
- series: e.series,
409
- min: W.value.stacked ? n : q.value.min,
410
- max: W.value.stacked ? r : q.value.max,
411
- scale: W.value.stacked ? o : q.value.scale,
412
- yOffset: s,
413
- individualHeight: c,
414
- stackIndex: W.value.stacked ? t : null
415
- });
416
- return {
417
- ...e,
418
- coordinatesLine: ie,
419
- min: n,
420
- max: r,
421
- localScale: o,
422
- localZero: te,
423
- localMin: l,
424
- localYLabels: re,
425
- yOffset: s,
426
- individualHeight: c
427
- };
428
- })), X = _({
429
- start: 0,
430
- end: G.value
431
- }), Z = _({
432
- start: 0,
433
- end: G.value
434
- }), Un = _(!1), Wn = _(!1), Gn = _(null), Kn = _(!1), qn = _(null), Jn = _(null), Yn = _(null), Xn = _({
435
- time: 0,
436
- x: 0,
437
- y: 0,
438
- pointerType: null
439
- }), Zn = d(() => H.value.zoom?.dragToZoom), Qn = d(() => Zn.value.show && M.value && $t.value && G.value > 1 && !pn.value), $n = _(null), er = null, tr = {};
440
- function nr() {
441
- return new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(() => e())));
442
- }
443
- function rr(e, t = X.value) {
444
- if (!e || typeof e != "object") return null;
445
- let n = e.start !== void 0 && e.start !== null, r = e.end !== void 0 && e.end !== null;
446
- if (!n && !r) return null;
447
- let i = Number(n ? e.start : t.start), a = Number(r ? e.end : t.end);
448
- return !Number.isFinite(i) || !Number.isFinite(a) ? null : {
449
- start: i,
450
- end: a
451
- };
452
- }
453
- function ir(e) {
454
- let t = rr(e);
455
- t && N("update:zoomState", t);
456
- }
457
- function ar() {
458
- er &&= (cancelAnimationFrame(er), null), tr = {};
459
- }
460
- function or(e) {
461
- let t = rr(e);
462
- if (!t) return null;
463
- let { start: n, end: r } = t;
464
- return (n !== Number(X.value.start) || r !== Number(X.value.end)) && (ar(), X.value = {
465
- start: n,
466
- end: r
467
- }, Z.value = {
468
- start: n,
469
- end: r
470
- }, gr()), {
471
- start: Number(X.value.start),
472
- end: Number(X.value.end)
473
- };
474
- }
475
- function sr(e) {
476
- let t = or(e);
477
- return t ? (N("update:zoomState", t), t) : null;
478
- }
479
- tt(() => {
480
- $n.value && cancelAnimationFrame($n.value), ar(), ti();
481
- });
482
- async function cr({ force: e = !1, publish: t = !1 } = {}) {
483
- let n = !e;
484
- await dr(n), await Qe(), $n.value && cancelAnimationFrame($n.value), $n.value = requestAnimationFrame(async () => {
485
- await nr(), await dr(n), $n.value = null, t && (ir({
486
- start: Number(X.value.start),
487
- end: Number(X.value.end)
488
- }), N("zoomReset"));
489
- });
490
- }
491
- let lr = d(() => H.value.zoom.preview.enable && (Z.value.start !== X.value.start || Z.value.end !== X.value.end));
492
- function ur(e, t) {
493
- Z.value[e] = t;
494
- }
495
- async function dr(e = !0) {
496
- if (!Qt.value) {
497
- Qt.value = !0;
498
- try {
499
- let { startIndex: t, endIndex: n } = H.value.zoom, r = Math.max(...J.value.map((e) => e.series.length)), i = t ?? 0, a = n == null ? r : Math.min(hr(n + 1, i), r);
500
- en.value = !0, X.value = {
501
- start: i,
502
- end: a
503
- }, Z.value = {
504
- start: i,
505
- end: a
506
- }, gr(), $t.value = !0, await Qe(), Wt.value && Wt.value.setRangeValues(X.value.start, X.value.end), e && S.zoomState && or(S.zoomState);
507
- } finally {
508
- queueMicrotask(() => {
509
- en.value = !1;
510
- }), Qt.value = !1;
511
- }
512
- }
513
- }
514
- function fr(e) {
515
- tr = {
516
- ...tr,
517
- ...e
518
- }, er && cancelAnimationFrame(er), er = requestAnimationFrame(() => {
519
- let e = {
520
- ...X.value,
521
- ...tr
522
- };
523
- tr = {}, er = null, X.value = e, Z.value = { ...e }, gr(), ir({
524
- start: Number(X.value.start),
525
- end: Number(X.value.end)
526
- });
527
- });
528
- }
529
- function pr(e) {
530
- if (Qt.value || en.value) return;
531
- let t = Number(e);
532
- Number.isFinite(t) && (N("zoomStart", {
533
- index: t,
534
- isZoom: t !== 0
535
- }), t !== X.value.start && fr({ start: t }));
536
- }
537
- function mr(e) {
538
- if (Qt.value || en.value) return;
539
- let t = tr.start === void 0 ? X.value.start : tr.start, n = hr(Number(e), t);
540
- Number.isFinite(n) && (N("zoomEnd", {
541
- index: n,
542
- isZoom: n !== G.value
543
- }), (n !== X.value.end || tr.start !== void 0) && fr({ end: n }));
544
- }
545
- function hr(e, t = X.value.start) {
546
- let n = G.value, r = Number(t);
547
- return e > n ? n : e < 0 || e <= r ? Math.min(r + 1, n) : e;
548
- }
549
- function gr() {
550
- let e = Math.max(1, Math.max(...J.value.map((e) => e.series.length))), t = Math.max(0, Math.min(X.value.start ?? 0, e - 1)), n = Math.max(t + 1, Math.min(X.value.end ?? e, e));
551
- (!Number.isFinite(t) || !Number.isFinite(n) || n <= t) && (t = 0, n = e), X.value = {
552
- start: t,
553
- end: n
554
- }, Z.value = {
555
- start: t,
556
- end: n
557
- }, Wt.value && Wt.value.setRangeValues(t, n);
558
- }
559
- b([() => S.zoomState, $t], ([e, t]) => {
560
- t && e && or(e);
561
- }, {
562
- deep: !0,
563
- immediate: !0
564
- });
565
- let _r = d(() => Y.value.filter((e) => [
566
- "line",
567
- "plot",
568
- void 0
569
- ].includes(e.type))), Q = d(() => Y.value.filter((e) => e.type === "bar"));
570
- function vr() {
571
- if (!U.value || !Nt.value) return;
572
- let e = Nt.value.offsetWidth, t = Nt.value.offsetHeight;
573
- U.value.width = e * Rt.value * 2, U.value.height = t * Rt.value * 2, w.value = e * Rt.value * 2, Pt.value = t * Rt.value * 2, C.value?.scale(Rt.value, Rt.value), Br();
574
- }
575
- b(M, async (e) => {
576
- if (!e) {
577
- zt.value = null, Ft.value = !1, T.value = null, k.value = null;
578
- return;
579
- }
580
- await Qe(), U.value && !C.value && (C.value = U.value.getContext("2d", { willReadFrequently: !0 })), D.value = !0, O.value = !0, await cr(), vr(), Br();
581
- });
582
- function yr() {
583
- if (C.value && (C.value.clearRect(0, 0, 1e4, 1e4), C.value.fillStyle = H.value.backgroundColor, C.value.fillRect(0, 0, K.value.canvasWidth, K.value.canvasHeight), M.value)) {
584
- if (W.value.stacked) L.value.show && X.value.end - X.value.start < L.value.hideUnderXLength ? Y.value.forEach((e) => {
585
- for (let t = 0; t < X.value.end - X.value.start + 1; t += 1) u(C.value, [{
586
- x: K.value.left + K.value.slot * t,
587
- y: K.value.bottom - e.yOffset - e.individualHeight
588
- }, {
589
- x: K.value.left + K.value.slot * t,
590
- y: K.value.bottom - e.yOffset
591
- }], { color: L.value.color });
592
- }) : L.value.show && X.value.end - X.value.start >= L.value.hideUnderXLength && Y.value.forEach((e) => {
593
- for (let t = X.value.start; t < X.value.end; t += 1) t % Math.floor((X.value.end - X.value.start) / sn.value.modulo) === 0 && u(C.value, [{
594
- x: K.value.left + K.value.slot * (t - X.value.start) + K.value.slot / 2,
595
- y: K.value.bottom - e.yOffset - e.individualHeight
596
- }, {
597
- x: K.value.left + K.value.slot * (t - X.value.start) + K.value.slot / 2,
598
- y: K.value.bottom - e.yOffset
599
- }], { color: L.value.color });
600
- }), sn.value.show && (sn.value.alternate ? Y.value.forEach((e) => {
601
- e.localYLabels.forEach((t, n) => {
602
- n < e.localYLabels.length - 1 && Pe(C.value, [
603
- {
604
- x: K.value.left,
605
- y: t.y
606
- },
607
- {
608
- x: K.value.right,
609
- y: t.y
610
- },
611
- {
612
- x: K.value.right,
613
- y: e.localYLabels[n + 1].y
614
- },
615
- {
616
- x: K.value.left,
617
- y: e.localYLabels[n + 1].y
618
- }
619
- ], {
620
- fillColor: n % 2 == 0 ? "transparent" : de(H.value.grid.x.horizontalLines.color, H.value.grid.x.horizontalLines.opacity),
621
- strokeColor: "transparent"
622
- });
623
- });
624
- }) : Y.value.forEach((e) => {
625
- e.localYLabels.slice(X.value.start, X.value.end).forEach((e) => {
626
- u(C.value, [{
627
- x: K.value.left,
628
- y: e.y
629
- }, {
630
- x: K.value.right,
631
- y: e.y
632
- }], { color: sn.value.color });
633
- });
634
- })), B.value.zeroLine.show && Y.value.forEach((e) => {
635
- u(C.value, [{
636
- x: K.value.left,
637
- y: e.localZero
638
- }, {
639
- x: K.value.right,
640
- y: e.localZero
641
- }], {
642
- color: B.value.zeroLine.color,
643
- lineDash: B.value.zeroLine.dashed ? [10, 10] : [0, 0]
644
- });
645
- }), R.value.show && Y.value.forEach((e) => {
646
- u(C.value, [{
647
- x: K.value.left,
648
- y: K.value.bottom - e.yOffset
649
- }, {
650
- x: K.value.left,
651
- y: K.value.bottom - e.yOffset - e.individualHeight
652
- }], { color: e.color }), u(C.value, [{
653
- x: K.value.right,
654
- y: K.value.bottom - e.yOffset
655
- }, {
656
- x: K.value.right,
657
- y: K.value.bottom - e.yOffset - e.individualHeight
658
- }], { color: e.color });
659
- }), Y.value.forEach((e) => {
660
- Oe(C.value, e.name, w.value / 35, K.value.bottom - e.yOffset - e.individualHeight / 2, {
661
- align: "center",
662
- rotation: -90,
663
- color: e.color,
664
- font: `${Math.round(w.value / 40 * R.value.fontSizeRatio)}px ${P.value.style.fontFamily}`
665
- });
666
- });
667
- else {
668
- if (L.value.show && X.value.end - X.value.start < L.value.hideUnderXLength) for (let e = 0; e < X.value.end - X.value.start + 1; e += 1) u(C.value, [{
669
- x: K.value.left + K.value.slot * e,
670
- y: K.value.top
671
- }, {
672
- x: K.value.left + K.value.slot * e,
673
- y: K.value.bottom
674
- }], { color: L.value.color });
675
- else if (L.value.show && X.value.end - X.value.start >= L.value.hideUnderXLength) for (let e = X.value.start; e < X.value.end; e += 1) e % Math.floor((X.value.end - X.value.start) / z.value.modulo) === 0 && u(C.value, [{
676
- x: K.value.left + K.value.slot * (e - X.value.start) + K.value.slot / 2,
677
- y: K.value.top
678
- }, {
679
- x: K.value.left + K.value.slot * (e - X.value.start) + K.value.slot / 2,
680
- y: K.value.bottom
681
- }], { color: L.value.color });
682
- sn.value.show && (sn.value.alternate ? q.value.yLabels.forEach((e, t) => {
683
- t < q.value.yLabels.length - 1 && Pe(C.value, [
684
- {
685
- x: K.value.left,
686
- y: e.y
687
- },
688
- {
689
- x: K.value.right,
690
- y: e.y
691
- },
692
- {
693
- x: K.value.right,
694
- y: q.value.yLabels[t + 1].y
695
- },
696
- {
697
- x: K.value.left,
698
- y: q.value.yLabels[t + 1].y
699
- }
700
- ], {
701
- fillColor: t % 2 == 0 ? "transparent" : de(H.value.grid.x.horizontalLines.color, H.value.grid.x.horizontalLines.opacity),
702
- strokeColor: "transparent"
703
- });
704
- }) : q.value.yLabels.forEach((e) => {
705
- u(C.value, [{
706
- x: K.value.left,
707
- y: e.y
708
- }, {
709
- x: K.value.right,
710
- y: e.y
711
- }], { color: sn.value.color });
712
- })), B.value.y.showAxis && u(C.value, [{
713
- x: K.value.left,
714
- y: K.value.top
715
- }, {
716
- x: K.value.left,
717
- y: K.value.bottom
718
- }], {
719
- color: B.value.y.axisColor,
720
- lineWidth: B.value.y.axisThickness
721
- }), B.value.x.showAxis && u(C.value, [{
722
- x: K.value.left,
723
- y: K.value.bottom
724
- }, {
725
- x: K.value.right,
726
- y: K.value.bottom
727
- }], {
728
- color: B.value.x.axisColor,
729
- lineWidth: B.value.x.axisThickness
730
- }), B.value.zeroLine.show && u(C.value, [{
731
- x: K.value.left,
732
- y: q.value.zero
733
- }, {
734
- x: K.value.right,
735
- y: q.value.zero
736
- }], {
737
- color: B.value.zeroLine.color,
738
- lineDash: B.value.zeroLine.dashed ? [10, 10] : [0, 0]
739
- });
740
- }
741
- B.value.y.axisName && Oe(C.value, B.value.y.axisName, w.value - w.value / 40 * R.value.fontSizeRatio * 1.2, K.value.bottom - K.value.height / 2, {
742
- font: `${R.value.bold ? "bold " : ""}${Math.round(w.value / 40 * R.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,
743
- color: H.value.color,
744
- align: "center",
745
- rotation: 90
746
- }), B.value.x.axisName && Oe(C.value, B.value.x.axisName, w.value / 2, Pt.value, {
747
- font: `${R.value.bold ? "bold " : ""}${Math.round(w.value / 40 * R.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,
748
- color: H.value.color,
749
- align: "center"
750
- });
751
- }
752
- }
753
- function br(e) {
754
- for (let t = 0; t < e.coordinatesLine.length; t += 1) {
755
- let n = (T.value === t || A.value === t ? w.value / 150 : H.value.line.plots.show || e.type === "plot" ? w.value / 200 : 0) * H.value.line.plots.radiusRatio;
756
- je(C.value, {
757
- x: e.coordinatesLine[t].x,
758
- y: e.coordinatesLine[t].y
759
- }, n, {
760
- color: H.value.backgroundColor,
761
- fillStyle: e.color,
762
- strokeColor: "transparent"
763
- });
764
- }
765
- }
766
- function xr() {
767
- Y.value.forEach((e) => {
768
- e.showYMarker && Hr(e) && Oe(C.value, se(V.value.formatter, Hr(e).value, t({
769
- p: e.prefix || R.value.prefix || "",
770
- v: Hr(e).value,
771
- s: e.suffix || R.value.suffix || "",
772
- r: e.rounding || R.value.rounding || 0
773
- }), {
774
- datapoint: Hr(e),
775
- seriesIndex: null
776
- }), K.value.left - 8 + R.value.offsetX, Hr(e).y, {
777
- align: "right",
778
- font: `${R.value.bold ? "bold " : ""}${Math.round(w.value / 40 * R.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,
779
- color: e.color
780
- });
781
- });
782
- }
783
- function Sr() {
784
- R.value.show && (W.value.stacked ? Y.value.forEach((e) => {
785
- e.localYLabels.forEach((n, r) => {
786
- Oe(C.value, se(V.value.formatter, n.value, t({
787
- p: e.prefix || B.value.y.axisLabels.prefix || "",
788
- v: n.value,
789
- s: e.suffix || B.value.y.axisLabels.suffix || "",
790
- r: e.rounding || B.value.y.axisLabels.rounding || 0
791
- }), {
792
- datapoint: n,
793
- seriesIndex: r
794
- }), n.x + R.value.offsetX, n.y, {
795
- align: "right",
796
- font: `${R.value.bold ? "bold " : ""}${Math.round(w.value / 40 * R.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,
797
- color: e.color,
798
- globalAlpha: e.showYMarker && ![null, void 0].includes(T.value ?? A.value) ? .2 : 1
799
- });
800
- });
801
- }) : q.value.yLabels.forEach((e, n) => {
802
- Oe(C.value, se(V.value.formatter, e.value, t({
803
- p: R.value.prefix || "",
804
- v: e.value,
805
- s: R.value.suffix || "",
806
- r: R.value.rounding || 0
807
- }), {
808
- datapoint: e,
809
- seriesIndex: n
810
- }), e.x + R.value.offsetX, e.y, {
811
- align: "right",
812
- font: `${R.value.bold ? "bold " : ""}${Math.round(w.value / 40 * R.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,
813
- color: R.value.color,
814
- globalAlpha: Y.value.some((e) => e.showYMarker) && ![null, void 0].includes(T.value ?? A.value) ? .2 : 1
815
- });
816
- }));
817
- }
818
- function Cr(e) {
819
- for (let n = 0; n < e.coordinatesLine.length; n += 1) Oe(C.value, se(V.value.formatter, e.coordinatesLine[n].value, t({
820
- p: e.prefix || "",
821
- v: e.coordinatesLine[n].value,
822
- s: e.suffix || "",
823
- r: e.rounding || 0
824
- }), {
825
- datapoint: e.coordinatesLine[n],
826
- seriesIndex: n
827
- }), e.coordinatesLine[n].x, e.coordinatesLine[n].y + V.value.offsetY, {
828
- align: "center",
829
- font: `${V.value.bold ? "bold " : ""}${Math.round(w.value / 40 * V.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,
830
- color: V.value.useSerieColor ? e.color : V.value.color,
831
- strokeColor: H.value.backgroundColor,
832
- lineWidth: .5
833
- });
834
- }
835
- let $ = _([]), wr = 0;
836
- ct(() => {
837
- let e = ++wr;
838
- (async () => {
839
- let t = await ve({
840
- values: z.value.values,
841
- maxDatapoints: G.value,
842
- formatter: z.value.datetimeFormatter,
843
- start: 0,
844
- end: G.value
845
- });
846
- e === wr && ($.value = t);
847
- })();
848
- }), ct(() => {
849
- z.value.show, z.value.rotation, z.value.offsetY, z.value.fontSizeRatio, z.value.bold, X.value.start, X.value.end, w.value, Pt.value, ($.value || []).map((e) => e?.text ?? "").join("|"), In();
850
- }, { flush: "post" });
851
- let Tr = _({
852
- months: [],
853
- shortMonths: [],
854
- days: [],
855
- shortDays: []
856
- }), Er = 0;
857
- ct(() => {
858
- let e = ++Er, t = z.value.datetimeFormatter;
859
- (async () => {
860
- let n = await _e(t.locale).catch(() => _e("en"));
861
- e === Er && (Tr.value = n.data);
862
- })();
863
- });
864
- let Dr = d(() => {
865
- let e = z.value.datetimeFormatter, t = ge({
866
- useUTC: e.useUTC,
867
- locale: Tr.value,
868
- januaryAsYear: e.januaryAsYear
869
- });
870
- return (e, n) => {
871
- let r = z.value.values?.[e];
872
- return r == null ? "" : t.formatDate(new Date(r), n);
873
- };
874
- }), Or = d(() => (z.value.values || []).map((e, t) => ({
875
- text: Dr.value(t, H.value.zoom.timeFormat),
876
- absoluteIndex: t
877
- }))), kr = d(() => (z.value.values || []).map((e, t) => ({
878
- text: Dr.value(t, I.value.timeFormat),
879
- absoluteIndex: t
880
- })));
881
- function Ar() {
882
- for (let e = X.value.start; e < X.value.end; e += 1) (X.value.end - X.value.start < z.value.modulo || X.value.end - X.value.start >= z.value.modulo && (e % Math.floor((X.value.end - X.value.start) / z.value.modulo) === 0 || (e === T.value + X.value.start || e === A.value) && z.value.showMarker)) && Oe(C.value, $.value[e] ? $.value[e].text : e + 1, K.value.left + K.value.slot * (e - X.value.start) + K.value.slot / 2, K.value.bottom + w.value / z.value.offsetY, {
883
- align: z.value.rotation === 0 ? "center" : z.value.rotation > 0 ? "left" : "right",
884
- font: `${z.value.bold ? "bold " : ""}${Math.round(w.value / 40 * z.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,
885
- color: z.value.showMarker ? de(z.value.color, T.value !== null || A.value !== null ? T.value + X.value.start === e || A.value === e ? 100 : 20 : 100) : z.value.color,
886
- rotation: z.value.rotation
887
- });
888
- }
889
- function jr() {
890
- u(C.value, [{
891
- x: K.value.left + K.value.slot * (T.value ?? A.value) + K.value.slot / 2,
892
- y: K.value.top
893
- }, {
894
- x: K.value.left + K.value.slot * (T.value ?? A.value) + K.value.slot / 2,
895
- y: K.value.bottom
896
- }], {
897
- color: H.value.selector.color,
898
- lineDash: H.value.selector.dashed ? [8, 8] : [0, 0],
899
- lineWidth: 2,
900
- linceCap: "round"
901
- });
902
- }
903
- function Mr() {
904
- k.value && u(C.value, [{
905
- x: K.value.left,
906
- y: k.value
907
- }, {
908
- x: K.value.right,
909
- y: k.value
910
- }], {
911
- color: H.value.selector.color,
912
- lineDash: H.value.selector.dashed ? [8, 8] : [0, 0],
913
- lineWidth: 2,
914
- linceCap: "round"
915
- });
916
- }
917
- function Nr() {
918
- Q.value.forEach((e, n) => {
919
- for (let r = 0; r < e.coordinatesLine.length; r += 1) Pe(C.value, [
920
- {
921
- x: K.value.left + K.value.slot * r + K.value.slot / 10 + (W.value.stacked ? 0 : K.value.slot / Q.value.length * n - (n === 0 ? 0 : K.value.slot / (5 * Q.value.length) * n)),
922
- y: W.value.stacked ? e.localZero : q.value.zero
923
- },
924
- {
925
- x: K.value.left + K.value.slot * r + K.value.slot / 10 + (W.value.stacked ? 0 : K.value.slot / Q.value.length * n - (n === 0 ? 0 : K.value.slot / (5 * Q.value.length) * n)) + K.value.slot * .8 / (W.value.stacked ? 1 : Q.value.length),
926
- y: W.value.stacked ? e.localZero : q.value.zero
927
- },
928
- {
929
- x: K.value.left + K.value.slot * r + K.value.slot / 10 + (W.value.stacked ? 0 : K.value.slot / Q.value.length * n - (n === 0 ? 0 : K.value.slot / (5 * Q.value.length) * n)) + K.value.slot * .8 / (W.value.stacked ? 1 : Q.value.length),
930
- y: e.coordinatesLine[r].y
931
- },
932
- {
933
- x: K.value.left + K.value.slot * r + K.value.slot / 10 + (W.value.stacked ? 0 : K.value.slot / Q.value.length * n - (n === 0 ? 0 : K.value.slot / (5 * Q.value.length) * n)),
934
- y: e.coordinatesLine[r].y
935
- }
936
- ], {
937
- strokeColor: H.value.backgroundColor,
938
- gradient: {
939
- type: "linear",
940
- start: {
941
- x: e.coordinatesLine[r].x,
942
- y: e.coordinatesLine[r].y
943
- },
944
- end: {
945
- x: e.coordinatesLine[r].x,
946
- y: W.value.stacked ? e.localZero : q.value.zero
947
- },
948
- stops: [{
949
- offset: 0,
950
- color: e.color
951
- }, {
952
- offset: 1,
953
- color: H.value.bar.gradient.show ? s(e.color, .5) : e.color
954
- }]
955
- }
956
- }), W.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && Oe(C.value, se(V.value.formatter, e.coordinatesLine[r].value, t({
957
- p: e.prefix || "",
958
- v: e.coordinatesLine[r].value,
959
- s: e.suffix || "",
960
- r: e.rounding || 0
961
- }), {
962
- datapoint: e.coordinatesLine[r],
963
- seriesIndex: r
964
- }), K.value.left + K.value.slot * r + K.value.slot / 10 + (W.value.stacked ? 0 : K.value.slot / Q.value.length * n - (n === 0 ? 0 : K.value.slot / (5 * Q.value.length) * n)) + K.value.slot * .4 / (W.value.stacked ? 1 : Q.value.length), (e.coordinatesLine[r].value < 0 ? W.value.stacked ? e.localZero : q.value.zero : e.coordinatesLine[r].y) + V.value.offsetY, {
965
- align: "center",
966
- font: `${Math.round(w.value / 40 * V.value.fontSizeRatio)}px ${P.value.style.fontFamily}`,
967
- color: V.value.useSerieColor ? e.color : V.value.color,
968
- strokeColor: H.value.backgroundColor,
969
- lineWidth: .8
970
- });
971
- });
972
- }
973
- function Pr(e, t) {
974
- let n = e.coordinatesLine.map((t, n) => e.series[n] != null && Number.isFinite(t?.y) ? t : null), r = [], i = [], a = [];
975
- for (let e = 0; e < n.length; e += 1) {
976
- let o = n[e];
977
- if (o) a.push(o);
978
- else {
979
- if (a.length >= 2) {
980
- let e = a[0], n = a[a.length - 1];
981
- r.push([
982
- {
983
- x: e.x,
984
- y: t
985
- },
986
- ...a,
987
- {
988
- x: n.x,
989
- y: t
990
- }
991
- ]);
992
- } else a.length === 1 && i.push(a[0]);
993
- a = [];
994
- }
995
- }
996
- if (a.length >= 2) {
997
- let e = a[0], n = a[a.length - 1];
998
- r.push([
999
- {
1000
- x: e.x,
1001
- y: t
1002
- },
1003
- ...a,
1004
- {
1005
- x: n.x,
1006
- y: t
1007
- }
1008
- ]);
1009
- } else a.length === 1 && i.push(a[0]);
1010
- return {
1011
- polygons: r,
1012
- singles: i
1013
- };
1014
- }
1015
- function Fr(e) {
1016
- let t = e.coordinatesLine.map((t, n) => e.series[n] != null && Number.isFinite(t?.y) ? t : null), n = [], r = [];
1017
- for (let e = 0; e < t.length; e += 1) {
1018
- let i = t[e];
1019
- i ? r.push(i) : (r.length >= 2 && n.push(r), r = []);
1020
- }
1021
- return r.length >= 2 && n.push(r), n;
1022
- }
1023
- function Ir(e) {
1024
- if (Bn.value) {
1025
- let t = Fr(e);
1026
- for (let n of t) u(C.value, n, {
1027
- color: e.color,
1028
- lineWidth: 3
1029
- });
1030
- } else u(C.value, e.coordinatesLine, {
1031
- color: e.color,
1032
- lineWidth: 3
1033
- });
1034
- }
1035
- function Lr(e) {
1036
- let t = !!Bn.value;
1037
- if (e.useArea) {
1038
- let n = W.value.stacked ? e.localZero : q.value.zero;
1039
- if (t) {
1040
- let { polygons: t, singles: r } = Pr(e, n);
1041
- for (let n of t) Me(C.value, n, {
1042
- fillColor: de(e.color, H.value.area.opacity),
1043
- strokeColor: "transparent"
1044
- });
1045
- let i = w.value / 200 * H.value.line.plots.radiusRatio;
1046
- for (let t of r) je(C.value, {
1047
- x: t.x,
1048
- y: t.y
1049
- }, i, {
1050
- color: H.value.backgroundColor,
1051
- fillStyle: e.color,
1052
- strokeColor: "transparent"
1053
- });
1054
- } else {
1055
- let t = {
1056
- x: e.coordinatesLine[0].x,
1057
- y: n
1058
- }, r = {
1059
- x: e.coordinatesLine.at(-1).x,
1060
- y: n
1061
- };
1062
- Me(C.value, [
1063
- t,
1064
- ...e.coordinatesLine,
1065
- r
1066
- ], {
1067
- fillColor: de(e.color, H.value.area.opacity),
1068
- strokeColor: "transparent"
1069
- });
1070
- }
1071
- Ir(e);
1072
- return;
1073
- }
1074
- Ir(e);
1075
- }
1076
- function Rr() {
1077
- Y.value.forEach((e, t) => {
1078
- u(C.value, [{
1079
- x: K.value.left,
1080
- y: K.value.bottom - e.yOffset
1081
- }, {
1082
- x: K.value.right,
1083
- y: K.value.bottom - e.yOffset
1084
- }], {
1085
- color: sn.value.color,
1086
- lineWidth: 1
1087
- });
1088
- });
1089
- }
1090
- function zr() {
1091
- let { left: e, top: t, width: n, height: r } = K.value, i = X.value.start, a = X.value.end - i, o = n / a, s = Z.value.start - i, ee = Z.value.end - i, c = Math.max(0, Math.min(a, s)), l = Math.max(0, Math.min(a, ee));
1092
- Pe(C.value, [
1093
- {
1094
- x: e + c * o,
1095
- y: t
1096
- },
1097
- {
1098
- x: e + c * o + (l - c) * o,
1099
- y: t
1100
- },
1101
- {
1102
- x: e + c * o + (l - c) * o,
1103
- y: t + r
1104
- },
1105
- {
1106
- x: e + c * o,
1107
- y: t + r
1108
- }
1109
- ], {
1110
- fillColor: H.value.zoom.preview.fill,
1111
- strokeColor: H.value.zoom.preview.stroke,
1112
- lineDash: [
1113
- ,
1114
- ,
1115
- ,
1116
- ,
1117
- ].fill(H.value.zoom.preview.strokeDasharray),
1118
- lineWidth: H.value.zoom.preview.strokeWidth
1119
- });
1120
- }
1121
- function Br() {
1122
- M.value && U.value && C.value && (yr(), D.value ? ((T.value !== null || A.value !== null) && H.value.selector.show && jr(), Nr(), W.value.stacked && B.value.x.showAxis && Rr(), _r.value.forEach((e) => {
1123
- (e.type === "line" || !e.type) && Lr(e), O.value && (br(e), W.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && Cr(e));
1124
- }), U.value && (zt.value = Ne(U.value))) : (zt.value && (C.value.clearRect(0, 0, 1e4, 1e4), C.value.drawImage(zt.value, 0, 0)), (T.value !== null || A.value !== null) && H.value.selector.show && jr(), (T.value !== null || A.value !== null) && Y.value.forEach((e) => {
1125
- let t = T.value ?? A.value, n = e.coordinatesLine[t];
1126
- (e.type === "line" || !e.type || e.type === "plot") && n && Number.isFinite(n.x) && Number.isFinite(n.y) && je(C.value, {
1127
- x: n.x,
1128
- y: n.y
1129
- }, w.value / 150 * H.value.line.plots.radiusRatio, {
1130
- color: H.value.backgroundColor,
1131
- fillStyle: e.color,
1132
- strokeColor: "transparent"
1133
- });
1134
- })), z.value.show && Ar(), H.value.selector.show && H.value.selector.showHorizontalSelector && Mr(), Sr(), xr(), H.value.zoom.preview.enable && (X.value.start !== Z.value.start || X.value.end !== Z.value.end) && zr(), D.value = !1);
1135
- }
1136
- let Vr = ke(() => {
1137
- O.value = !0, vr();
1138
- }, G.value > 200 ? 10 : 1, !O.value);
1139
- function Hr(e) {
1140
- if ([null, void 0].includes(T.value ?? A.value) || !e.coordinatesLine[T.value ?? A.value]) return !1;
1141
- let { y: t, value: n } = e.coordinatesLine[T.value ?? A.value];
1142
- return {
1143
- y: t,
1144
- value: n
1145
- };
1146
- }
1147
- let Ur = d(() => !Un.value || qn.value == null || Jn.value == null ? null : {
1148
- x: Math.min(qn.value, Jn.value),
1149
- y: K.value.top,
1150
- width: Math.abs(Jn.value - qn.value),
1151
- height: K.value.height
1152
- }), Wr = d(() => $t.value ? Number(X.value.start) !== 0 || Number(X.value.end) !== Number(G.value) : !1);
1153
- function Gr(e) {
1154
- if (!U.value) return null;
1155
- let t = U.value.getBoundingClientRect();
1156
- return !t.width || !t.height ? null : {
1157
- x: (e.clientX - t.left) * (K.value.canvasWidth / t.width),
1158
- y: (e.clientY - t.top) * (K.value.canvasHeight / t.height)
1159
- };
1160
- }
1161
- function Kr(e) {
1162
- return Math.min(Math.max(e, K.value.left), K.value.right);
1163
- }
1164
- function qr(e) {
1165
- return Y.value.map((t) => {
1166
- let n = t.series[e];
1167
- return {
1168
- ...t,
1169
- name: t.name,
1170
- value: [
1171
- null,
1172
- void 0,
1173
- NaN
1174
- ].includes(n) ? null : n,
1175
- color: t.color,
1176
- type: t.type
1177
- };
1178
- });
1179
- }
1180
- function Jr(e, t) {
1181
- if (t == null || t < 0 || t >= X.value.end - X.value.start) return;
1182
- let n = P.value.events?.[e];
1183
- a(n) && n({
1184
- datapoint: qr(t),
1185
- seriesIndex: t + X.value.start
1186
- });
1187
- }
1188
- function Yr(e) {
1189
- Gn.value !== e && (Gn.value = e, Jr("datapointEnter", e));
1190
- }
1191
- function Xr() {
1192
- let e = Gn.value;
1193
- e != null && Jr("datapointLeave", e), Gn.value = null;
1194
- }
1195
- function Zr() {
1196
- Kn.value = !0, setTimeout(() => {
1197
- Kn.value = !1;
1198
- }, 0);
1199
- }
1200
- function Qr(e) {
1201
- if (!e || !K.value?.slot) return null;
1202
- let { left: t, right: n, top: r, bottom: i, slot: a } = K.value;
1203
- if (e.x < t || e.x > n || e.y < r || e.y > i) return null;
1204
- let o = Math.floor((e.x - t) / a), s = X.value.end - X.value.start;
1205
- return o < 0 || o >= s ? null : o;
1206
- }
1207
- function $r(e) {
1208
- if (Kn.value) {
1209
- Kn.value = !1;
1210
- return;
1211
- }
1212
- let t = Qr(Gr(e));
1213
- t !== null && Jr("datapointClick", t);
1214
- }
1215
- function ei() {
1216
- Xr(), mi(), A.value = null;
1217
- }
1218
- function ti(e) {
1219
- let t = e?.pointerId == null ? Yn.value : e.pointerId;
1220
- t != null && U.value?.hasPointerCapture?.(t) && U.value.releasePointerCapture(t), Un.value = !1, qn.value = null, Jn.value = null, Yn.value = null;
1221
- }
1222
- function ni(e) {
1223
- if (!Qn.value || !Wr.value || !e) return !1;
1224
- let t = Date.now(), n = e.pointerType || "mouse", r = Xn.value, i = n === "touch" ? 450 : 350, a = n === "touch" ? 28 : 10, o = Math.hypot(e.clientX - r.x, e.clientY - r.y);
1225
- return r.time > 0 && r.pointerType === n && t - r.time <= i && o <= a ? (Xn.value = {
1226
- time: 0,
1227
- x: 0,
1228
- y: 0,
1229
- pointerType: null
1230
- }, Zr(), ti(e), cr({
1231
- force: !0,
1232
- publish: !0
1233
- }), !0) : (Xn.value = {
1234
- time: t,
1235
- x: e.clientX,
1236
- y: e.clientY,
1237
- pointerType: n
1238
- }, !1);
1239
- }
1240
- function ri(e) {
1241
- let t = Number(X.value.end) - Number(X.value.start);
1242
- if (t <= 0 || !Number.isFinite(K.value.slot) || K.value.slot <= 0) return null;
1243
- let n = Math.floor((Kr(e) - K.value.left) / K.value.slot);
1244
- return Math.max(0, Math.min(t - 1, n));
1245
- }
1246
- function ii(e, t) {
1247
- let n = ri(e), r = ri(t);
1248
- if (n == null || r == null) return null;
1249
- let i = Math.min(n, r), a = Math.max(n, r);
1250
- return a <= i ? null : {
1251
- start: Number(X.value.start) + i,
1252
- end: Number(X.value.start) + a + 1
1253
- };
1254
- }
1255
- function ai(e) {
1256
- let t = sr(e);
1257
- return t ? (N("zoomStart", {
1258
- index: t.start,
1259
- isZoom: t.start !== 0
1260
- }), N("zoomEnd", {
1261
- index: t.end,
1262
- isZoom: t.end !== G.value
1263
- }), t) : null;
1264
- }
1265
- function oi(e) {
1266
- if (!Qn.value || zi.value || e.button !== void 0 && e.button !== 0 || Yn.value != null && e.pointerId !== Yn.value) return;
1267
- let t = Gr(e);
1268
- if (!t) return;
1269
- let { left: n, right: r, top: i, bottom: a } = K.value;
1270
- if (t.x < n || t.x > r || t.y < i || t.y > a || Number(X.value.end) - Number(X.value.start) <= 1) return;
1271
- Wn.value = !0, U.value?.focus?.({ preventScroll: !0 }), ei();
1272
- let o = Kr(t.x);
1273
- Yn.value = e.pointerId, Un.value = !0, qn.value = o, Jn.value = o;
1274
- }
1275
- function si(e) {
1276
- if (!Qn.value || !Un.value || Yn.value != null && e.pointerId !== Yn.value) return;
1277
- let t = Gr(e);
1278
- t && (Jn.value = Kr(t.x), qn.value != null && Math.abs(Jn.value - qn.value) >= 2 && !U.value?.hasPointerCapture?.(e.pointerId) && U.value?.setPointerCapture?.(e.pointerId));
1279
- }
1280
- function ci(e) {
1281
- if (!Qn.value || !Un.value || Yn.value != null && e.pointerId !== Yn.value) return;
1282
- let t = Gr(e);
1283
- t && (Jn.value = Kr(t.x));
1284
- let n = qn.value, r = Jn.value;
1285
- if ((n == null || r == null ? 0 : Math.abs(r - n)) < Math.max(4, K.value.width * .01)) {
1286
- if (ni(e)) return;
1287
- ti(e);
1288
- return;
1289
- }
1290
- let i = ii(Math.min(n, r), Math.max(n, r));
1291
- if (!i) {
1292
- ti(e);
1293
- return;
1294
- }
1295
- ti(e), ai(i) && (Xn.value = {
1296
- time: 0,
1297
- x: 0,
1298
- y: 0,
1299
- pointerType: null
1300
- }, ei(), Zr());
1301
- }
1302
- function li(e) {
1303
- if (!M.value || !U.value || An.value || Un.value) return;
1304
- let { left: t, top: n } = U.value.getBoundingClientRect(), r = e.clientX - t;
1305
- if (k.value = (e.clientY - n) * 2, (k.value < K.value.top || k.value > K.value.bottom) && (k.value = null), r * 2 < K.value.left || r * 2 > K.value.right) {
1306
- Xr(), mi();
1307
- return;
1308
- }
1309
- let i = r * 2 - K.value.left, o = Math.floor(i / K.value.slot);
1310
- if (Yr(o), T.value = o, j.value = o, Ft.value = !0, nn.value = !1, !O.value) return;
1311
- let s = "", ee = I.value.customFormat, c = Y.value.map((e) => ({
1312
- shape: e.shape || null,
1313
- name: e.name,
1314
- color: e.color,
1315
- type: e.type || "line",
1316
- value: e.series.find((e, t) => t === T.value)
1317
- }));
1318
- Lt.value = {
1319
- timeLabel: z.value.values.slice(X.value.start, X.value.end)[T.value] ? I.value.useDefaultTimeFormat ? $.value.slice(X.value.start, X.value.end)[T.value]?.text : kr.value[T.value]?.text : "",
1320
- datapoint: c,
1321
- seriesIndex: T.value,
1322
- series: Y.value,
1323
- config: P.value
1324
- }, vi({
1325
- seriesIndex: T.value,
1326
- datapoint: c
1327
- }), a(ee) && ae(() => ee({
1328
- seriesIndex: T.value,
1329
- datapoint: c,
1330
- series: Y.value,
1331
- config: P.value
1332
- })) ? It.value = ee({
1333
- seriesIndex: T.value,
1334
- datapoint: c,
1335
- series: Y.value,
1336
- config: P.value
1337
- }) : (z.value.values.slice(X.value.start, X.value.end)[T.value] ? s += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${I.value.borderColor}; width:100%">${I.value.useDefaultTimeFormat ? $.value.slice(X.value.start, X.value.end)[T.value]?.text : kr.value[T.value]?.text}</div>` : s += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${I.value.borderColor}; width:100%">${$.value[T.value + X.value.start]?.text ?? ""}</div>`, s += zn.value.join(""), It.value = s), O.value = !1;
1338
- }
1339
- function ui(e) {
1340
- return Y.value.map((t) => ({
1341
- shape: t.shape || null,
1342
- name: t.name,
1343
- color: t.color,
1344
- type: t.type || "line",
1345
- value: t.series.find((t, n) => n === e)
1346
- }));
1347
- }
1348
- function di(e) {
1349
- let t = "", n = I.value.customFormat, r = ui(e);
1350
- return vi({
1351
- seriesIndex: e,
1352
- datapoint: r
1353
- }), a(n) && ae(() => n({
1354
- seriesIndex: e,
1355
- datapoint: r,
1356
- series: Y.value,
1357
- config: P.value
1358
- })) ? n({
1359
- seriesIndex: e,
1360
- datapoint: r,
1361
- series: Y.value,
1362
- config: P.value
1363
- }) : (z.value.values.slice(X.value.start, X.value.end)[e] ? t += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${I.value.borderColor}; width:100%">${I.value.useDefaultTimeFormat ? $.value.slice(X.value.start, X.value.end)[e]?.text : kr.value[e]?.text}</div>` : t += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${I.value.borderColor}; width:100%">${$.value[e + X.value.start]?.text ?? ""}</div>`, t += zn.value.join(""), t);
1364
- }
1365
- function fi(e) {
1366
- if (!U.value || !K.value?.slot) return;
1367
- let t = U.value.getBoundingClientRect(), n = t.width / K.value.canvasWidth, r = t.height / K.value.canvasHeight, i = K.value.left + K.value.slot * e + K.value.slot / 2, a = K.value.top + K.value.height / 2;
1368
- an.value = {
1369
- x: t.left + i * n,
1370
- y: t.top + a * r
1371
- };
1372
- }
1373
- function pi(e, { fromKeyboard: t = !1, triggerEvent: n = !0 } = {}) {
1374
- M.value && !An.value && e != null && (e < 0 || e >= X.value.end - X.value.start || (n && Yr(e), T.value = e, j.value = e, Ft.value = !0, nn.value = t, It.value = di(e), t && fi(e), O.value = !1, Br()));
1375
- }
1376
- function mi() {
1377
- Ft.value = !1, T.value = null, j.value = null, It.value = "", k.value = null, nn.value = !1, Br();
1378
- }
1379
- function hi() {
1380
- rn.value = !0;
1381
- }
1382
- function gi() {
1383
- Wn.value = !1, rn.value = !1, mi();
1384
- }
1385
- function _i(e) {
1386
- if (!U.value || zi.value || document.activeElement !== U.value) return;
1387
- if (Wn.value = !1, e.key === "Escape") {
1388
- if (Qn.value && (Wr.value || Un.value)) {
1389
- e.preventDefault(), e.stopPropagation(), ti(), cr({
1390
- force: !0,
1391
- publish: !0
1392
- });
1393
- return;
1394
- }
1395
- mi();
1396
- return;
1397
- }
1398
- let t = e.key === "ArrowLeft", n = e.key === "ArrowRight";
1399
- if (!t && !n) return;
1400
- let r = X.value.end - X.value.start;
1401
- if (r <= 0) return;
1402
- e.preventDefault(), e.stopPropagation();
1403
- let i = j.value;
1404
- i !== null && i >= 0 && i < r ? n ? (i += 1, i >= r && (i = 0)) : (--i, i < 0 && (i = r - 1)) : i = n ? 0 : r - 1, pi(i, { fromKeyboard: !0 });
1405
- }
1406
- function vi({ seriesIndex: e, datapoint: t }) {
1407
- let n = X.value.start + e;
1408
- N("selectX", {
1409
- dataset: t,
1410
- index: n,
1411
- indexLabel: ""
1412
- });
1413
- }
1414
- b(() => S.selectedXIndex, (e) => {
1415
- if ([null, void 0].includes(S.selectedXIndex)) {
1416
- mi();
1417
- return;
1418
- }
1419
- let t = e - X.value.start;
1420
- t < 0 || e >= X.value.end ? mi() : pi(t, {
1421
- fromKeyboard: !1,
1422
- triggerEvent: !1
1423
- });
1424
- }, { immediate: !0 }), b(() => T.value, (e) => {
1425
- Vr();
1426
- }), b(() => X.value, (e) => {
1427
- D.value = !0, Br();
1428
- }, { deep: !0 }), b(() => Z.value, (e) => {
1429
- Br();
1430
- }, { deep: !0 }), b(() => W.value.showDataLabels, (e) => {
1431
- D.value = !0, Br();
1432
- }), b(() => k.value, (e) => {
1433
- e && Br();
1434
- }), b(() => W.value.stacked, (e) => {
1435
- D.value = !0, O.value = !0, Vr();
1436
- });
1437
- function yi() {
1438
- Xr(), mi();
1439
- }
1440
- let bi = it(null), xi = it(null), Si = it(null);
1441
- nt(() => {
1442
- Yt.value = !0, Ci();
1443
- });
1444
- function Ci() {
1445
- if (ee(S.dataset) && re({
1446
- componentName: "VueUiXyCanvas",
1447
- type: "dataset",
1448
- debug: dn.value
1449
- }), Qe(() => {
1450
- U.value && !C.value && (C.value = U.value.getContext("2d", { willReadFrequently: !0 })), C.value && M.value && (D.value = !0, O.value = !0, vr());
1451
- }), P.value.responsive) {
1452
- let e = Ae(() => {
1453
- let { width: e, height: t } = Fe({
1454
- chart: Mt.value,
1455
- title: H.value.title.text ? Ht.value : null,
1456
- legend: H.value.legend.show ? Ut.value : null,
1457
- slicer: H.value.zoom.show && G.value > 6 ? Wt.value?.$el : null,
1458
- source: Gt.value
1459
- });
1460
- requestAnimationFrame(() => {
1461
- Cn.value = `${e} / ${t}`;
1462
- });
1463
- });
1464
- bi.value && (xi.value && bi.value.unobserve(xi.value), bi.value.disconnect()), bi.value = new ResizeObserver(e), xi.value = Mt.value.parentNode, bi.value.observe(xi.value);
1465
- }
1466
- Si.value && Si.value.disconnect(), Si.value = new ResizeObserver(async (e) => {
1467
- for (let t of e) t.contentBoxSize && Nt.value && (D.value = !0, Vr());
1468
- }), Si.value.observe(Nt.value), cr();
1469
- }
1470
- tt(() => {
1471
- Si.value && Si.value.disconnect(), bi.value && (xi.value && bi.value.unobserve(xi.value), bi.value.disconnect());
1472
- });
1473
- function wi() {
1474
- E.value.length ? E.value = [] : ki.value.forEach((e, t) => {
1475
- E.value.push(t);
1476
- }), D.value = !0, Vr(), N("selectLegend", Y.value);
1477
- }
1478
- function Ti(e) {
1479
- E.value.includes(e) ? E.value = E.value.filter((t) => t !== e) : E.value.push(e), D.value = !0, Vr(), N("selectLegend", Y.value);
1480
- }
1481
- function Ei(e) {
1482
- return J.value.length ? J.value.find((t) => t.name === e) || (dn.value && console.warn(`VueUiXyCanvas - Series name not found "${e}"`), null) : (dn.value && console.warn("VueUiXyCanvas - There are no series to show."), null);
1483
- }
1484
- function Di(e) {
1485
- let t = Ei(e);
1486
- t !== null && E.value.includes(t.absoluteIndex) && Ti(t.absoluteIndex);
1487
- }
1488
- function Oi(e) {
1489
- let t = Ei(e);
1490
- t !== null && (E.value.includes(t.absoluteIndex) || Ti(t.absoluteIndex));
1491
- }
1492
- let ki = d(() => J.value.map((e, t) => ({
1493
- ...e,
1494
- name: e.name,
1495
- color: c(e.color) || kn.value[t] || l[t] || l[t % l.length],
1496
- shape: e.shape || "circle",
1497
- prefix: e.prefix || "",
1498
- suffix: e.suffix || "",
1499
- rounding: e.rounding || 0
1500
- })).map((e) => ({
1501
- ...e,
1502
- opacity: E.value.includes(e.absoluteIndex) ? .5 : 1,
1503
- segregate: () => Ti(e.absoluteIndex),
1504
- isSegregated: E.value.includes(e.absoluteIndex)
1505
- }))), Ai = d(() => ({
1506
- cy: "donut-div-legend",
1507
- backgroundColor: H.value.legend.backgroundColor,
1508
- color: H.value.legend.color,
1509
- fontSize: H.value.legend.fontSize,
1510
- paddingBottom: 12,
1511
- fontWeight: H.value.legend.bold ? "bold" : ""
1512
- })), ji = d(() => {
1513
- let e = [""].concat(Y.value.map((e) => e.name), "__SUM__"), t = [];
1514
- for (let e = 0; e < G.value; e += 1) {
1515
- let n = Y.value.map((t) => t.series[e] ?? 0).reduce((e, t) => e + t, 0);
1516
- t.push([z.value.values.slice(X.value.start, X.value.end)[e] ? $?.value?.slice(X.value.start, X.value.end)?.[e]?.text ?? e + 1 : e + 1].concat(Y.value.map((t) => (t.series[e] ?? 0).toFixed(P.value.table.rounding)), (n ?? 0).toFixed(P.value.table.rounding)));
1517
- }
1518
- let n = {
1519
- th: {
1520
- backgroundColor: P.value.table.th.backgroundColor,
1521
- color: P.value.table.th.color,
1522
- outline: P.value.table.th.outline
1523
- },
1524
- td: {
1525
- backgroundColor: P.value.table.td.backgroundColor,
1526
- color: P.value.table.td.color,
1527
- outline: P.value.table.td.outline
1528
- },
1529
- breakpoint: P.value.table.responsiveBreakpoint
1530
- }, r = [P.value.table.columnNames.period].concat(Y.value.map((e) => e.name), P.value.table.columnNames.total);
1531
- return {
1532
- head: e,
1533
- body: t.slice(0, X.value.end - X.value.start),
1534
- config: n,
1535
- colNames: r
1536
- };
1537
- }), Mi = d(() => {
1538
- if (Y.value.length === 0) return {
1539
- head: [],
1540
- body: [],
1541
- config: {},
1542
- columnNames: []
1543
- };
1544
- let e = Y.value.map((e) => ({
1545
- label: e.name,
1546
- color: e.color,
1547
- type: e.type
1548
- })), t = [];
1549
- for (let e = X.value.start; e < X.value.end; e += 1) {
1550
- let n = [z.value.values[e] ? $.value[e].text : e + 1];
1551
- Y.value.forEach((t) => {
1552
- n.push(Number((t.series[e] || 0).toFixed(P.value.table.rounding)));
1553
- }), t.push(n);
1554
- }
1555
- return {
1556
- head: e,
1557
- body: t
1558
- };
1559
- });
1560
- function Ni(e = null) {
1561
- let t = [
1562
- [H.value.title.text],
1563
- [H.value.title.subtitle.text],
1564
- [""]
1565
- ], n = ["", ...Mi.value.head.map((e) => e.label)], r = Mi.value.body, a = t.concat([n]).concat(r), o = i(a);
1566
- e ? e(o) : le({
1567
- csvContent: o,
1568
- title: H.value.title.text || "vue-ui-xy-canvas"
1569
- });
1570
- }
1571
- function Pi() {
1572
- return Y.value;
1573
- }
1574
- function Fi() {
1575
- W.value.showTable = !W.value.showTable;
1576
- }
1577
- function Ii() {
1578
- W.value.showDataLabels = !W.value.showDataLabels;
1579
- }
1580
- function Li() {
1581
- W.value.stacked = !W.value.stacked;
1582
- }
1583
- function Ri() {
1584
- W.value.showTooltip = !W.value.showTooltip;
1585
- }
1586
- let zi = _(!1);
1587
- function Bi() {
1588
- zi.value = !zi.value;
1589
- }
1590
- async function Vi({ scale: e = 2 } = {}) {
1591
- if (!Mt.value) return;
1592
- let { imageUri: t, base64: n } = await Te({
1593
- domElement: Mt.value,
1594
- base64: !0,
1595
- img: !0,
1596
- scale: e
1597
- }), r = Mt.value.getBoundingClientRect(), i = {
1598
- width: r.width,
1599
- height: r.height,
1600
- aspectRatio: r.height ? r.width / r.height : 0
1601
- }, a = await oe(t, e) ?? i;
1602
- return {
1603
- imageUri: t,
1604
- base64: n,
1605
- title: H.value.title.text,
1606
- ...a
1607
- };
1608
- }
1609
- let Hi = d(() => {
1610
- let e = P.value.table.useDialog && !P.value.table.show, t = W.value.showTable;
1611
- return {
1612
- component: e ? Dt : Re,
1613
- title: `${H.value.title.text}${H.value.title.subtitle.text ? `: ${H.value.title.subtitle.text}` : ""}`,
1614
- props: e ? {
1615
- backgroundColor: P.value.table.th.backgroundColor,
1616
- color: P.value.table.th.color,
1617
- headerColor: P.value.table.th.color,
1618
- headerBg: P.value.table.th.backgroundColor,
1619
- isFullscreen: Vt.value,
1620
- fullscreenParent: Mt.value,
1621
- forcedWidth: Math.min(800, window.innerWidth * .8),
1622
- isCursorPointer: un.value
1623
- } : {
1624
- hideDetails: !0,
1625
- config: {
1626
- open: t,
1627
- maxHeight: 1e4,
1628
- body: {
1629
- backgroundColor: H.value.backgroundColor,
1630
- color: H.value.color
1631
- },
1632
- head: {
1633
- backgroundColor: H.value.backgroundColor,
1634
- color: H.value.color
1635
- }
1636
- }
1637
- }
1638
- };
1639
- });
1640
- b(() => W.value.showTable, (e) => {
1641
- P.value.table.show || (e && P.value.table.useDialog && Xt.value ? Xt.value.open() : "close" in Xt.value && Xt.value.close());
1642
- });
1643
- function Ui() {
1644
- W.value.showTable = !1, Zt.value && Zt.value.setTableIconState(!1);
1645
- }
1646
- function Wi(e) {
1647
- if (e?.stage === "start") {
1648
- tn.value = !0;
1649
- return;
1650
- }
1651
- if (e?.stage === "end") {
1652
- tn.value = !1;
1653
- return;
1654
- }
1655
- Dn();
1656
- }
1657
- async function Gi() {
1658
- if (N("copyAlt", {
1659
- config: P.value,
1660
- dataset: Y.value
1661
- }), !F.value.callbacks.altCopy) {
1662
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1663
- return;
1664
- }
1665
- await Promise.resolve(F.value.callbacks.altCopy({
1666
- config: P.value,
1667
- dataset: Y.value
1668
- }));
1669
- }
1670
- return De({
1671
- getData: Pi,
1672
- getImage: Vi,
1673
- generateCsv: Ni,
1674
- generatePdf: En,
1675
- generateImage: Dn,
1676
- hideSeries: Oi,
1677
- showSeries: Di,
1678
- toggleTable: Fi,
1679
- toggleLabels: Ii,
1680
- toggleStack: Li,
1681
- toggleTooltip: Ri,
1682
- toggleAnnotator: Bi,
1683
- toggleFullscreen: On,
1684
- copyAlt: Gi,
1685
- resetZoom: () => cr({
1686
- force: !0,
1687
- publish: !0
1688
- }),
1689
- setZoomState: sr
1690
- }), (t, n) => (g(), Ke("div", {
1691
- style: et(`width:100%; position:relative; ${P.value.responsive ? "height: 100%" : ""}; background:${P.value.style.chart.backgroundColor};`),
1692
- ref_key: "xy",
1693
- ref: Mt,
1694
- id: `xy_canvas_${jt.value}`,
1695
- class: $e(`vue-data-ui-component vue-ui-xy-canvas ${Vt.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
1696
- onMouseenter: vn,
1697
- onMouseleave: yn
1698
- }, [
1699
- p("div", {
1700
- id: `chart-instructions-${jt.value}`,
1701
- class: "sr-only"
1702
- }, [p("p", null, at(P.value.a11y.translations.keyboardNavigation), 1)], 8, dt),
1703
- p("div", ft, at(ln.value), 1),
1704
- P.value.style.chart.title.text ? (g(), Ke("div", {
1705
- key: 0,
1706
- ref_key: "chartTitle",
1707
- ref: Ht,
1708
- style: et(`width:100%;background:${P.value.style.chart.backgroundColor};`)
1709
- }, [(g(), Ge(Ee, {
1710
- key: `title_${Kt.value}`,
1711
- config: {
1712
- title: {
1713
- cy: "xy-canvas-title",
1714
- ...P.value.style.chart.title
1715
- },
1716
- subtitle: {
1717
- cy: "xy-canvas-subtitle",
1718
- ...P.value.style.chart.title.subtitle
1719
- }
1720
- }
1721
- }, null, 8, ["config"]))], 4)) : f("", !0),
1722
- p("div", { id: `legend-top-${jt.value}` }, null, 8, pt),
1723
- F.value.show && M.value && (y(_n) || y(hn)) ? (g(), Ge(y(Tt), {
1724
- ref_key: "userOptionsRef",
1725
- ref: Zt,
1726
- key: `user_option_${Bt.value}`,
1727
- backgroundColor: P.value.style.chart.backgroundColor,
1728
- color: P.value.style.chart.color,
1729
- isPrinting: y(wn),
1730
- isImaging: y(Tn),
1731
- uid: jt.value,
1732
- hasTooltip: F.value.buttons.tooltip && I.value.show,
1733
- hasPdf: F.value.buttons.pdf,
1734
- hasImg: F.value.buttons.img,
1735
- hasXls: F.value.buttons.csv,
1736
- hasLabel: F.value.buttons.labels,
1737
- hasStack: e.dataset.length > 1 && F.value.buttons.stack,
1738
- hasFullscreen: F.value.buttons.fullscreen,
1739
- hasAltCopy: F.value.buttons.altCopy,
1740
- hasTable: X.value.end - X.value.start <= 730 && F.value.buttons.table,
1741
- isFullscreen: Vt.value,
1742
- isTooltip: W.value.showTooltip,
1743
- isStacked: W.value.stacked,
1744
- titles: { ...F.value.buttonTitles },
1745
- chartElement: Mt.value,
1746
- position: F.value.position,
1747
- hasAnnotator: F.value.buttons.annotator,
1748
- isAnnotation: zi.value,
1749
- callbacks: F.value.callbacks,
1750
- printScale: F.value.print.scale,
1751
- tableDialog: P.value.table.useDialog,
1752
- isCursorPointer: un.value,
1753
- onToggleFullscreen: On,
1754
- onGeneratePdf: y(En),
1755
- onGenerateCsv: Ni,
1756
- onGenerateImage: Wi,
1757
- onToggleTable: Fi,
1758
- onToggleLabels: Ii,
1759
- onToggleStack: Li,
1760
- onToggleTooltip: Ri,
1761
- onToggleAnnotator: Bi,
1762
- onCopyAlt: Gi,
1763
- style: et({ visibility: y(_n) ? y(hn) ? "visible" : "hidden" : "visible" })
1764
- }, qe({ _: 2 }, [
1765
- t.$slots.menuIcon ? {
1766
- name: "menuIcon",
1767
- fn: x(({ isOpen: e, color: n }) => [v(t.$slots, "menuIcon", h(m({
1768
- isOpen: e,
1769
- color: n
1770
- })), void 0, !0)]),
1771
- key: "0"
1772
- } : void 0,
1773
- t.$slots.optionTooltip ? {
1774
- name: "optionTooltip",
1775
- fn: x(() => [v(t.$slots, "optionTooltip", {}, void 0, !0)]),
1776
- key: "1"
1777
- } : void 0,
1778
- t.$slots.optionPdf ? {
1779
- name: "optionPdf",
1780
- fn: x(() => [v(t.$slots, "optionPdf", {}, void 0, !0)]),
1781
- key: "2"
1782
- } : void 0,
1783
- t.$slots.optionCsv ? {
1784
- name: "optionCsv",
1785
- fn: x(() => [v(t.$slots, "optionCsv", {}, void 0, !0)]),
1786
- key: "3"
1787
- } : void 0,
1788
- t.$slots.optionImg ? {
1789
- name: "optionImg",
1790
- fn: x(() => [v(t.$slots, "optionImg", {}, void 0, !0)]),
1791
- key: "4"
1792
- } : void 0,
1793
- t.$slots.optionTable ? {
1794
- name: "optionTable",
1795
- fn: x(() => [v(t.$slots, "optionTable", {}, void 0, !0)]),
1796
- key: "5"
1797
- } : void 0,
1798
- t.$slots.optionLabels ? {
1799
- name: "optionLabels",
1800
- fn: x(() => [v(t.$slots, "optionLabels", {}, void 0, !0)]),
1801
- key: "6"
1802
- } : void 0,
1803
- t.$slots.optionStack ? {
1804
- name: "optionStack",
1805
- fn: x(() => [v(t.$slots, "optionStack", {}, void 0, !0)]),
1806
- key: "7"
1807
- } : void 0,
1808
- t.$slots.optionFullscreen ? {
1809
- name: "optionFullscreen",
1810
- fn: x(({ toggleFullscreen: e, isFullscreen: n }) => [v(t.$slots, "optionFullscreen", h(m({
1811
- toggleFullscreen: e,
1812
- isFullscreen: n
1813
- })), void 0, !0)]),
1814
- key: "8"
1815
- } : void 0,
1816
- t.$slots.optionAnnotator ? {
1817
- name: "optionAnnotator",
1818
- fn: x(({ toggleAnnotator: e, isAnnotator: n }) => [v(t.$slots, "optionAnnotator", h(m({
1819
- toggleAnnotator: e,
1820
- isAnnotator: n
1821
- })), void 0, !0)]),
1822
- key: "9"
1823
- } : void 0,
1824
- t.$slots.optionAltCopy ? {
1825
- name: "optionAltCopy",
1826
- fn: x(({ altCopy: e }) => [v(t.$slots, "optionAltCopy", h(m({ altCopy: e })), void 0, !0)]),
1827
- key: "10"
1828
- } : void 0,
1829
- t.$slots["custom-menu-before"] ? {
1830
- name: "custom-menu-before",
1831
- fn: x(() => [v(t.$slots, "custom-menu-before", {}, void 0, !0)]),
1832
- key: "11"
1833
- } : void 0,
1834
- t.$slots["custom-menu-after"] ? {
1835
- name: "custom-menu-after",
1836
- fn: x(() => [v(t.$slots, "custom-menu-after", {}, void 0, !0)]),
1837
- key: "12"
1838
- } : void 0
1839
- ]), 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("."))) : f("", !0),
1840
- p("div", {
1841
- class: "vue-ui-xy-canvas",
1842
- style: et(`position: relative; aspect-ratio: ${Cn.value}`),
1843
- ref_key: "container",
1844
- ref: Nt
1845
- }, [
1846
- p("canvas", {
1847
- ref_key: "canvas",
1848
- ref: U,
1849
- class: $e({ "vue-ui-xy-canvas-chart-zoom-pointer-focus": Qn.value && Wn.value }),
1850
- "aria-label": cn.value,
1851
- "aria-describedby": `chart-instructions-${jt.value}`,
1852
- role: "img",
1853
- "aria-live": "polite",
1854
- tabindex: "0",
1855
- style: et({
1856
- width: "100%",
1857
- height: "100%",
1858
- cursor: Qn.value ? Un.value ? "col-resize" : "crosshair" : void 0,
1859
- touchAction: Qn.value ? "pan-y" : void 0,
1860
- userSelect: Qn.value ? "none" : void 0
1861
- }),
1862
- onMousemove: n[0] ||= (e) => li(e),
1863
- onMouseleave: yi,
1864
- onClick: $r,
1865
- onPointerdown: oi,
1866
- onPointermove: si,
1867
- onPointerup: ci,
1868
- onPointercancel: ti,
1869
- onFocus: hi,
1870
- onBlur: gi,
1871
- onKeydown: _i
1872
- }, null, 46, mt),
1873
- Ur.value ? (g(), Ke("svg", {
1874
- key: 0,
1875
- viewBox: `0 0 ${K.value.canvasWidth} ${K.value.canvasHeight}`,
1876
- preserveAspectRatio: "none",
1877
- "aria-hidden": "true",
1878
- style: {
1879
- position: "absolute",
1880
- inset: "0",
1881
- width: "100%",
1882
- height: "100%",
1883
- "pointer-events": "none",
1884
- overflow: "visible"
1885
- }
1886
- }, [p("rect", {
1887
- x: Ur.value.x,
1888
- y: Ur.value.y,
1889
- width: Ur.value.width,
1890
- height: Ur.value.height,
1891
- fill: Zn.value.selection.fill,
1892
- "fill-opacity": Zn.value.selection.fillOpacity,
1893
- stroke: Zn.value.selection.stroke,
1894
- "stroke-opacity": Zn.value.selection.strokeOpacity,
1895
- "stroke-width": Zn.value.selection.strokeWidth,
1896
- "stroke-dasharray": Zn.value.selection.strokeDasharray,
1897
- "stroke-linecap": "round",
1898
- "stroke-linejoin": "round"
1899
- }, null, 8, gt)], 8, ht)) : f("", !0),
1900
- t.$slots.hint ? (g(), Ke("div", _t, [v(t.$slots, "hint", h(m({
1901
- hint: P.value.a11y.translations.keyboardNavigation,
1902
- isVisible: rn.value
1903
- })), void 0, !0)])) : f("", !0),
1904
- v(t.$slots, "skeleton", {}, () => [y(pn) ? (g(), Ge(Se, { key: 0 })) : f("", !0)], !0),
1905
- Ye(y(Ct), {
1906
- teleportTo: I.value.teleportTo,
1907
- show: W.value.showTooltip && Ft.value,
1908
- backgroundColor: I.value.backgroundColor,
1909
- color: I.value.color,
1910
- fontSize: I.value.fontSize,
1911
- borderRadius: I.value.borderRadius,
1912
- borderColor: I.value.borderColor,
1913
- borderWidth: I.value.borderWidth,
1914
- position: I.value.position,
1915
- offsetX: I.value.offsetX,
1916
- offsetY: I.value.offsetY,
1917
- parent: t.$refs.xy,
1918
- content: It.value,
1919
- isFullscreen: Vt.value,
1920
- backgroundOpacity: I.value.backgroundOpacity,
1921
- isCustom: y(a)(I.value.customFormat),
1922
- smooth: I.value.smooth,
1923
- backdropFilter: I.value.backdropFilter,
1924
- smoothForce: I.value.smoothForce,
1925
- smoothSnapThreshold: I.value.smoothSnapThreshold,
1926
- isA11yMode: nn.value,
1927
- a11yPosition: an.value
1928
- }, {
1929
- "tooltip-before": x(() => [v(t.$slots, "tooltip-before", h(m({ ...Lt.value })), void 0, !0)]),
1930
- tooltip: x(() => [v(t.$slots, "tooltip", h(m({ ...Lt.value })), void 0, !0)]),
1931
- "tooltip-after": x(() => [v(t.$slots, "tooltip-after", h(m({ ...Lt.value })), void 0, !0)]),
1932
- _: 3
1933
- }, 8, [
1934
- "teleportTo",
1935
- "show",
1936
- "backgroundColor",
1937
- "color",
1938
- "fontSize",
1939
- "borderRadius",
1940
- "borderColor",
1941
- "borderWidth",
1942
- "position",
1943
- "offsetX",
1944
- "offsetY",
1945
- "parent",
1946
- "content",
1947
- "isFullscreen",
1948
- "backgroundOpacity",
1949
- "isCustom",
1950
- "smooth",
1951
- "backdropFilter",
1952
- "smoothForce",
1953
- "smoothSnapThreshold",
1954
- "isA11yMode",
1955
- "a11yPosition"
1956
- ])
1957
- ], 4),
1958
- P.value.style.chart.zoom.show && G.value > 6 && M.value && $t.value && !y(pn) ? (g(), Ge(Le, {
1959
- key: 2,
1960
- ref_key: "chartSlicer",
1961
- ref: Wt,
1962
- "data-dom-to-png-ignore-layout": "",
1963
- allMinimaps: Hn.value,
1964
- background: P.value.style.chart.zoom.color,
1965
- borderColor: P.value.style.chart.backgroundColor,
1966
- customFormat: P.value.style.chart.zoom.customFormat,
1967
- cutNullValues: Bn.value,
1968
- enableRangeHandles: P.value.style.chart.zoom.enableRangeHandles,
1969
- enableSelectionDrag: P.value.style.chart.zoom.enableSelectionDrag,
1970
- end: X.value.end,
1971
- focusOnDrag: P.value.style.chart.zoom.focusOnDrag,
1972
- focusRangeRatio: P.value.style.chart.zoom.focusRangeRatio,
1973
- fontSize: P.value.style.chart.zoom.fontSize,
1974
- immediate: !P.value.style.chart.zoom.preview.enable,
1975
- inputColor: P.value.style.chart.zoom.color,
1976
- isPreview: lr.value,
1977
- labelLeft: P.value.style.chart.grid.x.timeLabels.values[X.value.start] ? $.value[X.value.start]?.text : "",
1978
- labelRight: P.value.style.chart.grid.x.timeLabels.values[X.value.end - 1] ? $.value[X.value.end - 1]?.text : "",
1979
- max: G.value,
1980
- min: 0,
1981
- minimap: Vn.value,
1982
- minimapCompact: P.value.style.chart.zoom.minimap.compact,
1983
- minimapFrameColor: P.value.style.chart.zoom.minimap.frameColor,
1984
- minimapIndicatorColor: P.value.style.chart.zoom.minimap.indicatorColor,
1985
- minimapLineColor: P.value.style.chart.zoom.minimap.lineColor,
1986
- minimapMerged: P.value.style.chart.zoom.minimap.merged,
1987
- minimapSelectedColor: P.value.style.chart.zoom.minimap.selectedColor,
1988
- minimapSelectedColorOpacity: P.value.style.chart.zoom.minimap.selectedColorOpacity,
1989
- minimapSelectedIndex: T.value,
1990
- minimapSelectionRadius: P.value.style.chart.zoom.minimap.selectionRadius,
1991
- preciseLabels: Or.value?.length ? Or.value : $.value,
1992
- refreshEndPoint: P.value.style.chart.zoom.endIndex === null ? G.value : P.value.style.chart.zoom.endIndex + 1,
1993
- refreshStartPoint: P.value.style.chart.zoom.startIndex === null ? 0 : P.value.style.chart.zoom.startIndex,
1994
- selectColor: P.value.style.chart.zoom.highlightColor,
1995
- selectedSeries: J.value,
1996
- smoothMinimap: P.value.style.chart.zoom.minimap.smooth,
1997
- start: X.value.start,
1998
- timeLabels: $.value,
1999
- usePreciseLabels: P.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !P.value.style.chart.zoom.useDefaultFormat,
2000
- textColor: P.value.style.chart.color,
2001
- useResetSlot: P.value.style.chart.zoom.useResetSlot,
2002
- valueEnd: X.value.end,
2003
- valueStart: X.value.start,
2004
- verticalHandles: P.value.style.chart.zoom.minimap.verticalHandles,
2005
- maxWidth: P.value.style.chart.zoom.maxWidth,
2006
- minimapLeftInsetRatio: K.value.canvasWidth > 0 && P.value.style.chart.zoom.autoFit ? K.value.left / K.value.canvasWidth : null,
2007
- minimapRightInsetRatio: K.value.canvasWidth > 0 && P.value.style.chart.zoom.autoFit ? (K.value.canvasWidth - K.value.right) / K.value.canvasWidth : null,
2008
- additionalMinimapHeight: P.value.style.chart.zoom.minimap.additionalHeight,
2009
- handleType: P.value.style.chart.zoom.minimap.handleType,
2010
- handleIconColor: P.value.style.chart.zoom.minimap.handleIconColor,
2011
- handleBorderWidth: P.value.style.chart.zoom.minimap.handleBorderWidth,
2012
- handleBorderColor: P.value.style.chart.zoom.minimap.handleBorderColor,
2013
- handleFill: P.value.style.chart.zoom.minimap.handleFill,
2014
- handleWidth: P.value.style.chart.zoom.minimap.handleWidth,
2015
- onFutureEnd: n[1] ||= (e) => ur("end", e),
2016
- onFutureStart: n[2] ||= (e) => ur("start", e),
2017
- onReset: n[3] ||= () => cr({
2018
- force: !0,
2019
- publish: !0
2020
- }),
2021
- onTrapMouse: jn,
2022
- "onUpdate:end": mr,
2023
- "onUpdate:start": pr
2024
- }, {
2025
- "reset-action": x(({ reset: e }) => [v(t.$slots, "reset-action", h(m({ reset: e })), void 0, !0)]),
2026
- _: 3
2027
- }, 8, /* @__PURE__ */ "allMinimaps.background.borderColor.customFormat.cutNullValues.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.immediate.inputColor.isPreview.labelLeft.labelRight.max.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapLineColor.minimapMerged.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.minimapSelectionRadius.preciseLabels.refreshEndPoint.refreshStartPoint.selectColor.selectedSeries.smoothMinimap.start.timeLabels.usePreciseLabels.textColor.useResetSlot.valueEnd.valueStart.verticalHandles.maxWidth.minimapLeftInsetRatio.minimapRightInsetRatio.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth".split("."))) : f("", !0),
2028
- p("div", { id: `legend-bottom-${jt.value}` }, null, 8, vt),
2029
- Yt.value && (P.value.style.chart.legend.show || t.$slots.legend) ? (g(), Ge(We, {
2030
- key: 3,
2031
- to: P.value.style.chart.legend.position === "top" ? `#legend-top-${jt.value}` : `#legend-bottom-${jt.value}`
2032
- }, [p("div", {
2033
- ref_key: "chartLegend",
2034
- ref: Ut
2035
- }, [v(t.$slots, "legend", { legend: ki.value }, () => [P.value.style.chart.legend.show && M.value ? (g(), Ge(He, {
2036
- legendSet: ki.value,
2037
- config: Ai.value,
2038
- key: `legend_${Jt.value}`,
2039
- isCursorPointer: un.value,
2040
- onClickMarker: n[4] ||= ({ i: e }) => Ti(e)
2041
- }, {
2042
- item: x(({ legend: e, index: t }) => [p("div", {
2043
- onClick: (t) => e.segregate(),
2044
- style: et(`opacity:${E.value.includes(t) ? .5 : 1}`)
2045
- }, at(e.name), 13, yt)]),
2046
- legendToggle: x(() => [ki.value.length > 2 && P.value.style.chart.legend.selectAllToggle.show && !y(pn) ? (g(), Ge(ze, {
2047
- key: 0,
2048
- backgroundColor: P.value.style.chart.legend.selectAllToggle.backgroundColor,
2049
- color: P.value.style.chart.legend.selectAllToggle.color,
2050
- fontSize: P.value.style.chart.legend.fontSize,
2051
- checked: E.value.length > 0,
2052
- isCursorPointer: un.value,
2053
- onToggle: wi
2054
- }, null, 8, [
2055
- "backgroundColor",
2056
- "color",
2057
- "fontSize",
2058
- "checked",
2059
- "isCursorPointer"
2060
- ])) : f("", !0)]),
2061
- _: 1
2062
- }, 8, [
2063
- "legendSet",
2064
- "config",
2065
- "isCursorPointer"
2066
- ])) : f("", !0)], !0)], 512)], 8, ["to"])) : f("", !0),
2067
- t.$slots.watermark ? (g(), Ke("div", bt, [v(t.$slots, "watermark", h(m({ isPrinting: y(wn) || y(Tn) || tn.value })), void 0, !0)])) : f("", !0),
2068
- t.$slots.source ? (g(), Ke("div", {
2069
- key: 5,
2070
- ref_key: "source",
2071
- ref: Gt,
2072
- dir: "auto"
2073
- }, [v(t.$slots, "source", {}, void 0, !0)], 512)) : f("", !0),
2074
- M.value && F.value.buttons.table ? (g(), Ge(rt(Hi.value.component), Ze({ key: 6 }, Hi.value.props, {
2075
- ref_key: "tableUnit",
2076
- ref: Xt,
2077
- onClose: Ui
2078
- }), qe({
2079
- content: x(() => [(g(), Ge(y(wt), {
2080
- key: `table_${qt.value}`,
2081
- colNames: ji.value.colNames,
2082
- head: ji.value.head,
2083
- body: ji.value.body,
2084
- config: ji.value.config,
2085
- title: P.value.table.useDialog ? "" : Hi.value.title,
2086
- withCloseButton: !P.value.table.useDialog,
2087
- isCursorPointer: un.value,
2088
- onClose: Ui
2089
- }, {
2090
- th: x(({ th: e }) => [e === "__SUM__" ? (g(), Ke("div", xt, [Ye(Ie, {
2091
- name: "sigma",
2092
- stroke: ji.value.config.th.color,
2093
- size: 16
2094
- }, null, 8, ["stroke"])])) : (g(), Ke("div", St, at(e), 1))]),
2095
- td: x(({ td: e }) => [Je(at(e), 1)]),
2096
- _: 1
2097
- }, 8, [
2098
- "colNames",
2099
- "head",
2100
- "body",
2101
- "config",
2102
- "title",
2103
- "withCloseButton",
2104
- "isCursorPointer"
2105
- ]))]),
2106
- _: 2
2107
- }, [P.value.table.useDialog ? {
2108
- name: "title",
2109
- fn: x(() => [Je(at(Hi.value.title), 1)]),
2110
- key: "0"
2111
- } : void 0, P.value.table.useDialog ? {
2112
- name: "actions",
2113
- fn: x(() => [p("button", {
2114
- tabindex: "0",
2115
- class: "vue-ui-user-options-button",
2116
- onClick: n[5] ||= (e) => Ni(F.value.callbacks.csv),
2117
- style: et({ cursor: un.value ? "pointer" : "default" })
2118
- }, [Ye(Ie, {
2119
- name: "fileCsv",
2120
- stroke: Hi.value.props.color
2121
- }, null, 8, ["stroke"])], 4)]),
2122
- key: "1"
2123
- } : void 0]), 1040)) : f("", !0),
2124
- F.value.buttons.annotator && Y.value.length ? (g(), Ge(y(Et), {
2125
- key: 7,
2126
- parent: Mt.value,
2127
- backgroundColor: P.value.style.chart.backgroundColor,
2128
- color: P.value.style.chart.color,
2129
- active: zi.value,
2130
- isCursorPointer: un.value,
2131
- onClose: Bi
2132
- }, {
2133
- "annotator-action-close": x(() => [v(t.$slots, "annotator-action-close", {}, void 0, !0)]),
2134
- "annotator-action-color": x(({ color: e }) => [v(t.$slots, "annotator-action-color", h(m({ color: e })), void 0, !0)]),
2135
- "annotator-action-draw": x(({ mode: e }) => [v(t.$slots, "annotator-action-draw", h(m({ mode: e })), void 0, !0)]),
2136
- "annotator-action-undo": x(({ disabled: e }) => [v(t.$slots, "annotator-action-undo", h(m({ disabled: e })), void 0, !0)]),
2137
- "annotator-action-redo": x(({ disabled: e }) => [v(t.$slots, "annotator-action-redo", h(m({ disabled: e })), void 0, !0)]),
2138
- "annotator-action-delete": x(({ disabled: e }) => [v(t.$slots, "annotator-action-delete", h(m({ disabled: e })), void 0, !0)]),
2139
- _: 3
2140
- }, 8, [
2141
- "parent",
2142
- "backgroundColor",
2143
- "color",
2144
- "active",
2145
- "isCursorPointer"
2146
- ])) : f("", !0)
2147
- ], 46, ut));
2148
- }
2149
- }, [["__scopeId", "data-v-f2325178"]]);
2150
- //#endregion
2151
- export { lt as n, Ct as t };