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