dianzibao-admin-v2/admin/assets/KoiTwoLineChart-D7tESj-k.js

2 lines
2.1 KiB
JavaScript
Raw Normal View History

2025-06-26 09:58:26 +08:00
import{i as m}from"./index-06v0hgpB.js";import{d as y,r as a,o as d,e as v,a as x,c as h}from"./index-BRRhBORR.js";const C=y({__name:"KoiTwoLineChart",setup(S){const i=a(),t=a(),n=a(),c=a(),s=a();d(()=>{p(),u(),r(),window.addEventListener("resize",r)}),v(()=>{t.value.dispose(),t.value=null,clearInterval(s.value),s.value=null,window.removeEventListener("resize",r)});const p=()=>{var e;t.value=m(i.value);const o={grid:{top:"20%",left:"0",bottom:"18%",right:"0"},tooltip:{show:!0},legend:{right:"5%"},xAxis:[{type:"category",axisPointer:{type:"shadow"},axisLabel:{interval:0,rotate:"70"}}],yAxis:[{type:"value",splitLine:{show:!1}}],series:[{name:"折线订单量",type:"line",tooltip:{valueFormatter:function(l){return l+"笔"}},smooth:!0,itemStyle:{color:"#1CE0FE"},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"#1CE0FE"},{offset:1,color:"#3DF8E5"}],global:!1}}},{name:"折线订单量",type:"line",tooltip:{valueFormatter:function(l){return l+"笔"}},smooth:!0,itemStyle:{color:"#7E37F7"},markPoint:{data:[{type:"max",name:"最大值"},{type:"min",name:"最小值"}]},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"#7E37F7"},{offset:1,color:"#F1EBFB"}],global:!1}}}]};(e=t.value)==null||e.setOption(o)},u=()=>{n.value=[],c.value=[],n.value=["20240901","20240902","20240903","20240904","20240905","20240906","20240907","20240908","20240909","20240910","20240911","20240912","20240913","20240914","20240915"],f()},f=()=>{var e;const o={xAxis:{data:n.value},series:[{name:"上月同期交易笔数",type:"line",data:[320,266,245,199,278,298,312,365,378,299,287,256,276,288,281]},{name:"昨日交易笔数",type:"line",data:[188,166,100,234,256,278,300,166,156,246,220,188,210,234,290]}]};(e=t.value)==null||e.setOption(o)},r=()=>{var e;const o={title:{textStyle:{fontSize:16}},legend:{textStyle:{fontSize:12}},xAxis:{axisLabel:{fontSize:12}},yAxis:{axisLabel:{fontSize:12}}};(e=t.value)==null||e.setOption(o),t.value.resize()};return(o,e)=>(x(),h("div",{ref_key:"refChart",ref:i,style:{width:"100%",height:"360px"}},null,512))}});export{C as default};