2 lines
10 KiB
JavaScript
2 lines
10 KiB
JavaScript
import{i as g,L as v}from"./index.1d4dbcc5.js";import{g as h,h as z,x as f,o as u,c as p,y as m,z as y,r as _,n as L,w as i,b as s,a as d}from"./index.1118af8e.js";import{_ as F}from"./bar.vue_vue_type_script_setup_true_lang.83ec4acd.js";const A=["id"],B=h({__name:"line",props:{className:{type:String,default:"chart"},xAxisData:{type:Array,default:()=>["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},config:{type:Object,default:()=>{}},seriesData:{type:Array,default:()=>[150,230,224,218,135,147,260]},id:{type:String,default:"chart"},width:{type:String,default:"200px"},height:{type:String,default:"200px"}},setup(t){const l=t,r=z(),e={grid:{top:10,left:"2%",right:"2%",bottom:"2%",containLabel:!0},xAxis:{type:"category",data:l.xAxisData},yAxis:{type:"value"},series:[{data:l.seriesData,type:"line"}],...l.config};let a;const n=()=>{const o=g(r.value);return o.setOption(e),o};return f(()=>{a=n(),window.addEventListener("resize",function(){a&&a.resize()})}),(o,b)=>(u(),p("div",{id:t.id,class:m(t.className),style:y({height:t.height,width:t.width}),ref_key:"chartsRef",ref:r},null,14,A))}}),O=["id"],C=h({__name:"pie",props:{className:{type:String,default:"chart"},config:{type:Object,default:()=>{}},id:{type:String,default:"chart"},width:{type:String,default:"200px"},height:{type:String,default:"200px"}},setup(t){const l=t,r={grid:{top:10,left:"2%",right:"2%",bottom:"2%",containLabel:!0},tooltip:{trigger:"item"},legend:{top:"0%",left:"center"},series:[{name:"Access From",type:"pie",radius:["40%","70%"],avoidLabelOverlap:!1,label:{show:!1,position:"center"},emphasis:{label:{show:!0,fontSize:"40",fontWeight:"bold"}},labelLine:{show:!1},data:[{value:1048,name:"Search Engine"},{value:735,name:"Direct"},{value:580,name:"Email"},{value:484,name:"Union Ads"},{value:300,name:"Video Ads"}]}]};let e;const a=()=>{let n=g(document.getElementById(l.id));return n.setOption(r),n};return f(()=>{e=a(),window.addEventListener("resize",function(){e&&e.resize()})}),(n,o)=>(u(),p("div",{id:t.id,class:m(t.className),style:y({height:t.height,width:t.width})},null,14,O))}}),N=["id"],$=h({__name:"scatter",props:{className:{type:String,default:"chart"},config:{type:Object,default:()=>{}},id:{type:String,default:"chart"},width:{type:String,default:"200px"},height:{type:String,default:"200px"}},setup(t){const l=t,r={grid:{top:10,left:"2%",right:"2%",bottom:"2%",containLabel:!0},xAxis:{},yAxis:{},series:[{symbolSize:20,data:[[10,8.04],[8.07,6.95],[13,7.58],[9.05,8.81],[11,8.33],[14,7.66],[13.4,6.81],[10,6.33],[14,8.96],[12.5,6.82],[9.15,7.2],[11.5,7.2],[3.03,4.23],[12.2,7.83],[2.02,4.47],[1.05,3.33],[4.05,4.96],[6.03,7.24],[12,6.26],[12,8.84],[7.08,5.82],[5.02,5.68]],type:"scatter"}]};let e;const a=()=>{let n=g(document.getElementById(l.id));return n.setOption(r),n};return f(()=>{e=a(),window.addEventListener("resize",function(){e&&e.resize()})}),(n,o)=>(u(),p("div",{id:t.id,class:m(t.className),style:y({height:t.height,width:t.width})},null,14,N))}}),D=["id"],k=h({__name:"gauge",props:{className:{type:String,default:"chart"},config:{type:Object,default:()=>{}},id:{type:String,default:"chart"},width:{type:String,default:"200px"},height:{type:String,default:"200px"}},setup(t){const l=t,r={tooltip:{formatter:"{a} <br/>{b} : {c}%"},series:[{name:"Pressure",type:"gauge",detail:{formatter:"{value}"},data:[{value:50,name:"SCORE"}]}]};let e;const a=()=>{let n=g(document.getElementById(l.id));return n.setOption(r),n};return f(()=>{e=a(),window.addEventListener("resize",function(){e&&e.resize()})}),(n,o)=>(u(),p("div",{id:t.id,class:m(t.className),style:y({height:t.height,width:t.width})},null,14,D))}}),I=["id"],j=h({__name:"funnel",props:{className:{type:String,default:"chart"},config:{type:Object,default:()=>{}},id:{type:String,default:"chart"},width:{type:String,default:"200px"},height:{type:String,default:"200px"}},setup(t){const l=t,r={grid:{top:0,left:"2%",right:"2%",bottom:"0%",containLabel:!0},tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c}%"},toolbox:{feature:{dataView:{readOnly:!1},restore:{},saveAsImage:{}}},legend:{show:!1,data:["Show","Click","Visit","Inquiry","Order"]},series:[{name:"Funnel",type:"funnel",left:"10%",top:30,bottom:10,width:"80%",min:0,max:100,minSize:"0%",maxSize:"100%",sort:"descending",gap:2,label:{show:!0,position:"inside"},labelLine:{length:10,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{fontSize:20}},data:[{value:60,name:"Visit"},{value:40,name:"Inquiry"},{value:20,name:"Order"},{value:80,name:"Click"},{value:100,name:"Show"}]}]};let e;const a=()=>{let n=g(document.getElementById(l.id));return n.setOption(r),n};return f(()=>{e=a(),window.addEventListener("resize",function(){e&&e.resize()})}),(n,o)=>(u(),p("div",{id:t.id,class:m(t.className),style:y({height:t.height,width:t.width})},null,14,I))}}),M=["id"],W=h({__name:"candlestick",props:{className:{type:String,default:"chart"},config:{type:Object,default:()=>{}},id:{type:String,default:"chart"},width:{type:String,default:"200px"},height:{type:String,default:"200px"}},setup(t){const l=t,r={grid:{top:10,left:"2%",right:"2%",bottom:"2%",containLabel:!0},xAxis:{data:["2017-10-24","2017-10-25","2017-10-26","2017-10-27"]},yAxis:{},series:[{type:"candlestick",data:[[20,34,10,38],[40,35,30,50],[31,38,33,44],[38,15,5,42]]}]};let e;const a=()=>{let n=g(document.getElementById(l.id));return n.setOption(r),n};return f(()=>{e=a(),window.addEventListener("resize",function(){e&&e.resize()})}),(n,o)=>(u(),p("div",{id:t.id,class:m(t.className),style:y({height:t.height,width:t.width})},null,14,M))}}),V=["id"],R=h({__name:"graph",props:{className:{type:String,default:"chart"},config:{type:Object,default:()=>{}},id:{type:String,default:"chart"},width:{type:String,default:"200px"},height:{type:String,default:"200px"}},setup(t){const l=t,r=["Mon","Tue","Wed","Very Loooong Thu","Fri","Sat","Sun"],e=r.map(function(x,c){return Math.round(Math.random()*1e3*(c+1))}),a=e.map(function(x,c){return{source:c,target:c+1}});a.pop();const n={grid:{top:10,left:"2%",right:"2%",bottom:"2%",containLabel:!0},tooltip:{},xAxis:{type:"category",boundaryGap:!1,data:r},yAxis:{type:"value"},series:[{type:"graph",layout:"none",coordinateSystem:"cartesian2d",symbolSize:40,label:{show:!0},edgeSymbol:["circle","arrow"],edgeSymbolSize:[4,10],data:e,links:a,lineStyle:{color:"#2f4554"}}]};let o;const b=()=>{let x=g(document.getElementById(l.id));return x.setOption(n),x};return f(()=>{o=b(),window.addEventListener("resize",function(){o&&o.resize()})}),(x,c)=>(u(),p("div",{id:t.id,class:m(t.className),style:y({height:t.height,width:t.width})},null,14,V))}}),P=["id"],T=h({__name:"pictorialBar",props:{className:{type:String,default:"chart"},config:{type:Object,default:()=>{}},id:{type:String,default:"chart"},width:{type:String,default:"200px"},height:{type:String,default:"200px"}},setup(t){const l=t;let r=[],e=+new Date,a=[],n=[];for(let c=0;c<20;c++){let w=new Date(e+=864e5);r.push([w.getFullYear(),w.getMonth()+1,w.getDate()].join("-"));let S=Math.random()*200,E=Math.random()*200;n.push(S),a.push(E+S)}const o={grid:{top:10,left:"2%",right:"2%",bottom:"2%",containLabel:!0},backgroundColor:"#0f375f",tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{data:["line","bar"],textStyle:{color:"#ccc"}},xAxis:{data:r,axisLine:{lineStyle:{color:"#ccc"}}},yAxis:{splitLine:{show:!1},axisLine:{lineStyle:{color:"#ccc"}}},series:[{name:"line",type:"line",smooth:!0,showAllSymbol:!0,symbol:"emptyCircle",symbolSize:15,data:a},{name:"bar",type:"bar",barWidth:10,itemStyle:{borderRadius:5,color:new v(0,0,0,1,[{offset:0,color:"#14c8d4"},{offset:1,color:"#43eec6"}])},data:n},{name:"line",type:"bar",barGap:"-100%",barWidth:10,itemStyle:{color:new v(0,0,0,1,[{offset:0,color:"rgba(20,200,212,0.5)"},{offset:.2,color:"rgba(20,200,212,0.2)"},{offset:1,color:"rgba(20,200,212,0)"}])},z:-12,data:a},{name:"dotted",type:"pictorialBar",symbol:"rect",itemStyle:{color:"#0f375f"},symbolRepeat:!0,symbolSize:[12,4],symbolMargin:1,z:-10,data:a}]};let b;const x=()=>{let c=g(document.getElementById(l.id));return c.setOption(o),c};return f(()=>{b=x(),window.addEventListener("resize",function(){b&&b.resize()})}),(c,w)=>(u(),p("div",{id:t.id,class:m(t.className),style:y({height:t.height,width:t.width})},null,14,P))}}),G=d("div",{class:"card-header"},[d("span",null,"\u6298\u7EBF\u56FE")],-1),q=d("div",{class:"card-header"},[d("span",null,"\u67F1\u72B6\u56FE")],-1),K=d("div",{class:"card-header"},[d("span",null,"\u997C\u56FE")],-1),U=d("div",{class:"card-header"},[d("span",null,"\u6563\u70B9\u56FE")],-1),Y=d("div",{class:"card-header"},[d("span",null,"\u4EEA\u8868\u76D8")],-1),H=d("div",{class:"card-header"},[d("span",null,"\u6F0F\u6597\u56FE")],-1),J=d("div",{class:"card-header"},[d("span",null,"K \u7EBF\u56FE")],-1),Q=d("div",{class:"card-header"},[d("span",null,"\u96F7\u8FBE\u56FE")],-1),X=d("div",{class:"card-header"},[d("span",null,"\u865A\u7EBF\u67F1\u72B6\u56FE\u6548\u679C")],-1),at=h({__name:"index",setup(t){return(l,r)=>{const e=_("el-card"),a=_("el-col"),n=_("el-row"),o=_("PageWrapLayout");return u(),L(o,{style:{width:"100%"}},{default:i(()=>[s(n,{class:"row-bg",gutter:10},{default:i(()=>[s(a,{xs:24,sm:12,lg:8},{default:i(()=>[s(e,{class:"box-card"},{header:i(()=>[G]),default:i(()=>[s(B,{height:"200px",width:"100%"})]),_:1})]),_:1}),s(a,{xs:24,sm:12,lg:8},{default:i(()=>[s(e,{class:"box-card"},{header:i(()=>[q]),default:i(()=>[s(F,{height:"200px",width:"100%",id:"bar"})]),_:1})]),_:1}),s(a,{xs:24,sm:12,lg:8},{default:i(()=>[s(e,{class:"box-card"},{header:i(()=>[K]),default:i(()=>[s(C,{height:"200px",width:"100%",id:"pie"})]),_:1})]),_:1}),s(a,{xs:24,sm:12,lg:8},{default:i(()=>[s(e,{class:"box-card"},{header:i(()=>[U]),default:i(()=>[s($,{height:"200px",width:"100%",id:"scatter"})]),_:1})]),_:1}),s(a,{xs:24,sm:12,lg:8},{default:i(()=>[s(e,{class:"box-card"},{header:i(()=>[Y]),default:i(()=>[s(k,{height:"200px",width:"100%",id:"gauge"})]),_:1})]),_:1}),s(a,{xs:24,sm:12,lg:8},{default:i(()=>[s(e,{class:"box-card"},{header:i(()=>[H]),default:i(()=>[s(j,{height:"200px",width:"100%",id:"funnel"})]),_:1})]),_:1}),s(a,{xs:24,sm:12,lg:8},{default:i(()=>[s(e,{class:"box-card"},{header:i(()=>[J]),default:i(()=>[s(W,{height:"200px",width:"100%",id:"candlestick"})]),_:1})]),_:1}),s(a,{xs:24,sm:12,lg:8},{default:i(()=>[s(e,{class:"box-card"},{header:i(()=>[Q]),default:i(()=>[s(R,{height:"200px",width:"100%",id:"graph"})]),_:1})]),_:1}),s(a,{xs:24,sm:12,lg:8},{default:i(()=>[s(e,{class:"box-card"},{header:i(()=>[X]),default:i(()=>[s(T,{height:"200px",width:"100%",id:"pictorial"})]),_:1})]),_:1})]),_:1})]),_:1})}}});export{at as default};
|