You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
7.8 KiB
1 lines
7.8 KiB
var _=Object.defineProperty,K=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var y=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var v=(t,e,a)=>e in t?_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,o=(t,e)=>{for(var a in e||(e={}))j.call(e,a)&&v(t,a,e[a]);if(y)for(var a of y(e))W.call(e,a)&&v(t,a,e[a]);return t},x=(t,e)=>K(t,U(e));var G=(t,e)=>{var a={};for(var r in t)j.call(t,r)&&e.indexOf(r)<0&&(a[r]=t[r]);if(t!=null&&y)for(var r of y(t))e.indexOf(r)<0&&W.call(t,r)&&(a[r]=t[r]);return a};import{a9 as w}from"./index-1786807848259.js";import{U as B,K as c,W as d}from"./screen2Standard-03f7f908-1786807848259.js";const S=B.ui,H=B.number,n=[c.accentCyan,c.accentMint,c.accentWater,c.accentOrange,"#16b6e8","#b9fbff"],D=c.textPrimary,V=c.textStrong,k=c.textSecondary,m=c.textMuted,q=c.chartGridLine,Z=new Map([["#ffd76c","#8bf7ff"],["#ffe06b","#8bf7ff"],["#ffcf62","#8bf7ff"],["#ffbf5a","#8bf7ff"],["#ff9a62","#48cfff"],["#ff9a5c","#48cfff"],["#ff8f6b","#48cfff"],["#ff5a64","#8bf7ff"],["#ff4054","#30dcff"],["#7ee269","#24f6c4"],["#86dc62","#24f6c4"],["#a6f06d","#24f6c4"],["#c7e86b","#8bf7ff"],["#9ea7ff","#48cfff"],["#7aa7ff","#48cfff"]]),E={color:m,fontFamily:S,fontSize:d.chartAxis};function L(t,e={}){return o({trigger:"item",appendToBody:!0,confine:!1,backgroundColor:"rgba(5, 31, 51, 0.96)",borderColor:"rgba(0, 210, 255, 0.54)",borderWidth:1,padding:[7,10],textStyle:{color:D,fontFamily:S,fontSize:d.tooltip,lineHeight:18},extraCssText:"box-shadow:0 0 10px rgba(0,210,255,.12);z-index:2147483647!important;pointer-events:none;",formatter:t},e)}function N(t={}){return o({itemWidth:10,itemHeight:7,itemGap:8,textStyle:x(o({},E),{color:k,fontSize:d.chartAxis})},t)}function g(t=[],e={}){return o({type:"category",data:t,axisLabel:o(x(o({},E),{color:m,interval:0,hideOverlap:!0,margin:8}),e.axisLabel||{}),axisLine:o({lineStyle:{color:"rgba(48, 220, 255, 0.26)"}},e.axisLine||{}),axisTick:o({show:!1},e.axisTick||{}),splitLine:o({show:!1},e.splitLine||{})},M(e))}function h(t={}){return o({type:"value",axisLabel:o(x(o({},E),{color:m}),t.axisLabel||{}),axisLine:o({show:!1},t.axisLine||{}),axisTick:o({show:!1},t.axisTick||{}),splitLine:o({lineStyle:{color:q,type:"dashed"}},t.splitLine||{})},M(t))}function $(t={}){return o({left:42,right:28,top:30,bottom:24,containLabel:!1},t)}function I(t,e=`${t}12`){return new w(0,0,0,1,[{offset:0,color:t},{offset:1,color:e}])}function F(t=n[0]){return new w(0,0,0,1,[{offset:0,color:"rgba(255,255,255,0.96)"},{offset:.16,color:t},{offset:.72,color:`${t}a3`},{offset:1,color:`${t}14`}])}function J(t,e=`${t}20`,a="#ffffff"){return new w(0,0,1,0,[{offset:0,color:e},{offset:.68,color:t},{offset:1,color:a}])}function C(t={}){var a,r,i;const e=o({textStyle:o({fontFamily:S,color:m},t.textStyle||{}),animation:(a=t.animation)!=null?a:!0,animationDuration:(r=t.animationDuration)!=null?r:900,animationDurationUpdate:(i=t.animationDurationUpdate)!=null?i:700,animationEasing:t.animationEasing||"cubicOut"},t);return T(e),z(e),e}function at({categories:t=[],rows:e=[],unit:a="",name:r="指标",orientation:i="vertical",colorIndex:s=0,grid:l={},showLabel:f=!0}={}){const u=i==="horizontal",P=e.map((b,p)=>({name:b.name||t[p],value:Number(b.value)||0,itemStyle:{borderRadius:u?[0,6,6,0]:[7,7,1,1],color:u?J(n[(s+p)%n.length],"rgba(48, 220, 255, 0.1)",n[(s+p)%n.length]):F(n[(s+p)%n.length])}}));return C({color:n,grid:$(o(u?{left:72,right:f?58:26,top:24,bottom:22}:{left:46,right:24,top:28,bottom:42},l)),tooltip:L(b=>`${b.marker}${b.name}:${A(b.value)}${a}`),xAxis:u?h():g(t,{axisLabel:{rotate:t.length>6?24:0}}),yAxis:u?g(t,{inverse:!0,axisLabel:{color:D,fontWeight:700}}):h(),series:[{name:r,type:"bar",barWidth:u?8:t.length>7?6:8,data:P,label:{show:f,position:u?"right":"top",color:V,fontFamily:H,fontSize:d.chartLabel,fontWeight:700,formatter:({value:b})=>A(b)}}]})}function rt({categories:t=[],series:e=[],unit:a="",grid:r={}}={}){return C({color:n,grid:$(o({left:46,right:20,top:42,bottom:42},r)),tooltip:L(i=>O(i,a),{trigger:"axis",axisPointer:{type:"shadow"}}),legend:N({top:0,right:4}),xAxis:g(t),yAxis:h(),series:e.map((i,s)=>({name:i.name,type:"bar",barWidth:t.length>7?6:8,data:i.values||[],itemStyle:{borderRadius:[7,7,1,1],color:F(n[s%n.length])}}))})}function ot({categories:t=[],series:e=[],unit:a="",grid:r={}}={}){return C({color:n,grid:$(o({left:48,right:22,top:42,bottom:42},r)),tooltip:L(i=>O(i,a),{trigger:"axis",axisPointer:{type:"shadow"}}),legend:N({top:0,right:4}),xAxis:g(t),yAxis:h(),series:e.map((i,s)=>({name:i.name,type:"bar",stack:"total",barWidth:t.length>7?6:8,data:i.values||[],itemStyle:{color:F(n[s%n.length])}}))})}function it({categories:t=[],series:e=[],unit:a="",area:r=!1,grid:i={}}={}){return C({color:n,grid:$(o({left:46,right:24,top:42,bottom:38},i)),tooltip:L(s=>O(s,a),{trigger:"axis",axisPointer:{type:"line",lineStyle:{color:"rgba(139, 247, 255, 0.42)"}}}),legend:N({top:0,right:4}),xAxis:g(t),yAxis:h(),series:e.map((s,l)=>{const f=n[l%n.length];return{name:s.name,type:"line",smooth:!0,symbol:"circle",symbolSize:5,data:s.values||[],lineStyle:{width:1.6,color:f,shadowColor:`${f}22`,shadowBlur:1},itemStyle:{color:"#041522",borderColor:f,borderWidth:1},areaStyle:r?{color:I(f,`${f}08`)}:void 0}})})}function A(t){const e=Number(t);return Number.isFinite(e)?Number.isInteger(e)?e.toLocaleString("zh-CN"):e.toLocaleString("zh-CN",{maximumFractionDigits:2}):"--"}function M(t={}){const l=t,{axisLabel:e,axisLine:a,axisTick:r,splitLine:i}=l;return G(l,["axisLabel","axisLine","axisTick","splitLine"])}function O(t,e=""){var s,l;const a=Array.isArray(t)?t:[t],r=((s=a[0])==null?void 0:s.axisValueLabel)||((l=a[0])==null?void 0:l.name)||"",i=a.map(f=>`${f.marker}${f.seriesName||f.name}:${A(f.value)}${e}`).join("<br/>");return`${r}<br/>${i}`}function z(t){if(!t||typeof t!="object")return;["textStyle","axisLabel","nameTextStyle","label","axisName"].forEach(a=>{!t[a]||typeof t[a]!="object"||(t[a]=Q(t[a]))}),Object.keys(t).forEach(a=>{const r=t[a];if(!(!r||typeof r!="object")&&!(a==="color"||a==="itemStyle"||a==="areaStyle"||a==="lineStyle")){if(Array.isArray(r)){r.forEach(z);return}z(r)}})}function T(t){!t||typeof t!="object"||Object.keys(t).forEach(e=>{const a=t[e];if(typeof a=="string"){t[e]=R(a);return}if(Array.isArray(a)){a.forEach((r,i)=>{typeof r=="string"?a[i]=R(r):T(r)});return}a&&typeof a=="object"&&T(a)})}function R(t){let e=t;return Z.forEach((a,r)=>{e=e.replace(new RegExp(r,"gi"),a)}),e=e.replace(/rgba\(\s*255\s*,\s*215\s*,\s*108\s*,\s*([^)]+)\)/gi,"rgba(139, 247, 255, $1)").replace(/rgba\(\s*255\s*,\s*224\s*,\s*107\s*,\s*([^)]+)\)/gi,"rgba(139, 247, 255, $1)").replace(/rgba\(\s*255\s*,\s*154\s*,\s*98\s*,\s*([^)]+)\)/gi,"rgba(72, 207, 255, $1)").replace(/rgba\(\s*255\s*,\s*143\s*,\s*107\s*,\s*([^)]+)\)/gi,"rgba(72, 207, 255, $1)").replace(/rgba\(\s*126\s*,\s*226\s*,\s*105\s*,\s*([^)]+)\)/gi,"rgba(36, 246, 196, $1)").replace(/rgba\(\s*134\s*,\s*220\s*,\s*98\s*,\s*([^)]+)\)/gi,"rgba(36, 246, 196, $1)").replace(/rgba\(\s*166\s*,\s*240\s*,\s*109\s*,\s*([^)]+)\)/gi,"rgba(36, 246, 196, $1)").replace(/rgba\(\s*158\s*,\s*167\s*,\s*255\s*,\s*([^)]+)\)/gi,"rgba(72, 207, 255, $1)").replace(/rgba\(\s*122\s*,\s*167\s*,\s*255\s*,\s*([^)]+)\)/gi,"rgba(72, 207, 255, $1)").replace(/rgba\(\s*255\s*,\s*64\s*,\s*84\s*,\s*([^)]+)\)/gi,"rgba(48, 220, 255, $1)").replace(/rgba\(\s*255\s*,\s*90\s*,\s*100\s*,\s*([^)]+)\)/gi,"rgba(139, 247, 255, $1)"),e}function Q(t){const e=o({fontFamily:t.fontFamily||S},t);return e.color=X(e.color),typeof e.fontSize=="number"&&e.fontSize<10&&(e.fontSize=10),e}function X(t){if(typeof t!="string")return t;const e=t.match(/^rgba\(\s*(22[0-9]|23[0-9]|24[0-9]|25[0-5])\s*,\s*(24[0-9]|25[0-5])\s*,\s*(24[0-9]|25[0-5])\s*,\s*([0-9.]+)\s*\)$/i);if(!e)return t;const a=Number(e[4]);return!Number.isFinite(a)||a>=.72?t:a<.6?m:k}export{rt as a,ot as b,at as c,it as d,n as e,L as f,N as g,$ as h,g as i,A as j,I as k,k as l,V as m,S as n,D as o,q as p,H as q,F as s,h as v,C as w};
|
|
|