text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["card-pages-card-boss-index-index~card-pages-card-staff-custom-custom"],{2840:function(t,e,i){"use strict";i("99af"),i("cb29"),i("4de4"),i("4160"),i("c975"),i("d81d"),i("13d5"),i("26e9"),i("fb6a"),i("4e82"),i("b680"),i("d3b7"),i("e25e"),i("ac1f"),i("25f0"),i("5319"),i("1276"),i("159b");var a={yAxisWidth:15,yAxisSplit:5,xAxisHeight:15,xAxisLineHeight:15,legendHeight:15,yAxisTitleWidth:15,padding:[10,10,10,10],pixelRatio:1,rotate:!1,columePadding:3,fontSize:13,dataPointShape:["circle","circle","circle","circle"],colors:["#1890ff","#2fc25b","#facc14","#f04864","#8543e0","#90ed7d"],pieChartLinePadding:15,pieChartTextPadding:5,xAxisTextPadding:3,titleColor:"#333333",titleFontSize:20,subtitleColor:"#999999",subtitleFontSize:15,toolTipPadding:3,toolTipBackground:"#000000",toolTipOpacity:.7,toolTipLineHeight:20,radarLabelTextMargin:15,gaugeLabelTextMargin:15},o=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),a=1;a<e;a++)i[a-1]=arguments[a];function o(t,e){for(var i in e)t[i]=t[i]&&"[object Object]"===t[i].toString()?o(t[i],e[i]):t[i]=e[i];return t}if(null==t)throw new TypeError("Cannot convert undefined or null to object");return!i||0>=i.length||i.forEach((function(e){t=o(t,e)})),t},r={toFixed:function(t,e){return e=e||2,this.isFloat(t)&&(t=t.toFixed(e)),t},isFloat:function(t){return 0!=t%1},approximatelyEqual:function(t,e){return 1e-10>Math.abs(t-e)},isSameSign:function(t,e){var i=Math.abs;return i(t)===t&&i(e)===e||i(t)!==t&&i(e)!==e},isSameXCoordinateArea:function(t,e){return this.isSameSign(t.x,e.x)},isCollision:function(t,e){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;var i=e.start.x>t.end.x||e.end.x<t.start.x||e.end.y>t.start.y||e.start.y<t.end.y;return!i}};function n(t,e){var i=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,a){return e+e+i+i+a+a})),a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(i),o=parseInt(a[1],16),r=parseInt(a[2],16),n=parseInt(a[3],16);return"rgba("+o+","+r+","+n+","+e+")"}function l(t,e,i){if(isNaN(t))throw new Error("[uCharts] unvalid series data!");i=i||10,e=e||"upper";for(var a=1;1>i;)i*=10,a*=10;for(t="upper"===e?Math.ceil(t*a):Math.floor(t*a);0!=t%i;)"upper"===e?t++:t--;return t/a}function s(t,e,i,a){for(var o,r=[],n=0;n<t.length;n++){o={data:[],name:e[n],color:i[n]};for(var l=0,s=a.length;l<s;l++)if(l<t[n])o.data.push(null);else{for(var h=0,c=0;c<t[n];c++)h+=a[l-c][1];o.data.push(+(h/t[n]).toFixed(3))}r.push(o)}return r}function h(t,e,i,a,o){var r=o.width-o.area[1]-o.area[3],n=i.eachSpacing*(o.chartData.xAxisData.xAxisPoints.length-1),l=e;return 0<=e?(l=0,t.event.trigger("scrollLeft")):Math.abs(e)>=n-r&&(l=r-n,t.event.trigger("scrollRight")),l}function c(t,e,i){function a(t){for(;0>t;)t+=2*o;for(;t>2*o;)t-=2*o;return t}var o=Math.PI;return t=a(t),e=a(e),i=a(i),e>i&&(i+=2*o,t<e&&(t+=2*o)),t>=e&&t<=i}function d(t,e,i){var a=t,o=i-e,r=a+(i-o-a)/1.4142135623730951;return r*=-1,{transX:r,transY:.41421356237309515*(i-o)-(i-o-a)/1.4142135623730951}}function x(t,e){function i(t,e){return!(!t[e-1]||!t[e+1])&&(t[e].y>=r(t[e-1].y,t[e+1].y)||t[e].y<=o(t[e-1].y,t[e+1].y))}function a(t,e){return!(!t[e-1]||!t[e+1])&&(t[e].x>=r(t[e-1].x,t[e+1].x)||t[e].x<=o(t[e-1].x,t[e+1].x))}var o=Math.min,r=Math.max,n=.2,l=.2,s=null,h=null,c=null,d=null;if(1>e?(s=t[0].x+(t[1].x-t[0].x)*n,h=t[0].y+(t[1].y-t[0].y)*n):(s=t[e].x+(t[e+1].x-t[e-1].x)*n,h=t[e].y+(t[e+1].y-t[e-1].y)*n),e>t.length-3){var x=t.length-1;c=t[x].x-(t[x].x-t[x-1].x)*l,d=t[x].y-(t[x].y-t[x-1].y)*l}else c=t[e+1].x-(t[e+2].x-t[e].x)*l,d=t[e+1].y-(t[e+2].y-t[e].y)*l;return i(t,e+1)&&(d=t[e+1].y),i(t,e)&&(h=t[e].y),a(t,e+1)&&(c=t[e+1].x),a(t,e)&&(s=t[e].x),(h>=r(t[e].y,t[e+1].y)||h<=o(t[e].y,t[e+1].y))&&(h=t[e].y),(d>=r(t[e].y,t[e+1].y)||d<=o(t[e].y,t[e+1].y))&&(d=t[e+1].y),(s>=r(t[e].x,t[e+1].x)||s<=o(t[e].x,t[e+1].x))&&(s=t[e].x),(c>=r(t[e].x,t[e+1].x)||c<=o(t[e].x,t[e+1].x))&&(c=t[e+1].x),{ctrA:{x:s,y:h},ctrB:{x:c,y:d}}}function p(t,e,i){return{x:i.x+t,y:i.y-e}}function g(t,e){if(e)for(;r.isCollision(t,e);)0<t.start.x?t.start.y--:0>t.start.x||0<t.start.y?t.start.y++:t.start.y--;return t}function f(t,e,i){var a=0;return t.map((function(t){if(t.color||(t.color=i.colors[a],a=(a+1)%i.colors.length),t.index||(t.index=0),t.type||(t.type=e.type),"undefined"==typeof t.show&&(t.show=!0),t.type||(t.type=e.type),t.pointShape||(t.pointShape="circle"),!t.legendShape)switch(t.type){case"line":t.legendShape="line";break;case"column":t.legendShape="rect";break;case"area":t.legendShape="triangle";break;default:t.legendShape="circle"}return t}))}function u(t,e){var i=0,a=e-t;return i=1e4<=a?1e3:1e3<=a?100:100<=a?10:10<=a?5:1<=a?1:.1<=a?.1:.01<=a?.01:.001<=a?.001:1e-4<=a?1e-4:1e-5<=a?1e-5:1e-6,{minRange:l(t,"lower",i),maxRange:l(e,"upper",i)}}function y(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:a.fontSize;t+="";t=t.split("");for(var i,o=0,r=0;r<t.length;r++)i=t[r],o+=/[a-zA-Z]/.test(i)?7:/[0-9]/.test(i)?5.5:/\./.test(i)?2.7:/-/.test(i)?3.25:/[\u4e00-\u9fa5]/.test(i)?10:/\(|\)/.test(i)?3.73:/\s/.test(i)?2.5:/%/.test(i)?8:10;return o*e/10}function v(t){return t.reduce((function(t,e){return(t.data?t.data:t).concat(e.data)}),[])}function m(t,e){for(var i=Array(e),a=0;a<i.length;a++)i[a]=0;for(var o=0;o<t.length;o++)for(a=0;a<i.length;a++)i[a]+=t[o].data[a];return t.reduce((function(t,e){return(t.data?t.data:t).concat(e.data).concat(i)}),[])}function b(t,e,i){var a,o;return t.clientX?e.rotate?(o=e.height-t.clientX*e.pixelRatio,a=(t.pageY-i.currentTarget.offsetTop-e.height/e.pixelRatio/2*(e.pixelRatio-1))*e.pixelRatio):(a=t.clientX*e.pixelRatio,o=(t.pageY-i.currentTarget.offsetTop-e.height/e.pixelRatio/2*(e.pixelRatio-1))*e.pixelRatio):e.rotate?(o=e.height-t.x*e.pixelRatio,a=t.y*e.pixelRatio):(a=t.x*e.pixelRatio,o=t.y*e.pixelRatio),{x:a,y:o}}function A(t,e){for(var i,a=[],o=0;o<t.length;o++)if(i=t[o],null!==i.data[e]&&"undefined"!=typeof i.data[e]&&i.show){var r={};r.color=i.color,r.type=i.type,r.style=i.style,r.pointShape=i.pointShape,r.disableLegend=i.disableLegend,r.name=i.name,r.show=i.show,r.data=i.format?i.format(i.data[e]):i.data[e],a.push(r)}return a}function S(t){var e=t.map((function(t){return y(t)}));return Math.max.apply(null,e)}function T(t){for(var e=Math.PI,i=[],a=0;a<t;a++)i.push(2*e/t*a);return i.map((function(t){return-1*t+e/2}))}function P(t,e,i,a){for(var o,r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},n=t.map((function(t){var e=[];return e=a||t.data,{text:r.format?r.format(t,e[i]):t.name+": "+t.data,color:t.color}})),l=[],s={x:0,y:0},h=0;h<e.length;h++)o=e[h],"undefined"!=typeof o[i]&&null!==o[i]&&l.push(o[i]);for(var c,d=0;d<l.length;d++)c=l[d],s.x=Math.round(c.x),s.y+=c.y;return s.y/=l.length,{textList:n,offset:s}}function w(t,e,i,a){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},r=t.map((function(t){return{text:o.format?o.format(t,a[i]):t.name+": "+t.data,color:t.color,disableLegend:!!t.disableLegend}}));r=r.filter((function(t){if(!0!==t.disableLegend)return t}));for(var n,l=[],s={x:0,y:0},h=0;h<e.length;h++)n=e[h],"undefined"!=typeof n[i]&&null!==n[i]&&l.push(n[i]);for(var c,d=0;d<l.length;d++)c=l[d],s.x=Math.round(c.x),s.y+=c.y;return s.y/=l.length,{textList:r,offset:s}}function _(t,e,i,a,o,r){var n=r.color.upFill,l=r.color.downFill,s=[n,n,l,n],h=[],c={text:o[a],color:null};h.push(c),e.map((function(e){0==a?0>e.data[1]-e.data[0]?s[1]=l:s[1]=n:(e.data[0]<t[a-1][1]&&(s[0]=l),e.data[1]<e.data[0]&&(s[1]=l),e.data[2]>t[a-1][1]&&(s[2]=n),e.data[3]<t[a-1][1]&&(s[3]=l));var i={text:"开盘："+e.data[0],color:s[0]},o={text:"收盘："+e.data[1],color:s[1]},r={text:"最低："+e.data[2],color:s[2]},c={text:"最高："+e.data[3],color:s[3]};h.push(i,o,r,c)}));for(var d,x=[],p={x:0,y:0},g=0;g<i.length;g++)d=i[g],"undefined"!=typeof d[a]&&null!==d[a]&&x.push(d[a]);return p.x=Math.round(x[0][0].x),{textList:h,offset:p}}function L(t){for(var e=[],i=0;i<t.length;i++)1==t[i].show&&e.push(t[i]);return e}function F(t,e,i,a){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,r=-1,n=i.chartData.eachSpacing/2,l=[];if(0<e.length){if("candle"==i.type)for(var s=0;s<e[0].length;s++)l.push(e[0][s][0].x);else for(var h=0;h<e[0].length;h++)l.push(e[0][h].x);("line"==i.type||"area"==i.type)&&"justify"==i.xAxis.boundaryGap&&(n=i.chartData.eachSpacing/2),i.categories||(n=0),k(t,i,a)&&l.forEach((function(e,i){t.x+o+n>e&&(r=i)}))}return r}function D(t,e){var i=-1;if(R(t,e.area)){for(var a,o=e.points,r=-1,n=0,l=o.length;n<l;n++){a=o[n];for(var s=0;s<a.length;s++){r+=1;var h=a[s].area;if(t.x>h[0]&&t.x<h[2]&&t.y>h[1]&&t.y<h[3]){i=r;break}}}return i}return i}function R(t,e){return t.x>e.start.x&&t.x<e.end.x&&t.y>e.start.y&&t.y<e.end.y}function k(t,e){return t.x<=e.width-e.area[1]+10&&t.x>=e.area[3]-10&&t.y>=e.area[0]&&t.y<=e.height-e.area[2]}function C(t,e,i){var a=Math.PI,o=2*a/i,r=-1;if(I(t,e.center,e.radius)){var n=function(t){return 0>t&&(t+=2*a),t>2*a&&(t-=2*a),t},l=Math.atan2(e.center.y-t.y,t.x-e.center.x);l*=-1,0>l&&(l+=2*a);var s=e.angleList.map((function(t){return t=n(-1*t),t}));s.forEach((function(t,e){var i=n(t-o/2),s=n(t+o/2);s<i&&(s+=2*a),(l>=i&&l<=s||l+2*a>=i&&l+2*a<=s)&&(r=e)}))}return r}function M(t,e){for(var i,a=-1,o=0,r=e.series.length;o<r;o++)if(i=e.series[o],t.x>i.funnelArea[0]&&t.x<i.funnelArea[2]&&t.y>i.funnelArea[1]&&t.y<i.funnelArea[3]){a=o;break}return a}function z(t,e){for(var i,a=-1,o=0,r=e.length;o<r;o++)if(i=e[o],t.x>i.area[0]&&t.x<i.area[2]&&t.y>i.area[1]&&t.y<i.area[3]){a=o;break}return a}function W(t,e){for(var i,a=-1,o=e.chartData.mapData,r=e.series,n=Bt(t.y,t.x,o.bounds,o.scale,o.xoffset,o.yoffset),l=[n.x,n.y],s=0,h=r.length;s<h;s++)if(i=r[s].geometry.coordinates,Nt(l,i)){a=s;break}return a}function O(t,e){var i=-1;if(I(t,e.center,e.radius)){var a=Math.atan2(e.center.y-t.y,t.x-e.center.x);a=-a;for(var o,r=0,n=e.series.length;r<n;r++)if(o=e.series[r],c(a,o._start_,o._start_+2*o._proportion_*Math.PI)){i=r;break}}return i}function I(t,e,i){var a=Math.pow;return a(t.x-e.x,2)+a(t.y-e.y,2)<=a(i,2)}function E(t){var e=[],i=[];return t.forEach((function(t){null===t?(i.length&&e.push(i),i=[]):i.push(t)})),i.length&&e.push(i),e}function B(t,e,i,a){var o=Math.max,r=Math.floor,n={area:{start:{x:0,y:0},end:{x:0,y:0},width:0,height:0,wholeWidth:0,wholeHeight:0},points:[],widthArr:[],heightArr:[]};if(!1===e.legend.show)return a.legendData=n,n;var l=e.legend.padding,s=e.legend.margin,h=e.legend.fontSize,c=15*e.pixelRatio,d=5*e.pixelRatio,x=o(e.legend.lineHeight*e.pixelRatio,h);if("top"==e.legend.position||"bottom"==e.legend.position){for(var p=[],g=0,f=[],u=[],v=0;v<t.length;v++){var m=t[v],b=c+d+y(m.name||"undefined",h)+e.legend.itemGap;g+b>e.width-e.padding[1]-e.padding[3]?(p.push(u),f.push(g-e.legend.itemGap),g=b,u=[m]):(g+=b,u.push(m))}if(u.length){p.push(u),f.push(g-e.legend.itemGap),n.widthArr=f;var A=o.apply(null,f);switch(e.legend.float){case"left":n.area.start.x=e.padding[3],n.area.end.x=e.padding[3]+2*l;break;case"right":n.area.start.x=e.width-e.padding[1]-A-2*l,n.area.end.x=e.width-e.padding[1];break;default:n.area.start.x=(e.width-A)/2-l,n.area.end.x=(e.width+A)/2+l}n.area.width=A+2*l,n.area.wholeWidth=A+2*l,n.area.height=p.length*x+2*l,n.area.wholeHeight=p.length*x+2*l+2*s,n.points=p}}else{var S=t.length,T=e.height-e.padding[0]-e.padding[2]-2*s-2*l,P=Math.min(r(T/x),S);switch(n.area.height=P*x+2*l,n.area.wholeHeight=P*x+2*l,e.legend.float){case"top":n.area.start.y=e.padding[0]+s,n.area.end.y=e.padding[0]+s+n.area.height;break;case"bottom":n.area.start.y=e.height-e.padding[2]-s-n.area.height,n.area.end.y=e.height-e.padding[2]-s;break;default:n.area.start.y=(e.height-n.area.height)/2,n.area.end.y=(e.height+n.area.height)/2}for(var w,_=0==S%P?S/P:r(S/P+1),L=[],F=0;F<_;F++)w=t.slice(F*P,F*P+P),L.push(w);if(n.points=L,L.length){for(var D=0;D<L.length;D++){for(var R,k=L[D],C=0,M=0;M<k.length;M++)R=c+d+y(k[M].name||"undefined",h)+e.legend.itemGap,R>C&&(C=R);n.widthArr.push(C),n.heightArr.push(k.length*x+2*l)}for(var z=0,W=0;W<n.widthArr.length;W++)z+=n.widthArr[W];n.area.width=z-e.legend.itemGap+2*l,n.area.wholeWidth=n.area.width+l}}switch(e.legend.position){case"top":n.area.start.y=e.padding[0]+s,n.area.end.y=e.padding[0]+s+n.area.height;break;case"bottom":n.area.start.y=e.height-e.padding[2]-n.area.height-s,n.area.end.y=e.height-e.padding[2]-s;break;case"left":n.area.start.x=e.padding[3],n.area.end.x=e.padding[3]+n.area.width;break;case"right":n.area.start.x=e.width-e.padding[1]-n.area.width,n.area.end.x=e.width-e.padding[1]}return a.legendData=n,n}function H(t,e,i,a){var o={angle:0,xAxisHeight:i.xAxisHeight},r=t.map((function(t){return y(t,e.xAxis.fontSize||i.fontSize)})),n=Math.max.apply(this,r);return 1==e.xAxis.rotateLabel&&n+2*i.xAxisTextPadding>a&&(o.angle=45*Math.PI/180,o.xAxisHeight=2*i.xAxisTextPadding+n*Math.sin(o.angle)),o}function N(t,e){var i=Math.min,a=Math.max,o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:-1,r=v(t),n=[];r=r.filter((function(t){return"object"==typeof t&&null!==t?-1<t.constructor.toString().indexOf("Array")?null!==t:null!==t.value:null!==t})),r.map((function(t){"object"==typeof t?-1<t.constructor.toString().indexOf("Array")?"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;if(0<n.length&&(l=i.apply(this,n),s=a.apply(this,n)),-1<o?("number"==typeof e.xAxis.data[o].min&&(l=i(e.xAxis.data[o].min,l)),"number"==typeof e.xAxis.data[o].max&&(s=a(e.xAxis.data[o].max,s))):("number"==typeof e.xAxis.min&&(l=i(e.xAxis.min,l)),"number"==typeof e.xAxis.max&&(s=a(e.xAxis.max,s))),l===s){var h=s||10;s+=h}for(var c=l,d=s,x=[],p=(d-c)/e.xAxis.splitNumber,g=0;g<=e.xAxis.splitNumber;g++)x.push(c+p*g);return x}function X(t,e,i){var a={angle:0,xAxisHeight:i.xAxisHeight};a.ranges=N(t,e,i),a.rangesFormat=a.ranges.map((function(t){return t=e.xAxis.format?e.xAxis.format(t):r.toFixed(t,2),t}));var o=a.ranges.map((function(t){return t=r.toFixed(t,2),t=e.xAxis.format?e.xAxis.format(+t):t,t}));a=Object.assign(a,tt(o,e,i));var n=a.eachSpacing,l=o.map((function(t){return y(t)})),s=Math.max.apply(this,l);return s+2*i.xAxisTextPadding>n&&(a.angle=45*Math.PI/180,a.xAxisHeight=2*i.xAxisTextPadding+s*Math.sin(a.angle)),!0===e.xAxis.disabled&&(a.xAxisHeight=0),a}function G(t,e,i,a,o){var r=Math.max,n=5<arguments.length&&void 0!==arguments[5]?arguments[5]:1,l=o.extra.radar||{};l.max=l.max||0;for(var s=r(l.max,r.apply(null,v(a))),h=[],c=function(o){var r=a[o],l={};l.color=r.color,l.legendShape=r.legendShape,l.pointShape=r.pointShape,l.data=[],r.data.forEach((function(a,o){var r={};r.angle=t[o],r.proportion=a/s,r.position=p(i*r.proportion*n*Math.cos(r.angle),i*r.proportion*n*Math.sin(r.angle),e),l.data.push(r)})),h.push(l)},d=0;d<a.length;d++)c(d);return h}function j(t,e){for(var i,a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,o=0,r=0,n=0;n<t.length;n++)i=t[n],i.data=null===i.data?0:i.data,o+=i.data;for(var l,s=0;s<t.length;s++)l=t[s],l.data=null===l.data?0:l.data,l._proportion_=0===o?1/t.length*a:l.data/o*a,l._radius_=e;for(var h,c=0;c<t.length;c++)h=t[c],h._start_=r,r+=2*h._proportion_*Math.PI;return t}function J(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1;t=t.sort((function(t,e){return parseInt(e.data)-parseInt(t.data)}));for(var a=0;a<t.length;a++)t[a].radius=t[a].data/t[0].data*e*i,t[a]._proportion_=t[a].data/t[0].data;return t.reverse()}function Y(t,e,i,a){for(var o,r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,n=0,l=0,s=[],h=0;h<t.length;h++)o=t[h],o.data=null===o.data?0:o.data,n+=o.data,s.push(o.data);for(var c,d=Math.min.apply(null,s),x=Math.max.apply(null,s),p=0;p<t.length;p++)c=t[p],c.data=null===c.data?0:c.data,0===n||"area"==e?(c._proportion_=c.data/n*r,c._rose_proportion_=1/t.length*r):(c._proportion_=c.data/n*r,c._rose_proportion_=c.data/n*r),c._radius_=i+(a-i)*((c.data-d)/(x-d));for(var g,f=0;f<t.length;f++)g=t[f],g._start_=l,l+=2*g._rose_proportion_*Math.PI;return t}function $(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1;1==i&&(i=.999999);for(var a,o=0;o<t.length;o++){a=t[o],a.data=null===a.data?0:a.data;var r=void 0;r="circle"==e.type?2:e.endAngle<e.startAngle?2+e.endAngle-e.startAngle:e.startAngle-e.endAngle,a._proportion_=r*a.data*i+e.startAngle,2<=a._proportion_&&(a._proportion_%=2)}return t}function q(t,e,i){for(var a=e,o=0;o<t.length;o++)t[o].value=null===t[o].value?0:t[o].value,t[o]._startAngle_=a,t[o]._endAngle_=(e-i+1)*t[o].value+e,2<=t[o]._endAngle_&&(t[o]._endAngle_%=2),a=t[o]._endAngle_;return t}function Z(t,e,i){for(var a,o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1,r=0;r<t.length;r++){if(a=t[r],a.data=null===a.data?0:a.data,"auto"==i.pointer.color){for(var n=0;n<e.length;n++)if(a.data<=e[n].value){a.color=e[n].color;break}}else a.color=i.pointer.color;var l=i.startAngle-i.endAngle+1;a._endAngle_=l*a.data+i.startAngle,a._oldAngle_=i.oldAngle,i.oldAngle<i.endAngle&&(a._oldAngle_+=2),a._proportion_=a.data>=i.oldData?(a._endAngle_-a._oldAngle_)*o+i.oldAngle:a._oldAngle_-(a._oldAngle_-a._endAngle_)*o,2<=a._proportion_&&(a._proportion_%=2)}return t}function K(t){t=j(t);for(var e=0,i=0;i<t.length;i++){var a=t[i],o=a.format?a.format(+a._proportion_.toFixed(2)):r.toFixed(100*a._proportion_)+"%";e=Math.max(e,y(o))}return e}function Q(t,e,i,a,o,r){return t.map((function(t){return null===t?null:(t.width=Math.ceil((e-2*o.columePadding)/i),r.extra.column&&r.extra.column.width&&0<+r.extra.column.width&&(t.width=Math.min(t.width,+r.extra.column.width)),0>=t.width&&(t.width=1),t.x+=(a+.5-i/2)*t.width,t)}))}function U(t,e,i,a,o,r,n){return t.map((function(t){return null===t?null:(t.width=Math.ceil((e-2*o.columePadding)/2),r.extra.column&&r.extra.column.width&&0<+r.extra.column.width&&(t.width=Math.min(t.width,+r.extra.column.width)),0<a&&(t.width-=2*n),t)}))}function V(t,e,i,a,o,r){return t.map((function(t){return null===t?null:(t.width=Math.ceil((e-2*o.columePadding)/2),r.extra.column&&r.extra.column.width&&0<+r.extra.column.width&&(t.width=Math.min(t.width,+r.extra.column.width)),t)}))}function tt(t,e){var i=e.width-e.area[1]-e.area[3],a=e.enableScroll?Math.min(e.xAxis.itemCount,t.length):t.length;("line"==e.type||"area"==e.type)&&1<a&&"justify"==e.xAxis.boundaryGap&&(a-=1);var o=i/a,r=[],n=e.area[3],l=e.width-e.area[1];return t.forEach((function(t,e){r.push(n+e*o)})),"justify"!==e.xAxis.boundaryGap&&(!0===e.enableScroll?r.push(n+t.length*o):r.push(l)),{xAxisPoints:r,startX:n,endX:l,eachSpacing:o}}function et(t,e,i,a,o,r){var n=Math.round,l=7<arguments.length&&void 0!==arguments[7]?arguments[7]:1,s=[],h=r.height-r.area[0]-r.area[2];return t.forEach((function(t,c){if(null===t)s.push(null);else{var d=[];t.forEach((function(t){var s={x:a[c]+n(o/2)},x=t.value||t,p=h*(x-e)/(i-e);p*=l,s.y=r.height-n(p)-r.area[2],d.push(s)})),s.push(d)}})),s}function it(t,e,i,a,o,r){var n=Math.round,l=7<arguments.length&&void 0!==arguments[7]?arguments[7]:1,s="center";("line"==r.type||"area"==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,x){if(null===t)h.push(null);else{var p={color:t.color,x:a[x]},g=t;if("object"==typeof t&&null!==t)if(-1<t.constructor.toString().indexOf("Array")){var f,u,y;f=[].concat(r.chartData.xAxisData.ranges),u=f.shift(),y=f.pop(),g=t[1],p.x=r.area[3]+d*(t[0]-u)/(y-u)}else g=t.value;"center"==s&&(p.x+=n(o/2));var v=c*(g-e)/(i-e);v*=l,p.y=r.height-n(v)-r.area[2],h.push(p)}})),h}function at(t,e,i,a,o,r,n,l,s){var h=Math.round,c=9<arguments.length&&void 0!==arguments[9]?arguments[9]:1,d=[],x=r.height-r.area[0]-r.area[2];return t.forEach((function(t,n){if(null===t)d.push(null);else{var p={color:t.color,x:a[n]+h(o/2)};if(0<l){for(var g=0,f=0;f<=l;f++)g+=s[f].data[n];var u=g-t,y=x*(g-e)/(i-e),v=x*(u-e)/(i-e)}else g=t,y=x*(g-e)/(i-e),v=0;var m=v;y*=c,m*=c,p.y=r.height-h(y)-r.area[2],p.y0=r.height-h(m)-r.area[2],d.push(p)}})),d}function ot(t,e,i,a){var o,r=Math.min,n=Math.max,l=4<arguments.length&&void 0!==arguments[4]?arguments[4]:-1;o="stack"==a?m(t,e.categories.length):v(t);var s=[];o=o.filter((function(t){return"object"==typeof t&&null!==t?-1<t.constructor.toString().indexOf("Array")?null!==t:null!==t.value:null!==t})),o.map((function(t){"object"==typeof t?-1<t.constructor.toString().indexOf("Array")?"candle"==e.type?t.map((function(t){s.push(t)})):s.push(t[1]):s.push(t.value):s.push(t)}));var h=0,c=0;if(0<s.length&&(h=r.apply(this,s),c=n.apply(this,s)),-1<l?("number"==typeof e.yAxis.data[l].min&&(h=r(e.yAxis.data[l].min,h)),"number"==typeof e.yAxis.data[l].max&&(c=n(e.yAxis.data[l].max,c))):("number"==typeof e.yAxis.min&&(h=r(e.yAxis.min,h)),"number"==typeof e.yAxis.max&&(c=n(e.yAxis.max,c))),h===c){var d=c||10;c+=d}for(var x=u(h,c),p=x.minRange,g=x.maxRange,f=[],y=(g-p)/e.yAxis.splitNumber,b=0;b<=e.yAxis.splitNumber;b++)f.push(p+y*b);return f.reverse()}function rt(t,e,i){var a=Math.max,n=o({},{type:""},e.extra.column),l=e.yAxis.data.length,s=Array(l);if(0<l){for(var h=0;h<l;h++){s[h]=[];for(var c=0;c<t.length;c++)t[c].index==h&&s[h].push(t[c])}for(var d,x=Array(l),p=Array(l),g=Array(l),f=function(t,o){o=e.yAxis.data[t],1==e.yAxis.disabled&&(o.disabled=!0),x[t]=ot(s[t],e,i,n.type,t);var l=o.fontSize||i.fontSize;g[t]={position:o.position?o.position:"left",width:0},p[t]=x[t].map((function(e){return d=o,e=r.toFixed(e,6),e=o.format?o.format(+e):e,g[t].width=a(g[t].width,y(e,l)+5),e}));var h=o.calibration?4*e.pixelRatio:0;g[t].width+=h+3*e.pixelRatio,!0===o.disabled&&(g[t].width=0),d=o},u=0;u<l;u++)f(u,d)}else{x=[,],p=[,],g=[,];x[0]=ot(t,e,i,n.type),g[0]={position:"left",width:0};var v=e.yAxis.fontSize||i.fontSize;p[0]=x[0].map((function(t){return t=r.toFixed(t,6),t=e.yAxis.format?e.yAxis.format(+t):t,g[0].width=a(g[0].width,y(t,v)+5),t})),g[0].width+=3*e.pixelRatio,!0===e.yAxis.disabled?(g[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,format:e.yAxis.format}}return{rangesFormat:p,ranges:x,yAxisWidth:g}}function nt(t,e,i){for(var a=[].concat(i.chartData.yAxisData.ranges),o=i.height-i.area[0]-i.area[2],r=i.area[0],n=[],l=0;l<a.length;l++){var s=a[l].shift(),h=a[l].pop(),c=s-(s-h)*(t-r)/o;c=i.yAxis.data[l].format?i.yAxis.data[l].format(+c):c.toFixed(0),n.push(c+"")}return n}function lt(t,e){for(var i,a,o=e.height-e.area[0]-e.area[2],r=0;r<t.length;r++){t[r].yAxisIndex=t[r].yAxisIndex?t[r].yAxisIndex:0;var n=[].concat(e.chartData.yAxisData.ranges[t[r].yAxisIndex]);i=n.pop(),a=n.shift();var l=o*(t[r].value-i)/(a-i);t[r].y=e.height-Math.round(l)-e.area[2]}return t}function st(t,e){var i=Math.PI;!0===e.rotateLock?!0!==e._rotate_&&(t.translate(e.height,0),t.rotate(90*i/180),e._rotate_=!0):(t.translate(e.height,0),t.rotate(90*i/180))}function ht(t,e,i,a,o){a.beginPath(),"hollow"==o.dataPointShapeType?(a.setStrokeStyle(e),a.setFillStyle(o.background),a.setLineWidth(2*o.pixelRatio)):(a.setStrokeStyle("#ffffff"),a.setFillStyle(e),a.setLineWidth(1*o.pixelRatio)),"diamond"===i?t.forEach((function(t){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))})):"circle"===i?t.forEach((function(t){null!==t&&(a.moveTo(t.x+2.5*o.pixelRatio,t.y),a.arc(t.x,t.y,3*o.pixelRatio,0,2*Math.PI,!1))})):"rect"===i?t.forEach((function(t){null!==t&&(a.moveTo(t.x-3.5,t.y-3.5),a.rect(t.x-3.5,t.y-3.5,7,7))})):"triangle"==i&&t.forEach((function(t){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))})),a.closePath(),a.fill(),a.stroke()}function ct(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||e.titleColor,h=t.subtitle.color||e.subtitleColor,c=n?o:0,d=l?r:0,x=5;if(l){var p=y(l,r),g=a.x-p/2+(t.subtitle.offsetX||0),f=a.y+r/2+(t.subtitle.offsetY||0);n&&(f+=(c+x)/2),i.beginPath(),i.setFontSize(r),i.setFillStyle(h),i.fillText(l,g,f),i.closePath(),i.stroke()}if(n){var u=y(n,o),v=a.x-u/2+(t.title.offsetX||0),m=a.y+o/2+(t.title.offsetY||0);l&&(m-=(d+x)/2),i.beginPath(),i.setFontSize(o),i.setFillStyle(s),i.fillText(n,v,m),i.closePath(),i.stroke()}}function dt(t,e,i,a){var o=e.data;t.forEach((function(t,r){if(null!==t){a.beginPath(),a.setFontSize(e.textSize||i.fontSize),a.setFillStyle(e.textColor||"#666666");var n=o[r];"object"==typeof o[r]&&null!==o[r]&&(n=o[r].constructor==Array?o[r][1]:o[r].value);var l=e.format?e.format(n):n;a.fillText(l+"",t.x-y(l,e.textSize||i.fontSize)/2,t.y-4),a.closePath(),a.stroke()}}))}function xt(t,e,i,a,o,r){var n=Math.PI;e-=t.width/2+o.gaugeLabelTextMargin;for(var l=t.startAngle-t.endAngle+1,s=l/t.splitLine.splitNumber,h=t.endNumber-t.startNumber,c=h/t.splitLine.splitNumber,d=t.startAngle,x=t.startNumber,p=0;p<t.splitLine.splitNumber+1;p++){var g={x:e*Math.cos(d*n),y:e*Math.sin(d*n)},f=t.labelFormat?t.labelFormat(x):x;g.x+=i.x-y(f)/2,g.y+=i.y;var u=g.x,v=g.y;r.beginPath(),r.setFontSize(o.fontSize),r.setFillStyle(t.labelColor||"#666666"),r.fillText(f,u,v+o.fontSize/2),r.closePath(),r.stroke(),d+=s,2<=d&&(d%=2),x+=c}}function pt(t,e,i,a,o,n){var l=a.extra.radar||{};e+=o.radarLabelTextMargin,t.forEach((function(t,s){var h={x:e*Math.cos(t),y:e*Math.sin(t)},c=p(h.x,h.y,i),d=c.x,x=c.y;r.approximatelyEqual(h.x,0)?d-=y(a.categories[s]||"")/2:0>h.x&&(d-=y(a.categories[s]||"")),n.beginPath(),n.setFontSize(o.fontSize),n.setFillStyle(l.labelColor||"#666666"),n.fillText(a.categories[s]||"",d,x+o.fontSize/2),n.closePath(),n.stroke()}))}function gt(t,e,i,a,o,n){for(var l=Math.cos,s=Math.sin,h=Math.min,c=Math.max,d=Math.PI,x=i.pieChartLinePadding,f=[],u=null,v=t.map((function(t){var e=t.format?t.format(+t._proportion_.toFixed(2)):r.toFixed(100*t._proportion_.toFixed(4))+"%";t._rose_proportion_&&(t._proportion_=t._rose_proportion_);var i=2*d-(t._start_+2*d*t._proportion_/2),a=t.color,o=t._radius_;return{arc:i,text:e,color:a,radius:o,textColor:t.textColor,textSize:t.textSize}})),m=0;m<v.length;m++){var b=v[m],A=l(b.arc)*(b.radius+x),S=s(b.arc)*(b.radius+x),T=l(b.arc)*b.radius,P=s(b.arc)*b.radius,w=0<=A?A+i.pieChartTextPadding:A-i.pieChartTextPadding,_=S,L=y(b.text,b.textSize||i.fontSize),F=_;u&&r.isSameXCoordinateArea(u.start,{x:w})&&(F=0<w?h(_,u.start.y):0>A||0<_?c(_,u.start.y):h(_,u.start.y)),0>w&&(w-=L);var D={lineStart:{x:T,y:P},lineEnd:{x:A,y:S},start:{x:w,y:F},width:L,height:i.fontSize,text:b.text,color:b.color,textColor:b.textColor,textSize:b.textSize};u=g(D,u),f.push(u)}for(var R=0;R<f.length;R++){var k=f[R],C=p(k.lineStart.x,k.lineStart.y,n),M=p(k.lineEnd.x,k.lineEnd.y,n),z=p(k.start.x,k.start.y,n);a.setLineWidth(1*e.pixelRatio),a.setFontSize(i.fontSize),a.beginPath(),a.setStrokeStyle(k.color),a.setFillStyle(k.color),a.moveTo(C.x,C.y);var W=0>k.start.x?z.x+k.width:z.x,O=0>k.start.x?z.x-5:z.x+5;a.quadraticCurveTo(M.x,M.y,W,z.y),a.moveTo(C.x,C.y),a.stroke(),a.closePath(),a.beginPath(),a.moveTo(z.x+k.width,z.y),a.arc(W,z.y,2,0,2*d),a.closePath(),a.fill(),a.beginPath(),a.setFontSize(k.textSize||i.fontSize),a.setFillStyle(k.textColor||"#666666"),a.fillText(k.text,O,z.y+3),a.closePath(),a.stroke(),a.closePath()}}function ft(t,e,i,a){var o=e.extra.tooltip||{};o.gridType=null==o.gridType?"solid":o.gridType,o.dashLength=null==o.dashLength?4:o.dashLength;var r=e.area[0],l=e.height-e.area[2];if("dash"==o.gridType&&a.setLineDash([o.dashLength,o.dashLength]),a.setStrokeStyle(o.gridColor||"#cccccc"),a.setLineWidth(1*e.pixelRatio),a.beginPath(),a.moveTo(t,r),a.lineTo(t,l),a.stroke(),a.setLineDash([]),o.xAxisLabel){var s=e.categories[e.tooltip.index];a.setFontSize(i.fontSize);var h=y(s,i.fontSize),c=t-.5*h,d=l;a.beginPath(),a.setFillStyle(n(o.labelBgColor||i.toolTipBackground,o.labelBgOpacity||i.toolTipOpacity)),a.setStrokeStyle(o.labelBgColor||i.toolTipBackground),a.setLineWidth(1*e.pixelRatio),a.rect(c-i.toolTipPadding,d,h+2*i.toolTipPadding,i.fontSize+2*i.toolTipPadding),a.closePath(),a.stroke(),a.fill(),a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle(o.labelFontColor||i.fontColor),a.fillText(s+"",c,d+i.toolTipPadding+i.fontSize),a.closePath(),a.stroke()}}function ut(t,e,i){for(var a,r=o({},{type:"solid",dashLength:4,data:[]},t.extra.markLine),l=t.area[3],s=t.width-t.area[1],h=lt(r.data,t),c=0;c<h.length;c++)if(a=o({},{lineColor:"#DE4A42",showLabel:!1,labelFontColor:"#666666",labelBgColor:"#DFE8FF",labelBgOpacity:.8,yAxisIndex:0},h[c]),"dash"==r.type&&i.setLineDash([r.dashLength,r.dashLength]),i.setStrokeStyle(a.lineColor),i.setLineWidth(1*t.pixelRatio),i.beginPath(),i.moveTo(l,a.y),i.lineTo(s,a.y),i.stroke(),i.setLineDash([]),a.showLabel){var d=t.yAxis.format?t.yAxis.format(+a.value):a.value;i.setFontSize(e.fontSize);var x=y(d,e.fontSize),p=t.padding[3]+e.yAxisTitleWidth-e.toolTipPadding,g=Math.max(t.area[3],x+2*e.toolTipPadding),f=g-p,u=a.y;i.setFillStyle(n(a.labelBgColor,a.labelBgOpacity)),i.setStrokeStyle(a.labelBgColor),i.setLineWidth(1*t.pixelRatio),i.beginPath(),i.rect(p,u-.5*e.fontSize-e.toolTipPadding,f,e.fontSize+2*e.toolTipPadding),i.closePath(),i.stroke(),i.fill(),i.beginPath(),i.setFontSize(e.fontSize),i.setFillStyle(a.labelFontColor),i.fillText(d+"",p+(f-x)/2,u+.5*e.fontSize),i.stroke()}}function yt(t,e,i,a){var r=Math.max,l=o({},{gridType:"solid",dashLength:4},t.extra.tooltip),s=t.area[3],h=t.width-t.area[1];if("dash"==l.gridType&&i.setLineDash([l.dashLength,l.dashLength]),i.setStrokeStyle(l.gridColor||"#cccccc"),i.setLineWidth(1*t.pixelRatio),i.beginPath(),i.moveTo(s,t.tooltip.offset.y),i.lineTo(h,t.tooltip.offset.y),i.stroke(),i.setLineDash([]),l.yAxisLabel)for(var c=nt(t.tooltip.offset.y,t.series,t,e,a),d=t.chartData.yAxisData.yAxisWidth,x=t.area[3],p=t.width-t.area[1],g=0;g<c.length;g++){i.setFontSize(e.fontSize);var f=void 0,u=void 0,v=void 0,m=y(c[g],e.fontSize);"left"==d[g].position?(f=x-d[g].width,u=r(f,f+m+2*e.toolTipPadding)):(f=p,u=r(f+d[g].width,f+m+2*e.toolTipPadding)),v=u-f;var b=f+(v-m)/2,A=t.tooltip.offset.y;i.beginPath(),i.setFillStyle(n(l.labelBgColor||e.toolTipBackground,l.labelBgOpacity||e.toolTipOpacity)),i.setStrokeStyle(l.labelBgColor||e.toolTipBackground),i.setLineWidth(1*t.pixelRatio),i.rect(f,A-.5*e.fontSize-e.toolTipPadding,v,e.fontSize+2*e.toolTipPadding),i.closePath(),i.stroke(),i.fill(),i.beginPath(),i.setFontSize(e.fontSize),i.setFillStyle(l.labelFontColor||e.fontColor),i.fillText(c[g],b,A+.5*e.fontSize),i.closePath(),i.stroke(),"left"==d[g].position?x-=d[g].width+t.yAxis.padding:p+=d[g].width+t.yAxis.padding}}function vt(t,e,i,a,r){var l=o({},{activeBgColor:"#000000",activeBgOpacity:.08},e.extra.tooltip),s=e.area[0],h=e.height-e.area[2];a.beginPath(),a.setFillStyle(n(l.activeBgColor,l.activeBgOpacity)),a.rect(t-r/2,s,r,h-s),a.closePath(),a.fill()}function mt(t,e,i,a,r){var l=Math.round,s=o({},{showBox:!0,bgColor:"#000000",bgOpacity:.7,fontColor:"#FFFFFF"},i.extra.tooltip),h=4*i.pixelRatio,c=5*i.pixelRatio,d=8*i.pixelRatio,x=!1;("line"==i.type||"area"==i.type||"candle"==i.type||"mix"==i.type)&&ft(i.tooltip.offset.x,i,a,r),e=o({x:0,y:0},e),e.y-=8*i.pixelRatio;var p=t.map((function(t){return y(t.text,a.fontSize)})),g=h+c+4*a.toolTipPadding+Math.max.apply(null,p),f=2*a.toolTipPadding+t.length*a.toolTipLineHeight;0==s.showBox||(e.x-Math.abs(i._scrollDistance_)+d+g>i.width&&(x=!0),f+e.y>i.height&&(e.y=i.height-f),r.beginPath(),r.setFillStyle(n(s.bgColor||a.toolTipBackground,s.bgOpacity||a.toolTipOpacity)),x?(r.moveTo(e.x,e.y+10*i.pixelRatio),r.lineTo(e.x-d,e.y+10*i.pixelRatio-5*i.pixelRatio),r.lineTo(e.x-d,e.y),r.lineTo(e.x-d-l(g),e.y),r.lineTo(e.x-d-l(g),e.y+f),r.lineTo(e.x-d,e.y+f),r.lineTo(e.x-d,e.y+10*i.pixelRatio+5*i.pixelRatio),r.lineTo(e.x,e.y+10*i.pixelRatio)):(r.moveTo(e.x,e.y+10*i.pixelRatio),r.lineTo(e.x+d,e.y+10*i.pixelRatio-5*i.pixelRatio),r.lineTo(e.x+d,e.y),r.lineTo(e.x+d+l(g),e.y),r.lineTo(e.x+d+l(g),e.y+f),r.lineTo(e.x+d,e.y+f),r.lineTo(e.x+d,e.y+10*i.pixelRatio+5*i.pixelRatio),r.lineTo(e.x,e.y+10*i.pixelRatio)),r.closePath(),r.fill(),t.forEach((function(t,i){if(null!==t.color){r.beginPath(),r.setFillStyle(t.color);var o=e.x+d+2*a.toolTipPadding,n=e.y+(a.toolTipLineHeight-a.fontSize)/2+a.toolTipLineHeight*i+a.toolTipPadding+1;x&&(o=e.x-g-d+2*a.toolTipPadding),r.fillRect(o,n,h,a.fontSize),r.closePath()}})),t.forEach((function(t,i){var o=e.x+d+2*a.toolTipPadding+h+c;x&&(o=e.x-g-d+2*a.toolTipPadding+ +h+c);var n=e.y+(a.toolTipLineHeight-a.fontSize)/2+a.toolTipLineHeight*i+a.toolTipPadding;r.beginPath(),r.setFontSize(a.fontSize),r.setFillStyle(s.fontColor),r.fillText(t.text,o,n+a.fontSize),r.closePath(),r.stroke()})))}function bt(t,e,i,a){var r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,n=e.chartData.xAxisData,l=n.xAxisPoints,s=n.eachSpacing,h=o({},{type:"group",width:s/2,meter:{border:4,fillColor:"#FFFFFF"}},e.extra.column),c=[];a.save();var d=-2,x=l.length+2;return e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(a.translate(e._scrollDistance_,0),d=Math.floor(-e._scrollDistance_/s)-2,x=d+e.xAxis.itemCount+4),e.tooltip&&e.tooltip.textList&&e.tooltip.textList.length&&1===r&&vt(e.tooltip.offset.x,e,i,a,s),t.forEach((function(o,n){var p,g,f;p=[].concat(e.chartData.yAxisData.ranges[o.index]),g=p.pop(),f=p.shift();var u=o.data;switch(h.type){case"group":var y=it(u,g,f,l,s,e,i,r),v=at(u,g,f,l,s,e,i,n,t,r);c.push(v),y=Q(y,s,t.length,n,i,e);for(var m,b=0;b<y.length;b++)if(m=y[b],null!==m&&b>d&&b<x){a.beginPath(),a.setStrokeStyle(m.color||o.color),a.setLineWidth(1),a.setFillStyle(m.color||o.color);var A=m.x-m.width/2,S=e.height-m.y-e.area[2];a.moveTo(A,m.y),a.lineTo(A+m.width-2,m.y),a.lineTo(A+m.width-2,e.height-e.area[2]),a.lineTo(A,e.height-e.area[2]),a.lineTo(A,m.y),a.closePath(),a.stroke(),a.fill()}break;case"stack":y=at(u,g,f,l,s,e,i,n,t,r);c.push(y),y=V(y,s,t.length,n,i,e,t);for(var T,P=0;P<y.length;P++)if(T=y[P],null!==T&&P>d&&P<x){a.beginPath(),a.setFillStyle(T.color||o.color);A=T.x-T.width/2+1,S=e.height-T.y-e.area[2];var w=e.height-T.y0-e.area[2];0<n&&(S-=w),a.moveTo(A,T.y),a.fillRect(A,T.y,T.width-2,S),a.closePath(),a.fill()}break;case"meter":y=it(u,g,f,l,s,e,i,r);if(c.push(y),y=U(y,s,t.length,n,i,e,h.meter.border),0==n){for(var _,L=0;L<y.length;L++)if(_=y[L],null!==_&&L>d&&L<x){a.beginPath(),a.setFillStyle(h.meter.fillColor);A=_.x-_.width/2,S=e.height-_.y-e.area[2];a.moveTo(A,_.y),a.fillRect(A,_.y,_.width,S),a.closePath(),a.fill(),0<h.meter.border&&(a.beginPath(),a.setStrokeStyle(o.color),a.setLineWidth(h.meter.border*e.pixelRatio),a.moveTo(A+.5*h.meter.border,_.y+S),a.lineTo(A+.5*h.meter.border,_.y+.5*h.meter.border),a.lineTo(A+_.width-.5*h.meter.border,_.y+.5*h.meter.border),a.lineTo(A+_.width-.5*h.meter.border,_.y+S),a.stroke())}}else for(var F,D=0;D<y.length;D++)if(F=y[D],null!==F&&D>d&&D<x){a.beginPath(),a.setFillStyle(F.color||o.color);A=F.x-F.width/2,S=e.height-F.y-e.area[2];a.moveTo(A,F.y),a.fillRect(A,F.y,F.width,S),a.closePath(),a.fill()}}})),!1!==e.dataLabel&&1===r&&t.forEach((function(o,n){var c,d,x;c=[].concat(e.chartData.yAxisData.ranges[o.index]),d=c.pop(),x=c.shift();var p=o.data;switch(h.type){case"group":var g=it(p,d,x,l,s,e,i,r);g=Q(g,s,t.length,n,i,e),dt(g,o,i,a);break;case"stack":g=at(p,d,x,l,s,e,i,n,t,r);dt(g,o,i,a);break;case"meter":g=it(p,d,x,l,s,e,i,r);dt(g,o,i,a)}})),a.restore(),{xAxisPoints:l,calPoints:c,eachSpacing:s}}function At(t,e,i,a,r){var n=5<arguments.length&&void 0!==arguments[5]?arguments[5]:1,l=o({},{color:{},average:{}},i.extra.candle);l.color=o({},{upLine:"#f04864",upFill:"#f04864",downLine:"#2fc25b",downFill:"#2fc25b"},l.color),l.average=o({},{show:!1,name:[],day:[],color:a.colors},l.average),i.extra.candle=l;var s=i.chartData.xAxisData,h=s.xAxisPoints,c=s.eachSpacing,d=[];r.save();var p=-2,g=h.length+2,f=0,u=i.width+c;return i._scrollDistance_&&0!==i._scrollDistance_&&!0===i.enableScroll&&(r.translate(i._scrollDistance_,0),p=Math.floor(-i._scrollDistance_/c)-2,g=p+i.xAxis.itemCount+4,f=-i._scrollDistance_-c+i.area[3],u=f+(i.xAxis.itemCount+4)*c),l.average.show&&e.forEach((function(t){var e,o,l;e=[].concat(i.chartData.yAxisData.ranges[t.index]),o=e.pop(),l=e.shift();for(var s,d=t.data,p=it(d,o,l,h,c,i,a,n),g=E(p),y=0;y<g.length;y++){if(s=g[y],r.beginPath(),r.setStrokeStyle(t.color),r.setLineWidth(1),1===s.length)r.moveTo(s[0].x,s[0].y),r.arc(s[0].x,s[0].y,1,0,2*Math.PI);else{r.moveTo(s[0].x,s[0].y);for(var v,m=0,b=0;b<s.length;b++)if(v=s[b],0==m&&v.x>f&&(r.moveTo(v.x,v.y),m=1),0<b&&v.x>f&&v.x<u){var A=x(s,b-1);r.bezierCurveTo(A.ctrA.x,A.ctrA.y,A.ctrB.x,A.ctrB.y,v.x,v.y)}r.moveTo(s[0].x,s[0].y)}r.closePath(),r.stroke()}})),t.forEach((function(t){var e,o,s;e=[].concat(i.chartData.yAxisData.ranges[t.index]),o=e.pop(),s=e.shift();var x=t.data,f=et(x,o,s,h,c,i,a,n);d.push(f);for(var u=E(f),y=0;y<u[0].length;y++)if(y>p&&y<g){var v=u[0][y];r.beginPath(),0<x[y][1]-x[y][0]?(r.setStrokeStyle(l.color.upLine),r.setFillStyle(l.color.upFill),r.setLineWidth(1*i.pixelRatio),r.moveTo(v[3].x,v[3].y),r.lineTo(v[1].x,v[1].y),r.lineTo(v[1].x-c/4,v[1].y),r.lineTo(v[0].x-c/4,v[0].y),r.lineTo(v[0].x,v[0].y),r.lineTo(v[2].x,v[2].y),r.lineTo(v[0].x,v[0].y),r.lineTo(v[0].x+c/4,v[0].y),r.lineTo(v[1].x+c/4,v[1].y),r.lineTo(v[1].x,v[1].y),r.moveTo(v[3].x,v[3].y)):(r.setStrokeStyle(l.color.downLine),r.setFillStyle(l.color.downFill),r.setLineWidth(1*i.pixelRatio),r.moveTo(v[3].x,v[3].y),r.lineTo(v[0].x,v[0].y),r.lineTo(v[0].x-c/4,v[0].y),r.lineTo(v[1].x-c/4,v[1].y),r.lineTo(v[1].x,v[1].y),r.lineTo(v[2].x,v[2].y),r.lineTo(v[1].x,v[1].y),r.lineTo(v[1].x+c/4,v[1].y),r.lineTo(v[0].x+c/4,v[0].y),r.lineTo(v[0].x,v[0].y),r.moveTo(v[3].x,v[3].y)),r.closePath(),r.fill(),r.stroke()}})),r.restore(),{xAxisPoints:h,calPoints:d,eachSpacing:c}}function St(t,e,i,a){var r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,l=o({},{type:"straight",opacity:.2,addLine:!1,width:2,gradient:!1},e.extra.area),s=e.chartData.xAxisData,h=s.xAxisPoints,c=s.eachSpacing,d=e.height-e.area[2],p=[];a.save();var g=0,f=e.width+c;return e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(a.translate(e._scrollDistance_,0),g=-e._scrollDistance_-c+e.area[3],f=g+(e.xAxis.itemCount+4)*c),t.forEach((function(t){var o,s,u;o=[].concat(e.chartData.yAxisData.ranges[t.index]),s=o.pop(),u=o.shift();var y=t.data,v=it(y,s,u,h,c,e,i,r);p.push(v);for(var m,b=E(v),A=0;A<b.length;A++){if(m=b[A],a.beginPath(),a.setStrokeStyle(n(t.color,l.opacity)),l.gradient){var S=a.createLinearGradient(0,e.area[0],0,e.height-e.area[2]);S.addColorStop("0",n(t.color,l.opacity)),S.addColorStop("1.0",n("#FFFFFF",.1)),a.setFillStyle(S)}else a.setFillStyle(n(t.color,l.opacity));if(a.setLineWidth(l.width*e.pixelRatio),1<m.length){var T=m[0],P=m[m.length-1];a.moveTo(T.x,T.y);var w=0;if("curve"===l.type){for(var _,L=0;L<m.length;L++)if(_=m[L],0==w&&_.x>g&&(a.moveTo(_.x,_.y),w=1),0<L&&_.x>g&&_.x<f){var F=x(m,L-1);a.bezierCurveTo(F.ctrA.x,F.ctrA.y,F.ctrB.x,F.ctrB.y,_.x,_.y)}}else for(var D,R=0;R<m.length;R++)D=m[R],0==w&&D.x>g&&(a.moveTo(D.x,D.y),w=1),0<R&&D.x>g&&D.x<f&&a.lineTo(D.x,D.y);a.lineTo(P.x,d),a.lineTo(T.x,d),a.lineTo(T.x,T.y)}else{var k=m[0];a.moveTo(k.x-c/2,k.y),a.lineTo(k.x+c/2,k.y),a.lineTo(k.x+c/2,d),a.lineTo(k.x-c/2,d),a.moveTo(k.x-c/2,k.y)}if(a.closePath(),a.fill(),l.addLine){if("dash"==t.lineType){var C=t.dashLength?t.dashLength:8;C*=e.pixelRatio,a.setLineDash([C,C])}if(a.beginPath(),a.setStrokeStyle(t.color),a.setLineWidth(l.width*e.pixelRatio),1===m.length)a.moveTo(m[0].x,m[0].y),a.arc(m[0].x,m[0].y,1,0,2*Math.PI);else{a.moveTo(m[0].x,m[0].y);var M=0;if("curve"===l.type){for(var z,W=0;W<m.length;W++)if(z=m[W],0==M&&z.x>g&&(a.moveTo(z.x,z.y),M=1),0<W&&z.x>g&&z.x<f){var O=x(m,W-1);a.bezierCurveTo(O.ctrA.x,O.ctrA.y,O.ctrB.x,O.ctrB.y,z.x,z.y)}}else for(var I,B=0;B<m.length;B++)I=m[B],0==M&&I.x>g&&(a.moveTo(I.x,I.y),M=1),0<B&&I.x>g&&I.x<f&&a.lineTo(I.x,I.y);a.moveTo(m[0].x,m[0].y)}a.stroke(),a.setLineDash([])}}!1!==e.dataPointShape&&ht(v,t.color,t.pointShape,a,e)})),!1!==e.dataLabel&&1===r&&t.forEach((function(t){var o,n,l;o=[].concat(e.chartData.yAxisData.ranges[t.index]),n=o.pop(),l=o.shift();var s=t.data,d=it(s,n,l,h,c,e,i,r);dt(d,t,i,a)})),a.restore(),{xAxisPoints:h,calPoints:p,eachSpacing:c}}function Tt(t,e,i,a){var r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,n=o({},{type:"straight",width:2},e.extra.line);n.width*=e.pixelRatio;var l=e.chartData.xAxisData,s=l.xAxisPoints,h=l.eachSpacing,c=[];a.save();var d=0,p=e.width+h;return e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(a.translate(e._scrollDistance_,0),d=-e._scrollDistance_-h+e.area[3],p=d+(e.xAxis.itemCount+4)*h),t.forEach((function(t){var o,l,g;o=[].concat(e.chartData.yAxisData.ranges[t.index]),l=o.pop(),g=o.shift();var f=t.data,u=it(f,l,g,s,h,e,i,r);c.push(u);var y=E(u);if("dash"==t.lineType){var v=t.dashLength?t.dashLength:8;v*=e.pixelRatio,a.setLineDash([v,v])}a.beginPath(),a.setStrokeStyle(t.color),a.setLineWidth(n.width),y.forEach((function(t){if(1===t.length)a.moveTo(t[0].x,t[0].y),a.arc(t[0].x,t[0].y,1,0,2*Math.PI);else{a.moveTo(t[0].x,t[0].y);var e=0;if("curve"===n.type){for(var i,o=0;o<t.length;o++)if(i=t[o],0==e&&i.x>d&&(a.moveTo(i.x,i.y),e=1),0<o&&i.x>d&&i.x<p){var r=x(t,o-1);a.bezierCurveTo(r.ctrA.x,r.ctrA.y,r.ctrB.x,r.ctrB.y,i.x,i.y)}}else for(var l,s=0;s<t.length;s++)l=t[s],0==e&&l.x>d&&(a.moveTo(l.x,l.y),e=1),0<s&&l.x>d&&l.x<p&&a.lineTo(l.x,l.y);a.moveTo(t[0].x,t[0].y)}})),a.stroke(),a.setLineDash([]),!1!==e.dataPointShape&&ht(u,t.color,t.pointShape,a,e)})),!1!==e.dataLabel&&1===r&&t.forEach((function(t){var o,n,l;o=[].concat(e.chartData.yAxisData.ranges[t.index]),n=o.pop(),l=o.shift();var c=t.data,d=it(c,n,l,s,h,e,i,r);dt(d,t,i,a)})),a.restore(),{xAxisPoints:s,calPoints:c,eachSpacing:h}}function Pt(t,e,i,a){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,r=e.chartData.xAxisData,l=r.xAxisPoints,s=r.eachSpacing,h=e.height-e.area[2],c=[],d=0,p=0;t.forEach((function(t){"column"==t.type&&(p+=1)})),a.save();var g=-2,f=l.length+2,u=0,y=e.width+s;if(e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(a.translate(e._scrollDistance_,0),g=Math.floor(-e._scrollDistance_/s)-2,f=g+e.xAxis.itemCount+4,u=-e._scrollDistance_-s+e.area[3],y=u+(e.xAxis.itemCount+4)*s),t.forEach((function(t){var r,v,m;r=[].concat(e.chartData.yAxisData.ranges[t.index]),v=r.pop(),m=r.shift();var b=t.data,A=it(b,v,m,l,s,e,i,o);if(c.push(A),"column"==t.type){A=Q(A,s,p,d,i,e);for(var S,T=0;T<A.length;T++)if(S=A[T],null!==S&&T>g&&T<f){a.beginPath(),a.setStrokeStyle(S.color||t.color),a.setLineWidth(1),a.setFillStyle(S.color||t.color);var P=S.x-S.width/2;e.height,S.y,e.area[2];a.moveTo(P,S.y),a.moveTo(P,S.y),a.lineTo(P+S.width-2,S.y),a.lineTo(P+S.width-2,e.height-e.area[2]),a.lineTo(P,e.height-e.area[2]),a.lineTo(P,S.y),a.closePath(),a.stroke(),a.fill(),a.closePath(),a.fill()}d+=1}if("area"==t.type)for(var w,_=E(A),L=0;L<_.length;L++){if(w=_[L],a.beginPath(),a.setStrokeStyle(t.color),a.setFillStyle(n(t.color,.2)),a.setLineWidth(2*e.pixelRatio),1<w.length){var F=w[0],D=w[w.length-1];a.moveTo(F.x,F.y);var R=0;if("curve"===t.style){for(var k,C=0;C<w.length;C++)if(k=w[C],0==R&&k.x>u&&(a.moveTo(k.x,k.y),R=1),0<C&&k.x>u&&k.x<y){var M=x(w,C-1);a.bezierCurveTo(M.ctrA.x,M.ctrA.y,M.ctrB.x,M.ctrB.y,k.x,k.y)}}else for(var z,W=0;W<w.length;W++)z=w[W],0==R&&z.x>u&&(a.moveTo(z.x,z.y),R=1),0<W&&z.x>u&&z.x<y&&a.lineTo(z.x,z.y);a.lineTo(D.x,h),a.lineTo(F.x,h),a.lineTo(F.x,F.y)}else{var O=w[0];a.moveTo(O.x-s/2,O.y),a.lineTo(O.x+s/2,O.y),a.lineTo(O.x+s/2,h),a.lineTo(O.x-s/2,h),a.moveTo(O.x-s/2,O.y)}a.closePath(),a.fill()}if("line"==t.type){var I=E(A);I.forEach((function(i){if("dash"==t.lineType){var o=t.dashLength?t.dashLength:8;o*=e.pixelRatio,a.setLineDash([o,o])}if(a.beginPath(),a.setStrokeStyle(t.color),a.setLineWidth(2*e.pixelRatio),1===i.length)a.moveTo(i[0].x,i[0].y),a.arc(i[0].x,i[0].y,1,0,2*Math.PI);else{a.moveTo(i[0].x,i[0].y);var r=0;if("curve"==t.style){for(var n,l=0;l<i.length;l++)if(n=i[l],0==r&&n.x>u&&(a.moveTo(n.x,n.y),r=1),0<l&&n.x>u&&n.x<y){var s=x(i,l-1);a.bezierCurveTo(s.ctrA.x,s.ctrA.y,s.ctrB.x,s.ctrB.y,n.x,n.y)}}else for(var h,c=0;c<i.length;c++)h=i[c],0==r&&h.x>u&&(a.moveTo(h.x,h.y),r=1),0<c&&h.x>u&&h.x<y&&a.lineTo(h.x,h.y);a.moveTo(i[0].x,i[0].y)}a.stroke(),a.setLineDash([])}))}"point"==t.type&&(t.addPoint=!0),1==t.addPoint&&"column"!==t.type&&ht(A,t.color,t.pointShape,a,e)})),!1!==e.dataLabel&&1===o){d=0;t.forEach((function(t){var r,n,h;r=[].concat(e.chartData.yAxisData.ranges[t.index]),n=r.pop(),h=r.shift();var c=t.data,x=it(c,n,h,l,s,e,i,o);"column"===t.type?(x=Q(x,s,p,d,i,e),dt(x,t,i,a),d+=1):dt(x,t,i,a)}))}return a.restore(),{xAxisPoints:l,calPoints:c,eachSpacing:s}}function wt(t,e,i,a,o,r){var n=t.extra.tooltip||{};n.horizentalLine&&t.tooltip&&1===a&&("line"==t.type||"area"==t.type||"column"==t.type||"candle"==t.type||"mix"==t.type)&&yt(t,e,i,o,r),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&&mt(t.tooltip.textList,t.tooltip.offset,t,e,i,o,r),i.restore()}function _t(t,e,i,a){var o=Math.ceil,r=e.chartData.xAxisData,n=r.xAxisPoints,l=r.startX,s=r.endX,h=r.eachSpacing,c="center";("line"==e.type||"area"==e.type)&&(c=e.xAxis.boundaryGap);var x=e.height-e.area[2],p=e.area[0];if(e.enableScroll&&e.xAxis.scrollShow){var g=e.height-e.area[2]+i.xAxisHeight,f=s-l,u=h*(n.length-1),v=0;e._scrollDistance_&&(v=-e._scrollDistance_*f/u),a.beginPath(),a.setLineCap("round"),a.setLineWidth(6*e.pixelRatio),a.setStrokeStyle(e.xAxis.scrollBackgroundColor||"#EFEBEF"),a.moveTo(l,g),a.lineTo(s,g),a.stroke(),a.closePath(),a.beginPath(),a.setLineCap("round"),a.setLineWidth(6*e.pixelRatio),a.setStrokeStyle(e.xAxis.scrollColor||"#A6A6A6"),a.moveTo(l+v,g),a.lineTo(l+v+f*f/u,g),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.pixelRatio),n.forEach((function(t,i){0<i&&(a.beginPath(),a.moveTo(t-h/2,x),a.lineTo(t-h/2,x+3*e.pixelRatio),a.closePath(),a.stroke())}))),!0!==e.xAxis.disableGrid&&(a.setStrokeStyle(e.xAxis.gridColor||"#cccccc"),a.setLineCap("butt"),a.setLineWidth(1*e.pixelRatio),"dash"==e.xAxis.gridType&&a.setLineDash([e.xAxis.dashLength,e.xAxis.dashLength]),e.xAxis.gridEval=e.xAxis.gridEval||1,n.forEach((function(t,i){0==i%e.xAxis.gridEval&&(a.beginPath(),a.moveTo(t,x),a.lineTo(t,p),a.stroke())})),a.setLineDash([])),!0!==e.xAxis.disabled){var m=t.length;e.xAxis.labelCount&&(m=e.xAxis.itemCount?o(t.length/e.xAxis.itemCount*e.xAxis.labelCount):e.xAxis.labelCount,m-=1);for(var b=o(t.length/m),A=[],S=t.length,T=0;T<S;T++)0==T%b?A.push(t[T]):A.push("");A[S-1]=t[S-1];var P=e.xAxis.fontSize||i.fontSize;0===i._xAxisTextAngle_?A.forEach((function(t,o){var r=-y(t+"",P)/2;"center"==c&&(r+=h/2);var l=0;e.xAxis.scrollShow&&(l=6*e.pixelRatio),a.beginPath(),a.setFontSize(P),a.setFillStyle(e.xAxis.fontColor||"#666666"),a.fillText(t+"",n[o]+r,x+P+(i.xAxisHeight-l-P)/2),a.closePath(),a.stroke()})):A.forEach((function(t,o){a.save(),a.beginPath(),a.setFontSize(P),a.setFillStyle(e.xAxis.fontColor||"#666666");var r=y(t+"",P),l=-r;"center"==c&&(l+=h/2);var s=d(n[o]+h/2,x+P/2+5,e.height),p=s.transX,g=s.transY;a.rotate(-1*i._xAxisTextAngle_),a.translate(p,g),a.fillText(t+"",n[o]+l,x+P+5),a.closePath(),a.stroke(),a.restore()}))}a.restore(),e.xAxis.axisLine&&(a.beginPath(),a.setStrokeStyle(e.xAxis.axisLineColor),a.setLineWidth(1*e.pixelRatio),a.moveTo(l,e.height-e.area[2]),a.lineTo(s,e.height-e.area[2]),a.stroke())}function Lt(t,e,i,a){if(!0!==e.yAxis.disableGrid){for(var o=e.height-e.area[0]-e.area[2],r=o/e.yAxis.splitNumber,n=e.area[3],l=e.chartData.xAxisData.xAxisPoints,s=e.chartData.xAxisData.eachSpacing,h=s*(l.length-1),c=[],d=0;d<e.yAxis.splitNumber+1;d++)c.push(e.height-e.area[2]-r*d);a.save(),e._scrollDistance_&&0!==e._scrollDistance_&&a.translate(e._scrollDistance_,0),"dash"==e.yAxis.gridType&&a.setLineDash([e.yAxis.dashLength,e.yAxis.dashLength]),a.setStrokeStyle(e.yAxis.gridColor),a.setLineWidth(1*e.pixelRatio),c.forEach((function(t){a.beginPath(),a.moveTo(n,t),a.lineTo(n+h,t),a.stroke()})),a.setLineDash([]),a.restore()}}function Ft(t,e,i,a){if(!0!==e.yAxis.disabled){var o=e.height-e.area[0]-e.area[2],r=o/e.yAxis.splitNumber,n=e.area[3],l=e.width-e.area[1],s=e.height-e.area[2],h=s+i.xAxisHeight;e.xAxis.scrollShow&&(h-=3*e.pixelRatio),e.xAxis.rotateLabel&&(h=e.height-e.area[2]+3),a.beginPath(),a.setFillStyle(e.background||"#ffffff"),0>e._scrollDistance_&&a.fillRect(0,0,n,h),1==e.enableScroll&&a.fillRect(l,0,e.width,h),a.closePath(),a.stroke();for(var c=[],d=0;d<=e.yAxis.splitNumber;d++)c.push(e.area[0]+r*d);for(var x,p=e.area[3],g=e.width-e.area[1],f=function(t,o){if(t=e.yAxis.data[o],!0!==t.disabled){var r=e.chartData.yAxisData.rangesFormat[o],n=t.fontSize||i.fontSize,l=e.chartData.yAxisData.yAxisWidth[o];if(r.forEach((function(i,o){var r=c[o]?c[o]:s;a.beginPath(),a.setFontSize(n),a.setLineWidth(1*e.pixelRatio),a.setStrokeStyle(t.axisLineColor||"#cccccc"),a.setFillStyle(t.fontColor||"#666666"),"left"==l.position?(a.fillText(i+"",p-l.width,r+n/2),1==t.calibration&&(a.moveTo(p,r),a.lineTo(p-3*e.pixelRatio,r))):(a.fillText(i+"",g+4*e.pixelRatio,r+n/2),1==t.calibration&&(a.moveTo(g,r),a.lineTo(g+3*e.pixelRatio,r))),a.closePath(),a.stroke()})),!1!==t.axisLine&&(a.beginPath(),a.setStrokeStyle(t.axisLineColor||"#cccccc"),a.setLineWidth(1*e.pixelRatio),"left"==l.position?(a.moveTo(p,e.height-e.area[2]),a.lineTo(p,e.area[0])):(a.moveTo(g,e.height-e.area[2]),a.lineTo(g,e.area[0])),a.stroke()),e.yAxis.showTitle){var h=t.titleFontSize||i.fontSize,d=t.title;a.beginPath(),a.setFontSize(h),a.setFillStyle(t.titleFontColor||"#666666"),"left"==l.position?a.fillText(d,p-y(d,h)/2,e.area[0]-10*e.pixelRatio):a.fillText(d,g-y(d,h)/2,e.area[0]-10*e.pixelRatio),a.closePath(),a.stroke()}"left"==l.position?p-=l.width+e.yAxis.padding:g+=l.width+e.yAxis.padding}x=t},u=0;u<e.yAxis.data.length;u++)f(x,u)}}function Dt(t,e,i,a,o){if(!1!==e.legend.show){var r=o.legendData,n=r.points,l=r.area,s=e.legend.padding,h=e.legend.fontSize,c=15*e.pixelRatio,d=5*e.pixelRatio,x=e.legend.itemGap,p=Math.max(e.legend.lineHeight*e.pixelRatio,h);a.beginPath(),a.setLineWidth(e.legend.borderWidth),a.setStrokeStyle(e.legend.borderColor),a.setFillStyle(e.legend.backgroundColor),a.moveTo(l.start.x,l.start.y),a.rect(l.start.x,l.start.y,l.width,l.height),a.closePath(),a.fill(),a.stroke(),n.forEach((function(t,o){var n=0,g=0;n=r.widthArr[o],g=r.heightArr[o];var f=0,u=0;"top"==e.legend.position||"bottom"==e.legend.position?(f=l.start.x+(l.width-n)/2,u=l.start.y+s+o*p):(n=0==o?0:r.widthArr[o-1],f=l.start.x+s+n,u=l.start.y+s+(l.height-g)/2),a.setFontSize(i.fontSize);for(var v,m=0;m<t.length;m++){switch(v=t[m],v.area=[0,0,0,0],v.area[0]=f,v.area[1]=u,v.area[3]=u+p,a.beginPath(),a.setLineWidth(1*e.pixelRatio),a.setStrokeStyle(v.show?v.color:e.legend.hiddenColor),a.setFillStyle(v.show?v.color:e.legend.hiddenColor),v.legendShape){case"line":a.moveTo(f,u+.5*p-2*e.pixelRatio),a.fillRect(f,u+.5*p-2*e.pixelRatio,15*e.pixelRatio,4*e.pixelRatio);break;case"triangle":a.moveTo(f+7.5*e.pixelRatio,u+.5*p-5*e.pixelRatio),a.lineTo(f+2.5*e.pixelRatio,u+.5*p+5*e.pixelRatio),a.lineTo(f+12.5*e.pixelRatio,u+.5*p+5*e.pixelRatio),a.lineTo(f+7.5*e.pixelRatio,u+.5*p-5*e.pixelRatio);break;case"diamond":a.moveTo(f+7.5*e.pixelRatio,u+.5*p-5*e.pixelRatio),a.lineTo(f+2.5*e.pixelRatio,u+.5*p),a.lineTo(f+7.5*e.pixelRatio,u+.5*p+5*e.pixelRatio),a.lineTo(f+12.5*e.pixelRatio,u+.5*p),a.lineTo(f+7.5*e.pixelRatio,u+.5*p-5*e.pixelRatio);break;case"circle":a.moveTo(f+7.5*e.pixelRatio,u+.5*p),a.arc(f+7.5*e.pixelRatio,u+.5*p,5*e.pixelRatio,0,2*Math.PI);break;case"rect":a.moveTo(f,u+.5*p-5*e.pixelRatio),a.fillRect(f,u+.5*p-5*e.pixelRatio,15*e.pixelRatio,10*e.pixelRatio);break;default:a.moveTo(f,u+.5*p-5*e.pixelRatio),a.fillRect(f,u+.5*p-5*e.pixelRatio,15*e.pixelRatio,10*e.pixelRatio)}a.closePath(),a.fill(),a.stroke(),f+=c+d,a.beginPath(),a.setFontSize(h),a.setFillStyle(v.show?e.legend.fontColor:e.legend.hiddenColor),a.fillText(v.name,f,u+(.5*p+.5*h-2)),a.closePath(),a.stroke(),"top"==e.legend.position||"bottom"==e.legend.position?(f+=y(v.name,h)+x,v.area[2]=f):(v.area[2]=f+y(v.name,h)+x,f-=c+d,u+=p)}}))}}function Rt(t,e,i,a){var r=Math.PI,l=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,s=o({},{activeOpacity:.5,activeRadius:10*e.pixelRatio,offsetAngle:0,labelWidth:15*e.pixelRatio,ringWidth:0,border:!1,borderWidth:2,borderColor:"#FFFFFF"},e.extra.pie),h={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=s.activeRadius);var c=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);t=j(t,c,l);var d=s.activeRadius;if(t=t.map((function(t){return t._start_+=s.offsetAngle*r/180,t})),t.forEach((function(t,i){e.tooltip&&e.tooltip.index==i&&(a.beginPath(),a.setFillStyle(n(t.color,e.extra.pie.activeOpacity||.5)),a.moveTo(h.x,h.y),a.arc(h.x,h.y,t._radius_+d,t._start_,t._start_+2*t._proportion_*r),a.closePath(),a.fill()),a.beginPath(),a.setLineWidth(s.borderWidth*e.pixelRatio),a.lineJoin="round",a.setStrokeStyle(s.borderColor),a.setFillStyle(t.color),a.moveTo(h.x,h.y),a.arc(h.x,h.y,t._radius_,t._start_,t._start_+2*t._proportion_*r),a.closePath(),a.fill(),1==s.border&&a.stroke()})),"ring"===e.type){var x=.6*c;"number"==typeof e.extra.pie.ringWidth&&0<e.extra.pie.ringWidth&&(x=Math.max(0,c-e.extra.pie.ringWidth)),a.beginPath(),a.setFillStyle(e.background||"#ffffff"),a.moveTo(h.x,h.y),a.arc(h.x,h.y,x,0,2*r),a.closePath(),a.fill()}if(!1!==e.dataLabel&&1===l){for(var p=!1,g=0,f=t.length;g<f;g++)if(0<t[g].data){p=!0;break}p&&gt(t,e,i,a,c,h)}return 1===l&&"ring"===e.type&&ct(e,i,a,h),{center:h,radius:c,series:t}}function kt(t,e,i,a){var r=Math.PI,l=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,s=o({},{type:"area",activeOpacity:.5,activeRadius:10*e.pixelRatio,offsetAngle:0,labelWidth:15*e.pixelRatio,border:!1,borderWidth:2,borderColor:"#FFFFFF"},e.extra.rose);0==i.pieChartLinePadding&&(i.pieChartLinePadding=s.activeRadius);var h={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},c=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),d=s.minRadius||.5*c;t=Y(t,s.type,d,c,l);var x=s.activeRadius;if(t=t.map((function(t){return t._start_+=(s.offsetAngle||0)*r/180,t})),t.forEach((function(t,i){e.tooltip&&e.tooltip.index==i&&(a.beginPath(),a.setFillStyle(n(t.color,s.activeOpacity||.5)),a.moveTo(h.x,h.y),a.arc(h.x,h.y,x+t._radius_,t._start_,t._start_+2*t._rose_proportion_*r),a.closePath(),a.fill()),a.beginPath(),a.setLineWidth(s.borderWidth*e.pixelRatio),a.lineJoin="round",a.setStrokeStyle(s.borderColor),a.setFillStyle(t.color),a.moveTo(h.x,h.y),a.arc(h.x,h.y,t._radius_,t._start_,t._start_+2*t._rose_proportion_*r),a.closePath(),a.fill(),1==s.border&&a.stroke()})),!1!==e.dataLabel&&1===l){for(var p=!1,g=0,f=t.length;g<f;g++)if(0<t[g].data){p=!0;break}p&&gt(t,e,i,a,c,h)}return{center:h,radius:c,series:t}}function Ct(t,e,i,a){var r=Math.PI,n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,l=o({},{startAngle:.75,endAngle:.25,type:"default",width:12*e.pixelRatio,gap:2*e.pixelRatio},e.extra.arcbar);t=$(t,l,n);var s,h=l.center?l.center:{x:e.width/2,y:e.height/2};l.radius?s=l.radius:(s=Math.min(h.x,h.y),s-=5*e.pixelRatio,s-=l.width/2);for(var c,d=0;d<t.length;d++)c=t[d],a.setLineWidth(l.width),a.setStrokeStyle(l.backgroundColor||"#E9E9E9"),a.setLineCap("round"),a.beginPath(),"default"==l.type?a.arc(h.x,h.y,s-(l.width+l.gap)*d,l.startAngle*r,l.endAngle*r,!1):a.arc(h.x,h.y,s-(l.width+l.gap)*d,0,2*r,!1),a.stroke(),a.setLineWidth(l.width),a.setStrokeStyle(c.color),a.setLineCap("round"),a.beginPath(),a.arc(h.x,h.y,s-(l.width+l.gap)*d,l.startAngle*r,c._proportion_*r,!1),a.stroke();return ct(e,i,a,h),{center:h,radius:s,series:t}}function Mt(t,e,i,a,r){var l=Math.PI,s=5<arguments.length&&void 0!==arguments[5]?arguments[5]:1,h=o({},{type:"default",startAngle:.75,endAngle:.25,width:15,splitLine:{fixRadius:0,splitNumber:10,width:15,color:"#FFFFFF",childNumber:5,childWidth:5},pointer:{width:15,color:"auto"}},i.extra.gauge);null==h.oldAngle&&(h.oldAngle=h.startAngle),null==h.oldData&&(h.oldData=0),t=q(t,h.startAngle,h.endAngle);var c={x:i.width/2,y:i.height/2},d=Math.min(c.x,c.y);d-=5*i.pixelRatio,d-=h.width/2;var x=d-h.width,p=0;if("progress"==h.type){var g=d-3*h.width;r.beginPath();var f=r.createLinearGradient(c.x,c.y-g,c.x,c.y+g);f.addColorStop("0",n(e[0].color,.3)),f.addColorStop("1.0",n("#FFFFFF",.1)),r.setFillStyle(f),r.arc(c.x,c.y,g,0,2*l,!1),r.fill(),r.setLineWidth(h.width),r.setStrokeStyle(n(e[0].color,.3)),r.setLineCap("round"),r.beginPath(),r.arc(c.x,c.y,x,h.startAngle*l,h.endAngle*l,!1),r.stroke(),p=h.startAngle-h.endAngle+1;h.splitLine.splitNumber;var u=p/h.splitLine.splitNumber/h.splitLine.childNumber,y=-d-.5*h.width-h.splitLine.fixRadius,v=-d-h.width-h.splitLine.fixRadius+h.splitLine.width;r.save(),r.translate(c.x,c.y),r.rotate((h.startAngle-1)*l);for(var m=h.splitLine.splitNumber*h.splitLine.childNumber+1,b=e[0].data*s,A=0;A<m;A++)r.beginPath(),b>A/m?r.setStrokeStyle(n(e[0].color,1)):r.setStrokeStyle(n(e[0].color,.3)),r.setLineWidth(3*i.pixelRatio),r.moveTo(y,0),r.lineTo(v,0),r.stroke(),r.rotate(u*l);r.restore(),e=$(e,h,s),r.setLineWidth(h.width),r.setStrokeStyle(e[0].color),r.setLineCap("round"),r.beginPath(),r.arc(c.x,c.y,x,h.startAngle*l,e[0]._proportion_*l,!1),r.stroke();var S=d-2.5*h.width;r.save(),r.translate(c.x,c.y),r.rotate((e[0]._proportion_-1)*l),r.beginPath(),r.setLineWidth(h.width/3);var T=r.createLinearGradient(0,.6*-S,0,.6*S);T.addColorStop("0",n("#FFFFFF",0)),T.addColorStop("0.5",n(e[0].color,1)),T.addColorStop("1.0",n("#FFFFFF",0)),r.setStrokeStyle(T),r.arc(0,0,S,.85*l,1.15*l,!1),r.stroke(),r.beginPath(),r.setLineWidth(1),r.setStrokeStyle(e[0].color),r.setFillStyle(e[0].color),r.moveTo(-S-h.width/3/2,-4),r.lineTo(-S-h.width/3/2-4,0),r.lineTo(-S-h.width/3/2,4),r.lineTo(-S-h.width/3/2,-4),r.stroke(),r.fill(),r.restore()}else{r.setLineWidth(h.width),r.setLineCap("butt");for(var P,w=0;w<t.length;w++)P=t[w],r.beginPath(),r.setStrokeStyle(P.color),r.arc(c.x,c.y,d,P._startAngle_*l,P._endAngle_*l,!1),r.stroke();r.save(),p=h.startAngle-h.endAngle+1;var _=p/h.splitLine.splitNumber,L=p/h.splitLine.splitNumber/h.splitLine.childNumber,F=-d-.5*h.width-h.splitLine.fixRadius,D=-d-.5*h.width-h.splitLine.fixRadius+h.splitLine.width,R=-d-.5*h.width-h.splitLine.fixRadius+h.splitLine.childWidth;r.translate(c.x,c.y),r.rotate((h.startAngle-1)*l);for(var k=0;k<h.splitLine.splitNumber+1;k++)r.beginPath(),r.setStrokeStyle(h.splitLine.color),r.setLineWidth(2*i.pixelRatio),r.moveTo(F,0),r.lineTo(D,0),r.stroke(),r.rotate(_*l);r.restore(),r.save(),r.translate(c.x,c.y),r.rotate((h.startAngle-1)*l);for(var C=0;C<h.splitLine.splitNumber*h.splitLine.childNumber+1;C++)r.beginPath(),r.setStrokeStyle(h.splitLine.color),r.setLineWidth(1*i.pixelRatio),r.moveTo(F,0),r.lineTo(R,0),r.stroke(),r.rotate(L*l);r.restore(),e=Z(e,t,h,s);for(var M,z=0;z<e.length;z++)M=e[z],r.save(),r.translate(c.x,c.y),r.rotate((M._proportion_-1)*l),r.beginPath(),r.setFillStyle(M.color),r.moveTo(h.pointer.width,0),r.lineTo(0,-h.pointer.width/2),r.lineTo(-x,0),r.lineTo(0,h.pointer.width/2),r.lineTo(h.pointer.width,0),r.closePath(),r.fill(),r.beginPath(),r.setFillStyle("#FFFFFF"),r.arc(0,0,h.pointer.width/6,0,2*l,!1),r.fill(),r.restore();!1!==i.dataLabel&&xt(h,d,c,i,a,r)}return ct(i,a,r,c),1===s&&"gauge"===i.type&&(i.extra.gauge.oldAngle=e[0]._proportion_,i.extra.gauge.oldData=e[0].data),{center:c,radius:d,innerRadius:x,categories:t,totalAngle:p}}function zt(t,e,i,a){var r=Math.cos,l=Math.sin,s=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,h=o({},{gridColor:"#cccccc",labelColor:"#666666",opacity:.2,gridCount:3},e.extra.radar),c=T(e.categories.length),d={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},x=Math.min(d.x-(S(e.categories)+i.radarLabelTextMargin),d.y-i.radarLabelTextMargin);x-=e.padding[1],a.beginPath(),a.setLineWidth(1*e.pixelRatio),a.setStrokeStyle(h.gridColor),c.forEach((function(t){var e=p(x*r(t),x*l(t),d);a.moveTo(d.x,d.y),a.lineTo(e.x,e.y)})),a.stroke(),a.closePath();for(var g=function(t){var i={};a.beginPath(),a.setLineWidth(1*e.pixelRatio),a.setStrokeStyle(h.gridColor),c.forEach((function(e,o){var n=p(x/h.gridCount*t*r(e),x/h.gridCount*t*l(e),d);0===o?(i=n,a.moveTo(n.x,n.y)):a.lineTo(n.x,n.y)})),a.lineTo(i.x,i.y),a.stroke(),a.closePath()},f=1;f<=h.gridCount;f++)g(f);var u=G(c,d,x,t,e,s);return u.forEach((function(t){if(a.beginPath(),a.setFillStyle(n(t.color,h.opacity)),t.data.forEach((function(t,e){0===e?a.moveTo(t.position.x,t.position.y):a.lineTo(t.position.x,t.position.y)})),a.closePath(),a.fill(),!1!==e.dataPointShape){var i=t.data.map((function(t){return t.position}));ht(i,t.color,t.pointShape,a,e)}})),pt(c,x,d,e,i,a),{center:d,radius:x,angleList:c}}function Wt(t,e,i){i=0==i?1:i;for(var a=[],o=0;o<i;o++)a[o]=Math.random();return Math.floor(a.reduce((function(t,e){return t+e}))/i*(e-t))+t}function Ot(t,e,i,a){for(var o=!1,r=0;r<e.length;r++)if(e[r].area){if(!(t[3]<e[r].area[1]||t[0]>e[r].area[2]||t[1]>e[r].area[3]||t[2]<e[r].area[0])){o=!0;break}if(0>t[0]||0>t[1]||t[2]>i||t[3]>a){o=!0;break}o=!1}return o}function It(t){for(var e,i,a={xMin:180,xMax:0,yMin:90,yMax:0},o=0;o<t.length;o++){i=t[o].geometry.coordinates;for(var r=0;r<i.length;r++){e=i[r],1==e.length&&(e=e[0]);for(var n=0;n<e.length;n++){var l=e[n][0],s=e[n][1],h={x:l,y:s};a.xMin=a.xMin<h.x?a.xMin:h.x,a.xMax=a.xMax>h.x?a.xMax:h.x,a.yMin=a.yMin<h.y?a.yMin:h.y,a.yMax=a.yMax>h.y?a.yMax:h.y}}}return a}function Et(t,e,i,a,o,r){return{x:(e-i.xMin)*a+o,y:(i.yMax-t)*a+r}}function Bt(t,e,i,a,o,r){return{x:(e-o)/a+i.xMin,y:i.yMax-(t-r)/a}}function Ht(t,e,i){if(e[1]==i[1])return!1;if(e[1]>t[1]&&i[1]>t[1])return!1;if(e[1]<t[1]&&i[1]<t[1])return!1;if(e[1]==t[1]&&i[1]>t[1])return!1;if(i[1]==t[1]&&e[1]>t[1])return!1;if(e[0]<t[0]&&i[1]<t[1])return!1;var a=i[0]-(i[0]-e[0])*(i[1]-t[1])/(i[1]-e[1]);return!(a<t[0])}function Nt(t,e){for(var i,a=0,o=0;o<e.length;o++){i=e[o][0],1==e.length&&(i=e[o][0]);for(var r=0;r<i.length-1;r++){var n=i[r],l=i[r+1];Ht(t,n,l)&&(a+=1)}}return!(1!=a%2)}function Xt(t,e,i,a){var r,l,s=Math.abs,h=o({},{border:!0,borderWidth:1,borderColor:"#666666",fillOpacity:.6,activeBorderColor:"#f04864",activeFillColor:"#facc14",activeFillOpacity:1},e.extra.map),c=t,d=It(c),x=e.width/s(d.xMax-d.xMin),p=e.height/s(d.yMax-d.yMin),g=x<p?x:p,f=e.width/2-s(d.xMax-d.xMin)/2*g,u=e.height/2-s(d.yMax-d.yMin)/2*g;a.beginPath(),a.clearRect(0,0,e.width,e.height),a.setFillStyle(e.background||"#FFFFFF"),a.rect(0,0,e.width,e.height),a.fill();for(var v=0;v<c.length;v++){a.beginPath(),a.setLineWidth(h.borderWidth*e.pixelRatio),a.setStrokeStyle(h.borderColor),a.setFillStyle(n(t[v].color,h.fillOpacity)),e.tooltip&&e.tooltip.index==v&&(a.setStrokeStyle(h.activeBorderColor),a.setFillStyle(n(h.activeFillColor,h.activeFillOpacity)));for(var m=c[v].geometry.coordinates,b=0;b<m.length;b++){r=m[b],1==r.length&&(r=r[0]);for(var A=0;A<r.length;A++)l=Et(r[A][1],r[A][0],d,g,f,u),0==A?(a.beginPath(),a.moveTo(l.x,l.y)):a.lineTo(l.x,l.y);a.fill(),1==h.border&&a.stroke()}if(1==e.dataLabel){var S=c[v].properties.centroid;if(S){l=Et(S[1],S[0],d,g,f,u);var T=c[v].textSize||i.fontSize,P=c[v].properties.name;a.beginPath(),a.setFontSize(T),a.setFillStyle(c[v].textColor||"#666666"),a.fillText(P,l.x-y(P,T)/2,l.y+T/2),a.closePath(),a.stroke()}}}e.chartData.mapData={bounds:d,scale:g,xoffset:f,yoffset:u},wt(e,i,a,1),a.draw()}function Gt(t,e){var i=t.series.sort((function(t,e){return parseInt(e.textSize)-parseInt(t.textSize)}));switch(e){case"normal":for(var a=0;a<i.length;a++){for(var o=void 0,r=void 0,n=void 0,l=i[a].name,s=i[a].textSize,h=y(l,s),c=0;;){c++,o=Wt(-t.width/2,t.width/2,5)-h/2,r=Wt(-t.height/2,t.height/2,5)+s/2,n=[o-5+t.width/2,r-5-s+t.height/2,o+h+5+t.width/2,r+5+t.height/2];var d=Ot(n,i,t.width,t.height);if(!d)break;if(1e3==c){n=[-100,-100,-100,-100];break}}i[a].area=n}break;case"vertical":for(var x=function(){return!!(.7<Math.random())},p=0;p<i.length;p++){for(var g=void 0,f=void 0,u=void 0,v=void 0,m=i[p].name,b=i[p].textSize,A=y(m,b),S=x(),T=0;;){T++;var P=void 0;if(S?(g=Wt(-t.width/2,t.width/2,5)-A/2,f=Wt(-t.height/2,t.height/2,5)+b/2,u=[f-5-A+t.width/2,-g-5+t.height/2,f+5+t.width/2,-g+b+5+t.height/2],v=[t.width-(t.width/2-t.height/2)-(-g+b+5+t.height/2)-5,t.height/2-t.width/2+(f-5-A+t.width/2)-5,t.width-(t.width/2-t.height/2)-(-g+b+5+t.height/2)+b,t.height/2-t.width/2+(f-5-A+t.width/2)+A+5],P=Ot(v,i,t.height,t.width)):(g=Wt(-t.width/2,t.width/2,5)-A/2,f=Wt(-t.height/2,t.height/2,5)+b/2,u=[g-5+t.width/2,f-5-b+t.height/2,g+A+5+t.width/2,f+5+t.height/2],P=Ot(u,i,t.width,t.height)),!P)break;if(1e3==T){u=[-1e3,-1e3,-1e3,-1e3];break}}S?(i[p].area=v,i[p].areav=u):i[p].area=u,i[p].rotate=S}}return i}function jt(t,e,i,a){var r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1;o({},{type:"normal",autoColors:!0},e.extra.word);a.beginPath(),a.setFillStyle(e.background||"#FFFFFF"),a.rect(0,0,e.width,e.height),a.fill(),a.save();var n=e.chartData.wordCloudData;a.translate(e.width/2,e.height/2);for(var l=0;l<n.length;l++){a.save(),n[l].rotate&&a.rotate(90*Math.PI/180);var s=n[l].name,h=n[l].textSize,c=y(s,h);a.beginPath(),a.setStrokeStyle(n[l].color),a.setFillStyle(n[l].color),a.setFontSize(h),n[l].rotate?0<n[l].areav[0]&&(e.tooltip&&e.tooltip.index==l?a.strokeText(s,(n[l].areav[0]+5-e.width/2)*r-c*(1-r)/2,(n[l].areav[1]+5+h-e.height/2)*r):a.fillText(s,(n[l].areav[0]+5-e.width/2)*r-c*(1-r)/2,(n[l].areav[1]+5+h-e.height/2)*r)):0<n[l].area[0]&&(e.tooltip&&e.tooltip.index==l?a.strokeText(s,(n[l].area[0]+5-e.width/2)*r-c*(1-r)/2,(n[l].area[1]+5+h-e.height/2)*r):a.fillText(s,(n[l].area[0]+5-e.width/2)*r-c*(1-r)/2,(n[l].area[1]+5+h-e.height/2)*r)),a.stroke(),a.restore()}a.restore()}function Jt(t,e,i,a){var r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,l=o({},{activeWidth:10,activeOpacity:.3,border:!1,borderWidth:2,borderColor:"#FFFFFF",fillOpacity:1,labelAlign:"right"},e.extra.funnel),s=(e.height-e.area[0]-e.area[2])/t.length,h={x:e.area[3]+(e.width-e.area[1]-e.area[3])/2,y:e.height-e.area[2]},c=l.activeWidth,d=Math.min((e.width-e.area[1]-e.area[3])/2-c,(e.height-e.area[0]-e.area[2])/2-c);t=J(t,d,r),a.save(),a.translate(h.x,h.y);for(var x=0;x<t.length;x++)0==x?(e.tooltip&&e.tooltip.index==x&&(a.beginPath(),a.setFillStyle(n(t[x].color,l.activeOpacity)),a.moveTo(-c,0),a.lineTo(-t[x].radius-c,-s),a.lineTo(t[x].radius+c,-s),a.lineTo(c,0),a.lineTo(-c,0),a.closePath(),a.fill()),t[x].funnelArea=[h.x-t[x].radius,h.y-s,h.x+t[x].radius,h.y],a.beginPath(),a.setLineWidth(l.borderWidth*e.pixelRatio),a.setStrokeStyle(l.borderColor),a.setFillStyle(n(t[x].color,l.fillOpacity)),a.moveTo(0,0),a.lineTo(-t[x].radius,-s),a.lineTo(t[x].radius,-s),a.lineTo(0,0),a.closePath(),a.fill(),1==l.border&&a.stroke()):(e.tooltip&&e.tooltip.index==x&&(a.beginPath(),a.setFillStyle(n(t[x].color,l.activeOpacity)),a.moveTo(0,0),a.lineTo(-t[x-1].radius-c,0),a.lineTo(-t[x].radius-c,-s),a.lineTo(t[x].radius+c,-s),a.lineTo(t[x-1].radius+c,0),a.lineTo(0,0),a.closePath(),a.fill()),t[x].funnelArea=[h.x-t[x].radius,h.y-s*(x+1),h.x+t[x].radius,h.y-s*x],a.beginPath(),a.setLineWidth(l.borderWidth*e.pixelRatio),a.setStrokeStyle(l.borderColor),a.setFillStyle(n(t[x].color,l.fillOpacity)),a.moveTo(0,0),a.lineTo(-t[x-1].radius,0),a.lineTo(-t[x].radius,-s),a.lineTo(t[x].radius,-s),a.lineTo(t[x-1].radius,0),a.lineTo(0,0),a.closePath(),a.fill(),1==l.border&&a.stroke()),a.translate(0,-s);return a.restore(),!1!==e.dataLabel&&1===r&&Yt(t,e,a,s,l.labelAlign,c,h),{center:h,radius:d,series:t}}function Yt(t,e,i,a,o,n,l){for(var s=Math.PI,h=0;h<t.length;h++){var c=void 0,d=void 0,x=void 0,p=void 0,g=t[h],f=g.format?g.format(+g._proportion_.toFixed(2)):r.toFixed(100*g._proportion_)+"%";"right"==o?(c=0==h?(g.funnelArea[2]+l.x)/2:(g.funnelArea[2]+t[h-1].funnelArea[2])/2,d=c+2*n,x=g.funnelArea[1]+a/2,p=g.textSize||e.fontSize,i.setLineWidth(1*e.pixelRatio),i.setStrokeStyle(g.color),i.setFillStyle(g.color),i.beginPath(),i.moveTo(c,x),i.lineTo(d,x),i.stroke(),i.closePath(),i.beginPath(),i.moveTo(d,x),i.arc(d,x,2,0,2*s),i.closePath(),i.fill(),i.beginPath(),i.setFontSize(p),i.setFillStyle(g.textColor||"#666666"),i.fillText(f,d+5,x+p/2-2),i.closePath(),i.stroke(),i.closePath()):(c=0==h?(g.funnelArea[0]+l.x)/2:(g.funnelArea[0]+t[h-1].funnelArea[0])/2,d=c-2*n,x=g.funnelArea[1]+a/2,p=g.textSize||e.fontSize,i.setLineWidth(1*e.pixelRatio),i.setStrokeStyle(g.color),i.setFillStyle(g.color),i.beginPath(),i.moveTo(c,x),i.lineTo(d,x),i.stroke(),i.closePath(),i.beginPath(),i.moveTo(d,x),i.arc(d,x,2,0,2*s),i.closePath(),i.fill(),i.beginPath(),i.setFontSize(p),i.setFillStyle(g.textColor||"#666666"),i.fillText(f,d-5-y(f),x+p/2-2),i.closePath(),i.stroke(),i.closePath())}}function $t(t,e){e.draw()}var qt={easeIn:function(t){return Math.pow(t,3)},easeOut:function(t){return Math.pow(t-1,3)+1},easeInOut:function(t){var e=Math.pow;return 1>(t/=.5)?.5*e(t,3):.5*(e(t-2,3)+2)},linear:function(t){return t}};function Zt(t){this.isStop=!1,t.duration="undefined"==typeof t.duration?1e3:t.duration,t.timing=t.timing||"linear";var e=function(){return"undefined"==typeof setTimeout?"undefined"==typeof requestAnimationFrame?function(t){t(null)}:requestAnimationFrame:function(t,e){setTimeout((function(){var e=+new Date;t(e)}),e)}}(),i=null,a=function(o){if(null===o||!0===this.isStop)return t.onProcess&&t.onProcess(1),void(t.onAnimationFinish&&t.onAnimationFinish());if(null===i&&(i=o),o-i<t.duration){var r=(o-i)/t.duration,n=qt[t.timing];r=n(r),t.onProcess&&t.onProcess(r),e(a,17)}else t.onProcess&&t.onProcess(1),t.onAnimationFinish&&t.onAnimationFinish()};a=a.bind(this),e(a,17)}function Kt(t,e,i,a){var r=this,n=e.series,l=e.categories;n=f(n,e,i);var h=e.animation?e.duration:0;r.animationInstance&&r.animationInstance.stop();var c=null;if("candle"==t){var d=o({},e.extra.candle.average);d.show?(c=s(d.day,d.name,d.color,n[0].data),c=f(c,e,i),e.seriesMA=c):c=e.seriesMA?e.seriesMA=f(e.seriesMA,e,i):n}else c=n;e._series_=n=L(n),e.area=[,,,,];for(var x=0;4>x;x++)e.area[x]=e.padding[x];var p=B(c,e,i,e.chartData),g=p.area.wholeHeight,u=p.area.wholeWidth;switch(e.legend.position){case"top":e.area[0]+=g;break;case"bottom":e.area[2]+=g;break;case"left":e.area[3]+=u;break;case"right":e.area[1]+=u}var y={},v=0;if("line"===e.type||"column"===e.type||"area"===e.type||"mix"===e.type||"candle"===e.type){if(y=rt(n,e,i),v=y.yAxisWidth,e.yAxis.showTitle){for(var m=0,b=0;b<e.yAxis.data.length;b++)m=Math.max(m,e.yAxis.data[b].titleFontSize?e.yAxis.data[b].titleFontSize:i.fontSize);e.area[0]+=(m+6)*e.pixelRatio}for(var A=0,S=0,T=0;T<v.length;T++)"left"==v[T].position?(e.area[3]+=0<S?v[T].width+e.yAxis.padding:v[T].width,S+=1):(e.area[1]+=0<A?v[T].width+e.yAxis.padding:v[T].width,A+=1)}else i.yAxisWidth=v;if(e.chartData.yAxisData=y,e.categories&&e.categories.length){e.chartData.xAxisData=tt(e.categories,e,i);var P=H(e.categories,e,i,e.chartData.xAxisData.eachSpacing),w=P.xAxisHeight,_=P.angle;i.xAxisHeight=w,i._xAxisTextAngle_=_,e.area[2]+=w,e.chartData.categoriesData=P}else if("line"===e.type||"area"===e.type||"points"===e.type){e.chartData.xAxisData=X(n,e,i),l=e.chartData.xAxisData.rangesFormat;var F=H(l,e,i,e.chartData.xAxisData.eachSpacing),D=F.xAxisHeight,R=F.angle;i.xAxisHeight=D,i._xAxisTextAngle_=R,e.area[2]+=D,e.chartData.categoriesData=F}else e.chartData.xAxisData={xAxisPoints:[]};if(e.enableScroll&&"right"==e.xAxis.scrollAlign&&void 0===e._scrollDistance_){var k=0,C=e.chartData.xAxisData.xAxisPoints,M=e.chartData.xAxisData.startX,z=e.chartData.xAxisData.endX,W=e.chartData.xAxisData.eachSpacing,O=W*(C.length-1);k=z-M-O,r.scrollOption={currentOffset:k,startTouchX:k,distance:0,lastMoveTime:0},e._scrollDistance_=k}switch(("pie"===t||"ring"===t||"rose"===t)&&(i._pieTextMaxLength_=!1===e.dataLabel?0:K(c)),t){case"word":var I=o({},{type:"normal",autoColors:!0},e.extra.word);(1==e.updateData||null==e.updateData)&&(e.chartData.wordCloudData=Gt(e,I.type)),this.animationInstance=new Zt({timing:"easeInOut",duration:h,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&st(a,e),jt(n,e,i,a,t),$t(e,a)},onAnimationFinish:function(){r.event.trigger("renderComplete")}});break;case"map":a.clearRect(0,0,e.width,e.height),Xt(n,e,i,a);break;case"funnel":this.animationInstance=new Zt({timing:"easeInOut",duration:h,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&st(a,e),e.chartData.funnelData=Jt(n,e,i,a,t),Dt(e.series,e,i,a,e.chartData),wt(e,i,a,t),$t(e,a)},onAnimationFinish:function(){r.event.trigger("renderComplete")}});break;case"line":this.animationInstance=new Zt({timing:"easeIn",duration:h,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&st(a,e),Lt(l,e,i,a),_t(l,e,i,a);var o=Tt(n,e,i,a,t),r=o.xAxisPoints,s=o.calPoints,h=o.eachSpacing;e.chartData.xAxisPoints=r,e.chartData.calPoints=s,e.chartData.eachSpacing=h,Ft(n,e,i,a),!1!==e.enableMarkLine&&1===t&&ut(e,i,a),Dt(e.series,e,i,a,e.chartData),wt(e,i,a,t,h,r),$t(e,a)},onAnimationFinish:function(){r.event.trigger("renderComplete")}});break;case"mix":this.animationInstance=new Zt({timing:"easeIn",duration:h,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&st(a,e),Lt(l,e,i,a),_t(l,e,i,a);var o=Pt(n,e,i,a,t),r=o.xAxisPoints,s=o.calPoints,h=o.eachSpacing;e.chartData.xAxisPoints=r,e.chartData.calPoints=s,e.chartData.eachSpacing=h,Ft(n,e,i,a),!1!==e.enableMarkLine&&1===t&&ut(e,i,a),Dt(e.series,e,i,a,e.chartData),wt(e,i,a,t,h,r),$t(e,a)},onAnimationFinish:function(){r.event.trigger("renderComplete")}});break;case"column":this.animationInstance=new Zt({timing:"easeIn",duration:h,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&st(a,e),Lt(l,e,i,a),_t(l,e,i,a);var o=bt(n,e,i,a,t),r=o.xAxisPoints,s=o.calPoints,h=o.eachSpacing;e.chartData.xAxisPoints=r,e.chartData.calPoints=s,e.chartData.eachSpacing=h,Ft(n,e,i,a),!1!==e.enableMarkLine&&1===t&&ut(e,i,a),Dt(e.series,e,i,a,e.chartData),wt(e,i,a,t,h,r),$t(e,a)},onAnimationFinish:function(){r.event.trigger("renderComplete")}});break;case"area":this.animationInstance=new Zt({timing:"easeIn",duration:h,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&st(a,e),Lt(l,e,i,a),_t(l,e,i,a);var o=St(n,e,i,a,t),r=o.xAxisPoints,s=o.calPoints,h=o.eachSpacing;e.chartData.xAxisPoints=r,e.chartData.calPoints=s,e.chartData.eachSpacing=h,Ft(n,e,i,a),!1!==e.enableMarkLine&&1===t&&ut(e,i,a),Dt(e.series,e,i,a,e.chartData),wt(e,i,a,t,h,r),$t(e,a)},onAnimationFinish:function(){r.event.trigger("renderComplete")}});break;case"ring":case"pie":this.animationInstance=new Zt({timing:"easeInOut",duration:h,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&st(a,e),e.chartData.pieData=Rt(n,e,i,a,t),Dt(e.series,e,i,a,e.chartData),wt(e,i,a,t),$t(e,a)},onAnimationFinish:function(){r.event.trigger("renderComplete")}});break;case"rose":this.animationInstance=new Zt({timing:"easeInOut",duration:h,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&st(a,e),e.chartData.pieData=kt(n,e,i,a,t),Dt(e.series,e,i,a,e.chartData),wt(e,i,a,t),$t(e,a)},onAnimationFinish:function(){r.event.trigger("renderComplete")}});break;case"radar":this.animationInstance=new Zt({timing:"easeInOut",duration:h,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&st(a,e),e.chartData.radarData=zt(n,e,i,a,t),Dt(e.series,e,i,a,e.chartData),wt(e,i,a,t),$t(e,a)},onAnimationFinish:function(){r.event.trigger("renderComplete")}});break;case"arcbar":this.animationInstance=new Zt({timing:"easeInOut",duration:h,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&st(a,e),e.chartData.arcbarData=Ct(n,e,i,a,t),$t(e,a)},onAnimationFinish:function(){r.event.trigger("renderComplete")}});break;case"gauge":this.animationInstance=new Zt({timing:"easeInOut",duration:h,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&st(a,e),e.chartData.gaugeData=Mt(l,n,e,i,a,t),$t(e,a)},onAnimationFinish:function(){r.event.trigger("renderComplete")}});break;case"candle":this.animationInstance=new Zt({timing:"easeIn",duration:h,onProcess:function(t){a.clearRect(0,0,e.width,e.height),e.rotate&&st(a,e),Lt(l,e,i,a),_t(l,e,i,a);var o=At(n,c,e,i,a,t),r=o.xAxisPoints,s=o.calPoints,h=o.eachSpacing;e.chartData.xAxisPoints=r,e.chartData.calPoints=s,e.chartData.eachSpacing=h,Ft(n,e,i,a),!1!==e.enableMarkLine&&1===t&&ut(e,i,a),Dt(c||e.series,e,i,a,e.chartData),wt(e,i,a,t,h,r),$t(e,a)},onAnimationFinish:function(){r.event.trigger("renderComplete")}})}}function Qt(){this.events={}}Zt.prototype.stop=function(){this.isStop=!0},Qt.prototype.addEventListener=function(t,e){this.events[t]=this.events[t]||[],this.events[t].push(e)},Qt.prototype.trigger=function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];var a=e[0],o=e.slice(1);!this.events[a]||this.events[a].forEach((function(t){try{t.apply(null,o)}catch(e){console.error(e)}}))};var Ut=function(t){t.pixelRatio=t.pixelRatio?t.pixelRatio:1,t.fontSize=t.fontSize?t.fontSize*t.pixelRatio:13*t.pixelRatio,t.title=o({},t.title),t.subtitle=o({},t.subtitle),t.duration=t.duration?t.duration:1e3,t.yAxis=o({},{data:[],showTitle:!1,disabled:!1,disableGrid:!1,splitNumber:5,gridType:"solid",dashLength:4*t.pixelRatio,gridColor:"#cccccc",padding:10,fontColor:"#666666"},t.yAxis),t.yAxis.dashLength*=t.pixelRatio,t.yAxis.padding*=t.pixelRatio,t.xAxis=o({},{rotateLabel:!1,type:"calibration",gridType:"solid",dashLength:4,scrollAlign:"left",boundaryGap:"center",axisLine:!0,axisLineColor:"#cccccc"},t.xAxis),t.xAxis.dashLength*=t.pixelRatio,t.legend=o({},{show:!0,position:"bottom",float:"center",backgroundColor:"rgba(0,0,0,0)",borderColor:"rgba(0,0,0,0)",borderWidth:0,padding:5,margin:5,itemGap:10,fontSize:t.fontSize,lineHeight:t.fontSize,fontColor:"#333333",format:{},hiddenColor:"#CECECE"},t.legend),t.legend.borderWidth*=t.pixelRatio,t.legend.itemGap*=t.pixelRatio,t.legend.padding*=t.pixelRatio,t.legend.margin*=t.pixelRatio,t.extra=o({},t.extra),t.rotate=!!t.rotate,t.animation=!!t.animation,t.rotate=!!t.rotate;var e=JSON.parse(JSON.stringify(a));if(e.colors=t.colors?t.colors:e.colors,e.yAxisTitleWidth=!0!==t.yAxis.disabled&&t.yAxis.title?e.yAxisTitleWidth:0,("pie"==t.type||"ring"==t.type)&&(e.pieChartLinePadding=!1===t.dataLabel?0:t.extra.pie.labelWidth*t.pixelRatio||e.pieChartLinePadding*t.pixelRatio),"rose"==t.type&&(e.pieChartLinePadding=!1===t.dataLabel?0:t.extra.rose.labelWidth*t.pixelRatio||e.pieChartLinePadding*t.pixelRatio),e.pieChartTextPadding=!1===t.dataLabel?0:e.pieChartTextPadding*t.pixelRatio,e.yAxisSplit=t.yAxis.splitNumber?t.yAxis.splitNumber:a.yAxisSplit,e.rotate=t.rotate,t.rotate){var i=t.width,r=t.height;t.width=r,t.height=i}t.padding=t.padding?t.padding:e.padding;for(var n=0;4>n;n++)t.padding[n]*=t.pixelRatio;e.yAxisWidth=a.yAxisWidth*t.pixelRatio,e.xAxisHeight=a.xAxisHeight*t.pixelRatio,t.enableScroll&&t.xAxis.scrollShow&&(e.xAxisHeight+=6*t.pixelRatio),e.xAxisLineHeight=a.xAxisLineHeight*t.pixelRatio,e.fontSize=t.fontSize,e.titleFontSize=a.titleFontSize*t.pixelRatio,e.subtitleFontSize=a.subtitleFontSize*t.pixelRatio,e.toolTipPadding=a.toolTipPadding*t.pixelRatio,e.toolTipLineHeight=a.toolTipLineHeight*t.pixelRatio,e.columePadding=a.columePadding*t.pixelRatio,t.$this=t.$this?t.$this:this,this.context=uni.createCanvasContext(t.canvasId,t.$this),t.chartData={},this.event=new Qt,this.scrollOption={currentOffset:0,startTouchX:0,distance:0,lastMoveTime:0},this.opts=t,this.config=e,Kt.call(this,t.type,t,e,this.context)};Ut.prototype.updateData=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.opts=o({},this.opts,t),this.opts.updateData=!0;var e=t.scrollPosition||"current";switch(e){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":var i=rt(this.opts.series,this.opts,this.config),a=i.yAxisWidth;this.config.yAxisWidth=a;var r=0,n=tt(this.opts.categories,this.opts,this.config),l=n.xAxisPoints,s=n.startX,h=n.endX,c=n.eachSpacing,d=c*(l.length-1);r=h-s-d,this.scrollOption={currentOffset:r,startTouchX:r,distance:0,lastMoveTime:0},this.opts._scrollDistance_=r}Kt.call(this,this.opts.type,this.opts,this.config,this.context)},Ut.prototype.zoom=function(){var t=Math.round,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.opts.xAxis.itemCount;if(!0===this.opts.enableScroll){var i=t(Math.abs(this.scrollOption.currentOffset)/this.opts.chartData.eachSpacing)+t(this.opts.xAxis.itemCount/2);this.opts.animation=!1,this.opts.xAxis.itemCount=e.itemCount;var a=rt(this.opts.series,this.opts,this.config),o=a.yAxisWidth;this.config.yAxisWidth=o;var r=0,n=tt(this.opts.categories,this.opts,this.config),l=n.xAxisPoints,s=n.startX,h=n.endX,c=n.eachSpacing,d=h-s,x=d-c*(l.length-1);r=d/2-c*i,0<r&&(r=0),r<x&&(r=x),this.scrollOption={currentOffset:r,startTouchX:r,distance:0,lastMoveTime:0},this.opts._scrollDistance_=r,Kt.call(this,this.opts.type,this.opts,this.config,this.context)}else console.log("请启用滚动条后使用！")},Ut.prototype.stopAnimation=function(){this.animationInstance&&this.animationInstance.stop()},Ut.prototype.addEventListener=function(t,e){this.event.addEventListener(t,e)},Ut.prototype.getCurrentDataIndex=function(t){var e=null;if(e=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],e){var i=b(e,this.opts,t);return"pie"===this.opts.type||"ring"===this.opts.type||"rose"===this.opts.type?O({x:i.x,y:i.y},this.opts.chartData.pieData):"radar"===this.opts.type?C({x:i.x,y:i.y},this.opts.chartData.radarData,this.opts.categories.length):"funnel"===this.opts.type?M({x:i.x,y:i.y},this.opts.chartData.funnelData):"map"===this.opts.type?W({x:i.x,y:i.y},this.opts):"word"===this.opts.type?z({x:i.x,y:i.y},this.opts.chartData.wordCloudData):F({x:i.x,y:i.y},this.opts.chartData.calPoints,this.opts,this.config,Math.abs(this.scrollOption.currentOffset))}return-1},Ut.prototype.getLegendDataIndex=function(t){var e=null;if(e=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],e){var i=b(e,this.opts,t);return D({x:i.x,y:i.y},this.opts.chartData.legendData)}return-1},Ut.prototype.touchLegend=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=null;if(i=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],i){b(i,this.opts,t);var a=this.getLegendDataIndex(t);0<=a&&(this.opts.series[a].show=!this.opts.series[a].show,this.opts.animation=!!e.animation,this.opts._scrollDistance_=this.scrollOption.currentOffset,Kt.call(this,this.opts.type,this.opts,this.config,this.context))}},Ut.prototype.showToolTip=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=null;i=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],i||console.log("touchError");var a=b(i,this.opts,t),r=this.scrollOption.currentOffset,n=o({},this.opts,{_scrollDistance_:r,animation:!1});if("line"===this.opts.type||"area"===this.opts.type||"column"===this.opts.type){var l=null==e.index?this.getCurrentDataIndex(t):e.index;if(-1<l){var s=A(this.opts.series,l);if(0!==s.length){var h=P(s,this.opts.chartData.calPoints,l,this.opts.categories,e),c=h.textList,d=h.offset;d.y=a.y,n.tooltip={textList:e.textList?e.textList:c,offset:d,option:e,index:l}}}Kt.call(this,n.type,n,this.config,this.context)}if("mix"===this.opts.type){l=null==e.index?this.getCurrentDataIndex(t):e.index;if(-1<l){r=this.scrollOption.currentOffset,n=o({},this.opts,{_scrollDistance_:r,animation:!1}),s=A(this.opts.series,l);if(0!==s.length){var x=w(s,this.opts.chartData.calPoints,l,this.opts.categories,e);c=x.textList,d=x.offset;d.y=a.y,n.tooltip={textList:e.textList?e.textList:c,offset:d,option:e,index:l}}}Kt.call(this,n.type,n,this.config,this.context)}if("candle"===this.opts.type){l=null==e.index?this.getCurrentDataIndex(t):e.index;if(-1<l){r=this.scrollOption.currentOffset,n=o({},this.opts,{_scrollDistance_:r,animation:!1}),s=A(this.opts.series,l);if(0!==s.length){h=_(this.opts.series[0].data,s,this.opts.chartData.calPoints,l,this.opts.categories,this.opts.extra.candle,e),c=h.textList,d=h.offset;d.y=a.y,n.tooltip={textList:e.textList?e.textList:c,offset:d,option:e,index:l}}}Kt.call(this,n.type,n,this.config,this.context)}if("pie"===this.opts.type||"ring"===this.opts.type||"rose"===this.opts.type||"funnel"===this.opts.type){l=null==e.index?this.getCurrentDataIndex(t):e.index;if(-1<l){r=this.scrollOption.currentOffset,n=o({},this.opts,{_scrollDistance_:r,animation:!1}),s=this.opts._series_[l],c=[{text:e.format?e.format(s):s.name+": "+s.data,color:s.color}],d={x:a.x,y:a.y};n.tooltip={textList:e.textList?e.textList:c,offset:d,option:e,index:l}}Kt.call(this,n.type,n,this.config,this.context)}if("map"===this.opts.type||"word"===this.opts.type){l=null==e.index?this.getCurrentDataIndex(t):e.index;if(-1<l){r=this.scrollOption.currentOffset,n=o({},this.opts,{_scrollDistance_:r,animation:!1}),s=this.opts._series_[l],c=[{text:e.format?e.format(s):s.properties.name,color:s.color}],d={x:a.x,y:a.y};n.tooltip={textList:e.textList?e.textList:c,offset:d,option:e,index:l}}n.updateData=!1,Kt.call(this,n.type,n,this.config,this.context)}if("radar"===this.opts.type){l=null==e.index?this.getCurrentDataIndex(t):e.index;if(-1<l){r=this.scrollOption.currentOffset,n=o({},this.opts,{_scrollDistance_:r,animation:!1}),s=A(this.opts.series,l);if(0!==s.length){c=s.map((function(t){return{text:e.format?e.format(t):t.name+": "+t.data,color:t.color}})),d={x:a.x,y:a.y};n.tooltip={textList:e.textList?e.textList:c,offset:d,option:e,index:l}}}Kt.call(this,n.type,n,this.config,this.context)}},Ut.prototype.translate=function(t){this.scrollOption={currentOffset:t,startTouchX:t,distance:0,lastMoveTime:0};var e=o({},this.opts,{_scrollDistance_:t,animation:!1});Kt.call(this,this.opts.type,e,this.config,this.context)},Ut.prototype.scrollStart=function(t){var e=null;e=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0];var i=b(e,this.opts,t);e&&!0===this.opts.enableScroll&&(this.scrollOption.startTouchX=i.x)},Ut.prototype.scroll=function(t){0===this.scrollOption.lastMoveTime&&(this.scrollOption.lastMoveTime=Date.now());var e=this.opts.extra.touchMoveLimit||20,i=Date.now(),a=i-this.scrollOption.lastMoveTime;if(!(a<Math.floor(1e3/e))){this.scrollOption.lastMoveTime=i;var r=null;if(r=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],r&&!0===this.opts.enableScroll){var n,l=b(r,this.opts,t);n=l.x-this.scrollOption.startTouchX;var s=this.scrollOption.currentOffset,c=h(this,s+n,this.opts.chartData,this.config,this.opts);this.scrollOption.distance=n=c-s;var d=o({},this.opts,{_scrollDistance_:s+n,animation:!1});return Kt.call(this,d.type,d,this.config,this.context),s+n}}},Ut.prototype.scrollEnd=function(){if(!0===this.opts.enableScroll){var t=this.scrollOption,e=t.currentOffset,i=t.distance;this.scrollOption.currentOffset=e+i,this.scrollOption.distance=0}},"object"==typeof t.exports&&(t.exports=Ut)},cb29:function(t,e,i){var a=i("23e7"),o=i("81d5"),r=i("44d2");a({target:"Array",proto:!0},{fill:o}),r("fill")}}]);