vue-data-ui 2.3.57 → 2.3.59

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 (145) hide show
  1. package/dist/{Arrow-ycy3_Slf.js → Arrow-BJ47KXjY.js} +1 -1
  2. package/dist/{Arrow-DzUipdZc.cjs → Arrow-VxZlHkwt.cjs} +1 -1
  3. package/dist/{BaseIcon-BkQhR5to.cjs → BaseIcon-Bv5uh10R.cjs} +1 -1
  4. package/dist/{BaseIcon-DuWxvGrs.js → BaseIcon-Fm7sUbd2.js} +1 -1
  5. package/dist/{DataTable-Cp8-9z9I.js → DataTable-1VV0us-8.js} +2 -2
  6. package/dist/{DataTable-BRux41DB.cjs → DataTable-CPAt686N.cjs} +1 -1
  7. package/dist/{Legend-Bkl0mNRU.cjs → Legend-BJ2Mynop.cjs} +1 -1
  8. package/dist/{Legend-Dxg4fgms.js → Legend-DB6v_LvZ.js} +1 -1
  9. package/dist/{Shape-9atoPZLR.js → Shape-B_f1_6Ob.js} +1 -1
  10. package/dist/{Shape-BqcaWTo1.cjs → Shape-DWZSJJ6-.cjs} +1 -1
  11. package/dist/{Slicer-DWXMDMkg.js → Slicer-CHiUxRAh.js} +55 -52
  12. package/dist/Slicer-PPS43jOo.cjs +1 -0
  13. package/dist/{Title-JorKJ3kW.cjs → Title-CR-JDJwq.cjs} +1 -1
  14. package/dist/{Title-Bft_Qodf.js → Title-xP0rAF4q.js} +1 -1
  15. package/dist/{Tooltip-DuhcODsb.cjs → Tooltip-B4DNihSF.cjs} +1 -1
  16. package/dist/{Tooltip-DsJ_DDEa.js → Tooltip-DfBa_7Ur.js} +1 -1
  17. package/dist/index-CDK3omwG.cjs +4 -0
  18. package/dist/{index-ByARe6xk.js → index-CpHoINpJ.js} +21 -19
  19. package/dist/style.css +1 -1
  20. package/dist/types/vue-data-ui.d.cts +2 -0
  21. package/dist/types/vue-data-ui.d.ts +2 -0
  22. package/dist/{useNestedProp-DcnyJpjm.js → useNestedProp-BOjw3Yqn.js} +1 -1
  23. package/dist/{useNestedProp-BUoCZrmY.cjs → useNestedProp-CaaW8JIS.cjs} +1 -1
  24. package/dist/{usePrinter-BUBRC6GE.js → usePrinter-BHy-mfVg.js} +1 -1
  25. package/dist/{usePrinter-D5ewpTd3.cjs → usePrinter-vQu-8tRD.cjs} +1 -1
  26. package/dist/{vue-data-ui-BzsqnKj2.cjs → vue-data-ui-Ccdrn4OV.cjs} +1 -1
  27. package/dist/{vue-data-ui-67aBhtaH.js → vue-data-ui-Dcg7DPMn.js} +57 -57
  28. package/dist/vue-data-ui.cjs +1 -1
  29. package/dist/vue-data-ui.js +5 -5
  30. package/dist/{vue-ui-3d-bar-CQ656C3D.js → vue-ui-3d-bar-BqtnNU7h.js} +7 -7
  31. package/dist/{vue-ui-3d-bar-NcBKcawL.cjs → vue-ui-3d-bar-DdBlV5AX.cjs} +1 -1
  32. package/dist/{vue-ui-accordion-B7sGXK-8.js → vue-ui-accordion-BZloYo0L.js} +3 -3
  33. package/dist/{vue-ui-accordion-CSnFq9e7.cjs → vue-ui-accordion-EVAolVkD.cjs} +1 -1
  34. package/dist/{vue-ui-age-pyramid-DcN9DXL7.js → vue-ui-age-pyramid-CTxkOn4v.js} +8 -8
  35. package/dist/{vue-ui-age-pyramid-B8KDJTmK.cjs → vue-ui-age-pyramid-Ce3DbeqC.cjs} +1 -1
  36. package/dist/{vue-ui-annotator-DINvjGdW.js → vue-ui-annotator-BDWKiQ6S.js} +1 -1
  37. package/dist/{vue-ui-annotator-BcKsg71t.cjs → vue-ui-annotator-D_AK0JCi.cjs} +1 -1
  38. package/dist/{vue-ui-candlestick-dE7VZ9c2.js → vue-ui-candlestick-ByA9FGZb.js} +9 -9
  39. package/dist/{vue-ui-candlestick-DokpJUMI.cjs → vue-ui-candlestick-CIKgu0F2.cjs} +1 -1
  40. package/dist/{vue-ui-carousel-table-CyvXkNVJ.js → vue-ui-carousel-table-BnYxbq5A.js} +4 -4
  41. package/dist/{vue-ui-carousel-table-CfkAq3aZ.cjs → vue-ui-carousel-table-ez9gbOZ7.cjs} +1 -1
  42. package/dist/{vue-ui-chestnut-BtbUx2K6.js → vue-ui-chestnut-BumsSmCv.js} +6 -6
  43. package/dist/{vue-ui-chestnut-C7UoeDnX.cjs → vue-ui-chestnut-CnYqa2Fx.cjs} +1 -1
  44. package/dist/{vue-ui-cursor-a04KGiW0.js → vue-ui-cursor-D-4-MMw7.js} +2 -2
  45. package/dist/{vue-ui-cursor-CdZf-yX5.cjs → vue-ui-cursor-Drl8jibt.cjs} +1 -1
  46. package/dist/{vue-ui-dashboard-C16uiqyH.js → vue-ui-dashboard-B_iV-3hq.js} +2 -2
  47. package/dist/{vue-ui-dashboard-BVfWXpf8.cjs → vue-ui-dashboard-CX0jA181.cjs} +1 -1
  48. package/dist/{vue-ui-digits-DrK1MsGL.js → vue-ui-digits-DMhl9plv.js} +2 -2
  49. package/dist/{vue-ui-digits-Ct2vS1BN.cjs → vue-ui-digits-RAZl_4Kb.cjs} +1 -1
  50. package/dist/{vue-ui-donut-DCw94nm5.cjs → vue-ui-donut-BG28U01c.cjs} +1 -1
  51. package/dist/{vue-ui-donut-gBfPKxL5.js → vue-ui-donut-BpQC9-Uz.js} +9 -9
  52. package/dist/{vue-ui-donut-evolution-w2VBVy8J.cjs → vue-ui-donut-evolution-BWvrYKlH.cjs} +1 -1
  53. package/dist/{vue-ui-donut-evolution-ci4AbPDx.js → vue-ui-donut-evolution-DPU-Nd8y.js} +9 -9
  54. package/dist/{vue-ui-dumbbell-DSeY7g70.cjs → vue-ui-dumbbell-2Lsks-8o.cjs} +1 -1
  55. package/dist/{vue-ui-dumbbell-CfRDGglI.js → vue-ui-dumbbell-C4JnuC1b.js} +8 -8
  56. package/dist/{vue-ui-flow-CCRXuD2w.cjs → vue-ui-flow-DBhdVKxF.cjs} +1 -1
  57. package/dist/{vue-ui-flow-sxRGOd3v.js → vue-ui-flow-DSdWqWgh.js} +7 -7
  58. package/dist/{vue-ui-galaxy-BtRwEK-N.js → vue-ui-galaxy-148JtEdK.js} +9 -9
  59. package/dist/{vue-ui-galaxy-7uOmICFQ.cjs → vue-ui-galaxy-BMsdd9Rh.cjs} +1 -1
  60. package/dist/{vue-ui-gauge-DF5cMUZq.js → vue-ui-gauge-DOJ98R_N.js} +5 -5
  61. package/dist/{vue-ui-gauge-CcGerm6-.cjs → vue-ui-gauge-fVk9B_1W.cjs} +1 -1
  62. package/dist/{vue-ui-gizmo-BxSR6Npw.js → vue-ui-gizmo-KeWvd226.js} +2 -2
  63. package/dist/{vue-ui-gizmo-DOdbL7oJ.cjs → vue-ui-gizmo-a6WNWyf7.cjs} +1 -1
  64. package/dist/{vue-ui-heatmap-BFebVyoq.js → vue-ui-heatmap-BGsSOTPJ.js} +176 -173
  65. package/dist/vue-ui-heatmap-DFpSo2gr.cjs +1 -0
  66. package/dist/{vue-ui-kpi-Bh3EQVzo.cjs → vue-ui-kpi-Dhah6Fgx.cjs} +1 -1
  67. package/dist/{vue-ui-kpi-kz6LxY4z.js → vue-ui-kpi-Leb1rK38.js} +3 -3
  68. package/dist/{vue-ui-mini-loader-XvpXZ4Lu.js → vue-ui-mini-loader-BLH4ncUB.js} +2 -2
  69. package/dist/{vue-ui-mini-loader-BUmmuBm2.cjs → vue-ui-mini-loader-Dpa9uYkn.cjs} +1 -1
  70. package/dist/{vue-ui-molecule-DAqPp6P1.cjs → vue-ui-molecule-DjvOvDUa.cjs} +1 -1
  71. package/dist/{vue-ui-molecule-CV9jYVPn.js → vue-ui-molecule-DuPAOQcj.js} +20 -20
  72. package/dist/{vue-ui-mood-radar-Rpgf2fO4.cjs → vue-ui-mood-radar-AOHK6R10.cjs} +1 -1
  73. package/dist/{vue-ui-mood-radar-BXksXL9W.js → vue-ui-mood-radar-BmcIz0JR.js} +16 -16
  74. package/dist/{vue-ui-nested-donuts-DP44vR6_.js → vue-ui-nested-donuts-BYLc86qs.js} +9 -9
  75. package/dist/{vue-ui-nested-donuts-Bi9o-a5M.cjs → vue-ui-nested-donuts-CMmcmAd9.cjs} +1 -1
  76. package/dist/{vue-ui-onion-BdQtE7OR.cjs → vue-ui-onion-BjG8xbMh.cjs} +1 -1
  77. package/dist/{vue-ui-onion-C-hnaK6-.js → vue-ui-onion-shZ4g9mJ.js} +9 -9
  78. package/dist/{vue-ui-parallel-coordinate-plot-Cl7HwAhr.cjs → vue-ui-parallel-coordinate-plot-O7lS6u2q.cjs} +1 -1
  79. package/dist/{vue-ui-parallel-coordinate-plot-CRfWMtfW.js → vue-ui-parallel-coordinate-plot-wv0O9t7U.js} +10 -10
  80. package/dist/{vue-ui-quadrant-BvmZuTNr.js → vue-ui-quadrant-BRF5Czj4.js} +52 -52
  81. package/dist/{vue-ui-quadrant-2jWkCnCZ.cjs → vue-ui-quadrant-CuB8sYgF.cjs} +1 -1
  82. package/dist/{vue-ui-quick-chart-Cf2bonoP.js → vue-ui-quick-chart-BQdUHrm2.js} +6 -6
  83. package/dist/{vue-ui-quick-chart-Dljdowyo.cjs → vue-ui-quick-chart-DsVFRO68.cjs} +1 -1
  84. package/dist/{vue-ui-radar-D8WUIeAJ.js → vue-ui-radar-CLUs0tD9.js} +20 -20
  85. package/dist/{vue-ui-radar-DWQT59Y3.cjs → vue-ui-radar-lcS6n5TC.cjs} +1 -1
  86. package/dist/{vue-ui-rating-C6EdVOFi.cjs → vue-ui-rating-CA25nHJe.cjs} +1 -1
  87. package/dist/{vue-ui-rating-DA5yVA82.js → vue-ui-rating-Dcy1l1PB.js} +10 -10
  88. package/dist/{vue-ui-relation-circle-D1HV7sEy.js → vue-ui-relation-circle-DC-RFa9X.js} +5 -5
  89. package/dist/{vue-ui-relation-circle-D1Dfp3vd.cjs → vue-ui-relation-circle-Drr6Gdnq.cjs} +1 -1
  90. package/dist/{vue-ui-rings-9KX262V6.js → vue-ui-rings-DbPbelCU.js} +9 -9
  91. package/dist/{vue-ui-rings-D7ZSknfw.cjs → vue-ui-rings-DxqSAs9h.cjs} +1 -1
  92. package/dist/{vue-ui-scatter-BS4fuY2e.js → vue-ui-scatter-D2jYZ4Wu.js} +67 -67
  93. package/dist/{vue-ui-scatter-BkE4TBcf.cjs → vue-ui-scatter-xyLvaw0d.cjs} +1 -1
  94. package/dist/{vue-ui-screenshot-BNsuh29D.cjs → vue-ui-screenshot-DGqjaE1x.cjs} +1 -1
  95. package/dist/{vue-ui-screenshot-ChhpX9vN.js → vue-ui-screenshot-DXCBzrPZ.js} +1 -1
  96. package/dist/{vue-ui-skeleton-H7E3SBMd.cjs → vue-ui-skeleton-DRDC3yxK.cjs} +1 -1
  97. package/dist/{vue-ui-skeleton-C2W5etGt.js → vue-ui-skeleton-DuM6yey6.js} +36 -36
  98. package/dist/{vue-ui-smiley-CSVsepz-.cjs → vue-ui-smiley-BCmY1siL.cjs} +1 -1
  99. package/dist/{vue-ui-smiley-DmvbdKQH.js → vue-ui-smiley-DQrvx_S9.js} +2 -2
  100. package/dist/{vue-ui-spark-trend-CIRMNMBi.js → vue-ui-spark-trend-B9PR0wxN.js} +17 -17
  101. package/dist/{vue-ui-spark-trend-B_jzBm-L.cjs → vue-ui-spark-trend-Kj1bJmBL.cjs} +1 -1
  102. package/dist/{vue-ui-sparkbar-Bc0UGC0I.cjs → vue-ui-sparkbar-C_vNsxM_.cjs} +1 -1
  103. package/dist/{vue-ui-sparkbar-CsPU3f7E.js → vue-ui-sparkbar-DiU5Yt-V.js} +3 -3
  104. package/dist/{vue-ui-sparkgauge-sf5NkOzU.js → vue-ui-sparkgauge-BnF9Vbs0.js} +9 -9
  105. package/dist/{vue-ui-sparkgauge-B9Z7UC0c.cjs → vue-ui-sparkgauge-SlYA1lqc.cjs} +1 -1
  106. package/dist/{vue-ui-sparkhistogram-BcbNk4hY.cjs → vue-ui-sparkhistogram-BUBwn9A4.cjs} +1 -1
  107. package/dist/{vue-ui-sparkhistogram-C9q2fgqW.js → vue-ui-sparkhistogram-CsOfCo_3.js} +4 -4
  108. package/dist/{vue-ui-sparkline-BW3H6hsT.js → vue-ui-sparkline-B628G3Nl.js} +18 -18
  109. package/dist/{vue-ui-sparkline-Cc-z4lug.cjs → vue-ui-sparkline-CoUeD8Np.cjs} +1 -1
  110. package/dist/{vue-ui-sparkstackbar-DRUOzvw_.cjs → vue-ui-sparkstackbar-Cr-Q7uDo.cjs} +1 -1
  111. package/dist/{vue-ui-sparkstackbar-DtdKmv0C.js → vue-ui-sparkstackbar-DIHGbrF5.js} +3 -3
  112. package/dist/{vue-ui-stackbar-C3hiDzB9.js → vue-ui-stackbar-DCbJhdZy.js} +22 -22
  113. package/dist/{vue-ui-stackbar-CJSxzmsC.cjs → vue-ui-stackbar-DMyP3IRK.cjs} +1 -1
  114. package/dist/{vue-ui-strip-plot-D6RdcG4r.js → vue-ui-strip-plot-CNb3VtYF.js} +9 -9
  115. package/dist/{vue-ui-strip-plot-Dea20UQo.cjs → vue-ui-strip-plot-Da_TQpOq.cjs} +1 -1
  116. package/dist/{vue-ui-table-Cl83ltew.js → vue-ui-table-BqcI8E7E.js} +1 -1
  117. package/dist/{vue-ui-table-DThpCd--.cjs → vue-ui-table-CjuXpy2d.cjs} +1 -1
  118. package/dist/{vue-ui-table-heatmap-C9znKJA2.cjs → vue-ui-table-heatmap-D6px_Z1a.cjs} +1 -1
  119. package/dist/{vue-ui-table-heatmap-P1qoQg4L.js → vue-ui-table-heatmap-nbBDuSiw.js} +7 -7
  120. package/dist/{vue-ui-table-sparkline-ByBzCnhr.js → vue-ui-table-sparkline-Blbaz2zX.js} +10 -10
  121. package/dist/{vue-ui-table-sparkline-B56XlhbD.cjs → vue-ui-table-sparkline-CqNPx5Zw.cjs} +1 -1
  122. package/dist/{vue-ui-thermometer-CEtqGDhU.js → vue-ui-thermometer-BCGHbgj9.js} +5 -5
  123. package/dist/{vue-ui-thermometer-D1BIwe-x.cjs → vue-ui-thermometer-coTC0T6k.cjs} +1 -1
  124. package/dist/{vue-ui-timer-CZv_iq9A.cjs → vue-ui-timer-BjqbxjQO.cjs} +1 -1
  125. package/dist/{vue-ui-timer-_OXWxSrR.js → vue-ui-timer-DhpBvc_5.js} +4 -4
  126. package/dist/{vue-ui-tiremarks-Vln9izs8.js → vue-ui-tiremarks-CNhB7Iqe.js} +5 -5
  127. package/dist/{vue-ui-tiremarks-Crjj6lAQ.cjs → vue-ui-tiremarks-DgbTo_Cb.cjs} +1 -1
  128. package/dist/{vue-ui-treemap-CvZ_PXHg.cjs → vue-ui-treemap-B5moKzuO.cjs} +1 -1
  129. package/dist/{vue-ui-treemap-CVSmQvg5.js → vue-ui-treemap-C4memkYu.js} +9 -9
  130. package/dist/{vue-ui-vertical-bar-B6gMyH90.cjs → vue-ui-vertical-bar-DtkGW5Tk.cjs} +1 -1
  131. package/dist/{vue-ui-vertical-bar-DW83JGF2.js → vue-ui-vertical-bar-LZ-GMZ2T.js} +9 -9
  132. package/dist/{vue-ui-waffle-C9SFbGDx.js → vue-ui-waffle-Cd4IU62n.js} +9 -9
  133. package/dist/{vue-ui-waffle-Ck6_fLgH.cjs → vue-ui-waffle-CtY5CSX9.cjs} +1 -1
  134. package/dist/{vue-ui-wheel-DaA4af-u.js → vue-ui-wheel-CaEAQhJt.js} +5 -5
  135. package/dist/{vue-ui-wheel-DvxUmFh9.cjs → vue-ui-wheel-Do3pWPFB.cjs} +1 -1
  136. package/dist/{vue-ui-word-cloud-X1mDRHqA.js → vue-ui-word-cloud-BSalPYqO.js} +28 -28
  137. package/dist/{vue-ui-word-cloud-B_3r5g7T.cjs → vue-ui-word-cloud-pzaBe3Et.cjs} +1 -1
  138. package/dist/{vue-ui-xy-CQGKoYPl.cjs → vue-ui-xy-BgLF5ZNP.cjs} +1 -1
  139. package/dist/{vue-ui-xy-CID8ZHKi.js → vue-ui-xy-C7tpVpGu.js} +21 -21
  140. package/dist/{vue-ui-xy-canvas-BiqWum4l.cjs → vue-ui-xy-canvas-OuDGiOOW.cjs} +1 -1
  141. package/dist/{vue-ui-xy-canvas-BNAlSGC5.js → vue-ui-xy-canvas-rHcYmvec.js} +36 -36
  142. package/package.json +1 -1
  143. package/dist/Slicer-DJ_rlsfN.cjs +0 -1
  144. package/dist/index-vvhNQFio.cjs +0 -4
  145. package/dist/vue-ui-heatmap-bCvQEgv4.cjs +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-vvhNQFio.cjs"),ae=require("./useResponsive-B3TrDDIG.cjs"),ye=require("./Title-JorKJ3kW.cjs"),oe=require("./usePrinter-D5ewpTd3.cjs"),me=require("./DataTable-BRux41DB.cjs"),be=require("./Tooltip-DuhcODsb.cjs"),ge=require("./Legend-Bkl0mNRU.cjs"),ke=require("./vue-ui-skeleton-H7E3SBMd.cjs"),Ce=require("./vue-ui-accordion-CSnFq9e7.cjs"),ne=require("./useNestedProp-BUoCZrmY.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=x=>(e.pushScopeId("data-v-57753849"),x=x(),e.popScopeId(),x),xe=["id"],we=["xmlns","viewBox"],Be=["id","fr"],_e=A(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Ne=["offset","stop-opacity"],$e=A(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Se=["id"],Ee=["id"],Ve=A(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Fe=["id"],Te=["flood-color"],De=["cx","cy","r","fill","filter"],ze=["d","fill","stroke","stroke-width","filter"],Pe={key:0},Ie=["d","fill"],Oe={key:1},Ae=["x","y","font-size","font-weight","fill"],Me={key:2},Re=["filter"],Ue=["text-anchor","x","y","fill","font-size","font-weight"],qe=["text-anchor","x","y","fill","font-size","font-weight"],Ye=["text-anchor","x","y","fill","font-size","font-weight"],Xe=["d","fill","onMouseenter","onClick"],Ge={key:3,class:"vue-data-ui-watermark"},We={key:0,class:"vue-ui-nested-donuts-legend-title"},He=["onClick"],Je=["innerHTML"],Ke={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(x,{expose:re,emit:M}){const C=x,{vue_ui_nested_donuts:se}=r.useConfig(),N=e.computed(()=>!!C.dataset&&C.dataset.length),f=e.ref(r.createUid()),F=e.ref(!1),T=e.ref(""),ue=e.ref(null),R=e.ref(0),w=e.ref(null),U=e.ref(null),D=e.ref(null),B=e.ref(!1);function ie(l){B.value=l,R.value+=1}const t=e.computed(()=>{const l=ne.useNestedProp({userConfig:C.config,defaultConfig:se});return l.theme?{...ne.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||C.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),$=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(C.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=ae.throttle(()=>{const{width:s,height:a}=ae.useResponsive({chart:w.value,title:t.value.style.chart.title.text?U.value:null,legend:t.value.style.chart.legend.show?D.value:null});c.value.width=s,c.value.height=a});$.value=new ResizeObserver(l),$.value.observe(w.value.parentNode)}}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:q,isImaging:Y,generatePdf:X,generateImage:G}=oe.usePrinter({elementId:`nested_donuts_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),ce=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),p=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512});function de({datapoint:l,index:s}){M("selectDatapoint",{datapoint:l,index:s})}const v=e.ref([]),m=e.computed(()=>(C.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((a,o)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:o,key:"serie"}),[null,void 0].includes(a.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:o,key:"serie"})})}),C.dataset.map((l,s)=>({...l,total:l.series.filter(a=>!v.value.includes(a.id)).map(a=>(a.values||[]).reduce((o,n)=>o+n,0)).reduce((a,o)=>a+o,0),datasetIndex:s,id:`${f.value}_${s}`,series:l.series.map((a,o)=>({name:a.name,arcOf:l.name,arcOfId:`${f.value}_${s}`,id:`${f.value}_${s}_${o}`,seriesIndex:o,datasetIndex:s,color:r.convertColorToHex(a.color)||ce.value[o]||r.palette[o]||r.palette[o%r.palette.length],value:(a.values||[]).reduce((n,u)=>n+u,0),absoluteValues:a.values||[]}))}))));e.ref(t.value.style.chart.layout.donut.strokeWidth);const b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),W=e.computed(()=>[...m.value].map((l,s)=>{const a=l.series.filter(o=>!v.value.includes(o.id)).map(o=>o.value).reduce((o,n)=>o+n,0);return{...l,total:a,series:l.series.filter(o=>!v.value.includes(o.id)).map(o=>({...o,proportion:o.value/a}))}}));function ve(l,s,a){let o=0;for(let n=0;n<l.length;n+=1)a.includes(l[n])&&(o+=1);return o<s}const d=e.ref(W.value);e.watch(()=>W.value,l=>d.value=l);const H=e.ref(null),J=e.ref(null);function z(l){M("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),a=d.value.flatMap(i=>i.series).find(i=>i.id===l.id);let n=a?a.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),h=ve(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){n>s.value?(cancelAnimationFrame(H.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(n+=s.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:n}:g)})),H.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(h){let i=function(){n<.1?(cancelAnimationFrame(J.value),v.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:0}:L)}))):(n/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:n}:L)})),J.value=requestAnimationFrame(i))};i()}}const _=e.computed(()=>d.value.map((l,s)=>{const a=s*b.value/m.value.length;return{...l,radius:b.value-a,donut:r.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-a,b.value-a,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)}})),K=e.computed(()=>[...m.value].map((l,s)=>{const a=s*b.value/m.value.length;return{sizeRatio:a,donut:r.makeDonut({series:[{value:1}]},c.value.width/2,c.value.height/2,b.value-a,b.value-a,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),Q=e.ref(null),S=e.ref(null),E=e.ref(null),P=e.ref(null);function fe({datapoint:l,_relativeIndex:s,seriesIndex:a}){Q.value=l.arcOfId,S.value=l.id,E.value=a,P.value={datapoint:l,seriesIndex:a,series:d.value,config:t.value};const o=t.value.style.chart.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:a,datapoint:l,series:d.value,config:t.value})))T.value=o({seriesIndex:a,datapoint:l,series:d.value,config:t.value});else{let n="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=d.value.map(h=>h.series.find(i=>i.seriesIndex===a));u.forEach((h,i)=>{if(!h)return"";n+=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CDK3omwG.cjs"),ae=require("./useResponsive-B3TrDDIG.cjs"),ye=require("./Title-CR-JDJwq.cjs"),oe=require("./usePrinter-vQu-8tRD.cjs"),me=require("./DataTable-CPAt686N.cjs"),be=require("./Tooltip-B4DNihSF.cjs"),ge=require("./Legend-BJ2Mynop.cjs"),ke=require("./vue-ui-skeleton-DRDC3yxK.cjs"),Ce=require("./vue-ui-accordion-EVAolVkD.cjs"),ne=require("./useNestedProp-CaaW8JIS.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=x=>(e.pushScopeId("data-v-57753849"),x=x(),e.popScopeId(),x),xe=["id"],we=["xmlns","viewBox"],Be=["id","fr"],_e=A(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Ne=["offset","stop-opacity"],$e=A(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Se=["id"],Ee=["id"],Ve=A(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Fe=["id"],Te=["flood-color"],De=["cx","cy","r","fill","filter"],ze=["d","fill","stroke","stroke-width","filter"],Pe={key:0},Ie=["d","fill"],Oe={key:1},Ae=["x","y","font-size","font-weight","fill"],Me={key:2},Re=["filter"],Ue=["text-anchor","x","y","fill","font-size","font-weight"],qe=["text-anchor","x","y","fill","font-size","font-weight"],Ye=["text-anchor","x","y","fill","font-size","font-weight"],Xe=["d","fill","onMouseenter","onClick"],Ge={key:3,class:"vue-data-ui-watermark"},We={key:0,class:"vue-ui-nested-donuts-legend-title"},He=["onClick"],Je=["innerHTML"],Ke={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(x,{expose:re,emit:M}){const C=x,{vue_ui_nested_donuts:se}=r.useConfig(),N=e.computed(()=>!!C.dataset&&C.dataset.length),f=e.ref(r.createUid()),F=e.ref(!1),T=e.ref(""),ue=e.ref(null),R=e.ref(0),w=e.ref(null),U=e.ref(null),D=e.ref(null),B=e.ref(!1);function ie(l){B.value=l,R.value+=1}const t=e.computed(()=>{const l=ne.useNestedProp({userConfig:C.config,defaultConfig:se});return l.theme?{...ne.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||C.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),$=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(C.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=ae.throttle(()=>{const{width:s,height:a}=ae.useResponsive({chart:w.value,title:t.value.style.chart.title.text?U.value:null,legend:t.value.style.chart.legend.show?D.value:null});c.value.width=s,c.value.height=a});$.value=new ResizeObserver(l),$.value.observe(w.value.parentNode)}}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:q,isImaging:Y,generatePdf:X,generateImage:G}=oe.usePrinter({elementId:`nested_donuts_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),ce=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),p=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512});function de({datapoint:l,index:s}){M("selectDatapoint",{datapoint:l,index:s})}const v=e.ref([]),m=e.computed(()=>(C.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((a,o)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:o,key:"serie"}),[null,void 0].includes(a.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:o,key:"serie"})})}),C.dataset.map((l,s)=>({...l,total:l.series.filter(a=>!v.value.includes(a.id)).map(a=>(a.values||[]).reduce((o,n)=>o+n,0)).reduce((a,o)=>a+o,0),datasetIndex:s,id:`${f.value}_${s}`,series:l.series.map((a,o)=>({name:a.name,arcOf:l.name,arcOfId:`${f.value}_${s}`,id:`${f.value}_${s}_${o}`,seriesIndex:o,datasetIndex:s,color:r.convertColorToHex(a.color)||ce.value[o]||r.palette[o]||r.palette[o%r.palette.length],value:(a.values||[]).reduce((n,u)=>n+u,0),absoluteValues:a.values||[]}))}))));e.ref(t.value.style.chart.layout.donut.strokeWidth);const b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),W=e.computed(()=>[...m.value].map((l,s)=>{const a=l.series.filter(o=>!v.value.includes(o.id)).map(o=>o.value).reduce((o,n)=>o+n,0);return{...l,total:a,series:l.series.filter(o=>!v.value.includes(o.id)).map(o=>({...o,proportion:o.value/a}))}}));function ve(l,s,a){let o=0;for(let n=0;n<l.length;n+=1)a.includes(l[n])&&(o+=1);return o<s}const d=e.ref(W.value);e.watch(()=>W.value,l=>d.value=l);const H=e.ref(null),J=e.ref(null);function z(l){M("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),a=d.value.flatMap(i=>i.series).find(i=>i.id===l.id);let n=a?a.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),h=ve(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){n>s.value?(cancelAnimationFrame(H.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(n+=s.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:n}:g)})),H.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(h){let i=function(){n<.1?(cancelAnimationFrame(J.value),v.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:0}:L)}))):(n/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:n}:L)})),J.value=requestAnimationFrame(i))};i()}}const _=e.computed(()=>d.value.map((l,s)=>{const a=s*b.value/m.value.length;return{...l,radius:b.value-a,donut:r.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-a,b.value-a,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)}})),K=e.computed(()=>[...m.value].map((l,s)=>{const a=s*b.value/m.value.length;return{sizeRatio:a,donut:r.makeDonut({series:[{value:1}]},c.value.width/2,c.value.height/2,b.value-a,b.value-a,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),Q=e.ref(null),S=e.ref(null),E=e.ref(null),P=e.ref(null);function fe({datapoint:l,_relativeIndex:s,seriesIndex:a}){Q.value=l.arcOfId,S.value=l.id,E.value=a,P.value={datapoint:l,seriesIndex:a,series:d.value,config:t.value};const o=t.value.style.chart.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:a,datapoint:l,series:d.value,config:t.value})))T.value=o({seriesIndex:a,datapoint:l,series:d.value,config:t.value});else{let n="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=d.value.map(h=>h.series.find(i=>i.seriesIndex===a));u.forEach((h,i)=>{if(!h)return"";n+=`
2
2
  <div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
3
3
  <div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
4
4
  <svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-vvhNQFio.cjs"),U=require("./useResponsive-B3TrDDIG.cjs"),se=require("./Title-JorKJ3kW.cjs"),X=require("./usePrinter-D5ewpTd3.cjs"),ie=require("./Legend-Bkl0mNRU.cjs"),ce=require("./DataTable-BRux41DB.cjs"),de=require("./Tooltip-DuhcODsb.cjs"),ve=require("./vue-ui-skeleton-H7E3SBMd.cjs"),he=require("./vue-ui-accordion-CSnFq9e7.cjs"),G=require("./useNestedProp-BUoCZrmY.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],ge=["xmlns","viewBox"],me=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],ye=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],be=["id"],ke=["stdDeviation"],we=["filter"],Ce=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],xe=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],$e={key:1},Be=["onMouseenter"],Te=["x","y","font-size","fill","font-weight"],Se={key:3,class:"vue-data-ui-watermark"},Pe=["onClick"],_e=["innerHTML"],Ne={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(H,{expose:W,emit:j}){const f=H,{vue_ui_onion:J}=u.useConfig(),w=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(u.createUid()),K=e.ref(null),F=e.ref(0),C=e.ref(!1),B=e.ref(""),c=e.ref([]),y=e.ref(null),I=e.ref(null),V=e.ref(null),t=e.computed(()=>{const a=G.useNestedProp({userConfig:f.config,defaultConfig:J});return a.theme?{...G.useNestedProp({userConfig:u.themes.vue_ui_onion[a.theme]||f.config,defaultConfig:a}),customPalette:u.themePalettes[a.theme]||u.palette}:a}),{isPrinting:E,isImaging:L,generatePdf:D,generateImage:M}=X.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),Q=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),x=e.ref(null);e.onMounted(()=>{if(u.objectIsEmpty(f.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=U.throttle(()=>{const{width:l,height:o}=U.useResponsive({chart:y.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?V.value:null});n.value.width=l,n.value.height=o,n.value.padding.top=Math.max(l,o)*.125,n.value.padding.right=Math.max(l,o)*.125,n.value.padding.bottom=Math.max(l,o)*.125,n.value.padding.left=Math.max(l,o)*.125,n.value.minRadius=Math.min(l,o)*.125});x.value=new ResizeObserver(r),x.value.observe(y.value.parentNode)}}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(f.dataset.forEach((a,r)=>{[null,void 0].includes(a.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(a.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),f.dataset.map((a,r)=>{const l=`onion_serie_${r}_${m.value}`;return{...a,percentage:a.percentage||0,targetPercentage:a.percentage||0,color:u.convertColorToHex(a.color)||Q.value[r]||u.palette[r],id:l,shape:"circle",opacity:c.value.includes(l)?.5:1,absoluteIndex:r,segregate:()=>R(l),isSegregated:c.value.includes(l)}}))),b=e.ref(i.value),Z=e.computed(()=>t.value.useStartAnimation),ee=e.ref(null),te=e.computed(()=>Math.max(...i.value.map(a=>a.percentage))),T=e.ref(!1);e.watch(()=>i.value,le,{immediate:!0});function le(){if(Z.value&&!T.value){let r=function(){a>=te.value?(cancelAnimationFrame(ee.value),b.value=i.value,T.value=!0):(b.value=i.value.map(l=>({...l,percentage:a<l.targetPercentage?a:l.targetPercentage})),a+=1,requestAnimationFrame(r),T.value=!0)};b.value=i.value.map(l=>({...l,percentage:0}));let a=0;r()}else b.value=i.value}const ae=e.computed(()=>({cy:"onion-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":""})),oe=e.computed(()=>i.value.filter(a=>!c.value.includes(a.id)).length),g=e.computed(()=>{const a=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(a>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:a)*t.value.style.chart.layout.gutter.width,track:(a>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:a)*t.value.style.chart.layout.track.width}}),d=e.computed(()=>b.value.filter(a=>!c.value.includes(a.id)).map((a,r)=>{const l=(s.value.maxRadius-g.value.track)/oe.value/2*(1+r),o=s.value.centerY-l;return{percentage:a.percentage||0,...a,labelY:o,radius:l,path:re(l,a.percentage||0)}}));function re(a,r){const l=a*(1.5+(r/100>.3333333333333333?0:1-r/100))*Math.PI,o=a*1.5*Math.PI;return{bgDashArray:`${o} ${o}`,bgDashOffset:o-r/100*o,dashArray:`${l} ${l}`,dashOffset:l-r/100*l,fullOffset:0,active:`M${s.value.centerX},${s.value.centerY} A ${a},${a} 0 0 0 ${s.value.right},${s.value.top}`}}function R(a){c.value.includes(a)?c.value=c.value.filter(r=>r!==a):c.value.push(a),j("selectLegend",d.value)}function ne(){return d.value}const S=e.computed(()=>{const a=[t.value.table.translations.serie,t.value.table.translations.percentage,t.value.table.translations.value],r=d.value.map(l=>[l.name,l.percentage,l.value]);return{head:a,body:r}}),$=e.computed(()=>{const a=S.value.head,r=d.value.map(o=>[`<span style="color:${o.color}">⬤</span> ${o.name}`,`${Number(o.percentage??0).toFixed(t.value.table.td.roundingPercentage).toLocaleString()}%`,`${o.prefix||""}${[null,void 0,NaN,"NaN"].includes(o.value)?"-":o.value.toFixed(t.value.table.td.roundingValue).toLocaleString()}${o.suffix||""}`]),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:r,config:l,colNames:a}});function z(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=S.value.head,l=S.value.body,o=a.concat([r]).concat(l),h=u.createCsvContent(o);u.downloadCsv({csvContent:h,title:t.value.style.chart.title.text||"vue-ui-onion"})})}const v=e.ref(void 0),k=e.ref(!1);function ue(a){k.value=a,F.value+=1}const P=e.ref(null);function A({datapoint:a,seriesIndex:r,show:l=!0}){const o=a.absoluteIndex;v.value=r,P.value={datapoint:a,seriesIndex:o,series:i.value,config:t.value},C.value=l;let h="";const _=t.value.style.chart.tooltip.customFormat;if(u.isFunction(_)&&u.functionReturnsString(()=>_({seriesIndex:o,datapoint:a,series:i.value,config:t.value})))B.value=_({seriesIndex:o,datapoint:a,series:i.value,config:t.value});else{const N=t.value.style.chart.tooltip.showPercentage,O=t.value.style.chart.tooltip.showValue;h+=`<div style="width: 100%; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; padding-bottom: 6px;margin-bottom:3px;display:flex;flex-direction:row;gap:3px;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><span></span>${a.name}</span></div>`,h+=`<div style="width:100%;text-align:left;"><b>${N?u.dataLabel({p:"",v:a.percentage,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}):""}</b> ${N&&O?"(":""}${O?u.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,a.value,u.dataLabel({p:a.prefix||"",v:a.value,s:a.suffix||"",r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:r}):""}${N&&O?")":""}</div>`,B.value=`<div>${h}</div>`}}function q(){p.value.showTable=!p.value.showTable}function Y(){p.value.showTooltip=!p.value.showTooltip}return W({getData:ne,generatePdf:D,generateCsv:z,generateImage:M,toggleTable:q,toggleTooltip:Y}),(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-onion ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"onionChart",ref:y,id:`vue-ui-onion_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:I,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(se._sfc_main,{config:{title:{cy:"onion-div-title",...t.value.style.chart.title},subtitle:{cy:"onion-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&w.value?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:K,key:`user_options${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(L),isPrinting:e.unref(E),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:k.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(D),onGenerateCsv:z,onGenerateImage:e.unref(M),onToggleTable:q,onToggleTooltip:Y},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:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),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),w.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${n.value.width<=0?1e-4:n.value.width} ${n.value.height<=0?1e-4:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:t.value.style.chart.layout.gutter.color,"stroke-width":g.value.gutter,fill:"none","stroke-dasharray":l.path.bgDashArray,"stroke-dashoffset":l.path.fullOffset,"stroke-linecap":"round",class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(v.value)&&v.value!==o}),style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<0?1e-4:l.radius,stroke:`${l.color}`,"stroke-width":g.value.track,fill:"none","stroke-dasharray":l.path.dashArray,"stroke-dashoffset":l.path.dashOffset,class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(v.value)&&v.value!==o}),"stroke-linecap":"round",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,ye))),256)),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.gradientIntensity},null,8,ke)],8,be)]),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",{key:0,filter:`url(#blur_${m.value})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:"white","stroke-width":g.value.track/3,fill:"none","stroke-linecap":"round","stroke-dasharray":l.path.dashArray,"stroke-dashoffset":l.path.dashOffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,Ce))),256))],8,we)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{"data-cy-trap":"",cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:"transparent","stroke-width":Math.max(g.value.track,g.value.gutter),fill:"none","stroke-dasharray":l.path.bgDashArray,"stroke-dashoffset":l.path.fullOffset,"stroke-linecap":"round",class:"vue-ui-onion-path",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"},onMouseenter:h=>A({datapoint:l,show:!0,seriesIndex:o}),onMouseleave:r[0]||(r[0]=h=>{v.value=void 0,C.value=!1})},null,40,xe))),256)),t.value.style.chart.layout.labels.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",{onMouseenter:h=>A({datapoint:l,show:!0,seriesIndex:o}),onMouseleave:r[1]||(r[1]=h=>{v.value=void 0,C.value=!1})},[c.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:0,x:n.value.width/2-g.value.gutter*.8+t.value.style.chart.layout.labels.offsetX,y:l.labelY+t.value.style.chart.layout.labels.offsetY,"text-anchor":"end","font-size":t.value.style.chart.layout.labels.fontSize,fill:t.value.useBlurOnHover&&![null,void 0].includes(v.value)&&v.value===o?l.color:t.value.style.chart.layout.labels.color,"font-weight":t.value.style.chart.layout.labels.bold?"bold":"normal"},e.toDisplayString(l.name?l.name+": ":"")+" "+e.toDisplayString(t.value.style.chart.layout.labels.percentage.show?e.unref(u.dataLabel)({v:l.percentage,s:"%",r:t.value.style.chart.layout.labels.roundingPercentage}):"")+" "+e.toDisplayString(!t.value.style.chart.layout.labels.percentage.show&&t.value.style.chart.layout.labels.value.show?`: ${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(u.dataLabel)({p:l.prefix||"",v:l.value||0,s:l.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:l,seriesIndex:o})}`:`${t.value.style.chart.layout.labels.value.show&&l.value?`(${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(u.dataLabel)({p:l.prefix||"",v:l.value||0,s:l.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:l,seriesIndex:o})})`:""}`),9,Te))],40,Be))),256))])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:n.value},void 0,!0)],14,ge)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(L)})),void 0,!0)])):e.createCommentVNode("",!0),w.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:4,config:{type:"onion",style:{backgroundColor:t.value.style.chart.backgroundColor,onion:{color:t.value.style.chart.layout.gutter.color}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:V},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ie.Legend,{key:0,legendSet:i.value,config:ae.value,onClickMarker:r[2]||(r[2]=({legend:l})=>R(l.id))},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>l.segregate(),style:e.normalizeStyle(`opacity:${c.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name?l.name+": ":"")+" "+e.toDisplayString((l.percentage||0).toFixed(t.value.style.chart.legend.roundingPercentage))+"% ",13,Pe)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:i.value},void 0,!0)],512),e.createVNode(de._sfc_main,{show:p.value.showTooltip&&C.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:y.value,content:B.value,isCustom:e.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),w.value?(e.openBlock(),e.createBlock(he.default,{key:5,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ce.DataTable,{colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[3]||(r[3]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[e.createElementVNode("div",{innerHTML:l},null,8,_e)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},Oe=pe._export_sfc(Ne,[["__scopeId","data-v-92cdbc16"]]);exports.default=Oe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CDK3omwG.cjs"),U=require("./useResponsive-B3TrDDIG.cjs"),se=require("./Title-CR-JDJwq.cjs"),X=require("./usePrinter-vQu-8tRD.cjs"),ie=require("./Legend-BJ2Mynop.cjs"),ce=require("./DataTable-CPAt686N.cjs"),de=require("./Tooltip-B4DNihSF.cjs"),ve=require("./vue-ui-skeleton-DRDC3yxK.cjs"),he=require("./vue-ui-accordion-EVAolVkD.cjs"),G=require("./useNestedProp-CaaW8JIS.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],ge=["xmlns","viewBox"],me=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],ye=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],be=["id"],ke=["stdDeviation"],we=["filter"],Ce=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],xe=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],$e={key:1},Be=["onMouseenter"],Te=["x","y","font-size","fill","font-weight"],Se={key:3,class:"vue-data-ui-watermark"},Pe=["onClick"],_e=["innerHTML"],Ne={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(H,{expose:W,emit:j}){const f=H,{vue_ui_onion:J}=u.useConfig(),w=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(u.createUid()),K=e.ref(null),F=e.ref(0),C=e.ref(!1),B=e.ref(""),c=e.ref([]),y=e.ref(null),I=e.ref(null),V=e.ref(null),t=e.computed(()=>{const a=G.useNestedProp({userConfig:f.config,defaultConfig:J});return a.theme?{...G.useNestedProp({userConfig:u.themes.vue_ui_onion[a.theme]||f.config,defaultConfig:a}),customPalette:u.themePalettes[a.theme]||u.palette}:a}),{isPrinting:E,isImaging:L,generatePdf:D,generateImage:M}=X.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),Q=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),x=e.ref(null);e.onMounted(()=>{if(u.objectIsEmpty(f.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=U.throttle(()=>{const{width:l,height:o}=U.useResponsive({chart:y.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?V.value:null});n.value.width=l,n.value.height=o,n.value.padding.top=Math.max(l,o)*.125,n.value.padding.right=Math.max(l,o)*.125,n.value.padding.bottom=Math.max(l,o)*.125,n.value.padding.left=Math.max(l,o)*.125,n.value.minRadius=Math.min(l,o)*.125});x.value=new ResizeObserver(r),x.value.observe(y.value.parentNode)}}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(f.dataset.forEach((a,r)=>{[null,void 0].includes(a.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(a.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),f.dataset.map((a,r)=>{const l=`onion_serie_${r}_${m.value}`;return{...a,percentage:a.percentage||0,targetPercentage:a.percentage||0,color:u.convertColorToHex(a.color)||Q.value[r]||u.palette[r],id:l,shape:"circle",opacity:c.value.includes(l)?.5:1,absoluteIndex:r,segregate:()=>R(l),isSegregated:c.value.includes(l)}}))),b=e.ref(i.value),Z=e.computed(()=>t.value.useStartAnimation),ee=e.ref(null),te=e.computed(()=>Math.max(...i.value.map(a=>a.percentage))),T=e.ref(!1);e.watch(()=>i.value,le,{immediate:!0});function le(){if(Z.value&&!T.value){let r=function(){a>=te.value?(cancelAnimationFrame(ee.value),b.value=i.value,T.value=!0):(b.value=i.value.map(l=>({...l,percentage:a<l.targetPercentage?a:l.targetPercentage})),a+=1,requestAnimationFrame(r),T.value=!0)};b.value=i.value.map(l=>({...l,percentage:0}));let a=0;r()}else b.value=i.value}const ae=e.computed(()=>({cy:"onion-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":""})),oe=e.computed(()=>i.value.filter(a=>!c.value.includes(a.id)).length),g=e.computed(()=>{const a=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(a>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:a)*t.value.style.chart.layout.gutter.width,track:(a>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:a)*t.value.style.chart.layout.track.width}}),d=e.computed(()=>b.value.filter(a=>!c.value.includes(a.id)).map((a,r)=>{const l=(s.value.maxRadius-g.value.track)/oe.value/2*(1+r),o=s.value.centerY-l;return{percentage:a.percentage||0,...a,labelY:o,radius:l,path:re(l,a.percentage||0)}}));function re(a,r){const l=a*(1.5+(r/100>.3333333333333333?0:1-r/100))*Math.PI,o=a*1.5*Math.PI;return{bgDashArray:`${o} ${o}`,bgDashOffset:o-r/100*o,dashArray:`${l} ${l}`,dashOffset:l-r/100*l,fullOffset:0,active:`M${s.value.centerX},${s.value.centerY} A ${a},${a} 0 0 0 ${s.value.right},${s.value.top}`}}function R(a){c.value.includes(a)?c.value=c.value.filter(r=>r!==a):c.value.push(a),j("selectLegend",d.value)}function ne(){return d.value}const S=e.computed(()=>{const a=[t.value.table.translations.serie,t.value.table.translations.percentage,t.value.table.translations.value],r=d.value.map(l=>[l.name,l.percentage,l.value]);return{head:a,body:r}}),$=e.computed(()=>{const a=S.value.head,r=d.value.map(o=>[`<span style="color:${o.color}">⬤</span> ${o.name}`,`${Number(o.percentage??0).toFixed(t.value.table.td.roundingPercentage).toLocaleString()}%`,`${o.prefix||""}${[null,void 0,NaN,"NaN"].includes(o.value)?"-":o.value.toFixed(t.value.table.td.roundingValue).toLocaleString()}${o.suffix||""}`]),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:r,config:l,colNames:a}});function z(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=S.value.head,l=S.value.body,o=a.concat([r]).concat(l),h=u.createCsvContent(o);u.downloadCsv({csvContent:h,title:t.value.style.chart.title.text||"vue-ui-onion"})})}const v=e.ref(void 0),k=e.ref(!1);function ue(a){k.value=a,F.value+=1}const P=e.ref(null);function A({datapoint:a,seriesIndex:r,show:l=!0}){const o=a.absoluteIndex;v.value=r,P.value={datapoint:a,seriesIndex:o,series:i.value,config:t.value},C.value=l;let h="";const _=t.value.style.chart.tooltip.customFormat;if(u.isFunction(_)&&u.functionReturnsString(()=>_({seriesIndex:o,datapoint:a,series:i.value,config:t.value})))B.value=_({seriesIndex:o,datapoint:a,series:i.value,config:t.value});else{const N=t.value.style.chart.tooltip.showPercentage,O=t.value.style.chart.tooltip.showValue;h+=`<div style="width: 100%; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; padding-bottom: 6px;margin-bottom:3px;display:flex;flex-direction:row;gap:3px;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><span></span>${a.name}</span></div>`,h+=`<div style="width:100%;text-align:left;"><b>${N?u.dataLabel({p:"",v:a.percentage,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}):""}</b> ${N&&O?"(":""}${O?u.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,a.value,u.dataLabel({p:a.prefix||"",v:a.value,s:a.suffix||"",r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:r}):""}${N&&O?")":""}</div>`,B.value=`<div>${h}</div>`}}function q(){p.value.showTable=!p.value.showTable}function Y(){p.value.showTooltip=!p.value.showTooltip}return W({getData:ne,generatePdf:D,generateCsv:z,generateImage:M,toggleTable:q,toggleTooltip:Y}),(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-onion ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"onionChart",ref:y,id:`vue-ui-onion_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:I,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(se._sfc_main,{config:{title:{cy:"onion-div-title",...t.value.style.chart.title},subtitle:{cy:"onion-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&w.value?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:K,key:`user_options${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(L),isPrinting:e.unref(E),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:k.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(D),onGenerateCsv:z,onGenerateImage:e.unref(M),onToggleTable:q,onToggleTooltip:Y},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:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),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),w.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${n.value.width<=0?1e-4:n.value.width} ${n.value.height<=0?1e-4:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:t.value.style.chart.layout.gutter.color,"stroke-width":g.value.gutter,fill:"none","stroke-dasharray":l.path.bgDashArray,"stroke-dashoffset":l.path.fullOffset,"stroke-linecap":"round",class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(v.value)&&v.value!==o}),style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<0?1e-4:l.radius,stroke:`${l.color}`,"stroke-width":g.value.track,fill:"none","stroke-dasharray":l.path.dashArray,"stroke-dashoffset":l.path.dashOffset,class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(v.value)&&v.value!==o}),"stroke-linecap":"round",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,ye))),256)),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.gradientIntensity},null,8,ke)],8,be)]),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",{key:0,filter:`url(#blur_${m.value})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:"white","stroke-width":g.value.track/3,fill:"none","stroke-linecap":"round","stroke-dasharray":l.path.dashArray,"stroke-dashoffset":l.path.dashOffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,Ce))),256))],8,we)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{"data-cy-trap":"",cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:"transparent","stroke-width":Math.max(g.value.track,g.value.gutter),fill:"none","stroke-dasharray":l.path.bgDashArray,"stroke-dashoffset":l.path.fullOffset,"stroke-linecap":"round",class:"vue-ui-onion-path",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"},onMouseenter:h=>A({datapoint:l,show:!0,seriesIndex:o}),onMouseleave:r[0]||(r[0]=h=>{v.value=void 0,C.value=!1})},null,40,xe))),256)),t.value.style.chart.layout.labels.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",{onMouseenter:h=>A({datapoint:l,show:!0,seriesIndex:o}),onMouseleave:r[1]||(r[1]=h=>{v.value=void 0,C.value=!1})},[c.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:0,x:n.value.width/2-g.value.gutter*.8+t.value.style.chart.layout.labels.offsetX,y:l.labelY+t.value.style.chart.layout.labels.offsetY,"text-anchor":"end","font-size":t.value.style.chart.layout.labels.fontSize,fill:t.value.useBlurOnHover&&![null,void 0].includes(v.value)&&v.value===o?l.color:t.value.style.chart.layout.labels.color,"font-weight":t.value.style.chart.layout.labels.bold?"bold":"normal"},e.toDisplayString(l.name?l.name+": ":"")+" "+e.toDisplayString(t.value.style.chart.layout.labels.percentage.show?e.unref(u.dataLabel)({v:l.percentage,s:"%",r:t.value.style.chart.layout.labels.roundingPercentage}):"")+" "+e.toDisplayString(!t.value.style.chart.layout.labels.percentage.show&&t.value.style.chart.layout.labels.value.show?`: ${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(u.dataLabel)({p:l.prefix||"",v:l.value||0,s:l.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:l,seriesIndex:o})}`:`${t.value.style.chart.layout.labels.value.show&&l.value?`(${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(u.dataLabel)({p:l.prefix||"",v:l.value||0,s:l.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:l,seriesIndex:o})})`:""}`),9,Te))],40,Be))),256))])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:n.value},void 0,!0)],14,ge)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(L)})),void 0,!0)])):e.createCommentVNode("",!0),w.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:4,config:{type:"onion",style:{backgroundColor:t.value.style.chart.backgroundColor,onion:{color:t.value.style.chart.layout.gutter.color}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:V},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ie.Legend,{key:0,legendSet:i.value,config:ae.value,onClickMarker:r[2]||(r[2]=({legend:l})=>R(l.id))},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>l.segregate(),style:e.normalizeStyle(`opacity:${c.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name?l.name+": ":"")+" "+e.toDisplayString((l.percentage||0).toFixed(t.value.style.chart.legend.roundingPercentage))+"% ",13,Pe)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:i.value},void 0,!0)],512),e.createVNode(de._sfc_main,{show:p.value.showTooltip&&C.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:y.value,content:B.value,isCustom:e.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),w.value?(e.openBlock(),e.createBlock(he.default,{key:5,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ce.DataTable,{colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[3]||(r[3]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[e.createElementVNode("div",{innerHTML:l},null,8,_e)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},Oe=pe._export_sfc(Ne,[["__scopeId","data-v-92cdbc16"]]);exports.default=Oe;
@@ -1,14 +1,14 @@
1
1
  import { computed as d, ref as u, onMounted as Pe, onBeforeUnmount as Oe, watch as Ie, openBlock as s, createElementBlock as n, normalizeClass as D, normalizeStyle as L, createVNode as j, createCommentVNode as b, createBlock as z, unref as v, createSlots as Fe, withCtx as h, renderSlot as f, normalizeProps as B, guardReactiveProps as V, Fragment as I, renderList as F, createElementVNode as C, toDisplayString as T, createTextVNode as Se, nextTick as Me } from "vue";
2
- import { u as Ne, c as Re, t as Ae, a as De, p as ie, b as Le, o as ze, e as q, d as Be, X as Ve, f as S, i as J, w as ce, q as Ye, r as Xe, x as Ge } from "./index-ByARe6xk.js";
2
+ import { u as Ne, c as Re, t as Ae, a as De, p as ie, b as Le, o as ze, e as q, d as Be, X as Ve, f as S, i as J, w as ce, q as Ye, r as Xe, x as Ge } from "./index-CpHoINpJ.js";
3
3
  import { t as Ue, u as Ee } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as He } from "./Title-Bft_Qodf.js";
5
- import { u as We, U as je } from "./usePrinter-BUBRC6GE.js";
6
- import { L as qe } from "./Legend-Dxg4fgms.js";
7
- import { D as Je } from "./DataTable-Cp8-9z9I.js";
8
- import { _ as Ke } from "./Tooltip-DsJ_DDEa.js";
9
- import Qe from "./vue-ui-skeleton-C2W5etGt.js";
10
- import Ze from "./vue-ui-accordion-B7sGXK-8.js";
11
- import { u as de } from "./useNestedProp-DcnyJpjm.js";
4
+ import { _ as He } from "./Title-xP0rAF4q.js";
5
+ import { u as We, U as je } from "./usePrinter-BHy-mfVg.js";
6
+ import { L as qe } from "./Legend-DB6v_LvZ.js";
7
+ import { D as Je } from "./DataTable-1VV0us-8.js";
8
+ import { _ as Ke } from "./Tooltip-DfBa_7Ur.js";
9
+ import Qe from "./vue-ui-skeleton-DuM6yey6.js";
10
+ import Ze from "./vue-ui-accordion-BZloYo0L.js";
11
+ import { u as de } from "./useNestedProp-BOjw3Yqn.js";
12
12
  import { _ as et } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const tt = ["id"], at = ["xmlns", "viewBox"], lt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], ot = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], rt = ["id"], st = ["stdDeviation"], ut = ["filter"], nt = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], it = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "onMouseenter"], ct = { key: 1 }, dt = ["onMouseenter"], vt = ["x", "y", "font-size", "fill", "font-weight"], ht = {
14
14
  key: 3,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-vvhNQFio.cjs"),K=require("./useResponsive-B3TrDDIG.cjs"),de=require("./Title-JorKJ3kW.cjs"),ve=require("./Legend-Bkl0mNRU.cjs"),he=require("./Tooltip-DuhcODsb.cjs"),pe=require("./Shape-BqcaWTo1.cjs"),Q=require("./usePrinter-D5ewpTd3.cjs"),me=require("./DataTable-BRux41DB.cjs"),ye=require("./vue-ui-accordion-CSnFq9e7.cjs"),fe=require("./vue-ui-skeleton-H7E3SBMd.cjs"),Z=require("./useNestedProp-BUoCZrmY.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],ke=["xmlns","viewBox"],xe={style:{"pointer-events":"none"}},Ce=["x1","x2","y1","y2","stroke","stroke-width"],we=["x","y","fill","font-size","font-weight"],Be=["x1","x2","y1","y2","stroke","stroke-width"],ze=["x","y","fill","font-size","font-weight"],$e={key:0},Se=["x","y","font-size","fill"],Ne=["width","x","y"],Te={style:{width:"100%"}},Fe=["x","y","fill","font-weight","font-size","onMouseenter"],_e=["d","stroke","stroke-width","onMouseenter"],Pe={key:3,class:"vue-data-ui-watermark"},Ae=["onClick"],Me=["innerHTML"],Le={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ee,{expose:te,emit:M}){const k=ee,{vue_ui_parallel_coordinate_plot:le}=i.useConfig(),x=e.computed({get(){return!!k.dataset&&k.dataset.length},set(a){return a}}),L=e.ref(0),w=e.ref(null),E=e.ref(null),I=e.ref(null),N=e.ref(i.createUid()),B=e.ref(!1);function ae(a){B.value=a,L.value+=1}const t=e.computed(()=>{const a=Z.useNestedProp({userConfig:k.config,defaultConfig:le});return a.theme?{...Z.useNestedProp({userConfig:i.themes.vue_ui_parallel_coordinate_plot[a.theme]||k.config,defaultConfig:a}),customPalette:i.themePalettes[a.theme]||i.palette}:a}),$=e.ref(null);e.onMounted(()=>{if(i.objectIsEmpty(k.dataset)?i.error({componentName:"VueUiParallelCoordinatePlot",type:"dataset"}):k.dataset.forEach((a,o)=>{i.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","series"]}).forEach(l=>{x.value=!1,i.error({componentName:"VueUiParallelCoordinatePlot",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=K.throttle(()=>{const{width:o,height:l}=K.useResponsive({chart:w.value,title:t.value.style.chart.title.text?E.value:null,legend:t.value.style.chart.legend.show?I.value:null});c.value.width=o,c.value.height=l,c.value.plotSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),c.value.ticksFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),c.value.datapointFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),c.value.axisNameFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})});$.value=new ResizeObserver(a),$.value.observe(w.value.parentNode)}}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:V,isImaging:D,generatePdf:O,generateImage:q}=Q.usePrinter({elementId:`pcp_${N.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"}),c=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width,plotSize:t.value.style.chart.plots.radius,ticksFontSize:t.value.style.chart.yAxis.labels.ticks.fontSize,datapointFontSize:t.value.style.chart.yAxis.labels.datapoints.fontSize,axisNameFontSize:t.value.style.chart.yAxis.labels.axisNamesFontSize}),d=e.computed(()=>{const{top:a,right:o,bottom:l,left:s}=t.value.style.chart.padding,r=c.value.height,n=c.value.width;return{chartHeight:r,chartWidth:n,height:r-a-l,width:n-s-o,top:a,left:s,right:n-o,bottom:r-l}}),oe=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),m=e.ref({dataLabels:{show:t.value.style.chart.yAxis.labels.datapoints.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),f=e.ref([]);function R(a){f.value.includes(a)?f.value=f.value.filter(o=>o!==a):f.value.push(a)}const b=e.computed(()=>k.dataset.map((a,o)=>{const l=i.convertColorToHex(a.color)||oe.value[o]||i.palette[o]||i.palette[o%i.palette.length];return{...a,series:a.series.map(s=>({...s,id:i.createUid(),color:l})),seriesIndex:o,color:l,id:i.createUid(),shape:a.shape||"circle"}})),se=e.computed(()=>b.value.map(a=>({...a,opacity:f.value.includes(a.id)?.5:1,segregate:()=>R(a.id),isSegregated:f.value.includes(a.id)}))),ne=e.computed(()=>({cy:"pcp-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),U=e.computed(()=>Math.max(...b.value.filter(a=>!f.value.includes(a.id)).map(a=>Math.max(...a.series.flatMap(o=>o.values.length))))),y=e.computed(()=>d.value.width/U.value),T=e.computed(()=>b.value.filter(a=>!f.value.includes(a.id))),p=e.computed(()=>{let a=[];for(let o=0;o<U.value;o+=1){const l=Math.min(...T.value.flatMap(v=>v.series.map(S=>S.values[o]||0)||0)),s=Math.max(...T.value.flatMap(v=>v.series.map(S=>S.values[o]||0)||0)),r=s===l?l/4:l,n=s===l?s*2:s,u=i.calculateNiceScale(r,n,t.value.style.chart.yAxis.scaleTicks),g=u.ticks.map((v,S)=>{const ue=u.min<0?v+Math.abs(u.min):v-Math.abs(u.min),ce=u.min<0?u.max+Math.abs(u.min):u.max-Math.abs(u.min);return{y:d.value.bottom-d.value.height*(ue/ce),x:d.value.left+y.value*o+y.value/2,value:v}});a.push({scale:u,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return a}),F=e.computed(()=>T.value.map((a,o)=>({...a,series:a.series.map((l,s)=>({...l,datapoints:l.values.map((r,n)=>{const u=p.value[n].scale.min<0?(r||0)+Math.abs(p.value[n].scale.min):(r||0)-Math.abs(p.value[n].scale.min),g=p.value[n].scale.min<0?p.value[n].scale.max+Math.abs(p.value[n].scale.min):p.value[n].scale.max-Math.abs(p.value[n].scale.min);return{name:l.name,seriesName:a.name,axisIndex:n,datapointIndex:s,seriesIndex:o,value:r||0,x:d.value.left+y.value*n+y.value/2,y:d.value.bottom-d.value.height*(u/g),comment:l.comments&&l.comments[n]||""}})}))})).map(a=>({...a,series:a.series.map(o=>{const l=i.createStraightPath(o.datapoints),s=i.createSmoothPath(o.datapoints,.12),r=i.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${s}`:`M ${l}`);return{...o,smoothPath:s,straightPath:l,pathLength:r}})})));function W({value:a,index:o,datapoint:l}){return i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[o]||null,a,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[o]||"",v:a,s:t.value.style.chart.yAxis.labels.suffixes[o]||"",r:t.value.style.chart.yAxis.labels.roundings[o]||0}),{datapoint:l,seriesIndex:o})}const h=e.ref(null),_=e.ref(null),z=e.ref(!1),P=e.ref("");function A({shape:a,serieName:o,serie:l,relativeIndex:s,seriesIndex:r}){_.value={serie:l,relativeIndex:s,seriesIndex:r,series:b.value,scales:p.value},z.value=!0,h.value=l.id;let n="";const u=t.value.style.chart.tooltip.customFormat;i.isFunction(u)&&i.functionReturnsString(()=>u({serie:l,seriesIndex:l.seriesIndex,series:b.value,config:t.value,scales:p.value}))?P.value=u({serie:l,seriesIndex:l.seriesIndex,series:b.value,config:t.value,scales:p.value}):(n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o?o+" - ":""}${l.name}</div>`,p.value.map(g=>g.name).forEach((g,v)=>{n+=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-CDK3omwG.cjs"),K=require("./useResponsive-B3TrDDIG.cjs"),de=require("./Title-CR-JDJwq.cjs"),ve=require("./Legend-BJ2Mynop.cjs"),he=require("./Tooltip-B4DNihSF.cjs"),pe=require("./Shape-DWZSJJ6-.cjs"),Q=require("./usePrinter-vQu-8tRD.cjs"),me=require("./DataTable-CPAt686N.cjs"),ye=require("./vue-ui-accordion-EVAolVkD.cjs"),fe=require("./vue-ui-skeleton-DRDC3yxK.cjs"),Z=require("./useNestedProp-CaaW8JIS.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],ke=["xmlns","viewBox"],xe={style:{"pointer-events":"none"}},Ce=["x1","x2","y1","y2","stroke","stroke-width"],we=["x","y","fill","font-size","font-weight"],Be=["x1","x2","y1","y2","stroke","stroke-width"],ze=["x","y","fill","font-size","font-weight"],$e={key:0},Se=["x","y","font-size","fill"],Ne=["width","x","y"],Te={style:{width:"100%"}},Fe=["x","y","fill","font-weight","font-size","onMouseenter"],_e=["d","stroke","stroke-width","onMouseenter"],Pe={key:3,class:"vue-data-ui-watermark"},Ae=["onClick"],Me=["innerHTML"],Le={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ee,{expose:te,emit:M}){const k=ee,{vue_ui_parallel_coordinate_plot:le}=i.useConfig(),x=e.computed({get(){return!!k.dataset&&k.dataset.length},set(a){return a}}),L=e.ref(0),w=e.ref(null),E=e.ref(null),I=e.ref(null),N=e.ref(i.createUid()),B=e.ref(!1);function ae(a){B.value=a,L.value+=1}const t=e.computed(()=>{const a=Z.useNestedProp({userConfig:k.config,defaultConfig:le});return a.theme?{...Z.useNestedProp({userConfig:i.themes.vue_ui_parallel_coordinate_plot[a.theme]||k.config,defaultConfig:a}),customPalette:i.themePalettes[a.theme]||i.palette}:a}),$=e.ref(null);e.onMounted(()=>{if(i.objectIsEmpty(k.dataset)?i.error({componentName:"VueUiParallelCoordinatePlot",type:"dataset"}):k.dataset.forEach((a,o)=>{i.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","series"]}).forEach(l=>{x.value=!1,i.error({componentName:"VueUiParallelCoordinatePlot",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=K.throttle(()=>{const{width:o,height:l}=K.useResponsive({chart:w.value,title:t.value.style.chart.title.text?E.value:null,legend:t.value.style.chart.legend.show?I.value:null});c.value.width=o,c.value.height=l,c.value.plotSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),c.value.ticksFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),c.value.datapointFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),c.value.axisNameFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})});$.value=new ResizeObserver(a),$.value.observe(w.value.parentNode)}}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:V,isImaging:D,generatePdf:O,generateImage:q}=Q.usePrinter({elementId:`pcp_${N.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"}),c=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width,plotSize:t.value.style.chart.plots.radius,ticksFontSize:t.value.style.chart.yAxis.labels.ticks.fontSize,datapointFontSize:t.value.style.chart.yAxis.labels.datapoints.fontSize,axisNameFontSize:t.value.style.chart.yAxis.labels.axisNamesFontSize}),d=e.computed(()=>{const{top:a,right:o,bottom:l,left:s}=t.value.style.chart.padding,r=c.value.height,n=c.value.width;return{chartHeight:r,chartWidth:n,height:r-a-l,width:n-s-o,top:a,left:s,right:n-o,bottom:r-l}}),oe=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),m=e.ref({dataLabels:{show:t.value.style.chart.yAxis.labels.datapoints.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),f=e.ref([]);function R(a){f.value.includes(a)?f.value=f.value.filter(o=>o!==a):f.value.push(a)}const b=e.computed(()=>k.dataset.map((a,o)=>{const l=i.convertColorToHex(a.color)||oe.value[o]||i.palette[o]||i.palette[o%i.palette.length];return{...a,series:a.series.map(s=>({...s,id:i.createUid(),color:l})),seriesIndex:o,color:l,id:i.createUid(),shape:a.shape||"circle"}})),se=e.computed(()=>b.value.map(a=>({...a,opacity:f.value.includes(a.id)?.5:1,segregate:()=>R(a.id),isSegregated:f.value.includes(a.id)}))),ne=e.computed(()=>({cy:"pcp-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),U=e.computed(()=>Math.max(...b.value.filter(a=>!f.value.includes(a.id)).map(a=>Math.max(...a.series.flatMap(o=>o.values.length))))),y=e.computed(()=>d.value.width/U.value),T=e.computed(()=>b.value.filter(a=>!f.value.includes(a.id))),p=e.computed(()=>{let a=[];for(let o=0;o<U.value;o+=1){const l=Math.min(...T.value.flatMap(v=>v.series.map(S=>S.values[o]||0)||0)),s=Math.max(...T.value.flatMap(v=>v.series.map(S=>S.values[o]||0)||0)),r=s===l?l/4:l,n=s===l?s*2:s,u=i.calculateNiceScale(r,n,t.value.style.chart.yAxis.scaleTicks),g=u.ticks.map((v,S)=>{const ue=u.min<0?v+Math.abs(u.min):v-Math.abs(u.min),ce=u.min<0?u.max+Math.abs(u.min):u.max-Math.abs(u.min);return{y:d.value.bottom-d.value.height*(ue/ce),x:d.value.left+y.value*o+y.value/2,value:v}});a.push({scale:u,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return a}),F=e.computed(()=>T.value.map((a,o)=>({...a,series:a.series.map((l,s)=>({...l,datapoints:l.values.map((r,n)=>{const u=p.value[n].scale.min<0?(r||0)+Math.abs(p.value[n].scale.min):(r||0)-Math.abs(p.value[n].scale.min),g=p.value[n].scale.min<0?p.value[n].scale.max+Math.abs(p.value[n].scale.min):p.value[n].scale.max-Math.abs(p.value[n].scale.min);return{name:l.name,seriesName:a.name,axisIndex:n,datapointIndex:s,seriesIndex:o,value:r||0,x:d.value.left+y.value*n+y.value/2,y:d.value.bottom-d.value.height*(u/g),comment:l.comments&&l.comments[n]||""}})}))})).map(a=>({...a,series:a.series.map(o=>{const l=i.createStraightPath(o.datapoints),s=i.createSmoothPath(o.datapoints,.12),r=i.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${s}`:`M ${l}`);return{...o,smoothPath:s,straightPath:l,pathLength:r}})})));function W({value:a,index:o,datapoint:l}){return i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[o]||null,a,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[o]||"",v:a,s:t.value.style.chart.yAxis.labels.suffixes[o]||"",r:t.value.style.chart.yAxis.labels.roundings[o]||0}),{datapoint:l,seriesIndex:o})}const h=e.ref(null),_=e.ref(null),z=e.ref(!1),P=e.ref("");function A({shape:a,serieName:o,serie:l,relativeIndex:s,seriesIndex:r}){_.value={serie:l,relativeIndex:s,seriesIndex:r,series:b.value,scales:p.value},z.value=!0,h.value=l.id;let n="";const u=t.value.style.chart.tooltip.customFormat;i.isFunction(u)&&i.functionReturnsString(()=>u({serie:l,seriesIndex:l.seriesIndex,series:b.value,config:t.value,scales:p.value}))?P.value=u({serie:l,seriesIndex:l.seriesIndex,series:b.value,config:t.value,scales:p.value}):(n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o?o+" - ":""}${l.name}</div>`,p.value.map(g=>g.name).forEach((g,v)=>{n+=`
2
2
  <div class="vue-ui-tooltip-item" style="text-align:left">
3
3
  <span>${g}: </span>
4
4
  <span>
@@ -1,15 +1,15 @@
1
1
  import { computed as y, ref as f, onMounted as Ne, onBeforeUnmount as Pe, openBlock as u, createElementBlock as i, normalizeClass as E, normalizeStyle as _, createVNode as K, createCommentVNode as g, createBlock as D, unref as T, createSlots as Le, withCtx as b, renderSlot as x, normalizeProps as j, guardReactiveProps as R, Fragment as C, renderList as z, createElementVNode as I, toDisplayString as P, createTextVNode as Se } from "vue";
2
- import { u as Oe, c as Q, t as De, a as We, p as U, o as Be, e as ye, g as Ee, b as je, d as Re, A as Ue, L as Ve, M as Ge, N as He, X as Xe, w as fe, i as ge, f as be, x as Ye, q as qe, r as Je, C as V } from "./index-ByARe6xk.js";
2
+ import { u as Oe, c as Q, t as De, a as We, p as U, o as Be, e as ye, g as Ee, b as je, d as Re, A as Ue, M as Ve, N as Ge, O as He, X as Xe, w as fe, i as ge, f as be, x as Ye, q as qe, r as Je, C as V } from "./index-CpHoINpJ.js";
3
3
  import { t as Ke, u as Qe } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as Ze } from "./Title-Bft_Qodf.js";
