import{h as s,g as f,o as u,i as h,j as d,w as p,c as m,e as g}from"./runtime-dom.esm-bundler-Dxy_DEvW.js";const C={__name:"CalendarChart",props:{config:{type:Object}},setup(e){const a=s(null);let t=null;const o=f(()=>{const i=e.config?.data||[];return{title:{top:0,text:e.config?.title||"",left:"center"},tooltip:e.config?.tooltip||{position:"top",formatter:function(n){return`${n.data[0]}: ${n.data[1]}`}},visualMap:{min:0,max:1e4,type:"piecewise",orient:"horizontal",left:"center",top:40,pieces:e.config?.threshold||[]},calendar:{top:100,left:30,right:30,cellSize:["auto",20],range:e.config?.year||new Date().getFullYear(),itemStyle:{borderWidth:1,borderColor:"#e2e8f0"},yearLabel:{show:!1}},series:[{type:"heatmap",coordinateSystem:"calendar",data:i}]}});u(()=>{h(()=>{r()})}),d(()=>{l()}),p(()=>e.config,()=>{c()},{deep:!0});function r(){a.value&&setTimeout(()=>{t=echarts.init(a.value),t.setOption(o.value)},500)}function c(){t&&t.setOption(o.value)}function l(){t&&(t.dispose(),t=null)}return(i,n)=>(g(),m("div",{ref_key:"chartContainer",ref:a,class:"chart-container",style:{width:"100%",height:"300px"}},null,512))}};export{C as _};
//# sourceMappingURL=CalendarChart-CSie164z.js.map
