vue-data-ui 3.17.13 → 3.18.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 (493) hide show
  1. package/README.md +1 -1
  2. package/dist/A11yDataTable-q2-8fSlJ.js +45 -0
  3. package/dist/Arrow-Cj6W6Xbi.js +116 -0
  4. package/dist/BaseDraggableDialog-BQcmQAK5.js +272 -0
  5. package/dist/BaseIcon-CEmt3Ifx.js +499 -0
  6. package/dist/BaseLegendToggle-DUIqQmwM.js +56 -0
  7. package/dist/BaseScanner-C7dmAref.js +27 -0
  8. package/dist/BaseZoomControls-Ce1yqas1.js +111 -0
  9. package/dist/ColorPicker-DS_QkH3W.js +255 -0
  10. package/dist/DataTable-BvDJEAma.js +150 -0
  11. package/dist/Legend-Gg5Q4Clb.js +114 -0
  12. package/dist/NonSvgPenAndPaper-D4Gh7O43.js +577 -0
  13. package/dist/PackageVersion-DhDKg-ez.js +11 -0
  14. package/dist/PenAndPaper-DwpL8Z0l.js +461 -0
  15. package/dist/RecursiveCircles-DPpLel6f.js +117 -0
  16. package/dist/RecursiveLabels-DBMJf_to.js +56 -0
  17. package/dist/RecursiveLinks-D06dBL4a.js +78 -0
  18. package/dist/Shape-DEGOZ6GG.js +141 -0
  19. package/dist/Slicer-BlfyiHHD.js +1144 -0
  20. package/dist/SlicerPreview-BPS8mYO2.js +1523 -0
  21. package/dist/SparkTooltip-c2DL7gqD.js +93 -0
  22. package/dist/Title-__gWq2g6.js +87 -0
  23. package/dist/Tooltip-B7lmdbac.js +307 -0
  24. package/dist/UserOptions-DMw8EZEo.js +1407 -0
  25. package/dist/_plugin-vue_export-helper-Dq1MygBL.js +8 -0
  26. package/dist/canvas-lib-DTaADQOK.js +79 -0
  27. package/dist/components/arrow.js +2 -5
  28. package/dist/components/vue-ui-3d-bar.js +2 -5
  29. package/dist/components/vue-ui-accordion.js +2 -5
  30. package/dist/components/vue-ui-age-pyramid.js +2 -5
  31. package/dist/components/vue-ui-annotator.js +2 -5
  32. package/dist/components/vue-ui-bullet.js +2 -5
  33. package/dist/components/vue-ui-bump.js +2 -5
  34. package/dist/components/vue-ui-candlestick.js +2 -5
  35. package/dist/components/vue-ui-carousel-table.js +2 -5
  36. package/dist/components/vue-ui-chestnut.js +2 -5
  37. package/dist/components/vue-ui-chord.js +2 -5
  38. package/dist/components/vue-ui-circle-pack.js +2 -5
  39. package/dist/components/vue-ui-cursor.js +2 -5
  40. package/dist/components/vue-ui-dag.js +2 -5
  41. package/dist/components/vue-ui-dashboard.js +2 -5
  42. package/dist/components/vue-ui-digits.js +2 -5
  43. package/dist/components/vue-ui-donut-evolution.js +2 -5
  44. package/dist/components/vue-ui-donut.js +2 -5
  45. package/dist/components/vue-ui-dumbbell.js +2 -5
  46. package/dist/components/vue-ui-flow.js +2 -5
  47. package/dist/components/vue-ui-funnel.js +2 -5
  48. package/dist/components/vue-ui-galaxy.js +2 -5
  49. package/dist/components/vue-ui-gauge.js +2 -5
  50. package/dist/components/vue-ui-geo.js +2 -5
  51. package/dist/components/vue-ui-gizmo.js +2 -5
  52. package/dist/components/vue-ui-heatmap.js +2 -5
  53. package/dist/components/vue-ui-history-plot.js +2 -5
  54. package/dist/components/vue-ui-horizontal-bar.js +2 -5
  55. package/dist/components/vue-ui-icon.js +2 -5
  56. package/dist/components/vue-ui-kpi.js +2 -5
  57. package/dist/components/vue-ui-mini-loader.js +2 -5
  58. package/dist/components/vue-ui-molecule.js +2 -5
  59. package/dist/components/vue-ui-mood-radar.js +2 -5
  60. package/dist/components/vue-ui-nested-donuts.js +2 -5
  61. package/dist/components/vue-ui-onion.js +2 -5
  62. package/dist/components/vue-ui-parallel-coordinate-plot.js +2 -5
  63. package/dist/components/vue-ui-pattern-seed.js +2 -5
  64. package/dist/components/vue-ui-pattern.js +2 -5
  65. package/dist/components/vue-ui-quadrant.js +2 -5
  66. package/dist/components/vue-ui-quick-chart.js +2 -5
  67. package/dist/components/vue-ui-radar.js +2 -5
  68. package/dist/components/vue-ui-rating.js +2 -5
  69. package/dist/components/vue-ui-relation-circle.js +2 -5
  70. package/dist/components/vue-ui-ridgeline.js +2 -5
  71. package/dist/components/vue-ui-rings.js +2 -5
  72. package/dist/components/vue-ui-scatter.js +2 -5
  73. package/dist/components/vue-ui-skeleton.js +2 -5
  74. package/dist/components/vue-ui-smiley.js +2 -5
  75. package/dist/components/vue-ui-spark-trend.js +2 -5
  76. package/dist/components/vue-ui-sparkbar.js +2 -5
  77. package/dist/components/vue-ui-sparkgauge.js +2 -5
  78. package/dist/components/vue-ui-sparkhistogram.js +2 -5
  79. package/dist/components/vue-ui-sparkline.js +2 -5
  80. package/dist/components/vue-ui-sparkstackbar.js +2 -5
  81. package/dist/components/vue-ui-stackbar.js +2 -5
  82. package/dist/components/vue-ui-stackline.js +2 -5
  83. package/dist/components/vue-ui-strip-plot.js +2 -5
  84. package/dist/components/vue-ui-table-heatmap.js +2 -5
  85. package/dist/components/vue-ui-table-sparkline.js +2 -5
  86. package/dist/components/vue-ui-table.js +2 -5
  87. package/dist/components/vue-ui-thermometer.js +2 -5
  88. package/dist/components/vue-ui-timer.js +2 -5
  89. package/dist/components/vue-ui-tiremarks.js +2 -5
  90. package/dist/components/vue-ui-treemap.js +2 -5
  91. package/dist/components/vue-ui-vertical-bar.js +2 -5
  92. package/dist/components/vue-ui-waffle.js +2 -5
  93. package/dist/components/vue-ui-wheel.js +2 -5
  94. package/dist/components/vue-ui-word-cloud.js +2 -5
  95. package/dist/components/vue-ui-world.js +2 -5
  96. package/dist/components/vue-ui-xy-canvas.js +2 -5
  97. package/dist/components/vue-ui-xy.js +2 -5
  98. package/dist/dom-to-png-9WSt6hXe.js +237 -0
  99. package/dist/exposedLib-CwWU4zv-.js +19 -0
  100. package/dist/geoProjections-CQIkC70z.js +146 -0
  101. package/dist/img-BjOr008R.js +74 -0
  102. package/dist/labelUtils-Cr97N8E1.js +19 -0
  103. package/dist/lib-BkiwukKO.js +1879 -0
  104. package/dist/patternUtils-B7BWu5bV.js +258 -0
  105. package/dist/pdf-DSXSFUnK.js +90 -0
  106. package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
  107. package/dist/style.css +2 -1
  108. package/dist/types/arrow.d.ts +1 -1
  109. package/dist/types/utils.d.ts +23 -0
  110. package/dist/types/vue-data-ui.d.ts +4775 -627
  111. package/dist/types/vue-ui-3d-bar.d.ts +64 -9
  112. package/dist/types/vue-ui-accordion.d.ts +4 -3
  113. package/dist/types/vue-ui-age-pyramid.d.ts +79 -9
  114. package/dist/types/vue-ui-annotator.d.ts +3 -5
  115. package/dist/types/vue-ui-bullet.d.ts +60 -9
  116. package/dist/types/vue-ui-bump.d.ts +65 -9
  117. package/dist/types/vue-ui-candlestick.d.ts +83 -9
  118. package/dist/types/vue-ui-carousel-table.d.ts +36 -6
  119. package/dist/types/vue-ui-chestnut.d.ts +66 -9
  120. package/dist/types/vue-ui-chord.d.ts +78 -9
  121. package/dist/types/vue-ui-circle-pack.d.ts +86 -9
  122. package/dist/types/vue-ui-cursor.d.ts +4 -2
  123. package/dist/types/vue-ui-dag.d.ts +92 -9
  124. package/dist/types/vue-ui-dashboard.d.ts +43 -6
  125. package/dist/types/vue-ui-digits.d.ts +4 -2
  126. package/dist/types/vue-ui-donut-evolution.d.ts +70 -9
  127. package/dist/types/vue-ui-donut.d.ts +92 -9
  128. package/dist/types/vue-ui-dumbbell.d.ts +65 -9
  129. package/dist/types/vue-ui-flow.d.ts +79 -9
  130. package/dist/types/vue-ui-funnel.d.ts +55 -9
  131. package/dist/types/vue-ui-galaxy.d.ts +83 -9
  132. package/dist/types/vue-ui-gauge.d.ts +64 -9
  133. package/dist/types/vue-ui-geo.d.ts +71 -9
  134. package/dist/types/vue-ui-gizmo.d.ts +17 -6
  135. package/dist/types/vue-ui-heatmap.d.ts +73 -9
  136. package/dist/types/vue-ui-history-plot.d.ts +82 -9
  137. package/dist/types/vue-ui-horizontal-bar.d.ts +84 -9
  138. package/dist/types/vue-ui-icon.d.ts +2 -2
  139. package/dist/types/vue-ui-kpi.d.ts +21 -7
  140. package/dist/types/vue-ui-mini-loader.d.ts +5 -3
  141. package/dist/types/vue-ui-molecule.d.ts +86 -9
  142. package/dist/types/vue-ui-mood-radar.d.ts +66 -9
  143. package/dist/types/vue-ui-nested-donuts.d.ts +80 -9
  144. package/dist/types/vue-ui-onion.d.ts +77 -9
  145. package/dist/types/vue-ui-parallel-coordinate-plot.d.ts +92 -9
  146. package/dist/types/vue-ui-pattern-seed.d.ts +1 -1
  147. package/dist/types/vue-ui-pattern.d.ts +2 -2
  148. package/dist/types/vue-ui-quadrant.d.ts +86 -9
  149. package/dist/types/vue-ui-quick-chart.d.ts +79 -9
  150. package/dist/types/vue-ui-radar.d.ts +83 -9
  151. package/dist/types/vue-ui-rating.d.ts +22 -6
  152. package/dist/types/vue-ui-relation-circle.d.ts +66 -9
  153. package/dist/types/vue-ui-ridgeline.d.ts +69 -9
  154. package/dist/types/vue-ui-rings.d.ts +70 -9
  155. package/dist/types/vue-ui-scatter.d.ts +67 -9
  156. package/dist/types/vue-ui-skeleton.d.ts +3 -2
  157. package/dist/types/vue-ui-smiley.d.ts +3 -2
  158. package/dist/types/vue-ui-spark-trend.d.ts +14 -6
  159. package/dist/types/vue-ui-sparkbar.d.ts +27 -6
  160. package/dist/types/vue-ui-sparkgauge.d.ts +20 -6
  161. package/dist/types/vue-ui-sparkhistogram.d.ts +24 -6
  162. package/dist/types/vue-ui-sparkline.d.ts +35 -6
  163. package/dist/types/vue-ui-sparkstackbar.d.ts +35 -6
  164. package/dist/types/vue-ui-stackbar.d.ts +85 -9
  165. package/dist/types/vue-ui-stackline.d.ts +81 -9
  166. package/dist/types/vue-ui-strip-plot.d.ts +66 -9
  167. package/dist/types/vue-ui-table-heatmap.d.ts +52 -6
  168. package/dist/types/vue-ui-table-sparkline.d.ts +30 -6
  169. package/dist/types/vue-ui-table.d.ts +10 -2
  170. package/dist/types/vue-ui-thermometer.d.ts +46 -9
  171. package/dist/types/vue-ui-timer.d.ts +31 -5
  172. package/dist/types/vue-ui-tiremarks.d.ts +46 -9
  173. package/dist/types/vue-ui-treemap.d.ts +73 -9
  174. package/dist/types/vue-ui-vertical-bar.d.ts +2 -2
  175. package/dist/types/vue-ui-waffle.d.ts +72 -9
  176. package/dist/types/vue-ui-wheel.d.ts +46 -9
  177. package/dist/types/vue-ui-word-cloud.d.ts +73 -9
  178. package/dist/types/vue-ui-world.d.ts +68 -9
  179. package/dist/types/vue-ui-xy-canvas.d.ts +75 -9
  180. package/dist/types/vue-ui-xy.d.ts +108 -10
  181. package/dist/useAutoSizeLabelsInsideViewbox-dp-3Gg97.js +50 -0
  182. package/dist/useChartAccessibility-Do37qcw2.js +12 -0
  183. package/dist/useConfig-BV0kTCnO.js +7431 -0
  184. package/dist/useFitSvgText-C-MEdAfe.js +63 -0
  185. package/dist/useNestedProp-Ck4hsrpu.js +10 -0
  186. package/dist/useObjectBindings-Ce_ZZk-f.js +189 -0
  187. package/dist/usePanZoom-B-4M_gmY.js +157 -0
  188. package/dist/usePrefersMotion-BywLbIko.js +15 -0
  189. package/dist/usePrinter-X0yWOynH.js +49 -0
  190. package/dist/useResponsive-CrAInupd.js +19 -0
  191. package/dist/useStableElementSize-0I1IpHPl.js +77 -0
  192. package/dist/useSvgExport-Dtu973wa.js +755 -0
  193. package/dist/useTableResponsive-DrM1xqII.js +24 -0
  194. package/dist/useThemeCheck-rFK9Zlb_.js +24 -0
  195. package/dist/useTimeLabelCollider-Dm55Emzg.js +57 -0
  196. package/dist/useTimeLabels-C0x7zUXP.js +272 -0
  197. package/dist/useUserOptionState-CjPJPTg2.js +15 -0
  198. package/dist/utils.js +27 -44
  199. package/dist/vClickOutside-CbX_bC9A.js +13 -0
  200. package/dist/vue-data-ui-DIh8ayZc.js +274 -0
  201. package/dist/vue-data-ui.js +76 -167
  202. package/dist/vue-ui-3d-bar-BZ8_6ylo.js +1747 -0
  203. package/dist/vue-ui-accordion-cVv18nTV.js +81 -0
  204. package/dist/vue-ui-age-pyramid-BR3i-CgS.js +1226 -0
  205. package/dist/vue-ui-annotator-B9mA_PlF.js +2899 -0
  206. package/dist/vue-ui-bullet-ByJdNLVf.js +700 -0
  207. package/dist/vue-ui-bump-Ps1gkA-F.js +1239 -0
  208. package/dist/vue-ui-candlestick-0C1QFoV4.js +1802 -0
  209. package/dist/vue-ui-carousel-table-1P28pCRK.js +445 -0
  210. package/dist/vue-ui-chestnut-CJOCGWwX.js +2000 -0
  211. package/dist/vue-ui-chord-BpiVJCCm.js +1381 -0
  212. package/dist/vue-ui-circle-pack-C3wvXz1f.js +1183 -0
  213. package/dist/vue-ui-cursor-CNn_3b24.js +283 -0
  214. package/dist/vue-ui-dag-DRVXVCJV.js +2899 -0
  215. package/dist/vue-ui-dashboard-gOXyms0o.js +503 -0
  216. package/dist/vue-ui-digits-DIKyN3z6.js +209 -0
  217. package/dist/vue-ui-donut-RogzKj0G.js +2396 -0
  218. package/dist/vue-ui-donut-evolution-Bxz06Qqf.js +1490 -0
  219. package/dist/vue-ui-dumbbell-D10T4gmB.js +1517 -0
  220. package/dist/vue-ui-flow-OK563Z46.js +1223 -0
  221. package/dist/vue-ui-funnel-nWmbiJu5.js +767 -0
  222. package/dist/vue-ui-galaxy-CtaTlHWZ.js +1062 -0
  223. package/dist/vue-ui-gauge-DWTEHJqX.js +910 -0
  224. package/dist/vue-ui-geo-DUpWvv5m.js +1504 -0
  225. package/dist/vue-ui-gizmo-vddzP4dM.js +225 -0
  226. package/dist/vue-ui-heatmap-CUE_zJQa.js +1556 -0
  227. package/dist/vue-ui-history-plot-CcRg_NgJ.js +1551 -0
  228. package/dist/vue-ui-horizontal-bar-DX5aZOEn.js +1669 -0
  229. package/dist/vue-ui-kpi-B74v84Hu.js +96 -0
  230. package/dist/vue-ui-mini-loader-BcCG6Yqb.js +125 -0
  231. package/dist/vue-ui-molecule-CVdB8rxf.js +912 -0
  232. package/dist/vue-ui-mood-radar-CWDVBOck.js +1138 -0
  233. package/dist/vue-ui-nested-donuts-Be8b5d81.js +1472 -0
  234. package/dist/vue-ui-onion-Cs90yQQZ.js +1188 -0
  235. package/dist/vue-ui-parallel-coordinate-plot-D-mZdTop.js +1413 -0
  236. package/dist/vue-ui-pattern-Bj-IPFr2.js +154 -0
  237. package/dist/vue-ui-pattern-seed-abRweCDE.js +61 -0
  238. package/dist/vue-ui-quadrant-DLD_ZR9M.js +1966 -0
  239. package/dist/vue-ui-quick-chart-UWjZdmzt.js +2459 -0
  240. package/dist/vue-ui-radar-Bxu07MOG.js +1214 -0
  241. package/dist/vue-ui-rating-DA9Bmfyb.js +343 -0
  242. package/dist/vue-ui-relation-circle-O5s1UJtt.js +914 -0
  243. package/dist/vue-ui-ridgeline-C3siN0d_.js +1612 -0
  244. package/dist/vue-ui-rings-DVVDtwhB.js +1231 -0
  245. package/dist/vue-ui-scatter-Cfvh06OC.js +2380 -0
  246. package/dist/vue-ui-skeleton-CxTmGCQp.js +2556 -0
  247. package/dist/vue-ui-smiley-B6nc7b71.js +356 -0
  248. package/dist/vue-ui-spark-trend--39vutfQ.js +438 -0
  249. package/dist/vue-ui-sparkbar-DhCRNOu4.js +393 -0
  250. package/dist/vue-ui-sparkgauge-6Igkqlqs.js +255 -0
  251. package/dist/vue-ui-sparkhistogram-BLEzZSZi.js +560 -0
  252. package/dist/vue-ui-sparkline-ppwKM4aO.js +1503 -0
  253. package/dist/vue-ui-sparkstackbar-uIzSq9Wh.js +660 -0
  254. package/dist/vue-ui-stackbar-CdOkMCbI.js +2235 -0
  255. package/dist/vue-ui-stackline-DifD9OXC.js +2362 -0
  256. package/dist/vue-ui-strip-plot-D1LjIVqK.js +1328 -0
  257. package/dist/vue-ui-table-WDkEyyQ0.js +1338 -0
  258. package/dist/vue-ui-table-heatmap-CfGJVzI3.js +334 -0
  259. package/dist/vue-ui-table-sparkline-BEWWP4Rq.js +697 -0
  260. package/dist/vue-ui-thermometer-CFWOAB8K.js +753 -0
  261. package/dist/vue-ui-timer-D1DQyf9i.js +439 -0
  262. package/dist/vue-ui-tiremarks-IeM3BlPW.js +542 -0
  263. package/dist/vue-ui-treemap-BGZM7ibv.js +1575 -0
  264. package/dist/vue-ui-waffle-a3dFVBk4.js +1350 -0
  265. package/dist/vue-ui-wheel-OnIRQJ8a.js +875 -0
  266. package/dist/vue-ui-word-cloud-C9SkyutR.js +1644 -0
  267. package/dist/vue-ui-world-CEevuFbk.js +14252 -0
  268. package/dist/vue-ui-xy-1hee-IEM.js +4114 -0
  269. package/dist/vue-ui-xy-canvas-D2f0d45c.js +1774 -0
  270. package/dist/vue_ui_3d_bar-CXKqO5Ej.js +185 -0
  271. package/dist/vue_ui_age_pyramid-BON8QI6X.js +301 -0
  272. package/dist/vue_ui_bullet-CE5sFT7u.js +186 -0
  273. package/dist/vue_ui_bump-frnXaXul.js +201 -0
  274. package/dist/vue_ui_candlestick-sY6UtOop.js +374 -0
  275. package/dist/vue_ui_chestnut-BiUZFv40.js +305 -0
  276. package/dist/vue_ui_chord-DpyR_b9A.js +275 -0
  277. package/dist/vue_ui_circle_pack-DBKz_Fi_.js +130 -0
  278. package/dist/vue_ui_dag-Ci_MOnvd.js +258 -0
  279. package/dist/vue_ui_donut-Cx2_BGcQ.js +358 -0
  280. package/dist/vue_ui_donut_evolution-CAJefrHs.js +717 -0
  281. package/dist/vue_ui_dumbbell-CClzAZTN.js +304 -0
  282. package/dist/vue_ui_flow-CCHO1Lo9.js +238 -0
  283. package/dist/vue_ui_funnel-h8q2mRpC.js +234 -0
  284. package/dist/vue_ui_galaxy-70vtkEBw.js +265 -0
  285. package/dist/vue_ui_gauge-C17CgfzN.js +178 -0
  286. package/dist/vue_ui_geo-C0UbQ0Lc.js +248 -0
  287. package/dist/vue_ui_heatmap-BqPP3J4M.js +319 -0
  288. package/dist/vue_ui_history_plot-C5nytDHh.js +413 -0
  289. package/dist/vue_ui_horizontal_bar-Bqxorkc_.js +341 -0
  290. package/dist/vue_ui_molecule-Dka4JBOp.js +231 -0
  291. package/dist/vue_ui_mood_radar-Dg4ijm53.js +281 -0
  292. package/dist/vue_ui_nested_donuts-BY9cOoHF.js +273 -0
  293. package/dist/vue_ui_onion-DTV9cup-.js +293 -0
  294. package/dist/vue_ui_parallel_coordinate_plot-CNWrDh96.js +278 -0
  295. package/dist/vue_ui_quadrant-3kjYvxpj.js +428 -0
  296. package/dist/vue_ui_quick_chart--VaYQuM4.js +139 -0
  297. package/dist/vue_ui_radar-Dxx9GJmj.js +306 -0
  298. package/dist/vue_ui_relation_circle-Cr0I2SoU.js +98 -0
  299. package/dist/vue_ui_ridgeline-CAtYca4b.js +767 -0
  300. package/dist/vue_ui_rings-DXC1VeX5.js +320 -0
  301. package/dist/vue_ui_scatter-D2S2j0ap.js +479 -0
  302. package/dist/vue_ui_spark_trend-BHMQ6_1p.js +82 -0
  303. package/dist/vue_ui_sparkbar-BR6hbuDE.js +64 -0
  304. package/dist/vue_ui_sparkgauge-xfPRHnMv.js +90 -0
  305. package/dist/vue_ui_sparkhistogram-CJRENZ1C.js +123 -0
  306. package/dist/vue_ui_sparkline-wgk7yO7E.js +151 -0
  307. package/dist/vue_ui_sparkstackbar-C5qZMmAl.js +175 -0
  308. package/dist/vue_ui_stackbar-BW_C3MXw.js +412 -0
  309. package/dist/vue_ui_stackline-DpI2LnjO.js +426 -0
  310. package/dist/vue_ui_strip_plot-8ZelqC5b.js +301 -0
  311. package/dist/vue_ui_table_heatmap-BGUjA0WA.js +80 -0
  312. package/dist/vue_ui_table_sparkline-i0Q-N_we.js +124 -0
  313. package/dist/vue_ui_thermometer-CuN7Gpez.js +123 -0
  314. package/dist/vue_ui_tiremarks-A6UHC0c3.js +122 -0
  315. package/dist/vue_ui_treemap-BQp06q-g.js +328 -0
  316. package/dist/vue_ui_vertical_bar-CJSD1FZS.js +247 -0
  317. package/dist/vue_ui_waffle-C_Ev4l7B.js +292 -0
  318. package/dist/vue_ui_wheel-DdkTPXJU.js +133 -0
  319. package/dist/vue_ui_word_cloud-B1PbsYPc.js +254 -0
  320. package/dist/vue_ui_xy-BYPqfYyx.js +482 -0
  321. package/dist/vue_ui_xy_canvas-CMHGNrLf.js +408 -0
  322. package/package.json +7 -7
  323. package/dist/A11yDataTable-BpmuNomI.js +0 -54
  324. package/dist/Arrow-dSvLFssU.js +0 -101
  325. package/dist/BaseDraggableDialog-Di8Hlru3.js +0 -249
  326. package/dist/BaseIcon-DX0hTWa-.js +0 -476
  327. package/dist/BaseLegendToggle-cMP8M2u0.js +0 -47
  328. package/dist/BaseScanner-C2j3TsSY.js +0 -36
  329. package/dist/BaseZoomControls-CVSC1-SU.js +0 -123
  330. package/dist/ColorPicker-bAxGcXK0.js +0 -271
  331. package/dist/DataTable-cMnb68Ik.js +0 -145
  332. package/dist/Legend-DGN5lY60.js +0 -104
  333. package/dist/NonSvgPenAndPaper-B6E0zEYe.js +0 -573
  334. package/dist/PackageVersion-BfrCAH6_.js +0 -10
  335. package/dist/PenAndPaper-CJDoB5H9.js +0 -527
  336. package/dist/RecursiveCircles-BE6GoMmo.js +0 -101
  337. package/dist/RecursiveLabels-BhQMS9Sm.js +0 -55
  338. package/dist/RecursiveLinks-BDwyYfP-.js +0 -83
  339. package/dist/Shape-CxJ5_Rre.js +0 -116
  340. package/dist/Slicer-D7UcO8sN.js +0 -1145
  341. package/dist/SlicerPreview-D_CgrN_7.js +0 -1580
  342. package/dist/SparkTooltip-D4bM-kfz.js +0 -68
  343. package/dist/Title-BbKoiBk2.js +0 -88
  344. package/dist/Tooltip-Cvt7Fi0Q.js +0 -299
  345. package/dist/UserOptions-DVduN6X7.js +0 -1474
  346. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  347. package/dist/dom-to-png-DGvx6i5V.js +0 -262
  348. package/dist/exposedLib-sJvY1pST.js +0 -22
  349. package/dist/geoProjections-BFq2sOBY.js +0 -162
  350. package/dist/img-CjTQXS0U.js +0 -57
  351. package/dist/labelUtils-DX9oyq3C.js +0 -26
  352. package/dist/lib-DMzrGQHK.js +0 -2477
  353. package/dist/patternUtils-BINhU4Ky.js +0 -615
  354. package/dist/pdf-C4H4o1Cj.js +0 -88
  355. package/dist/useAutoSizeLabelsInsideViewbox-izlGDfwu.js +0 -55
  356. package/dist/useChartAccessibility-cp6XQtqi.js +0 -15
  357. package/dist/useConfig-CG4HT3wS.js +0 -7901
  358. package/dist/useFitSvgText-2crs6Fv5.js +0 -69
  359. package/dist/useNestedProp-DH0BEVVS.js +0 -13
  360. package/dist/useObjectBindings-Dixg-RIe.js +0 -228
  361. package/dist/usePanZoom-BbDhcKWf.js +0 -141
  362. package/dist/usePrefersMotion-Co0nj1eS.js +0 -17
  363. package/dist/usePrinter-C4t8DdQ-.js +0 -51
  364. package/dist/useResponsive-DfdjqQps.js +0 -195
  365. package/dist/useStableElementSize-C48ZVcZQ.js +0 -77
  366. package/dist/useSvgExport-BTG4hVPO.js +0 -870
  367. package/dist/useTableResponsive-BpfiEtzR.js +0 -26
  368. package/dist/useThemeCheck-C9Ccl7U9.js +0 -36
  369. package/dist/useTimeLabelCollider-D3JeJ6Ye.js +0 -86
  370. package/dist/useTimeLabels-Cv0tD9In.js +0 -307
  371. package/dist/useUserOptionState-B7Ej974k.js +0 -19
  372. package/dist/vClickOutside-C6WiFswA.js +0 -13
  373. package/dist/vue-data-ui-D1ZI7Y4l.js +0 -433
  374. package/dist/vue-ui-3d-bar-DEjKYzI5.js +0 -1824
  375. package/dist/vue-ui-accordion-DFtpH_16.js +0 -92
  376. package/dist/vue-ui-age-pyramid-LiC9hTjP.js +0 -1179
  377. package/dist/vue-ui-annotator-DrKnQoHf.js +0 -2991
  378. package/dist/vue-ui-bullet-DdxEINdq.js +0 -769
  379. package/dist/vue-ui-bump-CdgO1V7z.js +0 -1250
  380. package/dist/vue-ui-candlestick-DxJnPwto.js +0 -1775
  381. package/dist/vue-ui-carousel-table-CMefu5TI.js +0 -487
  382. package/dist/vue-ui-chestnut-BnGN72PO.js +0 -2001
  383. package/dist/vue-ui-chord-DWyar45U.js +0 -1457
  384. package/dist/vue-ui-circle-pack-CQ8vF2XH.js +0 -1076
  385. package/dist/vue-ui-cursor-HHOdkmyB.js +0 -260
  386. package/dist/vue-ui-dag-BDWPBElq.js +0 -3209
  387. package/dist/vue-ui-dashboard-Dg_I3X2a.js +0 -627
  388. package/dist/vue-ui-digits-CZmdir8V.js +0 -211
  389. package/dist/vue-ui-donut-BKegKHxj.js +0 -2608
  390. package/dist/vue-ui-donut-evolution-047dE4Lu.js +0 -1578
  391. package/dist/vue-ui-dumbbell-BL4ZMChj.js +0 -1552
  392. package/dist/vue-ui-flow-BAqtyunQ.js +0 -1279
  393. package/dist/vue-ui-funnel-Pl2sEOZs.js +0 -823
  394. package/dist/vue-ui-galaxy-CBF5Wsax.js +0 -1108
  395. package/dist/vue-ui-gauge-COV_S0Vp.js +0 -955
  396. package/dist/vue-ui-geo-CaPXElPf.js +0 -1510
  397. package/dist/vue-ui-gizmo-Csn7up96.js +0 -238
  398. package/dist/vue-ui-heatmap-Cpb0BYLa.js +0 -1694
  399. package/dist/vue-ui-history-plot-ZZEdzFCE.js +0 -1564
  400. package/dist/vue-ui-horizontal-bar-BonPYUZf.js +0 -1735
  401. package/dist/vue-ui-kpi-DoHhSsDK.js +0 -130
  402. package/dist/vue-ui-mini-loader-DOTBVCLE.js +0 -138
  403. package/dist/vue-ui-molecule-mVYnXouV.js +0 -945
  404. package/dist/vue-ui-mood-radar-DPvwnc3z.js +0 -1197
  405. package/dist/vue-ui-nested-donuts-C7E6TXrZ.js +0 -1702
  406. package/dist/vue-ui-onion-BGIlFhGB.js +0 -1207
  407. package/dist/vue-ui-parallel-coordinate-plot-C6G_A9ua.js +0 -1432
  408. package/dist/vue-ui-pattern-mXZW_pvA.js +0 -146
  409. package/dist/vue-ui-pattern-seed-BcNlxb2i.js +0 -36
  410. package/dist/vue-ui-quadrant-CVpIeYOB.js +0 -1918
  411. package/dist/vue-ui-quick-chart-CcV8qn9-.js +0 -2514
  412. package/dist/vue-ui-radar-G4AV1rBo.js +0 -1259
  413. package/dist/vue-ui-rating-CqPlP88P.js +0 -370
  414. package/dist/vue-ui-relation-circle-CkZ8oFVV.js +0 -856
  415. package/dist/vue-ui-ridgeline-CBTyYn6Q.js +0 -1737
  416. package/dist/vue-ui-rings-CSIOqFiP.js +0 -1256
  417. package/dist/vue-ui-scatter-AuC46ufT.js +0 -2345
  418. package/dist/vue-ui-skeleton-YD6rZjY_.js +0 -2475
  419. package/dist/vue-ui-smiley-CY0WFv2j.js +0 -391
  420. package/dist/vue-ui-spark-trend-D8KGIt-R.js +0 -423
  421. package/dist/vue-ui-sparkbar-BjWGJjzN.js +0 -424
  422. package/dist/vue-ui-sparkgauge-Dab5mss7.js +0 -285
  423. package/dist/vue-ui-sparkhistogram-D0rsmiPh.js +0 -559
  424. package/dist/vue-ui-sparkline-BCaauQuX.js +0 -1550
  425. package/dist/vue-ui-sparkstackbar-NT5yD6xA.js +0 -672
  426. package/dist/vue-ui-stackbar-ChBk_A1c.js +0 -2393
  427. package/dist/vue-ui-stackline-Cujamlze.js +0 -2490
  428. package/dist/vue-ui-strip-plot-CGBumG6I.js +0 -1293
  429. package/dist/vue-ui-table-BX2iMku4.js +0 -1726
  430. package/dist/vue-ui-table-heatmap-KXgXYVXm.js +0 -353
  431. package/dist/vue-ui-table-sparkline-C3NWnry0.js +0 -803
  432. package/dist/vue-ui-thermometer-DvdceZB1.js +0 -743
  433. package/dist/vue-ui-timer-XWAbvuAY.js +0 -504
  434. package/dist/vue-ui-tiremarks-B-YI1RlT.js +0 -578
  435. package/dist/vue-ui-treemap-AzorGfmd.js +0 -1757
  436. package/dist/vue-ui-waffle-CKtUvdTE.js +0 -1442
  437. package/dist/vue-ui-wheel-CnsLEArZ.js +0 -908
  438. package/dist/vue-ui-word-cloud-iAme2ihe.js +0 -1644
  439. package/dist/vue-ui-world-D5rrC9rw.js +0 -14452
  440. package/dist/vue-ui-xy-C_Q9chQe.js +0 -4468
  441. package/dist/vue-ui-xy-canvas-DG0299qE.js +0 -2107
  442. package/dist/vue_ui_3d_bar-CL0iX8Qi.js +0 -22
  443. package/dist/vue_ui_age_pyramid-8H8WSL7J.js +0 -22
  444. package/dist/vue_ui_bullet-Ckqieba5.js +0 -22
  445. package/dist/vue_ui_bump-CIht647H.js +0 -22
  446. package/dist/vue_ui_candlestick-BAMn-VGw.js +0 -22
  447. package/dist/vue_ui_chestnut-BloFvDuV.js +0 -22
  448. package/dist/vue_ui_chord-Bc1_ocwK.js +0 -22
  449. package/dist/vue_ui_circle_pack-CLmw8nHe.js +0 -22
  450. package/dist/vue_ui_dag-ZOwuDBZ8.js +0 -22
  451. package/dist/vue_ui_donut-CA4dgV8J.js +0 -22
  452. package/dist/vue_ui_donut_evolution-DFQU-rqE.js +0 -22
  453. package/dist/vue_ui_dumbbell-BCOHDiPk.js +0 -22
  454. package/dist/vue_ui_flow-BErINgox.js +0 -22
  455. package/dist/vue_ui_funnel-yuaMZ-yb.js +0 -22
  456. package/dist/vue_ui_galaxy-D95AN4FT.js +0 -22
  457. package/dist/vue_ui_gauge-BMEuRC4J.js +0 -22
  458. package/dist/vue_ui_geo--kg4VoVX.js +0 -22
  459. package/dist/vue_ui_heatmap-C9u993qE.js +0 -22
  460. package/dist/vue_ui_history_plot-BCKk1CrQ.js +0 -22
  461. package/dist/vue_ui_horizontal_bar-BEagrV0T.js +0 -22
  462. package/dist/vue_ui_molecule-BtvlINUh.js +0 -22
  463. package/dist/vue_ui_mood_radar-BUs6Fdn8.js +0 -22
  464. package/dist/vue_ui_nested_donuts-DvTrWT_C.js +0 -22
  465. package/dist/vue_ui_onion-CxWH9_OZ.js +0 -22
  466. package/dist/vue_ui_parallel_coordinate_plot-DH3cFJ3n.js +0 -22
  467. package/dist/vue_ui_quadrant-DjRs--Uz.js +0 -22
  468. package/dist/vue_ui_quick_chart-DMCjEjPe.js +0 -22
  469. package/dist/vue_ui_radar-DryGBOrz.js +0 -22
  470. package/dist/vue_ui_relation_circle-CCroen7h.js +0 -22
  471. package/dist/vue_ui_ridgeline-j4rVmpEp.js +0 -22
  472. package/dist/vue_ui_rings-CxOrekqA.js +0 -22
  473. package/dist/vue_ui_scatter-Bu1EAy9H.js +0 -22
  474. package/dist/vue_ui_spark_trend-3BjrSprO.js +0 -22
  475. package/dist/vue_ui_sparkbar-BsMzz5Um.js +0 -22
  476. package/dist/vue_ui_sparkgauge-KnjASOZs.js +0 -22
  477. package/dist/vue_ui_sparkhistogram-GBdzIVvS.js +0 -22
  478. package/dist/vue_ui_sparkline-CQ8DJVJx.js +0 -22
  479. package/dist/vue_ui_sparkstackbar-BSexvOuM.js +0 -22
  480. package/dist/vue_ui_stackbar-CuDC4O4b.js +0 -22
  481. package/dist/vue_ui_stackline-QTh-nuxE.js +0 -22
  482. package/dist/vue_ui_strip_plot-B9ypi_F3.js +0 -22
  483. package/dist/vue_ui_table_heatmap-CkvipPVy.js +0 -16
  484. package/dist/vue_ui_table_sparkline-yQdijcyJ.js +0 -22
  485. package/dist/vue_ui_thermometer-BTmjRBH8.js +0 -22
  486. package/dist/vue_ui_tiremarks-DBotWfi8.js +0 -22
  487. package/dist/vue_ui_treemap-D9-AIkT-.js +0 -22
  488. package/dist/vue_ui_vertical_bar-CELc39b8.js +0 -18
  489. package/dist/vue_ui_waffle-M2h-uJQ_.js +0 -22
  490. package/dist/vue_ui_wheel-LqBz3lv4.js +0 -22
  491. package/dist/vue_ui_word_cloud-mKAtBxHR.js +0 -22
  492. package/dist/vue_ui_xy-esktmpg-.js +0 -22
  493. package/dist/vue_ui_xy_canvas-6BBDSowT.js +0 -22