5
- import { L as et } from "./Legend-Dxg4fgms.js";
6
- import { _ as tt } from "./Tooltip-DsJ_DDEa.js";
7
- import { _ as at } from "./Shape-9atoPZLR.js";
8
- import { u as lt, U as ot } from "./usePrinter-BUBRC6GE.js";
9
- import { D as st } from "./DataTable-Cp8-9z9I.js";
10
- import nt from "./vue-ui-accordion-B7sGXK-8.js";
11
- import ut from "./vue-ui-skeleton-C2W5etGt.js";
12
- import { u as xe } from "./useNestedProp-DcnyJpjm.js";
4
+ import { _ as Ze } from "./Title-xP0rAF4q.js";
5
+ import { L as et } from "./Legend-DB6v_LvZ.js";
6
+ import { _ as tt } from "./Tooltip-DfBa_7Ur.js";
7
+ import { _ as at } from "./Shape-B_f1_6Ob.js";
8
+ import { u as lt, U as ot } from "./usePrinter-BHy-mfVg.js";
9
+ import { D as st } from "./DataTable-1VV0us-8.js";
10
+ import nt from "./vue-ui-accordion-BZloYo0L.js";
11
+ import ut from "./vue-ui-skeleton-DuM6yey6.js";
12
+ import { u as xe } from "./useNestedProp-BOjw3Yqn.js";
13
13
  import { _ as it } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
