DashChart.08d124f2.js 1.4 KB

1
  1. import{u as f,r as o,a8 as m,P as h,L as p,o as v,h as g,m as y,q as w,k as s,n as S}from"./vendor.5f04cee5.js";import{i as x}from"./index.464a9d22.js";const z={props:{height:{type:String,default:"100%"},width:{type:String,default:"100%"},name:{type:String,default:"echart"},data:{type:Object,default:()=>({name:"name",max:1500,value:0})}},setup(n){const r=n;f();var a=null;const e=o(5);o(16);const{height:u,name:l,data:c}=m(r);h(c,t=>{a!=null&&(a.setOption(i(t)),a.resize())},{deep:!0});const i=function(t){return{series:[{name:"\u5B9E\u65F6\u6570\u636E",min:0,max:1500,splitNumber:10,type:"gauge",center:["50%","55%"],radius:"90%",detail:{show:!1},data:[{value:t.value}],axisLine:{lineStyle:{color:[[.09,"lime"],[.82,"#1e90ff"],[1,"#ff4500"]],width:e.value}},axisTick:{distance:-(e.value*.67),length:e.value,lineStyle:{color:"#fff"}},pointer:{width:e.value*.67,length:"60%"},splitLine:{distance:-(e.value*.67),length:e.value,lineStyle:{width:e.value*.2,color:"#fff"}},axisLabel:{color:"#fff",fontSize:e.value*.67>10?e.value*.67:6,distance:e.value},title:{color:"#fff"}}]}};return p(()=>{let t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;e.value=Math.ceil(t/320),a=x(document.getElementsByClassName(l.value)[0]),a.setOption(i({}))}),(t,d)=>(v(),g("div",null,[y("div",{class:w(s(l)),style:S(["height:"+s(u)+";width:"+n.width,{margin:"auto"}])},null,6)]))}};export{z as _};