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,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-FfZRtJ6A.cjs"),be=require("./useResponsive-B3TrDDIG.cjs"),re=require("./BaseIcon-BGExhz6v.cjs"),Re=require("./Tooltip-Bl6W8Zn7.cjs"),Be=require("./usePrinter-BCAFeO_J.cjs"),Ie=require("./Slicer-CL0tP5a5.cjs"),Oe=require("./vue-ui-skeleton-Djv08J67.cjs"),we=require("./useNestedProp-q7byAAIJ.cjs"),De=require("./PackageVersion-DVZtsuy4.cjs"),Me=require("./PenAndPaper-CyXm-yVL.cjs"),Ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},qe=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function We({dataset:s,barLineSwitch:B=6}){let h=null,L=null,z=0;if((typeof s=="number"||typeof s=="string")&&console.warn(`The provided dataset (${s}) is not sufficient to build a chart`),Q(s)&&(P(s)&&(s.length<B?h=S.BAR:h=S.LINE,L=s,z=s.length),ie(s))){if(!Ge(s))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const U=Object.keys(s[0]),j=Object.values(s[0]);if(!U.some(E=>He(E)))return console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."),!1;Ee(j,E=>typeof E=="number")&&(h=S.DONUT,L=s),Ee(j,E=>Array.isArray(E)&&P(E))&&(Ae(s)>B?h=S.LINE:h=S.BAR,z=Ae(s),L=s.map(E=>({...E,data:Xe(E,$=>P($))}))),s=s.map(E=>Le(E)),L=L.map(E=>Le(E))}return Q(s)&&[...new Set(s.flatMap(U=>Array.isArray(U)))][0],{dataset:s,type:h,usableDataset:L,maxSeriesLength:z}}function _e(s){return!s||Q(s)&&!s.length}function Q(s){return Array.isArray(s)}function P(s){if(!Q(s)||_e(s))return!1;const B=s.map(h=>Number(h));return![...new Set(B.flatMap(h=>typeof h=="number"&&!isNaN(h)))].includes(!1)}function ie(s){return!Q(s)||_e(s)||!![...new Set(s.flatMap(h=>typeof h=="object"&&!Array.isArray(h)))].includes(!1)?!1:!s.map(h=>Object.keys(h).length>0).includes(!1)}function je(s,B){const h=Object.keys(s).sort(),L=Object.keys(B).sort();if(h.length!==L.length)return!1;for(let z=0;z<h.length;z+=1){const V=h[z],M=L[z];if(V!==M||typeof s[V]!=typeof B[M])return!1}return!0}function Ge(s){if(s.length<=1)return!0;for(let B=0;B<s.length;B+=1)for(let h=B+1;h<s.length;h+=1)if(!je(s[B],s[h]))return!1;return!0}function He(s){return qe.includes(s.toUpperCase())}function Ee(s,B){let h=[];for(let L=0;L<s.length;L+=1)h.push(B(s[L]));return h.includes(!0)}function Ae(s){return Math.max(...[...s].flatMap(B=>Object.values(B).filter(h=>P(h)).map(h=>h.length)))}function Xe(s,B){return Object.values(s).filter(h=>B(h))[0]}function Le(s){const B={};for(let h in s)s.hasOwnProperty(h)&&(B[h.toUpperCase()]=s[h]);return B}const Ce=s=>(e.pushScopeId("data-v-e73a7249"),s=s(),e.popScopeId(),s),Ye=["id"],Ze=["xmlns","viewBox"],Je=["id"],Qe=["id"],Ke=Ce(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),et=["id"],tt=["flood-color"],lt={key:0,class:"donut-label-connectors"},at=["d","stroke","stroke-width","filter"],ot=["cx","cy","r","fill","filter"],nt={class:"donut"},rt=["d","fill","stroke","stroke-width","filter"],it=["d","onMouseenter","onClick"],ut={key:1,class:"donut-labels quick-animation"},st=["cx","cy","fill","stroke","filter"],ct=["text-anchor","x","y","fill","font-size","filter"],dt=["text-anchor","x","y","fill","font-size","filter"],vt={key:2,class:"donut-hollow quick-animation"},mt=["x","y","font-size","fill"],ht=["x","y","font-size","fill"],pt={key:0,class:"line-grid"},ft=["x1","x2","y1","y2","stroke","stroke-width"],kt=["x1","x2","y1","y2","stroke","stroke-width"],gt={key:1,class:"line-axis"},yt=["x1","x2","y1","y2","stroke","stroke-width"],xt=["x1","x2","y1","y2","stroke","stroke-width"],St={key:2,class:"yLabels"},bt=["x1","x2","y1","y2","stroke","stroke-width"],Bt=["x","y","font-size","fill"],wt={key:3,class:"periodLabels"},Et=["x1","x2","y1","y2","stroke","stroke-width"],At=["font-size","text-anchor","fill","transform"],Lt={class:"plots"},_t={class:"line-plot-series"},Ct=["d","stroke","stroke-width"],Nt=["d","stroke","stroke-width"],zt=["d","stroke","stroke-width"],Vt=["d","stroke","stroke-width"],Ft=["cx","cy","fill","stroke"],$t={key:4,class:"dataLabels"},Pt=["font-size","fill","x","y"],Tt={class:"tooltip-traps"},Rt=["x","y","height","width","fill","onMouseenter","onClick"],It={key:0,class:"line-grid"},Ot=["x1","x2","y1","y2","stroke","stroke-width"],Dt=["x1","x2","y1","y2","stroke","stroke-width"],Mt={key:1,class:"line-axis"},Ut=["x1","x2","y1","y2","stroke","stroke-width"],qt=["x1","x2","y1","y2","stroke","stroke-width"],Wt={key:2,class:"yLabels"},jt=["x1","x2","y1","y2","stroke","stroke-width"],Gt=["x","y","font-size","fill"],Ht={key:3,class:"periodLabels"},Xt=["x1","x2","y1","y2","stroke","stroke-width"],Yt=["font-size","text-anchor","transform","fill"],Zt={class:"plots"},Jt=["x","width","height","y","fill","stroke","stroke-width"],Qt=["to"],Kt=["from","to"],el={key:4,class:"dataLabels"},tl=["x","y","font-size","fill"],ll={class:"tooltip-traps"},al=["x","y","height","width","fill","onMouseenter","onClick"],ol={key:3,class:"axis-labels"},nl={key:0},rl=["font-size","fill","x","y"],il={key:1},ul=["font-size","fill","x","y"],sl={key:2},cl=["font-size","fill","transform"],dl={key:3},vl=["font-size","fill","transform"],ml={key:5,class:"vue-data-ui-watermark"},hl=["onClick"],pl=["onClick"],fl=["onClick"],kl={key:1,class:"vue-ui-quick-chart-not-processable"},gl=Ce(()=>e.createElementVNode("span",null,"Dataset is not processable",-1)),yl={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(s,{expose:B,emit:h}){const L=s,{vue_ui_quick_chart:z}=u.useConfig(),V=e.ref(null),M=e.ref(null),U=e.ref(null),j=e.ref(null),E=e.ref(u.createUid()),$=e.ref(!1),G=e.ref(null),R=e.ref(""),F=e.ref(null),x=e.ref([]),de=e.ref(0),K=e.ref(0),t=e.computed({get:()=>ve(),set:n=>n});function ve(){const n=we.useNestedProp({userConfig:L.config,defaultConfig:z});return n.theme?{...we.useNestedProp({userConfig:u.themes.vue_ui_quick_chart[n.theme]||L.config,defaultConfig:n}),customPalette:u.themePalettes[n.theme]||u.palette}:n}e.watch(()=>L.config,n=>{t.value=ve(),y.value.width=t.value.width,y.value.height=t.value.height,pe()},{deep:!0}),e.watch(()=>L.dataset,n=>{f.value=X.value,k.value.start=0,k.value.end=f.value.maxSeriesLength,K.value+=1},{deep:!0});const H=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),X=e.computed(()=>{const n=We({dataset:u.sanitizeArray(L.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return n||console.error("VueUiQuickChart : Dataset is not processable"),n}),f=e.ref(X.value),Ne=e.computed(()=>!!f.value),b=e.computed(()=>f.value?f.value.type:null);e.watch(()=>b.value,n=>{n||u.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:ee,isImaging:te,generatePdf:me,generateImage:he}=Be.usePrinter({elementId:`${b.value}_${E.value}`,fileName:t.value.title||b.value}),y=e.ref({width:t.value.width,height:t.value.height}),le=e.ref({showTooltip:t.value.showTooltip}),ae=e.ref(null);e.onMounted(()=>{pe()});function pe(){if(t.value.responsive){const n=be.throttle(()=>{const{width:v,height:l}=be.useResponsive({chart:V.value,title:t.value.title?M.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&f.value.maxSeriesLength>1?j.value:null});y.value.width=v,y.value.height=l});ae.value=new ResizeObserver(n),ae.value.observe(V.value.parentNode)}}e.onBeforeUnmount(()=>{ae.value&&ae.value.disconnect()});const ze=e.computed(()=>{switch(b.value){case S.LINE:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;case S.BAR:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;case S.DONUT:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;default:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`}});function fe(n){return[...n].map(v=>v.value).reduce((v,l)=>v+l,0)}function Y(n){return t.value.blurOnHover&&![null,void 0].includes(F.value)&&F.value!==n?`url(#blur_${E.value})`:""}function ke(n,v){x.value.includes(n)?x.value=x.value.filter(l=>l!==n):x.value.length<v&&x.value.push(n)}const ge=e.ref(null),ye=e.ref(null),oe=e.ref(!1);function Ve(n,v){oe.value=!0;let l=n.value;if(x.value.includes(n.id)){let i=function(){l>r?(oe.value=!1,cancelAnimationFrame(ye.value),f.value={...f.value,dataset:f.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:r,VALUE:r}:m)}):(l+=r*.025,f.value={...f.value,dataset:f.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:l,VALUE:l}:m)},ye.value=requestAnimationFrame(i))};x.value=x.value.filter(m=>m!==n.id);const r=X.value.dataset.find((m,_)=>n.id===`donut_${_}`).VALUE;i()}else if(v.length>1){let r=function(){l<.1?(oe.value=!1,cancelAnimationFrame(ge.value),x.value.push(n.id),f.value={...f.value,dataset:f.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:0,VALUE:0}:i)}):(l/=1.1,f.value={...f.value,dataset:f.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:l,VALUE:l}:i)},ge.value=requestAnimationFrame(r))};r()}}const T=e.ref(null);function Fe(n){T.value=n}const xe=e.computed(()=>t.value.donutThicknessRatio<.15?.15:t.value.donutThicknessRatio>.4?.4:t.value.donutThicknessRatio),w=e.computed(()=>{if(b.value!==S.DONUT)return null;const n=f.value.dataset.map((a,o)=>({...a,value:a.VALUE||a.DATA||a.SERIE||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`donut_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],immutableValue:a.value}));function v(a,o){return u.dataLabel({v:isNaN(a.value/fe(o))?0:a.value/fe(o)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(a){return a.proportion*100>t.value.donutHideLabelUnderPercentage}function r(a,o){const g=X.value.dataset.find((A,C)=>`donut_${C}`===a).VALUE;return Math.abs(String(Number(g.toFixed(0))).length-String(Number(o.toFixed(0))).length)}function i({datapoint:a,seriesIndex:o}){G.value={datapoint:a,seriesIndex:o,config:t.value,dataset:n},F.value=a.id;const g=t.value.tooltipCustomFormat;if(u.isFunction(g)&&u.functionReturnsString(()=>g({datapoint:a,seriesIndex:o,series:n,config:t.value})))R.value=g({datapoint:a,seriesIndex:o,series:n,config:t.value});else{let p="";p+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`,p+=`<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="${a.color}"/></svg>`,p+=`<b>${u.applyDataLabel(t.value.formatter,a.value,u.dataLabel({p:t.value.valuePrefix,v:a.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:a,seriesIndex:o})}</b>`,p+=`<span>(${u.dataLabel({v:a.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,R.value=`<div>${p}</div>`}$.value=!0}function m(){$.value=!1,F.value=null,T.value=null}const _={centerX:y.value.width/2,centerY:y.value.height/2},N=n.filter(a=>!x.value.includes(a.id)).map(a=>a.value||0).reduce((a,o)=>a+o,0),q=n.map((a,o)=>({...a,proportion:(a.value||0)/N,value:a.value||0,absoluteValue:X.value.dataset.find((g,p)=>`donut_${p}`===a.id).VALUE})),I=y.value.width/2,W=y.value.height/2,O=y.value.height*t.value.donutRadiusRatio;return{dataset:q.filter(a=>!x.value.includes(a.id)),legend:q,drawingArea:_,displayArcPercentage:v,isArcBigEnough:l,useTooltip:i,killTooltip:m,getSpaces:r,total:N,cx:I,cy:W,radius:O,chart:u.makeDonut({series:n.filter(a=>!x.value.includes(a.id))},I,W,O,O,1.99999,2,1,360,105.25,y.value.height*xe.value)}}),k=e.ref({start:0,end:f.value.maxSeriesLength});function $e(){k.value={start:0,end:f.value.maxSeriesLength},K.value+=1}const Pe=e.computed(()=>{if(!t.value.zoomMinimap.show||b.value===S.DONUT)return[];let n=[];P(f.value.dataset)&&(n=f.value.dataset),ie(f.value.dataset)&&(n=f.value.dataset.map((i,m)=>({values:i.VALUE||i.DATA||i.SERIE||i.SERIES||i.VALUES||i.NUM||0,id:b.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(i=>!x.value.includes(i.id)));const v=P(n)?n.length:Math.max(...n.map(i=>i.values.length));let l=[];if(P(n))l=n;else for(let i=0;i<v;i+=1)l.push(n.map(m=>m.values[i]||0).reduce((m,_)=>(m||0)+(_||0),0));const r=Math.min(...l);return l.map(i=>i+(r<0?Math.abs(r):0))}),d=e.computed(()=>{if(b.value!==S.LINE)return null;const n={height:y.value.height,width:y.value.width},v={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:n.width-t.value.xyPaddingRight,bottom:n.height-t.value.xyPaddingBottom,width:n.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:n.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];P(f.value.dataset)&&(l=[{values:f.value.dataset.slice(k.value.start,k.value.end),absoluteIndices:f.value.dataset.map((a,o)=>o).slice(k.value.start,k.value.end),name:t.value.title,color:H.value[t.value.paletteStartIndex]||u.palette[t.value.paletteStartIndex],id:"line_0"}]),ie(f.value.dataset)&&(l=f.value.dataset.map((a,o)=>({...a,values:a.VALUE||a.DATA||a.SERIE||a.SERIES||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`line_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],values:a.values.slice(k.value.start,k.value.end),absoluteIndices:a.values.map((g,p)=>p).slice(k.value.start,k.value.end)})));const r={max:Math.max(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),min:Math.min(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),maxSeries:Math.max(...l.map(a=>a.values.length))},i=u.calculateNiceScale(r.min<0?r.min:0,r.max<0?0:r.max,t.value.xyScaleSegments),m=r.min<0?Math.abs(r.min):0,_=r.max<0?v.top:v.bottom-m/(i.max+m)*v.height,N=v.width/r.maxSeries,q=i.ticks.map(a=>({y:v.bottom-v.height*((a+m)/(i.max+m)),x:v.left-8,value:a})),I=l.map((a,o)=>({...a,coordinates:a.values.map((g,p)=>({x:v.left+N*(p+1)-N/2,y:v.bottom-(g+m)/(i.max+m)*v.height,value:g}))})).map(a=>{let o=[];return a.coordinates.forEach(g=>{o.push(`${g.x},${g.y} `)}),{...a,linePath:o.join(" ")}});function W(a){F.value=a,T.value=a;const o=l.map(p=>({...p,value:p.values[a],absoluteIndex:p.absoluteIndices[a]})).filter(p=>!x.value.includes(p.id));G.value={datapoint:o,seriesIndex:a,config:t.value,dataset:l};const g=t.value.tooltipCustomFormat;if(u.isFunction(g)&&u.functionReturnsString(()=>g({datapoint:o,seriesIndex:a,series:l,config:t.value})))R.value=g({datapoint:o,seriesIndex:a,series:l,config:t.value});else{let p="";t.value.xyPeriods[o[0].absoluteIndex]&&(p+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[o[0].absoluteIndex]}</div>`),o.forEach((A,C)=>{p+=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-eFox7weK.cjs"),Be=require("./useResponsive-CodiGUOE.cjs"),re=require("./BaseIcon-uALK38Ov.cjs"),Ie=require("./Tooltip-9Tp2Yrd1.cjs"),we=require("./usePrinter-CSRFnDBU.cjs"),Oe=require("./Slicer-uSjfNJjG.cjs"),De=require("./vue-ui-skeleton-BqKzuhkB.cjs"),Ee=require("./useNestedProp-BkgEhTQY.cjs"),Me=require("./PackageVersion-DwI-KhXH.cjs"),Ue=require("./PenAndPaper-CDFVOo7X.cjs"),qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},We=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function je({dataset:s,barLineSwitch:B=6}){let h=null,L=null,z=0;if((typeof s=="number"||typeof s=="string")&&console.warn(`The provided dataset (${s}) is not sufficient to build a chart`),Q(s)&&(P(s)&&(s.length<B?h=S.BAR:h=S.LINE,L=s,z=s.length),ie(s))){if(!He(s))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const U=Object.keys(s[0]),j=Object.values(s[0]);if(!U.some(E=>Xe(E)))return console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."),!1;Ae(j,E=>typeof E=="number")&&(h=S.DONUT,L=s),Ae(j,E=>Array.isArray(E)&&P(E))&&(Le(s)>B?h=S.LINE:h=S.BAR,z=Le(s),L=s.map(E=>({...E,data:Ye(E,$=>P($))}))),s=s.map(E=>_e(E)),L=L.map(E=>_e(E))}return Q(s)&&[...new Set(s.flatMap(U=>Array.isArray(U)))][0],{dataset:s,type:h,usableDataset:L,maxSeriesLength:z}}function Ce(s){return!s||Q(s)&&!s.length}function Q(s){return Array.isArray(s)}function P(s){if(!Q(s)||Ce(s))return!1;const B=s.map(h=>Number(h));return![...new Set(B.flatMap(h=>typeof h=="number"&&!isNaN(h)))].includes(!1)}function ie(s){return!Q(s)||Ce(s)||!![...new Set(s.flatMap(h=>typeof h=="object"&&!Array.isArray(h)))].includes(!1)?!1:!s.map(h=>Object.keys(h).length>0).includes(!1)}function Ge(s,B){const h=Object.keys(s).sort(),L=Object.keys(B).sort();if(h.length!==L.length)return!1;for(let z=0;z<h.length;z+=1){const V=h[z],M=L[z];if(V!==M||typeof s[V]!=typeof B[M])return!1}return!0}function He(s){if(s.length<=1)return!0;for(let B=0;B<s.length;B+=1)for(let h=B+1;h<s.length;h+=1)if(!Ge(s[B],s[h]))return!1;return!0}function Xe(s){return We.includes(s.toUpperCase())}function Ae(s,B){let h=[];for(let L=0;L<s.length;L+=1)h.push(B(s[L]));return h.includes(!0)}function Le(s){return Math.max(...[...s].flatMap(B=>Object.values(B).filter(h=>P(h)).map(h=>h.length)))}function Ye(s,B){return Object.values(s).filter(h=>B(h))[0]}function _e(s){const B={};for(let h in s)s.hasOwnProperty(h)&&(B[h.toUpperCase()]=s[h]);return B}const Ne=s=>(e.pushScopeId("data-v-606895e6"),s=s(),e.popScopeId(),s),Ze=["id"],Je=["xmlns","viewBox"],Qe=["id"],Ke=["id"],et=Ne(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),tt=["id"],lt=["flood-color"],at={key:0,class:"donut-label-connectors"},ot=["d","stroke","stroke-width","filter"],nt=["cx","cy","r","fill","filter"],rt={class:"donut"},it=["d","fill","stroke","stroke-width","filter"],ut=["d","onMouseenter","onClick"],st={key:1,class:"donut-labels quick-animation"},ct=["cx","cy","fill","stroke","filter"],dt=["text-anchor","x","y","fill","font-size","filter"],vt=["text-anchor","x","y","fill","font-size","filter"],mt={key:2,class:"donut-hollow quick-animation"},ht=["x","y","font-size","fill"],pt=["x","y","font-size","fill"],ft={key:0,class:"line-grid"},kt=["x1","x2","y1","y2","stroke","stroke-width"],gt=["x1","x2","y1","y2","stroke","stroke-width"],yt={key:1,class:"line-axis"},xt=["x1","x2","y1","y2","stroke","stroke-width"],St=["x1","x2","y1","y2","stroke","stroke-width"],bt={key:2,class:"yLabels"},Bt=["x1","x2","y1","y2","stroke","stroke-width"],wt=["x","y","font-size","fill"],Et={key:3,class:"periodLabels"},At=["x1","x2","y1","y2","stroke","stroke-width"],Lt=["font-size","text-anchor","fill","transform"],_t={class:"plots"},Ct={class:"line-plot-series"},Nt=["d","stroke","stroke-width"],zt=["d","stroke","stroke-width"],Vt=["d","stroke","stroke-width"],Ft=["d","stroke","stroke-width"],$t=["cx","cy","fill","stroke"],Pt={key:4,class:"dataLabels"},Tt=["font-size","fill","x","y"],Rt={class:"tooltip-traps"},It=["x","y","height","width","fill","onMouseenter","onClick"],Ot={key:0,class:"line-grid"},Dt=["x1","x2","y1","y2","stroke","stroke-width"],Mt=["x1","x2","y1","y2","stroke","stroke-width"],Ut={key:1,class:"line-axis"},qt=["x1","x2","y1","y2","stroke","stroke-width"],Wt=["x1","x2","y1","y2","stroke","stroke-width"],jt={key:2,class:"yLabels"},Gt=["x1","x2","y1","y2","stroke","stroke-width"],Ht=["x","y","font-size","fill"],Xt={key:3,class:"periodLabels"},Yt=["x1","x2","y1","y2","stroke","stroke-width"],Zt=["font-size","text-anchor","transform","fill"],Jt={class:"plots"},Qt=["x","width","height","y","fill","stroke","stroke-width"],Kt=["to"],el=["from","to"],tl={key:4,class:"dataLabels"},ll=["x","y","font-size","fill"],al={class:"tooltip-traps"},ol=["x","y","height","width","fill","onMouseenter","onClick"],nl={key:3,class:"axis-labels"},rl={key:0},il=["font-size","fill","x","y"],ul={key:1},sl=["font-size","fill","x","y"],cl={key:2},dl=["font-size","fill","transform"],vl={key:3},ml=["font-size","fill","transform"],hl={key:5,class:"vue-data-ui-watermark"},pl=["onClick"],fl=["onClick"],kl=["onClick"],gl={key:1,class:"vue-ui-quick-chart-not-processable"},yl=Ne(()=>e.createElementVNode("span",null,"Dataset is not processable",-1)),xl={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(s,{expose:B,emit:h}){const L=s,{vue_ui_quick_chart:z}=u.useConfig(),V=e.ref(null),M=e.ref(null),U=e.ref(null),j=e.ref(null),E=e.ref(u.createUid()),$=e.ref(!1),G=e.ref(null),R=e.ref(""),F=e.ref(null),de=e.ref(null),x=e.ref([]),ve=e.ref(0),K=e.ref(0),t=e.computed({get:()=>me(),set:n=>n});function me(){const n=Ee.useNestedProp({userConfig:L.config,defaultConfig:z});return n.theme?{...Ee.useNestedProp({userConfig:u.themes.vue_ui_quick_chart[n.theme]||L.config,defaultConfig:n}),customPalette:u.themePalettes[n.theme]||u.palette}:n}e.watch(()=>L.config,n=>{t.value=me(),y.value.width=t.value.width,y.value.height=t.value.height,fe()},{deep:!0}),e.watch(()=>L.dataset,n=>{f.value=X.value,k.value.start=0,k.value.end=f.value.maxSeriesLength,K.value+=1},{deep:!0});const H=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),X=e.computed(()=>{const n=je({dataset:u.sanitizeArray(L.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return n||console.error("VueUiQuickChart : Dataset is not processable"),n}),f=e.ref(X.value),ze=e.computed(()=>!!f.value),b=e.computed(()=>f.value?f.value.type:null);e.watch(()=>b.value,n=>{n||u.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:ee,isImaging:te,generatePdf:he,generateImage:pe}=we.usePrinter({elementId:`${b.value}_${E.value}`,fileName:t.value.title||b.value}),y=e.ref({width:t.value.width,height:t.value.height}),le=e.ref({showTooltip:t.value.showTooltip}),ae=e.ref(null);e.onMounted(()=>{fe()});function fe(){if(t.value.responsive){const n=Be.throttle(()=>{const{width:v,height:l}=Be.useResponsive({chart:V.value,title:t.value.title?M.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&f.value.maxSeriesLength>1?j.value:null,source:de.value});y.value.width=v,y.value.height=l});ae.value=new ResizeObserver(n),ae.value.observe(V.value.parentNode)}}e.onBeforeUnmount(()=>{ae.value&&ae.value.disconnect()});const Ve=e.computed(()=>{switch(b.value){case S.LINE:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;case S.BAR:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;case S.DONUT:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;default:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`}});function ke(n){return[...n].map(v=>v.value).reduce((v,l)=>v+l,0)}function Y(n){return t.value.blurOnHover&&![null,void 0].includes(F.value)&&F.value!==n?`url(#blur_${E.value})`:""}function ge(n,v){x.value.includes(n)?x.value=x.value.filter(l=>l!==n):x.value.length<v&&x.value.push(n)}const ye=e.ref(null),xe=e.ref(null),oe=e.ref(!1);function Fe(n,v){oe.value=!0;let l=n.value;if(x.value.includes(n.id)){let i=function(){l>r?(oe.value=!1,cancelAnimationFrame(xe.value),f.value={...f.value,dataset:f.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:r,VALUE:r}:m)}):(l+=r*.025,f.value={...f.value,dataset:f.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:l,VALUE:l}:m)},xe.value=requestAnimationFrame(i))};x.value=x.value.filter(m=>m!==n.id);const r=X.value.dataset.find((m,_)=>n.id===`donut_${_}`).VALUE;i()}else if(v.length>1){let r=function(){l<.1?(oe.value=!1,cancelAnimationFrame(ye.value),x.value.push(n.id),f.value={...f.value,dataset:f.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:0,VALUE:0}:i)}):(l/=1.1,f.value={...f.value,dataset:f.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:l,VALUE:l}:i)},ye.value=requestAnimationFrame(r))};r()}}const T=e.ref(null);function $e(n){T.value=n}const Se=e.computed(()=>t.value.donutThicknessRatio<.15?.15:t.value.donutThicknessRatio>.4?.4:t.value.donutThicknessRatio),w=e.computed(()=>{if(b.value!==S.DONUT)return null;const n=f.value.dataset.map((a,o)=>({...a,value:a.VALUE||a.DATA||a.SERIE||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`donut_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],immutableValue:a.value}));function v(a,o){return u.dataLabel({v:isNaN(a.value/ke(o))?0:a.value/ke(o)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(a){return a.proportion*100>t.value.donutHideLabelUnderPercentage}function r(a,o){const g=X.value.dataset.find((A,C)=>`donut_${C}`===a).VALUE;return Math.abs(String(Number(g.toFixed(0))).length-String(Number(o.toFixed(0))).length)}function i({datapoint:a,seriesIndex:o}){G.value={datapoint:a,seriesIndex:o,config:t.value,dataset:n},F.value=a.id;const g=t.value.tooltipCustomFormat;if(u.isFunction(g)&&u.functionReturnsString(()=>g({datapoint:a,seriesIndex:o,series:n,config:t.value})))R.value=g({datapoint:a,seriesIndex:o,series:n,config:t.value});else{let p="";p+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`,p+=`<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="${a.color}"/></svg>`,p+=`<b>${u.applyDataLabel(t.value.formatter,a.value,u.dataLabel({p:t.value.valuePrefix,v:a.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:a,seriesIndex:o})}</b>`,p+=`<span>(${u.dataLabel({v:a.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,R.value=`<div>${p}</div>`}$.value=!0}function m(){$.value=!1,F.value=null,T.value=null}const _={centerX:y.value.width/2,centerY:y.value.height/2},N=n.filter(a=>!x.value.includes(a.id)).map(a=>a.value||0).reduce((a,o)=>a+o,0),q=n.map((a,o)=>({...a,proportion:(a.value||0)/N,value:a.value||0,absoluteValue:X.value.dataset.find((g,p)=>`donut_${p}`===a.id).VALUE})),I=y.value.width/2,W=y.value.height/2,O=y.value.height*t.value.donutRadiusRatio;return{dataset:q.filter(a=>!x.value.includes(a.id)),legend:q,drawingArea:_,displayArcPercentage:v,isArcBigEnough:l,useTooltip:i,killTooltip:m,getSpaces:r,total:N,cx:I,cy:W,radius:O,chart:u.makeDonut({series:n.filter(a=>!x.value.includes(a.id))},I,W,O,O,1.99999,2,1,360,105.25,y.value.height*Se.value)}}),k=e.ref({start:0,end:f.value.maxSeriesLength});function Pe(){k.value={start:0,end:f.value.maxSeriesLength},K.value+=1}const Te=e.computed(()=>{if(!t.value.zoomMinimap.show||b.value===S.DONUT)return[];let n=[];P(f.value.dataset)&&(n=f.value.dataset),ie(f.value.dataset)&&(n=f.value.dataset.map((i,m)=>({values:i.VALUE||i.DATA||i.SERIE||i.SERIES||i.VALUES||i.NUM||0,id:b.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(i=>!x.value.includes(i.id)));const v=P(n)?n.length:Math.max(...n.map(i=>i.values.length));let l=[];if(P(n))l=n;else for(let i=0;i<v;i+=1)l.push(n.map(m=>m.values[i]||0).reduce((m,_)=>(m||0)+(_||0),0));const r=Math.min(...l);return l.map(i=>i+(r<0?Math.abs(r):0))}),d=e.computed(()=>{if(b.value!==S.LINE)return null;const n={height:y.value.height,width:y.value.width},v={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:n.width-t.value.xyPaddingRight,bottom:n.height-t.value.xyPaddingBottom,width:n.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:n.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];P(f.value.dataset)&&(l=[{values:f.value.dataset.slice(k.value.start,k.value.end),absoluteIndices:f.value.dataset.map((a,o)=>o).slice(k.value.start,k.value.end),name:t.value.title,color:H.value[t.value.paletteStartIndex]||u.palette[t.value.paletteStartIndex],id:"line_0"}]),ie(f.value.dataset)&&(l=f.value.dataset.map((a,o)=>({...a,values:a.VALUE||a.DATA||a.SERIE||a.SERIES||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`line_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],values:a.values.slice(k.value.start,k.value.end),absoluteIndices:a.values.map((g,p)=>p).slice(k.value.start,k.value.end)})));const r={max:Math.max(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),min:Math.min(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),maxSeries:Math.max(...l.map(a=>a.values.length))},i=u.calculateNiceScale(r.min<0?r.min:0,r.max<0?0:r.max,t.value.xyScaleSegments),m=r.min<0?Math.abs(r.min):0,_=r.max<0?v.top:v.bottom-m/(i.max+m)*v.height,N=v.width/r.maxSeries,q=i.ticks.map(a=>({y:v.bottom-v.height*((a+m)/(i.max+m)),x:v.left-8,value:a})),I=l.map((a,o)=>({...a,coordinates:a.values.map((g,p)=>({x:v.left+N*(p+1)-N/2,y:v.bottom-(g+m)/(i.max+m)*v.height,value:g}))})).map(a=>{let o=[];return a.coordinates.forEach(g=>{o.push(`${g.x},${g.y} `)}),{...a,linePath:o.join(" ")}});function W(a){F.value=a,T.value=a;const o=l.map(p=>({...p,value:p.values[a],absoluteIndex:p.absoluteIndices[a]})).filter(p=>!x.value.includes(p.id));G.value={datapoint:o,seriesIndex:a,config:t.value,dataset:l};const g=t.value.tooltipCustomFormat;if(u.isFunction(g)&&u.functionReturnsString(()=>g({datapoint:o,seriesIndex:a,series:l,config:t.value})))R.value=g({datapoint:o,seriesIndex:a,series:l,config:t.value});else{let p="";t.value.xyPeriods[o[0].absoluteIndex]&&(p+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[o[0].absoluteIndex]}</div>`),o.forEach((A,C)=>{p+=`
2
2
  <div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
3
3
  <svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${A.color}"/></svg>
4
4
  <span>${A.name}:</span>
@@ -12,4 +12,4 @@
12
12
  <b>${u.applyDataLabel(t.value.formatter,C.value,u.dataLabel({p:t.value.valuePrefix,v:C.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:C,seriesIndex:Z})}
13
13
  </b>
14
14
  </div>
15
- `}),R.value=A}$.value=!0}function a(){$.value=!1,F.value=null,T.value=null}return{absoluteZero:_,dataset:W.filter(o=>!x.value.includes(o.id)),legend:I,drawingArea:v,extremes:r,slotSize:N,yLabels:q,useTooltip:O,killTooltip:a}}),ue=e.ref(!1);function Te(n){ue.value=n,de.value+=1}function Se(){le.value.showTooltip=!le.value.showTooltip}const ne=e.ref(!1);function se(){ne.value=!ne.value}return B({generatePdf:me,generateImage:he,toggleTooltip:Se,toggleAnnotator:se}),(n,v)=>Ne.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:`${b.value}_${E.value}`,ref_key:"quickChart",ref:V,class:e.normalizeClass({"vue-ui-quick-chart":!0,"vue-data-ui-wrapper-fullscreen":ue.value}),style:e.normalizeStyle(`background:${t.value.backgroundColor};color:${t.value.color};font-family:${t.value.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`)},[t.value.userOptionsButtons.annotator?(e.openBlock(),e.createBlock(Me.PenAndPaper,{key:0,parent:V.value,backgroundColor:t.value.backgroundColor,color:t.value.color,active:ne.value,onClose:se},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.showUserOptions?(e.openBlock(),e.createBlock(Be.UserOptions,{ref:"details",key:`user_option_${de.value}`,backgroundColor:t.value.backgroundColor,color:t.value.color,isPrinting:e.unref(ee),isImaging:e.unref(te),uid:E.value,hasTooltip:t.value.userOptionsButtons.tooltip&&t.value.showTooltip,hasPdf:t.value.userOptionsButtons.pdf,hasImg:t.value.userOptionsButtons.img,hasFullscreen:t.value.userOptionsButtons.fullscreen,hasXls:!1,isTooltip:le.value.showTooltip,isFullscreen:ue.value,titles:{...t.value.userOptionsButtonTitles},chartElement:V.value,position:t.value.userOptionsPosition,hasAnnotator:t.value.userOptionsButtons.annotator,isAnnotation:ne.value,onToggleFullscreen:Te,onGeneratePdf:e.unref(me),onGenerateImage:e.unref(he),onToggleTooltip:Se,onToggleAnnotator:se},e.createSlots({_:2},[n.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,n.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,n.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,n.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(n.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0,n.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(n.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),t.value.title?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"quickChartTitle",ref:M,class:"vue-ui-quick-chart-title",style:e.normalizeStyle(`background:transparent;color:${t.value.color};font-size:${t.value.titleFontSize}px;font-weight:${t.value.titleBold?"bold":"normal"};text-align:${t.value.titleTextAlign}`)},e.toDisplayString(t.value.title),5)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(u.XMLNS),viewBox:ze.value,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.color}`)},[e.createVNode(De._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${E.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${E.value}`},null,8,Qe),Ke],8,Je),e.createElementVNode("filter",{id:`shadow_${E.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.donutShadowColor},null,8,tt)],8,et)]),b.value===S.DONUT?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(u.calcNutArrowPath)(l,{x:y.value.width/2,y:y.value.height/2},16,16,!1,!1,y.value.height*xe.value),stroke:l.color,"stroke-width":t.value.donutLabelMarkerStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:Y(l.id)},null,8,at)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:w.value.cx,cy:w.value.cy,r:w.value.radius,fill:t.value.backgroundColor,filter:t.value.donutUseShadow?`url(#shadow_${E.value})`:""},null,8,ot),e.createElementVNode("g",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":t.value.donutStrokeWidth,filter:Y(l.id)},null,8,rt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:"transparent",onMouseenter:i=>w.value.useTooltip({datapoint:l,seriesIndex:r}),onMouseout:v[0]||(v[0]=i=>w.value.killTooltip()),onClick:i=>h("selectDatapoint",l)},null,40,it))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(u.calcMarkerOffsetX)(l).x,cy:e.unref(u.calcMarkerOffsetY)(l)-3.7,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":1,r:3,filter:Y(l.id)},null,8,st)):e.createCommentVNode("",!0),w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(u.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(u.calcMarkerOffsetX)(l,!0).x,y:e.unref(u.calcMarkerOffsetY)(l),fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:Y(l.id)},e.toDisplayString(w.value.displayArcPercentage(l,w.value.chart))+" ("+e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,l.value,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r}))+") ",9,ct)):e.createCommentVNode("",!0),w.value.isArcBigEnough(l,!0,20)?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(u.calcMarkerOffsetX)(l).anchor,x:e.unref(u.calcMarkerOffsetX)(l,!0).x,y:e.unref(u.calcMarkerOffsetY)(l)+t.value.dataLabelFontSize,fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:Y(l.id)},e.toDisplayString(l.name),9,dt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.donutShowTotal?(e.openBlock(),e.createElementBlock("g",vt,[e.createElementVNode("text",{"text-anchor":"middle",x:w.value.drawingArea.centerX,y:w.value.drawingArea.centerY-t.value.donutTotalLabelFontSize/2,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(t.value.donutTotalLabelText),9,mt),e.createElementVNode("text",{"text-anchor":"middle",x:w.value.drawingArea.centerX,y:w.value.drawingArea.centerY+t.value.donutTotalLabelFontSize,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(e.unref(u.dataLabel)({p:t.value.valuePrefix,v:w.value.total,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})),9,ht)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),b.value===S.LINE?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.xyShowGrid?(e.openBlock(),e.createElementBlock("g",pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.yLabels,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:d.value.drawingArea.left,x2:d.value.drawingArea.right,y1:l.y,y2:l.y,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,ft)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.extremes.maxSeries+1,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.drawingArea.left+d.value.slotSize*r,x2:d.value.drawingArea.left+d.value.slotSize*r,y1:d.value.drawingArea.top,y2:d.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,kt))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",gt,[e.createElementVNode("line",{x1:d.value.drawingArea.left,x2:d.value.drawingArea.left,y1:d.value.drawingArea.top,y2:d.value.drawingArea.bottom,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,yt),e.createElementVNode("line",{x1:d.value.drawingArea.left,x2:d.value.drawingArea.right,y1:isNaN(d.value.absoluteZero)?d.value.drawingArea.bottom:d.value.absoluteZero,y2:isNaN(d.value.absoluteZero)?d.value.drawingArea.bottom:d.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,xt)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",St,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.yLabels,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x+4,x2:d.value.drawingArea.left,y1:l.y,y2:l.y,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,bt)):e.createCommentVNode("",!0),l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.x,y:l.y+t.value.xyLabelsYFontSize/3,"text-anchor":"end","font-size":t.value.xyLabelsYFontSize,fill:t.value.color},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,l.value,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),9,Bt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(k.value.start,k.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2,x2:d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2,y1:d.value.drawingArea.bottom,y2:d.value.drawingArea.bottom+4,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(k.value.start,k.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.xyLabelsXFontSize,"text-anchor":t.value.xyPeriodLabelsRotation>0?"start":t.value.xyPeriodLabelsRotation<0?"end":"middle",fill:t.value.color,transform:`translate(${d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2}, ${d.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}), rotate(${t.value.xyPeriodLabelsRotation})`},e.toDisplayString(l),9,At))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock("g",_t,[t.value.lineSmooth?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("path",{d:`M ${e.unref(u.createSmoothPath)(l.coordinates)}`,stroke:t.value.backgroundColor,"stroke-width":t.value.lineStrokeWidth+1,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,Ct),e.createElementVNode("path",{d:`M ${e.unref(u.createSmoothPath)(l.coordinates)}`,stroke:l.color,"stroke-width":t.value.lineStrokeWidth,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,Nt)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("path",{d:`M ${l.linePath}`,stroke:t.value.backgroundColor,"stroke-width":t.value.lineStrokeWidth+1,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,zt),e.createElementVNode("path",{d:`M ${l.linePath}`,stroke:l.color,"stroke-width":t.value.lineStrokeWidth,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,Vt)],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("circle",{cx:i.x,cy:e.unref(u.checkNaN)(i.y),r:3,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":"0.5",class:"quick-animation",style:{transition:"all 0.3s ease-in-out"}},null,8,Ft))),256))]))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",$t,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,x:i.x,y:e.unref(u.checkNaN)(i.y)-t.value.dataLabelFontSize/2,class:"quick-animation",style:{transition:"all 0.3s ease-in-out"}},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,e.unref(u.checkNaN)(i.value),e.unref(u.dataLabel)({p:t.value.valuePrefix,v:e.unref(u.checkNaN)(i.value),s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:i,seriesIndex:m})),9,Pt))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.extremes.maxSeries,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{x:d.value.drawingArea.left+r*d.value.slotSize,y:d.value.drawingArea.top,height:d.value.drawingArea.height<=0?1e-5:d.value.drawingArea.height,width:d.value.slotSize<=0?1e-5:d.value.slotSize,fill:[F.value,T.value].includes(r)?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:i=>d.value.useTooltip(r),onMouseleave:v[1]||(v[1]=i=>d.value.killTooltip()),onClick:i=>h("selectDatapoint",d.value.dataset.map(m=>({...m,value:m.values[r]})))},null,44,Rt))),256))])],64)):e.createCommentVNode("",!0),b.value===S.BAR?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.value.xyShowGrid?(e.openBlock(),e.createElementBlock("g",It,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.yLabels,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:c.value.drawingArea.left,x2:c.value.drawingArea.right,y1:l.y,y2:l.y,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Ot)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.extremes.maxSeries+1,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:c.value.drawingArea.left+c.value.slotSize*r,x2:c.value.drawingArea.left+c.value.slotSize*r,y1:c.value.drawingArea.top,y2:c.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Dt))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",Mt,[e.createElementVNode("line",{x1:c.value.drawingArea.left,x2:c.value.drawingArea.left,y1:c.value.drawingArea.top,y2:c.value.drawingArea.bottom,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Ut),e.createElementVNode("line",{x1:c.value.drawingArea.left,x2:c.value.drawingArea.right,y1:isNaN(c.value.absoluteZero)?c.value.drawingArea.bottom:c.value.absoluteZero,y2:isNaN(c.value.absoluteZero)?c.value.drawingArea.bottom:c.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,qt)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",Wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.yLabels,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x+4,x2:c.value.drawingArea.left,y1:l.y,y2:l.y,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,jt)):e.createCommentVNode("",!0),l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.x,y:l.y+t.value.xyLabelsYFontSize/3,"text-anchor":"end","font-size":t.value.xyLabelsYFontSize,fill:t.value.color},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,l.value,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),9,Gt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",Ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(k.value.start,k.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:c.value.drawingArea.left+c.value.slotSize*(r+1)-c.value.slotSize/2,x2:c.value.drawingArea.left+c.value.slotSize*(r+1)-c.value.slotSize/2,y1:c.value.drawingArea.bottom,y2:c.value.drawingArea.bottom+4,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Xt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(k.value.start,k.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.xyLabelsXFontSize,"text-anchor":t.value.xyPeriodLabelsRotation>0?"start":t.value.xyPeriodLabelsRotation<0?"end":"middle",transform:`translate(${c.value.drawingArea.left+c.value.slotSize*(r+1)-c.value.slotSize/2}, ${c.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}) rotate(${t.value.xyPeriodLabelsRotation})`,fill:t.value.color},e.toDisplayString(l),9,Yt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("rect",{x:i.x,width:i.width<=0?1e-5:i.width,height:e.unref(u.checkNaN)(i.height<=0?1e-5:i.height),y:e.unref(u.checkNaN)(i.y),fill:l.color,stroke:t.value.backgroundColor,"stroke-width":t.value.barStrokeWidth,"stroke-linecap":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.barAnimated&&i.value<0})},[t.value.barAnimated&&i.value>0&&!e.unref(ee)&&!e.unref(te)?(e.openBlock(),e.createElementBlock("animate",{key:0,attributeName:"height",from:0,to:i.height,dur:"0.5s"},null,8,Qt)):e.createCommentVNode("",!0),t.value.barAnimated&&i.value>0&&!e.unref(ee)&&!e.unref(te)?(e.openBlock(),e.createElementBlock("animate",{key:1,attributeName:"y",from:c.value.absoluteZero,to:c.value.absoluteZero-i.height,dur:"0.5s"},null,8,Kt)):e.createCommentVNode("",!0)],10,Jt))),256))],64))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",el,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("text",{x:i.x+i.width/2,y:e.unref(u.checkNaN)(i.y)-t.value.dataLabelFontSize/2,"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,class:"quick-animation"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,e.unref(u.checkNaN)(i.value),e.unref(u.dataLabel)({p:t.value.valuePrefix,v:e.unref(u.checkNaN)(i.value),s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:i,seriesIndex:m})),9,tl))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",ll,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.extremes.maxSeries,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{x:c.value.drawingArea.left+r*c.value.slotSize,y:c.value.drawingArea.top,height:c.value.drawingArea.height<=0?1e-5:c.value.drawingArea.height,width:c.value.slotSize<=0?1e-5:c.value.slotSize,fill:[F.value,T.value].includes(r)?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:i=>c.value.useTooltip(r),onMouseleave:v[2]||(v[2]=i=>c.value.killTooltip()),onClick:i=>h("selectDatapoint",c.value.dataset.map(m=>({...m,value:m.values[r]})))},null,44,al))),256))])],64)):e.createCommentVNode("",!0),[S.LINE,S.BAR].includes(b.value)?(e.openBlock(),e.createElementBlock("g",ol,[t.value.xAxisLabel&&b.value===S.LINE?(e.openBlock(),e.createElementBlock("g",nl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,"text-anchor":"middle",x:d.value.drawingArea.left+d.value.drawingArea.width/2,y:y.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,rl)])):e.createCommentVNode("",!0),t.value.xAxisLabel&&b.value===S.BAR?(e.openBlock(),e.createElementBlock("g",il,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,"text-anchor":"middle",x:c.value.drawingArea.left+c.value.drawingArea.width/2,y:y.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,ul)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&b.value===S.LINE?(e.openBlock(),e.createElementBlock("g",sl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,transform:`translate(${t.value.axisLabelsFontSize}, ${d.value.drawingArea.top+d.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.yAxisLabel),9,cl)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&b.value===S.BAR?(e.openBlock(),e.createElementBlock("g",dl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,transform:`translate(${t.value.axisLabelsFontSize}, ${c.value.drawingArea.top+c.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.yAxisLabel),9,vl)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],12,Ze)):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Oe.default,{key:4,config:{type:"line",style:{backgroundColor:t.value.backgroundColor,line:{axis:{color:t.value.xyAxisStroke},path:{color:t.value.xyAxisStroke,strokeWidth:.5}}}}},null,8,["config"])),n.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ml,[e.renderSlot(n.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&f.value.maxSeriesLength>1?(e.openBlock(),e.createElementBlock("div",{key:`slicer_${K.value}`,ref_key:"quickChartSlicer",ref:j},[(e.openBlock(),e.createBlock(Ie.Slicer,{key:`slicer_${K.value}`,background:t.value.zoomColor,borderColor:t.value.backgroundColor,fontSize:t.value.zoomFontSize,useResetSlot:t.value.zoomUseResetSlot,labelLeft:t.value.xyPeriods[k.value.start]?t.value.xyPeriods[k.value.start]:"",labelRight:t.value.xyPeriods[k.value.end-1]?t.value.xyPeriods[k.value.end-1]:"",textColor:t.value.color,inputColor:t.value.zoomColor,selectColor:t.value.zoomHighlightColor,max:f.value.maxSeriesLength,min:0,valueStart:k.value.start,valueEnd:k.value.end,smoothMinimap:t.value.zoomMinimap.smooth,minimapSelectedColor:t.value.zoomMinimap.selectedColor,minimapSelectedColorOpacity:t.value.zoomMinimap.selectedColorOpacity,minimapSelectionRadius:t.value.zoomMinimap.selectionRadius,minimapLineColor:t.value.zoomMinimap.lineColor,minimap:Pe.value,minimapIndicatorColor:t.value.zoomMinimap.indicatorColor,minimapSelectedIndex:T.value,start:k.value.start,"onUpdate:start":v[3]||(v[3]=l=>k.value.start=l),end:k.value.end,"onUpdate:end":v[4]||(v[4]=l=>k.value.end=l),onReset:$e,onTrapMouse:Fe},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(n.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","smoothMinimap","minimapSelectedColor","minimapSelectedColorOpacity","minimapSelectionRadius","minimapLineColor","minimap","minimapIndicatorColor","minimapSelectedIndex","start","end"]))])):e.createCommentVNode("",!0),t.value.showLegend?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"quickChartLegend",ref:U,class:"vue-ui-quick-chart-legend",style:e.normalizeStyle(`background:transparent;color:${t.value.color}`)},[b.value===S.DONUT?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(w.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:i=>{Ve(l,w.value.dataset),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${w.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(re.default,{name:t.value.legendIcon,stroke:l.color,size:t.value.legendIconSize},null,8,["name","stroke","size"]),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)},e.toDisplayString(l.name),5),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px;font-variant-numeric:tabular-nums`)},e.toDisplayString(x.value.includes(l.id)?"-":e.unref(u.applyDataLabel)(t.value.formatter,l.absoluteValue,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.absoluteValue,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),5),x.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)}," ( - % ) ",4)):oe.value?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)}," ( - % ) ",4)):(e.openBlock(),e.createElementBlock("span",{key:2,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)}," ("+e.toDisplayString(e.unref(u.dataLabel)({v:l.value/w.value.total*100,s:"%",r:t.value.dataLabelRoundingPercentage}))+") ",5))],64))],12,hl))),256)):e.createCommentVNode("",!0),b.value===S.LINE?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:i=>{ke(l.id,d.value.legend.length-1),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${d.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(re.default,{name:t.value.legendIcon,stroke:l.color,size:t.value.legendIconSize},null,8,["name","stroke","size"]),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)},e.toDisplayString(l.name),5)],64))],12,pl))),256)):e.createCommentVNode("",!0),b.value===S.BAR?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(c.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:i=>{ke(l.id,c.value.legend.length-1),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${c.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(re.default,{name:t.value.legendIcon,stroke:l.color,size:t.value.legendIconSize},null,8,["name","stroke","size"]),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)},e.toDisplayString(l.name),5)],64))],12,fl))),256)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createVNode(Re._sfc_main,{show:le.value.showTooltip&&$.value,backgroundColor:t.value.backgroundColor,color:t.value.color,borderRadius:t.value.tooltipBorderRadius,borderColor:t.value.tooltipBorderColor,borderWidth:t.value.tooltipBorderWidth,fontSize:t.value.tooltipFontSize,backgroundOpacity:t.value.tooltipBackgroundOpacity,position:t.value.tooltipPosition,offsetY:t.value.tooltipOffsetY,parent:V.value,content:R.value,isCustom:e.unref(u.isFunction)(t.value.tooltipCustomFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(n.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(n.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"])],14,Ye)):(e.openBlock(),e.createElementBlock("div",kl,[e.createVNode(re.default,{name:"circleCancel",stroke:"red"}),gl]))}},xl=Ue._export_sfc(yl,[["__scopeId","data-v-e73a7249"]]);exports.default=xl;
15
+ `}),R.value=A}$.value=!0}function a(){$.value=!1,F.value=null,T.value=null}return{absoluteZero:_,dataset:W.filter(o=>!x.value.includes(o.id)),legend:I,drawingArea:v,extremes:r,slotSize:N,yLabels:q,useTooltip:O,killTooltip:a}}),ue=e.ref(!1);function Re(n){ue.value=n,ve.value+=1}function be(){le.value.showTooltip=!le.value.showTooltip}const ne=e.ref(!1);function se(){ne.value=!ne.value}return B({generatePdf:he,generateImage:pe,toggleTooltip:be,toggleAnnotator:se}),(n,v)=>ze.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:`${b.value}_${E.value}`,ref_key:"quickChart",ref:V,class:e.normalizeClass({"vue-ui-quick-chart":!0,"vue-data-ui-wrapper-fullscreen":ue.value}),style:e.normalizeStyle(`background:${t.value.backgroundColor};color:${t.value.color};font-family:${t.value.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`)},[t.value.userOptionsButtons.annotator?(e.openBlock(),e.createBlock(Ue.PenAndPaper,{key:0,parent:V.value,backgroundColor:t.value.backgroundColor,color:t.value.color,active:ne.value,onClose:se},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.showUserOptions?(e.openBlock(),e.createBlock(we.UserOptions,{ref:"details",key:`user_option_${ve.value}`,backgroundColor:t.value.backgroundColor,color:t.value.color,isPrinting:e.unref(ee),isImaging:e.unref(te),uid:E.value,hasTooltip:t.value.userOptionsButtons.tooltip&&t.value.showTooltip,hasPdf:t.value.userOptionsButtons.pdf,hasImg:t.value.userOptionsButtons.img,hasFullscreen:t.value.userOptionsButtons.fullscreen,hasXls:!1,isTooltip:le.value.showTooltip,isFullscreen:ue.value,titles:{...t.value.userOptionsButtonTitles},chartElement:V.value,position:t.value.userOptionsPosition,hasAnnotator:t.value.userOptionsButtons.annotator,isAnnotation:ne.value,onToggleFullscreen:Re,onGeneratePdf:e.unref(he),onGenerateImage:e.unref(pe),onToggleTooltip:be,onToggleAnnotator:se},e.createSlots({_:2},[n.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,n.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,n.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,n.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(n.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0,n.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(n.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),t.value.title?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"quickChartTitle",ref:M,class:"vue-ui-quick-chart-title",style:e.normalizeStyle(`background:transparent;color:${t.value.color};font-size:${t.value.titleFontSize}px;font-weight:${t.value.titleBold?"bold":"normal"};text-align:${t.value.titleTextAlign}`)},e.toDisplayString(t.value.title),5)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(u.XMLNS),viewBox:Ve.value,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.color}`)},[e.createVNode(Me._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${E.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${E.value}`},null,8,Ke),et],8,Qe),e.createElementVNode("filter",{id:`shadow_${E.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.donutShadowColor},null,8,lt)],8,tt)]),b.value===S.DONUT?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(u.calcNutArrowPath)(l,{x:y.value.width/2,y:y.value.height/2},16,16,!1,!1,y.value.height*Se.value),stroke:l.color,"stroke-width":t.value.donutLabelMarkerStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:Y(l.id)},null,8,ot)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:w.value.cx,cy:w.value.cy,r:w.value.radius,fill:t.value.backgroundColor,filter:t.value.donutUseShadow?`url(#shadow_${E.value})`:""},null,8,nt),e.createElementVNode("g",rt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":t.value.donutStrokeWidth,filter:Y(l.id)},null,8,it))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:"transparent",onMouseenter:i=>w.value.useTooltip({datapoint:l,seriesIndex:r}),onMouseout:v[0]||(v[0]=i=>w.value.killTooltip()),onClick:i=>h("selectDatapoint",l)},null,40,ut))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",st,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(u.calcMarkerOffsetX)(l).x,cy:e.unref(u.calcMarkerOffsetY)(l)-3.7,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":1,r:3,filter:Y(l.id)},null,8,ct)):e.createCommentVNode("",!0),w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(u.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(u.calcMarkerOffsetX)(l,!0).x,y:e.unref(u.calcMarkerOffsetY)(l),fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:Y(l.id)},e.toDisplayString(w.value.displayArcPercentage(l,w.value.chart))+" ("+e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,l.value,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r}))+") ",9,dt)):e.createCommentVNode("",!0),w.value.isArcBigEnough(l,!0,20)?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(u.calcMarkerOffsetX)(l).anchor,x:e.unref(u.calcMarkerOffsetX)(l,!0).x,y:e.unref(u.calcMarkerOffsetY)(l)+t.value.dataLabelFontSize,fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:Y(l.id)},e.toDisplayString(l.name),9,vt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.donutShowTotal?(e.openBlock(),e.createElementBlock("g",mt,[e.createElementVNode("text",{"text-anchor":"middle",x:w.value.drawingArea.centerX,y:w.value.drawingArea.centerY-t.value.donutTotalLabelFontSize/2,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(t.value.donutTotalLabelText),9,ht),e.createElementVNode("text",{"text-anchor":"middle",x:w.value.drawingArea.centerX,y:w.value.drawingArea.centerY+t.value.donutTotalLabelFontSize,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(e.unref(u.dataLabel)({p:t.value.valuePrefix,v:w.value.total,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})),9,pt)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),b.value===S.LINE?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.xyShowGrid?(e.openBlock(),e.createElementBlock("g",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.yLabels,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:d.value.drawingArea.left,x2:d.value.drawingArea.right,y1:l.y,y2:l.y,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,kt)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.extremes.maxSeries+1,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.drawingArea.left+d.value.slotSize*r,x2:d.value.drawingArea.left+d.value.slotSize*r,y1:d.value.drawingArea.top,y2:d.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,gt))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",yt,[e.createElementVNode("line",{x1:d.value.drawingArea.left,x2:d.value.drawingArea.left,y1:d.value.drawingArea.top,y2:d.value.drawingArea.bottom,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,xt),e.createElementVNode("line",{x1:d.value.drawingArea.left,x2:d.value.drawingArea.right,y1:isNaN(d.value.absoluteZero)?d.value.drawingArea.bottom:d.value.absoluteZero,y2:isNaN(d.value.absoluteZero)?d.value.drawingArea.bottom:d.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,St)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",bt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.yLabels,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x+4,x2:d.value.drawingArea.left,y1:l.y,y2:l.y,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Bt)):e.createCommentVNode("",!0),l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.x,y:l.y+t.value.xyLabelsYFontSize/3,"text-anchor":"end","font-size":t.value.xyLabelsYFontSize,fill:t.value.color},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,l.value,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),9,wt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",Et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(k.value.start,k.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2,x2:d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2,y1:d.value.drawingArea.bottom,y2:d.value.drawingArea.bottom+4,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,At))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(k.value.start,k.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.xyLabelsXFontSize,"text-anchor":t.value.xyPeriodLabelsRotation>0?"start":t.value.xyPeriodLabelsRotation<0?"end":"middle",fill:t.value.color,transform:`translate(${d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2}, ${d.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}), rotate(${t.value.xyPeriodLabelsRotation})`},e.toDisplayString(l),9,Lt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",_t,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock("g",Ct,[t.value.lineSmooth?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("path",{d:`M ${e.unref(u.createSmoothPath)(l.coordinates)}`,stroke:t.value.backgroundColor,"stroke-width":t.value.lineStrokeWidth+1,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,Nt),e.createElementVNode("path",{d:`M ${e.unref(u.createSmoothPath)(l.coordinates)}`,stroke:l.color,"stroke-width":t.value.lineStrokeWidth,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,zt)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("path",{d:`M ${l.linePath}`,stroke:t.value.backgroundColor,"stroke-width":t.value.lineStrokeWidth+1,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,Vt),e.createElementVNode("path",{d:`M ${l.linePath}`,stroke:l.color,"stroke-width":t.value.lineStrokeWidth,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,Ft)],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("circle",{cx:i.x,cy:e.unref(u.checkNaN)(i.y),r:3,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":"0.5",class:"quick-animation",style:{transition:"all 0.3s ease-in-out"}},null,8,$t))),256))]))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,x:i.x,y:e.unref(u.checkNaN)(i.y)-t.value.dataLabelFontSize/2,class:"quick-animation",style:{transition:"all 0.3s ease-in-out"}},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,e.unref(u.checkNaN)(i.value),e.unref(u.dataLabel)({p:t.value.valuePrefix,v:e.unref(u.checkNaN)(i.value),s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:i,seriesIndex:m})),9,Tt))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Rt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.extremes.maxSeries,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{x:d.value.drawingArea.left+r*d.value.slotSize,y:d.value.drawingArea.top,height:d.value.drawingArea.height<=0?1e-5:d.value.drawingArea.height,width:d.value.slotSize<=0?1e-5:d.value.slotSize,fill:[F.value,T.value].includes(r)?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:i=>d.value.useTooltip(r),onMouseleave:v[1]||(v[1]=i=>d.value.killTooltip()),onClick:i=>h("selectDatapoint",d.value.dataset.map(m=>({...m,value:m.values[r]})))},null,44,It))),256))])],64)):e.createCommentVNode("",!0),b.value===S.BAR?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.value.xyShowGrid?(e.openBlock(),e.createElementBlock("g",Ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.yLabels,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:c.value.drawingArea.left,x2:c.value.drawingArea.right,y1:l.y,y2:l.y,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Dt)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.extremes.maxSeries+1,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:c.value.drawingArea.left+c.value.slotSize*r,x2:c.value.drawingArea.left+c.value.slotSize*r,y1:c.value.drawingArea.top,y2:c.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Mt))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",Ut,[e.createElementVNode("line",{x1:c.value.drawingArea.left,x2:c.value.drawingArea.left,y1:c.value.drawingArea.top,y2:c.value.drawingArea.bottom,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,qt),e.createElementVNode("line",{x1:c.value.drawingArea.left,x2:c.value.drawingArea.right,y1:isNaN(c.value.absoluteZero)?c.value.drawingArea.bottom:c.value.absoluteZero,y2:isNaN(c.value.absoluteZero)?c.value.drawingArea.bottom:c.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Wt)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",jt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.yLabels,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x+4,x2:c.value.drawingArea.left,y1:l.y,y2:l.y,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Gt)):e.createCommentVNode("",!0),l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.x,y:l.y+t.value.xyLabelsYFontSize/3,"text-anchor":"end","font-size":t.value.xyLabelsYFontSize,fill:t.value.color},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,l.value,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),9,Ht)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",Xt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(k.value.start,k.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:c.value.drawingArea.left+c.value.slotSize*(r+1)-c.value.slotSize/2,x2:c.value.drawingArea.left+c.value.slotSize*(r+1)-c.value.slotSize/2,y1:c.value.drawingArea.bottom,y2:c.value.drawingArea.bottom+4,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Yt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(k.value.start,k.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.xyLabelsXFontSize,"text-anchor":t.value.xyPeriodLabelsRotation>0?"start":t.value.xyPeriodLabelsRotation<0?"end":"middle",transform:`translate(${c.value.drawingArea.left+c.value.slotSize*(r+1)-c.value.slotSize/2}, ${c.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}) rotate(${t.value.xyPeriodLabelsRotation})`,fill:t.value.color},e.toDisplayString(l),9,Zt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Jt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("rect",{x:i.x,width:i.width<=0?1e-5:i.width,height:e.unref(u.checkNaN)(i.height<=0?1e-5:i.height),y:e.unref(u.checkNaN)(i.y),fill:l.color,stroke:t.value.backgroundColor,"stroke-width":t.value.barStrokeWidth,"stroke-linecap":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.barAnimated&&i.value<0})},[t.value.barAnimated&&i.value>0&&!e.unref(ee)&&!e.unref(te)?(e.openBlock(),e.createElementBlock("animate",{key:0,attributeName:"height",from:0,to:i.height,dur:"0.5s"},null,8,Kt)):e.createCommentVNode("",!0),t.value.barAnimated&&i.value>0&&!e.unref(ee)&&!e.unref(te)?(e.openBlock(),e.createElementBlock("animate",{key:1,attributeName:"y",from:c.value.absoluteZero,to:c.value.absoluteZero-i.height,dur:"0.5s"},null,8,el)):e.createCommentVNode("",!0)],10,Qt))),256))],64))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",tl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("text",{x:i.x+i.width/2,y:e.unref(u.checkNaN)(i.y)-t.value.dataLabelFontSize/2,"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,class:"quick-animation"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,e.unref(u.checkNaN)(i.value),e.unref(u.dataLabel)({p:t.value.valuePrefix,v:e.unref(u.checkNaN)(i.value),s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:i,seriesIndex:m})),9,ll))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",al,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.extremes.maxSeries,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{x:c.value.drawingArea.left+r*c.value.slotSize,y:c.value.drawingArea.top,height:c.value.drawingArea.height<=0?1e-5:c.value.drawingArea.height,width:c.value.slotSize<=0?1e-5:c.value.slotSize,fill:[F.value,T.value].includes(r)?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:i=>c.value.useTooltip(r),onMouseleave:v[2]||(v[2]=i=>c.value.killTooltip()),onClick:i=>h("selectDatapoint",c.value.dataset.map(m=>({...m,value:m.values[r]})))},null,44,ol))),256))])],64)):e.createCommentVNode("",!0),[S.LINE,S.BAR].includes(b.value)?(e.openBlock(),e.createElementBlock("g",nl,[t.value.xAxisLabel&&b.value===S.LINE?(e.openBlock(),e.createElementBlock("g",rl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,"text-anchor":"middle",x:d.value.drawingArea.left+d.value.drawingArea.width/2,y:y.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,il)])):e.createCommentVNode("",!0),t.value.xAxisLabel&&b.value===S.BAR?(e.openBlock(),e.createElementBlock("g",ul,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,"text-anchor":"middle",x:c.value.drawingArea.left+c.value.drawingArea.width/2,y:y.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,sl)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&b.value===S.LINE?(e.openBlock(),e.createElementBlock("g",cl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,transform:`translate(${t.value.axisLabelsFontSize}, ${d.value.drawingArea.top+d.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.yAxisLabel),9,dl)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&b.value===S.BAR?(e.openBlock(),e.createElementBlock("g",vl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,transform:`translate(${t.value.axisLabelsFontSize}, ${c.value.drawingArea.top+c.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.yAxisLabel),9,ml)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],12,Je)):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(De.default,{key:4,config:{type:"line",style:{backgroundColor:t.value.backgroundColor,line:{axis:{color:t.value.xyAxisStroke},path:{color:t.value.xyAxisStroke,strokeWidth:.5}}}}},null,8,["config"])),n.$slots.watermark?(e.openBlock(),e.createElementBlock("div",hl,[e.renderSlot(n.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&f.value.maxSeriesLength>1?(e.openBlock(),e.createElementBlock("div",{key:`slicer_${K.value}`,ref_key:"quickChartSlicer",ref:j},[(e.openBlock(),e.createBlock(Oe.Slicer,{key:`slicer_${K.value}`,background:t.value.zoomColor,borderColor:t.value.backgroundColor,fontSize:t.value.zoomFontSize,useResetSlot:t.value.zoomUseResetSlot,labelLeft:t.value.xyPeriods[k.value.start]?t.value.xyPeriods[k.value.start]:"",labelRight:t.value.xyPeriods[k.value.end-1]?t.value.xyPeriods[k.value.end-1]:"",textColor:t.value.color,inputColor:t.value.zoomColor,selectColor:t.value.zoomHighlightColor,max:f.value.maxSeriesLength,min:0,valueStart:k.value.start,valueEnd:k.value.end,smoothMinimap:t.value.zoomMinimap.smooth,minimapSelectedColor:t.value.zoomMinimap.selectedColor,minimapSelectedColorOpacity:t.value.zoomMinimap.selectedColorOpacity,minimapSelectionRadius:t.value.zoomMinimap.selectionRadius,minimapLineColor:t.value.zoomMinimap.lineColor,minimap:Te.value,minimapIndicatorColor:t.value.zoomMinimap.indicatorColor,minimapSelectedIndex:T.value,start:k.value.start,"onUpdate:start":v[3]||(v[3]=l=>k.value.start=l),end:k.value.end,"onUpdate:end":v[4]||(v[4]=l=>k.value.end=l),onReset:Pe,onTrapMouse:$e},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(n.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","smoothMinimap","minimapSelectedColor","minimapSelectedColorOpacity","minimapSelectionRadius","minimapLineColor","minimap","minimapIndicatorColor","minimapSelectedIndex","start","end"]))])):e.createCommentVNode("",!0),t.value.showLegend?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"quickChartLegend",ref:U,class:"vue-ui-quick-chart-legend",style:e.normalizeStyle(`background:transparent;color:${t.value.color}`)},[b.value===S.DONUT?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(w.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:i=>{Fe(l,w.value.dataset),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${w.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(re.default,{name:t.value.legendIcon,stroke:l.color,size:t.value.legendIconSize},null,8,["name","stroke","size"]),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)},e.toDisplayString(l.name),5),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px;font-variant-numeric:tabular-nums`)},e.toDisplayString(x.value.includes(l.id)?"-":e.unref(u.applyDataLabel)(t.value.formatter,l.absoluteValue,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.absoluteValue,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),5),x.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)}," ( - % ) ",4)):oe.value?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)}," ( - % ) ",4)):(e.openBlock(),e.createElementBlock("span",{key:2,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)}," ("+e.toDisplayString(e.unref(u.dataLabel)({v:l.value/w.value.total*100,s:"%",r:t.value.dataLabelRoundingPercentage}))+") ",5))],64))],12,pl))),256)):e.createCommentVNode("",!0),b.value===S.LINE?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:i=>{ge(l.id,d.value.legend.length-1),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${d.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(re.default,{name:t.value.legendIcon,stroke:l.color,size:t.value.legendIconSize},null,8,["name","stroke","size"]),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)},e.toDisplayString(l.name),5)],64))],12,fl))),256)):e.createCommentVNode("",!0),b.value===S.BAR?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(c.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:i=>{ge(l.id,c.value.legend.length-1),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${c.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(re.default,{name:t.value.legendIcon,stroke:l.color,size:t.value.legendIconSize},null,8,["name","stroke","size"]),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)},e.toDisplayString(l.name),5)],64))],12,kl))),256)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),n.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:de,dir:"auto"},[e.renderSlot(n.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ie._sfc_main,{show:le.value.showTooltip&&$.value,backgroundColor:t.value.backgroundColor,color:t.value.color,borderRadius:t.value.tooltipBorderRadius,borderColor:t.value.tooltipBorderColor,borderWidth:t.value.tooltipBorderWidth,fontSize:t.value.tooltipFontSize,backgroundOpacity:t.value.tooltipBackgroundOpacity,position:t.value.tooltipPosition,offsetY:t.value.tooltipOffsetY,parent:V.value,content:R.value,isCustom:e.unref(u.isFunction)(t.value.tooltipCustomFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(n.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(n.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"])],14,Ze)):(e.openBlock(),e.createElementBlock("div",gl,[e.createVNode(re.default,{name:"circleCancel",stroke:"red"}),yl]))}},Sl=qe._export_sfc(xl,[["__scopeId","data-v-606895e6"]]);exports.default=Sl;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-eFox7weK.cjs"),oe=require("./useResponsive-CodiGUOE.cjs"),fe=require("./Title-0Tp4hZ4u.cjs"),ae=require("./usePrinter-CSRFnDBU.cjs"),ye=require("./Tooltip-9Tp2Yrd1.cjs"),ke=require("./vue-ui-sparkbar-Bgn6AY0q.cjs"),be=require("./Legend-Cgw4lO2O.cjs"),Ce=require("./DataTable-DTzynbND.cjs"),we=require("./vue-ui-skeleton-BqKzuhkB.cjs"),Be=require("./vue-ui-accordion-TEMpM1hO.cjs"),le=require("./useNestedProp-BkgEhTQY.cjs"),_e=require("./PackageVersion-DwI-KhXH.cjs"),Pe=require("./PenAndPaper-CDFVOo7X.cjs"),$e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xe=["id"],Ne=["xmlns","viewBox"],Te=["id"],Se=["stop-color"],Ee=["stop-color"],Ve={key:0},Ae=["x1","y1","x2","y2","stroke","stroke-width"],Oe={key:0},Fe=["d","stroke","stroke-width"],Le=["d","stroke","stroke-width"],ze={key:1},Ie=["x","y","text-anchor","font-size","fill","onMouseenter"],Re=["points","stroke","stroke-width"],qe=["points","stroke","stroke-width","fill"],De={key:2},Me=["cx","cy","fill","r","stroke"],Ue={key:4,class:"vue-data-ui-watermark"},Ge=["onClick"],We={key:0,style:{"max-width":"200px",margin:"0 auto"}},He={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(re,{expose:ne,emit:ue}){const d=re,{vue_ui_radar:se}=n.useConfig(),b=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),ie=e.ref(null),x=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(null),R=e.ref(0),q=e.ref(0),D=e.ref(0),t=e.computed({get:()=>M(),set:o=>o});function M(){const o=le.useNestedProp({userConfig:d.config,defaultConfig:se});return o.theme?{...le.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=M(),U(),R.value+=1,q.value+=1,D.value+=1},{deep:!0});const B=e.ref(null);function U(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=oe.throttle(()=>{const{width:a,height:l}=oe.useResponsive({chart:f.value,title:t.value.style.chart.title.text?L.value:null,legend:t.value.style.chart.legend.show?z.value:null,source:I.value});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(f.value.parentNode)}}e.onMounted(()=>{U()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:G,isImaging:W,generatePdf:H,generateImage:X}=ae.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),j=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}),ce=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 Y(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)),ue("selectLegend",k.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function de(){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)||j.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)||j.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),J=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),K=e.computed(()=>p.value.length),T=e.computed(()=>Math.min(s.value.width,s.value.height)/3),Q=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:T.value,sides:K.value,rotation:0})),ve=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(()=>Q.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>pe({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||J.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 pe({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||J.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:()=>Y(l),isSegregated:i.value.includes(l)}))}),ge=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 he(o,a){E.value=[],P.value=a,x.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 Z(){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,je)=>[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 me(o){w.value=o,F.value+=1}function ee(){g.value.showTable=!g.value.showTable}function te(){g.value.showTooltip=!g.value.showTooltip}const $=e.ref(!1);function A(){$.value=!$.value}return ne({getData:de,generatePdf:H,generateCsv:Z,generateImage:X,toggleTable:ee,toggleTooltip:te,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(Pe.PenAndPaper,{key:0,parent:f.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.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(fe._sfc_main,{key:`title_${R.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(ae.UserOptions,{ref_key:"details",ref:ie,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(W),isPrinting:e.unref(G),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:$.value,onToggleFullscreen:me,onGeneratePdf:e.unref(H),onGenerateCsv:Z,onGenerateImage:e.unref(X),onToggleTable:ee,onToggleTooltip:te,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(_e._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,Se),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ee)],8,Te))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ve,[(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,Ae))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ve.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:K.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,Fe))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:Q.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,Le),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",ze,[(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=>he(l,r),onMouseleave:a[0]||(a[0]=u=>{x.value=!1,P.value=null})},e.toDisplayString(l.name),41,Ie))),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,Re)):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,qe)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",De,[(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,Me))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,Ne)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ue,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(G)||e.unref(W)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.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(be.Legend,{key:`legend_${D.value}`,legendSet:k.value,config:ge.value,onClickMarker:a[1]||(a[1]=({i:l})=>Y(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,Ge)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:I,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ye._sfc_main,{show:g.value.showTooltip&&x.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",We,[e.createVNode(ke.default,{dataset:E.value,config:ce.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(Be.default,{key:7,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(Ce.DataTable,{key:`table_${q.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))}},Xe=$e._export_sfc(He,[["__scopeId","data-v-f0bd4098"]]);exports.default=Xe;