| 1 |
- import{j as o}from"./index-DbCm1Wjj.js";import{E as p}from"./index-CHy_40cC.js";function m({categories:r,series:s,valueFormatter:a,testId:l}){const n={backgroundColor:"transparent",textStyle:{fontFamily:'ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif',color:"#334155"},grid:{left:8,right:16,top:36,bottom:8,containLabel:!0},legend:{type:"scroll",top:0,textStyle:{fontSize:12},itemWidth:18},tooltip:{trigger:"axis",backgroundColor:"rgba(15, 23, 42, 0.95)",borderWidth:0,padding:[10,12],textStyle:{color:"#f8fafc",fontSize:12,lineHeight:18},extraCssText:"border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.18);",formatter:e=>{const i=e;if(!i.length)return"";const d=`<div style="font-weight:600;margin-bottom:4px">${i[0].axisValue}</div>`,f=i.map(t=>`<div>${t.marker}${t.seriesName} <b>${t.value==null?"—":a(t.value)}</b></div>`).join("");return d+f}},xAxis:{type:"category",data:r,boundaryGap:!1,axisLabel:{fontSize:11,hideOverlap:!0},axisTick:{alignWithLabel:!0}},yAxis:{type:"value",axisLabel:{fontSize:11,formatter:e=>a(e)},splitLine:{lineStyle:{color:"#eef2f6"}}},series:s.map(e=>({name:e.name,type:"line",data:e.data,connectNulls:!1,showSymbol:!1,lineStyle:{width:2},itemStyle:{color:e.color},emphasis:{focus:"series"}}))};return o.jsx("div",{className:"px-1 py-2",children:o.jsx(p,{option:n,style:{height:320,width:"100%"},notMerge:!0,"data-testid":l})})}export{m as TrendChart};
|