@@ -1,2490 +0,0 @@
1
- import { defineAsyncComponent as ke, useSlots as ps, computed as m, ref as f, shallowRef as qt, onMounted as bs, toRefs as xs, watch as Fe, onBeforeUnmount as Xt, nextTick as Gt, watchEffect as bt, openBlock as i, createElementBlock as v, normalizeStyle as ge, normalizeClass as tl, createElementVNode as le, toDisplayString as fe, createBlock as se, createCommentVNode as b, unref as C, withCtx as P, renderSlot as N, normalizeProps as Q, guardReactiveProps as ee, createSlots as jt, createVNode as Ze, Fragment as R, renderList as X, mergeProps as xt, Teleport as ks, resolveDynamicComponent as ws, createTextVNode as al } from "vue";
2
- import { j as ll, t as sl, m as Ss, p as kt, n as Ms, o as ol, q as nl, r as $s, s as Cs, ar as Qe, E as wt, D as St, I as Ls, c as we, b as Se, F as As, T as Ts, U as Ns, k as et, l as Ce, G as tt, X as Ps, x as zs, u as Is, K as rl, a0 as _s, a1 as Fs, z as Es, A as at, a3 as Rs } from "./lib-DMzrGQHK.js";
3
- import { t as Os, u as Ds } from "./useResponsive-DfdjqQps.js";
4
- import { u as il, a as ul, b as Vs } from "./useTimeLabels-Cv0tD9In.js";
5
- import { u as Bs } from "./useConfig-CG4HT3wS.js";
6
- import { u as Ys, B as Hs } from "./BaseScanner-C2j3TsSY.js";
7
- import { u as Ws } from "./usePrinter-C4t8DdQ-.js";
8
- import { u as Us } from "./useSvgExport-BTG4hVPO.js";
9
- import { u as Jt } from "./useNestedProp-DH0BEVVS.js";
10
- import { u as qs } from "./useThemeCheck-C9Ccl7U9.js";
11
- import { u as Xs } from "./useStableElementSize-C48ZVcZQ.js";
12
- import { u as Gs } from "./useChartAccessibility-cp6XQtqi.js";
13
- import { u as js } from "./useTimeLabelCollider-D3JeJ6Ye.js";
14
- import { u as Js } from "./useUserOptionState-B7Ej974k.js";
15
- import Ks from "./img-CjTQXS0U.js";
16
- import { _ as Kt } from "./Shape-CxJ5_Rre.js";
17
- import Zs from "./Title-BbKoiBk2.js";
18
- import Qs from "./vue_ui_stackline-QTh-nuxE.js";
19
- import eo from "./Legend-DGN5lY60.js";
20
- import { A as to } from "./A11yDataTable-BpmuNomI.js";
21
- import { S as ao } from "./SlicerPreview-D_CgrN_7.js";
22
- import { B as lo } from "./BaseLegendToggle-cMP8M2u0.js";
23
- import { _ as so } from "./_plugin-vue_export-helper-CHgC5LLL.js";
24
- const oo = ["id"], no = ["id"], ro = ["id"], io = { style: { position: "relative" } }, uo = ["aria-describedby", "xmlns", "viewBox"], co = { key: 0 }, vo = ["x", "y", "width", "height"], ho = { key: 1 }, mo = ["id"], fo = ["stop-color"], yo = ["stop-color"], go = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], po = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], bo = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], xo = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ko = ["x", "y", "font-size", "fill", "font-weight"], wo = ["transform", "font-size", "fill", "font-weight"], So = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"], Mo = ["d", "fill", "opacity"], $o = ["d", "stroke", "stroke-width"], Co = ["x1", "x2", "y1", "y2", "stroke"], Lo = ["x", "y", "font-size", "font-weight", "fill"], Ao = { key: 0 }, To = { key: 1 }, No = ["text-anchor", "font-size", "font-weight", "fill", "transform", "onClick"], Po = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], zo = ["x", "y", "height", "width", "fill"], Io = { key: 0 }, _o = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Fo = { key: 0 }, Eo = ["x", "y", "font-size", "fill", "font-weight"], Ro = ["x", "y", "font-size", "font-weight", "fill"], Oo = ["data-start", "data-end"], Do = {
25
- key: 0,
26
- style: { position: "absolute", top: "100%", left: "0", width: "100%" },
27
- "data-dom-to-png-ignore": "",
28
- "aria-hidden": "true"
29
- }, Vo = {
30
- key: 5,
31
- class: "vue-data-ui-watermark"
32
- }, Bo = ["onClick"], Yo = ["innerHTML"], Ho = ["innerHTML"], Wo = ["id"], Uo = {
33
- __name: "vue-ui-stackline",
34
- props: {
35
- config: {
36
- type: Object,
37
- default() {
38
- return {};
39
- }
40
- },
41
- dataset: {
42
- type: Array,
43
- default() {
44
- return [];
45
- }
46
- },
47
- selectedXIndex: {
48
- type: Number,
49
- default: void 0
50
- }
51
- },
52
- emits: [
53
- "selectDatapoint",
54
- "selectLegend",
55
- "selectTimeLabel",
56
- "selectX",
57
- "copyAlt"
58
- ],
59
- setup(Mt, { expose: cl, emit: vl }) {
60
- const dl = ke(() => import("./Tooltip-Cvt7Fi0Q.js")), hl = ke(() => import("./BaseIcon-DX0hTWa-.js")), ml = ke(() => import("./vue-ui-accordion-DFtpH_16.js")), fl = ke(() => import("./DataTable-cMnb68Ik.js")), yl = ke(
61
- () => import("./PenAndPaper-CJDoB5H9.js")
62
- ), gl = ke(
63
- () => import("./UserOptions-DVduN6X7.js")
64
- ), pl = ke(
65
- () => import("./PackageVersion-BfrCAH6_.js")
66
- ), bl = ke(
67
- () => import("./BaseDraggableDialog-Di8Hlru3.js")
68
- ), { vue_ui_stackline: xl } = Bs(), { isThemeValid: kl, warnInvalidTheme: wl } = qs(), Zt = ps(), G = Mt, ye = vl, Ee = m({
69
- get() {
70
- return !!G.dataset && G.dataset.length;
71
- },
72
- set(t) {
73
- return t;
74
- }
75
- }), ie = f(null), K = f(ll()), Re = f(!1), V = f([]), Qt = f(0), ea = f(null), ta = f(null), Oe = f(null), aa = f(null), la = f(null), De = f(!1), $t = f(!1), sa = f(0), Sl = f(0), Ml = f(0), oa = f(!1), Ve = f(null), Ct = f(null), Le = f(!1), lt = f(!1), st = f(!1), ot = f(null), Lt = f(null), At = f(null), nt = f(null), $l = f(null), na = qt(null), ra = f(!1), ia = f(0), ua = f(0), ue = f(null), ca = f({ x: 0, y: 0 }), Be = f("pointer"), va = Xs({
76
- elementRef: na,
77
- minimumWidth: 2,
78
- minimumHeight: 2,
79
- stableFramesRequired: 2,
80
- once: !1,
81
- onSizeAccepted: () => {
82
- rt();
83
- }
84
- });
85
- function Tt() {
86
- na.value = ie.value?.parentNode ?? null;
87
- }
88
- function da() {
89
- return new Promise((t) => {
90
- requestAnimationFrame(() => {
91
- requestAnimationFrame(t);
92
- });
93
- });
94
- }
95
- async function rt() {
96
- const t = ++ua.value;
97
- ra.value = !1, await Gt(), await da(), await da(), t === ua.value && (ia.value += 1, ra.value = !0);
98
- }
99
- const Ye = f(null), Ae = f(!1);
100
- function Nt() {
101
- Ae.value = !Ae.value;
102
- }
103
- bs(() => {
104
- Tt(), va.start(), oa.value = !0, xa(), rt();
105
- });
106
- const e = f(It()), ce = m(
107
- () => e.value.userOptions.useCursorPointer
108
- ), Cl = m(() => sl({
109
- defaultConfig: {
110
- userOptions: { show: !1 },
111
- useCssAnimation: !1,
112
- table: { show: !1 },
113
- tooltip: { show: !1 },
114
- style: {
115
- chart: {
116
- backgroundColor: "#99999930",
117
- lines: {
118
- totalValues: { show: !1 },
119
- dataLabels: { show: !1 }
120
- },
121
- grid: {
122
- frame: {
123
- stroke: "#6A6A6A"
124
- },
125
- scale: {
126
- scaleMin: 0,
127
- scaleMax: 144
128
- },
129
- x: {
130
- axisColor: "#6A6A6A",
131
- linesColor: "#6A6A6A",
132
- axisName: { show: !1 },
133
- timeLabels: { show: !1 }
134
- },
135
- y: {
136
- axisColor: "#6A6A6A",
137
- linesColor: "#6A6A6A",
138
- axisName: { show: !1 },
139
- axisLabels: { show: !1 }
140
- }
141
- },
142
- legend: {
143
- backgroundColor: "transparent"
144
- },
145
- padding: {
146
- left: 24,
147
- right: 24,
148
- bottom: 12
149
- },
150
- zoom: {
151
- show: !1,
152
- startIndex: null,
153
- endIndex: null
154
- }
155
- }
156
- }
157
- },
158
- userConfig: e.value.skeletonConfig ?? {}
159
- })), { loading: ve, FINAL_DATASET: Pt, manualLoading: it } = Ys({
160
- ...xs(G),
161
- FINAL_CONFIG: e,
162
- prepareConfig: It,
163
- callback: () => {
164
- Promise.resolve().then(async () => {
165
- await mt();
166
- });
167
- },
168
- skeletonDataset: G.config?.skeletonDataset ?? [
169
- {
170
- name: "",
171
- series: [3, 2, 1, 5, 13, 21, 8, 89, 34, 55],
172
- color: "#8A8A8A"
173
- },
174
- {
175
- name: "",
176
- series: [1, 2, 3, 5, 8, 13, 21, 34, 55, 89],
177
- color: "#CACACA"
178
- }
179
- ],
180
- skeletonConfig: sl({
181
- defaultConfig: e.value,
182
- userConfig: Cl.value
183
- })
184
- }), { userOptionsVisible: zt, setUserOptionsVisibility: ha, keepUserOptionState: ma } = Js({ config: e.value }), { svgRef: de } = Gs({
185
- config: e.value.style.chart.title
186
- });
187
- function Ll() {
188
- Le.value = !0, ha(!0);
189
- }
190
- function Al() {
191
- ha(!1), Le.value = !1, ue.value = null, Be.value = "pointer", Re.value = !1, x.value = null, ye("selectX", { seriesIndex: null, datapoint: null });
192
- }
193
- function It() {
194
- const t = Jt({
195
- userConfig: G.config,
196
- defaultConfig: xl
197
- });
198
- let l = {};
199
- const a = t.theme;
200
- if (a)
201
- if (!kl.value(t))
202
- wl(t), l = t;
203
- else {
204
- const s = Jt({
205
- userConfig: Qs[a] || G.config,
206
- defaultConfig: t
207
- });
208
- l = {
209
- ...Jt({
210
- userConfig: G.config,
211
- defaultConfig: s
212
- }),
213
- customPalette: t.customPalette.length ? t.customPalette : Ss[a] || kt
214
- };
215
- }
216
- else
217
- l = t;
218
- return l;
219
- }
220
- const fa = m(() => e.value.style.chart.lines.dataLabels.hideUnderValue !== null), ya = m(() => e.value.style.chart.lines.dataLabels.hideUnderPercentage !== null);
221
- Fe(
222
- () => G.config,
223
- (t) => {
224
- ve.value || (e.value = It()), zt.value = !e.value.userOptions.showOnChartHover, xa(), sa.value += 1, Sl.value += 1, Ml.value += 1, j.value.dataLabels.show = e.value.style.chart.lines.dataLabels.show, j.value.showTable = e.value.table.show, j.value.showTooltip = e.value.style.chart.tooltip.show, oe.value.width = e.value.style.chart.width, oe.value.height = e.value.style.chart.height, oe.value.paddingRatio = {
225
- top: e.value.style.chart.padding.top / e.value.style.chart.height,
226
- right: e.value.style.chart.padding.right / e.value.style.chart.width,
227
- bottom: e.value.style.chart.padding.bottom / e.value.style.chart.height,
228
- left: e.value.style.chart.padding.left / e.value.style.chart.width
229
- }, Tt(), rt(), ct();
230
- },
231
- { deep: !0 }
232
- ), Fe(
233
- () => G.dataset,
234
- (t) => {
235
- Array.isArray(t) && t.length > 0 && (it.value = !1), Ma(), Tt(), rt();
236
- },
237
- { deep: !0 }
238
- );
239
- const j = f({
240
- dataLabels: {
241
- show: e.value.style.chart.lines.dataLabels.show
242
- },
243
- showTable: e.value.table.show,
244
- showTooltip: e.value.style.chart.tooltip.show
245
- });
246
- Fe(
247
- e,
248
- () => {
249
- j.value = {
250
- dataLabels: {
251
- show: e.value.style.chart.lines.dataLabels.show
252
- },
253
- showTable: e.value.table.show,
254
- showTooltip: e.value.style.chart.tooltip.show
255
- };
256
- },
257
- { immediate: !0 }
258
- );
259
- const { isPrinting: _t, isImaging: Ft, generatePdf: ga, generateImage: pa } = Ws({
260
- elementId: `stackline_${K.value}`,
261
- fileName: e.value.style.chart.title.text || "vue-ui-stackline",
262
- options: e.value.userOptions.print
263
- }), Tl = m(() => e.value.userOptions.show && !e.value.style.chart.title.text), oe = f({
264
- width: e.value.style.chart.width,
265
- height: e.value.style.chart.height,
266
- paddingRatio: {
267
- top: e.value.style.chart.padding.top / e.value.style.chart.height,
268
- right: e.value.style.chart.padding.right / e.value.style.chart.width,
269
- bottom: e.value.style.chart.padding.bottom / e.value.style.chart.height,
270
- left: e.value.style.chart.padding.left / e.value.style.chart.width
271
- }
272
- }), Nl = m(() => Ms(e.value.customPalette)), pe = qt(null), Te = qt(null), ba = f(null), Et = m(() => !!e.value.debug);
273
- function xa() {
274
- if (ol(G.dataset) ? (nl({
275
- componentName: "VueUiStackline",
276
- type: "dataset",
277
- debug: Et.value
278
- }), it.value = !0) : G.dataset.forEach((t, l) => {
279
- $s({
280
- datasetObject: t,
281
- requiredAttributes: ["name", "series"]
282
- }).forEach((a) => {
283
- Ee.value = !1, nl({
284
- componentName: "VueUiStackline",
285
- type: "datasetSerieAttribute",
286
- property: a,
287
- index: l,
288
- debug: Et.value
289
- }), it.value = !0;
290
- });
291
- }), ol(G.dataset) || (it.value = e.value.loading), setTimeout(() => {
292
- $t.value = !0;
293
- }, 10), e.value.responsive) {
294
- const t = Os(() => {
295
- $t.value = !1;
296
- const { width: l, height: a } = Ds({
297
- chart: ie.value,
298
- noTitle: aa.value,
299
- title: e.value.style.chart.title.text ? ea.value : null,
300
- legend: e.value.style.chart.legend.show ? ta.value : null,
301
- slicer: e.value.style.chart.zoom.show && he.value > 6 ? Oe.value.$el : null,
302
- source: la.value
303
- });
304
- requestAnimationFrame(() => {
305
- oe.value.width = l, oe.value.height = a - 12, clearTimeout(ba.value), ba.value = setTimeout(() => {
306
- $t.value = !0;
307
- }, 10);
308
- });
309
- });
310
- pe.value && (Te.value && pe.value.unobserve(Te.value), pe.value.disconnect()), pe.value = new ResizeObserver(t), Te.value = ie.value.parentNode, pe.value.observe(Te.value);
311
- }
312
- mt();
313
- }
314
- Xt(() => {
315
- va.stop(), pe.value && (Te.value && pe.value.unobserve(Te.value), pe.value.disconnect());
316
- });
317
- function Pl() {
318
- let t = 0;
319
- At.value && (t = Array.from(At.value.querySelectorAll("text")).reduce((s, n) => {
320
- const o = n.getComputedTextLength();
321
- return o > s ? o : s;
322
- }, 0));
323
- const l = Lt.value ? Lt.value.getBoundingClientRect().width : 0;
324
- return t + l + (l ? 24 : 0);
325
- }
326
- const Rt = f(0), He = f(0), We = f(0);
327
- function zl() {
328
- const t = nt.value;
329
- if (!t) {
330
- He.value = 0;
331
- return;
332
- }
333
- try {
334
- const l = t.getBBox();
335
- He.value = Number.isFinite(l?.height) ? l.height : 0;
336
- } catch {
337
- He.value = 0;
338
- }
339
- }
340
- function Il() {
341
- We.value && cancelAnimationFrame(We.value), We.value = requestAnimationFrame(() => {
342
- requestAnimationFrame(() => {
343
- zl();
344
- });
345
- });
346
- }
347
- Xt(() => {
348
- We.value && cancelAnimationFrame(We.value), He.value = 0, Rt.value = 0;
349
- });
350
- const ka = m(() => {
351
- let t = 0;
352
- if (ot.value)
353
- try {
354
- t = ot.value.getBBox().height;
355
- } catch {
356
- t = 0;
357
- }
358
- const l = e.value.style.chart.grid.x.timeLabels.show ? He.value : 0;
359
- return t + l;
360
- }), d = m(() => {
361
- ia.value;
362
- const { height: t, width: l } = oe.value, { right: a } = oe.value.paddingRatio;
363
- let s = e.value.style.chart.lines.totalValues.show && G.dataset && G.dataset.length > 1 ? e.value.style.chart.lines.totalValues.fontSize * 1.3 : 0, n = 0;
364
- e.value.style.chart.grid.y.axisLabels.show && (n = Pl());
365
- const o = e.value.style.chart.padding.top + s, r = l - l * a - Rt.value, y = t - e.value.style.chart.padding.bottom - ka.value - s, k = e.value.style.chart.padding.left + n, T = l - k - l * a - Rt.value, S = t - o - e.value.style.chart.padding.bottom - ka.value - s;
366
- return {
367
- chartHeight: Math.max(0, t),
368
- chartWidth: Math.max(0, l),
369
- top: o,
370
- right: Math.max(0, r),
371
- bottom: Math.max(0, y),
372
- left: Math.max(0, k),
373
- width: Math.max(0, T),
374
- height: Math.max(0, S)
375
- };
376
- }), _l = m(() => {
377
- const {
378
- left: t,
379
- top: l,
380
- width: a,
381
- height: s
382
- } = d.value, n = u.value.start, o = u.value.end, r = Math.max(1, o - n), y = Math.max(
383
- 0,
384
- Math.min(
385
- r,
386
- (ne.value.start ?? n) - n
387
- )
388
- ), k = Math.max(
389
- 0,
390
- Math.min(
391
- r,
392
- (ne.value.end ?? o) - n
393
- )
394
- ), T = Math.max(0, k - y), S = {
395
- fill: e.value.style.chart.zoom.preview.fill,
396
- stroke: e.value.style.chart.zoom.preview.stroke,
397
- "stroke-width": e.value.style.chart.zoom.preview.strokeWidth,
398
- "stroke-dasharray": e.value.style.chart.zoom.preview.strokeDasharray,
399
- "stroke-linecap": "round",
400
- "stroke-linejoin": "round",
401
- style: {
402
- pointerEvents: "none",
403
- transition: "none !important",
404
- animation: "none !important"
405
- }
406
- }, z = a / r;
407
- return {
408
- x: t + y * z,
409
- y: l,
410
- width: T * z,
411
- height: s,
412
- ...S
413
- };
414
- }), Z = m(() => Pt.value.map((t, l) => {
415
- const a = Cs(t.color) || Nl.value[l] || kt[l] || kt[l % kt.length];
416
- return {
417
- ...t,
418
- shape: t.shape || "circle",
419
- standalone: !!t.standalone,
420
- // In distributed mode, all values are converted to positive
421
- series: JSON.parse(JSON.stringify(t.series)).map((s) => e.value.style.chart.lines.distributed ? Math.abs(s) : s),
422
- seriesSource: t.series,
423
- // Store signs to manage display of neg values in distributed mode
424
- signedSeries: t.series.map((s) => s >= 0 ? 1 : -1),
425
- absoluteIndex: l,
426
- id: ll(),
427
- color: a
428
- };
429
- })), Me = m(
430
- () => Z.value.filter(
431
- (t) => !V.value.includes(t.id) && !t.standalone
432
- )
433
- ), ut = m(
434
- () => Z.value.filter(
435
- (t) => !V.value.includes(t.id) && t.standalone
436
- )
437
- ), he = m(() => {
438
- const t = Math.max(
439
- ...Z.value.filter((l) => !V.value.includes(l.id)).map((l) => l.series.length)
440
- );
441
- return isFinite(t) ? t : Math.max(...Z.value.map((l) => l.series.length));
442
- });
443
- function Fl(t) {
444
- Ye.value = t;
445
- }
446
- const u = f({
447
- start: 0,
448
- end: Math.max(...Pt.value.map((t) => t.series.length))
449
- }), ne = f({
450
- start: 0,
451
- end: Math.max(...Pt.value.map((t) => t.series.length))
452
- });
453
- function Ot(t) {
454
- return (u.value.start ?? 0) + (t ?? 0);
455
- }
456
- const wa = m(() => e.value.style.chart.zoom.preview.enable && (ne.value.start !== u.value.start || ne.value.end !== u.value.end));
457
- function Sa(t, l) {
458
- ne.value[t] = l;
459
- }
460
- function ct() {
461
- const t = he.value;
462
- let l = Math.max(0, Math.min(u.value.start ?? 0, t - 1)), a = Math.max(l + 1, Math.min(u.value.end ?? t, t));
463
- (!Number.isFinite(l) || !Number.isFinite(a) || a <= l) && (l = 0, a = t), u.value.start = l, u.value.end = a, ne.value.start = l, ne.value.end = a, Oe.value && (Oe.value.setStartValue(l), Oe.value.setEndValue(a));
464
- }
465
- const Ue = f(null);
466
- function El() {
467
- return new Promise(
468
- (t) => requestAnimationFrame(() => requestAnimationFrame(() => t()))
469
- );
470
- }
471
- Xt(() => {
472
- Ue.value && cancelAnimationFrame(Ue.value);
473
- });
474
- async function Ma() {
475
- mt(), await Gt(), Ue.value && cancelAnimationFrame(Ue.value), Ue.value = requestAnimationFrame(async () => {
476
- await El(), mt();
477
- });
478
- }
479
- const vt = m(() => Math.max(
480
- 0,
481
- d.value.width / (u.value.end - u.value.start)
482
- )), $a = m(() => Qe(
483
- Me.value.map((t) => ({
484
- ...t,
485
- series: t.series.map((l) => l ?? 0)
486
- }))
487
- ).slice(u.value.start, u.value.end)), dt = m(
488
- () => V.value.length === Z.value.length
489
- ), Ca = m(() => {
490
- if (!e.value.style.chart.zoom.minimap.show) return [];
491
- const t = Z.value.filter(
492
- (n) => dt.value ? !0 : !V.value.includes(n.id) && !n.standalone
493
- );
494
- if (t.length)
495
- return Qe(
496
- t.map((n) => ({
497
- ...n,
498
- series: (n.series || []).map((o) => o ?? 0)
499
- }))
500
- );
501
- const l = ut.value;
502
- if (!l.length) return [];
503
- const a = Math.max(...l.map((n) => n.series.length || 0));
504
- return Array.from(
505
- { length: a },
506
- (n, o) => l.reduce((r, y) => r + Math.abs(y.series[o] ?? 0), 0)
507
- );
508
- }), Rl = m(() => {
509
- if (!e.value.style.chart.zoom.minimap.show) return [];
510
- const l = Z.value.filter(
511
- (o) => dt.value ? !0 : !V.value.includes(o.id) && !o.standalone
512
- ), a = ut.value, s = l.length ? [
513
- {
514
- name: "",
515
- series: Ca.value,
516
- color: "#000000",
517
- isVisible: !0
518
- }
519
- ] : [], n = a.map((o) => ({
520
- name: o.name || "",
521
- series: (o.series || []).map((r) => r ?? 0),
522
- color: o.color,
523
- isVisible: !0
524
- }));
525
- return s.concat(n);
526
- }), Ol = m(() => Qe(
527
- Me.value.filter((t) => !V.value.includes(t.id)).map((t) => ({
528
- ...t,
529
- series: t.series.map((l, a) => {
530
- const s = l ?? 0;
531
- return t.signedSeries[a] === -1 && s >= 0 ? -s : s;
532
- })
533
- }))
534
- ).slice(u.value.start, u.value.end)), Ne = m(() => {
535
- const t = Me.value.filter(
536
- (l) => !V.value.includes(l.id)
537
- );
538
- return {
539
- positive: Qe(
540
- t.map((l) => ({
541
- ...l,
542
- series: l.series.slice(u.value.start, u.value.end).map((a) => (a ?? 0) >= 0 ? a ?? 0 : 0)
543
- }))
544
- ),
545
- negative: Qe(
546
- t.map((l) => ({
547
- ...l,
548
- series: l.series.slice(u.value.start, u.value.end).map((a) => (a ?? 0) < 0 ? a ?? 0 : 0)
549
- }))
550
- )
551
- };
552
- }), Pe = m(() => {
553
- const t = Math.max(0, u.value.end - u.value.start), l = Array(t).fill(0), a = Array(t).fill(0);
554
- return ut.value.forEach((s) => {
555
- for (let n = 0; n < t; n += 1) {
556
- const o = s.series[u.value.start + n] ?? 0;
557
- o > 0 && (l[n] = Math.max(l[n], o)), o < 0 && (a[n] = Math.min(a[n], o));
558
- }
559
- }), {
560
- positive: l,
561
- negative: a
562
- };
563
- }), La = m(() => Ol.value.map((t, l) => ({
564
- value: t,
565
- sign: t >= 0 ? 1 : -1
566
- })));
567
- function Dl() {
568
- return { y0: ze.value?.[0]?.zero ?? d.value.bottom };
569
- }
570
- function Vl(t) {
571
- const { y0: l } = Dl(), a = e.value.style.chart.lines.totalValues, s = Math.max(2, a.fontSize * 1.3 + a.offsetY), n = (r) => Math.min(
572
- Math.max(
573
- r,
574
- d.value.top - e.value.style.chart.lines.totalValues.fontSize * 1.3
575
- ),
576
- d.value.bottom + e.value.style.chart.lines.totalValues.fontSize * 2
577
- );
578
- if ((La.value?.[t]?.value ?? 0) >= 0 || e.value.style.chart.lines.distributed) {
579
- let r = 1 / 0;
580
- for (const k of A.value || []) {
581
- const T = k?.series?.[t], S = k?.topY?.[t];
582
- (T ?? 0) > 0 && Number.isFinite(S) && S < r && (r = S);
583
- }
584
- const y = Number.isFinite(r) ? r : l;
585
- return n(
586
- y - s - e.value.style.chart.lines.totalValues.offsetY
587
- );
588
- } else {
589
- let r = -1 / 0;
590
- for (const k of A.value || []) {
591
- const T = k?.series?.[t], S = k?.topY?.[t];
592
- (T ?? 0) < 0 && Number.isFinite(S) && S > r && (r = S);
593
- }
594
- const y = Number.isFinite(r) ? r : l;
595
- return n(
596
- y + s + a.fontSize * 0.7 + e.value.style.chart.lines.totalValues.offsetY
597
- );
598
- }
599
- }
600
- const ze = m(() => {
601
- const t = Math.max(...Ne.value.positive, 0), l = Math.min(...Ne.value.negative, 0), a = Math.max(...Pe.value.positive, 0), s = Math.min(...Pe.value.negative, 0), n = Math.max(t, a), o = Math.min(l, s), r = [-1 / 0, 1 / 0, NaN, void 0, null].includes(
602
- o
603
- ) ? 0 : o, y = e.value.style.chart.grid.scale.scaleMin, k = e.value.style.chart.grid.scale.scaleMax, T = !e.value.style.chart.lines.distributed && (y !== null || k !== null), S = y !== null && !e.value.style.chart.lines.distributed ? y : r > 0 ? 0 : r, z = k !== null && !e.value.style.chart.lines.distributed ? k : n < 0 ? 0 : n, O = T ? wt(
604
- S,
605
- z,
606
- e.value.style.chart.grid.scale.ticks
607
- ) : St(
608
- S,
609
- z,
610
- e.value.style.chart.grid.scale.ticks
611
- ), M = Math.abs(Number(O.min) || 0), w = (Number(O.max) || 0) + M, c = w === 0 || !Number.isFinite(w) ? 1 : w, _ = Array.isArray(O.ticks) && O.ticks.length ? O.ticks : [0], g = d.value.bottom - d.value.height * (M / c);
612
- return _.map(($) => {
613
- const F = Number($) || 0, E = d.value.bottom - d.value.height * ((F + M) / c);
614
- return {
615
- zero: g,
616
- y: E,
617
- x: ae.value.left - 8,
618
- value: F
619
- };
620
- });
621
- }), me = f([]), Ie = f([]);
622
- let Aa = 0;
623
- bt(() => {
624
- const t = ++Aa;
625
- (async () => {
626
- const l = await il({
627
- values: e.value.style.chart.grid.x.timeLabels.values,
628
- maxDatapoints: he.value,
629
- formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
630
- start: u.value.start,
631
- end: u.value.end
632
- });
633
- t === Aa && (me.value = l);
634
- })();
635
- });
636
- let Ta = 0;
637
- bt(() => {
638
- const t = ++Ta;
639
- (async () => {
640
- const l = await il({
641
- values: e.value.style.chart.grid.x.timeLabels.values,
642
- maxDatapoints: he.value,
643
- formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
644
- start: 0,
645
- end: he.value
646
- });
647
- t === Ta && (Ie.value = l);
648
- })();
649
- });
650
- const Bl = m(() => {
651
- const t = e.value.style.chart.grid.x.timeLabels.modulo;
652
- return me.value.length ? Math.min(
653
- t,
654
- [...new Set(me.value.map((l) => l.text))].length
655
- ) : t;
656
- }), ht = m(() => {
657
- const t = e.value.style.chart.grid.x.timeLabels, l = me.value || [], a = Ie.value || [], s = u.value.start ?? 0, n = x.value, o = he.value, r = l.map((k) => k?.text ?? ""), y = a.map((k) => k?.text ?? "");
658
- return Ls(
659
- !!t.showOnlyFirstAndLast,
660
- !!t.showOnlyAtModulo,
661
- Math.max(1, Bl.value || 1),
662
- r,
663
- y,
664
- s,
665
- n,
666
- o
667
- );
668
- });
669
- bt(
670
- () => {
671
- e.value.style.chart.grid.x.timeLabels.show, e.value.style.chart.grid.x.timeLabels.fontSize, e.value.style.chart.grid.x.timeLabels.rotation, e.value.style.chart.grid.x.timeLabels.offsetY, (ht.value || []).map((t) => t?.text ?? "").join("|"), oe.value.width, oe.value.height, nt.value, ot.value, Il();
672
- },
673
- { flush: "post" }
674
- );
675
- const Na = f({
676
- months: [],
677
- shortMonths: [],
678
- days: [],
679
- shortDays: []
680
- });
681
- let Pa = 0;
682
- bt(() => {
683
- const t = ++Pa, l = e.value.style.chart.grid.x.timeLabels.datetimeFormatter;
684
- (async () => {
685
- const a = await ul(l.locale).catch(
686
- () => ul("en")
687
- );
688
- t === Pa && (Na.value = a.data);
689
- })();
690
- });
691
- const za = m(() => {
692
- const t = e.value.style.chart.grid.x.timeLabels.datetimeFormatter, l = Vs({
693
- useUTC: t.useUTC,
694
- locale: Na.value,
695
- januaryAsYear: t.januaryAsYear
696
- });
697
- return (a, s) => {
698
- const o = e.value.style.chart.grid.x.timeLabels.values?.[a];
699
- return o == null ? "" : l.formatDate(new Date(o), s);
700
- };
701
- }), Ia = m(() => (e.value.style.chart.grid.x.timeLabels.values || []).map((l, a) => ({
702
- text: za.value(
703
- a,
704
- e.value.style.chart.zoom.timeFormat
705
- ),
706
- absoluteIndex: a
707
- }))), Yl = m(() => (e.value.style.chart.grid.x.timeLabels.values || []).map((l, a) => ({
708
- text: za.value(
709
- a,
710
- e.value.style.chart.tooltip.timeFormat
711
- ),
712
- absoluteIndex: a
713
- }))), Hl = m(() => {
714
- if (!Ee.value && !ve.value) return [];
715
- const t = d.value.height, l = ze.value[0] ? ze.value[0].zero : d.value.bottom, a = u.value.start ?? 0, s = u.value.end ?? 0, n = Math.max(1, s - a), o = Math.max(...Ne.value.positive, 0), r = Math.min(...Ne.value.negative, 0), y = Math.max(...Pe.value.positive, 0), k = Math.min(...Pe.value.negative, 0), T = Math.max(o, y), S = Math.min(r, k), z = !e.value.style.chart.lines.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? wt(
716
- e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : S > 0 ? 0 : S,
717
- e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : T < 0 ? 0 : T,
718
- e.value.style.chart.grid.scale.ticks
719
- ) : St(
720
- e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : S > 0 ? 0 : S,
721
- e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : T < 0 ? 0 : T,
722
- e.value.style.chart.grid.scale.ticks
723
- ), { min: O, max: M } = z, h = M + (O >= 0 ? 0 : Math.abs(O)) || 1, w = Array(n).fill(0), c = Array(n).fill(0), _ = (g) => n <= 1 ? d.value.left + d.value.width / 2 : d.value.left + g / (n - 1) * d.value.width;
724
- return Z.value.filter((g) => !V.value.includes(g.id)).map((g) => {
725
- const $ = [], F = [], E = [], I = new Array(n).fill(null), B = new Array(n).fill(null);
726
- for (let p = 0; p < n; p += 1) {
727
- const L = a + p, q = g.series?.[L], U = g.signedSeries?.[L], xe = q == null || Number.isNaN(q) ? 0 : q, el = g.standalone ? xe / h : e.value.style.chart.lines.distributed ? xe / ($a.value[p] || 1) : xe / h;
728
- if (xe >= 0) {
729
- const je = t * Math.abs(el);
730
- if (g.standalone)
731
- I[p] = l, B[p] = l - je;
732
- else {
733
- const Je = w[p], Ke = Je + je;
734
- I[p] = l - Je, B[p] = l - Ke, w[p] = Ke;
735
- }
736
- } else {
737
- const je = t * Math.abs(el);
738
- if (g.standalone)
739
- I[p] = l, B[p] = l + je;
740
- else {
741
- const Je = c[p], Ke = Je + je;
742
- I[p] = l + Je, B[p] = l + Ke, c[p] = Ke;
743
- }
744
- }
745
- $.push(p), F.push(xe), E.push(U ?? (xe >= 0 ? 1 : -1));
746
- }
747
- const H = $.map((p) => ({
748
- x: _(p),
749
- y: B[p]
750
- })), te = H.map((p) => p.x), J = F.reduce(
751
- (p, L) => p + Math.abs(L || 0),
752
- 0
753
- ), W = J === 0 ? 1 : J, D = F.map((p, L) => {
754
- if (e.value.style.chart.lines.distributed && !g.standalone) {
755
- const q = $[L], U = $a.value[q] || 1;
756
- return (p || 0) / U;
757
- }
758
- return (p || 0) / W;
759
- });
760
- return {
761
- ...g,
762
- x: te,
763
- points: H,
764
- baseY: $.map((p) => I[p]),
765
- topY: $.map((p) => B[p]),
766
- series: F,
767
- signedSeries: E,
768
- proportions: D,
769
- rel: $,
770
- fullSeries: Array.isArray(g.fullSeries) ? g.fullSeries : g.series
771
- };
772
- });
773
- }), A = m(() => {
774
- const t = (M) => typeof M == "string" ? M.replace(
775
- /^M\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*,?\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*/i,
776
- ""
777
- ).trim() : "", l = Math.max(...Ne.value.positive, 0), a = Math.min(...Ne.value.negative, 0), s = Math.max(...Pe.value.positive, 0), n = Math.min(...Pe.value.negative, 0), o = Math.max(l, s), r = Math.min(a, n), y = !e.value.style.chart.lines.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? wt(
778
- e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : r > 0 ? 0 : r,
779
- e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : o < 0 ? 0 : o,
780
- e.value.style.chart.grid.scale.ticks
781
- ) : St(
782
- e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : r > 0 ? 0 : r,
783
- e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : o < 0 ? 0 : o,
784
- e.value.style.chart.grid.scale.ticks
785
- ), k = Number(y.min) || 0, T = Number(y.max) || 0, S = Math.abs(k), z = T + S || 1, O = (M) => {
786
- if (e.value.style.chart.lines.distributed) {
787
- const h = Math.max(0, Math.min(1, M));
788
- return minimapH - minimapH * h;
789
- }
790
- return clampY(minimapH - minimapH * (((M ?? 0) + S) / z));
791
- };
792
- return Hl.value.map((M) => {
793
- const h = M.x.length, w = Array.isArray(M.fullSeries) ? M.fullSeries : M.series, c = ({ left: W = 0, unitW: D }) => {
794
- const p = w.length;
795
- return !Number.isFinite(D) || D <= 0 || p <= 0 ? [] : p === 1 ? [W + D * 0.5] : w.map((L, q) => W + q * D);
796
- }, _ = ({ minimapH: W }) => !Number.isFinite(W) || W <= 0 ? [] : w.map((D) => O(D || 0)), g = ({ minimapH: W }) => {
797
- if (!Number.isFinite(W) || W <= 0) return [];
798
- const D = O(0);
799
- return w.map(() => D);
800
- };
801
- if (h === 0)
802
- return {
803
- ...M,
804
- points: [],
805
- smoothPath: "",
806
- straightPath: "",
807
- smoothArea: "",
808
- straightArea: "",
809
- xMinimap: c,
810
- yMinimap: _,
811
- yMinimapBase: g
812
- };
813
- const $ = M.x.map((W, D) => ({ x: W, y: M.topY[D] })), F = M.x.map((W, D) => ({ x: W, y: M.baseY[D] })), E = h >= 2 ? we($) : `M${$[0].x},${$[0].y}`, I = h >= 2 ? Se($) : `M${$[0].x},${$[0].y}`, B = h >= 2 ? `M${t(E)}` : E, H = h >= 2 ? `M${t(I)}` : I;
814
- let te = "", J = "";
815
- if (e.value.style.chart.lines.useArea && h >= 2) {
816
- const W = we([...F].reverse()), D = Se([...F].reverse()), p = F[F.length - 1];
817
- te = `M${$[0].x},${$[0].y} ${t(E)} L${p.x},${p.y} ${t(W)} Z`, J = `M${$[0].x},${$[0].y} ${t(I)} L${p.x},${p.y} ${t(D)} Z`;
818
- }
819
- return {
820
- ...M,
821
- points: $,
822
- smoothPath: B,
823
- straightPath: H,
824
- smoothArea: te,
825
- straightArea: J,
826
- xMinimap: c,
827
- yMinimap: _,
828
- yMinimapBase: g
829
- };
830
- });
831
- }), Dt = m(() => x.value === null || x.value === void 0 ? null : {
832
- timeLabel: Da(x.value),
833
- absoluteIndex: x.value + u.value.start,
834
- seriesIndex: x.value,
835
- datapoint: pt.value,
836
- series: A.value,
837
- config: e.value
838
- }), qe = f(!1), _a = f(!1);
839
- function Fa(t) {
840
- const l = he.value;
841
- return t > l ? l : t < 0 || t < u.value.start ? e.value.style.chart.zoom.startIndex !== null ? u.value.start + 1 : 1 : t;
842
- }
843
- function mt() {
844
- if (!qe.value) {
845
- qe.value = !0;
846
- try {
847
- const { startIndex: t, endIndex: l } = e.value.style.chart.zoom, a = he.value, s = t ?? 0, n = l != null ? Math.min(Fa(l + 1), a) : a;
848
- ft.value = !0, u.value.start = s, u.value.end = n, ne.value.start = s, ne.value.end = n, ct(), _a.value = !0;
849
- } finally {
850
- queueMicrotask(() => {
851
- ft.value = !1;
852
- }), qe.value = !1;
853
- }
854
- }
855
- }
856
- function Wl(t) {
857
- qe.value || ft.value || t !== u.value.start && (u.value.start = t, ne.value.start = t, ct());
858
- }
859
- function Ul(t) {
860
- if (qe.value || ft.value) return;
861
- const l = Fa(t);
862
- l !== u.value.end && (u.value.end = l, ne.value.end = l, ct());
863
- }
864
- const ae = m(() => ({
865
- left: d.value.left,
866
- right: d.value.right,
867
- width: d.value.width
868
- })), ft = f(!1), ql = m(() => oe.value.width), Xl = m(() => oe.value.height);
869
- js({
870
- timeLabelsEls: nt,
871
- timeLabels: me,
872
- slicer: u,
873
- configRef: e,
874
- rotationPath: ["style", "chart", "grid", "x", "timeLabels", "rotation"],
875
- autoRotatePath: [
876
- "style",
877
- "chart",
878
- "grid",
879
- "x",
880
- "timeLabels",
881
- "autoRotate",
882
- "enable"
883
- ],
884
- isAutoSize: !1,
885
- width: ql,
886
- height: Xl,
887
- rotation: e.value.style.chart.grid.x.timeLabels.autoRotate.angle
888
- });
889
- const yt = f(null);
890
- function Ea(t) {
891
- const l = de.value;
892
- if (!l) return null;
893
- if (l.createSVGPoint && l.getScreenCTM) {
894
- const z = l.createSVGPoint();
895
- z.x = t.clientX, z.y = t.clientY;
896
- const O = l.getScreenCTM();
897
- if (O) {
898
- const M = z.matrixTransform(O.inverse());
899
- return { x: M.x, y: M.y, ok: !0 };
900
- }
901
- }
902
- const a = l.getBoundingClientRect(), s = l.viewBox?.baseVal || {
903
- x: 0,
904
- y: 0,
905
- width: a.width,
906
- height: a.height
907
- }, n = Math.min(a.width / s.width, a.height / s.height), o = s.width * n, r = s.height * n, y = (a.width - o) / 2, k = (a.height - r) / 2, T = (t.clientX - a.left - y) / n + s.x, S = (t.clientY - a.top - k) / n + s.y;
908
- return { x: T, y: S, ok: !0 };
909
- }
910
- let $e = 0;
911
- const Y = m(
912
- () => Math.max(1, u.value.end - u.value.start)
913
- ), gt = m(
914
- () => Y.value > 1 ? d.value.width / (Y.value - 1) : 0
915
- );
916
- function re(t) {
917
- return Y.value <= 1 ? d.value.left + d.value.width / 2 : d.value.left + t * gt.value;
918
- }
919
- function Ra(t) {
920
- if (Y.value <= 1)
921
- return { x: d.value.left, width: d.value.width };
922
- const l = t === 0 ? d.value.left : (re(t - 1) + re(t)) / 2, a = t === Y.value - 1 ? d.value.left + d.value.width : (re(t) + re(t + 1)) / 2;
923
- return { x: l, width: Math.max(0, a - l) };
924
- }
925
- function Gl(t) {
926
- Ae.value || ($e && cancelAnimationFrame($e), $e = requestAnimationFrame(() => {
927
- $e = 0;
928
- const l = Ea(t);
929
- if (!l || !de.value) {
930
- Vt();
931
- return;
932
- }
933
- const { left: a, right: s, top: n, bottom: o } = d.value;
934
- if (l.x < a || l.x > s || l.y < n || l.y > o) {
935
- Vt();
936
- return;
937
- }
938
- let r = 0;
939
- if (Y.value > 1) {
940
- const y = (l.x - a) / gt.value;
941
- r = Math.round(y);
942
- } else
943
- r = 0;
944
- r < 0 && (r = 0), r > Y.value - 1 && (r = Y.value - 1), yt.value !== r && (yt.value = r, Bt(!0, r));
945
- }));
946
- }
947
- function jl(t) {
948
- const l = Ea(t);
949
- if (!l || !de.value) return;
950
- const { left: a, right: s, top: n, bottom: o } = d.value;
951
- if (l.x < a || l.x > s || l.y < n || l.y > o)
952
- return;
953
- let r = 0;
954
- if (Y.value > 1) {
955
- const y = (l.x - a) / gt.value;
956
- r = Math.round(y);
957
- } else
958
- r = 0;
959
- r < 0 && (r = 0), r > Y.value - 1 && (r = Y.value - 1), Za({
960
- seriesIndex: r,
961
- datapoint: ja(r)
962
- }), Oa(r);
963
- }
964
- function Oa(t) {
965
- const l = JSON.parse(JSON.stringify(A.value)).map(
966
- (a) => ({
967
- name: a.name,
968
- value: a.series[t] === 0 ? 0 : a.series[t] || null,
969
- proportion: a.proportions[t] || null,
970
- color: a.color,
971
- id: a.id
972
- })
973
- );
974
- e.value.events.datapointClick && e.value.events.datapointClick({
975
- datapoint: l,
976
- seriesIndex: t + u.value.start
977
- }), ye("selectDatapoint", { datapoint: l, period: me.value[t] });
978
- }
979
- Fe(
980
- () => [u.value.start, u.value.end, A.value.length],
981
- () => {
982
- const t = Y.value;
983
- if (x.value != null) {
984
- if (t <= 0) {
985
- x.value = null;
986
- return;
987
- }
988
- x.value < 0 && (x.value = 0), x.value > t - 1 && (x.value = t - 1);
989
- }
990
- }
991
- );
992
- function Vt() {
993
- $e && (cancelAnimationFrame($e), $e = 0), yt.value = null, Bt(!1, null);
994
- }
995
- const x = f(null), pt = m(() => {
996
- const t = x.value, l = t == null ? null : Ot(t);
997
- return A.value.map((a) => ({
998
- slotAbsoluteIndex: a.absoluteIndex,
999
- shape: a.shape || "circle",
1000
- name: a.name,
1001
- color: a.color,
1002
- value: t == null ? null : a.series.find((s, n) => n === t),
1003
- sourceValue: l == null ? null : a.seriesSource?.[l],
1004
- comments: a.comments || [],
1005
- id: a.id,
1006
- standalone: !!a.standalone
1007
- }));
1008
- });
1009
- function Da(t) {
1010
- if (t == null || !e.value.style.chart.tooltip.showTimeLabel)
1011
- return null;
1012
- const l = me.value?.[t]?.text || null, a = Yl.value?.[t]?.text || null, s = Ie.value?.[t]?.text || null;
1013
- return e.value.style.chart.tooltip.useDefaultTimeFormat ? l : a || s;
1014
- }
1015
- const Jl = m(() => {
1016
- const t = e.value.style.chart.tooltip.customFormat, l = [...pt.value].reverse(), a = l.filter((c) => !c.standalone), s = l.filter((c) => c.standalone), n = a.map((c) => c.value).filter((c) => As(c) && c !== null).reduce((c, _) => Math.abs(c) + Math.abs(_), 0);
1017
- if (Ts(t) && Ns(
1018
- () => t({
1019
- absoluteIndex: x.value + u.value.start,
1020
- seriesIndex: x.value,
1021
- datapoint: pt.value,
1022
- series: Z.value,
1023
- config: e.value
1024
- })
1025
- ))
1026
- return t({
1027
- absoluteIndex: x.value + u.value.start,
1028
- seriesIndex: x.value,
1029
- datapoint: pt.value,
1030
- series: Z.value,
1031
- config: e.value
1032
- });
1033
- const {
1034
- showValue: o,
1035
- showTotal: r,
1036
- totalTranslation: y,
1037
- showPercentage: k,
1038
- borderColor: T,
1039
- roundingValue: S,
1040
- roundingPercentage: z
1041
- } = e.value.style.chart.tooltip, O = (c) => !c.shape || ![
1042
- "star",
1043
- "triangle",
1044
- "square",
1045
- "diamond",
1046
- "pentagon",
1047
- "hexagon"
1048
- ].includes(c.shape) ? `<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${e.value.style.chart.tooltip.backgroundColor}" stroke-width="1" fill="${c.color}" /></svg>` : c.shape === "star" ? `<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${e.value.style.chart.tooltip.backgroundColor}" stroke-width="1" fill="${c.color}" points="${Es({ plot: { x: 6, y: 6 }, radius: 5 })}" /></svg>` : c.shape === "triangle" ? `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${at({ plot: { x: 6, y: 6 }, radius: 6, sides: 3, rotation: 0.52 }).path}" fill="${c.color}" stroke="${e.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>` : c.shape === "square" ? `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${at({ plot: { x: 6, y: 6 }, radius: 6, sides: 4, rotation: 0.8 }).path}" fill="${c.color}" stroke="${e.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>` : c.shape === "diamond" ? `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${at({ plot: { x: 6, y: 6 }, radius: 5, sides: 4, rotation: 0 }).path}" fill="${c.color}" stroke="${e.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>` : c.shape === "pentagon" ? `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${at({ plot: { x: 6, y: 6 }, radius: 5, sides: 5, rotation: 0.95 }).path}" fill="${c.color}" stroke="${e.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>` : `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${at({ plot: { x: 6, y: 6 }, radius: 5, sides: 6, rotation: 0 }).path}" fill="${c.color}" stroke="${e.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`, M = (c, _) => {
1049
- const g = _ ? Ce({
1050
- v: isNaN((c.value ?? 0) / (n || 1)) ? 0 : Math.abs(c.value ?? 0) / (n || 1) * 100,
1051
- s: "%",
1052
- r: z
1053
- }) : "", $ = o && _ ? "(" : "", F = o && _ ? ")" : "";
1054
- return `
1055
- <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
1056
- <div style="width:20px;height:20px;display:flex;align-items:center;justify-content:center;">${O(c)}</div>
1057
- ${c.name}${o || _ ? ":" : ""}
1058
- ${o ? et(
1059
- e.value.style.chart.lines.dataLabels.formatter,
1060
- c.sourceValue,
1061
- Ce(
1062
- {
1063
- p: e.value.style.chart.lines.dataLabels.prefix,
1064
- v: c.sourceValue,
1065
- s: e.value.style.chart.lines.dataLabels.suffix,
1066
- r: S
1067
- }
1068
- )
1069
- ) : ""} ${$}${g}${F}
1070
- </div>
1071
- `;
1072
- };
1073
- let h = "";
1074
- const w = Da(x.value);
1075
- return w && (h += `<div style="width:100%;text-align:center;border-bottom:1px solid ${T};padding-bottom:6px;margin-bottom:3px;">${w}</div>`), r && a.length > 1 && (h += `<div class="vue-data-ui-tooltip-total" style="display:flex;flex-direction:row;align-items:center;gap:4px">
1076
- <span>${y}:</span>
1077
- <span>${et(
1078
- e.value.style.chart.lines.dataLabels.formatter,
1079
- tt(n),
1080
- Ce({
1081
- p: e.value.style.chart.lines.dataLabels.prefix,
1082
- v: tt(n),
1083
- s: e.value.style.chart.lines.dataLabels.suffix,
1084
- r: S
1085
- }),
1086
- {
1087
- datapoint: {
1088
- name: y,
1089
- value: tt(n)
1090
- }
1091
- }
1092
- )}</span>
1093
- </div>`), a.forEach((c) => {
1094
- h += M(c, k);
1095
- }), s.length && (h += `<div style="border-top:1px solid ${Me.value.length ? T : "transparent"}; margin:${Me.value.length ? "6px 0" : "0"};"></div>`, s.forEach((c) => {
1096
- h += M(c, !1);
1097
- })), `<div>${h}</div>`;
1098
- });
1099
- function Bt(t, l = null, a = "pointer") {
1100
- if (dt.value) return;
1101
- Be.value = a, Re.value = t;
1102
- const s = A.value.map((n) => ({
1103
- name: n.name,
1104
- value: [null, void 0, NaN].includes(n.series[l]) ? null : n.series[l],
1105
- color: n.color
1106
- }));
1107
- t ? (ue.value = l, x.value = l, Za({ seriesIndex: l, datapoint: s }), e.value.events.datapointEnter && e.value.events.datapointEnter({
1108
- datapoint: s,
1109
- seriesIndex: l + u.value.start
1110
- })) : (ue.value = null, x.value = null, ye("selectX", { seriesIndex: null, dataset: null, indexLabel: null }), e.value.events.datapointLeave && e.value.events.datapointLeave({
1111
- datapoint: s,
1112
- seriesIndex: l + u.value.start
1113
- }));
1114
- }
1115
- function Va(t, l) {
1116
- const a = JSON.parse(JSON.stringify(A.value)).map(
1117
- (s) => ({
1118
- name: s.name,
1119
- value: s.series[l] === 0 ? 0 : (s.signedSeries[l] === -1 && s.series[l] >= 0 ? -s.series[l] : s.series[l]) || null,
1120
- proportion: s.proportions[l] || null,
1121
- color: s.color,
1122
- id: s.id
1123
- })
1124
- );
1125
- ye("selectTimeLabel", {
1126
- datapoint: a,
1127
- absoluteIndex: t.absoluteIndex,
1128
- label: t.text
1129
- });
1130
- }
1131
- function Kl() {
1132
- V.value.length ? V.value = [] : Xe.value.forEach((t) => {
1133
- V.value.push(t.id);
1134
- });
1135
- }
1136
- function Yt(t) {
1137
- if (V.value.includes(t.id))
1138
- V.value = V.value.filter((l) => l !== t.id);
1139
- else {
1140
- if (V.value.length === Z.value.length - 1)
1141
- return;
1142
- V.value.push(t.id);
1143
- }
1144
- ye("selectLegend", A.value);
1145
- }
1146
- const Xe = m(() => Z.value.map((t) => ({
1147
- ...t,
1148
- opacity: V.value.includes(t.id) ? 0.5 : 1,
1149
- segregate: () => Yt(t),
1150
- isSegregated: V.value.includes(t.id)
1151
- }))), Zl = m(() => ({
1152
- cy: "stackline-legend",
1153
- backgroundColor: e.value.style.chart.legend.backgroundColor,
1154
- color: e.value.style.chart.legend.color,
1155
- fontSize: e.value.style.chart.legend.fontSize,
1156
- paddingBottom: 12,
1157
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
1158
- }));
1159
- function Ba(t) {
1160
- if (!Z.value.length)
1161
- return e.value.debug && console.warn("VueUiStackline - There are no series to show."), null;
1162
- const l = Z.value.find((a) => a.name === t);
1163
- return l || (e.value.debug && console.warn(`VueUiStackline - Series name not found "${t}"`), null);
1164
- }
1165
- function Ql(t) {
1166
- const l = Ba(t);
1167
- l !== null && V.value.includes(l.id) && Yt({ id: l.id });
1168
- }
1169
- function es(t) {
1170
- const l = Ba(t);
1171
- l !== null && (V.value.includes(l.id) || Yt({ id: l.id }));
1172
- }
1173
- const Ya = m(() => {
1174
- if (A.value.length === 0)
1175
- return { head: [], body: [], config: {}, columnNames: [] };
1176
- const t = A.value.map(({ name: a, color: s }) => ({
1177
- label: a,
1178
- color: s
1179
- })), l = [];
1180
- return ht.value.forEach((a) => {
1181
- const s = a.absoluteIndex, o = [e.value.style.chart.grid.x.timeLabels.values?.[s] ? a.text : s + 1];
1182
- Z.value.forEach((r) => {
1183
- const y = r.series?.[s], k = Number(
1184
- (y ?? 0).toFixed(e.value.table.td.roundingValue)
1185
- );
1186
- o.push(k);
1187
- }), l.push(o);
1188
- }), { head: t, body: l };
1189
- });
1190
- function Ht(t = null) {
1191
- const l = [
1192
- [e.value.style.chart.title.text],
1193
- [e.value.style.chart.title.subtitle.text],
1194
- [""]
1195
- ], a = ["", ...Ya.value.head.map((r) => r.label)], s = Ya.value.body, n = l.concat([a]).concat(s), o = _s(n);
1196
- t ? t(o) : Fs({
1197
- csvContent: o,
1198
- title: e.value.style.chart.title.text || "vue-ui-stackline"
1199
- });
1200
- }
1201
- const _e = m(() => {
1202
- const t = [""].concat(A.value.map((o) => o.name)).concat(
1203
- ' <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>'
1204
- ), l = [], a = Math.max(0, u.value.end - u.value.start);
1205
- for (let o = 0; o < a; o += 1) {
1206
- const r = Ot(o), y = e.value.style.chart.grid.x.timeLabels.values?.[r] ? me.value?.[o]?.text ?? r + 1 : r + 1, k = A.value.map((z) => {
1207
- const O = z.series?.[o] ?? 0;
1208
- return Number(O.toFixed(e.value.table.td.roundingValue));
1209
- }), S = A.value.filter(
1210
- (z) => !z.standalone
1211
- ).map((z) => z.series?.[o] ?? 0).reduce((z, O) => z + O, 0);
1212
- l.push(
1213
- [y].concat(k).concat(
1214
- Number(
1215
- S.toFixed(e.value.table.td.roundingValue)
1216
- )
1217
- )
1218
- );
1219
- }
1220
- const s = {
1221
- th: {
1222
- backgroundColor: e.value.table.th.backgroundColor,
1223
- color: e.value.table.th.color,
1224
- outline: e.value.table.th.outline
1225
- },
1226
- td: {
1227
- backgroundColor: e.value.table.td.backgroundColor,
1228
- color: e.value.table.td.color,
1229
- outline: e.value.table.td.outline
1230
- },
1231
- breakpoint: e.value.table.responsiveBreakpoint
1232
- }, n = [e.value.table.columnNames.period].concat(A.value.map((o) => o.name)).concat(e.value.table.columnNames.total);
1233
- return { head: t, body: l, config: s, colNames: n };
1234
- }), ts = m(() => e.value.style.chart.backgroundColor), as = m(() => e.value.style.chart.legend), ls = m(() => e.value.style.chart.title), { exportSvg: ss, getSvg: os } = Us({
1235
- svg: de,
1236
- title: ls,
1237
- legend: as,
1238
- legendItems: Xe,
1239
- backgroundColor: ts
1240
- });
1241
- async function Ha({ isCb: t }) {
1242
- st.value = !0, await Gt();
1243
- try {
1244
- if (t) {
1245
- const { blob: l, url: a, text: s, dataUrl: n } = await os();
1246
- await Promise.resolve(
1247
- e.value.userOptions.callbacks.svg({
1248
- blob: l,
1249
- url: a,
1250
- text: s,
1251
- dataUrl: n
1252
- })
1253
- );
1254
- } else
1255
- await Promise.resolve(ss());
1256
- } finally {
1257
- st.value = !1;
1258
- }
1259
- }
1260
- async function ns({ scale: t = 2 } = {}) {
1261
- if (!ie.value) return;
1262
- const { width: l, height: a } = ie.value.getBoundingClientRect(), s = l / a, { imageUri: n, base64: o } = await Ks({
1263
- domElement: ie.value,
1264
- base64: !0,
1265
- img: !0,
1266
- scale: t
1267
- });
1268
- return {
1269
- imageUri: n,
1270
- base64: o,
1271
- title: e.value.style.chart.title.text,
1272
- width: l,
1273
- height: a,
1274
- aspectRatio: s
1275
- };
1276
- }
1277
- const Ge = m(() => {
1278
- const t = e.value.table.useDialog && !e.value.table.show, l = j.value.showTable;
1279
- return {
1280
- component: t ? bl : ml,
1281
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
1282
- props: t ? {
1283
- backgroundColor: e.value.table.th.backgroundColor,
1284
- color: e.value.table.th.color,
1285
- headerColor: e.value.table.th.color,
1286
- headerBg: e.value.table.th.backgroundColor,
1287
- isFullscreen: De.value,
1288
- fullscreenParent: ie.value,
1289
- forcedWidth: Math.min(800, window.innerWidth * 0.8),
1290
- isCursorPointer: ce.value
1291
- } : {
1292
- hideDetails: !0,
1293
- config: {
1294
- open: l,
1295
- maxHeight: 1e4,
1296
- body: {
1297
- backgroundColor: e.value.style.chart.backgroundColor,
1298
- color: e.value.style.chart.color
1299
- },
1300
- head: {
1301
- backgroundColor: e.value.style.chart.backgroundColor,
1302
- color: e.value.style.chart.color
1303
- }
1304
- }
1305
- }
1306
- };
1307
- });
1308
- Fe(
1309
- () => j.value.showTable,
1310
- (t) => {
1311
- e.value.table.show || (t && e.value.table.useDialog && Ve.value ? Ve.value.open() : "close" in Ve.value && Ve.value.close());
1312
- }
1313
- );
1314
- function Wa() {
1315
- j.value.showTable = !1, Ct.value && Ct.value.setTableIconState(!1);
1316
- }
1317
- function Ua(t) {
1318
- De.value = t, Qt.value += 1;
1319
- }
1320
- function qa() {
1321
- j.value.showTable = !j.value.showTable;
1322
- }
1323
- function Xa() {
1324
- j.value.dataLabels.show = !j.value.dataLabels.show;
1325
- }
1326
- function Ga() {
1327
- j.value.showTooltip = !j.value.showTooltip;
1328
- }
1329
- function rs() {
1330
- return A.value;
1331
- }
1332
- function ja(t) {
1333
- const l = t ?? 0, a = Ot(l);
1334
- return JSON.parse(JSON.stringify(A.value)).map((s) => {
1335
- const n = s.series[l], o = s.signedSeries?.[l], r = n === 0 ? 0 : (o === -1 && n >= 0 ? -n : n) || null;
1336
- return {
1337
- name: s.name,
1338
- absoluteIndex: s.absoluteIndex,
1339
- value: r,
1340
- proportion: s.proportions?.[l] || null,
1341
- color: s.color,
1342
- id: s.id,
1343
- timeLabel: Ie.value?.[a] || null
1344
- };
1345
- });
1346
- }
1347
- const is = m(() => Array(he.value).fill(0).map((t, l) => ja(l)));
1348
- Fe(
1349
- () => G.selectedXIndex,
1350
- (t) => {
1351
- if ([null, void 0].includes(G.selectedXIndex)) {
1352
- x.value = null;
1353
- return;
1354
- }
1355
- const l = t - u.value.start;
1356
- l < 0 || t >= u.value.end ? x.value = null : x.value = l ?? null;
1357
- },
1358
- { immediate: !0 }
1359
- );
1360
- const Ja = m(() => {
1361
- if (e.value.style.chart.lines.distributed)
1362
- return { min: -1, max: 1 };
1363
- const t = Me.value, l = ut.value, a = Math.max(
1364
- 1,
1365
- ...[...t, ...l].map((h) => h.series?.length || 0)
1366
- ), s = Array(a).fill(0), n = Array(a).fill(0);
1367
- t.forEach((h) => {
1368
- for (let w = 0; w < a; w += 1) {
1369
- const c = h.series[w] ?? 0;
1370
- c >= 0 ? s[w] += c : n[w] += c;
1371
- }
1372
- });
1373
- const o = Array(a).fill(0), r = Array(a).fill(0);
1374
- l.forEach((h) => {
1375
- for (let w = 0; w < a; w += 1) {
1376
- const c = h.series[w] ?? 0;
1377
- c > 0 && (o[w] = Math.max(o[w], c)), c < 0 && (r[w] = Math.min(r[w], c));
1378
- }
1379
- });
1380
- const y = Math.max(0, ...s, ...o), k = Math.min(0, ...n, ...r), T = e.value.style.chart.grid.scale.scaleMin, S = e.value.style.chart.grid.scale.scaleMax, z = e.value.style.chart.grid.scale.ticks, M = !e.value.style.chart.lines.distributed && (T !== null || S !== null) ? wt(
1381
- T !== null ? T : k > 0 ? 0 : k,
1382
- S !== null ? S : y < 0 ? 0 : y,
1383
- z
1384
- ) : St(
1385
- T !== null ? T : k > 0 ? 0 : k,
1386
- S !== null ? S : y < 0 ? 0 : y,
1387
- z
1388
- );
1389
- return { min: Number(M.min) || 0, max: Number(M.max) || 0 };
1390
- });
1391
- function us({ minimapH: t, unitW: l }) {
1392
- const a = (h) => typeof h == "string" ? h.replace(
1393
- /^M\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*,?\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*/i,
1394
- ""
1395
- ).trim() : "";
1396
- if (!Number.isFinite(t) || t <= 0 || !Number.isFinite(l) || l <= 0)
1397
- return "";
1398
- const s = A.value.filter((h) => !h.standalone), n = A.value.filter((h) => h.standalone), o = Math.max(
1399
- 0,
1400
- ...A.value.map(
1401
- (h) => Array.isArray(h.fullSeries) ? h.fullSeries.length : h.series.length
1402
- )
1403
- );
1404
- if (o <= 0) return "";
1405
- const r = o === 1 ? [l * 0.5] : Array.from({ length: o }, (h, w) => w * l);
1406
- if (e.value.style.chart.lines.distributed) {
1407
- const h = Array.from({ length: o }, (g, $) => {
1408
- let F = 0;
1409
- return s.forEach((E) => {
1410
- const B = (Array.isArray(E.fullSeries) ? E.fullSeries : E.series)?.[$];
1411
- B != null && !Number.isNaN(B) && (F += Math.abs(B));
1412
- }), F || 1;
1413
- }), w = (g) => {
1414
- const $ = Math.max(0, Math.min(1, g || 0));
1415
- return t - t * $;
1416
- }, c = [], _ = Array(o).fill(0);
1417
- return s.forEach((g) => {
1418
- const $ = Array.isArray(g.fullSeries) ? g.fullSeries : g.series, F = new Array(o), E = new Array(o);
1419
- for (let U = 0; U < o; U += 1) {
1420
- const be = $?.[U], xe = be == null || Number.isNaN(be) ? 0 : Math.abs(be) / h[U];
1421
- E[U] = _[U], _[U] += xe, F[U] = _[U];
1422
- }
1423
- const I = F.map(w), B = E.map(w), H = r.map((U, be) => ({ x: U, y: I[be] })), te = r.map((U, be) => ({ x: U, y: B[be] })), J = we(H), W = we([...te].reverse()), D = Se(H), p = Se([...te].reverse()), L = te[te.length - 1];
1424
- if (e.value.style.chart.lines.useArea) {
1425
- const U = e.value.style.chart.lines.smooth ? `M${H[0].x},${H[0].y} ${a(J)} L${L.x},${L.y} ${a(W)} Z` : `M${H[0].x},${H[0].y} ${a(D)} L${L.x},${L.y} ${a(p)} Z`;
1426
- c.push(
1427
- `<path d="${U}"
1428
- fill="${Zt.pattern ? `url(#pattern_${K.value}_${g.absoluteIndex})` : (e.value.style.chart.lines.gradient.show, g.color)}"
1429
- opacity="${e.value.style.chart.lines.areaOpacity}"
1430
- stroke="none" />`
1431
- );
1432
- }
1433
- const q = e.value.style.chart.lines.smooth ? `M${H[0].x},${H[0].y} ${a(J)}` : `M${H[0].x},${H[0].y} ${a(D)}`;
1434
- c.push(
1435
- `<path d="${q}"
1436
- fill="none"
1437
- stroke="${g.color}"
1438
- stroke-width="${e.value.style.chart.lines.strokeWidth}"
1439
- stroke-linecap="round" />`
1440
- );
1441
- }), n.length && n.forEach((g) => {
1442
- const $ = Array.isArray(g.fullSeries) ? g.fullSeries : g.series, F = Array.from(
1443
- { length: o },
1444
- (te, J) => w(Math.abs($?.[J] ?? 0) / h[J])
1445
- ), E = r.map((te, J) => ({ x: te, y: F[J] })), I = we(E), B = Se(E), H = e.value.style.chart.lines.smooth ? `M${E[0].x},${E[0].y} ${a(I)}` : `M${E[0].x},${E[0].y} ${a(B)}`;
1446
- c.push(
1447
- `<path d="${H}"
1448
- fill="none"
1449
- stroke="${g.color}"
1450
- stroke-width="${e.value.style.chart.lines.strokeWidth}"
1451
- stroke-linecap="round" />`
1452
- );
1453
- }), c.join("");
1454
- }
1455
- const y = Ja.value.min, k = Ja.value.max, T = Math.abs(y), S = k + T || 1, z = (h) => Math.max(0, Math.min(t, h)), O = (h) => z(t - t * (((h ?? 0) + T) / S)), M = [];
1456
- if (s.length) {
1457
- const h = Array(o).fill(0), w = Array(o).fill(0);
1458
- s.forEach((c) => {
1459
- const _ = Array.isArray(c.fullSeries) ? c.fullSeries : c.series, g = new Array(o), $ = new Array(o);
1460
- for (let L = 0; L < o; L += 1) {
1461
- const q = _?.[L] ?? 0;
1462
- q >= 0 ? ($[L] = h[L], h[L] += q, g[L] = h[L]) : ($[L] = w[L], w[L] += q, g[L] = w[L]);
1463
- }
1464
- const F = g.map(O), E = $.map(O), I = r.map((L, q) => ({ x: L, y: F[q] })), B = r.map((L, q) => ({ x: L, y: E[q] })), H = we(I), te = we([...B].reverse()), J = Se(I), W = Se([...B].reverse()), D = B[B.length - 1];
1465
- if (e.value.style.chart.lines.useArea) {
1466
- const L = e.value.style.chart.lines.smooth ? `M${I[0].x},${I[0].y} ${a(H)} L${D.x},${D.y} ${a(te)} Z` : `M${I[0].x},${I[0].y} ${a(J)} L${D.x},${D.y} ${a(W)} Z`;
1467
- M.push(
1468
- `<path d="${L}"
1469
- fill="${Zt.pattern ? `url(#pattern_${K.value}_${c.absoluteIndex})` : (e.value.style.chart.lines.gradient.show, c.color)}"
1470
- opacity="${e.value.style.chart.lines.areaOpacity}"
1471
- stroke="none" />`
1472
- );
1473
- }
1474
- const p = e.value.style.chart.lines.smooth ? `M${I[0].x},${I[0].y} ${a(H)}` : `M${I[0].x},${I[0].y} ${a(J)}`;
1475
- M.push(
1476
- `<path d="${p}"
1477
- fill="none"
1478
- stroke="${c.color}"
1479
- stroke-width="${e.value.style.chart.lines.strokeWidth}"
1480
- stroke-linecap="round" />`
1481
- );
1482
- });
1483
- }
1484
- return n.length && n.forEach((h) => {
1485
- const c = (Array.isArray(h.fullSeries) ? h.fullSeries : h.series).map(O), _ = r.map((E, I) => ({ x: E, y: c[I] })), g = we(_), $ = Se(_), F = e.value.style.chart.lines.smooth ? `M${_[0].x},${_[0].y} ${a(g)}` : `M${_[0].x},${_[0].y} ${a($)}`;
1486
- M.push(
1487
- `<path d="${F}"
1488
- fill="none"
1489
- stroke="${h.color}"
1490
- stroke-width="${e.value.style.chart.lines.strokeWidth}"
1491
- stroke-linecap="round" />`
1492
- );
1493
- }), M.join("");
1494
- }
1495
- function cs(t, l) {
1496
- const a = e.value.style.chart.lines, s = a.dataLabels;
1497
- return a.showDistributedPercentage && a.distributed ? ya.value ? l === 0 ? !s.hideEmptyPercentages : Math.abs(l) * 100 >= s.hideUnderPercentage : s.hideEmptyPercentages ? Math.abs(l) > 0 : !0 : ya.value ? (fa.value && Et.value && console.warn(
1498
- "Vue Data UI - VueUiStackline - You cannot set both dataLabels.hideUnderPercentage and dataLabels.hideUnderValue. Note that dataLabels.hideUnderPercentage takes precedence in this case."
1499
- ), Math.abs(t) > vs.value * s.hideUnderPercentage / 100) : fa.value ? Math.abs(t) >= s.hideUnderValue : s.hideEmptyValues ? t !== 0 : !0;
1500
- }
1501
- const vs = m(() => Math.max(...A.value.flatMap((t) => t.series)));
1502
- function Ka(t, l, a, s, n) {
1503
- const o = n === -1 && t >= 0 ? -t : t;
1504
- return et(
1505
- e.value.style.chart.lines.dataLabels.formatter,
1506
- o,
1507
- Ce({
1508
- p: e.value.style.chart.lines.dataLabels.prefix,
1509
- v: o,
1510
- s: e.value.style.chart.lines.dataLabels.suffix,
1511
- r: e.value.style.chart.lines.dataLabels.rounding
1512
- }),
1513
- { datapoint: l, seriesIndex: a, datapointIndex: s }
1514
- );
1515
- }
1516
- function ds(t, l, a, s) {
1517
- return et(
1518
- e.value.style.chart.lines.dataLabels.formatter,
1519
- t,
1520
- Ce({
1521
- v: isNaN(t) ? 0 : t,
1522
- s: "%",
1523
- r: e.value.style.chart.lines.dataLabels.rounding
1524
- }),
1525
- { datapoint: l, seriesIndex: a, datapointIndex: s }
1526
- );
1527
- }
1528
- function Za({ seriesIndex: t, datapoint: l }) {
1529
- const a = u.value.start + t;
1530
- ye("selectX", {
1531
- dataset: l,
1532
- index: a,
1533
- indexLabel: e.value.style.chart.grid.x.timeLabels.values[a]
1534
- });
1535
- }
1536
- function hs(t) {
1537
- if (t?.stage === "start") {
1538
- lt.value = !0;
1539
- return;
1540
- }
1541
- if (t?.stage === "end") {
1542
- lt.value = !1;
1543
- return;
1544
- }
1545
- pa();
1546
- }
1547
- async function Qa() {
1548
- if (ye("copyAlt", {
1549
- config: e.value,
1550
- dataset: A.value
1551
- }), !e.value.userOptions.callbacks.altCopy) {
1552
- console.warn(
1553
- "Vue Data UI - A callback must be set for `altCopy` in userOptions."
1554
- );
1555
- return;
1556
- }
1557
- await Promise.resolve(
1558
- e.value.userOptions.callbacks.altCopy({
1559
- config: e.value,
1560
- dataset: A.value
1561
- })
1562
- );
1563
- }
1564
- const Wt = f(!1);
1565
- function ms() {
1566
- ue.value = null, Wt.value = !0;
1567
- }
1568
- function fs() {
1569
- ue.value = null, Be.value = "pointer", Re.value = !1, x.value = null, ye("selectX", { seriesIndex: null, datapoint: null }), Wt.value = !1;
1570
- }
1571
- function ys(t) {
1572
- if (!de.value || Ae.value || document.activeElement !== de.value || dt.value || !Y.value) return;
1573
- const l = t.key === "ArrowLeft", a = t.key === "ArrowRight", s = t.key === "Enter" || t.key === " ", n = t.key === "Escape";
1574
- if (!l && !a && !s && !n)
1575
- return;
1576
- if (t.preventDefault(), t.stopPropagation(), n) {
1577
- ue.value = null, Be.value = "pointer", Re.value = !1, x.value = null, ye("selectX", { seriesIndex: null, datapoint: null });
1578
- return;
1579
- }
1580
- if (s) {
1581
- if (ue.value === null) return;
1582
- Oa(ue.value);
1583
- return;
1584
- }
1585
- let o = ue.value;
1586
- const r = yt.value, y = o !== null && o >= 0 && o < Y.value, k = r !== null && r >= 0 && r < Y.value;
1587
- y ? a ? (o += 1, o >= Y.value && (o = 0)) : l && (o -= 1, o < 0 && (o = Y.value - 1)) : k ? (o = a ? r + 1 : r - 1, o >= Y.value && (o = 0), o < 0 && (o = Y.value - 1)) : a ? o = 0 : o = Y.value - 1, ue.value = o, gs(o), Bt(!0, o, "keyboard");
1588
- }
1589
- function gs(t) {
1590
- if (!Number.isFinite(t) || !de.value) return;
1591
- const l = d.value.left + t * gt.value, a = d.value.top + d.value.height / 2, s = Rs(l, a, de.value);
1592
- s && (ca.value = s);
1593
- }
1594
- const Ut = m(() => {
1595
- const t = _e.value?.colNames ?? [], l = _e.value?.body ?? [];
1596
- return { headers: t, rows: l };
1597
- });
1598
- return cl({
1599
- getData: rs,
1600
- getImage: ns,
1601
- generatePdf: ga,
1602
- generateCsv: Ht,
1603
- generateImage: pa,
1604
- generateSvg: Ha,
1605
- hideSeries: es,
1606
- showSeries: Ql,
1607
- toggleTable: qa,
1608
- toggleLabels: Xa,
1609
- toggleTooltip: Ga,
1610
- toggleAnnotator: Nt,
1611
- toggleFullscreen: Ua,
1612
- copyAlt: Qa
1613
- }), (t, l) => (i(), v("div", {
1614
- id: `stackline_${K.value}`,
1615
- ref_key: "stacklineChart",
1616
- ref: ie,
1617
- class: tl({
1618
- "vue-data-ui-component": !0,
1619
- "vue-ui-stackline": !0,
1620
- "vue-data-ui-wrapper-fullscreen": De.value
1621
- }),
1622
- style: ge(`background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color};font-family:${e.value.style.fontFamily}; position: relative; ${e.value.responsive ? "height: 100%" : ""}`),
1623
- onMouseenter: Ll,
1624
- onMouseleave: Al
1625
- }, [
1626
- le("div", {
1627
- id: `chart-instructions-${K.value}`,
1628
- class: "sr-only"
1629
- }, [
1630
- le("p", null, fe(e.value.a11y.translations.keyboardNavigation), 1)
1631
- ], 8, no),
1632
- Ut.value?.rows?.length ? (i(), se(to, {
1633
- key: 0,
1634
- uid: K.value,
1635
- head: Ut.value.headers,
1636
- body: Ut.value.rows,
1637
- notice: e.value.a11y.translations.tableAvailable,
1638
- caption: e.value.a11y.translations.tableCaption
1639
- }, null, 8, ["uid", "head", "body", "notice", "caption"])) : b("", !0),
1640
- e.value.userOptions.buttons.annotator ? (i(), se(C(yl), {
1641
- key: 1,
1642
- svgRef: C(de),
1643
- backgroundColor: e.value.style.chart.backgroundColor,
1644
- color: e.value.style.chart.color,
1645
- active: Ae.value,
1646
- isCursorPointer: ce.value,
1647
- onClose: Nt
1648
- }, {
1649
- "annotator-action-close": P(() => [
1650
- N(t.$slots, "annotator-action-close", {}, void 0, !0)
1651
- ]),
1652
- "annotator-action-color": P(({ color: a }) => [
1653
- N(t.$slots, "annotator-action-color", Q(ee({ color: a })), void 0, !0)
1654
- ]),
1655
- "annotator-action-draw": P(({ mode: a }) => [
1656
- N(t.$slots, "annotator-action-draw", Q(ee({ mode: a })), void 0, !0)
1657
- ]),
1658
- "annotator-action-undo": P(({ disabled: a }) => [
1659
- N(t.$slots, "annotator-action-undo", Q(ee({ disabled: a })), void 0, !0)
1660
- ]),
1661
- "annotator-action-redo": P(({ disabled: a }) => [
1662
- N(t.$slots, "annotator-action-redo", Q(ee({ disabled: a })), void 0, !0)
1663
- ]),
1664
- "annotator-action-delete": P(({ disabled: a }) => [
1665
- N(t.$slots, "annotator-action-delete", Q(ee({ disabled: a })), void 0, !0)
1666
- ]),
1667
- _: 3
1668
- }, 8, ["svgRef", "backgroundColor", "color", "active", "isCursorPointer"])) : b("", !0),
1669
- N(t.$slots, "userConfig", {}, void 0, !0),
1670
- Tl.value ? (i(), v("div", {
1671
- key: 2,
1672
- ref_key: "noTitle",
1673
- ref: aa,
1674
- class: "vue-data-ui-no-title-space",
1675
- style: "height:36px; width: 100%;background:transparent"
1676
- }, null, 512)) : b("", !0),
1677
- e.value.style.chart.title.text ? (i(), v("div", {
1678
- key: 3,
1679
- ref_key: "chartTitle",
1680
- ref: ea,
1681
- style: "width:100%;background:transparent;"
1682
- }, [
1683
- (i(), se(Zs, {
1684
- key: `title_${sa.value}`,
1685
- config: {
1686
- title: {
1687
- cy: "stackline-title",
1688
- ...e.value.style.chart.title
1689
- },
1690
- subtitle: {
1691
- cy: "stackline-subtitle",
1692
- ...e.value.style.chart.title.subtitle
1693
- }
1694
- }
1695
- }, null, 8, ["config"]))
1696
- ], 512)) : b("", !0),
1697
- le("div", {
1698
- id: `legend-top-${K.value}`
1699
- }, null, 8, ro),
1700
- e.value.userOptions.show && Ee.value && (C(ma) || C(zt)) ? (i(), se(C(gl), {
1701
- ref_key: "userOptionsRef",
1702
- ref: Ct,
1703
- key: `user_option_${Qt.value}`,
1704
- backgroundColor: e.value.style.chart.backgroundColor,
1705
- color: e.value.style.chart.color,
1706
- isPrinting: C(_t),
1707
- isImaging: C(Ft),
1708
- uid: K.value,
1709
- hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
1710
- hasPdf: e.value.userOptions.buttons.pdf,
1711
- hasImg: e.value.userOptions.buttons.img,
1712
- hasSvg: e.value.userOptions.buttons.svg,
1713
- hasXls: e.value.userOptions.buttons.csv,
1714
- hasTable: e.value.userOptions.buttons.table,
1715
- hasLabel: e.value.userOptions.buttons.labels,
1716
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
1717
- hasAltCopy: e.value.userOptions.buttons.altCopy,
1718
- isFullscreen: De.value,
1719
- chartElement: ie.value,
1720
- position: e.value.userOptions.position,
1721
- isTooltip: j.value.showTooltip,
1722
- titles: { ...e.value.userOptions.buttonTitles },
1723
- hasAnnotator: e.value.userOptions.buttons.annotator,
1724
- isAnnotation: Ae.value,
1725
- callbacks: e.value.userOptions.callbacks,
1726
- printScale: e.value.userOptions.print.scale,
1727
- tableDialog: e.value.table.useDialog,
1728
- isCursorPointer: ce.value,
1729
- onToggleFullscreen: Ua,
1730
- onGeneratePdf: C(ga),
1731
- onGenerateCsv: Ht,
1732
- onGenerateImage: hs,
1733
- onGenerateSvg: Ha,
1734
- onToggleTable: qa,
1735
- onToggleLabels: Xa,
1736
- onToggleTooltip: Ga,
1737
- onToggleAnnotator: Nt,
1738
- onCopyAlt: Qa,
1739
- style: ge({
1740
- visibility: C(ma) ? C(zt) ? "visible" : "hidden" : "visible"
1741
- })
1742
- }, jt({ _: 2 }, [
1743
- t.$slots.menuIcon ? {
1744
- name: "menuIcon",
1745
- fn: P(({ isOpen: a, color: s }) => [
1746
- N(t.$slots, "menuIcon", Q(ee({ isOpen: a, color: s })), void 0, !0)
1747
- ]),
1748
- key: "0"
1749
- } : void 0,
1750
- t.$slots.optionTooltip ? {
1751
- name: "optionTooltip",
1752
- fn: P(() => [
1753
- N(t.$slots, "optionTooltip", {}, void 0, !0)
1754
- ]),
1755
- key: "1"
1756
- } : void 0,
1757
- t.$slots.optionPdf ? {
1758
- name: "optionPdf",
1759
- fn: P(() => [
1760
- N(t.$slots, "optionPdf", {}, void 0, !0)
1761
- ]),
1762
- key: "2"
1763
- } : void 0,
1764
- t.$slots.optionCsv ? {
1765
- name: "optionCsv",
1766
- fn: P(() => [
1767
- N(t.$slots, "optionCsv", {}, void 0, !0)
1768
- ]),
1769
- key: "3"
1770
- } : void 0,
1771
- t.$slots.optionImg ? {
1772
- name: "optionImg",
1773
- fn: P(() => [
1774
- N(t.$slots, "optionImg", {}, void 0, !0)
1775
- ]),
1776
- key: "4"
1777
- } : void 0,
1778
- t.$slots.optionSvg ? {
1779
- name: "optionSvg",
1780
- fn: P(() => [
1781
- N(t.$slots, "optionSvg", {}, void 0, !0)
1782
- ]),
1783
- key: "5"
1784
- } : void 0,
1785
- t.$slots.optionTable ? {
1786
- name: "optionTable",
1787
- fn: P(() => [
1788
- N(t.$slots, "optionTable", {}, void 0, !0)
1789
- ]),
1790
- key: "6"
1791
- } : void 0,
1792
- t.$slots.optionLabels ? {
1793
- name: "optionLabels",
1794
- fn: P(() => [
1795
- N(t.$slots, "optionLabels", {}, void 0, !0)
1796
- ]),
1797
- key: "7"
1798
- } : void 0,
1799
- t.$slots.optionFullscreen ? {
1800
- name: "optionFullscreen",
1801
- fn: P(({ toggleFullscreen: a, isFullscreen: s }) => [
1802
- N(t.$slots, "optionFullscreen", Q(ee({ toggleFullscreen: a, isFullscreen: s })), void 0, !0)
1803
- ]),
1804
- key: "8"
1805
- } : void 0,
1806
- t.$slots.optionAnnotator ? {
1807
- name: "optionAnnotator",
1808
- fn: P(({ toggleAnnotator: a, isAnnotator: s }) => [
1809
- N(t.$slots, "optionAnnotator", Q(ee({ toggleAnnotator: a, isAnnotator: s })), void 0, !0)
1810
- ]),
1811
- key: "9"
1812
- } : void 0,
1813
- t.$slots.optionAltCopy ? {
1814
- name: "optionAltCopy",
1815
- fn: P(({ altCopy: a }) => [
1816
- N(t.$slots, "optionAltCopy", Q(ee({ altCopy: a })), void 0, !0)
1817
- ]),
1818
- key: "10"
1819
- } : void 0
1820
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "hasAltCopy", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "isCursorPointer", "onGeneratePdf", "style"])) : b("", !0),
1821
- le("div", io, [
1822
- (i(), v("svg", {
1823
- ref_key: "svgRef",
1824
- ref: de,
1825
- "aria-describedby": `chart-instructions-${K.value}`,
1826
- xmlns: C(Ps),
1827
- viewBox: `0 0 ${d.value.chartWidth <= 0 ? 10 : d.value.chartWidth} ${d.value.chartHeight <= 0 ? 10 : d.value.chartHeight}`,
1828
- class: tl({
1829
- "vue-data-ui-loading": C(ve),
1830
- "no-transition": !e.value.useCssAnimation
1831
- }),
1832
- style: ge(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`),
1833
- role: "img",
1834
- "aria-live": "polite",
1835
- tabindex: "0",
1836
- preserveAspectRatio: "xMidYMid",
1837
- onMousemove: Gl,
1838
- onMouseleave: Vt,
1839
- onClick: jl,
1840
- onFocus: ms,
1841
- onBlur: fs,
1842
- onKeydown: ys
1843
- }, [
1844
- Ze(C(pl)),
1845
- (i(!0), v(R, null, X(Me.value, (a) => (i(), v(R, null, [
1846
- t.$slots.pattern ? (i(), v("defs", co, [
1847
- N(t.$slots, "pattern", xt({ ref_for: !0 }, {
1848
- seriesIndex: a.absoluteIndex,
1849
- patternId: `pattern_${K.value}_${a.absoluteIndex}`
1850
- }), void 0, !0)
1851
- ])) : b("", !0)
1852
- ], 64))), 256)),
1853
- t.$slots["chart-background"] ? (i(), v("foreignObject", {
1854
- key: 0,
1855
- x: ae.value.left,
1856
- y: d.value.top,
1857
- width: ae.value.width,
1858
- height: d.value.height,
1859
- style: {
1860
- pointerEvents: "none"
1861
- }
1862
- }, [
1863
- N(t.$slots, "chart-background", {}, void 0, !0)
1864
- ], 8, vo)) : b("", !0),
1865
- e.value.style.chart.lines.gradient.show ? (i(), v("defs", ho, [
1866
- (i(!0), v(R, null, X(A.value, (a, s) => (i(), v("linearGradient", {
1867
- id: `gradient_${a.id}`,
1868
- x1: "0%",
1869
- y1: "0%",
1870
- x2: "0%",
1871
- y2: "100%"
1872
- }, [
1873
- le("stop", {
1874
- offset: "0%",
1875
- "stop-color": a.color
1876
- }, null, 8, fo),
1877
- le("stop", {
1878
- offset: "100%",
1879
- "stop-color": C(zs)(
1880
- a.color,
1881
- e.value.style.chart.lines.gradient.intensity / 100
1882
- )
1883
- }, null, 8, yo)
1884
- ], 8, mo))), 256))
1885
- ])) : b("", !0),
1886
- e.value.style.chart.grid.x.showHorizontalLines ? (i(!0), v(R, { key: 2 }, X(ze.value, (a, s) => (i(), v("line", {
1887
- x1: ae.value.left,
1888
- x2: ae.value.right,
1889
- y1: a.y,
1890
- y2: a.y,
1891
- stroke: e.value.style.chart.grid.x.linesColor,
1892
- "stroke-width": e.value.style.chart.grid.x.linesThickness,
1893
- "stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
1894
- "stroke-linecap": "round"
1895
- }, null, 8, go))), 256)) : b("", !0),
1896
- e.value.style.chart.grid.y.showVerticalLines ? (i(!0), v(R, { key: 3 }, X(u.value.end - u.value.start, (a, s) => (i(), v("line", {
1897
- x1: re(s),
1898
- x2: re(s),
1899
- y1: d.value.top,
1900
- y2: d.value.bottom,
1901
- stroke: e.value.style.chart.grid.y.linesColor,
1902
- "stroke-width": e.value.style.chart.grid.y.linesThickness,
1903
- "stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
1904
- "stroke-linecap": "round"
1905
- }, null, 8, po))), 256)) : b("", !0),
1906
- e.value.style.chart.grid.x.showAxis ? (i(), v("line", {
1907
- key: 4,
1908
- x1: ae.value.left,
1909
- x2: ae.value.right,
1910
- y1: d.value.bottom,
1911
- y2: d.value.bottom,
1912
- stroke: e.value.style.chart.grid.x.axisColor,
1913
- "stroke-width": e.value.style.chart.grid.x.axisThickness,
1914
- "stroke-linecap": "round",
1915
- "stroke-linejoin": "round"
1916
- }, null, 8, bo)) : b("", !0),
1917
- e.value.style.chart.grid.y.showAxis && !e.value.style.chart.lines.distributed ? (i(), v("line", {
1918
- key: 5,
1919
- x1: ae.value.left,
1920
- x2: ae.value.left,
1921
- y1: d.value.top,
1922
- y2: d.value.bottom,
1923
- stroke: e.value.style.chart.grid.y.axisColor,
1924
- "stroke-width": e.value.style.chart.grid.y.axisThickness,
1925
- "stroke-linecap": "round",
1926
- "stroke-linejoin": "round"
1927
- }, null, 8, xo)) : b("", !0),
1928
- e.value.style.chart.grid.x.axisName.show && e.value.style.chart.grid.x.axisName.text ? (i(), v("text", {
1929
- key: 6,
1930
- ref_key: "xAxisLabel",
1931
- ref: ot,
1932
- x: d.value.left + d.value.width / 2,
1933
- y: d.value.chartHeight - 3,
1934
- "font-size": e.value.style.chart.grid.x.axisName.fontSize,
1935
- fill: e.value.style.chart.grid.x.axisName.color,
1936
- "font-weight": e.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
1937
- "text-anchor": "middle"
1938
- }, fe(e.value.style.chart.grid.x.axisName.text), 9, ko)) : b("", !0),
1939
- e.value.style.chart.grid.y.axisName.show && e.value.style.chart.grid.y.axisName.text ? (i(), v("text", {
1940
- key: 7,
1941
- ref_key: "yAxisLabel",
1942
- ref: Lt,
1943
- transform: `translate(${e.value.style.chart.grid.y.axisName.fontSize}, ${d.value.top + d.value.height / 2}) rotate(-90)`,
1944
- "font-size": e.value.style.chart.grid.y.axisName.fontSize,
1945
- fill: e.value.style.chart.grid.y.axisName.color,
1946
- "font-weight": e.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
1947
- "text-anchor": "middle"
1948
- }, fe(e.value.style.chart.grid.y.axisName.text), 9, wo)) : b("", !0),
1949
- e.value.style.chart.grid.frame.show ? (i(), v("rect", {
1950
- key: 8,
1951
- style: {
1952
- pointerEvents: "none",
1953
- transition: "none",
1954
- animation: "none !important"
1955
- },
1956
- x: ae.value.left,
1957
- y: d.value.top,
1958
- width: ae.value.width,
1959
- height: d.value.height,
1960
- fill: "transparent",
1961
- stroke: e.value.style.chart.grid.frame.stroke,
1962
- "stroke-width": e.value.style.chart.grid.frame.strokeWidth,
1963
- "stroke-linecap": e.value.style.chart.grid.frame.strokeLinecap,
1964
- "stroke-linejoin": e.value.style.chart.grid.frame.strokeLinejoin,
1965
- "stroke-dasharray": e.value.style.chart.grid.frame.strokeDasharray
1966
- }, null, 8, So)) : b("", !0),
1967
- (i(!0), v(R, null, X(A.value, (a) => (i(), v(R, null, [
1968
- e.value.style.chart.lines.useArea && !a.standalone ? (i(), v("path", {
1969
- key: 0,
1970
- d: e.value.style.chart.lines.smooth ? a.smoothArea : a.straightArea,
1971
- fill: t.$slots.pattern ? `url(#pattern_${K.value}_${a.absoluteIndex})` : e.value.style.chart.lines.gradient.show ? `url(#gradient_${a.id})` : a.color,
1972
- opacity: e.value.style.chart.lines.areaOpacity,
1973
- style: ge({
1974
- transition: C(ve) || !e.value.useCssAnimation ? void 0 : "all 0.3s ease-in-out"
1975
- })
1976
- }, null, 12, Mo)) : b("", !0)
1977
- ], 64))), 256)),
1978
- (i(!0), v(R, null, X(A.value, (a) => (i(), v("path", {
1979
- d: e.value.style.chart.lines.smooth ? a.smoothPath : a.straightPath,
1980
- stroke: a.color,
1981
- "stroke-width": e.value.style.chart.lines.strokeWidth,
1982
- fill: "none",
1983
- "stroke-linecap": "round",
1984
- style: ge({
1985
- transition: C(ve) || !e.value.useCssAnimation ? void 0 : "all 0.3s ease-in-out"
1986
- })
1987
- }, null, 12, $o))), 256)),
1988
- e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.lines.distributed ? (i(), v("g", {
1989
- key: 9,
1990
- ref_key: "scaleLabels",
1991
- ref: At
1992
- }, [
1993
- (i(!0), v(R, null, X(ze.value, (a, s) => (i(), v("line", {
1994
- x1: ae.value.left,
1995
- x2: ae.value.left - 6,
1996
- y1: a.y,
1997
- y2: a.y,
1998
- stroke: e.value.style.chart.grid.x.axisColor,
1999
- "stroke-width": 1
2000
- }, null, 8, Co))), 256)),
2001
- (i(!0), v(R, null, X(ze.value, (a, s) => (i(), v("text", {
2002
- x: a.x,
2003
- y: a.y + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
2004
- "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
2005
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
2006
- fill: e.value.style.chart.grid.y.axisLabels.color,
2007
- "text-anchor": "end"
2008
- }, fe(C(et)(
2009
- e.value.style.chart.grid.y.axisLabels.formatter,
2010
- a.value,
2011
- C(Ce)({
2012
- p: e.value.style.chart.lines.dataLabels.prefix,
2013
- v: a.value,
2014
- s: e.value.style.chart.lines.dataLabels.suffix,
2015
- r: e.value.style.chart.grid.y.axisLabels.rounding
2016
- }),
2017
- { datapoint: a }
2018
- )), 9, Lo))), 256))
2019
- ], 512)) : b("", !0),
2020
- e.value.style.chart.grid.x.timeLabels.show ? (i(), v("g", {
2021
- key: 10,
2022
- ref_key: "timeLabelsEls",
2023
- ref: nt
2024
- }, [
2025
- t.$slots["time-label"] ? (i(), v("g", Ao, [
2026
- (i(!0), v(R, null, X(ht.value, (a, s) => (i(), v("g", null, [
2027
- N(t.$slots, "time-label", xt({ ref_for: !0 }, {
2028
- x: d.value.left + vt.value * s + vt.value / 2,
2029
- y: d.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY,
2030
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
2031
- fill: e.value.style.chart.grid.x.timeLabels.color,
2032
- transform: `translate(${d.value.left + vt.value * s + vt.value / 2}, ${d.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`,
2033
- absoluteIndex: a.absoluteIndex,
2034
- content: a.text,
2035
- textAnchor: e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
2036
- show: !0
2037
- }), void 0, !0)
2038
- ]))), 256))
2039
- ])) : (i(), v("g", To, [
2040
- (i(!0), v(R, null, X(ht.value, (a, s) => (i(), v("g", null, [
2041
- String(a.text).includes(`
2042
- `) ? (i(), v("text", {
2043
- key: s + "-multi",
2044
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
2045
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
2046
- fill: e.value.style.chart.grid.x.timeLabels.color,
2047
- transform: `
2048
- translate(
2049
- ${re(s)},
2050
- ${d.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}
2051
- ),
2052
- rotate(${e.value.style.chart.grid.x.timeLabels.rotation})
2053
- `,
2054
- style: ge({
2055
- cursor: ce.value ? "pointer" : "default"
2056
- }),
2057
- innerHTML: t.createTSpansFromLineBreaksOnX({
2058
- content: String(a.text),
2059
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
2060
- fill: e.value.style.chart.grid.x.timeLabels.color,
2061
- x: 0,
2062
- y: 0
2063
- }),
2064
- onClick: () => Va(a, s)
2065
- }, null, 12, Po)) : (i(), v("text", {
2066
- class: "vue-data-ui-time-label",
2067
- key: s,
2068
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
2069
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
2070
- "font-weight": e.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
2071
- fill: e.value.style.chart.grid.x.timeLabels.color,
2072
- transform: `translate(${re(s)}, ${d.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`,
2073
- style: ge({
2074
- cursor: ce.value ? "pointer" : "default"
2075
- }),
2076
- onClick: () => Va(a, s)
2077
- }, fe(a.text), 13, No))
2078
- ]))), 256))
2079
- ]))
2080
- ], 512)) : b("", !0),
2081
- (Le.value || ![null, void 0].includes(x.value)) && !e.value.style.chart.highlighter.useLine ? (i(!0), v(R, { key: 11 }, X(u.value.end - u.value.start, (a, s) => (i(), v("g", {
2082
- key: `tooltip_trap_highlighter_${s}`
2083
- }, [
2084
- le("rect", {
2085
- x: Ra(s).x,
2086
- y: d.value.top,
2087
- height: d.value.height,
2088
- width: Ra(s).width,
2089
- fill: [
2090
- Ye.value,
2091
- x.value
2092
- ].includes(s) ? C(Is)(
2093
- e.value.style.chart.highlighter.color,
2094
- e.value.style.chart.highlighter.opacity
2095
- ) : "transparent",
2096
- style: {
2097
- transition: "none !important",
2098
- animation: "none !important"
2099
- }
2100
- }, null, 8, zo)
2101
- ]))), 128)) : b("", !0),
2102
- (Le.value || ![null, void 0].includes(x.value)) && e.value.style.chart.highlighter.useLine ? (i(), v(R, { key: 12 }, [
2103
- ![null, void 0].includes(x.value) || ![null, void 0].includes(Ye.value) ? (i(), v("g", Io, [
2104
- le("line", {
2105
- x1: re(
2106
- (x.value ?? Ye.value) || 0
2107
- ),
2108
- x2: re(
2109
- (x.value ?? Ye.value) || 0
2110
- ),
2111
- y1: C(tt)(d.value.top),
2112
- y2: C(tt)(d.value.bottom),
2113
- stroke: e.value.style.chart.highlighter.color,
2114
- "stroke-width": e.value.style.chart.highlighter.lineWidth,
2115
- "stroke-dasharray": e.value.style.chart.highlighter.lineDasharray,
2116
- "stroke-linecap": "round",
2117
- style: { transition: "none !important", animation: "none !important", "pointer-events": "none" }
2118
- }, null, 8, _o)
2119
- ])) : b("", !0)
2120
- ], 64)) : b("", !0),
2121
- (i(!0), v(R, null, X(A.value, (a) => (i(), v(R, null, [
2122
- Le.value && u.value.end - u.value.start > e.value.style.chart.lines.dot.hideAboveMaxSerieLength ? (i(), v("g", Fo, [
2123
- x.value != null ? (i(), v(R, { key: 0 }, [
2124
- a.rel.includes(x.value) && a.fullSeries?.[u.value.start + x.value] != null && !Number.isNaN(
2125
- a.fullSeries?.[u.value.start + x.value]
2126
- ) ? (i(), se(Kt, {
2127
- key: 0,
2128
- shape: [
2129
- "triangle",
2130
- "square",
2131
- "diamond",
2132
- "pentagon",
2133
- "hexagon",
2134
- "star"
2135
- ].includes(a.shape) ? a.shape : "circle",
2136
- color: e.value.style.chart.lines.dot.useSerieColor ? a.color : e.value.style.chart.lines.dot.fill,
2137
- plot: {
2138
- x: C(rl)(
2139
- a.points[a.rel.indexOf(
2140
- x.value
2141
- )].x
2142
- ),
2143
- y: C(rl)(
2144
- a.points[a.rel.indexOf(
2145
- x.value
2146
- )].y
2147
- )
2148
- },
2149
- radius: e.value.style.chart.lines.dot.radius * 1.3,
2150
- stroke: e.value.style.chart.lines.dot.useSerieColor ? e.value.style.chart.backgroundColor : a.color,
2151
- strokeWidth: e.value.style.chart.lines.dot.strokeWidth,
2152
- transition: C(ve) ? void 0 : `all ${e.value.style.chart.lines.transitionDurationMs}ms ease-in-out`
2153
- }, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth", "transition"])) : b("", !0)
2154
- ], 64)) : b("", !0)
2155
- ])) : b("", !0)
2156
- ], 64))), 256)),
2157
- (i(!0), v(R, null, X(A.value, (a) => (i(), v(R, null, [
2158
- u.value.end - u.value.start < e.value.style.chart.lines.dot.hideAboveMaxSerieLength ? (i(!0), v(R, { key: 0 }, X(a.points, (s, n) => (i(), v("g", { key: n }, [
2159
- a.fullSeries?.[u.value.start + a.rel[n]] != null && !Number.isNaN(
2160
- a.fullSeries?.[u.value.start + a.rel[n]]
2161
- ) ? (i(), se(Kt, {
2162
- key: 0,
2163
- shape: [
2164
- "triangle",
2165
- "square",
2166
- "diamond",
2167
- "pentagon",
2168
- "hexagon",
2169
- "star"
2170
- ].includes(a.shape) ? a.shape : "circle",
2171
- color: e.value.style.chart.lines.dot.useSerieColor ? a.color : e.value.style.chart.lines.dot.fill,
2172
- plot: { x: s.x, y: s.y },
2173
- radius: Le.value && x.value === a.rel[n] ? e.value.style.chart.lines.dot.radius * 1.3 : e.value.style.chart.lines.dot.radius,
2174
- stroke: e.value.style.chart.lines.dot.useSerieColor ? e.value.style.chart.backgroundColor : a.color,
2175
- strokeWidth: e.value.style.chart.lines.dot.strokeWidth,
2176
- transition: C(ve) ? void 0 : `all ${e.value.style.chart.lines.transitionDurationMs}ms ease-in-out`
2177
- }, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth", "transition"])) : b("", !0)
2178
- ]))), 128)) : b("", !0)
2179
- ], 64))), 256)),
2180
- j.value.dataLabels.show && e.value.style.chart.lines.dataLabels.hideAboveMaxSerieLength > u.value.end - u.value.start ? (i(), v(R, { key: 13 }, [
2181
- (i(!0), v(R, null, X(A.value, (a, s) => (i(), v("g", { key: s }, [
2182
- (i(!0), v(R, null, X(a.points, (n, o) => (i(), v(R, { key: o }, [
2183
- cs(
2184
- a.series[o],
2185
- a.proportions[o]
2186
- ) ? (i(), v("text", {
2187
- key: 0,
2188
- x: n.x,
2189
- y: n.y + (a.series[o] >= 0 ? -e.value.style.chart.lines.dataLabels.fontSize / 2 + e.value.style.chart.lines.dataLabels.offsetY : e.value.style.chart.lines.dataLabels.fontSize * 1.2 - e.value.style.chart.lines.dataLabels.offsetY),
2190
- "font-size": e.value.style.chart.lines.dataLabels.fontSize,
2191
- fill: e.value.style.chart.lines.dataLabels.color,
2192
- "font-weight": e.value.style.chart.lines.dataLabels.bold ? "bold" : "normal",
2193
- "text-anchor": "middle"
2194
- }, fe(e.value.style.chart.lines.showDistributedPercentage && e.value.style.chart.lines.distributed ? ds(
2195
- a.proportions[o] * 100,
2196
- a,
2197
- s,
2198
- a.rel[o]
2199
- ) : Ka(
2200
- a.series[o],
2201
- a,
2202
- s,
2203
- a.rel[o],
2204
- a.signedSeries[o]
2205
- )), 9, Eo)) : b("", !0)
2206
- ], 64))), 128))
2207
- ]))), 128)),
2208
- e.value.style.chart.lines.totalValues.show && A.value.length > 1 ? (i(), v("g", {
2209
- key: 0,
2210
- ref_key: "sumTop",
2211
- ref: $l
2212
- }, [
2213
- (i(!0), v(R, null, X(La.value, (a, s) => (i(), v(R, null, [
2214
- !e.value.style.chart.lines.dataLabels.hideEmptyValues || a.value !== 0 ? (i(), v("text", {
2215
- key: 0,
2216
- x: re(s),
2217
- y: Vl(s),
2218
- "text-anchor": "middle",
2219
- "font-size": e.value.style.chart.lines.totalValues.fontSize,
2220
- "font-weight": e.value.style.chart.lines.totalValues.bold ? "bold" : "normal",
2221
- fill: e.value.style.chart.lines.totalValues.color
2222
- }, fe(Ka(
2223
- a.value,
2224
- a,
2225
- s,
2226
- s,
2227
- a.sign
2228
- )), 9, Ro)) : b("", !0)
2229
- ], 64))), 256))
2230
- ], 512)) : b("", !0)
2231
- ], 64)) : b("", !0),
2232
- wa.value ? (i(), v("rect", xt({ key: 14 }, _l.value, {
2233
- "data-start": u.value.start,
2234
- "data-end": u.value.end
2235
- }), null, 16, Oo)) : b("", !0),
2236
- N(t.$slots, "svg", {
2237
- svg: {
2238
- drawingArea: d.value,
2239
- data: A.value,
2240
- isPrintingImg: C(_t) | C(Ft) | lt.value,
2241
- isPrintingSvg: st.value
2242
- }
2243
- }, void 0, !0)
2244
- ], 46, uo)),
2245
- t.$slots.hint ? (i(), v("div", Do, [
2246
- N(t.$slots, "hint", Q(ee({
2247
- hint: e.value.a11y.translations.keyboardNavigation,
2248
- isVisible: Wt.value
2249
- })), void 0, !0)
2250
- ])) : b("", !0)
2251
- ]),
2252
- t.$slots.watermark ? (i(), v("div", Vo, [
2253
- N(t.$slots, "watermark", Q(ee({
2254
- isPrinting: C(_t) || C(Ft) || lt.value || st.value
2255
- })), void 0, !0)
2256
- ])) : b("", !0),
2257
- oa.value && (e.value.style.chart.legend.show || t.$slots.legend) ? (i(), se(ks, {
2258
- key: 6,
2259
- to: e.value.style.chart.legend.position === "top" ? `#legend-top-${K.value}` : `#legend-bottom-${K.value}`
2260
- }, [
2261
- le("div", {
2262
- ref_key: "chartLegend",
2263
- ref: ta
2264
- }, [
2265
- N(t.$slots, "legend", { legend: Xe.value }, () => [
2266
- e.value.style.chart.legend.show ? (i(), se(eo, {
2267
- key: 0,
2268
- legendSet: Xe.value,
2269
- config: Zl.value,
2270
- isCursorPointer: ce.value,
2271
- onClickMarker: l[0] || (l[0] = ({ legend: a }) => a.segregate())
2272
- }, jt({
2273
- item: P(({ legend: a }) => [
2274
- C(ve) ? b("", !0) : (i(), v("div", {
2275
- key: 0,
2276
- onClick: (s) => a.segregate(),
2277
- style: ge(`opacity:${V.value.includes(a.id) ? 0.5 : 1}`)
2278
- }, fe(a.name), 13, Bo))
2279
- ]),
2280
- legendToggle: P(() => [
2281
- Xe.value.length > 2 && e.value.style.chart.legend.selectAllToggle.show && !C(ve) ? (i(), se(lo, {
2282
- key: 0,
2283
- backgroundColor: e.value.style.chart.legend.selectAllToggle.backgroundColor,
2284
- color: e.value.style.chart.legend.selectAllToggle.color,
2285
- fontSize: e.value.style.chart.legend.fontSize,
2286
- checked: V.value.length > 0,
2287
- isCursorPointer: ce.value,
2288
- onToggle: Kl
2289
- }, null, 8, ["backgroundColor", "color", "fontSize", "checked", "isCursorPointer"])) : b("", !0)
2290
- ]),
2291
- _: 2
2292
- }, [
2293
- t.$slots.pattern ? {
2294
- name: "legend-pattern",
2295
- fn: P(({ legend: a, index: s }) => [
2296
- Ze(Kt, {
2297
- shape: a.shape,
2298
- radius: 30,
2299
- stroke: "none",
2300
- plot: { x: 30, y: 30 },
2301
- fill: `url(#pattern_${K.value}_${s})`
2302
- }, null, 8, ["shape", "fill"])
2303
- ]),
2304
- key: "0"
2305
- } : void 0
2306
- ]), 1032, ["legendSet", "config", "isCursorPointer"])) : b("", !0)
2307
- ], !0)
2308
- ], 512)
2309
- ], 8, ["to"])) : b("", !0),
2310
- Ee.value && e.value.userOptions.buttons.table ? (i(), se(ws(Ge.value.component), xt({ key: 7 }, Ge.value.props, {
2311
- ref_key: "tableUnit",
2312
- ref: Ve,
2313
- onClose: Wa
2314
- }), jt({
2315
- content: P(() => [
2316
- Ze(C(fl), {
2317
- colNames: _e.value.colNames,
2318
- head: _e.value.head,
2319
- body: _e.value.body,
2320
- config: _e.value.config,
2321
- title: e.value.table.useDialog ? "" : Ge.value.title,
2322
- withCloseButton: !e.value.table.useDialog,
2323
- isCursorPointer: ce.value,
2324
- onClose: Wa
2325
- }, {
2326
- th: P(({ th: a }) => [
2327
- le("div", { innerHTML: a }, null, 8, Yo)
2328
- ]),
2329
- td: P(({ td: a }) => [
2330
- al(fe(isNaN(Number(a)) ? a : C(Ce)({
2331
- p: e.value.style.chart.lines.dataLabels.prefix,
2332
- v: a,
2333
- s: e.value.style.chart.lines.dataLabels.suffix,
2334
- r: e.value.table.td.roundingValue
2335
- })), 1)
2336
- ]),
2337
- _: 1
2338
- }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton", "isCursorPointer"])
2339
- ]),
2340
- _: 2
2341
- }, [
2342
- e.value.table.useDialog ? {
2343
- name: "title",
2344
- fn: P(() => [
2345
- al(fe(Ge.value.title), 1)
2346
- ]),
2347
- key: "0"
2348
- } : void 0,
2349
- e.value.table.useDialog ? {
2350
- name: "actions",
2351
- fn: P(() => [
2352
- le("button", {
2353
- tabindex: "0",
2354
- class: "vue-ui-user-options-button",
2355
- onClick: l[1] || (l[1] = (a) => Ht(e.value.userOptions.callbacks.csv)),
2356
- style: ge({ cursor: ce.value ? "pointer" : "default" })
2357
- }, [
2358
- Ze(C(hl), {
2359
- name: "fileCsv",
2360
- stroke: Ge.value.props.color
2361
- }, null, 8, ["stroke"])
2362
- ], 4)
2363
- ]),
2364
- key: "1"
2365
- } : void 0
2366
- ]), 1040)) : b("", !0),
2367
- e.value.style.chart.zoom.show && Ee.value && _a.value && he.value > 6 ? (i(), se(ao, {
2368
- key: 8,
2369
- ref_key: "chartSlicer",
2370
- ref: Oe,
2371
- allMinimaps: Rl.value,
2372
- background: e.value.style.chart.zoom.color,
2373
- borderColor: e.value.style.chart.backgroundColor,
2374
- customFormat: e.value.style.chart.zoom.customFormat,
2375
- cutNullValues: !1,
2376
- enableRangeHandles: e.value.style.chart.zoom.enableRangeHandles,
2377
- enableSelectionDrag: e.value.style.chart.zoom.enableSelectionDrag,
2378
- end: u.value.end,
2379
- focusOnDrag: e.value.style.chart.zoom.focusOnDrag,
2380
- focusRangeRatio: e.value.style.chart.zoom.focusRangeRatio,
2381
- fontSize: e.value.style.chart.zoom.fontSize,
2382
- immediate: !e.value.style.chart.zoom.preview.enable,
2383
- inputColor: e.value.style.chart.zoom.color,
2384
- isPreview: wa.value,
2385
- labelLeft: e.value.style.chart.grid.x.timeLabels.values[u.value.start] ? me.value?.[0]?.text ?? "" : "",
2386
- labelRight: e.value.style.chart.grid.x.timeLabels.values[u.value.end - 1] ? me.value?.at(-1)?.text ?? "" : "",
2387
- max: Math.max(...Mt.dataset.map((a) => a.series.length)),
2388
- min: 0,
2389
- minimap: Ca.value,
2390
- minimapCompact: e.value.style.chart.zoom.minimap.compact,
2391
- minimapFrameColor: e.value.style.chart.zoom.minimap.frameColor,
2392
- minimapIndicatorColor: e.value.style.chart.zoom.minimap.indicatorColor,
2393
- minimapMerged: !1,
2394
- minimapSelectedColor: e.value.style.chart.zoom.minimap.selectedColor,
2395
- minimapSelectedColorOpacity: e.value.style.chart.zoom.minimap.selectedColorOpacity,
2396
- minimapSelectedIndex: x.value,
2397
- minimapSelectionRadius: 1,
2398
- preciseLabels: Ia.value.length ? Ia.value : Ie.value,
2399
- refreshEndPoint: e.value.style.chart.zoom.endIndex !== null ? e.value.style.chart.zoom.endIndex + 1 : Math.max(...Mt.dataset.map((a) => a.series.length)),
2400
- refreshStartPoint: e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex : 0,
2401
- selectColor: e.value.style.chart.zoom.highlightColor,
2402
- selectedSeries: is.value,
2403
- smoothMinimap: !1,
2404
- start: u.value.start,
2405
- textColor: e.value.style.chart.color,
2406
- timeLabels: Ie.value,
2407
- usePreciseLabels: e.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !e.value.style.chart.zoom.useDefaultFormat,
2408
- valueEnd: u.value.end,
2409
- valueStart: u.value.start,
2410
- verticalHandles: e.value.style.chart.zoom.minimap.verticalHandles,
2411
- maxWidth: e.value.style.chart.zoom.maxWidth,
2412
- isCursorPointer: ce.value,
2413
- additionalMinimapHeight: e.value.style.chart.zoom.minimap.additionalHeight,
2414
- handleType: e.value.style.chart.zoom.minimap.handleType,
2415
- handleIconColor: e.value.style.chart.zoom.minimap.handleIconColor,
2416
- handleBorderWidth: e.value.style.chart.zoom.minimap.handleBorderWidth,
2417
- handleBorderColor: e.value.style.chart.zoom.minimap.handleBorderColor,
2418
- handleFill: e.value.style.chart.zoom.minimap.handleFill,
2419
- handleWidth: e.value.style.chart.zoom.minimap.handleWidth,
2420
- "onUpdate:end": Ul,
2421
- "onUpdate:start": Wl,
2422
- onTrapMouse: Fl,
2423
- onReset: Ma,
2424
- onFutureEnd: l[2] || (l[2] = (a) => Sa("end", a)),
2425
- onFutureStart: l[3] || (l[3] = (a) => Sa("start", a))
2426
- }, {
2427
- "reset-action": P(({ reset: a }) => [
2428
- N(t.$slots, "reset-action", Q(ee({ reset: a })), void 0, !0)
2429
- ]),
2430
- slotMap: P(({ width: a, height: s, unitW: n }) => [
2431
- le("g", {
2432
- innerHTML: us({ minimapH: s, unitW: n })
2433
- }, null, 8, Ho)
2434
- ]),
2435
- _: 3
2436
- }, 8, ["allMinimaps", "background", "borderColor", "customFormat", "enableRangeHandles", "enableSelectionDrag", "end", "focusOnDrag", "focusRangeRatio", "fontSize", "immediate", "inputColor", "isPreview", "labelLeft", "labelRight", "max", "minimap", "minimapCompact", "minimapFrameColor", "minimapIndicatorColor", "minimapSelectedColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "preciseLabels", "refreshEndPoint", "refreshStartPoint", "selectColor", "selectedSeries", "start", "textColor", "timeLabels", "usePreciseLabels", "valueEnd", "valueStart", "verticalHandles", "maxWidth", "isCursorPointer", "additionalMinimapHeight", "handleType", "handleIconColor", "handleBorderWidth", "handleBorderColor", "handleFill", "handleWidth"])) : b("", !0),
2437
- le("div", {
2438
- id: `legend-bottom-${K.value}`
2439
- }, null, 8, Wo),
2440
- Ze(C(dl), {
2441
- teleportTo: e.value.style.chart.tooltip.teleportTo,
2442
- show: j.value.showTooltip && Re.value,
2443
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
2444
- color: e.value.style.chart.tooltip.color,
2445
- fontSize: e.value.style.chart.tooltip.fontSize,
2446
- borderRadius: e.value.style.chart.tooltip.borderRadius,
2447
- borderColor: e.value.style.chart.tooltip.borderColor,
2448
- borderWidth: e.value.style.chart.tooltip.borderWidth,
2449
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
2450
- position: e.value.style.chart.tooltip.position,
2451
- offsetY: e.value.style.chart.tooltip.offsetY,
2452
- parent: ie.value,
2453
- content: Jl.value,
2454
- isFullscreen: De.value,
2455
- isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function",
2456
- smooth: e.value.style.chart.tooltip.smooth,
2457
- backdropFilter: e.value.style.chart.tooltip.backdropFilter,
2458
- smoothForce: e.value.style.chart.tooltip.smoothForce,
2459
- smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold,
2460
- isA11yMode: Be.value === "keyboard",
2461
- a11yPosition: ca.value
2462
- }, {
2463
- "tooltip-before": P(() => [
2464
- N(t.$slots, "tooltip-before", Q(ee({ ...Dt.value })), void 0, !0)
2465
- ]),
2466
- tooltip: P(() => [
2467
- N(t.$slots, "tooltip", Q(ee({ ...Dt.value })), void 0, !0)
2468
- ]),
2469
- "tooltip-after": P(() => [
2470
- N(t.$slots, "tooltip-after", Q(ee({ ...Dt.value })), void 0, !0)
2471
- ]),
2472
- _: 3
2473
- }, 8, ["teleportTo", "show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold", "isA11yMode", "a11yPosition"]),
2474
- t.$slots.source ? (i(), v("div", {
2475
- key: 9,
2476
- ref_key: "source",
2477
- ref: la,
2478
- dir: "auto"
2479
- }, [
2480
- N(t.$slots, "source", {}, void 0, !0)
2481
- ], 512)) : b("", !0),
2482
- N(t.$slots, "skeleton", {}, () => [
2483
- C(ve) ? (i(), se(Hs, { key: 0 })) : b("", !0)
2484
- ], !0)
2485
- ], 46, oo));
2486
- }
2487
- }, yn = /* @__PURE__ */ so(Uo, [["__scopeId", "data-v-989079b6"]]);
2488
- export {
2489
- yn as default
2490
- };