import{ac as e,B as a,ae as t,af as s,ag as n,ah as o,ai as i,aj as r,ak as l,au as u,an as p,ao as m,ap as d}from"./echarts.js?v=1764830988434";import{d3 as v}from"./naive.js?v=1764830988434";import{k as c,r as f,w as h,o as g,ap as y,b as j,R as w,V as _,I as x,U as B,n as b}from"./vue.js?v=1764830988434";import"./__commonjsHelpers__.js?v=1764830988434";import"./common.js?v=1764830988434";a([t,s,n,o,i,r,l,u,p,m,d]);const I=c({__name:"index",props:{width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"200px"},dataZoom:{type:Boolean,default:!1},option:{type:Object,required:!0}},setup(a,{expose:t}){const s=a,n=f(null);let o=null;function i(){null!==n.value&&(o=e.getInstanceByDom(n.value),null==o&&(o=e.init(n.value)),o.setOption(s.option,!0))}h(()=>s.option,e=>{e&&b(()=>{i()})},{immediate:!0,deep:!0});const r=y(function(){var a;null!==n.value&&(null==(a=e.getInstanceByDom(n.value))||a.resize())},300,{maxWait:800});return g(()=>{i(),window.addEventListener("resize",r)}),j(()=>{var a;n.value&&(null==(a=e.getInstanceByDom(n.value))||a.dispose(),window.removeEventListener("resize",r))}),t({getChart:()=>o}),(e,t)=>(_(),w("div",{ref_key:"chartRef",ref:n,style:x({width:B(v)(a.width),height:B(v)(a.height)})},null,4))}});export{I as default};
