vue-data-ui 2.3.27 → 2.3.29

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 (183) hide show
  1. package/README.md +17 -1
  2. package/dist/{Arrow-HROOtfWV.cjs → Arrow-B8z06v67.cjs} +1 -1
  3. package/dist/{Arrow-O38M_J_k.js → Arrow-Bh7WeO_g.js} +1 -1
  4. package/dist/{BaseIcon-D8FXGup9.js → BaseIcon-BG_bJS3R.js} +1 -1
  5. package/dist/{BaseIcon-CiO8gP9x.cjs → BaseIcon-DDCJA3rm.cjs} +1 -1
  6. package/dist/{DataTable-EqeVt-K-.js → DataTable-CsPidn0_.js} +23 -20
  7. package/dist/DataTable-Doh_4M84.cjs +1 -0
  8. package/dist/{Legend-C_lBCmBu.cjs → Legend-B20rRwGi.cjs} +1 -1
  9. package/dist/{Legend-8eVERYMn.js → Legend-CkQ_zypV.js} +1 -1
  10. package/dist/{Shape-DvcgW6uK.js → Shape-B4gGeBLI.js} +1 -1
  11. package/dist/{Shape-D8RdmYWq.cjs → Shape-B8O8_E6l.cjs} +1 -1
  12. package/dist/{Slicer-BvYL7yVK.cjs → Slicer-BXveU40S.cjs} +1 -1
  13. package/dist/{Slicer-CH_5wnFM.js → Slicer-DaEfxscP.js} +1 -1
  14. package/dist/{Title-B9iq63n1.cjs → Title-BU6E8Xld.cjs} +1 -1
  15. package/dist/{Title-C3Ez1ceq.js → Title-eBTH8iGJ.js} +1 -1
  16. package/dist/{Tooltip-7SRMoiu-.js → Tooltip-B11OahTD.js} +1 -1
  17. package/dist/{Tooltip-DcDEanxk.cjs → Tooltip-Oicp_EIo.cjs} +1 -1
  18. package/dist/documentation/installation.md +1 -1
  19. package/dist/{index-DiWO-_ca.js → index-BlXzlBwZ.js} +447 -364
  20. package/dist/index-hKWfT7Wa.cjs +4 -0
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +66 -0
  23. package/dist/types/vue-data-ui.d.ts +66 -0
  24. package/dist/{useNestedProp-DNX5EefQ.js → useNestedProp-BoNl5H_z.js} +1 -1
  25. package/dist/{useNestedProp-BtqgWTf9.cjs → useNestedProp-Cggpoz7e.cjs} +1 -1
  26. package/dist/{usePrinter-BD40aUzH.js → usePrinter-CZ8F5Cth.js} +1 -1
  27. package/dist/{usePrinter-Q1J--baX.cjs → usePrinter-DoYKBzst.cjs} +1 -1
  28. package/dist/{vue-data-ui-GHpxkf8a.js → vue-data-ui-BOqzG_nZ.js} +57 -57
  29. package/dist/{vue-data-ui-yd5q4Ura.cjs → vue-data-ui-CGgiWEo3.cjs} +1 -1
  30. package/dist/vue-data-ui.cjs +1 -1
  31. package/dist/vue-data-ui.js +6 -6
  32. package/dist/{vue-ui-3d-bar-CAmoj5dT.js → vue-ui-3d-bar-CjnVg4YI.js} +342 -294
  33. package/dist/vue-ui-3d-bar-CpntMt7p.cjs +19 -0
  34. package/dist/{vue-ui-accordion-ogVvFfQy.cjs → vue-ui-accordion-CTYvdLLH.cjs} +1 -1
  35. package/dist/{vue-ui-accordion-CiNdgRO9.js → vue-ui-accordion-wHRG3nXl.js} +3 -3
  36. package/dist/vue-ui-age-pyramid-DDiL1Zje.cjs +1 -0
  37. package/dist/{vue-ui-age-pyramid-BrTpbEha.js → vue-ui-age-pyramid-vmCwgRy9.js} +258 -219
  38. package/dist/{vue-ui-annotator-B9IqZ-Hy.js → vue-ui-annotator-9FGJdNLY.js} +1 -1
  39. package/dist/{vue-ui-annotator-QbetAXoj.cjs → vue-ui-annotator-DQ3wKf9n.cjs} +1 -1
  40. package/dist/{vue-ui-candlestick-BvRwlc3d.cjs → vue-ui-candlestick-6joQ9JKQ.cjs} +1 -1
  41. package/dist/{vue-ui-candlestick-XjjwFaDO.js → vue-ui-candlestick-DpMr2r0i.js} +9 -9
  42. package/dist/{vue-ui-carousel-table-DtxcnSEp.cjs → vue-ui-carousel-table-BV0EOLqU.cjs} +1 -1
  43. package/dist/{vue-ui-carousel-table-KYENY5gp.js → vue-ui-carousel-table-CgR4ADOz.js} +4 -4
  44. package/dist/{vue-ui-chestnut-DfIcguJd.js → vue-ui-chestnut-Ca2878kV.js} +439 -347
  45. package/dist/vue-ui-chestnut-CxoCcw_B.cjs +6 -0
  46. package/dist/{vue-ui-cursor-C4pJe90O.js → vue-ui-cursor-BW8C6oUc.js} +2 -2
  47. package/dist/{vue-ui-cursor-COS_MXr8.cjs → vue-ui-cursor-DxF_gXQf.cjs} +1 -1
  48. package/dist/{vue-ui-dashboard-DNOjWStr.cjs → vue-ui-dashboard-BGrVyITN.cjs} +1 -1
  49. package/dist/{vue-ui-dashboard-B_NUnxEF.js → vue-ui-dashboard-DN4nErBZ.js} +2 -2
  50. package/dist/{vue-ui-digits-uufqLbRt.js → vue-ui-digits-CmSFSs5S.js} +2 -2
  51. package/dist/{vue-ui-digits-Vx5prxaT.cjs → vue-ui-digits-CpSKBG2c.cjs} +1 -1
  52. package/dist/vue-ui-donut-BqfRwAIM.js +857 -0
  53. package/dist/vue-ui-donut-C29yXH3H.cjs +1 -0
  54. package/dist/vue-ui-donut-evolution-COFG73Xl.cjs +1 -0
  55. package/dist/vue-ui-donut-evolution-DIR7yBUC.js +839 -0
  56. package/dist/{vue-ui-dumbbell-z_Ck4W33.cjs → vue-ui-dumbbell-1NA60u3h.cjs} +2 -2
  57. package/dist/{vue-ui-dumbbell-KvrVLLw6.js → vue-ui-dumbbell-BASuPAvI.js} +202 -187
  58. package/dist/{vue-ui-flow-Dg4dkrcd.cjs → vue-ui-flow-DBK7d0DQ.cjs} +1 -1
  59. package/dist/{vue-ui-flow-BjMikE9b.js → vue-ui-flow-wq0aqc5r.js} +98 -93
  60. package/dist/vue-ui-galaxy-BgdVvk4N.cjs +1 -0
  61. package/dist/{vue-ui-galaxy-BdgveN18.js → vue-ui-galaxy-CFQ2hQAl.js} +180 -144
  62. package/dist/{vue-ui-gauge-D8pokfoA.cjs → vue-ui-gauge-C4_kEbgg.cjs} +1 -1
  63. package/dist/{vue-ui-gauge-D01FLnNz.js → vue-ui-gauge-CIN265dN.js} +158 -149
  64. package/dist/vue-ui-gizmo-BpT3iwC9.cjs +1 -0
  65. package/dist/{vue-ui-gizmo-Cp-EftjP.js → vue-ui-gizmo-DRXWEpqU.js} +63 -49
  66. package/dist/vue-ui-heatmap-CVD7FVfk.cjs +1 -0
  67. package/dist/vue-ui-heatmap-Dc0ft_Ga.js +644 -0
  68. package/dist/{vue-ui-kpi-D6rVKouk.js → vue-ui-kpi-DDL1TvBP.js} +19 -10
  69. package/dist/{vue-ui-kpi-PWurAGxE.cjs → vue-ui-kpi-WDZIt76s.cjs} +1 -1
  70. package/dist/{vue-ui-mini-loader-YV68i0nk.js → vue-ui-mini-loader-B2C5U55l.js} +2 -2
  71. package/dist/{vue-ui-mini-loader-BsypWozL.cjs → vue-ui-mini-loader-BcGSpUfg.cjs} +1 -1
  72. package/dist/{vue-ui-molecule-Bx3fXHnw.cjs → vue-ui-molecule-C5BmRi2R.cjs} +1 -1
  73. package/dist/{vue-ui-molecule-BWYCf3Km.js → vue-ui-molecule-CD3cPNOq.js} +9 -9
  74. package/dist/{vue-ui-mood-radar-DsZozq6x.js → vue-ui-mood-radar-D0KbeV5j.js} +213 -187
  75. package/dist/vue-ui-mood-radar-afS64zg-.cjs +1 -0
  76. package/dist/{vue-ui-nested-donuts-qaViBhR3.js → vue-ui-nested-donuts-BGoc1RFX.js} +295 -228
  77. package/dist/vue-ui-nested-donuts-D-TeyOtL.cjs +17 -0
  78. package/dist/{vue-ui-onion-0iFsjuLM.js → vue-ui-onion-B_khL0Kv.js} +230 -196
  79. package/dist/vue-ui-onion-CFdbWLu3.cjs +1 -0
  80. package/dist/{vue-ui-parallel-coordinate-plot-BkZOKTIS.cjs → vue-ui-parallel-coordinate-plot-BmXvVt8r.cjs} +2 -2
  81. package/dist/{vue-ui-parallel-coordinate-plot-DxDFs1Lb.js → vue-ui-parallel-coordinate-plot-CP4V0K8m.js} +87 -87
  82. package/dist/{vue-ui-quadrant-Tw7SKMbQ.js → vue-ui-quadrant-C1YbjeI7.js} +455 -397
  83. package/dist/vue-ui-quadrant-C6-A8Gx_.cjs +1 -0
  84. package/dist/vue-ui-quick-chart-ConXdEsU.cjs +15 -0
  85. package/dist/vue-ui-quick-chart-CtWhs_2c.js +1374 -0
  86. package/dist/{vue-ui-radar-D5FV2IDm.js → vue-ui-radar-B2vAPYa7.js} +237 -214
  87. package/dist/vue-ui-radar-DMJLLVWb.cjs +1 -0
  88. package/dist/{vue-ui-rating-DTWIh_CV.cjs → vue-ui-rating-DhZ0tltR.cjs} +1 -1
  89. package/dist/{vue-ui-rating-Dds9tjxd.js → vue-ui-rating-xGz4av68.js} +9 -9
  90. package/dist/{vue-ui-relation-circle-B2p8F7-L.js → vue-ui-relation-circle-BQK8wMQE.js} +5 -5
  91. package/dist/{vue-ui-relation-circle-Cu9lKkX3.cjs → vue-ui-relation-circle-hb4Q051h.cjs} +1 -1
  92. package/dist/vue-ui-rings-D1EW3d4M.cjs +2 -0
  93. package/dist/{vue-ui-rings-BKzCFSx-.js → vue-ui-rings-ZKjhNx5K.js} +191 -162
  94. package/dist/{vue-ui-scatter-CwV9l1P7.js → vue-ui-scatter-CHONk8k0.js} +437 -381
  95. package/dist/vue-ui-scatter-CMRe2b2K.cjs +1 -0
  96. package/dist/{vue-ui-screenshot-CnPWz57l.cjs → vue-ui-screenshot-DcKhT745.cjs} +1 -1
  97. package/dist/{vue-ui-screenshot-Bo6i-aRF.js → vue-ui-screenshot-DmGe5ptH.js} +6 -6
  98. package/dist/{vue-ui-skeleton-CeNL0kH-.js → vue-ui-skeleton-CJ2R5R6u.js} +37 -37
  99. package/dist/{vue-ui-skeleton-CcrGR_Vh.cjs → vue-ui-skeleton-j-IOiy5w.cjs} +1 -1
  100. package/dist/{vue-ui-smiley-BBcmwq4z.cjs → vue-ui-smiley-D5Jn6d5f.cjs} +1 -1
  101. package/dist/{vue-ui-smiley-BGMzw-SW.js → vue-ui-smiley-DXVcosKR.js} +2 -2
  102. package/dist/{vue-ui-spark-trend-DlvTlA9z.cjs → vue-ui-spark-trend-CWH3W7h3.cjs} +1 -1
  103. package/dist/{vue-ui-spark-trend-CSC9zmt7.js → vue-ui-spark-trend-Gg6TxR4m.js} +63 -58
  104. package/dist/vue-ui-sparkbar-BsoKTXr2.cjs +1 -0
  105. package/dist/vue-ui-sparkbar-DUx1qVzQ.js +280 -0
  106. package/dist/{vue-ui-sparkgauge-B5g5nxUh.cjs → vue-ui-sparkgauge-DPusPoRv.cjs} +1 -1
  107. package/dist/{vue-ui-sparkgauge-DJPt0cLe.js → vue-ui-sparkgauge-xrvp9g87.js} +60 -50
  108. package/dist/vue-ui-sparkhistogram---JRg2R1.cjs +1 -0
  109. package/dist/{vue-ui-sparkhistogram-DpvQcFls.js → vue-ui-sparkhistogram-DzYXMNj8.js} +99 -90
  110. package/dist/{vue-ui-sparkline-Bw3y-88R.cjs → vue-ui-sparkline-1Z6GnwoN.cjs} +1 -1
  111. package/dist/{vue-ui-sparkline-CDSg9rhl.js → vue-ui-sparkline-CGWePkVI.js} +114 -105
  112. package/dist/{vue-ui-sparkstackbar-Ckcir2dk.cjs → vue-ui-sparkstackbar-DCc68t8g.cjs} +1 -1
  113. package/dist/{vue-ui-sparkstackbar-DveNwcVx.js → vue-ui-sparkstackbar-DFgeRAbQ.js} +52 -47
  114. package/dist/{vue-ui-stackbar-CZUsUeZ_.js → vue-ui-stackbar-B0dWToaf.js} +211 -196
  115. package/dist/vue-ui-stackbar-Cz0mT8Mo.cjs +15 -0
  116. package/dist/{vue-ui-strip-plot-lVVqtsNc.js → vue-ui-strip-plot-BFqd-S7c.js} +213 -198
  117. package/dist/vue-ui-strip-plot-DZt1Wq20.cjs +1 -0
  118. package/dist/{vue-ui-table-qtBWpg0m.cjs → vue-ui-table-CMvyMuc4.cjs} +1 -1
  119. package/dist/{vue-ui-table-8hNkBy1z.js → vue-ui-table-DtwEoIzI.js} +9 -9
  120. package/dist/{vue-ui-table-heatmap-HgHQKSax.cjs → vue-ui-table-heatmap-3RSMOHkc.cjs} +1 -1
  121. package/dist/{vue-ui-table-heatmap-BAPA4nvf.js → vue-ui-table-heatmap-C8b3pE04.js} +12 -12
  122. package/dist/vue-ui-table-sparkline-BKOaVFtt.cjs +1 -0
  123. package/dist/vue-ui-table-sparkline-BrqhBv29.js +467 -0
  124. package/dist/vue-ui-thermometer-CKgIqM5y.cjs +1 -0
  125. package/dist/{vue-ui-thermometer-CcH1qmLq.js → vue-ui-thermometer-DMkLvJgE.js} +118 -108
  126. package/dist/{vue-ui-timer-C52mSn4m.cjs → vue-ui-timer-D7fvoR77.cjs} +1 -1
  127. package/dist/{vue-ui-timer-DJfYr02u.js → vue-ui-timer-RA9yfgBk.js} +8 -8
  128. package/dist/{vue-ui-tiremarks-CcLcd5oA.js → vue-ui-tiremarks-B_EncUi6.js} +79 -71
  129. package/dist/{vue-ui-tiremarks-dNuNMt_R.cjs → vue-ui-tiremarks-C7y6Mbxe.cjs} +1 -1
  130. package/dist/{vue-ui-treemap-BOz94BVK.js → vue-ui-treemap-BuGZgQsr.js} +274 -236
  131. package/dist/vue-ui-treemap-CfngjVUS.cjs +1 -0
  132. package/dist/vue-ui-vertical-bar-DKbq4bX4.cjs +4 -0
  133. package/dist/vue-ui-vertical-bar-T4bFd3JF.js +792 -0
  134. package/dist/vue-ui-waffle-BJFbhWnA.cjs +1 -0
  135. package/dist/vue-ui-waffle-CrxmrYsV.js +735 -0
  136. package/dist/{vue-ui-wheel-BVjbh4oM.cjs → vue-ui-wheel-BDRvKR1Z.cjs} +1 -1
  137. package/dist/{vue-ui-wheel-DMRiVkhu.js → vue-ui-wheel-DOyC7NgR.js} +73 -65
  138. package/dist/vue-ui-word-cloud-DBxVNlJ3.js +495 -0
  139. package/dist/vue-ui-word-cloud-Dmcelg3z.cjs +1 -0
  140. package/dist/{vue-ui-xy-CsFr8tix.js → vue-ui-xy-BIbvJSh2.js} +367 -288
  141. package/dist/vue-ui-xy-CVKaR90p.cjs +3 -0
  142. package/dist/vue-ui-xy-canvas-2AaNivzI.cjs +9 -0
  143. package/dist/{vue-ui-xy-canvas-Bb2Z3E-7.js → vue-ui-xy-canvas-CXVni3kC.js} +284 -259
  144. package/package.json +1 -1
  145. package/dist/DataTable-C6HTLT7L.cjs +0 -1
  146. package/dist/index-BQOxn6SH.cjs +0 -4
  147. package/dist/vue-ui-3d-bar-DkJ4c3HQ.cjs +0 -19
  148. package/dist/vue-ui-age-pyramid-CkKVbbl8.cjs +0 -1
  149. package/dist/vue-ui-chestnut-C7gFvKLJ.cjs +0 -6
  150. package/dist/vue-ui-donut-C33U3e8H.js +0 -751
  151. package/dist/vue-ui-donut-CeHnjIGu.cjs +0 -1
  152. package/dist/vue-ui-donut-evolution-IzfAVo5I.js +0 -805
  153. package/dist/vue-ui-donut-evolution-hHfvz1Yd.cjs +0 -1
  154. package/dist/vue-ui-galaxy-B8EoId23.cjs +0 -1
  155. package/dist/vue-ui-gizmo-8lKc8m8b.cjs +0 -1
  156. package/dist/vue-ui-heatmap-BEsvmj5R.js +0 -606
  157. package/dist/vue-ui-heatmap-DvpvKq3Q.cjs +0 -1
  158. package/dist/vue-ui-mood-radar-C6devC4e.cjs +0 -1
  159. package/dist/vue-ui-nested-donuts-BtT3VsSf.cjs +0 -16
  160. package/dist/vue-ui-onion-9ATTDUpw.cjs +0 -1
  161. package/dist/vue-ui-quadrant-DD4H_Dhk.cjs +0 -1
  162. package/dist/vue-ui-quick-chart-CpFHKtpm.js +0 -1318
  163. package/dist/vue-ui-quick-chart-D1udOl47.cjs +0 -13
  164. package/dist/vue-ui-radar-CZmJDj3q.cjs +0 -1
  165. package/dist/vue-ui-rings-DN7XmhKZ.cjs +0 -1
  166. package/dist/vue-ui-scatter-DJlC5mz4.cjs +0 -1
  167. package/dist/vue-ui-sparkbar-0CNZluKs.js +0 -257
  168. package/dist/vue-ui-sparkbar-Di-BPkJ0.cjs +0 -1
  169. package/dist/vue-ui-sparkhistogram-BhkYmR4U.cjs +0 -1
  170. package/dist/vue-ui-stackbar-jNWFgXiA.cjs +0 -15
  171. package/dist/vue-ui-strip-plot-CzHFNhr3.cjs +0 -1
  172. package/dist/vue-ui-table-sparkline-DZY_23mg.js +0 -420
  173. package/dist/vue-ui-table-sparkline-Q8y6tloS.cjs +0 -1
  174. package/dist/vue-ui-thermometer-Cbu9jVvC.cjs +0 -1
  175. package/dist/vue-ui-treemap-orjA7Y0U.cjs +0 -1
  176. package/dist/vue-ui-vertical-bar-BHIt5cjc.cjs +0 -4
  177. package/dist/vue-ui-vertical-bar-BquCm_UG.js +0 -745
  178. package/dist/vue-ui-waffle-CNlp7RTS.js +0 -650
  179. package/dist/vue-ui-waffle-Dv8pXiYm.cjs +0 -1
  180. package/dist/vue-ui-word-cloud-CHRE8f_k.js +0 -352
  181. package/dist/vue-ui-word-cloud-CZum_IjT.cjs +0 -1
  182. package/dist/vue-ui-xy-BOoG4xg8.cjs +0 -3
  183. package/dist/vue-ui-xy-canvas-BHa3-phi.cjs +0 -9
