码桶

发现社区成员的开源项目

geekssl /

wstats

公开
main
wstats/public/assets/EChart-Bps-t-O3.js
EChart-Bps-t-O3.js990 B
import{r,j as f}from"./index-GWuvg2UH.js";import{e as l}from"./echarts-CEICS1Jr.js";const c="#86909c";function p({option:s,height:i=300,onReady:u}){const o=r.useRef(null),t=r.useRef(null);return r.useEffect(()=>{const e=o.current;if(!e)return;const n=l.init(e);t.current=n;const a=new ResizeObserver(()=>n.resize());return a.observe(e),()=>{a.disconnect(),n.dispose(),t.current=null}},[]),r.useEffect(()=>{if(t.current&&s)try{t.current.setOption(s,!0)}catch(e){console.error("ECharts setOption failed:",e)}},[s]),f.jsx("div",{ref:o,style:{height:i}})}function d(){return{trigger:"axis"}}function y(){return{left:12,right:16,top:36,bottom:8,containLabel:!0}}function E(){return{xAxis:{type:"category",boundaryGap:!1,axisLine:{lineStyle:{color:"#e5e6eb"}},axisLabel:{color:c},axisTick:{show:!1}},yAxis:{type:"value",splitLine:{lineStyle:{color:"#f0f1f3"}},axisLabel:{color:c}}}}const h=["#2a5cff","#00b42a","#ff7d00","#f53f3f","#722ed1","#00b2ff"];export{p as E,h as P,d as a,y as b,E as c};