import{o as t,h as e,w as i,i as a,z as o,bc as r,N as n,j as l,t as s,E as h,bd as c,cC as d,cD as p,p as x,ax as u,az as g,f,g as y,ba as m,W as b,bb as v,aA as A,b as S,e as w,c as T,T as C,r as D,A as P,k as M,F as L,l as F,x as _,aG as k,O as I,y as O,S as z,a1 as E,Q as B,H as R,a as W}from"./index-DXvjTqMr.js";import{e as Y}from"./uni-cloud.es.Rn_2-D_g.js";import{_ as G}from"./_plugin-vue_export-helper.BCo6x5W8.js";import{t as N}from"./index.CBpf9i7e.js";import{d as H}from"./index.D3kEQn5y.js";import{_ as X}from"./uni-datetime-picker.DoXFjUWA.js";import{_ as j}from"./uni-popup.BpvJsdxE.js";import{h as J}from"./moment.BD7_iMEL.js";import{o as U,s as q,p as V}from"./customer.BB8HSfBC.js";import"./uni-nav-bar.BZJJc0Hh.js";import"./uni-icons.Dxt3pfrw.js";/* empty css *//* empty css *//* empty css */import"./uni-datetime-picker.vue_vue_type_style_index_0_scoped_6f474695_lang.U38A_nZ2.js";import"./uni-popup.vue_vue_type_style_index_0_scoped_90b62717_lang.BoqUbMLw.js";const Q=G({components:{Loading1:G({name:"loading1",data:()=>({})},[["render",function(r,n,l,s,h,c){const d=o;return t(),e(d,{class:"container loading1"},{default:i((()=>[a(d,{class:"shape shape1"}),a(d,{class:"shape shape2"}),a(d,{class:"shape shape3"}),a(d,{class:"shape shape4"})])),_:1})}],["__scopeId","data-v-a16ea79e"]]),Loading2:G({name:"loading2",data:()=>({})},[["render",function(r,n,l,s,h,c){const d=o;return t(),e(d,{class:"container loading2"},{default:i((()=>[a(d,{class:"shape shape1"}),a(d,{class:"shape shape2"}),a(d,{class:"shape shape3"}),a(d,{class:"shape shape4"})])),_:1})}],["__scopeId","data-v-51d40d8b"]]),Loading3:G({name:"loading3",data:()=>({})},[["render",function(r,n,l,s,h,c){const d=o;return t(),e(d,{class:"container loading3"},{default:i((()=>[a(d,{class:"shape shape1"}),a(d,{class:"shape shape2"}),a(d,{class:"shape shape3"}),a(d,{class:"shape shape4"})])),_:1})}],["__scopeId","data-v-47408335"]]),Loading4:G({name:"loading5",data:()=>({})},[["render",function(r,n,l,s,h,c){const d=o;return t(),e(d,{class:"container loading5"},{default:i((()=>[a(d,{class:"shape shape1"}),a(d,{class:"shape shape2"}),a(d,{class:"shape shape3"}),a(d,{class:"shape shape4"})])),_:1})}],["__scopeId","data-v-49a6258a"]]),Loading5:G({name:"loading6",data:()=>({})},[["render",function(r,n,l,s,h,c){const d=o;return t(),e(d,{class:"container loading6"},{default:i((()=>[a(d,{class:"shape shape1"}),a(d,{class:"shape shape2"}),a(d,{class:"shape shape3"}),a(d,{class:"shape shape4"})])),_:1})}],["__scopeId","data-v-08a06125"]])},name:"qiun-loading",props:{loadingType:{type:Number,default:2}},data:()=>({})},[["render",function(a,l,s,h,c,d){const p=r("Loading1"),x=r("Loading2"),u=r("Loading3"),g=r("Loading4"),f=r("Loading5"),y=o;return t(),e(y,null,{default:i((()=>[1==s.loadingType?(t(),e(p,{key:0})):n("",!0),2==s.loadingType?(t(),e(x,{key:1})):n("",!0),3==s.loadingType?(t(),e(u,{key:2})):n("",!0),4==s.loadingType?(t(),e(g,{key:3})):n("",!0),5==s.loadingType?(t(),e(f,{key:4})):n("",!0)])),_:1})}]]);const K=G({name:"qiun-error",props:{errorMessage:{type:String,default:null}},data:()=>({})},[["render",function(r,n,h,c,d,p){const x=o;return t(),e(x,{class:"chartsview"},{default:i((()=>[a(x,{class:"charts-error"}),a(x,{class:"charts-font"},{default:i((()=>[l(s(null==h.errorMessage?"请点击重试":h.errorMessage),1)])),_:1})])),_:1})}],["__scopeId","data-v-af32de60"]]);var Z={version:"v2.5.0-20230101",yAxisWidth:15,xAxisHeight:22,padding:[10,10,10,10],rotate:!1,fontSize:13,fontColor:"#666666",dataPointShape:["circle","circle","circle","circle"],color:["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],linearColor:["#0EE2F8","#2BDCA8","#FA7D8D","#EB88E2","#2AE3A0","#0EE2F8","#EB88E2","#6773E3","#F78A85"],pieChartLinePadding:15,pieChartTextPadding:5,titleFontSize:20,subtitleFontSize:15,radarLabelTextMargin:13},$=function(t,...e){if(null==t)throw new TypeError("[uCharts] Cannot convert undefined or null to object");if(!e||e.length<=0)return t;function i(t,e){for(let a in e)t[a]=t[a]&&"[object Object]"===t[a].toString()?i(t[a],e[a]):t[a]=e[a];return t}return e.forEach((e=>{t=i(t,e)})),t},tt={toFixed:function(t,e){return e=e||2,this.isFloat(t)&&(t=t.toFixed(e)),t},isFloat:function(t){return t%1!=0},approximatelyEqual:function(t,e){return Math.abs(t-e)<1e-10},isSameSign:function(t,e){return Math.abs(t)===t&&Math.abs(e)===e||Math.abs(t)!==t&&Math.abs(e)!==e},isSameXCoordinateArea:function(t,e){return this.isSameSign(t.x,e.x)},isCollision:function(t,e){return t.end={},t.end.x=t.start.x+t.width,t.end.y=t.start.y-t.height,e.end={},e.end.x=e.start.x+e.width,e.end.y=e.start.y-e.height,!(e.start.x>t.end.x||e.end.xt.start.y||e.start.y1&&(o.extra.mount.widthRatio>2&&(o.extra.mount.widthRatio=2),n+=(o.extra.mount.widthRatio-1)*i.eachSpacing);var l=e;return e>=0?(l=0,t.uevent.trigger("scrollLeft"),t.scrollOption.position="left",o.xAxis.scrollPosition="left"):Math.abs(e)>=n-r?(l=r-n,t.uevent.trigger("scrollRight"),t.scrollOption.position="right",o.xAxis.scrollPosition="right"):(t.scrollOption.position=e,o.xAxis.scrollPosition=e),l}function ot(t,e,i){function a(t){for(;t<0;)t+=2*Math.PI;for(;t>2*Math.PI;)t-=2*Math.PI;return t}return t=a(t),(e=a(e))>(i=a(i))&&(i+=2*Math.PI,t=e&&t<=i}function rt(t,e){function i(t,e){return!(!t[e-1]||!t[e+1])&&(t[e].y>=Math.max(t[e-1].y,t[e+1].y)||t[e].y<=Math.min(t[e-1].y,t[e+1].y))}function a(t,e){return!(!t[e-1]||!t[e+1])&&(t[e].x>=Math.max(t[e-1].x,t[e+1].x)||t[e].x<=Math.min(t[e-1].x,t[e+1].x))}var o=.2,r=.2,n=null,l=null,s=null,h=null;if(e<1?(n=t[0].x+(t[1].x-t[0].x)*o,l=t[0].y+(t[1].y-t[0].y)*o):(n=t[e].x+(t[e+1].x-t[e-1].x)*o,l=t[e].y+(t[e+1].y-t[e-1].y)*o),e>t.length-3){var c=t.length-1;s=t[c].x-(t[c].x-t[c-1].x)*r,h=t[c].y-(t[c].y-t[c-1].y)*r}else s=t[e+1].x-(t[e+2].x-t[e].x)*r,h=t[e+1].y-(t[e+2].y-t[e].y)*r;return i(t,e+1)&&(h=t[e+1].y),i(t,e)&&(l=t[e].y),a(t,e+1)&&(s=t[e+1].x),a(t,e)&&(n=t[e].x),(l>=Math.max(t[e].y,t[e+1].y)||l<=Math.min(t[e].y,t[e+1].y))&&(l=t[e].y),(h>=Math.max(t[e].y,t[e+1].y)||h<=Math.min(t[e].y,t[e+1].y))&&(h=t[e+1].y),(n>=Math.max(t[e].x,t[e+1].x)||n<=Math.min(t[e].x,t[e+1].x))&&(n=t[e].x),(s>=Math.max(t[e].x,t[e+1].x)||s<=Math.min(t[e].x,t[e+1].x))&&(s=t[e+1].x),{ctrA:{x:n,y:l},ctrB:{x:s,y:h}}}function nt(t,e,i){return{x:i.x+t,y:i.y-e}}function lt(t,e){if(e)for(;tt.isCollision(t,e);)t.start.x>0?t.start.y--:t.start.x<0||t.start.y>0?t.start.y++:t.start.y--;return t}function st(t,e,i){for(var a=0,o=0;o-1;if(r){let e=ft(t);for(var n=0;n5&&void 0!==arguments[5]?arguments[5]:{},n=e.chartData.calPoints?e.chartData.calPoints:[];let l={};if(a.length>0){let t=[];for(let e=0;e0&&(a=o[i]),{text:r.formatter?r.formatter(t,a,i,e):t.name+": "+t.data,color:t.color,legendShape:"auto"==e.extra.tooltip.legendShape?t.legendShape:e.extra.tooltip.legendShape}})),offset:{x:Math.round(l.x),y:Math.round(l.y)}}}function ft(t){let e=[];for(let i=0;i=e.area[3]-10&&t.y>=e.area[0]&&t.y<=e.height-e.area[2]}function mt(t,e,i){return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)<=Math.pow(i,2)}function bt(t,e){var i=[],a=[];return t.forEach((function(t,o){e.connectNulls?null!==t&&a.push(t):null!==t?a.push(t):(a.length&&i.push(a),a=[])})),a.length&&i.push(a),i}function vt(t,e,i,a,o){var r={angle:0,xAxisHeight:e.xAxis.lineHeight*e.pix+e.xAxis.marginTop*e.pix},n=e.xAxis.fontSize*e.pix,l=t.map((function(t,i){var a=e.xAxis.formatter?e.xAxis.formatter(t,i,e):t;return ct(String(a),n,o)})),s=Math.max.apply(this,l);if(1==e.xAxis.rotateLabel){r.angle=e.xAxis.rotateAngle*Math.PI/180;let t=e.xAxis.marginTop*e.pix*2+Math.abs(s*Math.sin(r.angle));t=t4&&void 0!==arguments[4]?arguments[4]:-1;o="stack"==a?pt(t,e.categories.length):dt(t);var n=[];(o=o.filter((function(t){return"object"==typeof t&&null!==t?t.constructor.toString().indexOf("Array")>-1?null!==t:null!==t.value:null!==t}))).map((function(t){"object"==typeof t?t.constructor.toString().indexOf("Array")>-1?"candle"==e.type?t.map((function(t){n.push(t)})):n.push(t[0]):n.push(t.value):n.push(t)}));var l=0,s=0;n.length>0&&(l=Math.min.apply(this,n),s=Math.max.apply(this,n)),r>-1?("number"==typeof e.xAxis.data[r].min&&(l=Math.min(e.xAxis.data[r].min,l)),"number"==typeof e.xAxis.data[r].max&&(s=Math.max(e.xAxis.data[r].max,s))):("number"==typeof e.xAxis.min&&(l=Math.min(e.xAxis.min,l)),"number"==typeof e.xAxis.max&&(s=Math.max(e.xAxis.max,s))),l===s&&(s+=s||10);for(var h=l,c=[],d=(s-h)/e.xAxis.splitNumber,p=0;p<=e.xAxis.splitNumber;p++)c.push(h+d*p);return c}(t,e,i,o.type),r.rangesFormat=r.ranges.map((function(t){return t=tt.toFixed(t,2)}));var n=r.ranges.map((function(t){return t=tt.toFixed(t,2)}));return(r=Object.assign(r,Dt(n,e))).eachSpacing,n.map((function(t){return ct(t,e.xAxis.fontSize*e.pix,a)})),!0===e.xAxis.disabled&&(r.xAxisHeight=0),r}function St(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=0,o=0;for(let r=0;r4&&void 0!==arguments[4]?arguments[4]:1,r=0,n=0,l=[];for(let d=0;d0&&(t.width=Math.min(t.width,+r.extra.mix.column.width*r.pix)),r.extra.column&&r.extra.column.width&&+r.extra.column.width>0&&(t.width=Math.min(t.width,+r.extra.column.width*r.pix)),t.width<=0&&(t.width=1),t.x+=(a+.5-i/2)*(t.width+o),t}))}function Ct(t,e,i,a,o,r){return t.map((function(t){if(null===t)return null;var o=0,n=0;return o=r.extra.bar.seriesGap*r.pix||0,n=r.extra.bar.categoryGap*r.pix||0,o=Math.min(o,e/i),n=Math.min(n,e/i),t.width=Math.ceil((e-2*n-o*(i-1))/i),r.extra.bar&&r.extra.bar.width&&+r.extra.bar.width>0&&(t.width=Math.min(t.width,+r.extra.bar.width*r.pix)),t.width<=0&&(t.width=1),t.y+=(a+.5-i/2)*(t.width+o),t}))}function Dt(t,e,i){var a=e.width-e.area[1]-e.area[3],o=e.enableScroll?Math.min(e.xAxis.itemCount,t.length):t.length;("line"==e.type||"area"==e.type||"scatter"==e.type||"bubble"==e.type||"bar"==e.type)&&o>1&&"justify"==e.xAxis.boundaryGap&&(o-=1);var r=0;"mount"==e.type&&e.extra&&e.extra.mount&&e.extra.mount.widthRatio&&e.extra.mount.widthRatio>1&&(e.extra.mount.widthRatio>2&&(e.extra.mount.widthRatio=2),o+=r=e.extra.mount.widthRatio-1);var n=a/o,l=[],s=e.area[3],h=e.width-e.area[1];return t.forEach((function(t,e){l.push(s+r/2*n+e*n)})),"justify"!==e.xAxis.boundaryGap&&(!0===e.enableScroll?l.push(s+r*n+t.length*n):l.push(h)),{xAxisPoints:l,startX:s,endX:h,eachSpacing:n}}function Pt(t,e,i,a,o,r,n){var l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1,s="center";"line"!=r.type&&"area"!=r.type&&"scatter"!=r.type&&"bubble"!=r.type||(s=r.xAxis.boundaryGap);var h=[],c=r.height-r.area[0]-r.area[2],d=r.width-r.area[1]-r.area[3];return t.forEach((function(t,n){if(null===t)h.push(null);else{var p={};p.color=t.color,p.x=a[n];var x=t;if("object"==typeof t&&null!==t)if(t.constructor.toString().indexOf("Array")>-1){let e,i,a;e=[].concat(r.chartData.xAxisData.ranges),i=e.shift(),a=e.pop(),x=t[1],p.x=r.area[3]+d*(t[0]-i)/(a-i),"bubble"==r.type&&(p.r=t[2],p.t=t[3])}else x=t.value;"center"==s&&(p.x+=o/2);var u=c*(x-e)/(i-e);u*=l,p.y=r.height-u-r.area[2],h.push(p)}})),h}function Mt(t,e,i,a,o,r,n,l,s){s=arguments.length>8&&void 0!==arguments[8]?arguments[8]:1;var h=[],c=r.height-r.area[0]-r.area[2],d=r.width-r.area[1]-r.area[3];return t.forEach((function(t,n){if(null===t)h.push(null);else{var l={};l.color=t.color,l.x=a[n];var p=t;if("object"==typeof t&&null!==t)if(t.constructor.toString().indexOf("Array")>-1){let e,i,a;e=[].concat(r.chartData.xAxisData.ranges),i=e.shift(),a=e.pop(),p=t[1],l.x=r.area[3]+d*(t[0]-i)/(a-i)}else p=t.value;l.x+=o/2;var x=c*(p*s-e)/(i-e);l.y=r.height-x-r.area[2],h.push(l)}})),h}function Lt(t,e,i,a,o,r,n,l){var s=arguments.length>8&&void 0!==arguments[8]?arguments[8]:1,h=[],c=r.height-r.area[0]-r.area[2];r.width,r.area[1],r.area[3];var d=o*n.widthRatio;return t.forEach((function(t,n){if(null===t)h.push(null);else{var l={};l.color=t.color,l.x=a[n],l.x+=o/2;var p=t.data,x=c*(p*s-e)/(i-e);l.y=r.height-x-r.area[2],l.value=p,l.width=d,h.push(l)}})),h}function Ft(t,e,i,a,o,r,n){var l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1,s=[];r.height,r.area[0],r.area[2];var h=r.width-r.area[1]-r.area[3];return t.forEach((function(t,o){if(null===t)s.push(null);else{var n={};n.color=t.color,n.y=a[o];var c=t;"object"==typeof t&&null!==t&&(c=t.value);var d=h*(c-e)/(i-e);d*=l,n.height=d,n.value=c,n.x=d+r.area[3],s.push(n)}})),s}function _t(t,e,i,a,o,r,n,l,s){var h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:1,c=[],d=r.height-r.area[0]-r.area[2];return t.forEach((function(t,n){if(null===t)c.push(null);else{var p={};if(p.color=t.color,p.x=a[n]+Math.round(o/2),l>0){var x=0;for(let t=0;t<=l;t++)x+=s[t].data[n];var u=d*(x-e)/(i-e),g=d*(x-t-e)/(i-e)}else{x=t;"object"==typeof t&&null!==t&&(x=t.value);u=d*(x-e)/(i-e),g=0}var f=g;u*=h,f*=h,p.y=r.height-Math.round(u)-r.area[2],p.y0=r.height-Math.round(f)-r.area[2],c.push(p)}})),c}function kt(t,e,i,a,o,r,n,l,s){var h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:1,c=[],d=r.width-r.area[1]-r.area[3];return t.forEach((function(t,o){if(null===t)c.push(null);else{var n={};if(n.color=t.color,n.y=a[o],l>0){var p=0;for(let t=0;t<=l;t++)p+=s[t].data[o];var x=d*(p-e)/(i-e),u=d*(p-t-e)/(i-e)}else{p=t;"object"==typeof t&&null!==t&&(p=t.value);x=d*(p-e)/(i-e),u=0}var g=u;x*=h,g*=h,n.height=x-g,n.x=r.area[3]+x,n.x0=r.area[3]+g,c.push(n)}})),c}function It(t,e,i,a,o){var r;r="stack"==a?pt(t,e.categories.length):dt(t);var n=[];(r=r.filter((function(t){return"object"==typeof t&&null!==t?t.constructor.toString().indexOf("Array")>-1?null!==t:null!==t.value:null!==t}))).map((function(t){"object"==typeof t?t.constructor.toString().indexOf("Array")>-1?"candle"==e.type?t.map((function(t){n.push(t)})):n.push(t[1]):n.push(t.value):n.push(t)}));var l=o.min||0,s=o.max||0;n.length>0&&(l=Math.min.apply(this,n),s=Math.max.apply(this,n)),l===s&&(0==s?s=10:l=0);for(var h=function(t,e){var i=0,a=e-t;return{minRange:it(t,"lower",i=a>=1e4?1e3:a>=1e3?100:a>=100?10:a>=10?5:a>=1?1:a>=.1?.1:a>=.01?.01:a>=.001?.001:a>=1e-4?1e-4:a>=1e-5?1e-5:1e-6),maxRange:it(e,"upper",i)}}(l,s),c=void 0===o.min||null===o.min?h.minRange:o.min,d=((void 0===o.max||null===o.max?h.maxRange:o.max)-c)/e.yAxis.splitNumber,p=[],x=0;x<=e.yAxis.splitNumber;x++)p.push(c+d*x);return p.reverse()}function Ot(t,e,i,a){var o=$({},{type:""},e.extra.column),r=e.yAxis.data.length,n=new Array(r);if(r>0){for(let e=0;et+(r.unit||"")),r.categories=r.categories||e.categories,l[t]=r.categories):(r.formatter||(r.formatter=(t,e,i)=>tt.toFixed(t,r.tofix||0)+(r.unit||"")),l[t]=It(n[t],e,0,o.type,r));let c=r.fontSize*e.pix||i.fontSize;h[t]={position:r.position?r.position:"left",width:0},s[t]=l[t].map((function(i,o){return i=r.formatter(i,o,e),h[t].width=Math.max(h[t].width,ct(i,c,a)+5),i}));let d=r.calibration?4*e.pix:0;h[t].width+=d+3*e.pix,!0===r.disabled&&(h[t].width=0)}}else{l=new Array(1),s=new Array(1),h=new Array(1);"bar"===e.type?(l[0]=e.categories,e.yAxis.formatter||(e.yAxis.formatter=(t,e,i)=>t+(i.yAxis.unit||""))):(e.yAxis.formatter||(e.yAxis.formatter=(t,e,i)=>t.toFixed(i.yAxis.tofix)+(i.yAxis.unit||"")),l[0]=It(t,e,0,o.type,{})),h[0]={position:"left",width:0};var c=e.yAxis.fontSize*e.pix||i.fontSize;s[0]=l[0].map((function(t,i){return t=e.yAxis.formatter(t,i,e),h[0].width=Math.max(h[0].width,ct(t,c,a)+5),t})),h[0].width+=3*e.pix,!0===e.yAxis.disabled?(h[0]={position:"left",width:0},e.yAxis.data[0]={disabled:!0}):(e.yAxis.data[0]={disabled:!1,position:"left",max:e.yAxis.max,min:e.yAxis.min,formatter:e.yAxis.formatter},"bar"===e.type&&(e.yAxis.data[0].categories=e.categories,e.yAxis.data[0].type="categories"))}return{rangesFormat:s,ranges:l,yAxisWidth:h}}function zt(t,e){!0!==e.rotateLock?(t.translate(e.height,0),t.rotate(90*Math.PI/180)):!0!==e._rotate_&&(t.translate(e.height,0),t.rotate(90*Math.PI/180),e._rotate_=!0)}function Et(t,e,i,a,o){if(a.beginPath(),"hollow"==o.dataPointShapeType?(a.setStrokeStyle(e),a.setFillStyle(o.background),a.setLineWidth(2*o.pix)):(a.setStrokeStyle("#ffffff"),a.setFillStyle(e),a.setLineWidth(1*o.pix)),"diamond"===i)t.forEach((function(t,e){null!==t&&(a.moveTo(t.x,t.y-4.5),a.lineTo(t.x-4.5,t.y),a.lineTo(t.x,t.y+4.5),a.lineTo(t.x+4.5,t.y),a.lineTo(t.x,t.y-4.5))}));else if("circle"===i)t.forEach((function(t,e){null!==t&&(a.moveTo(t.x+2.5*o.pix,t.y),a.arc(t.x,t.y,3*o.pix,0,2*Math.PI,!1))}));else if("square"===i)t.forEach((function(t,e){null!==t&&(a.moveTo(t.x-3.5,t.y-3.5),a.rect(t.x-3.5,t.y-3.5,7,7))}));else if("triangle"===i)t.forEach((function(t,e){null!==t&&(a.moveTo(t.x,t.y-4.5),a.lineTo(t.x-4.5,t.y+4.5),a.lineTo(t.x+4.5,t.y+4.5),a.lineTo(t.x,t.y-4.5))}));else if("none"===i)return;a.closePath(),a.fill(),a.stroke()}function Bt(t,e,i,a,o,r,n){if(o.tooltip&&!(o.tooltip.group.length>0&&0==o.tooltip.group.includes(n))){var l="number"==typeof o.tooltip.index?o.tooltip.index:o.tooltip.index[o.tooltip.group.indexOf(n)];if(a.beginPath(),"hollow"==r.activeType?(a.setStrokeStyle(e),a.setFillStyle(o.background),a.setLineWidth(2*o.pix)):(a.setStrokeStyle("#ffffff"),a.setFillStyle(e),a.setLineWidth(1*o.pix)),"diamond"===i)t.forEach((function(t,e){null!==t&&l==e&&(a.moveTo(t.x,t.y-4.5),a.lineTo(t.x-4.5,t.y),a.lineTo(t.x,t.y+4.5),a.lineTo(t.x+4.5,t.y),a.lineTo(t.x,t.y-4.5))}));else if("circle"===i)t.forEach((function(t,e){null!==t&&l==e&&(a.moveTo(t.x+2.5*o.pix,t.y),a.arc(t.x,t.y,3*o.pix,0,2*Math.PI,!1))}));else if("square"===i)t.forEach((function(t,e){null!==t&&l==e&&(a.moveTo(t.x-3.5,t.y-3.5),a.rect(t.x-3.5,t.y-3.5,7,7))}));else if("triangle"===i)t.forEach((function(t,e){null!==t&&l==e&&(a.moveTo(t.x,t.y-4.5),a.lineTo(t.x-4.5,t.y+4.5),a.lineTo(t.x+4.5,t.y+4.5),a.lineTo(t.x,t.y-4.5))}));else if("none"===i)return;a.closePath(),a.fill(),a.stroke()}}function Rt(t,e,i,a){var o=t.title.fontSize||e.titleFontSize,r=t.subtitle.fontSize||e.subtitleFontSize,n=t.title.name||"",l=t.subtitle.name||"",s=t.title.color||t.fontColor,h=t.subtitle.color||t.fontColor,c=n?o:0,d=l?r:0;if(l){var p=ct(l,r*t.pix,i),x=a.x-p/2+(t.subtitle.offsetX||0)*t.pix,u=a.y+r*t.pix/2+(t.subtitle.offsetY||0)*t.pix;n&&(u+=(c*t.pix+5)/2),i.beginPath(),i.setFontSize(r*t.pix),i.setFillStyle(h),i.fillText(l,x,u),i.closePath(),i.stroke()}if(n){var g=ct(n,o*t.pix,i),f=a.x-g/2+(t.title.offsetX||0),y=a.y+o*t.pix/2+(t.title.offsetY||0)*t.pix;l&&(y-=(d*t.pix+5)/2),i.beginPath(),i.setFontSize(o*t.pix),i.setFillStyle(s),i.fillText(n,f,y),i.closePath(),i.stroke()}}function Wt(t,e,i,a,o){var r=e.data,n=e.textOffset?e.textOffset:0;t.forEach((function(t,l){if(null!==t){a.beginPath();var s=e.textSize?e.textSize*o.pix:i.fontSize;a.setFontSize(s),a.setFillStyle(e.textColor||o.fontColor);var h=r[l];"object"==typeof r[l]&&null!==r[l]&&(h=r[l].constructor.toString().indexOf("Array")>-1?r[l][1]:r[l].value);var c=e.formatter?e.formatter(h,l,e,o):h;a.setTextAlign("center"),a.fillText(String(c),t.x,t.y-4+n*o.pix),a.closePath(),a.stroke(),a.setTextAlign("left")}}))}function Yt(t,e,i,a,o){var r=e.data,n=e.textOffset?e.textOffset:0,l=o.extra.column.labelPosition;t.forEach((function(t,s){if(null!==t){a.beginPath();var h=e.textSize?e.textSize*o.pix:i.fontSize;a.setFontSize(h),a.setFillStyle(e.textColor||o.fontColor);var c=r[s];"object"==typeof r[s]&&null!==r[s]&&(c=r[s].constructor.toString().indexOf("Array")>-1?r[s][1]:r[s].value);var d=e.formatter?e.formatter(c,s,e,o):c;a.setTextAlign("center");var p=t.y-4*o.pix+n*o.pix;t.y>e.zeroPoints&&(p=t.y+n*o.pix+h),"insideTop"==l&&(p=t.y+h+n*o.pix,t.y>e.zeroPoints&&(p=t.y-n*o.pix-4*o.pix)),"center"==l&&(p=t.y+n*o.pix+(o.height-o.area[2]-t.y+h)/2,e.zeroPointse.zeroPoints&&(p=t.y-n*o.pix-(t.y-e.zeroPoints-h)/2),"stack"==o.extra.column.type&&(p=t.y+n*o.pix+(t.y0-t.y+h)/2)),"bottom"==l&&(p=o.height-o.area[2]+n*o.pix-4*o.pix,e.zeroPointse.zeroPoints&&(p=e.zeroPoints-n*o.pix+h+2*o.pix),"stack"==o.extra.column.type&&(p=t.y0+n*o.pix-4*o.pix)),a.fillText(String(d),t.x,p),a.closePath(),a.stroke(),a.setTextAlign("left")}}))}function Gt(t,e,i,a,o){var r=e.data;e.textOffset&&e.textOffset,t.forEach((function(t,n){if(null!==t){a.beginPath();var l=e.textSize?e.textSize*o.pix:i.fontSize;a.setFontSize(l),a.setFillStyle(e.textColor||o.fontColor);var s=r[n];"object"==typeof r[n]&&null!==r[n]&&(s=r[n].value);var h=e.formatter?e.formatter(s,n,e,o):s;a.setTextAlign("left"),a.fillText(String(h),t.x+4*o.pix,t.y+l/2-3),a.closePath(),a.stroke()}}))}function Nt(t,e,i,a,o,r){var n=i.pieChartLinePadding,l=[],s=null,h=t.map((function(i,a){var o=i.formatter?i.formatter(i,a,t,e):tt.toFixed(100*i._proportion_.toFixed(4))+"%";o=i.labelText?i.labelText:o;var r=2*Math.PI-(i._start_+2*Math.PI*i._proportion_/2);return i._rose_proportion_&&(r=2*Math.PI-(i._start_+2*Math.PI*i._rose_proportion_/2)),{arc:r,text:o,color:i.color,radius:i._radius_,textColor:i.textColor,textSize:i.textSize,labelShow:i.labelShow}}));for(let c=0;c=0?o+i.pieChartTextPadding:o-i.pieChartTextPadding,u=r,g=ct(t.text,t.textSize*e.pix||i.fontSize,a),f=u;s&&tt.isSameXCoordinateArea(s.start,{x:x})&&(f=x>0?Math.min(u,s.start.y):o<0||u>0?Math.max(u,s.start.y):Math.min(u,s.start.y)),x<0&&(x-=g),s=lt({lineStart:{x:d,y:p},lineEnd:{x:o,y:r},start:{x:x,y:f},width:g,height:i.fontSize,text:t.text,color:t.color,textColor:t.textColor,textSize:t.textSize},s),l.push(s)}for(let c=0;ci.width&&(u=!0),y+e.y>i.height&&(e.y=i.height-y),o.beginPath(),o.setFillStyle(et(l.bgColor,l.bgOpacity)),o.setLineWidth(l.borderWidth*i.pix),o.setStrokeStyle(et(l.borderColor,l.borderOpacity));var m=l.borderRadius;u?(f+x>i.width&&(e.x=i.width+Math.abs(i._scrollDistance_||0)+x+(f-i.width)),f>e.x&&(e.x=i.width+Math.abs(i._scrollDistance_||0)+x+(f-i.width)),l.showArrow&&(o.moveTo(e.x,e.y+10*i.pix),o.lineTo(e.x-x,e.y+10*i.pix+5*i.pix)),o.arc(e.x-x-m,e.y+y-m,m,0,Math.PI/2,!1),o.arc(e.x-x-Math.round(f)+m,e.y+y-m,m,Math.PI/2,Math.PI,!1),o.arc(e.x-x-Math.round(f)+m,e.y+m,m,-Math.PI,-Math.PI/2,!1),o.arc(e.x-x-m,e.y+m,m,-Math.PI/2,0,!1),l.showArrow&&(o.lineTo(e.x-x,e.y+10*i.pix-5*i.pix),o.lineTo(e.x,e.y+10*i.pix))):(l.showArrow&&(o.moveTo(e.x,e.y+10*i.pix),o.lineTo(e.x+x,e.y+10*i.pix-5*i.pix)),o.arc(e.x+x+m,e.y+m,m,-Math.PI,-Math.PI/2,!1),o.arc(e.x+x+Math.round(f)-m,e.y+m,m,-Math.PI/2,0,!1),o.arc(e.x+x+Math.round(f)-m,e.y+y-m,m,0,Math.PI/2,!1),o.arc(e.x+x+m,e.y+y-m,m,Math.PI/2,Math.PI,!1),l.showArrow&&(o.lineTo(e.x+x,e.y+10*i.pix+5*i.pix),o.lineTo(e.x,e.y+10*i.pix))),o.closePath(),o.fill(),l.borderWidth>0&&o.stroke(),l.legendShow&&t.forEach((function(t,a){if(null!==t.color){o.beginPath(),o.setFillStyle(t.color);var r=e.x+x+2*c,n=e.y+(h-s)/2+h*a+c+1;switch(u&&(r=e.x-f-x+2*c),t.legendShape){case"line":o.moveTo(r,n+.5*d-2*i.pix),o.fillRect(r,n+.5*d-2*i.pix,d,4*i.pix);break;case"triangle":o.moveTo(r+7.5*i.pix,n+.5*d-5*i.pix),o.lineTo(r+2.5*i.pix,n+.5*d+5*i.pix),o.lineTo(r+12.5*i.pix,n+.5*d+5*i.pix),o.lineTo(r+7.5*i.pix,n+.5*d-5*i.pix);break;case"diamond":o.moveTo(r+7.5*i.pix,n+.5*d-5*i.pix),o.lineTo(r+2.5*i.pix,n+.5*d),o.lineTo(r+7.5*i.pix,n+.5*d+5*i.pix),o.lineTo(r+12.5*i.pix,n+.5*d),o.lineTo(r+7.5*i.pix,n+.5*d-5*i.pix);break;case"circle":o.moveTo(r+7.5*i.pix,n+.5*d),o.arc(r+7.5*i.pix,n+.5*d,5*i.pix,0,2*Math.PI);break;case"rect":default:o.moveTo(r,n+.5*d-5*i.pix),o.fillRect(r,n+.5*d-5*i.pix,15*i.pix,10*i.pix);break;case"square":o.moveTo(r+2*i.pix,n+.5*d-5*i.pix),o.fillRect(r+2*i.pix,n+.5*d-5*i.pix,10*i.pix,10*i.pix)}o.closePath(),o.fill()}})),t.forEach((function(t,i){var a=e.x+x+2*c+d+p;u&&(a=e.x-f-x+2*c+d+p);var r=e.y+h*i+(h-s)/2-1+c+s;o.beginPath(),o.setFontSize(s),o.setTextBaseline("normal"),o.setFillStyle(l.fontColor),o.fillText(t.text,a,r),o.closePath(),o.stroke()}))}}function Jt(t,e,i,a){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=e.chartData.xAxisData,n=r.xAxisPoints,l=r.eachSpacing,s=$({},{type:"group",width:l/2,meterBorder:4,meterFillColor:"#FFFFFF",barBorderCircle:!1,barBorderRadius:[],seriesGap:2,linearType:"none",linearOpacity:1,customColor:[],colorStop:0,labelPosition:"outside"},e.extra.column),h=[];a.save();let c=-2,d=n.length+2;return e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(a.translate(e._scrollDistance_,0),c=Math.floor(-e._scrollDistance_/l)-2,d=c+e.xAxis.itemCount+4),e.tooltip&&e.tooltip.textList&&e.tooltip.textList.length&&1===o&&function(t,e,i,a,o){var r=$({},{activeBgColor:"#000000",activeBgOpacity:.08,activeWidth:o},e.extra.column);r.activeWidth=r.activeWidth>o?o:r.activeWidth;var n=e.area[0],l=e.height-e.area[2];a.beginPath(),a.setFillStyle(et(r.activeBgColor,r.activeBgOpacity)),a.rect(t-r.activeWidth/2,n,r.activeWidth,l-n),a.closePath(),a.fill(),a.setFillStyle("#FFFFFF")}(e.tooltip.offset.x,e,0,a,l),s.customColor=ht(s.linearType,s.customColor,t,i),t.forEach((function(r,p){let x,u,g;x=[].concat(e.chartData.yAxisData.ranges[r.index]),u=x.pop(),g=x.shift();let f=(e.height-e.area[0]-e.area[2])*(0-u)/(g-u),y=e.height-Math.round(f)-e.area[2];r.zeroPoints=y;var m=r.data;switch(s.type){case"group":var b=Mt(m,u,g,n,l,e,i,y,o),v=_t(m,u,g,n,l,e,i,p,t,o);h.push(v),b=Tt(b,l,t.length,p,0,e);for(let t=0;tc&&ty?y:i.y,o=i.width,r=Math.abs(y-i.y);s.barBorderCircle&&(s.barBorderRadius=[o/2,o/2,0,0]),i.y>y&&(s.barBorderRadius=[0,0,o/2,o/2]);let[n,l,h,c]=s.barBorderRadius,d=Math.min(o/2,r/2);n=n>d?d:n,l=l>d?d:l,h=h>d?d:h,c=c>d?d:c,n=n<0?0:n,l=l<0?0:l,h=h<0?0:h,c=c<0?0:c,a.arc(t+n,e+n,n,-Math.PI,-Math.PI/2),a.arc(t+o-l,e+l,l,-Math.PI/2,0),a.arc(t+o-h,e+r-h,h,0,Math.PI/2),a.arc(t+c,e+r-c,c,Math.PI/2,Math.PI)}else a.moveTo(A,i.y),a.lineTo(A+i.width,i.y),a.lineTo(A+i.width,y),a.lineTo(A,y),a.lineTo(A,i.y),a.setLineWidth(1),a.setStrokeStyle(T);a.setFillStyle(w),a.closePath(),a.fill()}}break;case"stack":b=_t(m,u,g,n,l,e,i,p,t,o);h.push(b),b=function(t,e,i,a,o,r){var n=r.extra.column.categoryGap*r.pix||0;return t.map((function(t,i){return null===t?null:(t.width=Math.ceil(e-2*n),r.extra.column&&r.extra.column.width&&+r.extra.column.width>0&&(t.width=Math.min(t.width,+r.extra.column.width*r.pix)),t.width<=0&&(t.width=1),t)}))}(b,l,t.length,0,0,e);for(let t=0;tc&&t0&&(S-=D),a.setFillStyle(w),a.moveTo(A,i.y),a.fillRect(A,i.y,i.width,S),a.closePath(),a.fill()}}break;case"meter":b=Pt(m,u,g,n,l,e,i,o);h.push(b),b=function(t,e,i,a,o,r,n){var l=r.extra.column.categoryGap*r.pix||0;return t.map((function(t){return null===t?null:(t.width=e-2*l,r.extra.column&&r.extra.column.width&&+r.extra.column.width>0&&(t.width=Math.min(t.width,+r.extra.column.width*r.pix)),a>0&&(t.width-=n),t)}))}(b,l,t.length,p,0,e,s.meterBorder);for(let t=0;tc&&t0&&(a.setStrokeStyle(r.color),a.setLineWidth(s.meterBorder*e.pix)),0==p?a.setFillStyle(s.meterFillColor):a.setFillStyle(i.color||r.color);A=i.x-i.width/2,S=e.height-i.y-e.area[2];if(s.barBorderRadius&&4===s.barBorderRadius.length||!0===s.barBorderCircle){const t=A,e=i.y,o=i.width,r=y-i.y;s.barBorderCircle&&(s.barBorderRadius=[o/2,o/2,0,0]);let[n,l,h,c]=s.barBorderRadius,d=Math.min(o/2,r/2);n=n>d?d:n,l=l>d?d:l,h=h>d?d:h,c=c>d?d:c,n=n<0?0:n,l=l<0?0:l,h=h<0?0:h,c=c<0?0:c,a.arc(t+n,e+n,n,-Math.PI,-Math.PI/2),a.arc(t+o-l,e+l,l,-Math.PI/2,0),a.arc(t+o-h,e+r-h,h,0,Math.PI/2),a.arc(t+c,e+r-c,c,Math.PI/2,Math.PI),a.fill()}else a.moveTo(A,i.y),a.lineTo(A+i.width,i.y),a.lineTo(A+i.width,y),a.lineTo(A,y),a.lineTo(A,i.y),a.fill();0==p&&s.meterBorder>0&&(a.closePath(),a.stroke())}}}})),!1!==e.dataLabel&&1===o&&t.forEach((function(r,h){let c,d,p;c=[].concat(e.chartData.yAxisData.ranges[r.index]),d=c.pop(),p=c.shift();var x=r.data;switch(s.type){case"group":Yt(Tt(Mt(x,d,p,n,l,e,i,o),l,t.length,h,0,e),r,i,a,e);break;case"stack":Yt(_t(x,d,p,n,l,e,i,h,t,o),r,i,a,e);break;case"meter":Yt(Pt(x,d,p,n,l,e,i,o),r,i,a,e)}})),a.restore(),{xAxisPoints:n,calPoints:h,eachSpacing:l}}function Ut(t,e,i,a){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=e.chartData.xAxisData,n=r.xAxisPoints,l=r.eachSpacing,s=$({},{type:"mount",widthRatio:1,borderWidth:1,barBorderCircle:!1,barBorderRadius:[],linearType:"none",linearOpacity:1,customColor:[],colorStop:0},e.extra.mount);s.widthRatio=s.widthRatio<=0?0:s.widthRatio,s.widthRatio=s.widthRatio>=2?2:s.widthRatio,a.save();let h,c,d,p=-2,x=n.length+2;e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(a.translate(e._scrollDistance_,0),p=Math.floor(-e._scrollDistance_/l)-2,x=p+e.xAxis.itemCount+4),s.customColor=ht(s.linearType,s.customColor,t,i),h=[].concat(e.chartData.yAxisData.ranges[0]),c=h.pop(),d=h.shift();let u=(e.height-e.area[0]-e.area[2])*(0-c)/(d-c),g=e.height-Math.round(u)-e.area[2];var f=Lt(t,c,d,n,l,e,s,g,o);switch(s.type){case"bar":for(let i=0;ip&&ig?g:o.y,i=o.width,r=Math.abs(g-o.y);s.barBorderCircle&&(s.barBorderRadius=[i/2,i/2,0,0]),o.y>g&&(s.barBorderRadius=[0,0,i/2,i/2]);let[n,l,h,c]=s.barBorderRadius,d=Math.min(i/2,r/2);n=n>d?d:n,l=l>d?d:l,h=h>d?d:h,c=c>d?d:c,n=n<0?0:n,l=l<0?0:l,h=h<0?0:h,c=c<0?0:c,a.arc(t+n,e+n,n,-Math.PI,-Math.PI/2),a.arc(t+i-l,e+l,l,-Math.PI/2,0),a.arc(t+i-h,e+r-h,h,0,Math.PI/2),a.arc(t+c,e+r-c,c,Math.PI/2,Math.PI)}else a.moveTo(y,o.y),a.lineTo(y+o.width,o.y),a.lineTo(y+o.width,g),a.lineTo(y,g),a.lineTo(y,o.y);a.setStrokeStyle(v),a.setFillStyle(b),s.borderWidth>0&&(a.setLineWidth(s.borderWidth*e.pix),a.closePath(),a.stroke()),a.fill()}}break;case"triangle":for(let i=0;ip&&i0&&(a.setLineWidth(s.borderWidth*e.pix),a.stroke()),a.fill()}}break;case"mount":for(let i=0;ip&&i0&&(a.setLineWidth(s.borderWidth*e.pix),a.stroke()),a.fill()}}break;case"sharp":for(let i=0;ip&&i0&&(a.setLineWidth(s.borderWidth*e.pix),a.stroke()),a.fill()}}}if(!1!==e.dataLabel&&1===o){let r,h,c;r=[].concat(e.chartData.yAxisData.ranges[0]),h=r.pop(),c=r.shift(),function(t,e,i,a,o,r){e.data;var n=e.textOffset?e.textOffset:0;o.extra.mount.labelPosition,t.forEach((function(t,l){if(null!==t){a.beginPath();var s=e[l].textSize?e[l].textSize*o.pix:i.fontSize;a.setFontSize(s),a.setFillStyle(e[l].textColor||o.fontColor);var h=t.value,c=e[l].formatter?e[l].formatter(h,l,e,o):h;a.setTextAlign("center");var d=t.y-4*o.pix+n*o.pix;t.y>r&&(d=t.y+n*o.pix+s),a.fillText(String(c),t.x,d),a.closePath(),a.stroke(),a.setTextAlign("left")}}))}(f=Lt(t,h,c,n,l,e,s,g,o),t,i,a,e,g)}return a.restore(),{xAxisPoints:n,calPoints:f,eachSpacing:l}}function qt(t,e,i,a){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=[],n=(e.height-e.area[0]-e.area[2])/e.categories.length;for(let c=0;c-2&&td?d:n,s=s>d?d:s,h=h>d?d:h,c=c>d?d:c,n=n<0?0:n,s=s<0?0:s,h=h<0?0:h,c=c<0?0:c,a.arc(t+c,o+c,c,-Math.PI,-Math.PI/2),a.arc(i.x-n,o+n,n,-Math.PI/2,0),a.arc(i.x-s,o+e-s,s,0,Math.PI/2),a.arc(t+h,o+e-h,h,Math.PI/2,Math.PI)}else a.moveTo(m,b),a.lineTo(i.x,b),a.lineTo(i.x,b+i.width),a.lineTo(m,b+i.width),a.lineTo(m,b),a.setLineWidth(1),a.setStrokeStyle(A);a.setFillStyle(v),a.closePath(),a.fill()}}break;case"stack":f=kt(g,x,u,r,n,e,i,d,t,o);s.push(f),f=function(t,e,i,a,o,r){var n=r.extra.bar.categoryGap*r.pix||0;return t.map((function(t,i){return null===t?null:(t.width=Math.ceil(e-2*n),r.extra.bar&&r.extra.bar.width&&+r.extra.bar.width>0&&(t.width=Math.min(t.width,+r.extra.bar.width*r.pix)),t.width<=0&&(t.width=1),t)}))}(f,n,t.length,0,0,e);for(let t=0;t-2&&t5&&void 0!==arguments[5]?arguments[5]:1,n=$({},{color:{},average:{}},i.extra.candle);n.color=$({},{upLine:"#f04864",upFill:"#f04864",downLine:"#2fc25b",downFill:"#2fc25b"},n.color),n.average=$({},{show:!1,name:[],day:[],color:a.color},n.average),i.extra.candle=n;let l=i.chartData.xAxisData,s=l.xAxisPoints,h=l.eachSpacing,c=[];o.save();let d=-2,p=s.length+2,x=0,u=i.width+h;return i._scrollDistance_&&0!==i._scrollDistance_&&!0===i.enableScroll&&(o.translate(i._scrollDistance_,0),d=Math.floor(-i._scrollDistance_/h)-2,p=d+i.xAxis.itemCount+4,x=-i._scrollDistance_-2*h+i.area[3],u=x+(i.xAxis.itemCount+4)*h),(n.average.show||e)&&e.forEach((function(t,e){let n,l,c;n=[].concat(i.chartData.yAxisData.ranges[t.index]),l=n.pop(),c=n.shift();var d=bt(Pt(t.data,l,c,s,h,i,a,r),t);for(let i=0;ix&&(o.moveTo(a.x,a.y),t=1),i>0&&a.x>x&&a.x7&&void 0!==arguments[7]?arguments[7]:1,s=[],h=r.height-r.area[0]-r.area[2];return t.forEach((function(t,n){if(null===t)s.push(null);else{var c=[];t.forEach((function(t,s){var d={};d.x=a[n]+Math.round(o/2);var p=t.value||t,x=h*(p-e)/(i-e);x*=l,d.y=r.height-Math.round(x)-r.area[2],c.push(d)})),s.push(c)}})),s}(g,x,u,s,h,i,a,r);c.push(f);var y=bt(f,t);for(let a=0;ad&&a0?(o.setStrokeStyle(n.color.upLine),o.setFillStyle(n.color.upFill),o.setLineWidth(1*i.pix),o.moveTo(t[3].x,t[3].y),o.lineTo(t[1].x,t[1].y),o.lineTo(t[1].x-h/4,t[1].y),o.lineTo(t[0].x-h/4,t[0].y),o.lineTo(t[0].x,t[0].y),o.lineTo(t[2].x,t[2].y),o.lineTo(t[0].x,t[0].y),o.lineTo(t[0].x+h/4,t[0].y),o.lineTo(t[1].x+h/4,t[1].y),o.lineTo(t[1].x,t[1].y),o.moveTo(t[3].x,t[3].y)):(o.setStrokeStyle(n.color.downLine),o.setFillStyle(n.color.downFill),o.setLineWidth(1*i.pix),o.moveTo(t[3].x,t[3].y),o.lineTo(t[0].x,t[0].y),o.lineTo(t[0].x-h/4,t[0].y),o.lineTo(t[1].x-h/4,t[1].y),o.lineTo(t[1].x,t[1].y),o.lineTo(t[2].x,t[2].y),o.lineTo(t[1].x,t[1].y),o.lineTo(t[1].x+h/4,t[1].y),o.lineTo(t[0].x+h/4,t[0].y),o.lineTo(t[0].x,t[0].y),o.moveTo(t[3].x,t[3].y)),o.closePath(),o.fill(),o.stroke()}})),o.restore(),{xAxisPoints:s,calPoints:c,eachSpacing:h}}function Qt(t,e,i,a,o,r){(t.extra.tooltip||{}).horizentalLine&&t.tooltip&&1===a&&("line"==t.type||"area"==t.type||"column"==t.type||"mount"==t.type||"candle"==t.type||"mix"==t.type)&&Xt(t,e,i),i.save(),t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&i.translate(t._scrollDistance_,0),t.tooltip&&t.tooltip.textList&&t.tooltip.textList.length&&1===a&&jt(t.tooltip.textList,t.tooltip.offset,t,e,i),i.restore()}function Kt(t,e,i,a){let o=e.chartData.xAxisData,r=o.xAxisPoints,n=o.startX,l=o.endX,s=o.eachSpacing;var h="center";"bar"!=e.type&&"line"!=e.type&&"area"!=e.type&&"scatter"!=e.type&&"bubble"!=e.type||(h=e.xAxis.boundaryGap);var c=e.height-e.area[2],d=e.area[0];if(e.enableScroll&&e.xAxis.scrollShow){var p=e.height-e.area[2]+i.xAxisHeight,x=l-n,u=s*(r.length-1);"mount"==e.type&&e.extra&&e.extra.mount&&e.extra.mount.widthRatio&&e.extra.mount.widthRatio>1&&(e.extra.mount.widthRatio>2&&(e.extra.mount.widthRatio=2),u+=(e.extra.mount.widthRatio-1)*s);var g=x*x/u,f=0;e._scrollDistance_&&(f=-e._scrollDistance_*x/u),a.beginPath(),a.setLineCap("round"),a.setLineWidth(6*e.pix),a.setStrokeStyle(e.xAxis.scrollBackgroundColor||"#EFEBEF"),a.moveTo(n,p),a.lineTo(l,p),a.stroke(),a.closePath(),a.beginPath(),a.setLineCap("round"),a.setLineWidth(6*e.pix),a.setStrokeStyle(e.xAxis.scrollColor||"#A6A6A6"),a.moveTo(n+f,p),a.lineTo(n+f+g,p),a.stroke(),a.closePath(),a.setLineCap("butt")}if(a.save(),e._scrollDistance_&&0!==e._scrollDistance_&&a.translate(e._scrollDistance_,0),!0===e.xAxis.calibration&&(a.setStrokeStyle(e.xAxis.gridColor||"#cccccc"),a.setLineCap("butt"),a.setLineWidth(1*e.pix),r.forEach((function(t,i){i>0&&(a.beginPath(),a.moveTo(t-s/2,c),a.lineTo(t-s/2,c+3*e.pix),a.closePath(),a.stroke())}))),!0!==e.xAxis.disableGrid&&(a.setStrokeStyle(e.xAxis.gridColor||"#cccccc"),a.setLineCap("butt"),a.setLineWidth(1*e.pix),"dash"==e.xAxis.gridType&&a.setLineDash([e.xAxis.dashLength*e.pix,e.xAxis.dashLength*e.pix]),e.xAxis.gridEval=e.xAxis.gridEval||1,r.forEach((function(t,i){i%e.xAxis.gridEval==0&&(a.beginPath(),a.moveTo(t,c),a.lineTo(t,d),a.stroke())})),a.setLineDash([])),!0!==e.xAxis.disabled){let o=t.length;e.xAxis.labelCount&&(o=e.xAxis.itemCount?Math.ceil(t.length/e.xAxis.itemCount*e.xAxis.labelCount):e.xAxis.labelCount,o-=1);let n=Math.ceil(t.length/o),l=[],d=t.length;for(let e=0;e=e.area[3]-1&&d-Math.abs(l)<=e.width-e.area[1]+1&&(a.beginPath(),a.setFontSize(y),a.setFillStyle(e.xAxis.fontColor||e.fontColor),a.fillText(String(o),r[i]+n,c+e.xAxis.marginTop*e.pix+(e.xAxis.lineHeight-e.xAxis.fontSize)*e.pix/2+e.xAxis.fontSize*e.pix),a.closePath(),a.stroke())})):l.forEach((function(t,o){var n=e.xAxis.formatter?e.xAxis.formatter(t):t,l=e._scrollDistance_||0,d="center"==h?r[o]+s/2:r[o];if(d-Math.abs(l)>=e.area[3]-1&&d-Math.abs(l)<=e.width-e.area[1]+1){a.save(),a.beginPath(),a.setFontSize(y),a.setFillStyle(e.xAxis.fontColor||e.fontColor);var p=ct(String(n),y,a),x=r[o];"center"==h&&(x=r[o]+s/2),e.xAxis.scrollShow&&e.pix;var u=c+e.xAxis.marginTop*e.pix+y-y*Math.abs(Math.sin(i._xAxisTextAngle_));e.xAxis.rotateAngle<0?(x-=y/2,p=0):(x+=y/2,p=-p),a.translate(x,u),a.rotate(-1*i._xAxisTextAngle_),a.fillText(String(n),p,0),a.closePath(),a.stroke(),a.restore()}}))}a.restore(),e.xAxis.title&&(a.beginPath(),a.setFontSize(e.xAxis.titleFontSize*e.pix),a.setFillStyle(e.xAxis.titleFontColor),a.fillText(String(e.xAxis.title),e.width-e.area[1]+e.xAxis.titleOffsetX*e.pix,e.height-e.area[2]+e.xAxis.marginTop*e.pix+(e.xAxis.lineHeight-e.xAxis.titleFontSize)*e.pix/2+(e.xAxis.titleFontSize+e.xAxis.titleOffsetY)*e.pix),a.closePath(),a.stroke()),e.xAxis.axisLine&&(a.beginPath(),a.setStrokeStyle(e.xAxis.axisLineColor),a.setLineWidth(1*e.pix),a.moveTo(n,e.height-e.area[2]),a.lineTo(l,e.height-e.area[2]),a.stroke())}function Zt(t,e,i,a){if(!0===e.yAxis.disableGrid)return;let o=(e.height-e.area[0]-e.area[2])/e.yAxis.splitNumber,r=e.area[3],n=e.chartData.xAxisData.xAxisPoints,l=e.chartData.xAxisData.eachSpacing,s=l*(n.length-1);"mount"==e.type&&e.extra&&e.extra.mount&&e.extra.mount.widthRatio&&e.extra.mount.widthRatio>1&&(e.extra.mount.widthRatio>2&&(e.extra.mount.widthRatio=2),s+=(e.extra.mount.widthRatio-1)*l);let h=r+s,c=[],d=1;!1===e.xAxis.axisLine&&(d=0);for(let p=d;p4&&void 0!==arguments[4]?arguments[4]:1,r=$({},{activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,ringWidth:30,customRadius:0,border:!1,borderWidth:2,borderColor:"#FFFFFF",centerColor:"#FFFFFF",linearType:"none",customColor:[]},"pie"==e.type?e.extra.pie:e.extra.ring),n={x:e.area[3]+(e.width-e.area[1]-e.area[3])/2,y:e.area[0]+(e.height-e.area[0]-e.area[2])/2};0==i.pieChartLinePadding&&(i.pieChartLinePadding=r.activeRadius*e.pix);var l=Math.min((e.width-e.area[1]-e.area[3])/2-i.pieChartLinePadding-i.pieChartTextPadding-i._pieTextMaxLength_,(e.height-e.area[0]-e.area[2])/2-i.pieChartLinePadding-i.pieChartTextPadding);l=l<10?10:l,r.customRadius>0&&(l=r.customRadius*e.pix),t=St(t,l,o);var s=r.activeRadius*e.pix;if(r.customColor=ht(r.linearType,r.customColor,t,i),(t=t.map((function(t){return t._start_+=r.offsetAngle*Math.PI/180,t}))).forEach((function(t,i){e.tooltip&&e.tooltip.index==i&&(a.beginPath(),a.setFillStyle(et(t.color,r.activeOpacity||.5)),a.moveTo(n.x,n.y),a.arc(n.x,n.y,t._radius_+s,t._start_,t._start_+2*t._proportion_*Math.PI),a.closePath(),a.fill()),a.beginPath(),a.setLineWidth(r.borderWidth*e.pix),a.lineJoin="round",a.setStrokeStyle(r.borderColor);var o,l=t.color;"custom"==r.linearType&&((o=a.createCircularGradient?a.createCircularGradient(n.x,n.y,t._radius_):a.createRadialGradient(n.x,n.y,0,n.x,n.y,t._radius_)).addColorStop(0,et(r.customColor[t.linearIndex],1)),o.addColorStop(1,et(t.color,1)),l=o);a.setFillStyle(l),a.moveTo(n.x,n.y),a.arc(n.x,n.y,t._radius_,t._start_,t._start_+2*t._proportion_*Math.PI),a.closePath(),a.fill(),1==r.border&&a.stroke()})),"ring"===e.type){var h=.6*l;"number"==typeof r.ringWidth&&r.ringWidth>0&&(h=Math.max(0,l-r.ringWidth*e.pix)),a.beginPath(),a.setFillStyle(r.centerColor),a.moveTo(n.x,n.y),a.arc(n.x,n.y,h,0,2*Math.PI),a.closePath(),a.fill()}return!1!==e.dataLabel&&1===o&&Nt(t,e,i,a,0,n),1===o&&"ring"===e.type&&Rt(e,i,a,n),{center:n,radius:l,series:t}}function ie(t,e,i,a,o){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,n=$({},{type:"default",startAngle:.75,endAngle:.25,width:15,labelOffset:13,splitLine:{fixRadius:0,splitNumber:10,width:15,color:"#FFFFFF",childNumber:5,childWidth:5},pointer:{width:15,color:"auto"}},i.extra.gauge);null==n.oldAngle&&(n.oldAngle=n.startAngle),null==n.oldData&&(n.oldData=0),t=function(t,e,i){let a;a=i=2&&(t[r]._endAngle_=t[r]._endAngle_%2),o=t[r]._endAngle_;return t}(t,n.startAngle,n.endAngle);var l={x:i.width/2,y:i.height/2},s=Math.min(l.x,l.y);s-=5*i.pix;var h=(s=(s-=n.width/2)<10?10:s)-n.width,c=0;if("progress"==n.type){var d=s-3*n.width;o.beginPath();let t=o.createLinearGradient(l.x,l.y-d,l.x,l.y+d);t.addColorStop("0",et(e[0].color,.3)),t.addColorStop("1.0",et("#FFFFFF",.1)),o.setFillStyle(t),o.arc(l.x,l.y,d,0,2*Math.PI,!1),o.fill(),o.setLineWidth(n.width),o.setStrokeStyle(et(e[0].color,.3)),o.setLineCap("round"),o.beginPath(),o.arc(l.x,l.y,h,n.startAngle*Math.PI,n.endAngle*Math.PI,!1),o.stroke(),c=n.endAngler/u?o.setStrokeStyle(et(e[0].color,1)):o.setStrokeStyle(et(e[0].color,.3)),o.setLineWidth(3*i.pix),o.moveTo(p,0),o.lineTo(x,0),o.stroke(),o.rotate(a*Math.PI);o.restore(),e=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;1==i&&(i=.999999);for(let a=0;a=2&&(r._proportion_=r._proportion_%2)}return t}(e,n,r),o.setLineWidth(n.width),o.setStrokeStyle(e[0].color),o.setLineCap("round"),o.beginPath(),o.arc(l.x,l.y,h,n.startAngle*Math.PI,e[0]._proportion_*Math.PI,!1),o.stroke();let f=s-2.5*n.width;o.save(),o.translate(l.x,l.y),o.rotate((e[0]._proportion_-1)*Math.PI),o.beginPath(),o.setLineWidth(n.width/3);let y=o.createLinearGradient(0,.6*-f,0,.6*f);y.addColorStop("0",et("#FFFFFF",0)),y.addColorStop("0.5",et(e[0].color,1)),y.addColorStop("1.0",et("#FFFFFF",0)),o.setStrokeStyle(y),o.arc(0,0,f,.85*Math.PI,1.15*Math.PI,!1),o.stroke(),o.beginPath(),o.setLineWidth(1),o.setStrokeStyle(e[0].color),o.setFillStyle(e[0].color),o.moveTo(-f-n.width/3/2,-4),o.lineTo(-f-n.width/3/2-4,0),o.lineTo(-f-n.width/3/2,4),o.lineTo(-f-n.width/3/2,-4),o.stroke(),o.fill(),o.restore()}else{o.setLineWidth(n.width),o.setLineCap("butt");for(let e=0;e3&&void 0!==arguments[3]?arguments[3]:1;for(let o=0;o=i.oldData?n._proportion_=(n._endAngle_-n._oldAngle_)*a+i.oldAngle:n._proportion_=n._oldAngle_-(n._oldAngle_-n._endAngle_)*a,n._proportion_>=2&&(n._proportion_=n._proportion_%2)}return t}(e,t,n,r);for(let t=0;t=2&&(h%=2),c+=s}}(n,s,l,i,a,o)}return Rt(i,a,o,l),1===r&&"gauge"===i.type&&(i.extra.gauge.oldAngle=e[0]._proportion_,i.extra.gauge.oldData=e[0].data),{center:l,radius:s,innerRadius:h,categories:t,totalAngle:c}}function ae(t,e,i,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=$({},{gridColor:"#cccccc",gridType:"radar",gridEval:1,axisLabel:!1,axisLabelTofix:0,labelShow:!0,labelColor:"#666666",labelPointShow:!1,labelPointRadius:3,labelPointColor:"#cccccc",opacity:.2,gridCount:3,border:!1,borderWidth:2,linearType:"none",customColor:[]},e.extra.radar),n=function(t){for(var e=2*Math.PI/t,i=[],a=0;a5&&void 0!==arguments[5]?arguments[5]:1,n=o.extra.radar||{};n.max=n.max||0;var l=Math.max(n.max,Math.max.apply(null,dt(a))),s=[];for(let h=0;ht[1]&&i[1]>t[1])return!1;if(e[1]t[1])return!1;if(i[1]==t[1]&&e[1]>t[1])return!1;if(e[0]e[r].area[2]||t[1]>e[r].area[3]||t[2]i||t[3]>a){o=!0;break}o=!1}return o}function ce(t,e,i,a){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=$({},{type:"normal",autoColors:!0},e.extra.word);e.chartData.wordCloudData||(e.chartData.wordCloudData=function(t,e,i){let a=t.series;switch(e){case"normal":for(let o=0;o.7};for(let o=0;o0&&(e.tooltip&&e.tooltip.index==l?a.strokeText(t,(n[l].areav[0]+5-e.width/2)*o-r*(1-o)/2,(n[l].areav[1]+5+i-e.height/2)*o):a.fillText(t,(n[l].areav[0]+5-e.width/2)*o-r*(1-o)/2,(n[l].areav[1]+5+i-e.height/2)*o)):n[l].area[0]>0&&(e.tooltip&&e.tooltip.index==l?a.strokeText(t,(n[l].area[0]+5-e.width/2)*o-r*(1-o)/2,(n[l].area[1]+5+i-e.height/2)*o):a.fillText(t,(n[l].area[0]+5-e.width/2)*o-r*(1-o)/2,(n[l].area[1]+5+i-e.height/2)*o)),a.stroke(),a.restore()}a.restore()}function de(t,e,i,a){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=$({},{type:"funnel",activeWidth:10,activeOpacity:.3,border:!1,borderWidth:2,borderColor:"#FFFFFF",fillOpacity:1,minSize:0,labelAlign:"right",linearType:"none",customColor:[]},e.extra.funnel),n=(e.height-e.area[0]-e.area[2])/t.length,l={x:e.area[3]+(e.width-e.area[1]-e.area[3])/2,y:e.height-e.area[2]},s=r.activeWidth*e.pix,h=Math.min((e.width-e.area[1]-e.area[3])/2-s,(e.height-e.area[0]-e.area[2])/2-s),c=function(t,e,i,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;for(let r=0;r0&&t[0].data.constructor.toString().indexOf("Array")>-1){e._pieSeries_=t;let o=t[0].data;for(var a=0;ae.width-e.area[1]-e.area[3]?(i.push(x),p.push(a-e.legend.itemGap*e.pix),a=l,x=[n]):(a+=l,x.push(n))}if(x.length){i.push(x),p.push(a-e.legend.itemGap*e.pix),r.widthArr=p;let t=Math.max.apply(null,p);switch(e.legend.float){case"left":r.area.start.x=e.area[3],r.area.end.x=e.area[3]+t+2*n;break;case"right":r.area.start.x=e.width-e.area[1]-t-2*n,r.area.end.x=e.width-e.area[1];break;default:r.area.start.x=(e.width-t)/2-n,r.area.end.x=(e.width+t)/2+n}r.area.width=t+2*n,r.area.wholeWidth=t+2*n,r.area.height=i.length*d+2*n,r.area.wholeHeight=i.length*d+2*n+2*l,r.points=i}}else{let i=t.length,a=e.height-e.area[0]-e.area[2]-2*l-2*n,p=Math.min(Math.floor(a/d),i);switch(r.area.height=p*d+2*n,r.area.wholeHeight=p*d+2*n,e.legend.float){case"top":r.area.start.y=e.area[0]+l,r.area.end.y=e.area[0]+l+r.area.height;break;case"bottom":r.area.start.y=e.height-e.area[2]-l-r.area.height,r.area.end.y=e.height-e.area[2]-l;break;default:r.area.start.y=(e.height-r.area.height)/2,r.area.end.y=(e.height+r.area.height)/2}let x=i%p==0?i/p:Math.floor(i/p+1),u=[];for(let e=0;ea&&(a=r)}r.widthArr.push(a),r.heightArr.push(t.length*d+2*n)}let t=0;for(let e=0;e0?x[i].width+e.yAxis.padding*e.pix:x[i].width,o+=1):"right"==x[i].position&&(e.area[1]+=t>0?x[i].width+e.yAxis.padding*e.pix:x[i].width,t+=1)}else i.yAxisWidth=x;if(e.chartData.yAxisData=p,e.categories&&e.categories.length&&"radar"!==e.type&&"gauge"!==e.type&&"bar"!==e.type){e.chartData.xAxisData=Dt(e.categories,e);let t=vt(e.categories,e,0,e.chartData.xAxisData.eachSpacing,a),o=t.xAxisHeight,r=t.angle;i.xAxisHeight=o,i._xAxisTextAngle_=r,e.area[2]+=o,e.chartData.categoriesData=t}else if("line"===e.type||"area"===e.type||"scatter"===e.type||"bubble"===e.type||"bar"===e.type){e.chartData.xAxisData=At(r,e,i,a);let t=vt(n=e.chartData.xAxisData.rangesFormat,e,0,e.chartData.xAxisData.eachSpacing,a),o=t.xAxisHeight,l=t.angle;i.xAxisHeight=o,i._xAxisTextAngle_=l,e.area[2]+=o,e.chartData.categoriesData=t}else e.chartData.xAxisData={xAxisPoints:[]};if(e.enableScroll&&"right"==e.xAxis.scrollAlign&&void 0===e._scrollDistance_){let t=0,i=e.chartData.xAxisData.xAxisPoints,a=e.chartData.xAxisData.startX;t=e.chartData.xAxisData.endX-a-e.chartData.xAxisData.eachSpacing*(i.length-1),o.scrollOption.currentOffset=t,o.scrollOption.startTouchX=t,o.scrollOption.distance=0,o.scrollOption.lastMoveTime=0,e._scrollDistance_=t}switch("pie"!==t&&"ring"!==t&&"rose"!==t||(i._pieTextMaxLength_=!1===e.dataLabel?0:function(t,e,i,a){t=St(t);let o=0;for(let r=0;rl.x?i.xMax:l.x,i.yMin=i.yMinl.y?i.yMax:l.y}}return i}(l);if(n.mercator){var h=oe(s.xMax,s.yMax),c=oe(s.xMin,s.yMin);s.xMax=h[0],s.yMax=h[1],s.xMin=c[0],s.yMin=c[1]}for(var d=e.width/Math.abs(s.xMax-s.xMin),p=e.height/Math.abs(s.yMax-s.yMin),x=d{this.uevent.trigger("renderComplete")}),50);break;case"funnel":this.animationInstance=new ue({timing:e.timing,duration:l,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&zt(a,e),e.chartData.funnelData=de(r,e,i,a,t),te(e.series,e,i,a,e.chartData),Qt(e,i,a,t),pe(0,a)},onAnimationFinish:function(){o.uevent.trigger("renderComplete")}});break;case"line":this.animationInstance=new ue({timing:e.timing,duration:l,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&zt(a,e),Zt(0,e,0,a),Kt(n,e,i,a);var o=function(t,e,i,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=$({},{type:"straight",width:2,activeType:"none",linearType:"none",onShadow:!1,animation:"vertical"},e.extra.line);r.width*=e.pix;let n=e.chartData.xAxisData,l=n.xAxisPoints,s=n.eachSpacing;var h=[];a.save();let c=0,d=e.width+s;return e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(a.translate(e._scrollDistance_,0),c=-e._scrollDistance_-2*s+e.area[3],d=c+(e.xAxis.itemCount+4)*s),t.forEach((function(t,n){let p,x,u;a.beginPath(),a.setStrokeStyle(t.color),a.moveTo(-1e4,-1e4),a.lineTo(-10001,-10001),a.stroke(),p=[].concat(e.chartData.yAxisData.ranges[t.index]),x=p.pop(),u=p.shift();var g=function(t,e,i,a,o,r,n,l,s){s=arguments.length>8&&void 0!==arguments[8]?arguments[8]:1;var h=r.xAxis.boundaryGap,c=[],d=r.height-r.area[0]-r.area[2],p=r.width-r.area[1]-r.area[3];return t.forEach((function(t,n){if(null===t)c.push(null);else{var x={};if(x.color=t.color,"vertical"==l.animation){x.x=a[n];var u=t;if("object"==typeof t&&null!==t)if(t.constructor.toString().indexOf("Array")>-1){let e,i,a;e=[].concat(r.chartData.xAxisData.ranges),i=e.shift(),a=e.pop(),u=t[1],x.x=r.area[3]+p*(t[0]-i)/(a-i)}else u=t.value;"center"==h&&(x.x+=o/2);var g=d*(u-e)/(i-e);g*=s,x.y=r.height-g-r.area[2],c.push(x)}else x.x=a[0]+o*n*s,u=t,"center"==h&&(x.x+=o/2),g=d*(u-e)/(i-e),x.y=r.height-g-r.area[2],c.push(x)}})),c}(t.data,x,u,l,s,e,i,r,o);h.push(g);var f=bt(g,t);if("dash"==t.lineType){let i=t.dashLength?t.dashLength:8;i*=e.pix,a.setLineDash([i,i])}a.beginPath();var y=t.color;if("none"!==r.linearType&&t.linearColor&&t.linearColor.length>0){for(var m=a.createLinearGradient(e.chartData.xAxisData.startX,e.height/2,e.chartData.xAxisData.endX,e.height/2),b=0;b0?a.setShadow(t.setShadow[0],t.setShadow[1],t.setShadow[2],t.setShadow[3]):a.setShadow(0,0,0,"rgba(0,0,0,0)"),a.setLineWidth(r.width),f.forEach((function(t,e){if(1===t.length)a.moveTo(t[0].x,t[0].y);else{a.moveTo(t[0].x,t[0].y);let e=0;if("curve"===r.type)for(let o=0;oc&&(a.moveTo(r.x,r.y),e=1),o>0&&r.x>c&&r.xc&&(a.moveTo(o.x,o.y),e=1),i>0&&o.x>c&&o.xc&&(a.moveTo(o.x,o.y),e=1),i>0&&o.x>c&&o.x4&&void 0!==arguments[4]?arguments[4]:1;$({},{type:"circle"},e.extra.scatter);let r=e.chartData.xAxisData,n=r.xAxisPoints,l=r.eachSpacing;a.save();let s=0;return e.width,e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(a.translate(e._scrollDistance_,0),s=-e._scrollDistance_-2*l+e.area[3],e.xAxis.itemCount),t.forEach((function(t,r){let s,h,c;s=[].concat(e.chartData.yAxisData.ranges[t.index]),h=s.pop(),c=s.shift();var d=Pt(t.data,h,c,n,l,e,i,o);a.beginPath(),a.setStrokeStyle(t.color),a.setFillStyle(t.color),a.setLineWidth(1*e.pix);var p=t.pointShape;if("diamond"===p)d.forEach((function(t,e){null!==t&&(a.moveTo(t.x,t.y-4.5),a.lineTo(t.x-4.5,t.y),a.lineTo(t.x,t.y+4.5),a.lineTo(t.x+4.5,t.y),a.lineTo(t.x,t.y-4.5))}));else if("circle"===p)d.forEach((function(t,i){null!==t&&(a.moveTo(t.x+2.5*e.pix,t.y),a.arc(t.x,t.y,3*e.pix,0,2*Math.PI,!1))}));else if("square"===p)d.forEach((function(t,e){null!==t&&(a.moveTo(t.x-3.5,t.y-3.5),a.rect(t.x-3.5,t.y-3.5,7,7))}));else if("triangle"===p)d.forEach((function(t,e){null!==t&&(a.moveTo(t.x,t.y-4.5),a.lineTo(t.x-4.5,t.y+4.5),a.lineTo(t.x+4.5,t.y+4.5),a.lineTo(t.x,t.y-4.5))}));else if("triangle"===p)return;a.closePath(),a.fill(),a.stroke()})),!1!==e.dataLabel&&1===o&&t.forEach((function(t,r){let s,h,c;s=[].concat(e.chartData.yAxisData.ranges[t.index]),h=s.pop(),c=s.shift(),Wt(Pt(t.data,h,c,n,l,e,i,o),t,i,a,e)})),a.restore(),{xAxisPoints:n,calPoints:[],eachSpacing:l}}(r,e,i,a,t),l=o.xAxisPoints,s=o.calPoints,h=o.eachSpacing;e.chartData.xAxisPoints=l,e.chartData.calPoints=s,e.chartData.eachSpacing=h,$t(0,e,i,a),!1!==e.enableMarkLine&&1===t&&Ht(e,0,a),te(e.series,e,i,a,e.chartData),Qt(e,i,a,t),pe(0,a)},onAnimationFinish:function(){o.uevent.trigger("renderComplete")}});break;case"bubble":this.animationInstance=new ue({timing:e.timing,duration:l,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&zt(a,e),Zt(0,e,0,a),Kt(n,e,i,a);var o=function(t,e,i,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=$({},{opacity:1,border:2},e.extra.bubble);let n=e.chartData.xAxisData,l=n.xAxisPoints,s=n.eachSpacing;a.save();let h=0;return e.width,e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(a.translate(e._scrollDistance_,0),h=-e._scrollDistance_-2*s+e.area[3],e.xAxis.itemCount),t.forEach((function(t,n){let h,c,d;h=[].concat(e.chartData.yAxisData.ranges[t.index]),c=h.pop(),d=h.shift();var p=Pt(t.data,c,d,l,s,e,i,o);a.beginPath(),a.setStrokeStyle(t.color),a.setLineWidth(r.border*e.pix),a.setFillStyle(et(t.color,r.opacity)),p.forEach((function(t,i){a.moveTo(t.x+t.r,t.y),a.arc(t.x,t.y,t.r*e.pix,0,2*Math.PI,!1)})),a.closePath(),a.fill(),a.stroke(),!1!==e.dataLabel&&1===o&&p.forEach((function(o,r){a.beginPath();var n=t.textSize*e.pix||i.fontSize;a.setFontSize(n),a.setFillStyle(t.textColor||"#FFFFFF"),a.setTextAlign("center"),a.fillText(String(o.t),o.x,o.y+n/2),a.closePath(),a.stroke(),a.setTextAlign("left")}))})),a.restore(),{xAxisPoints:l,calPoints:[],eachSpacing:s}}(r,e,i,a,t),l=o.xAxisPoints,s=o.calPoints,h=o.eachSpacing;e.chartData.xAxisPoints=l,e.chartData.calPoints=s,e.chartData.eachSpacing=h,$t(0,e,i,a),!1!==e.enableMarkLine&&1===t&&Ht(e,0,a),te(e.series,e,i,a,e.chartData),Qt(e,i,a,t),pe(0,a)},onAnimationFinish:function(){o.uevent.trigger("renderComplete")}});break;case"mix":this.animationInstance=new ue({timing:e.timing,duration:l,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&zt(a,e),Zt(0,e,0,a),Kt(n,e,i,a);var o=function(t,e,i,a){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=e.chartData.xAxisData,n=r.xAxisPoints,l=r.eachSpacing,s=$({},{width:l/2,barBorderCircle:!1,barBorderRadius:[],seriesGap:2,linearType:"none",linearOpacity:1,customColor:[],colorStop:0},e.extra.mix.column),h=$({},{opacity:.2,gradient:!1},e.extra.mix.area),c=$({},{width:2},e.extra.mix.line),d=e.height-e.area[2],p=[];var x=0,u=0;t.forEach((function(t,e){"column"==t.type&&(u+=1)})),a.save();let g=-2,f=n.length+2,y=0,m=e.width+l;e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(a.translate(e._scrollDistance_,0),g=Math.floor(-e._scrollDistance_/l)-2,f=g+e.xAxis.itemCount+4,y=-e._scrollDistance_-2*l+e.area[3],m=y+(e.xAxis.itemCount+4)*l),s.customColor=ht(s.linearType,s.customColor,t,i),t.forEach((function(t,r){let b,v,A;b=[].concat(e.chartData.yAxisData.ranges[t.index]),v=b.pop(),A=b.shift();var S=Pt(t.data,v,A,n,l,e,i,o);if(p.push(S),"column"==t.type){S=Tt(S,l,u,x,0,e);for(let i=0;ig&&ip?p:l,h=h>p?p:h,c=c>p?p:c,d=d>p?p:d,l=l<0?0:l,h=h<0?0:h,c=c<0?0:c,d=d<0?0:d,a.arc(t+l,i+l,l,-Math.PI,-Math.PI/2),a.arc(t+r-h,i+h,h,-Math.PI/2,0),a.arc(t+r-c,i+n-c,c,0,Math.PI/2),a.arc(t+d,i+n-d,d,Math.PI/2,Math.PI)}else a.moveTo(w,o.y),a.lineTo(w+o.width,o.y),a.lineTo(w+o.width,e.height-e.area[2]),a.lineTo(w,e.height-e.area[2]),a.lineTo(w,o.y),a.setLineWidth(1),a.setStrokeStyle(C);a.setFillStyle(T),a.closePath(),a.fill()}}x+=1}if("area"==t.type){let i=bt(S,t);for(let o=0;o1){var P=r[0];let e=r[r.length-1];a.moveTo(P.x,P.y);let i=0;if("curve"===t.style)for(let t=0;ty&&(a.moveTo(e.x,e.y),i=1),t>0&&e.x>y&&e.xy&&(a.moveTo(e.x,e.y),i=1),t>0&&e.x>y&&e.xy&&(a.moveTo(o.x,o.y),e=1),t>0&&o.x>y&&o.xy&&(a.moveTo(o.x,o.y),e=1),t>0&&o.x>y&&o.x4&&void 0!==arguments[4]?arguments[4]:1,r=$({},{type:"straight",opacity:.2,addLine:!1,width:2,gradient:!1,activeType:"none"},e.extra.area);let n=e.chartData.xAxisData,l=n.xAxisPoints,s=n.eachSpacing,h=e.height-e.area[2],c=[];a.save();let d=0,p=e.width+s;return e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(a.translate(e._scrollDistance_,0),d=-e._scrollDistance_-2*s+e.area[3],p=d+(e.xAxis.itemCount+4)*s),t.forEach((function(t,n){let x,u,g;x=[].concat(e.chartData.yAxisData.ranges[t.index]),u=x.pop(),g=x.shift();let f=Pt(t.data,u,g,l,s,e,i,o);c.push(f);let y=bt(f,t);for(let i=0;i1){let t=o[0],e=o[o.length-1];a.moveTo(t.x,t.y);let i=0;if("curve"===r.type)for(let r=0;rd&&(a.moveTo(t.x,t.y),i=1),r>0&&t.x>d&&t.xd&&(a.moveTo(t.x,t.y),i=1),r>0&&t.x>d&&t.xd&&(a.moveTo(t.x,t.y),i=1),r>0&&t.x>d&&t.xd&&(a.moveTo(i.x,i.y),t=1),e>0&&i.x>d&&i.xd&&(a.moveTo(i.x,i.y),t=1),e>0&&i.x>d&&i.xd&&(a.moveTo(i.x,i.y),t=1),e>0&&i.x>d&&i.x4&&void 0!==arguments[4]?arguments[4]:1,r=$({},{type:"area",activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,border:!1,borderWidth:2,borderColor:"#FFFFFF",linearType:"none",customColor:[]},e.extra.rose);0==i.pieChartLinePadding&&(i.pieChartLinePadding=r.activeRadius*e.pix);var n={x:e.area[3]+(e.width-e.area[1]-e.area[3])/2,y:e.area[0]+(e.height-e.area[0]-e.area[2])/2},l=Math.min((e.width-e.area[1]-e.area[3])/2-i.pieChartLinePadding-i.pieChartTextPadding-i._pieTextMaxLength_,(e.height-e.area[0]-e.area[2])/2-i.pieChartLinePadding-i.pieChartTextPadding);l=l<10?10:l;var s=r.minRadius||.5*l;l4&&void 0!==arguments[4]?arguments[4]:1,l=$({},{startAngle:.75,endAngle:.25,type:"default",direction:"cw",lineCap:"round",width:12,gap:2,linearType:"none",customColor:[]},e.extra.arcbar);t=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;1==i&&(i=.999999);for(let a=0;a=2&&(r._proportion_=r._proportion_%2)}return t}(t,l,n),o=l.centerX||l.centerY?{x:l.centerX?l.centerX:e.width/2,y:l.centerY?l.centerY:e.height/2}:{x:e.width/2,y:e.height/2},l.radius?r=l.radius:(r=Math.min(o.x,o.y),r-=5*e.pix,r-=l.width/2),r=r<10?10:r,l.customColor=ht(l.linearType,l.customColor,t,i);for(let c=0;c0&&void 0!==arguments[0]?arguments[0]:{};switch(this.opts=$({},this.opts,t),this.opts.updateData=!0,t.scrollPosition||"current"){case"current":this.opts._scrollDistance_=this.scrollOption.currentOffset;break;case"left":this.opts._scrollDistance_=0,this.scrollOption={currentOffset:0,startTouchX:0,distance:0,lastMoveTime:0};break;case"right":let t=Ot(this.opts.series,this.opts,this.config,this.context).yAxisWidth;this.config.yAxisWidth=t;let e=0,i=Dt(this.opts.categories,this.opts,this.config),a=i.xAxisPoints,o=i.startX;e=i.endX-o-i.eachSpacing*(a.length-1),this.scrollOption={currentOffset:e,startTouchX:e,distance:0,lastMoveTime:0},this.opts._scrollDistance_=e}ge.call(this,this.opts.type,this.opts,this.config,this.context)},ye.prototype.zoom=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.opts.xAxis.itemCount;if(!0!==this.opts.enableScroll)return;let e=Math.round(Math.abs(this.scrollOption.currentOffset)/this.opts.chartData.eachSpacing)+Math.round(this.opts.xAxis.itemCount/2);this.opts.animation=!1,this.opts.xAxis.itemCount=t.itemCount;let i=Ot(this.opts.series,this.opts,this.config,this.context).yAxisWidth;this.config.yAxisWidth=i;let a=0,o=Dt(this.opts.categories,this.opts,this.config),r=o.xAxisPoints,n=o.startX,l=o.endX,s=o.eachSpacing,h=s*e,c=l-n,d=c-s*(r.length-1);a=c/2-h,a>0&&(a=0),a=this.opts.categories.length?this.opts.categories.length:n,this.opts.animation=!1,this.opts.xAxis.itemCount=n;let l=0,s=Dt(this.opts.categories,this.opts,this.config),h=s.xAxisPoints,c=s.startX,d=s.endX,p=s.eachSpacing,x=p*this.scrollOption.moveCurrent1,u=d-c-p*(h.length-1);l=-x+Math.min(a[0].x,a[1].x)-this.opts.area[3]-p,l>0&&(l=0),l2*Math.PI&&(t-=2*Math.PI),t},n=Math.atan2(e.center.y-t.y,t.x-e.center.x);(n*=-1)<0&&(n+=2*Math.PI),e.angleList.map((function(t){return r(-1*t)})).forEach((function(t,e){var i=r(t-a/2),l=r(t+a/2);l=i&&n<=l||n+2*Math.PI>=i&&n+2*Math.PI<=l)&&(o=e)}))}return o}({x:i.x,y:i.y},this.opts.chartData.radarData,this.opts.categories.length):"funnel"===this.opts.type?function(t,e){for(var i=-1,a=0,o=e.series.length;ar.funnelArea[0]&&t.xr.funnelArea[1]&&t.yr.area[0]&&t.xr.area[1]&&t.y4&&void 0!==arguments[4]?arguments[4]:0,r={index:-1,group:[]},n=i.chartData.eachSpacing/2;let l=i.chartData.yAxisPoints;return e&&e.length>0&&yt(t,i)&&l.forEach((function(e,i){t.y+o+n>e&&(r.index=i)})),r}({x:i.x,y:i.y},this.opts.chartData.calPoints,this.opts,this.config,Math.abs(this.scrollOption.currentOffset)):function(t,e,i,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r={index:-1,group:[]},n=i.chartData.eachSpacing/2;let l=[];if(e&&e.length>0){if(i.categories){for(let t=1;te&&(r.index=i)}));else{let i=Array(e.length);for(let r=0;re.start.x&&t.xe.start.y&&t.ya[0]-0&&t.xa[1]-0&&t.y1&&void 0!==arguments[1]?arguments[1]:{},i=null;if(i=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0]){xt(i,this.opts,t);var a=this.getLegendDataIndex(t);a>=0&&("candle"==this.opts.type?this.opts.seriesMA[a].show=!this.opts.seriesMA[a].show:this.opts.series[a].show=!this.opts.series[a].show,this.opts.animation=!!e.animation,this.opts._scrollDistance_=this.scrollOption.currentOffset,ge.call(this,this.opts.type,this.opts,this.config,this.context))}},ye.prototype.showToolTip=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=xt(t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],this.opts,t),a=this.scrollOption.currentOffset,o=$({},this.opts,{_scrollDistance_:a,animation:!1});if("line"===this.opts.type||"area"===this.opts.type||"column"===this.opts.type||"scatter"===this.opts.type||"bubble"===this.opts.type){var r=this.getCurrentDataIndex(t);if((d=null==e.index?r.index:e.index)>-1||d.length>0)if(0!==(l=ut(this.opts.series,d,r.group)).length){var n=(c=gt(l,this.opts,d,r.group,this.opts.categories,e)).textList;(s=c.offset).y=i.y,o.tooltip={textList:void 0!==e.textList?e.textList:n,offset:void 0!==e.offset?e.offset:s,option:e,index:d,group:r.group}}ge.call(this,o.type,o,this.config,this.context)}if("mount"===this.opts.type){if((d=null==e.index?this.getCurrentDataIndex(t).index:e.index)>-1){o=$({},this.opts,{animation:!1});var l=$({},o._series_[d]),s=(n=[{text:e.formatter?e.formatter(l,void 0,d,o):l.name+": "+l.data,color:l.color,legendShape:"auto"==this.opts.extra.tooltip.legendShape?l.legendShape:this.opts.extra.tooltip.legendShape}],{x:o.chartData.calPoints[d].x,y:i.y});o.tooltip={textList:e.textList?e.textList:n,offset:void 0!==e.offset?e.offset:s,option:e,index:d}}ge.call(this,o.type,o,this.config,this.context)}if("bar"===this.opts.type){r=this.getCurrentDataIndex(t);if((d=null==e.index?r.index:e.index)>-1||d.length>0)if(0!==(l=ut(this.opts.series,d,r.group)).length){n=(c=gt(l,this.opts,d,r.group,this.opts.categories,e)).textList;(s=c.offset).x=i.x,o.tooltip={textList:void 0!==e.textList?e.textList:n,offset:void 0!==e.offset?e.offset:s,option:e,index:d}}ge.call(this,o.type,o,this.config,this.context)}if("mix"===this.opts.type){r=this.getCurrentDataIndex(t);if((d=null==e.index?r.index:e.index)>-1){a=this.scrollOption.currentOffset,o=$({},this.opts,{_scrollDistance_:a,animation:!1});if(0!==(l=ut(this.opts.series,d)).length){var h=function(t,e,i,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},r=e.chartData.xAxisPoints[i]+e.chartData.eachSpacing/2,n=t.map((function(t){return{text:o.formatter?o.formatter(t,a[i],i,e):t.name+": "+t.data,color:t.color,disableLegend:!!t.disableLegend,legendShape:"auto"==e.extra.tooltip.legendShape?t.legendShape:e.extra.tooltip.legendShape}}));return{textList:n=n.filter((function(t){if(!0!==t.disableLegend)return t})),offset:{x:Math.round(r),y:0}}}(l,this.opts,d,this.opts.categories,e);n=h.textList;(s=h.offset).y=i.y,o.tooltip={textList:e.textList?e.textList:n,offset:void 0!==e.offset?e.offset:s,option:e,index:d}}}ge.call(this,o.type,o,this.config,this.context)}if("candle"===this.opts.type){r=this.getCurrentDataIndex(t);if((d=null==e.index?r.index:e.index)>-1){a=this.scrollOption.currentOffset,o=$({},this.opts,{_scrollDistance_:a,animation:!1});if(0!==(l=ut(this.opts.series,d)).length){var c=function(t,e,i,a,o,r){var n=i.chartData.calPoints;let l=r.color.upFill,s=r.color.downFill,h=[l,l,s,l];var c=[];e.map((function(e){0==a?e.data[1]-e.data[0]<0?h[1]=s:h[1]=l:(e.data[0]t[a-1][1]&&(h[2]=l),e.data[3]-1){o=$({},this.opts,{animation:!1}),l=$({},o._series_[d]),n=[{text:e.formatter?e.formatter(l,void 0,d,o):l.name+": "+l.data,color:l.color,legendShape:"auto"==this.opts.extra.tooltip.legendShape?l.legendShape:this.opts.extra.tooltip.legendShape}],s={x:i.x,y:i.y};o.tooltip={textList:e.textList?e.textList:n,offset:void 0!==e.offset?e.offset:s,option:e,index:d}}ge.call(this,o.type,o,this.config,this.context)}if("map"===this.opts.type){if((d=null==e.index?this.getCurrentDataIndex(t):e.index)>-1){o=$({},this.opts,{animation:!1});(l=$({},this.opts.series[d])).name=l.properties.name;n=[{text:e.formatter?e.formatter(l,void 0,d,this.opts):l.name,color:l.color,legendShape:"auto"==this.opts.extra.tooltip.legendShape?l.legendShape:this.opts.extra.tooltip.legendShape}],s={x:i.x,y:i.y};o.tooltip={textList:e.textList?e.textList:n,offset:void 0!==e.offset?e.offset:s,option:e,index:d}}o.updateData=!1,ge.call(this,o.type,o,this.config,this.context)}if("word"===this.opts.type){if((d=null==e.index?this.getCurrentDataIndex(t):e.index)>-1){o=$({},this.opts,{animation:!1}),l=$({},this.opts.series[d]),n=[{text:e.formatter?e.formatter(l,void 0,d,this.opts):l.name,color:l.color,legendShape:"auto"==this.opts.extra.tooltip.legendShape?l.legendShape:this.opts.extra.tooltip.legendShape}],s={x:i.x,y:i.y};o.tooltip={textList:e.textList?e.textList:n,offset:void 0!==e.offset?e.offset:s,option:e,index:d}}o.updateData=!1,ge.call(this,o.type,o,this.config,this.context)}if("radar"===this.opts.type){var d;if((d=null==e.index?this.getCurrentDataIndex(t):e.index)>-1){o=$({},this.opts,{animation:!1});if(0!==(l=ut(this.opts.series,d)).length){n=l.map((t=>({text:e.formatter?e.formatter(t,this.opts.categories[d],d,this.opts):t.name+": "+t.data,color:t.color,legendShape:"auto"==this.opts.extra.tooltip.legendShape?t.legendShape:this.opts.extra.tooltip.legendShape}))),s={x:i.x,y:i.y};o.tooltip={textList:e.textList?e.textList:n,offset:void 0!==e.offset?e.offset:s,option:e,index:d}}}ge.call(this,o.type,o,this.config,this.context)}},ye.prototype.translate=function(t){this.scrollOption={currentOffset:t,startTouchX:t,distance:0,lastMoveTime:0};let e=$({},this.opts,{_scrollDistance_:t,animation:!1});ge.call(this,this.opts.type,e,this.config,this.context)},ye.prototype.scrollStart=function(t){var e=null,i=xt(e=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],this.opts,t);e&&!0===this.opts.enableScroll&&(this.scrollOption.startTouchX=i.x)},ye.prototype.scroll=function(t){0===this.scrollOption.lastMoveTime&&(this.scrollOption.lastMoveTime=Date.now());let e=this.opts.touchMoveLimit||60,i=Date.now();if(!(i-this.scrollOption.lastMoveTime{var i=new Date;i.setTime(1e3*t);var a=i.getFullYear(),o=i.getMonth()+1;o=o<10?"0"+o:o;var r=i.getDate();r=r<10?"0"+r:r;var n=i.getHours();n=n<10?"0"+n:n;var l=i.getMinutes(),s=i.getSeconds();return l=l<10?"0"+l:l,s=s<10?"0"+s:s,"full"==e?a+"-"+o+"-"+r+" "+n+":"+l+":"+s:"y-m-d"==e?a+"-"+o+"-"+r:"h:m"==e?n+":"+l:"h:m:s"==e?n+":"+l+":"+s:[a,o,r,n,l,s]})(t,"h:m")},seriesDemo1:function(t,e,i,a){return t+"元"},tooltipDemo1:function(t,e,i,a){return 0==i?"随便用"+t.data+"年":"其他我没改"+t.data+"天"},pieDemo:function(t,e,i,a){if(void 0!==e)return i[e].name+":"+i[e].data+"元"}},demotype:{type:"line",color:me,padding:[15,10,0,15],xAxis:{disableGrid:!0},yAxis:{gridType:"dash",dashLength:2},legend:{},extra:{line:{type:"curve",width:2}}},pie:{type:"pie",color:me,padding:[5,5,5,5],extra:{pie:{activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,border:!0,borderWidth:3,borderColor:"#FFFFFF"}}},ring:{type:"ring",color:me,padding:[5,5,5,5],rotate:!1,dataLabel:!0,legend:{show:!0,position:"right",lineHeight:25},title:{name:"收益率",fontSize:15,color:"#666666"},subtitle:{name:"70%",fontSize:25,color:"#7cb5ec"},extra:{ring:{ringWidth:30,activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,border:!0,borderWidth:3,borderColor:"#FFFFFF"}}},rose:{type:"rose",color:me,padding:[5,5,5,5],legend:{show:!0,position:"left",lineHeight:25},extra:{rose:{type:"area",minRadius:50,activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,border:!1,borderWidth:2,borderColor:"#FFFFFF"}}},word:{type:"word",color:me,extra:{word:{type:"normal",autoColors:!1}}},funnel:{type:"funnel",color:me,padding:[15,15,0,15],extra:{funnel:{activeOpacity:.3,activeWidth:10,border:!0,borderWidth:2,borderColor:"#FFFFFF",fillOpacity:1,labelAlign:"right"}}},map:{type:"map",color:me,padding:[0,0,0,0],dataLabel:!0,extra:{map:{border:!0,borderWidth:1,borderColor:"#666666",fillOpacity:.6,activeBorderColor:"#F04864",activeFillColor:"#FACC14",activeFillOpacity:1}}},arcbar:{type:"arcbar",color:me,title:{name:"百分比",fontSize:25,color:"#00FF00"},subtitle:{name:"默认标题",fontSize:15,color:"#666666"},extra:{arcbar:{type:"default",width:12,backgroundColor:"#E9E9E9",startAngle:.75,endAngle:.25,gap:2}}},line:{type:"line",color:me,padding:[15,10,0,15],xAxis:{disableGrid:!0},yAxis:{gridType:"dash",dashLength:2},legend:{},extra:{line:{type:"straight",width:2,activeType:"hollow"}}},tline:{type:"line",color:me,padding:[15,10,0,15],xAxis:{disableGrid:!1,boundaryGap:"justify"},yAxis:{gridType:"dash",dashLength:2,data:[{min:0,max:80}]},legend:{},extra:{line:{type:"curve",width:2,activeType:"hollow"}}},tarea:{type:"area",color:me,padding:[15,10,0,15],xAxis:{disableGrid:!0,boundaryGap:"justify"},yAxis:{gridType:"dash",dashLength:2,data:[{min:0,max:80}]},legend:{},extra:{area:{type:"curve",opacity:.2,addLine:!0,width:2,gradient:!0,activeType:"hollow"}}},column:{type:"column",color:me,padding:[15,15,0,5],xAxis:{disableGrid:!0},yAxis:{data:[{min:0}]},legend:{},extra:{column:{type:"group",width:30,activeBgColor:"#000000",activeBgOpacity:.08}}},mount:{type:"mount",color:me,padding:[15,15,0,5],xAxis:{disableGrid:!0},yAxis:{data:[{min:0}]},legend:{},extra:{mount:{type:"mount",widthRatio:1.5}}},bar:{type:"bar",color:me,padding:[15,30,0,5],xAxis:{boundaryGap:"justify",disableGrid:!1,min:0,axisLine:!1},yAxis:{},legend:{},extra:{bar:{type:"group",width:30,meterBorde:1,meterFillColor:"#FFFFFF",activeBgColor:"#000000",activeBgOpacity:.08}}},area:{type:"area",color:me,padding:[15,15,0,15],xAxis:{disableGrid:!0},yAxis:{gridType:"dash",dashLength:2},legend:{},extra:{area:{type:"straight",opacity:.2,addLine:!0,width:2,gradient:!1,activeType:"hollow"}}},radar:{type:"radar",color:me,padding:[5,5,5,5],dataLabel:!1,legend:{show:!0,position:"right",lineHeight:25},extra:{radar:{gridType:"radar",gridColor:"#CCCCCC",gridCount:3,opacity:.2,max:200,labelShow:!0}}},gauge:{type:"gauge",color:me,title:{name:"66Km/H",fontSize:25,color:"#2fc25b",offsetY:50},subtitle:{name:"实时速度",fontSize:15,color:"#1890ff",offsetY:-50},extra:{gauge:{type:"default",width:30,labelColor:"#666666",startAngle:.75,endAngle:.25,startNumber:0,endNumber:100,labelFormat:"",splitLine:{fixRadius:0,splitNumber:10,width:30,color:"#FFFFFF",childNumber:5,childWidth:12},pointer:{width:24,color:"auto"}}}},candle:{type:"candle",color:me,padding:[15,15,0,15],enableScroll:!0,enableMarkLine:!0,dataLabel:!1,xAxis:{labelCount:4,itemCount:40,disableGrid:!0,gridColor:"#CCCCCC",gridType:"solid",dashLength:4,scrollShow:!0,scrollAlign:"left",scrollColor:"#A6A6A6",scrollBackgroundColor:"#EFEBEF"},yAxis:{},legend:{},extra:{candle:{color:{upLine:"#f04864",upFill:"#f04864",downLine:"#2fc25b",downFill:"#2fc25b"},average:{show:!0,name:["MA5","MA10","MA30"],day:[5,10,20],color:["#1890ff","#2fc25b","#facc14"]}},markLine:{type:"dash",dashLength:5,data:[{value:2150,lineColor:"#f04864",showLabel:!0},{value:2350,lineColor:"#f04864",showLabel:!0}]}}},mix:{type:"mix",color:me,padding:[15,15,0,15],xAxis:{disableGrid:!0},yAxis:{disabled:!1,disableGrid:!1,splitNumber:5,gridType:"dash",dashLength:4,gridColor:"#CCCCCC",padding:10,showTitle:!0,data:[]},legend:{},extra:{mix:{column:{width:20}}}},scatter:{type:"scatter",color:me,padding:[15,15,0,15],dataLabel:!1,xAxis:{disableGrid:!1,gridType:"dash",splitNumber:5,boundaryGap:"justify",min:0},yAxis:{disableGrid:!1,gridType:"dash"},legend:{},extra:{scatter:{}}},bubble:{type:"bubble",color:me,padding:[15,15,0,15],xAxis:{disableGrid:!1,gridType:"dash",splitNumber:5,boundaryGap:"justify",min:0,max:250},yAxis:{disableGrid:!1,gridType:"dash",data:[{min:0,max:150}]},legend:{},extra:{bubble:{border:2,opacity:.5}}}},ve=["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],Ae={type:["pie","ring","rose","funnel","line","column","area","radar","gauge","candle","demotype"],categories:["line","column","area","radar","gauge","candle","demotype"],instance:{},option:{},formatter:{tooltipDemo1:function(t){let e="";for(let i in t){0==i&&(e+=t[i].axisValueLabel+"年销售额");let a="--";null!==t[i].data&&(a=t[i].data),e+="\n"+t[i].seriesName+":"+a+" 万元"}return e},legendFormat:function(t){let e,i,a=JSON.parse(h("contractList"));for(let o=0;o{b} : {c}%"},seriesTemplate:{name:"业务指标",type:"gauge",detail:{formatter:"{value}%"},data:[{value:50,name:"完成率"}]}},candle:{xAxis:{data:[]},yAxis:{},color:ve,title:{text:""},dataZoom:[{type:"inside",xAxisIndex:[0,1],start:10,end:100},{show:!0,xAxisIndex:[0,1],type:"slider",bottom:10,start:10,end:100}],seriesTemplate:{name:"",type:"k",data:[]}}};var Se={},we=null;function Te(t={},...e){for(let i in e)for(let a in e[i])e[i].hasOwnProperty(a)&&(t[a]=e[i][a]&&"object"==typeof e[i][a]?Te(Array.isArray(e[i][a])?[]:{},t[a],e[i][a]):e[i][a]);return t}function Ce(t,e){for(let i in t)t.hasOwnProperty(i)&&null!==t[i]&&"object"==typeof t[i]?Ce(t[i],e):"format"===i&&"string"==typeof t[i]&&(t.formatter=e[t[i]]?e[t[i]]:void 0);return t}const De={data:()=>({rid:null}),mounted(){we={top:0,left:0};let t=document.querySelectorAll("uni-main")[0];void 0===t&&(t=document.querySelectorAll("uni-page-wrapper")[0]),we={top:t.offsetTop,left:t.offsetLeft},setTimeout((()=>{null===this.rid&&this.$ownerInstance&&this.$ownerInstance.callMethod("getRenderType")}),200)},destroyed(){delete be.option[this.rid],delete be.instance[this.rid],delete Ae.option[this.rid],delete Ae.instance[this.rid]},methods:{ecinit(t,e,i,a){let o=JSON.stringify(t.id);this.rid=o,Se[o]=this.$ownerInstance||a;let r=JSON.parse(JSON.stringify(t)),n=r.type;n&&Ae.type.includes(n)?Ae.option[o]=Te({},Ae[n],r):Ae.option[o]=Te({},r);let l=r.chartData;if(l){Ae.option[o].xAxis&&Ae.option[o].xAxis.type&&"category"===Ae.option[o].xAxis.type&&(Ae.option[o].xAxis.data=l.categories),Ae.option[o].yAxis&&Ae.option[o].yAxis.type&&"category"===Ae.option[o].yAxis.type&&(Ae.option[o].yAxis.data=l.categories),Ae.option[o].series=[];for(var s=0;s{let i=JSON.parse(JSON.stringify({x:e.event.offsetX,y:e.event.offsetY}));Se[t].callMethod("emitMsg",{name:"getIndex",params:{type:"getIndex",event:i,currentIndex:e.dataIndex,value:e.data,seriesName:e.seriesName,id:t}})})),Ae.instance[t].on("highlight",(e=>{Se[t].callMethod("emitMsg",{name:"getHighlight",params:{type:"highlight",res:e,id:t}})}))),this.updataEChart(t,Ae.option[t])):this.updataEChart(t,Ae.option[t])},updataEChart(t,e){if((e=Ce(e,Ae.formatter)).tooltip&&(e.tooltip.show=!!e.tooltipShow,e.tooltip.position=this.tooltipPosition(),"string"==typeof e.tooltipFormat&&Ae.formatter[e.tooltipFormat]&&(e.tooltip.formatter=e.tooltip.formatter?e.tooltip.formatter:Ae.formatter[e.tooltipFormat])),e.series)for(let i in e.series){let t=e.series[i].linearGradient;t&&(e.series[i].color=new echarts.graphic.LinearGradient(t[0],t[1],t[2],t[3],t[4]))}Ae.instance[t].setOption(e,e.notMerge),Ae.instance[t].on("finished",(function(){Se[t].callMethod("emitMsg",{name:"complete",params:{type:"complete",complete:!0,id:t}}),Ae.instance[t]&&Ae.instance[t].off("finished")})),void 0!==Se[t].$el.children[0].clientWidth&&(Math.abs(Se[t].$el.children[0].clientWidth-Ae.instance[t].getWidth())>3||Math.abs(Se[t].$el.children[0].clientHeight-Ae.instance[t].getHeight())>3)&&this.ecresize()},tooltipPosition:()=>(t,e,i,a,o)=>{let r=t[0],n=t[1],l=o.viewSize[0],s=o.viewSize[1],h=o.contentSize[0],c=o.contentSize[1],d=r+30,p=n+30;return d+h>l&&(d=r-h-30),p+c>s&&(p=n-c-30),[d,p]},ucinit(t,e,i,a){if(JSON.stringify(t)==JSON.stringify(e))return;if(!t.canvasId)return;let o=JSON.parse(JSON.stringify(t.canvasId));this.rid=o,Se[o]=this.$ownerInstance||a,be.option[o]=JSON.parse(JSON.stringify(t)),be.option[o]=Ce(be.option[o],be.formatter);let r=document.getElementById(o);r&&r.children[0]&&(be.option[o].context=r.children[0].getContext("2d"),be.instance[o]&&be.option[o]&&!0===be.option[o].update?this.updataUChart():setTimeout((()=>{be.option[o].context.restore(),be.option[o].context.save(),this.newUChart()}),100))},newUChart(){let t=this.rid;be.instance[t]=new ye(be.option[t]),be.instance[t].addEventListener("renderComplete",(()=>{Se[t].callMethod("emitMsg",{name:"complete",params:{type:"complete",complete:!0,id:t,opts:be.instance[t].opts}}),be.instance[t].delEventListener("renderComplete")})),be.instance[t].addEventListener("scrollLeft",(()=>{Se[t].callMethod("emitMsg",{name:"scrollLeft",params:{type:"scrollLeft",scrollLeft:!0,id:t,opts:be.instance[t].opts}})})),be.instance[t].addEventListener("scrollRight",(()=>{Se[t].callMethod("emitMsg",{name:"scrollRight",params:{type:"scrollRight",scrollRight:!0,id:t,opts:be.instance[t].opts}})}))},updataUChart(){let t=this.rid;be.instance[t].updateData(be.option[t])},tooltipDefault(t,e,i,a){if(e){let i=t.data;return"object"==typeof t.data&&(i=t.data.value),e+" "+t.name+":"+i}return t.properties&&t.properties.name?t.properties.name:t.name+":"+t.data},showTooltip(t,e){let i=be.option[e].tooltipCustom;if(i&&null!=i){let a;i.x>=0&&i.y>=0&&(a={x:i.x,y:i.y+10}),be.instance[e].showToolTip(t,{index:i.index,offset:a,textList:i.textList,formatter:(t,i,a,o)=>"string"==typeof be.option[e].tooltipFormat&&be.formatter[be.option[e].tooltipFormat]?be.formatter[be.option[e].tooltipFormat](t,i,a,o):this.tooltipDefault(t,i,a,o)})}else be.instance[e].showToolTip(t,{formatter:(t,i,a,o)=>"string"==typeof be.option[e].tooltipFormat&&be.formatter[be.option[e].tooltipFormat]?be.formatter[be.option[e].tooltipFormat](t,i,a,o):this.tooltipDefault(t,i,a,o)})},tap(t){let e=this.rid,i=be.option[e].ontap,a=be.option[e].tooltipShow,o=be.option[e].tapLegend;if(0==i)return;let r=null,n=null,l=document.getElementById("UC"+e).getBoundingClientRect(),s={};s=t.detail.x?{x:t.detail.x-l.left,y:t.detail.y-l.top+we.top}:{x:t.clientX-l.left,y:t.clientY-l.top+we.top},t.changedTouches=[],t.changedTouches.unshift(s),r=be.instance[e].getCurrentDataIndex(t),n=be.instance[e].getLegendDataIndex(t),!0===o&&be.instance[e].touchLegend(t),1==a&&this.showTooltip(t,e),Se[e].callMethod("emitMsg",{name:"getIndex",params:{type:"getIndex",event:s,currentIndex:r,legendIndex:n,id:e,opts:be.instance[e].opts}})},touchStart(t){let e=this.rid;0!=be.option[e].ontouch&&(!0===be.option[e].enableScroll&&1==t.touches.length&&be.instance[e].scrollStart(t),Se[e].callMethod("emitMsg",{name:"getTouchStart",params:{type:"touchStart",event:t.changedTouches[0],id:e,opts:be.instance[e].opts}}))},touchMove(t){let e=this.rid,i=be.option[e].ontouch;if(0!=i){if(!0===be.option[e].enableScroll&&1==t.changedTouches.length&&be.instance[e].scroll(t),!0===be.option[e].ontap&&!1===be.option[e].enableScroll&&!0===be.option[e].onmovetip){let i=document.getElementById("UC"+e).getBoundingClientRect(),a={x:t.changedTouches[0].clientX-i.left,y:t.changedTouches[0].clientY-i.top+we.top};t.changedTouches.unshift(a),!0===be.option[e].tooltipShow&&this.showTooltip(t,e)}!0===i&&!0===be.option[e].enableScroll&&!0===be.option[e].onzoom&&2==t.changedTouches.length&&be.instance[e].dobuleZoom(t),Se[e].callMethod("emitMsg",{name:"getTouchMove",params:{type:"touchMove",event:t.changedTouches[0],id:e,opts:be.instance[e].opts}})}},touchEnd(t){let e=this.rid;0!=be.option[e].ontouch&&(!0===be.option[e].enableScroll&&0==t.touches.length&&be.instance[e].scrollEnd(t),Se[e].callMethod("emitMsg",{name:"getTouchEnd",params:{type:"touchEnd",event:t.changedTouches[0],id:e,opts:be.instance[e].opts}}))},mouseDown(t){let e=this.rid;if(0==be.option[e].onmouse)return;let i=document.getElementById("UC"+e).getBoundingClientRect(),a={};a={x:t.clientX-i.left,y:t.clientY-i.top+we.top},t.changedTouches=[],t.changedTouches.unshift(a),be.instance[e].scrollStart(t),be.option[e].mousedown=!0,Se[e].callMethod("emitMsg",{name:"getTouchStart",params:{type:"mouseDown",event:a,id:e,opts:be.instance[e].opts}})},mouseMove(t){let e=this.rid,i=be.option[e].onmouse,a=be.option[e].tooltipShow;if(0==i)return;let o=document.getElementById("UC"+e).getBoundingClientRect(),r={};r={x:t.clientX-o.left,y:t.clientY-o.top+we.top},t.changedTouches=[],t.changedTouches.unshift(r),be.option[e].mousedown?(be.instance[e].scroll(t),Se[e].callMethod("emitMsg",{name:"getTouchMove",params:{type:"mouseMove",event:r,id:e,opts:be.instance[e].opts}})):be.instance[e]&&1==a&&this.showTooltip(t,e)},mouseUp(t){let e=this.rid;if(0==be.option[e].onmouse)return;let i=document.getElementById("UC"+e).getBoundingClientRect(),a={};a={x:t.clientX-i.left,y:t.clientY-i.top+we.top},t.changedTouches=[],t.changedTouches.unshift(a),be.instance[e].scrollEnd(t),be.option[e].mousedown=!1,Se[e].callMethod("emitMsg",{name:"getTouchEnd",params:{type:"mouseUp",event:a,id:e,opts:be.instance[e].opts}})}}},Pe=t=>{t.$renderjs||(t.$renderjs=[]),t.$renderjs.push("rdcharts"),t.mixins||(t.mixins=[]),t.mixins.push({beforeCreate(){this.rdcharts=this},mounted(){this.$ownerInstance=this.$gcd(this,!0)}}),t.mixins.push(De)};function Me(t={},...e){for(let i in e)for(let a in e[i])e[i].hasOwnProperty(a)&&(t[a]=e[i][a]&&"object"==typeof e[i][a]?Me(Array.isArray(e[i][a])?[]:{},t[a],e[i][a]):e[i][a]);return t}function Le(t,e){for(let i in t)t.hasOwnProperty(i)&&null!==t[i]&&"object"==typeof t[i]?Le(t[i],e):"format"===i&&"string"==typeof t[i]&&(t.formatter=e[t[i]]?e[t[i]]:void 0);return t}const Fe={name:"qiun-data-charts",mixins:[Y.mixinDatacom],props:{type:{type:String,default:null},canvasId:{type:String,default:"uchartsid"},canvas2d:{type:Boolean,default:!1},background:{type:String,default:"rgba(0,0,0,0)"},animation:{type:Boolean,default:!0},chartData:{type:Object,default:()=>({categories:[],series:[]})},opts:{type:Object,default:()=>({})},eopts:{type:Object,default:()=>({})},loadingType:{type:Number,default:2},errorShow:{type:Boolean,default:!0},errorReload:{type:Boolean,default:!0},errorMessage:{type:String,default:null},inScrollView:{type:Boolean,default:!1},reshow:{type:Boolean,default:!1},reload:{type:Boolean,default:!1},disableScroll:{type:Boolean,default:!1},optsWatch:{type:Boolean,default:!0},onzoom:{type:Boolean,default:!1},ontap:{type:Boolean,default:!0},ontouch:{type:Boolean,default:!1},onmouse:{type:Boolean,default:!0},onmovetip:{type:Boolean,default:!1},echartsH5:{type:Boolean,default:!1},echartsApp:{type:Boolean,default:!1},tooltipShow:{type:Boolean,default:!0},tooltipFormat:{type:String,default:void 0},tooltipCustom:{type:Object,default:void 0},startDate:{type:String,default:void 0},endDate:{type:String,default:void 0},textEnum:{type:Array,default:()=>[]},groupEnum:{type:Array,default:()=>[]},pageScrollTop:{type:Number,default:0},directory:{type:String,default:"/"},tapLegend:{type:Boolean,default:!0},menus:{type:Array,default:()=>[]}},data:()=>({cid:"uchartsid",inWx:!1,inAli:!1,inTt:!1,inBd:!1,inH5:!1,inApp:!1,inWin:!1,type2d:!0,disScroll:!1,openmouse:!1,pixel:1,cWidth:375,cHeight:250,showchart:!1,echarts:!1,echartsResize:{state:!1},uchartsOpts:{},echartsOpts:{},drawData:{},lastDrawTime:null}),created(){if(this.cid=this.canvasId,"uchartsid"==this.canvasId||""==this.canvasId){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",e=t.length,i="";for(let a=0;a<32;a++)i+=t.charAt(Math.floor(Math.random()*e));this.cid=i}const t=c();"windows"!==t.platform&&"mac"!==t.platform||(this.inWin=!0),this.type2d=!1,this.disScroll=this.disableScroll},mounted(){this.inH5=!0,!0===this.inWin&&(this.openmouse=this.onmouse),!0===this.echartsH5&&(this.echarts=!0),this.$nextTick((()=>{this.beforeInit()}));const t=this.inH5?500:200,e=this;d(function(t,e){let i=!1;return function(){clearTimeout(i),i&&clearTimeout(i),i=setTimeout((()=>{i=!1,t.apply(this,arguments)}),e)}}((function(t){if(1==e.mixinDatacomLoading)return;let i=e.mixinDatacomErrorMessage;null!==i&&"null"!==i&&""!==i||(e.echarts?e.echartsResize.state=!e.echartsResize.state:e.resizeHandler())}),t))},destroyed(){!0===this.echarts?(delete Ae.option[this.cid],delete Ae.instance[this.cid]):(delete be.option[this.cid],delete be.instance[this.cid]),p((()=>{}))},watch:{chartDataProps:{handler(t,e){"object"==typeof t?JSON.stringify(t)!==JSON.stringify(e)&&(this._clearChart(),t.series&&t.series.length>0?this.beforeInit():(this.mixinDatacomLoading=!0,this.showchart=!1,this.mixinDatacomErrorMessage=null)):(this.mixinDatacomLoading=!1,this._clearChart(),this.showchart=!1,this.mixinDatacomErrorMessage="参数错误:chartData数据类型错误")},immediate:!1,deep:!0},localdata:{handler(t,e){JSON.stringify(t)!==JSON.stringify(e)&&(t.length>0?this.beforeInit():(this.mixinDatacomLoading=!0,this._clearChart(),this.showchart=!1,this.mixinDatacomErrorMessage=null))},immediate:!1,deep:!0},optsProps:{handler(t,e){"object"==typeof t?JSON.stringify(t)!==JSON.stringify(e)&&!1===this.echarts&&1==this.optsWatch&&this.checkData(this.drawData):(this.mixinDatacomLoading=!1,this._clearChart(),this.showchart=!1,this.mixinDatacomErrorMessage="参数错误:opts数据类型错误")},immediate:!1,deep:!0},eoptsProps:{handler(t,e){"object"==typeof t?JSON.stringify(t)!==JSON.stringify(e)&&!0===this.echarts&&this.checkData(this.drawData):(this.mixinDatacomLoading=!1,this.showchart=!1,this.mixinDatacomErrorMessage="参数错误:eopts数据类型错误")},immediate:!1,deep:!0},reshow(t,e){!0===t&&!1===this.mixinDatacomLoading&&setTimeout((()=>{this.mixinDatacomErrorMessage=null,this.echartsResize.state=!this.echartsResize.state,this.checkData(this.drawData)}),200)},reload(t,e){!0===t&&(this.showchart=!1,this.mixinDatacomErrorMessage=null,this.reloading())},mixinDatacomErrorMessage(t,e){t&&(this.emitMsg({name:"error",params:{type:"error",errorShow:this.errorShow,msg:t,id:this.cid}}),this.errorShow)},errorMessage(t,e){t&&this.errorShow&&null!==t&&"null"!==t&&""!==t?(this.showchart=!1,this.mixinDatacomLoading=!1,this.mixinDatacomErrorMessage=t):(this.showchart=!1,this.mixinDatacomErrorMessage=null,this.reloading())}},computed:{optsProps(){return JSON.parse(JSON.stringify(this.opts))},eoptsProps(){return JSON.parse(JSON.stringify(this.eopts))},chartDataProps(){return JSON.parse(JSON.stringify(this.chartData))}},methods:{beforeInit(){this.mixinDatacomErrorMessage=null,"object"==typeof this.chartData&&null!=this.chartData&&void 0!==this.chartData.series&&this.chartData.series.length>0?(this.drawData=Me({},this.chartData),this.mixinDatacomLoading=!1,this.showchart=!0,this.checkData(this.chartData)):this.localdata.length>0?(this.mixinDatacomLoading=!1,this.showchart=!0,this.localdataInit(this.localdata)):""!==this.collection?(this.mixinDatacomLoading=!1,this.getCloudData()):this.mixinDatacomLoading=!0},localdataInit(t){if(this.groupEnum.length>0)for(let c=0;c0)for(let c=0;c0)a=this.chartData.categories;else if(this.startDate&&this.endDate){let t=new Date(this.startDate),e=new Date(this.endDate);for(;t<=e;)a.push((n=void 0,l=void 0,s=void 0,n=(r=t).getFullYear(),l=r.getMonth()+1,s=r.getDate(),l>=1&&l<=9&&(l="0"+l),s>=0&&s<=9&&(s="0"+s),n+"-"+l+"-"+s)),t=t.setDate(t.getDate()+1),t=new Date(t)}else{let e={};t.map((function(t,i){null==t.text||e[t.text]||(a.push(t.text),e[t.text]=!0)}))}i.categories=a}var r,n,l,s;let h={};if(t.map((function(t,e){null==t.group||h[t.group]||(o.push({name:t.group,data:[]}),h[t.group]=!0)})),0==o.length)if(o=[{name:"默认分组",data:[]}],!0===e)for(let c=0;c0)for(let e=0;e0&&(this.mixinDatacomErrorMessage=null,!0===this.echarts?(Ae.option[e].chartData=i,this.$nextTick((()=>{this.init()}))):(be.option[e].categories=i.categories,be.option[e].series=i.series,this.$nextTick((()=>{this.init()}))))},resizeHandler(){let t=Date.now();t-(this.lastDrawTime?this.lastDrawTime:t-3e3)<1e3||x().in(this).select("#ChartBoxId"+this.cid).boundingClientRect((t=>{this.showchart=!0,t.width>0&&t.height>0&&(t.width===this.cWidth&&t.height===this.cHeight||this.checkData(this.drawData))})).exec()},getCloudData(){1!=this.mixinDatacomLoading&&(this.mixinDatacomLoading=!0,this.mixinDatacomGet().then((t=>{this.mixinDatacomResData=t.result.data,this.localdataInit(this.mixinDatacomResData)})).catch((t=>{this.mixinDatacomLoading=!1,this.showchart=!1,this.mixinDatacomErrorMessage="请求错误:"+t})))},onMixinDatacomPropsChange(t,e){1==t&&""!==this.collection&&(this.showchart=!1,this.mixinDatacomErrorMessage=null,this._clearChart(),this.getCloudData())},_clearChart(){let t=this.cid;if(!0!==this.echarts&&be.option[t]&&be.option[t].context){const e=be.option[t].context;"object"!=typeof e||be.option[t].update||(e.clearRect(0,0,this.cWidth*this.pixel,this.cHeight*this.pixel),e.draw())}},init(){let t=this.cid;x().in(this).select("#ChartBoxId"+t).boundingClientRect((e=>{e.width>0&&e.height>0?(this.mixinDatacomLoading=!1,this.showchart=!0,this.lastDrawTime=Date.now(),this.cWidth=e.width,this.cHeight=e.height,!0!==this.echarts&&(be.option[t].background="rgba(0,0,0,0)"==this.background?"#FFFFFF":this.background,be.option[t].canvas2d=this.type2d,be.option[t].pixelRatio=this.pixel,be.option[t].animation=this.animation,be.option[t].width=e.width*this.pixel,be.option[t].height=e.height*this.pixel,be.option[t].onzoom=this.onzoom,be.option[t].ontap=this.ontap,be.option[t].ontouch=this.ontouch,be.option[t].onmouse=this.openmouse,be.option[t].onmovetip=this.onmovetip,be.option[t].tooltipShow=this.tooltipShow,be.option[t].tooltipFormat=this.tooltipFormat,be.option[t].tooltipCustom=this.tooltipCustom,be.option[t].inScrollView=this.inScrollView,be.option[t].lastDrawTime=this.lastDrawTime,be.option[t].tapLegend=this.tapLegend),this.inH5||this.inApp?1==this.echarts?(Ae.option[t].ontap=this.ontap,Ae.option[t].onmouse=this.openmouse,Ae.option[t].tooltipShow=this.tooltipShow,Ae.option[t].tooltipFormat=this.tooltipFormat,Ae.option[t].tooltipCustom=this.tooltipCustom,Ae.option[t].lastDrawTime=this.lastDrawTime,this.echartsOpts=Me({},Ae.option[t])):(be.option[t].rotateLock=be.option[t].rotate,this.uchartsOpts=Me({},be.option[t])):(be.option[t]=Le(be.option[t],be.formatter),this.mixinDatacomErrorMessage=null,this.mixinDatacomLoading=!1,this.showchart=!0,this.$nextTick((()=>{if(!0===this.type2d){x().in(this).select("#"+t).fields({node:!0,size:!0}).exec((i=>{if(i[0]){const a=i[0].node,o=a.getContext("2d");be.option[t].context=o,be.option[t].rotateLock=be.option[t].rotate,be.instance[t]&&be.option[t]&&!0===be.option[t].update?this._updataUChart(t):(a.width=e.width*this.pixel,a.height=e.height*this.pixel,a._width=e.width*this.pixel,a._height=e.height*this.pixel,setTimeout((()=>{be.option[t].context.restore(),be.option[t].context.save(),this._newChart(t)}),100))}else this.showchart=!1,this.mixinDatacomErrorMessage="参数错误:开启2d模式后,未获取到dom节点,canvas-id:"+t}))}else this.inAli&&(be.option[t].rotateLock=be.option[t].rotate),be.option[t].context=u(t,this),be.instance[t]&&be.option[t]&&!0===be.option[t].update?this._updataUChart(t):setTimeout((()=>{be.option[t].context.restore(),be.option[t].context.save(),this._newChart(t)}),100)})))):(this.mixinDatacomLoading=!1,this.showchart=!1,1==this.reshow&&(this.mixinDatacomErrorMessage="布局错误:未获取到父元素宽高尺寸!canvas-id:"+t))})).exec()},saveImage(){g({canvasId:this.cid,success:t=>{var e=document.createElement("a");e.href=t.tempFilePath,e.download=this.cid,e.target="_blank",e.click()}},this)},getImage(){if(0==this.type2d)g({canvasId:this.cid,success:t=>{this.emitMsg({name:"getImage",params:{type:"getImage",base64:t.tempFilePath}})}},this);else{x().in(this).select("#"+this.cid).fields({node:!0,size:!0}).exec((t=>{if(t[0]){const e=t[0].node;this.emitMsg({name:"getImage",params:{type:"getImage",base64:e.toDataURL("image/png")}})}}))}},_error(t){this.mixinDatacomErrorMessage=t.detail.errMsg},emitMsg(t){this.$emit(t.name,t.params)},getRenderType(){!0===this.echarts&&!1===this.mixinDatacomLoading&&this.beforeInit()},toJSON(){return this}}};Pe(Fe);const _e=G(Fe,[["render",function(r,l,s,h,c,d){const p=f(y("qiun-loading"),Q),x=o,u=f(y("qiun-error"),K),g=A;return t(),e(x,{class:"chartsview",id:"ChartBoxId"+c.cid},{default:i((()=>[r.mixinDatacomLoading?(t(),e(x,{key:0},{default:i((()=>[a(p,{loadingType:s.loadingType},null,8,["loadingType"])])),_:1})):n("",!0),r.mixinDatacomErrorMessage&&s.errorShow?(t(),e(x,{key:1,onClick:d.reloading},{default:i((()=>[a(u,{errorMessage:s.errorMessage},null,8,["errorMessage"])])),_:1},8,["onClick"])):n("",!0),c.echarts?m((t(),e(x,{key:2,style:b([{background:s.background},{width:"100%",height:"100%"}]),"data-directory":s.directory,id:"EC"+c.cid,prop:c.echartsOpts,"change:prop":r.rdcharts.ecinit,resize:c.echartsResize,"change:resize":r.rdcharts.ecresize},null,8,["style","data-directory","id","prop","change:prop","resize","change:resize"])),[[v,c.showchart]]):(t(),e(x,{key:3,onClick:r.rdcharts.tap,onMousemove:r.rdcharts.mouseMove,onMousedown:r.rdcharts.mouseDown,onMouseup:r.rdcharts.mouseUp,onTouchstart:r.rdcharts.touchStart,onTouchmove:r.rdcharts.touchMove,onTouchend:r.rdcharts.touchEnd,id:"UC"+c.cid,prop:c.uchartsOpts,"change:prop":r.rdcharts.ucinit},{default:i((()=>[m(a(g,{id:c.cid,canvasId:c.cid,style:b({width:c.cWidth+"px",height:c.cHeight+"px",background:s.background}),"disable-scroll":s.disableScroll,onError:d._error},null,8,["id","canvasId","style","disable-scroll","onError"]),[[v,c.showchart]])])),_:1},8,["onClick","onMousemove","onMousedown","onMouseup","onTouchstart","onTouchmove","onTouchend","id","prop","change:prop"]))])),_:1},8,["id"])}],["__scopeId","data-v-d6856ea4"]]),ke=G({__name:"index",emits:["change"],setup(r,{expose:h,emit:c}){const d=S(),p=w({showPerson:!1,infoUser:[],infoDepartment:[],mode:"selector",tabIndex:1,btnIndex:2,timeIndex:5,start:"",end:"",where:{type:0,time:J().month(J().month()).startOf("month").format("YYYY/MM/DD")+"-"+J().month(J().month()).endOf("month").format("YYYY/MM/DD"),member:[],btnText:"本人及下属",timeText:"本月"},TimeList:[{title:"今天",id:1},{title:"昨天",id:2},{title:"本周",id:3},{title:"上周",id:4},{title:"本月",id:5},{title:"上月",id:6},{title:"今年",id:7},{title:"去年",id:8},{title:"自定义",id:9}],btnList:[{title:"本人及下属",id:0},{title:"仅本人",id:1},{title:"本部门",id:2},{title:"选择部门",id:3},{title:"选择人员",id:4}]}),x=t=>{p.tabIndex=t},u=(t,e)=>{if(3==p.btnIndex){if(!(p.infoDepartment.length>1))return _.error("最少选择一个部门");p.infoDepartment.splice(e,1)}else if(4==p.btnIndex){if(!(p.infoUser.length>1))return _.error("最少选择一个人员");p.infoUser.splice(e,1)}},g=T((()=>d.state.app.depSelectPeople));C(g,(t=>{p.member=[],3==p.btnIndex?p.infoDepartment=t:4==p.btnIndex&&(p.infoUser=t)}),{deep:!0});const m=c,b=()=>{p.where.member=[];let t=[];4==p.where.type?(p.infoUser.map((e=>{p.where.member.push(e.id),t.push(e.name)})),p.where.btnText=t.join(",")):3==p.where.type&&(p.infoDepartment.map((e=>{p.where.member.push(e.id),t.push(e.name)})),p.where.btnText=t.join(",")),9==p.timeIndex&&(p.where.time=J(p.start).format("YYYY/MM/DD")+"-"+J(p.end).format("YYYY/MM/DD"),p.where.timeText=J(p.start).format("YYYY/MM/DD")+"-"+J(p.end).format("YYYY/MM/DD")),m("change",p.where),B.value.close()},v=()=>{p.where.time=J().month(J().month()).startOf("month").format("YYYY/MM/DD")+"-"+J().month(J().month()).endOf("month").format("YYYY/MM/DD"),p.timeIndex=5,p.where.timeText="本月",p.tabIndex=2,p.where.type=2,p.where.btnText="本部门",p.where.member=[],p.infoUser=[],p.infoDepartment=[],m("change",p.where),B.value.close(),p.start="",p.end=""},A=(t,e,i)=>{if("time"==e)p.timeIndex=t,p.where.timeText=i,1==t?p.where.time=J(new Date).format("YYYY/MM/DD")+"-"+J(new Date).format("YYYY/MM/DD"):2==t?p.where.time=J().add("days",-1).format("YYYY/MM/DD")+"-"+J().add("days",-1).format("YYYY/MM/DD"):3==t?p.where.time=J().weekday(1).format("YYYY/MM/DD")+"-"+J().weekday(7).format("YYYY/MM/DD"):4==t?p.where.time=J().week(J().week()-1).startOf("week").add(1,"days").format("YYYY/MM/DD")+"-"+J().week(J().week()-1).endOf("week").add(1,"days").format("YYYY/MM/DD"):5==t?p.where.time=J().month(J().month()).startOf("month").format("YYYY/MM/DD")+"-"+J().month(J().month()).endOf("month").format("YYYY/MM/DD"):6==t?p.where.time=J().month(J().month()-1).startOf("month").format("YYYY/MM/DD")+"-"+J().month(J().month()-1).endOf("month").format("YYYY/MM/DD"):7==t?p.where.time=J().year(J().year()).startOf("year").format("YYYY/MM/DD")+"-"+J().year(J().year()).endOf("year").format("YYYY/MM/DD"):8==t&&(p.where.time=J().year(J().year()-1).startOf("year").format("YYYY/MM/DD")+"-"+J().year(J().year()-1).endOf("year").format("YYYY/MM/DD"));else{if(p.btnIndex=t,p.where.btnText=i,4==t){p.showPerson=!0,p.mode="multiSelector";const t=`isShow=true&isFirst=1&isSelect=1&mode=${p.mode}&showPerson=${p.showPerson}`;if(k(t,"pages/customer/list/statistics"),p.infoUser.length>0){let t=[];p.infoUser.map((e=>{t.push(e.id)})),d.commit("setDepSelectPeople",p.infoUser),d.commit("setDepSelectIds",t)}else d.commit("setDepSelectPeople",[]),d.commit("setDepSelectIds",[])}else if(3==t){p.showPerson=!1,p.mode="multiSelector";const t=`isShow=true&isFirst=1&isSelect=1&mode=${p.mode}&showPerson=${p.showPerson}`;if(k(t,"pages/customer/list/statistics"),p.infoDepartment.length>0){let t=[];p.infoDepartment.map((e=>{t.push(e.id)})),d.commit("setDepSelectPeople",p.infoDepartment),d.commit("setDepSelectIds",t)}else d.commit("setDepSelectPeople",[]),d.commit("setDepSelectIds",[])}p.where.type=t}},B=D(null);return h({popupOpen:t=>{p.tabIndex=t,B.value.open()}}),(r,h)=>{const c=o,d=I,g=O,m=f(y("uni-datetime-picker"),X),S=z,w=E,T=f(y("uni-popup"),j);return t(),e(c,null,{default:i((()=>[a(T,{ref_key:"popupRef",ref:B,type:"bottom"},{default:i((()=>[a(c,{class:"slider"},{default:i((()=>[a(c,{class:"tab"},{default:i((()=>[a(c,{class:P(["tab-title",1==p.tabIndex?"active":""]),onClick:h[0]||(h[0]=t=>x(1))},{default:i((()=>[l(" 员工与部门 ")])),_:1},8,["class"]),a(c,{class:P(["tab-title",2==p.tabIndex?"active":""]),onClick:h[1]||(h[1]=t=>x(2))},{default:i((()=>[l(" 时间筛选 ")])),_:1},8,["class"])])),_:1}),a(S,{"scroll-y":"true",style:{width:"100%",height:"100%"}},{default:i((()=>[a(c,{class:"content p30"},{default:i((()=>[1==p.tabIndex?(t(),e(c,{key:0,class:"btn-flex"},{default:i((()=>[(t(!0),M(L,null,F(p.btnList,((a,o)=>(t(),e(c,{class:P(["btn",p.btnIndex==a.id?"btnActive":""]),key:o,onClick:t=>A(a.id,"",a.title)},{default:i((()=>[l(s(a.title),1)])),_:2},1032,["class","onClick"])))),128)),0!==p.infoUser.length&&4==p.btnIndex?(t(!0),M(L,{key:0},F(p.infoUser,((o,r)=>(t(),e(c,{class:"member-box",key:r},{default:i((()=>[a(c,{class:"avatar_flex"},{default:i((()=>[a(d,{src:o.avatar,mode:"",class:"avatar"},null,8,["src"]),a(g,null,{default:i((()=>[l(s(o.name),1)])),_:2},1024)])),_:2},1024),a(g,{class:"iconfont icon-guanbi",onClick:t=>u(0,r)},null,8,["onClick"])])),_:2},1024)))),128)):n("",!0),0!==p.infoDepartment.length&&3==p.btnIndex?(t(!0),M(L,{key:1},F(p.infoDepartment,((o,r)=>(t(),e(c,{class:"member-box",key:r},{default:i((()=>[a(c,null,{default:i((()=>[a(g,{class:"iconfont icon-gerenbangong"}),a(g,null,{default:i((()=>[l(s(o.name),1)])),_:2},1024)])),_:2},1024),a(g,{class:"iconfont icon-guanbi",onClick:t=>u(0,r)},null,8,["onClick"])])),_:2},1024)))),128)):n("",!0)])),_:1})):n("",!0),2==p.tabIndex?(t(),e(c,{key:1,class:"btn-flex"},{default:i((()=>[(t(!0),M(L,null,F(p.TimeList,((a,o)=>(t(),e(c,{class:P(["btn",p.timeIndex==a.id?"btnActive":""]),key:o,onClick:t=>A(a.id,"time",a.title)},{default:i((()=>[l(s(a.title),1)])),_:2},1032,["class","onClick"])))),128)),9==p.timeIndex?(t(),e(c,{key:0,class:"flex",style:{width:"100%"}},{default:i((()=>[a(m,{type:"date",placeholder:"开始时间","clear-icon":!1,modelValue:p.start,"onUpdate:modelValue":h[2]||(h[2]=t=>p.start=t)},null,8,["modelValue"]),a(g,{class:"text"},{default:i((()=>[l("-")])),_:1}),a(m,{type:"date",placeholder:"结束时间","clear-icon":!1,modelValue:p.end,"onUpdate:modelValue":h[3]||(h[3]=t=>p.end=t),onMaskClick:r.maskClick},null,8,["modelValue","onMaskClick"])])),_:1})):n("",!0)])),_:1})):n("",!0)])),_:1})])),_:1}),a(c,{class:"slider-laber-bottom"},{default:i((()=>[a(w,{class:"reset laber-bottom",onClick:v},{default:i((()=>[l("重置")])),_:1}),a(w,{class:"laber-bottom confirm",onClick:b},{default:i((()=>[l("确认")])),_:1})])),_:1})])),_:1})])),_:1},512)])),_:1})}}},[["__scopeId","data-v-237bcc8c"]]),Ie=G({__name:"statistics",setup(h){const c=S();D(c.state.app.currentIndex),B((()=>{d.where.time=J().month(J().month()).startOf("month").format("YYYY/MM/DD")+"-"+J().month(J().month()).endOf("month").format("YYYY/MM/DD"),u(),g(),b()}));const d=w({backgroundColor:"rgba(0,0,0,0)",chartData:{},opts:{},ids:[],pickerShow:!1,contractList:[],salesmanList:[],list:[{icon:"icon-yeji-zongshouru",title:"总收入(元)",num:0},{icon:"icon-yeji-xinzengkehu",title:"新增客户",num:0},{icon:"icon-yeji-xinzenghetong",title:"新增合同",num:0},{icon:"icon-yeji-xinzenghetonge",title:"新增合同金额(元)",num:0},{icon:"icon-yeji-xinzenghetonge",title:"合同续费金额(元)",num:0},{icon:"icon-a-yeji-weihuikuanxufei",title:"至今未回款(元)",num:0}],where:{time:"",member:"",type:2},totalData:0,timeText:"本月",btnText:"本部门",active:"合同分类",activeId:"",breadcrumbList:[{name:"合同分类",id:""}]}),p=t=>{const e=Object.values(t.member);d.where.type=t.type,d.where.time=t.time,d.where.member=e.toString(),d.timeText=t.timeText,d.btnText=t.btnText,u(),g(),b()},x=t=>{const e=t.currentIndex;d.activeId!=t.opts._series_[e].id&&(d.active=t.opts._series_[e].name,d.activeId=t.opts._series_[e].id,d.ids=t.opts._series_[e].id,b(),d.breadcrumbList.push(t.opts._series_[e]),d.breadcrumbList.forEach(((t,e)=>{e{U(d.where).then((t=>{d.list[0].num=t.data.income,d.list[1].num=t.data.new_customer,d.list[2].num=t.data.new_contract,d.list[3].num=t.data.new_contract_price,d.list[4].num=t.data.renew,d.list[5].num=t.data.uncollected_price})).catch((t=>{_.error(t.message)}))},g=()=>{q(d.where).then((t=>{d.salesmanList=t.data.list}))};let m=D({});const b=()=>{let t={category_id:d.ids,time:d.where.time,member:d.where.member,type:d.where.type};V(t).then((t=>{d.contractList=t.data,d.totalData=0;let e=d.contractList.reduce(((t,e)=>t+Number(e.price||0)),0);d.totalData=e.toFixed(2),R("contractList",JSON.stringify(d.contractList)),0!==t.data.length?m.value={series:[{data:t.data.map(((t,e)=>({value:Number(t.price),name:t.category_name,id:t.category_id})))}]}:m.value.series=[],d.opts={rotate:!1,rotateLock:!1,color:["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],dataLabel:!0,enableScroll:!1,legend:{show:!0,position:"right",lineHeight:25},title:{name:d.totalData,fontSize:18,color:"#303133"},subtitle:{name:"总计合同金额(元)",fontSize:12,color:"#909399"},legend:{show:!0,position:"bottom",lineHeight:0,itemHeight:10,icon:"circle",rich:{a:{padding:[0,10,0,10],color:"#FF0000"},b:{color:"#666"}},format:"legendFormat"},extra:{ring:{ringWidth:30,activeOpacity:.5,activeRadius:0,offsetAngle:0,labelWidth:10,border:!1,borderWidth:30,borderColor:"#FFFFFF"}}}})).catch((t=>{_.error(t.message)}))};w({});const v=D(null),A=t=>{v.value.popupOpen(t)};return(h,c)=>{const u=o,g=O,S=r("uni-breadcrumb-item"),w=f(y("qiun-data-charts"),_e),T=I;return t(),e(u,{class:"nav"},{default:i((()=>[a(u,{class:"cr-position-header"},{default:i((()=>[a(H,{"jump-url":"/pages/workbench/index",backgroundColor:d.backgroundColor,color:"#fff"},null,8,["backgroundColor"])])),_:1}),a(u,{class:"s-search"},{default:i((()=>[a(u,{class:"search"},{default:i((()=>[a(u,{class:"s-title",onClick:c[0]||(c[0]=t=>A(1))},{default:i((()=>[a(g,{class:"iconfont icon-richengshezhi1"}),a(u,{class:"over-title"},{default:i((()=>[l(s(d.btnText),1)])),_:1}),a(g,{class:"iconfont icon-zhankai1"})])),_:1}),a(u,{class:"line"}),a(u,{class:"s-title",onClick:c[1]||(c[1]=t=>A(2))},{default:i((()=>[a(g,{class:"iconfont icon-richengshezhi1"}),a(u,{class:"over-title"},{default:i((()=>[l(s(d.timeText),1)])),_:1}),a(g,{class:"iconfont icon-zhankai1"})])),_:1})])),_:1}),a(u,{class:"mb130"},{default:i((()=>[a(u,{class:"per"},{default:i((()=>[a(u,{class:"per-title"},{default:i((()=>[l(" 业绩简报 "),a(u,{class:"line"})])),_:1}),a(u,{class:"per-content"},{default:i((()=>[(t(!0),M(L,null,F(d.list,((o,r)=>(t(),e(u,{class:"per-flex",key:r},{default:i((()=>[a(g,{class:P(["iconfont",o.icon?o.icon:""])},null,8,["class"]),a(u,{class:"flex"},{default:i((()=>[a(g,{class:"num"},{default:i((()=>[l(s(o.num),1)])),_:2},1024),a(g,{class:"text"},{default:i((()=>[l(s(o.title),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:1})])),_:1}),d.contractList.length>0?(t(),e(u,{key:0,class:"per"},{default:i((()=>[a(u,{class:"per-title"},{default:i((()=>[a(g,null,{default:i((()=>[l(" 合同分类统计")])),_:1}),a(u,{class:"line"})])),_:1}),a(u,{class:"el-breadcrumb"},{default:i((()=>[(t(!0),M(L,null,F(d.breadcrumbList,((o,r)=>(t(),e(S,{key:r},{default:i((()=>[a(g,{class:P(["name",{breadcrumb:d.active==o.name}]),onClick:t=>((t,e)=>{d.active=t.name,d.ids=t.id,d.breadcrumbList.splice(e+1),"合同分类"==t.name?(d.ids="",b(),d.breadcrumbList=[{name:"合同分类",id:""}]):b()})(o,r)},{default:i((()=>[l(s(o.name)+" "+s(o.icon),1)])),_:2},1032,["class","onClick"])])),_:2},1024)))),128))])),_:1}),a(u,{class:"charts-box"},{default:i((()=>[a(w,{type:"ring",opts:d.opts,chartData:W(m),onGetIndex:x},null,8,["opts","chartData"])])),_:1})])),_:1})):n("",!0),d.salesmanList.length>0?(t(),e(u,{key:1,class:"per"},{default:i((()=>[a(u,{class:"per-title"},{default:i((()=>[l(" 业务员业绩排行榜 "),a(u,{class:"line"})])),_:1}),a(u,{class:"per-ranking"},{default:i((()=>[a(u,{class:"title"},{default:i((()=>[a(g,null,{default:i((()=>[l("业绩排名")])),_:1}),a(g,null,{default:i((()=>[l("业绩金额(元)")])),_:1})])),_:1}),a(u,{class:"list"},{default:i((()=>[(t(!0),M(L,null,F(d.salesmanList,((o,r)=>(t(),e(u,{class:"list-item",key:r},{default:i((()=>[a(u,{class:"left"},{default:i((()=>[a(u,{class:"number"},{default:i((()=>[0===r?(t(),e(T,{key:0,src:"data:image/png;base64,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",mode:"",class:"rank"})):n("",!0),1===r?(t(),e(T,{key:1,src:"data:image/png;base64,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",mode:"",class:"rank"})):n("",!0),2===r?(t(),e(T,{key:2,src:"data:image/png;base64,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",mode:"",class:"rank"})):n("",!0),r>2?(t(),e(g,{key:3,class:"text"},{default:i((()=>[l(s(r+1),1)])),_:2},1024)):n("",!0)])),_:2},1024),a(T,{src:o.avatar?o.avatar:"../../../static/image/logo.png",mode:"",class:"img"},null,8,["src"]),l(" "+s(o.name),1)])),_:2},1024),a(u,{class:"mr20"},{default:i((()=>[l(s(o.price),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1})])),_:1})])),_:1})):n("",!0)])),_:1})])),_:1}),a(N,{currentIndex:3}),a(ke,{ref_key:"departmentRef",ref:v,onChange:p},null,512)])),_:1})}}},[["__scopeId","data-v-3af32ad5"]]);export{Ie as default};