14
  const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events": "none" } }, dt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ht = ["x", "y", "fill", "font-size", "font-weight"], pt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], mt = ["x", "y", "fill", "font-size", "font-weight"], yt = { key: 0 }, ft = ["x", "y", "font-size", "fill"], gt = ["width", "x", "y"], bt = { style: { width: "100%" } }, xt = ["x", "y", "fill", "font-weight", "font-size", "onMouseenter"], kt = ["d", "stroke", "stroke-width", "onMouseenter"], Ct = {
15
15
  key: 3,
@@ -1,17 +1,17 @@
1
- import { computed as m, ref as h, onMounted as Oe, onBeforeUnmount as He, watch as Ie, openBlock as s, createElementBlock as i, normalizeClass as T, normalizeStyle as L, createVNode as ee, createCommentVNode as c, createBlock as U, unref as y, createSlots as De, withCtx as k, renderSlot as _, normalizeProps as te, guardReactiveProps as le, createElementVNode as v, Fragment as S, renderList as X, toDisplayString as x, createTextVNode as Ee, nextTick as Ue } from "vue";
2
- import { u as Ge, c as ze, t as Qe, a as Je, p as ie, o as je, e as R, b as Ze, v as ae, d as Ke, i as A, f as V, X as et, s as tt, O as lt, D as at, w as ut, x as ot, q as st, r as rt } from "./index-ByARe6xk.js";
1
+ import { computed as m, ref as h, onMounted as He, onBeforeUnmount as Oe, watch as Ie, openBlock as s, createElementBlock as i, normalizeClass as T, normalizeStyle as L, createVNode as ee, createCommentVNode as c, createBlock as U, unref as y, createSlots as De, withCtx as k, renderSlot as _, normalizeProps as te, guardReactiveProps as le, createElementVNode as v, Fragment as S, renderList as X, toDisplayString as x, createTextVNode as Ee, nextTick as Ue } from "vue";
2
+ import { u as Ge, c as ze, t as Qe, a as Je, p as ie, o as je, e as R, b as Ze, v as ae, d as Ke, i as A, f as P, X as et, s as tt, P as lt, D as at, w as ut, x as ot, q as st, r as rt } from "./index-CpHoINpJ.js";
3
3
  import { t as it, u as nt } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as vt } from "./Title-Bft_Qodf.js";
