vue-data-ui 2.7.2 → 2.7.3

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 (195) hide show
  1. package/dist/{Arrow-Cuf9zUpa.cjs → Arrow-CwCPcRDq.cjs} +1 -1
  2. package/dist/{Arrow-SOQeOwmT.js → Arrow-DZ9pNVTr.js} +1 -1
  3. package/dist/{BaseIcon-C0unoacb.cjs → BaseIcon-BQ6ScTsr.cjs} +1 -1
  4. package/dist/{BaseIcon-DqYzMisq.js → BaseIcon-CdxldTMn.js} +4 -3
  5. package/dist/{ColorPicker-DLNc3kpl.cjs → ColorPicker-D6mp4NrH.cjs} +1 -1
  6. package/dist/{ColorPicker-DyOTLjAA.js → ColorPicker-DF9jbKW-.js} +3 -3
  7. package/dist/{DataTable-ByOfBGEi.cjs → DataTable-4qcYZrGF.cjs} +1 -1
  8. package/dist/{DataTable-C_28ZqiP.js → DataTable-BFNGlApm.js} +2 -2
  9. package/dist/{Legend-CmKaL7xe.js → Legend-B4eIw732.js} +2 -2
  10. package/dist/{Legend-mrAy7yUC.cjs → Legend-D8qnv865.cjs} +1 -1
  11. package/dist/{PackageVersion-39l3KkzC.js → PackageVersion-BZ8-AoE_.js} +1 -1
  12. package/dist/{PackageVersion-By81XV8X.cjs → PackageVersion-sCi6-fwm.cjs} +1 -1
  13. package/dist/PenAndPaper--_AE7XzJ.js +374 -0
  14. package/dist/PenAndPaper-DXiYR_ED.cjs +1 -0
  15. package/dist/{Shape-iIO-95sh.js → Shape-BQd108EW.js} +1 -1
  16. package/dist/{Shape-x7U3IhoM.cjs → Shape-BjIO2Dd_.cjs} +1 -1
  17. package/dist/{Slicer-Ct66sqV1.cjs → Slicer-B10GL6W6.cjs} +1 -1
  18. package/dist/{Slicer-C49MotZz.js → Slicer-BtX8p8CI.js} +2 -2
  19. package/dist/{Title-BgVFZwZZ.cjs → Title-DWFudmma.cjs} +1 -1
  20. package/dist/{Title-Co3F59jq.js → Title-ND4kMErl.js} +1 -1
  21. package/dist/{Tooltip-Cr89wMKa.js → Tooltip-BWe5TPIJ.js} +1 -1
  22. package/dist/{Tooltip-B8E9uCVm.cjs → Tooltip-DPqJ5wwr.cjs} +1 -1
  23. package/dist/{dom-to-png-D9eujpXB.cjs → dom-to-png-DBOO7SYL.cjs} +1 -1
  24. package/dist/{dom-to-png-DtBlqZMR.js → dom-to-png-DOe_fDQ9.js} +1 -1
  25. package/dist/{img-DgRUFehB.cjs → img-BTldOAS7.cjs} +1 -1
  26. package/dist/{img-DQDP5JIH.js → img-K80BXoXO.js} +1 -1
  27. package/dist/{index-gC66Se26.js → index-B_dU_4T8.js} +1 -1
  28. package/dist/{index-BeJeDy5m.cjs → index-HGCbG8YK.cjs} +1 -1
  29. package/dist/{pdf-lJiGVhtL.js → pdf-BKSh5KBc.js} +1 -1
  30. package/dist/{pdf-Bu1ahAX2.cjs → pdf-IEdK_h03.cjs} +1 -1
  31. package/dist/style.css +1 -1
  32. package/dist/types/vue-data-ui.d.cts +2 -1
  33. package/dist/types/vue-data-ui.d.ts +2 -1
  34. package/dist/{useNestedProp-BusTOV-6.js → useNestedProp-7s4Pw7x0.js} +1 -1
  35. package/dist/{useNestedProp-CF-iHhIC.cjs → useNestedProp-O_JTsxQj.cjs} +1 -1
  36. package/dist/{usePrinter-Bz_kd3vb.cjs → usePrinter-B2PvJuo8.cjs} +1 -1
  37. package/dist/{usePrinter-KMFl0n0s.js → usePrinter-CLObTJ4a.js} +3 -3
  38. package/dist/{vue-data-ui-BApY_erH.js → vue-data-ui-Dvy8nai9.js} +60 -60
  39. package/dist/{vue-data-ui-Bak-lr4I.cjs → vue-data-ui-NmIWCiVH.cjs} +1 -1
  40. package/dist/vue-data-ui.cjs +1 -1
  41. package/dist/vue-data-ui.js +1 -1
  42. package/dist/vue-ui-3d-bar-CUG7pspB.cjs +19 -0
  43. package/dist/{vue-ui-3d-bar-BWjU0K3_.js → vue-ui-3d-bar-Cf-VSMqf.js} +30 -30
  44. package/dist/{vue-ui-accordion-j2beIma_.js → vue-ui-accordion-C5dj9Voo.js} +3 -3
  45. package/dist/{vue-ui-accordion-CZBJSHT_.cjs → vue-ui-accordion-CSuxLH7L.cjs} +1 -1
  46. package/dist/{vue-ui-age-pyramid-Cmw4WVB4.js → vue-ui-age-pyramid-BYHyKvk4.js} +22 -22
  47. package/dist/vue-ui-age-pyramid-qT6V3Y8O.cjs +1 -0
  48. package/dist/{vue-ui-annotator-BVv5XkoE.cjs → vue-ui-annotator-KzRsqSTn.cjs} +1 -1
  49. package/dist/{vue-ui-annotator-CKmqZjUD.js → vue-ui-annotator-clyvpxxd.js} +2 -2
  50. package/dist/{vue-ui-bullet-U_yJjO0m.js → vue-ui-bullet-CJL4NBSU.js} +36 -36
  51. package/dist/vue-ui-bullet-DMuibl8n.cjs +34 -0
  52. package/dist/{vue-ui-candlestick-DhdlFIQE.js → vue-ui-candlestick-1jHdWerO.js} +11 -11
  53. package/dist/vue-ui-candlestick-CMsFiP9C.cjs +2 -0
  54. package/dist/{vue-ui-carousel-table-Ej7qzKkp.js → vue-ui-carousel-table-BCVjpGff.js} +4 -4
  55. package/dist/{vue-ui-carousel-table-BhC5cEe3.cjs → vue-ui-carousel-table-CtGRQBIN.cjs} +1 -1
  56. package/dist/{vue-ui-chestnut-BzNHXzDj.cjs → vue-ui-chestnut-CEQFlk-j.cjs} +1 -1
  57. package/dist/{vue-ui-chestnut-L0bS5jtX.js → vue-ui-chestnut-YX5q5qpY.js} +32 -32
  58. package/dist/{vue-ui-circle-pack-DwCzeO3L.js → vue-ui-circle-pack-DFhj3arJ.js} +44 -44
  59. package/dist/vue-ui-circle-pack-cXdePcYh.cjs +1 -0
  60. package/dist/{vue-ui-cursor-0mZP5nBc.cjs → vue-ui-cursor-DGtZLxpF.cjs} +1 -1
  61. package/dist/{vue-ui-cursor-DwHdXwLS.js → vue-ui-cursor-DwDTg8Za.js} +2 -2
  62. package/dist/{vue-ui-dashboard-DILmOchy.js → vue-ui-dashboard-DQ4-1OKY.js} +3 -3
  63. package/dist/{vue-ui-dashboard-CegApY8_.cjs → vue-ui-dashboard-etx_lWpJ.cjs} +1 -1
  64. package/dist/{vue-ui-digits-Dbwzk-sl.js → vue-ui-digits-Crcwygqg.js} +2 -2
  65. package/dist/{vue-ui-digits-me8Nky0A.cjs → vue-ui-digits-lRbvyU_i.cjs} +1 -1
  66. package/dist/{vue-ui-donut-DwE-iZSV.js → vue-ui-donut-C2h_qoIM.js} +12 -12
  67. package/dist/vue-ui-donut-DQeJn_KK.cjs +1 -0
  68. package/dist/vue-ui-donut-evolution-Dbg5HueS.cjs +1 -0
  69. package/dist/{vue-ui-donut-evolution-DhFABvEv.js → vue-ui-donut-evolution-DbzqkGBx.js} +69 -69
  70. package/dist/{vue-ui-dumbbell-Cqq4iV6-.js → vue-ui-dumbbell-BVuQjSso.js} +52 -52
  71. package/dist/{vue-ui-dumbbell-CL15d-aQ.cjs → vue-ui-dumbbell-BaYSfxY1.cjs} +1 -1
  72. package/dist/{vue-ui-flow-CU-orj9I.js → vue-ui-flow-2FOH_Mxn.js} +75 -75
  73. package/dist/vue-ui-flow-B8NKKaa2.cjs +1 -0
  74. package/dist/{vue-ui-funnel-DQmQmdNV.js → vue-ui-funnel-CYt4xsc4.js} +28 -28
  75. package/dist/vue-ui-funnel-Cgm1VcJC.cjs +1 -0
  76. package/dist/{vue-ui-galaxy-nqyCbQ9j.js → vue-ui-galaxy-CmmTED3N.js} +39 -39
  77. package/dist/vue-ui-galaxy-D8oPaBdc.cjs +1 -0
  78. package/dist/vue-ui-gauge-Ushp2qER.cjs +1 -0
  79. package/dist/{vue-ui-gauge-BV3CJfqe.js → vue-ui-gauge-vlhW2o0y.js} +26 -26
  80. package/dist/{vue-ui-gizmo-CNRAH2zT.cjs → vue-ui-gizmo-B16t4cjE.cjs} +1 -1
  81. package/dist/{vue-ui-gizmo-CJwSAsxs.js → vue-ui-gizmo-DtWADzHM.js} +3 -3
  82. package/dist/{vue-ui-heatmap-B1s7KejC.js → vue-ui-heatmap-BcNWrSYu.js} +10 -10
  83. package/dist/vue-ui-heatmap-PVrUXZ6f.cjs +1 -0
  84. package/dist/vue-ui-history-plot-D9hGmpzL.cjs +1 -0
  85. package/dist/{vue-ui-history-plot-z_KFt5z_.js → vue-ui-history-plot-aqwCckl3.js} +35 -35
  86. package/dist/{vue-ui-kpi-DabR5K70.js → vue-ui-kpi-fIEea6oo.js} +3 -3
  87. package/dist/{vue-ui-kpi-FaGp6_XP.cjs → vue-ui-kpi-zRnAot1s.cjs} +1 -1
  88. package/dist/{vue-ui-mini-loader-_plxZxma.cjs → vue-ui-mini-loader-0TKahM6o.cjs} +1 -1
  89. package/dist/{vue-ui-mini-loader-w-BmywLJ.js → vue-ui-mini-loader-CnequKa7.js} +2 -2
  90. package/dist/{vue-ui-molecule-3ClCLk7L.cjs → vue-ui-molecule-C7qRnQk-.cjs} +1 -1
  91. package/dist/{vue-ui-molecule-aiWG--to.js → vue-ui-molecule-bHqvHzsr.js} +45 -45
  92. package/dist/vue-ui-mood-radar-BGHGOC3W.cjs +1 -0
  93. package/dist/{vue-ui-mood-radar-DwxCn06q.js → vue-ui-mood-radar-BLLnwnLw.js} +40 -40
  94. package/dist/{vue-ui-nested-donuts-ONgAaLY-.js → vue-ui-nested-donuts-C5mqI9Vf.js} +65 -65
  95. package/dist/vue-ui-nested-donuts-r9LWv_9T.cjs +17 -0
  96. package/dist/vue-ui-onion-CKJJIQO8.cjs +5 -0
  97. package/dist/{vue-ui-onion-DjoQuBo8.js → vue-ui-onion-DGU0vHXZ.js} +75 -75
  98. package/dist/{vue-ui-parallel-coordinate-plot-DWGVzaHE.js → vue-ui-parallel-coordinate-plot-B4tVo343.js} +38 -38
  99. package/dist/vue-ui-parallel-coordinate-plot-CTF--y5O.cjs +8 -0
  100. package/dist/{vue-ui-quadrant-CgiD9c7i.js → vue-ui-quadrant-CDZspHBg.js} +54 -54
  101. package/dist/vue-ui-quadrant-De8bmwz_.cjs +1 -0
  102. package/dist/vue-ui-quick-chart-Bi7Vdl9I.cjs +15 -0
  103. package/dist/{vue-ui-quick-chart-5NiRxtpD.js → vue-ui-quick-chart-baWAo-Ln.js} +9 -9
  104. package/dist/{vue-ui-radar-CfKAy0nI.js → vue-ui-radar-CG8tGSHg.js} +55 -55
  105. package/dist/vue-ui-radar-DAxiwdD4.cjs +1 -0
  106. package/dist/{vue-ui-rating-yiM_5H0W.cjs → vue-ui-rating-Bm6BESO1.cjs} +1 -1
  107. package/dist/{vue-ui-rating-CbZvsZNv.js → vue-ui-rating-CcMWLaSP.js} +2 -2
  108. package/dist/{vue-ui-relation-circle-RRK2jhHr.js → vue-ui-relation-circle-D4vD3HD_.js} +7 -7
  109. package/dist/vue-ui-relation-circle-rM2pEsYK.cjs +1 -0
  110. package/dist/vue-ui-rings-Mt51bBc5.cjs +2 -0
  111. package/dist/{vue-ui-rings-CiMKMEpp.js → vue-ui-rings-R91Q3vZF.js} +62 -62
  112. package/dist/{vue-ui-scatter-9PFXuvoo.js → vue-ui-scatter-BKY7zeC_.js} +44 -44
  113. package/dist/vue-ui-scatter-COs46vAF.cjs +1 -0
  114. package/dist/{vue-ui-skeleton-KW-jcPRN.cjs → vue-ui-skeleton-BBWwBSGZ.cjs} +1 -1
  115. package/dist/{vue-ui-skeleton-7Zfds6H1.js → vue-ui-skeleton-CTZKsfWs.js} +3 -3
  116. package/dist/{vue-ui-smiley-D0jhMBUh.js → vue-ui-smiley-3XabGcpa.js} +2 -2
  117. package/dist/{vue-ui-smiley-BNQlshyY.cjs → vue-ui-smiley-CZ2XNWEt.cjs} +1 -1
  118. package/dist/{vue-ui-spark-trend-CLm12POW.cjs → vue-ui-spark-trend-CZnUiwhV.cjs} +1 -1
  119. package/dist/{vue-ui-spark-trend-D8nDY0fS.js → vue-ui-spark-trend-Dd_5kNG9.js} +5 -5
  120. package/dist/{vue-ui-sparkbar-ChEbpWYC.cjs → vue-ui-sparkbar-CZJ8RFMM.cjs} +1 -1
  121. package/dist/{vue-ui-sparkbar-wKlwMCph.js → vue-ui-sparkbar-DT_G3f_6.js} +4 -4
  122. package/dist/{vue-ui-sparkgauge-CvhIe_mP.js → vue-ui-sparkgauge-CoGcwj8-.js} +4 -4
  123. package/dist/{vue-ui-sparkgauge-DG824sGI.cjs → vue-ui-sparkgauge-Cra2_GdA.cjs} +1 -1
  124. package/dist/{vue-ui-sparkhistogram-B8k8a538.cjs → vue-ui-sparkhistogram-ClJhce64.cjs} +1 -1
  125. package/dist/{vue-ui-sparkhistogram-CVmbTFTc.js → vue-ui-sparkhistogram-ZI-zkp6j.js} +5 -5
  126. package/dist/{vue-ui-sparkline-CtqAbSzZ.js → vue-ui-sparkline-C4HvM0A7.js} +4 -4
  127. package/dist/{vue-ui-sparkline-7wnWuXDQ.cjs → vue-ui-sparkline-Cehnojts.cjs} +1 -1
  128. package/dist/{vue-ui-sparkstackbar-57SONMGP.cjs → vue-ui-sparkstackbar-B6su4lbU.cjs} +1 -1
  129. package/dist/{vue-ui-sparkstackbar-DfwEeUC5.js → vue-ui-sparkstackbar-DbXifSgX.js} +5 -5
  130. package/dist/vue-ui-stackbar-Dxjx916g.cjs +6 -0
  131. package/dist/{vue-ui-stackbar-CGSVPiPx.js → vue-ui-stackbar-bBQdWmxo.js} +86 -86
  132. package/dist/{vue-ui-strip-plot-fJFkn8_0.js → vue-ui-strip-plot-BaAUPB0O.js} +36 -36
  133. package/dist/vue-ui-strip-plot-D3Mc4jJS.cjs +1 -0
  134. package/dist/{vue-ui-table-Das3959J.cjs → vue-ui-table-CO12Arh5.cjs} +1 -1
  135. package/dist/{vue-ui-table-CliL2Wsp.js → vue-ui-table-DyjampQ2.js} +1 -1
  136. package/dist/{vue-ui-table-heatmap-C28ozf2S.cjs → vue-ui-table-heatmap-BrXBITN7.cjs} +1 -1
  137. package/dist/{vue-ui-table-heatmap-ZsJMMGpG.js → vue-ui-table-heatmap-DC3LbLR1.js} +4 -4
  138. package/dist/{vue-ui-table-sparkline-0i9FAXug.cjs → vue-ui-table-sparkline-C-L8YXVO.cjs} +1 -1
  139. package/dist/{vue-ui-table-sparkline-CrQNShdH.js → vue-ui-table-sparkline-MCUi0UPR.js} +5 -5
  140. package/dist/{vue-ui-thermometer-BaGL6WSb.js → vue-ui-thermometer-0Jw0Kc3K.js} +50 -50
  141. package/dist/vue-ui-thermometer-BbAmbpxI.cjs +1 -0
  142. package/dist/{vue-ui-timer-CFtgJ_Vi.cjs → vue-ui-timer-CgcO44Ga.cjs} +1 -1
  143. package/dist/{vue-ui-timer-Nk94fV-n.js → vue-ui-timer-D43Y73z-.js} +5 -5
  144. package/dist/vue-ui-tiremarks-B7GobiRR.cjs +1 -0
  145. package/dist/{vue-ui-tiremarks-zYgdq_99.js → vue-ui-tiremarks-C2z7LZOy.js} +25 -25
  146. package/dist/vue-ui-treemap-YuZUqTkv.cjs +1 -0
  147. package/dist/{vue-ui-treemap-CAxPcxn-.js → vue-ui-treemap-t2jSZWbw.js} +12 -12
  148. package/dist/{vue-ui-vertical-bar-Di3FBkwJ.js → vue-ui-vertical-bar-CXbzdSDN.js} +80 -80
  149. package/dist/vue-ui-vertical-bar-RH9oo9ao.cjs +4 -0
  150. package/dist/vue-ui-waffle-C6PA3aJK.cjs +1 -0
  151. package/dist/{vue-ui-waffle-DBJAQsEf.js → vue-ui-waffle-Z9KsaCxx.js} +45 -45
  152. package/dist/{vue-ui-wheel-BTZEr2Vs.js → vue-ui-wheel-BbBHPjUa.js} +27 -27
  153. package/dist/vue-ui-wheel-BmWfP7V3.cjs +1 -0
  154. package/dist/{vue-ui-word-cloud-DBCVUkLM.js → vue-ui-word-cloud-CUi3fEZc.js} +72 -72
  155. package/dist/{vue-ui-word-cloud-BEaRWIu-.cjs → vue-ui-word-cloud-DysEgxAX.cjs} +1 -1
  156. package/dist/{vue-ui-xy-DbN93Pcf.cjs → vue-ui-xy-B7Q6HDzu.cjs} +2 -2
  157. package/dist/{vue-ui-xy-aKaGgYGL.js → vue-ui-xy-BWN8izeD.js} +16 -16
  158. package/dist/vue-ui-xy-canvas-DZB78JsG.cjs +9 -0
  159. package/dist/vue-ui-xy-canvas-DfhloBZx.js +1672 -0
  160. package/package.json +1 -1
  161. package/dist/PenAndPaper-CmcfpltX.js +0 -243
  162. package/dist/PenAndPaper-DNbX5hR8.cjs +0 -1
  163. package/dist/vue-ui-3d-bar-CmbTiJVx.cjs +0 -19
  164. package/dist/vue-ui-age-pyramid-Sv-HbbDJ.cjs +0 -1
  165. package/dist/vue-ui-bullet-vcmTY4AX.cjs +0 -34
  166. package/dist/vue-ui-candlestick-DQT-8PRz.cjs +0 -2
  167. package/dist/vue-ui-circle-pack-CVLJs0XP.cjs +0 -1
  168. package/dist/vue-ui-donut-FoRYusUX.cjs +0 -1
  169. package/dist/vue-ui-donut-evolution-BIK2yfIJ.cjs +0 -1
  170. package/dist/vue-ui-flow-N825fjRf.cjs +0 -1
  171. package/dist/vue-ui-funnel-B6XMYl89.cjs +0 -1
  172. package/dist/vue-ui-galaxy-p-sbDnSY.cjs +0 -1
  173. package/dist/vue-ui-gauge-DsZFk8T_.cjs +0 -1
  174. package/dist/vue-ui-heatmap-VXgeMOwT.cjs +0 -1
  175. package/dist/vue-ui-history-plot-JmeGiR--.cjs +0 -1
  176. package/dist/vue-ui-mood-radar-CO5sPVVG.cjs +0 -1
  177. package/dist/vue-ui-nested-donuts-D0nALasd.cjs +0 -17
  178. package/dist/vue-ui-onion-CBqx4q4k.cjs +0 -5
  179. package/dist/vue-ui-parallel-coordinate-plot-uNCmnSvz.cjs +0 -8
  180. package/dist/vue-ui-quadrant-BOkyMgCm.cjs +0 -1
  181. package/dist/vue-ui-quick-chart-BRp_bNso.cjs +0 -15
  182. package/dist/vue-ui-radar-BpicgiWF.cjs +0 -1
  183. package/dist/vue-ui-relation-circle-Dg6rdyGP.cjs +0 -1
  184. package/dist/vue-ui-rings-A49lyv-J.cjs +0 -2
  185. package/dist/vue-ui-scatter-C_jHsy8M.cjs +0 -1
  186. package/dist/vue-ui-stackbar--0FZ_eBi.cjs +0 -6
  187. package/dist/vue-ui-strip-plot-C_ggDAQ-.cjs +0 -1
  188. package/dist/vue-ui-thermometer-h0rymM2v.cjs +0 -1
  189. package/dist/vue-ui-tiremarks-Cj8-XGcp.cjs +0 -1
  190. package/dist/vue-ui-treemap-CybL6mVf.cjs +0 -1
  191. package/dist/vue-ui-vertical-bar-D4IkwvAB.cjs +0 -4
  192. package/dist/vue-ui-waffle-7otLUrER.cjs +0 -1
  193. package/dist/vue-ui-wheel-BUJXtmeP.cjs +0 -1
  194. package/dist/vue-ui-xy-canvas-CF_lqLg-.cjs +0 -9
  195. package/dist/vue-ui-xy-canvas-CVQ__d4u.js +0 -1500
