You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
1.9 KiB
1 lines
1.9 KiB
import{i as S,e as v}from"./index-Csvj-veb.js";import{c as k}from"./cloneDeep-C6NKQlMO.js";import{d as z,Y as B,t as $,Q as _,v as O,p as T,o as W,b as F,k as D}from"./index-bVOhw2NF.js";import"./_initCloneObject-K-Y0ueWp.js";import"./_getTag-BJ2nhJXz.js";const L=z({name:"EsCirclePie",components:{},props:{options:{type:Object,default:()=>({})},datasets:{type:[Number,String],default:()=>""},eventData:{type:[String,Boolean,Number],default:""},element:{type:Object,default:()=>({})}},setup(r){const e=B(null),a=(t,o)=>{const{progressBorderColor:n,progressBorderWidth:l,textColor:c,textFontSize:d,subText:u,subTextColor:p,subTextFontSize:m,progressColor:f,progressWidth:h,progressShadowColor:b,progressShadowBlur:x,railColor:y,codeConfig:g}=o,i=document.querySelector(`.chart-${r.element.id}`);if(i){e.value||(e.value=S(i));const s=t;if(s){const C={backgroundColor:"transparent",title:[{text:`${s}%`,subtext:u,x:"center",y:"center",textStyle:{fontSize:d,color:c,fontFamily:"Lato",foontWeight:"600"},subtextStyle:{fontSize:m,color:p}}],polar:{radius:["60%","70%"],center:["50%","50%"]},angleAxis:{max:100,show:!1},radiusAxis:{type:"category",show:!0,axisLabel:{show:!1},axisLine:{show:!1},axisTick:{show:!1}},series:[{name:"",type:"bar",roundCap:!0,barWidth:h,showBackground:!0,backgroundStyle:{color:y},data:[s],coordinateSystem:"polar",itemStyle:{color:f,shadowColor:b,shadowBlur:x,borderWidth:l,borderColor:n}}]},w=new Function("option","datas","instance","echarts",g)(k(C),s,e.value,v);e.value.setOption(w)}}};return $([()=>r.datasets,()=>r.options],([t,o])=>{t&&_(()=>{a(t,o)})},{immediate:!0,deep:!0}),O(()=>{const t=new ResizeObserver(()=>{e.value.resize()}),o=document.querySelector(`.chart-${r.element.id}`);o&&t.observe(o)}),{myChart:e}}});function j(r,e,a,t,o,n){return W(),F("div",{class:D(`chart-${r.element.id}`),width:"100%",height:"100%"},null,2)}const M=T(L,[["render",j]]);export{M as default};
|