vue-data-ui 2.4.41 → 2.4.43

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 (168) hide show
  1. package/README.md +34 -34
  2. package/dist/{Arrow-6z0ZQva_.js → Arrow-BB6bdwAh.js} +1 -1
  3. package/dist/{Arrow-Cht76m69.cjs → Arrow-DGDnIooM.cjs} +1 -1
  4. package/dist/{BaseIcon-DCE3wRiG.js → BaseIcon-Cg6tqk_d.js} +1 -1
  5. package/dist/{BaseIcon-D-JUZiGA.cjs → BaseIcon-Cj2lO-KJ.cjs} +1 -1
  6. package/dist/{DataTable-Cr3Xkxe4.cjs → DataTable-DnaY4y8p.cjs} +1 -1
  7. package/dist/{DataTable-B5DiCrf_.js → DataTable-YQ5lDRtX.js} +2 -2
  8. package/dist/{Legend-DzxQIjDO.js → Legend-3DteuHjj.js} +1 -1
  9. package/dist/{Legend-BXG_XPom.cjs → Legend-BPogA3ac.cjs} +1 -1
  10. package/dist/{PackageVersion-CMtZxTqq.cjs → PackageVersion-CQ9hp4g5.cjs} +1 -1
  11. package/dist/{PackageVersion-S7OD_s5u.js → PackageVersion-CS8EAteX.js} +1 -1
  12. package/dist/{PenAndPaper-DWYhyZye.cjs → PenAndPaper-B1DxKWdn.cjs} +1 -1
  13. package/dist/{PenAndPaper-BxJZd7k9.js → PenAndPaper-D22t_fD9.js} +3 -3
  14. package/dist/{Shape-C3ywBhkW.js → Shape-7VxscoGH.js} +1 -1
  15. package/dist/{Shape-CvL90fNe.cjs → Shape-BIoU-M2b.cjs} +1 -1
  16. package/dist/Slicer-BcXvtaNe.js +423 -0
  17. package/dist/Slicer-C_1pd_Kh.cjs +1 -0
  18. package/dist/{Title-BB0O0yol.js → Title-DQcop8gI.js} +1 -1
  19. package/dist/{Title-D9gPXVTT.cjs → Title-DoxrpVfD.cjs} +1 -1
  20. package/dist/{Tooltip-GvLaModr.js → Tooltip-Dx07vASW.js} +33 -25
  21. package/dist/Tooltip-t5_yWU6c.cjs +1 -0
  22. package/dist/documentation/installation.md +34 -34
  23. package/dist/index-Ce0TFqvS.cjs +9 -0
  24. package/dist/{index-B6Q1Fyk0.js → index-CvhiHStv.js} +48 -42
  25. package/dist/style.css +1 -1
  26. package/dist/types/vue-data-ui.d.cts +6 -0
  27. package/dist/types/vue-data-ui.d.ts +6 -0
  28. package/dist/{useNestedProp-DQpuJSz3.js → useNestedProp-Ccre6tXM.js} +1 -1
  29. package/dist/{useNestedProp-bZitLnbb.cjs → useNestedProp-Dv81zO0o.cjs} +1 -1
  30. package/dist/{usePrinter-D8dIU7aG.js → usePrinter-BVA2_kNp.js} +1 -1
  31. package/dist/{usePrinter-DtpFEgOX.cjs → usePrinter-Dq9TRqqU.cjs} +1 -1
  32. package/dist/{vue-data-ui-H24TWcBx.js → vue-data-ui-CXGGUSE5.js} +60 -60
  33. package/dist/{vue-data-ui-DBN7iJHU.cjs → vue-data-ui-DBaa-Zm-.cjs} +1 -1
  34. package/dist/vue-data-ui.cjs +1 -1
  35. package/dist/vue-data-ui.js +3 -3
  36. package/dist/{vue-ui-3d-bar-BaNI_M3v.cjs → vue-ui-3d-bar-B0eWYShT.cjs} +1 -1
  37. package/dist/{vue-ui-3d-bar-BA2CQYGW.js → vue-ui-3d-bar-Bvyn0JAH.js} +9 -9
  38. package/dist/{vue-ui-accordion-u4xDSvRn.cjs → vue-ui-accordion-2oBs8M8G.cjs} +1 -1
  39. package/dist/{vue-ui-accordion-BOHicozd.js → vue-ui-accordion-CzsbGsxC.js} +3 -3
  40. package/dist/{vue-ui-age-pyramid-DN25tjv-.cjs → vue-ui-age-pyramid-8dnWY_2V.cjs} +1 -1
  41. package/dist/{vue-ui-age-pyramid-vKWko9vn.js → vue-ui-age-pyramid-gy4b8534.js} +42 -41
  42. package/dist/{vue-ui-annotator-D4KNucw5.js → vue-ui-annotator-BOxVmY-t.js} +1 -1
  43. package/dist/{vue-ui-annotator-BcxUQ5tM.cjs → vue-ui-annotator-D4AFe-ds.cjs} +1 -1
  44. package/dist/{vue-ui-bullet-DZgtd_qb.js → vue-ui-bullet-CYRzrrdq.js} +15 -15
  45. package/dist/{vue-ui-bullet-C3DKTZbg.cjs → vue-ui-bullet-DS61aLmi.cjs} +1 -1
  46. package/dist/vue-ui-candlestick-CnMW4VI7.cjs +2 -0
  47. package/dist/vue-ui-candlestick-z1XCCmjs.js +740 -0
  48. package/dist/{vue-ui-carousel-table-Bpsrlbx9.js → vue-ui-carousel-table-Dusdq9C-.js} +4 -4
  49. package/dist/{vue-ui-carousel-table-C62szGjt.cjs → vue-ui-carousel-table-STfjKv04.cjs} +1 -1
  50. package/dist/{vue-ui-chestnut-VWwSZnUX.cjs → vue-ui-chestnut-CiOs7_Mn.cjs} +1 -1
  51. package/dist/{vue-ui-chestnut-DhPSNM96.js → vue-ui-chestnut-xOUxz__4.js} +8 -8
  52. package/dist/{vue-ui-cursor-BM2OiZnZ.js → vue-ui-cursor-BAZcn7gS.js} +2 -2
  53. package/dist/{vue-ui-cursor-BwnZYB4D.cjs → vue-ui-cursor-CgulNaZF.cjs} +1 -1
  54. package/dist/{vue-ui-dashboard-D8FU1GbE.cjs → vue-ui-dashboard-B-e6E048.cjs} +1 -1
  55. package/dist/{vue-ui-dashboard-BcnW7vDs.js → vue-ui-dashboard-CM5h0sJK.js} +2 -2
  56. package/dist/{vue-ui-digits-BmQBwho3.cjs → vue-ui-digits-DE-VUfnq.cjs} +1 -1
  57. package/dist/{vue-ui-digits-M4Pvrg0n.js → vue-ui-digits-DFYtiFpE.js} +2 -2
  58. package/dist/{vue-ui-donut-BgsQjURe.js → vue-ui-donut-B7WCvZ9X.js} +99 -98
  59. package/dist/{vue-ui-donut-CZZfvbPk.cjs → vue-ui-donut-Dh1MEQSX.cjs} +1 -1
  60. package/dist/vue-ui-donut-evolution-E8YRIlka.cjs +1 -0
  61. package/dist/vue-ui-donut-evolution-tseD-zkG.js +908 -0
  62. package/dist/{vue-ui-dumbbell-zv7yiPPM.js → vue-ui-dumbbell-CB-nTGSr.js} +10 -10
  63. package/dist/{vue-ui-dumbbell-CsMqgiGr.cjs → vue-ui-dumbbell-DoajPALb.cjs} +1 -1
  64. package/dist/{vue-ui-flow-E5MkZ3Yb.cjs → vue-ui-flow-DZo1e2BI.cjs} +1 -1
  65. package/dist/{vue-ui-flow-BqtIWBkz.js → vue-ui-flow-DgM7D7Kz.js} +46 -46
  66. package/dist/{vue-ui-funnel-CmVLAttG.js → vue-ui-funnel-Bae7zmv7.js} +19 -19
  67. package/dist/{vue-ui-funnel-QU0_JscL.cjs → vue-ui-funnel-FwQya4Js.cjs} +1 -1
  68. package/dist/{vue-ui-galaxy-BPDH-9KW.cjs → vue-ui-galaxy-BmQPNy0t.cjs} +1 -1
  69. package/dist/{vue-ui-galaxy-sy8zvgcg.js → vue-ui-galaxy-C1hMuu_6.js} +53 -52
  70. package/dist/{vue-ui-gauge-D_yokJMS.cjs → vue-ui-gauge-4Gy_NFvq.cjs} +1 -1
  71. package/dist/{vue-ui-gauge--hARSvgz.js → vue-ui-gauge-CvUdCkBJ.js} +7 -7
  72. package/dist/{vue-ui-gizmo-CvTeq5j0.js → vue-ui-gizmo-B6t4exHM.js} +3 -3
  73. package/dist/{vue-ui-gizmo-AUJq3EQL.cjs → vue-ui-gizmo-F0ACp4Ym.cjs} +1 -1
  74. package/dist/{vue-ui-heatmap-lI8oO-nh.js → vue-ui-heatmap-CNptUmPc.js} +60 -59
  75. package/dist/{vue-ui-heatmap-D-xNLuqW.cjs → vue-ui-heatmap-DeLrr3m8.cjs} +1 -1
  76. package/dist/{vue-ui-history-plot-D3CwJpll.js → vue-ui-history-plot-DnVFjg0P.js} +60 -59
  77. package/dist/{vue-ui-history-plot-BC0Rvo-r.cjs → vue-ui-history-plot-iK6KKQTl.cjs} +1 -1
  78. package/dist/{vue-ui-kpi-C0agq-Os.js → vue-ui-kpi-BIb8GWpr.js} +3 -3
  79. package/dist/{vue-ui-kpi-B4FQKZ_r.cjs → vue-ui-kpi-BOLWEQ7j.cjs} +1 -1
  80. package/dist/{vue-ui-mini-loader-BJ70GAEv.cjs → vue-ui-mini-loader-dzvCTPe_.cjs} +1 -1
  81. package/dist/{vue-ui-mini-loader-CkjJ5pRO.js → vue-ui-mini-loader-vn8l58Co.js} +2 -2
  82. package/dist/{vue-ui-molecule-V9UFJHeV.js → vue-ui-molecule-BXVfvrYp.js} +26 -25
  83. package/dist/{vue-ui-molecule-CsQfkIEE.cjs → vue-ui-molecule-CztdOxnV.cjs} +1 -1
  84. package/dist/{vue-ui-mood-radar-CdU2vusL.cjs → vue-ui-mood-radar-COiSqYpY.cjs} +1 -1
  85. package/dist/{vue-ui-mood-radar-Cj_wOEbY.js → vue-ui-mood-radar-FyUqJ_WI.js} +11 -11
  86. package/dist/{vue-ui-nested-donuts-DFVQwbHg.js → vue-ui-nested-donuts-C3mVKHnx.js} +78 -77
  87. package/dist/{vue-ui-nested-donuts-DevV-xZr.cjs → vue-ui-nested-donuts-CyzGIcRn.cjs} +2 -2
  88. package/dist/{vue-ui-onion-BJ-PjA7d.js → vue-ui-onion-C3uZpdTX.js} +49 -48
  89. package/dist/{vue-ui-onion-DGWktnME.cjs → vue-ui-onion-PCbFeTBq.cjs} +2 -2
  90. package/dist/{vue-ui-parallel-coordinate-plot-CjxZbVNa.cjs → vue-ui-parallel-coordinate-plot-BbyG3T_L.cjs} +3 -3
  91. package/dist/{vue-ui-parallel-coordinate-plot-33naX1Ss.js → vue-ui-parallel-coordinate-plot-_nN05_KZ.js} +70 -69
  92. package/dist/{vue-ui-quadrant-xJaZzXgo.js → vue-ui-quadrant-CqcqhOTk.js} +55 -54
  93. package/dist/{vue-ui-quadrant-DqZqBb2L.cjs → vue-ui-quadrant-D48AnGwm.cjs} +1 -1
  94. package/dist/vue-ui-quick-chart-CUG-kf3L.cjs +15 -0
  95. package/dist/{vue-ui-quick-chart-BwN9eLye.js → vue-ui-quick-chart-CvhtEA16.js} +637 -622
  96. package/dist/{vue-ui-radar-CQ66YUG5.cjs → vue-ui-radar-CKq_4-3B.cjs} +1 -1
  97. package/dist/{vue-ui-radar-B4EXwJDY.js → vue-ui-radar-o4cmO82a.js} +38 -37
  98. package/dist/{vue-ui-rating-DNkygw1i.js → vue-ui-rating-CuBodH3C.js} +2 -2
  99. package/dist/{vue-ui-rating-D334I4ju.cjs → vue-ui-rating-DG1svxO9.cjs} +1 -1
  100. package/dist/{vue-ui-relation-circle-CP2Z6IWV.cjs → vue-ui-relation-circle-AXwyCjxM.cjs} +1 -1
  101. package/dist/{vue-ui-relation-circle-BKeSh28h.js → vue-ui-relation-circle-C--j7Q0q.js} +19 -19
  102. package/dist/{vue-ui-rings-D6M3UNSE.js → vue-ui-rings-DpVKPZCb.js} +49 -48
  103. package/dist/vue-ui-rings-fAvuiSZU.cjs +2 -0
  104. package/dist/{vue-ui-scatter-C9ZoWV1q.cjs → vue-ui-scatter-CHY2sxci.cjs} +1 -1
  105. package/dist/{vue-ui-scatter-JUPbbsO7.js → vue-ui-scatter-D_KsmIg_.js} +26 -25
  106. package/dist/{vue-ui-screenshot-JMBX_AWn.cjs → vue-ui-screenshot-Baj16IKL.cjs} +1 -1
  107. package/dist/{vue-ui-screenshot-DmLDHfF9.js → vue-ui-screenshot-C21qDF26.js} +1 -1
  108. package/dist/{vue-ui-skeleton-E9_X0-sa.cjs → vue-ui-skeleton-BdbO4Bxt.cjs} +1 -1
  109. package/dist/{vue-ui-skeleton-D7rg5vFC.js → vue-ui-skeleton-p82n8dLi.js} +3 -3
  110. package/dist/{vue-ui-smiley-BAlHZm8H.js → vue-ui-smiley-DDBn_kg-.js} +2 -2
  111. package/dist/{vue-ui-smiley-aRTznf8z.cjs → vue-ui-smiley-DGdo7pOJ.cjs} +1 -1
  112. package/dist/{vue-ui-spark-trend-J9swikF_.js → vue-ui-spark-trend-CM-XDvvj.js} +5 -5
  113. package/dist/{vue-ui-spark-trend-DZR6Fqu5.cjs → vue-ui-spark-trend-CyiYuOb3.cjs} +1 -1
  114. package/dist/{vue-ui-sparkbar-B0tCpwZ9.js → vue-ui-sparkbar-BRWlzT5P.js} +4 -4
  115. package/dist/{vue-ui-sparkbar-Bjmi8pMf.cjs → vue-ui-sparkbar-Bi952P46.cjs} +1 -1
  116. package/dist/{vue-ui-sparkgauge-DVX2pIC3.js → vue-ui-sparkgauge-BPcFMY0I.js} +4 -4
  117. package/dist/{vue-ui-sparkgauge-Dhzbkn67.cjs → vue-ui-sparkgauge-bhzDdT-A.cjs} +1 -1
  118. package/dist/{vue-ui-sparkhistogram-gIaXDrFh.cjs → vue-ui-sparkhistogram-BdiA32Fs.cjs} +1 -1
  119. package/dist/{vue-ui-sparkhistogram-Wd6q0mqj.js → vue-ui-sparkhistogram-DAtbloqL.js} +5 -5
  120. package/dist/{vue-ui-sparkline-B5ySeM9y.cjs → vue-ui-sparkline-BXa0bOgm.cjs} +1 -1
  121. package/dist/{vue-ui-sparkline-DYT-gts9.js → vue-ui-sparkline-CbnPVyxs.js} +4 -4
  122. package/dist/{vue-ui-sparkstackbar-ilvB3RBv.cjs → vue-ui-sparkstackbar-BDupdTEm.cjs} +1 -1
  123. package/dist/{vue-ui-sparkstackbar-BMGA05VR.js → vue-ui-sparkstackbar-BdjWWadM.js} +5 -5
  124. package/dist/vue-ui-stackbar-CUXctt_2.js +1026 -0
  125. package/dist/vue-ui-stackbar-DvIG4zyP.cjs +6 -0
  126. package/dist/{vue-ui-strip-plot-DPo7osh_.cjs → vue-ui-strip-plot-C5r83jmv.cjs} +1 -1
  127. package/dist/{vue-ui-strip-plot-B-r4luYX.js → vue-ui-strip-plot-lb-y68Hd.js} +71 -70
  128. package/dist/{vue-ui-table-wlXHwJVW.js → vue-ui-table-DFfsqpZU.js} +1 -1
  129. package/dist/{vue-ui-table-C6z56ODT.cjs → vue-ui-table-DgCMMvSx.cjs} +1 -1
  130. package/dist/{vue-ui-table-heatmap-CM-c7n0F.js → vue-ui-table-heatmap-BiSTfmrM.js} +9 -9
  131. package/dist/{vue-ui-table-heatmap-B05GifSw.cjs → vue-ui-table-heatmap-jp5xDCCO.cjs} +1 -1
  132. package/dist/{vue-ui-table-sparkline-Dx-ePVqW.cjs → vue-ui-table-sparkline-8itAuNdX.cjs} +1 -1
  133. package/dist/{vue-ui-table-sparkline-DHaEHFG_.js → vue-ui-table-sparkline-B7sNio6G.js} +5 -5
  134. package/dist/{vue-ui-thermometer-HCpOZBHv.cjs → vue-ui-thermometer-CsY6PZxF.cjs} +1 -1
  135. package/dist/{vue-ui-thermometer-BU_ckSdu.js → vue-ui-thermometer-Cvoq-NoB.js} +7 -7
  136. package/dist/{vue-ui-timer-CUChwyzF.cjs → vue-ui-timer-BBYru0Q7.cjs} +1 -1
  137. package/dist/{vue-ui-timer-DiRZ849L.js → vue-ui-timer-CKkmEEyh.js} +9 -9
  138. package/dist/{vue-ui-tiremarks-yoQtfbj7.cjs → vue-ui-tiremarks-CJyRAXGr.cjs} +1 -1
  139. package/dist/{vue-ui-tiremarks-BHMNb_tq.js → vue-ui-tiremarks-CVDQcr2f.js} +7 -7
  140. package/dist/{vue-ui-treemap-BInwLSes.cjs → vue-ui-treemap-BKA7MrUz.cjs} +1 -1
  141. package/dist/{vue-ui-treemap-BpD6OdL3.js → vue-ui-treemap-BLDOoQdk.js} +98 -97
  142. package/dist/{vue-ui-vertical-bar-hS4gzdKs.cjs → vue-ui-vertical-bar-BNZ-jiBi.cjs} +2 -2
  143. package/dist/{vue-ui-vertical-bar-CBNWMmCg.js → vue-ui-vertical-bar-DgluCuy7.js} +58 -57
  144. package/dist/{vue-ui-waffle-Cmq6zhD8.cjs → vue-ui-waffle-COGvHmU8.cjs} +1 -1
  145. package/dist/{vue-ui-waffle-BE8iTrGF.js → vue-ui-waffle-DOZ8DM_y.js} +79 -78
  146. package/dist/{vue-ui-wheel-BXSIBRLM.js → vue-ui-wheel-BiHGxIWR.js} +7 -7
  147. package/dist/{vue-ui-wheel-BT0mLxln.cjs → vue-ui-wheel-DrhwR-Z-.cjs} +1 -1
  148. package/dist/{vue-ui-word-cloud-3wvSYRbp.js → vue-ui-word-cloud-CEfsjt8Y.js} +10 -10
  149. package/dist/{vue-ui-word-cloud-BXHlm41O.cjs → vue-ui-word-cloud-ClzpBDxZ.cjs} +1 -1
  150. package/dist/{vue-ui-xy-D8XvOgW6.js → vue-ui-xy-BU03SArU.js} +888 -837
  151. package/dist/vue-ui-xy-CO99Ia72.cjs +3 -0
  152. package/dist/{vue-ui-xy-canvas-Cx7vPyfT.js → vue-ui-xy-canvas-D6xrOdYB.js} +378 -365
  153. package/dist/vue-ui-xy-canvas-lOb9PCZm.cjs +9 -0
  154. package/package.json +1 -1
  155. package/dist/Slicer-B2aHb4bj.cjs +0 -1
  156. package/dist/Slicer-D9ASV60L.js +0 -400
  157. package/dist/Tooltip-ypQtmi99.cjs +0 -1
  158. package/dist/index-B5Ugkauv.cjs +0 -9
  159. package/dist/vue-ui-candlestick-C8yBMu8-.js +0 -725
  160. package/dist/vue-ui-candlestick-DVEofXBZ.cjs +0 -2
  161. package/dist/vue-ui-donut-evolution-BO2-ARBX.js +0 -895
  162. package/dist/vue-ui-donut-evolution-DP14ctdf.cjs +0 -1
  163. package/dist/vue-ui-quick-chart-BzpXJYR_.cjs +0 -15
  164. package/dist/vue-ui-rings-2oDSTctd.cjs +0 -2
  165. package/dist/vue-ui-stackbar-BZKwsAjO.cjs +0 -6
  166. package/dist/vue-ui-stackbar-BZbOagnf.js +0 -947
  167. package/dist/vue-ui-xy-CfduqTWA.cjs +0 -3
  168. package/dist/vue-ui-xy-canvas-BTR-cL02.cjs +0 -9
