vue-data-ui 2.4.2 → 2.4.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 (194) hide show
  1. package/dist/{Arrow-JuK2z9IB.js → Arrow-C7lNL7sY.js} +1 -1
  2. package/dist/{Arrow-DLTRnzcG.cjs → Arrow-Dz6AomGr.cjs} +1 -1
  3. package/dist/{BaseIcon-rRli6Sfv.js → BaseIcon-BbvG1AlW.js} +1 -1
  4. package/dist/{BaseIcon-BGExhz6v.cjs → BaseIcon-uALK38Ov.cjs} +1 -1
  5. package/dist/{DataTable-DJzhv96s.cjs → DataTable-DTzynbND.cjs} +1 -1
  6. package/dist/{DataTable-DTk7C4Pr.js → DataTable-DYqC2pqu.js} +2 -2
  7. package/dist/{Legend-YZ7Hz3o1.cjs → Legend-Cgw4lO2O.cjs} +1 -1
  8. package/dist/{Legend-CYF2gpXG.js → Legend-DNgTCgEK.js} +1 -1
  9. package/dist/{PackageVersion-DVZtsuy4.cjs → PackageVersion-DwI-KhXH.cjs} +1 -1
  10. package/dist/{PackageVersion-CvCRsT5_.js → PackageVersion-VkaUzgmt.js} +1 -1
  11. package/dist/{PenAndPaper-CyXm-yVL.cjs → PenAndPaper-CDFVOo7X.cjs} +1 -1
  12. package/dist/{PenAndPaper-Jb0pLt3G.js → PenAndPaper-DAZYA8Ew.js} +2 -2
  13. package/dist/{Shape-BpPn4eWR.js → Shape-Bwon0l0g.js} +1 -1
  14. package/dist/{Shape-X2F-QV_B.cjs → Shape-D2Dpshg1.cjs} +1 -1
  15. package/dist/{Slicer-CU7dRZR0.js → Slicer-TfpN2Cr4.js} +3 -3
  16. package/dist/{Slicer-CL0tP5a5.cjs → Slicer-uSjfNJjG.cjs} +1 -1
  17. package/dist/{Title-Co5jI5ed.cjs → Title-0Tp4hZ4u.cjs} +1 -1
  18. package/dist/{Title-5VmBwT4i.js → Title-C5pIfQAz.js} +1 -1
  19. package/dist/{Tooltip-Bl6W8Zn7.cjs → Tooltip-9Tp2Yrd1.cjs} +1 -1
  20. package/dist/{Tooltip-Cj4EF7v1.js → Tooltip-Cz24YLfw.js} +1 -1
  21. package/dist/{index-DnVHQ2xI.js → index-Bya_q1J-.js} +4 -1
  22. package/dist/index-eFox7weK.cjs +9 -0
  23. package/dist/style.css +1 -1
  24. package/dist/types/vue-data-ui.d.cts +4 -1
  25. package/dist/types/vue-data-ui.d.ts +4 -1
  26. package/dist/{useNestedProp-Cox0K0Y5.js → useNestedProp-B33hazbH.js} +1 -1
  27. package/dist/{useNestedProp-q7byAAIJ.cjs → useNestedProp-BkgEhTQY.cjs} +1 -1
  28. package/dist/{usePrinter-BCAFeO_J.cjs → usePrinter-CSRFnDBU.cjs} +1 -1
  29. package/dist/{usePrinter-BEeNAqS5.js → usePrinter-CiHd1FwD.js} +1 -1
  30. package/dist/useResponsive-BY8tgM1n.js +188 -0
  31. package/dist/useResponsive-CodiGUOE.cjs +1 -0
  32. package/dist/{vue-data-ui-CRLLZpt0.cjs → vue-data-ui-BTtxyUc3.cjs} +1 -1
  33. package/dist/{vue-data-ui-W7nnqn0v.js → vue-data-ui-Bduq4f2p.js} +58 -58
  34. package/dist/vue-data-ui.cjs +1 -1
  35. package/dist/vue-data-ui.js +1 -1
  36. package/dist/{vue-ui-3d-bar-bD_n6qL_.cjs → vue-ui-3d-bar-B-P7PMHs.cjs} +2 -2
  37. package/dist/{vue-ui-3d-bar-BwBrUabe.js → vue-ui-3d-bar-BUEq_VdY.js} +41 -34
  38. package/dist/{vue-ui-accordion-DspS4q3f.js → vue-ui-accordion-DfUfL2dI.js} +3 -3
  39. package/dist/{vue-ui-accordion-xXgqfR2l.cjs → vue-ui-accordion-TEMpM1hO.cjs} +1 -1
  40. package/dist/{vue-ui-age-pyramid-CxBvm3uM.js → vue-ui-age-pyramid-CH72tAMb.js} +163 -154
  41. package/dist/vue-ui-age-pyramid-DsbZ1qcQ.cjs +1 -0
  42. package/dist/{vue-ui-annotator-BOofWpzv.js → vue-ui-annotator-DPeJ2its.js} +1 -1
  43. package/dist/{vue-ui-annotator-C6T5_7ZV.cjs → vue-ui-annotator-DU_DJKCw.cjs} +1 -1
  44. package/dist/{vue-ui-bullet-DraC-oFu.js → vue-ui-bullet-CtP3MlUT.js} +167 -136
  45. package/dist/vue-ui-bullet-D8ks_rKr.cjs +34 -0
  46. package/dist/vue-ui-candlestick-D1jdr0bv.cjs +2 -0
  47. package/dist/{vue-ui-candlestick-DQZ5eT1f.js → vue-ui-candlestick-DDil13a0.js} +173 -164
  48. package/dist/{vue-ui-carousel-table-PdLjpH1p.js → vue-ui-carousel-table-BaeIxyc0.js} +76 -69
  49. package/dist/vue-ui-carousel-table-C7SJIOG-.cjs +1 -0
  50. package/dist/{vue-ui-chestnut-ByI_O5hB.js → vue-ui-chestnut-BczSJF6S.js} +96 -89
  51. package/dist/vue-ui-chestnut-ih5r0Bj9.cjs +6 -0
  52. package/dist/{vue-ui-cursor-BvadpA2m.cjs → vue-ui-cursor-C2Pj_CI_.cjs} +1 -1
  53. package/dist/{vue-ui-cursor-BM74l93B.js → vue-ui-cursor-Dg_Dmww-.js} +2 -2
  54. package/dist/{vue-ui-dashboard-CoANBhAM.js → vue-ui-dashboard-Bul9dqx1.js} +2 -2
  55. package/dist/{vue-ui-dashboard-OP51Gs8I.cjs → vue-ui-dashboard-Cg020NiT.cjs} +1 -1
  56. package/dist/{vue-ui-digits-DioaBnkB.js → vue-ui-digits-B8iAa4YZ.js} +2 -2
  57. package/dist/{vue-ui-digits-C7jJJg9k.cjs → vue-ui-digits-Ctgd84JR.cjs} +1 -1
  58. package/dist/vue-ui-donut-D7KT9EAp.cjs +1 -0
  59. package/dist/{vue-ui-donut-ldqSm_JV.js → vue-ui-donut-DUcp-fat.js} +244 -235
  60. package/dist/vue-ui-donut-evolution-CHtJ8iOK.cjs +1 -0
  61. package/dist/{vue-ui-donut-evolution-DAb1xzNd.js → vue-ui-donut-evolution-C_YMbTwq.js} +125 -118
  62. package/dist/vue-ui-dumbbell-B0dikuqO.cjs +9 -0
  63. package/dist/{vue-ui-dumbbell-Dg7PkiKJ.js → vue-ui-dumbbell-Buwngz_V.js} +192 -183
  64. package/dist/{vue-ui-flow-DKT7ZEnr.js → vue-ui-flow-Bz3c0K5P.js} +78 -71
  65. package/dist/vue-ui-flow-D6rc8J-8.cjs +1 -0
  66. package/dist/{vue-ui-galaxy-qAA9be3S.js → vue-ui-galaxy-Cjh0XGTX.js} +49 -42
  67. package/dist/vue-ui-galaxy-CmTt0vBf.cjs +1 -0
  68. package/dist/{vue-ui-gauge-D8yVTIgP.js → vue-ui-gauge-B1UvGkQa.js} +160 -151
  69. package/dist/vue-ui-gauge-B_TKuyM7.cjs +1 -0
  70. package/dist/{vue-ui-gizmo-W6bTkg59.cjs → vue-ui-gizmo-DFW6HnHp.cjs} +1 -1
  71. package/dist/{vue-ui-gizmo-DC0uUwI3.js → vue-ui-gizmo-DUQ4t-At.js} +3 -3
  72. package/dist/{vue-ui-heatmap-u1raIzBQ.js → vue-ui-heatmap-C-poazUw.js} +110 -103
  73. package/dist/vue-ui-heatmap-C2HlnqzO.cjs +1 -0
  74. package/dist/{vue-ui-kpi-C-iTxMD2.js → vue-ui-kpi-DXe-vxAk.js} +3 -3
  75. package/dist/{vue-ui-kpi-DY_2WF7U.cjs → vue-ui-kpi-Z4Oi4raz.cjs} +1 -1
  76. package/dist/{vue-ui-mini-loader-C7x7S0hi.js → vue-ui-mini-loader-BVtHTqxS.js} +2 -2
  77. package/dist/{vue-ui-mini-loader-Bfq2MNWu.cjs → vue-ui-mini-loader-MMvpm9pz.cjs} +1 -1
  78. package/dist/{vue-ui-molecule-BFnOIxxs.js → vue-ui-molecule-BaJpDZND.js} +78 -71
  79. package/dist/vue-ui-molecule-BiYIcOKN.cjs +1 -0
  80. package/dist/{vue-ui-mood-radar-CR1v5v2x.js → vue-ui-mood-radar-BUNDwsEI.js} +132 -125
  81. package/dist/vue-ui-mood-radar-C6jMyFkb.cjs +1 -0
  82. package/dist/vue-ui-nested-donuts-DKO2dFKo.cjs +17 -0
  83. package/dist/{vue-ui-nested-donuts-DEiloQzq.js → vue-ui-nested-donuts-mDy2hXa6.js} +198 -189
  84. package/dist/{vue-ui-onion-LsEhBe4x.js → vue-ui-onion-DwFG3HAI.js} +248 -239
  85. package/dist/vue-ui-onion-GWNoZRhw.cjs +5 -0
  86. package/dist/vue-ui-parallel-coordinate-plot-DODn4Ohf.cjs +8 -0
  87. package/dist/{vue-ui-parallel-coordinate-plot-CTlIjJqG.js → vue-ui-parallel-coordinate-plot-ImET_zeo.js} +233 -224
  88. package/dist/{vue-ui-quadrant-DKVVFufb.js → vue-ui-quadrant-BeveRihK.js} +188 -179
  89. package/dist/vue-ui-quadrant-yuFAxV-5.cjs +1 -0
  90. package/dist/{vue-ui-quick-chart-8vJikiGH.js → vue-ui-quick-chart-DAhllTfa.js} +343 -334
  91. package/dist/{vue-ui-quick-chart-gG5Ar8-i.cjs → vue-ui-quick-chart-DgFDBzjS.cjs} +2 -2
  92. package/dist/vue-ui-radar-BJH5SE6-.cjs +1 -0
  93. package/dist/{vue-ui-radar-20QhOUer.js → vue-ui-radar-BllatzRa.js} +174 -165
  94. package/dist/{vue-ui-rating-Bbzm5nUK.cjs → vue-ui-rating-BoZo7caL.cjs} +1 -1
  95. package/dist/{vue-ui-rating-DRWJsve1.js → vue-ui-rating-D1ykV4xO.js} +2 -2
  96. package/dist/vue-ui-relation-circle-CKmjOle7.cjs +1 -0
  97. package/dist/{vue-ui-relation-circle-I45_Sk5l.js → vue-ui-relation-circle-xv2l5Be9.js} +142 -133
  98. package/dist/{vue-ui-rings-DG8GCi3y.js → vue-ui-rings-B-ZcX6y1.js} +165 -156
  99. package/dist/vue-ui-rings-DjH3CK23.cjs +2 -0
  100. package/dist/{vue-ui-scatter-Hqu5-F2H.js → vue-ui-scatter-DG43ck1g.js} +269 -260
  101. package/dist/vue-ui-scatter-SBCXAl7q.cjs +1 -0
  102. package/dist/{vue-ui-screenshot-D8nxd5RV.cjs → vue-ui-screenshot-C1JBP_N0.cjs} +1 -1
  103. package/dist/{vue-ui-screenshot-cjiqbtLK.js → vue-ui-screenshot-p3ca8cAl.js} +1 -1
  104. package/dist/{vue-ui-skeleton-aZmkNzAe.js → vue-ui-skeleton-BYssP0K4.js} +419 -379
  105. package/dist/vue-ui-skeleton-BqKzuhkB.cjs +41 -0
  106. package/dist/{vue-ui-smiley-B1TA19Hv.cjs → vue-ui-smiley-BXKVpHl2.cjs} +1 -1
  107. package/dist/{vue-ui-smiley-ChNvxygm.js → vue-ui-smiley-D7dDCdpq.js} +2 -2
  108. package/dist/vue-ui-spark-trend-9V60hM3Z.cjs +1 -0
  109. package/dist/{vue-ui-spark-trend-CQxELQcf.js → vue-ui-spark-trend-GWFrO_0z.js} +86 -79
  110. package/dist/vue-ui-sparkbar-Bgn6AY0q.cjs +1 -0
  111. package/dist/{vue-ui-sparkbar-0ixbKZzf.js → vue-ui-sparkbar-CwqlyAyv.js} +90 -83
  112. package/dist/vue-ui-sparkgauge-Dqntz2Zv.cjs +1 -0
  113. package/dist/{vue-ui-sparkgauge-pdYb7OwH.js → vue-ui-sparkgauge-F2XbiXyA.js} +57 -50
  114. package/dist/{vue-ui-sparkhistogram-N69h2q0U.js → vue-ui-sparkhistogram-DRIKK6Ym.js} +74 -67
  115. package/dist/vue-ui-sparkhistogram-DnY4-Sdn.cjs +1 -0
  116. package/dist/vue-ui-sparkline-CAEs-gtK.cjs +1 -0
  117. package/dist/{vue-ui-sparkline-2BKYZMOb.js → vue-ui-sparkline-Cxtzdlhi.js} +134 -125
  118. package/dist/{vue-ui-sparkstackbar-sh03cuOU.js → vue-ui-sparkstackbar-0A1klq9s.js} +84 -77
  119. package/dist/vue-ui-sparkstackbar-D37ms1rx.cjs +1 -0
  120. package/dist/{vue-ui-stackbar-B1si-1RM.js → vue-ui-stackbar-ByOuJSdM.js} +205 -196
  121. package/dist/{vue-ui-stackbar-Dy_saeSe.cjs → vue-ui-stackbar-wun4S3C0.cjs} +2 -2
  122. package/dist/{vue-ui-strip-plot-BYn-QrTQ.js → vue-ui-strip-plot-CMD0MSqY.js} +218 -209
  123. package/dist/vue-ui-strip-plot-IQrypGvz.cjs +1 -0
  124. package/dist/{vue-ui-table-DQORPCDJ.js → vue-ui-table-B75DJ39t.js} +1 -1
  125. package/dist/{vue-ui-table-Ce4waJaj.cjs → vue-ui-table-aj0XZ7T5.cjs} +1 -1
  126. package/dist/{vue-ui-table-heatmap-Csp7Tx8N.js → vue-ui-table-heatmap-BO2ugWqD.js} +55 -48
  127. package/dist/vue-ui-table-heatmap-Ce93TyBF.cjs +1 -0
  128. package/dist/{vue-ui-table-sparkline-DdwVrfUj.js → vue-ui-table-sparkline-CbjfAaj2.js} +88 -81
  129. package/dist/vue-ui-table-sparkline-D6KJjDnU.cjs +1 -0
  130. package/dist/{vue-ui-thermometer-I6ZnlfAv.js → vue-ui-thermometer-Pq4PvSIP.js} +67 -60
  131. package/dist/vue-ui-thermometer-swmi4FmH.cjs +1 -0
  132. package/dist/{vue-ui-timer-COOXcn14.cjs → vue-ui-timer-B6IB6yS6.cjs} +1 -1
  133. package/dist/{vue-ui-timer-pi1SazTU.js → vue-ui-timer-Bk3BvB-B.js} +6 -6
  134. package/dist/{vue-ui-tiremarks-vdPQYiDp.js → vue-ui-tiremarks-CU9HJIqf.js} +84 -77
  135. package/dist/vue-ui-tiremarks-Cn79uQH2.cjs +1 -0
  136. package/dist/vue-ui-treemap-BEMuKV7x.cjs +1 -0
  137. package/dist/{vue-ui-treemap-3FNUlKxL.js → vue-ui-treemap-DY-lRAhC.js} +211 -202
  138. package/dist/vue-ui-vertical-bar-B1e2RxTv.cjs +4 -0
  139. package/dist/{vue-ui-vertical-bar-DwxpB46q.js → vue-ui-vertical-bar-CtnIKsM1.js} +359 -350
  140. package/dist/vue-ui-waffle-BqP7Okgu.cjs +1 -0
  141. package/dist/{vue-ui-waffle-XecHJIc-.js → vue-ui-waffle-reOsx-gJ.js} +177 -168
  142. package/dist/vue-ui-wheel-BuWUGnkC.cjs +1 -0
  143. package/dist/{vue-ui-wheel-Bbih5sSL.js → vue-ui-wheel-kYxny3vn.js} +95 -86
  144. package/dist/{vue-ui-word-cloud-DnhXUn5x.js → vue-ui-word-cloud-DbMqrHAf.js} +192 -183
  145. package/dist/vue-ui-word-cloud-DwLY4QdB.cjs +1 -0
  146. package/dist/vue-ui-xy-CGWzriYn.cjs +3 -0
  147. package/dist/{vue-ui-xy-canvas-C8c2X5fk.js → vue-ui-xy-canvas-B0HTR7OV.js} +255 -246
  148. package/dist/vue-ui-xy-canvas-CgJd5FiT.cjs +9 -0
  149. package/dist/{vue-ui-xy-CqlRuFMc.js → vue-ui-xy-rbACig0h.js} +131 -122
  150. package/package.json +1 -1
  151. package/dist/index-FfZRtJ6A.cjs +0 -9
  152. package/dist/useResponsive-B3TrDDIG.cjs +0 -1
  153. package/dist/useResponsive-NZB-WLRF.js +0 -187
  154. package/dist/vue-ui-age-pyramid-BZcAwcVQ.cjs +0 -1
  155. package/dist/vue-ui-bullet-ChaEgXvR.cjs +0 -23
  156. package/dist/vue-ui-candlestick--hPCfMFH.cjs +0 -2
  157. package/dist/vue-ui-carousel-table-DpRQklDZ.cjs +0 -1
  158. package/dist/vue-ui-chestnut-ae6x87wl.cjs +0 -6
  159. package/dist/vue-ui-donut-CplNylps.cjs +0 -1
  160. package/dist/vue-ui-donut-evolution-CQpr-6IS.cjs +0 -1
  161. package/dist/vue-ui-dumbbell-_ijaYr8W.cjs +0 -9
  162. package/dist/vue-ui-flow-BPt35d5K.cjs +0 -1
  163. package/dist/vue-ui-galaxy-e06PkTmp.cjs +0 -1
  164. package/dist/vue-ui-gauge-DiZVIU0D.cjs +0 -1
  165. package/dist/vue-ui-heatmap-CbZcv_2I.cjs +0 -1
  166. package/dist/vue-ui-molecule-CbKMLrDT.cjs +0 -1
  167. package/dist/vue-ui-mood-radar-6LmFXuiw.cjs +0 -1
  168. package/dist/vue-ui-nested-donuts-DS0fjiLi.cjs +0 -17
  169. package/dist/vue-ui-onion-CLvvu4Ku.cjs +0 -5
  170. package/dist/vue-ui-parallel-coordinate-plot-BWg8OFqH.cjs +0 -8
  171. package/dist/vue-ui-quadrant-OM5J1mG3.cjs +0 -1
  172. package/dist/vue-ui-radar-CAaHjDO7.cjs +0 -1
  173. package/dist/vue-ui-relation-circle-BoGAFXuS.cjs +0 -1
  174. package/dist/vue-ui-rings-B9WQ7S5m.cjs +0 -2
  175. package/dist/vue-ui-scatter-BZfg1YIN.cjs +0 -1
  176. package/dist/vue-ui-skeleton-Djv08J67.cjs +0 -41
  177. package/dist/vue-ui-spark-trend-BqrPr63O.cjs +0 -1
  178. package/dist/vue-ui-sparkbar-CrTEPTU5.cjs +0 -1
  179. package/dist/vue-ui-sparkgauge-BYxpe_WV.cjs +0 -1
  180. package/dist/vue-ui-sparkhistogram-D21XDUH2.cjs +0 -1
  181. package/dist/vue-ui-sparkline-Cf4m-Fxo.cjs +0 -1
  182. package/dist/vue-ui-sparkstackbar-dAS8XoJs.cjs +0 -1
  183. package/dist/vue-ui-strip-plot-D53LABpZ.cjs +0 -1
  184. package/dist/vue-ui-table-heatmap-EqHt-O7Y.cjs +0 -1
  185. package/dist/vue-ui-table-sparkline-DONmVOMh.cjs +0 -1
  186. package/dist/vue-ui-thermometer-hQBkMa7u.cjs +0 -1
  187. package/dist/vue-ui-tiremarks-hdNqoGyd.cjs +0 -1
  188. package/dist/vue-ui-treemap-Cv0TSFQa.cjs +0 -1
  189. package/dist/vue-ui-vertical-bar-C--Ma0Dw.cjs +0 -4
  190. package/dist/vue-ui-waffle-CKM0QyJN.cjs +0 -1
  191. package/dist/vue-ui-wheel-C0dJrzOJ.cjs +0 -1
  192. package/dist/vue-ui-word-cloud-Cfd2wxsT.cjs +0 -1
  193. package/dist/vue-ui-xy-BDpqVzAq.cjs +0 -3
  194. package/dist/vue-ui-xy-canvas-Cansjd3L.cjs +0 -9
