import{T as y}from"./index-BS3-X_do.js";import{_ as D}from"./index-CL6hUm94.js";import{aD as M}from"./antd-B7v2hwFR.js";import{f as u,o as C,j as A,a2 as T,a5 as k,k as B,a3 as t,ad as r,u as n}from"./vue-DApy1uhY.js";import"./vec2-DjBoYTHr.js";const w={class:"activeChart"},F={style:{marginTop:"32px"}},L={class:"activeChartGrid"},q={class:"activeChartLegend"},N={__name:"active-chart",setup(S){const e=u([]),i=u([]);let o,l,c;function g(a){return a<10?`0${a}`:a}function d(){e.value=[],i.value=[];for(let a=0;a<24;a+=1)e.value.push({x:`${g(a)}:00`,y:Math.floor(Math.random()*200)+a*50}),i.value.push(Math.floor(Math.random()*200)+a*50);o==null||o.changeData(i.value)}function f(){l=requestAnimationFrame(()=>{c=window.setTimeout(()=>{d(),f()},1e3)})}const m=u();return C(()=>{o=new y(m.value,{height:84,data:i.value,smooth:!0,autoFit:!0}),o.render(),f(),d()}),A(()=>{clearTimeout(c),l&&cancelAnimationFrame(l),o==null||o.destroy(),o=void 0}),(a,s)=>{var v,p,h,_;const x=M;return k(),T("div",w,[B(x,{title:"目标评估",value:"有望达到预期"}),t("div",F,[t("div",{ref_key:"tinyAreaContainer",ref:m},null,512)]),t("div",null,[t("div",L,[t("p",null,r(((v=[...n(e)].sort()[n(e).length-1])==null?void 0:v.y)+200)+" 亿元",1),t("p",null,r((p=[...n(e)].sort()[Math.floor(n(e).length/2)])==null?void 0:p.y)+" 亿元",1)]),s[0]||(s[0]=t("div",{class:"dashedLine"},[t("div",{class:"line"})],-1)),s[1]||(s[1]=t("div",{class:"dashedLine"},[t("div",{class:"line"})],-1))]),t("div",q,[s[2]||(s[2]=t("span",null,"00:00",-1)),t("span",null,r((h=n(e)[Math.floor(n(e).length/2)])==null?void 0:h.x),1),t("span",null,r((_=n(e)[n(e).length-1])==null?void 0:_.x),1)])])}}},I=D(N,[["__scopeId","data-v-c858f221"]]);export{I as default};