5
- import { u as dt, U as ct } from "./usePrinter-BUBRC6GE.js";
6
- import { _ as ht } from "./Tooltip-DsJ_DDEa.js";
7
- import { _ as Te } from "./Shape-9atoPZLR.js";
8
- import { L as yt } from "./Legend-Dxg4fgms.js";
9
- import { D as bt } from "./DataTable-Cp8-9z9I.js";
10
- import ft from "./vue-ui-skeleton-C2W5etGt.js";
11
- import pt from "./vue-ui-accordion-B7sGXK-8.js";
12
- import { u as We } from "./useNestedProp-DcnyJpjm.js";
4
+ import { _ as vt } from "./Title-xP0rAF4q.js";
5
+ import { u as dt, U as ct } from "./usePrinter-BHy-mfVg.js";
6
+ import { _ as ht } from "./Tooltip-DfBa_7Ur.js";
7
+ import { _ as Te } from "./Shape-B_f1_6Ob.js";
8
+ import { L as yt } from "./Legend-DB6v_LvZ.js";
9
+ import { D as bt } from "./DataTable-1VV0us-8.js";
10
+ import ft from "./vue-ui-skeleton-DuM6yey6.js";
11
+ import pt from "./vue-ui-accordion-BZloYo0L.js";
12
+ import { u as We } from "./useNestedProp-BOjw3Yqn.js";
13
13
  import { _ as gt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
- const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-color"], Lt = ["stop-color"], wt = { key: 0 }, qt = ["fill", "x", "y", "height", "width", "stroke-width", "stroke", "rx"], _t = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], St = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ct = { key: 1 }, zt = ["points", "fill"], Tt = ["points", "fill"], Wt = ["points", "fill"], Xt = ["points", "fill"], Yt = { key: 2 }, Mt = ["y", "fill", "font-size"], Nt = ["x", "y", "fill", "font-size"], At = ["x", "y", "fill", "font-size"], Vt = ["y", "fill", "font-size"], Bt = { key: 3 }, Pt = ["x", "y", "font-size", "fill"], Rt = ["x", "y", "font-size", "fill"], Ft = ["x", "y", "font-size", "fill"], Ot = ["id", "font-size", "transform", "fill"], Ht = ["id", "font-size", "transform", "fill"], It = ["id", "font-size", "transform", "fill"], Dt = { key: 4 }, Et = ["fill", "points"], Ut = ["x", "y", "width", "height"], Gt = ["x", "y", "width", "height"], Qt = ["x", "y", "width", "height"], Jt = ["x", "y", "width", "height"], jt = { key: 0 }, Zt = ["x", "y", "font-size", "fill"], Kt = { key: 0 }, el = ["x", "y", "onMouseover", "onClick"], tl = {
14
+ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-color"], Lt = ["stop-color"], wt = { key: 0 }, qt = ["fill", "x", "y", "height", "width", "stroke-width", "stroke", "rx"], _t = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], St = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ct = { key: 1 }, zt = ["points", "fill"], Tt = ["points", "fill"], Wt = ["points", "fill"], Xt = ["points", "fill"], Yt = { key: 2 }, Mt = ["y", "fill", "font-size"], Nt = ["x", "y", "fill", "font-size"], At = ["x", "y", "fill", "font-size"], Pt = ["y", "fill", "font-size"], Vt = { key: 3 }, Bt = ["x", "y", "font-size", "fill"], Rt = ["x", "y", "font-size", "fill"], Ft = ["x", "y", "font-size", "fill"], Ht = ["id", "font-size", "transform", "fill"], Ot = ["id", "font-size", "transform", "fill"], It = ["id", "font-size", "transform", "fill"], Dt = { key: 4 }, Et = ["fill", "points"], Ut = ["x", "y", "width", "height"], Gt = ["x", "y", "width", "height"], Qt = ["x", "y", "width", "height"], Jt = ["x", "y", "width", "height"], jt = { key: 0 }, Zt = ["x", "y", "font-size", "fill"], Kt = { key: 0 }, el = ["x", "y", "onMouseover", "onClick"], tl = {
15
15
  key: 7,
16
16
  class: "vue-ui-dna"
17
17
  }, ll = ["points", "fill"], al = ["points", "fill"], ul = ["points", "fill"], ol = ["points", "fill"], sl = { key: 8 }, rl = ["x", "y", "font-size", "fill", "font-weight"], il = { key: 9 }, nl = ["x", "y", "fill"], vl = ["x", "y", "fill"], dl = ["x", "y", "fill"], cl = ["x", "y", "fill"], hl = ["stroke", "d"], yl = ["stroke", "d"], bl = {
@@ -53,7 +53,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
53
53
  customPalette: Je[l.theme] || ie
54
54
  } : l;
