vue-data-ui 2.4.38 → 2.4.39
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.
- package/dist/{Arrow-CAyK8SiJ.cjs → Arrow-BH3TXY5i.cjs} +1 -1
- package/dist/{Arrow-DAz7aOQX.js → Arrow-gn_WiuJU.js} +1 -1
- package/dist/{BaseIcon-LzZNzC-k.cjs → BaseIcon-C9eU1XEJ.cjs} +1 -1
- package/dist/{BaseIcon-C5xMMLKe.js → BaseIcon-PEMG4fz_.js} +1 -1
- package/dist/{DataTable-DJteUrAL.js → DataTable-D7EHk98Z.js} +2 -2
- package/dist/{DataTable-CYjIaj19.cjs → DataTable-Dk61oGV_.cjs} +1 -1
- package/dist/{Legend-C4RfI148.cjs → Legend-6jFPkL1P.cjs} +1 -1
- package/dist/{Legend-D6Q_hS-N.js → Legend-C8xQE9Da.js} +1 -1
- package/dist/{PackageVersion-BVorXRgA.cjs → PackageVersion-C7okNmPF.cjs} +1 -1
- package/dist/{PackageVersion-QvLMBL8G.js → PackageVersion-CiIsJuZg.js} +1 -1
- package/dist/{PenAndPaper-CT4Le8nh.js → PenAndPaper-BBXIRAdA.js} +3 -3
- package/dist/{PenAndPaper-2ioTztzj.cjs → PenAndPaper-BUjMRWG0.cjs} +1 -1
- package/dist/{Shape-KRuu0uZ5.js → Shape-C37gcsR4.js} +1 -1
- package/dist/{Shape-DcAFJuUv.cjs → Shape-f0l9bT7U.cjs} +1 -1
- package/dist/{Slicer-L8wJ3VZd.cjs → Slicer-A-l0DLQY.cjs} +1 -1
- package/dist/{Slicer-DxJ1zmBg.js → Slicer-DHzuJMcK.js} +2 -2
- package/dist/{Title-CZ0mh7PE.cjs → Title-BeCsXJhg.cjs} +1 -1
- package/dist/{Title-x3NyvtQe.js → Title-DU9SuVY-.js} +1 -1
- package/dist/{Tooltip-Df7E90wo.js → Tooltip-Chiu53IG.js} +1 -1
- package/dist/{Tooltip-BOmCgAU7.cjs → Tooltip-DCwHEKeM.cjs} +1 -1
- package/dist/{index-B4dbEeod.cjs → index-DCccP2Kt.cjs} +5 -5
- package/dist/{index-BfvWIfiY.js → index-hQvps1ng.js} +205 -190
- package/dist/types/vue-data-ui.d.cts +113 -1
- package/dist/types/vue-data-ui.d.ts +113 -1
- package/dist/{useNestedProp-C5ctHjEY.js → useNestedProp-CxQ2hIfU.js} +1 -1
- package/dist/{useNestedProp-uYy3UrlZ.cjs → useNestedProp-DzZoHbI7.cjs} +1 -1
- package/dist/{usePrinter-ucBlOzo2.cjs → usePrinter-C-C264ik.cjs} +1 -1
- package/dist/{usePrinter-C_JcwuWm.js → usePrinter-c5Pf5Hrk.js} +1 -1
- package/dist/{vue-data-ui-Ccl3MBHr.js → vue-data-ui-DD3uGHqs.js} +60 -60
- package/dist/{vue-data-ui-CTozzcVh.cjs → vue-data-ui-DhR5T2GB.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +34 -30
- package/dist/{vue-ui-3d-bar-C1KiqCD8.js → vue-ui-3d-bar-BNOB6IJY.js} +9 -9
- package/dist/{vue-ui-3d-bar-DDlb-MuY.cjs → vue-ui-3d-bar-CBVoa_Wd.cjs} +1 -1
- package/dist/{vue-ui-accordion-8uz6O0zN.cjs → vue-ui-accordion-CTxFHMF7.cjs} +1 -1
- package/dist/{vue-ui-accordion-b3Vu6RVK.js → vue-ui-accordion-CbATWtZa.js} +3 -3
- package/dist/{vue-ui-age-pyramid-hY8RqvWh.js → vue-ui-age-pyramid-Ddn0vH-R.js} +10 -10
- package/dist/{vue-ui-age-pyramid-CHGSEaYL.cjs → vue-ui-age-pyramid-ahMSlg4_.cjs} +1 -1
- package/dist/{vue-ui-annotator-DscKLpfR.cjs → vue-ui-annotator-DUul7luS.cjs} +1 -1
- package/dist/{vue-ui-annotator-C809iBPN.js → vue-ui-annotator-DgPWj2k4.js} +1 -1
- package/dist/{vue-ui-bullet-DYMpXNE_.cjs → vue-ui-bullet-BvFWfcoX.cjs} +1 -1
- package/dist/{vue-ui-bullet-B9ujuFUU.js → vue-ui-bullet-C6JmUhDP.js} +8 -8
- package/dist/{vue-ui-candlestick-DljnPmaC.js → vue-ui-candlestick-BUATE5UN.js} +11 -11
- package/dist/{vue-ui-candlestick-B-MDd1LY.cjs → vue-ui-candlestick-hi4L9XWB.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-E3ufuxIw.js → vue-ui-carousel-table-Bi9tYRH3.js} +4 -4
- package/dist/{vue-ui-carousel-table-paujUY-0.cjs → vue-ui-carousel-table-DvotxYl6.cjs} +1 -1
- package/dist/{vue-ui-chestnut-po3Q45RU.cjs → vue-ui-chestnut-Bv2eLqjB.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DipUHM0x.js → vue-ui-chestnut-CRICzF5h.js} +8 -8
- package/dist/{vue-ui-cursor-D06J66E7.js → vue-ui-cursor-DfwrrtWf.js} +2 -2
- package/dist/{vue-ui-cursor-CplxbFXK.cjs → vue-ui-cursor-qFWZfG95.cjs} +1 -1
- package/dist/{vue-ui-dashboard-8GtOSkNG.cjs → vue-ui-dashboard-CxGCT46n.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CGgaH4-n.js → vue-ui-dashboard-yX9EkLTf.js} +2 -2
- package/dist/{vue-ui-digits--crzD75Q.cjs → vue-ui-digits-C3X-8Guv.cjs} +1 -1
- package/dist/{vue-ui-digits-CYmIyFKE.js → vue-ui-digits-DUCY8rWv.js} +2 -2
- package/dist/{vue-ui-donut-Ddo5zFZ0.js → vue-ui-donut-BiUKzDWv.js} +11 -11
- package/dist/{vue-ui-donut-Dwj6Z2uH.cjs → vue-ui-donut-Bv2GZaYZ.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-Z0IjHDjm.js → vue-ui-donut-evolution-Cup3zFPj.js} +11 -11
- package/dist/{vue-ui-donut-evolution-BTjRUruR.cjs → vue-ui-donut-evolution-j8JKVqXN.cjs} +1 -1
- package/dist/{vue-ui-dumbbell--pSKj1Dz.cjs → vue-ui-dumbbell-CANVwmSA.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-DOcLI8AX.js → vue-ui-dumbbell-DJE8-e3A.js} +10 -10
- package/dist/{vue-ui-flow-Cw6Olh3c.js → vue-ui-flow-Crq3AVFe.js} +9 -9
- package/dist/{vue-ui-flow-CwrDsVw9.cjs → vue-ui-flow-Dvz0sa0O.cjs} +1 -1
- package/dist/{vue-ui-funnel-M6CIcOHV.cjs → vue-ui-funnel-BVujl3GY.cjs} +1 -1
- package/dist/{vue-ui-funnel-D8SzaI11.js → vue-ui-funnel-M8uzLylj.js} +8 -8
- package/dist/{vue-ui-galaxy-DRcH6lOJ.js → vue-ui-galaxy-B77VCJR3.js} +11 -11
- package/dist/{vue-ui-galaxy-BuUXwn_I.cjs → vue-ui-galaxy-BfQkC9br.cjs} +1 -1
- package/dist/{vue-ui-gauge-D6VDfsha.js → vue-ui-gauge-8xiT5BUm.js} +7 -7
- package/dist/{vue-ui-gauge-BOc5CHnJ.cjs → vue-ui-gauge-DwMexCwq.cjs} +1 -1
- package/dist/{vue-ui-gizmo-as4zcurL.cjs → vue-ui-gizmo-C9pEyZr1.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CyUr8pm2.js → vue-ui-gizmo-CI96cnOM.js} +3 -3
- package/dist/{vue-ui-heatmap-DHA16YVI.js → vue-ui-heatmap-DE6AgqvQ.js} +10 -10
- package/dist/{vue-ui-heatmap-Dpkvl_Ed.cjs → vue-ui-heatmap-lXe9Bxsb.cjs} +1 -1
- package/dist/{vue-ui-history-plot-BDKbSvlu.cjs → vue-ui-history-plot-B2p5Da7E.cjs} +1 -1
- package/dist/{vue-ui-history-plot-D0tHEYXR.js → vue-ui-history-plot-CO2ZBnhb.js} +11 -11
- package/dist/{vue-ui-kpi-DTIXAiP8.js → vue-ui-kpi-Cc7Yytho.js} +3 -3
- package/dist/{vue-ui-kpi-Zd-IgqlU.cjs → vue-ui-kpi-D_URPS6w.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-VwxHEY37.cjs → vue-ui-mini-loader-DHXKDtYR.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BhjFd2BP.js → vue-ui-mini-loader-DYbYoCQH.js} +2 -2
- package/dist/{vue-ui-molecule-Cr9EVj4Q.js → vue-ui-molecule-CYlh7983.js} +11 -11
- package/dist/{vue-ui-molecule-hCAfUH98.cjs → vue-ui-molecule-CYs_u6Wz.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-umRtNtxs.js → vue-ui-mood-radar-B3nvz_EX.js} +11 -11
- package/dist/{vue-ui-mood-radar-CydQr5GI.cjs → vue-ui-mood-radar-BjcUi2lA.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-BIoQEWGY.js → vue-ui-nested-donuts-BDPVh9VT.js} +11 -11
- package/dist/{vue-ui-nested-donuts-BKxE58Uf.cjs → vue-ui-nested-donuts-sf-rnAYN.cjs} +1 -1
- package/dist/{vue-ui-onion-CeJCh11D.js → vue-ui-onion-BddrBSxm.js} +11 -11
- package/dist/{vue-ui-onion-2oV8205I.cjs → vue-ui-onion-DYhBNiT8.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-3I5v7gSF.js → vue-ui-parallel-coordinate-plot-JyWFCBD3.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-DYvaWzwb.cjs → vue-ui-parallel-coordinate-plot-m-ZgXf3c.cjs} +1 -1
- package/dist/{vue-ui-quadrant-B0GKCJxi.cjs → vue-ui-quadrant-C0XCJA1s.cjs} +1 -1
- package/dist/{vue-ui-quadrant-B01cPXS5.js → vue-ui-quadrant-woZI-oSE.js} +12 -12
- package/dist/{vue-ui-quick-chart-GU62u7yC.js → vue-ui-quick-chart-DT37a1KG.js} +9 -9
- package/dist/{vue-ui-quick-chart-B42AMm4R.cjs → vue-ui-quick-chart-GAy1Kq_9.cjs} +1 -1
- package/dist/{vue-ui-radar-DsjxjLjY.js → vue-ui-radar-BWLte3c3.js} +12 -12
- package/dist/{vue-ui-radar-Dwf_8p6N.cjs → vue-ui-radar-C31U_Z53.cjs} +1 -1
- package/dist/{vue-ui-rating-weQfwApU.js → vue-ui-rating-0HTRr8sI.js} +2 -2
- package/dist/{vue-ui-rating-BDOEfGwV.cjs → vue-ui-rating-B4LMCbX7.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-C7vapzk4.js → vue-ui-relation-circle-Ds3zzFbl.js} +7 -7
- package/dist/{vue-ui-relation-circle-DRLam0rk.cjs → vue-ui-relation-circle-K0EZ_Nkb.cjs} +1 -1
- package/dist/{vue-ui-rings-BsunIWna.js → vue-ui-rings-Cd_dJ3co.js} +11 -11
- package/dist/{vue-ui-rings-BDxpRKWC.cjs → vue-ui-rings-CptiG61Q.cjs} +1 -1
- package/dist/{vue-ui-scatter-CE4pfpCN.cjs → vue-ui-scatter-BK5xv5mP.cjs} +1 -1
- package/dist/{vue-ui-scatter-B4eRVmk2.js → vue-ui-scatter-Do7eIAvo.js} +12 -12
- package/dist/{vue-ui-screenshot-DnF-twyf.js → vue-ui-screenshot-DJjluZur.js} +1 -1
- package/dist/{vue-ui-screenshot-CqC7uqTW.cjs → vue-ui-screenshot-hW8cPfaI.cjs} +1 -1
- package/dist/{vue-ui-skeleton-4l6lQhDp.cjs → vue-ui-skeleton-Ckb3hRcQ.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CK-lcAFv.js → vue-ui-skeleton-Dmee5Xfg.js} +3 -3
- package/dist/{vue-ui-smiley-DXFyinQx.js → vue-ui-smiley-B3MEz94h.js} +2 -2
- package/dist/{vue-ui-smiley-jR415Iqn.cjs → vue-ui-smiley-CfQTx9Kb.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-D9vaq6qF.cjs → vue-ui-spark-trend-B-sO8emp.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-s6WxtG4d.js → vue-ui-spark-trend-BnziIPLw.js} +5 -5
- package/dist/{vue-ui-sparkbar-Cm6S1Qb4.js → vue-ui-sparkbar-D3W-HMC0.js} +4 -4
- package/dist/{vue-ui-sparkbar-BzisE3ts.cjs → vue-ui-sparkbar-DWHagP1f.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Bh_CjEyL.js → vue-ui-sparkgauge-Bp20yElv.js} +4 -4
- package/dist/{vue-ui-sparkgauge-COCtEmhT.cjs → vue-ui-sparkgauge-Cx_dMzxw.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-C7PY45w0.cjs → vue-ui-sparkhistogram--Ulh-M8t.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-J_unkqPG.js → vue-ui-sparkhistogram-BdovbgiO.js} +5 -5
- package/dist/{vue-ui-sparkline-E6y3983Y.js → vue-ui-sparkline-B2cKF2Oq.js} +4 -4
- package/dist/{vue-ui-sparkline-Be1dXlA9.cjs → vue-ui-sparkline-DJGZzF_8.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-CCzIqHBf.cjs → vue-ui-sparkstackbar-BmFppjoc.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-CH0Pch6B.js → vue-ui-sparkstackbar-ywMpLSpx.js} +5 -5
- package/dist/{vue-ui-stackbar-ByDUWOyZ.cjs → vue-ui-stackbar-NjNO1R4N.cjs} +1 -1
- package/dist/{vue-ui-stackbar-BQmJiCNo.js → vue-ui-stackbar-s7gETyOu.js} +12 -12
- package/dist/{vue-ui-strip-plot-BfXCXnmQ.cjs → vue-ui-strip-plot-BieHYfvX.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-Dp_SpOZK.js → vue-ui-strip-plot-CKI7Tk26.js} +11 -11
- package/dist/{vue-ui-table-Bz29cntB.js → vue-ui-table-CGNRHPdF.js} +1 -1
- package/dist/{vue-ui-table-heatmap-DYcIN8JK.cjs → vue-ui-table-heatmap-BI_IFUMP.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CqLnEyoP.js → vue-ui-table-heatmap-BMmVk6UI.js} +4 -4
- package/dist/{vue-ui-table-BEuRL3NS.cjs → vue-ui-table-mo4xqDVF.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BfChx5eE.js → vue-ui-table-sparkline-DOx85BsZ.js} +5 -5
- package/dist/{vue-ui-table-sparkline-vlSwSjCF.cjs → vue-ui-table-sparkline-nouXTHiN.cjs} +1 -1
- package/dist/{vue-ui-thermometer-Dxa2olTt.js → vue-ui-thermometer-Cbqv6RYW.js} +7 -7
- package/dist/{vue-ui-thermometer-B-8wcBPG.cjs → vue-ui-thermometer-CpbU3pkq.cjs} +1 -1
- package/dist/{vue-ui-timer-DCw1gtRV.js → vue-ui-timer-BgueE1dl.js} +5 -5
- package/dist/{vue-ui-timer-DsJk28Ny.cjs → vue-ui-timer-BrAZQClf.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CEK5-Ion.cjs → vue-ui-tiremarks-DAqAEaPM.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-BHybVVRg.js → vue-ui-tiremarks-HNlJDrP8.js} +7 -7
- package/dist/{vue-ui-treemap-kIBQTHu8.js → vue-ui-treemap-BNNW0aIB.js} +11 -11
- package/dist/{vue-ui-treemap-5eXs9Afh.cjs → vue-ui-treemap-Cqej3ef5.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-CkJXkGAm.cjs → vue-ui-vertical-bar-BCx0SE0Z.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-D27LA1Dc.js → vue-ui-vertical-bar-DjoaIjRt.js} +11 -11
- package/dist/{vue-ui-waffle-CGsWS6jQ.js → vue-ui-waffle-CrCgrl2o.js} +11 -11
- package/dist/{vue-ui-waffle-C1O7clHR.cjs → vue-ui-waffle-CspQJ4_E.cjs} +1 -1
- package/dist/{vue-ui-wheel-BwDaKdAT.cjs → vue-ui-wheel-DvpCjvs8.cjs} +1 -1
- package/dist/{vue-ui-wheel-qwt5Ais3.js → vue-ui-wheel-Wq6OVQ5Z.js} +7 -7
- package/dist/{vue-ui-word-cloud-B7MrSoRx.js → vue-ui-word-cloud-AXCM7hi3.js} +10 -10
- package/dist/{vue-ui-word-cloud-DK01KwNg.cjs → vue-ui-word-cloud-CaW8SZ9y.cjs} +1 -1
- package/dist/{vue-ui-xy-DlSYajOn.js → vue-ui-xy-BhdOWsqW.js} +14 -14
- package/dist/{vue-ui-xy-BzclkAin.cjs → vue-ui-xy-Dkl5bPI-.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-CKTkd0NL.cjs → vue-ui-xy-canvas-o7kCbz5j.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-BIdABPv7.js → vue-ui-xy-canvas-sAVL0y81.js} +11 -11
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-B4dbEeod.cjs"),pe=require("./useResponsive-BJ7DTGpm.cjs"),Ee=require("./Title-CZ0mh7PE.cjs"),ge=require("./usePrinter-ucBlOzo2.cjs"),Le=require("./DataTable-CYjIaj19.cjs"),Fe=require("./Tooltip-BOmCgAU7.cjs"),Ve=require("./Legend-C4RfI148.cjs"),ze=require("./vue-ui-skeleton-4l6lQhDp.cjs"),Oe=require("./vue-ui-accordion-8uz6O0zN.cjs"),ke=require("./useNestedProp-uYy3UrlZ.cjs"),Te=require("./PackageVersion-BVorXRgA.cjs"),Xe=require("./PenAndPaper-2ioTztzj.cjs"),De=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Me=$=>(e.pushScopeId("data-v-897a9187"),$=$(),e.popScopeId(),$),Ye=["id"],Ae=["xmlns","viewBox"],Ie={key:0},qe=["id"],Ge=["stop-color"],Re=["offset","stop-color"],je=["offset","stop-color"],He=["stop-color"],Ue={key:1},We=["id","cx","cy"],Je=["stop-color","stop-opacity"],Ke=["stop-color"],Qe=["id"],Ze=["id"],et=Me(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),tt=["id"],lt=["flood-color"],ot=["id"],at=["flood-color"],nt=["d","stroke","filter"],rt=["x1","y1","x2","y2","stroke","filter"],ut=["cx","cy","r","fill","filter"],st=["stroke","d"],it=["d","fill","stroke","stroke-width","filter"],ct={key:0},dt=["stroke","d"],vt={key:0},ht=["d","stroke","stroke-width","filter"],ft=["d","fill","stroke","stroke-width","filter"],yt={key:1},mt=["cx","cy","r","fill","stroke","stroke-width"],pt=["cx","cy","r","stroke"],gt=["cx","cy","r","fill"],kt={key:0},bt=["d","fill","onMouseenter","onClick"],wt={key:1},Ct=["cx","cy","r","fill"],Bt=["x","y","fill","font-size"],xt=["x","y","fill","font-size"],_t=["x","y","fill","font-size"],St=["x","y","fill","font-size"],Pt=["filter"],Nt={key:0},$t=["x","y"],Et={key:1},Lt=["cx","cy","fill","stroke","filter","onClick"],Ft=["cx","cy","fill","stroke","filter","onClick"],Vt=["text-anchor","x","y","fill","font-size","onClick"],zt=["text-anchor","x","y","fill","font-size","onClick"],Ot=["text-anchor","x","y","fill","font-size","onClick"],Tt=["text-anchor","x","y","fill","font-size","onClick"],Xt={key:2},Dt=["x","y","width"],Mt=["x","y","width"],Yt={key:5,class:"vue-data-ui-watermark"},At=["onClick"],It={key:0,style:{"font-variant-numeric":"tabular-nums"}},qt={key:1},Gt=["innerHTML"],Rt={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup($,{expose:be,emit:G}){const b=$,{vue_ui_donut:we}=n.useConfig(),E=e.computed({get(){return!!b.dataset&&b.dataset.length},set(o){return o}}),P=e.ref(null),R=e.ref(null),j=e.ref(null),O=e.ref(null),H=e.ref(null),U=e.ref(null),W=e.ref(0),J=e.ref(0),K=e.ref(0);e.onMounted(()=>{Q()}),e.onBeforeUnmount(()=>{O.value&&O.value.disconnect()});function Q(){if(n.objectIsEmpty(b.dataset)?n.error({componentName:"VueUiDonut",type:"dataset"}):b.dataset.forEach((o,u)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{E.value=!1,n.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:l,index:u})})}),t.value.responsive){const o=pe.throttle(()=>{const{width:u,height:l}=pe.useResponsive({chart:P.value,title:t.value.style.chart.title.text?R.value:null,legend:t.value.style.chart.legend.show?j.value:null,source:H.value,noTitle:U.value});r.value.width=u,r.value.height=l});O.value=new ResizeObserver(o),O.value.observe(P.value.parentNode)}}const f=e.ref(n.createUid()),Ce=e.ref(null),T=e.ref(!1),M=e.ref(""),p=e.ref(null),Z=e.ref(0);function ee(){const o=ke.useNestedProp({userConfig:b.config,defaultConfig:we});return o.theme?{...ke.useNestedProp({userConfig:n.themes.vue_ui_donut[o.theme]||b.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}const t=e.computed({get:()=>ee(),set:o=>o});e.watch(()=>b.config,o=>{t.value=ee(),Q(),W.value+=1,J.value+=1,K.value+=1},{deep:!0});const{isPrinting:te,isImaging:le,generatePdf:oe,generateImage:ae}=ge.usePrinter({elementId:`donut__${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut"}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ne=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),c=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),r=e.ref({height:360,width:512}),L=e.computed(()=>{const o=t.value.style.chart.layout.donut.strokeWidth/512,u=r.value.width*o,l=u>y.value?y.value:u;return l<24?24:l}),_=e.computed(()=>b.dataset.map((o,u)=>({name:o.name,color:n.convertColorToHex(o.color)||ne.value[u]||n.palette[u]||n.palette[u%n.palette.length],value:o.values.reduce((l,a)=>l+a,0),absoluteValues:o.values,comment:o.comment||""}))),g=e.ref(_.value);e.watch(()=>_.value,o=>g.value=o);function xe(){return _.value.map(o=>({name:o.name,color:o.color,value:o.value}))}const w=e.ref([]),re=e.ref(null),ue=e.ref(null),S=e.ref(!1);function se(o){const u=_.value.find((s,h)=>h===o);let a=g.value.find((s,h)=>h===o).value;if(w.value.includes(o)){let h=function(){a>s?(cancelAnimationFrame(re.value),g.value=g.value.map((v,q)=>o===q?{...v,value:s}:v),S.value=!1):(S.value=!0,a+=s*.025,g.value=g.value.map((v,q)=>o===q?{...v,value:a}:v),re.value=requestAnimationFrame(h))};w.value=w.value.filter(v=>v!==o);const s=u.value;h()}else if(w.value.length<_.value.length-1){let s=function(){a<.1?(cancelAnimationFrame(ue.value),w.value.push(o),g.value=g.value.map((h,v)=>o===v?{...h,value:0}:h),S.value=!1):(S.value=!0,a/=1.1,g.value=g.value.map((h,v)=>o===v?{...h,value:a}:h),ue.value=requestAnimationFrame(s))};s()}G("selectLegend",C.value.map(s=>({name:s.name,color:s.color,value:s.value})))}const C=e.computed(()=>(g.value.forEach((o,u)=>{if([null,void 0].includes(o.values))return{...o,values:[]}}),g.value.map((o,u)=>({...o,seriesIndex:u})).filter((o,u)=>!w.value.includes(u)))),ie=e.computed(()=>b.dataset.map((o,u)=>({name:o.name,color:n.convertColorToHex(o.color)||ne.value[u]||n.palette[u]||n.palette[u%n.palette.length],value:(o.values||[]).reduce((l,a)=>l+a,0),shape:"circle"})).map((o,u)=>({...o,proportion:o.value/b.dataset.map(l=>(l.values||[]).reduce((a,s)=>a+s,0)).reduce((l,a)=>l+a,0),opacity:w.value.includes(u)?.5:1,segregate:()=>se(u),isSegregated:w.value.includes(u)}))),_e=e.computed(()=>({cy:"donut-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":""})),y=e.computed(()=>{const o=Math.min(r.value.width/3,r.value.height/3);return o<55?55:o}),d=e.computed(()=>n.makeDonut({series:C.value},r.value.width/2,r.value.height/2,y.value,y.value,1.99999,2,1,360,105.25,L.value)),i=e.computed(()=>{const o=Math.max(...C.value.map(l=>l.value)),u=C.value.map(l=>l.value/o);return n.createPolarAreas({series:u,center:{x:r.value.width/2,y:r.value.height/2},maxRadius:Math.min(r.value.width,r.value.height)/3})});function N(o){return o.x>r.value.width/2+6?"start":o.x<r.value.width/2-6?"end":"middle"}function Se(o){return o.middlePoint.y>r.value.height/2?n.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:100,centerX:r.value.width/2,centerY:r.value.height/2}).y:n.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:0,centerX:r.value.width/2,centerY:r.value.height/2}).y-100}function k(o){return o.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function Y(o,u){const l=o.value/Pe(u);return isNaN(l)?0:n.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,l*100,n.dataLabel({v:l*100,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding}),{datapoint:o})}function Pe(o){return[...o].map(u=>u.value).reduce((u,l)=>u+l,0)}const m=e.computed(()=>C.value.map(o=>o.value).reduce((o,u)=>o+u,0)),ce=e.computed(()=>m.value/C.value.length),A=e.ref(null),F=e.ref(!1);function de({datapoint:o,relativeIndex:u,seriesIndex:l,show:a=!1}){A.value={datapoint:o,seriesIndex:l,config:t.value,series:_.value},T.value=a,p.value=u;let s="";const h=t.value.style.chart.tooltip.customFormat;if(F.value=!1,n.isFunction(h))try{const v=h({seriesIndex:l,datapoint:o,series:_.value,config:t.value});typeof v=="string"&&(M.value=v,F.value=!0)}catch{console.warn("Custom format cannot be applied."),F.value=!1}if(!F.value){if(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,o.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,relativeIndex:u,seriesIndex:l})}</b>`),t.value.style.chart.tooltip.showPercentage){const v=n.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,o.proportion*100,n.dataLabel({v:o.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}),{datapoint:o,relativeIndex:u,seriesIndex:l});t.value.style.chart.tooltip.showValue?s+=`<span>(${v})</span></div>`:s+=`<b>${v}</b></div>`}t.value.style.chart.comments.showInTooltip&&o.comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${o.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${o.color}">${o.comment}</div>`),M.value=`<div>${s}</div>`}}function V(o){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o?`url(#blur_${f.value})`:""}const B=e.computed(()=>{const o=C.value.map(l=>({name:l.name,color:l.color})),u=C.value.map(l=>l.value);return{head:o,body:u}});function ve(){e.nextTick(()=>{const o=B.value.head.map((a,s)=>[[a.name],[B.value.body[s]],[isNaN(B.value.body[s]/m.value)?"-":B.value.body[s]/m.value*100]]),u=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=n.createCsvContent(u);n.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const X=e.computed(()=>{const o=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:m.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],u=B.value.head.map((s,h)=>{const v=n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:B.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},v,isNaN(B.value.body[h]/m.value)?"-":(B.value.body[h]/m.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:o,body:u,config:l}}),z=e.ref(!1);function Ne(o){z.value=o,Z.value+=1}const he=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function $e(o){return o.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(u=>"-").join("")}function x(o,u){G("selectDatapoint",{datapoint:o,index:u})}function fe(){c.value.showTable=!c.value.showTable}function ye(){c.value.dataLabels.show=!c.value.dataLabels.show}function me(){c.value.showTooltip=!c.value.showTooltip}const D=e.ref(!1);function I(){D.value=!D.value}return be({getData:xe,generatePdf:oe,generateCsv:ve,generateImage:ae,toggleTable:fe,toggleLabels:ye,toggleTooltip:me,toggleAnnotator:I}),(o,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:P,class:e.normalizeClass(`vue-ui-donut ${z.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),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}`),id:`donut__${f.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Xe.PenAndPaper,{key:0,parent:P.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:D.value,onClose:I},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"userConfig",{},void 0,!0),Be.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:U,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:R,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Ee._sfc_main,{key:`title_${W.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&E.value?(e.openBlock(),e.createBlock(ge.UserOptions,{ref_key:"details",ref:Ce,key:`user_option_${Z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(te),isImaging:e.unref(le),uid:f.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:z.value,chartElement:P.value,position:t.value.userOptions.position,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:D.value,onToggleFullscreen:Ne,onGeneratePdf:e.unref(oe),onGenerateCsv:ve,onGenerateImage:e.unref(ae),onToggleTable:fe,onToggleLabels:ye,onToggleTooltip:me,onToggleAnnotator:I},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:a})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:a})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:a})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:a})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":z.value,"vue-data-ui-fulscreen--off":!z.value}),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Te._sfc_main),t.value.type==="classic"?(e.openBlock(),e.createElementBlock("defs",Ie,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${f.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,Ge),e.createElementVNode("stop",{offset:`${(1-L.value/y.value)*100}%`,"stop-color":e.unref(n.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,Re),e.createElementVNode("stop",{offset:`${(1-L.value/y.value/2)*100}%`,"stop-color":e.unref(n.setOpacity)("#FFFFFF",t.value.style.chart.gradientIntensity)},null,8,je),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,He)],8,qe)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock("defs",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,a)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`polar_gradient_${a}_${f.value}`,cx:l.middlePoint.x/r.value.width*100+"%",cy:l.middlePoint.y/r.value.height*100+"%",r:"62%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.shiftHue)(d.value[a].color,.05),"stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,Je),e.createElementVNode("stop",{offset:"100%","stop-color":d.value[a].color},null,8,Ke)],8,We))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${f.value}`},null,8,Ze),et],8,Qe),e.createElementVNode("filter",{id:`shadow_${f.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,lt)],8,tt),e.createElementVNode("filter",{id:`drop_shadow_${f.value}`,"color-interpolation-filters":"sRGB",x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"3","flood-opacity":"1","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,at)],8,ot)]),t.value.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(n.calcNutArrowPath)(l,{x:r.value.width/2,y:r.value.height/2},16,16,!1,!1,L.value),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:V(a)},null,8,nt)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).x,y1:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).y,x2:i.value[a].middlePoint.x,y2:i.value[a].middlePoint.y,stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:V(a)},null,8,rt)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:4,cx:r.value.width/2,cy:r.value.height/2,r:y.value<=0?10:y.value,fill:t.value.style.chart.backgroundColor,filter:t.value.style.chart.layout.donut.useShadow?`url(#shadow_${f.value})`:""},null,8,ut)):e.createCommentVNode("",!0),m.value&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:l.arcSlice,fill:"#FFFFFF"},null,8,st))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:e.unref(n.setOpacity)(l.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:V(a)},null,8,it))),256))],64)):e.createCommentVNode("",!0),m.value&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[d.value.length>1?(e.openBlock(),e.createElementBlock("g",ct,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:i.value[a].path,fill:"#FFFFFF"},null,8,dt))),256)),t.value.style.chart.layout.donut.useShadow?(e.openBlock(),e.createElementBlock("g",vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:"transparent",stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:`url(#drop_shadow_${f.value})`},null,8,ht))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:t.value.style.chart.useGradient?`url(#polar_gradient_${a}_${f.value})`:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:V(a)},null,8,ft))),256))])):(e.openBlock(),e.createElementBlock("g",yt,[e.createElementVNode("circle",{cx:r.value.width/2,cy:r.value.height/2,r:y.value,fill:t.value.style.chart.useGradient?`url(#polar_gradient_0_${f.value})`:d.value[0].color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth},null,8,mt)]))],64)):(e.openBlock(),e.createElementBlock("circle",{key:7,cx:r.value.width/2,cy:r.value.height/2,r:y.value<=0?10:y.value,fill:"transparent",stroke:t.value.style.chart.backgroundColor},null,8,pt)),t.value.style.chart.useGradient&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:8,cx:r.value.width/2,cy:r.value.height/2,r:y.value<=0?10:y.value,fill:`url(#gradient_${f.value})`},null,8,gt)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:9},[d.value.length>1||t.value.type==="classic"?(e.openBlock(),e.createElementBlock("g",kt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{"data-cy-donut-trap":"",d:t.value.type==="classic"?l.arcSlice:i.value[a].path,fill:p.value===a?"rgba(0,0,0,0.1)":"transparent",onMouseenter:s=>de({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0}),onMouseleave:u[0]||(u[0]=s=>{T.value=!1,p.value=null}),onClick:s=>x(l,a)},null,40,bt))),256))])):(e.openBlock(),e.createElementBlock("g",wt,[e.createElementVNode("circle",{cx:r.value.width/2,cy:r.value.height/2,r:y.value,fill:p.value===o.i?"rgba(0,0,0,0.1)":"transparent","data-cy-donut-trap":"",onMouseenter:u[1]||(u[1]=l=>de({datapoint:d.value[0],relativeIndex:0,seriesIndex:d.value[0].seriesIndex,show:!0})),onMouseleave:u[2]||(u[2]=l=>{T.value=!1,p.value=null}),onClick:u[3]||(u[3]=l=>x(d.value[0],o.i))},null,40,Ct)]))],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.color,"font-size":t.value.style.chart.layout.labels.hollow.total.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.total.text),13,Bt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2+t.value.style.chart.layout.labels.hollow.total.fontSize-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.value.color,"font-size":t.value.style.chart.layout.labels.hollow.total.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.hollow.total.value.formatter,m.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.hollow.total.value.prefix,v:m.value,s:t.value.style.chart.layout.labels.hollow.total.value.suffix}))),13,xt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.color,"font-size":t.value.style.chart.layout.labels.hollow.average.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.average.text),13,_t)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.fontSize+t.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.value.color,"font-size":t.value.style.chart.layout.labels.hollow.average.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},e.toDisplayString(S.value?"--":e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.hollow.average.value.formatter,ce.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:ce.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding}))),13,St)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",{filter:V(a),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",Nt,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(n.calcMarkerOffsetX)(l).x-120:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(n.calcMarkerOffsetX)(l).x-60:e.unref(n.calcMarkerOffsetX)(l).x,y:e.unref(n.calcMarkerOffsetY)(l)-(he.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"dataLabel",e.normalizeProps(e.guardReactiveProps({datapoint:l,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a,isSafari:he.value,isVisible:k(l)&&c.value.dataLabels.show,textAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16).anchor,percentage:Y(l,d.value)})),void 0,!0)])],8,$t))])):(e.openBlock(),e.createElementBlock("g",Et,[t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(n.calcMarkerOffsetX)(l).x,cy:e.unref(n.calcMarkerOffsetY)(l)-3.5,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a?"":`url(#blur_${f.value})`,onClick:s=>x(l,a)},null,8,Lt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).x,cy:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).y,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a?"":`url(#blur_${f.value})`,onClick:s=>x(l,a)},null,8,Ft)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":e.unref(n.calcMarkerOffsetX)(l,!0,12).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(n.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:s=>x(l,a)},e.toDisplayString(Y(l,d.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}),{datapoint:l})})`:""),13,Vt)):e.createCommentVNode("",!0),k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(n.calcMarkerOffsetX)(l).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(n.calcMarkerOffsetY)(l)+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:s=>x(l,a)},e.toDisplayString(l.name),13,zt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":N(i.value[a].middlePoint),x:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x,y:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).y,fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:s=>x(l,a)},e.toDisplayString(Y(l,d.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}),{datapoint:l})})`:""),13,Ot)):e.createCommentVNode("",!0),k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":N(i.value[a].middlePoint),x:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x,y:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).y+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:s=>x(l,a)},e.toDisplayString(l.name),13,Tt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])),c.value.dataLabels.show&&t.value.style.chart.comments.show&&l.comment?(e.openBlock(),e.createElementBlock("g",Xt,[k(l)&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(n.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(n.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width/2:e.unref(n.calcMarkerOffsetX)(l).x),y:e.unref(n.calcMarkerOffsetY)(l)+24+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"plot-comment",{plot:{...l,textAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16).anchor}},void 0,!0)])],8,Dt)):e.createCommentVNode("",!0),k(l)&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:t.value.style.chart.comments.offsetX+(N(i.value[a].middlePoint)==="end"?e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x-t.value.style.chart.comments.width:N(i.value[a].middlePoint)==="middle"?e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x-t.value.style.chart.comments.width/2:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x),y:Se(i.value[a])+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"plot-comment",{plot:{...l,textAlign:N(i.value[a].middlePoint),flexAlign:N(i.value[a].middlePoint)}},void 0,!0)])],8,Mt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,Pt))),256)),e.renderSlot(o.$slots,"svg",{svg:r.value},void 0,!0)],14,Ae)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Yt,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(te)||e.unref(le)})),void 0,!0)])):e.createCommentVNode("",!0),E.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ze.default,{key:6,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:L.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:j},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ve.Legend,{key:`legend_${K.value}`,legendSet:ie.value,config:_e.value,onClickMarker:u[4]||(u[4]=({i:l})=>se(l))},{item:e.withCtx(({legend:l,index:a})=>[e.createElementVNode("div",{onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${w.value.includes(a)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,index:a}))+" ",1),w.value.includes(a)?(e.openBlock(),e.createElementBlock("span",qt," ( "+e.toDisplayString($e(l.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",It," ("+e.toDisplayString(isNaN(l.value/m.value)?"-":e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,S.value?l.proportion*100:l.value/m.value*100,e.unref(n.dataLabel)({v:S.value?l.proportion*100:l.value/m.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})))+") ",1))],12,At)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:ie.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:H,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Fe._sfc_main,{show:c.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:P.value,content:M.value,isCustom:F.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),E.value?(e.openBlock(),e.createBlock(Oe.default,{key:8,hideDetails:"",config:{open:c.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Le.DataTable,{key:`table_${J.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:u[5]||(u[5]=l=>c.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Gt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:isNaN(Number(l))?l.includes("%")?l:e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,l,e.unref(n.dataLabel)({v:l,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding})):e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}))),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ye))}},jt=De._export_sfc(Rt,[["__scopeId","data-v-897a9187"]]);exports.default=jt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DCccP2Kt.cjs"),pe=require("./useResponsive-BJ7DTGpm.cjs"),Ee=require("./Title-BeCsXJhg.cjs"),ge=require("./usePrinter-C-C264ik.cjs"),Le=require("./DataTable-Dk61oGV_.cjs"),Fe=require("./Tooltip-DCwHEKeM.cjs"),Ve=require("./Legend-6jFPkL1P.cjs"),ze=require("./vue-ui-skeleton-Ckb3hRcQ.cjs"),Oe=require("./vue-ui-accordion-CTxFHMF7.cjs"),ke=require("./useNestedProp-DzZoHbI7.cjs"),Te=require("./PackageVersion-C7okNmPF.cjs"),Xe=require("./PenAndPaper-BUjMRWG0.cjs"),De=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Me=$=>(e.pushScopeId("data-v-897a9187"),$=$(),e.popScopeId(),$),Ye=["id"],Ae=["xmlns","viewBox"],Ie={key:0},qe=["id"],Ge=["stop-color"],Re=["offset","stop-color"],je=["offset","stop-color"],He=["stop-color"],Ue={key:1},We=["id","cx","cy"],Je=["stop-color","stop-opacity"],Ke=["stop-color"],Qe=["id"],Ze=["id"],et=Me(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),tt=["id"],lt=["flood-color"],ot=["id"],at=["flood-color"],nt=["d","stroke","filter"],rt=["x1","y1","x2","y2","stroke","filter"],ut=["cx","cy","r","fill","filter"],st=["stroke","d"],it=["d","fill","stroke","stroke-width","filter"],ct={key:0},dt=["stroke","d"],vt={key:0},ht=["d","stroke","stroke-width","filter"],ft=["d","fill","stroke","stroke-width","filter"],yt={key:1},mt=["cx","cy","r","fill","stroke","stroke-width"],pt=["cx","cy","r","stroke"],gt=["cx","cy","r","fill"],kt={key:0},bt=["d","fill","onMouseenter","onClick"],wt={key:1},Ct=["cx","cy","r","fill"],Bt=["x","y","fill","font-size"],xt=["x","y","fill","font-size"],_t=["x","y","fill","font-size"],St=["x","y","fill","font-size"],Pt=["filter"],Nt={key:0},$t=["x","y"],Et={key:1},Lt=["cx","cy","fill","stroke","filter","onClick"],Ft=["cx","cy","fill","stroke","filter","onClick"],Vt=["text-anchor","x","y","fill","font-size","onClick"],zt=["text-anchor","x","y","fill","font-size","onClick"],Ot=["text-anchor","x","y","fill","font-size","onClick"],Tt=["text-anchor","x","y","fill","font-size","onClick"],Xt={key:2},Dt=["x","y","width"],Mt=["x","y","width"],Yt={key:5,class:"vue-data-ui-watermark"},At=["onClick"],It={key:0,style:{"font-variant-numeric":"tabular-nums"}},qt={key:1},Gt=["innerHTML"],Rt={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup($,{expose:be,emit:G}){const b=$,{vue_ui_donut:we}=n.useConfig(),E=e.computed({get(){return!!b.dataset&&b.dataset.length},set(o){return o}}),P=e.ref(null),R=e.ref(null),j=e.ref(null),O=e.ref(null),H=e.ref(null),U=e.ref(null),W=e.ref(0),J=e.ref(0),K=e.ref(0);e.onMounted(()=>{Q()}),e.onBeforeUnmount(()=>{O.value&&O.value.disconnect()});function Q(){if(n.objectIsEmpty(b.dataset)?n.error({componentName:"VueUiDonut",type:"dataset"}):b.dataset.forEach((o,u)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{E.value=!1,n.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:l,index:u})})}),t.value.responsive){const o=pe.throttle(()=>{const{width:u,height:l}=pe.useResponsive({chart:P.value,title:t.value.style.chart.title.text?R.value:null,legend:t.value.style.chart.legend.show?j.value:null,source:H.value,noTitle:U.value});r.value.width=u,r.value.height=l});O.value=new ResizeObserver(o),O.value.observe(P.value.parentNode)}}const f=e.ref(n.createUid()),Ce=e.ref(null),T=e.ref(!1),M=e.ref(""),p=e.ref(null),Z=e.ref(0);function ee(){const o=ke.useNestedProp({userConfig:b.config,defaultConfig:we});return o.theme?{...ke.useNestedProp({userConfig:n.themes.vue_ui_donut[o.theme]||b.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}const t=e.computed({get:()=>ee(),set:o=>o});e.watch(()=>b.config,o=>{t.value=ee(),Q(),W.value+=1,J.value+=1,K.value+=1},{deep:!0});const{isPrinting:te,isImaging:le,generatePdf:oe,generateImage:ae}=ge.usePrinter({elementId:`donut__${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut"}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ne=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),c=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),r=e.ref({height:360,width:512}),L=e.computed(()=>{const o=t.value.style.chart.layout.donut.strokeWidth/512,u=r.value.width*o,l=u>y.value?y.value:u;return l<24?24:l}),_=e.computed(()=>b.dataset.map((o,u)=>({name:o.name,color:n.convertColorToHex(o.color)||ne.value[u]||n.palette[u]||n.palette[u%n.palette.length],value:o.values.reduce((l,a)=>l+a,0),absoluteValues:o.values,comment:o.comment||""}))),g=e.ref(_.value);e.watch(()=>_.value,o=>g.value=o);function xe(){return _.value.map(o=>({name:o.name,color:o.color,value:o.value}))}const w=e.ref([]),re=e.ref(null),ue=e.ref(null),S=e.ref(!1);function se(o){const u=_.value.find((s,h)=>h===o);let a=g.value.find((s,h)=>h===o).value;if(w.value.includes(o)){let h=function(){a>s?(cancelAnimationFrame(re.value),g.value=g.value.map((v,q)=>o===q?{...v,value:s}:v),S.value=!1):(S.value=!0,a+=s*.025,g.value=g.value.map((v,q)=>o===q?{...v,value:a}:v),re.value=requestAnimationFrame(h))};w.value=w.value.filter(v=>v!==o);const s=u.value;h()}else if(w.value.length<_.value.length-1){let s=function(){a<.1?(cancelAnimationFrame(ue.value),w.value.push(o),g.value=g.value.map((h,v)=>o===v?{...h,value:0}:h),S.value=!1):(S.value=!0,a/=1.1,g.value=g.value.map((h,v)=>o===v?{...h,value:a}:h),ue.value=requestAnimationFrame(s))};s()}G("selectLegend",C.value.map(s=>({name:s.name,color:s.color,value:s.value})))}const C=e.computed(()=>(g.value.forEach((o,u)=>{if([null,void 0].includes(o.values))return{...o,values:[]}}),g.value.map((o,u)=>({...o,seriesIndex:u})).filter((o,u)=>!w.value.includes(u)))),ie=e.computed(()=>b.dataset.map((o,u)=>({name:o.name,color:n.convertColorToHex(o.color)||ne.value[u]||n.palette[u]||n.palette[u%n.palette.length],value:(o.values||[]).reduce((l,a)=>l+a,0),shape:"circle"})).map((o,u)=>({...o,proportion:o.value/b.dataset.map(l=>(l.values||[]).reduce((a,s)=>a+s,0)).reduce((l,a)=>l+a,0),opacity:w.value.includes(u)?.5:1,segregate:()=>se(u),isSegregated:w.value.includes(u)}))),_e=e.computed(()=>({cy:"donut-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":""})),y=e.computed(()=>{const o=Math.min(r.value.width/3,r.value.height/3);return o<55?55:o}),d=e.computed(()=>n.makeDonut({series:C.value},r.value.width/2,r.value.height/2,y.value,y.value,1.99999,2,1,360,105.25,L.value)),i=e.computed(()=>{const o=Math.max(...C.value.map(l=>l.value)),u=C.value.map(l=>l.value/o);return n.createPolarAreas({series:u,center:{x:r.value.width/2,y:r.value.height/2},maxRadius:Math.min(r.value.width,r.value.height)/3})});function N(o){return o.x>r.value.width/2+6?"start":o.x<r.value.width/2-6?"end":"middle"}function Se(o){return o.middlePoint.y>r.value.height/2?n.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:100,centerX:r.value.width/2,centerY:r.value.height/2}).y:n.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:0,centerX:r.value.width/2,centerY:r.value.height/2}).y-100}function k(o){return o.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function Y(o,u){const l=o.value/Pe(u);return isNaN(l)?0:n.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,l*100,n.dataLabel({v:l*100,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding}),{datapoint:o})}function Pe(o){return[...o].map(u=>u.value).reduce((u,l)=>u+l,0)}const m=e.computed(()=>C.value.map(o=>o.value).reduce((o,u)=>o+u,0)),ce=e.computed(()=>m.value/C.value.length),A=e.ref(null),F=e.ref(!1);function de({datapoint:o,relativeIndex:u,seriesIndex:l,show:a=!1}){A.value={datapoint:o,seriesIndex:l,config:t.value,series:_.value},T.value=a,p.value=u;let s="";const h=t.value.style.chart.tooltip.customFormat;if(F.value=!1,n.isFunction(h))try{const v=h({seriesIndex:l,datapoint:o,series:_.value,config:t.value});typeof v=="string"&&(M.value=v,F.value=!0)}catch{console.warn("Custom format cannot be applied."),F.value=!1}if(!F.value){if(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,o.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,relativeIndex:u,seriesIndex:l})}</b>`),t.value.style.chart.tooltip.showPercentage){const v=n.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,o.proportion*100,n.dataLabel({v:o.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}),{datapoint:o,relativeIndex:u,seriesIndex:l});t.value.style.chart.tooltip.showValue?s+=`<span>(${v})</span></div>`:s+=`<b>${v}</b></div>`}t.value.style.chart.comments.showInTooltip&&o.comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${o.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${o.color}">${o.comment}</div>`),M.value=`<div>${s}</div>`}}function V(o){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o?`url(#blur_${f.value})`:""}const B=e.computed(()=>{const o=C.value.map(l=>({name:l.name,color:l.color})),u=C.value.map(l=>l.value);return{head:o,body:u}});function ve(){e.nextTick(()=>{const o=B.value.head.map((a,s)=>[[a.name],[B.value.body[s]],[isNaN(B.value.body[s]/m.value)?"-":B.value.body[s]/m.value*100]]),u=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=n.createCsvContent(u);n.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const X=e.computed(()=>{const o=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:m.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],u=B.value.head.map((s,h)=>{const v=n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:B.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},v,isNaN(B.value.body[h]/m.value)?"-":(B.value.body[h]/m.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:o,body:u,config:l}}),z=e.ref(!1);function Ne(o){z.value=o,Z.value+=1}const he=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function $e(o){return o.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(u=>"-").join("")}function x(o,u){G("selectDatapoint",{datapoint:o,index:u})}function fe(){c.value.showTable=!c.value.showTable}function ye(){c.value.dataLabels.show=!c.value.dataLabels.show}function me(){c.value.showTooltip=!c.value.showTooltip}const D=e.ref(!1);function I(){D.value=!D.value}return be({getData:xe,generatePdf:oe,generateCsv:ve,generateImage:ae,toggleTable:fe,toggleLabels:ye,toggleTooltip:me,toggleAnnotator:I}),(o,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:P,class:e.normalizeClass(`vue-ui-donut ${z.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),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}`),id:`donut__${f.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Xe.PenAndPaper,{key:0,parent:P.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:D.value,onClose:I},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"userConfig",{},void 0,!0),Be.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:U,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:R,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Ee._sfc_main,{key:`title_${W.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&E.value?(e.openBlock(),e.createBlock(ge.UserOptions,{ref_key:"details",ref:Ce,key:`user_option_${Z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(te),isImaging:e.unref(le),uid:f.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:z.value,chartElement:P.value,position:t.value.userOptions.position,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:D.value,onToggleFullscreen:Ne,onGeneratePdf:e.unref(oe),onGenerateCsv:ve,onGenerateImage:e.unref(ae),onToggleTable:fe,onToggleLabels:ye,onToggleTooltip:me,onToggleAnnotator:I},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:a})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:a})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:a})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:a})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":z.value,"vue-data-ui-fulscreen--off":!z.value}),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Te._sfc_main),t.value.type==="classic"?(e.openBlock(),e.createElementBlock("defs",Ie,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${f.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,Ge),e.createElementVNode("stop",{offset:`${(1-L.value/y.value)*100}%`,"stop-color":e.unref(n.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,Re),e.createElementVNode("stop",{offset:`${(1-L.value/y.value/2)*100}%`,"stop-color":e.unref(n.setOpacity)("#FFFFFF",t.value.style.chart.gradientIntensity)},null,8,je),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,He)],8,qe)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock("defs",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,a)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`polar_gradient_${a}_${f.value}`,cx:l.middlePoint.x/r.value.width*100+"%",cy:l.middlePoint.y/r.value.height*100+"%",r:"62%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.shiftHue)(d.value[a].color,.05),"stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,Je),e.createElementVNode("stop",{offset:"100%","stop-color":d.value[a].color},null,8,Ke)],8,We))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${f.value}`},null,8,Ze),et],8,Qe),e.createElementVNode("filter",{id:`shadow_${f.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,lt)],8,tt),e.createElementVNode("filter",{id:`drop_shadow_${f.value}`,"color-interpolation-filters":"sRGB",x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"3","flood-opacity":"1","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,at)],8,ot)]),t.value.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(n.calcNutArrowPath)(l,{x:r.value.width/2,y:r.value.height/2},16,16,!1,!1,L.value),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:V(a)},null,8,nt)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).x,y1:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).y,x2:i.value[a].middlePoint.x,y2:i.value[a].middlePoint.y,stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:V(a)},null,8,rt)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:4,cx:r.value.width/2,cy:r.value.height/2,r:y.value<=0?10:y.value,fill:t.value.style.chart.backgroundColor,filter:t.value.style.chart.layout.donut.useShadow?`url(#shadow_${f.value})`:""},null,8,ut)):e.createCommentVNode("",!0),m.value&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:l.arcSlice,fill:"#FFFFFF"},null,8,st))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:e.unref(n.setOpacity)(l.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:V(a)},null,8,it))),256))],64)):e.createCommentVNode("",!0),m.value&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[d.value.length>1?(e.openBlock(),e.createElementBlock("g",ct,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:i.value[a].path,fill:"#FFFFFF"},null,8,dt))),256)),t.value.style.chart.layout.donut.useShadow?(e.openBlock(),e.createElementBlock("g",vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:"transparent",stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:`url(#drop_shadow_${f.value})`},null,8,ht))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:t.value.style.chart.useGradient?`url(#polar_gradient_${a}_${f.value})`:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:V(a)},null,8,ft))),256))])):(e.openBlock(),e.createElementBlock("g",yt,[e.createElementVNode("circle",{cx:r.value.width/2,cy:r.value.height/2,r:y.value,fill:t.value.style.chart.useGradient?`url(#polar_gradient_0_${f.value})`:d.value[0].color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth},null,8,mt)]))],64)):(e.openBlock(),e.createElementBlock("circle",{key:7,cx:r.value.width/2,cy:r.value.height/2,r:y.value<=0?10:y.value,fill:"transparent",stroke:t.value.style.chart.backgroundColor},null,8,pt)),t.value.style.chart.useGradient&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:8,cx:r.value.width/2,cy:r.value.height/2,r:y.value<=0?10:y.value,fill:`url(#gradient_${f.value})`},null,8,gt)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:9},[d.value.length>1||t.value.type==="classic"?(e.openBlock(),e.createElementBlock("g",kt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{"data-cy-donut-trap":"",d:t.value.type==="classic"?l.arcSlice:i.value[a].path,fill:p.value===a?"rgba(0,0,0,0.1)":"transparent",onMouseenter:s=>de({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0}),onMouseleave:u[0]||(u[0]=s=>{T.value=!1,p.value=null}),onClick:s=>x(l,a)},null,40,bt))),256))])):(e.openBlock(),e.createElementBlock("g",wt,[e.createElementVNode("circle",{cx:r.value.width/2,cy:r.value.height/2,r:y.value,fill:p.value===o.i?"rgba(0,0,0,0.1)":"transparent","data-cy-donut-trap":"",onMouseenter:u[1]||(u[1]=l=>de({datapoint:d.value[0],relativeIndex:0,seriesIndex:d.value[0].seriesIndex,show:!0})),onMouseleave:u[2]||(u[2]=l=>{T.value=!1,p.value=null}),onClick:u[3]||(u[3]=l=>x(d.value[0],o.i))},null,40,Ct)]))],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.color,"font-size":t.value.style.chart.layout.labels.hollow.total.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.total.text),13,Bt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2+t.value.style.chart.layout.labels.hollow.total.fontSize-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.value.color,"font-size":t.value.style.chart.layout.labels.hollow.total.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.hollow.total.value.formatter,m.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.hollow.total.value.prefix,v:m.value,s:t.value.style.chart.layout.labels.hollow.total.value.suffix}))),13,xt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.color,"font-size":t.value.style.chart.layout.labels.hollow.average.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.average.text),13,_t)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.fontSize+t.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.value.color,"font-size":t.value.style.chart.layout.labels.hollow.average.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},e.toDisplayString(S.value?"--":e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.hollow.average.value.formatter,ce.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:ce.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding}))),13,St)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",{filter:V(a),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",Nt,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(n.calcMarkerOffsetX)(l).x-120:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(n.calcMarkerOffsetX)(l).x-60:e.unref(n.calcMarkerOffsetX)(l).x,y:e.unref(n.calcMarkerOffsetY)(l)-(he.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"dataLabel",e.normalizeProps(e.guardReactiveProps({datapoint:l,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a,isSafari:he.value,isVisible:k(l)&&c.value.dataLabels.show,textAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16).anchor,percentage:Y(l,d.value)})),void 0,!0)])],8,$t))])):(e.openBlock(),e.createElementBlock("g",Et,[t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(n.calcMarkerOffsetX)(l).x,cy:e.unref(n.calcMarkerOffsetY)(l)-3.5,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a?"":`url(#blur_${f.value})`,onClick:s=>x(l,a)},null,8,Lt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).x,cy:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).y,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a?"":`url(#blur_${f.value})`,onClick:s=>x(l,a)},null,8,Ft)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":e.unref(n.calcMarkerOffsetX)(l,!0,12).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(n.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:s=>x(l,a)},e.toDisplayString(Y(l,d.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}),{datapoint:l})})`:""),13,Vt)):e.createCommentVNode("",!0),k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(n.calcMarkerOffsetX)(l).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(n.calcMarkerOffsetY)(l)+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:s=>x(l,a)},e.toDisplayString(l.name),13,zt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":N(i.value[a].middlePoint),x:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x,y:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).y,fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:s=>x(l,a)},e.toDisplayString(Y(l,d.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}),{datapoint:l})})`:""),13,Ot)):e.createCommentVNode("",!0),k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":N(i.value[a].middlePoint),x:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x,y:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).y+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:s=>x(l,a)},e.toDisplayString(l.name),13,Tt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])),c.value.dataLabels.show&&t.value.style.chart.comments.show&&l.comment?(e.openBlock(),e.createElementBlock("g",Xt,[k(l)&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(n.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(n.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width/2:e.unref(n.calcMarkerOffsetX)(l).x),y:e.unref(n.calcMarkerOffsetY)(l)+24+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"plot-comment",{plot:{...l,textAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16).anchor}},void 0,!0)])],8,Dt)):e.createCommentVNode("",!0),k(l)&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:t.value.style.chart.comments.offsetX+(N(i.value[a].middlePoint)==="end"?e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x-t.value.style.chart.comments.width:N(i.value[a].middlePoint)==="middle"?e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x-t.value.style.chart.comments.width/2:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x),y:Se(i.value[a])+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"plot-comment",{plot:{...l,textAlign:N(i.value[a].middlePoint),flexAlign:N(i.value[a].middlePoint)}},void 0,!0)])],8,Mt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,Pt))),256)),e.renderSlot(o.$slots,"svg",{svg:r.value},void 0,!0)],14,Ae)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Yt,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(te)||e.unref(le)})),void 0,!0)])):e.createCommentVNode("",!0),E.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ze.default,{key:6,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:L.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:j},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ve.Legend,{key:`legend_${K.value}`,legendSet:ie.value,config:_e.value,onClickMarker:u[4]||(u[4]=({i:l})=>se(l))},{item:e.withCtx(({legend:l,index:a})=>[e.createElementVNode("div",{onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${w.value.includes(a)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,index:a}))+" ",1),w.value.includes(a)?(e.openBlock(),e.createElementBlock("span",qt," ( "+e.toDisplayString($e(l.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",It," ("+e.toDisplayString(isNaN(l.value/m.value)?"-":e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,S.value?l.proportion*100:l.value/m.value*100,e.unref(n.dataLabel)({v:S.value?l.proportion*100:l.value/m.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})))+") ",1))],12,At)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:ie.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:H,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Fe._sfc_main,{show:c.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:P.value,content:M.value,isCustom:F.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),E.value?(e.openBlock(),e.createBlock(Oe.default,{key:8,hideDetails:"",config:{open:c.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Le.DataTable,{key:`table_${J.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:u[5]||(u[5]=l=>c.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Gt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:isNaN(Number(l))?l.includes("%")?l:e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,l,e.unref(n.dataLabel)({v:l,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding})):e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}))),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ye))}},jt=De._export_sfc(Rt,[["__scopeId","data-v-897a9187"]]);exports.default=jt;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { computed as m, ref as p, onMounted as Ze, watch as Te, openBlock as a, createElementBlock as o, normalizeClass as T, normalizeStyle as re, createBlock as I, createCommentVNode as v, unref as c, createSlots as et, withCtx as F, renderSlot as P, normalizeProps as Y, guardReactiveProps as K, createVNode as tt, createElementVNode as d, Fragment as x, renderList as k, toDisplayString as b, withKeys as lt, createTextVNode as De, nextTick as at } from "vue";
|
|
2
|
-
import { u as ot, o as ut, e as q, g as st, c as Ie, t as nt, a as rt, p as J, b as it, I as ct, d as ie, C as Oe, m as ce, X as vt, s as U, D as dt, i as ve, f as Q, j as Ee, k as Z, n as Ve, J as He, q as ht, r as yt } from "./index-
|
|
3
|
-
import { _ as ft } from "./Title-
|
|
4
|
-
import { u as gt, U as bt } from "./usePrinter-
|
|
5
|
-
import { D as mt } from "./DataTable-
|
|
6
|
-
import { L as pt } from "./Legend-
|
|
7
|
-
import xt from "./vue-ui-skeleton-
|
|
8
|
-
import { S as kt } from "./Slicer-
|
|
9
|
-
import _t from "./vue-ui-accordion-
|
|
10
|
-
import { u as Me } from "./useNestedProp-
|
|
11
|
-
import { _ as Ct } from "./PackageVersion-
|
|
12
|
-
import { P as wt } from "./PenAndPaper-
|
|
2
|
+
import { u as ot, o as ut, e as q, g as st, c as Ie, t as nt, a as rt, p as J, b as it, I as ct, d as ie, C as Oe, m as ce, X as vt, s as U, D as dt, i as ve, f as Q, j as Ee, k as Z, n as Ve, J as He, q as ht, r as yt } from "./index-hQvps1ng.js";
|
|
3
|
+
import { _ as ft } from "./Title-DU9SuVY-.js";
|
|
4
|
+
import { u as gt, U as bt } from "./usePrinter-c5Pf5Hrk.js";
|
|
5
|
+
import { D as mt } from "./DataTable-D7EHk98Z.js";
|
|
6
|
+
import { L as pt } from "./Legend-C8xQE9Da.js";
|
|
7
|
+
import xt from "./vue-ui-skeleton-Dmee5Xfg.js";
|
|
8
|
+
import { S as kt } from "./Slicer-DHzuJMcK.js";
|
|
9
|
+
import _t from "./vue-ui-accordion-CbATWtZa.js";
|
|
10
|
+
import { u as Me } from "./useNestedProp-CxQ2hIfU.js";
|
|
11
|
+
import { _ as Ct } from "./PackageVersion-CiIsJuZg.js";
|
|
12
|
+
import { P as wt } from "./PenAndPaper-BBXIRAdA.js";
|
|
13
13
|
import { _ as Lt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const At = ["id"], $t = ["xmlns", "viewBox"], St = ["id"], Nt = ["stop-color"], zt = ["stop-color"], Ft = ["id"], Pt = ["stop-color"], Tt = ["stop-color"], Dt = ["stop-color"], It = { key: 0 }, Ot = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Et = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Vt = { key: 0 }, Ht = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Mt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Wt = ["x", "y", "font-size", "fill", "font-weight"], Rt = ["text-anchor", "font-size", "fill", "transform"], Ut = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Xt = { key: 1 }, Gt = ["cx", "cy", "r", "fill"], jt = { key: 0 }, Bt = { key: 0 }, Yt = ["d", "stroke"], Kt = ["text-anchor", "x", "y", "fill"], qt = ["cx", "cy", "r", "fill"], Jt = { key: 0 }, Qt = ["cx", "cy", "fill"], Zt = { key: 1 }, el = ["d", "fill", "stroke"], tl = { key: 2 }, ll = ["d", "fill", "stroke"], al = ["x", "y", "font-size", "fill"], ol = ["x", "y", "width", "fill", "onClick"], ul = ["x", "y", "width", "height", "onMouseenter", "onClick"], sl = {
|
|
15
15
|
key: 3,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-B4dbEeod.cjs"),_e=require("./Title-CZ0mh7PE.cjs"),ie=require("./usePrinter-ucBlOzo2.cjs"),Ee=require("./DataTable-CYjIaj19.cjs"),Ne=require("./Legend-C4RfI148.cjs"),we=require("./vue-ui-skeleton-4l6lQhDp.cjs"),Se=require("./Slicer-L8wJ3VZd.cjs"),Le=require("./vue-ui-accordion-8uz6O0zN.cjs"),de=require("./useNestedProp-uYy3UrlZ.cjs"),Ve=require("./PackageVersion-BVorXRgA.cjs"),Ae=require("./PenAndPaper-2ioTztzj.cjs"),$e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ze=["id"],Fe=["xmlns","viewBox"],De=["id"],Pe=["stop-color"],Te=["stop-color"],Oe=["id"],Ie=["stop-color"],Me=["stop-color"],He=["stop-color"],Re={key:0},qe=["x1","x2","y1","y2","stroke","stroke-width"],We=["x1","x2","y1","y2","stroke","stroke-width"],Ue={key:0},Xe=["x1","x2","y1","y2","stroke","stroke-width"],Ge=["x1","x2","y1","y2","stroke","stroke-width"],Ye=["x","y","font-size","fill","font-weight"],je=["text-anchor","font-size","fill","transform"],Ke=["x1","y1","x2","y2","stroke","stroke-width"],Je={key:1},Qe=["cx","cy","r","fill"],Ze={key:0},et={key:0},tt=["d","stroke"],lt=["text-anchor","x","y","fill"],at=["cx","cy","r","fill"],ot={key:0},ut=["cx","cy","fill"],nt={key:1},rt=["d","fill","stroke"],st={key:2},ct=["d","fill","stroke"],it=["x","y","font-size","fill"],dt=["x","y","width","fill","onClick"],vt=["x","y","width","height","onMouseenter","onClick"],ht={key:3,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},yt=["x","y","width","height","fill"],mt=["x1","y1","x2","y2","stroke"],ft=["x1","y2","x2","y1","stroke"],gt=["onKeypress","cx","cy","r"],pt=["d","stroke"],kt=["cx","cy","r","fill"],bt=["d","fill","stroke"],xt={class:"vue-ui-donut-evolution-focus"},Bt=["text-anchor","x","y","fill"],Ct=["cx","cy","r","fill"],_t=["cx","cy","r","fill"],Et=["x","y","fill"],Nt=["x","y","font-size","fill"],wt={key:5,class:"vue-data-ui-watermark"},St=["onClick"],Lt={key:0},Vt={key:1},At={key:9,ref:"source",dir:"auto"},$t={key:0},zt={key:1},Ft={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ve,{expose:he,emit:q}){const p=ve,{vue_ui_donut_evolution:ye}=n.useConfig(),A=e.computed(()=>!!p.dataset&&p.dataset.length),i=e.ref({start:0,end:Math.max(...p.dataset.map(a=>a.values.length))});function W(){i.value={start:0,end:L.value},G.value+=1}e.onMounted(()=>{U()});function U(){n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiDonutEvolution",type:"dataset"}):p.dataset.length&&p.dataset.forEach((a,c)=>{n.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","values"]}).forEach(l=>{n.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:c})})})}const _=e.ref(n.createUid()),y=e.ref([]),h=e.ref(null),D=e.ref(null),k=e.ref(!1),b=e.ref(null),P=e.ref(null),me=e.ref(null),X=e.ref(0),G=e.ref(0),Y=e.ref(0),j=e.ref(0),K=e.ref(0),t=e.computed({get:()=>J(),set:a=>a});function J(){const a=de.useNestedProp({userConfig:p.config,defaultConfig:ye});return a.theme?{...de.useNestedProp({userConfig:n.themes.vue_ui_donut_evolution[a.theme]||p.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}e.watch(()=>p.config,a=>{t.value=J(),U(),Y.value+=1,j.value+=1,K.value+=1},{deep:!0}),e.watch(()=>p.dataset,a=>{W()},{deep:!0});const{isPrinting:Q,isImaging:Z,generatePdf:ee,generateImage:te}=ie.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),fe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ge=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),$=e.ref({showTable:t.value.table.show}),u=e.computed(()=>({top:t.value.style.chart.layout.padding.top,right:t.value.style.chart.layout.padding.right,bottom:t.value.style.chart.layout.padding.bottom,left:t.value.style.chart.layout.padding.left})),s=e.computed(()=>{const a=t.value.style.chart.layout.height,c=t.value.style.chart.layout.width,l=a-u.value.top-u.value.bottom,r=c-u.value.left-u.value.right;return{absoluteHeight:a,absoluteWidth:c,centerX:u.value.left+r/2,centerY:u.value.top+l/2,height:l,width:r}}),C=e.computed(()=>(p.dataset.forEach((a,c)=>{[null,void 0].includes(a.name)&&n.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:c}),[null,void 0].includes(a.values)&&n.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:c})}),p.dataset.map((a,c)=>({...a,values:n.sanitizeArray(a.values),color:n.convertColorToHex(a.color)||ge.value[c]||n.palette[c]||n.palette[c%n.palette.length],length:(a.values||[]).length,uid:n.createUid()})))),S=e.computed(()=>C.value.filter(a=>!y.value.includes(a.uid)).map(a=>({...a,values:a.values.filter((c,l)=>l>=i.value.start&&l<=i.value.end)}))),L=e.computed(()=>Math.max(...S.value.map(a=>a.length))),f=e.computed(()=>s.value.width/(i.value.end-i.value.start)),m=e.computed(()=>{const a=[];for(let o=0;o<i.value.end-i.value.start;o+=1){const v=S.value.map(B=>B.values[o]??null),d=v.filter(B=>[void 0,null].includes(B)).length===v.length,x=v.reduce((B,g)=>B+g,0),R=v.map(B=>B/x),w=u.value.left+f.value*o+f.value/2;a.push({index:o,percentages:R,subtotal:d||x<0?null:x,values:v,x:w})}const c=0,l=Math.max(...a.map(o=>o.subtotal)),r=a.length===1?l*2:l;return a.map((o,v)=>{const d=f.value/2*.7,x=d>s.value.width/16?s.value.width/16:d,R=h.value===o.index?s.value.width/16:x,w=a.length>4?d*2:d*2>f.value/2*.7?f.value/2*.7:d*2,B=s.value.absoluteHeight-u.value.bottom-s.value.height*o.subtotal/n.calculateNiceScale(c,r,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...o,y:B,radius:x,activeRadius:R,hoverRadius:w,donut:n.makeDonut({series:S.value.map((g,ce)=>({color:g.color,name:g.name,value:g.values[v]??0}))},o.x,B,x,x,1.99999,2,1,360,105.25,x/2),donutHover:n.makeDonut({series:S.value.map((g,ce)=>({color:g.color,name:g.name,value:g.values[v]??0}))},o.x,B,w,w,1.99999,2,1,360,105.25,w/2),donutFocus:n.makeDonut({series:S.value.map((g,ce)=>({color:g.color,name:g.name,value:g.values[v]??0}))},s.value.centerX,s.value.centerY,s.value.height/3.6,s.value.height/3.6,1.99999,2,1,360,105.25,s.value.height/6)}})});function z(a,c,l){return n.applyDataLabel(t.value.style.chart.layout.dataLabels.formatter,a,n.dataLabel({p:t.value.style.chart.layout.dataLabels.prefix,v:a,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.dataLabels.rounding}),{datapoint:c,index:l})}const T=e.computed(()=>({max:Math.max(...m.value.map(a=>a.subtotal)),min:0})),E=e.computed(()=>{const a=m.value.length===1?T.value.max*2:T.value.max;return n.calculateNiceScale(T.value.min,a,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function pe(a){return a/E.value.max}const ke=e.computed(()=>E.value.ticks.map(a=>({y:s.value.absoluteHeight-u.value.bottom-s.value.height*pe(a),value:a})));function le(a,c){return isNaN(a.value/n.sumByAttribute(c,"value"))?0:(a.value/n.sumByAttribute(c,"value")*100).toFixed(0)+"%"}function ae(){k.value||(h.value=null,D.value=null)}function be(a){k.value||(h.value=a.index,D.value=a)}const O=e.ref(null);function I(a,c){a.subtotal&&(D.value=null,h.value=null,k.value=!0,b.value=a,[null,void 0].includes(c)||(O.value=c))}function oe(){b.value=null,k.value=!1,O.value=null}const ue=e.computed(()=>C.value.map((a,c)=>({name:a.name,value:a.values.slice(i.value.start,i.value.end).reduce((l,r)=>l+r,0),shape:"circle",uid:a.uid,color:a.color})).sort((a,c)=>c.value-a.value).map(a=>({...a,opacity:y.value.includes(a.uid)?.5:1,segregate:()=>M(a.uid),isSegregated:y.value.includes(a.uid)}))),ne=e.computed(()=>m.value.map(a=>a.subtotal).reduce((a,c)=>a+c,0)),xe=e.computed(()=>({cy:"donut-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":""}));function M(a){if(y.value.includes(a))y.value=y.value.filter(c=>c!==a),q("selectLegend",null);else{if(y.value.length===C.value.length-1)return;y.value.push(a),q("selectLegend",C.value.find(c=>c.uid===a))}b.value&&I(m.value.find((c,l)=>l===O.value))}const N=e.computed(()=>{const a=[""].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>({name:o.name,color:o.color}))).concat(["Σ"]);let c=[];for(let o=0;o<L.value;o+=1){const v=C.value.filter(d=>!y.value.includes(d.uid)).map(d=>d.values[o]??0).reduce((d,x)=>d+x,0);c.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[o]??"-"].concat(C.value.filter(d=>!y.value.includes(d.uid)).map(d=>({value:d.values[o]??0,percentage:d.values[o]?d.values[o]/v*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(v.toFixed(t.value.table.td.roundingValue))}${t.value.style.chart.layout.dataLabels.suffix}`]))}const 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},r=[t.value.table.columnNames.period].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>o.name)).concat(t.value.table.columnNames.total);return{head:a,body:c,config:l,colNames:r}});function Be(){return C.value}function re(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],c=[...N.value.head.map(v=>v.name??v)],l=[...N.value.body.map(v=>v.map(d=>d.value??d))],r=a.concat([c]).concat(l),o=n.createCsvContent(r);n.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function Ce(a){V.value=a,X.value+=1}function se(){$.value.showTable=!$.value.showTable}const F=e.ref(!1);function H(){F.value=!F.value}return he({getData:Be,generatePdf:ee,generateCsv:re,generateImage:te,toggleTable:se,toggleAnnotator:H}),(a,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:P,class:e.normalizeClass(`vue-ui-donut-evolution ${V.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:_.value},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ae.PenAndPaper,{key:0,parent:P.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:H},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),fe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:me,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,style:"width:100%;background:transparent;padding-bottom:24px",onMouseleave:ae},[(e.openBlock(),e.createBlock(_e._sfc_main,{key:`title_${Y.value}`,config:{title:{cy:"donut-evolution-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-evolution-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],32)):e.createCommentVNode("",!0),t.value.userOptions.show&&A.value?(e.openBlock(),e.createBlock(ie.UserOptions,{ref:"details",key:`user_options_${X.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Q),isImaging:e.unref(Z),uid:_.value,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:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:P.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(ee),onGenerateCsv:re,onGenerateImage:e.unref(te),onToggleTable:se,onToggleAnnotator:H},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),A.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${s.value.absoluteWidth} ${s.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ve._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`hover_${_.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,t.value.style.chart.layout.highlighter.opacity)},null,8,Pe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity)},null,8,Te)],8,De),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Ie),e.createElementVNode("stop",{offset:"77%","stop-color":e.unref(n.setOpacity)("#FFFFFF",30)},null,8,Me),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(e.unref(n.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,He)],8,Oe)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Re,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+s.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,qe),e.createElementVNode("line",{x1:u.value.left,x2:s.value.absoluteWidth-u.value.right,y1:s.value.absoluteHeight-u.value.bottom,y2:s.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,We),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.left+(r+1)*f.value,x2:u.value.left+(r+1)*f.value,y1:u.value.top,y2:s.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Xe))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:1,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.left,x2:u.value.left-5,y1:l.y,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Ge)):e.createCommentVNode("",!0),l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:u.value.left-8+t.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,y:l.y+t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize/3,"font-size":t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,"text-anchor":"end",fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.chart.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(e.unref(n.canShowValue)(l.value)?e.unref(n.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue}),{datapoint:l,seriesIndex:r}):""),9,Ye)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:2,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast&&(r===0||r===L.value-1)||!t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,fill:t.value.style.chart.layout.grid.xAxis.dataLabels.color,transform:`translate(${u.value.left+f.value*r+f.value/2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY+s.value.absoluteHeight-u.value.bottom+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2}), rotate(${t.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(r)+Number(i.value.start)]??""),9,je)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&r<m.value.length-1&&![l.subtotal,m.value[r+1].subtotal].includes(null)?(e.openBlock(),e.createElementBlock("line",{key:0,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value}),x1:l.x,y1:l.y,x2:m.value[r+1].x,y2:m.value[r+1].y,stroke:t.value.style.chart.layout.line.stroke,"stroke-width":t.value.style.chart.layout.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,10,Ke)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Je,[l.subtotal?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:l.activeRadius,fill:t.value.style.chart.backgroundColor},null,8,Qe)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":r!==h.value&&h.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",Ze,[h.value!==null&&h.value===r?(e.openBlock(),e.createElementBlock("g",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,o=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(n.calcNutArrowPath)(o,{x:o.center.endX,y:o.center.endY},12,12,{x:l.x,y:l.y},!0,20),stroke:o.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,tt)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(n.calcMarkerOffsetX)(o,!0,0).anchor,x:e.unref(n.calcMarkerOffsetX)(o,!0,3).x,y:e.unref(n.calcMarkerOffsetY)(o),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(o.name)+": "+e.toDisplayString(le(o,l.donut))+" ("+e.toDisplayString(o.value===null?"-":z(o.value,o,v))+") ",9,lt)]))),256)),e.createElementVNode("g",null,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:l.hoverRadius,fill:t.value.style.chart.backgroundColor},null,8,at)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":r!==h.value&&h.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",ot,[l.subtotal===0?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:3,fill:t.value.style.chart.color},null,8,ut)):h.value!==null&&h.value===r?(e.openBlock(),e.createElementBlock("g",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,rt))),256))])):(e.openBlock(),e.createElementBlock("g",st,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,ct))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":r!==h.value&&h.value!==null||k.value})},[l.subtotal!==null&&t.value.style.chart.layout.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:l.x,y:h.value===l.index&&l.subtotal?l.y+t.value.style.chart.layout.dataLabels.fontSize/3:l.y-l.radius-t.value.style.chart.layout.dataLabels.fontSize+t.value.style.chart.layout.dataLabels.offsetY,"font-size":t.value.style.chart.layout.dataLabels.fontSize,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(z(l.subtotal,l,r)),9,it)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+r*f.value,y:s.value.absoluteHeight-u.value.bottom-10,width:f.value,height:10,fill:h.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:o=>I(l,r),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,10,dt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{"data-cy-trap":"",x:u.value.left+r*f.value,y:u.value.top,width:f.value,height:s.value.height,fill:"transparent",onMouseenter:o=>be(l),onMouseleave:ae,onClick:o=>I(l,r),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,42,vt))),256)),k.value?(e.openBlock(),e.createElementBlock("g",ht,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:s.value.width,height:s.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,yt),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:s.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:s.value.absoluteWidth-u.value.right-4,y2:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,mt),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:s.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:s.value.absoluteWidth-u.value.right-4,y1:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,ft),e.createElementVNode("circle",{"data-cy-close":"",onClick:oe,onKeypress:e.withKeys(oe,["enter"]),cx:s.value.absoluteWidth-u.value.right-s.value.width/40,cy:u.value.top+s.value.height/30,r:s.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,gt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,l=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-zoom-donut":"",d:e.unref(n.calcNutArrowPath)(l,{x:s.value.centerX,y:s.value.centerY},12,12,!1,!1,15),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"vue-ui-donut-evolution-focus"},null,8,pt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+s.value.width/2,cy:u.value.top+s.value.height/2,r:s.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,kt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:`${l.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor,class:"vue-ui-donut-evolution-focus"},null,8,bt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,r)=>(e.openBlock(),e.createElementBlock("g",xt,[e.createElementVNode("text",{"text-anchor":e.unref(n.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,10).x,y:e.unref(n.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":10,"font-weight":"bold"},e.toDisplayString(l.name)+": "+e.toDisplayString(le(l,b.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":z(l.value,l,r))+") ",9,Bt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+s.value.width/2,cy:u.value.top+s.value.height/2,r:s.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,Ct),e.createElementVNode("circle",{cx:u.value.left+s.value.width/2,cy:u.value.top+s.value.height/2,r:s.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,_t),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+s.value.width/2,y:u.value.top+s.value.height/2+14/3,"font-size":14,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color,class:"vue-ui-donut-evolution-focus"},e.toDisplayString(z(b.value.subtotal,b.value,null)),9,Et),t.value.style.chart.layout.grid.xAxis.dataLabels.values[b.value.index]?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.value.left+6,y:u.value.top+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2,"font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*1.6,fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(b.value.index)+Number(i.value.start)]),9,Nt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:s.value},void 0,!0)],14,Fe)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",wt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(Z)})),void 0,!0)])):e.createCommentVNode("",!0),A.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:6,config:{type:"donutEvolution",style:{backgroundColor:t.value.style.chart.backgroundColor,donutEvolution:{axis:{color:"#CCCCCC"},donuts:{color:"#CCCCCC"}}}}},null,8,["config"])),L.value>1&&t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(Se.Slicer,{key:`slicer_${G.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.start)]||"",labelRight:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.end)-1]||"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:L.value,min:0,valueStart:i.value.start,valueEnd:i.value.end,start:i.value.start,"onUpdate:start":c[0]||(c[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":c[1]||(c[1]=l=>i.value.end=l),onReset:W},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(a.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ne.Legend,{key:`legend_${K.value}`,legendSet:ue.value,config:xe.value,onClickMarker:c[2]||(c[2]=({legend:l})=>M(l.uid))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>M(l.uid),style:e.normalizeStyle(`opacity:${y.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r}))+" ",1),y.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",Vt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Lt," ("+e.toDisplayString(isNaN(l.value/ne.value)?"-":e.unref(n.dataLabel)({v:l.value/ne.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,St)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:ue.value},void 0,!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",At,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),A.value?(e.openBlock(),e.createBlock(Le.default,{key:10,hideDetails:"",config:{open:$.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ee.DataTable,{key:`table_${j.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:c[3]||(c[3]=l=>$.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name??l),1)]),td:e.withCtx(({td:l})=>[l.value===null?(e.openBlock(),e.createElementBlock("span",$t,"-")):(e.openBlock(),e.createElementBlock("b",zt,e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.prefix)+e.toDisplayString(!isNaN(l.value)&&l.value!==null?Number(l.value.toFixed(t.value.table.td.roundingValue)).toLocaleString():l)+e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.suffix),1)),e.createElementVNode("span",null,e.toDisplayString(l.percentage&&!isNaN(l.percentage)?`(${Number(l.percentage.toFixed(t.value.table.td.roundingPercentage)).toLocaleString()}%)`:""),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ze))}},Dt=$e._export_sfc(Ft,[["__scopeId","data-v-800b47b9"]]);exports.default=Dt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DCccP2Kt.cjs"),_e=require("./Title-BeCsXJhg.cjs"),ie=require("./usePrinter-C-C264ik.cjs"),Ee=require("./DataTable-Dk61oGV_.cjs"),Ne=require("./Legend-6jFPkL1P.cjs"),we=require("./vue-ui-skeleton-Ckb3hRcQ.cjs"),Se=require("./Slicer-A-l0DLQY.cjs"),Le=require("./vue-ui-accordion-CTxFHMF7.cjs"),de=require("./useNestedProp-DzZoHbI7.cjs"),Ve=require("./PackageVersion-C7okNmPF.cjs"),Ae=require("./PenAndPaper-BUjMRWG0.cjs"),$e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ze=["id"],Fe=["xmlns","viewBox"],De=["id"],Pe=["stop-color"],Te=["stop-color"],Oe=["id"],Ie=["stop-color"],Me=["stop-color"],He=["stop-color"],Re={key:0},qe=["x1","x2","y1","y2","stroke","stroke-width"],We=["x1","x2","y1","y2","stroke","stroke-width"],Ue={key:0},Xe=["x1","x2","y1","y2","stroke","stroke-width"],Ge=["x1","x2","y1","y2","stroke","stroke-width"],Ye=["x","y","font-size","fill","font-weight"],je=["text-anchor","font-size","fill","transform"],Ke=["x1","y1","x2","y2","stroke","stroke-width"],Je={key:1},Qe=["cx","cy","r","fill"],Ze={key:0},et={key:0},tt=["d","stroke"],lt=["text-anchor","x","y","fill"],at=["cx","cy","r","fill"],ot={key:0},ut=["cx","cy","fill"],nt={key:1},rt=["d","fill","stroke"],st={key:2},ct=["d","fill","stroke"],it=["x","y","font-size","fill"],dt=["x","y","width","fill","onClick"],vt=["x","y","width","height","onMouseenter","onClick"],ht={key:3,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},yt=["x","y","width","height","fill"],mt=["x1","y1","x2","y2","stroke"],ft=["x1","y2","x2","y1","stroke"],gt=["onKeypress","cx","cy","r"],pt=["d","stroke"],kt=["cx","cy","r","fill"],bt=["d","fill","stroke"],xt={class:"vue-ui-donut-evolution-focus"},Bt=["text-anchor","x","y","fill"],Ct=["cx","cy","r","fill"],_t=["cx","cy","r","fill"],Et=["x","y","fill"],Nt=["x","y","font-size","fill"],wt={key:5,class:"vue-data-ui-watermark"},St=["onClick"],Lt={key:0},Vt={key:1},At={key:9,ref:"source",dir:"auto"},$t={key:0},zt={key:1},Ft={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ve,{expose:he,emit:q}){const p=ve,{vue_ui_donut_evolution:ye}=n.useConfig(),A=e.computed(()=>!!p.dataset&&p.dataset.length),i=e.ref({start:0,end:Math.max(...p.dataset.map(a=>a.values.length))});function W(){i.value={start:0,end:L.value},G.value+=1}e.onMounted(()=>{U()});function U(){n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiDonutEvolution",type:"dataset"}):p.dataset.length&&p.dataset.forEach((a,c)=>{n.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","values"]}).forEach(l=>{n.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:c})})})}const _=e.ref(n.createUid()),y=e.ref([]),h=e.ref(null),D=e.ref(null),k=e.ref(!1),b=e.ref(null),P=e.ref(null),me=e.ref(null),X=e.ref(0),G=e.ref(0),Y=e.ref(0),j=e.ref(0),K=e.ref(0),t=e.computed({get:()=>J(),set:a=>a});function J(){const a=de.useNestedProp({userConfig:p.config,defaultConfig:ye});return a.theme?{...de.useNestedProp({userConfig:n.themes.vue_ui_donut_evolution[a.theme]||p.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}e.watch(()=>p.config,a=>{t.value=J(),U(),Y.value+=1,j.value+=1,K.value+=1},{deep:!0}),e.watch(()=>p.dataset,a=>{W()},{deep:!0});const{isPrinting:Q,isImaging:Z,generatePdf:ee,generateImage:te}=ie.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),fe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ge=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),$=e.ref({showTable:t.value.table.show}),u=e.computed(()=>({top:t.value.style.chart.layout.padding.top,right:t.value.style.chart.layout.padding.right,bottom:t.value.style.chart.layout.padding.bottom,left:t.value.style.chart.layout.padding.left})),s=e.computed(()=>{const a=t.value.style.chart.layout.height,c=t.value.style.chart.layout.width,l=a-u.value.top-u.value.bottom,r=c-u.value.left-u.value.right;return{absoluteHeight:a,absoluteWidth:c,centerX:u.value.left+r/2,centerY:u.value.top+l/2,height:l,width:r}}),C=e.computed(()=>(p.dataset.forEach((a,c)=>{[null,void 0].includes(a.name)&&n.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:c}),[null,void 0].includes(a.values)&&n.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:c})}),p.dataset.map((a,c)=>({...a,values:n.sanitizeArray(a.values),color:n.convertColorToHex(a.color)||ge.value[c]||n.palette[c]||n.palette[c%n.palette.length],length:(a.values||[]).length,uid:n.createUid()})))),S=e.computed(()=>C.value.filter(a=>!y.value.includes(a.uid)).map(a=>({...a,values:a.values.filter((c,l)=>l>=i.value.start&&l<=i.value.end)}))),L=e.computed(()=>Math.max(...S.value.map(a=>a.length))),f=e.computed(()=>s.value.width/(i.value.end-i.value.start)),m=e.computed(()=>{const a=[];for(let o=0;o<i.value.end-i.value.start;o+=1){const v=S.value.map(B=>B.values[o]??null),d=v.filter(B=>[void 0,null].includes(B)).length===v.length,x=v.reduce((B,g)=>B+g,0),R=v.map(B=>B/x),w=u.value.left+f.value*o+f.value/2;a.push({index:o,percentages:R,subtotal:d||x<0?null:x,values:v,x:w})}const c=0,l=Math.max(...a.map(o=>o.subtotal)),r=a.length===1?l*2:l;return a.map((o,v)=>{const d=f.value/2*.7,x=d>s.value.width/16?s.value.width/16:d,R=h.value===o.index?s.value.width/16:x,w=a.length>4?d*2:d*2>f.value/2*.7?f.value/2*.7:d*2,B=s.value.absoluteHeight-u.value.bottom-s.value.height*o.subtotal/n.calculateNiceScale(c,r,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...o,y:B,radius:x,activeRadius:R,hoverRadius:w,donut:n.makeDonut({series:S.value.map((g,ce)=>({color:g.color,name:g.name,value:g.values[v]??0}))},o.x,B,x,x,1.99999,2,1,360,105.25,x/2),donutHover:n.makeDonut({series:S.value.map((g,ce)=>({color:g.color,name:g.name,value:g.values[v]??0}))},o.x,B,w,w,1.99999,2,1,360,105.25,w/2),donutFocus:n.makeDonut({series:S.value.map((g,ce)=>({color:g.color,name:g.name,value:g.values[v]??0}))},s.value.centerX,s.value.centerY,s.value.height/3.6,s.value.height/3.6,1.99999,2,1,360,105.25,s.value.height/6)}})});function z(a,c,l){return n.applyDataLabel(t.value.style.chart.layout.dataLabels.formatter,a,n.dataLabel({p:t.value.style.chart.layout.dataLabels.prefix,v:a,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.dataLabels.rounding}),{datapoint:c,index:l})}const T=e.computed(()=>({max:Math.max(...m.value.map(a=>a.subtotal)),min:0})),E=e.computed(()=>{const a=m.value.length===1?T.value.max*2:T.value.max;return n.calculateNiceScale(T.value.min,a,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function pe(a){return a/E.value.max}const ke=e.computed(()=>E.value.ticks.map(a=>({y:s.value.absoluteHeight-u.value.bottom-s.value.height*pe(a),value:a})));function le(a,c){return isNaN(a.value/n.sumByAttribute(c,"value"))?0:(a.value/n.sumByAttribute(c,"value")*100).toFixed(0)+"%"}function ae(){k.value||(h.value=null,D.value=null)}function be(a){k.value||(h.value=a.index,D.value=a)}const O=e.ref(null);function I(a,c){a.subtotal&&(D.value=null,h.value=null,k.value=!0,b.value=a,[null,void 0].includes(c)||(O.value=c))}function oe(){b.value=null,k.value=!1,O.value=null}const ue=e.computed(()=>C.value.map((a,c)=>({name:a.name,value:a.values.slice(i.value.start,i.value.end).reduce((l,r)=>l+r,0),shape:"circle",uid:a.uid,color:a.color})).sort((a,c)=>c.value-a.value).map(a=>({...a,opacity:y.value.includes(a.uid)?.5:1,segregate:()=>M(a.uid),isSegregated:y.value.includes(a.uid)}))),ne=e.computed(()=>m.value.map(a=>a.subtotal).reduce((a,c)=>a+c,0)),xe=e.computed(()=>({cy:"donut-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":""}));function M(a){if(y.value.includes(a))y.value=y.value.filter(c=>c!==a),q("selectLegend",null);else{if(y.value.length===C.value.length-1)return;y.value.push(a),q("selectLegend",C.value.find(c=>c.uid===a))}b.value&&I(m.value.find((c,l)=>l===O.value))}const N=e.computed(()=>{const a=[""].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>({name:o.name,color:o.color}))).concat(["Σ"]);let c=[];for(let o=0;o<L.value;o+=1){const v=C.value.filter(d=>!y.value.includes(d.uid)).map(d=>d.values[o]??0).reduce((d,x)=>d+x,0);c.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[o]??"-"].concat(C.value.filter(d=>!y.value.includes(d.uid)).map(d=>({value:d.values[o]??0,percentage:d.values[o]?d.values[o]/v*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(v.toFixed(t.value.table.td.roundingValue))}${t.value.style.chart.layout.dataLabels.suffix}`]))}const 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},r=[t.value.table.columnNames.period].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>o.name)).concat(t.value.table.columnNames.total);return{head:a,body:c,config:l,colNames:r}});function Be(){return C.value}function re(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],c=[...N.value.head.map(v=>v.name??v)],l=[...N.value.body.map(v=>v.map(d=>d.value??d))],r=a.concat([c]).concat(l),o=n.createCsvContent(r);n.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function Ce(a){V.value=a,X.value+=1}function se(){$.value.showTable=!$.value.showTable}const F=e.ref(!1);function H(){F.value=!F.value}return he({getData:Be,generatePdf:ee,generateCsv:re,generateImage:te,toggleTable:se,toggleAnnotator:H}),(a,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:P,class:e.normalizeClass(`vue-ui-donut-evolution ${V.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:_.value},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ae.PenAndPaper,{key:0,parent:P.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:H},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),fe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:me,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,style:"width:100%;background:transparent;padding-bottom:24px",onMouseleave:ae},[(e.openBlock(),e.createBlock(_e._sfc_main,{key:`title_${Y.value}`,config:{title:{cy:"donut-evolution-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-evolution-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],32)):e.createCommentVNode("",!0),t.value.userOptions.show&&A.value?(e.openBlock(),e.createBlock(ie.UserOptions,{ref:"details",key:`user_options_${X.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Q),isImaging:e.unref(Z),uid:_.value,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:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:P.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(ee),onGenerateCsv:re,onGenerateImage:e.unref(te),onToggleTable:se,onToggleAnnotator:H},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),A.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${s.value.absoluteWidth} ${s.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ve._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`hover_${_.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,t.value.style.chart.layout.highlighter.opacity)},null,8,Pe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity)},null,8,Te)],8,De),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Ie),e.createElementVNode("stop",{offset:"77%","stop-color":e.unref(n.setOpacity)("#FFFFFF",30)},null,8,Me),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(e.unref(n.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,He)],8,Oe)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Re,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+s.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,qe),e.createElementVNode("line",{x1:u.value.left,x2:s.value.absoluteWidth-u.value.right,y1:s.value.absoluteHeight-u.value.bottom,y2:s.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,We),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.left+(r+1)*f.value,x2:u.value.left+(r+1)*f.value,y1:u.value.top,y2:s.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Xe))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:1,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.left,x2:u.value.left-5,y1:l.y,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Ge)):e.createCommentVNode("",!0),l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:u.value.left-8+t.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,y:l.y+t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize/3,"font-size":t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,"text-anchor":"end",fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.chart.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(e.unref(n.canShowValue)(l.value)?e.unref(n.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue}),{datapoint:l,seriesIndex:r}):""),9,Ye)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:2,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast&&(r===0||r===L.value-1)||!t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,fill:t.value.style.chart.layout.grid.xAxis.dataLabels.color,transform:`translate(${u.value.left+f.value*r+f.value/2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY+s.value.absoluteHeight-u.value.bottom+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2}), rotate(${t.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(r)+Number(i.value.start)]??""),9,je)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&r<m.value.length-1&&![l.subtotal,m.value[r+1].subtotal].includes(null)?(e.openBlock(),e.createElementBlock("line",{key:0,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value}),x1:l.x,y1:l.y,x2:m.value[r+1].x,y2:m.value[r+1].y,stroke:t.value.style.chart.layout.line.stroke,"stroke-width":t.value.style.chart.layout.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,10,Ke)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Je,[l.subtotal?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:l.activeRadius,fill:t.value.style.chart.backgroundColor},null,8,Qe)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":r!==h.value&&h.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",Ze,[h.value!==null&&h.value===r?(e.openBlock(),e.createElementBlock("g",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,o=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(n.calcNutArrowPath)(o,{x:o.center.endX,y:o.center.endY},12,12,{x:l.x,y:l.y},!0,20),stroke:o.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,tt)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(n.calcMarkerOffsetX)(o,!0,0).anchor,x:e.unref(n.calcMarkerOffsetX)(o,!0,3).x,y:e.unref(n.calcMarkerOffsetY)(o),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(o.name)+": "+e.toDisplayString(le(o,l.donut))+" ("+e.toDisplayString(o.value===null?"-":z(o.value,o,v))+") ",9,lt)]))),256)),e.createElementVNode("g",null,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:l.hoverRadius,fill:t.value.style.chart.backgroundColor},null,8,at)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":r!==h.value&&h.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",ot,[l.subtotal===0?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:3,fill:t.value.style.chart.color},null,8,ut)):h.value!==null&&h.value===r?(e.openBlock(),e.createElementBlock("g",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,rt))),256))])):(e.openBlock(),e.createElementBlock("g",st,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,ct))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":r!==h.value&&h.value!==null||k.value})},[l.subtotal!==null&&t.value.style.chart.layout.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:l.x,y:h.value===l.index&&l.subtotal?l.y+t.value.style.chart.layout.dataLabels.fontSize/3:l.y-l.radius-t.value.style.chart.layout.dataLabels.fontSize+t.value.style.chart.layout.dataLabels.offsetY,"font-size":t.value.style.chart.layout.dataLabels.fontSize,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(z(l.subtotal,l,r)),9,it)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+r*f.value,y:s.value.absoluteHeight-u.value.bottom-10,width:f.value,height:10,fill:h.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:o=>I(l,r),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,10,dt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{"data-cy-trap":"",x:u.value.left+r*f.value,y:u.value.top,width:f.value,height:s.value.height,fill:"transparent",onMouseenter:o=>be(l),onMouseleave:ae,onClick:o=>I(l,r),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,42,vt))),256)),k.value?(e.openBlock(),e.createElementBlock("g",ht,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:s.value.width,height:s.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,yt),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:s.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:s.value.absoluteWidth-u.value.right-4,y2:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,mt),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:s.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:s.value.absoluteWidth-u.value.right-4,y1:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,ft),e.createElementVNode("circle",{"data-cy-close":"",onClick:oe,onKeypress:e.withKeys(oe,["enter"]),cx:s.value.absoluteWidth-u.value.right-s.value.width/40,cy:u.value.top+s.value.height/30,r:s.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,gt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,l=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-zoom-donut":"",d:e.unref(n.calcNutArrowPath)(l,{x:s.value.centerX,y:s.value.centerY},12,12,!1,!1,15),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"vue-ui-donut-evolution-focus"},null,8,pt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+s.value.width/2,cy:u.value.top+s.value.height/2,r:s.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,kt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:`${l.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor,class:"vue-ui-donut-evolution-focus"},null,8,bt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,r)=>(e.openBlock(),e.createElementBlock("g",xt,[e.createElementVNode("text",{"text-anchor":e.unref(n.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,10).x,y:e.unref(n.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":10,"font-weight":"bold"},e.toDisplayString(l.name)+": "+e.toDisplayString(le(l,b.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":z(l.value,l,r))+") ",9,Bt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+s.value.width/2,cy:u.value.top+s.value.height/2,r:s.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,Ct),e.createElementVNode("circle",{cx:u.value.left+s.value.width/2,cy:u.value.top+s.value.height/2,r:s.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,_t),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+s.value.width/2,y:u.value.top+s.value.height/2+14/3,"font-size":14,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color,class:"vue-ui-donut-evolution-focus"},e.toDisplayString(z(b.value.subtotal,b.value,null)),9,Et),t.value.style.chart.layout.grid.xAxis.dataLabels.values[b.value.index]?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.value.left+6,y:u.value.top+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2,"font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*1.6,fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(b.value.index)+Number(i.value.start)]),9,Nt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:s.value},void 0,!0)],14,Fe)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",wt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(Z)})),void 0,!0)])):e.createCommentVNode("",!0),A.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:6,config:{type:"donutEvolution",style:{backgroundColor:t.value.style.chart.backgroundColor,donutEvolution:{axis:{color:"#CCCCCC"},donuts:{color:"#CCCCCC"}}}}},null,8,["config"])),L.value>1&&t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(Se.Slicer,{key:`slicer_${G.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.start)]||"",labelRight:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.end)-1]||"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:L.value,min:0,valueStart:i.value.start,valueEnd:i.value.end,start:i.value.start,"onUpdate:start":c[0]||(c[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":c[1]||(c[1]=l=>i.value.end=l),onReset:W},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(a.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ne.Legend,{key:`legend_${K.value}`,legendSet:ue.value,config:xe.value,onClickMarker:c[2]||(c[2]=({legend:l})=>M(l.uid))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>M(l.uid),style:e.normalizeStyle(`opacity:${y.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r}))+" ",1),y.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",Vt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Lt," ("+e.toDisplayString(isNaN(l.value/ne.value)?"-":e.unref(n.dataLabel)({v:l.value/ne.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,St)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:ue.value},void 0,!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",At,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),A.value?(e.openBlock(),e.createBlock(Le.default,{key:10,hideDetails:"",config:{open:$.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ee.DataTable,{key:`table_${j.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:c[3]||(c[3]=l=>$.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name??l),1)]),td:e.withCtx(({td:l})=>[l.value===null?(e.openBlock(),e.createElementBlock("span",$t,"-")):(e.openBlock(),e.createElementBlock("b",zt,e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.prefix)+e.toDisplayString(!isNaN(l.value)&&l.value!==null?Number(l.value.toFixed(t.value.table.td.roundingValue)).toLocaleString():l)+e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.suffix),1)),e.createElementVNode("span",null,e.toDisplayString(l.percentage&&!isNaN(l.percentage)?`(${Number(l.percentage.toFixed(t.value.table.td.roundingPercentage)).toLocaleString()}%)`:""),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ze))}},Dt=$e._export_sfc(Ft,[["__scopeId","data-v-800b47b9"]]);exports.default=Dt;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-B4dbEeod.cjs"),Y=require("./useResponsive-BJ7DTGpm.cjs"),ne=require("./Title-CZ0mh7PE.cjs"),Z=require("./usePrinter-ucBlOzo2.cjs"),ue=require("./DataTable-CYjIaj19.cjs"),ce=require("./vue-ui-skeleton-4l6lQhDp.cjs"),ie=require("./Legend-C4RfI148.cjs"),de=require("./vue-ui-accordion-8uz6O0zN.cjs"),J=require("./useNestedProp-uYy3UrlZ.cjs"),ve=require("./PackageVersion-BVorXRgA.cjs"),he=require("./PenAndPaper-2ioTztzj.cjs"),ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],me=["xmlns","viewBox"],be={key:0},pe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ge={key:1},ke=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],_e=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],xe={key:2},Ce=["x","y","font-size","fill","font-weight"],we=["x","y","font-size","fill"],Be={key:3},Ne=["x","y","font-size","fill","font-weight"],Ee=["id"],$e=["stop-color"],Le=["stop-color"],Ve=["stop-color"],Se=["id"],ze=["stop-color"],Ae=["stop-color"],Pe=["stop-color"],Te=["id"],Xe=["stop-color"],De=["stop-color"],Fe=["id"],Me=["stop-color"],Ge=["stop-color"],Ie={key:0},Oe=["d","fill"],qe={key:1},He=["x","y","height","width","fill"],Re=["cx","cy","r","fill","stroke","stroke-width"],We=["cx","cy","r","fill","stroke","stroke-width"],Ue={key:2},je=["x","y","fill","font-size"],Ye={key:3},Ze=["x","y","fill","font-size"],Je={key:5,class:"vue-data-ui-watermark"},Ke=["xmlns","height","width"],Qe=["fill"],et=["innerHTML"],tt={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(K,{expose:Q,emit:at}){const y=K,{vue_ui_dumbbell:ee}=s.useConfig(),b=e.computed({get(){return!!y.dataset&&y.dataset.length},set(a){return a}}),d=e.ref(s.createUid()),V=e.ref(0),p=e.ref(null),S=e.ref(null),z=e.ref(null),A=e.ref(null),P=e.ref(null),T=e.ref(0),X=e.ref(0),D=e.ref(0),t=e.computed({get:()=>F(),set:a=>a});function F(){const a=J.useNestedProp({userConfig:y.config,defaultConfig:ee});return a.theme?{...J.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||y.config,defaultConfig:a})}:a}e.watch(()=>y.config,a=>{t.value=F(),M(),T.value+=1,X.value+=1,D.value+=1,i.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width},{deep:!0}),e.watch(()=>y.dataset,a=>{R()},{deep:!0});const _=e.ref(null);e.onMounted(()=>{M()});function M(){if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):y.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=Y.throttle(()=>{const{width:n,height:l}=Y.useResponsive({chart:p.value,title:t.value.style.chart.title.text?S.value:null,legend:t.value.style.chart.legend.show?z.value:null,source:A.value,noTitle:P.value});g.value=n,i.value=l/y.dataset.length,v.value=C()});_.value=new ResizeObserver(a),_.value.observe(p.value.parentNode)}}e.onBeforeUnmount(()=>{_.value&&_.value.disconnect()});const{isPrinting:G,isImaging:I,generatePdf:O,generateImage:q}=Z.usePrinter({elementId:`dumbbell_${d.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell"}),te=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),x=e.ref({showTable:t.value.table.show}),f=e.computed(()=>y.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),E=e.computed(()=>({max:Math.max(...f.value.flatMap(a=>[a.start,a.end])),min:Math.min(...f.value.flatMap(a=>[a.start,a.end]))})),c=e.computed(()=>s.calculateNiceScale(E.value.min<0?E.value.min:0,E.value.max,t.value.style.chart.grid.scaleSteps)),i=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),r=e.computed(()=>{const a=i.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+g.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*y.dataset.length,o=c.value.ticks.length*(g.value/c.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:g.value,height:a*y.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:o}});function C(){return f.value.map((a,n)=>{const l=r.value.left+(a.start+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*r.value.widthPlotReference,o=r.value.left+(a.end+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*r.value.widthPlotReference,u=l+(o-l)/2;return{...a,startX:l,endX:o,centerX:u,y:r.value.top+n*i.value+i.value/2,endVal:a.start}})}const v=e.ref([]),H=e.ref(null),le=e.computed(()=>f.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{R()});function R(){v.value=C();let a=v.value.map(l=>l.start).reduce((l,o)=>l+o,0);function n(){const l=f.value.map(o=>o.end-o.start);a>=le.value?(cancelAnimationFrame(H.value),v.value=C()):(v.value=v.value.map((o,u)=>{o.endVal+=l[u]*(t.value.animationSpeed/100);const h=r.value.left+(o.start+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*r.value.widthPlotReference,N=r.value.left+(o.endVal+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*r.value.widthPlotReference,L=h+(N-h)/2;return{...o,startX:h,endX:N,centerX:L,y:r.value.top+u*i.value+i.value/2,endVal:o.endVal}}),a=v.value.map(o=>o.endVal).reduce((o,u)=>o+u,0),H.value=requestAnimationFrame(n))}t.value.useAnimation?n():v.value=C()}const W=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${d.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${d.value})`:t.value.style.chart.plots.endColor}]),ae=e.computed(()=>({cy:"donut-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,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),m=e.computed(()=>{const a=v.value.map(l=>({name:l.name})),n=v.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=m.value.head.map((u,h)=>{const N=s.dataLabel({p:t.value.style.chart.labels.prefix,v:m.value.body[h].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),L=s.dataLabel({p:t.value.style.chart.labels.prefix,v:m.value.body[h].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),se=s.dataLabel({v:100*(m.value.body[h].end/m.value.body[h].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:u.name},N,L,se]}),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{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function U(){e.nextTick(()=>{const a=m.value.head.map((o,u)=>[[o.name],[m.value.body[u].start],[m.value.body[u].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const k=e.ref(!1);function oe(a){k.value=a,V.value+=1}function re(){return v.value}function j(){x.value.showTable=!x.value.showTable}const B=e.ref(!1);function $(){B.value=!B.value}return Q({getData:re,generatePdf:O,generateCsv:U,generateImage:q,toggleTable:j,toggleAnnotator:$}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:p,class:e.normalizeClass(`vue-ui-dumbbell ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${d.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(he.PenAndPaper,{key:0,parent:p.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:$},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:P,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:S,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ne._sfc_main,{key:`title_${T.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(Z.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(G),isImaging:e.unref(I),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:oe,onGeneratePdf:e.unref(O),onGenerateCsv:U,onGenerateImage:e.unref(q),onToggleTable:j,onToggleAnnotator:$},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.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:"4"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${r.value.absoluteWidth<=0?10:r.value.absoluteWidth} ${r.value.absoluteHeight<=0?10:r.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ve._sfc_main),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left+o*r.value.width/(c.value.ticks.length-1),x2:r.value.left+o*r.value.width/(c.value.ticks.length-1),y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,pe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left,x2:r.value.right,y1:r.value.top+o*i.value,y2:r.value.top+o*i.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,ke))),256)),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,_e)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+(t.value.style.chart.labels.yAxisLabels.showProgression?i.value/3:i.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,Ce))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+i.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,we))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",Be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left+o*(r.value.width/(c.value.ticks.length-1)),y:r.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,l,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding}),{datapoint:l,seriesIndex:o})),9,Ne))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,$e),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Le),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Ve)],8,Ee),e.createElementVNode("radialGradient",{id:`end_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,ze),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Ae),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Pe)],8,Se)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,De)],8,Te),e.createElementVNode("linearGradient",{id:`grad_negative_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Me),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Ge)],8,Fe)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",Ie,[e.createElementVNode("path",{d:`M
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DCccP2Kt.cjs"),Y=require("./useResponsive-BJ7DTGpm.cjs"),ne=require("./Title-BeCsXJhg.cjs"),Z=require("./usePrinter-C-C264ik.cjs"),ue=require("./DataTable-Dk61oGV_.cjs"),ce=require("./vue-ui-skeleton-Ckb3hRcQ.cjs"),ie=require("./Legend-6jFPkL1P.cjs"),de=require("./vue-ui-accordion-CTxFHMF7.cjs"),J=require("./useNestedProp-DzZoHbI7.cjs"),ve=require("./PackageVersion-C7okNmPF.cjs"),he=require("./PenAndPaper-BUjMRWG0.cjs"),ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],me=["xmlns","viewBox"],be={key:0},pe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ge={key:1},ke=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],_e=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],xe={key:2},Ce=["x","y","font-size","fill","font-weight"],we=["x","y","font-size","fill"],Be={key:3},Ne=["x","y","font-size","fill","font-weight"],Ee=["id"],$e=["stop-color"],Le=["stop-color"],Ve=["stop-color"],Se=["id"],ze=["stop-color"],Ae=["stop-color"],Pe=["stop-color"],Te=["id"],Xe=["stop-color"],De=["stop-color"],Fe=["id"],Me=["stop-color"],Ge=["stop-color"],Ie={key:0},Oe=["d","fill"],qe={key:1},He=["x","y","height","width","fill"],Re=["cx","cy","r","fill","stroke","stroke-width"],We=["cx","cy","r","fill","stroke","stroke-width"],Ue={key:2},je=["x","y","fill","font-size"],Ye={key:3},Ze=["x","y","fill","font-size"],Je={key:5,class:"vue-data-ui-watermark"},Ke=["xmlns","height","width"],Qe=["fill"],et=["innerHTML"],tt={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(K,{expose:Q,emit:at}){const y=K,{vue_ui_dumbbell:ee}=s.useConfig(),b=e.computed({get(){return!!y.dataset&&y.dataset.length},set(a){return a}}),d=e.ref(s.createUid()),V=e.ref(0),p=e.ref(null),S=e.ref(null),z=e.ref(null),A=e.ref(null),P=e.ref(null),T=e.ref(0),X=e.ref(0),D=e.ref(0),t=e.computed({get:()=>F(),set:a=>a});function F(){const a=J.useNestedProp({userConfig:y.config,defaultConfig:ee});return a.theme?{...J.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||y.config,defaultConfig:a})}:a}e.watch(()=>y.config,a=>{t.value=F(),M(),T.value+=1,X.value+=1,D.value+=1,i.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width},{deep:!0}),e.watch(()=>y.dataset,a=>{R()},{deep:!0});const _=e.ref(null);e.onMounted(()=>{M()});function M(){if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):y.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=Y.throttle(()=>{const{width:n,height:l}=Y.useResponsive({chart:p.value,title:t.value.style.chart.title.text?S.value:null,legend:t.value.style.chart.legend.show?z.value:null,source:A.value,noTitle:P.value});g.value=n,i.value=l/y.dataset.length,v.value=C()});_.value=new ResizeObserver(a),_.value.observe(p.value.parentNode)}}e.onBeforeUnmount(()=>{_.value&&_.value.disconnect()});const{isPrinting:G,isImaging:I,generatePdf:O,generateImage:q}=Z.usePrinter({elementId:`dumbbell_${d.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell"}),te=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),x=e.ref({showTable:t.value.table.show}),f=e.computed(()=>y.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),E=e.computed(()=>({max:Math.max(...f.value.flatMap(a=>[a.start,a.end])),min:Math.min(...f.value.flatMap(a=>[a.start,a.end]))})),c=e.computed(()=>s.calculateNiceScale(E.value.min<0?E.value.min:0,E.value.max,t.value.style.chart.grid.scaleSteps)),i=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),r=e.computed(()=>{const a=i.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+g.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*y.dataset.length,o=c.value.ticks.length*(g.value/c.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:g.value,height:a*y.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:o}});function C(){return f.value.map((a,n)=>{const l=r.value.left+(a.start+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*r.value.widthPlotReference,o=r.value.left+(a.end+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*r.value.widthPlotReference,u=l+(o-l)/2;return{...a,startX:l,endX:o,centerX:u,y:r.value.top+n*i.value+i.value/2,endVal:a.start}})}const v=e.ref([]),H=e.ref(null),le=e.computed(()=>f.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{R()});function R(){v.value=C();let a=v.value.map(l=>l.start).reduce((l,o)=>l+o,0);function n(){const l=f.value.map(o=>o.end-o.start);a>=le.value?(cancelAnimationFrame(H.value),v.value=C()):(v.value=v.value.map((o,u)=>{o.endVal+=l[u]*(t.value.animationSpeed/100);const h=r.value.left+(o.start+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*r.value.widthPlotReference,N=r.value.left+(o.endVal+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*r.value.widthPlotReference,L=h+(N-h)/2;return{...o,startX:h,endX:N,centerX:L,y:r.value.top+u*i.value+i.value/2,endVal:o.endVal}}),a=v.value.map(o=>o.endVal).reduce((o,u)=>o+u,0),H.value=requestAnimationFrame(n))}t.value.useAnimation?n():v.value=C()}const W=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${d.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${d.value})`:t.value.style.chart.plots.endColor}]),ae=e.computed(()=>({cy:"donut-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,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),m=e.computed(()=>{const a=v.value.map(l=>({name:l.name})),n=v.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=m.value.head.map((u,h)=>{const N=s.dataLabel({p:t.value.style.chart.labels.prefix,v:m.value.body[h].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),L=s.dataLabel({p:t.value.style.chart.labels.prefix,v:m.value.body[h].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),se=s.dataLabel({v:100*(m.value.body[h].end/m.value.body[h].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:u.name},N,L,se]}),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{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function U(){e.nextTick(()=>{const a=m.value.head.map((o,u)=>[[o.name],[m.value.body[u].start],[m.value.body[u].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const k=e.ref(!1);function oe(a){k.value=a,V.value+=1}function re(){return v.value}function j(){x.value.showTable=!x.value.showTable}const B=e.ref(!1);function $(){B.value=!B.value}return Q({getData:re,generatePdf:O,generateCsv:U,generateImage:q,toggleTable:j,toggleAnnotator:$}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:p,class:e.normalizeClass(`vue-ui-dumbbell ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${d.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(he.PenAndPaper,{key:0,parent:p.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:$},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:P,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:S,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ne._sfc_main,{key:`title_${T.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(Z.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(G),isImaging:e.unref(I),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:oe,onGeneratePdf:e.unref(O),onGenerateCsv:U,onGenerateImage:e.unref(q),onToggleTable:j,onToggleAnnotator:$},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.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:"4"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${r.value.absoluteWidth<=0?10:r.value.absoluteWidth} ${r.value.absoluteHeight<=0?10:r.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ve._sfc_main),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left+o*r.value.width/(c.value.ticks.length-1),x2:r.value.left+o*r.value.width/(c.value.ticks.length-1),y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,pe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left,x2:r.value.right,y1:r.value.top+o*i.value,y2:r.value.top+o*i.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,ke))),256)),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,_e)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+(t.value.style.chart.labels.yAxisLabels.showProgression?i.value/3:i.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,Ce))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+i.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,we))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",Be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left+o*(r.value.width/(c.value.ticks.length-1)),y:r.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,l,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding}),{datapoint:l,seriesIndex:o})),9,Ne))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,$e),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Le),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Ve)],8,Ee),e.createElementVNode("radialGradient",{id:`end_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,ze),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Ae),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Pe)],8,Se)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,De)],8,Te),e.createElementVNode("linearGradient",{id:`grad_negative_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Me),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Ge)],8,Fe)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",Ie,[e.createElementVNode("path",{d:`M
|
|
2
2
|
${l.startX},${l.y+t.value.style.chart.plots.radius/2}
|
|
3
3
|
C ${l.centerX},${l.y} ${l.centerX},${l.y}
|
|
4
4
|
${l.endX},${l.y+t.value.style.chart.plots.radius/2}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { computed as m, ref as v, watch as de, onMounted as ve, onBeforeUnmount as Ne, openBlock as o, createElementBlock as r, normalizeClass as he, normalizeStyle as H, createBlock as L, createCommentVNode as y, unref as d, createSlots as Te, withCtx as _, renderSlot as k, normalizeProps as W, guardReactiveProps as R, createVNode as Pe, Fragment as w, renderList as $, createElementVNode as n, toDisplayString as A, createTextVNode as ye, nextTick as Ge } from "vue";
|
|
2
|
-
import { u as De, c as fe, t as Ie, o as Me, e as be, g as Oe, v as ge, C as Fe, f as z, X as pe, i as B, l as me, h as _e, q as Ve, r as Ee } from "./index-
|
|
2
|
+
import { u as De, c as fe, t as Ie, o as Me, e as be, g as Oe, v as ge, C as Fe, f as z, X as pe, i as B, l as me, h as _e, q as Ve, r as Ee } from "./index-hQvps1ng.js";
|
|
3
3
|
import { t as He, u as We } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as Re } from "./Title-
|
|
5
|
-
import { u as Be, U as Ue } from "./usePrinter-
|
|
6
|
-
import { D as je } from "./DataTable-
|
|
7
|
-
import qe from "./vue-ui-skeleton-
|
|
8
|
-
import { L as Ye } from "./Legend-
|
|
9
|
-
import Ze from "./vue-ui-accordion-
|
|
10
|
-
import { u as ke } from "./useNestedProp-
|
|
11
|
-
import { _ as Je } from "./PackageVersion-
|
|
12
|
-
import { P as Ke } from "./PenAndPaper-
|
|
4
|
+
import { _ as Re } from "./Title-DU9SuVY-.js";
|
|
5
|
+
import { u as Be, U as Ue } from "./usePrinter-c5Pf5Hrk.js";
|
|
6
|
+
import { D as je } from "./DataTable-D7EHk98Z.js";
|
|
7
|
+
import qe from "./vue-ui-skeleton-Dmee5Xfg.js";
|
|
8
|
+
import { L as Ye } from "./Legend-C8xQE9Da.js";
|
|
9
|
+
import Ze from "./vue-ui-accordion-CbATWtZa.js";
|
|
10
|
+
import { u as ke } from "./useNestedProp-CxQ2hIfU.js";
|
|
11
|
+
import { _ as Je } from "./PackageVersion-CiIsJuZg.js";
|
|
12
|
+
import { P as Ke } from "./PenAndPaper-BBXIRAdA.js";
|
|
13
13
|
import { _ as Qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const et = ["id"], tt = ["xmlns", "viewBox"], lt = { key: 0 }, at = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], st = { key: 1 }, ot = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], rt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], nt = { key: 2 }, ut = ["x", "y", "font-size", "fill", "font-weight"], it = ["x", "y", "font-size", "fill"], ct = { key: 3 }, dt = ["x", "y", "font-size", "fill", "font-weight"], vt = ["id"], ht = ["stop-color"], yt = ["stop-color"], ft = ["stop-color"], bt = ["id"], gt = ["stop-color"], pt = ["stop-color"], mt = ["stop-color"], _t = ["id"], kt = ["stop-color"], xt = ["stop-color"], Ct = ["id"], wt = ["stop-color"], $t = ["stop-color"], Lt = { key: 0 }, At = ["d", "fill"], zt = { key: 1 }, Xt = ["x", "y", "height", "width", "fill"], St = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Nt = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Tt = { key: 2 }, Pt = ["x", "y", "fill", "font-size"], Gt = { key: 3 }, Dt = ["x", "y", "fill", "font-size"], It = {
|
|
15
15
|
key: 5,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { computed as m, onMounted as Ee, ref as b, watch as Se, openBlock as u, createElementBlock as i, normalizeClass as he, normalizeStyle as N, createBlock as P, createCommentVNode as C, unref as c, createSlots as Me, withCtx as y, renderSlot as k, normalizeProps as X, guardReactiveProps as W, createVNode as me, createElementVNode as S, Fragment as F, renderList as O, toDisplayString as q, createTextVNode as ze, nextTick as Ye } from "vue";
|
|
2
|
-
import { u as De, o as Ge, e as Be, c as ge, t as Ue, a as Ve, p as K, b as je, v as f, f as pe, X as Xe, F as be, K as We, i as qe, q as Ke, r as Re } from "./index-
|
|
3
|
-
import { _ as Ze } from "./Title-
|
|
4
|
-
import { u as Je, U as Qe } from "./usePrinter-
|
|
5
|
-
import { D as et } from "./DataTable-
|
|
6
|
-
import tt from "./vue-ui-accordion-
|
|
7
|
-
import ot from "./vue-ui-skeleton-
|
|
8
|
-
import { u as ye } from "./useNestedProp-
|
|
9
|
-
import { _ as lt } from "./PackageVersion-
|
|
10
|
-
import { P as at } from "./PenAndPaper-
|
|
2
|
+
import { u as De, o as Ge, e as Be, c as ge, t as Ue, a as Ve, p as K, b as je, v as f, f as pe, X as Xe, F as be, K as We, i as qe, q as Ke, r as Re } from "./index-hQvps1ng.js";
|
|
3
|
+
import { _ as Ze } from "./Title-DU9SuVY-.js";
|
|
4
|
+
import { u as Je, U as Qe } from "./usePrinter-c5Pf5Hrk.js";
|
|
5
|
+
import { D as et } from "./DataTable-D7EHk98Z.js";
|
|
6
|
+
import tt from "./vue-ui-accordion-CbATWtZa.js";
|
|
7
|
+
import ot from "./vue-ui-skeleton-Dmee5Xfg.js";
|
|
8
|
+
import { u as ye } from "./useNestedProp-CxQ2hIfU.js";
|
|
9
|
+
import { _ as lt } from "./PackageVersion-CiIsJuZg.js";
|
|
10
|
+
import { P as at } from "./PenAndPaper-BBXIRAdA.js";
|
|
11
11
|
import { _ as nt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const st = ["id"], rt = {
|
|
13
13
|
key: 1,
|