@@ -1,8 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-FfZRtJ6A.cjs"),oe=require("./useResponsive-B3TrDDIG.cjs"),ge=require("./Title-Co5jI5ed.cjs"),be=require("./Legend-YZ7Hz3o1.cjs"),ke=require("./Tooltip-Bl6W8Zn7.cjs"),xe=require("./Shape-X2F-QV_B.cjs"),ne=require("./usePrinter-BCAFeO_J.cjs"),Ce=require("./DataTable-DJzhv96s.cjs"),we=require("./vue-ui-accordion-xXgqfR2l.cjs"),Be=require("./vue-ui-skeleton-Djv08J67.cjs"),se=require("./useNestedProp-q7byAAIJ.cjs"),$e=require("./PackageVersion-DVZtsuy4.cjs"),Se=require("./PenAndPaper-CyXm-yVL.cjs"),ze=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ae=["id"],Ne=["xmlns","viewBox"],Pe={style:{"pointer-events":"none"}},_e=["x1","x2","y1","y2","stroke","stroke-width"],Te=["x","y","fill","font-size","font-weight"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],Me=["x","y","fill","font-size","font-weight"],Le={key:0},Ee=["x","y","font-size","fill"],Ie=["width","x","y"],Ve={style:{width:"100%"}},Oe=["x","y","fill","font-weight","font-size","onMouseenter"],De=["d","stroke","stroke-width","onMouseenter"],qe={key:4,class:"vue-data-ui-watermark"},Re=["onClick"],Ue=["innerHTML"],We={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(re,{expose:ie,emit:E}){const b=re,{vue_ui_parallel_coordinate_plot:ue}=i.useConfig(),x=e.computed({get(){return!!b.dataset&&b.dataset.length},set(a){return a}}),I=e.ref(0),C=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(0),q=e.ref(0),R=e.ref(0),N=e.ref(i.createUid()),B=e.ref(!1);function ce(a){B.value=a,I.value+=1}const t=e.computed({get:()=>U(),set:a=>a});function U(){const a=se.useNestedProp({userConfig:b.config,defaultConfig:ue});return a.theme?{...se.useNestedProp({userConfig:i.themes.vue_ui_parallel_coordinate_plot[a.theme]||b.config,defaultConfig:a}),customPalette:i.themePalettes[a.theme]||i.palette}:a}e.watch(()=>b.config,a=>{t.value=U(),W(),D.value+=1,R.value+=1,q.value+=1},{deep:!0});const S=e.ref(null);e.onMounted(()=>{W()});function W(){if(i.objectIsEmpty(b.dataset)?i.error({componentName:"VueUiParallelCoordinatePlot",type:"dataset"}):b.dataset.forEach((a,o)=>{i.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","series"]}).forEach(l=>{x.value=!1,i.error({componentName:"VueUiParallelCoordinatePlot",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=oe.throttle(()=>{const{width:o,height:l}=oe.useResponsive({chart:C.value,title:t.value.style.chart.title.text?V.value:null,legend:t.value.style.chart.legend.show?O.value:null});c.value.width=o,c.value.height=l,c.value.plotSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),c.value.ticksFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),c.value.datapointFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),c.value.axisNameFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})});S.value=new ResizeObserver(a),S.value.observe(C.value.parentNode)}}e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});const{isPrinting:j,isImaging:H,generatePdf:G,generateImage:Y}=ne.usePrinter({elementId:`pcp_${N.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"}),c=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width,plotSize:t.value.style.chart.plots.radius,ticksFontSize:t.value.style.chart.yAxis.labels.ticks.fontSize,datapointFontSize:t.value.style.chart.yAxis.labels.datapoints.fontSize,axisNameFontSize:t.value.style.chart.yAxis.labels.axisNamesFontSize}),d=e.computed(()=>{const{top:a,right:o,bottom:l,left:n}=t.value.style.chart.padding,r=c.value.height,s=c.value.width;return{chartHeight:r,chartWidth:s,height:r-a-l,width:s-n-o,top:a,left:n,right:s-o,bottom:r-l}}),de=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),m=e.ref({dataLabels:{show:t.value.style.chart.yAxis.labels.datapoints.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),f=e.ref([]);function X(a){f.value.includes(a)?f.value=f.value.filter(o=>o!==a):f.value.push(a)}const k=e.computed(()=>b.dataset.map((a,o)=>{const l=i.convertColorToHex(a.color)||de.value[o]||i.palette[o]||i.palette[o%i.palette.length];return{...a,series:a.series.map(n=>({...n,id:i.createUid(),color:l})),seriesIndex:o,color:l,id:i.createUid(),shape:a.shape||"circle"}})),ve=e.computed(()=>k.value.map(a=>({...a,opacity:f.value.includes(a.id)?.5:1,segregate:()=>X(a.id),isSegregated:f.value.includes(a.id)}))),pe=e.computed(()=>({cy:"pcp-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":""})),J=e.computed(()=>Math.max(...k.value.filter(a=>!f.value.includes(a.id)).map(a=>Math.max(...a.series.flatMap(o=>o.values.length))))),y=e.computed(()=>d.value.width/J.value),P=e.computed(()=>k.value.filter(a=>!f.value.includes(a.id))),h=e.computed(()=>{let a=[];for(let o=0;o<J.value;o+=1){const l=Math.min(...P.value.flatMap(v=>v.series.map(A=>A.values[o]||0)||0)),n=Math.max(...P.value.flatMap(v=>v.series.map(A=>A.values[o]||0)||0)),r=n===l?l/4:l,s=n===l?n*2:n,u=i.calculateNiceScale(r,s,t.value.style.chart.yAxis.scaleTicks),g=u.ticks.map((v,A)=>{const ye=u.min<0?v+Math.abs(u.min):v-Math.abs(u.min),fe=u.min<0?u.max+Math.abs(u.min):u.max-Math.abs(u.min);return{y:d.value.bottom-d.value.height*(ye/fe),x:d.value.left+y.value*o+y.value/2,value:v}});a.push({scale:u,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return a}),_=e.computed(()=>P.value.map((a,o)=>({...a,series:a.series.map((l,n)=>({...l,datapoints:l.values.map((r,s)=>{const u=h.value[s].scale.min<0?(r||0)+Math.abs(h.value[s].scale.min):(r||0)-Math.abs(h.value[s].scale.min),g=h.value[s].scale.min<0?h.value[s].scale.max+Math.abs(h.value[s].scale.min):h.value[s].scale.max-Math.abs(h.value[s].scale.min);return{name:l.name,seriesName:a.name,axisIndex:s,datapointIndex:n,seriesIndex:o,value:r||0,x:d.value.left+y.value*s+y.value/2,y:d.value.bottom-d.value.height*(u/g),comment:l.comments&&l.comments[s]||""}})}))})).map(a=>({...a,series:a.series.map(o=>{const l=i.createStraightPath(o.datapoints),n=i.createSmoothPath(o.datapoints),r=i.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${n}`:`M ${l}`);return{...o,smoothPath:n,straightPath:l,pathLength:r}})})));function K({value:a,index:o,datapoint:l}){return i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[o]||null,a,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[o]||"",v:a,s:t.value.style.chart.yAxis.labels.suffixes[o]||"",r:t.value.style.chart.yAxis.labels.roundings[o]||0}),{datapoint:l,seriesIndex:o})}const p=e.ref(null),T=e.ref(null),$=e.ref(!1),F=e.ref("");function M({shape:a,serieName:o,serie:l,relativeIndex:n,seriesIndex:r}){T.value={serie:l,relativeIndex:n,seriesIndex:r,series:k.value,scales:h.value},$.value=!0,p.value=l.id;let s="";const u=t.value.style.chart.tooltip.customFormat;i.isFunction(u)&&i.functionReturnsString(()=>u({serie:l,seriesIndex:l.seriesIndex,series:k.value,config:t.value,scales:h.value}))?F.value=u({serie:l,seriesIndex:l.seriesIndex,series:k.value,config:t.value,scales:h.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o?o+" - ":""}${l.name}</div>`,h.value.map(g=>g.name).forEach((g,v)=>{s+=`
2
- <div class="vue-ui-tooltip-item" style="text-align:left">
3
- <span>${g}: </span>
4
- <span>
5
- ${i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[v]||null,l.datapoints[v].value,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[v]||"",v:l.datapoints[v].value,s:t.value.style.chart.yAxis.labels.suffixes[v]||"",r:t.value.style.chart.yAxis.labels.roundings[v]||""}),{datapoint:l.datapoints[v],seriesIndex:v})}
6
- </span>
7
- </div>
8
- `,t.value.style.chart.comments.showInTooltip&&l.datapoints[v].comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${l.color}">${l.datapoints[v].comment}</div>`)}),F.value=`<div>${s}</div>`)}function he(){return k.value}const w=e.computed(()=>{const a=[t.value.table.columnNames.series].concat([t.value.table.columnNames.item]).concat(h.value.map(r=>r.name)),o=_.value.flatMap((r,s)=>r.series.map(u=>[r.name].concat([u.name]).concat(u.values))),l={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},n=[t.value.table.columnNames.series].concat([t.value.table.columnNames.item]).concat(h.value.map(r=>r.name));return{body:o,head:a,config:l,colNames:n}}),Q=e.computed(()=>_.value.length===0?{head:[],body:[],config:{},columnNames:[]}:{head:w.value.head,body:w.value.body});function Z(){const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=Q.value.head,l=Q.value.body,n=a.concat([o]).concat(l),r=i.createCsvContent(n);i.downloadCsv({csvContent:r,title:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"})}function me(a){E("selectDatapoint",a)}function ee(a){E("selectLegend",{...a,isSegregated:!a.isSegregated,opacity:a.isSegregated?1:.5})}function te(){m.value.showTable=!m.value.showTable}function ae(){m.value.dataLabels.show=!m.value.dataLabels.show}function le(){m.value.showTooltip=!m.value.showTooltip}const z=e.ref(!1);function L(){z.value=!z.value}return ie({getData:he,generateCsv:Z,generatePdf:G,generateImage:Y,toggleTable:te,toggleLabels:ae,toggleTooltip:le,toggleAnnotator:L}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"pcpChart",ref:C,class:e.normalizeClass(`vue-ui-pcp ${B.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`pcp_${N.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Se.PenAndPaper,{key:0,parent:C.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:L},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:V,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ge._sfc_main,{key:`title_${D.value}`,config:{title:{cy:"pcp-div-title",...t.value.style.chart.title},subtitle:{cy:"pcp-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(ne.UserOptions,{ref:"details",key:`user_options_${I.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(j),isImaging:e.unref(H),uid:N.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,isTooltip:m.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,onToggleFullscreen:ce,onGeneratePdf:e.unref(G),onGenerateCsv:Z,onGenerateImage:e.unref(Y),onToggleTable:te,onToggleLabels:ae,onToggleTooltip:le,onToggleAnnotator:L},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`0 0 ${d.value.chartWidth<=0?10:d.value.chartWidth} ${d.value.chartHeight<=0?10:d.value.chartHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode($e._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",Pe,[e.createElementVNode("line",{x1:d.value.left+y.value*n+y.value/2,x2:d.value.left+y.value*n+y.value/2,y1:d.value.top,y2:d.value.bottom,stroke:t.value.style.chart.yAxis.stroke,"stroke-width":t.value.style.chart.yAxis.strokeWidth},null,8,_e),e.createElementVNode("text",{x:d.value.left+y.value*n+y.value/2,y:d.value.top-24,fill:t.value.style.chart.yAxis.labels.axisNamesColor,"font-size":c.value.axisNameFontSize,"font-weight":t.value.style.chart.yAxis.labels.axisNamesBold?"bold":"","text-anchor":"middle"},e.toDisplayString(l.name),9,Te),t.value.style.chart.yAxis.labels.ticks.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.ticks,r=>(e.openBlock(),e.createElementBlock("line",{x1:r.x,x2:r.x-10,y1:r.y,y2:r.y,stroke:t.value.style.chart.yAxis.stroke,"stroke-width":t.value.style.chart.yAxis.strokeWidth,style:e.normalizeStyle(`opacity:${p.value&&!m.value.showTooltip?.2:1}`)},null,12,Fe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.ticks,r=>(e.openBlock(),e.createElementBlock("text",{x:r.x-12+t.value.style.chart.yAxis.labels.ticks.offsetX,y:r.y+t.value.style.chart.yAxis.labels.ticks.offsetY+c.value.ticksFontSize/3,fill:t.value.style.chart.yAxis.labels.ticks.color,"text-anchor":"end","font-size":c.value.ticksFontSize,"font-weight":t.value.style.chart.yAxis.labels.ticks.bold?"bold":"normal",style:e.normalizeStyle(`opacity:${p.value&&!m.value.showTooltip?.2:1}`)},e.toDisplayString(K({value:r.value,index:n,datapoint:r})),13,Me))),256))],64)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,l=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.series,(n,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.plots.show?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.datapoints,s=>(e.openBlock(),e.createBlock(xe._sfc_main,{plot:{x:s.x,y:s.y},color:l.color,shape:l.shape,radius:l.shape==="triangle"?c.value.plotSize*1.2:c.value.plotSize,stroke:t.value.style.chart.backgroundColor,strokeWidth:.5,onMouseenter:u=>M({shape:l.shape,serieName:l.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[0]||(o[0]=u=>{p.value=null,$.value=!1}),style:e.normalizeStyle(`opacity:${p.value?p.value===n.id?t.value.style.chart.plots.opacity:.2:t.value.style.chart.plots.opacity}`),onClick:()=>me(s)},null,8,["plot","color","shape","radius","stroke","onMouseenter","style","onClick"]))),256)),m.value.showTooltip?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[p.value&&p.value===n.id&&n.datapoints.length?(e.openBlock(),e.createElementBlock("text",{key:0,x:n.datapoints[0].x-c.value.ticksFontSize,y:n.datapoints[0].y+c.value.ticksFontSize/3,"text-anchor":"end","font-size":c.value.ticksFontSize,fill:l.color,"font-weight":"bold"},e.toDisplayString(n.name),9,Ee)):e.createCommentVNode("",!0)],64)),t.value.style.chart.comments.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.datapoints,s=>(e.openBlock(),e.createElementBlock("g",null,[s.comment?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,style:{overflow:"visible"},height:"12",width:t.value.style.chart.comments.width,x:s.x-t.value.style.chart.comments.width/2+t.value.style.chart.comments.offsetX,y:s.y+t.value.style.chart.comments.offsetY+6},[e.createElementVNode("div",Ve,[e.renderSlot(a.$slots,"plot-comment",{plot:{...s,color:l.color}},void 0,!0)])],8,Ie)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),m.value.dataLabels.show||p.value&&p.value===n.id?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.datapoints,(s,u)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+12+t.value.style.chart.yAxis.labels.datapoints.offsetX,y:s.y+t.value.style.chart.yAxis.labels.datapoints.offsetY+c.value.datapointFontSize/3,fill:t.value.style.chart.yAxis.labels.datapoints.useSerieColor?l.color:t.value.style.chart.yAxis.labels.datapoints.color,"text-anchor":"start","font-weight":t.value.style.chart.yAxis.labels.datapoints.bold?"bold":"normal",class:e.normalizeClass({"vue-ui-pcp-animated":!1,"vue-ui-pcp-transition":!0}),"font-size":c.value.datapointFontSize,onMouseenter:g=>M({shape:l.shape,serieName:l.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[1]||(o[1]=g=>{p.value=null,$.value=!1}),style:e.normalizeStyle(`opacity:${p.value?p.value===n.id?1:.2:1}`)},e.toDisplayString(K({value:s.value,index:u,datapoint:s})),45,Oe))),256)):e.createCommentVNode("",!0),e.createElementVNode("path",{d:`M${t.value.style.chart.lines.smooth?n.smoothPath:n.straightPath}`,stroke:l.color,"stroke-width":t.value.style.chart.lines.strokeWidth,fill:"none",class:e.normalizeClass({"vue-ui-pcp-animated vue-data-ui-line-animated":t.value.useCssAnimation,"vue-ui-pcp-transition":!0}),onMouseenter:s=>M({shape:l.shape,serieName:l.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[2]||(o[2]=s=>{p.value=null,$.value=!1}),style:e.normalizeStyle(`opacity:${p.value?p.value===n.id?t.value.style.chart.lines.opacity:.2:t.value.style.chart.lines.opacity}; stroke-dasharray:${n.pathLength}; stroke-dashoffset: ${t.value.useCssAnimation?n.pathLength:0}`)},null,46,De)]))),256))]))),256)),e.renderSlot(a.$slots,"svg",{svg:d.value},void 0,!0)],14,Ne)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",qe,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(j)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Be.default,{key:5,config:{type:"parallelCoordinatePlot",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[t.value.style.chart.legend.show&&x.value?(e.openBlock(),e.createBlock(be.Legend,{key:`legend_${q.value}`,legendSet:ve.value,config:pe.value,onClickMarker:o[3]||(o[3]=({legend:l})=>{X(l.id),ee(l)})},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{onClick:r=>{l.segregate(),ee(l)},style:e.normalizeStyle(`opacity:${f.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name),13,Re)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),e.createVNode(ke._sfc_main,{show:m.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,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:F.value,isCustom:e.unref(i.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),x.value?(e.openBlock(),e.createBlock(we.default,{key:6,hideDetails:"",config:{open:m.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:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ce.DataTable,{key:`table_${R.value}`,colNames:w.value.colNames,head:w.value.head,body:w.value.body,config:w.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]=l=>m.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l},null,8,Ue)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ae))}},je=ze._export_sfc(We,[["__scopeId","data-v-5f0cc747"]]);exports.default=je;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-FfZRtJ6A.cjs"),be=require("./useResponsive-B3TrDDIG.cjs"),_e=require("./Title-Co5jI5ed.cjs"),pe=require("./usePrinter-BCAFeO_J.cjs"),ze=require("./Tooltip-Bl6W8Zn7.cjs"),fe=require("./Shape-X2F-QV_B.cjs"),Ne=require("./Legend-YZ7Hz3o1.cjs"),Ve=require("./DataTable-DJzhv96s.cjs"),Ee=require("./vue-ui-skeleton-Djv08J67.cjs"),Te=require("./vue-ui-accordion-xXgqfR2l.cjs"),me=require("./useNestedProp-q7byAAIJ.cjs"),We=require("./PackageVersion-DVZtsuy4.cjs"),Xe=require("./PenAndPaper-CyXm-yVL.cjs"),Ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ae=["id"],Pe=["xmlns","viewBox","id"],Me=["id"],Fe=["stop-color"],De=["stop-color"],Oe={key:0},Re=["fill","x","y","height","width","stroke-width","stroke","rx"],He=["x1","y1","x2","y2","stroke","stroke-width"],Ie=["x1","y1","x2","y2","stroke","stroke-width"],Ue={key:1},Ge=["points","fill"],Qe=["points","fill"],Je=["points","fill"],je=["points","fill"],Ze={key:2},Ke=["y","fill","font-size"],et=["x","y","fill","font-size"],tt=["x","y","fill","font-size"],lt=["y","fill","font-size"],at={key:3},ot=["x","y","font-size","fill"],ut=["x","y","font-size","fill"],rt=["x","y","font-size","fill"],nt=["id","font-size","transform","fill"],st=["id","font-size","transform","fill"],it=["id","font-size","transform","fill"],ct={key:4},vt=["fill","points"],dt=["x","y","width","height"],ht=["x","y","width","height"],yt=["x","y","width","height"],bt=["x","y","width","height"],pt={key:0},ft=["x","y","font-size","fill"],mt={key:0},gt=["x","y","onMouseover","onClick"],xt={key:7,class:"vue-ui-dna"},kt=["points","fill"],$t=["points","fill"],Lt=["points","fill"],Ct=["points","fill"],wt={key:8},St=["x","y","font-size","fill","font-weight"],Bt={key:9},qt=["x","y","fill"],_t=["x","y","fill"],zt=["x","y","fill"],Nt=["x","y","fill"],Vt=["stroke","d"],Et=["stroke","d"],Tt={key:4,class:"vue-data-ui-watermark"},Wt=["onClick"],Xt={key:0,height:"14",width:"14",viewBox:"0 0 20 20"},Yt=["innerHTML"],At={__name:"vue-ui-quadrant",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectPlot","selectSide","selectLegend"],setup(ge,{expose:xe,emit:P}){const x=ge,{vue_ui_quadrant:ke}=s.useConfig(),V=e.computed(()=>!!x.dataset&&x.dataset.length),g=e.ref(s.createUid()),$e=e.ref(null),E=e.ref(!1),M=e.ref(""),R=e.ref(0),h=e.ref(!1),w=e.ref(null),H=e.ref(null),I=e.ref(null),U=e.ref(0),G=e.ref(0),Q=e.ref(0),l=e.computed({get:()=>J(),set:a=>a});function J(){const a=me.useNestedProp({userConfig:x.config,defaultConfig:ke});return a.theme?{...me.useNestedProp({userConfig:s.themes.vue_ui_quadrant[a.theme]||x.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}e.watch(()=>x.config,a=>{l.value=J(),j(),U.value+=1,G.value+=1,Q.value+=1},{deep:!0});const T=e.ref(null);function j(){if(s.objectIsEmpty(x.dataset)?s.error({componentName:"VueUiQuadrant",type:"dataset"}):x.dataset.forEach((a,u)=>{[null,void 0].includes(a.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",index:u}),[null,void 0].includes(a.series)?s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"series",index:u}):a.series.forEach((o,r)=>{[null,void 0].includes(o.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",key:"series",index:r})})}),l.value.responsive){const a=be.throttle(()=>{const{width:u,height:o}=be.useResponsive({chart:w.value,title:l.value.style.chart.title.text?H.value:null,legend:l.value.style.chart.legend.show?I.value:null});y.value=48,t.value.height=o,t.value.usableHeight=o-y.value*2,t.value.width=u,t.value.usableWidth=u-y.value*2,t.value.top=y.value,t.value.left=y.value,t.value.right=u-y.value,t.value.bottom=o-y.value,t.value.centerX=u/2,t.value.centerY=o-o/2,t.value.padding=y.value});T.value=new ResizeObserver(a),T.value.observe(w.value.parentNode)}}e.onMounted(()=>{j()}),e.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});const{isPrinting:Z,isImaging:K,generatePdf:ee,generateImage:te}=pe.usePrinter({elementId:`vue-ui-quadrant_${g.value}`,fileName:l.value.style.chart.title.text||"vue-ui-quadrant"}),le=e.computed(()=>s.convertCustomPalette(l.value.customPalette)),p=e.ref({plotLabels:{show:l.value.style.chart.layout.labels.plotLabels.show},showTable:l.value.table.show,showTooltip:l.value.style.chart.tooltip.show}),y=e.ref(48),t=e.ref({height:l.value.style.chart.height,usableHeight:l.value.style.chart.height-y.value*2,width:l.value.style.chart.width,usableWidth:l.value.style.chart.width-y.value*2,top:y.value,left:y.value,right:l.value.style.chart.width-y.value,bottom:l.value.style.chart.height-y.value,centerX:l.value.style.chart.width/2,centerY:l.value.style.chart.height-l.value.style.chart.height/2,padding:y.value}),c=e.ref({...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0});e.watch(()=>t.value,a=>{a&&(c.value={...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0})},{deep:!0});const i=e.ref(null),C=e.computed(()=>{switch(i.value){case"TL":return{x:c.value.startX+c.value.width/2,y:c.value.height,text:l.value.style.chart.layout.labels.quadrantLabels.tl.text||"Top Left",fontSize:l.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color,bold:l.value.style.chart.layout.labels.quadrantLabels.tl.bold};case"TR":return{x:c.value.startX+c.value.width/2,y:c.value.height,text:l.value.style.chart.layout.labels.quadrantLabels.tr.text||"Top Right",fontSize:l.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color,bold:l.value.style.chart.layout.labels.quadrantLabels.tr.bold};case"BR":return{x:c.value.startX+c.value.width/2,y:c.value.height*1.678,text:l.value.style.chart.layout.labels.quadrantLabels.br.text||"Bottom Right",fontSize:l.value.style.chart.layout.labels.quadrantLabels.br.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color,bold:l.value.style.chart.layout.labels.quadrantLabels.br.bold};case"BL":return{x:c.value.startX+c.value.width/2,y:c.value.height*1.678,text:l.value.style.chart.layout.labels.quadrantLabels.bl.text||"Bottom Left",fontSize:l.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color,bold:l.value.style.chart.layout.labels.quadrantLabels.bl.bold};default:return{x:0,y:0,text:"",fontSize:0,fill:"none",bold:!1}}}),Le=e.ref(null),W=e.ref(!1);function B({targetX:a,targetY:u,targetW:o,targetH:r,side:n}){i.value&&z(n);const v={x:a-c.value.startX,y:u-c.value.startY,w:o-c.value.width,h:r-c.value.height},d=l.value.zoomAnimationFrames;let k=0;function ye(){W.value=!0,c.value.startX+=v.x/d,c.value.startY+=v.y/d,c.value.width+=v.w/d,c.value.height+=v.h/d,k+=1,k<d?Le.value=requestAnimationFrame(ye):W.value=!1}ye()}function $(a){if(!W.value)if(h.value&&i.value===a)B({targetX:0,targetY:0,targetW:t.value.width,targetH:t.value.height}),i.value=null,h.value=!1;else{switch(i.value=a,a){case"TL":B({targetX:0,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tl"});break;case"TR":B({targetX:t.value.width/2-t.value.left,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tr"});break;case"BR":B({targetX:t.value.width/2-t.value.left,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"br"});break;case"BL":B({targetX:0,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"bl"});break;default:c.value.startX=0,c.value.startY=0,c.value.width=t.value.width,c.value.height=t.value.height;break}h.value=!0}}const Ce=e.computed(()=>{const a=l.value.style.chart.layout.grid.graduations.steps,u=t.value.usableWidth/(a*2),o=t.value.top,r=[];for(let n=0;n<a;n+=1)r.push({x:t.value.padding+u*n,y:o+t.value.usableHeight*(n/a/2),height:t.value.usableHeight*(1-n/a),width:t.value.usableWidth*(1-n/a),opacity:Math.round((n+1)/a*20)});return r}),f=e.computed(()=>{let a=l.value.style.chart.layout.grid.xAxis.max,u=l.value.style.chart.layout.grid.xAxis.min,o=l.value.style.chart.layout.grid.yAxis.max,r=l.value.style.chart.layout.grid.yAxis.min;return l.value.style.chart.layout.grid.xAxis.auto&&(a=Math.max(...S.value.flatMap(n=>n.series.map(v=>v.x))),u=Math.min(...S.value.flatMap(n=>n.series.map(v=>v.x)))),l.value.style.chart.layout.grid.yAxis.auto&&(o=Math.max(...S.value.flatMap(n=>n.series.map(v=>v.y))),r=Math.min(...S.value.flatMap(n=>n.series.map(v=>v.y)))),{x:{max:a,min:u},y:{max:o,min:r}}}),L=e.ref([]),S=e.computed(()=>x.dataset.map((a,u)=>({...a,id:`cat_${u}_${g.value}`,color:s.convertColorToHex(a.color)||le.value[u]||s.palette[u]}))),we=e.computed(()=>S.value.filter(a=>!L.value.includes(a.id))),Se=e.computed(()=>S.value.map((a,u)=>({...a,shape:a.shape||"circle",series:a.series.map(o=>({...o,x:ae(o.x),y:oe(o.y),xValue:o.x,yValue:o.y,quadrantSide:re({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color}))}))),m=e.computed(()=>(x.dataset.forEach((a,u)=>{a.series.forEach((o,r)=>{[null,void 0].includes(o.x)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"x",key:"series",index:r}),[null,void 0].includes(o.y)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"y",key:"series",index:r})})}),we.value.map((a,u)=>({...a,shape:a.shape||"circle",color:a.color||le.value[u]||s.palette[u],series:a.series.map(o=>({...o,x:ae(o.x),y:oe(o.y),xValue:o.x,yValue:o.y,quadrantSide:re({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color,uid:s.createUid()}))}))));function ae(a){if(a>=0){const u=a/f.value.x.max;return t.value.centerX+t.value.usableWidth/2*u}else{const u=Math.abs(a)/Math.abs(f.value.x.min);return t.value.centerX-t.value.usableWidth/2*u}}function oe(a){if(a>=0){const u=a/f.value.y.max;return t.value.centerY+(1-t.value.usableHeight/2*u)}else{const u=Math.abs(a)/Math.abs(f.value.y.min);return t.value.centerY-(1-t.value.usableHeight/2*u)}}const X=e.computed(()=>{const a=m.value.flatMap(d=>d.series.map(k=>({x:k.xValue,y:k.yValue,name:k.name,category:k.categoryName,quadrantSide:k.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[k.quadrantSide].text,color:d.color,shape:d.shape}))),u=l.value.style.chart.layout.grid.xAxis.name||"x",o=l.value.style.chart.layout.grid.yAxis.name||"y",r=[l.value.translations.category,l.value.translations.item,u,o,l.value.translations.side],n=a.map(d=>[d.category,d.name,d.x,d.y,d.sideName||d.quadrantSide]),v=a.map(d=>({shape:d.shape,color:d.color}));return{head:r,body:n,itsShapes:v,tableData:a}}),Y=e.computed(()=>{const a=X.value.head,u=X.value.tableData.map(r=>[{shape:r.shape,color:r.color,name:r.category},r.name,s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,r.x,s.dataLabel({v:r.x,r:l.value.style.chart.layout.labels.plotLabels.rounding})),s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,r.y,s.dataLabel({v:r.y,r:l.value.style.chart.layout.labels.plotLabels.rounding})),r.sideName||r.quadrantSide]),o={th:{backgroundColor:l.value.table.th.backgroundColor,color:l.value.table.th.color,outline:l.value.table.th.outline},td:{backgroundColor:l.value.table.td.backgroundColor,color:l.value.table.td.color,outline:l.value.table.td.outline},breakpoint:l.value.table.responsiveBreakpoint};return{head:a,body:u,config:o,colNames:a}});function F(a){L.value.includes(a)?L.value=L.value.filter(o=>o!==a):L.value.push(a);const u=ie();P("selectLegend",u)}const ue=e.computed(()=>Se.value.map(a=>({name:a.name,shape:a.shape,color:a.color,id:a.id,opacity:L.value.includes(a.id)?.5:1,segregate:()=>F(a.id),isSegregated:L.value.includes(a.id)}))),Be=e.computed(()=>({cy:"quadrant-div-legend",backgroundColor:l.value.style.chart.legend.backgroundColor,color:l.value.style.chart.legend.color,fontSize:l.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:l.value.style.chart.legend.bold?"bold":""}));function re(a){switch(!0){case(a.x>=0&&a.y>=0):return"tr";case(a.x>=0&&a.y<0):return"br";case(a.x<0&&a.y<0):return"bl";case(a.x<0&&a.y>=0):return"tl";default:return""}}const q=e.ref(null),_=e.ref(null),D=e.ref(null);function ne(a,u,o){q.value=u.uid,_.value={color:a.color,shape:a.shape},D.value={datapoint:u,seriesIndex:o,series:m.value,config:l.value},E.value=!0;const r=l.value.style.chart.tooltip.customFormat;if(s.isFunction(r)&&s.functionReturnsString(()=>r({seriesIndex:o,datapoint:u,series:m.value,config:l.value})))M.value=r({seriesIndex:o,datapoint:u,series:m.value,config:l.value});else{let n="";u.quadrantSide&&(n+=`<div style="color:${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].color};font-weight:${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].bold?"bold":"400"}">${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}</div>`),n+=`<div>${a.name}</div>`,n+=`<div style="padding-bottom:6px;border-bottom:1px solid ${l.value.style.chart.tooltip.borderColor};margin-bottom:3px">${u.name}</div>`,n+=`<div>${l.value.style.chart.layout.grid.xAxis.name?l.value.style.chart.layout.grid.xAxis.name:"x"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,u.xValue,s.dataLabel({v:u.xValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,n+=`<div>${l.value.style.chart.layout.grid.yAxis.name?l.value.style.chart.layout.grid.yAxis.name:"y"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,u.yValue,s.dataLabel({v:u.yValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,M.value=`<div style="text-align:left;font-size:${l.value.style.chart.tooltip.fontSize}px">${n}</div>`}}function se(a,u){const o={category:a.name,shape:a.shape,itemName:u.name,x:u.xValue,y:u.yValue,quadrantSide:u.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text};P("selectPlot",o)}function z(a){if(!a)return;const u=m.value.flatMap(r=>r.series.filter(n=>n.quadrantSide===a).map(n=>({category:n.categoryName,itemName:n.name,x:n.xValue,y:n.yValue}))),o={quadrantSide:a,sideName:l.value.style.chart.layout.labels.quadrantLabels[a].text,items:[...u]};P("selectSide",o)}const b=e.computed(()=>({TL:{tl:{x:t.value.left+t.value.usableWidth/4-20,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.left+t.value.usableWidth/4,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.left+t.value.usableWidth/4,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.left+t.value.usableWidth/4-20,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.left+t.value.usableWidth/4-20},20 ${t.value.left+t.value.usableWidth/4+20},20`,vertical:`M ${t.value.left+t.value.usableWidth/4},0 ${t.value.left+t.value.usableWidth/4},40`}},TR:{tl:{x:t.value.centerX+t.value.usableWidth/4-20,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.centerX+t.value.usableWidth/4,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.centerX+t.value.usableWidth/4,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.centerX+t.value.usableWidth/4-20,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.centerX+t.value.usableWidth/4-20},20 ${t.value.centerX+t.value.usableWidth/4+20},20`,vertical:`M ${t.value.centerX+t.value.usableWidth/4},0 ${t.value.centerX+t.value.usableWidth/4},40`}},BR:{tl:{x:t.value.centerX+t.value.usableWidth/4-20,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.centerX+t.value.usableWidth/4,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.centerX+t.value.usableWidth/4,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.centerX+t.value.usableWidth/4-20,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.centerX+t.value.usableWidth/4-20},${t.value.centerY-28} ${t.value.centerX+t.value.usableWidth/4+20},${t.value.centerY-28}`,vertical:`M ${t.value.centerX+t.value.usableWidth/4},${t.value.centerY-48} ${t.value.centerX+t.value.usableWidth/4},${t.value.centerY-8}`}},BL:{tl:{x:t.value.left+t.value.usableWidth/4-20,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.left+t.value.usableWidth/4,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.left+t.value.usableWidth/4,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.left+t.value.usableWidth/4-20,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.left+t.value.usableWidth/4-20},${t.value.centerY-28} ${t.value.left+t.value.usableWidth/4+20},${t.value.centerY-28}`,vertical:`M ${t.value.left+t.value.usableWidth/4},${t.value.centerY-48} ${t.value.left+t.value.usableWidth/4},${t.value.centerY-8}`}}}));function ie(){return m.value.map(a=>({color:a.color,name:a.name,shape:a.shape,series:a.series.map(u=>({name:u.name,x:u.xValue,y:u.yValue,quadrantSide:u.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}))}))}function ce(){e.nextTick(()=>{const a=[[l.value.style.chart.title.text],[l.value.style.chart.title.subtitle.text],[""]],u=X.value.head,o=X.value.body,r=a.concat([u]).concat(o),n=s.createCsvContent(r);s.downloadCsv({csvContent:n,title:l.value.style.chart.title.text||"vue-ui-quadrant"})})}const N=e.ref(!1);function qe(a){N.value=a,R.value+=1}function ve(){p.value.showTable=!p.value.showTable}function de(){p.value.plotLabels.show=!p.value.plotLabels.show}function he(){p.value.showTooltip=!p.value.showTooltip}const A=e.ref(!1);function O(){A.value=!A.value}return xe({getData:ie,generatePdf:ee,generateCsv:ce,generateImage:te,toggleTable:ve,toggleLabels:de,toggleTooltip:he,toggleAnnotator:O}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-quadrant ${N.value?"vue-data-ui-wrapper-fullscreen":""} ${l.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"quadrantChart",ref:w,id:`vue-ui-quadrant_${g.value}`,style:e.normalizeStyle(`font-family:${l.value.style.fontFamily};width:100%; text-align:center;${l.value.style.chart.title.text?"":"padding-top: 36px"};background:${l.value.style.chart.backgroundColor};${l.value.responsive?"height: 100%":""}`)},[l.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Xe.PenAndPaper,{key:0,parent:w.value,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,active:A.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),l.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:H,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(_e._sfc_main,{key:`table_${U.value}`,config:{title:{cy:"quadrant-title",...l.value.style.chart.title},subtitle:{cy:"quadrant-subtitle",...l.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),l.value.userOptions.show&&V.value?(e.openBlock(),e.createBlock(pe.UserOptions,{ref_key:"details",ref:$e,key:`user_options_${R.value}`,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,isImaging:e.unref(K),isPrinting:e.unref(Z),uid:g.value,hasTooltip:l.value.userOptions.buttons.tooltip&&l.value.style.chart.tooltip.show,hasPdf:l.value.userOptions.buttons.pdf,hasImg:l.value.userOptions.buttons.img,hasXls:l.value.userOptions.buttons.csv,hasTable:l.value.userOptions.buttons.table,hasLabel:l.value.userOptions.buttons.labels,hasFullscreen:l.value.userOptions.buttons.fullscreen,isFullscreen:N.value,isTooltip:p.value.showTooltip,titles:{...l.value.userOptions.buttonTitles},chartElement:w.value,position:l.value.userOptions.position,hasAnnotator:l.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:qe,onGeneratePdf:e.unref(ee),onGenerateCsv:ce,onGenerateImage:e.unref(te),onToggleTable:ve,onToggleLabels:de,onToggleTooltip:he,onToggleAnnotator:O},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`${c.value.startX} ${c.value.startY} ${c.value.width} ${c.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:${h.value?"hidden":"visible"};background:transparent;color:${l.value.style.chart.color}`),id:`svg_${g.value}`},[e.createVNode(We._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`quadrant_gradient_${g.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)(e.unref(s.shiftHue)(o.color,.05),l.value.style.chart.layout.areas.opacity)},null,8,Fe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity)},null,8,De)],8,Me))),256))]),l.value.style.chart.layout.grid.graduations.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.value,o=>(e.openBlock(),e.createElementBlock("rect",{fill:l.value.style.chart.layout.grid.graduations.fill?e.unref(s.setOpacity)(l.value.style.chart.layout.grid.graduations.color,o.opacity):"none",x:o.x,y:o.y,height:o.height<=0?.001:o.height,width:o.width<=0?.001:o.width,"stroke-width":l.value.style.chart.layout.grid.graduations.strokeWidth,stroke:l.value.style.chart.layout.grid.graduations.stroke,rx:l.value.style.chart.layout.grid.graduations.roundingForce},null,8,Re))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:t.value.left,y1:t.value.centerY,x2:t.value.right,y2:t.value.centerY,stroke:l.value.style.chart.layout.grid.stroke,"stroke-width":l.value.style.chart.layout.grid.strokeWidth},null,8,He),e.createElementVNode("line",{x1:t.value.centerX,y1:t.value.top,x2:t.value.centerX,y2:t.value.bottom,stroke:l.value.style.chart.layout.grid.stroke,"stroke-width":l.value.style.chart.layout.grid.strokeWidth},null,8,Ie),l.value.style.chart.layout.grid.showArrows?(e.openBlock(),e.createElementBlock("g",Ue,[e.createElementVNode("polygon",{points:`${t.value.right-8},${t.value.centerY-6} ${t.value.right},${t.value.centerY} ${t.value.right-8},${t.value.centerY+6}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,Ge),e.createElementVNode("polygon",{points:`${t.value.left+8},${t.value.centerY-6} ${t.value.left},${t.value.centerY} ${t.value.left+8},${t.value.centerY+6}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,Qe),e.createElementVNode("polygon",{points:`${t.value.centerX-6},${t.value.top+8} ${t.value.centerX},${t.value.top} ${t.value.centerX+6},${t.value.top+8}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,Je),e.createElementVNode("polygon",{points:`${t.value.centerX-6},${t.value.bottom-8} ${t.value.centerX},${t.value.bottom} ${t.value.centerX+6},${t.value.bottom-8}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,je)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.show&&!h.value?(e.openBlock(),e.createElementBlock("g",Ze,[l.value.style.chart.layout.labels.quadrantLabels.tl.text?(e.openBlock(),e.createElementBlock("text",{key:0,x:0,y:t.value.top-t.value.padding/2,"text-anchor":"start",fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.tl.bold?"bold":""}`),onClick:u[0]||(u[0]=o=>z("tl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tl.text),13,Ke)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.tr.text?(e.openBlock(),e.createElementBlock("text",{key:1,x:t.value.width,y:t.value.top-t.value.padding/2,"text-anchor":"end",fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.tr.bold?"bold":""}`),onClick:u[1]||(u[1]=o=>z("tr"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tr.text),13,et)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.br.text?(e.openBlock(),e.createElementBlock("text",{key:2,x:t.value.width,y:t.value.bottom+t.value.padding*.7,"text-anchor":"end",fill:l.value.style.chart.layout.labels.quadrantLabels.br.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.br.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.br.bold?"bold":""}`),onClick:u[2]||(u[2]=o=>z("br"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.br.text),13,tt)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.bl.text?(e.openBlock(),e.createElementBlock("text",{key:3,x:0,y:t.value.bottom+t.value.padding*.7,"text-anchor":"start",fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.bl.bold?"bold":""}`),onClick:u[3]||(u[3]=o=>z("bl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.bl.text),13,lt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.axisLabels.show?(e.openBlock(),e.createElementBlock("g",at,[e.createElementVNode("text",{x:t.value.centerX,y:t.value.top-t.value.padding/6,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.max,e.unref(s.dataLabel)({v:f.value.y.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,ot),e.createElementVNode("text",{x:t.value.centerX,y:t.value.top-t.value.padding/2,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(l.value.style.chart.layout.grid.yAxis.name),9,ut),e.createElementVNode("text",{x:t.value.centerX,y:t.value.bottom+t.value.padding*.35,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.negative},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.min,e.unref(s.dataLabel)({v:f.value.y.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,rt),e.createElementVNode("text",{id:`xLabelMin_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.padding-l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(-90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.negative},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.min,e.unref(s.dataLabel)({v:f.value.x.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,nt),e.createElementVNode("text",{id:`xLabelMax_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.width-t.value.padding+l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.max,e.unref(s.dataLabel)({v:f.value.x.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,st),e.createElementVNode("text",{id:`xLabelMaxName_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.width-l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(l.value.style.chart.layout.grid.xAxis.name),9,it)])):e.createCommentVNode("",!0),l.value.style.chart.layout.areas.show?(e.openBlock(),e.createElementBlock("g",ct,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[o.series.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-quadrant-area":"",fill:l.value.style.chart.layout.areas.useGradient?`url(#quadrant_gradient_${g.value}_${r})`:e.unref(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity),points:e.unref(s.giftWrap)(o)},null,8,vt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[e.createElementVNode("rect",{onClick:u[4]||(u[4]=o=>$("TL")),x:t.value.left,y:t.value.top,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,dt),e.createElementVNode("rect",{onClick:u[5]||(u[5]=o=>$("TR")),x:t.value.centerX,y:t.value.top,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,ht),e.createElementVNode("rect",{onClick:u[6]||(u[6]=o=>$("BR")),x:t.value.centerX,y:t.value.centerY,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,yt),e.createElementVNode("rect",{onClick:u[7]||(u[7]=o=>$("BL")),x:t.value.left,y:t.value.centerY,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,bt)]),l.value.style.chart.layout.labels.plotLabels.showAsTag?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,n=>(e.openBlock(),e.createElementBlock("foreignObject",{style:{overflow:"visible"},height:"10",width:"100",x:n.x-50,y:n.y-l.value.style.chart.layout.labels.plotLabels.fontSize,onMouseover:v=>ne(o,n,r),onMouseleave:u[9]||(u[9]=v=>{E.value=!1,q.value=null,_.value=null}),onClick:v=>se(o,n)},[e.createElementVNode("div",{style:e.normalizeStyle(`color:${e.unref(s.adaptColorToBackground)(o.color)};margin: 0 auto; font-size:${l.value.style.chart.layout.labels.plotLabels.fontSize}px; text-align:center;background:${o.color}; padding: 2px 4px; border-radius: 12px; height: ${l.value.style.chart.layout.labels.plotLabels.fontSize*1.5}px`)},e.toDisplayString(n.name),5)],40,gt))),256))],64))),256))])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,n=>(e.openBlock(),e.createBlock(fe._sfc_main,{color:o.color,isSelected:q.value&&n.uid===q.value,plot:n,radius:l.value.style.chart.layout.plots.radius/(h.value?1.5:1),shape:o.shape,stroke:l.value.style.chart.layout.plots.outline?l.value.style.chart.layout.plots.outlineColor:"none",strokeWidth:l.value.style.chart.layout.plots.outlineWidth,onMouseover:v=>ne(o,n,r),onMouseleave:u[8]||(u[8]=v=>{E.value=!1,q.value=null,_.value=null}),onClick:v=>se(o,n)},null,8,["color","isSelected","plot","radius","shape","stroke","strokeWidth","onMouseover","onClick"]))),256))]))),256)),p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,o=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,r=>(e.openBlock(),e.createElementBlock("text",{x:r.x,y:r.y+l.value.style.chart.layout.labels.plotLabels.offsetY+l.value.style.chart.layout.plots.radius,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.plotLabels.fontSize/(h.value?1.5:1),fill:l.value.style.chart.layout.labels.plotLabels.color},e.toDisplayString(r.name),9,ft))),256))]))),256))])):e.createCommentVNode("",!0)],64)),h.value?(e.openBlock(),e.createElementBlock("g",xt,[i.value==="TL"?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:`${t.value.left-1},${t.value.centerY} ${t.value.centerX},${t.value.centerY} ${t.value.centerX},${t.value.top-1} ${t.value.right},${t.value.top-1} ${t.value.right},${t.value.bottom} ${t.value.left-1},${t.value.bottom} ${t.value.left-1},${t.value.centerY}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,kt)):e.createCommentVNode("",!0),i.value==="TR"?(e.openBlock(),e.createElementBlock("polygon",{key:1,points:`${t.value.left},${t.value.top-1} ${t.value.centerX},${t.value.top-1} ${t.value.centerX},${t.value.centerY} ${t.value.right+1},${t.value.centerY} ${t.value.right+1},${t.value.bottom} ${t.value.left},${t.value.bottom} ${t.value.left},${t.value.top-1}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,$t)):e.createCommentVNode("",!0),i.value==="BR"?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:`${t.value.left},${t.value.top} ${t.value.right+1},${t.value.top} ${t.value.right+1},${t.value.centerY} ${t.value.centerX},${t.value.centerY} ${t.value.centerX},${t.value.bottom+1} ${t.value.left},${t.value.bottom+1} ${t.value.left},${t.value.top}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,Lt)):e.createCommentVNode("",!0),i.value==="BL"?(e.openBlock(),e.createElementBlock("polygon",{key:3,points:`${t.value.left-1},${t.value.top} ${t.value.right},${t.value.top} ${t.value.right},${t.value.bottom+1} ${t.value.centerX},${t.value.bottom+1} ${t.value.centerX},${t.value.centerY} ${t.value.left-1},${t.value.centerY} ${t.value.left-1},${t.value.top}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,Ct)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),i.value&&!W.value?(e.openBlock(),e.createElementBlock("g",wt,[e.createElementVNode("text",{x:C.value.x,y:C.value.y-C.value.fontSize/1.5,"font-size":C.value.fontSize/1.5,fill:C.value.fill,"text-anchor":"middle","font-weight":C.value.bold?"bold":"normal"},e.toDisplayString(C.value.text),9,St)])):e.createCommentVNode("",!0),h.value&&i.value?(e.openBlock(),e.createElementBlock("g",Bt,[e.createElementVNode("rect",{x:b.value[i.value].tl.x,y:b.value[i.value].tl.y,height:"20",width:"20",fill:b.value[i.value].tl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="TL"?1:.2}`),onClick:u[10]||(u[10]=o=>$("TL")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="TL"})},null,14,qt),e.createElementVNode("rect",{x:b.value[i.value].tr.x,y:b.value[i.value].tr.y,height:"20",width:"20",fill:b.value[i.value].tr.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="TR"?1:.2}`),onClick:u[11]||(u[11]=o=>$("TR")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="TR"})},null,14,_t),e.createElementVNode("rect",{x:b.value[i.value].br.x,y:b.value[i.value].br.y,height:"20",width:"20",fill:b.value[i.value].br.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="BR"?1:.2}`),onClick:u[12]||(u[12]=o=>$("BR")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="BR"})},null,14,zt),e.createElementVNode("rect",{x:b.value[i.value].bl.x,y:b.value[i.value].bl.y,height:"20",width:"20",fill:b.value[i.value].bl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="BL"?1:.2}`),onClick:u[13]||(u[13]=o=>$("BL")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="BL"})},null,14,Nt),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:b.value[i.value].crosshairs.horizontal},null,8,Vt),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:b.value[i.value].crosshairs.vertical},null,8,Et)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:t.value},void 0,!0)],14,Pe)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Tt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Z)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ee.default,{key:5,config:{type:"quadrant",style:{backgroundColor:l.value.style.chart.backgroundColor,quadrant:{grid:{color:l.value.style.chart.layout.grid.stroke},plots:{color:l.value.style.chart.layout.grid.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[l.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ne.Legend,{key:`legend_${Q.value}`,legendSet:ue.value,config:Be.value,onClickMarker:u[14]||(u[14]=({legend:o})=>F(o.id))},{item:e.withCtx(({legend:o})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:r=>F(o.id),style:e.normalizeStyle(`opacity:${L.value.includes(o.id)?.5:1}`)},e.toDisplayString(o.name),13,Wt)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:ue.value},void 0,!0)],512),e.createVNode(ze._sfc_main,{show:p.value.showTooltip&&E.value,backgroundColor:l.value.style.chart.tooltip.backgroundColor,color:l.value.style.chart.tooltip.color,borderRadius:l.value.style.chart.tooltip.borderRadius,borderColor:l.value.style.chart.tooltip.borderColor,borderWidth:l.value.style.chart.tooltip.borderWidth,fontSize:l.value.style.chart.tooltip.fontSize,backgroundOpacity:l.value.style.chart.tooltip.backgroundOpacity,position:l.value.style.chart.tooltip.position,offsetY:l.value.style.chart.tooltip.offsetY,parent:w.value,content:M.value,isCustom:l.value.style.chart.tooltip.customFormat&&typeof l.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),default:e.withCtx(()=>[l.value.style.chart.tooltip.showShape?(e.openBlock(),e.createElementBlock("svg",Xt,[e.createVNode(fe._sfc_main,{plot:{x:10,y:10},shape:_.value.shape,color:_.value.color,radius:8,stroke:l.value.style.chart.layout.plots.outline?l.value.style.chart.layout.plots.outlineColor:"none","stroke-width":l.value.style.chart.layout.plots.outlineWidth},null,8,["shape","color","stroke","stroke-width"])])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),V.value?(e.openBlock(),e.createBlock(Te.default,{key:6,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color},head:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ve.DataTable,{key:`table_${G.value}`,colNames:Y.value.colNames,head:Y.value.head,body:Y.value.body,config:Y.value.config,title:`${l.value.style.chart.title.text}${l.value.style.chart.title.subtitle.text?` : ${l.value.style.chart.title.subtitle.text}`:""}`,onClose:u[15]||(u[15]=o=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createElementVNode("div",{innerHTML:o.name||o},null,8,Yt)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ae))}},Pt=Ye._export_sfc(At,[["__scopeId","data-v-cf6ceba3"]]);exports.default=Pt;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-FfZRtJ6A.cjs"),te=require("./useResponsive-B3TrDDIG.cjs"),me=require("./Title-Co5jI5ed.cjs"),oe=require("./usePrinter-BCAFeO_J.cjs"),fe=require("./Tooltip-Bl6W8Zn7.cjs"),ye=require("./vue-ui-sparkbar-CrTEPTU5.cjs"),ke=require("./Legend-YZ7Hz3o1.cjs"),be=require("./DataTable-DJzhv96s.cjs"),Ce=require("./vue-ui-skeleton-Djv08J67.cjs"),we=require("./vue-ui-accordion-xXgqfR2l.cjs"),ae=require("./useNestedProp-q7byAAIJ.cjs"),Be=require("./PackageVersion-DVZtsuy4.cjs"),_e=require("./PenAndPaper-CyXm-yVL.cjs"),Pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xe=["id"],$e=["xmlns","viewBox"],Ne=["id"],Te=["stop-color"],Se=["stop-color"],Ee={key:0},Ve=["x1","y1","x2","y2","stroke","stroke-width"],Ae={key:0},Oe=["d","stroke","stroke-width"],Fe=["d","stroke","stroke-width"],Le={key:1},ze=["x","y","text-anchor","font-size","fill","onMouseenter"],Ie=["points","stroke","stroke-width"],Re=["points","stroke","stroke-width","fill"],qe={key:2},De=["cx","cy","fill","r","stroke"],Me={key:4,class:"vue-data-ui-watermark"},Ue=["onClick"],Ge={key:0,style:{"max-width":"200px",margin:"0 auto"}},We={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(le,{expose:re,emit:ne}){const d=le,{vue_ui_radar:ue}=n.useConfig(),b=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),se=e.ref(null),$=e.ref(!1),N=e.ref(""),F=e.ref(0),f=e.ref(null),L=e.ref(null),z=e.ref(null),I=e.ref(0),R=e.ref(0),q=e.ref(0),t=e.computed({get:()=>D(),set:o=>o});function D(){const o=ae.useNestedProp({userConfig:d.config,defaultConfig:ue});return o.theme?{...ae.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=D(),M(),I.value+=1,R.value+=1,q.value+=1},{deep:!0});const B=e.ref(null);function M(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=te.throttle(()=>{const{width:a,height:l}=te.useResponsive({chart:f.value,title:t.value.style.chart.title.text?L.value:null,legend:t.value.style.chart.legend.show?z.value:null});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(f.value.parentNode)}}e.onMounted(()=>{M()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:U,isImaging:G,generatePdf:W,generateImage:H}=oe.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),X=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),g=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),ie=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),s=e.ref({height:312,width:512}),i=e.ref([]),C=e.ref(null),y=e.ref(!1);function j(o){y.value=!0,i.value.includes(o)?(C.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{y.value=!1,C.value=null},500)):(i.value.push(o),setTimeout(()=>{y.value=!1},500)),ne("selectLegend",k.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function ce(){return k.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${m.value}_${a}`,color:n.convertColorToHex(o.color)||X.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>b.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||X.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),Y=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),J=e.computed(()=>p.value.length),T=e.computed(()=>Math.min(s.value.width,s.value.height)/3),K=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:T.value,sides:J.value,rotation:0})),de=e.computed(()=>{const o=[];for(let a=0;a<T.value;a+=T.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),h=e.computed(()=>K.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>ve({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||Y.value)}));return{...o,...p.value[a],plots:l}}));function S({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>s.value.width/2&&(o+=12,l="start"),o<s.value.width/2&&(o-=12,l="end"),a>s.value.height/2&&(a+=20),a<s.value.height/2&&(a-=12),a===s.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function ve({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const k=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||Y.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>j(l),isSegregated:i.value.includes(l)}))}),pe=e.computed(()=>({cy:"radar-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":""})),_=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...k.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((u,c)=>`${n.applyDataLabel(r.formatter,u,n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(u/r.target)?"":n.dataLabel({v:u/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={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};return{head:o,body:a,config:l,colNames:o}}),P=e.ref(null),E=e.ref([]),V=e.ref(null);function ge(o,a){E.value=[],P.value=a,$.value=!0;let l="";V.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let u=0;u<o.values.length;u+=1)i.value.includes(u)||E.value.push({name:v.value[u].name,value:o.values[u]/o.target*100,color:v.value[u].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[u].prefix??"",v:o.values[u],s:v.value[u].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function Q(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...k.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,Xe)=>[c.name,c.target,...c.values.flatMap(O=>[O,isNaN(O/c.target)?"":O/c.target*100])]),r=o.concat([a]).concat(l),u=n.createCsvContent(r);n.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const w=e.ref(!1);function he(o){w.value=o,F.value+=1}function Z(){g.value.showTable=!g.value.showTable}function ee(){g.value.showTooltip=!g.value.showTooltip}const x=e.ref(!1);function A(){x.value=!x.value}return re({getData:ce,generatePdf:W,generateCsv:Q,generateImage:H,toggleTable:Z,toggleTooltip:ee,toggleAnnotator:A}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:f,id:`vue-ui-radar_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e.PenAndPaper,{key:0,parent:f.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:x.value,onClose:A},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:L,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(me._sfc_main,{key:`title_${I.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(oe.UserOptions,{ref_key:"details",ref:se,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(G),isPrinting:e.unref(U),uid:m.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,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:w.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:x.value,onToggleFullscreen:he,onGeneratePdf:e.unref(W),onGenerateCsv:Q,onGenerateImage:e.unref(H),onToggleTable:Z,onToggleTooltip:ee,onToggleAnnotator:A},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Be._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Se)],8,Ne))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Ve))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(de.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:J.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Oe))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:K.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Fe),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:S(l).x,y:S(l).y,"text-anchor":S(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:u=>ge(l,r),onMouseleave:a[0]||(a[0]=u=>{$.value=!1,P.value=null})},e.toDisplayString(l.name),41,ze))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===r&&t.value.useCssAnimation})},null,10,Ie)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${m.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===r&&t.value.useCssAnimation})},null,10,Re)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(u,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:P.value!==null&&P.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===c&&t.value.useCssAnimation})},null,10,De))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,$e)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.default,{key:5,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ke.Legend,{key:`legend_${q.value}`,legendSet:k.value,config:pe.value,onClickMarker:a[1]||(a[1]=({i:l})=>j(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,Ue)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),e.createVNode(fe._sfc_main,{show:g.value.showTooltip&&$.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:f.value,content:N.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...V.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ge,[e.createVNode(ye.default,{dataset:E.value,config:ie.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...V.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(we.default,{key:6,hideDetails:"",config:{open:g.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:e.withCtx(()=>[(e.openBlock(),e.createBlock(be.DataTable,{key:`table_${R.value}`,colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>g.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,xe))}},He=Pe._export_sfc(We,[["__scopeId","data-v-14b2c666"]]);exports.default=He;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-FfZRtJ6A.cjs"),j=require("./useResponsive-B3TrDDIG.cjs"),se=require("./Title-Co5jI5ed.cjs"),G=require("./usePrinter-BCAFeO_J.cjs"),ue=require("./vue-ui-skeleton-Djv08J67.cjs"),U=require("./useNestedProp-q7byAAIJ.cjs"),ce=require("./PackageVersion-DVZtsuy4.cjs"),de=require("./PenAndPaper-CyXm-yVL.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],ge=["xmlns","viewBox"],me=["cx","cy","r","stroke","stroke-width"],ye={key:0},he=["stroke","d","stroke-width"],pe={key:1},ke=["stroke","x1","x2","y1","y2"],Ce=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],_e=["cx","cy","fill","onClick","r"],$e={key:4,class:"vue-data-ui-watermark"},xe={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(D,{expose:W}){const u=D;e.useCssVars(t=>({"0bc2311e":K.value,"6cb258d0":J.value,"0108e0b2":Q.value}));const{vue_ui_relation_circle:X}=s.useConfig(),C=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),g=e.ref(s.createUid()),w=e.ref(0),m=e.ref(null),B=e.ref(null),P=e.ref(0),r=e.computed({get:()=>A(),set:t=>t});function A(){const t=U.useNestedProp({userConfig:u.config,defaultConfig:X});return t.theme?{...U.useNestedProp({userConfig:s.themes.vue_ui_relation_circle[t.theme]||u.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>u.config,t=>{r.value=A(),F(),P.value+=1},{deep:!0});const{isPrinting:O,isImaging:E,generatePdf:S,generateImage:I}=G.usePrinter({elementId:`relation_circle_${g.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),z=e.computed(()=>s.convertCustomPalette(r.value.customPalette)),d=e.ref([]),f=e.ref([]),a=e.ref({}),c=e.ref([]),Y=e.ref(0),_=e.computed(()=>u.dataset.slice(0,r.value.style.limit)),$=e.ref(r.value.style.size),i=e.ref({height:r.value.style.size,width:r.value.style.size}),v=e.computed({get(){return $.value*r.value.style.circle.radiusProportion},set(t){return t}}),H=e.computed(()=>r.value.style.links.curved),J=e.computed(()=>`${r.value.style.animation.speedMs}ms`),K=e.computed(()=>v.value*2),Q=e.computed(()=>v.value*4),h=e.ref(null);e.onMounted(()=>{F(),document.getElementById(`relation_circle_${g.value}`).addEventListener("click",N)});function F(){if(s.objectIsEmpty(u.dataset)?s.error({componentName:"VueUiRelationCircle",type:"dataset"}):u.dataset.forEach((t,l)=>{s.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(n=>{s.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:n,index:l})})}),r.value.responsive){const t=j.throttle(()=>{const{width:l,height:n}=j.useResponsive({chart:m.value,title:r.value.style.title.text?B.value:null});$.value=Math.min(l,n),i.value.width=l,i.value.height=n,v.value=$.value*r.value.style.circle.radiusProportion,d.value=[],f.value=[],L(),R()});h.value=new ResizeObserver(t),h.value.observe(m.value.parentNode)}else d.value=[],f.value=[],L(),R()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${g.value}`).removeEventListener("click",N),h.value&&h.value.disconnect()});function N(t){const l=t.target;l&&Array.from(l.classList).includes("vue-ui-user-options")||l&&Array.from(l.classList).includes("vue-ui-user-options-summary")||l&&Array.from(l.classList).includes("vue-data-ui-button")||l&&Array.from(l.classList).includes("vue-ui-relation-circle-legend")||(a.value={},c.value=[])}function L(){const t=6.28319/_.value.length,l=360/_.value.length;let n=0,o=0;_.value.forEach((y,b)=>{const ae=v.value*Math.cos(n)+i.value.width/2,ie=v.value*Math.sin(n)+i.value.height/2+r.value.style.circle.offsetY;d.value.push({x:ae,y:ie,...y,color:y.color?y.color:z.value[b]?z.value[b]:s.palette[b],regAngle:o}),n+=t,o+=l})}function R(){d.value.forEach(t=>{d.value.filter(n=>n.relations.includes(t.id)).forEach((n,o)=>{f.value.push({weight:t.weights&&t.weights[o]?t.weights[o]:1,relationId:`${t.id}_${n.id}`,x1:t.x,y1:t.y,x2:n.x,y2:n.y,colorSource:t.color,colorTarget:n.color,...t})})})}const Z=e.computed(()=>Math.max(...f.value.map(t=>t.weight)));function ee(t){return Object.hasOwn(a.value,"x")?c.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function T(t){return Object.hasOwn(a.value,"x")?t.colorTarget:t.colorSource}function V(t){return Object.hasOwn(a.value,"x")?c.value.includes(t.id)&&t.relationId===`${t.id}_${a.value.id}`||t.relationId===`${a.value.id}_${t.id}`?`opacity:1;stroke-width:${M(t)}`:"opacity: 0":"opacity: 1"}function te(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function ne(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function re(t){return Object.hasOwn(a.value,"x")?a.value.id===t.id||c.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function le(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function q(t){Y.value=360-t.regAngle,a.value.id&&t.id===a.value.id?(a.value={},c.value=[]):(a.value=t,c.value=[...t.relations])}function M(t){return t.weight/Z.value*r.value.style.links.maxWidth}const p=e.ref(!1);function oe(t){p.value=t,w.value+=1}const k=e.ref(!1);function x(){k.value=!k.value}return W({generatePdf:S,generateImage:I,toggleAnnotator:x}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:m,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${g.value}`},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(de.PenAndPaper,{key:0,parent:m.value,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:k.value,onClose:x},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:B,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(se._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&C.value?(e.openBlock(),e.createBlock(G.UserOptions,{ref:"details",key:`user_options_${w.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(O),isImaging:e.unref(E),uid:g.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:p.value,titles:{...r.value.userOptions.buttonTitles},chartElement:m.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:k.value,onToggleFullscreen:oe,onGeneratePdf:e.unref(S),onGenerateImage:e.unref(I),onToggleAnnotator:x},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:o})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:o})),void 0,!0)]),key:"2"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:o})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,isAnnotator:o})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(s.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":p.value,"vue-data-ui-fulscreen--off":!p.value},"relation-circle"]),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${i.value.height<=0?10:i.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(ce._sfc_main),e.createElementVNode("circle",{cx:(i.value.width<=0?1e-4:i.value.width)/2,cy:(i.value.height<=0?1e-4:i.value.height)/2+r.value.style.circle.offsetY,r:v.value<=0?1e-4:v.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,me),H.value?(e.openBlock(),e.createElementBlock("g",ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(n,o)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${o}`,style:e.normalizeStyle(V(n)),stroke:T(n),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&c.value.includes(n.id)}]),d:`M${n.x1},${n.y1} C${n.x1},${n.y1} ${i.value.width/2},${i.value.height/2+r.value.style.circle.offsetY} ${n.x2},${n.y2}`,fill:"none","stroke-width":M(n),"stroke-linecap":"round"},null,14,he))),128))])):(e.openBlock(),e.createElementBlock("g",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(n,o)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${o}`,stroke:T(n),style:e.normalizeStyle(V(n)),x1:n.x1,x2:n.x2,y1:n.y1,y2:n.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&c.value.includes(n.id)}),"stroke-linecap":"round"},null,14,ke))),128))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(n,o)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${o}`,"text-anchor":te(n),transform:le(n),x:ne(n),y:n.y+5,onClick:y=>q(n),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":a.value.id===n.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${re(n)}`),"font-size":r.value.style.labels.fontSize,fill:r.value.style.labels.color},e.toDisplayString(n.label),13,Ce))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(n,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:n.x,cy:n.y,key:`plot_${o}`,style:e.normalizeStyle(ee(n)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.color,onClick:y=>q(n),r:r.value.style.plot.radius},null,12,_e))),128)),e.renderSlot(t.$slots,"svg",{svg:i.value},void 0,!0)],10,ge)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(E)})),void 0,!0)])):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:5,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,fe))}},be=ve._export_sfc(xe,[["__scopeId","data-v-c84e98e7"]]);exports.default=be;
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-FfZRtJ6A.cjs"),K=require("./useResponsive-B3TrDDIG.cjs"),ve=require("./Title-Co5jI5ed.cjs"),Q=require("./usePrinter-BCAFeO_J.cjs"),pe=require("./Tooltip-Bl6W8Zn7.cjs"),he=require("./DataTable-DJzhv96s.cjs"),ge=require("./Legend-YZ7Hz3o1.cjs"),fe=require("./vue-ui-skeleton-Djv08J67.cjs"),me=require("./vue-ui-accordion-xXgqfR2l.cjs"),Z=require("./useNestedProp-q7byAAIJ.cjs"),ye=require("./PackageVersion-DVZtsuy4.cjs"),be=require("./PenAndPaper-CyXm-yVL.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],we=["xmlns","viewBox"],xe=["id"],Te=["stop-color"],Ne=["stop-color"],$e=["stroke","cx","cy","r","fill"],Se=["stroke","stroke-width","cx","cy","r","fill"],Pe=["cx","cy","r","onMouseenter"],_e={key:4,class:"vue-data-ui-watermark"},Be=["onClick"],Le={key:0},Ve={key:1},Ae=["innerHTML"],Ee={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ee,{expose:te,emit:oe}){const v=ee,{vue_ui_rings:le}=r.useConfig(),b=e.ref(!1),x=e.computed(()=>!!v.dataset&&v.dataset.length),k=e.ref(r.createUid()),ae=e.ref(null),T=e.ref(!1),_=e.ref(""),m=e.ref(null),A=e.ref(0),y=e.ref(null),E=e.ref(null),z=e.ref(null),F=e.ref(0),O=e.ref(0),I=e.ref(0),t=e.computed({get:()=>R(),set:o=>o});function R(){const o=Z.useNestedProp({userConfig:v.config,defaultConfig:le});return o.theme?{...Z.useNestedProp({userConfig:r.themes.vue_ui_rings[o.theme]||v.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}e.watch(()=>v.config,o=>{t.value=R(),M(),F.value+=1,O.value+=1,I.value+=1},{deep:!0});const N=e.ref(null);e.onMounted(()=>{M()});function M(){if(r.objectIsEmpty(v.dataset)?r.error({componentName:"VueUiRings",type:"dataset"}):v.dataset.forEach((o,a)=>{o.values.length||r.error({componentName:"VueUiRings",type:"dataset"}),r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{r.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive){const o=K.throttle(()=>{const{width:a,height:l}=K.useResponsive({chart:y.value,title:t.value.style.chart.title.text?E.value:null,legend:t.value.style.chart.legend.show?z.value:null});s.value.width=a,s.value.height=l});N.value=new ResizeObserver(o),N.value.observe(y.value.parentNode)}setTimeout(()=>{b.value=!0},600)}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:q,isImaging:D,generatePdf:U,generateImage:H}=Q.usePrinter({elementId:`rings_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),W=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),g=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),re=e.computed(()=>Math.min(s.value.height,s.value.width)),i=e.ref([]);function B(o){i.value.includes(o)?i.value=i.value.filter(a=>a!==o):i.value.push(o),oe("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const ne=e.computed(()=>Math.max(...$.value.filter(o=>!i.value.includes(o.uid)).map(({value:o})=>o)));function G(o){return o/ne.value}const $=e.computed(()=>v.dataset.map(({values:o,name:a,color:l=null},n)=>{const u=r.sanitizeArray(o).reduce((h,w)=>h+w,0);return{name:a,color:l||r.convertColorToHex(l)||W.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:u,proportion:u/v.dataset.map(h=>(h.values||[]).reduce((w,de)=>w+de,0)).reduce((h,w)=>h+w,0),uid:r.createUid()}})),j=e.computed(()=>$.value.map(o=>({...o,shape:"circle",opacity:i.value.includes(o.uid)?.5:1,segregate:()=>B(o.uid),isSegregated:i.value.includes(o.uid)})).toSorted((o,a)=>a.value-o.value)),ue=e.computed(()=>({cy:"rings-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":""})),p=e.computed(()=>$.value.filter(o=>!i.value.includes(o.uid)).map(({value:o})=>o).reduce((o,a)=>o+a,0)),c=e.computed(()=>$.value.filter(o=>!i.value.includes(o.uid)).map(({name:o,value:a,color:l=null,uid:n},u)=>({uid:n,name:o,color:l||r.convertColorToHex(l)||W.value[u]||r.palette[u]||r.palette[u%r.palette.length],value:a,proportion:G(a),percentage:a/p.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*G(a)})).toSorted((o,a)=>a.value-o.value));function se(){return c.value.map(({name:o,color:a,value:l,absoluteValues:n,percentage:u})=>({name:o,color:a,value:l,absoluteValues:n,percentage:u}))}const d=e.computed(()=>re.value-t.value.style.chart.layout.rings.strokeWidth*2),L=e.ref(null);function ie(o,a){if(i.value.length===v.dataset.length)return;L.value={datapoint:a,seriesIndex:o,series:c.value,config:t.value},m.value=o;const l=c.value[o],n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:a,series:c.value,config:t.value})))_.value=n({seriesIndex:o,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:o})}
2
- </b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${r.dataLabel({v:l.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${r.dataLabel({v:l.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),_.value=u}T.value=!0}const f=e.computed(()=>{const o=c.value.map(l=>({name:l.name,color:l.color})),a=c.value.map(l=>l.value);return{head:o,body:a}}),S=e.computed(()=>{const o=[' <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>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=f.value.head.map((u,h)=>[{color:u.color,name:u.name},r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(f.value.body[h]/p.value)?"-":(f.value.body[h]/p.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),l={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},n=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:o,body:a,config:l,colNames:n}});function X(){e.nextTick(()=>{const o=f.value.head.map((n,u)=>[[n.name],[f.value.body[u]],[isNaN(f.value.body[u]/p.value)?"-":f.value.body[u]/p.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-rings"})})}const C=e.ref(!1);function ce(o){C.value=o,A.value+=1}function Y(){g.value.showTable=!g.value.showTable}function J(){g.value.showTooltip=!g.value.showTooltip}const P=e.ref(!1);function V(){P.value=!P.value}return te({getData:se,generatePdf:U,generateCsv:X,generateImage:H,toggleTable:Y,toggleTooltip:J,toggleAnnotator:V}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:y,class:e.normalizeClass(`vue-ui-rings ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${k.value}`,onMouseleave:a[3]||(a[3]=l=>{m.value=null,T.value=!1})},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(be.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:P.value,onClose:V},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:E,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ve._sfc_main,{key:`title_${F.value}`,config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(Q.UserOptions,{ref_key:"details",ref:ae,key:`user_options_${A.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(q),isImaging:e.unref(D),uid:k.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:g.value.showTooltip,isFullscreen:C.value,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:P.value,onToggleFullscreen:ce,onGeneratePdf:e.unref(U),onGenerateCsv:X,onGenerateImage:e.unref(H),onToggleTable:Y,onToggleTooltip:J,onToggleAnnotator:V},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ye._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${k.value}_${n}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(l.color,.05),100-t.value.style.chart.layout.rings.gradient.intensity)},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,Ne)],8,xe))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*l.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*l.proportion/2*.9<=0?1e-4:d.value*l.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,$e),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":l.strokeWidth<.5?.5:l.strokeWidth,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*l.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*l.proportion/2*.9<=0?1e-4:d.value*l.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${k.value}_${n})`:l.color},null,14,Se),e.createElementVNode("circle",{"data-cy-trap":"",stroke:"none",cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*l.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*l.proportion/2*.9<=0?1e-4:d.value*l.proportion/2*.9),fill:"transparent",onMouseenter:u=>ie(n,l),onMouseleave:a[0]||(a[0]=u=>{m.value=null,T.value=!1})},null,40,Pe)]))),256)),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,we)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",_e,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(fe.default,{key:5,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ge.Legend,{key:`legend_${I.value}`,legendSet:j.value,config:ue.value,onClickMarker:a[1]||(a[1]=({legend:l})=>B(l.uid))},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>B(l.uid),style:e.normalizeStyle(`opacity:${i.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:n}))+" ",1),i.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",Ve," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Le," ("+e.toDisplayString(isNaN(l.value/p.value)?"-":e.unref(r.dataLabel)({v:l.value/p.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Be)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:j.value},void 0,!0)],512),e.createVNode(pe._sfc_main,{show:g.value.showTooltip&&T.value&&i.value.length<v.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:y.value,content:_.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),x.value?(e.openBlock(),e.createBlock(me.default,{key:6,hideDetails:"",config:{open:g.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:e.withCtx(()=>[(e.openBlock(),e.createBlock(he.DataTable,{key:`table_${O.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>g.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ae)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ce))}},ze=ke._export_sfc(Ee,[["__scopeId","data-v-985560ab"]]);exports.default=ze;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-FfZRtJ6A.cjs"),me=require("./useResponsive-B3TrDDIG.cjs"),$e=require("./Title-Co5jI5ed.cjs"),ge=require("./usePrinter-BCAFeO_J.cjs"),Ee=require("./Tooltip-Bl6W8Zn7.cjs"),Le=require("./Legend-YZ7Hz3o1.cjs"),ke=require("./Shape-X2F-QV_B.cjs"),ze=require("./DataTable-DJzhv96s.cjs"),Ve=require("./vue-ui-skeleton-Djv08J67.cjs"),Ae=require("./vue-ui-accordion-xXgqfR2l.cjs"),xe=require("./useNestedProp-q7byAAIJ.cjs"),Te=require("./PackageVersion-DVZtsuy4.cjs"),Pe=require("./PenAndPaper-CyXm-yVL.cjs"),De=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Fe=["id"],Oe=["xmlns","viewBox"],We={key:0},qe=["x1","x2","y1","y2","stroke","stroke-width"],Ie=["x1","x2","y1","y2","stroke","stroke-width"],Xe={key:1},Ye=["points","fill","stroke-width","stroke-dasharray","stroke"],je={key:0},Re=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],Ge={key:1},Ue={key:2},He=["id"],Je=["stop-color"],Ke=["stop-color"],Qe=["id"],Ze=["stop-color"],et=["stop-color"],tt=["x","y","width","height","fill","stroke","stroke-width","rx"],lt=["x","y","height","width","fill","stroke","stroke-width","rx"],at={key:0},ot=["d","stroke","stroke-width"],st=["d","stroke","stroke-width"],rt=["d","stroke","stroke-width"],nt=["d","stroke","stroke-width"],ut={key:3,style:{"pointer-events":"none !important"}},it=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ct=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],yt=["x","y","font-size","fill","font-weight","text-anchor"],vt=["x","y","font-size","fill","font-weight"],dt=["cx","cy","r","fill","stroke","stroke-width"],pt=["cx","cy","r","fill","stroke","stroke-width"],ht=["x","y","font-size","fill","font-weight","text-anchor"],ft={key:4},mt=["x","y","font-size","fill"],gt=["x","y","font-size","fill"],kt=["id","transform","font-size","font-weight","fill"],xt={key:5},bt=["x","y","font-size","fill"],Bt=["x","y","font-size","fill"],wt=["font-size","font-weight","fill","x","y"],_t=["id"],Ct=["x","y","width","height"],Nt={key:6},Mt=["x1","x2","y1","y2","stroke-dasharray","stroke","stroke-width","clip-path"],St=["x","y","fill","font-size","font-weight"],$t={key:4,class:"vue-data-ui-watermark"},Et=["onClick"],Lt={key:0,style:{width:"100%",display:"flex","align-items":"center","justify-content":"center"}},zt={viewBox:"0 0 20 20",height:"20",width:"20",style:{overflow:"hidden",background:"transparent"}},Vt={key:0},At=["innerHTML"],Tt={__name:"vue-ui-scatter",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(be,{expose:Be}){const C=be,{vue_ui_scatter:we}=s.useConfig(),P=e.computed(()=>!!C.dataset&&C.dataset.length),g=e.ref(s.createUid()),_e=e.ref(null),I=e.ref(!1),X=e.ref(""),J=e.ref(0),V=e.ref(null),K=e.ref(null),Q=e.ref(null),Z=e.ref(0),ee=e.ref(0),te=e.ref(0),t=e.computed({get:()=>le(),set:a=>a});function le(){const a=xe.useNestedProp({userConfig:C.config,defaultConfig:we});return a.theme?{...xe.useNestedProp({userConfig:s.themes.vue_ui_scatter[a.theme]||C.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}e.watch(()=>C.config,a=>{t.value=le(),ae(),Z.value+=1,ee.value+=1,te.value+=1},{deep:!0});const D=e.ref(null);e.onMounted(()=>{ae()});function ae(){if(s.objectIsEmpty(C.dataset)&&s.error({componentName:"VueUiScatter",type:"dataset"}),t.value.responsive){const a=me.throttle(()=>{const{width:u,height:l}=me.useResponsive({chart:V.value,title:t.value.style.title.text?K.value:null,legend:t.value.style.legend.show?Q.value:null});k.value.width=u,k.value.height=l});D.value=new ResizeObserver(a),D.value.observe(V.value.parentNode)}}e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const{isPrinting:oe,isImaging:se,generatePdf:re,generateImage:ne}=ge.usePrinter({elementId:`vue-ui-scatter_${g.value}`,fileName:t.value.style.title.text||"vue-ui-scatter"}),ue=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),M=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),k=e.ref({height:t.value.style.layout.height,width:t.value.style.layout.width}),F=e.computed(()=>t.value.style.layout.marginalBars.show?t.value.style.layout.marginalBars.size+t.value.style.layout.marginalBars.offset:0),n=e.computed(()=>({top:t.value.style.layout.padding.top+F.value,right:k.value.width-t.value.style.layout.padding.right-F.value,bottom:k.value.height-t.value.style.layout.padding.bottom,left:t.value.style.layout.padding.left,height:k.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom-F.value,width:k.value.width-t.value.style.layout.padding.left-t.value.style.layout.padding.right-F.value})),y=e.computed(()=>{C.dataset.forEach((o,i)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["values"]}).forEach(h=>{s.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:h,index:i})}),o.values&&o.values.forEach((h,E)=>{s.getMissingDatasetAttributes({datasetObject:h,requiredAttributes:["x","y"]}).forEach(A=>{s.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:`values.${A}`,index:`${i} - ${E}`})})})});const a=Math.min(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),u=Math.max(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),l=Math.min(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y))),r=Math.max(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y)));return{xMin:a>=0?0:a,xMax:u,yMin:l>=0?0:l,yMax:r}}),v=e.computed(()=>({x:n.value.left+Math.abs(y.value.xMin)/(y.value.xMax+Math.abs(y.value.xMin))*n.value.width,y:n.value.bottom-Math.abs(y.value.yMin)/(y.value.yMax+Math.abs(y.value.yMin))*n.value.height})),$=e.computed(()=>C.dataset.map((a,u)=>{const l=`cluster_${g.value}_${u}`;return{...a,id:l,color:a.color?a.color:ue.value[u]||s.palette[u]||s.palette[u%s.palette.length],opacity:p.value.includes(l)?.5:1,shape:a.shape??"circle",segregate:()=>de(l),isSegregated:p.value.includes(l)}})),Ce=e.computed(()=>({cy:"scatter-div-legend",backgroundColor:t.value.style.legend.backgroundColor,color:t.value.style.legend.color,fontSize:t.value.style.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.legend.bold?"bold":""})),Y=e.computed(()=>$.value.map((a,u)=>({...a,plots:a.values.map(l=>({x:n.value.left+(l.x+Math.abs(y.value.xMin))/(y.value.xMax+Math.abs(y.value.xMin))*n.value.width,y:n.value.bottom-(l.y+Math.abs(y.value.yMin))/(y.value.yMax+Math.abs(y.value.yMin))*n.value.height,v:{...l,name:l.name||""},clusterName:a.name,color:a.color?a.color:ue.value[u]||s.palette[u]||s.palette[u%s.palette.length],id:`plot_${g.value}_${Math.random()}`,weight:l.weight??t.value.style.layout.plots.radius}))})).filter(a=>!p.value.includes(a.id))),x=e.computed(()=>Y.value.map(a=>{const u=a.plots.reduce((d,L)=>d+L.x,0)/a.plots.length,l=a.plots.reduce((d,L)=>d+L.y,0)/a.plots.length;let r=0,o=0,i=0;for(const d of a.plots)r+=(d.x-u)*(d.y-l),o+=(d.x-u)**2,i+=(d.y-l)**2;const h=r/Math.sqrt(o*i),E=h*(Math.sqrt(i)/Math.sqrt(o)),A=l-E*u,_={x1:n.value.left,x2:n.value.right,y1:E*n.value.left+A,y2:E*n.value.right+A,coefficient:h},m=(_.y2-_.y1)/(_.x2-_.x1),B=_.y1-m*_.x1,N=Math.min(k.value.width-t.value.style.layout.padding.right,Math.max(t.value.style.layout.padding.left,(n.value.top-B)/m)),q={x:N,y:m*N+B<=t.value.style.layout.padding.top?n.value.top:m*N+B};return{...a,correlation:_,label:q,plots:a.plots.map(d=>{const L=(d.x+m*d.y-m*B)/(1+Math.pow(m,2)),G=(m*d.x+Math.pow(m,2)*d.y+B)/(1+Math.pow(m,2)),f=Math.sqrt(Math.pow(d.x-L,2)+Math.pow(d.y-G,2));return{...d,deviation:f,shape:a.shape,color:a.color}})}})),ie=e.computed(()=>Math.max(...x.value.flatMap(a=>a.plots.map(u=>Math.abs(u.deviation)))));function Ne(){return x.value}function ce(a,u){const l=Array.isArray(a)?a.flatMap(f=>f.plots.map(z=>({x:z.x,y:z.y}))):a.plots.map(f=>({x:f.x,y:f.y}));let r=1/0,o=-1/0,i=1/0,h=-1/0;l.forEach(({x:f,y:z})=>{r=Math.min(r,f),o=Math.max(o,f),i=Math.min(i,z),h=Math.max(h,z)});const E=o-r,A=h-i,_=E/u,m=A/u,B=Array(u).fill(0),N=Array(u).fill(0);l.forEach(({x:f,y:z})=>{const U=Math.floor((f-r)/_),H=Math.floor((z-i)/m);B[U]||(B[U]=0),N[H]||(N[H]=0),B[U]+=1,N[H]+=1});const q=[],d=[];for(let f=0;f<u;f+=1)q.push(r+(f+.5)*_),d.push(i+(f+.5)*m);const L=Math.max(...B),G=Math.max(...N);return{x:B,y:N,avgX:q,avgY:d,maxX:L,maxY:G}}const S=e.computed(()=>t.value.style.layout.marginalBars.tranches),b=e.computed(()=>ce(Y.value,S.value)),Me=e.computed(()=>{const a=n.value.top-t.value.style.layout.marginalBars.offset,u=n.value.right+t.value.style.layout.marginalBars.offset;return Y.value.map(l=>{const r=ce(l,S.value);return{coords:r,dX:s.createSmoothPath(r.avgX.map((o,i)=>({x:o,y:a-r.x[i]/r.maxX*t.value.style.layout.marginalBars.size}))),dY:s.createSmoothPathVertical(r.avgY.map((o,i)=>({y:o,x:u+t.value.style.layout.marginalBars.size*r.y[i]/r.maxY}))),color:l.color,id:l.id}})}),w=e.ref(void 0),c=e.ref(null),j=e.ref(null);function ye(a,u){w.value=a.id,c.value=a;let l="";j.value={datapoint:a,seriesIndex:u,series:x.value,config:t.value};const r=t.value.style.tooltip.customFormat;s.isFunction(r)&&s.functionReturnsString(()=>r({datapoint:a,seriesIndex:u,series:x.value,config:t.value}))?X.value=r({datapoint:a,seriesIndex:u,series:x.value,config:t.value}):(a.clusterName&&(l+=`<div style="display:flex;gap:3px;align-items:center">${a.clusterName}</div>`),a.v.name&&(l+=`<div>${a.v.name}</div>`),l+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,l+=`<div>${t.value.style.layout.dataLabels.xAxis.name}: <b>${isNaN(a.v.x)?"-":s.applyDataLabel(t.value.style.layout.plots.selectors.labels.x.formatter,a.v.x,s.dataLabel({p:t.value.style.tooltip.prefix,v:a.v.x,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:a,seriesIndex:u})}</b></div>`,l+=`<div>${t.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(a.v.y)?"-":s.applyDataLabel(t.value.style.layout.plots.selectors.labels.y.formatter,a.v.y,s.dataLabel({p:t.value.style.tooltip.prefix,v:a.v.y,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:a,seriesIndex:u})}</b></div>`,l+=`${t.value.style.layout.plots.deviation.translation}: <b>${s.dataLabel({v:a.deviation,r:t.value.style.layout.plots.deviation.roundingValue})}</b>`,l+="</div>",X.value=`<div>${l}</div>`),I.value=!0}function ve(){I.value=!1,w.value=void 0,c.value=null}const p=e.ref([]);function de(a){p.value.includes(a)?p.value=p.value.filter(u=>u!==a):p.value.length<C.dataset.length-1&&p.value.push(a)}function pe(){e.nextTick(()=>{const a=["",t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],u=x.value.map(o=>[o.name,o.correlation.coefficient,o.plots.length,o.plots.map(i=>i.v.x).reduce((i,h)=>i+h,0)/o.plots.length,o.plots.map(i=>i.v.y).reduce((i,h)=>i+h,0)/o.plots.length]),l=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([a]).concat(u),r=s.createCsvContent(l);s.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const O=e.computed(()=>{const a=[t.value.table.translations.series,t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],u=x.value.map(r=>[{shape:r.shape,content:r.name,color:r.color},Number((r.correlation.coefficient??0).toFixed(t.value.table.td.roundingValue)).toLocaleString(),r.plots.length.toLocaleString(),Number((r.plots.map(o=>o.v.x??0).reduce((o,i)=>o+i,0)/r.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString(),Number((r.plots.map(o=>o.v.y??0).reduce((o,i)=>o+i,0)/r.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString()]),l={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};return{head:a,body:u,config:l,colNames:a}}),T=e.ref(!1);function Se(a){T.value=a,J.value+=1}function he(){M.value.showTable=!M.value.showTable}function fe(){M.value.showTooltip=!M.value.showTooltip}const W=e.ref(!1);function R(){W.value=!W.value}return Be({getData:Ne,generatePdf:re,generateCsv:pe,generateImage:ne,toggleTable:he,toggleTooltip:fe,toggleAnnotator:R}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-scatter ${T.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"scatterChart",ref:V,id:`vue-ui-scatter_${g.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe.PenAndPaper,{key:0,parent:V.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:W.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:K,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock($e._sfc_main,{key:`title_${Z.value}`,config:{title:{cy:"scatter-div-title",...t.value.style.title},subtitle:{cy:"scatter-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value?(e.openBlock(),e.createBlock(ge.UserOptions,{ref_key:"details",ref:_e,key:`user_options_${J.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(se),isPrinting:e.unref(oe),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:M.value.showTooltip,isFullscreen:T.value,titles:{...t.value.userOptions.buttonTitles},chartElement:V.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:W.value,onToggleFullscreen:Se,onGeneratePdf:e.unref(re),onGenerateCsv:pe,onGenerateImage:e.unref(ne),onToggleTable:he,onToggleTooltip:fe,onToggleAnnotator:R},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":T.value,"vue-data-ui-fulscreen--off":!T.value}),viewBox:`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(Te._sfc_main),t.value.style.layout.axis.show?(e.openBlock(),e.createElementBlock("g",We,[e.createElementVNode("line",{x1:v.value.x,x2:v.value.x,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,qe),e.createElementVNode("line",{x1:n.value.left,x2:n.value.right,y1:v.value.y,y2:v.value.y,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Ie)])):e.createCommentVNode("",!0),t.value.style.layout.plots.giftWrap.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[l.plots.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(s.giftWrap)({series:l.plots}),fill:e.unref(s.setOpacity)(l.color,t.value.style.layout.plots.giftWrap.fillOpacity*100),"stroke-width":t.value.style.layout.plots.giftWrap.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.giftWrap.strokeDasharray,stroke:l.color,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Ye)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[!l.shape||l.shape==="circle"?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(o,i)=>(e.openBlock(),e.createElementBlock("circle",{cx:o.x,cy:o.y,r:w.value&&w.value===o.id?o.weight*2:o.weight,fill:e.unref(s.setOpacity)(l.color,t.value.style.layout.plots.opacity*100),stroke:t.value.style.layout.plots.stroke,"stroke-width":t.value.style.layout.plots.strokeWidth,onMouseover:h=>ye(o,r),onMouseleave:ve,style:e.normalizeStyle(`opacity:${w.value&&w.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/ie.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,44,Re))),256))])):(e.openBlock(),e.createElementBlock("g",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(o,i)=>(e.openBlock(),e.createBlock(ke._sfc_main,{plot:{x:o.x,y:o.y},radius:w.value&&w.value===o.id?o.weight*2:o.weight,shape:l.shape,color:e.unref(s.setOpacity)(l.color,t.value.style.layout.plots.opacity*100),stroke:t.value.style.layout.plots.stroke,strokeWidth:t.value.style.layout.plots.strokeWidth,onMouseover:h=>ye(o,r),onMouseleave:ve,style:e.normalizeStyle(`opacity:${w.value&&w.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/ie.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,8,["plot","radius","shape","color","stroke","strokeWidth","onMouseover","style"]))),256))]))]))),256)),t.value.style.layout.marginalBars.show?(e.openBlock(),e.createElementBlock("g",Ue,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`marginal_x_${g.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.marginalBars.fill},null,8,Je),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,Ke)],8,He),e.createElementVNode("linearGradient",{id:`marginal_y_${g.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.backgroundColor},null,8,Ze),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.marginalBars.fill},null,8,et)],8,Qe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.x,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[l&&b.value.avgX[r]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:b.value.avgX[r]-n.value.width/S.value/2,y:n.value.top-t.value.style.layout.marginalBars.offset-l/b.value.maxX*t.value.style.layout.marginalBars.size,width:n.value.width/S.value<=0?1e-4:n.value.width/S.value,height:l/b.value.maxX*t.value.style.layout.marginalBars.size<=0?1e-4:l/b.value.maxX*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_x_${g.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,tt)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.y,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[l&&b.value.avgY[r]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:n.value.right+t.value.style.layout.marginalBars.offset,y:b.value.avgY[r]-n.value.height/S.value/2,height:n.value.height/S.value<=0?1e-4:n.value.height/S.value,width:l/b.value.maxY*t.value.style.layout.marginalBars.size<=0?1e-4:l/b.value.maxY*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_y_${g.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,lt)):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.marginalBars.showLines?(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Me.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${l.dX}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,ot)),p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${l.dX}`,stroke:l.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,st)),p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${l.dY}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,rt)),p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${l.dY}`,stroke:l.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,nt))],64))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.value&&t.value.style.layout.plots.selectors.show?(e.openBlock(),e.createElementBlock("g",ut,[e.createElementVNode("line",{x1:v.value.x,x2:c.value.x,y1:c.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,it),e.createElementVNode("line",{x1:c.value.x,x2:c.value.x,y1:v.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,ct),e.createElementVNode("text",{x:v.value.x+(c.value.x>v.value.x?-6:6),y:c.value.y+t.value.style.layout.plots.selectors.labels.fontSize/3,"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x>v.value.x?"end":"start"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(c.value.v.y),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(c.value.v.y),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,yt),e.createElementVNode("text",{x:c.value.x,y:v.value.y+(c.value.y>v.value.y?-6:t.value.style.layout.plots.selectors.labels.fontSize+6),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(c.value.v.x),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(c.value.v.x),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,vt),e.createElementVNode("circle",{cx:v.value.x,cy:c.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,dt),e.createElementVNode("circle",{cx:c.value.x,cy:v.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,pt),t.value.style.layout.plots.selectors.labels.showName?(e.openBlock(),e.createElementBlock("text",{key:0,x:c.value.x,y:c.value.y+(c.value.y<v.value.y?-t.value.style.layout.plots.selectors.labels.fontSize/2:t.value.style.layout.plots.selectors.labels.fontSize),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x<n.value.left+100?"start":c.value.x>n.value.right-100?"end":c.value.x>v.value.x?"start":"end"},e.toDisplayString(c.value.v.name),9,ht)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",ft,[e.createElementVNode("text",{x:n.value.left-5,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,e.unref(s.checkNaN)(y.value.xMin),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.xMin),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,mt),e.createElementVNode("text",{x:n.value.right+3,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"start","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,e.unref(s.checkNaN)(y.value.xMax),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.xMax),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,gt),e.createElementVNode("text",{id:`vue-ui-scatter-xAxis-label-${g.value}`,transform:`translate(${t.value.style.layout.dataLabels.xAxis.fontSize*2}, ${n.value.top+n.value.height/2}), rotate(-90)`,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.name),9,kt)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",xt,[e.createElementVNode("text",{x:v.value.x,y:n.value.bottom+t.value.style.layout.dataLabels.yAxis.fontSize+3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(y.value.yMin),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.yMin),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,bt),e.createElementVNode("text",{x:v.value.x,y:n.value.top-t.value.style.layout.dataLabels.yAxis.fontSize/2,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(y.value.yMax),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.yMax),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,Bt),e.createElementVNode("text",{"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.yAxis.color,x:n.value.left+n.value.width/2,y:n.value.bottom+8+t.value.style.layout.dataLabels.yAxis.fontSize*2},e.toDisplayString(t.value.style.layout.dataLabels.yAxis.name),9,wt)])):e.createCommentVNode("",!0),e.createElementVNode("clipPath",{id:`clip_path_${g.value}`},[e.createElementVNode("rect",{x:n.value.left,y:n.value.top,width:n.value.width<=0?1e-4:n.value.width,height:n.value.height<=0?1e-4:n.value.height},null,8,Ct)],8,_t),t.value.style.layout.correlation.show?(e.openBlock(),e.createElementBlock("g",Nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:l.correlation.x1,x2:l.correlation.x2,y1:l.correlation.y1,y2:l.correlation.y2,"stroke-dasharray":t.value.style.layout.correlation.strokeDasharray,stroke:l.color,"stroke-width":t.value.style.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${g.value})`},null,8,Mt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.correlation.label.show?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.label.x,y:l.label.y,fill:t.value.style.layout.correlation.label.useSerieColor?l.color:t.value.style.layout.correlation.label.color,"font-size":t.value.style.layout.correlation.label.fontSize,"font-weight":t.value.style.layout.correlation.label.bold?"bold":"normal"},e.toDisplayString(e.unref(s.dataLabel)({v:e.unref(s.checkNaN)(l.correlation.coefficient),r:t.value.style.layout.correlation.label.roundingValue})),9,St)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:k.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",$t,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(oe)||e.unref(se)})),void 0,!0)])):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ve.default,{key:5,config:{type:"quadrant",style:{backgroundColor:t.value.style.backgroundColor,quadrant:{grid:{color:t.value.style.layout.axis.stroke},plots:{color:t.value.style.layout.axis.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:Q},[t.value.style.legend.show?(e.openBlock(),e.createBlock(Le.Legend,{key:`legend_${te.value}`,legendSet:$.value,config:Ce.value,onClickMarker:u[0]||(u[0]=({legend:l})=>de(l.id))},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{onClick:r=>l.segregate(),style:e.normalizeStyle(`opacity:${p.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name),13,Et)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:$.value},void 0,!0)],512),e.createVNode(Ee._sfc_main,{show:M.value.showTooltip&&I.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:V.value,content:X.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),default:e.withCtx(()=>[t.value.style.tooltip.showShape?(e.openBlock(),e.createElementBlock("div",Lt,[(e.openBlock(),e.createElementBlock("svg",zt,[e.createVNode(ke._sfc_main,{shape:c.value.shape,color:c.value.color,plot:{x:10,y:10},radius:7},null,8,["shape","color"])]))])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),P.value?(e.openBlock(),e.createBlock(Ae.default,{key:6,hideDetails:"",config:{open:M.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ze.DataTable,{key:`table_${ee.value}`,colNames:O.value.colNames,head:O.value.head,body:O.value.body,config:O.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:u[1]||(u[1]=l=>M.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[l.shape?(e.openBlock(),e.createElementBlock("div",Vt,[e.createElementVNode("span",null,e.toDisplayString(l.content),1)])):(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:l},null,8,At))]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Fe))}},Pt=De._export_sfc(Tt,[["__scopeId","data-v-53b514cf"]]);exports.default=Pt;