var _=(c,a,o)=>new Promise((r,i)=>{var f=e=>{try{n(o.next(e))}catch(l){i(l)}},s=e=>{try{n(o.throw(e))}catch(l){i(l)}},n=e=>e.done?r(e.value):Promise.resolve(e.value).then(f,s);n((o=o.apply(c,a)).next())});import g from"./Box.a0684c06.js";import{u as v}from"./useECharts.7e254417.js";import{i as D}from"./other.a0e0a1bb.js";import{u as w}from"./visualization.b0d62ae5.js";import{c as m}from"./colors.d19e85ff.js";import{u as B}from"./useVContext.b155cbd7.js";import{d as C,q as E,r as F,aA as I,E as L,_ as S,P as b,o as A,i as k,s as $,h}from"./index.600742c0.js";import"ant-design-vue";const T=C({components:{Box:g},setup(){const{rootEmitter:c}=B(),a=E({x_axis:[],series:[]}),o=F(null),r=w(),{setOptions:i,getInstance:f}=v(o);function s(){return _(this,null,function*(){const t=yield D({year:r.getYear});a.x_axis=t.x_axis,a.series=t.series,n()})}const n=()=>{const t={legendData:[],series:[]};a.series.forEach(({name:p,data:u},y)=>{const d=m[y%m.length];t.legendData.push(p),t.series.push({name:p,data:u.map(x=>x&&Number((x/2e3).toFixed(2))),smooth:!1,type:"line",stack:"Total",itemStyle:{color:d.itemColor},areaStyle:{color:d.areaColor}})}),i({grid:{left:"2%",right:"2%",top:"10%",bottom:"2%",containLabel:!0},legend:{data:t.legendData,top:"0%",right:"0",textStyle:{color:"#ffffff"}},tooltip:{trigger:"axis",axisPointer:{lineStyle:{width:1,color:"#019680"}}},xAxis:{type:"category",data:a.x_axis,boundaryGap:!1,axisTick:{show:!1},axisLine:{show:!1},axisLabel:{color:"#fff"}},yAxis:[{type:"value",axisTick:{show:!1},splitLine:{lineStyle:{type:"solid",color:"#8EEEFF",opacity:.3}},axisLabel:{color:"#fff"}}],series:t.series,animationDuration:3e3}),l()};let e=null;function l(){let t=0;e&&clearInterval(e),e=setInterval(()=>{var u;const p=t%4;(u=f())==null||u.dispatchAction({type:"showTip",seriesIndex:0,dataIndex:p}),t++},3e3)}return I(()=>{s(),c.on("interval:auto",()=>{s()})}),L(()=>r.getYear,()=>s()),{chartRef:o}}}),X={class:"h-full flex flex-col"},R={class:"flex-1",ref:"chartRef"};function V(c,a,o,r,i,f){const s=b("Box");return A(),k(s,{title:"\u7A3B\u867E\u6D41\u5411\uFF08\u5428\uFF09"},{default:$(()=>[h("div",X,[h("div",R,null,512)])]),_:1})}var H=S(T,[["render",V],["__scopeId","data-v-27829d47"]]);export{H as default};