@@ -1,13 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),d=require("./index-BQOxn6SH.cjs"),ke=require("./useResponsive-B3TrDDIG.cjs"),le=require("./BaseIcon-CiO8gP9x.cjs"),Ce=require("./Tooltip-DcDEanxk.cjs"),pe=require("./usePrinter-Q1J--baX.cjs"),ze=require("./Slicer-BvYL7yVK.cjs"),ge=require("./useNestedProp-BtqgWTf9.cjs"),Ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},Fe=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function Ve({dataset:r,barLineSwitch:b=6}){let h=null,A=null,N=0;if((typeof r=="number"||typeof r=="string")&&console.warn(`The provided dataset (${r}) is not sufficient to build a chart`),Y(r)&&(q(r)&&(r.length<b?h=S.BAR:h=S.LINE,A=r,N=r.length),ie(r))){if(!Pe(r))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const D=Object.keys(r[0]),W=Object.values(r[0]);if(!D.some(w=>Te(w)))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;ye(W,w=>typeof w=="number")&&(h=S.DONUT,A=r),ye(W,w=>Array.isArray(w)&&q(w))&&(xe(r)>b?h=S.LINE:h=S.BAR,N=xe(r),A=r.map(w=>({...w,data:Re(w,$=>q($))}))),r=r.map(w=>Se(w)),A=A.map(w=>Se(w))}return Y(r)&&[...new Set(r.flatMap(D=>Array.isArray(D)))][0],{dataset:r,type:h,usableDataset:A,maxSeriesLength:N}}function be(r){return!r||Y(r)&&!r.length}function Y(r){return Array.isArray(r)}function q(r){if(!Y(r)||be(r))return!1;const b=r.map(h=>Number(h));return![...new Set(b.flatMap(h=>typeof h=="number"&&!isNaN(h)))].includes(!1)}function ie(r){return!Y(r)||be(r)||!![...new Set(r.flatMap(h=>typeof h=="object"&&!Array.isArray(h)))].includes(!1)?!1:!r.map(h=>Object.keys(h).length>0).includes(!1)}function $e(r,b){const h=Object.keys(r).sort(),A=Object.keys(b).sort();if(h.length!==A.length)return!1;for(let N=0;N<h.length;N+=1){const V=h[N],I=A[N];if(V!==I||typeof r[V]!=typeof b[I])return!1}return!0}function Pe(r){if(r.length<=1)return!0;for(let b=0;b<r.length;b+=1)for(let h=b+1;h<r.length;h+=1)if(!$e(r[b],r[h]))return!1;return!0}function Te(r){return Fe.includes(r.toUpperCase())}function ye(r,b){let h=[];for(let A=0;A<r.length;A+=1)h.push(b(r[A]));return h.includes(!0)}function xe(r){return Math.max(...[...r].flatMap(b=>Object.values(b).filter(h=>q(h)).map(h=>h.length)))}function Re(r,b){return Object.values(r).filter(h=>b(h))[0]}function Se(r){const b={};for(let h in r)r.hasOwnProperty(h)&&(b[h.toUpperCase()]=r[h]);return b}const Be=r=>(e.pushScopeId("data-v-e62d13b6"),r=r(),e.popScopeId(),r),Oe=["id"],Ie=["xmlns","viewBox"],De=["id"],Me=["id"],Ue=Be(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),qe=["id"],We=["flood-color"],je={key:0,class:"donut-label-connectors"},Ge=["d","stroke","stroke-width","filter"],He=["cx","cy","r","fill"],Xe=["cx","cy","r","fill","filter"],Ye={class:"donut"},Ze=["d","fill","stroke","stroke-width","filter"],Je=["d","onMouseenter","onClick"],Ke={key:1,class:"donut-labels quick-animation"},Qe=["cx","cy","fill","filter"],et=["text-anchor","x","y","fill","font-size","filter"],tt=["text-anchor","x","y","fill","font-size","filter"],lt={key:2,class:"donut-hollow quick-animation"},at=["x","y","font-size","fill"],ot=["x","y","font-size","fill"],nt={key:0,class:"line-grid"},rt=["x1","x2","y1","y2","stroke","stroke-width"],it=["x1","x2","y1","y2","stroke","stroke-width"],ut={key:1,class:"line-axis"},st=["x1","x2","y1","y2","stroke","stroke-width"],ct=["x1","x2","y1","y2","stroke","stroke-width"],dt={key:2,class:"yLabels"},vt=["x1","x2","y1","y2","stroke","stroke-width"],mt=["x","y","font-size","fill"],ht={key:3,class:"periodLabels"},ft=["x1","x2","y1","y2","stroke","stroke-width"],kt=["font-size","text-anchor","fill","transform"],pt={class:"plots"},gt={class:"line-plot-series"},yt=["d","stroke","stroke-width"],xt=["d","stroke","stroke-width"],St=["d","stroke","stroke-width"],bt=["d","stroke","stroke-width"],Bt=["cx","cy","fill","stroke"],wt={key:4,class:"dataLabels"},Et=["font-size","fill","x","y"],_t={class:"tooltip-traps"},At=["x","y","height","width","fill","onMouseenter","onClick"],Lt={key:0,class:"line-grid"},Ct=["x1","x2","y1","y2","stroke","stroke-width"],zt=["x1","x2","y1","y2","stroke","stroke-width"],Nt={key:1,class:"line-axis"},Ft=["x1","x2","y1","y2","stroke","stroke-width"],Vt=["x1","x2","y1","y2","stroke","stroke-width"],$t={key:2,class:"yLabels"},Pt=["x1","x2","y1","y2","stroke","stroke-width"],Tt=["x","y","font-size","fill"],Rt={key:3,class:"periodLabels"},Ot=["x1","x2","y1","y2","stroke","stroke-width"],It=["font-size","text-anchor","transform","fill"],Dt={class:"plots"},Mt=["x","width","height","y","fill","stroke","stroke-width"],Ut=["to"],qt=["from","to"],Wt={key:4,class:"dataLabels"},jt=["x","y","font-size","fill"],Gt={class:"tooltip-traps"},Ht=["x","y","height","width","fill","onMouseenter","onClick"],Xt={key:3,class:"axis-labels"},Yt={key:0},Zt=["font-size","fill","x","y"],Jt={key:1},Kt=["font-size","fill","x","y"],Qt={key:2},el=["font-size","fill","transform"],tl={key:3},ll=["font-size","fill","transform"],al={key:2,class:"vue-data-ui-watermark"},ol=["onClick"],nl=["onClick"],rl=["onClick"],il={key:1,class:"vue-ui-quick-chart-not-processable"},ul=Be(()=>e.createElementVNode("span",null,"Dataset is not processable",-1)),sl={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(r,{expose:b,emit:h}){const A=r,{vue_ui_quick_chart:N}=d.useConfig(),V=e.ref(null),I=e.ref(null),D=e.ref(null),W=e.ref(null),w=e.ref(d.createUid()),$=e.ref(!1),j=e.ref(null),P=e.ref(""),F=e.ref(null),y=e.ref([]),ue=e.ref(0),ae=e.ref(0),t=e.computed(()=>{const i=ge.useNestedProp({userConfig:A.config,defaultConfig:N});return i.theme?{...ge.useNestedProp({userConfig:d.themes.vue_ui_quick_chart[i.theme]||A.config,defaultConfig:i}),customPalette:d.themePalettes[i.theme]||d.palette}:i}),G=e.computed(()=>d.convertCustomPalette(t.value.customPalette)),Z=e.computed(()=>{const i=Ve({dataset:A.dataset,barLineSwitch:t.value.chartIsBarUnderDatasetLength});return i||console.error("VueUiQuickChart : Dataset is not processable"),i}),x=e.ref(Z.value),we=e.computed(()=>!!x.value),E=e.computed(()=>x.value?x.value.type:null),{isPrinting:J,isImaging:K,generatePdf:se,generateImage:ce}=pe.usePrinter({elementId:`${E.value}_${w.value}`,fileName:t.value.title||E.value}),p=e.ref({width:t.value.width,height:t.value.height}),Q=e.ref({showTooltip:t.value.showTooltip}),ee=e.ref(null);e.onMounted(()=>{if(t.value.responsive){const i=ke.throttle(()=>{const{width:v,height:l}=ke.useResponsive({chart:V.value,title:t.value.title?I.value:null,legend:t.value.showLegend?D.value:null,slicer:[S.BAR,S.LINE].includes(E.value)&&t.value.zoomXy&&x.value.maxSeriesLength>1?W.value:null});p.value.width=v,p.value.height=l});ee.value=new ResizeObserver(i),ee.value.observe(V.value.parentNode)}}),e.onBeforeUnmount(()=>{ee.value&&ee.value.disconnect()});const Ee=e.computed(()=>{switch(E.value){case S.LINE:return`0 0 ${p.value.width<=0?10:p.value.width} ${p.value.height<=0?10:p.value.height}`;case S.BAR:return`0 0 ${p.value.width<=0?10:p.value.width} ${p.value.height<=0?10:p.value.height}`;case S.DONUT:return`0 0 ${p.value.width<=0?10:p.value.width} ${p.value.height<=0?10:p.value.height}`;default:return`0 0 ${p.value.width<=0?10:p.value.width} ${p.value.height<=0?10:p.value.height}`}});function de(i){return[...i].map(v=>v.value).reduce((v,l)=>v+l,0)}function H(i){return t.value.blurOnHover&&![null,void 0].includes(F.value)&&F.value!==i?`url(#blur_${w.value})`:""}function ve(i,v){y.value.includes(i)?y.value=y.value.filter(l=>l!==i):y.value.length<v&&y.value.push(i)}const me=e.ref(null),he=e.ref(null),te=e.ref(!1);function _e(i,v){te.value=!0;let l=i.value;if(y.value.includes(i.id)){let s=function(){l>n?(te.value=!1,cancelAnimationFrame(he.value),x.value={...x.value,dataset:x.value.dataset.map((m,L)=>i.id===`donut_${L}`?{...m,value:n,VALUE:n}:m)}):(l+=n*.025,x.value={...x.value,dataset:x.value.dataset.map((m,L)=>i.id===`donut_${L}`?{...m,value:l,VALUE:l}:m)},he.value=requestAnimationFrame(s))};y.value=y.value.filter(m=>m!==i.id);const n=Z.value.dataset.find((m,L)=>i.id===`donut_${L}`).VALUE;s()}else if(v.length>1){let n=function(){l<.1?(te.value=!1,cancelAnimationFrame(me.value),y.value.push(i.id),x.value={...x.value,dataset:x.value.dataset.map((s,m)=>i.id===`donut_${m}`?{...s,value:0,VALUE:0}:s)}):(l/=1.1,x.value={...x.value,dataset:x.value.dataset.map((s,m)=>i.id===`donut_${m}`?{...s,value:l,VALUE:l}:s)},me.value=requestAnimationFrame(n))};n()}}const B=e.computed(()=>{if(E.value!==S.DONUT)return null;const i=x.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?d.convertColorToHex(a.COLOR):G.value[o+t.value.paletteStartIndex]||d.palette[o+t.value.paletteStartIndex]||d.palette[(o+t.value.paletteStartIndex)%d.palette.length],immutableValue:a.value}));function v(a,o){return isNaN(a.value/de(o))?0:(a.value/de(o)*100).toFixed(t.value.dataLabelRoundingPercentage)+"%"}function l(a){return a.proportion*100>t.value.donutHideLabelUnderPercentage}function n(a,o){const k=Z.value.dataset.find((_,z)=>`donut_${z}`===a).VALUE;return Math.abs(String(Number(k.toFixed(0))).length-String(Number(o.toFixed(0))).length)}function s({datapoint:a,seriesIndex:o}){j.value={datapoint:a,seriesIndex:o,config:t.value,dataset:i},F.value=a.id;const k=t.value.tooltipCustomFormat;if(d.isFunction(k)&&d.functionReturnsString(()=>k({datapoint:a,seriesIndex:o,series:i,config:t.value})))P.value=k({datapoint:a,seriesIndex:o,series:i,config:t.value});else{let f="";f+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`,f+=`<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>`,f+=`<b>${d.dataLabel({p:t.value.valuePrefix,v:a.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})}</b>`,f+=`<span>(${d.dataLabel({v:a.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,P.value=`<div>${f}</div>`}$.value=!0}function m(){$.value=!1,F.value=null}const L={centerX:p.value.width/2,centerY:p.value.height/2},C=i.filter(a=>!y.value.includes(a.id)).map(a=>a.value||0).reduce((a,o)=>a+o,0),M=i.map((a,o)=>({...a,proportion:(a.value||0)/C,value:a.value||0,absoluteValue:Z.value.dataset.find((k,f)=>`donut_${f}`===a.id).VALUE})),T=p.value.width/2,U=p.value.height/2,R=p.value.height*t.value.donutRadiusRatio;return{dataset:M.filter(a=>!y.value.includes(a.id)),legend:M,drawingArea:L,displayArcPercentage:v,isArcBigEnough:l,useTooltip:s,killTooltip:m,getSpaces:n,total:C,cx:T,cy:U,radius:R,chart:d.makeDonut({series:i.filter(a=>!y.value.includes(a.id))},T,U,R,R,1.99999,2,1,360,105.25,p.value.height*t.value.donutThicknessRatio)}}),g=e.ref({start:0,end:x.value.maxSeriesLength});function Ae(){g.value={start:0,end:x.value.maxSeriesLength},ae.value+=1}const c=e.computed(()=>{if(E.value!==S.LINE)return null;const i={height:p.value.height,width:p.value.width},v={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:i.width-t.value.xyPaddingRight,bottom:i.height-t.value.xyPaddingBottom,width:i.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:i.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];q(x.value.dataset)&&(l=[{values:x.value.dataset.slice(g.value.start,g.value.end),absoluteIndices:x.value.dataset.map((a,o)=>o).slice(g.value.start,g.value.end),name:t.value.title,color:G.value[t.value.paletteStartIndex]||d.palette[t.value.paletteStartIndex],id:"line_0"}]),ie(x.value.dataset)&&(l=x.value.dataset.map((a,o)=>({...a,values:a.VALUE||a.DATA||a.SERIE||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?d.convertColorToHex(a.COLOR):G.value[o+t.value.paletteStartIndex]||d.palette[o+t.value.paletteStartIndex]||d.palette[(o+t.value.paletteStartIndex)%d.palette.length],values:a.values.slice(g.value.start,g.value.end),absoluteIndices:a.values.map((k,f)=>f).slice(g.value.start,g.value.end)})));const n={max:Math.max(...l.filter(a=>!y.value.includes(a.id)).flatMap(a=>a.values)),min:Math.min(...l.filter(a=>!y.value.includes(a.id)).flatMap(a=>a.values)),maxSeries:Math.max(...l.map(a=>a.values.length))},s=d.calculateNiceScale(n.min<0?n.min:0,n.max<0?0:n.max,t.value.xyScaleSegments),m=n.min<0?Math.abs(n.min):0,L=n.max<0?v.top:v.bottom-m/(s.max+m)*v.height,C=v.width/n.maxSeries,M=s.ticks.map(a=>({y:v.bottom-v.height*((a+m)/(s.max+m)),x:v.left-8,value:a})),T=l.map((a,o)=>({...a,coordinates:a.values.map((k,f)=>({x:v.left+C*(f+1)-C/2,y:v.bottom-(k+m)/(s.max+m)*v.height,value:k}))})).map(a=>{let o=[];return a.coordinates.forEach(k=>{o.push(`${k.x},${k.y} `)}),{...a,linePath:o.join(" ")}});function U(a){F.value=a;const o=l.map(f=>({...f,value:f.values[a],absoluteIndex:f.absoluteIndices[a]})).filter(f=>!y.value.includes(f.id));j.value={datapoint:o,seriesIndex:a,config:t.value,dataset:l};const k=t.value.tooltipCustomFormat;if(d.isFunction(k)&&d.functionReturnsString(()=>k({datapoint:o,seriesIndex:a,series:l,config:t.value})))P.value=k({datapoint:o,seriesIndex:a,series:l,config:t.value});else{let f="";t.value.xyPeriods[o[0].absoluteIndex]&&(f+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[o[0].absoluteIndex]}</div>`),o.forEach(_=>{f+=`
2
- <div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
3
- <svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${_.color}"/></svg>
4
- <span>${_.name}:</span>
5
- <b>${d.dataLabel({p:t.value.valuePrefix,v:_.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})}</b>
6
- </div>
7
- `}),P.value=f}$.value=!0}function R(){F.value=null,$.value=!1}return{absoluteZero:L,dataset:T.filter(a=>!y.value.includes(a.id)),legend:T,drawingArea:v,extremes:n,slotSize:C,yLabels:M,useTooltip:U,killTooltip:R}}),u=e.computed(()=>{if(E.value!==S.BAR)return null;const i={height:p.value.height,width:p.value.width},v={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:i.width-t.value.xyPaddingRight,bottom:i.height-t.value.xyPaddingBottom,width:i.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:i.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];q(x.value.dataset)&&(l=[{values:x.value.dataset.slice(g.value.start,g.value.end),absoluteIndices:x.value.dataset.map((o,k)=>k).slice(g.value.start,g.value.end),name:t.value.title,color:G.value[t.value.paletteStartIndex]||d.palette[t.value.paletteStartIndex],id:"bar_0"}]),ie(x.value.dataset)&&(l=x.value.dataset.map((o,k)=>({...o,values:o.VALUE||o.DATA||o.SERIE||o.VALUES||o.NUM||0,name:o.NAME||o.DESCRIPTION||o.TITLE||o.LABEL||`Serie ${k}`,id:`bar_${k}`})).map((o,k)=>({...o,color:o.COLOR?d.convertColorToHex(o.COLOR):G.value[k+t.value.paletteStartIndex]||d.palette[k+t.value.paletteStartIndex]||d.palette[(k+t.value.paletteStartIndex)%d.palette.length],values:o.values.slice(g.value.start,g.value.end),absoluteIndices:o.values.map((f,_)=>_).slice(g.value.start,g.value.end)})));const n={max:Math.max(...l.filter(o=>!y.value.includes(o.id)).flatMap(o=>o.values))<0?0:Math.max(...l.filter(o=>!y.value.includes(o.id)).flatMap(o=>o.values)),min:Math.min(...l.filter(o=>!y.value.includes(o.id)).flatMap(o=>o.values)),maxSeries:Math.max(...l.filter(o=>!y.value.includes(o.id)).map(o=>o.values.length))},s=d.calculateNiceScale(n.min<0?n.min:0,n.max,t.value.xyScaleSegments),m=s.min<0?Math.abs(s.min):0,L=v.bottom-m/(s.max+m)*v.height,C=v.width/n.maxSeries,M=s.ticks.map(o=>({y:v.bottom-v.height*((o+m)/(s.max+m)),x:v.left-8,value:o})),T=l.map((o,k)=>({...o,coordinates:o.values.map((f,_)=>{const z=(f+m)/(n.max+m)*v.height,ne=Math.abs(f)/Math.abs(n.min)*(v.height-L),re=m/(n.max+m)*v.height,X=C/l.filter(O=>!y.value.includes(O.id)).length-t.value.barGap/l.filter(O=>!y.value.includes(O.id)).length;return{x:v.left+C*_+X*k+t.value.barGap/2,y:f>0?v.bottom-z:L,height:f>0?z-re:ne,value:f,width:X}})})),U=l.filter(o=>!y.value.includes(o.id)).map((o,k)=>({...o,coordinates:o.values.map((f,_)=>{const z=(f+m)/(n.max+m)*v.height,ne=Math.abs(f)/(n.max+m)*v.height,re=m/(n.max+m)*v.height,X=C/l.filter(O=>!y.value.includes(O.id)).length-t.value.barGap/l.filter(O=>!y.value.includes(O.id)).length;return{x:v.left+C*_+X*k+t.value.barGap/2,y:f>0?v.bottom-z:L,height:f>0?z-re:ne,value:f,width:X}})}));function R(o){F.value=o;const k=l.map(_=>({..._,value:_.values[o],absoluteIndex:_.absoluteIndices[o]})).filter(_=>!y.value.includes(_.id));j.value={datapoint:k,seriesIndex:o,config:t.value,dataset:l};const f=t.value.tooltipCustomFormat;if(d.isFunction(f)&&d.functionReturnsString(()=>f({datapoint:k,seriesIndex:o,series:l,config:t.value})))P.value=f({point:k,seriesIndex:o,series:l,config:t.value});else{let _="";t.value.xyPeriods[k[0].absoluteIndex]&&(_+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[k[0].absoluteIndex]}</div>`),k.forEach(z=>{_+=`
8
- <div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
9
- <svg viewBox="0 0 12 12" height="14" width="12"><rect x=0 y="0" width="12" height="12" rx="1" stroke="none" fill="${z.color}"/></svg>
10
- <span>${z.name}:</span>
11
- <b>${d.dataLabel({p:t.value.valuePrefix,v:z.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})}</b>
12
- </div>
13
- `}),P.value=_}$.value=!0}function a(){$.value=!1,F.value=null}return{absoluteZero:L,dataset:U.filter(o=>!y.value.includes(o.id)),legend:T,drawingArea:v,extremes:n,slotSize:C,yLabels:M,useTooltip:R,killTooltip:a}}),oe=e.ref(!1);function Le(i){oe.value=i,ue.value+=1}function fe(){Q.value.showTooltip=!Q.value.showTooltip}return b({generatePdf:se,generateImage:ce,toggleTooltip:fe}),(i,v)=>we.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:`${E.value}_${w.value}`,ref_key:"quickChart",ref:V,class:e.normalizeClass({"vue-ui-quick-chart":!0,"vue-data-ui-wrapper-fullscreen":oe.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.showUserOptions?(e.openBlock(),e.createBlock(pe.UserOptions,{ref:"details",key:`user_option_${ue.value}`,backgroundColor:t.value.backgroundColor,color:t.value.color,isPrinting:e.unref(J),isImaging:e.unref(K),uid:w.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:Q.value.showTooltip,isFullscreen:oe.value,titles:{...t.value.userOptionsButtonTitles},chartElement:V.value,onToggleFullscreen:Le,onGeneratePdf:e.unref(se),onGenerateImage:e.unref(ce),onToggleTooltip:fe},e.createSlots({_:2},[i.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(i.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,i.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(i.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,i.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(i.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,i.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(i.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),t.value.title?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"quickChartTitle",ref:I,class:"vue-ui-quick-chart-title",style:e.normalizeStyle(`background:${t.value.backgroundColor};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),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(d.XMLNS),viewBox:Ee.value,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.backgroundColor};color:${t.value.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${w.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${w.value}`},null,8,Me),Ue],8,De),e.createElementVNode("filter",{id:`shadow_${w.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,We)],8,qe)]),E.value===S.DONUT?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.chart,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[B.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(d.calcNutArrowPath)(l,{x:(t.value.width||p.value.width)/2,y:(t.value.height||p.value.height)/2},16,16,!1,!1,t.value.donutLabelMarkerStrokeWidth),stroke:l.color,"stroke-width":t.value.donutLabelMarkerStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:H(l.id)},null,8,Ge)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("circle",{class:"donut-hollow",cx:(t.value.width||p.value.width)/2,cy:(t.value.height||p.value.height)/2,r:(t.value.height||p.value.height)*t.value.donutRadiusRatio,fill:t.value.backgroundColor},null,8,He),e.createElementVNode("circle",{cx:B.value.cx,cy:B.value.cy,r:B.value.radius,fill:t.value.backgroundColor,filter:t.value.donutUseShadow?`url(#shadow_${w.value})`:""},null,8,Xe),e.createElementVNode("g",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.chart,(l,n)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":t.value.donutStrokeWidth,filter:H(l.id)},null,8,Ze))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.chart,(l,n)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:"transparent",onMouseenter:s=>B.value.useTooltip({datapoint:l,seriesIndex:n}),onMouseout:v[0]||(v[0]=s=>B.value.killTooltip()),onClick:s=>h("selectDatapoint",l)},null,40,Je))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",Ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.chart,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[B.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(d.calcMarkerOffsetX)(l).x,cy:e.unref(d.calcMarkerOffsetY)(l)-3.7,fill:l.color,r:3,filter:H(l.id)},null,8,Qe)):e.createCommentVNode("",!0),B.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(d.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(d.calcMarkerOffsetX)(l,!0).x,y:e.unref(d.calcMarkerOffsetY)(l),fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:H(l.id)},e.toDisplayString(B.value.displayArcPercentage(l,B.value.chart))+" ("+e.toDisplayString(e.unref(d.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}))+") ",9,et)):e.createCommentVNode("",!0),B.value.isArcBigEnough(l,!0,20)?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(d.calcMarkerOffsetX)(l).anchor,x:e.unref(d.calcMarkerOffsetX)(l,!0).x,y:e.unref(d.calcMarkerOffsetY)(l)+t.value.dataLabelFontSize,fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:H(l.id)},e.toDisplayString(l.name),9,tt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.donutShowTotal?(e.openBlock(),e.createElementBlock("g",lt,[e.createElementVNode("text",{"text-anchor":"middle",x:B.value.drawingArea.centerX,y:B.value.drawingArea.centerY-t.value.donutTotalLabelFontSize/2,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(t.value.donutTotalLabelText),9,at),e.createElementVNode("text",{"text-anchor":"middle",x:B.value.drawingArea.centerX,y:B.value.drawingArea.centerY+t.value.donutTotalLabelFontSize,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(e.unref(d.dataLabel)({p:t.value.valuePrefix,v:B.value.total,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})),9,ot)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),E.value===S.LINE?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.xyShowGrid?(e.openBlock(),e.createElementBlock("g",nt,[(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,rt)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.extremes.maxSeries+1,(l,n)=>(e.openBlock(),e.createElementBlock("line",{x1:c.value.drawingArea.left+c.value.slotSize*n,x2:c.value.drawingArea.left+c.value.slotSize*n,y1:c.value.drawingArea.top,y2:c.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,it))),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,st),e.createElementVNode("line",{x1:c.value.drawingArea.left,x2:c.value.drawingArea.right,y1:c.value.absoluteZero,y2:c.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,ct)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",dt,[(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: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,vt)):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(d.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})),9,mt)):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(g.value.start,g.value.end),(l,n)=>(e.openBlock(),e.createElementBlock("line",{x1:c.value.drawingArea.left+c.value.slotSize*(n+1)-c.value.slotSize/2,x2:c.value.drawingArea.left+c.value.slotSize*(n+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,ft))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(g.value.start,g.value.end),(l,n)=>(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(${c.value.drawingArea.left+c.value.slotSize*(n+1)-c.value.slotSize/2}, ${c.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}), rotate(${t.value.xyPeriodLabelsRotation})`},e.toDisplayString(l),9,kt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.dataset,(l,n)=>(e.openBlock(),e.createElementBlock("g",gt,[t.value.lineSmooth?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("path",{d:`M ${e.unref(d.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,yt),e.createElementVNode("path",{d:`M ${e.unref(d.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,xt)],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,St),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,bt)],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(s,m)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.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,Bt))),256))]))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.dataset,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(s,m)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,x:s.x,y:s.y-t.value.dataLabelFontSize/2,class:"quick-animation",style:{transition:"all 0.3s ease-in-out"}},e.toDisplayString(e.unref(d.dataLabel)({p:t.value.valuePrefix,v:s.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})),9,Et))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",_t,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.extremes.maxSeries,(l,n)=>(e.openBlock(),e.createElementBlock("rect",{x:c.value.drawingArea.left+n*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===n?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:s=>c.value.useTooltip(n),onMouseleave:v[1]||(v[1]=s=>c.value.killTooltip()),onClick:s=>h("selectDatapoint",c.value.dataset.map(m=>({...m,value:m.values[n]})))},null,44,At))),256))])],64)):e.createCommentVNode("",!0),E.value===S.BAR?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.value.xyShowGrid?(e.openBlock(),e.createElementBlock("g",Lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.yLabels,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=u.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.drawingArea.left,x2:u.value.drawingArea.right,y1:l.y,y2:l.y,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Ct)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.extremes.maxSeries+1,(l,n)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.drawingArea.left+u.value.slotSize*n,x2:u.value.drawingArea.left+u.value.slotSize*n,y1:u.value.drawingArea.top,y2:u.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,zt))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",Nt,[e.createElementVNode("line",{x1:u.value.drawingArea.left,x2:u.value.drawingArea.left,y1:u.value.drawingArea.top,y2:u.value.drawingArea.bottom,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Ft),e.createElementVNode("line",{x1:u.value.drawingArea.left,x2:u.value.drawingArea.right,y1:u.value.absoluteZero,y2:u.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Vt)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",$t,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.yLabels,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=u.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x+4,x2:u.value.drawingArea.left,y1:l.y,y2:l.y,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Pt)):e.createCommentVNode("",!0),l.y<=u.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(d.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})),9,Tt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",Rt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(g.value.start,g.value.end),(l,n)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.drawingArea.left+u.value.slotSize*(n+1)-u.value.slotSize/2,x2:u.value.drawingArea.left+u.value.slotSize*(n+1)-u.value.slotSize/2,y1:u.value.drawingArea.bottom,y2:u.value.drawingArea.bottom+4,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Ot))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(g.value.start,g.value.end),(l,n)=>(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(${u.value.drawingArea.left+u.value.slotSize*(n+1)-u.value.slotSize/2}, ${u.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}) rotate(${t.value.xyPeriodLabelsRotation})`,fill:t.value.color},e.toDisplayString(l),9,It))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.dataset,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(s,m)=>(e.openBlock(),e.createElementBlock("rect",{x:s.x,width:s.width<=0?1e-5:s.width,height:s.height<=0?1e-5:s.height,y:s.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&&s.value<0})},[t.value.barAnimated&&s.value>0&&!e.unref(J)&&!e.unref(K)?(e.openBlock(),e.createElementBlock("animate",{key:0,attributeName:"height",from:0,to:s.height,dur:"0.5s"},null,8,Ut)):e.createCommentVNode("",!0),t.value.barAnimated&&s.value>0&&!e.unref(J)&&!e.unref(K)?(e.openBlock(),e.createElementBlock("animate",{key:1,attributeName:"y",from:u.value.absoluteZero,to:u.value.absoluteZero-s.height,dur:"0.5s"},null,8,qt)):e.createCommentVNode("",!0)],10,Mt))),256))],64))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",Wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.dataset,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(s,m)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+s.width/2,y:s.y-t.value.dataLabelFontSize/2,"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,class:"quick-animation"},e.toDisplayString(e.unref(d.dataLabel)({p:t.value.valuePrefix,v:s.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})),9,jt))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.extremes.maxSeries,(l,n)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.drawingArea.left+n*u.value.slotSize,y:u.value.drawingArea.top,height:u.value.drawingArea.height<=0?1e-5:u.value.drawingArea.height,width:u.value.slotSize<=0?1e-5:u.value.slotSize,fill:F.value===n?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:s=>u.value.useTooltip(n),onMouseleave:v[2]||(v[2]=s=>u.value.killTooltip()),onClick:s=>h("selectDatapoint",u.value.dataset.map(m=>({...m,value:m.values[n]})))},null,44,Ht))),256))])],64)):e.createCommentVNode("",!0),[S.LINE,S.BAR].includes(E.value)?(e.openBlock(),e.createElementBlock("g",Xt,[t.value.xAxisLabel&&E.value===S.LINE?(e.openBlock(),e.createElementBlock("g",Yt,[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:p.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,Zt)])):e.createCommentVNode("",!0),t.value.xAxisLabel&&E.value===S.BAR?(e.openBlock(),e.createElementBlock("g",Jt,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,"text-anchor":"middle",x:u.value.drawingArea.left+u.value.drawingArea.width/2,y:p.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,Kt)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&E.value===S.LINE?(e.openBlock(),e.createElementBlock("g",Qt,[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,el)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&E.value===S.BAR?(e.openBlock(),e.createElementBlock("g",tl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,transform:`translate(${t.value.axisLabelsFontSize}, ${u.value.drawingArea.top+u.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.yAxisLabel),9,ll)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],12,Ie)),i.$slots.watermark?(e.openBlock(),e.createElementBlock("div",al,[e.renderSlot(i.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(J)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),[S.BAR,S.LINE].includes(E.value)&&t.value.zoomXy&&x.value.maxSeriesLength>1?(e.openBlock(),e.createElementBlock("div",{key:`slicer_${ae.value}`,ref_key:"quickChartSlicer",ref:W},[(e.openBlock(),e.createBlock(ze.Slicer,{key:`slicer_${ae.value}`,background:t.value.zoomColor,borderColor:t.value.backgroundColor,fontSize:t.value.zoomFontSize,useResetSlot:t.value.zoomUseResetSlot,labelLeft:t.value.xyPeriods[g.value.start]?t.value.xyPeriods[g.value.start]:"",labelRight:t.value.xyPeriods[g.value.end-1]?t.value.xyPeriods[g.value.end-1]:"",textColor:t.value.color,inputColor:t.value.zoomColor,selectColor:t.value.zoomHighlightColor,max:x.value.maxSeriesLength,min:0,valueStart:g.value.start,valueEnd:g.value.end,start:g.value.start,"onUpdate:start":v[3]||(v[3]=l=>g.value.start=l),end:g.value.end,"onUpdate:end":v[4]||(v[4]=l=>g.value.end=l),onReset:Ae},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(i.$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","start","end"]))])):e.createCommentVNode("",!0),t.value.showLegend?(e.openBlock(),e.createElementBlock("div",{key:4,ref_key:"quickChartLegend",ref:D,class:"vue-ui-quick-chart-legend",style:e.normalizeStyle(`background:${t.value.backgroundColor};color:${t.value.color}`)},[E.value===S.DONUT?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(B.value.legend,(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:s=>{_e(l,B.value.dataset),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${B.value.legend.length>1?"pointer":"default"}; opacity:${y.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(i.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(le.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(y.value.includes(l.id)?"-":e.unref(d.dataLabel)({p:t.value.valuePrefix,v:l.absoluteValue,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})),5),y.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)}," ( - % ) ",4)):te.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(d.dataLabel)({v:l.value/B.value.total*100,s:"%",r:t.value.dataLabelRoundingPercentage}))+") ",5))],64))],12,ol))),256)):e.createCommentVNode("",!0),E.value===S.LINE?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(c.value.legend,(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:s=>{ve(l.id,c.value.legend.length-1),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${c.value.legend.length>1?"pointer":"default"}; opacity:${y.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(i.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(le.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,nl))),256)):e.createCommentVNode("",!0),E.value===S.BAR?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(u.value.legend,(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:s=>{ve(l.id,u.value.legend.length-1),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${u.value.legend.length>1?"pointer":"default"}; opacity:${y.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(i.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(le.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,rl))),256)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createVNode(Ce._sfc_main,{show:Q.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:P.value,isCustom:e.unref(d.isFunction)(t.value.tooltipCustomFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(i.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(i.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"])],14,Oe)):(e.openBlock(),e.createElementBlock("div",il,[e.createVNode(le.default,{name:"circleCancel",stroke:"red"}),ul]))}},cl=Ne._export_sfc(sl,[["__scopeId","data-v-e62d13b6"]]);exports.default=cl;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BQOxn6SH.cjs"),j=require("./useResponsive-B3TrDDIG.cjs"),ie=require("./Title-B9iq63n1.cjs"),Y=require("./usePrinter-Q1J--baX.cjs"),ce=require("./Tooltip-DcDEanxk.cjs"),de=require("./vue-ui-sparkbar-Di-BPkJ0.cjs"),ve=require("./Legend-C_lBCmBu.cjs"),pe=require("./DataTable-C6HTLT7L.cjs"),he=require("./vue-ui-skeleton-CcrGR_Vh.cjs"),ge=require("./vue-ui-accordion-ogVvFfQy.cjs"),J=require("./useNestedProp-BtqgWTf9.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],ye=["xmlns","viewBox"],ke=["id"],be=["stop-color"],Ce=["stop-color"],we={key:0},Be=["x1","y1","x2","y2","stroke","stroke-width"],_e={key:0},xe=["d","stroke","stroke-width"],Pe=["d","stroke","stroke-width"],$e={key:1},Ne=["x","y","text-anchor","font-size","fill","onMouseenter"],Te=["points","stroke","stroke-width"],Se=["points","stroke","stroke-width","fill"],Ee={key:2},Ve=["cx","cy","fill","r","stroke"],Fe={key:3,class:"vue-data-ui-watermark"},ze=["onClick"],Oe={key:0,style:{"max-width":"200px",margin:"0 auto"}},Ae={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(K,{expose:Q,emit:Z}){const d=K,{vue_ui_radar:ee}=n.useConfig(),k=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),te=e.ref(null),P=e.ref(!1),$=e.ref(""),F=e.ref(0),b=e.ref(null),z=e.ref(null),O=e.ref(null),t=e.computed(()=>{const o=J.useNestedProp({userConfig:d.config,defaultConfig:ee});return o.theme?{...J.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}),B=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=j.throttle(()=>{const{width:a,height:l}=j.useResponsive({chart:b.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?O.value:null});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(b.value.parentNode)}}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:A,isImaging:I,generatePdf:L,generateImage:R}=Y.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),M=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),oe=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),f=e.ref(!1);function q(o){f.value=!0,i.value.includes(o)?(C.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{f.value=!1,C.value=null},500)):(i.value.push(o),setTimeout(()=>{f.value=!1},500)),Z("selectLegend",y.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function ae(){return y.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)||M.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>k.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||M.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`})):[]),D=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),U=e.computed(()=>p.value.length),N=e.computed(()=>Math.min(s.value.width,s.value.height)/3),G=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:N.value,sides:U.value,rotation:0})),le=e.computed(()=>{const o=[];for(let a=0;a<N.value;a+=N.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),g=e.computed(()=>G.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>re({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||D.value)}));return{...o,...p.value[a],plots:l}}));function T({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 re({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const y=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||D.value)));return v.value.map((a,l)=>({...a,totalProportion:o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length,shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>q(l),isSegregated:i.value.includes(l)}))}),ne=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:""},...y.value],a=d.dataset.series.map(r=>[r.name,r.target,...r.values.map((u,c)=>`${n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue})} (${isNaN(u/r.target)?"":(u/r.target*100).toFixed(t.value.table.td.roundingPercentage)}%)`)]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:a,config:l,colNames:o}}),x=e.ref(null),S=e.ref([]),E=e.ref(null);function ue(o,a){S.value=[],x.value=a,P.value=!0;let l="";E.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:g.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:g.value},config:t.value})))$.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.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)||S.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});$.value=l}}function W(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...y.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,Le)=>[c.name,c.target,...c.values.flatMap(V=>[V,isNaN(V/c.target)?"":V/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 se(o){w.value=o,F.value+=1}function H(){h.value.showTable=!h.value.showTable}function X(){h.value.showTooltip=!h.value.showTooltip}return Q({getData:ae,generatePdf:L,generateCsv:W,generateImage:R,toggleTable:H,toggleTooltip:X}),(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:b,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.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:z,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(ie._sfc_main,{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"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:te,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(I),isPrinting:e.unref(A),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:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,onToggleFullscreen:se,onGeneratePdf:e.unref(L),onGenerateCsv:W,onGenerateImage:e.unref(R),onToggleTable:H,onToggleTooltip:X},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]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:2,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:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[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.shiftHue)(l.color,.05)}${e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":l.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,Ce)],8,ke))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.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,Be))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.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:U.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,xe))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:G.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,Pe),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:T(l).x,y:T(l).y,"text-anchor":T(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:u=>ue(l,r),onMouseleave:a[0]||(a[0]=u=>{P.value=!1,x.value=null})},e.toDisplayString(l.name),41,Ne))),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)(g.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":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Te)):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)(g.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})`:l.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity],class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Se)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.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:x.value!==null&&x.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":f.value&&C.value===c&&t.value.useCssAnimation})},null,10,Ve))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,ye)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:4,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:O},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ve.Legend,{key:0,legendSet:y.value,config:ne.value,onClickMarker:a[1]||(a[1]=({i:l})=>q(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((l.totalProportion*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"% ",13,ze)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:y.value},void 0,!0)],512),e.createVNode(ce._sfc_main,{show:h.value.showTooltip&&P.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:b.value,content:$.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...E.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",Oe,[e.createVNode(de.default,{dataset:S.value,config:oe.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isCustom"]),k.value?(e.openBlock(),e.createBlock(ge.default,{key:5,hideDetails:"",config:{open:h.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.createVNode(pe.DataTable,{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=>h.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,fe))}},Ie=me._export_sfc(Ae,[["__scopeId","data-v-cc811e3e"]]);exports.default=Ie;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BQOxn6SH.cjs"),H=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-B9iq63n1.cjs"),W=require("./usePrinter-Q1J--baX.cjs"),ne=require("./Tooltip-DcDEanxk.cjs"),ue=require("./DataTable-C6HTLT7L.cjs"),se=require("./Legend-C_lBCmBu.cjs"),ie=require("./vue-ui-skeleton-CcrGR_Vh.cjs"),ce=require("./vue-ui-accordion-ogVvFfQy.cjs"),G=require("./useNestedProp-BtqgWTf9.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],pe=["xmlns","viewBox"],he=["id"],ge=["stop-color"],fe=["stop-color"],me=["stroke","cx","cy","r","fill"],ye=["stroke","stroke-width","cx","cy","r","fill"],be=["cx","cy","r","onMouseenter"],ke={key:3,class:"vue-data-ui-watermark"},Ce=["onClick"],we={key:0},xe={key:1},Te=["innerHTML"],$e={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(j,{expose:X,emit:Y}){const v=j,{vue_ui_rings:J}=n.useConfig(),y=e.ref(!1),x=e.computed(()=>!!v.dataset&&v.dataset.length),b=e.ref(n.createUid()),K=e.ref(null),T=e.ref(!1),_=e.ref(""),m=e.ref(null),V=e.ref(0),k=e.ref(null),F=e.ref(null),L=e.ref(null),t=e.computed(()=>{const l=G.useNestedProp({userConfig:v.config,defaultConfig:J});return l.theme?{...G.useNestedProp({userConfig:n.themes.vue_ui_rings[l.theme]||v.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}),$=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(v.dataset)?n.error({componentName:"VueUiRings",type:"dataset"}):v.dataset.forEach((l,a)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{n.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:o,index:a})})}),t.value.responsive){const l=H.throttle(()=>{const{width:a,height:o}=H.useResponsive({chart:k.value,title:t.value.style.chart.title.text?F.value:null,legend:t.value.style.chart.legend.show?L.value:null});s.value.width=a,s.value.height=o});$.value=new ResizeObserver(l),$.value.observe(k.value.parentNode)}setTimeout(()=>{y.value=!0},600)}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:E,isImaging:z,generatePdf:I,generateImage:O}=W.usePrinter({elementId:`rings_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),M=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),g=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),Q=e.computed(()=>Math.min(s.value.height,s.value.width)),i=e.ref([]);function P(l){i.value.includes(l)?i.value=i.value.filter(a=>a!==l):i.value.push(l),Y("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const Z=e.computed(()=>Math.max(...N.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l)));function R(l){return l/Z.value}const N=e.computed(()=>v.dataset.map(({values:l,name:a,color:o=null},r)=>{const u=(l||[]).reduce((h,w)=>h+w,0);return{name:a,color:o||n.convertColorToHex(o)||M.value[r]||n.palette[r]||n.palette[r%n.palette.length],value:u,proportion:u/v.dataset.map(h=>(h.values||[]).reduce((w,ae)=>w+ae,0)).reduce((h,w)=>h+w,0),uid:n.createUid()}})),q=e.computed(()=>N.value.map(l=>({...l,shape:"circle",opacity:i.value.includes(l.uid)?.5:1,segregate:()=>P(l.uid),isSegregated:i.value.includes(l.uid)})).toSorted((l,a)=>a.value-l.value)),ee=e.computed(()=>({cy:"rings-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),p=e.computed(()=>N.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>N.value.filter(l=>!i.value.includes(l.uid)).map(({name:l,value:a,color:o=null,uid:r},u)=>({uid:r,name:l,color:o||n.convertColorToHex(o)||M.value[u]||n.palette[u]||n.palette[u%n.palette.length],value:a,proportion:R(a),percentage:a/p.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*R(a)})).toSorted((l,a)=>a.value-l.value));function te(){return c.value.map(({name:l,color:a,value:o,absoluteValues:r,percentage:u})=>({name:l,color:a,value:o,absoluteValues:r,percentage:u}))}const d=e.computed(()=>Q.value-t.value.style.chart.layout.rings.strokeWidth*2),B=e.ref(null);function le(l,a){if(i.value.length===v.dataset.length)return;B.value={datapoint:a,seriesIndex:l,series:c.value,config:t.value},m.value=l;const o=c.value[l],r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:l,datapoint:a,series:c.value,config:t.value})))_.value=r({seriesIndex:l,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${(o.value/p.value*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:u+=`<b>${(o.value/p.value*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),_.value=u}T.value=!0}const f=e.computed(()=>{const l=c.value.map(o=>({name:o.name,color:o.color})),a=c.value.map(o=>o.value);return{head:l,body:a}}),S=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=f.value.head.map((u,h)=>[{color:u.color,name:u.name},n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(f.value.body[h]/p.value)?"-":(f.value.body[h]/p.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={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},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:r}});function A(){e.nextTick(()=>{const l=f.value.head.map((r,u)=>[[r.name],[f.value.body[u]],[isNaN(f.value.body[u]/p.value)?"-":f.value.body[u]/p.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=n.createCsvContent(a);n.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-rings"})})}const C=e.ref(!1);function oe(l){C.value=l,V.value+=1}function D(){g.value.showTable=!g.value.showTable}function U(){g.value.showTooltip=!g.value.showTooltip}return X({getData:te,generatePdf:I,generateCsv:A,generateImage:O,toggleTable:D,toggleTooltip:U}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:k,class:e.normalizeClass(`vue-ui-rings ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${b.value}`,onMouseleave:a[3]||(a[3]=o=>{m.value=null,T.value=!1})},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:F,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(re._sfc_main,{config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref_key:"details",ref:K,key:`user_options_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(E),isImaging:e.unref(z),uid:b.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:g.value.showTooltip,isFullscreen:C.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,onToggleFullscreen:oe,onGeneratePdf:e.unref(I),onGenerateCsv:A,onGenerateImage:e.unref(O),onToggleTable:D,onToggleTooltip:U},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${b.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(o.color,.05)}${e.unref(n.opacity)[100-t.value.style.chart.layout.rings.gradient.intensity]}`},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,fe)],8,he))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":m.value!==null&&m.value!==r}),style:e.normalizeStyle(`animation-delay:${r*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(r+1),r:d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9,fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,me),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==r}),style:e.normalizeStyle(`animation-delay:${r*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(r+1),r:d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9,fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${b.value}_${r})`:o.color},null,14,ye),e.createElementVNode("circle",{"data-cy-trap":"",stroke:"none",cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(r+1),r:d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9,fill:"transparent",onMouseenter:u=>le(r,o),onMouseleave:a[0]||(a[0]=u=>{m.value=null,T.value=!1})},null,40,be)]))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,pe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(z)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:4,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:L},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(se.Legend,{key:0,legendSet:q.value,config:ee.value,onClickMarker:a[1]||(a[1]=({legend:o})=>P(o.uid))},{item:e.withCtx(({legend:o})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:r=>P(o.uid),style:e.normalizeStyle(`opacity:${i.value.includes(o.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}))+" ",1),i.value.includes(o.uid)?(e.openBlock(),e.createElementBlock("span",xe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",we," ("+e.toDisplayString(isNaN(o.value/p.value)?"-":(o.value/p.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,Ce)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:q.value},void 0,!0)],512),e.createVNode(ne._sfc_main,{show:g.value.showTooltip&&T.value&&i.value.length<v.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:_.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),x.value?(e.openBlock(),e.createBlock(ce.default,{key:5,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.createVNode(ue.DataTable,{colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>g.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Te)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ve))}},Ne=de._export_sfc($e,[["__scopeId","data-v-235fc2b3"]]);exports.default=Ne;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-BQOxn6SH.cjs"),ce=require("./useResponsive-B3TrDDIG.cjs"),we=require("./Title-B9iq63n1.cjs"),ye=require("./usePrinter-Q1J--baX.cjs"),Be=require("./Tooltip-DcDEanxk.cjs"),_e=require("./Legend-C_lBCmBu.cjs"),de=require("./Shape-D8RdmYWq.cjs"),Ce=require("./DataTable-C6HTLT7L.cjs"),Se=require("./vue-ui-skeleton-CcrGR_Vh.cjs"),Me=require("./vue-ui-accordion-ogVvFfQy.cjs"),ve=require("./useNestedProp-BtqgWTf9.cjs"),$e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ne=["id"],Ee=["xmlns","viewBox"],ze={key:0},Le=["x1","x2","y1","y2","stroke","stroke-width"],Ve=["x1","x2","y1","y2","stroke","stroke-width"],Ae={key:1},Te=["points","fill","stroke-width","stroke-dasharray","stroke"],Fe={key:0},Pe=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],De={key:1},We={key:2},Ie=["id"],Oe=["stop-color"],qe=["stop-color"],Xe=["id"],Ye=["stop-color"],je=["stop-color"],Re=["x","y","width","height","fill","stroke","stroke-width","rx"],Ge=["x","y","height","width","fill","stroke","stroke-width","rx"],Ue={key:0},He=["d","stroke","stroke-width"],Je=["d","stroke","stroke-width"],Ke=["d","stroke","stroke-width"],Qe=["d","stroke","stroke-width"],Ze={key:3,style:{"pointer-events":"none !important"}},et=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],tt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],lt=["x","y","font-size","fill","font-weight","text-anchor"],ot=["x","y","font-size","fill","font-weight"],at=["cx","cy","r","fill","stroke","stroke-width"],st=["cx","cy","r","fill","stroke","stroke-width"],rt=["x","y","font-size","fill","font-weight","text-anchor"],nt={key:4},ut=["x","y","font-size","fill"],it=["x","y","font-size","fill"],ct=["id","transform","font-size","font-weight","fill"],yt={key:5},dt=["x","y","font-size","fill"],vt=["x","y","font-size","fill"],pt=["font-size","font-weight","fill","x","y"],ht=["id"],mt=["x","y","width","height"],ft={key:6},gt=["x1","x2","y1","y2","stroke-dasharray","stroke","stroke-width","clip-path"],kt=["x","y","fill","font-size","font-weight"],xt={key:3,class:"vue-data-ui-watermark"},bt=["onClick"],wt={key:0,style:{width:"100%",display:"flex","align-items":"center","justify-content":"center"}},Bt={viewBox:"0 0 20 20",height:"20",width:"20",style:{overflow:"hidden",background:"transparent"}},_t={key:0},Ct=["innerHTML"],St={__name:"vue-ui-scatter",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(pe,{expose:he}){const S=pe,{vue_ui_scatter:me}=i.useConfig(),F=e.computed(()=>!!S.dataset&&S.dataset.length),g=e.ref(i.createUid()),fe=e.ref(null),O=e.ref(!1),q=e.ref(""),U=e.ref(0),A=e.ref(null),H=e.ref(null),J=e.ref(null),t=e.computed(()=>{const o=ve.useNestedProp({userConfig:S.config,defaultConfig:me});return o.theme?{...ve.useNestedProp({userConfig:i.themes.vue_ui_scatter[o.theme]||S.config,defaultConfig:o}),customPalette:i.themePalettes[o.theme]||i.palette}:o}),P=e.ref(null);e.onMounted(()=>{if(i.objectIsEmpty(S.dataset)&&i.error({componentName:"VueUiScatter",type:"dataset"}),t.value.responsive){const o=ce.throttle(()=>{const{width:n,height:l}=ce.useResponsive({chart:A.value,title:t.value.style.title.text?H.value:null,legend:t.value.style.legend.show?J.value:null});k.value.width=n,k.value.height=l});P.value=new ResizeObserver(o),P.value.observe(A.value.parentNode)}}),e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});const{isPrinting:K,isImaging:Q,generatePdf:Z,generateImage:ee}=ye.usePrinter({elementId:`vue-ui-scatter_${g.value}`,fileName:t.value.style.title.text||"vue-ui-scatter"}),te=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),M=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),k=e.ref({height:t.value.style.layout.height,width:t.value.style.layout.width}),D=e.computed(()=>t.value.style.layout.marginalBars.show?t.value.style.layout.marginalBars.size+t.value.style.layout.marginalBars.offset:0),r=e.computed(()=>({top:t.value.style.layout.padding.top+D.value,right:k.value.width-t.value.style.layout.padding.right-D.value,bottom:k.value.height-t.value.style.layout.padding.bottom,left:t.value.style.layout.padding.left,height:k.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom-D.value,width:k.value.width-t.value.style.layout.padding.left-t.value.style.layout.padding.right-D.value})),p=e.computed(()=>{S.dataset.forEach((a,u)=>{i.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["values"]}).forEach(h=>{i.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:h,index:u})}),a.values&&a.values.forEach((h,E)=>{i.getMissingDatasetAttributes({datasetObject:h,requiredAttributes:["x","y"]}).forEach(V=>{i.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:`values.${V}`,index:`${u} - ${E}`})})})});const o=Math.min(...N.value.filter(a=>!v.value.includes(a.id)).flatMap(a=>a.values.map(u=>u.x))),n=Math.max(...N.value.filter(a=>!v.value.includes(a.id)).flatMap(a=>a.values.map(u=>u.x))),l=Math.min(...N.value.filter(a=>!v.value.includes(a.id)).flatMap(a=>a.values.map(u=>u.y))),s=Math.max(...N.value.filter(a=>!v.value.includes(a.id)).flatMap(a=>a.values.map(u=>u.y)));return{xMin:o>=0?0:o,xMax:n,yMin:l>=0?0:l,yMax:s}}),y=e.computed(()=>({x:r.value.left+Math.abs(p.value.xMin)/(p.value.xMax+Math.abs(p.value.xMin))*r.value.width,y:r.value.bottom-Math.abs(p.value.yMin)/(p.value.yMax+Math.abs(p.value.yMin))*r.value.height})),N=e.computed(()=>S.dataset.map((o,n)=>{const l=`cluster_${g.value}_${n}`;return{...o,id:l,color:o.color?o.color:te.value[n]||i.palette[n]||i.palette[n%i.palette.length],opacity:v.value.includes(l)?.5:1,shape:o.shape??"circle",segregate:()=>re(l),isSegregated:v.value.includes(l)}})),ge=e.computed(()=>({cy:"scatter-div-legend",backgroundColor:t.value.style.legend.backgroundColor,color:t.value.style.legend.color,fontSize:t.value.style.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.legend.bold?"bold":""})),X=e.computed(()=>N.value.map((o,n)=>({...o,plots:o.values.map(l=>({x:r.value.left+(l.x+Math.abs(p.value.xMin))/(p.value.xMax+Math.abs(p.value.xMin))*r.value.width,y:r.value.bottom-(l.y+Math.abs(p.value.yMin))/(p.value.yMax+Math.abs(p.value.yMin))*r.value.height,v:{...l,name:l.name||""},clusterName:o.name,color:o.color?o.color:te.value[n]||i.palette[n]||i.palette[n%i.palette.length],id:`plot_${g.value}_${Math.random()}`,weight:l.weight??t.value.style.layout.plots.radius}))})).filter(o=>!v.value.includes(o.id))),x=e.computed(()=>X.value.map(o=>{const n=o.plots.reduce((d,z)=>d+z.x,0)/o.plots.length,l=o.plots.reduce((d,z)=>d+z.y,0)/o.plots.length;let s=0,a=0,u=0;for(const d of o.plots)s+=(d.x-n)*(d.y-l),a+=(d.x-n)**2,u+=(d.y-l)**2;const h=s/Math.sqrt(a*u),E=h*(Math.sqrt(u)/Math.sqrt(a)),V=l-E*n,_={x1:r.value.left,x2:r.value.right,y1:E*r.value.left+V,y2:E*r.value.right+V,coefficient:h},f=(_.y2-_.y1)/(_.x2-_.x1),w=_.y1-f*_.x1,C=Math.min(k.value.width-t.value.style.layout.padding.right,Math.max(t.value.style.layout.padding.left,(r.value.top-w)/f)),I={x:C,y:f*C+w<=t.value.style.layout.padding.top?r.value.top:f*C+w};return{...o,correlation:_,label:I,plots:o.plots.map(d=>{const z=(d.x+f*d.y-f*w)/(1+Math.pow(f,2)),j=(f*d.x+Math.pow(f,2)*d.y+w)/(1+Math.pow(f,2)),m=Math.sqrt(Math.pow(d.x-z,2)+Math.pow(d.y-j,2));return{...d,deviation:m,shape:o.shape,color:o.color}})}})),le=e.computed(()=>Math.max(...x.value.flatMap(o=>o.plots.map(n=>Math.abs(n.deviation)))));function ke(){return x.value}function oe(o,n){const l=Array.isArray(o)?o.flatMap(m=>m.plots.map(L=>({x:L.x,y:L.y}))):o.plots.map(m=>({x:m.x,y:m.y}));let s=1/0,a=-1/0,u=1/0,h=-1/0;l.forEach(({x:m,y:L})=>{s=Math.min(s,m),a=Math.max(a,m),u=Math.min(u,L),h=Math.max(h,L)});const E=a-s,V=h-u,_=E/n,f=V/n,w=Array(n).fill(0),C=Array(n).fill(0);l.forEach(({x:m,y:L})=>{const R=Math.floor((m-s)/_),G=Math.floor((L-u)/f);w[R]||(w[R]=0),C[G]||(C[G]=0),w[R]+=1,C[G]+=1});const I=[],d=[];for(let m=0;m<n;m+=1)I.push(s+(m+.5)*_),d.push(u+(m+.5)*f);const z=Math.max(...w),j=Math.max(...C);return{x:w,y:C,avgX:I,avgY:d,maxX:z,maxY:j}}const $=e.computed(()=>t.value.style.layout.marginalBars.tranches),b=e.computed(()=>oe(X.value,$.value)),xe=e.computed(()=>{const o=r.value.top-t.value.style.layout.marginalBars.offset,n=r.value.right+t.value.style.layout.marginalBars.offset;return X.value.map(l=>{const s=oe(l,$.value);return{coords:s,dX:i.createSmoothPath(s.avgX.map((a,u)=>({x:a,y:o-s.x[u]/s.maxX*t.value.style.layout.marginalBars.size}))),dY:i.createSmoothPath(s.avgY.map((a,u)=>({y:a,x:n+t.value.style.layout.marginalBars.size*s.y[u]/s.maxY}))),color:l.color,id:l.id}})}),B=e.ref(void 0),c=e.ref(null),Y=e.ref(null);function ae(o,n){B.value=o.id,c.value=o;let l="";Y.value={datapoint:o,seriesIndex:n,series:x.value,config:t.value};const s=t.value.style.tooltip.customFormat;i.isFunction(s)&&i.functionReturnsString(()=>s({datapoint:o,seriesIndex:n,series:x.value,config:t.value}))?q.value=s({datapoint:o,seriesIndex:n,series:x.value,config:t.value}):(o.clusterName&&(l+=`<div style="display:flex;gap:3px;align-items:center">${o.clusterName}</div>`),o.v.name&&(l+=`<div>${o.v.name}</div>`),l+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,l+=`<div>${t.value.style.layout.dataLabels.xAxis.name}: <b>${isNaN(o.v.x)?"-":i.dataLabel({p:t.value.style.tooltip.prefix,v:o.v.x,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue})}</b></div>`,l+=`<div>${t.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(o.v.y)?"-":i.dataLabel({p:t.value.style.tooltip.prefix,v:o.v.y,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue})}</b></div>`,l+=`${t.value.style.layout.plots.deviation.translation}: <b>${i.dataLabel({v:o.deviation,r:t.value.style.layout.plots.deviation.roundingValue})}</b>`,l+="</div>",q.value=`<div>${l}</div>`),O.value=!0}function se(){O.value=!1,B.value=void 0,c.value=null}const v=e.ref([]);function re(o){v.value.includes(o)?v.value=v.value.filter(n=>n!==o):v.value.length<S.dataset.length-1&&v.value.push(o)}function ne(){e.nextTick(()=>{const o=["",t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],n=x.value.map(a=>[a.name,a.correlation.coefficient,a.plots.length,a.plots.map(u=>u.v.x).reduce((u,h)=>u+h,0)/a.plots.length,a.plots.map(u=>u.v.y).reduce((u,h)=>u+h,0)/a.plots.length]),l=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([o]).concat(n),s=i.createCsvContent(l);i.downloadCsv({csvContent:s,title:t.value.style.title.text||"vue-ui-heatmap"})})}const W=e.computed(()=>{const o=[t.value.table.translations.series,t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],n=x.value.map(s=>[{shape:s.shape,content:s.name,color:s.color},Number((s.correlation.coefficient??0).toFixed(t.value.table.td.roundingValue)).toLocaleString(),s.plots.length.toLocaleString(),Number((s.plots.map(a=>a.v.x??0).reduce((a,u)=>a+u,0)/s.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString(),Number((s.plots.map(a=>a.v.y??0).reduce((a,u)=>a+u,0)/s.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString()]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:n,config:l,colNames:o}}),T=e.ref(!1);function be(o){T.value=o,U.value+=1}function ue(){M.value.showTable=!M.value.showTable}function ie(){M.value.showTooltip=!M.value.showTooltip}return he({getData:ke,generatePdf:Z,generateCsv:ne,generateImage:ee,toggleTable:ue,toggleTooltip:ie}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-scatter ${T.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"scatterChart",ref:A,id:`vue-ui-scatter_${g.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:H,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[e.createVNode(we._sfc_main,{config:{title:{cy:"scatter-div-title",...t.value.style.title},subtitle:{cy:"scatter-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&F.value?(e.openBlock(),e.createBlock(ye.UserOptions,{ref_key:"details",ref:fe,key:`user_options_${U.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(Q),isPrinting:e.unref(K),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:M.value.showTooltip,isFullscreen:T.value,titles:{...t.value.userOptions.buttonTitles},chartElement:A.value,onToggleFullscreen:be,onGeneratePdf:e.unref(Z),onGenerateCsv:ne,onGenerateImage:e.unref(ee),onToggleTable:ue,onToggleTooltip:ie},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:s})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),F.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":T.value,"vue-data-ui-fulscreen--off":!T.value}),viewBox:`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[t.value.style.layout.axis.show?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("line",{x1:y.value.x,x2:y.value.x,y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Le),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:y.value.y,y2:y.value.y,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Ve)])):e.createCommentVNode("",!0),t.value.style.layout.plots.giftWrap.show?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.plots.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(i.giftWrap)({series:l.plots}),fill:`${l.color}${e.unref(i.opacity)[t.value.style.layout.plots.giftWrap.fillOpacity*100]}`,"stroke-width":t.value.style.layout.plots.giftWrap.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.giftWrap.strokeDasharray,stroke:l.color,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Te)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[!l.shape||l.shape==="circle"?(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(a,u)=>(e.openBlock(),e.createElementBlock("circle",{cx:a.x,cy:a.y,r:B.value&&B.value===a.id?a.weight*2:a.weight,fill:`${l.color}${e.unref(i.opacity)[t.value.style.layout.plots.opacity*100]}`,stroke:t.value.style.layout.plots.stroke,"stroke-width":t.value.style.layout.plots.strokeWidth,onMouseover:h=>ae(a,s),onMouseleave:se,style:e.normalizeStyle(`opacity:${B.value&&B.value===a.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(a.deviation)/le.value:t.value.style.layout.plots.significance.show&&Math.abs(a.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,44,Pe))),256))])):(e.openBlock(),e.createElementBlock("g",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(a,u)=>(e.openBlock(),e.createBlock(de._sfc_main,{plot:{x:a.x,y:a.y},radius:B.value&&B.value===a.id?a.weight*2:a.weight,shape:l.shape,color:`${l.color}${e.unref(i.opacity)[t.value.style.layout.plots.opacity*100]}`,stroke:t.value.style.layout.plots.stroke,strokeWidth:t.value.style.layout.plots.strokeWidth,onMouseover:h=>ae(a,s),onMouseleave:se,style:e.normalizeStyle(`opacity:${B.value&&B.value===a.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(a.deviation)/le.value:t.value.style.layout.plots.significance.show&&Math.abs(a.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,8,["plot","radius","shape","color","stroke","strokeWidth","onMouseover","style"]))),256))]))]))),256)),t.value.style.layout.marginalBars.show?(e.openBlock(),e.createElementBlock("g",We,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`marginal_x_${g.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.marginalBars.fill},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,qe)],8,Ie),e.createElementVNode("linearGradient",{id:`marginal_y_${g.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.backgroundColor},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.marginalBars.fill},null,8,je)],8,Xe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.x,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l&&b.value.avgX[s]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:b.value.avgX[s]-r.value.width/$.value/2,y:r.value.top-t.value.style.layout.marginalBars.offset-l/b.value.maxX*t.value.style.layout.marginalBars.size,width:r.value.width/$.value<=0?1e-4:r.value.width/$.value,height:l/b.value.maxX*t.value.style.layout.marginalBars.size<=0?1e-4:l/b.value.maxX*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_x_${g.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,Re)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.y,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l&&b.value.avgY[s]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:r.value.right+t.value.style.layout.marginalBars.offset,y:b.value.avgY[s]-r.value.height/$.value/2,height:r.value.height/$.value<=0?1e-4:r.value.height/$.value,width:l/b.value.maxY*t.value.style.layout.marginalBars.size<=0?1e-4:l/b.value.maxY*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_y_${g.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,Ge)):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.marginalBars.showLines?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xe.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${l.dX}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,He)),v.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${l.dX}`,stroke:l.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Je)),v.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${l.dY}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Ke)),v.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${l.dY}`,stroke:l.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Qe))],64))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.value&&t.value.style.layout.plots.selectors.show?(e.openBlock(),e.createElementBlock("g",Ze,[e.createElementVNode("line",{x1:y.value.x,x2:c.value.x,y1:c.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,et),e.createElementVNode("line",{x1:c.value.x,x2:c.value.x,y1:y.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,tt),e.createElementVNode("text",{x:y.value.x+(c.value.x>y.value.x?-6:6),y:c.value.y+t.value.style.layout.plots.selectors.labels.fontSize/3,"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x>y.value.x?"end":"start"},e.toDisplayString(e.unref(i.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:c.value.v.y,s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding})),9,lt),e.createElementVNode("text",{x:c.value.x,y:y.value.y+(c.value.y>y.value.y?-6:t.value.style.layout.plots.selectors.labels.fontSize+6),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(i.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:c.value.v.x,s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding})),9,ot),e.createElementVNode("circle",{cx:y.value.x,cy:c.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,at),e.createElementVNode("circle",{cx:c.value.x,cy:y.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,st),t.value.style.layout.plots.selectors.labels.showName?(e.openBlock(),e.createElementBlock("text",{key:0,x:c.value.x,y:c.value.y+(c.value.y<y.value.y?-t.value.style.layout.plots.selectors.labels.fontSize/2:t.value.style.layout.plots.selectors.labels.fontSize),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x<r.value.left+100?"start":c.value.x>r.value.right-100?"end":c.value.x>y.value.x?"start":"end"},e.toDisplayString(c.value.v.name),9,rt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",nt,[e.createElementVNode("text",{x:r.value.left-5,y:y.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(Number(p.value.xMin.toFixed(t.value.style.layout.dataLabels.xAxis.rounding)).toLocaleString()),9,ut),e.createElementVNode("text",{x:r.value.right+3,y:y.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"start","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(Number(p.value.xMax.toFixed(t.value.style.layout.dataLabels.xAxis.rounding)).toLocaleString()),9,it),e.createElementVNode("text",{id:`vue-ui-scatter-xAxis-label-${g.value}`,transform:`translate(${t.value.style.layout.dataLabels.xAxis.fontSize*2}, ${r.value.top+r.value.height/2}), rotate(-90)`,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.name),9,ct)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",yt,[e.createElementVNode("text",{x:y.value.x,y:r.value.bottom+t.value.style.layout.dataLabels.yAxis.fontSize+3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(Number(p.value.yMin.toFixed(t.value.style.layout.dataLabels.yAxis.rounding)).toLocaleString()),9,dt),e.createElementVNode("text",{x:y.value.x,y:r.value.top-t.value.style.layout.dataLabels.yAxis.fontSize/2,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(Number(p.value.yMax.toFixed(t.value.style.layout.dataLabels.yAxis.rounding)).toLocaleString()),9,vt),e.createElementVNode("text",{"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.yAxis.color,x:r.value.left+r.value.width/2,y:r.value.bottom+8+t.value.style.layout.dataLabels.yAxis.fontSize*2},e.toDisplayString(t.value.style.layout.dataLabels.yAxis.name),9,pt)])):e.createCommentVNode("",!0),e.createElementVNode("clipPath",{id:`clip_path_${g.value}`},[e.createElementVNode("rect",{x:r.value.left,y:r.value.top,width:r.value.width<=0?1e-4:r.value.width,height:r.value.height<=0?1e-4:r.value.height},null,8,mt)],8,ht),t.value.style.layout.correlation.show?(e.openBlock(),e.createElementBlock("g",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,s)=>(e.openBlock(),e.createElementBlock("line",{x1:l.correlation.x1,x2:l.correlation.x2,y1:l.correlation.y1,y2:l.correlation.y2,"stroke-dasharray":t.value.style.layout.correlation.strokeDasharray,stroke:l.color,"stroke-width":t.value.style.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${g.value})`},null,8,gt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.correlation.label.show?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.label.x,y:l.label.y,fill:t.value.style.layout.correlation.label.useSerieColor?l.color:t.value.style.layout.correlation.label.color,"font-size":t.value.style.layout.correlation.label.fontSize,"font-weight":t.value.style.layout.correlation.label.bold?"bold":"normal"},e.toDisplayString(Number(l.correlation.coefficient.toFixed(t.value.style.layout.correlation.label.roundingValue)).toLocaleString()),9,kt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:k.value},void 0,!0)],14,Ee)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xt,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(Q)})),void 0,!0)])):e.createCommentVNode("",!0),F.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Se.default,{key:4,config:{type:"quadrant",style:{backgroundColor:t.value.style.backgroundColor,quadrant:{grid:{color:t.value.style.layout.axis.stroke},plots:{color:t.value.style.layout.axis.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:J},[t.value.style.legend.show?(e.openBlock(),e.createBlock(_e.Legend,{key:0,legendSet:N.value,config:ge.value,onClickMarker:n[0]||(n[0]=({legend:l})=>re(l.id))},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${v.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name),13,bt)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:N.value},void 0,!0)],512),e.createVNode(Be._sfc_main,{show:M.value.showTooltip&&O.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:A.value,content:q.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),default:e.withCtx(()=>[t.value.style.tooltip.showShape?(e.openBlock(),e.createElementBlock("div",wt,[(e.openBlock(),e.createElementBlock("svg",Bt,[e.createVNode(de._sfc_main,{shape:c.value.shape,color:c.value.color,plot:{x:10,y:10},radius:7},null,8,["shape","color"])]))])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),F.value?(e.openBlock(),e.createBlock(Me.default,{key:5,hideDetails:"",config:{open:M.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createVNode(Ce.DataTable,{colNames:W.value.colNames,head:W.value.head,body:W.value.body,config:W.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=l=>M.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[l.shape?(e.openBlock(),e.createElementBlock("div",_t,[e.createElementVNode("span",null,e.toDisplayString(l.content),1)])):(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:l},null,8,Ct))]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ne))}},Mt=$e._export_sfc(St,[["__scopeId","data-v-ca619366"]]);exports.default=Mt;
@@ -1,257 +0,0 @@
1
- import { computed as f, ref as h, onMounted as j, watch as G, nextTick as W, openBlock as i, createElementBlock as n, normalizeStyle as y, unref as r, renderSlot as D, normalizeProps as P, mergeProps as q, createCommentVNode as c, createElementVNode as v, toDisplayString as p, Fragment as z, renderList as H, guardReactiveProps as X, createBlock as R } from "vue";
2
- import { u as J, c as K, t as Q, a as Y, p as x, b as Z, o as ee, e as T, g as te, d as le, r as C, f as k, X as ae, s as se } from "./index-DiWO-_ca.js";
3
- import { u as L } from "./useNestedProp-DNX5EefQ.js";
4
- import oe from "./vue-ui-skeleton-CeNL0kH-.js";
5
- const ue = ["onClick"], ie = { key: 1 }, ne = ["xmlns", "viewBox"], re = ["id"], ve = ["stop-color"], ce = ["stop-color"], de = ["height", "width", "fill", "rx"], ye = ["height", "width", "fill", "rx"], pe = ["height", "width", "fill", "rx"], xe = {
6
- __name: "vue-ui-sparkbar",
7
- props: {
8
- config: {
9
- type: Object,
10
- default() {
11
- return {};
12
- }
13
- },
14
- dataset: {
15
- type: Array,
16
- default() {
17
- return [];
18
- }
19
- },
20
- /**
21
- * Used in VueUiRadar's tooltip exclusively
22
- */
23
- backgroundOpacity: {
24
- type: Number,
25
- default: 100
26
- }
27
- },
28
- emits: ["selectDatapoint"],
29
- setup(b, { emit: E }) {
30
- const a = b, { vue_ui_sparkbar: O } = J(), _ = f(() => !!a.dataset && a.dataset.length), $ = h(K()), e = f(() => {
31
- const t = L({
32
- userConfig: a.config,
33
- defaultConfig: O
34
- });
35
- return t.theme ? {
36
- ...L({
37
- userConfig: Q.vue_ui_sparkbar[t.theme] || a.config,
38
- defaultConfig: t
39
- }),
40
- customPalette: Y[t.theme] || x
41
- } : t;
42
- }), V = f(() => Z(e.value.customPalette)), g = h(a.dataset.map((t) => ({
43
- ...t,
44
- value: e.value.style.animation.show ? 0 : t.value || 0
45
- }))), S = h(null);
46
- j(async () => {
47
- ee(a.dataset) && T({
48
- componentName: "VueUiSparkbar",
49
- type: "dataset"
50
- }), A();
51
- });
52
- function A() {
53
- if (e.value.style.animation.show) {
54
- let N = function() {
55
- d += l / t, d < l ? (g.value = g.value.map((u, m) => ({
56
- ...u,
57
- value: u.value += s[m]
58
- })), S.value = requestAnimationFrame(N)) : g.value = a.dataset.map((u) => ({
59
- ...u,
60
- value: u.value || 0
61
- }));
62
- };
63
- const t = e.value.style.animation.animationFrames, s = a.dataset.map((u, m) => u.value / t), l = a.dataset.map((u) => u.value || 0).reduce((u, m) => u + m, 0);
64
- let d = 0;
65
- N();
66
- }
67
- }
68
- G(() => a.dataset, async (t) => {
69
- cancelAnimationFrame(S.value), g.value = a.dataset.map((s) => ({
70
- ...s,
71
- value: e.value.style.animation.show ? 0 : s.value || 0
72
- })), W(A);
73
- }, { deep: !0 });
74
- const o = h({
75
- width: 500,
76
- height: 16
77
- }), B = f(() => Math.max(...a.dataset.map((t) => t.value))), I = f(() => (a.dataset.forEach((t, s) => {
78
- te({
79
- datasetObject: t,
80
- requiredAttributes: ["name", "value"]
81
- }).forEach((l) => {
82
- T({
83
- componentName: "VueUiSparkbar",
84
- type: "datasetSerieAttribute",
85
- property: l,
86
- index: s
87
- });
88
- });
89
- }), g.value.map((t, s) => ({
90
- ...t,
91
- value: t.value || 0,
92
- color: le(t.color) || V.value[s] || x[s] || x[s % x.length]
93
- }))));
94
- function M(t) {
95
- return t / B.value;
96
- }
97
- function F(t) {
98
- return e.value.style.layout.independant ? t.target ? t.value / t.target : e.value.style.layout.percentage ? t.value > 100 ? 1 : t.value / 100 : e.value.style.layout.target === 0 ? 1 : t.value / e.value.style.layout.target : M(t.value);
99
- }
100
- function w(t) {
101
- return e.value.style.layout.independant && t.target || e.value.style.layout.target;
102
- }
103
- function U(t, s) {
104
- E("selectDatapoint", { datapoint: t, index: s });
105
- }
106
- return (t, s) => (i(), n("div", {
107
- style: y({
108
- width: "100%",
109
- fontFamily: e.value.style.fontFamily,
110
- background: e.value.style.backgroundColor + r(C)[a.backgroundOpacity]
111
- })
112
- }, [
113
- t.$slots.title ? D(t.$slots, "title", P(q({ key: 0 }, { title: { ...t.title, title: e.value.style.title.text, subtitle: e.value.style.title.subtitle.text } }))) : c("", !0),
114
- !t.$slots.title && e.value.style.title.text ? (i(), n("div", {
115
- key: 1,
116
- class: "vue-ui-sparkbar-title-container",
117
- style: y({
118
- background: e.value.style.title.backgroundColor,
119
- margin: e.value.style.title.margin,
120
- textAlign: e.value.style.title.textAlign
121
- })
122
- }, [
123
- v("div", {
124
- class: "vue-ui-sparkbar-title",
125
- style: y({
126
- fontSize: e.value.style.title.fontSize + "px",
127
- color: e.value.style.title.color,
128
- fontWeight: e.value.style.title.bold ? "bold" : "normal"
129
- })
130
- }, p(e.value.style.title.text), 5),
131
- e.value.style.title.subtitle.text ? (i(), n("div", {
132
- key: 0,
133
- class: "vue-ui-sparkbar-subtitle",
134
- style: y({
135
- fontSize: e.value.style.title.subtitle.fontSize + "px",
136
- color: e.value.style.title.subtitle.color,
137
- fontWeight: e.value.style.title.subtitle.bold ? "bold" : "normal"
138
- })
139
- }, p(e.value.style.title.subtitle.text), 5)) : c("", !0)
140
- ], 4)) : c("", !0),
141
- (i(!0), n(z, null, H(I.value, (l, d) => (i(), n(z, null, [
142
- _.value ? (i(), n("div", {
143
- key: 0,
144
- style: y(`display:flex !important;${["left", "right"].includes(e.value.style.labels.name.position) ? `flex-direction: ${e.value.style.labels.name.position === "right" ? "row-reverse" : "row"} !important` : "flex-direction:column !important"};gap:${e.value.style.gap}px !important;align-items:center;${b.dataset.length > 0 && d !== b.dataset.length - 1 ? "margin-bottom:6px" : ""}`),
145
- onClick: () => U(l, d)
146
- }, [
147
- D(t.$slots, "data-label", P(X({ bar: {
148
- ...l,
149
- target: w(l),
150
- valueLabel: r(k)({
151
- p: l.prefix || "",
152
- v: l.value,
153
- s: l.suffix || "",
154
- r: l.rounding || 0
155
- }),
156
- targetLabel: r(k)({
157
- p: l.prefix || "",
158
- v: w(l),
159
- s: l.suffix || "",
160
- r: l.rounding || 0
161
- })
162
- } }))),
163
- t.$slots["data-label"] ? c("", !0) : (i(), n("div", {
164
- key: 0,
165
- style: y({
166
- width: e.value.style.labels.name.width,
167
- color: e.value.style.labels.name.color,
168
- fontSize: e.value.style.labels.fontSize + "px",
169
- fontWeight: e.value.style.labels.name.bold ? "bold" : "normal",
170
- textAlign: ["left", "right"].includes(e.value.style.labels.name.position) || ["top", "top-left"].includes(e.value.style.labels.name.position) ? "left" : e.value.style.labels.name.position === "top-center" ? "center" : "right"
171
- })
172
- }, [
173
- v("span", null, p(l.name), 1),
174
- e.value.style.labels.value.show ? (i(), n("span", {
175
- key: 0,
176
- style: y(`font-weight:${e.value.style.labels.value.bold ? "bold" : "normal"}`)
177
- }, ": " + p(r(k)({
178
- p: l.prefix || "",
179
- v: l.value,
180
- s: l.suffix || "",
181
- r: l.rounding || 0
182
- })), 5)) : c("", !0),
183
- e.value.style.layout.showTargetValue ? (i(), n("span", ie, p(" " + e.value.style.layout.targetValueText) + " " + p(r(k)({
184
- p: l.prefix || "",
185
- v: w(l),
186
- s: l.suffix || "",
187
- r: l.rounding || 0
188
- })), 1)) : c("", !0)
189
- ], 4)),
190
- (i(), n("svg", {
191
- xmlns: r(ae),
192
- viewBox: `0 0 ${o.value.width} ${o.value.height}`,
193
- width: "100%"
194
- }, [
195
- v("defs", null, [
196
- v("linearGradient", {
197
- x1: "0%",
198
- y1: "0%",
199
- x2: "100%",
200
- y2: "0%",
201
- id: `sparkbar_gradient_${d}_${$.value}`
202
- }, [
203
- v("stop", {
204
- offset: "0%",
205
- "stop-color": `${r(se)(l.color, 0.03)}${r(C)[100 - e.value.style.bar.gradient.intensity]}`
206
- }, null, 8, ve),
207
- v("stop", {
208
- offset: "100%",
209
- "stop-color": l.color
210
- }, null, 8, ce)
211
- ], 8, re)
212
- ]),
213
- v("rect", {
214
- height: o.value.height,
215
- width: o.value.width,
216
- x: 0,
217
- y: 0,
218
- fill: `${e.value.style.gutter.backgroundColor}${r(C)[e.value.style.gutter.opacity]}`,
219
- rx: o.value.height / 2
220
- }, null, 8, de),
221
- v("rect", {
222
- height: o.value.height,
223
- width: o.value.width * F(l),
224
- x: 0,
225
- y: 0,
226
- fill: e.value.style.bar.gradient.underlayerColor,
227
- rx: o.value.height / 2
228
- }, null, 8, ye),
229
- v("rect", {
230
- height: o.value.height,
231
- width: o.value.width * F(l),
232
- x: 0,
233
- y: 0,
234
- fill: e.value.style.bar.gradient.show ? `url(#sparkbar_gradient_${d}_${$.value})` : l.color,
235
- rx: o.value.height / 2
236
- }, null, 8, pe)
237
- ], 8, ne))
238
- ], 12, ue)) : c("", !0)
239
- ], 64))), 256)),
240
- _.value ? c("", !0) : (i(), R(oe, {
241
- key: 2,
242
- config: {
243
- type: "sparkbar",
244
- style: {
245
- backgroundColor: e.value.style.backgroundColor,
246
- sparkbar: {
247
- color: "#CCCCCC"
248
- }
249
- }
250
- }
251
- }, null, 8, ["config"]))
252
- ], 4));
253
- }
254
- };
255
- export {
256
- xe as default
257
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-BQOxn6SH.cjs"),x=require("./useNestedProp-BtqgWTf9.cjs"),E=require("./vue-ui-skeleton-CcrGR_Vh.cjs"),V=["onClick"],$={key:1},z=["xmlns","viewBox"],D=["id"],P=["stop-color"],A=["stop-color"],F=["height","width","fill","rx"],L=["height","width","fill","rx"],T=["height","width","fill","rx"],O={__name:"vue-ui-sparkbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},backgroundOpacity:{type:Number,default:100}},emits:["selectDatapoint"],setup(v,{emit:b}){const n=v,{vue_ui_sparkbar:C}=o.useConfig(),p=e.computed(()=>!!n.dataset&&n.dataset.length),y=e.ref(o.createUid()),t=e.computed(()=>{const l=x.useNestedProp({userConfig:n.config,defaultConfig:C});return l.theme?{...x.useNestedProp({userConfig:o.themes.vue_ui_sparkbar[l.theme]||n.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}),S=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),c=e.ref(n.dataset.map(l=>({...l,value:t.value.style.animation.show?0:l.value||0}))),f=e.ref(null);e.onMounted(async()=>{o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiSparkbar",type:"dataset"}),g()});function g(){if(t.value.style.animation.show){let k=function(){s+=a/l,s<a?(c.value=c.value.map((u,d)=>({...u,value:u.value+=r[d]})),f.value=requestAnimationFrame(k)):c.value=n.dataset.map(u=>({...u,value:u.value||0}))};const l=t.value.style.animation.animationFrames,r=n.dataset.map((u,d)=>u.value/l),a=n.dataset.map(u=>u.value||0).reduce((u,d)=>u+d,0);let s=0;k()}}e.watch(()=>n.dataset,async l=>{cancelAnimationFrame(f.value),c.value=n.dataset.map(r=>({...r,value:t.value.style.animation.show?0:r.value||0})),e.nextTick(g)},{deep:!0});const i=e.ref({width:500,height:16}),w=e.computed(()=>Math.max(...n.dataset.map(l=>l.value))),N=e.computed(()=>(n.dataset.forEach((l,r)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkbar",type:"datasetSerieAttribute",property:a,index:r})})}),c.value.map((l,r)=>({...l,value:l.value||0,color:o.convertColorToHex(l.color)||S.value[r]||o.palette[r]||o.palette[r%o.palette.length]}))));function _(l){return l/w.value}function h(l){return t.value.style.layout.independant?l.target?l.value/l.target:t.value.style.layout.percentage?l.value>100?1:l.value/100:t.value.style.layout.target===0?1:l.value/t.value.style.layout.target:_(l.value)}function m(l){return t.value.style.layout.independant&&l.target||t.value.style.layout.target}function B(l,r){b("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:"100%",fontFamily:t.value.style.fontFamily,background:t.value.style.backgroundColor+e.unref(o.opacity)[n.backgroundOpacity]})},[l.$slots.title?e.renderSlot(l.$slots,"title",e.normalizeProps(e.mergeProps({key:0},{title:{...l.title,title:t.value.style.title.text,subtitle:t.value.style.title.subtitle.text}}))):e.createCommentVNode("",!0),!l.$slots.title&&t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:"vue-ui-sparkbar-title-container",style:e.normalizeStyle({background:t.value.style.title.backgroundColor,margin:t.value.style.title.margin,textAlign:t.value.style.title.textAlign})},[e.createElementVNode("div",{class:"vue-ui-sparkbar-title",style:e.normalizeStyle({fontSize:t.value.style.title.fontSize+"px",color:t.value.style.title.color,fontWeight:t.value.style.title.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-sparkbar-subtitle",style:e.normalizeStyle({fontSize:t.value.style.title.subtitle.fontSize+"px",color:t.value.style.title.subtitle.color,fontWeight:t.value.style.title.subtitle.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(a,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`display:flex !important;${["left","right"].includes(t.value.style.labels.name.position)?`flex-direction: ${t.value.style.labels.name.position==="right"?"row-reverse":"row"} !important`:"flex-direction:column !important"};gap:${t.value.style.gap}px !important;align-items:center;${v.dataset.length>0&&s!==v.dataset.length-1?"margin-bottom:6px":""}`),onClick:()=>B(a,s)},[e.renderSlot(l.$slots,"data-label",e.normalizeProps(e.guardReactiveProps({bar:{...a,target:m(a),valueLabel:e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),targetLabel:e.unref(o.dataLabel)({p:a.prefix||"",v:m(a),s:a.suffix||"",r:a.rounding||0})}}))),l.$slots["data-label"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({width:t.value.style.labels.name.width,color:t.value.style.labels.name.color,fontSize:t.value.style.labels.fontSize+"px",fontWeight:t.value.style.labels.name.bold?"bold":"normal",textAlign:["left","right"].includes(t.value.style.labels.name.position)||["top","top-left"].includes(t.value.style.labels.name.position)?"left":t.value.style.labels.name.position==="top-center"?"center":"right"})},[e.createElementVNode("span",null,e.toDisplayString(a.name),1),t.value.style.labels.value.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.labels.value.bold?"bold":"normal"}`)},": "+e.toDisplayString(e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0})),5)):e.createCommentVNode("",!0),t.value.style.layout.showTargetValue?(e.openBlock(),e.createElementBlock("span",$,e.toDisplayString(" "+t.value.style.layout.targetValueText)+" "+e.toDisplayString(e.unref(o.dataLabel)({p:a.prefix||"",v:m(a),s:a.suffix||"",r:a.rounding||0})),1)):e.createCommentVNode("",!0)],4)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,width:"100%"},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkbar_gradient_${s}_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(a.color,.03)}${e.unref(o.opacity)[100-t.value.style.bar.gradient.intensity]}`},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,A)],8,D)]),e.createElementVNode("rect",{height:i.value.height,width:i.value.width,x:0,y:0,fill:`${t.value.style.gutter.backgroundColor}${e.unref(o.opacity)[t.value.style.gutter.opacity]}`,rx:i.value.height/2},null,8,F),e.createElementVNode("rect",{height:i.value.height,width:i.value.width*h(a),x:0,y:0,fill:t.value.style.bar.gradient.underlayerColor,rx:i.value.height/2},null,8,L),e.createElementVNode("rect",{height:i.value.height,width:i.value.width*h(a),x:0,y:0,fill:t.value.style.bar.gradient.show?`url(#sparkbar_gradient_${s}_${y.value})`:a.color,rx:i.value.height/2},null,8,T)],8,z))],12,V)):e.createCommentVNode("",!0)],64))),256)),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E.default,{key:2,config:{type:"sparkbar",style:{backgroundColor:t.value.style.backgroundColor,sparkbar:{color:"#CCCCCC"}}}},null,8,["config"]))],4))}};exports.default=O;