import{M as h,r as v,N as m,C as y,o as g,c as b,O as w,_ as E}from"./index.82404a61.js";const S=h({__name:"top",props:["data"],setup(s){const{data:{type:l,xData:a,center:r,padding:i,itemStyle:c,x:d,y:u,subtext:f}}=s,n=v(null);console.log("xData",a);const o=a.reduce((t,e)=>t+e.value*1,0),_=()=>{const t=w(n.value);window.addEventListener("resize",()=>{t.resize()}),t.setOption({title:{text:o+"(\u4E2A)",subtext:f,x:d,y:u,textStyle:{fontSize:14,fontWeight:"normal",color:"#333"},subtextStyle:{fontSize:20,fontWeight:"normal",align:"center",color:"#555"}},tooltip:{formatter:e=>e.name+": "+e.value+"(\u4E2A)<br/>"+(e.value/o*100).toFixed(2)+"%",padding:[10,10],axisPointer:{type:"shadow",shadowStyle:{color:"rgba(67,100,247,0.08)"}}},legend:{icon:"rect",align:"left",orient:"vertical",x:"240",y:"80",padding:i,formatter:function(e){const p=a.filter(x=>x.name===e);return e+" "+(p[0].value/o).toFixed(4)*100+"%"}},series:[{avoidLabelOverlap:10,label:{show:!1},emphasis:{label:{show:!1}},labelLine:{show:!1},type:l,radius:["60%","80%"],center:r,data:a,itemStyle:c}]})};return m(()=>{}),y(()=>{_()}),(t,e)=>(g(),b("div",{ref_key:"assetEchart",ref:n,class:"asset_echart"},null,512))}});const k=E(S,[["__scopeId","data-v-43868a93"]]);export{k as default};