vue-data-ui 2.3.85 → 2.3.87

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 (171) hide show
  1. package/dist/{Arrow-CLOh6oi7.cjs → Arrow-eu15g0Zt.cjs} +1 -1
  2. package/dist/{Arrow-JwDgP3de.js → Arrow-tDycrMHk.js} +1 -1
  3. package/dist/{BaseIcon-BBQHz_Sf.cjs → BaseIcon-CgLB-iUq.cjs} +1 -1
  4. package/dist/{BaseIcon-BysUnfCR.js → BaseIcon-D2n64yMC.js} +1 -1
  5. package/dist/{DataTable-MkG5Dqrn.js → DataTable-CrbRO0dh.js} +2 -2
  6. package/dist/{DataTable-pVXaNplZ.cjs → DataTable-DnOI5Ivh.cjs} +1 -1
  7. package/dist/{Legend-KW7sTwN3.js → Legend-BXctzvx2.js} +1 -1
  8. package/dist/{Legend-k2mcTp7z.cjs → Legend-sAjd_vcA.cjs} +1 -1
  9. package/dist/{Shape-COoEWeGM.cjs → Shape-BGa7uWId.cjs} +1 -1
  10. package/dist/{Shape-BFiZBf3X.js → Shape-BUBQ5omG.js} +1 -1
  11. package/dist/{Slicer-CALc-Q4W.js → Slicer-CXK3XM-z.js} +79 -87
  12. package/dist/Slicer-CoyHeBxs.cjs +1 -0
  13. package/dist/{Title-ISDbzCH8.js → Title-BITuZ5CT.js} +1 -1
  14. package/dist/{Title-BaKZYHEx.cjs → Title-DbAaPd9q.cjs} +1 -1
  15. package/dist/{Tooltip-BHmMXOej.js → Tooltip-DDBocDY4.js} +1 -1
  16. package/dist/{Tooltip-okAYzo5Y.cjs → Tooltip-LE8exuMN.cjs} +1 -1
  17. package/dist/{index-BiuHBtkZ.js → index-CP7GYbDW.js} +173 -162
  18. package/dist/index-U4mCr8P0.cjs +4 -0
  19. package/dist/style.css +1 -1
  20. package/dist/types/vue-data-ui.d.cts +13 -0
  21. package/dist/types/vue-data-ui.d.ts +13 -0
  22. package/dist/{useNestedProp-B9yDavuy.cjs → useNestedProp-CgUQgTyB.cjs} +1 -1
  23. package/dist/{useNestedProp-Ck5_RzLu.js → useNestedProp-Dfz8QNDn.js} +1 -1
  24. package/dist/usePrinter-BfETb5Ie.js +527 -0
  25. package/dist/usePrinter-DQLl_Row.cjs +1 -0
  26. package/dist/{vue-data-ui-CAl2KJv9.js → vue-data-ui-BiTJ4KBF.js} +57 -57
  27. package/dist/{vue-data-ui-CVYCyzY-.cjs → vue-data-ui-CgTf8Gw2.cjs} +1 -1
  28. package/dist/vue-data-ui.cjs +1 -1
  29. package/dist/vue-data-ui.js +1 -1
  30. package/dist/vue-ui-3d-bar-CKCcmMbS.cjs +19 -0
  31. package/dist/{vue-ui-3d-bar-CploAEkY.js → vue-ui-3d-bar-CKDV9VVB.js} +11 -10
  32. package/dist/{vue-ui-accordion-btKAUUTu.cjs → vue-ui-accordion-AcWCsB0f.cjs} +1 -1
  33. package/dist/{vue-ui-accordion-D2fhyKpk.js → vue-ui-accordion-DZSSaEp4.js} +3 -3
  34. package/dist/{vue-ui-age-pyramid-DkaM5MrK.js → vue-ui-age-pyramid-Cy-J_3gK.js} +25 -24
  35. package/dist/vue-ui-age-pyramid-DQ-h0bbz.cjs +1 -0
  36. package/dist/{vue-ui-annotator-38FBI0Pn.js → vue-ui-annotator-Dn_5RY5_.js} +1 -1
  37. package/dist/{vue-ui-annotator-BMYk78DR.cjs → vue-ui-annotator-GBAeaQUB.cjs} +1 -1
  38. package/dist/{vue-ui-candlestick-CKsjq0Uw.js → vue-ui-candlestick-CAdWy5Y1.js} +12 -11
  39. package/dist/vue-ui-candlestick-guSNt_H0.cjs +2 -0
  40. package/dist/{vue-ui-carousel-table-Cx72LlTd.cjs → vue-ui-carousel-table-CuFG5v2i.cjs} +1 -1
  41. package/dist/{vue-ui-carousel-table-DjGaEuM7.js → vue-ui-carousel-table-DmmKDp7-.js} +7 -7
  42. package/dist/{vue-ui-chestnut-TLyh4dIZ.js → vue-ui-chestnut-BmzjUDjK.js} +10 -9
  43. package/dist/{vue-ui-chestnut-DAiBfoPN.cjs → vue-ui-chestnut-bAWBqCf3.cjs} +2 -2
  44. package/dist/{vue-ui-cursor-BunDuWpK.cjs → vue-ui-cursor-CfkNSO9o.cjs} +1 -1
  45. package/dist/{vue-ui-cursor-B1xa5yua.js → vue-ui-cursor-DDViNH81.js} +2 -2
  46. package/dist/{vue-ui-dashboard-DdcubzWu.js → vue-ui-dashboard-BGwxII0l.js} +2 -2
  47. package/dist/{vue-ui-dashboard-CMZ736DL.cjs → vue-ui-dashboard-CT09iVhX.cjs} +1 -1
  48. package/dist/{vue-ui-digits-BUpjWWnD.js → vue-ui-digits-BYO9w7xM.js} +2 -2
  49. package/dist/{vue-ui-digits-z5g__gqs.cjs → vue-ui-digits-DObHCYJe.cjs} +1 -1
  50. package/dist/vue-ui-donut-B-YGaPcq.cjs +1 -0
  51. package/dist/{vue-ui-donut-ZLpfm-XT.js → vue-ui-donut-DqOvTGAK.js} +34 -33
  52. package/dist/{vue-ui-donut-evolution-Bn4asQO3.js → vue-ui-donut-evolution-ByIcsVPF.js} +12 -11
  53. package/dist/vue-ui-donut-evolution-DAzxGbsO.cjs +1 -0
  54. package/dist/{vue-ui-dumbbell-CY6X8J1K.cjs → vue-ui-dumbbell-Ch6sj_EW.cjs} +2 -2
  55. package/dist/{vue-ui-dumbbell-D2R9tJ99.js → vue-ui-dumbbell-JpJFPxM2.js} +11 -10
  56. package/dist/{vue-ui-flow-Dd5uPNTQ.js → vue-ui-flow-BhtIMcan.js} +10 -9
  57. package/dist/vue-ui-flow-C5N8YgfJ.cjs +1 -0
  58. package/dist/{vue-ui-galaxy-B7CoWLhj.js → vue-ui-galaxy-BZT14d6d.js} +12 -11
  59. package/dist/vue-ui-galaxy-Cv38ZzWi.cjs +1 -0
  60. package/dist/vue-ui-gauge-BrwCmfGP.cjs +1 -0
  61. package/dist/{vue-ui-gauge-CGh_m922.js → vue-ui-gauge-Dj2gBTkq.js} +29 -28
  62. package/dist/{vue-ui-gizmo-D5Kn7w7L.cjs → vue-ui-gizmo-BhCZEfOE.cjs} +1 -1
  63. package/dist/{vue-ui-gizmo-BY3hnKSH.js → vue-ui-gizmo-Dx0mO1Zf.js} +2 -2
  64. package/dist/{vue-ui-heatmap-yYN0u0I6.js → vue-ui-heatmap-DdSGFMo1.js} +41 -40
  65. package/dist/vue-ui-heatmap-azP3H0Be.cjs +1 -0
  66. package/dist/{vue-ui-kpi-B4zr_geL.js → vue-ui-kpi-C0fjrvpC.js} +3 -3
  67. package/dist/{vue-ui-kpi-Q20yM3IP.cjs → vue-ui-kpi-TKkErBy-.cjs} +1 -1
  68. package/dist/{vue-ui-mini-loader-GImbaGsN.js → vue-ui-mini-loader-CVflLGuB.js} +2 -2
  69. package/dist/{vue-ui-mini-loader-GFSZofpE.cjs → vue-ui-mini-loader-DAos2pVd.cjs} +1 -1
  70. package/dist/vue-ui-molecule-CW1523wC.cjs +1 -0
  71. package/dist/{vue-ui-molecule-DmrB3kgA.js → vue-ui-molecule-D9OfBp53.js} +290 -286
  72. package/dist/{vue-ui-mood-radar-sEkQtzI2.js → vue-ui-mood-radar-PMARjoQW.js} +79 -78
  73. package/dist/vue-ui-mood-radar-vvG5BlGa.cjs +1 -0
  74. package/dist/{vue-ui-nested-donuts-DvpZLcYd.js → vue-ui-nested-donuts-Bt8ZHG4b.js} +35 -34
  75. package/dist/vue-ui-nested-donuts-wVELVgGD.cjs +17 -0
  76. package/dist/{vue-ui-onion-DQMLPe3M.js → vue-ui-onion-B-4djV2X.js} +12 -11
  77. package/dist/vue-ui-onion-j8P027dX.cjs +5 -0
  78. package/dist/{vue-ui-parallel-coordinate-plot-DN2LPNyS.js → vue-ui-parallel-coordinate-plot-B2N249AX.js} +14 -13
  79. package/dist/vue-ui-parallel-coordinate-plot-BRNG5VwG.cjs +8 -0
  80. package/dist/vue-ui-quadrant-BaDei-7C.cjs +1 -0
  81. package/dist/{vue-ui-quadrant-D2GpeXI6.js → vue-ui-quadrant-Bvv3ZZI7.js} +13 -12
  82. package/dist/{vue-ui-quick-chart-C5K9DfUV.js → vue-ui-quick-chart-BzFITYDP.js} +60 -59
  83. package/dist/vue-ui-quick-chart-OUDWfDwC.cjs +15 -0
  84. package/dist/vue-ui-radar-Bpz3hyr9.cjs +1 -0
  85. package/dist/{vue-ui-radar-B9TZPujK.js → vue-ui-radar-CXH5XhDS.js} +13 -12
  86. package/dist/{vue-ui-rating-DpxzUDQq.cjs → vue-ui-rating-BEtR56Zg.cjs} +1 -1
  87. package/dist/{vue-ui-rating-B0pNsmGB.js → vue-ui-rating-BcngasYQ.js} +2 -2
  88. package/dist/{vue-ui-relation-circle-DSnlpLHt.js → vue-ui-relation-circle-BmWv5Kwu.js} +46 -45
  89. package/dist/{vue-ui-relation-circle-D3B-lpdM.cjs → vue-ui-relation-circle-Cn4xYFeJ.cjs} +1 -1
  90. package/dist/{vue-ui-rings-cmeFVitd.cjs → vue-ui-rings-BbrUn18Q.cjs} +2 -2
  91. package/dist/{vue-ui-rings-BuvFDBXg.js → vue-ui-rings-DDvVuJvv.js} +12 -11
  92. package/dist/vue-ui-scatter-C9B6pkLG.cjs +1 -0
  93. package/dist/{vue-ui-scatter-D_chvOSJ.js → vue-ui-scatter-CfgLA10v.js} +13 -12
  94. package/dist/{vue-ui-screenshot-CwrXLMru.cjs → vue-ui-screenshot-BDjgeoQi.cjs} +1 -1
  95. package/dist/{vue-ui-screenshot-DSHeHshf.js → vue-ui-screenshot-W6aedcDN.js} +1 -1
  96. package/dist/{vue-ui-skeleton-Du4zw-c1.js → vue-ui-skeleton-BAQjFiop.js} +2 -2
  97. package/dist/{vue-ui-skeleton-DJhwv2oY.cjs → vue-ui-skeleton-BhG4niml.cjs} +1 -1
  98. package/dist/{vue-ui-smiley-BtQLJ7rA.js → vue-ui-smiley-CQNAPd4d.js} +2 -2
  99. package/dist/{vue-ui-smiley-BNkk6suC.cjs → vue-ui-smiley-J1L8V6KG.cjs} +1 -1
  100. package/dist/{vue-ui-spark-trend-DFIjxBTY.cjs → vue-ui-spark-trend-BTdNsDFX.cjs} +1 -1
  101. package/dist/{vue-ui-spark-trend-BgA79g7a.js → vue-ui-spark-trend-CBc-tBLR.js} +4 -4
  102. package/dist/{vue-ui-sparkbar-BlwQfhlY.cjs → vue-ui-sparkbar-D0189X8M.cjs} +1 -1
  103. package/dist/{vue-ui-sparkbar-DQAWZReF.js → vue-ui-sparkbar-DCLpbzSR.js} +3 -3
  104. package/dist/{vue-ui-sparkgauge-BCRSQDpt.cjs → vue-ui-sparkgauge-ButS3IF8.cjs} +1 -1
  105. package/dist/{vue-ui-sparkgauge-CCApU38s.js → vue-ui-sparkgauge-C-12vLRd.js} +3 -3
  106. package/dist/{vue-ui-sparkhistogram-PKTt4EmH.js → vue-ui-sparkhistogram-CqHEh_4P.js} +4 -4
  107. package/dist/{vue-ui-sparkhistogram-CTxG1Vtn.cjs → vue-ui-sparkhistogram-NLFMPPXv.cjs} +1 -1
  108. package/dist/{vue-ui-sparkline-EESAiZyt.js → vue-ui-sparkline-BaHeaRVl.js} +3 -3
  109. package/dist/{vue-ui-sparkline-BUaixngQ.cjs → vue-ui-sparkline-Cy8fuCDw.cjs} +1 -1
  110. package/dist/{vue-ui-sparkstackbar-iQnc0zcO.cjs → vue-ui-sparkstackbar-B64XK1yu.cjs} +1 -1
  111. package/dist/{vue-ui-sparkstackbar-TnLNixdf.js → vue-ui-sparkstackbar-BLvXeEbr.js} +3 -3
  112. package/dist/{vue-ui-stackbar-Ci04sup3.js → vue-ui-stackbar-B-ZE7Ksh.js} +13 -12
  113. package/dist/vue-ui-stackbar-CLmcckvD.cjs +6 -0
  114. package/dist/vue-ui-strip-plot-DTJeRXEM.cjs +1 -0
  115. package/dist/{vue-ui-strip-plot-DbvW0BuF.js → vue-ui-strip-plot-DbmLZ03_.js} +12 -11
  116. package/dist/{vue-ui-table-CamkBCdL.js → vue-ui-table-CpUWJGi_.js} +1 -1
  117. package/dist/{vue-ui-table-328De4vk.cjs → vue-ui-table-DdroDYB6.cjs} +1 -1
  118. package/dist/vue-ui-table-heatmap-CSHkuLE3.cjs +1 -0
  119. package/dist/{vue-ui-table-heatmap-D-YdrvGV.js → vue-ui-table-heatmap-XJj-iDhJ.js} +27 -26
  120. package/dist/{vue-ui-table-sparkline-Dg2RKv6f.js → vue-ui-table-sparkline-DEhCOiH8.js} +25 -24
  121. package/dist/{vue-ui-table-sparkline-Cmg7wnQ0.cjs → vue-ui-table-sparkline-GgMGhbwH.cjs} +1 -1
  122. package/dist/{vue-ui-thermometer-jWHbZTc2.js → vue-ui-thermometer-CF9_Jiig.js} +51 -50
  123. package/dist/vue-ui-thermometer-LM5LB1fZ.cjs +1 -0
  124. package/dist/{vue-ui-timer-BPepr5eV.js → vue-ui-timer-BN3oSs18.js} +4 -4
  125. package/dist/{vue-ui-timer-B_FyRAU7.cjs → vue-ui-timer-Kw8zfnyl.cjs} +1 -1
  126. package/dist/{vue-ui-tiremarks-CaJWlyz8.cjs → vue-ui-tiremarks-B5Ieo2VI.cjs} +1 -1
  127. package/dist/{vue-ui-tiremarks-DW8Q2IBl.js → vue-ui-tiremarks-CTiztDdT.js} +48 -47
  128. package/dist/{vue-ui-treemap-B9GpvA0k.cjs → vue-ui-treemap-CHngTUd0.cjs} +1 -1
  129. package/dist/{vue-ui-treemap-CWu43qLo.js → vue-ui-treemap-DEDT65NP.js} +13 -12
  130. package/dist/vue-ui-vertical-bar-C8XQwe6S.cjs +4 -0
  131. package/dist/{vue-ui-vertical-bar-CndASePh.js → vue-ui-vertical-bar-hFeIrO6z.js} +13 -12
  132. package/dist/{vue-ui-waffle-CdyqwJwN.js → vue-ui-waffle-CLbMVN8j.js} +46 -45
  133. package/dist/{vue-ui-waffle-c9ycdoKz.cjs → vue-ui-waffle-tFQq8-qt.cjs} +1 -1
  134. package/dist/vue-ui-wheel-CMRCYfem.cjs +1 -0
  135. package/dist/{vue-ui-wheel-Byq_BLhl.js → vue-ui-wheel-DpPdEqHh.js} +34 -33
  136. package/dist/{vue-ui-word-cloud-BVOcsuMP.cjs → vue-ui-word-cloud-C18oOvC0.cjs} +1 -1
  137. package/dist/{vue-ui-word-cloud-BRxN5uFD.js → vue-ui-word-cloud-DTXq9aIY.js} +10 -9
  138. package/dist/vue-ui-xy-Bw1GQuGo.cjs +3 -0
  139. package/dist/{vue-ui-xy-DgEdZz0O.js → vue-ui-xy-DN8TqWYI.js} +342 -339
  140. package/dist/{vue-ui-xy-canvas-BI7jUOTn.js → vue-ui-xy-canvas-BoH-Grae.js} +54 -53
  141. package/dist/{vue-ui-xy-canvas-Td0WNYN0.cjs → vue-ui-xy-canvas-Dg9jorcV.cjs} +2 -2
  142. package/package.json +1 -1
  143. package/dist/Slicer-DCyxUSsn.cjs +0 -1
  144. package/dist/index-D-vy9N1v.cjs +0 -4
  145. package/dist/usePrinter-Do8KiK5h.js +0 -513
  146. package/dist/usePrinter-P4nLcXX-.cjs +0 -1
  147. package/dist/vue-ui-3d-bar-DlUqKETN.cjs +0 -19
  148. package/dist/vue-ui-age-pyramid-CvSoQ1op.cjs +0 -1
  149. package/dist/vue-ui-candlestick-BJulnyV3.cjs +0 -2
  150. package/dist/vue-ui-donut-TY2Z9Ljx.cjs +0 -1
  151. package/dist/vue-ui-donut-evolution-BEm2dOxe.cjs +0 -1
  152. package/dist/vue-ui-flow-DswsuPwy.cjs +0 -1
  153. package/dist/vue-ui-galaxy-Dxy6jzus.cjs +0 -1
  154. package/dist/vue-ui-gauge-CWd_ol6u.cjs +0 -1
  155. package/dist/vue-ui-heatmap-AUm42a1v.cjs +0 -1
  156. package/dist/vue-ui-molecule-C9FcDH4x.cjs +0 -1
  157. package/dist/vue-ui-mood-radar-CRwStVTV.cjs +0 -1
  158. package/dist/vue-ui-nested-donuts-BcOgxtZV.cjs +0 -17
  159. package/dist/vue-ui-onion-C9v9YjdJ.cjs +0 -5
  160. package/dist/vue-ui-parallel-coordinate-plot-BBuPdl2K.cjs +0 -8
  161. package/dist/vue-ui-quadrant-ulY-rCMI.cjs +0 -1
  162. package/dist/vue-ui-quick-chart-DFj17h6h.cjs +0 -15
  163. package/dist/vue-ui-radar-KA287Tp-.cjs +0 -1
  164. package/dist/vue-ui-scatter-BWPqoSUN.cjs +0 -1
  165. package/dist/vue-ui-stackbar-Rrcyg4CC.cjs +0 -6
  166. package/dist/vue-ui-strip-plot-CowHumiU.cjs +0 -1
  167. package/dist/vue-ui-table-heatmap-CCHre3Gt.cjs +0 -1
  168. package/dist/vue-ui-thermometer-BDeKErC9.cjs +0 -1
  169. package/dist/vue-ui-vertical-bar-a_41JdIn.cjs +0 -4
  170. package/dist/vue-ui-wheel-B3BMfKmd.cjs +0 -1
  171. package/dist/vue-ui-xy-CsS5ny0q.cjs +0 -3