@@ -1,1500 +0,0 @@
1
- import { ref as i, computed as T, onMounted as Ge, nextTick as Ie, onBeforeUnmount as bt, watch as te, createElementBlock as X, openBlock as C, Fragment as We, createCommentVNode as le, normalizeClass as fe, createElementVNode as U, withDirectives as Ut, normalizeStyle as W, createVNode as ke, vModelText as Wt, withModifiers as dt, unref as D, renderList as Vt, useSlots as Zt, createBlock as ue, createSlots as Gt, withCtx as z, renderSlot as M, normalizeProps as ve, guardReactiveProps as de, toDisplayString as ht, createTextVNode as _t } from "vue";
2
- import { l as xt, X as jt, u as qt, c as Qt, t as Jt, p as he, a as Kt, C as Ne, b as el, D as Ve, i as be, f as xe, d as ft, $ as tl, J as ll, ai as al, o as ol, e as nl, x as yt, q as rl, r as sl, y as ul, s as Me } from "./index-gC66Se26.js";
3
- import { d as il, t as cl, u as vl, c as dl, a as gt, l as I, r as Ze, b as ee, p as pt } from "./useResponsive-Cw4oZ8sQ.js";
4
- import { _ as hl } from "./Tooltip-Cr89wMKa.js";
5
- import { L as fl } from "./Legend-CmKaL7xe.js";
6
- import { _ as yl } from "./Title-Co3F59jq.js";
7
- import { S as gl } from "./Slicer-C49MotZz.js";
8
- import { u as pl, U as ml } from "./usePrinter-KMFl0n0s.js";
9
- import bl from "./vue-ui-accordion-j2beIma_.js";
10
- import { D as xl } from "./DataTable-C_28ZqiP.js";
11
- import kl from "./vue-ui-skeleton-7Zfds6H1.js";
12
- import { u as mt } from "./useNestedProp-BusTOV-6.js";
13
- import { u as Ll } from "./useUserOptionState-BIvW1Kz7.js";
14
- import { u as Cl } from "./useChartAccessibility-BWojgys7.js";
15
- import Ye from "./BaseIcon-DqYzMisq.js";
16
- import { C as wl } from "./ColorPicker-DyOTLjAA.js";
17
- import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
18
- const $l = {
19
- class: /* @__PURE__ */ fe({
20
- "vue-ui-pen-and-paper-action": !0
21
- }),
22
- style: { padding: "0 !important" }
23
- }, Sl = ["disabled"], zl = ["xmlns", "viewBox"], Ml = ["cx", "cy", "r", "fill"], Il = ["d", "stroke", "stroke-width"], Tl = ["d", "stroke", "stroke-width"], Fl = {
24
- __name: "NonSvgPenAndPaper",
25
- props: {
26
- parent: {
27
- type: HTMLElement
28
- },
29
- backgroundColor: {
30
- type: String,
31
- default: "#FFFFFF"
32
- },
33
- color: {
34
- type: String,
35
- default: "#2D353C"
36
- },
37
- active: {
38
- type: Boolean,
39
- default: !1
40
- }
41
- },
42
- emits: ["close"],
43
- setup($, { emit: Xe }) {
44
- const q = $, Be = Xe, m = i([]), V = i([]), ae = i("0 0 0 0"), Z = i(q.color), u = i(1), b = T(() => xt(q.color, 0.6));
45
- function B({ width: d, height: c }) {
46
- ae.value = `0 0 ${d} ${c}`;
47
- }
48
- const Q = i(null);
49
- Ge(() => {
50
- Ie(() => {
51
- if (q.parent) {
52
- Q.value = new ResizeObserver((r) => {
53
- for (const v of r) {
54
- const { width: y, height: k } = v.contentRect;
55
- B({ width: y, height: k });
56
- }
57
- }), Q.value.observe(q.parent);
58
- const { width: d, height: c } = q.parent.getBoundingClientRect();
59
- B({ width: d, height: c });
60
- }
61
- });
62
- }), bt(() => {
63
- Q.value && Q.value.disconnect();
64
- }), te(
65
- () => q.parent,
66
- (d) => {
67
- if (!d) return;
68
- const { width: c, height: r } = q.parent.getBoundingClientRect();
69
- B({ width: c, height: r });
70
- },
71
- { immediate: !0 }
72
- );
73
- const h = i(!1), G = i(""), oe = i(null);
74
- function E(d) {
75
- if (!oe.value) return;
76
- h.value = !0;
77
- const { x: c, y: r } = Ce(d);
78
- G.value = `M ${c} ${r}`;
79
- }
80
- function J(d) {
81
- if (!h.value || !oe.value) return;
82
- const { x: c, y: r } = Ce(d);
83
- G.value += ` ${c} ${r}`;
84
- }
85
- function _(d) {
86
- const c = d.trim().split(/\s+/);
87
- if (c.length < 4)
88
- return d;
89
- const r = c.slice(1).map(Number);
90
- if (r.length % 2 !== 0)
91
- return d;
92
- const v = ne(r), y = [`M ${v[0]} ${v[1]}`];
93
- for (let A = 2; A < v.length - 2; A += 2) {
94
- const t = v[A - 2], F = v[A - 1], P = v[A], R = v[A + 1], O = (t + P) / 2, re = (F + R) / 2;
95
- y.push(`Q ${t} ${F} ${O} ${re}`);
96
- }
97
- const k = v[v.length - 2], w = v[v.length - 1];
98
- return y.push(`L ${k} ${w}`), y.join(" ");
99
- }
100
- function ne(d, c = 1) {
101
- const r = [...d];
102
- for (let v = 2; v < d.length - 2; v += 2) {
103
- const y = d[v], k = d[v + 1], w = d[v - 2], A = d[v - 1], t = d[v + 2], F = d[v + 3];
104
- r[v] = y + c * ((w + t) / 2 - y), r[v + 1] = k + c * ((A + F) / 2 - k);
105
- }
106
- return r;
107
- }
108
- function Le(d) {
109
- const c = d.trim().split(/\s+/);
110
- let r = "", v = "", y = null, k = null;
111
- for (let w = 0; w < c.length; w += 1) {
112
- const A = c[w];
113
- if (isNaN(A)) {
114
- if (v = A, v === "M" || v === "L")
115
- y = parseFloat(c[++w]), k = parseFloat(c[++w]), r += `${v}${y} ${k}`;
116
- else if (v === "Q") {
117
- const t = parseFloat(c[++w]), F = parseFloat(c[++w]), P = parseFloat(c[++w]), R = parseFloat(c[++w]);
118
- t === y && F === k ? r += `t${P - y} ${R - k}` : r += `q${t - y} ${F - k} ${P - y} ${R - k}`, y = P, k = R;
119
- }
120
- } else {
121
- const t = parseFloat(A), F = parseFloat(c[++w]);
122
- if (v === "L") {
123
- const P = t - y, R = F - k;
124
- P === 0 ? r += `v${R}` : R === 0 ? r += `h${P}` : r += `l${P} ${R}`, y = t, k = F;
125
- } else if (v === "Q") {
126
- const P = t, R = F, O = parseFloat(c[++w]), re = parseFloat(c[++w]);
127
- P === y && R === k ? r += `t${O - y} ${re - k}` : r += `q${P - y} ${R - k} ${O - y} ${re - k}`, y = O, k = re;
128
- }
129
- }
130
- }
131
- return r;
132
- }
133
- function ye() {
134
- h.value && (m.value.push({
135
- strokeWidth: u.value,
136
- path: Le(_(G.value)),
137
- color: Z.value
138
- }), V.value = [], G.value = ""), h.value = !1;
139
- }
140
- function Ce(d) {
141
- if (!oe.value) return { x: 0, y: 0 };
142
- const c = oe.value.getBoundingClientRect();
143
- let r, v;
144
- return d.touches && d.touches.length ? (r = d.touches[0].clientX, v = d.touches[0].clientY) : (r = d.clientX, v = d.clientY), {
145
- x: r - c.left,
146
- y: v - c.top
147
- };
148
- }
149
- i(!1);
150
- function ge() {
151
- if (m.value.length > 0) {
152
- const d = m.value.pop();
153
- V.value.push(d);
154
- }
155
- }
156
- function Te() {
157
- if (V.value.length > 0) {
158
- const d = V.value.pop();
159
- m.value.push(d);
160
- }
161
- }
162
- function Fe() {
163
- m.value = [], V.value = [];
164
- }
165
- const Pe = i(null);
166
- return (d, c) => (C(), X(We, null, [
167
- $.active ? (C(), X("div", {
168
- key: 0,
169
- "data-dom-to-png-ignore": "",
170
- class: fe({
171
- "vue-ui-pen-and-paper-actions": !0,
172
- visible: $.active
173
- })
174
- }, [
175
- U("button", {
176
- class: "vue-ui-pen-and-paper-action",
177
- style: W({
178
- backgroundColor: $.backgroundColor,
179
- border: `1px solid ${b.value}`
180
- }),
181
- onClick: c[0] || (c[0] = (r) => Be("close"))
182
- }, [
183
- ke(Ye, {
184
- name: "close",
185
- stroke: $.color
186
- }, null, 8, ["stroke"])
187
- ], 4),
188
- U("button", $l, [
189
- ke(wl, {
190
- value: Z.value,
191
- "onUpdate:value": c[1] || (c[1] = (r) => Z.value = r),
192
- backgroundColor: $.backgroundColor,
193
- buttonBorderColor: b.value
194
- }, null, 8, ["value", "backgroundColor", "buttonBorderColor"])
195
- ]),
196
- U("button", {
197
- class: fe({
198
- "vue-ui-pen-and-paper-action": !0,
199
- "vue-ui-pen-and-paper-action-disabled": !m.value.length
200
- }),
201
- disabled: !m.value.length,
202
- style: W({
203
- backgroundColor: $.backgroundColor,
204
- border: `1px solid ${b.value}`
205
- }),
206
- onClick: ge
207
- }, [
208
- ke(Ye, {
209
- name: "restart",
210
- stroke: $.color
211
- }, null, 8, ["stroke"])
212
- ], 14, Sl),
213
- U("button", {
214
- class: fe({
215
- "vue-ui-pen-and-paper-action": !0,
216
- "vue-ui-pen-and-paper-action-disabled": !V.value.length
217
- }),
218
- style: W({
219
- backgroundColor: $.backgroundColor,
220
- border: `1px solid ${b.value}`
221
- }),
222
- onClick: Te
223
- }, [
224
- ke(Ye, {
225
- name: "restart",
226
- stroke: $.color,
227
- style: { transform: "scaleX(-1)" }
228
- }, null, 8, ["stroke"])
229
- ], 6),
230
- U("button", {
231
- class: fe([{
232
- "vue-ui-pen-and-paper-action": !0,
233
- "vue-ui-pen-and-paper-action-disabled": !m.value.length
234
- }, "vue-ui-pen-and-paper-action"]),
235
- style: W({
236
- backgroundColor: $.backgroundColor,
237
- border: `1px solid ${b.value}`
238
- }),
239
- onClick: Fe
240
- }, [
241
- ke(Ye, {
242
- name: "trash",
243
- stroke: $.color
244
- }, null, 8, ["stroke"])
245
- ], 6),
246
- Ut(U("input", {
247
- ref_key: "range",
248
- ref: Pe,
249
- type: "range",
250
- class: "vertical-range",
251
- min: 0.5,
252
- max: 12,
253
- step: 0.1,
254
- "onUpdate:modelValue": c[2] || (c[2] = (r) => u.value = r),
255
- style: W({
256
- accentColor: $.color
257
- })
258
- }, null, 4), [
259
- [Wt, u.value]
260
- ])
261
- ], 2)) : le("", !0),
262
- (C(), X("svg", {
263
- ref_key: "svgElement",
264
- ref: oe,
265
- xmlns: D(jt),
266
- viewBox: ae.value,
267
- class: fe({
268
- "vue-ui-pen-and-paper": !0,
269
- inactive: !$.active
270
- }),
271
- onMousedown: E,
272
- onMousemove: J,
273
- onMouseup: ye,
274
- onMouseleave: ye,
275
- onTouchstart: dt(E, ["prevent"]),
276
- onTouchmove: dt(J, ["prevent"]),
277
- onTouchend: ye
278
- }, [
279
- (C(!0), X(We, null, Vt(m.value, (r) => (C(), X(We, { key: r }, [
280
- r.path.replace("M", "").split(" ").length === 2 ? (C(), X("circle", {
281
- key: 0,
282
- cx: r.path.replace("M", "").split(" ")[0],
283
- cy: r.path.replace("M", "").split(" ")[1],
284
- r: r.strokeWidth / 2,
285
- fill: r.color
286
- }, null, 8, Ml)) : (C(), X("path", {
287
- key: 1,
288
- class: "vue-ui-pen-and-paper-path",
289
- d: r.path,
290
- stroke: r.color,
291
- "stroke-width": r.strokeWidth,
292
- fill: "none"
293
- }, null, 8, Il))
294
- ], 64))), 128)),
295
- h.value ? (C(), X("path", {
296
- key: 0,
297
- class: "vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",
298
- d: _(G.value),
299
- stroke: Z.value,
300
- "stroke-width": u.value * 1.1,
301
- fill: "none"
302
- }, null, 8, Tl)) : le("", !0)
303
- ], 42, zl))
304
- ], 64));
305
- }
306
- }, Pl = /* @__PURE__ */ kt(Fl, [["__scopeId", "data-v-6e690e62"]]), Rl = ["id"], Ol = ["onClick"], Dl = {
307
- key: 2,
308
- class: "vue-data-ui-watermark"
309
- }, El = ["innerHTML"], Al = {
310
- __name: "vue-ui-xy-canvas",
311
- props: {
312
- dataset: {
313
- type: Array,
314
- default() {
315
- return [];
316
- }
317
- },
318
- config: {
319
- type: Object,
320
- default() {
321
- return {};
322
- }
323
- }
324
- },
325
- emits: ["selectLegend"],
326
- setup($, { expose: Xe, emit: q }) {
327
- const { vue_ui_xy_canvas: Be } = qt(), m = $, V = i(Qt()), ae = i(null), Z = i(null), u = i(null), b = i(1), B = i(1), Q = i(!1), h = i(null), G = i(""), oe = i(null), E = i([]), J = i(1), _ = i(!0), ne = i(!0), Le = i(null), ye = i(0), Ce = i(0), ge = i(!1), Te = i(null), Fe = i(null), Pe = i(null), d = i(null), c = i(0), r = i(0), v = i(0), y = i(null), k = T(() => !!m.dataset && m.dataset.length), w = q, A = Zt();
328
- Ge(() => {
329
- A["chart-background"] && console.warn("VueUiXyCanvas does not support the #chart-background slot.");
330
- });
331
- const t = T({
332
- get: () => re(),
333
- set: (e) => e
334
- }), { userOptionsVisible: F, setUserOptionsVisibility: P, keepUserOptionState: R } = Ll({ config: t.value }), { svgRef: O } = Cl({ config: t.value.style.chart.title });
335
- function re() {
336
- const e = mt({
337
- userConfig: m.config,
338
- defaultConfig: Be
339
- });
340
- let a = {};
341
- return e.theme ? a = {
342
- ...mt({
343
- userConfig: Kt.vue_ui_xy_canvas[e.theme] || m.config,
344
- defaultConfig: e
345
- }),
346
- customPalette: Jt[e.theme] || he
347
- } : a = e, m.config && Ne(m.config, "style.chart.scale.min") ? a.style.chart.scale.min = m.config.style.chart.scale.min : a.style.chart.scale.min = null, m.config && Ne(m.config, "style.chart.scale.max") ? a.style.chart.scale.max = m.config.style.chart.scale.max : a.style.chart.scale.max = null, m.config && Ne(m.config, "style.chart.zoom.startIndex") ? a.style.chart.zoom.startIndex = m.config.style.chart.zoom.startIndex : a.style.chart.zoom.startIndex = null, m.config && Ne(m.config, "style.chart.zoom.endIndex") ? a.style.chart.zoom.endIndex = m.config.style.chart.zoom.endIndex : a.style.chart.zoom.endIndex = null, a;
348
- }
349
- te(() => m.config, (e) => {
350
- t.value = re(), F.value = !t.value.userOptions.showOnChartHover, He(), c.value += 1, r.value += 1, v.value += 1, s.value.showTable = t.value.table.show, s.value.showDataLabels = t.value.style.chart.dataLabels.show, s.value.stacked = t.value.style.chart.stacked, s.value.showTooltip = t.value.style.chart.tooltip.show;
351
- }, { deep: !0 }), te(() => m.dataset, () => {
352
- He(), c.value += 1, r.value += 1, v.value += 1;
353
- }, { deep: !0 });
354
- const _e = i(t.value.style.chart.aspectRatio), { isPrinting: je, isImaging: qe, generatePdf: Qe, generateImage: Je } = pl({
355
- elementId: `xy_canvas_${V.value}`,
356
- fileName: t.value.style.chart.title.text || "vue-ui-xy-canvas",
357
- options: t.value.userOptions.print
358
- }), s = i({
359
- showTable: t.value.table.show,
360
- showDataLabels: t.value.style.chart.dataLabels.show,
361
- stacked: t.value.style.chart.stacked,
362
- showTooltip: t.value.style.chart.tooltip.show
363
- });
364
- function Lt(e) {
365
- ge.value = e, Ce.value += 1;
366
- }
367
- const Ke = T(() => el(t.value.customPalette)), j = T(() => pe.value ? Math.max(...pe.value.filter((e, a) => !E.value.includes(e.absoluteIndex)).map((e) => e.series.length)) : 0), l = T(() => {
368
- const e = b.value - b.value * (t.value.style.chart.paddingProportions.left + t.value.style.chart.paddingProportions.right);
369
- return {
370
- canvasWidth: b.value,
371
- canvasHeight: B.value,
372
- left: b.value * t.value.style.chart.paddingProportions.left,
373
- top: B.value * t.value.style.chart.paddingProportions.top,
374
- right: b.value - b.value * t.value.style.chart.paddingProportions.right,
375
- bottom: B.value - B.value * t.value.style.chart.paddingProportions.bottom,
376
- width: e,
377
- height: B.value - B.value * (t.value.style.chart.paddingProportions.top + t.value.style.chart.paddingProportions.bottom),
378
- slot: e / (n.value.end - n.value.start)
379
- };
380
- });
381
- function et(e, a) {
382
- return e / a;
383
- }
384
- function Ct({ hasAutoScale: e, series: a, min: o, max: f, scale: p, yOffset: Y, individualHeight: g, stackIndex: L = null }) {
385
- return a.map((ie, H) => {
386
- const se = p.min < 0 ? Math.abs(p.min) : 0, ce = et(ie + se, se + p.max);
387
- let Se, ze;
388
- e && (Se = p.min, ze = et(ie - Se, p.max - Se));
389
- let K = 0;
390
- return L === null ? K = l.value.bottom - l.value.height * (e ? ze : ce) : K = l.value.bottom - Y - g * (e ? ze : ce), {
391
- x: l.value.left + l.value.slot * H + l.value.slot / 2,
392
- y: K,
393
- value: ie
394
- };
395
- });
396
- }
397
- const S = T(() => {
398
- const e = t.value.style.chart.scale.min !== null ? t.value.style.chart.scale.min : Math.min(...pe.value.filter((g, L) => !E.value.includes(g.absoluteIndex)).flatMap((g) => g.series.slice(n.value.start, n.value.end))), a = t.value.style.chart.scale.max !== null ? t.value.style.chart.scale.max : Math.max(...pe.value.filter((g, L) => !E.value.includes(g.absoluteIndex)).flatMap((g) => g.series.slice(n.value.start, n.value.end))), o = Ve(e < 0 ? e : 0, a === e ? e + 1 < 0 ? 0 : e + 1 : a < 0 ? 0 : a, t.value.style.chart.scale.ticks), f = o.min < 0 ? Math.abs(o.min) : 0, p = l.value.bottom - l.value.height * (f / (o.max + f)), Y = o.ticks.map((g) => ({
399
- y: l.value.bottom - l.value.height * ((g + f) / (o.max + f)),
400
- x: l.value.left - 8,
401
- value: g
402
- }));
403
- return {
404
- absoluteMin: f,
405
- max: a,
406
- min: e,
407
- scale: o,
408
- yLabels: Y,
409
- zero: p
410
- };
411
- }), wt = T(() => x.value.map((e) => `
412
- <div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
413
- <svg viewBox="0 0 10 10" height="12" width="12">
414
- <circle cx="5" cy="5" r="5" fill="${e.color}"/>
415
- </svg>
416
- <span>${e.name ? e.name + ": " : ""}</span>
417
- <span>${be(
418
- t.value.style.chart.dataLabels.formatter,
419
- e.series[h.value],
420
- xe({
421
- p: e.prefix || "",
422
- v: e.series[h.value],
423
- s: e.suffix || "",
424
- r: e.rounding || 0
425
- }),
426
- { datapoint: e, seriesIndex: h.value }
427
- )}</span>
428
- </div>
429
- `)), pe = T(() => m.dataset.map((e, a) => ({
430
- ...e,
431
- series: tl({
432
- data: ll(e.series),
433
- threshold: t.value.downsample.threshold
434
- }),
435
- absoluteIndex: a,
436
- color: ft(e.color || Ke.value[a] || he[a] || he[a % he.length])
437
- })));
438
- te(j, (e) => {
439
- e && tt();
440
- });
441
- const x = T(() => al(pe.value.filter((e, a) => !E.value.includes(e.absoluteIndex))).map((e, a) => ({
442
- ...e,
443
- series: e.series.slice(n.value.start, n.value.end)
444
- })).map((e, a) => {
445
- let o = [null, void 0].includes(e.scaleMin) ? Math.min(...e.series) || 0 : e.scaleMin, f = [null, void 0].includes(e.scaleMax) ? Math.max(...e.series) || 1 : e.scaleMax;
446
- o === f && (o = o >= 0 ? f - 1 : o, f = f >= 0 ? f : o + 1), e.series.filter((K) => ![null, void 0].includes(K)).map((K) => (K - o) / (f - o));
447
- const p = {
448
- valueMin: o,
449
- valueMax: f
450
- }, Y = e.scaleSteps || t.value.style.chart.scale.ticks;
451
- let g;
452
- e.autoScaling ? g = Ve(p.valueMin, p.valueMax, Y) : g = Ve(p.valueMin < 0 ? p.valueMin : 0, p.valueMax <= 0 ? 0 : p.valueMax, Y);
453
- const L = s.value.stacked ? l.value.height * (1 - e.cumulatedStackRatio) : 0, ie = s.value.stacked ? l.value.height / t.value.style.chart.stackGap : 0, H = s.value.stacked ? l.value.height * e.stackRatio - ie : l.value.height, se = g.min < 0 ? Math.abs(g.min) : 0;
454
- let ce;
455
- e.autoScaling && s.value.stacked && f <= 0 ? ce = l.value.bottom - L - H : ce = l.value.bottom - L - H * (se / (g.max + se));
456
- const Se = g.ticks.map((K, Ht) => ({
457
- y: l.value.bottom - L - H * (Ht / (g.ticks.length - 1)),
458
- x: l.value.left - 8,
459
- value: K
460
- })), ze = Ct({
461
- hasAutoScale: s.value.stacked && e.autoScaling,
462
- series: e.series,
463
- min: s.value.stacked ? o : S.value.min,
464
- max: s.value.stacked ? f : S.value.max,
465
- scale: s.value.stacked ? g : S.value.scale,
466
- yOffset: L,
467
- individualHeight: H,
468
- stackIndex: s.value.stacked ? a : null
469
- });
470
- return {
471
- ...e,
472
- coordinatesLine: ze,
473
- min: o,
474
- max: f,
475
- localScale: g,
476
- localZero: ce,
477
- localMin: se,
478
- localYLabels: Se,
479
- yOffset: L,
480
- individualHeight: H
481
- };
482
- })), n = i({
483
- start: 0,
484
- end: j.value
485
- });
486
- function tt() {
487
- lt();
488
- }
489
- const me = i(null);
490
- async function lt() {
491
- (t.value.style.chart.zoom.startIndex !== null || t.value.style.chart.zoom.endIndex !== null) && me.value ? (t.value.style.chart.zoom.startIndex !== null && (await Ie(), await Ie(), me.value && me.value.setStartValue(t.value.style.chart.zoom.startIndex)), t.value.style.chart.zoom.endIndex !== null && (await Ie(), await Ie(), me.value && me.value.setEndValue($t(t.value.style.chart.zoom.endIndex + 1)))) : (n.value = {
492
- start: 0,
493
- end: j.value
494
- }, ye.value += 1);
495
- }
496
- function $t(e) {
497
- const a = j.value;
498
- return e > a ? a : e < 0 || t.value.style.chart.zoom.startIndex !== null && e < t.value.style.chart.zoom.startIndex ? t.value.style.chart.zoom.startIndex !== null ? t.value.style.chart.zoom.startIndex + 1 : 1 : e;
499
- }
500
- const St = T(() => x.value.filter((e) => ["line", "plot", void 0].includes(e.type))), N = T(() => x.value.filter((e) => e.type === "bar"));
501
- function zt() {
502
- if (!O.value)
503
- return;
504
- const e = Z.value.offsetWidth, a = Z.value.offsetHeight;
505
- O.value.width = e * J.value * 2, O.value.height = a * J.value * 2, b.value = e * J.value * 2, B.value = a * J.value * 2, u.value.scale(J.value, J.value), we();
506
- }
507
- function Mt() {
508
- if (u.value.clearRect(0, 0, 1e4, 1e4), u.value.fillStyle = t.value.style.chart.backgroundColor, u.value.fillRect(0, 0, l.value.canvasWidth, l.value.canvasHeight), s.value.stacked)
509
- t.value.style.chart.grid.y.verticalLines.show && n.value.end - n.value.start < t.value.style.chart.grid.y.verticalLines.hideUnderXLength ? x.value.forEach((e) => {
510
- for (let a = 0; a < n.value.end - n.value.start + 1; a += 1)
511
- I(
512
- u.value,
513
- [
514
- {
515
- x: l.value.left + l.value.slot * a,
516
- y: l.value.bottom - e.yOffset - e.individualHeight
517
- },
518
- {
519
- x: l.value.left + l.value.slot * a,
520
- y: l.value.bottom - e.yOffset
521
- }
522
- ],
523
- {
524
- color: t.value.style.chart.grid.y.verticalLines.color
525
- }
526
- );
527
- }) : t.value.style.chart.grid.y.verticalLines.show && n.value.end - n.value.start >= t.value.style.chart.grid.y.verticalLines.hideUnderXLength && x.value.forEach((e) => {
528
- for (let a = n.value.start; a < n.value.end; a += 1)
529
- a % Math.floor((n.value.end - n.value.start) / t.value.style.chart.grid.y.timeLabels.modulo) === 0 && I(
530
- u.value,
531
- [
532
- {
533
- x: l.value.left + l.value.slot * (a - n.value.start) + l.value.slot / 2,
534
- y: l.value.bottom - e.yOffset - e.individualHeight
535
- },
536
- {
537
- x: l.value.left + l.value.slot * (a - n.value.start) + l.value.slot / 2,
538
- y: l.value.bottom - e.yOffset
539
- }
540
- ],
541
- {
542
- color: t.value.style.chart.grid.y.verticalLines.color
543
- }
544
- );
545
- }), t.value.style.chart.grid.x.horizontalLines.show && (t.value.style.chart.grid.x.horizontalLines.alternate ? x.value.forEach((e) => {
546
- e.localYLabels.forEach((a, o) => {
547
- o < e.localYLabels.length - 1 && Ze(
548
- u.value,
549
- [
550
- { x: l.value.left, y: a.y },
551
- { x: l.value.right, y: a.y },
552
- { x: l.value.right, y: e.localYLabels[o + 1].y },
553
- { x: l.value.left, y: e.localYLabels[o + 1].y }
554
- ],
555
- {
556
- fillColor: o % 2 === 0 ? "transparent" : Me(t.value.style.chart.grid.x.horizontalLines.color, t.value.style.chart.grid.x.horizontalLines.opacity),
557
- strokeColor: "transparent"
558
- }
559
- );
560
- });
561
- }) : x.value.forEach((e) => {
562
- e.localYLabels.slice(n.value.start, n.value.end).forEach((a) => {
563
- I(
564
- u.value,
565
- [
566
- { x: l.value.left, y: a.y },
567
- { x: l.value.right, y: a.y }
568
- ],
569
- {
570
- color: t.value.style.chart.grid.x.horizontalLines.color
571
- }
572
- );
573
- });
574
- })), t.value.style.chart.grid.zeroLine.show && x.value.forEach((e) => {
575
- I(
576
- u.value,
577
- [
578
- { x: l.value.left, y: e.localZero },
579
- { x: l.value.right, y: e.localZero }
580
- ],
581
- {
582
- color: t.value.style.chart.grid.zeroLine.color,
583
- lineDash: t.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
584
- }
585
- );
586
- }), t.value.style.chart.grid.y.axisLabels.show && x.value.forEach((e) => {
587
- I(
588
- u.value,
589
- [
590
- { x: l.value.left, y: l.value.bottom - e.yOffset },
591
- { x: l.value.left, y: l.value.bottom - e.yOffset - e.individualHeight }
592
- ],
593
- {
594
- color: e.color
595
- }
596
- ), I(
597
- u.value,
598
- [
599
- { x: l.value.right, y: l.value.bottom - e.yOffset },
600
- { x: l.value.right, y: l.value.bottom - e.yOffset - e.individualHeight }
601
- ],
602
- {
603
- color: e.color
604
- }
605
- );
606
- }), x.value.forEach((e) => {
607
- ee(
608
- u.value,
609
- e.name,
610
- b.value / 35,
611
- l.value.bottom - e.yOffset - e.individualHeight / 2,
612
- {
613
- align: "center",
614
- rotation: -90,
615
- color: e.color,
616
- font: `${Math.round(b.value / 40 * t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`
617
- }
618
- );
619
- });
620
- else {
621
- if (t.value.style.chart.grid.y.verticalLines.show && n.value.end - n.value.start < t.value.style.chart.grid.y.verticalLines.hideUnderXLength)
622
- for (let e = 0; e < n.value.end - n.value.start + 1; e += 1)
623
- I(
624
- u.value,
625
- [
626
- { x: l.value.left + l.value.slot * e, y: l.value.top },
627
- { x: l.value.left + l.value.slot * e, y: l.value.bottom }
628
- ],
629
- {
630
- color: t.value.style.chart.grid.y.verticalLines.color
631
- }
632
- );
633
- else if (t.value.style.chart.grid.y.verticalLines.show && n.value.end - n.value.start >= t.value.style.chart.grid.y.verticalLines.hideUnderXLength)
634
- for (let e = n.value.start; e < n.value.end; e += 1)
635
- e % Math.floor((n.value.end - n.value.start) / t.value.style.chart.grid.y.timeLabels.modulo) === 0 && I(
636
- u.value,
637
- [
638
- { x: l.value.left + l.value.slot * (e - n.value.start) + l.value.slot / 2, y: l.value.top },
639
- { x: l.value.left + l.value.slot * (e - n.value.start) + l.value.slot / 2, y: l.value.bottom }
640
- ],
641
- {
642
- color: t.value.style.chart.grid.y.verticalLines.color
643
- }
644
- );
645
- t.value.style.chart.grid.x.horizontalLines.show && (t.value.style.chart.grid.x.horizontalLines.alternate ? S.value.yLabels.forEach((e, a) => {
646
- a < S.value.yLabels.length - 1 && Ze(
647
- u.value,
648
- [
649
- { x: l.value.left, y: e.y },
650
- { x: l.value.right, y: e.y },
651
- { x: l.value.right, y: S.value.yLabels[a + 1].y },
652
- { x: l.value.left, y: S.value.yLabels[a + 1].y }
653
- ],
654
- {
655
- fillColor: a % 2 === 0 ? "transparent" : Me(t.value.style.chart.grid.x.horizontalLines.color, t.value.style.chart.grid.x.horizontalLines.opacity),
656
- strokeColor: "transparent"
657
- }
658
- );
659
- }) : S.value.yLabels.forEach((e) => {
660
- I(
661
- u.value,
662
- [
663
- { x: l.value.left, y: e.y },
664
- { x: l.value.right, y: e.y }
665
- ],
666
- {
667
- color: t.value.style.chart.grid.x.horizontalLines.color
668
- }
669
- );
670
- })), t.value.style.chart.grid.y.showAxis && I(
671
- u.value,
672
- [
673
- { x: l.value.left, y: l.value.top },
674
- { x: l.value.left, y: l.value.bottom }
675
- ],
676
- {
677
- color: t.value.style.chart.grid.y.axisColor,
678
- lineWidth: t.value.style.chart.grid.y.axisThickness
679
- }
680
- ), t.value.style.chart.grid.x.showAxis && I(
681
- u.value,
682
- [
683
- { x: l.value.left, y: l.value.bottom },
684
- { x: l.value.right, y: l.value.bottom }
685
- ],
686
- {
687
- color: t.value.style.chart.grid.x.axisColor,
688
- lineWidth: t.value.style.chart.grid.x.axisThickness
689
- }
690
- ), t.value.style.chart.grid.zeroLine.show && I(
691
- u.value,
692
- [
693
- { x: l.value.left, y: S.value.zero },
694
- { x: l.value.right, y: S.value.zero }
695
- ],
696
- {
697
- color: t.value.style.chart.grid.zeroLine.color,
698
- lineDash: t.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
699
- }
700
- );
701
- }
702
- t.value.style.chart.grid.y.axisName && ee(
703
- u.value,
704
- t.value.style.chart.grid.y.axisName,
705
- b.value - b.value / 40 * t.value.style.chart.grid.y.axisLabels.fontSizeRatio * 1.2,
706
- l.value.bottom - l.value.height / 2,
707
- {
708
- font: `${t.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(b.value / 40 * t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,
709
- color: t.value.style.chart.color,
710
- align: "center",
711
- rotation: 90
712
- }
713
- ), t.value.style.chart.grid.x.axisName && ee(
714
- u.value,
715
- t.value.style.chart.grid.x.axisName,
716
- b.value / 2,
717
- B.value,
718
- {
719
- font: `${t.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(b.value / 40 * t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,
720
- color: t.value.style.chart.color,
721
- align: "center"
722
- }
723
- );
724
- }
725
- function It(e) {
726
- for (let a = 0; a < e.coordinatesLine.length; a += 1) {
727
- const o = (h.value === a ? b.value / 150 : t.value.style.chart.line.plots.show ? b.value / 200 : 0) * t.value.style.chart.line.plots.radiusRatio;
728
- gt(
729
- u.value,
730
- { x: e.coordinatesLine[a].x, y: e.coordinatesLine[a].y },
731
- o,
732
- {
733
- color: t.value.style.chart.backgroundColor,
734
- fillStyle: e.color
735
- }
736
- );
737
- }
738
- }
739
- function Tt() {
740
- x.value.forEach((e) => {
741
- e.showYMarker && $e(e) && ee(
742
- u.value,
743
- be(
744
- t.value.style.chart.dataLabels.formatter,
745
- $e(e).value,
746
- xe({
747
- p: e.prefix || t.value.style.chart.grid.y.axisLabels.prefix || "",
748
- v: $e(e).value,
749
- s: e.suffix || t.value.style.chart.grid.y.axisLabels.suffix || "",
750
- r: e.rounding || t.value.style.chart.grid.y.axisLabels.rounding || 0
751
- }),
752
- { datapoint: $e(e), seriesIndex: null }
753
- ),
754
- l.value.left - 8 + t.value.style.chart.grid.y.axisLabels.offsetX,
755
- $e(e).y,
756
- {
757
- align: "right",
758
- font: `${t.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(b.value / 40 * t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,
759
- color: e.color
760
- }
761
- );
762
- });
763
- }
764
- function Ft() {
765
- t.value.style.chart.grid.y.axisLabels.show && (s.value.stacked ? x.value.forEach((e) => {
766
- e.localYLabels.forEach((a, o) => {
767
- ee(
768
- u.value,
769
- be(
770
- t.value.style.chart.dataLabels.formatter,
771
- a.value,
772
- xe({
773
- p: e.prefix || t.value.style.chart.grid.y.axisLabels.prefix || "",
774
- v: a.value,
775
- s: e.suffix || t.value.style.chart.grid.y.axisLabels.suffix || "",
776
- r: e.rounding || t.value.style.chart.grid.y.axisLabels.rounding || 0
777
- }),
778
- { datapoint: a, seriesIndex: o }
779
- ),
780
- a.x + t.value.style.chart.grid.y.axisLabels.offsetX,
781
- a.y,
782
- {
783
- align: "right",
784
- font: `${t.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(b.value / 40 * t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,
785
- color: e.color,
786
- globalAlpha: e.showYMarker && ![null, void 0].includes(h.value) ? 0.2 : 1
787
- }
788
- );
789
- });
790
- }) : S.value.yLabels.forEach((e, a) => {
791
- ee(
792
- u.value,
793
- be(
794
- t.value.style.chart.dataLabels.formatter,
795
- e.value,
796
- xe({
797
- p: t.value.style.chart.grid.y.axisLabels.prefix || "",
798
- v: e.value,
799
- s: t.value.style.chart.grid.y.axisLabels.suffix || "",
800
- r: t.value.style.chart.grid.y.axisLabels.rounding || 0
801
- }),
802
- { datapoint: e, seriesIndex: a }
803
- ),
804
- e.x + t.value.style.chart.grid.y.axisLabels.offsetX,
805
- e.y,
806
- {
807
- align: "right",
808
- font: `${t.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(b.value / 40 * t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,
809
- color: t.value.style.chart.grid.y.axisLabels.color,
810
- globalAlpha: x.value.some((o) => o.showYMarker) && ![null, void 0].includes(h.value) ? 0.2 : 1
811
- }
812
- );
813
- }));
814
- }
815
- function Pt(e) {
816
- for (let a = 0; a < e.coordinatesLine.length; a += 1)
817
- ee(
818
- u.value,
819
- be(
820
- t.value.style.chart.dataLabels.formatter,
821
- e.coordinatesLine[a].value,
822
- xe({
823
- p: e.prefix || "",
824
- v: e.coordinatesLine[a].value,
825
- s: e.suffix || "",
826
- r: e.rounding || 0
827
- }),
828
- { datapoint: e.coordinatesLine[a], seriesIndex: a }
829
- ),
830
- e.coordinatesLine[a].x,
831
- e.coordinatesLine[a].y + t.value.style.chart.dataLabels.offsetY,
832
- {
833
- align: "center",
834
- font: `${t.value.style.chart.dataLabels.bold ? "bold " : ""}${Math.round(b.value / 40 * t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,
835
- color: t.value.style.chart.dataLabels.useSerieColor ? e.color : t.value.style.chart.dataLabels.color
836
- }
837
- );
838
- }
839
- function Rt() {
840
- for (let e = n.value.start; e < n.value.end; e += 1)
841
- (n.value.end - n.value.start < t.value.style.chart.grid.y.timeLabels.modulo || n.value.end - n.value.start >= t.value.style.chart.grid.y.timeLabels.modulo && (e % Math.floor((n.value.end - n.value.start) / t.value.style.chart.grid.y.timeLabels.modulo) === 0 || e === h.value + n.value.start && t.value.style.chart.grid.y.timeLabels.showMarker)) && ee(
842
- u.value,
843
- t.value.style.chart.grid.y.timeLabels.values[e] || e + 1,
844
- l.value.left + l.value.slot * (e - n.value.start) + l.value.slot / 2,
845
- l.value.bottom + b.value / t.value.style.chart.grid.y.timeLabels.offsetY,
846
- {
847
- align: t.value.style.chart.grid.y.timeLabels.rotation === 0 ? "center" : t.value.style.chart.grid.y.timeLabels.rotation > 0 ? "left" : "right",
848
- font: `${t.value.style.chart.grid.y.timeLabels.bold ? "bold " : ""}${Math.round(b.value / 40 * t.value.style.chart.grid.y.timeLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,
849
- color: t.value.style.chart.grid.y.timeLabels.showMarker ? Me(t.value.style.chart.grid.y.timeLabels.color, h.value !== null ? h.value + n.value.start === e ? 100 : 20 : 100) : t.value.style.chart.grid.y.timeLabels.color,
850
- rotation: t.value.style.chart.grid.y.timeLabels.rotation
851
- }
852
- );
853
- }
854
- function at() {
855
- I(
856
- u.value,
857
- [
858
- { x: l.value.left + l.value.slot * h.value + l.value.slot / 2, y: l.value.top },
859
- { x: l.value.left + l.value.slot * h.value + l.value.slot / 2, y: l.value.bottom }
860
- ],
861
- {
862
- color: t.value.style.chart.selector.color,
863
- lineDash: t.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
864
- lineWidth: 2
865
- }
866
- );
867
- }
868
- function Ot() {
869
- y.value && I(
870
- u.value,
871
- [
872
- { x: l.value.left, y: y.value },
873
- { x: l.value.right, y: y.value }
874
- ],
875
- {
876
- color: t.value.style.chart.selector.color,
877
- lineDash: t.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
878
- lineWidth: 2
879
- }
880
- );
881
- }
882
- function Dt() {
883
- N.value.forEach((e, a) => {
884
- for (let o = 0; o < e.coordinatesLine.length; o += 1)
885
- Ze(
886
- u.value,
887
- [
888
- {
889
- x: l.value.left + l.value.slot * o + l.value.slot / 10 + (s.value.stacked ? 0 : l.value.slot / N.value.length * a - (a === 0 ? 0 : l.value.slot / (5 * N.value.length) * a)),
890
- y: s.value.stacked ? e.localZero : S.value.zero
891
- },
892
- {
893
- x: l.value.left + l.value.slot * o + l.value.slot / 10 + (s.value.stacked ? 0 : l.value.slot / N.value.length * a - (a === 0 ? 0 : l.value.slot / (5 * N.value.length) * a)) + l.value.slot * 0.8 / (s.value.stacked ? 1 : N.value.length),
894
- y: s.value.stacked ? e.localZero : S.value.zero
895
- },
896
- {
897
- x: l.value.left + l.value.slot * o + l.value.slot / 10 + (s.value.stacked ? 0 : l.value.slot / N.value.length * a - (a === 0 ? 0 : l.value.slot / (5 * N.value.length) * a)) + l.value.slot * 0.8 / (s.value.stacked ? 1 : N.value.length),
898
- y: e.coordinatesLine[o].y
899
- },
900
- {
901
- x: l.value.left + l.value.slot * o + l.value.slot / 10 + (s.value.stacked ? 0 : l.value.slot / N.value.length * a - (a === 0 ? 0 : l.value.slot / (5 * N.value.length) * a)),
902
- y: e.coordinatesLine[o].y
903
- }
904
- ],
905
- {
906
- strokeColor: t.value.style.chart.backgroundColor,
907
- gradient: {
908
- type: "linear",
909
- start: {
910
- x: e.coordinatesLine[o].x,
911
- y: e.coordinatesLine[o].y
912
- },
913
- end: {
914
- x: e.coordinatesLine[o].x,
915
- y: s.value.stacked ? e.localZero : S.value.zero
916
- },
917
- stops: [
918
- { offset: 0, color: e.color },
919
- { offset: 1, color: t.value.style.chart.bar.gradient.show ? xt(e.color, 0.5) : e.color }
920
- ]
921
- }
922
- }
923
- ), s.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && ee(
924
- u.value,
925
- be(
926
- t.value.style.chart.dataLabels.formatter,
927
- e.coordinatesLine[o].value,
928
- xe({
929
- p: e.prefix || "",
930
- v: e.coordinatesLine[o].value,
931
- s: e.suffix || "",
932
- r: e.rounding || 0
933
- }),
934
- { datapoint: e.coordinatesLine[o], seriesIndex: o }
935
- ),
936
- l.value.left + l.value.slot * o + l.value.slot / 10 + (s.value.stacked ? 0 : l.value.slot / N.value.length * a - (a === 0 ? 0 : l.value.slot / (5 * N.value.length) * a)) + l.value.slot * 0.4 / (s.value.stacked ? 1 : N.value.length),
937
- (e.coordinatesLine[o].value < 0 ? s.value.stacked ? e.localZero : S.value.zero : e.coordinatesLine[o].y) + t.value.style.chart.dataLabels.offsetY,
938
- {
939
- align: "center",
940
- font: `${Math.round(b.value / 40 * t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,
941
- color: t.value.style.chart.dataLabels.useSerieColor ? e.color : t.value.style.chart.dataLabels.color,
942
- strokeColor: t.value.style.chart.backgroundColor,
943
- lineWidth: 0.8
944
- }
945
- );
946
- });
947
- }
948
- function Et(e) {
949
- e.useArea ? s.value.stacked ? pt(
950
- u.value,
951
- [{ x: e.coordinatesLine[0].x, y: e.localZero }, ...e.coordinatesLine, { x: e.coordinatesLine.at(-1).x, y: e.localZero }],
952
- {
953
- fillColor: Me(e.color, t.value.style.chart.area.opacity),
954
- strokeColor: "transparent"
955
- }
956
- ) : pt(
957
- u.value,
958
- [{ x: e.coordinatesLine[0].x, y: S.value.zero }, ...e.coordinatesLine, { x: e.coordinatesLine.at(-1).x, y: S.value.zero }],
959
- {
960
- fillColor: Me(e.color, t.value.style.chart.area.opacity),
961
- strokeColor: "transparent"
962
- }
963
- ) : I(u.value, e.coordinatesLine, {
964
- color: e.color,
965
- lineWidth: 3
966
- });
967
- }
968
- function At() {
969
- x.value.forEach((e, a) => {
970
- I(
971
- u.value,
972
- [
973
- { x: l.value.left, y: l.value.bottom - e.yOffset },
974
- { x: l.value.right, y: l.value.bottom - e.yOffset }
975
- ],
976
- {
977
- color: t.value.style.chart.grid.x.horizontalLines.color,
978
- lineWidth: 1
979
- }
980
- );
981
- });
982
- }
983
- function we() {
984
- Mt(), _.value ? (h.value !== null && t.value.style.chart.selector.show && at(), Dt(), s.value.stacked && t.value.style.chart.grid.x.showAxis && At(), St.value.forEach((e) => {
985
- (e.type === "line" || !e.type) && Et(e), ne.value && (It(e), s.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && Pt(e));
986
- }), Le.value = dl(O.value)) : (Le.value && (u.value.clearRect(0, 0, 1e4, 1e4), u.value.drawImage(Le.value, 0, 0)), h.value !== null && t.value.style.chart.selector.show && at(), h.value !== null && x.value.forEach((e) => {
987
- if (e.type === "line" || !e.type || e.type === "plot") {
988
- if (!e.coordinatesLine[h.value]) return;
989
- e.coordinatesLine[h.value].x !== void 0 && e.coordinatesLine[h.value].y !== void 0 && gt(
990
- u.value,
991
- {
992
- x: e.coordinatesLine[h.value].x,
993
- y: e.coordinatesLine[h.value].y
994
- },
995
- b.value / 150 * t.value.style.chart.line.plots.radiusRatio,
996
- {
997
- color: t.value.style.chart.backgroundColor,
998
- fillStyle: e.color
999
- }
1000
- );
1001
- }
1002
- })), t.value.style.chart.grid.y.timeLabels.show && Rt(), t.value.style.chart.selector.show && t.value.style.chart.selector.showHorizontalSelector && Ot(), Ft(), Tt(), _.value = !1;
1003
- }
1004
- const Re = il(() => {
1005
- ne.value = !0, zt();
1006
- }, j.value > 200 ? 10 : 1, !ne.value);
1007
- function $e(e) {
1008
- if ([null, void 0].includes(h.value) || !e.coordinatesLine[h.value]) return !1;
1009
- const { y: a, value: o } = e.coordinatesLine[h.value];
1010
- return { y: a, value: o };
1011
- }
1012
- function Nt(e) {
1013
- const { left: a, top: o } = O.value.getBoundingClientRect(), f = e.clientX - a;
1014
- if (y.value = (e.clientY - o) * 2, (y.value < l.value.top || y.value > l.value.bottom) && (y.value = null), f * 2 < l.value.left || f * 2 > l.value.right) {
1015
- Q.value = !1, h.value = null;
1016
- return;
1017
- }
1018
- const p = f * 2 - l.value.left;
1019
- if (h.value = Math.floor(p / l.value.slot), Q.value = !0, !ne.value) return;
1020
- let Y = "";
1021
- const g = t.value.style.chart.tooltip.customFormat;
1022
- yt(g) && ul(() => g({
1023
- seriesIndex: h.value,
1024
- datapoint: x.value.map((L) => ({
1025
- shape: L.shape || null,
1026
- name: L.name,
1027
- color: L.color,
1028
- type: L.type || "line",
1029
- value: L.series.find((ie, H) => H === h.value)
1030
- })),
1031
- series: x.value,
1032
- config: t.value
1033
- })) ? G.value = g({
1034
- seriesIndex: h.value,
1035
- datapoint: x.value.map((L) => ({
1036
- shape: L.shape || null,
1037
- name: L.name,
1038
- color: L.color,
1039
- type: L.type || "line",
1040
- value: L.series.find((ie, H) => H === h.value)
1041
- })),
1042
- series: x.value,
1043
- config: t.value
1044
- }) : (t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start, n.value.end)[h.value] && (Y += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; width:100%">${t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start, n.value.end)[h.value]}</div>`), Y += wt.value.join(""), G.value = Y), ne.value = !1;
1045
- }
1046
- te(() => h.value, (e) => {
1047
- Re();
1048
- }), te(() => n.value, (e) => {
1049
- _.value = !0, we();
1050
- }, {
1051
- deep: !0
1052
- }), te(() => s.value.showDataLabels, (e) => {
1053
- _.value = !0, we();
1054
- }), te(() => y.value, (e) => {
1055
- e && we();
1056
- }), te(() => s.value.stacked, (e) => {
1057
- _.value = !0, ne.value = !0, Re();
1058
- });
1059
- function Yt() {
1060
- Q.value = !1, h.value = null, G.value = "", y.value = null, we();
1061
- }
1062
- const Oe = i(null), De = i(null);
1063
- Ge(() => {
1064
- He();
1065
- });
1066
- function He() {
1067
- if (ol(m.dataset) ? nl({
1068
- componentName: "VueUiXyCanvas",
1069
- type: "dataset"
1070
- }) : O.value && (u.value = O.value.getContext("2d", { willReadFrequently: !0 })), t.value.responsive) {
1071
- const e = cl(() => {
1072
- const { width: a, height: o } = vl({
1073
- chart: ae.value,
1074
- title: t.value.style.chart.title.text ? Te.value : null,
1075
- legend: t.value.style.chart.legend.show ? Fe.value : null,
1076
- slicer: t.value.style.chart.zoom.show && j.value > 1 ? Pe.value : null,
1077
- source: d.value
1078
- });
1079
- requestAnimationFrame(() => {
1080
- _e.value = `${a} / ${o}`;
1081
- });
1082
- });
1083
- Oe.value = new ResizeObserver(e), Oe.value.observe(ae.value.parentNode);
1084
- }
1085
- De.value = new ResizeObserver((e) => {
1086
- for (const a of e)
1087
- a.contentBoxSize && Z.value && (_.value = !0, Re());
1088
- }), De.value.observe(Z.value), lt();
1089
- }
1090
- bt(() => {
1091
- De.value && De.value.disconnect(), Oe.value && Oe.value.disconnect();
1092
- });
1093
- function ot(e) {
1094
- w("selectLegend", x.value.find((a) => a.absoluteIndex === e)), E.value.includes(e) ? E.value = E.value.filter((a) => a !== e) : E.value.push(e), _.value = !0, Re();
1095
- }
1096
- const nt = T(() => pe.value.map((e, a) => ({
1097
- ...e,
1098
- name: e.name,
1099
- color: ft(e.color) || Ke.value[a] || he[a] || he[a % he.length],
1100
- shape: e.shape || "circle",
1101
- prefix: e.prefix || "",
1102
- suffix: e.suffix || "",
1103
- rounding: e.rounding || 0
1104
- })).map((e) => ({
1105
- ...e,
1106
- opacity: E.value.includes(e.absoluteIndex) ? 0.5 : 1,
1107
- segregate: () => ot(e.absoluteIndex),
1108
- isSegregated: E.value.includes(e.absoluteIndex)
1109
- }))), Xt = T(() => ({
1110
- cy: "donut-div-legend",
1111
- backgroundColor: t.value.style.chart.legend.backgroundColor,
1112
- color: t.value.style.chart.legend.color,
1113
- fontSize: t.value.style.chart.legend.fontSize,
1114
- paddingBottom: 12,
1115
- fontWeight: t.value.style.chart.legend.bold ? "bold" : ""
1116
- })), Ee = T(() => {
1117
- const e = [""].concat(x.value.map((p) => p.name)).concat(' <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>');
1118
- let a = [];
1119
- for (let p = 0; p < j.value; p += 1) {
1120
- const Y = x.value.map((g) => g.series[p] ?? 0).reduce((g, L) => g + L, 0);
1121
- a.push([t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start, n.value.end)[p] ?? p + 1].concat(x.value.map((g) => (g.series[p] ?? 0).toFixed(t.value.table.rounding))).concat((Y ?? 0).toFixed(t.value.table.rounding)));
1122
- }
1123
- const o = {
1124
- th: {
1125
- backgroundColor: t.value.table.th.backgroundColor,
1126
- color: t.value.table.th.color,
1127
- outline: t.value.table.th.outline
1128
- },
1129
- td: {
1130
- backgroundColor: t.value.table.td.backgroundColor,
1131
- color: t.value.table.td.color,
1132
- outline: t.value.table.td.outline
1133
- },
1134
- breakpoint: t.value.table.responsiveBreakpoint
1135
- }, f = [t.value.table.columnNames.period].concat(x.value.map((p) => p.name)).concat(t.value.table.columnNames.total);
1136
- return { head: e, body: a.slice(0, n.value.end - n.value.start), config: o, colNames: f };
1137
- }), rt = T(() => {
1138
- if (x.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
1139
- const e = x.value.map((o) => ({
1140
- label: o.name,
1141
- color: o.color,
1142
- type: o.type
1143
- })), a = [];
1144
- for (let o = n.value.start; o < n.value.end; o += 1) {
1145
- const f = [t.value.style.chart.grid.y.timeLabels.values[o] || o + 1];
1146
- x.value.forEach((p) => {
1147
- f.push(Number((p.series[o] || 0).toFixed(t.value.table.rounding)));
1148
- }), a.push(f);
1149
- }
1150
- return { head: e, body: a };
1151
- });
1152
- function st() {
1153
- const e = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [""]], a = ["", ...rt.value.head.map((Y) => Y.label)], o = rt.value.body, f = e.concat([a]).concat(o), p = rl(f);
1154
- sl({ csvContent: p, title: t.value.style.chart.title.text || "vue-ui-xy-canvas" });
1155
- }
1156
- function Bt() {
1157
- return x.value;
1158
- }
1159
- function ut() {
1160
- s.value.showTable = !s.value.showTable;
1161
- }
1162
- function it() {
1163
- s.value.showDataLabels = !s.value.showDataLabels;
1164
- }
1165
- function ct() {
1166
- s.value.stacked = !s.value.stacked;
1167
- }
1168
- function vt() {
1169
- s.value.showTooltip = !s.value.showTooltip;
1170
- }
1171
- const Ae = i(!1);
1172
- function Ue() {
1173
- Ae.value = !Ae.value;
1174
- }
1175
- return Xe({
1176
- getData: Bt,
1177
- generateCsv: st,
1178
- generatePdf: Qe,
1179
- generateImage: Je,
1180
- toggleTable: ut,
1181
- toggleLabels: it,
1182
- toggleStack: ct,
1183
- toggleTooltip: vt,
1184
- toggleAnnotator: Ue
1185
- }), (e, a) => (C(), X("div", {
1186
- style: W(`width:100%; position:relative; ${t.value.responsive ? "height: 100%" : ""}`),
1187
- ref_key: "xy",
1188
- ref: ae,
1189
- id: `xy_canvas_${V.value}`,
1190
- class: fe(`vue-ui-donut ${ge.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
1191
- onMouseenter: a[5] || (a[5] = () => D(P)(!0)),
1192
- onMouseleave: a[6] || (a[6] = () => D(P)(!1))
1193
- }, [
1194
- t.value.style.chart.title.text ? (C(), X("div", {
1195
- key: 0,
1196
- ref_key: "chartTitle",
1197
- ref: Te,
1198
- style: W(`width:100%;background:${t.value.style.chart.backgroundColor};`)
1199
- }, [
1200
- (C(), ue(yl, {
1201
- key: `title_${c.value}`,
1202
- config: {
1203
- title: {
1204
- cy: "xy-canvas-title",
1205
- ...t.value.style.chart.title
1206
- },
1207
- subtitle: {
1208
- cy: "xy-canvas-subtitle",
1209
- ...t.value.style.chart.title.subtitle
1210
- }
1211
- }
1212
- }, null, 8, ["config"]))
1213
- ], 4)) : le("", !0),
1214
- t.value.userOptions.show && k.value && (D(R) || D(F)) ? (C(), ue(ml, {
1215
- ref: "details",
1216
- key: `user_option_${Ce.value}`,
1217
- backgroundColor: t.value.style.chart.backgroundColor,
1218
- color: t.value.style.chart.color,
1219
- isPrinting: D(je),
1220
- isImaging: D(qe),
1221
- uid: V.value,
1222
- hasTooltip: t.value.userOptions.buttons.tooltip && t.value.style.chart.tooltip.show,
1223
- hasPdf: t.value.userOptions.buttons.pdf,
1224
- hasImg: t.value.userOptions.buttons.img,
1225
- hasXls: t.value.userOptions.buttons.csv,
1226
- hasLabel: t.value.userOptions.buttons.labels,
1227
- hasStack: $.dataset.length > 1 && t.value.userOptions.buttons.stack,
1228
- hasFullscreen: t.value.userOptions.buttons.fullscreen,
1229
- hasTable: n.value.end - n.value.start < 200 && t.value.userOptions.buttons.table,
1230
- isFullscreen: ge.value,
1231
- isTooltip: s.value.showTooltip,
1232
- isStacked: s.value.stacked,
1233
- titles: { ...t.value.userOptions.buttonTitles },
1234
- chartElement: ae.value,
1235
- position: t.value.userOptions.position,
1236
- hasAnnotator: t.value.userOptions.buttons.annotator,
1237
- isAnnotation: Ae.value,
1238
- onToggleFullscreen: Lt,
1239
- onGeneratePdf: D(Qe),
1240
- onGenerateCsv: st,
1241
- onGenerateImage: D(Je),
1242
- onToggleTable: ut,
1243
- onToggleLabels: it,
1244
- onToggleStack: ct,
1245
- onToggleTooltip: vt,
1246
- onToggleAnnotator: Ue,
1247
- style: W({
1248
- visibility: D(R) ? D(F) ? "visible" : "hidden" : "visible"
1249
- })
1250
- }, Gt({ _: 2 }, [
1251
- e.$slots.menuIcon ? {
1252
- name: "menuIcon",
1253
- fn: z(({ isOpen: o, color: f }) => [
1254
- M(e.$slots, "menuIcon", ve(de({ isOpen: o, color: f })), void 0, !0)
1255
- ]),
1256
- key: "0"
1257
- } : void 0,
1258
- e.$slots.optionTooltip ? {
1259
- name: "optionTooltip",
1260
- fn: z(() => [
1261
- M(e.$slots, "optionTooltip", {}, void 0, !0)
1262
- ]),
1263
- key: "1"
1264
- } : void 0,
1265
- e.$slots.optionPdf ? {
1266
- name: "optionPdf",
1267
- fn: z(() => [
1268
- M(e.$slots, "optionPdf", {}, void 0, !0)
1269
- ]),
1270
- key: "2"
1271
- } : void 0,
1272
- e.$slots.optionCsv ? {
1273
- name: "optionCsv",
1274
- fn: z(() => [
1275
- M(e.$slots, "optionCsv", {}, void 0, !0)
1276
- ]),
1277
- key: "3"
1278
- } : void 0,
1279
- e.$slots.optionImg ? {
1280
- name: "optionImg",
1281
- fn: z(() => [
1282
- M(e.$slots, "optionImg", {}, void 0, !0)
1283
- ]),
1284
- key: "4"
1285
- } : void 0,
1286
- e.$slots.optionTable ? {
1287
- name: "optionTable",
1288
- fn: z(() => [
1289
- M(e.$slots, "optionTable", {}, void 0, !0)
1290
- ]),
1291
- key: "5"
1292
- } : void 0,
1293
- e.$slots.optionLabels ? {
1294
- name: "optionLabels",
1295
- fn: z(() => [
1296
- M(e.$slots, "optionLabels", {}, void 0, !0)
1297
- ]),
1298
- key: "6"
1299
- } : void 0,
1300
- e.$slots.optionStack ? {
1301
- name: "optionStack",
1302
- fn: z(() => [
1303
- M(e.$slots, "optionStack", {}, void 0, !0)
1304
- ]),
1305
- key: "7"
1306
- } : void 0,
1307
- e.$slots.optionFullscreen ? {
1308
- name: "optionFullscreen",
1309
- fn: z(({ toggleFullscreen: o, isFullscreen: f }) => [
1310
- M(e.$slots, "optionFullscreen", ve(de({ toggleFullscreen: o, isFullscreen: f })), void 0, !0)
1311
- ]),
1312
- key: "8"
1313
- } : void 0,
1314
- e.$slots.optionAnnotator ? {
1315
- name: "optionAnnotator",
1316
- fn: z(({ toggleAnnotator: o, isAnnotator: f }) => [
1317
- M(e.$slots, "optionAnnotator", ve(de({ toggleAnnotator: o, isAnnotator: f })), void 0, !0)
1318
- ]),
1319
- key: "9"
1320
- } : void 0
1321
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasLabel", "hasStack", "hasFullscreen", "hasTable", "isFullscreen", "isTooltip", "isStacked", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : le("", !0),
1322
- U("div", {
1323
- class: "vue-ui-xy-canvas",
1324
- style: W(`position: relative; aspect-ratio: ${_e.value}`),
1325
- ref_key: "container",
1326
- ref: Z
1327
- }, [
1328
- k.value ? (C(), X("canvas", {
1329
- key: 0,
1330
- ref_key: "canvas",
1331
- ref: O,
1332
- style: { width: "100%", height: "100%" },
1333
- onMousemove: a[0] || (a[0] = (o) => Nt(o)),
1334
- onMouseleave: Yt
1335
- }, null, 544)) : (C(), ue(kl, {
1336
- key: 1,
1337
- config: {
1338
- type: "line",
1339
- style: {
1340
- backgroundColor: t.value.style.chart.backgroundColor,
1341
- line: {
1342
- axis: {
1343
- color: "#CCCCCC"
1344
- },
1345
- path: {
1346
- color: "#CCCCCC",
1347
- strokeWidth: 0.5
1348
- }
1349
- }
1350
- }
1351
- }
1352
- }, null, 8, ["config"])),
1353
- ke(hl, {
1354
- show: s.value.showTooltip && Q.value,
1355
- backgroundColor: t.value.style.chart.tooltip.backgroundColor,
1356
- color: t.value.style.chart.tooltip.color,
1357
- fontSize: t.value.style.chart.tooltip.fontSize,
1358
- borderRadius: t.value.style.chart.tooltip.borderRadius,
1359
- borderColor: t.value.style.chart.tooltip.borderColor,
1360
- borderWidth: t.value.style.chart.tooltip.borderWidth,
1361
- position: t.value.style.chart.tooltip.position,
1362
- offsetY: t.value.style.chart.tooltip.offsetY,
1363
- parent: D(O),
1364
- content: G.value,
1365
- isFullscreen: ge.value,
1366
- backgroundOpacity: t.value.style.chart.tooltip.backgroundOpacity,
1367
- isCustom: D(yt)(t.value.style.chart.tooltip.customFormat)
1368
- }, {
1369
- "tooltip-before": z(() => [
1370
- M(e.$slots, "tooltip-before", ve(de({ ...oe.value })), void 0, !0)
1371
- ]),
1372
- "tooltip-after": z(() => [
1373
- M(e.$slots, "tooltip-after", ve(de({ ...oe.value })), void 0, !0)
1374
- ]),
1375
- _: 3
1376
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "position", "offsetY", "parent", "content", "isFullscreen", "backgroundOpacity", "isCustom"])
1377
- ], 4),
1378
- U("div", {
1379
- ref_key: "chartSlicer",
1380
- ref: Pe,
1381
- style: W(`width:100%;background:${t.value.style.chart.backgroundColor}`),
1382
- "data-dom-to-png-ignore": ""
1383
- }, [
1384
- t.value.style.chart.zoom.show && j.value > 1 ? (C(), ue(gl, {
1385
- ref_key: "slicerComponent",
1386
- ref: me,
1387
- key: `slicer_${ye.value}`,
1388
- background: t.value.style.chart.zoom.color,
1389
- borderColor: t.value.style.chart.backgroundColor,
1390
- fontSize: t.value.style.chart.zoom.fontSize,
1391
- useResetSlot: t.value.style.chart.zoom.useResetSlot,
1392
- labelLeft: t.value.style.chart.grid.y.timeLabels.values[n.value.start] ? t.value.style.chart.grid.y.timeLabels.values[n.value.start] : "",
1393
- labelRight: t.value.style.chart.grid.y.timeLabels.values[n.value.end - 1] ? t.value.style.chart.grid.y.timeLabels.values[n.value.end - 1] : "",
1394
- textColor: t.value.style.chart.color,
1395
- inputColor: t.value.style.chart.zoom.color,
1396
- selectColor: t.value.style.chart.zoom.highlightColor,
1397
- max: j.value,
1398
- min: 0,
1399
- valueStart: n.value.start,
1400
- valueEnd: n.value.end,
1401
- start: n.value.start,
1402
- "onUpdate:start": a[1] || (a[1] = (o) => n.value.start = o),
1403
- end: n.value.end,
1404
- "onUpdate:end": a[2] || (a[2] = (o) => n.value.end = o),
1405
- refreshStartPoint: t.value.style.chart.zoom.startIndex !== null ? t.value.style.chart.zoom.startIndex : 0,
1406
- refreshEndPoint: t.value.style.chart.zoom.endIndex !== null ? t.value.style.chart.zoom.endIndex + 1 : j.value,
1407
- enableRangeHandles: t.value.style.chart.zoom.enableRangeHandles,
1408
- enableSelectionDrag: t.value.style.chart.zoom.enableSelectionDrag,
1409
- onReset: tt
1410
- }, {
1411
- "reset-action": z(({ reset: o }) => [
1412
- M(e.$slots, "reset-action", ve(de({ reset: o })), void 0, !0)
1413
- ]),
1414
- _: 3
1415
- }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"])) : le("", !0)
1416
- ], 4),
1417
- U("div", {
1418
- ref_key: "chartLegend",
1419
- ref: Fe
1420
- }, [
1421
- t.value.style.chart.legend.show && k.value ? (C(), ue(fl, {
1422
- legendSet: nt.value,
1423
- config: Xt.value,
1424
- key: `legend_${v.value}`,
1425
- onClickMarker: a[3] || (a[3] = ({ i: o }) => ot(o))
1426
- }, {
1427
- item: z(({ legend: o, index: f }) => [
1428
- U("div", {
1429
- onClick: (p) => o.segregate(),
1430
- style: W(`opacity:${E.value.includes(f) ? 0.5 : 1}`)
1431
- }, ht(o.name), 13, Ol)
1432
- ]),
1433
- _: 1
1434
- }, 8, ["legendSet", "config"])) : M(e.$slots, "legend", {
1435
- key: 1,
1436
- legend: nt.value
1437
- }, void 0, !0)
1438
- ], 512),
1439
- e.$slots.watermark ? (C(), X("div", Dl, [
1440
- M(e.$slots, "watermark", ve(de({ isPrinting: D(je) || D(qe) })), void 0, !0)
1441
- ])) : le("", !0),
1442
- e.$slots.source ? (C(), X("div", {
1443
- key: 3,
1444
- ref_key: "source",
1445
- ref: d,
1446
- dir: "auto"
1447
- }, [
1448
- M(e.$slots, "source", {}, void 0, !0)
1449
- ], 512)) : le("", !0),
1450
- n.value.end - n.value.start < 200 ? (C(), ue(bl, {
1451
- key: 4,
1452
- hideDetails: "",
1453
- config: {
1454
- open: s.value.showTable,
1455
- maxHeight: 1e4,
1456
- body: {
1457
- backgroundColor: t.value.style.chart.backgroundColor,
1458
- color: t.value.style.chart.color
1459
- },
1460
- head: {
1461
- backgroundColor: t.value.style.chart.backgroundColor,
1462
- color: t.value.style.chart.color
1463
- }
1464
- }
1465
- }, {
1466
- content: z(() => [
1467
- (C(), ue(xl, {
1468
- key: `table_${r.value}`,
1469
- colNames: Ee.value.colNames,
1470
- head: Ee.value.head,
1471
- body: Ee.value.body,
1472
- config: Ee.value.config,
1473
- title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? ` : ${t.value.style.chart.title.subtitle.text}` : ""}`,
1474
- onClose: a[4] || (a[4] = (o) => s.value.showTable = !1)
1475
- }, {
1476
- th: z(({ th: o }) => [
1477
- U("div", { innerHTML: o }, null, 8, El)
1478
- ]),
1479
- td: z(({ td: o }) => [
1480
- _t(ht(o), 1)
1481
- ]),
1482
- _: 1
1483
- }, 8, ["colNames", "head", "body", "config", "title"]))
1484
- ]),
1485
- _: 1
1486
- }, 8, ["config"])) : le("", !0),
1487
- t.value.userOptions.buttons.annotator && x.value.length ? (C(), ue(Pl, {
1488
- key: 5,
1489
- parent: ae.value,
1490
- backgroundColor: t.value.style.chart.backgroundColor,
1491
- color: t.value.style.chart.color,
1492
- active: Ae.value,
1493
- onClose: Ue
1494
- }, null, 8, ["parent", "backgroundColor", "color", "active"])) : le("", !0)
1495
- ], 46, Rl));
1496
- }
1497
- }, ta = /* @__PURE__ */ kt(Al, [["__scopeId", "data-v-b8851cb8"]]);
1498
- export {
1499
- ta as default
1500
- };