vue-data-ui 3.19.9 → 3.20.1

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