@@ -0,0 +1,9 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./index-Ce0TFqvS.cjs"),c=require("./useResponsive-BJ7DTGpm.cjs"),et=require("./Tooltip-t5_yWU6c.cjs"),tt=require("./Legend-BPogA3ac.cjs"),lt=require("./Title-DoxrpVfD.cjs"),at=require("./Slicer-C_1pd_Kh.cjs"),Me=require("./usePrinter-Dq9TRqqU.cjs"),ot=require("./vue-ui-accordion-2oBs8M8G.cjs"),rt=require("./DataTable-DnaY4y8p.cjs"),nt=require("./vue-ui-skeleton-BdbO4Bxt.cjs"),Re=require("./useNestedProp-Dv81zO0o.cjs"),ut=require("./PenAndPaper-B1DxKWdn.cjs"),st=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),it=["id"],ct=["onClick"],vt={key:2,class:"vue-data-ui-watermark"},dt=["innerHTML"],ht={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(oe,{expose:Oe,emit:Ee}){const p=oe,{vue_ui_xy_canvas:Ne}=u.useConfig(),Z=l.ref(u.createUid()),N=l.ref(null),S=l.ref(null),B=l.ref(null),i=l.ref(null),g=l.ref(1),T=l.ref(1),_=l.ref(!1),f=l.ref(null),H=l.ref(""),re=l.ref(null),C=l.ref([]),R=l.ref(1),M=l.ref(!0),z=l.ref(!0),G=l.ref(null),ne=l.ref(0),ue=l.ref(0),V=l.ref(!1),se=l.ref(null),ie=l.ref(null),ce=l.ref(null),ve=l.ref(null),j=l.ref(0),J=l.ref(0),K=l.ref(0),Q=l.computed(()=>!!p.dataset&&p.dataset.length),t=l.computed({get:()=>de(),set:e=>e});function de(){const e=Re.useNestedProp({userConfig:p.config,defaultConfig:Ne});let o={};return e.theme?o={...Re.useNestedProp({userConfig:u.themes.vue_ui_xy_canvas[e.theme]||p.config,defaultConfig:e}),customPalette:u.themePalettes[e.theme]||u.palette}:o=e,p.config&&u.hasDeepProperty(p.config,"style.chart.scale.min")?o.style.chart.scale.min=p.config.style.chart.scale.min:o.style.chart.scale.min=null,p.config&&u.hasDeepProperty(p.config,"style.chart.scale.max")?o.style.chart.scale.max=p.config.style.chart.scale.max:o.style.chart.scale.max=null,p.config&&u.hasDeepProperty(p.config,"style.chart.zoom.startIndex")?o.style.chart.zoom.startIndex=p.config.style.chart.zoom.startIndex:o.style.chart.zoom.startIndex=null,p.config&&u.hasDeepProperty(p.config,"style.chart.zoom.endIndex")?o.style.chart.zoom.endIndex=p.config.style.chart.zoom.endIndex:o.style.chart.zoom.endIndex=null,o}l.watch(()=>p.config,e=>{t.value=de(),te(),j.value+=1,J.value+=1,K.value+=1},{deep:!0}),l.watch(()=>p.dataset,()=>{te(),j.value+=1,J.value+=1,K.value+=1},{deep:!0});const he=l.ref(t.value.style.chart.aspectRatio),{isPrinting:fe,isImaging:ye,generatePdf:ge,generateImage:pe}=Me.usePrinter({elementId:`xy_canvas_${Z.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas"}),s=l.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function Be(e){V.value=e,ue.value+=1}const me=l.computed(()=>u.convertCustomPalette(t.value.customPalette)),w=l.computed(()=>O.value?Math.max(...O.value.filter((e,o)=>!C.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),a=l.computed(()=>{const e=g.value-g.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:g.value,canvasHeight:T.value,left:g.value*t.value.style.chart.paddingProportions.left,top:T.value*t.value.style.chart.paddingProportions.top,right:g.value-g.value*t.value.style.chart.paddingProportions.right,bottom:T.value-T.value*t.value.style.chart.paddingProportions.bottom,width:e,height:T.value-T.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(n.value.end-n.value.start)}});function be(e,o){return e/o}function Fe({hasAutoScale:e,series:o,min:r,max:d,scale:h,yOffset:m,individualHeight:v,stackIndex:b=null}){return o.map((L,ae)=>{const $=h.min<0?Math.abs(h.min):0,I=be(L+$,$+h.max);let P,F;e&&(P=Math.abs(h.min),F=be(L+P,h.max+P));let D=0;return b===null?D=a.value.bottom-a.value.height*(e?F:I):D=a.value.bottom-m-v*(e?F:I),{x:a.value.left+a.value.slot*ae+a.value.slot/2,y:D,value:L}})}const x=l.computed(()=>{const e=t.value.style.chart.scale.min!==null?t.value.style.chart.scale.min:Math.min(...O.value.filter((v,b)=>!C.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(n.value.start,n.value.end))),o=t.value.style.chart.scale.max!==null?t.value.style.chart.scale.max:Math.max(...O.value.filter((v,b)=>!C.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(n.value.start,n.value.end))),r=u.calculateNiceScale(e<0?e:0,o===e?e+1<0?0:e+1:o<0?0:o,t.value.style.chart.scale.ticks),d=r.min<0?Math.abs(r.min):0,h=a.value.bottom-a.value.height*(d/(r.max+d)),m=r.ticks.map(v=>({y:a.value.bottom-a.value.height*((v+d)/(r.max+d)),x:a.value.left-8,value:v}));return{absoluteMin:d,max:o,min:e,scale:r,yLabels:m,zero:h}}),De=l.computed(()=>y.value.map(e=>`
2
+ <div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
3
+ <svg viewBox="0 0 10 10" height="12" width="12">
4
+ <circle cx="5" cy="5" r="5" fill="${e.color}"/>
5
+ </svg>
6
+ <span>${e.name?e.name+": ":""}</span>
7
+ <span>${u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.series[f.value],u.dataLabel({p:e.prefix||"",v:e.series[f.value],s:e.suffix||"",r:e.rounding||0}),{datapoint:e,seriesIndex:f.value})}</span>
8
+ </div>
9
+ `)),O=l.computed(()=>p.dataset.map((e,o)=>({...e,series:u.largestTriangleThreeBucketsArray({data:u.sanitizeArray(e.series),threshold:t.value.downsample.threshold}),absoluteIndex:o,color:u.convertColorToHex(e.color||me.value[o]||u.palette[o]||u.palette[o%u.palette.length])})));l.watch(w,e=>{e&&xe()});const y=l.computed(()=>u.assignStackRatios(O.value.filter((e,o)=>!C.value.includes(e.absoluteIndex))).map((e,o)=>({...e,series:e.series.slice(n.value.start,n.value.end)})).map((e,o)=>{let r=[null,void 0].includes(e.scaleMin)?Math.min(...e.series)||0:e.scaleMin,d=[null,void 0].includes(e.scaleMax)?Math.max(...e.series)||1:e.scaleMax;r===d&&(r=r>=0?d-1:r,d=d>=0?d:r+1);const m={ratios:e.series.filter(A=>![null,void 0].includes(A)).map(A=>(A-r)/(d-r)),valueMin:r,valueMax:d},v=e.scaleSteps||t.value.style.chart.scale.ticks;let b;e.autoScaling?b=u.calculateNiceScale(m.valueMin,m.valueMax,v):b=u.calculateNiceScale(m.valueMin<0?m.valueMin:0,m.valueMax<=0?0:m.valueMax,v);const L=s.value.stacked?a.value.height*(1-e.cumulatedStackRatio):0,ae=s.value.stacked?a.value.height/t.value.style.chart.stackGap:0,$=s.value.stacked?a.value.height*e.stackRatio-ae:a.value.height,I=b.min<0?Math.abs(b.min):0;let P;e.autoScaling&&s.value.stacked&&d<=0?P=a.value.bottom-L-$:P=a.value.bottom-L-$*(I/(b.max+I));const F=b.ticks.map((A,Qe)=>({y:a.value.bottom-L-$*(Qe/(b.ticks.length-1)),x:a.value.left-8,value:A})),D=Fe({hasAutoScale:s.value.stacked&&e.autoScaling,series:e.series,min:s.value.stacked?r:x.value.min,max:s.value.stacked?d:x.value.max,scale:s.value.stacked?b:x.value.scale,yOffset:L,individualHeight:$,stackIndex:s.value.stacked?o:null});return{...e,coordinatesLine:D,min:r,max:d,localScale:b,localZero:P,localMin:I,localYLabels:F,yOffset:L,individualHeight:$}})),n=l.ref({start:0,end:w.value});function xe(){ke()}const E=l.ref(null);async function ke(){(t.value.style.chart.zoom.startIndex!==null||t.value.style.chart.zoom.endIndex!==null)&&E.value?(t.value.style.chart.zoom.startIndex!==null&&(await l.nextTick(),await l.nextTick(),E.value&&E.value.setStartValue(t.value.style.chart.zoom.startIndex)),t.value.style.chart.zoom.endIndex!==null&&(await l.nextTick(),await l.nextTick(),E.value&&E.value.setEndValue(Ae(t.value.style.chart.zoom.endIndex+1)))):(n.value={start:0,end:w.value},ne.value+=1)}function Ae(e){const o=w.value;return e>o?o: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}const _e=l.computed(()=>y.value.filter(e=>["line","plot",void 0].includes(e.type))),k=l.computed(()=>y.value.filter(e=>e.type==="bar"));function He(){if(!S.value)return;const e=B.value.offsetWidth,o=B.value.offsetHeight;S.value.width=e*R.value*2,S.value.height=o*R.value*2,g.value=e*R.value*2,T.value=o*R.value*2,i.value.scale(R.value,R.value),ee()}function Ve(){if(i.value.clearRect(0,0,1e4,1e4),i.value.fillStyle=t.value.style.chart.backgroundColor,i.value.fillRect(0,0,a.value.canvasWidth,a.value.canvasHeight),s.value.stacked)t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength?y.value.forEach(e=>{for(let o=0;o<n.value.end-n.value.start+1;o+=1)c.line(i.value,[{x:a.value.left+a.value.slot*o,y:a.value.bottom-e.yOffset-e.individualHeight},{x:a.value.left+a.value.slot*o,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}):t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength&&y.value.forEach(e=>{for(let o=n.value.start;o<n.value.end;o+=1)o%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&c.line(i.value,[{x:a.value.left+a.value.slot*(o-n.value.start)+a.value.slot/2,y:a.value.bottom-e.yOffset-e.individualHeight},{x:a.value.left+a.value.slot*(o-n.value.start)+a.value.slot/2,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}),t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?y.value.forEach(e=>{e.localYLabels.forEach((o,r)=>{r<e.localYLabels.length-1&&c.rect(i.value,[{x:a.value.left,y:o.y},{x:a.value.right,y:o.y},{x:a.value.right,y:e.localYLabels[r+1].y},{x:a.value.left,y:e.localYLabels[r+1].y}],{fillColor:r%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})})}):y.value.forEach(e=>{e.localYLabels.slice(n.value.start,n.value.end).forEach(o=>{c.line(i.value,[{x:a.value.left,y:o.y},{x:a.value.right,y:o.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})})),t.value.style.chart.grid.zeroLine.show&&y.value.forEach(e=>{c.line(i.value,[{x:a.value.left,y:e.localZero},{x:a.value.right,y:e.localZero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]})}),t.value.style.chart.grid.y.axisLabels.show&&y.value.forEach(e=>{c.line(i.value,[{x:a.value.left,y:a.value.bottom-e.yOffset},{x:a.value.left,y:a.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),c.line(i.value,[{x:a.value.right,y:a.value.bottom-e.yOffset},{x:a.value.right,y:a.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),e.localYLabels.forEach((o,r)=>{c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,o.value,u.dataLabel({p:e.prefix||t.value.style.chart.grid.y.axisLabels.prefix||"",v:o.value,s:e.suffix||t.value.style.chart.grid.y.axisLabels.suffix||"",r:e.rounding||t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:o,seriesIndex:r}),o.x+t.value.style.chart.grid.y.axisLabels.offsetX,o.y,{align:"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:e.color})})}),y.value.forEach(e=>{c.text(i.value,e.name,g.value/35,a.value.bottom-e.yOffset-e.individualHeight/2,{align:"center",rotation:-90,color:e.color,font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`})});else{if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=0;e<n.value.end-n.value.start+1;e+=1)c.line(i.value,[{x:a.value.left+a.value.slot*e,y:a.value.top},{x:a.value.left+a.value.slot*e,y:a.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});else if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=n.value.start;e<n.value.end;e+=1)e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&c.line(i.value,[{x:a.value.left+a.value.slot*(e-n.value.start)+a.value.slot/2,y:a.value.top},{x:a.value.left+a.value.slot*(e-n.value.start)+a.value.slot/2,y:a.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?x.value.yLabels.forEach((e,o)=>{o<x.value.yLabels.length-1&&c.rect(i.value,[{x:a.value.left,y:e.y},{x:a.value.right,y:e.y},{x:a.value.right,y:x.value.yLabels[o+1].y},{x:a.value.left,y:x.value.yLabels[o+1].y}],{fillColor:o%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})}):x.value.yLabels.forEach(e=>{c.line(i.value,[{x:a.value.left,y:e.y},{x:a.value.right,y:e.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})),t.value.style.chart.grid.y.showAxis&&c.line(i.value,[{x:a.value.left,y:a.value.top},{x:a.value.left,y:a.value.bottom}],{color:t.value.style.chart.grid.y.axisColor,lineWidth:t.value.style.chart.grid.y.axisThickness}),t.value.style.chart.grid.x.showAxis&&c.line(i.value,[{x:a.value.left,y:a.value.bottom},{x:a.value.right,y:a.value.bottom}],{color:t.value.style.chart.grid.x.axisColor,lineWidth:t.value.style.chart.grid.x.axisThickness}),t.value.style.chart.grid.zeroLine.show&&c.line(i.value,[{x:a.value.left,y:x.value.zero},{x:a.value.right,y:x.value.zero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]}),t.value.style.chart.grid.y.axisLabels.show&&x.value.yLabels.forEach((e,o)=>{c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.value,u.dataLabel({p:t.value.style.chart.grid.y.axisLabels.prefix||"",v:e.value,s:t.value.style.chart.grid.y.axisLabels.suffix||"",r:t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:e,seriesIndex:o}),e.x+t.value.style.chart.grid.y.axisLabels.offsetX,e.y,{align:"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.grid.y.axisLabels.color})})}t.value.style.chart.grid.y.axisName&&c.text(i.value,t.value.style.chart.grid.y.axisName,g.value-g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio*1.2,a.value.bottom-a.value.height/2,{font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center",rotation:90}),t.value.style.chart.grid.x.axisName&&c.text(i.value,t.value.style.chart.grid.x.axisName,g.value/2,T.value,{font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center"})}function We(e){for(let o=0;o<e.coordinatesLine.length;o+=1){const r=(f.value===o?g.value/150:t.value.style.chart.line.plots.show?g.value/200:0)*t.value.style.chart.line.plots.radiusRatio;c.circle(i.value,{x:e.coordinatesLine[o].x,y:e.coordinatesLine[o].y},r,{color:t.value.style.chart.backgroundColor,fillStyle:e.color,strokeColor:"transparent"})}}function qe(e){for(let o=0;o<e.coordinatesLine.length;o+=1)c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[o].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[o].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[o],seriesIndex:o}),e.coordinatesLine[o].x,e.coordinatesLine[o].y+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(g.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color,strokeColor:t.value.style.chart.backgroundColor,lineWidth:.8})}function Ue(){for(let e=n.value.start;e<n.value.end;e+=1)(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===f.value+n.value.start))&&c.text(i.value,t.value.style.chart.grid.y.timeLabels.values[e]||e+1,a.value.left+a.value.slot*(e-n.value.start)+a.value.slot/2,a.value.bottom+g.value/t.value.style.chart.grid.y.timeLabels.offsetY,{align:t.value.style.chart.grid.y.timeLabels.rotation===0?"center":t.value.style.chart.grid.y.timeLabels.rotation>0?"left":"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.timeLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:u.setOpacity(t.value.style.chart.grid.y.timeLabels.color,f.value!==null?f.value+n.value.start===e?100:20:100),rotation:t.value.style.chart.grid.y.timeLabels.rotation})}function Le(){c.line(i.value,[{x:a.value.left+a.value.slot*f.value+a.value.slot/2,y:a.value.top},{x:a.value.left+a.value.slot*f.value+a.value.slot/2,y:a.value.bottom}],{color:t.value.style.chart.selector.color,lineDash:t.value.style.chart.selector.dashed?[8,8]:[0,0],lineWidth:2,linceCap:"round"})}function Xe(){k.value.forEach((e,o)=>{for(let r=0;r<e.coordinatesLine.length;r+=1)c.rect(i.value,[{x:a.value.left+a.value.slot*r+a.value.slot/10+(s.value.stacked?0:a.value.slot/k.value.length*o-(o===0?0:a.value.slot/(5*k.value.length)*o)),y:s.value.stacked?e.localZero:x.value.zero},{x:a.value.left+a.value.slot*r+a.value.slot/10+(s.value.stacked?0:a.value.slot/k.value.length*o-(o===0?0:a.value.slot/(5*k.value.length)*o))+a.value.slot*.8/(s.value.stacked?1:k.value.length),y:s.value.stacked?e.localZero:x.value.zero},{x:a.value.left+a.value.slot*r+a.value.slot/10+(s.value.stacked?0:a.value.slot/k.value.length*o-(o===0?0:a.value.slot/(5*k.value.length)*o))+a.value.slot*.8/(s.value.stacked?1:k.value.length),y:e.coordinatesLine[r].y},{x:a.value.left+a.value.slot*r+a.value.slot/10+(s.value.stacked?0:a.value.slot/k.value.length*o-(o===0?0:a.value.slot/(5*k.value.length)*o)),y:e.coordinatesLine[r].y}],{strokeColor:t.value.style.chart.backgroundColor,gradient:{type:"linear",start:{x:e.coordinatesLine[r].x,y:e.coordinatesLine[r].y},end:{x:e.coordinatesLine[r].x,y:s.value.stacked?e.localZero:x.value.zero},stops:[{offset:0,color:e.color},{offset:1,color:u.lightenHexColor(e.color,.5)}]}}),s.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[r].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[r].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[r],seriesIndex:r}),a.value.left+a.value.slot*r+a.value.slot/10+(s.value.stacked?0:a.value.slot/k.value.length*o-(o===0?0:a.value.slot/(5*k.value.length)*o))+a.value.slot*.4/(s.value.stacked?1:k.value.length),(e.coordinatesLine[r].value<0?s.value.stacked?e.localZero:x.value.zero:e.coordinatesLine[r].y)+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(g.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color,strokeColor:t.value.style.chart.backgroundColor,lineWidth:.8})})}function Ye(e){e.useArea?s.value.stacked?c.polygon(i.value,[{x:e.coordinatesLine[0].x,y:e.localZero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:e.localZero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):c.polygon(i.value,[{x:e.coordinatesLine[0].x,y:x.value.zero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:x.value.zero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):c.line(i.value,e.coordinatesLine,{color:e.color,lineWidth:3})}function Ze(){y.value.forEach((e,o)=>{c.line(i.value,[{x:a.value.left,y:a.value.bottom-e.yOffset},{x:a.value.right,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.x.horizontalLines.color,lineWidth:1})})}function ee(){Ve(),M.value?(z.value&&f.value!==null&&t.value.style.chart.selector.show&&Le(),Xe(),s.value.stacked&&t.value.style.chart.grid.x.showAxis&&Ze(),_e.value.forEach(e=>{(e.type==="line"||!e.type)&&Ye(e),z.value&&(We(e),s.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&qe(e))}),G.value=c.cloneCanvas(S.value)):(G.value&&(i.value.clearRect(0,0,1e4,1e4),i.value.drawImage(G.value,0,0)),z.value&&f.value!==null&&t.value.style.chart.selector.show&&Le(),z.value&&f.value!==null&&y.value.forEach(e=>{if(e.type==="line"||!e.type||e.type==="plot"){if(!e.coordinatesLine[f.value])return;e.coordinatesLine[f.value].x!==void 0&&e.coordinatesLine[f.value].y!==void 0&&c.circle(i.value,{x:e.coordinatesLine[f.value].x,y:e.coordinatesLine[f.value].y},g.value/150*t.value.style.chart.line.plots.radiusRatio,{color:t.value.style.chart.backgroundColor,fillStyle:e.color,strokeColor:"transparent"})}})),t.value.style.chart.grid.y.timeLabels.show&&Ue(),M.value=!1}const W=c.debounce(()=>{z.value=!0,He()},w.value>200?10:1,!z.value);function Ge(e){const{left:o}=S.value.getBoundingClientRect(),r=e.clientX-o;if(r*2<a.value.left||r*2>a.value.right){_.value=!1,f.value=null;return}const d=r*2-a.value.left;if(f.value=Math.floor(d/a.value.slot),_.value=!0,!z.value)return;let h="";const m=t.value.style.chart.tooltip.customFormat;u.isFunction(m)&&u.functionReturnsString(()=>m({seriesIndex:f.value,datapoint:y.value.map(v=>({shape:v.shape||null,name:v.name,color:v.color,type:v.type||"line",value:v.series.find((b,L)=>L===f.value)})),series:y.value,config:t.value}))?H.value=m({seriesIndex:f.value,datapoint:y.value.map(v=>({shape:v.shape||null,name:v.name,color:v.color,type:v.type||"line",value:v.series.find((b,L)=>L===f.value)})),series:y.value,config:t.value}):(t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[f.value]&&(h+=`<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)[f.value]}</div>`),h+=De.value.join(""),H.value=h),z.value=!1}l.watch(()=>f.value,e=>{W()}),l.watch(()=>n.value,e=>{M.value=!0,ee()},{deep:!0}),l.watch(()=>s.value.showDataLabels,e=>{M.value=!0,ee()}),l.watch(()=>s.value.stacked,e=>{M.value=!0,z.value=!0,W()});function je(){_.value=!1,f.value=null,H.value=""}const q=l.ref(null),U=l.ref(null);l.onMounted(()=>{te()});function te(){if(u.objectIsEmpty(p.dataset)?u.error({componentName:"VueUiXyCanvas",type:"dataset"}):S.value&&(i.value=S.value.getContext("2d",{willReadFrequently:!0})),t.value.responsive){const e=c.throttle(()=>{const{width:o,height:r}=c.useResponsive({chart:N.value,title:t.value.style.chart.title.text?se.value:null,legend:t.value.style.chart.legend.show?ie.value:null,slicer:t.value.style.chart.zoom.show&&w.value>1?ce.value:null,source:ve.value});he.value=`${o} / ${r}`});q.value=new ResizeObserver(e),q.value.observe(N.value.parentNode)}U.value=new ResizeObserver(e=>{for(const o of e)o.contentBoxSize&&B.value&&(M.value=!0,W())}),U.value.observe(B.value),ke()}l.onBeforeUnmount(()=>{U.value&&U.value.disconnect(),q.value&&q.value.disconnect()});function Ce(e){Ee("selectLegend",y.value.find(o=>o.absoluteIndex===e)),C.value.includes(e)?C.value=C.value.filter(o=>o!==e):C.value.push(e),M.value=!0,W()}const we=l.computed(()=>O.value.map((e,o)=>({...e,name:e.name,color:u.convertColorToHex(e.color)||me.value[o]||u.palette[o]||u.palette[o%u.palette.length],shape:e.shape||"circle",prefix:e.prefix||"",suffix:e.suffix||"",rounding:e.rounding||0})).map(e=>({...e,opacity:C.value.includes(e.absoluteIndex)?.5:1,segregate:()=>Ce(e.absoluteIndex),isSegregated:C.value.includes(e.absoluteIndex)}))),Je=l.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),X=l.computed(()=>{const e=[""].concat(y.value.map(h=>h.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>');let o=[];for(let h=0;h<w.value;h+=1){const m=y.value.map(v=>v.series[h]??0).reduce((v,b)=>v+b,0);o.push([t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[h]??h+1].concat(y.value.map(v=>(v.series[h]??0).toFixed(t.value.table.rounding))).concat((m??0).toFixed(t.value.table.rounding)))}const r={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},d=[t.value.table.columnNames.period].concat(y.value.map(h=>h.name)).concat(t.value.table.columnNames.total);return{head:e,body:o.slice(0,n.value.end-n.value.start),config:r,colNames:d}}),Se=l.computed(()=>{if(y.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const e=y.value.map(r=>({label:r.name,color:r.color,type:r.type})),o=[];for(let r=n.value.start;r<n.value.end;r+=1){const d=[t.value.style.chart.grid.y.timeLabels.values[r]||r+1];y.value.forEach(h=>{d.push(Number((h.series[r]||0).toFixed(t.value.table.rounding)))}),o.push(d)}return{head:e,body:o}});function ze(){const e=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=["",...Se.value.head.map(m=>m.label)],r=Se.value.body,d=e.concat([o]).concat(r),h=u.createCsvContent(d);u.downloadCsv({csvContent:h,title:t.value.style.chart.title.text||"vue-ui-xy-canvas"})}function Ke(){return y.value}function $e(){s.value.showTable=!s.value.showTable}function Te(){s.value.showDataLabels=!s.value.showDataLabels}function Ie(){s.value.stacked=!s.value.stacked}function Pe(){s.value.showTooltip=!s.value.showTooltip}const Y=l.ref(!1);function le(){Y.value=!Y.value}return Oe({getData:Ke,generateCsv:ze,generatePdf:ge,generateImage:pe,toggleTable:$e,toggleLabels:Te,toggleStack:Ie,toggleTooltip:Pe,toggleAnnotator:le}),(e,o)=>(l.openBlock(),l.createElementBlock("div",{style:l.normalizeStyle(`width:100%; position:relative; ${t.value.responsive?"height: 100%":""}`),ref_key:"xy",ref:N,id:`xy_canvas_${Z.value}`,class:l.normalizeClass(`vue-ui-donut ${V.value?"vue-data-ui-wrapper-fullscreen":""}`)},[t.value.style.chart.title.text?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:se,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};`)},[(l.openBlock(),l.createBlock(lt._sfc_main,{key:`title_${j.value}`,config:{title:{cy:"xy-canvas-title",...t.value.style.chart.title},subtitle:{cy:"xy-canvas-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):l.createCommentVNode("",!0),t.value.userOptions.show&&Q.value?(l.openBlock(),l.createBlock(Me.UserOptions,{ref:"details",key:`user_option_${ue.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:l.unref(fe),isImaging:l.unref(ye),uid:Z.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasLabel:t.value.userOptions.buttons.labels,hasStack:oe.dataset.length>1&&t.value.userOptions.buttons.stack,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasTable:n.value.end-n.value.start<200&&t.value.userOptions.buttons.table,isFullscreen:V.value,isTooltip:s.value.showTooltip,isStacked:s.value.stacked,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:Y.value,onToggleFullscreen:Be,onGeneratePdf:l.unref(ge),onGenerateCsv:ze,onGenerateImage:l.unref(pe),onToggleTable:$e,onToggleLabels:Te,onToggleStack:Ie,onToggleTooltip:Pe,onToggleAnnotator:le},l.createSlots({_:2},[e.$slots.optionTooltip?{name:"optionTooltip",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,e.$slots.optionPdf?{name:"optionPdf",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,e.$slots.optionCsv?{name:"optionCsv",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,e.$slots.optionImg?{name:"optionImg",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,e.$slots.optionTable?{name:"optionTable",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,e.$slots.optionLabels?{name:"optionLabels",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,e.$slots.optionStack?{name:"optionStack",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionStack",{},void 0,!0)]),key:"6"}:void 0,e.$slots.optionFullscreen?{name:"optionFullscreen",fn:l.withCtx(({toggleFullscreen:r,isFullscreen:d})=>[l.renderSlot(e.$slots,"optionFullscreen",l.normalizeProps(l.guardReactiveProps({toggleFullscreen:r,isFullscreen:d})),void 0,!0)]),key:"7"}:void 0,e.$slots.optionAnnotator?{name:"optionAnnotator",fn:l.withCtx(({toggleAnnotator:r,isAnnotator:d})=>[l.renderSlot(e.$slots,"optionAnnotator",l.normalizeProps(l.guardReactiveProps({toggleAnnotator:r,isAnnotator:d})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasLabel","hasStack","hasFullscreen","hasTable","isFullscreen","isTooltip","isStacked","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):l.createCommentVNode("",!0),l.createElementVNode("div",{class:"vue-ui-xy-canvas",style:l.normalizeStyle(`position: relative; aspect-ratio: ${he.value}`),ref_key:"container",ref:B},[Q.value?(l.openBlock(),l.createElementBlock("canvas",{key:0,ref_key:"canvas",ref:S,style:{width:"100%",height:"100%"},onMousemove:o[0]||(o[0]=r=>Ge(r)),onMouseleave:je},null,544)):(l.openBlock(),l.createBlock(nt.default,{key:1,config:{type:"line",style:{backgroundColor:t.value.style.chart.backgroundColor,line:{axis:{color:"#CCCCCC"},path:{color:"#CCCCCC",strokeWidth:.5}}}}},null,8,["config"])),l.createVNode(et._sfc_main,{show:s.value.showTooltip&&_.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:S.value,content:H.value,isFullscreen:V.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,isCustom:l.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-before",l.normalizeProps(l.guardReactiveProps({...re.value})),void 0,!0)]),"tooltip-after":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-after",l.normalizeProps(l.guardReactiveProps({...re.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","position","offsetY","parent","content","isFullscreen","backgroundOpacity","isCustom"])],4),l.createElementVNode("div",{ref_key:"chartSlicer",ref:ce,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&w.value>1?(l.openBlock(),l.createBlock(at.Slicer,{ref_key:"slicerComponent",ref:E,key:`slicer_${ne.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.y.timeLabels.values[n.value.start]?t.value.style.chart.grid.y.timeLabels.values[n.value.start]:"",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]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:w.value,min:0,valueStart:n.value.start,valueEnd:n.value.end,start:n.value.start,"onUpdate:start":o[1]||(o[1]=r=>n.value.start=r),end:n.value.end,"onUpdate:end":o[2]||(o[2]=r=>n.value.end=r),refreshStartPoint:t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex:0,refreshEndPoint:t.value.style.chart.zoom.endIndex!==null?t.value.style.chart.zoom.endIndex+1:w.value,onReset:xe},{"reset-action":l.withCtx(({reset:r})=>[l.renderSlot(e.$slots,"reset-action",l.normalizeProps(l.guardReactiveProps({reset:r})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint"])):l.createCommentVNode("",!0)],4),l.createElementVNode("div",{ref_key:"chartLegend",ref:ie},[t.value.style.chart.legend.show&&Q.value?(l.openBlock(),l.createBlock(tt.Legend,{legendSet:we.value,config:Je.value,key:`legend_${K.value}`,onClickMarker:o[3]||(o[3]=({i:r})=>Ce(r))},{item:l.withCtx(({legend:r,index:d})=>[l.createElementVNode("div",{onClick:h=>r.segregate(),style:l.normalizeStyle(`opacity:${C.value.includes(d)?.5:1}`)},l.toDisplayString(r.name),13,ct)]),_:1},8,["legendSet","config"])):l.renderSlot(e.$slots,"legend",{key:1,legend:we.value},void 0,!0)],512),e.$slots.watermark?(l.openBlock(),l.createElementBlock("div",vt,[l.renderSlot(e.$slots,"watermark",l.normalizeProps(l.guardReactiveProps({isPrinting:l.unref(fe)||l.unref(ye)})),void 0,!0)])):l.createCommentVNode("",!0),e.$slots.source?(l.openBlock(),l.createElementBlock("div",{key:3,ref_key:"source",ref:ve,dir:"auto"},[l.renderSlot(e.$slots,"source",{},void 0,!0)],512)):l.createCommentVNode("",!0),n.value.end-n.value.start<200?(l.openBlock(),l.createBlock(ot.default,{key:4,hideDetails:"",config:{open:s.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:l.withCtx(()=>[(l.openBlock(),l.createBlock(rt.DataTable,{key:`table_${J.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[4]||(o[4]=r=>s.value.showTable=!1)},{th:l.withCtx(({th:r})=>[l.createElementVNode("div",{innerHTML:r},null,8,dt)]),td:l.withCtx(({td:r})=>[l.createTextVNode(l.toDisplayString(r),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):l.createCommentVNode("",!0),t.value.userOptions.buttons.annotator&&y.value.length?(l.openBlock(),l.createBlock(ut.PenAndPaper,{key:5,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:Y.value,onClose:le},null,8,["parent","backgroundColor","color","active"])):l.createCommentVNode("",!0)],14,it))}},ft=st._export_sfc(ht,[["__scopeId","data-v-a8e374ca"]]);exports.default=ft;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vue-data-ui",
3
3
  "private": false,
4
- "version": "2.4.41",
4
+ "version": "2.4.43",
5
5
  "type": "module",
6
6
  "description": "A user-empowering data visualization Vue 3 components library for eloquent data storytelling",
7
7
  "keywords": [
@@ -1 +0,0 @@
1
- "use strict";const e=require("vue"),O=require("./BaseIcon-D-JUZiGA.cjs"),C=require("./useResponsive-BJ7DTGpm.cjs"),v=require("./index-B5Ugkauv.cjs"),T=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),w=l=>(e.pushScopeId("data-v-ed77abe8"),l=l(),e.popScopeId(),l),U={"data-html2canvas-ignore":"",style:{padding:"0 24px"},class:"vue-data-ui-zoom"},W={class:"vue-data-ui-slicer-labels",style:{position:"relative","z-index":"1","pointer-events":"none"}},j={key:0,style:{width:"100%",position:"relative"}},X={key:0,class:"minimap",style:{width:"100%"}},Z=["xmlns","viewBox"],_=["id"],G=["stop-color"],H=w(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"transparent"},null,-1)),J=["d","stroke"],K=["x","width","height","fill","rx"],Q=["d","fill"],Y=["x","width","height","rx","fill"],ee=["x","width","height","fill","rx"],te=["d","fill"],le=["d","stroke"],ae=["cx","cy","stroke","fill"],ne=["cx","cy","stroke","fill"],oe=["x1","x2","y2","stroke"],ie=["x","height","width","onMouseenter"],re=w(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),ue=["min","max"],se=["min","max"],ce={__name:"Slicer",props:{background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},fontSize:{type:Number,default:14},labelLeft:{type:String,default:""},labelRight:{type:String,default:""},textColor:{type:String,default:"#1A1A1A"},inputColor:{type:String,default:"#1A1A1A"},max:{type:Number,default:0},min:{type:Number,default:0},selectColor:{type:String,default:"#4A4A4A"},useResetSlot:{type:Boolean,default:!1},valueStart:{type:[Number,String],default:0},valueEnd:{type:[Number,String],default:0},minimap:{type:Array,default:[]},smoothMinimap:{type:Boolean,default:!1},minimapSelectedColor:{type:String,default:"#1f77b4"},minimapSelectionRadius:{type:Number,default:12},minimapLineColor:{type:String,default:"#2D353C"},minimapSelectedColorOpacity:{type:Number,default:.2},minimapSelectedIndex:{type:Number,default:null},minimapIndicatorColor:{type:String,default:"#2D353C"}},emits:["update:start","update:end","reset","trapMouse"],setup(l,{emit:h}){const t=l;e.useCssVars(a=>({"724603fa":$.value,"0a3b8c6e":f.value,"31bae142":M.value,"2b1e64c4":l.selectColor,"7b29392c":B.value}));const r=e.ref(t.min),u=e.ref(t.max),p=e.computed(()=>!!t.minimap.length),g=e.ref(v.createUid()),V=e.computed(()=>{const a=t.max-t.min,o=(r.value-t.min)/a*100,i=(u.value-t.min)/a*100;return{left:`${o}%`,width:`${i-o}%`,background:t.selectColor}}),$=e.computed(()=>t.inputColor),B=e.computed(()=>t.background),M=e.computed(()=>`${t.selectColor}33`),f=e.computed(()=>t.borderColor),N=e.computed(()=>{let a=[];for(let o=0;o<t.minimap.length;o+=1)a.push(o);return a});function E(){h("reset")}function z(){Number(r.value)>Number(u.value)-1&&(r.value=Number(u.value)-1),h("update:start",Number(r.value))}function L(){Number(u.value)<Number(r.value)+1&&(u.value=Number(r.value)+1),h("update:end",Number(u.value))}e.watch(()=>t.min,a=>{Number(r.value)<Number(a)&&(r.value=Number(a)),Number(u.value)<Number(a)&&(u.value=Number(a))}),e.watch(()=>t.max,a=>{Number(r.value)>Number(a)&&(r.value=Number(a)),Number(u.value)>Number(a)&&(u.value=Number(a))});const b=e.ref(null),n=e.ref({width:1,height:1}),y=e.ref(null);e.onMounted(()=>{if(p.value){const a=C.throttle(()=>{const{width:o,height:i}=C.useResponsive({chart:b.value});n.value.width=o,n.value.height=i-47});y.value=new ResizeObserver(a),y.value.observe(b.value)}}),e.onBeforeUnmount(()=>{y.value&&y.value.disconnect()});const s=e.computed(()=>t.minimap.length?n.value.width/t.minimap.length:0),c=e.computed(()=>{if(!t.minimap.length)return[];const a=Math.max(...t.minimap),o=Math.min(...t.minimap)-10,i=a-(o>0?0:o),d=t.minimap.map((A,q)=>{const D=A-o;return{x:n.value.width/t.minimap.length*q+s.value/2,y:n.value.height-D/i*(n.value.height*.9)}}),S=t.smoothMinimap?v.createSmoothPath(d):v.createStraightPath(d),k=[...d].slice(t.valueStart,t.valueEnd),R=t.smoothMinimap?v.createSmoothPath(k):v.createStraightPath(k);return{fullSet:S,selectionSet:R,sliced:k,firstPlot:d[t.valueStart],lastPlot:d[t.valueEnd-1]}}),m=e.computed(()=>({x:s.value*r.value+s.value/2,width:n.value.width*((u.value-r.value)/t.max)-s.value})),F=e.computed(()=>({left:0,color:t.textColor,fontSize:`${t.fontSize}px`,top:p.value?"28px":"-28px",pointerEvents:"none"})),I=e.computed(()=>({right:0,color:t.textColor,fontSize:`${t.fontSize}px`,top:p.value?"28px":"-28px",direction:"rtl",pointerEvents:"none"})),x=e.ref(t.minimapSelectedIndex);e.watch(()=>t.minimapSelectedIndex,a=>{x.value=a+t.valueStart},{immediate:!0});function P(a){x.value=a,a>=t.valueStart&&a<t.valueEnd&&h("trapMouse",a-t.valueStart)}return(a,o)=>(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("div",W,[l.valueStart>0||l.valueEnd<l.max?(e.openBlock(),e.createElementBlock("div",j,[l.useResetSlot?e.renderSlot(a.$slots,"reset-action",{key:1,reset:E},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({top:p.value?"36px":"-16px",pointerEvents:"all !important"}),onClick:E},[e.createVNode(O.default,{name:"refresh",stroke:l.textColor},null,8,["stroke"])],4))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"double-range-slider",ref_key:"minimapWrapper",ref:b,style:{"z-index":"0"}},[p.value?(e.openBlock(),e.createElementBlock("div",X,[(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(v.XMLNS),viewBox:`0 0 ${n.value.width<0?0:n.value.width} ${n.value.height<0?0:n.value.height}`},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:g.value,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${l.minimapLineColor}50`},null,8,G),H],8,_)]),e.createElementVNode("path",{d:`M${c.value.fullSet}`,stroke:`${l.minimapLineColor}`,fill:"none","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",style:{opacity:"1"}},null,8,J),e.createElementVNode("rect",{x:m.value.x,width:m.value.width<0?0:m.value.width,height:Math.max(n.value.height,0),y:0,fill:f.value,rx:l.minimapSelectionRadius,stroke:"none"},null,8,K),e.createElementVNode("path",{d:`M${s.value/2},${Math.max(n.value.height,0)} ${c.value.fullSet} L${n.value.width-s.value/2},${Math.max(n.value.height,0)}Z`,fill:`url(#${g.value})`,stroke:"none",style:{opacity:"1"}},null,8,Q),e.createElementVNode("rect",{x:m.value.x,width:m.value.width<0?0:m.value.width,height:Math.max(n.value.height,0),y:0,rx:l.minimapSelectionRadius,fill:f.value},null,8,Y),e.createElementVNode("rect",{x:m.value.x,width:m.value.width<0?0:m.value.width,height:Math.max(n.value.height,0),y:0,fill:l.minimapSelectedColor,rx:l.minimapSelectionRadius,style:e.normalizeStyle({opacity:l.minimapSelectedColorOpacity})},null,12,ee),e.createElementVNode("path",{d:`M${c.value.sliced[0].x},${Math.max(n.value.height,0)} ${c.value.selectionSet} L${c.value.sliced.at(-1).x},${Math.max(n.value.height,0)}Z`,fill:`url(#${g.value})`,stroke:"none",style:{opacity:"1"}},null,8,te),e.createElementVNode("path",{d:`M ${c.value.selectionSet}`,stroke:`${l.minimapLineColor}`,fill:"transparent","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,le),e.createElementVNode("circle",{cx:c.value.firstPlot.x,cy:c.value.firstPlot.y,"stroke-width":"0.5",stroke:f.value,r:"3",fill:l.minimapLineColor},null,8,ae),e.createElementVNode("circle",{cx:c.value.lastPlot.x,cy:c.value.lastPlot.y,"stroke-width":"0.5",stroke:f.value,r:"3",fill:l.minimapLineColor},null,8,ne),x.value!==null?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(N.value,(i,d)=>(e.openBlock(),e.createElementBlock("g",null,[x.value===i&&i>=l.valueStart&&i<l.valueEnd?(e.openBlock(),e.createElementBlock("line",{key:0,x1:s.value*d+s.value/2,x2:s.value*d+s.value/2,y1:0,y2:Math.max(n.value.height,0),stroke:l.minimapIndicatorColor,"stroke-linecap":"round","stroke-dasharray":"2","stroke-width":"1"},null,8,oe)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(i,d)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value*d,y:0,height:Math.max(n.value.height,0),width:s.value<0?0:s.value,fill:"transparent",style:{"pointer-events":"all !important"},onMouseenter:S=>P(i),onMouseleave:o[0]||(o[0]=S=>{x.value=null,h("trapMouse",null)})},null,40,ie))),256))],8,Z))])):e.createCommentVNode("",!0),re,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(V.value)},null,4),e.withDirectives(e.createElementVNode("input",{type:"range",class:"range-left",min:l.min,max:l.max,"onUpdate:modelValue":o[1]||(o[1]=i=>r.value=i),onInput:z},null,40,ue),[[e.vModelText,r.value]]),e.createElementVNode("div",{class:"thumb-label thumb-label-left",style:e.normalizeStyle(F.value)},e.toDisplayString(l.labelLeft),5),e.withDirectives(e.createElementVNode("input",{type:"range",class:"range-right",min:l.min,max:l.max,"onUpdate:modelValue":o[2]||(o[2]=i=>u.value=i),onInput:L},null,40,se),[[e.vModelText,u.value]]),e.createElementVNode("div",{class:"thumb-label thumb-label-right",style:e.normalizeStyle(I.value)},e.toDisplayString(l.labelRight),5)],512)]))}},de=T._export_sfc(ce,[["__scopeId","data-v-ed77abe8"]]);exports.Slicer=de;
@@ -1,400 +0,0 @@
1
- import { useCssVars as K, ref as f, computed as d, watch as L, onMounted as Y, onBeforeUnmount as ee, openBlock as v, createElementBlock as h, createElementVNode as i, normalizeStyle as S, createVNode as te, renderSlot as le, createCommentVNode as C, unref as ae, Fragment as F, renderList as R, withDirectives as E, vModelText as P, toDisplayString as A, pushScopeId as ie, popScopeId as ne } from "vue";
2
- import oe from "./BaseIcon-DCE3wRiG.js";
3
- import { t as ue, u as re } from "./useResponsive-CoxXLe23.js";
4
- import { c as se, R as V, Q as B, X as de } from "./index-B6Q1Fyk0.js";
5
- import { _ as me } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- const O = (t) => (ie("data-v-ed77abe8"), t = t(), ne(), t), ce = {
7
- "data-html2canvas-ignore": "",
8
- style: { padding: "0 24px" },
9
- class: "vue-data-ui-zoom"
10
- }, ve = {
11
- class: "vue-data-ui-slicer-labels",
12
- style: { position: "relative", "z-index": "1", "pointer-events": "none" }
13
- }, he = {
14
- key: 0,
15
- style: { width: "100%", position: "relative" }
16
- }, pe = {
17
- key: 0,
18
- class: "minimap",
19
- style: { width: "100%" }
20
- }, fe = ["xmlns", "viewBox"], xe = ["id"], ye = ["stop-color"], ge = /* @__PURE__ */ O(() => /* @__PURE__ */ i("stop", {
21
- offset: "100%",
22
- "stop-color": "transparent"
23
- }, null, -1)), be = ["d", "stroke"], Se = ["x", "width", "height", "fill", "rx"], ke = ["d", "fill"], Ce = ["x", "width", "height", "rx", "fill"], we = ["x", "width", "height", "fill", "rx"], Ne = ["d", "fill"], $e = ["d", "stroke"], Me = ["cx", "cy", "stroke", "fill"], Le = ["cx", "cy", "stroke", "fill"], Ie = ["x1", "x2", "y2", "stroke"], ze = ["x", "height", "width", "onMouseenter"], Fe = /* @__PURE__ */ O(() => /* @__PURE__ */ i("div", { class: "slider-track" }, null, -1)), Re = ["min", "max"], Ee = ["min", "max"], Pe = {
24
- __name: "Slicer",
25
- props: {
26
- background: {
27
- type: String,
28
- default: "#FFFFFF"
29
- },
30
- borderColor: {
31
- type: String,
32
- default: "#FFFFFF"
33
- },
34
- fontSize: {
35
- type: Number,
36
- default: 14
37
- },
38
- labelLeft: {
39
- type: String,
40
- default: ""
41
- },
42
- labelRight: {
43
- type: String,
44
- default: ""
45
- },
46
- textColor: {
47
- type: String,
48
- default: "#1A1A1A"
49
- },
50
- inputColor: {
51
- type: String,
52
- default: "#1A1A1A"
53
- },
54
- max: {
55
- type: Number,
56
- default: 0
57
- },
58
- min: {
59
- type: Number,
60
- default: 0
61
- },
62
- selectColor: {
63
- type: String,
64
- default: "#4A4A4A"
65
- },
66
- useResetSlot: {
67
- type: Boolean,
68
- default: !1
69
- },
70
- valueStart: {
71
- type: [Number, String],
72
- default: 0
73
- },
74
- valueEnd: {
75
- type: [Number, String],
76
- default: 0
77
- },
78
- minimap: {
79
- type: Array,
80
- default: []
81
- },
82
- smoothMinimap: {
83
- type: Boolean,
84
- default: !1
85
- },
86
- minimapSelectedColor: {
87
- type: String,
88
- default: "#1f77b4"
89
- },
90
- minimapSelectionRadius: {
91
- type: Number,
92
- default: 12
93
- },
94
- minimapLineColor: {
95
- type: String,
96
- default: "#2D353C"
97
- },
98
- minimapSelectedColorOpacity: {
99
- type: Number,
100
- default: 0.2
101
- },
102
- minimapSelectedIndex: {
103
- type: Number,
104
- default: null
105
- },
106
- minimapIndicatorColor: {
107
- type: String,
108
- default: "#2D353C"
109
- }
110
- },
111
- emits: ["update:start", "update:end", "reset", "trapMouse"],
112
- setup(t, { emit: x }) {
113
- const e = t;
114
- K((l) => ({
115
- "724603fa": U.value,
116
- "0a3b8c6e": g.value,
117
- "31bae142": W.value,
118
- "2b1e64c4": t.selectColor,
119
- "7b29392c": T.value
120
- }));
121
- const u = f(e.min), r = f(e.max), y = d(() => !!e.minimap.length), w = f(se()), D = d(() => {
122
- const l = e.max - e.min, n = (u.value - e.min) / l * 100, o = (r.value - e.min) / l * 100;
123
- return {
124
- left: `${n}%`,
125
- width: `${o - n}%`,
126
- background: e.selectColor
127
- };
128
- }), U = d(() => e.inputColor), T = d(() => e.background), W = d(() => `${e.selectColor}33`), g = d(() => e.borderColor), I = d(() => {
129
- let l = [];
130
- for (let n = 0; n < e.minimap.length; n += 1)
131
- l.push(n);
132
- return l;
133
- });
134
- function z() {
135
- x("reset");
136
- }
137
- function X() {
138
- Number(u.value) > Number(r.value) - 1 && (u.value = Number(r.value) - 1), x("update:start", Number(u.value));
139
- }
140
- function j() {
141
- Number(r.value) < Number(u.value) + 1 && (r.value = Number(u.value) + 1), x("update:end", Number(r.value));
142
- }
143
- L(
144
- () => e.min,
145
- (l) => {
146
- Number(u.value) < Number(l) && (u.value = Number(l)), Number(r.value) < Number(l) && (r.value = Number(l));
147
- }
148
- ), L(
149
- () => e.max,
150
- (l) => {
151
- Number(u.value) > Number(l) && (u.value = Number(l)), Number(r.value) > Number(l) && (r.value = Number(l));
152
- }
153
- );
154
- const N = f(null), a = f({
155
- width: 1,
156
- height: 1
157
- }), k = f(null);
158
- Y(() => {
159
- if (y.value) {
160
- const l = ue(() => {
161
- const { width: n, height: o } = re({
162
- chart: N.value
163
- });
164
- a.value.width = n, a.value.height = o - 47;
165
- });
166
- k.value = new ResizeObserver(l), k.value.observe(N.value);
167
- }
168
- }), ee(() => {
169
- k.value && k.value.disconnect();
170
- });
171
- const s = d(() => e.minimap.length ? a.value.width / e.minimap.length : 0), m = d(() => {
172
- if (!e.minimap.length) return [];
173
- const l = Math.max(...e.minimap), n = Math.min(...e.minimap) - 10, o = l - (n > 0 ? 0 : n), c = e.minimap.map((_, H) => {
174
- const J = _ - n;
175
- return {
176
- x: a.value.width / e.minimap.length * H + s.value / 2,
177
- y: a.value.height - J / o * (a.value.height * 0.9)
178
- };
179
- }), $ = e.smoothMinimap ? V(c) : B(c), M = [...c].slice(e.valueStart, e.valueEnd), Q = e.smoothMinimap ? V(M) : B(M);
180
- return {
181
- fullSet: $,
182
- selectionSet: Q,
183
- sliced: M,
184
- firstPlot: c[e.valueStart],
185
- lastPlot: c[e.valueEnd - 1]
186
- };
187
- }), p = d(() => ({
188
- x: s.value * u.value + s.value / 2,
189
- width: a.value.width * ((r.value - u.value) / e.max) - s.value
190
- })), Z = d(() => ({
191
- left: 0,
192
- color: e.textColor,
193
- fontSize: `${e.fontSize}px`,
194
- top: y.value ? "28px" : "-28px",
195
- pointerEvents: "none"
196
- })), q = d(() => ({
197
- right: 0,
198
- color: e.textColor,
199
- fontSize: `${e.fontSize}px`,
200
- top: y.value ? "28px" : "-28px",
201
- direction: "rtl",
202
- pointerEvents: "none"
203
- })), b = f(e.minimapSelectedIndex);
204
- L(() => e.minimapSelectedIndex, (l) => {
205
- b.value = l + e.valueStart;
206
- }, { immediate: !0 });
207
- function G(l) {
208
- b.value = l, l >= e.valueStart && l < e.valueEnd && x("trapMouse", l - e.valueStart);
209
- }
210
- return (l, n) => (v(), h("div", ce, [
211
- i("div", ve, [
212
- t.valueStart > 0 || t.valueEnd < t.max ? (v(), h("div", he, [
213
- t.useResetSlot ? le(l.$slots, "reset-action", {
214
- key: 1,
215
- reset: z
216
- }, void 0, !0) : (v(), h("button", {
217
- key: 0,
218
- "data-cy-reset": "",
219
- tabindex: "0",
220
- role: "button",
221
- class: "vue-data-ui-refresh-button",
222
- style: S({
223
- top: y.value ? "36px" : "-16px",
224
- pointerEvents: "all !important"
225
- }),
226
- onClick: z
227
- }, [
228
- te(oe, {
229
- name: "refresh",
230
- stroke: t.textColor
231
- }, null, 8, ["stroke"])
232
- ], 4))
233
- ])) : C("", !0)
234
- ]),
235
- i("div", {
236
- class: "double-range-slider",
237
- ref_key: "minimapWrapper",
238
- ref: N,
239
- style: { "z-index": "0" }
240
- }, [
241
- y.value ? (v(), h("div", pe, [
242
- (v(), h("svg", {
243
- xmlns: ae(de),
244
- viewBox: `0 0 ${a.value.width < 0 ? 0 : a.value.width} ${a.value.height < 0 ? 0 : a.value.height}`
245
- }, [
246
- i("defs", null, [
247
- i("linearGradient", {
248
- id: w.value,
249
- x1: "0%",
250
- y1: "0%",
251
- x2: "0%",
252
- y2: "100%"
253
- }, [
254
- i("stop", {
255
- offset: "0%",
256
- "stop-color": `${t.minimapLineColor}50`
257
- }, null, 8, ye),
258
- ge
259
- ], 8, xe)
260
- ]),
261
- i("path", {
262
- d: `M${m.value.fullSet}`,
263
- stroke: `${t.minimapLineColor}`,
264
- fill: "none",
265
- "stroke-width": "1",
266
- "stroke-linecap": "round",
267
- "stroke-linejoin": "round",
268
- style: { opacity: "1" }
269
- }, null, 8, be),
270
- i("rect", {
271
- x: p.value.x,
272
- width: p.value.width < 0 ? 0 : p.value.width,
273
- height: Math.max(a.value.height, 0),
274
- y: 0,
275
- fill: g.value,
276
- rx: t.minimapSelectionRadius,
277
- stroke: "none"
278
- }, null, 8, Se),
279
- i("path", {
280
- d: `M${s.value / 2},${Math.max(a.value.height, 0)} ${m.value.fullSet} L${a.value.width - s.value / 2},${Math.max(a.value.height, 0)}Z`,
281
- fill: `url(#${w.value})`,
282
- stroke: "none",
283
- style: { opacity: "1" }
284
- }, null, 8, ke),
285
- i("rect", {
286
- x: p.value.x,
287
- width: p.value.width < 0 ? 0 : p.value.width,
288
- height: Math.max(a.value.height, 0),
289
- y: 0,
290
- rx: t.minimapSelectionRadius,
291
- fill: g.value
292
- }, null, 8, Ce),
293
- i("rect", {
294
- x: p.value.x,
295
- width: p.value.width < 0 ? 0 : p.value.width,
296
- height: Math.max(a.value.height, 0),
297
- y: 0,
298
- fill: t.minimapSelectedColor,
299
- rx: t.minimapSelectionRadius,
300
- style: S({
301
- opacity: t.minimapSelectedColorOpacity
302
- })
303
- }, null, 12, we),
304
- i("path", {
305
- d: `M${m.value.sliced[0].x},${Math.max(a.value.height, 0)} ${m.value.selectionSet} L${m.value.sliced.at(-1).x},${Math.max(a.value.height, 0)}Z`,
306
- fill: `url(#${w.value})`,
307
- stroke: "none",
308
- style: { opacity: "1" }
309
- }, null, 8, Ne),
310
- i("path", {
311
- d: `M ${m.value.selectionSet}`,
312
- stroke: `${t.minimapLineColor}`,
313
- fill: "transparent",
314
- "stroke-width": "2",
315
- "stroke-linecap": "round",
316
- "stroke-linejoin": "round"
317
- }, null, 8, $e),
318
- i("circle", {
319
- cx: m.value.firstPlot.x,
320
- cy: m.value.firstPlot.y,
321
- "stroke-width": "0.5",
322
- stroke: g.value,
323
- r: "3",
324
- fill: t.minimapLineColor
325
- }, null, 8, Me),
326
- i("circle", {
327
- cx: m.value.lastPlot.x,
328
- cy: m.value.lastPlot.y,
329
- "stroke-width": "0.5",
330
- stroke: g.value,
331
- r: "3",
332
- fill: t.minimapLineColor
333
- }, null, 8, Le),
334
- b.value !== null ? (v(!0), h(F, { key: 0 }, R(I.value, (o, c) => (v(), h("g", null, [
335
- b.value === o && o >= t.valueStart && o < t.valueEnd ? (v(), h("line", {
336
- key: 0,
337
- x1: s.value * c + s.value / 2,
338
- x2: s.value * c + s.value / 2,
339
- y1: 0,
340
- y2: Math.max(a.value.height, 0),
341
- stroke: t.minimapIndicatorColor,
342
- "stroke-linecap": "round",
343
- "stroke-dasharray": "2",
344
- "stroke-width": "1"
345
- }, null, 8, Ie)) : C("", !0)
346
- ]))), 256)) : C("", !0),
347
- (v(!0), h(F, null, R(I.value, (o, c) => (v(), h("rect", {
348
- x: s.value * c,
349
- y: 0,
350
- height: Math.max(a.value.height, 0),
351
- width: s.value < 0 ? 0 : s.value,
352
- fill: "transparent",
353
- style: { "pointer-events": "all !important" },
354
- onMouseenter: ($) => G(o),
355
- onMouseleave: n[0] || (n[0] = ($) => {
356
- b.value = null, x("trapMouse", null);
357
- })
358
- }, null, 40, ze))), 256))
359
- ], 8, fe))
360
- ])) : C("", !0),
361
- Fe,
362
- i("div", {
363
- class: "range-highlight",
364
- style: S(D.value)
365
- }, null, 4),
366
- E(i("input", {
367
- type: "range",
368
- class: "range-left",
369
- min: t.min,
370
- max: t.max,
371
- "onUpdate:modelValue": n[1] || (n[1] = (o) => u.value = o),
372
- onInput: X
373
- }, null, 40, Re), [
374
- [P, u.value]
375
- ]),
376
- i("div", {
377
- class: "thumb-label thumb-label-left",
378
- style: S(Z.value)
379
- }, A(t.labelLeft), 5),
380
- E(i("input", {
381
- type: "range",
382
- class: "range-right",
383
- min: t.min,
384
- max: t.max,
385
- "onUpdate:modelValue": n[2] || (n[2] = (o) => r.value = o),
386
- onInput: j
387
- }, null, 40, Ee), [
388
- [P, r.value]
389
- ]),
390
- i("div", {
391
- class: "thumb-label thumb-label-right",
392
- style: S(q.value)
393
- }, A(t.labelRight), 5)
394
- ], 512)
395
- ]));
396
- }
397
- }, Ue = /* @__PURE__ */ me(Pe, [["__scopeId", "data-v-ed77abe8"]]);
398
- export {
399
- Ue as S
400
- };
@@ -1 +0,0 @@
1
- "use strict";const o=require("vue"),p=require("./index-B5Ugkauv.cjs");function y({tooltip:e,chart:r,clientPosition:t,positionPreference:l="center",defaultOffsetY:a=24,blockShiftY:d=!1}){const n=o.ref(0),s=o.ref(a);if(e&&r){const{width:u,height:c}=e.getBoundingClientRect(),{right:i,left:f,bottom:v}=r.getBoundingClientRect();l==="center"&&(t.x+u/2>i?n.value=-u+(i-t.x):t.x-u/2<f?n.value=-u+(u-(t.x-f)):n.value=-u/2),l==="right"&&(t.x+u>i?n.value=-u+(i-t.x):n.value=0),l==="left"&&(t.x<f+u?n.value=-u+(u-(t.x-f)):n.value=-u),t.y+c>v&&!d&&(s.value=-c-a)}return{top:t.y+s.value,left:t.x+n.value}}function b(e,r,t){o.onMounted(()=>e.addEventListener(r,t)),o.onUnmounted(()=>e.removeEventListener(r,t))}function m(){const e=o.ref(0),r=o.ref(0);return b(window,"mousemove",t=>{e.value=t.clientX,r.value=t.clientY}),{x:e,y:r}}const g=["innerHTML"],x={__name:"Tooltip",props:{backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#000000"},content:String,maxWidth:{type:String,default:"300px"},parent:{type:Object},show:{type:Boolean,default:!1},isCustom:{type:Boolean,default:!1},fontSize:{type:[Number,String],default:14},borderRadius:{type:Number,default:4},borderColor:{type:String,default:"#e1e5e8"},borderWidth:{type:Number,default:1},backgroundOpacity:{type:Number,default:100},position:{type:String,default:"center"},offsetY:{type:Number,default:24},blockShiftY:{type:Boolean,default:!1}},setup(e){const r=e,t=o.ref(null),l=o.ref(m()),a=o.computed(()=>y({tooltip:t.value,chart:r.parent,clientPosition:l.value,positionPreference:r.position,defaultOffsetY:r.offsetY,blockShiftY:r.blockShiftY})),d=o.computed(()=>p.setOpacity(r.backgroundColor,r.backgroundOpacity));return(n,s)=>e.show?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"tooltip",ref:t,class:o.normalizeClass({"vue-data-ui-custom-tooltip":e.isCustom,"vue-data-ui-tooltip":!e.isCustom}),style:o.normalizeStyle(`pointer-events:none;top:${a.value.top}px;left:${a.value.left}px;${e.isCustom?"":`background:${d.value};color:${e.color};max-width:${e.maxWidth};font-size:${e.fontSize}px`};border-radius:${e.borderRadius}px;border:${e.borderWidth}px solid ${e.borderColor};`)},[o.renderSlot(n.$slots,"tooltip-before"),o.renderSlot(n.$slots,"default"),o.createElementVNode("div",{innerHTML:e.content},null,8,g),o.renderSlot(n.$slots,"tooltip-after")],6)):o.createCommentVNode("",!0)}};exports._sfc_main=x;exports.useMouse=m;