@@ -1,15 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-D-vy9N1v.cjs"),xe=require("./useResponsive-B3TrDDIG.cjs"),ne=require("./BaseIcon-BBQHz_Sf.cjs"),Pe=require("./Tooltip-okAYzo5Y.cjs"),Se=require("./usePrinter-P4nLcXX-.cjs"),Te=require("./Slicer-DCyxUSsn.cjs"),Re=require("./vue-ui-skeleton-DJhwv2oY.cjs"),be=require("./useNestedProp-B9yDavuy.cjs"),Ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},De=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function Oe({dataset:s,barLineSwitch:B=6}){let h=null,L=null,z=0;if((typeof s=="number"||typeof s=="string")&&console.warn(`The provided dataset (${s}) is not sufficient to build a chart`),Q(s)&&(P(s)&&(s.length<B?h=S.BAR:h=S.LINE,L=s,z=s.length),re(s))){if(!Ue(s))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const U=Object.keys(s[0]),j=Object.values(s[0]);if(!U.some(E=>qe(E)))return console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."),!1;Be(j,E=>typeof E=="number")&&(h=S.DONUT,L=s),Be(j,E=>Array.isArray(E)&&P(E))&&(we(s)>B?h=S.LINE:h=S.BAR,z=we(s),L=s.map(E=>({...E,data:We(E,$=>P($))}))),s=s.map(E=>Ee(E)),L=L.map(E=>Ee(E))}return Q(s)&&[...new Set(s.flatMap(U=>Array.isArray(U)))][0],{dataset:s,type:h,usableDataset:L,maxSeriesLength:z}}function _e(s){return!s||Q(s)&&!s.length}function Q(s){return Array.isArray(s)}function P(s){if(!Q(s)||_e(s))return!1;const B=s.map(h=>Number(h));return![...new Set(B.flatMap(h=>typeof h=="number"&&!isNaN(h)))].includes(!1)}function re(s){return!Q(s)||_e(s)||!![...new Set(s.flatMap(h=>typeof h=="object"&&!Array.isArray(h)))].includes(!1)?!1:!s.map(h=>Object.keys(h).length>0).includes(!1)}function Me(s,B){const h=Object.keys(s).sort(),L=Object.keys(B).sort();if(h.length!==L.length)return!1;for(let z=0;z<h.length;z+=1){const F=h[z],M=L[z];if(F!==M||typeof s[F]!=typeof B[M])return!1}return!0}function Ue(s){if(s.length<=1)return!0;for(let B=0;B<s.length;B+=1)for(let h=B+1;h<s.length;h+=1)if(!Me(s[B],s[h]))return!1;return!0}function qe(s){return De.includes(s.toUpperCase())}function Be(s,B){let h=[];for(let L=0;L<s.length;L+=1)h.push(B(s[L]));return h.includes(!0)}function we(s){return Math.max(...[...s].flatMap(B=>Object.values(B).filter(h=>P(h)).map(h=>h.length)))}function We(s,B){return Object.values(s).filter(h=>B(h))[0]}function Ee(s){const B={};for(let h in s)s.hasOwnProperty(h)&&(B[h.toUpperCase()]=s[h]);return B}const Le=s=>(e.pushScopeId("data-v-e08a8e9c"),s=s(),e.popScopeId(),s),je=["id"],Ge=["xmlns","viewBox"],He=["id"],Xe=["id"],Ye=Le(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Ze=["id"],Je=["flood-color"],Qe={key:0,class:"donut-label-connectors"},Ke=["d","stroke","stroke-width","filter"],et=["cx","cy","r","fill"],tt=["cx","cy","r","fill","filter"],lt={class:"donut"},at=["d","fill","stroke","stroke-width","filter"],ot=["d","onMouseenter","onClick"],nt={key:1,class:"donut-labels quick-animation"},rt=["cx","cy","fill","filter"],it=["text-anchor","x","y","fill","font-size","filter"],ut=["text-anchor","x","y","fill","font-size","filter"],st={key:2,class:"donut-hollow quick-animation"},ct=["x","y","font-size","fill"],dt=["x","y","font-size","fill"],vt={key:0,class:"line-grid"},mt=["x1","x2","y1","y2","stroke","stroke-width"],ht=["x1","x2","y1","y2","stroke","stroke-width"],ft={key:1,class:"line-axis"},pt=["x1","x2","y1","y2","stroke","stroke-width"],kt=["x1","x2","y1","y2","stroke","stroke-width"],gt={key:2,class:"yLabels"},yt=["x1","x2","y1","y2","stroke","stroke-width"],xt=["x","y","font-size","fill"],St={key:3,class:"periodLabels"},bt=["x1","x2","y1","y2","stroke","stroke-width"],Bt=["font-size","text-anchor","fill","transform"],wt={class:"plots"},Et={class:"line-plot-series"},_t=["d","stroke","stroke-width"],Lt=["d","stroke","stroke-width"],At=["d","stroke","stroke-width"],Ct=["d","stroke","stroke-width"],Nt=["cx","cy","fill","stroke"],zt={key:4,class:"dataLabels"},Vt=["font-size","fill","x","y"],Ft={class:"tooltip-traps"},$t=["x","y","height","width","fill","onMouseenter","onClick"],Pt={key:0,class:"line-grid"},Tt=["x1","x2","y1","y2","stroke","stroke-width"],Rt=["x1","x2","y1","y2","stroke","stroke-width"],It={key:1,class:"line-axis"},Dt=["x1","x2","y1","y2","stroke","stroke-width"],Ot=["x1","x2","y1","y2","stroke","stroke-width"],Mt={key:2,class:"yLabels"},Ut=["x1","x2","y1","y2","stroke","stroke-width"],qt=["x","y","font-size","fill"],Wt={key:3,class:"periodLabels"},jt=["x1","x2","y1","y2","stroke","stroke-width"],Gt=["font-size","text-anchor","transform","fill"],Ht={class:"plots"},Xt=["x","width","height","y","fill","stroke","stroke-width"],Yt=["to"],Zt=["from","to"],Jt={key:4,class:"dataLabels"},Qt=["x","y","font-size","fill"],Kt={class:"tooltip-traps"},el=["x","y","height","width","fill","onMouseenter","onClick"],tl={key:3,class:"axis-labels"},ll={key:0},al=["font-size","fill","x","y"],ol={key:1},nl=["font-size","fill","x","y"],rl={key:2},il=["font-size","fill","transform"],ul={key:3},sl=["font-size","fill","transform"],cl={key:4,class:"vue-data-ui-watermark"},dl=["onClick"],vl=["onClick"],ml=["onClick"],hl={key:1,class:"vue-ui-quick-chart-not-processable"},fl=Le(()=>e.createElementVNode("span",null,"Dataset is not processable",-1)),pl={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(s,{expose:B,emit:h}){const L=s,{vue_ui_quick_chart:z}=u.useConfig(),F=e.ref(null),M=e.ref(null),U=e.ref(null),j=e.ref(null),E=e.ref(u.createUid()),$=e.ref(!1),G=e.ref(null),R=e.ref(""),V=e.ref(null),x=e.ref([]),se=e.ref(0),K=e.ref(0),t=e.computed({get:()=>ce(),set:n=>n});function ce(){const n=be.useNestedProp({userConfig:L.config,defaultConfig:z});return n.theme?{...be.useNestedProp({userConfig:u.themes.vue_ui_quick_chart[n.theme]||L.config,defaultConfig:n}),customPalette:u.themePalettes[n.theme]||u.palette}:n}e.watch(()=>L.config,n=>{t.value=ce(),p.value.width=t.value.width,p.value.height=t.value.height,me()},{deep:!0}),e.watch(()=>L.dataset,n=>{k.value=X.value,g.value.start=0,g.value.end=k.value.maxSeriesLength,K.value+=1},{deep:!0});const H=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),X=e.computed(()=>{const n=Oe({dataset:u.sanitizeArray(L.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return n||console.error("VueUiQuickChart : Dataset is not processable"),n}),k=e.ref(X.value),Ae=e.computed(()=>!!k.value),b=e.computed(()=>k.value?k.value.type:null);e.watch(()=>b.value,n=>{n||u.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:ee,isImaging:te,generatePdf:de,generateImage:ve}=Se.usePrinter({elementId:`${b.value}_${E.value}`,fileName:t.value.title||b.value}),p=e.ref({width:t.value.width,height:t.value.height}),le=e.ref({showTooltip:t.value.showTooltip}),ae=e.ref(null);e.onMounted(()=>{me()});function me(){if(t.value.responsive){const n=xe.throttle(()=>{const{width:v,height:l}=xe.useResponsive({chart:F.value,title:t.value.title?M.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&k.value.maxSeriesLength>1?j.value:null});p.value.width=v,p.value.height=l});ae.value=new ResizeObserver(n),ae.value.observe(F.value.parentNode)}}e.onBeforeUnmount(()=>{ae.value&&ae.value.disconnect()});const Ce=e.computed(()=>{switch(b.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 he(n){return[...n].map(v=>v.value).reduce((v,l)=>v+l,0)}function Y(n){return t.value.blurOnHover&&![null,void 0].includes(V.value)&&V.value!==n?`url(#blur_${E.value})`:""}function fe(n,v){x.value.includes(n)?x.value=x.value.filter(l=>l!==n):x.value.length<v&&x.value.push(n)}const pe=e.ref(null),ke=e.ref(null),oe=e.ref(!1);function Ne(n,v){oe.value=!0;let l=n.value;if(x.value.includes(n.id)){let i=function(){l>r?(oe.value=!1,cancelAnimationFrame(ke.value),k.value={...k.value,dataset:k.value.dataset.map((m,A)=>n.id===`donut_${A}`?{...m,value:r,VALUE:r}:m)}):(l+=r*.025,k.value={...k.value,dataset:k.value.dataset.map((m,A)=>n.id===`donut_${A}`?{...m,value:l,VALUE:l}:m)},ke.value=requestAnimationFrame(i))};x.value=x.value.filter(m=>m!==n.id);const r=X.value.dataset.find((m,A)=>n.id===`donut_${A}`).VALUE;i()}else if(v.length>1){let r=function(){l<.1?(oe.value=!1,cancelAnimationFrame(pe.value),x.value.push(n.id),k.value={...k.value,dataset:k.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:0,VALUE:0}:i)}):(l/=1.1,k.value={...k.value,dataset:k.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:l,VALUE:l}:i)},pe.value=requestAnimationFrame(r))};r()}}const T=e.ref(null);function ze(n){T.value=n}const ge=e.computed(()=>t.value.donutThicknessRatio<.15?.15:t.value.donutThicknessRatio>.4?.4:t.value.donutThicknessRatio),w=e.computed(()=>{if(b.value!==S.DONUT)return null;const n=k.value.dataset.map((a,o)=>({...a,value:a.VALUE||a.DATA||a.SERIE||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`donut_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],immutableValue:a.value}));function v(a,o){return u.dataLabel({v:isNaN(a.value/he(o))?0:a.value/he(o)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(a){return a.proportion*100>t.value.donutHideLabelUnderPercentage}function r(a,o){const y=X.value.dataset.find((_,C)=>`donut_${C}`===a).VALUE;return Math.abs(String(Number(y.toFixed(0))).length-String(Number(o.toFixed(0))).length)}function i({datapoint:a,seriesIndex:o}){G.value={datapoint:a,seriesIndex:o,config:t.value,dataset:n},V.value=a.id;const y=t.value.tooltipCustomFormat;if(u.isFunction(y)&&u.functionReturnsString(()=>y({datapoint:a,seriesIndex:o,series:n,config:t.value})))R.value=y({datapoint:a,seriesIndex:o,series:n,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>${u.applyDataLabel(t.value.formatter,a.value,u.dataLabel({p:t.value.valuePrefix,v:a.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:a,seriesIndex:o})}</b>`,f+=`<span>(${u.dataLabel({v:a.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,R.value=`<div>${f}</div>`}$.value=!0}function m(){$.value=!1,V.value=null,T.value=null}const A={centerX:p.value.width/2,centerY:p.value.height/2},N=n.filter(a=>!x.value.includes(a.id)).map(a=>a.value||0).reduce((a,o)=>a+o,0),q=n.map((a,o)=>({...a,proportion:(a.value||0)/N,value:a.value||0,absoluteValue:X.value.dataset.find((y,f)=>`donut_${f}`===a.id).VALUE})),I=p.value.width/2,W=p.value.height/2,D=p.value.height*t.value.donutRadiusRatio;return{dataset:q.filter(a=>!x.value.includes(a.id)),legend:q,drawingArea:A,displayArcPercentage:v,isArcBigEnough:l,useTooltip:i,killTooltip:m,getSpaces:r,total:N,cx:I,cy:W,radius:D,chart:u.makeDonut({series:n.filter(a=>!x.value.includes(a.id))},I,W,D,D,1.99999,2,1,360,105.25,p.value.height*ge.value)}}),g=e.ref({start:0,end:k.value.maxSeriesLength});function Ve(){g.value={start:0,end:k.value.maxSeriesLength},K.value+=1}const Fe=e.computed(()=>{if(!t.value.zoomMinimap.show||b.value===S.DONUT)return[];let n=[];P(k.value.dataset)&&(n=k.value.dataset),re(k.value.dataset)&&(n=k.value.dataset.map((i,m)=>({values:i.VALUE||i.DATA||i.SERIE||i.SERIES||i.VALUES||i.NUM||0,id:b.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(i=>!x.value.includes(i.id)));const v=P(n)?n.length:Math.max(...n.map(i=>i.values.length));let l=[];if(P(n))l=n;else for(let i=0;i<v;i+=1)l.push(n.map(m=>m.values[i]||0).reduce((m,A)=>(m||0)+(A||0),0));const r=Math.min(...l);return l.map(i=>i+(r<0?Math.abs(r):0))}),d=e.computed(()=>{if(b.value!==S.LINE)return null;const n={height:p.value.height,width:p.value.width},v={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:n.width-t.value.xyPaddingRight,bottom:n.height-t.value.xyPaddingBottom,width:n.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:n.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];P(k.value.dataset)&&(l=[{values:k.value.dataset.slice(g.value.start,g.value.end),absoluteIndices:k.value.dataset.map((a,o)=>o).slice(g.value.start,g.value.end),name:t.value.title,color:H.value[t.value.paletteStartIndex]||u.palette[t.value.paletteStartIndex],id:"line_0"}]),re(k.value.dataset)&&(l=k.value.dataset.map((a,o)=>({...a,values:a.VALUE||a.DATA||a.SERIE||a.SERIES||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`line_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],values:a.values.slice(g.value.start,g.value.end),absoluteIndices:a.values.map((y,f)=>f).slice(g.value.start,g.value.end)})));const r={max:Math.max(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),min:Math.min(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),maxSeries:Math.max(...l.map(a=>a.values.length))},i=u.calculateNiceScale(r.min<0?r.min:0,r.max<0?0:r.max,t.value.xyScaleSegments),m=r.min<0?Math.abs(r.min):0,A=r.max<0?v.top:v.bottom-m/(i.max+m)*v.height,N=v.width/r.maxSeries,q=i.ticks.map(a=>({y:v.bottom-v.height*((a+m)/(i.max+m)),x:v.left-8,value:a})),I=l.map((a,o)=>({...a,coordinates:a.values.map((y,f)=>({x:v.left+N*(f+1)-N/2,y:v.bottom-(y+m)/(i.max+m)*v.height,value:y}))})).map(a=>{let o=[];return a.coordinates.forEach(y=>{o.push(`${y.x},${y.y} `)}),{...a,linePath:o.join(" ")}});function W(a){V.value=a,T.value=a;const o=l.map(f=>({...f,value:f.values[a],absoluteIndex:f.absoluteIndices[a]})).filter(f=>!x.value.includes(f.id));G.value={datapoint:o,seriesIndex:a,config:t.value,dataset:l};const y=t.value.tooltipCustomFormat;if(u.isFunction(y)&&u.functionReturnsString(()=>y({datapoint:o,seriesIndex:a,series:l,config:t.value})))R.value=y({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((_,C)=>{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>${u.applyDataLabel(t.value.formatter,_.value,u.dataLabel({p:t.value.valuePrefix,v:_.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:_,seriesIndex:C})}
6
- </b>
7
- </div>
8
- `}),R.value=f}$.value=!0}function D(){V.value=null,$.value=!1}return{absoluteZero:A,dataset:I.filter(a=>!x.value.includes(a.id)),legend:I,drawingArea:v,extremes:r,slotSize:N,yLabels:q,useTooltip:W,killTooltip:D}}),c=e.computed(()=>{if(b.value!==S.BAR)return null;const n={height:p.value.height,width:p.value.width},v={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:n.width-t.value.xyPaddingRight,bottom:n.height-t.value.xyPaddingBottom,width:n.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:n.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];P(k.value.dataset)&&(l=[{values:k.value.dataset.slice(g.value.start,g.value.end),absoluteIndices:k.value.dataset.map((o,y)=>y).slice(g.value.start,g.value.end),name:t.value.title,color:H.value[t.value.paletteStartIndex]||u.palette[t.value.paletteStartIndex],id:"bar_0"}]),re(k.value.dataset)&&(l=k.value.dataset.map((o,y)=>({...o,values:o.VALUE||o.DATA||o.SERIE||o.SERIES||o.VALUES||o.NUM||0,name:o.NAME||o.DESCRIPTION||o.TITLE||o.LABEL||`Serie ${y}`,id:`bar_${y}`})).map((o,y)=>({...o,color:o.COLOR?u.convertColorToHex(o.COLOR):H.value[y+t.value.paletteStartIndex]||u.palette[y+t.value.paletteStartIndex]||u.palette[(y+t.value.paletteStartIndex)%u.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 r={max:Math.max(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values))<0?0:Math.max(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),min:Math.min(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),maxSeries:Math.max(...l.filter(o=>!x.value.includes(o.id)).map(o=>o.values.length))},i=u.calculateNiceScale(r.min<0?r.min:0,r.max,t.value.xyScaleSegments),m=i.min<0?Math.abs(i.min):0,A=v.bottom-m/(i.max+m)*v.height,N=v.width/r.maxSeries,q=i.ticks.map(o=>({y:v.bottom-v.height*((o+m)/(i.max+m)),x:v.left-8,value:o})),I=l.map((o,y)=>({...o,coordinates:o.values.map((f,_)=>{const C=(f+m)/(r.max+m)*v.height,Z=Math.abs(f)/Math.abs(r.min)*(v.height-A),ue=m/(r.max+m)*v.height,J=N/l.filter(O=>!x.value.includes(O.id)).length-t.value.barGap/l.filter(O=>!x.value.includes(O.id)).length;return{x:v.left+N*_+J*y+t.value.barGap/2,y:f>0?v.bottom-C:A,height:f>0?C-ue:Z,value:f,width:J}})})),W=l.filter(o=>!x.value.includes(o.id)).map((o,y)=>({...o,coordinates:o.values.map((f,_)=>{const C=(f+m)/(r.max+m)*v.height,Z=Math.abs(f)/(r.max+m)*v.height,ue=m/(r.max+m)*v.height,J=N/l.filter(O=>!x.value.includes(O.id)).length-t.value.barGap/l.filter(O=>!x.value.includes(O.id)).length;return{x:v.left+N*_+J*y+t.value.barGap/2,y:f>0?v.bottom-C:A,height:f>0?C-ue:Z,value:f,width:J}})}));function D(o){V.value=o,T.value=o;const y=l.map(_=>({..._,value:_.values[o],absoluteIndex:_.absoluteIndices[o]})).filter(_=>!x.value.includes(_.id));G.value={datapoint:y,seriesIndex:o,config:t.value,dataset:l};const f=t.value.tooltipCustomFormat;if(u.isFunction(f)&&u.functionReturnsString(()=>f({datapoint:y,seriesIndex:o,series:l,config:t.value})))R.value=f({point:y,seriesIndex:o,series:l,config:t.value});else{let _="";t.value.xyPeriods[y[0].absoluteIndex]&&(_+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[y[0].absoluteIndex]}</div>`),y.forEach((C,Z)=>{_+=`
9
- <div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
10
- <svg viewBox="0 0 12 12" height="14" width="12"><rect x=0 y="0" width="12" height="12" rx="1" stroke="none" fill="${C.color}"/></svg>
11
- <span>${C.name}:</span>
12
- <b>${u.applyDataLabel(t.value.formatter,C.value,u.dataLabel({p:t.value.valuePrefix,v:C.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:C,seriesIndex:Z})}
13
- </b>
14
- </div>
15
- `}),R.value=_}$.value=!0}function a(){$.value=!1,V.value=null,T.value=null}return{absoluteZero:A,dataset:W.filter(o=>!x.value.includes(o.id)),legend:I,drawingArea:v,extremes:r,slotSize:N,yLabels:q,useTooltip:D,killTooltip:a}}),ie=e.ref(!1);function $e(n){ie.value=n,se.value+=1}function ye(){le.value.showTooltip=!le.value.showTooltip}return B({generatePdf:de,generateImage:ve,toggleTooltip:ye}),(n,v)=>Ae.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:`${b.value}_${E.value}`,ref_key:"quickChart",ref:F,class:e.normalizeClass({"vue-ui-quick-chart":!0,"vue-data-ui-wrapper-fullscreen":ie.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(Se.UserOptions,{ref:"details",key:`user_option_${se.value}`,backgroundColor:t.value.backgroundColor,color:t.value.color,isPrinting:e.unref(ee),isImaging:e.unref(te),uid:E.value,hasTooltip:t.value.userOptionsButtons.tooltip&&t.value.showTooltip,hasPdf:t.value.userOptionsButtons.pdf,hasImg:t.value.userOptionsButtons.img,hasFullscreen:t.value.userOptionsButtons.fullscreen,hasXls:!1,isTooltip:le.value.showTooltip,isFullscreen:ie.value,titles:{...t.value.userOptionsButtonTitles},chartElement:F.value,onToggleFullscreen:$e,onGeneratePdf:e.unref(de),onGenerateImage:e.unref(ve),onToggleTooltip:ye},e.createSlots({_:2},[n.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,n.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,n.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,n.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(n.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0]),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:M,class:"vue-ui-quick-chart-title",style:e.normalizeStyle(`background:transparent;color:${t.value.color};font-size:${t.value.titleFontSize}px;font-weight:${t.value.titleBold?"bold":"normal"};text-align:${t.value.titleTextAlign}`)},e.toDisplayString(t.value.title),5)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(u.XMLNS),viewBox:Ce.value,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${E.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${E.value}`},null,8,Xe),Ye],8,He),e.createElementVNode("filter",{id:`shadow_${E.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.donutShadowColor},null,8,Je)],8,Ze)]),b.value===S.DONUT?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",Qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(u.calcNutArrowPath)(l,{x:p.value.width/2,y:p.value.height/2},16,16,!1,!1,p.value.height*ge.value),stroke:l.color,"stroke-width":t.value.donutLabelMarkerStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:Y(l.id)},null,8,Ke)):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,et),e.createElementVNode("circle",{cx:w.value.cx,cy:w.value.cy,r:w.value.radius,fill:t.value.backgroundColor,filter:t.value.donutUseShadow?`url(#shadow_${E.value})`:""},null,8,tt),e.createElementVNode("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":t.value.donutStrokeWidth,filter:Y(l.id)},null,8,at))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:"transparent",onMouseenter:i=>w.value.useTooltip({datapoint:l,seriesIndex:r}),onMouseout:v[0]||(v[0]=i=>w.value.killTooltip()),onClick:i=>h("selectDatapoint",l)},null,40,ot))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(u.calcMarkerOffsetX)(l).x,cy:e.unref(u.calcMarkerOffsetY)(l)-3.7,fill:l.color,r:3,filter:Y(l.id)},null,8,rt)):e.createCommentVNode("",!0),w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(u.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(u.calcMarkerOffsetX)(l,!0).x,y:e.unref(u.calcMarkerOffsetY)(l),fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:Y(l.id)},e.toDisplayString(w.value.displayArcPercentage(l,w.value.chart))+" ("+e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,l.value,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r}))+") ",9,it)):e.createCommentVNode("",!0),w.value.isArcBigEnough(l,!0,20)?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(u.calcMarkerOffsetX)(l).anchor,x:e.unref(u.calcMarkerOffsetX)(l,!0).x,y:e.unref(u.calcMarkerOffsetY)(l)+t.value.dataLabelFontSize,fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:Y(l.id)},e.toDisplayString(l.name),9,ut)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.donutShowTotal?(e.openBlock(),e.createElementBlock("g",st,[e.createElementVNode("text",{"text-anchor":"middle",x:w.value.drawingArea.centerX,y:w.value.drawingArea.centerY-t.value.donutTotalLabelFontSize/2,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(t.value.donutTotalLabelText),9,ct),e.createElementVNode("text",{"text-anchor":"middle",x:w.value.drawingArea.centerX,y:w.value.drawingArea.centerY+t.value.donutTotalLabelFontSize,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(e.unref(u.dataLabel)({p:t.value.valuePrefix,v:w.value.total,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})),9,dt)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),b.value===S.LINE?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.xyShowGrid?(e.openBlock(),e.createElementBlock("g",vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.yLabels,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:d.value.drawingArea.left,x2:d.value.drawingArea.right,y1:l.y,y2:l.y,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,mt)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.extremes.maxSeries+1,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.drawingArea.left+d.value.slotSize*r,x2:d.value.drawingArea.left+d.value.slotSize*r,y1:d.value.drawingArea.top,y2:d.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,ht))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",ft,[e.createElementVNode("line",{x1:d.value.drawingArea.left,x2:d.value.drawingArea.left,y1:d.value.drawingArea.top,y2:d.value.drawingArea.bottom,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,pt),e.createElementVNode("line",{x1:d.value.drawingArea.left,x2:d.value.drawingArea.right,y1:isNaN(d.value.absoluteZero)?d.value.drawingArea.bottom:d.value.absoluteZero,y2:isNaN(d.value.absoluteZero)?d.value.drawingArea.bottom:d.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,kt)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.yLabels,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x+4,x2:d.value.drawingArea.left,y1:l.y,y2:l.y,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,yt)):e.createCommentVNode("",!0),l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.x,y:l.y+t.value.xyLabelsYFontSize/3,"text-anchor":"end","font-size":t.value.xyLabelsYFontSize,fill:t.value.color},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,l.value,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),9,xt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",St,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(g.value.start,g.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2,x2:d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2,y1:d.value.drawingArea.bottom,y2:d.value.drawingArea.bottom+4,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,bt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(g.value.start,g.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.xyLabelsXFontSize,"text-anchor":t.value.xyPeriodLabelsRotation>0?"start":t.value.xyPeriodLabelsRotation<0?"end":"middle",fill:t.value.color,transform:`translate(${d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2}, ${d.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}), rotate(${t.value.xyPeriodLabelsRotation})`},e.toDisplayString(l),9,Bt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock("g",Et,[t.value.lineSmooth?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("path",{d:`M ${e.unref(u.createSmoothPath)(l.coordinates)}`,stroke:t.value.backgroundColor,"stroke-width":t.value.lineStrokeWidth+1,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,_t),e.createElementVNode("path",{d:`M ${e.unref(u.createSmoothPath)(l.coordinates)}`,stroke:l.color,"stroke-width":t.value.lineStrokeWidth,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,Lt)],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,At),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,Ct)],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("circle",{cx:i.x,cy:e.unref(u.checkNaN)(i.y),r:3,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":"0.5",class:"quick-animation",style:{transition:"all 0.3s ease-in-out"}},null,8,Nt))),256))]))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,x:i.x,y:e.unref(u.checkNaN)(i.y)-t.value.dataLabelFontSize/2,class:"quick-animation",style:{transition:"all 0.3s ease-in-out"}},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,e.unref(u.checkNaN)(i.value),e.unref(u.dataLabel)({p:t.value.valuePrefix,v:e.unref(u.checkNaN)(i.value),s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:i,seriesIndex:m})),9,Vt))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.extremes.maxSeries,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{x:d.value.drawingArea.left+r*d.value.slotSize,y:d.value.drawingArea.top,height:d.value.drawingArea.height<=0?1e-5:d.value.drawingArea.height,width:d.value.slotSize<=0?1e-5:d.value.slotSize,fill:[V.value,T.value].includes(r)?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:i=>d.value.useTooltip(r),onMouseleave:v[1]||(v[1]=i=>d.value.killTooltip()),onClick:i=>h("selectDatapoint",d.value.dataset.map(m=>({...m,value:m.values[r]})))},null,44,$t))),256))])],64)):e.createCommentVNode("",!0),b.value===S.BAR?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.value.xyShowGrid?(e.openBlock(),e.createElementBlock("g",Pt,[(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,Tt)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.extremes.maxSeries+1,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:c.value.drawingArea.left+c.value.slotSize*r,x2:c.value.drawingArea.left+c.value.slotSize*r,y1:c.value.drawingArea.top,y2:c.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Rt))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",It,[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,Dt),e.createElementVNode("line",{x1:c.value.drawingArea.left,x2:c.value.drawingArea.right,y1:isNaN(c.value.absoluteZero)?c.value.drawingArea.bottom:c.value.absoluteZero,y2:isNaN(c.value.absoluteZero)?c.value.drawingArea.bottom:c.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Ot)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",Mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.yLabels,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x+4,x2:c.value.drawingArea.left,y1:l.y,y2:l.y,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Ut)):e.createCommentVNode("",!0),l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.x,y:l.y+t.value.xyLabelsYFontSize/3,"text-anchor":"end","font-size":t.value.xyLabelsYFontSize,fill:t.value.color},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,l.value,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),9,qt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",Wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(g.value.start,g.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:c.value.drawingArea.left+c.value.slotSize*(r+1)-c.value.slotSize/2,x2:c.value.drawingArea.left+c.value.slotSize*(r+1)-c.value.slotSize/2,y1:c.value.drawingArea.bottom,y2:c.value.drawingArea.bottom+4,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,jt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(g.value.start,g.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.xyLabelsXFontSize,"text-anchor":t.value.xyPeriodLabelsRotation>0?"start":t.value.xyPeriodLabelsRotation<0?"end":"middle",transform:`translate(${c.value.drawingArea.left+c.value.slotSize*(r+1)-c.value.slotSize/2}, ${c.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}) rotate(${t.value.xyPeriodLabelsRotation})`,fill:t.value.color},e.toDisplayString(l),9,Gt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("rect",{x:i.x,width:i.width<=0?1e-5:i.width,height:e.unref(u.checkNaN)(i.height<=0?1e-5:i.height),y:e.unref(u.checkNaN)(i.y),fill:l.color,stroke:t.value.backgroundColor,"stroke-width":t.value.barStrokeWidth,"stroke-linecap":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.barAnimated&&i.value<0})},[t.value.barAnimated&&i.value>0&&!e.unref(ee)&&!e.unref(te)?(e.openBlock(),e.createElementBlock("animate",{key:0,attributeName:"height",from:0,to:i.height,dur:"0.5s"},null,8,Yt)):e.createCommentVNode("",!0),t.value.barAnimated&&i.value>0&&!e.unref(ee)&&!e.unref(te)?(e.openBlock(),e.createElementBlock("animate",{key:1,attributeName:"y",from:c.value.absoluteZero,to:c.value.absoluteZero-i.height,dur:"0.5s"},null,8,Zt)):e.createCommentVNode("",!0)],10,Xt))),256))],64))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",Jt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("text",{x:i.x+i.width/2,y:e.unref(u.checkNaN)(i.y)-t.value.dataLabelFontSize/2,"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,class:"quick-animation"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,e.unref(u.checkNaN)(i.value),e.unref(u.dataLabel)({p:t.value.valuePrefix,v:e.unref(u.checkNaN)(i.value),s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:i,seriesIndex:m})),9,Qt))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Kt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.extremes.maxSeries,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{x:c.value.drawingArea.left+r*c.value.slotSize,y:c.value.drawingArea.top,height:c.value.drawingArea.height<=0?1e-5:c.value.drawingArea.height,width:c.value.slotSize<=0?1e-5:c.value.slotSize,fill:[V.value,T.value].includes(r)?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:i=>c.value.useTooltip(r),onMouseleave:v[2]||(v[2]=i=>c.value.killTooltip()),onClick:i=>h("selectDatapoint",c.value.dataset.map(m=>({...m,value:m.values[r]})))},null,44,el))),256))])],64)):e.createCommentVNode("",!0),[S.LINE,S.BAR].includes(b.value)?(e.openBlock(),e.createElementBlock("g",tl,[t.value.xAxisLabel&&b.value===S.LINE?(e.openBlock(),e.createElementBlock("g",ll,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,"text-anchor":"middle",x:d.value.drawingArea.left+d.value.drawingArea.width/2,y:p.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,al)])):e.createCommentVNode("",!0),t.value.xAxisLabel&&b.value===S.BAR?(e.openBlock(),e.createElementBlock("g",ol,[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,nl)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&b.value===S.LINE?(e.openBlock(),e.createElementBlock("g",rl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,transform:`translate(${t.value.axisLabelsFontSize}, ${d.value.drawingArea.top+d.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.yAxisLabel),9,il)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&b.value===S.BAR?(e.openBlock(),e.createElementBlock("g",ul,[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,sl)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],12,Ge)):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Re.default,{key:3,config:{type:"line",style:{backgroundColor:t.value.backgroundColor,line:{axis:{color:t.value.xyAxisStroke},path:{color:t.value.xyAxisStroke,strokeWidth:.5}}}}},null,8,["config"])),n.$slots.watermark?(e.openBlock(),e.createElementBlock("div",cl,[e.renderSlot(n.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&k.value.maxSeriesLength>1?(e.openBlock(),e.createElementBlock("div",{key:`slicer_${K.value}`,ref_key:"quickChartSlicer",ref:j},[(e.openBlock(),e.createBlock(Te.Slicer,{key:`slicer_${K.value}`,background:t.value.zoomColor,borderColor:t.value.backgroundColor,fontSize:t.value.zoomFontSize,useResetSlot:t.value.zoomUseResetSlot,labelLeft:t.value.xyPeriods[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:k.value.maxSeriesLength,min:0,valueStart:g.value.start,valueEnd:g.value.end,smoothMinimap:t.value.zoomMinimap.smooth,minimapSelectedColor:t.value.zoomMinimap.selectedColor,minimapSelectedColorOpacity:t.value.zoomMinimap.selectedColorOpacity,minimapSelectionRadius:t.value.zoomMinimap.selectionRadius,minimapLineColor:t.value.zoomMinimap.lineColor,minimap:Fe.value,minimapIndicatorColor:t.value.zoomMinimap.indicatorColor,minimapSelectedIndex:T.value,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:Ve,onTrapMouse:ze},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(n.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","smoothMinimap","minimapSelectedColor","minimapSelectedColorOpacity","minimapSelectionRadius","minimapLineColor","minimap","minimapIndicatorColor","minimapSelectedIndex","start","end"]))])):e.createCommentVNode("",!0),t.value.showLegend?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"quickChartLegend",ref:U,class:"vue-ui-quick-chart-legend",style:e.normalizeStyle(`background:transparent;color:${t.value.color}`)},[b.value===S.DONUT?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(w.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:i=>{Ne(l,w.value.dataset),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${w.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(ne.default,{name:t.value.legendIcon,stroke:l.color,size:t.value.legendIconSize},null,8,["name","stroke","size"]),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)},e.toDisplayString(l.name),5),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px;font-variant-numeric:tabular-nums`)},e.toDisplayString(x.value.includes(l.id)?"-":e.unref(u.applyDataLabel)(t.value.formatter,l.absoluteValue,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.absoluteValue,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),5),x.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)}," ( - % ) ",4)):oe.value?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)}," ( - % ) ",4)):(e.openBlock(),e.createElementBlock("span",{key:2,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)}," ("+e.toDisplayString(e.unref(u.dataLabel)({v:l.value/w.value.total*100,s:"%",r:t.value.dataLabelRoundingPercentage}))+") ",5))],64))],12,dl))),256)):e.createCommentVNode("",!0),b.value===S.LINE?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:i=>{fe(l.id,d.value.legend.length-1),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${d.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(ne.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,vl))),256)):e.createCommentVNode("",!0),b.value===S.BAR?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(c.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:i=>{fe(l.id,c.value.legend.length-1),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${c.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(ne.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,ml))),256)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createVNode(Pe._sfc_main,{show:le.value.showTooltip&&$.value,backgroundColor:t.value.backgroundColor,color:t.value.color,borderRadius:t.value.tooltipBorderRadius,borderColor:t.value.tooltipBorderColor,borderWidth:t.value.tooltipBorderWidth,fontSize:t.value.tooltipFontSize,backgroundOpacity:t.value.tooltipBackgroundOpacity,position:t.value.tooltipPosition,offsetY:t.value.tooltipOffsetY,parent:F.value,content:R.value,isCustom:e.unref(u.isFunction)(t.value.tooltipCustomFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(n.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(n.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"])],14,je)):(e.openBlock(),e.createElementBlock("div",hl,[e.createVNode(ne.default,{name:"circleCancel",stroke:"red"}),fl]))}},kl=Ie._export_sfc(pl,[["__scopeId","data-v-e08a8e9c"]]);exports.default=kl;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-D-vy9N1v.cjs"),Z=require("./useResponsive-B3TrDDIG.cjs"),ge=require("./Title-BaKZYHEx.cjs"),ee=require("./usePrinter-P4nLcXX-.cjs"),he=require("./Tooltip-okAYzo5Y.cjs"),me=require("./vue-ui-sparkbar-BlwQfhlY.cjs"),fe=require("./Legend-k2mcTp7z.cjs"),ye=require("./DataTable-pVXaNplZ.cjs"),ke=require("./vue-ui-skeleton-DJhwv2oY.cjs"),be=require("./vue-ui-accordion-btKAUUTu.cjs"),te=require("./useNestedProp-B9yDavuy.cjs"),Ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),we=["id"],Be=["xmlns","viewBox"],_e=["id"],xe=["stop-color"],Pe=["stop-color"],$e={key:0},Ne=["x1","y1","x2","y2","stroke","stroke-width"],Te={key:0},Se=["d","stroke","stroke-width"],Ee=["d","stroke","stroke-width"],Ve={key:1},Fe=["x","y","text-anchor","font-size","fill","onMouseenter"],Le=["points","stroke","stroke-width"],Oe=["points","stroke","stroke-width","fill"],ze={key:2},Ae=["cx","cy","fill","r","stroke"],Ie={key:3,class:"vue-data-ui-watermark"},Re=["onClick"],De={key:0,style:{"max-width":"200px",margin:"0 auto"}},Me={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(oe,{expose:ae,emit:le}){const d=oe,{vue_ui_radar:re}=n.useConfig(),k=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),ne=e.ref(null),P=e.ref(!1),$=e.ref(""),F=e.ref(0),b=e.ref(null),L=e.ref(null),O=e.ref(null),z=e.ref(0),A=e.ref(0),I=e.ref(0),t=e.computed({get:()=>R(),set:o=>o});function R(){const o=te.useNestedProp({userConfig:d.config,defaultConfig:re});return o.theme?{...te.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=R(),D(),z.value+=1,A.value+=1,I.value+=1},{deep:!0});const B=e.ref(null);function D(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=Z.throttle(()=>{const{width:a,height:l}=Z.useResponsive({chart:b.value,title:t.value.style.chart.title.text?L.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.onMounted(()=>{D()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:M,isImaging:q,generatePdf:U,generateImage:G}=ee.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),W=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),g=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),ue=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 H(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)),le("selectLegend",y.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function se(){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)||W.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)||W.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),X=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),j=e.computed(()=>p.value.length),N=e.computed(()=>Math.min(s.value.width,s.value.height)/3),Y=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:N.value,sides:j.value,rotation:0})),ie=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}),h=e.computed(()=>Y.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>ce({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||X.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 ce({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||X.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>H(l),isSegregated:i.value.includes(l)}))}),de=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,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((u,c)=>`${n.applyDataLabel(r.formatter,u,n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(u/r.target)?"":n.dataLabel({v:u/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:a,config:l,colNames:o}}),x=e.ref(null),S=e.ref([]),E=e.ref(null);function ve(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:h.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value})))$.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let u=0;u<o.values.length;u+=1)i.value.includes(u)||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,formatter:o.formatter});$.value=l}}function J(){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,Ue)=>[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 pe(o){w.value=o,F.value+=1}function K(){g.value.showTable=!g.value.showTable}function Q(){g.value.showTooltip=!g.value.showTooltip}return ae({getData:se,generatePdf:U,generateCsv:J,generateImage:G,toggleTable:K,toggleTooltip:Q}),(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:L,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(ge._sfc_main,{key:`title_${z.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value?(e.openBlock(),e.createBlock(ee.UserOptions,{ref_key:"details",ref:ne,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(q),isPrinting:e.unref(M),uid:m.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:w.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(U),onGenerateCsv:J,onGenerateImage:e.unref(G),onToggleTable:K,onToggleTooltip:Q},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:transparent;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.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,xe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Pe)],8,_e))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Ne))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:j.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Se))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:Y.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,Ee),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.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=>ve(l,r),onMouseleave:a[0]||(a[0]=u=>{P.value=!1,x.value=null})},e.toDisplayString(l.name),41,Fe))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Le)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${m.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Oe)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("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,Ae))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,Be)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.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(fe.Legend,{key:`legend_${I.value}`,legendSet:y.value,config:de.value,onClickMarker:a[1]||(a[1]=({i:l})=>H(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,Re)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:y.value},void 0,!0)],512),e.createVNode(he._sfc_main,{show:g.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",De,[e.createVNode(me.default,{dataset:S.value,config:ue.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(be.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.openBlock(),e.createBlock(ye.DataTable,{key:`table_${A.value}`,colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>g.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,we))}},qe=Ce._export_sfc(Me,[["__scopeId","data-v-6194d3c4"]]);exports.default=qe;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-D-vy9N1v.cjs"),he=require("./useResponsive-B3TrDDIG.cjs"),Me=require("./Title-BaKZYHEx.cjs"),fe=require("./usePrinter-P4nLcXX-.cjs"),Se=require("./Tooltip-okAYzo5Y.cjs"),$e=require("./Legend-k2mcTp7z.cjs"),me=require("./Shape-COoEWeGM.cjs"),Ee=require("./DataTable-pVXaNplZ.cjs"),Le=require("./vue-ui-skeleton-DJhwv2oY.cjs"),ze=require("./vue-ui-accordion-btKAUUTu.cjs"),ge=require("./useNestedProp-B9yDavuy.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ae=["id"],Te=["xmlns","viewBox"],De={key:0},Pe=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],We={key:1},Oe=["points","fill","stroke-width","stroke-dasharray","stroke"],qe={key:0},Ie=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],Xe={key:1},Ye={key:2},je=["id"],Re=["stop-color"],Ge=["stop-color"],Ue=["id"],He=["stop-color"],Je=["stop-color"],Ke=["x","y","width","height","fill","stroke","stroke-width","rx"],Qe=["x","y","height","width","fill","stroke","stroke-width","rx"],Ze={key:0},et=["d","stroke","stroke-width"],tt=["d","stroke","stroke-width"],lt=["d","stroke","stroke-width"],at=["d","stroke","stroke-width"],ot={key:3,style:{"pointer-events":"none !important"}},st=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],rt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],nt=["x","y","font-size","fill","font-weight","text-anchor"],ut=["x","y","font-size","fill","font-weight"],it=["cx","cy","r","fill","stroke","stroke-width"],ct=["cx","cy","r","fill","stroke","stroke-width"],yt=["x","y","font-size","fill","font-weight","text-anchor"],vt={key:4},dt=["x","y","font-size","fill"],pt=["x","y","font-size","fill"],ht=["id","transform","font-size","font-weight","fill"],ft={key:5},mt=["x","y","font-size","fill"],gt=["x","y","font-size","fill"],kt=["font-size","font-weight","fill","x","y"],xt=["id"],bt=["x","y","width","height"],wt={key:6},Bt=["x1","x2","y1","y2","stroke-dasharray","stroke","stroke-width","clip-path"],_t=["x","y","fill","font-size","font-weight"],Ct={key:3,class:"vue-data-ui-watermark"},Nt=["onClick"],Mt={key:0,style:{width:"100%",display:"flex","align-items":"center","justify-content":"center"}},St={viewBox:"0 0 20 20",height:"20",width:"20",style:{overflow:"hidden",background:"transparent"}},$t={key:0},Et=["innerHTML"],Lt={__name:"vue-ui-scatter",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(ke,{expose:xe}){const C=ke,{vue_ui_scatter:be}=s.useConfig(),D=e.computed(()=>!!C.dataset&&C.dataset.length),g=e.ref(s.createUid()),we=e.ref(null),q=e.ref(!1),I=e.ref(""),U=e.ref(0),A=e.ref(null),H=e.ref(null),J=e.ref(null),K=e.ref(0),Q=e.ref(0),Z=e.ref(0),t=e.computed({get:()=>ee(),set:a=>a});function ee(){const a=ge.useNestedProp({userConfig:C.config,defaultConfig:be});return a.theme?{...ge.useNestedProp({userConfig:s.themes.vue_ui_scatter[a.theme]||C.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}e.watch(()=>C.config,a=>{t.value=ee(),te(),K.value+=1,Q.value+=1,Z.value+=1},{deep:!0});const P=e.ref(null);e.onMounted(()=>{te()});function te(){if(s.objectIsEmpty(C.dataset)&&s.error({componentName:"VueUiScatter",type:"dataset"}),t.value.responsive){const a=he.throttle(()=>{const{width:u,height:l}=he.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=u,k.value.height=l});P.value=new ResizeObserver(a),P.value.observe(A.value.parentNode)}}e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});const{isPrinting:le,isImaging:ae,generatePdf:oe,generateImage:se}=fe.usePrinter({elementId:`vue-ui-scatter_${g.value}`,fileName:t.value.style.title.text||"vue-ui-scatter"}),re=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),M=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),k=e.ref({height:t.value.style.layout.height,width:t.value.style.layout.width}),F=e.computed(()=>t.value.style.layout.marginalBars.show?t.value.style.layout.marginalBars.size+t.value.style.layout.marginalBars.offset:0),n=e.computed(()=>({top:t.value.style.layout.padding.top+F.value,right:k.value.width-t.value.style.layout.padding.right-F.value,bottom:k.value.height-t.value.style.layout.padding.bottom,left:t.value.style.layout.padding.left,height:k.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom-F.value,width:k.value.width-t.value.style.layout.padding.left-t.value.style.layout.padding.right-F.value})),y=e.computed(()=>{C.dataset.forEach((o,i)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["values"]}).forEach(h=>{s.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:h,index:i})}),o.values&&o.values.forEach((h,E)=>{s.getMissingDatasetAttributes({datasetObject:h,requiredAttributes:["x","y"]}).forEach(V=>{s.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:`values.${V}`,index:`${i} - ${E}`})})})});const a=Math.min(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),u=Math.max(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),l=Math.min(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y))),r=Math.max(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y)));return{xMin:a>=0?0:a,xMax:u,yMin:l>=0?0:l,yMax:r}}),v=e.computed(()=>({x:n.value.left+Math.abs(y.value.xMin)/(y.value.xMax+Math.abs(y.value.xMin))*n.value.width,y:n.value.bottom-Math.abs(y.value.yMin)/(y.value.yMax+Math.abs(y.value.yMin))*n.value.height})),$=e.computed(()=>C.dataset.map((a,u)=>{const l=`cluster_${g.value}_${u}`;return{...a,id:l,color:a.color?a.color:re.value[u]||s.palette[u]||s.palette[u%s.palette.length],opacity:p.value.includes(l)?.5:1,shape:a.shape??"circle",segregate:()=>ye(l),isSegregated:p.value.includes(l)}})),Be=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(()=>$.value.map((a,u)=>({...a,plots:a.values.map(l=>({x:n.value.left+(l.x+Math.abs(y.value.xMin))/(y.value.xMax+Math.abs(y.value.xMin))*n.value.width,y:n.value.bottom-(l.y+Math.abs(y.value.yMin))/(y.value.yMax+Math.abs(y.value.yMin))*n.value.height,v:{...l,name:l.name||""},clusterName:a.name,color:a.color?a.color:re.value[u]||s.palette[u]||s.palette[u%s.palette.length],id:`plot_${g.value}_${Math.random()}`,weight:l.weight??t.value.style.layout.plots.radius}))})).filter(a=>!p.value.includes(a.id))),x=e.computed(()=>X.value.map(a=>{const u=a.plots.reduce((d,L)=>d+L.x,0)/a.plots.length,l=a.plots.reduce((d,L)=>d+L.y,0)/a.plots.length;let r=0,o=0,i=0;for(const d of a.plots)r+=(d.x-u)*(d.y-l),o+=(d.x-u)**2,i+=(d.y-l)**2;const h=r/Math.sqrt(o*i),E=h*(Math.sqrt(i)/Math.sqrt(o)),V=l-E*u,_={x1:n.value.left,x2:n.value.right,y1:E*n.value.left+V,y2:E*n.value.right+V,coefficient:h},m=(_.y2-_.y1)/(_.x2-_.x1),w=_.y1-m*_.x1,N=Math.min(k.value.width-t.value.style.layout.padding.right,Math.max(t.value.style.layout.padding.left,(n.value.top-w)/m)),O={x:N,y:m*N+w<=t.value.style.layout.padding.top?n.value.top:m*N+w};return{...a,correlation:_,label:O,plots:a.plots.map(d=>{const L=(d.x+m*d.y-m*w)/(1+Math.pow(m,2)),j=(m*d.x+Math.pow(m,2)*d.y+w)/(1+Math.pow(m,2)),f=Math.sqrt(Math.pow(d.x-L,2)+Math.pow(d.y-j,2));return{...d,deviation:f,shape:a.shape,color:a.color}})}})),ne=e.computed(()=>Math.max(...x.value.flatMap(a=>a.plots.map(u=>Math.abs(u.deviation)))));function _e(){return x.value}function ue(a,u){const l=Array.isArray(a)?a.flatMap(f=>f.plots.map(z=>({x:z.x,y:z.y}))):a.plots.map(f=>({x:f.x,y:f.y}));let r=1/0,o=-1/0,i=1/0,h=-1/0;l.forEach(({x:f,y:z})=>{r=Math.min(r,f),o=Math.max(o,f),i=Math.min(i,z),h=Math.max(h,z)});const E=o-r,V=h-i,_=E/u,m=V/u,w=Array(u).fill(0),N=Array(u).fill(0);l.forEach(({x:f,y:z})=>{const R=Math.floor((f-r)/_),G=Math.floor((z-i)/m);w[R]||(w[R]=0),N[G]||(N[G]=0),w[R]+=1,N[G]+=1});const O=[],d=[];for(let f=0;f<u;f+=1)O.push(r+(f+.5)*_),d.push(i+(f+.5)*m);const L=Math.max(...w),j=Math.max(...N);return{x:w,y:N,avgX:O,avgY:d,maxX:L,maxY:j}}const S=e.computed(()=>t.value.style.layout.marginalBars.tranches),b=e.computed(()=>ue(X.value,S.value)),Ce=e.computed(()=>{const a=n.value.top-t.value.style.layout.marginalBars.offset,u=n.value.right+t.value.style.layout.marginalBars.offset;return X.value.map(l=>{const r=ue(l,S.value);return{coords:r,dX:s.createSmoothPath(r.avgX.map((o,i)=>({x:o,y:a-r.x[i]/r.maxX*t.value.style.layout.marginalBars.size}))),dY:s.createSmoothPath(r.avgY.map((o,i)=>({y:o,x:u+t.value.style.layout.marginalBars.size*r.y[i]/r.maxY}))),color:l.color,id:l.id}})}),B=e.ref(void 0),c=e.ref(null),Y=e.ref(null);function ie(a,u){B.value=a.id,c.value=a;let l="";Y.value={datapoint:a,seriesIndex:u,series:x.value,config:t.value};const r=t.value.style.tooltip.customFormat;s.isFunction(r)&&s.functionReturnsString(()=>r({datapoint:a,seriesIndex:u,series:x.value,config:t.value}))?I.value=r({datapoint:a,seriesIndex:u,series:x.value,config:t.value}):(a.clusterName&&(l+=`<div style="display:flex;gap:3px;align-items:center">${a.clusterName}</div>`),a.v.name&&(l+=`<div>${a.v.name}</div>`),l+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,l+=`<div>${t.value.style.layout.dataLabels.xAxis.name}: <b>${isNaN(a.v.x)?"-":s.applyDataLabel(t.value.style.layout.plots.selectors.labels.x.formatter,a.v.x,s.dataLabel({p:t.value.style.tooltip.prefix,v:a.v.x,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:a,seriesIndex:u})}</b></div>`,l+=`<div>${t.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(a.v.y)?"-":s.applyDataLabel(t.value.style.layout.plots.selectors.labels.y.formatter,a.v.y,s.dataLabel({p:t.value.style.tooltip.prefix,v:a.v.y,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:a,seriesIndex:u})}</b></div>`,l+=`${t.value.style.layout.plots.deviation.translation}: <b>${s.dataLabel({v:a.deviation,r:t.value.style.layout.plots.deviation.roundingValue})}</b>`,l+="</div>",I.value=`<div>${l}</div>`),q.value=!0}function ce(){q.value=!1,B.value=void 0,c.value=null}const p=e.ref([]);function ye(a){p.value.includes(a)?p.value=p.value.filter(u=>u!==a):p.value.length<C.dataset.length-1&&p.value.push(a)}function ve(){e.nextTick(()=>{const a=["",t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],u=x.value.map(o=>[o.name,o.correlation.coefficient,o.plots.length,o.plots.map(i=>i.v.x).reduce((i,h)=>i+h,0)/o.plots.length,o.plots.map(i=>i.v.y).reduce((i,h)=>i+h,0)/o.plots.length]),l=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([a]).concat(u),r=s.createCsvContent(l);s.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const W=e.computed(()=>{const a=[t.value.table.translations.series,t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],u=x.value.map(r=>[{shape:r.shape,content:r.name,color:r.color},Number((r.correlation.coefficient??0).toFixed(t.value.table.td.roundingValue)).toLocaleString(),r.plots.length.toLocaleString(),Number((r.plots.map(o=>o.v.x??0).reduce((o,i)=>o+i,0)/r.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString(),Number((r.plots.map(o=>o.v.y??0).reduce((o,i)=>o+i,0)/r.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString()]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:a,body:u,config:l,colNames:a}}),T=e.ref(!1);function Ne(a){T.value=a,U.value+=1}function de(){M.value.showTable=!M.value.showTable}function pe(){M.value.showTooltip=!M.value.showTooltip}return xe({getData:_e,generatePdf:oe,generateCsv:ve,generateImage:se,toggleTable:de,toggleTooltip:pe}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-scatter ${T.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"scatterChart",ref: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:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Me._sfc_main,{key:`title_${K.value}`,config:{title:{cy:"scatter-div-title",...t.value.style.title},subtitle:{cy:"scatter-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&D.value?(e.openBlock(),e.createBlock(fe.UserOptions,{ref_key:"details",ref:we,key:`user_options_${U.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(ae),isPrinting:e.unref(le),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:Ne,onGeneratePdf:e.unref(oe),onGenerateCsv:ve,onGenerateImage:e.unref(se),onToggleTable:de,onToggleTooltip:pe},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),D.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":T.value,"vue-data-ui-fulscreen--off":!T.value}),viewBox:`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[t.value.style.layout.axis.show?(e.openBlock(),e.createElementBlock("g",De,[e.createElementVNode("line",{x1:v.value.x,x2:v.value.x,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Pe),e.createElementVNode("line",{x1:n.value.left,x2:n.value.right,y1:v.value.y,y2:v.value.y,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Fe)])):e.createCommentVNode("",!0),t.value.style.layout.plots.giftWrap.show?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[l.plots.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(s.giftWrap)({series:l.plots}),fill:e.unref(s.setOpacity)(l.color,t.value.style.layout.plots.giftWrap.fillOpacity*100),"stroke-width":t.value.style.layout.plots.giftWrap.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.giftWrap.strokeDasharray,stroke:l.color,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Oe)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[!l.shape||l.shape==="circle"?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(o,i)=>(e.openBlock(),e.createElementBlock("circle",{cx:o.x,cy:o.y,r:B.value&&B.value===o.id?o.weight*2:o.weight,fill:e.unref(s.setOpacity)(l.color,t.value.style.layout.plots.opacity*100),stroke:t.value.style.layout.plots.stroke,"stroke-width":t.value.style.layout.plots.strokeWidth,onMouseover:h=>ie(o,r),onMouseleave:ce,style:e.normalizeStyle(`opacity:${B.value&&B.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/ne.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,44,Ie))),256))])):(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(o,i)=>(e.openBlock(),e.createBlock(me._sfc_main,{plot:{x:o.x,y:o.y},radius:B.value&&B.value===o.id?o.weight*2:o.weight,shape:l.shape,color:e.unref(s.setOpacity)(l.color,t.value.style.layout.plots.opacity*100),stroke:t.value.style.layout.plots.stroke,strokeWidth:t.value.style.layout.plots.strokeWidth,onMouseover:h=>ie(o,r),onMouseleave:ce,style:e.normalizeStyle(`opacity:${B.value&&B.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/ne.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,8,["plot","radius","shape","color","stroke","strokeWidth","onMouseover","style"]))),256))]))]))),256)),t.value.style.layout.marginalBars.show?(e.openBlock(),e.createElementBlock("g",Ye,[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,Re),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,Ge)],8,je),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,He),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.marginalBars.fill},null,8,Je)],8,Ue)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.x,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[l&&b.value.avgX[r]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:b.value.avgX[r]-n.value.width/S.value/2,y:n.value.top-t.value.style.layout.marginalBars.offset-l/b.value.maxX*t.value.style.layout.marginalBars.size,width:n.value.width/S.value<=0?1e-4:n.value.width/S.value,height:l/b.value.maxX*t.value.style.layout.marginalBars.size<=0?1e-4:l/b.value.maxX*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_x_${g.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,Ke)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.y,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[l&&b.value.avgY[r]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:n.value.right+t.value.style.layout.marginalBars.offset,y:b.value.avgY[r]-n.value.height/S.value/2,height:n.value.height/S.value<=0?1e-4:n.value.height/S.value,width:l/b.value.maxY*t.value.style.layout.marginalBars.size<=0?1e-4:l/b.value.maxY*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_y_${g.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,Qe)):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.marginalBars.showLines?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${l.dX}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,et)),p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${l.dX}`,stroke:l.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,tt)),p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${l.dY}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,lt)),p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${l.dY}`,stroke:l.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,at))],64))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.value&&t.value.style.layout.plots.selectors.show?(e.openBlock(),e.createElementBlock("g",ot,[e.createElementVNode("line",{x1:v.value.x,x2:c.value.x,y1:c.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,st),e.createElementVNode("line",{x1:c.value.x,x2:c.value.x,y1:v.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,rt),e.createElementVNode("text",{x:v.value.x+(c.value.x>v.value.x?-6:6),y:c.value.y+t.value.style.layout.plots.selectors.labels.fontSize/3,"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x>v.value.x?"end":"start"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(c.value.v.y),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(c.value.v.y),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,nt),e.createElementVNode("text",{x:c.value.x,y:v.value.y+(c.value.y>v.value.y?-6:t.value.style.layout.plots.selectors.labels.fontSize+6),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(c.value.v.x),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(c.value.v.x),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,ut),e.createElementVNode("circle",{cx:v.value.x,cy:c.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,it),e.createElementVNode("circle",{cx:c.value.x,cy:v.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,ct),t.value.style.layout.plots.selectors.labels.showName?(e.openBlock(),e.createElementBlock("text",{key:0,x:c.value.x,y:c.value.y+(c.value.y<v.value.y?-t.value.style.layout.plots.selectors.labels.fontSize/2:t.value.style.layout.plots.selectors.labels.fontSize),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x<n.value.left+100?"start":c.value.x>n.value.right-100?"end":c.value.x>v.value.x?"start":"end"},e.toDisplayString(c.value.v.name),9,yt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",vt,[e.createElementVNode("text",{x:n.value.left-5,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,e.unref(s.checkNaN)(y.value.xMin),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.xMin),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,dt),e.createElementVNode("text",{x:n.value.right+3,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"start","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,e.unref(s.checkNaN)(y.value.xMax),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.xMax),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,pt),e.createElementVNode("text",{id:`vue-ui-scatter-xAxis-label-${g.value}`,transform:`translate(${t.value.style.layout.dataLabels.xAxis.fontSize*2}, ${n.value.top+n.value.height/2}), rotate(-90)`,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.name),9,ht)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",ft,[e.createElementVNode("text",{x:v.value.x,y:n.value.bottom+t.value.style.layout.dataLabels.yAxis.fontSize+3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(y.value.yMin),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.yMin),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,mt),e.createElementVNode("text",{x:v.value.x,y:n.value.top-t.value.style.layout.dataLabels.yAxis.fontSize/2,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(y.value.yMax),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.yMax),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,gt),e.createElementVNode("text",{"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.yAxis.color,x:n.value.left+n.value.width/2,y:n.value.bottom+8+t.value.style.layout.dataLabels.yAxis.fontSize*2},e.toDisplayString(t.value.style.layout.dataLabels.yAxis.name),9,kt)])):e.createCommentVNode("",!0),e.createElementVNode("clipPath",{id:`clip_path_${g.value}`},[e.createElementVNode("rect",{x:n.value.left,y:n.value.top,width:n.value.width<=0?1e-4:n.value.width,height:n.value.height<=0?1e-4:n.value.height},null,8,bt)],8,xt),t.value.style.layout.correlation.show?(e.openBlock(),e.createElementBlock("g",wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:l.correlation.x1,x2:l.correlation.x2,y1:l.correlation.y1,y2:l.correlation.y2,"stroke-dasharray":t.value.style.layout.correlation.strokeDasharray,stroke:l.color,"stroke-width":t.value.style.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${g.value})`},null,8,Bt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.correlation.label.show?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.label.x,y:l.label.y,fill:t.value.style.layout.correlation.label.useSerieColor?l.color:t.value.style.layout.correlation.label.color,"font-size":t.value.style.layout.correlation.label.fontSize,"font-weight":t.value.style.layout.correlation.label.bold?"bold":"normal"},e.toDisplayString(e.unref(s.dataLabel)({v:e.unref(s.checkNaN)(l.correlation.coefficient),r:t.value.style.layout.correlation.label.roundingValue})),9,_t)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:k.value},void 0,!0)],14,Te)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ct,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(le)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),D.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Le.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:`legend_${Z.value}`,legendSet:$.value,config:Be.value,onClickMarker:u[0]||(u[0]=({legend:l})=>ye(l.id))},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{onClick:r=>l.segregate(),style:e.normalizeStyle(`opacity:${p.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name),13,Nt)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:$.value},void 0,!0)],512),e.createVNode(Se._sfc_main,{show:M.value.showTooltip&&q.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:I.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$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",Mt,[(e.openBlock(),e.createElementBlock("svg",St,[e.createVNode(me._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"]),D.value?(e.openBlock(),e.createBlock(ze.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.openBlock(),e.createBlock(Ee.DataTable,{key:`table_${Q.value}`,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:u[1]||(u[1]=l=>M.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[l.shape?(e.openBlock(),e.createElementBlock("div",$t,[e.createElementVNode("span",null,e.toDisplayString(l.content),1)])):(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:l},null,8,Et))]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ae))}},zt=Ve._export_sfc(Lt,[["__scopeId","data-v-b40b43e2"]]);exports.default=zt;
@@ -1,6 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-D-vy9N1v.cjs"),we=require("./useNestedProp-B9yDavuy.cjs"),Ce=require("./useResponsive-B3TrDDIG.cjs"),Be=require("./usePrinter-P4nLcXX-.cjs"),We=require("./Slicer-DCyxUSsn.cjs"),Ue=require("./Tooltip-okAYzo5Y.cjs"),Xe=require("./Title-BaKZYHEx.cjs"),Ye=require("./Legend-k2mcTp7z.cjs"),Ge=require("./vue-ui-accordion-btKAUUTu.cjs"),Je=require("./DataTable-pVXaNplZ.cjs"),Ze=require("./vue-ui-skeleton-DJhwv2oY.cjs"),Ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Qe=["id"],je=["xmlns","viewBox"],et={key:0},tt=["id"],at=["stop-color"],lt=["stop-color"],ot=["stop-color"],rt=["x1","x2","y1","y2","stroke"],st=["x1","x2","y1","y2","stroke"],nt=["x1","x2","y1","y2","stroke"],it=["x1","x2","y1","y2","stroke"],ut=["x","y","height","rx","width","fill","stroke","stroke-width"],ct=["x","y","width","rx","height","fill","stroke","stroke-width"],dt=["x1","x2","y1","y2","stroke","stroke-width"],vt=["x1","x2","y1","y2","stroke","stroke-width"],ht=["x","y","font-size","fill","font-weight"],gt=["transform","font-size","fill","font-weight"],yt=["x","y","font-size","fill","font-weight"],mt={key:0},bt=["x","y","font-size","font-weight","fill"],pt=["x","y","font-size","fill","font-weight"],ft={key:0},kt=["x","y","font-size","font-weight","fill"],xt=["x1","x2","y1","y2","stroke"],wt=["x","y","font-size","font-weight","fill"],Ct=["x1","x2","y1","y2","stroke"],Bt=["font-size","font-weight","fill","text-anchor","transform"],Lt=["text-anchor","font-size","font-weight","fill","transform"],St=["font-size","font-weight","fill","x","y"],zt=["x","y","width","height","onClick","onMouseenter","fill"],_t=["x","y","width","height","onClick","onMouseenter","fill"],Nt={key:3,class:"vue-data-ui-watermark"},Et=["onClick"],Mt=["innerHTML"],$t={__name:"vue-ui-stackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint","selectLegend"],setup(G,{expose:Le,emit:J}){const y=G,{vue_ui_stackbar:Se}=c.useConfig(),E=e.computed({get(){return!!y.dataset&&y.dataset.length},set(l){return l}}),M=e.ref(null),W=e.ref(c.createUid()),O=e.ref(!1),Z=e.ref(null),U=e.ref(""),p=e.ref([]),K=e.ref(0),Q=e.ref(null),j=e.ref(null),ee=e.ref(null),te=e.ref(0),X=e.ref(!1),$=e.ref(null),T=e.ref(!1),ze=e.ref(0),_e=e.ref(0),Ne=e.ref(0);e.onMounted(()=>{Y()});const t=e.computed({get:()=>ae(),set:l=>l});function ae(){const l=we.useNestedProp({userConfig:y.config,defaultConfig:Se});let r={};return l.theme?r={...we.useNestedProp({userConfig:c.themes.vue_ui_stackbar[l.theme]||y.config,defaultConfig:l}),customPalette:c.themePalettes[l.theme]||c.palette}:r=l,y.config&&c.hasDeepProperty(y.config,"style.chart.grid.scale.scaleMin")?r.style.chart.grid.scale.scaleMin=y.config.style.chart.grid.scale.scaleMin:r.style.chart.grid.scale.scaleMin=null,y.config&&c.hasDeepProperty(y.config,"style.chart.grid.scale.scaleMax")?r.style.chart.grid.scale.scaleMax=y.config.style.chart.grid.scale.scaleMax:r.style.chart.grid.scale.scaleMax=null,r}e.watch(()=>y.config,l=>{t.value=ae(),Y(),ze.value+=1,_e.value+=1,Ne.value+=1},{deep:!0}),e.watch(()=>y.dataset,l=>{ue()},{deep:!0});const b=e.ref({dataLabels:{show:t.value.style.chart.bars.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),{isPrinting:le,isImaging:oe,generatePdf:re,generateImage:se}=Be.usePrinter({elementId:`stackbar_${W.value}`,fileName:t.value.style.chart.title.text||"vue-ui-stackbar"}),D=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,paddingRatio:{top:t.value.style.chart.padding.top/t.value.style.chart.height,right:t.value.style.chart.padding.right/t.value.style.chart.width,bottom:t.value.style.chart.padding.bottom/t.value.style.chart.height,left:t.value.style.chart.padding.left/t.value.style.chart.width}}),Ee=e.computed(()=>c.convertCustomPalette(t.value.customPalette)),ne=e.ref(null),ie=e.ref(null);e.onMounted(()=>{Y()});function Y(){if(c.objectIsEmpty(y.dataset)?c.error({componentName:"VueUiStackbar",type:"dataset"}):y.dataset.forEach((l,r)=>{c.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{E.value=!1,c.error({componentName:"VueUiStackbar",type:"datasetSerieAttribute",property:a,index:r})})}),setTimeout(()=>{T.value=!0},10),t.value.responsive){const l=Ce.throttle(()=>{T.value=!1;const{width:r,height:a}=Ce.useResponsive({chart:M.value,title:t.value.style.chart.title.text?Q.value:null,legend:t.value.style.chart.legend.show?j.value:null,slicer:t.value.style.chart.zoom.show&&L.value>1?ee.value:null});D.value.width=r,D.value.height=a,clearTimeout(ie.value),ie.value=setTimeout(()=>{T.value=!0},10)});ne.value=new ResizeObserver(l),ne.value.observe(M.value.parentNode)}}const s=e.computed(()=>{const{height:l,width:r}=D.value,{right:a}=D.value.paddingRatio,o=t.value.style.chart.padding.top,n=r-r*a,i=l-t.value.style.chart.padding.bottom,m=t.value.style.chart.padding.left,S=r-m-r*a,z=l-o-t.value.style.chart.padding.bottom;return{chartHeight:l,chartWidth:r,top:o,right:n,bottom:i,left:m,width:S,height:z<0?0:z}}),B=e.computed(()=>y.dataset.map((l,r)=>{const a=c.convertColorToHex(l.color)||Ee.value[r]||c.palette[r]||c.palette[r%c.palette.length];return{...l,series:JSON.parse(JSON.stringify(l.series)).map(o=>t.value.style.chart.bars.distributed?Math.abs(o):o),signedSeries:l.series.map(o=>o>=0?1:-1),absoluteIndex:r,id:c.createUid(),color:a}})),L=e.computed(()=>Math.max(...B.value.filter(l=>!p.value.includes(l.id)).map(l=>l.series.length))),u=e.ref({start:0,end:Math.max(...y.dataset.map(l=>l.series.length))});function ue(){u.value={start:0,end:Math.max(...y.dataset.map(l=>l.series.length))},te.value+=1}const d=e.computed(()=>{let l;return t.value.orientation==="vertical"?l=s.value.width/(u.value.end-u.value.start):l=s.value.height/(u.value.end-u.value.start),l<=0?0:l}),V=e.computed(()=>c.sumSeries(B.value.filter(l=>!p.value.includes(l.id))).slice(u.value.start,u.value.end)),Me=e.computed(()=>c.sumSeries(B.value.filter(l=>!p.value.includes(l.id)).map(l=>({...l,series:l.series.map((r,a)=>l.signedSeries[a]===-1&&r>=0?-r:r)}))).slice(u.value.start,u.value.end)),I=e.computed(()=>{const l=B.value.filter(r=>!p.value.includes(r.id));return{positive:c.sumSeries(l.map(r=>({...r,series:r.series.slice(u.value.start,u.value.end).map(a=>a>=0?a:0)}))),negative:c.sumSeries(l.map(r=>({...r,series:r.series.slice(u.value.start,u.value.end).map(a=>a<0?a:0)})))}}),w=e.computed(()=>{const l=t.value.style.chart.grid.scale.scaleMax!==null&&!t.value.style.chart.bars.distributed?t.value.style.chart.grid.scale.scaleMax:Math.max(...I.value.positive),r=Math.min(...I.value.negative),a=t.value.style.chart.grid.scale.scaleMin!==null&&!t.value.style.chart.bars.distributed?t.value.style.chart.grid.scale.scaleMin:[-1/0,1/0,NaN,void 0,null].includes(r)?0:r,o=!t.value.style.chart.bars.distributed&&(t.value.style.chart.grid.scale.scaleMax!==null||t.value.style.chart.grid.scale.scaleMin!==null)?c.calculateNiceScaleWithExactExtremes(a>0?0:a,l<0?0:l,t.value.style.chart.grid.scale.ticks):c.calculateNiceScale(a>0?0:a,l<0?0:l,t.value.style.chart.grid.scale.ticks);return o.ticks.map(n=>({zero:s.value.bottom-s.value.height*(Math.abs(o.min)/(o.max+Math.abs(o.min))),y:s.value.bottom-s.value.height*((n+Math.abs(o.min))/(o.max+Math.abs(o.min))),x:s.value.left-8,horizontal_zero:s.value.left+s.value.width*(Math.abs(o.min)/(o.max+Math.abs(o.min))),horizontal_x:s.value.left+s.value.width*((n+Math.abs(o.min))/(o.max+Math.abs(o.min))),horizontal_y:s.value.bottom-8,value:n}))}),F=e.computed(()=>t.value.style.chart.grid.x.timeLabels.values.slice(u.value.start,u.value.end)),g=e.computed(()=>{if(!E.value)return[];let l=Array(L.value).fill(0),r=Array(L.value).fill(0),a=Array(L.value).fill(0),o=Array(L.value).fill(0);const n=Math.max(...I.value.positive)||0,i=Math.min(...I.value.negative),m=[-1/0,1/0,NaN,void 0,null].includes(i)?0:i,S=!t.value.style.chart.bars.distributed&&(t.value.style.chart.grid.scale.scaleMax!==null||t.value.style.chart.grid.scale.scaleMin!==null)?c.calculateNiceScaleWithExactExtremes(t.value.style.chart.grid.scale.scaleMin!==null?t.value.style.chart.grid.scale.scaleMin:m>0?0:m,t.value.style.chart.grid.scale.scaleMax!==null?t.value.style.chart.grid.scale.scaleMax:n<0?0:n,t.value.style.chart.grid.scale.ticks):c.calculateNiceScale(t.value.style.chart.grid.scale.scaleMin!==null?t.value.style.chart.grid.scale.scaleMin:m>0?0:m,t.value.style.chart.grid.scale.scaleMax!==null?t.value.style.chart.grid.scale.scaleMax:n<0?0:n,t.value.style.chart.grid.scale.ticks),{min:z,max:P}=S,_=P+(z>=0?0:Math.abs(z))||1,f=s.value.height,q=s.value.width,ke=w.value[0]?w.value[0].zero:s.value.bottom,xe=w.value[0]?w.value[0].horizontal_zero:s.value.left;return B.value.filter(R=>!p.value.includes(R.id)).map(R=>{const C=R.series.slice(u.value.start,u.value.end),Pe=R.signedSeries.slice(u.value.start,u.value.end),Re=C.map((v,h)=>s.value.left+d.value*h+d.value*t.value.style.chart.bars.gapRatio/4),Oe=C.map((v,h)=>s.value.top+d.value*h+d.value*t.value.style.chart.bars.gapRatio/4),De=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;let N,x;return v>0?(x=f*k,N=ke-x-l[h],l[h]+=x):(x=f*k,N=ke+a[h],a[h]+=Math.abs(x)),N}),Ie=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;let N,x;return v>0?(x=q*k,N=xe+r[h],r[h]+=x):(x=q*k,N=xe-Math.abs(x)-o[h],o[h]+=Math.abs(x)),N}),Ae=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;return v>0?f*k:f*Math.abs(k)}),He=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;return v>0?q*k:q*Math.abs(k)}),qe=C.map(v=>Math.abs(v)).reduce((v,h)=>v+h,0);return{...R,proportions:C.map((v,h)=>t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/qe),series:C,signedSeries:Pe,x:Re,y:De,height:Ae,horizontal_width:He,horizontal_y:Oe,horizontal_x:Ie}})}),ce=e.computed(()=>Me.value.map((l,r)=>({value:l,sign:l>=0?1:-1})));function A(l,r,a,o,n){const i=n===-1&&l>=0?-l:l;return c.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,i,c.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:i,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:r,seriesIndex:a,datapointIndex:o})}function de(l,r,a,o){return c.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,l,c.dataLabel({v:l,s:"%",r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:r,seriesIndex:a,datapointIndex:o})}function ve(l){const r=JSON.parse(JSON.stringify(g.value)).map(a=>({name:a.name,value:a.series[l]===0?0:a.series[l]||null,proportion:a.proportions[l]||null,color:a.color,id:a.id}));J("selectDatapoint",{datapoint:r,period:F.value[l]})}function he(l){$.value=l,O.value=!0;const r=t.value.style.chart.tooltip.customFormat,a=JSON.parse(JSON.stringify(g.value)).map(n=>({name:n.name,value:n.series[l]===0?0:(n.signedSeries[l]===-1&&n.series[l]>=0?-n.series[l]:n.series[l])||null,proportion:n.proportions[l]||null,color:n.color,id:n.id})),o=a.map(n=>Math.abs(n.value)).reduce((n,i)=>n+i,0);if(c.isFunction(r)&&c.functionReturnsString(()=>r({seriesIndex:l,datapoint:a,series:g.value,config:t.value})))U.value=r({seriesIndex:l,datapoint:a,series:g.value,config:t.value});else{const{showValue:n,showPercentage:i,borderColor:m,roundingValue:S,roundingPercentage:z}=t.value.style.chart.tooltip;let P="";F.value[l]&&(P+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${m};padding-bottom:6px;margin-bottom:3px;">${F.value[l]}</div>`);const _=[n&&i?"(":"",n&&i?")":""];a.reverse().forEach(f=>{P+=`
2
- <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
3
- <svg viewBox="0 0 12 12" height="14" width="14"><rect rx="1" x="0" y="0" height="12" width="12" stroke="none" fill="${t.value.style.chart.bars.gradient.show?`url(#gradient_${f.id})`:f.color}"/></svg>
4
- ${f.name}${n||i?":":""} ${n?c.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:f.value,s:t.value.style.chart.bars.dataLabels.suffix,r:S}):""} ${_[0]}${i?c.dataLabel({v:isNaN(f.value/o)?0:Math.abs(f.value)/o*100,s:"%",r:z}):""}${_[1]}
5
- </div>
6
- `}),U.value=`<div>${P}</div>`}}function $e(l){X.value=l,K.value+=1}function ge(){b.value.showTable=!b.value.showTable}function ye(){b.value.dataLabels.show=!b.value.dataLabels.show}function me(){b.value.showTooltip=!b.value.showTooltip}function Te(){return g.value}const be=e.computed(()=>{if(g.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const l=g.value.map(({name:a,color:o})=>({label:a,color:o})),r=[];for(let a=u.value.start;a<u.value.end;a+=1){const o=[t.value.style.chart.grid.x.timeLabels.values[a]||a+1];B.value.forEach(n=>{o.push(Number((n.series[a]||0).toFixed(t.value.table.td.roundingValue)))}),r.push(o)}return{head:l,body:r}});function pe(){const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=["",...be.value.head.map(i=>i.label)],a=be.value.body,o=l.concat([r]).concat(a),n=c.createCsvContent(o);c.downloadCsv({csvContent:n,title:t.value.style.chart.title.text||"vue-ui-stackbar"})}const H=e.computed(()=>{const l=[""].concat(g.value.map(n=>n.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');let r=[];for(let n=0;n<L.value;n+=1){const i=g.value.map(m=>m.series[n]??0).reduce((m,S)=>m+S,0);r.push([t.value.style.chart.grid.x.timeLabels.values.slice(u.value.start,u.value.end)[n]??n+1].concat(g.value.map(m=>(m.series[n]??0).toFixed(t.value.table.td.roundingValue))).concat((i??0).toFixed(t.value.table.td.roundingValue)))}const a={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},o=[t.value.table.columnNames.period].concat(g.value.map(n=>n.name)).concat(t.value.table.columnNames.total);return{head:l,body:r.slice(0,u.value.end-u.value.start),config:a,colNames:o}});function Ve(l,r){if(J("selectLegend",g.value.find(a=>a.absoluteIndex===l)),p.value.includes(r.id))p.value=p.value.filter(a=>a!==r.id);else{if(p.value.length===B.value.length-1)return;p.value.push(r.id)}}const fe=e.computed(()=>B.value.map((l,r)=>({...l,shape:"square"})).map(l=>({...l,opacity:p.value.includes(l.id)?.5:1,segregate:()=>Ve(l.absoluteIndex,l),isSegregated:p.value.includes(l.id)}))),Fe=e.computed(()=>({cy:"stackbar-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":""}));return Le({getData:Te,generatePdf:re,generateCsv:pe,generateImage:se,toggleTable:ge,toggleLabels:ye,toggleTooltip:me}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{id:`stackbar_${W.value}`,ref_key:"stackbarChart",ref:M,class:e.normalizeClass({"vue-ui-stackbar":!0,"vue-data-ui-wrapper-fullscreen":X.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`)},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:Q,style:"width:100%;background:transparent;padding-bottom:24px"},[e.createVNode(Xe._sfc_main,{config:{title:{cy:"stackbar-title",...t.value.style.chart.title},subtitle:{cy:"stackbar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&E.value?(e.openBlock(),e.createBlock(Be.UserOptions,{ref:"details",key:`user_option_${K.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(le),isImaging:e.unref(oe),uid:W.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:X.value,chartElement:M.value,isTooltip:b.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},onToggleFullscreen:$e,onGeneratePdf:e.unref(re),onGenerateCsv:pe,onGenerateImage:e.unref(se),onToggleTable:ge,onToggleLabels:ye,onToggleTooltip:me},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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","isTooltip","titles","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(c.XMLNS),viewBox:`0 0 ${s.value.chartWidth<=0?10:s.value.chartWidth} ${s.value.chartHeight<=0?10:s.value.chartHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[t.value.style.chart.bars.gradient.show?(e.openBlock(),e.createElementBlock("defs",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,o)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`gradient_${a.id}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,at),e.createElementVNode("stop",{offset:"61.8%","stop-color":e.unref(c.lightenHexColor)(a.color,t.value.style.chart.bars.gradient.intensity/100)},null,8,lt),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,ot)],8,tt))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left,x2:s.value.right,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,rt))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(u.value.end-u.value.start+1,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left,x2:s.value.right,y1:s.value.top+d.value*o,y2:s.value.top+d.value*o,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,st))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.showVerticalLines&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(u.value.end-u.value.start+1,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left+d.value*o,x2:s.value.left+d.value*o,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,nt))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:4},e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:a.horizontal_x,x2:a.horizontal_x,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,it))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.x,(n,i)=>(e.openBlock(),e.createElementBlock("rect",{x:n,y:a.y[i]<0?0:a.y[i],height:a.height[i]<0?1e-4:a.height[i],rx:t.value.style.chart.bars.borderRadius>a.height[i]/2?(a.height[i]<0?0:a.height[i])/2:t.value.style.chart.bars.borderRadius,width:d.value*(1-t.value.style.chart.bars.gapRatio/2),fill:t.value.style.chart.bars.gradient.show?`url(#gradient_${a.id})`:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.bars.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.useCssAnimation,"vue-data-ui-bar-transition":T.value})},null,10,ut))),256)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(a.horizontal_x,(n,i)=>(e.openBlock(),e.createElementBlock("rect",{x:n,y:a.horizontal_y[i]<0?0:a.horizontal_y[i],width:a.horizontal_width[i]<0?1e-4:a.horizontal_width[i],rx:t.value.style.chart.bars.borderRadius>a.height[i]/2?(a.height[i]<0?0:a.height[i])/2:t.value.style.chart.bars.borderRadius,height:d.value*(1-t.value.style.chart.bars.gapRatio/2),fill:t.value.style.chart.bars.gradient.show?`url(#gradient_${a.id})`:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.bars.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.useCssAnimation,"vue-data-ui-bar-transition":T.value})},null,10,ct))),256))]))),256)),t.value.style.chart.grid.x.showAxis?(e.openBlock(),e.createElementBlock("line",{key:5,x1:s.value.left,x2:s.value.right,y1:s.value.bottom,y2:s.value.bottom,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":t.value.style.chart.grid.x.axisThickness,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,dt)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.showAxis&&!t.value.style.chart.bars.distributed?(e.openBlock(),e.createElementBlock("line",{key:6,x1:s.value.left,x2:s.value.left,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":t.value.style.chart.grid.y.axisThickness,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,vt)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.axisName.show&&t.value.style.chart.grid.x.axisName.text?(e.openBlock(),e.createElementBlock("text",{key:7,x:s.value.left+s.value.width/2,y:s.value.chartHeight+t.value.style.chart.grid.x.axisName.offsetY,"font-size":t.value.style.chart.grid.x.axisName.fontSize,fill:t.value.style.chart.grid.x.axisName.color,"font-weight":t.value.style.chart.grid.x.axisName.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.grid.x.axisName.text),9,ht)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisName.show&&t.value.style.chart.grid.y.axisName.text?(e.openBlock(),e.createElementBlock("text",{key:8,transform:`translate(${t.value.style.chart.grid.y.axisName.fontSize+t.value.style.chart.grid.y.axisName.offsetX}, ${s.value.top+s.value.height/2}) rotate(-90)`,"font-size":t.value.style.chart.grid.y.axisName.fontSize,fill:t.value.style.chart.grid.y.axisName.color,"font-weight":t.value.style.chart.grid.y.axisName.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.grid.y.axisName.text),9,gt)):e.createCommentVNode("",!0),b.value.dataLabels.show&&t.value.orientation==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:9},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.x,(n,i)=>(e.openBlock(),e.createElementBlock("text",{x:n+d.value*(1-t.value.style.chart.bars.gapRatio/2)/2,y:a.y[i]+a.height[i]/2+t.value.style.chart.bars.dataLabels.fontSize/3,"font-size":t.value.style.chart.bars.dataLabels.fontSize,fill:t.value.style.chart.bars.dataLabels.adaptColorToBackground?e.unref(c.adaptColorToBackground)(a.color):t.value.style.chart.bars.dataLabels.color,"font-weight":t.value.style.chart.bars.dataLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.bars.showDistributedPercentage&&t.value.style.chart.bars.distributed?de(a.proportions[i]*100,a,o,i):A(a.series[i],a,o,i,a.signedSeries[i])),9,yt))),256))]))),256)),t.value.style.chart.bars.totalValues.show&&g.value.length>1?(e.openBlock(),e.createElementBlock("g",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ce.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{x:s.value.left+d.value*o+d.value/2,y:s.value.top-t.value.style.chart.bars.totalValues.fontSize/3,"text-anchor":"middle","font-size":t.value.style.chart.bars.totalValues.fontSize,"font-weight":t.value.style.chart.bars.totalValues.bold?"bold":"normal",fill:t.value.style.chart.bars.totalValues.color},e.toDisplayString(A(a.value,a,o,a.sign)),9,bt))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),b.value.dataLabels.show&&t.value.orientation==="horizontal"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.horizontal_x,(n,i)=>(e.openBlock(),e.createElementBlock("text",{x:n+(a.horizontal_width[i]<0?1e-4:a.horizontal_width[i])/2,y:a.horizontal_y[i]+d.value*(1-t.value.style.chart.bars.gapRatio/2)/2+t.value.style.chart.bars.dataLabels.fontSize/3,"font-size":t.value.style.chart.bars.dataLabels.fontSize,fill:t.value.style.chart.bars.dataLabels.adaptColorToBackground?e.unref(c.adaptColorToBackground)(a.color):t.value.style.chart.bars.dataLabels.color,"font-weight":t.value.style.chart.bars.dataLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.bars.showDistributedPercentage&&t.value.style.chart.bars.distributed?de(a.proportions[i]*100,a,o,i):A(a.series[i],a,o,i,a.signedSeries[i])),9,pt))),256))]))),256)),t.value.style.chart.bars.totalValues.show&&g.value.length>1?(e.openBlock(),e.createElementBlock("g",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ce.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{x:s.value.right+t.value.style.chart.bars.totalValues.fontSize/3,y:s.value.top+d.value*o+d.value/2,"text-anchor":"start","font-size":t.value.style.chart.bars.totalValues.fontSize,"font-weight":t.value.style.chart.bars.totalValues.bold?"bold":"normal",fill:t.value.style.chart.bars.totalValues.color},e.toDisplayString(A(a.value,a,o,a.sign)),9,kt))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisLabels.show&&!t.value.style.chart.bars.distributed&&t.value.orientation==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:11},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left,x2:s.value.left-6,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1},null,8,xt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{x:a.x,y:a.y+t.value.style.chart.grid.y.axisLabels.fontSize/3,"font-size":t.value.style.chart.grid.y.axisLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(c.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a.value,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.grid.y.axisLabels.rounding})),9,wt))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisLabels.show&&!t.value.style.chart.bars.distributed&&t.value.orientation==="horizontal"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:12},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:a.horizontal_x,x2:a.horizontal_x,y1:s.value.bottom,y2:s.value.bottom+6,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,Ct))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.style.chart.grid.x.timeLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,"text-anchor":t.value.style.chart.grid.x.timeLabels.rotation>0?"start":t.value.style.chart.grid.x.timeLabels.rotation<0?"end":"middle",transform:`translate(${a.horizontal_x}, ${s.value.bottom+t.value.style.chart.grid.x.timeLabels.fontSize*1.3+t.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${t.value.style.chart.grid.x.timeLabels.rotation})`},e.toDisplayString(e.unref(c.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a.value,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.grid.y.axisLabels.rounding})),9,Bt))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.timeLabels.show&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:13},e.renderList(F.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":t.value.style.chart.grid.x.timeLabels.rotation>0?"start":t.value.style.chart.grid.x.timeLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.grid.x.timeLabels.fontSize,"font-weight":t.value.style.chart.grid.x.timeLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.x.timeLabels.color,transform:`translate(${s.value.left+d.value*o+d.value/2}, ${s.value.bottom+t.value.style.chart.grid.x.timeLabels.fontSize*1.3+t.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${t.value.style.chart.grid.x.timeLabels.rotation})`},e.toDisplayString(a),9,Lt))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.timeLabels.show&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:14},e.renderList(F.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"end","font-size":t.value.style.chart.grid.y.axisLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,x:s.value.left-8,y:s.value.top+d.value*o+d.value/2+t.value.style.chart.grid.y.axisLabels.fontSize/3},e.toDisplayString(a),9,St))),256)):e.createCommentVNode("",!0),b.value.showTooltip&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:15},e.renderList(u.value.end-u.value.start,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left+o*d.value,y:s.value.top,width:d.value,height:s.value.height<0?0:s.value.height,onClick:n=>ve(o),onMouseenter:n=>he(o),onMouseleave:r[0]||(r[0]=n=>{$.value=null,O.value=!1}),fill:o===$.value?t.value.style.chart.highlighter.color:"transparent",style:e.normalizeStyle({opacity:t.value.style.chart.highlighter.opacity/100})},null,44,zt))),256)):e.createCommentVNode("",!0),b.value.showTooltip&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:16},e.renderList(u.value.end-u.value.start,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left,y:s.value.top+o*d.value,width:s.value.width<0?0:s.value.width,height:d.value,onClick:n=>ve(o),onMouseenter:n=>he(o),onMouseleave:r[1]||(r[1]=n=>{$.value=null,O.value=!1}),fill:o===$.value?t.value.style.chart.highlighter.color:"transparent",style:e.normalizeStyle({opacity:t.value.style.chart.highlighter.opacity/100})},null,44,_t))),256)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",e.normalizeProps(e.guardReactiveProps({...s.value})),void 0,!0)],12,je)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Nt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(le)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),E.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ze.default,{key:4,config:{type:"bar",style:{backgroundColor:t.value.style.chart.backgroundColor,bar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartSlicer",ref:ee,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&L.value>1?(e.openBlock(),e.createBlock(We.Slicer,{key:`slicer_${te.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.x.timeLabels.values[u.value.start]?t.value.style.chart.grid.x.timeLabels.values[u.value.start]:"",labelRight:t.value.style.chart.grid.x.timeLabels.values[u.value.end-1]?t.value.style.chart.grid.x.timeLabels.values[u.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:Math.max(...G.dataset.map(a=>a.series.length)),min:0,valueStart:u.value.start,valueEnd:u.value.end,start:u.value.start,"onUpdate:start":r[2]||(r[2]=a=>u.value.start=a),end:u.value.end,"onUpdate:end":r[3]||(r[3]=a=>u.value.end=a),onReset:ue},{"reset-action":e.withCtx(({reset:a})=>[e.renderSlot(l.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:a})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0)],4),e.createVNode(Ue._sfc_main,{show:b.value.showTooltip&&O.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:M.value,content:U.value,isCustom:e.unref(c.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartLegend",ref:j},[t.value.style.chart.legend.show&&E.value?(e.openBlock(),e.createBlock(Ye.Legend,{key:0,legendSet:fe.value,config:Fe.value,onClickMarker:r[4]||(r[4]=({legend:a})=>a.segregate())},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:o=>a.segregate(),style:e.normalizeStyle(`opacity:${p.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name),13,Et)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:fe.value},void 0,!0)],512),u.value.end-u.value.start<200?(e.openBlock(),e.createBlock(Ge.default,{key:5,hideDetails:"",config:{open:b.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(Je.DataTable,{colNames:H.value.colNames,head:H.value.head,body:H.value.body,config:H.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[5]||(r[5]=a=>b.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a},null,8,Mt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(isNaN(Number(a))?a:e.unref(c.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Qe))}},Tt=Ke._export_sfc($t,[["__scopeId","data-v-f558d57b"]]);exports.default=Tt;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-D-vy9N1v.cjs"),K=require("./useResponsive-B3TrDDIG.cjs"),ie=require("./Title-BaKZYHEx.cjs"),Q=require("./usePrinter-P4nLcXX-.cjs"),ce=require("./Tooltip-okAYzo5Y.cjs"),ve=require("./DataTable-pVXaNplZ.cjs"),de=require("./vue-ui-skeleton-DJhwv2oY.cjs"),he=require("./Shape-COoEWeGM.cjs"),pe=require("./vue-ui-accordion-btKAUUTu.cjs"),Z=require("./useNestedProp-B9yDavuy.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],ye=["xmlns","viewBox"],be={key:0},ge={key:0},ke=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],xe={key:1},Ce=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],we=["x1","x2","y1","y2","stroke","stroke-width"],Be=["x1","x2","y1","y2","stroke","stroke-width"],_e=["x","y","fill","font-size"],Se=["x","y","font-size","fill"],$e=["fill","font-size","transform"],Ne=["fill","font-size","x","y"],Le=["x1","x2","y1","y2","stroke"],Te=["cx","cy","fill"],Pe=["cx","cy","fill"],Ee=["id"],ze=["stop-color"],Ve=["stop-color"],Ae=["stop-color"],Fe={key:0},De=["x","y","font-size","fill"],Oe={key:3,class:"vue-data-ui-watermark"},Me=["innerHTML"],We={__name:"vue-ui-strip-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(ee,{expose:te,emit:le}){const v=ee,{vue_ui_strip_plot:ae}=o.useConfig(),p=e.computed({get(){return!!v.dataset&&v.dataset.length},set(l){return l}}),L=e.ref(o.createUid()),V=e.ref(0),T=e.ref(!1),P=e.ref(""),b=e.ref(null),A=e.ref(null),F=e.ref(!1),D=e.ref(0),O=e.ref(0),t=e.computed({get:()=>M(),set:l=>l});function M(){const l=Z.useNestedProp({userConfig:v.config,defaultConfig:ae});return l.theme?{...Z.useNestedProp({userConfig:o.themes.vue_ui_strip_plot[l.theme]||v.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}e.watch(()=>v.config,l=>{t.value=M(),W(),D.value+=1,O.value+=1},{deep:!0});const C=e.ref(null);e.onMounted(()=>{W()});function W(){if(o.objectIsEmpty(v.dataset)?o.error({componentName:"VueUiStripPlot",type:"dataset"}):v.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","plots"]}).forEach(a=>{p.value=!1,o.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:a,index:s})}),l.plots&&l.plots.forEach((a,n)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(u=>{p.value=!1,o.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:u,index:`${s},${n}`})})})}),t.value.responsive){const l=K.throttle(()=>{const{width:s,height:a}=K.useResponsive({chart:b.value,title:t.value.style.chart.title.text?A.value:null});w.value=a,y.value.width=s,y.value.height=a,k.value=(s-d.value.left-d.value.right)/v.dataset.length,B.value=o.translateSize({relator:Math.min(a,s),adjuster:600,source:t.value.style.chart.plots.radius,threshold:6,fallback:6})});C.value=new ResizeObserver(l),C.value.observe(b.value.parentNode)}F.value=!0,setTimeout(()=>{g.value=!1},oe.value*50)}e.onBeforeUnmount(()=>{C.value&&C.value.disconnect()});const{isPrinting:I,isImaging:G,generatePdf:q,generateImage:R}=Q.usePrinter({elementId:`strip-plot_${L.value}`,fileName:t.value.style.chart.title.text||"vue-ui-strip-plot"}),U=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),g=e.ref(t.value.useCssAnimation),c=e.ref({showTable:t.value.table.show,dataLabels:{show:t.value.style.chart.labels.bestPlotLabel.show},showTooltip:t.value.style.chart.tooltip.show}),d=e.ref({top:t.value.style.chart.padding.top,bottom:t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right}),k=e.ref(t.value.style.chart.stripWidth),w=e.ref(t.value.style.chart.height),B=e.ref(t.value.style.chart.plots.radius),y=e.ref({width:k.value*v.dataset.length+d.value.left+d.value.right,height:t.value.style.chart.height}),r=e.computed(()=>{const l=k.value*v.dataset.length+d.value.left+d.value.right;return{left:d.value.left,right:l-d.value.right,top:d.value.top,bottom:w.value-d.value.bottom,width:k.value*v.dataset.length,height:w.value-d.value.top-d.value.bottom,stripWidth:k.value,absoluteHeight:w.value,absoluteWidth:l}}),_=e.computed(()=>p.value?v.dataset.map((l,s)=>{const a=o.createUid();return{...l,id:a,color:l.color?o.convertColorToHex(l.color):U.value[s]||o.palette[s]||o.palette[s%o.palette.length],plots:l.plots.map(n=>({...n,value:o.checkNaN(n.value),parentId:a,color:l.color?o.convertColorToHex(l.color):U.value[s]||o.palette[s]||o.palette[s%o.palette.length],id:o.createUid()})).sort((n,u)=>n.value-u.value)}}):null),h=e.computed(()=>(_.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,x:r.value.left+(s+1)*r.value.stripWidth-r.value.stripWidth/2}))}))),oe=e.computed(()=>Math.max(...h.value.map(l=>l.plots.length))),E=e.computed(()=>{const l=h.value.flatMap(s=>s.plots.map(a=>a.value));return{max:Math.max(...l),min:Math.min(...l)}}),m=e.computed(()=>o.calculateNiceScale(E.value.min<0?E.value.min:0,E.value.max,t.value.style.chart.grid.scaleSteps)),re=e.computed(()=>(h.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,y:r.value.bottom-(a.value+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))*r.value.height}))}))),H=e.computed(()=>m.value.ticks.map(l=>({y:r.value.bottom-r.value.height*((l+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))),x1:r.value.left,x2:r.value.right,value:l}))),z=e.ref(null),i=e.ref(null);function se({datapoint:l,seriesIndex:s}){z.value={datapoint:l,seriesIndex:s,config:t.value,series:_.value},T.value=!0,i.value=l;const a=t.value.style.chart.tooltip.customFormat;if(o.isFunction(a)&&o.functionReturnsString(()=>a({seriesIndex:s,datapoint:l,series:_.value,config:t.value})))P.value=a({seriesIndex:s,datapoint:l,series:_.value,config:t.value});else{let n="";n+=`<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="${t.value.style.chart.plots.gradient.show?`url(#${l.parentId})`:l.color}"/></svg>${l.name}</div>`,n+=`<div>${o.applyDataLabel(t.value.style.chart.labels.formatter,l.value,o.dataLabel({p:t.value.style.chart.labels.prefix,v:l.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:s})}</div>`,P.value=`<div>${n}</div>`}}const S=e.computed(()=>{const l=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>({name:`${a.name} - ${n.name}`,color:n.color}))),s=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>n.value));return{head:l,body:s}});function j(){e.nextTick(()=>{const l=S.value.head.map((n,u)=>[[n.name],[S.value.body[u]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value]]].concat(l),a=o.createCsvContent(s);o.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-strip-plot"})})}const $=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=S.value.head.map((u,f)=>{const N=o.dataLabel({p:t.value.style.chart.labels.prefix,v:S.value.body[f],s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},N]}),a={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{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:l,body:s,config:a}}),x=e.ref(!1);function ne(l){x.value=l,V.value+=1}function ue(){return h.value}function X(){c.value.showTable=!c.value.showTable}function Y(){c.value.dataLabels.show=!c.value.dataLabels.show}function J(){c.value.showTooltip=!c.value.showTooltip}return te({getData:ue,generatePdf:q,generateCsv:j,generateImage:R,toggleTable:X,toggleLabels:Y,toggleTooltip:J}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"stripPlotChart",ref:b,class:e.normalizeClass(`vue-ui-strip-plot ${x.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`strip-plot_${L.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ie._sfc_main,{key:`title_${D.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(G),uid:L.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:c.value.showTooltip,isFullscreen:x.value,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,onToggleFullscreen:ne,onGeneratePdf:e.unref(q),onGenerateCsv:j,onGenerateImage:e.unref(R),onToggleTable:X,onToggleLabels:Y,onToggleTooltip:J},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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color};`)},[t.value.style.chart.grid.show?(e.openBlock(),e.createElementBlock("g",be,[t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,ke))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left+(n+1)*r.value.stripWidth,x2:r.value.left+(n+1)*r.value.stripWidth,y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,Ce))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:r.value.left,x2:r.value.left,y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,we),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,Be)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(H.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:a.x1-t.value.style.chart.labels.yAxisLabels.fontSize/2+t.value.style.chart.labels.yAxisLabels.offsetX,y:a.y+t.value.style.chart.labels.yAxisLabels.fontSize/3,fill:t.value.style.chart.labels.yAxisLabels.color,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,"text-anchor":"end"},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.labels.formatter,a.value,e.unref(o.dataLabel)({p:t.value.style.chart.labels.prefix,v:a.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.yAxisLabels.rounding}),{datapoint:a,seriesIndex:n})),9,_e))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left+(n+1)*r.value.stripWidth-r.value.stripWidth/2,y:r.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize*2+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"text-anchor":"middle"},e.toDisplayString(a.name),9,Se))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.yLabel?(e.openBlock(),e.createElementBlock("text",{key:3,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,transform:`translate(${t.value.style.chart.labels.axis.fontSize+t.value.style.chart.labels.axis.yLabelOffsetX}, ${r.value.top+r.value.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.yLabel),9,$e)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.xLabel?(e.openBlock(),e.createElementBlock("text",{key:4,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,x:r.value.left+r.value.width/2,y:r.value.absoluteHeight,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.xLabel),9,Ne)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:i.value.y,y2:i.value.y,stroke:i.value.color,"stroke-width":1,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Le),e.createElementVNode("circle",{cx:r.value.left,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Te),e.createElementVNode("circle",{cx:r.value.right,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Pe)],64)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,a=>(e.openBlock(),e.createElementBlock("radialGradient",{id:a.id,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(o.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,ze),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(o.darkenHexColor)(a.color,.1)},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ae)],8,Ee))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(re.value,(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,f)=>(e.openBlock(),e.createBlock(he._sfc_main,e.mergeProps({plot:{x:u.x,y:F.value?u.y:r.value.top},radius:i.value&&i.value.id===u.id?B.value*1.5:B.value,shape:t.value.style.chart.plots.shape,stroke:t.value.style.chart.plots.stroke,strokeWidth:t.value.style.chart.plots.strokeWidth,color:t.value.style.chart.plots.gradient.show?`url(#${a.id})`:a.color,onMouseenter:N=>se({datapoint:u,seriesIndex:f}),onMouseleave:s[0]||(s[0]=N=>{T.value=!1,i.value=null}),onClick:N=>le("selectDatapoint",u),style:`transition: all 0.2s ease-in-out; opacity:${i.value?i.value.id===u.id?1:.2:t.value.style.chart.plots.opacity};${g.value?`transition-delay:${f*50}ms`:""}`,class:{"vue-ui-strip-plot-animated":t.value.useCssAnimation&&g.value,"vue-ui-strip-plot-select-circle":t.value.useCssAnimation&&!g.value}},l.$attrs),null,16,["plot","radius","shape","stroke","strokeWidth","color","onMouseenter","onClick","style","class"]))),256)),c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f===a.plots.length-1||i.value&&i.value.id===u.id&&!c.value.showTooltip?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.x,y:u.y+t.value.style.chart.labels.bestPlotLabel.offsetY-B.value*(i.value&&i.value.id===u.id&&!c.value.showTooltip?2:1.5),"font-size":t.value.style.chart.labels.bestPlotLabel.fontSize,fill:t.value.style.chart.labels.bestPlotLabel.color,"text-anchor":"middle",style:e.normalizeStyle(`opacity:${t.value.useCssAnimation&&g.value?0:1};transition:opacity 0.2s ease-in;`)},e.toDisplayString(u.name)+" "+e.toDisplayString(t.value.style.chart.labels.bestPlotLabel.showValue?e.unref(o.applyDataLabel)(t.value.style.chart.labels.formatter,u.value,e.unref(o.dataLabel)({p:`(${t.value.style.chart.labels.prefix}`,v:u.value,s:`${t.value.style.chart.labels.suffix})`,r:t.value.style.chart.labels.bestPlotLabel.rounding}),{datapoint:u,seriesIndex:f}):""),13,De)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)],64))),256)),e.renderSlot(l.$slots,"svg",{svg:r.value},void 0,!0)],14,ye)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:4,config:{type:"stripPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,stripPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(ce._sfc_main,{show:c.value.showTooltip&&T.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,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:b.value,content:P.value,isCustom:e.unref(o.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),p.value?(e.openBlock(),e.createBlock(pe.default,{key:5,hideDetails:"",config:{open:c.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ve.DataTable,{key:`table_${O.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[1]||(s[1]=a=>c.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,Me)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},Ie=me._export_sfc(We,[["__scopeId","data-v-e20c3703"]]);exports.default=Ie;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-D-vy9N1v.cjs"),P=require("./useNestedProp-B9yDavuy.cjs"),B=require("./usePrinter-P4nLcXX-.cjs"),O=require("./Shape-COoEWeGM.cjs"),T=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M=["id"],G={role:"cell"},q={role:"row"},U=["data-cell"],L={key:0,style:{display:"flex","flex-direction":"row",gap:"2px","align-items":"center"}},A=["height","width"],D={key:0,role:"cell","data-cell":"sum"},H={key:1,role:"cell","data-cell":"average"},X={key:2,role:"cell","data-cell":"median"},W={__name:"vue-ui-table-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(I,{expose:$}){const d=I;e.useCssVars(t=>({"14b82aea":z.value,"1a1f24c5":F.value}));const{vue_ui_table_heatmap:w}=r.useConfig(),p=e.ref(r.createUid()),s=e.ref(!1),c=e.ref(null),m=e.ref(!1),v=e.ref(0),o=e.computed({get:()=>f(),set:t=>t});function f(){const t=P.useNestedProp({userConfig:d.config,defaultConfig:w});return t.theme?{...P.useNestedProp({userConfig:r.themes.vue_ui_table_heatmap[t.theme]||d.config,defaultConfig:t})}:t}e.watch(()=>d.config,t=>{o.value=f(),y()},{deep:!0});const{isPrinting:N,isImaging:x,generatePdf:g,generateImage:h}=B.usePrinter({elementId:`table_heatmap_${p.value}`,fileName:"vue-ui-table-heatmap"}),E=e.computed(()=>o.value.table.responsiveBreakpoint),S=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{y()});function y(){r.objectIsEmpty(d.dataset)&&r.error({componentName:"VueUiTableHeatmap",type:"dataset"});const t=new ResizeObserver(l=>{l.forEach(a=>{s.value=a.contentRect.width<E.value})});c.value&&t.observe(c.value)}const k=e.computed(()=>d.dataset.map(t=>{const l=t.values.map(n=>isNaN(n)?0:n),a=l.reduce((n,i)=>n+i,0);return{...t,values:l,serieExtremes:{max:Math.max(...l),min:Math.min(...l)},sum:a,average:a/l.length,median:r.calcMedian(l),displayValues:[t.name,...t.values],id:r.createUid()}})),b=e.computed(()=>{const t=k.value.flatMap(l=>l.values);return{min:Math.min(...t),max:Math.max(...t)}});function V(t,l){const a=o.value.style.heatmapColors.useIndividualScale;return r.interpolateColorHex(o.value.style.heatmapColors.min,o.value.style.heatmapColors.max,a?l.min:b.value.min,a?l.max:b.value.max,t)}const C=e.computed(()=>k.value.map(t=>({...t,colors:t.displayValues.map(l=>isNaN(l)?o.value.style.backgroundColor:V(l,t.serieExtremes))}))),F=e.computed(()=>o.value.style.backgroundColor),z=e.computed(()=>`${o.value.table.borderWidth}px`);function _(){e.nextTick(()=>{const t=C.value.map(n=>[[n.name],n.displayValues,[n.sum],[n.average],[n.median]]),l=[[[""],o.value.table.head.values,["sum"],["average"],["median"]]].concat(t),a=r.createCsvContent(l);r.downloadCsv({csvContent:a,title:"vue-ui-table-heatmap"})})}function R(t){m.value=t,v.value+=1}return $({generatePdf:g,generateCsv:_,generateImage:h}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:c,style:e.normalizeStyle(`width:100%; overflow-x:auto; container-type: inline-size;padding-top:${o.value.userOptions.show?"36px":""}; ${m.value?"vue-data-ui-wrapper-fullscreen":""}; position:relative;`),class:e.normalizeClass({"vue-ui-responsive":s.value}),id:`table_heatmap_${p.value}`},[o.value.userOptions.show&&S.value?(e.openBlock(),e.createBlock(B.UserOptions,{ref:"details",key:`user_option_${v.value}`,backgroundColor:o.value.style.backgroundColor,color:o.value.style.color,isPrinting:e.unref(N),isImaging:e.unref(x),uid:p.value,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasFullscreen:o.value.userOptions.buttons.fullscreen,isFullscreen:m.value,titles:{...o.value.userOptions.buttonTitles},chartElement:c.value,onToggleFullscreen:R,onGeneratePdf:e.unref(g),onGenerateCsv:_,onGenerateImage:e.unref(h)},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),e.createElementVNode("table",{class:e.normalizeClass({"vue-ui-table-heatmap":!0}),style:e.normalizeStyle(`width:100%;font-family:${o.value.style.fontFamily};background:${o.value.style.backgroundColor};`)},[e.createElementVNode("caption",null,[e.renderSlot(t.$slots,"caption",{},void 0,!0)]),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${o.value.table.head.backgroundColor};color:${o.value.table.head.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value.table.head.values,(a,n)=>(e.openBlock(),e.createElementBlock("th",G,[e.renderSlot(t.$slots,"head",e.normalizeProps(e.guardReactiveProps({value:a,rowIndex:n,type:typeof a,isResponsive:s.value})),void 0,!0)]))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(a,n)=>(e.openBlock(),e.createElementBlock("tr",q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.displayValues,(i,u)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":o.value.table.head.values[u]},[a.color&&u===0?(e.openBlock(),e.createElementBlock("div",L,[a.color?(e.openBlock(),e.createElementBlock("svg",{key:0,height:o.value.style.shapeSize,width:o.value.style.shapeSize,viewBox:"0 0 20 20",style:{background:"none",overflow:"visible"}},[e.createVNode(O._sfc_main,{plot:{x:10,y:10},color:a.color,radius:9,shape:a.shape||"circle"},null,8,["color","shape"])],8,A)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rowTitle",e.normalizeProps(e.guardReactiveProps({value:i,rowIndex:n,colIndex:u,type:typeof i,isResponsive:s.value})),void 0,!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[u===0?e.renderSlot(t.$slots,"rowTitle",e.normalizeProps(e.mergeProps({key:0},{value:i,rowIndex:n,colIndex:u,type:typeof i,isResponsive:s.value})),void 0,!0):e.createCommentVNode("",!0),u>0?e.renderSlot(t.$slots,"cell",e.normalizeProps(e.mergeProps({key:1},{value:i,rowIndex:n,colIndex:u,type:typeof i,isResponsive:s.value,color:a.colors[u],textColor:e.unref(r.adaptColorToBackground)(a.colors[u])})),void 0,!0):e.createCommentVNode("",!0)],64))],8,U))),256)),o.value.table.showSum?(e.openBlock(),e.createElementBlock("td",D,[e.renderSlot(t.$slots,"sum",e.normalizeProps(e.guardReactiveProps({value:a.sum,rowIndex:n,isResponsive:s.value})),void 0,!0)])):e.createCommentVNode("",!0),o.value.table.showAverage?(e.openBlock(),e.createElementBlock("td",H,[e.renderSlot(t.$slots,"average",e.normalizeProps(e.guardReactiveProps({value:a.average,rowIndex:n,isResponsive:s.value})),void 0,!0)])):e.createCommentVNode("",!0),o.value.table.showMedian?(e.openBlock(),e.createElementBlock("td",X,[e.renderSlot(t.$slots,"median",e.normalizeProps(e.guardReactiveProps({value:a.median,rowIndex:n,isResponsive:s.value})),void 0,!0)])):e.createCommentVNode("",!0)]))),256))])],4)],14,M))}},J=T._export_sfc(W,[["__scopeId","data-v-2371a39f"]]);exports.default=J;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-D-vy9N1v.cjs"),X=require("./Title-BaKZYHEx.cjs"),S=require("./usePrinter-P4nLcXX-.cjs"),J=require("./vue-ui-skeleton-DJhwv2oY.cjs"),T=require("./useNestedProp-B9yDavuy.cjs"),K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Q=["id"],Z={key:0,style:"width:100%"},ee=["xmlns","viewBox"],te={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},oe=["fill"],le=["id"],re=["stop-color"],ae=["stop-color"],se=["stop-color"],ne={"clip-path":"url(#vueUiPill)"},ue=["x","y","height","width"],ce=["x","y","height","width","fill"],ie=["x1","x2","y1","y2","stroke-width","stroke"],de=["x1","x2","y1","y2","stroke-width","stroke"],he=["x1","x2","y1","y2","stroke-width","stroke"],ve=["x1","x2","y1","y2","stroke-width","stroke"],me=["x1","x2","y1","y2","stroke-width","stroke"],ye=["x1","x2","y1","y2","stroke-width","stroke"],pe=["x1","x2","y1","y2","stroke-width","stroke"],fe=["x1","x2","y1","y2","stroke-width","stroke"],ge=["x","y","height","width"],ke=["y","x","fill","font-size","font-weight"],xe={key:3,class:"vue-data-ui-watermark"},be={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:Y}){const s=m;e.useCssVars(l=>({"49e3320b":G.value,"41b6d03a":z.value,"2bacc990":U.value}));const{vue_ui_thermometer:M}=r.useConfig(),f=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{w()});function w(){r.objectIsEmpty(s.dataset)?r.error({componentName:"VueUiThermometer",type:"dataset"}):r.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(l=>{r.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:l})})}const d=e.ref(r.createUid()),C=e.ref(null),N=e.ref(0),B=e.ref(0),t=e.computed({get:()=>E(),set:l=>l});function E(){const l=T.useNestedProp({userConfig:s.config,defaultConfig:M});return l.theme?{...T.useNestedProp({userConfig:r.themes.vue_ui_thermometer[l.theme]||s.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>s.config,l=>{t.value=E(),w(),B.value+=1},{deep:!0});const{isPrinting:V,isImaging:P,generatePdf:F,generateImage:$}=S.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),y=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),O=e.computed(()=>t.value.style.chart.thermometer.width),i=e.computed(()=>s.dataset.steps||10),c=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function p(l,n,o){const u=[],b=I(l),_=I(n);for(let v=0;v<o;v++){const j=g(b.red,_.red,v,o),A=g(b.green,_.green,v,o),D=g(b.blue,_.blue,v,o),R=`#${k(j)}${k(A)}${k(D)}`;u.push(R)}return u}function I(l){const n=l.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function g(l,n,o,u){return Math.round(l+(n-l)*o/u)}function k(l){return l.toString(16).padStart(2,"0")}const a=e.computed(()=>{const l=O.value+c.value.left+c.value.right,n=t.value.style.chart.height;return{width:l,left:c.value.left,right:l-c.value.right,top:c.value.top,bottom:n-c.value.bottom,height:n}}),L=e.computed(()=>a.value),x=e.computed(()=>{const l=r.checkNaN(s.dataset.from)<0?Math.abs(r.checkNaN(s.dataset.from)):r.checkNaN(s.dataset.from),n=r.checkNaN(s.dataset.to)<0?Math.abs(r.checkNaN(s.dataset.to)):r.checkNaN(s.dataset.to);let o=0;return r.checkNaN(s.dataset.to)>0?o=l+n:l>n?o=l-n:o=n-l,(1-(Math.abs(r.checkNaN(s.dataset.from))+r.checkNaN(s.dataset.value))/o)*(a.value.height-c.value.top-c.value.bottom)}),U=e.computed(()=>`${x.value}px`),z=e.computed(()=>`${a.value.height-t.value.style.chart.padding.bottom-c.value.top}px`),G=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),W=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return p(y.value[0]||r.palette[0],r.convertColorToHex(s.dataset.colors.to),i.value||10);if(!s.dataset.colors.to)return p(r.convertColorToHex(s.dataset.colors.from),y.value[1]||r.palette[1],i.value||10)}else return p(y.value[1]||r.palette[1],y.value[0]||r.palette[0],i.value||10);return p(r.convertColorToHex(s.dataset.colors.from),r.convertColorToHex(s.dataset.colors.to),i.value||10)}),q=e.computed(()=>{const l=[];let n=0;const o=a.value.height-c.value.top-c.value.bottom;for(let u=0;u<o-1;u+=o/i.value)l.push({x:a.value.left,y:a.value.top+u,qYLess:a.value.top+u+o/i.value/4,halfY:a.value.top+u+o/i.value/2,qYMore:a.value.top+u+o/i.value/4*3,color:W.value[n],height:o/i.value}),n+=1;return l}),h=e.ref(!1);function H(l){h.value=l,N.value+=1}return Y({generatePdf:F,generateImage:$}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:C,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",Z,[(e.openBlock(),e.createBlock(X._sfc_main,{key:`title_${B.value}`,config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(S.UserOptions,{ref:"details",key:`user_options_${N.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(P),isPrinting:e.unref(V),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,onToggleFullscreen:H,onGeneratePdf:e.unref(F),onGenerateImage:e.unref($)},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${a.value.width} ${a.value.height}`,style:"background:transparent"},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",te,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,oe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,re),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(r.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,ae),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,se)],8,le))),256))]),e.createElementVNode("g",ne,[e.createElementVNode("rect",{x:a.value.left,y:a.value.top,height:a.value.height-c.value.top-c.value.bottom,width:a.value.width-c.value.left-c.value.right,fill:"#FFFFFF"},null,8,ue),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,ce),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ie)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,de)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,he)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ve)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.value.right,x2:a.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,me)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.value.right,x2:a.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ye)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:a.value.right,x2:a.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,pe)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.value.right,x2:a.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,fe)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:a.value.left,y:a.value.top,height:x.value,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,ge)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:x.value+a.value.top+t.value.style.chart.label.fontSize/3,x:a.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(r.dataLabel)({p:t.value.style.chart.label.prefix,v:m.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding}),{datapoint:m.dataset})),11,ke),e.renderSlot(l.$slots,"svg",{svg:L.value},void 0,!0)],10,ee)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(V)||e.unref(P)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.default,{key:4,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],14,Q))}},_e=K._export_sfc(be,[["__scopeId","data-v-c2c7fd4d"]]);exports.default=_e;