55
55
  }), J = h(null);
56
- Oe(() => {
56
+ He(() => {
57
57
  if (je(Y.dataset) ? R({
58
58
  componentName: "VueUiQuadrant",
59
59
  type: "dataset"
@@ -88,7 +88,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
88
88
  });
89
89
  J.value = new ResizeObserver(l), J.value.observe(F.value.parentNode);
90
90
  }
91
- }), He(() => {
91
+ }), Oe(() => {
92
92
  J.value && J.value.disconnect();
93
93
  });
94
94
  const { isPrinting: ce, isImaging: he, generatePdf: ye, generateImage: be } = dt({
@@ -124,7 +124,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
124
124
  startY: 0
125
125
  });
126
126
  }, { deep: !0 });
127
- const n = h(null), B = m(() => {
127
+ const n = h(null), V = m(() => {
128
128
  switch (n.value) {
129
129
  case "TL":
130
130
  return {
@@ -166,7 +166,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
166
166
  return { x: 0, y: 0, text: "", fontSize: 0, fill: "none", bold: !1 };
167
167
  }
168
168
  }), Ae = h(null), j = h(!1);
169
- function O({ targetX: l, targetY: u, targetW: a, targetH: o, side: r }) {
169
+ function H({ targetX: l, targetY: u, targetW: a, targetH: o, side: r }) {
170
170
  n.value && D(r);
171
171
  const b = {
172
172
  x: l - d.value.startX,
@@ -183,7 +183,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
183
183
  function M(l) {
184
184
  if (!j.value)
185
185
  if (p.value && n.value === l)
186
- O({
186
+ H({
187
187
  targetX: 0,
188
188
  targetY: 0,
189
189
  targetW: e.value.width,
@@ -192,7 +192,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
192
192
  else {
193
193
  switch (n.value = l, l) {
194
194
  case "TL":
195
- O({
195
+ H({
196
196
  targetX: 0,
197
197
  targetY: 0,
198
198
  targetW: e.value.width / 2 + e.value.left,
@@ -201,7 +201,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
201
201
  });
202
202
  break;
203
203
  case "TR":
204
- O({
204
+ H({
205
205
  targetX: e.value.width / 2 - e.value.left,
206
206
  targetY: 0,
207
207
  targetW: e.value.width / 2 + e.value.left,
@@ -210,7 +210,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
210
210
  });
211
211
  break;
212
212
  case "BR":
213
- O({
213
+ H({
214
214
  targetX: e.value.width / 2 - e.value.left,
215
215
  targetY: e.value.height / 2 - e.value.top,
216
216
  targetW: e.value.width / 2 + e.value.left,
@@ -219,7 +219,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
219
219
  });
220
220
  break;
221
221
  case "BL":
222
- O({
222
+ H({
223
223
  targetX: 0,
224
224
  targetY: e.value.height / 2 - e.value.top,
225
225
  targetW: e.value.width / 2 + e.value.left,
@@ -234,7 +234,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
234
234
  p.value = !0;
235
235
  }
236
236
  }
237
- const Ve = m(() => {
237
+ const Pe = m(() => {
238
238
  const l = t.value.style.chart.layout.grid.graduations.steps, u = e.value.usableWidth / (l * 2), a = e.value.top, o = [];
239
239
  for (let r = 0; r < l; r += 1)
240
240
  o.push({
@@ -247,7 +247,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
247
247
  return o;
248
248
  }), q = m(() => {
249
249
  let l = t.value.style.chart.layout.grid.xAxis.max, u = t.value.style.chart.layout.grid.xAxis.min, a = t.value.style.chart.layout.grid.yAxis.max, o = t.value.style.chart.layout.grid.yAxis.min;
250
- return t.value.style.chart.layout.grid.xAxis.auto && (l = Math.max(...P.value.flatMap((r) => r.series.map((b) => b.x))), u = Math.min(...P.value.flatMap((r) => r.series.map((b) => b.x)))), t.value.style.chart.layout.grid.yAxis.auto && (a = Math.max(...P.value.flatMap((r) => r.series.map((b) => b.y))), o = Math.min(...P.value.flatMap((r) => r.series.map((b) => b.y)))), {
250
+ return t.value.style.chart.layout.grid.xAxis.auto && (l = Math.max(...B.value.flatMap((r) => r.series.map((b) => b.x))), u = Math.min(...B.value.flatMap((r) => r.series.map((b) => b.x)))), t.value.style.chart.layout.grid.yAxis.auto && (a = Math.max(...B.value.flatMap((r) => r.series.map((b) => b.y))), o = Math.min(...B.value.flatMap((r) => r.series.map((b) => b.y)))), {
251
251
  x: {
252
252
  max: l,
253
253
  min: u
@@ -257,11 +257,11 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
257
257
  min: o
258
258
  }
259
259
  };
260
- }), N = h([]), P = m(() => Y.dataset.map((l, u) => ({
260
+ }), N = h([]), B = m(() => Y.dataset.map((l, u) => ({
261
261
  ...l,
262
262
  id: `cat_${u}_${z.value}`,
263
263
  color: Ke(l.color) || fe.value[u] || ie[u]
264
- }))), Be = m(() => P.value.filter((l) => !N.value.includes(l.id))), Pe = m(() => P.value.map((l, u) => ({
264
+ }))), Ve = m(() => B.value.filter((l) => !N.value.includes(l.id))), Be = m(() => B.value.map((l, u) => ({
265
265
  ...l,
266
266
  shape: l.shape || "circle",
267
267
  series: l.series.map((a) => ({
@@ -291,7 +291,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
291
291
  index: o
292
292
  });
293
293
  });
294
- }), Be.value.map((l, u) => ({
294
+ }), Ve.value.map((l, u) => ({
295
295
  ...l,
296
296
  shape: l.shape || "circle",
297
297
  color: l.color || fe.value[u] || ie[u],
@@ -352,7 +352,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
352
352
  A(
353
353
  t.value.style.chart.layout.labels.plotLabels.x.formatter,
354
354
  o.x,
355
- V({
355
+ P({
356
356
  v: o.x,
357
357
  r: t.value.style.chart.layout.labels.plotLabels.rounding
358
358
  })
@@ -360,7 +360,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
360
360
  A(
361
361
  t.value.style.chart.layout.labels.plotLabels.y.formatter,
362
362
  o.y,
363
- V({
363
+ P({
364
364
  v: o.y,
365
365
  r: t.value.style.chart.layout.labels.plotLabels.rounding
366
366
  })
@@ -386,7 +386,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
386
386
  const u = Le();
387
387
  ue("selectLegend", u);
388
388
  }
389
- const me = m(() => Pe.value.map((l) => ({
389
+ const me = m(() => Be.value.map((l) => ({
390
390
  name: l.name,
391
391
  shape: l.shape,
392
392
  color: l.color,
@@ -416,9 +416,9 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
416
416
  return "";
417
417
  }
418
418
  }
419
- const H = h(null), I = h(null), re = h(null);
419
+ const O = h(null), I = h(null), re = h(null);
420
420
  function $e(l, u, a) {
421
- H.value = u.uid, I.value = {
421
+ O.value = u.uid, I.value = {
422
422
  color: l.color,
423
423
  shape: l.shape
424
424
  }, re.value = {
@@ -445,7 +445,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
445
445
  u.quadrantSide && (r += `<div style="color:${t.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].color};font-weight:${t.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].bold ? "bold" : "400"}">${t.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}</div>`), r += `<div>${l.name}</div>`, r += `<div style="padding-bottom:6px;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};margin-bottom:3px">${u.name}</div>`, r += `<div>${t.value.style.chart.layout.grid.xAxis.name ? t.value.style.chart.layout.grid.xAxis.name : "x"}: <b>${A(
446
446
  t.value.style.chart.layout.labels.plotLabels.x.formatter,
447
447
  u.xValue,
448
- V({
448
+ P({
449
449
  v: u.xValue,
450
450
  r: t.value.style.chart.tooltip.roundingValue
451
451
  }),
@@ -453,7 +453,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
453
453
  )}</b></div>`, r += `<div>${t.value.style.chart.layout.grid.yAxis.name ? t.value.style.chart.layout.grid.yAxis.name : "y"}: <b>${A(
454
454
  t.value.style.chart.layout.labels.plotLabels.y.formatter,
455
455
  u.yValue,
456
- V({
456
+ P({
457
457
  v: u.yValue,
458
458
  r: t.value.style.chart.tooltip.roundingValue
459
459
  }),
@@ -766,7 +766,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
766
766
  ], 8, $t))), 256))
767
767
  ]),
768
768
  t.value.style.chart.layout.grid.graduations.show ? (s(), i("g", wt, [
769
- (s(!0), i(S, null, X(Ve.value, (a) => (s(), i("rect", {
769
+ (s(!0), i(S, null, X(Pe.value, (a) => (s(), i("rect", {
770
770
  fill: t.value.style.chart.layout.grid.graduations.fill ? `${t.value.style.chart.layout.grid.graduations.color}${a.opacity}` : "none",
771
771
  x: a.x,
772
772
  y: a.y,
@@ -855,9 +855,9 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
855
855
  "font-size": t.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,
856
856
  style: L(`font-weight:${t.value.style.chart.layout.labels.quadrantLabels.bl.bold ? "bold" : ""}`),
857
857
  onClick: u[3] || (u[3] = (a) => D("bl"))
858
- }, x(t.value.style.chart.layout.labels.quadrantLabels.bl.text), 13, Vt)) : c("", !0)
858
+ }, x(t.value.style.chart.layout.labels.quadrantLabels.bl.text), 13, Pt)) : c("", !0)
859
859
  ])) : c("", !0),
860
- t.value.style.chart.layout.labels.axisLabels.show ? (s(), i("g", Bt, [
860
+ t.value.style.chart.layout.labels.axisLabels.show ? (s(), i("g", Vt, [
861
861
  v("text", {
862
862
  x: e.value.centerX,
863
863
  y: e.value.top - e.value.padding / 6,
@@ -867,11 +867,11 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
867
867
  }, x(y(A)(
868
868
  t.value.style.chart.layout.labels.plotLabels.y.formatter,
869
869
  q.value.y.max,
870
- y(V)({
870
+ y(P)({
871
871
  v: q.value.y.max,
872
872
  r: t.value.style.chart.layout.labels.plotLabels.rounding
873
873
  })
874
- )), 9, Pt),
874
+ )), 9, Bt),
875
875
  v("text", {
876
876
  x: e.value.centerX,
877
877
  y: e.value.top - e.value.padding / 2,
@@ -888,7 +888,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
888
888
  }, x(y(A)(
889
889
  t.value.style.chart.layout.labels.plotLabels.y.formatter,
890
890
  q.value.y.min,
891
- y(V)({
891
+ y(P)({
892
892
  v: q.value.y.min,
893
893
  r: t.value.style.chart.layout.labels.plotLabels.rounding
894
894
  })
@@ -902,11 +902,11 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
902
902
  }, x(y(A)(
903
903
  t.value.style.chart.layout.labels.plotLabels.x.formatter,
904
904
  q.value.x.min,
905
- y(V)({
905
+ y(P)({
906
906
  v: q.value.x.min,
907
907
  r: t.value.style.chart.layout.labels.plotLabels.rounding
908
908
  })
909
- )), 9, Ot),
909
+ )), 9, Ht),
910
910
  v("text", {
911
911
  id: `xLabelMax_${z.value}`,
912
912
  "text-anchor": "middle",
@@ -916,11 +916,11 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
916
916
  }, x(y(A)(
917
917
  t.value.style.chart.layout.labels.plotLabels.x.formatter,
918
918
  q.value.x.max,
919
- y(V)({
919
+ y(P)({
920
920
  v: q.value.x.max,
921
921
  r: t.value.style.chart.layout.labels.plotLabels.rounding
922
922
  })
923
- )), 9, Ht),
923
+ )), 9, Ot),
924
924
  v("text", {
925
925
  id: `xLabelMaxName_${z.value}`,
926
926
  "text-anchor": "middle",
@@ -988,7 +988,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
988
988
  y: r.y - t.value.style.chart.layout.labels.plotLabels.fontSize,
989
989
  onMouseover: (b) => $e(a, r, o),
990
990
  onMouseleave: u[9] || (u[9] = (b) => {
991
- Q.value = !1, H.value = null, I.value = null;
991
+ Q.value = !1, O.value = null, I.value = null;
992
992
  }),
993
993
  onClick: (b) => ke(a, r)
994
994
  }, [
@@ -1002,7 +1002,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
1002
1002
  (s(!0), i(S, null, X(C.value, (a, o) => (s(), i("g", null, [
1003
1003
  (s(!0), i(S, null, X(a.series, (r) => (s(), U(Te, {
1004
1004
  color: a.color,
1005
- isSelected: H.value && r.uid === H.value,
1005
+ isSelected: O.value && r.uid === O.value,
1006
1006
  plot: r,
1007
1007
  radius: t.value.style.chart.layout.plots.radius / (p.value ? 1.5 : 1),
1008
1008
  shape: a.shape,
@@ -1010,7 +1010,7 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
1010
1010
  strokeWidth: t.value.style.chart.layout.plots.outlineWidth,
1011
1011
  onMouseover: (b) => $e(a, r, o),
1012
1012
  onMouseleave: u[8] || (u[8] = (b) => {
1013
- Q.value = !1, H.value = null, I.value = null;
1013
+ Q.value = !1, O.value = null, I.value = null;
1014
1014
  }),
1015
1015
  onClick: (b) => ke(a, r)
1016
1016
  }, null, 8, ["color", "isSelected", "plot", "radius", "shape", "stroke", "strokeWidth", "onMouseover", "onClick"]))), 256))
@@ -1055,13 +1055,13 @@ const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-col
1055
1055
  ])) : c("", !0),
1056
1056
  n.value && !j.value ? (s(), i("g", sl, [
1057
1057
  v("text", {
1058
- x: B.value.x,
1059
- y: B.value.y - B.value.fontSize / 1.5,
1060
- "font-size": B.value.fontSize / 1.5,
1061
- fill: B.value.fill,
1058
+ x: V.value.x,
1059
+ y: V.value.y - V.value.fontSize / 1.5,
1060
+ "font-size": V.value.fontSize / 1.5,
1061
+ fill: V.value.fill,
1062
1062
  "text-anchor": "middle",
1063
- "font-weight": B.value.bold ? "bold" : "normal"
1064
- }, x(B.value.text), 9, rl)
1063
+ "font-weight": V.value.bold ? "bold" : "normal"
1064
+ }, x(V.value.text), 9, rl)
1065
1065
  ])) : c("", !0),
1066
1066
  p.value && n.value ? (s(), i("g", il, [
1067
1067
  v("rect", {