=s&&(v[t].len=Math.ceil(Math.random()*400),v[t].highlightStyle.xStart=-400,v[t].highlightStyle.xEnd=-400+v[t].len,v[t].highlightStyle.yStart=Math.ceil(Math.random()*o),v[t].highlightStyle.yEnd=v[t].highlightStyle.yStart),v[t].highlightStyle.xStart+=v[t].animationX,v[t].highlightStyle.xEnd+=v[t].animationX,r(v[t]);r(l),i()},h.timeInterval)}function d(n,r,i){var u=e("./color");n=t.merge(n,{textStyle:{color:"#888"},backgroundColor:"rgba(250, 250, 250, 0.8)",effectOption:{n:50,lineWidth:2,brushType:"stroke",color:"random",timeInterval:100}},{overwrite:!1,recursive:!0});var l=a(n.textStyle),c=f(n.backgroundColor),h=n.effectOption,p=h.n,d=h.brushType,v=h.lineWidth,m=[],g;for(var y=0;y=20?-20:1,r(S);for(var e=0;e<20;e++)x[e].highlightStyle.color=e0&&d.refresh()}}});y.start(),o.getId=function(){return n},o.addShape=function(e){return p.add(e),o},o.delShape=function(e){return p.del(e),o},o.modShape=function(e,t,n){return p.mod(e,t,n),o},o.modLayer=function(e,t){d.modLayer(e,t)},o.addHoverShape=function(e){return p.addHover(e),o},o.render=function(e){return d.render(e),o},o.refresh=function(e){return d.refresh(e),o},o.refreshHover=function(e){return d.refreshHover(e),o},o.update=function(e,t){return d.update(e,t),o},o.resize=function(){return d.resize(),o},o.animate=function(e,n,i){var s=p.get(e);if(s){var o;if(n){var u=n.split("."),a=s;for(var f=0,l=u.length;f1e-4||Math.abs(e.position[0])>1e-4||Math.abs(e.position[1])>1e-4||Math.abs(e.scale[0]-1)>1e-4||Math.abs(e.scale[1]-1)>1e-4?e.__needTransform=!0:e.__needTransform=!1,e.style=e.style||{},e.style.__rect=null}function c(e){return(e||"")+ ++i}function h(e){var r={shape:"circle",id:e.id||n.newShapeId(),zlevel:0,draggable:!1,clickable:!1,hoverable:!0,position:[0,0],rotation:[0,0,0],scale:[1,1,0,0]};return t.merge(r,e,{overwrite:!0,recursive:!0}),l(r),s[r.id]=r,o[r.zlevel]=o[r.zlevel]||[],o[r.zlevel].push(r),a=Math.max(a,r.zlevel),f[r.zlevel]=!0,n}function p(e){return s[e]}function d(e){if(typeof e!="undefined"){var t={};if(e instanceof Array){if(e.lenth<1)return;for(var r=0,i=e.length;r1e-4||e.position&&(Math.abs(e.position[0])>1e-4||Math.abs(e.position[1])>1e-4)||e.scale&&(Math.abs(e.scale[0]-1)>1e-4||Math.abs(e.scale[1]-1)>1e-4)?e.__needTransform=!0:e.__needTransform=!1,u.push(e),n}function y(){return u=[],n}function b(){return u.length>0}function w(e,t){t||(t={hover:!1,normal:"down"});if(t.hover)for(var r=0,i=u.length;r=0;i--){a=o[i];if(a){f=a.length;while(f--)if(e(a[f]))return n}}break;case"up":for(var r=0,i=o.length;r1)for(var e in arguments)console.log(arguments[e]);return n},n}),define("zrender",["zrender/zrender"],function(e){return e}),define("echarts/util/shape/icon",["require","zrender/tool/matrix","zrender/shape","zrender/shape","zrender/shape","zrender/shape","zrender/shape/base","zrender/shape"],function(e){function n(){this.type="icon",this._iconLibrary={mark:r,markUndo:i,markClear:s,dataZoom:o,dataZoomReset:u,restore:a,lineChart:f,barChart:l,stackChart:c,tiledChart:h,dataView:p,saveAsImage:d,cross:v,circle:m,rectangle:g,triangle:y,diamond:b,arrow:w,star:E,heart:S,droplet:x,pin:T,image:N}}function r(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x,t.y+t.height),e.lineTo(t.x+5*n,t.y+14*r),e.lineTo(t.x+t.width,t.y+3*r),e.lineTo(t.x+13*n,t.y),e.lineTo(t.x+2*n,t.y+11*r),e.lineTo(t.x,t.y+t.height),e.moveTo(t.x+6*n,t.y+10*r),e.lineTo(t.x+14*n,t.y+2*r),e.moveTo(t.x+10*n,t.y+13*r),e.lineTo(t.x+t.width,t.y+13*r),e.moveTo(t.x+13*n,t.y+10*r),e.lineTo(t.x+13*n,t.y+t.height)}function i(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x,t.y+t.height),e.lineTo(t.x+5*n,t.y+14*r),e.lineTo(t.x+t.width,t.y+3*r),e.lineTo(t.x+13*n,t.y),e.lineTo(t.x+2*n,t.y+11*r),e.lineTo(t.x,t.y+t.height),e.moveTo(t.x+6*n,t.y+10*r),e.lineTo(t.x+14*n,t.y+2*r),e.moveTo(t.x+10*n,t.y+13*r),e.lineTo(t.x+t.width,t.y+13*r)}function s(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x+4*n,t.y+15*r),e.lineTo(t.x+9*n,t.y+13*r),e.lineTo(t.x+14*n,t.y+8*r),e.lineTo(t.x+11*n,t.y+5*r),e.lineTo(t.x+6*n,t.y+10*r),e.lineTo(t.x+4*n,t.y+15*r),e.moveTo(t.x+5*n,t.y),e.lineTo(t.x+11*n,t.y),e.moveTo(t.x+5*n,t.y+r),e.lineTo(t.x+11*n,t.y+r),e.moveTo(t.x,t.y+2*r),e.lineTo(t.x+t.width,t.y+2*r),e.moveTo(t.x,t.y+5*r),e.lineTo(t.x+3*n,t.y+t.height),e.lineTo(t.x+13*n,t.y+t.height),e.lineTo(t.x+t.width,t.y+5*r)}function o(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x,t.y+3*r),e.lineTo(t.x+6*n,t.y+3*r),e.moveTo(t.x+3*n,t.y),e.lineTo(t.x+3*n,t.y+6*r),e.moveTo(t.x+3*n,t.y+8*r),e.lineTo(t.x+3*n,t.y+t.height),e.lineTo(t.x+t.width,t.y+t.height),e.lineTo(t.x+t.width,t.y+3*r),e.lineTo(t.x+8*n,t.y+3*r),e.moveTo(t.x,t.y),e.lineTo(t.x,t.y)}function u(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x+6*n,t.y),e.lineTo(t.x+2*n,t.y+3*r),e.lineTo(t.x+6*n,t.y+6*r),e.moveTo(t.x+2*n,t.y+3*r),e.lineTo(t.x+14*n,t.y+3*r),e.lineTo(t.x+14*n,t.y+11*r),e.moveTo(t.x+2*n,t.y+5*r),e.lineTo(t.x+2*n,t.y+13*r),e.lineTo(t.x+14*n,t.y+13*r),e.moveTo(t.x+10*n,t.y+10*r),e.lineTo(t.x+14*n,t.y+13*r),e.lineTo(t.x+10*n,t.y+t.height),e.moveTo(t.x,t.y),e.lineTo(t.x,t.y)}function a(e,t){var n=t.width/16,r=t.height/16,i=t.width/2;e.lineWidth=1.5,e.arc(t.x+i,t.y+i,i-n,0,Math.PI*2/3),e.moveTo(t.x+3*n,t.y+t.height),e.lineTo(t.x+0*n,t.y+12*r),e.lineTo(t.x+5*n,t.y+11*r),e.moveTo(t.x,t.y+8*r),e.arc(t.x+i,t.y+i,i-n,Math.PI,Math.PI*5/3),e.moveTo(t.x+13*n,t.y),e.lineTo(t.x+t.width,t.y+4*r),e.lineTo(t.x+11*n,t.y+5*r),e.moveTo(t.x,t.y),e.lineTo(t.x,t.y)}function f(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x,t.y),e.lineTo(t.x,t.y+t.height),e.lineTo(t.x+t.width,t.y+t.height),e.moveTo(t.x+2*n,t.y+14*r),e.lineTo(t.x+7*n,t.y+6*r),e.lineTo(t.x+11*n,t.y+11*r),e.lineTo(t.x+15*n,t.y+2*r),e.moveTo(t.x,t.y),e.lineTo(t.x,t.y)}function l(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x,t.y),e.lineTo(t.x,t.y+t.height),e.lineTo(t.x+t.width,t.y+t.height),e.moveTo(t.x+3*n,t.y+14*r),e.lineTo(t.x+3*n,t.y+6*r),e.lineTo(t.x+4*n,t.y+6*r),e.lineTo(t.x+4*n,t.y+14*r),e.moveTo(t.x+7*n,t.y+14*r),e.lineTo(t.x+7*n,t.y+2*r),e.lineTo(t.x+8*n,t.y+2*r),e.lineTo(t.x+8*n,t.y+14*r),e.moveTo(t.x+11*n,t.y+14*r),e.lineTo(t.x+11*n,t.y+9*r),e.lineTo(t.x+12*n,t.y+9*r),e.lineTo(t.x+12*n,t.y+14*r)}function c(e,t){var n=t.x,r=t.y,i=t.width,s=t.height,o=Math.round(s/3),u=3;while(u--)e.rect(n,r+o*u+2,i,2)}function h(e,t){var n=t.x,r=t.y,i=t.width,s=t.height,o=Math.round(i/3),u=3;while(u--)e.rect(n+o*u,r,2,s)}function p(e,t){var n=t.width/16;e.moveTo(t.x+n,t.y),e.lineTo(t.x+n,t.y+t.height),e.lineTo(t.x+15*n,t.y+t.height),e.lineTo(t.x+15*n,t.y),e.lineTo(t.x+n,t.y),e.moveTo(t.x+3*n,t.y+3*n),e.lineTo(t.x+13*n,t.y+3*n),e.moveTo(t.x+3*n,t.y+6*n),e.lineTo(t.x+13*n,t.y+6*n),e.moveTo(t.x+3*n,t.y+9*n),e.lineTo(t.x+13*n,t.y+9*n),e.moveTo(t.x+3*n,t.y+12*n),e.lineTo(t.x+9*n,t.y+12*n)}function d(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x,t.y),e.lineTo(t.x,t.y+t.height),e.lineTo(t.x+t.width,t.y+t.height),e.lineTo(t.x+t.width,t.y),e.lineTo(t.x,t.y),e.moveTo(t.x+4*n,t.y),e.lineTo(t.x+4*n,t.y+8*r),e.lineTo(t.x+12*n,t.y+8*r),e.lineTo(t.x+12*n,t.y),e.moveTo(t.x+6*n,t.y+11*r),e.lineTo(t.x+6*n,t.y+13*r),e.lineTo(t.x+10*n,t.y+13*r),e.lineTo(t.x+10*n,t.y+11*r),e.lineTo(t.x+6*n,t.y+11*r),e.moveTo(t.x,t.y),e.lineTo(t.x,t.y)}function v(e,t){var n=t.x,r=t.y,i=t.width,s=t.height;e.moveTo(n,r+s/2),e.lineTo(n+i,r+s/2),e.moveTo(n+i/2,r),e.lineTo(n+i/2,r+s)}function m(e,t){var n=t.width/2,r=t.height/2,i=Math.min(n,r);e.moveTo(t.x+n+i,t.y+r),e.arc(t.x+n,t.y+r,i,0,Math.PI*2)}function g(e,t){e.rect(t.x,t.y,t.width,t.height)}function y(e,t){var n=t.width/2,r=t.height/2,i=t.x+n,s=t.y+r,o=Math.min(n,r);e.moveTo(i,s-o),e.lineTo(i+o,s+o),e.lineTo(i-o,s+o),e.lineTo(i,s-o)}function b(e,t){var n=t.width/2,r=t.height/2,i=t.x+n,s=t.y+r,o=Math.min(n,r);e.moveTo(i,s-o),e.lineTo(i+o,s),e.lineTo(i,s+o),e.lineTo(i-o,s),e.lineTo(i,s-o)}function w(e,t){var n=t.x,r=t.y,i=t.width/16;e.moveTo(n+8*i,r),e.lineTo(n+i,r+t.height),e.lineTo(n+8*i,r+t.height/4*3),e.lineTo(n+15*i,r+t.height),e.lineTo(n+8*i,r)}function E(t,n){var r=n.width/2,i=n.height/2,s=e("zrender/shape").get("star");s.buildPath(t,{x:n.x+r,y:n.y+i,r:Math.min(r,i),n:n.n||5})}function S(t,n){var r=e("zrender/shape").get("heart");r.buildPath(t,{x:n.x+n.width/2,y:n.y+n.height*.2,a:n.width/2,b:n.height*.8})}function x(t,n){var r=e("zrender/shape").get("droplet");r.buildPath(t,{x:n.x+n.width*.5,y:n.y+n.height*.5,a:n.width*.5,b:n.height*.8})}function T(e,t){var n=t.x,r=t.y-t.height/2*1.5,i=t.width/2,s=t.height/2,o=Math.min(i,s);e.arc(n+i,r+s,o,Math.PI/5*4,Math.PI/5),e.lineTo(n+i,r+s+o*1.5)}function N(t,n){setTimeout(function(){e("zrender/shape").get("image").brush(t,{style:n})},100)}var t=e("zrender/tool/matrix");return n.prototype={buildPath:function(e,t){this._iconLibrary[t.iconType]?this._iconLibrary[t.iconType](e,t):(e.moveTo(t.x,t.y),e.lineTo(t.x+t.width,t.y),e.lineTo(t.x+t.width,t.y+t.height),e.lineTo(t.x,t.y+t.height),e.lineTo(t.x,t.y));return},getRect:function(e){return{x:Math.round(e.x),y:Math.round(e.y-(e.iconType=="pin"?e.height/2*1.5:0)),width:e.width,height:e.height}},isCover:function(e,n,r){if(e.__needTransform&&e._transform){var i=[];t.invert(i,e._transform);var s=[n,r];t.mulVector(s,i,[n,r,1]),n==s[0]&&r==s[1]&&(Math.abs(e.rotation[0])>1e-4||Math.abs(e.position[0])>1e-4||Math.abs(e.position[1])>1e-4||Math.abs(e.scale[0]-1)>1e-4||Math.abs(e.scale[1]-1)>1e-4?e.__needTransform=!0:e.__needTransform=!1),n=s[0],r=s[1]}var o;e.style.__rect?o=e.style.__rect:(o=this.getRect(e.style),e.style.__rect=o);var u=o.height<8||o.width<8?4:0;return n>=o.x-u&&n<=o.x+o.width+u&&r>=o.y-u&&r<=o.y+o.height+u?!0:!1},define:function(e,t){this._iconLibrary[e]=t},get:function(e){return this._iconLibrary[e]}},e("zrender/shape/base").derive(n),e("zrender/shape").define("icon",new n),n}),define("echarts/util/shape/markLine",["require","zrender/tool/matrix","zrender/shape","zrender/shape","zrender/shape/base","zrender/shape"],function(e){function n(){this.type="markLine"}var t=e("zrender/tool/matrix");return n.prototype={brush:function(e,t,n){var r=t.style||{};n&&(r=this.getHighlightStyle(r,t.highlightStyle||{})),e.save(),this.setContext(e,r),t.__needTransform&&e.transform.apply(e,this.updateTransform(t)),e.beginPath(),this.buildLinePath(e,r),e.stroke(),this.brushSymbol(t,e,r,0),this.brushSymbol(t,e,r,1),typeof r.text!="undefined"&&this.drawText(e,r,t.style),e.restore();return},buildLinePath:function(e,t){var n=t.pointList||this.getPointList(t);t.pointList=n,typeof t.pointListLength=="undefined"&&(t.pointListLength=n.length);var r=Math.round(t.pointListLength);if(!t.lineType||t.lineType=="solid"){e.moveTo(n[0][0],n[0][1]);for(var i=1;is?a>u?l=Math.PI*2-l+f:l+=f:a>u?l+=Math.PI-f:l=Math.PI-l-f:s>o?u>a?l=Math.PI*2-l+f:l+=f:u>a?l+=Math.PI-f:l=Math.PI-l-f;var c=Math.PI/8,h=n===0?s:o,p=n===0?u:a,d=[[h+i*Math.cos(l-c),p-i*Math.sin(l-c)],[h+i*.6*Math.cos(l),p-i*.6*Math.sin(l)],[h+i*Math.cos(l+c),p-i*Math.sin(l+c)]];e.moveTo(h,p);for(var v=0,m=d.length;v1?"."+e[1]:""))}return{parsePercent:t,parseCenter:n,parseRadius:r,addCommas:i}}),define("echarts/component/base",["require","../util/ecData","../util/ecQuery","../util/number","zrender/tool/util","zrender/tool/area","zrender/tool/env"],function(e){function t(t,n){function h(e){e=e||a.type+"";switch(e){case t.COMPONENT_TYPE_GRID:case t.COMPONENT_TYPE_AXIS_CATEGORY:case t.COMPONENT_TYPE_AXIS_VALUE:return 0;case t.CHART_TYPE_LINE:case t.CHART_TYPE_BAR:case t.CHART_TYPE_SCATTER:case t.CHART_TYPE_PIE:case t.CHART_TYPE_RADAR:case t.CHART_TYPE_MAP:case t.CHART_TYPE_K:case t.CHART_TYPE_CHORD:return 2;case t.COMPONENT_TYPE_LEGEND:case t.COMPONENT_TYPE_DATARANGE:case t.COMPONENT_TYPE_DATAZOOM:return 4;case t.CHART_TYPE_ISLAND:return 5;case t.COMPONENT_TYPE_TOOLBOX:case t.COMPONENT_TYPE_TITLE:return 6;case t.COMPONENT_TYPE_TOOLTIP:return 8;default:return 0}}function p(e){return o.merge(e||{},o.clone(t[a.type]||{}),{overwrite:!1,recursive:!0})}function d(e){if(!(e instanceof Array))return[e,e,e,e];switch(e.length+""){case"4":return e;case"3":return[e[0],e[1],e[2],e[1]];case"2":return[e[0],e[1],e[0],e[1]];case"1":return[e[0],e[0],e[0],e[0]];case"0":return[0,0,0,0]}}function v(e){var n=o.merge(o.clone(e)||{},t.textStyle,{overwrite:!1});return n.fontStyle+" "+n.fontWeight+" "+n.fontSize+"px "+n.fontFamily}function m(e,t,n,r,i){var s=[n,t],o=a.deepMerge(s,"itemStyle.normal.label"),u=a.deepMerge(s,"itemStyle.emphasis.label"),f=o.textStyle||{},l=u.textStyle||{};return o.show&&(e.style.text=g(t,n,r,"normal"),e.style.textPosition=typeof o.position=="undefined"?i=="horizontal"?"right":"top":o.position,e.style.textColor=f.color,e.style.textFont=a.getFont(f)),u.show&&(e.highlightStyle.text=g(t,n,r,"emphasis"),e.highlightStyle.textPosition=o.show?e.style.textPosition:typeof u.position=="undefined"?i=="horizontal"?"right":"top":u.position,e.highlightStyle.textColor=l.color,e.highlightStyle.textFont=a.getFont(l)),e}function g(e,t,n,r){var i=a.deepQuery([t,e],"itemStyle."+r+".label.formatter");!i&&r=="emphasis"&&(i=a.deepQuery([t,e],"itemStyle.normal.label.formatter"));var s=typeof t!="undefined"?typeof t.value!="undefined"?t.value:t:"-";if(!i)return s;if(typeof i=="function")return i(e.name,n,s);if(typeof i=="string")return i=i.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}"),i=i.replace("{a0}",e.name).replace("{b0}",n).replace("{c0}",s),i}function y(e,t,n,r,i){a.selectedMap[e.name]&&(e.markPoint&&b(e,t,n,r,i),e.markLine&&w(e,t,n,r,i))}function b(e,n,r,i,s){var f=a.getZlevelBase(),l,c,h=o.clone(e.markPoint);for(var p=0,d=h.data.length;p1?i.symbol:[i.symbol[0],i.symbol[0]]:[i.symbol,i.symbol],i.symbolSize=i.symbolSize instanceof Array?i.symbolSize.length>1?i.symbolSize:[i.symbolSize[0],i.symbolSize[0]]:[i.symbolSize,i.symbolSize],i.symbolRotate=i.symbolRotate instanceof Array?i.symbolRotate.length>1?i.symbolRotate:[i.symbolRotate[0],i.symbolRotate[0]]:[i.symbolRotate,i.symbolRotate],i.name=e.name;var u=[],f=i.data,l,c=s.dataRange,h=s.legend,p,d,v,m,g,y,b=a.zr.getWidth(),w=a.zr.getHeight(),E;for(var S=0,x=f.length;S "+f[S][1].name:"")),u.push(l)}return u}function x(){return[0,0]}function T(e,t,n,i,s,o,u,f,l,c,h){var p=[n,e],d=typeof n!="undefined"?typeof n.value!="undefined"?n.value:n:"-";f=a.deepQuery(p,"symbol")||f;var v=a.deepQuery(p,"symbolSize");v=typeof v=="function"?v(d):v;var m=a.deepQuery(p,"symbolRotate"),g=a.deepMerge(p,"itemStyle.normal"),y=a.deepMerge(p,"itemStyle.emphasis"),b=typeof g.borderWidth!="undefined"?g.borderWidth:g.lineStyle&&g.lineStyle.width;typeof b=="undefined"&&(b=0);var w=typeof y.borderWidth!="undefined"?y.borderWidth:y.lineStyle&&y.lineStyle.width;typeof w=="undefined"&&(w=b+2);var E={shape:"icon",style:{iconType:f.replace("empty","").toLowerCase(),x:o-v,y:u-v,width:v*2,height:v*2,brushType:"both",color:f.match("empty")?c:a.getItemStyleColor(g.color,t,i,n)||l,strokeColor:g.borderColor||a.getItemStyleColor(g.color,t,i,n)||l,lineWidth:b},highlightStyle:{color:f.match("empty")?c:a.getItemStyleColor(y.color,t,i,n),strokeColor:y.borderColor||g.borderColor||a.getItemStyleColor(g.color,t,i,n)||l,lineWidth:w},clickable:!0};return f.match("image")&&(E.style.image=f.replace(new RegExp("^image:\\/\\/"),""),E.shape="image"),typeof m!="undefined"&&(E.rotation=[m*Math.PI/180,o,u]),f.match("star")&&(E.style.iconType="star",E.style.n=f.replace("empty","").replace("star","")-0||5),f=="none"&&(E.invisible=!0,E.hoverable=!1),E=a.addLabel(E,e,n,s,h),f.match("empty")&&(typeof E.style.textColor=="undefined"&&(E.style.textColor=E.style.strokeColor),typeof E.highlightStyle.textColor=="undefined"&&(E.highlightStyle.textColor=E.highlightStyle.strokeColor)),r.pack(E,e,t,n,i,s),E._mark="point",E._x=o,E._y=u,E._dataIndex=i,E._seriesIndex=t,E}function N(e,t,n,r,i,s,o,u,f){var l=typeof n[0]!="undefined"?typeof n[0].value!="undefined"?n[0].value:n[0]:"-",c=typeof n[1]!="undefined"?typeof n[1].value!="undefined"?n[1].value:n[1]:"-",h=[a.query(n[0],"symbol")||e.symbol[0],a.query(n[1],"symbol")||e.symbol[1]],p=[a.query(n[0],"symbolSize")||e.symbolSize[0],a.query(n[1],"symbolSize")||e.symbolSize[1]];p[0]=typeof p[0]=="function"?p[0](l):p[0],p[1]=typeof p[1]=="function"?p[1](c):p[1];var d=[a.query(n[0],"symbolRotate")||e.symbolRotate[0],a.query(n[1],"symbolRotate")||e.symbolRotate[1]],v=[n[0],e],m=a.deepMerge(v,"itemStyle.normal");m.color=a.getItemStyleColor(m.color,t,r,n);var g=a.deepMerge(v,"itemStyle.emphasis");g.color=a.getItemStyleColor(g.color,t,r,n);var y=m.lineStyle,b=g.lineStyle,w=y.width;typeof w=="undefined"&&(w=m.borderWidth);var E=b.width;typeof E=="undefined"&&(typeof g.borderWidth!="undefined"?E=g.borderWidth:E=w+2);var S={shape:"markLine",style:{smooth:e.smooth?"spline":!1,symbol:h,symbolSize:p,symbolRotate:d,xStart:i,yStart:s,xEnd:o,yEnd:u,brushType:"both",lineType:y.type,shadowColor:y.shadowColor,shadowBlur:y.shadowBlur,shadowOffsetX:y.shadowOffsetX,shadowOffsetY:y.shadowOffsetY,color:m.color||f,strokeColor:y.color||m.borderColor||m.color||f,lineWidth:w,symbolBorderColor:m.borderColor||m.color||f,symbolBorder:m.borderWidth},highlightStyle:{shadowColor:b.shadowColor,shadowBlur:b.shadowBlur,shadowOffsetX:b.shadowOffsetX,shadowOffsetY:b.shadowOffsetY,color:g.color||m.color||f,strokeColor:b.color||y.color||g.borderColor||m.borderColor||g.color||m.color||f,lineWidth:E,symbolBorderColor:g.borderColor||m.borderColor||g.color||m.color||f,symbolBorder:typeof g.borderWidth=="undefined"?m.borderWidth+2:g.borderWidth},clickable:!0};return S=a.addLabel(S,e,n[0],n[0].name+" : "+n[1].name),S._mark="line",S._x=o,S._y=u,S}function C(e,t,n,r){return typeof e=="function"?e(t,n,r):e}function k(e,t){return t%2==1?e=Math.floor(e)+.5:e=Math.round(e),e}function L(){c[a.type]?a.animationMark(t.animationDuration):a.animationEffect()}function A(e,t){var r,i;for(var s=0,o=a.shapeList.length;s0&&(a.zr.modLayer(f,{motionBlur:!1}),a.zr.delShape(a.effectList)),a.effectList=[]}function D(){_(),a.zr&&a.zr.delShape(a.shapeList),a.shapeList=[]}function P(){a.clear(),a.shapeList=null,a.effectList=null,a=null}var r=e("../util/ecData"),i=e("../util/ecQuery"),s=e("../util/number"),o=e("zrender/tool/util"),u=e("zrender/tool/area"),a=this;a.zr=n,a.shapeList=[],a.effectList=[];var f=7,l=e("zrender/tool/env").canvasSupported,c={};c[t.CHART_TYPE_LINE]=!0,c[t.CHART_TYPE_BAR]=!0,c[t.CHART_TYPE_SCATTER]=!0,c[t.CHART_TYPE_PIE]=!0,c[t.CHART_TYPE_RADAR]=!0,c[t.CHART_TYPE_MAP]=!0,c[t.CHART_TYPE_K]=!0,c[t.CHART_TYPE_CHORD]=!0,a.getZlevelBase=h,a.reformOption=p,a.reformCssArray=d,a.query=i.query,a.deepQuery=i.deepQuery,a.deepMerge=i.deepMerge,a.getFont=v,a.addLabel=m,a.buildMark=y,a.getMarkCoord=x,a.getSymbolShape=T,a.parsePercent=s.parsePercent,a.parseCenter=s.parseCenter,a.parseRadius=s.parseRadius,a.numAddCommas=s.addCommas,a.getItemStyleColor=C,a.subPixelOptimize=k,a.animation=L,a.animationMark=A,a.animationEffect=O,a.resize=M,a.clearAnimationShape=_,a.clear=D,a.dispose=P}return t}),define("echarts/util/accMath",[],function(){function e(e,n){return t(e,1/n)}function t(e,t){var n=0,r=e.toString(),i=t.toString();try{n+=r.split(".")[1].length}catch(s){}try{n+=i.split(".")[1].length}catch(s){}return Number(r.replace(".",""))*Number(i.replace(".",""))/Math.pow(10,n)}function n(e,t){var n,r,i;try{n=e.toString().split(".")[1].length}catch(s){n=0}try{r=t.toString().split(".")[1].length}catch(s){r=0}return i=Math.pow(10,Math.max(n,r)),(Math.round(e*i)+Math.round(t*i))/i}function r(e,t){return n(e,-t)}return{accDiv:e,accMul:t,accAdd:n,accSub:r}}),define("echarts/chart/calculableBase",["require","../util/ecData","../util/accMath","zrender/tool/util"],function(e){function t(t,n){function u(e){return e.dragEnableTime=n.DRAG_ENABLE_TIME,e.ondragover=o.shapeHandler.ondragover,e.ondragend=o.shapeHandler.ondragend,e.ondrop=o.shapeHandler.ondrop,e}function a(e,t){if(!o.isDrop||!e.target)return;var s=e.target,u=e.dragged,a=r.get(s,"seriesIndex"),f=r.get(s,"dataIndex"),l=n.series[a].data[f]||"-";l.value?l.value!="-"?n.series[a].data[f].value=i.accAdd(n.series[a].data[f].value,r.get(u,"value")):n.series[a].data[f].value=r.get(u,"value"):l!="-"?n.series[a].data[f]=i.accAdd(n.series[a].data[f],r.get(u,"value")):n.series[a].data[f]=r.get(u,"value"),t.dragIn=t.dragIn||!0,o.isDrop=!1;return}function f(e,t){if(!o.isDragend||!e.target)return;var i=e.target,s=r.get(i,"seriesIndex"),u=r.get(i,"dataIndex");n.series[s].data[u]="-",t.dragOut=!0,t.needRefresh=!0,o.isDragend=!1;return}function l(e,t){var n=e.selected;for(var r in o.selectedMap)o.selectedMap[r]!=n[r]&&(t.needRefresh=!0),o.selectedMap[r]=n[r];return}var r=e("../util/ecData"),i=e("../util/accMath"),s=e("zrender/tool/util"),o=this;o.selectedMap={},o.shapeHandler={onclick:function(){o.isClick=!0},ondragover:function(e){var t=s.clone(e.target);t.highlightStyle={text:"",r:t.style.r+5,brushType:"stroke",strokeColor:n.calculableColor,lineWidth:(t.style.lineWidth||1)+12},o.zr.addHoverShape(t)},ondrop:function(e){typeof r.get(e.dragged,"data")!="undefined"&&(o.isDrop=!0)},ondragend:function(){o.isDragend=!0}},o.setCalculable=u,o.ondrop=a,o.ondragend=f,o.onlegendSelected=l}return t}),define("echarts/chart/island",["require","../component/base","./calculableBase","../util/ecData","zrender/tool/event","zrender/tool/color","../util/accMath","../chart"],function(e){function t(t,n,r){function v(t,n){var r=e("zrender/tool/color"),i=e("../util/accMath"),s=i.accAdd(o.get(t,"value"),o.get(n,"value")),u=o.get(t,"name")+c+o.get(n,"name");t.style.text=u+h+s,o.set(t,"value",s),o.set(t,"name",u),t.style.r=f.island.r,t.style.color=r.mix(t.style.color,n.style.color)}function m(e){e&&(e.island=a.reformOption(e.island),f=e,c=f.nameConnector,h=f.valueConnector)}function g(e){m(e);for(var t=0,n=a.shapeList.length;t0?-1:1,t.style.r-=i,t.style.r=t.style.r<5?5:t.style.r;var s=o.get(t,"value"),a=s*f.island.calculateStep;a>1?s=Math.round(s-a*i):s=(s-a*i).toFixed(2)-0;var l=o.get(t,"name");t.style.text=l+":"+s,o.set(t,"value",s),o.set(t,"name",l),r.modShape(t.id,t),r.refresh(),u.stop(n)},a.refresh=m,a.render=g,a.resize=b,a.getOption=y,a.add=w,a.del=E,a.ondrop=S,a.ondragend=x}return e("../chart").define("island",t),t}),define("echarts/component",[],function(){var e={},t={};return e.define=function(n,r){return t[n]=r,e},e.get=function(e){return t[e]},e}),define("echarts/component/title",["require","./base","zrender/tool/area","zrender/tool/util","../component"],function(e){function t(t,n,r,i){function h(){c=v(),d(),p();for(var e=0,t=a.shapeList.length;e3){var o=T(),l=!1,c,h;e=0;while(!l&&e3){var o=T();e=1;while(o*e-60?-u:0;if(i.position=="bottom"||i.position=="top"){var v=i.position=="bottom"?n.inside?l.getYend()-r:l.getYend():n.inside?l.getY():l.getY()-r,m;for(var g=d;g=0?p:0),o),e={shape:"line",zlevel:c,hoverable:!1,style:{xStart:m,yStart:v,xEnd:m,yEnd:v+r,strokeColor:s,lineWidth:o}},f.shapeList.push(e)}else{var y=i.position=="left"?n.inside?l.getX():l.getX()-r:n.inside?l.getXend()-r:l.getXend(),b;for(var g=d;g=0?p:0),o),e={shape:"line",zlevel:c,hoverable:!1,style:{xStart:y,yStart:b,xEnd:y+r,yEnd:b,strokeColor:s,lineWidth:o}},f.shapeList.push(e)}}function b(){var e,t=i.data,n=i.data.length,r=i.axisLabel.rotate,s=i.axisLabel.margin,o=i.axisLabel.textStyle,a;if(i.position=="bottom"||i.position=="top"){var d,v;i.position=="bottom"?(d=l.getYend()+s,v="top"):(d=l.getY()-s,v="bottom");for(var m=0;m0?i.position=="bottom"?"right":"left":i.position=="bottom"?"left":"right",e.rotation=[r*Math.PI/180,e.style.x,e.style.y]),f.shapeList.push(e)}}else{var g,y;i.position=="left"?(g=l.getX()-s,y="right"):(g=l.getXend()+s,y="left");for(var m=0;m1?e-1:1)}function N(e){var t=i.data,n=t.length,r=T(),s=i.boundaryGap?r/2:0;for(var o=0;oi.data.length-1)return i.position=="bottom"||i.position=="top"?l.getXend():l.getY();var t=T(),n=i.boundaryGap?t/2:0;return n+=e*t,i.position=="bottom"||i.position=="top"?n=l.getX()+n:n=l.getYend()-n,n}function k(e){var t=i.data[e];return typeof t!="undefined"&&typeof t.value!="undefined"?t.value:t}function L(e){var t=i.data,n=t.length;for(var r=0;r0?i.position=="bottom"?"right":"left":i.position=="bottom"?"left":"right",e.rotation=[r*Math.PI/180,e.style.x,e.style.y]),f.shapeList.push(e)}else{var p,d;i.position=="left"?(p=l.getX()-s,d="right"):(p=l.getXend()+s,d="left");for(var h=0;h=0?typeof n[y][m]!="undefined"?n[y][m]+=r:n[y][m]=r:typeof n[b][m]!="undefined"?n[b][m]+=r:n[b][m]=r,i.scale&&n[v].push(r)}}}for(var l in n){e=n[l];for(var m=0,g=e.length;m0?i.power:1:p>0?h=p/i.splitNumber:p/=i.splitNumber),T(i.scale)}else d=!0,h=i.min-0,p=i.max-0,customerDefine=!0,N()}function T(e){var t=i.splitNumber,n=i.precision,r,s;n===0?s=i.power>1?i.power:1:(s=Math.pow(10,n),h*=s,p*=s,s=i.power);var o;if(h>=0&&p>=0){if(!e){while(p/s1?s/10:1,o=p-h,r=Math.ceil(o/t/s)*s,p=h+r*t}else if(h<=0&&p<=0){s=-s;if(!e){while(h/ss&&s!=-1)s/=10;n===0&&(h=Math.ceil(h/s)*s,p=Math.floor(p/s)*s)}s=s<-1?s/10:-1,o=h-p,r=-Math.ceil(o/t/s)*s,h=-r*t+p}else{o=p-h;while(o/sp?p:e;var t=p-h,n,r;return i.position=="left"||i.position=="right"?(n=l.getHeight(),r=l.getYend()-(e-h)/t*n):(n=l.getWidth(),r=(e-h)/t*n+l.getX()),r}function M(e){return i.position=="left"||i.position=="right"?Math.abs(e/(p-h)*l.getHeight()):Math.abs(e/(p-h)*l.getWidth())}function _(){return i.position}var u=e("./base");u.call(this,t,r);var a=e("zrender/tool/util"),f=this;f.type=t.COMPONENT_TYPE_AXIS_VALUE;var l=s.grid,c=f.getZlevelBase(),h,p,d,v,m;f.init=L,f.refresh=A,f.getExtremum=k,f.getCoord=O,f.getCoordSize=M,f.getPosition=_,L(i,l,o)}return e("../component").define("valueAxis",t),t}),define("echarts/component/axis",["require","./base","./categoryAxis","./valueAxis","../component"],function(e){function t(t,n,r,i,s,o){function l(e){!e||e instanceof Array&&e.length===0?e=[{type:t.COMPONENT_TYPE_AXIS_VALUE}]:e instanceof Array||(e=[e]),e.length>2&&(e=[e[0],e[1]]);if(o=="xAxis"){if(!e[0].position||e[0].position!="bottom"&&e[0].position!="top")e[0].position="bottom";e.length>1&&(e[1].position=e[0].position=="bottom"?"top":"bottom");for(var n=0,r=e.length;n1&&(e[1].position=e[0].position=="left"?"right":"left");for(var n=0,r=e.length;n0?"both":"fill",color:t.backgroundColor,strokeColor:t.borderColor,lineWidth:t.borderWidth}}),r.addShape(o.shapeList[0])}function v(){return a}function m(){return f}function g(){return l}function y(){return c}function b(){return a+l}function w(){return f+c}function E(){return{x:a,y:f,width:l,height:c}}function S(e){if(h!=r.getWidth()||p!=r.getHeight()||e)o.clear(),d(e||i)}var s=e("./base");s.call(this,t,r);var o=this;o.type=t.COMPONENT_TYPE_GRID;var u=o.getZlevelBase(),a,f,l,c,h,p;o.init=d,o.getX=v,o.getY=m,o.getWidth=g,o.getHeight=y,o.getXend=b,o.getYend=w,o.getArea=E,o.refresh=S,d(i)}return e("../component").define("grid",t),t}),define("echarts/component/dataZoom",["require","./base","../component","zrender/tool/util","zrender/tool/util","zrender/tool/util","../component"],function(e){function t(t,n,r,i,s){function S(){k(),L(),A(),O();for(var e=0,t=u.shapeList.length;e=0&&f.start<=100?f.start:0,m=typeof f.end!="undefined"&&f.end>=0&&f.end<=100?f.end:100;v>m&&(v+=m,m=v-m,v-=m);var g=Math.round((m-v)/100*(f.orient=="horizontal"?h.width:h.height));return{start:v,end:m,start2:0,end2:100,size:g,xAxisIndex:o,yAxisIndex:u,seriesIndex:s}}function N(){E={xAxis:{},yAxis:{},series:{}};var e=i.xAxis,n=p.xAxisIndex;for(var r=0,s=n.length;rh.x?1:0),height:h.height-(r>h.y?1:0),lineWidth:1,brushType:"stroke",strokeColor:f.handleColor}},y=t.clone(g),u.shapeList.push(g),u.shapeList.push(y);return}function M(e,t,n){f.zoomLock&&(e=d);var r=e._type=="filler"?c:0;return f.orient=="horizontal"?e.style.x+t-r<=h.x?e.style.x=h.x+r:e.style.x+t+e.style.width+r>=h.x+h.width?e.style.x=h.x+h.width-e.style.width-r:e.style.x+=t:e.style.y+n-r<=h.y?e.style.y=h.y+r:e.style.y+n+e.style.height+r>=h.y+h.height?e.style.y=h.y+h.height-e.style.height-r:e.style.y+=n,e._type=="filler"?_():D(),f.realtime?B():(clearTimeout(b),b=setTimeout(B,200)),!0}function _(){f.orient=="horizontal"?(v.style.x=d.style.x-c,m.style.x=d.style.x+d.style.width,p.start=Math.floor((v.style.x-h.x)/h.width*100),p.end=Math.ceil((m.style.x+c-h.x)/h.width*100)):(v.style.y=d.style.y-c,m.style.y=d.style.y+d.style.height,p.start=Math.floor((v.style.y-h.y)/h.height*100),p.end=Math.ceil((m.style.y+c-h.y)/h.height*100)),r.modShape(v.id,v),r.modShape(m.id,m),P(),r.refresh()}function D(){var e,t;f.orient=="horizontal"?(e=v.style.x,t=m.style.x,d.style.x=Math.min(e,t)+c,d.style.width=Math.abs(e-t)-c,p.start=Math.floor((Math.min(e,t)-h.x)/h.width*100),p.end=Math.ceil((Math.max(e,t)+c-h.x)/h.width*100)):(e=v.style.y,t=m.style.y,d.style.y=Math.min(e,t)+c,d.style.height=Math.abs(e-t)-c,p.start=Math.floor((Math.min(e,t)-h.y)/h.height*100),p.end=Math.ceil((Math.max(e,t)+c-h.y)/h.height*100)),r.modShape(d.id,d),P(),r.refresh()}function P(){f.orient=="horizontal"?(g.style.width=d.style.x-h.x,y.style.x=d.style.x+d.style.width,y.style.width=h.x+h.width-y.style.x):(g.style.height=d.style.y-h.y,y.style.y=d.style.y+d.style.height,y.style.height=h.y+h.height-y.style.y),r.modShape(g.id,g),r.modShape(y.id,y)}function H(){if(!f.show)return;f.orient=="horizontal"?(v.style.x=h.x+p.start/100*h.width,m.style.x=h.x+p.end/100*h.width-c,d.style.x=v.style.x+c,d.style.width=m.style.x-v.style.x-c):(v.style.y=h.y+p.start/100*h.height,m.style.y=h.y+p.end/100*h.height-c,d.style.y=v.style.y+c,d.style.height=m.style.y-v.style.y-c),r.modShape(v.id,v),r.modShape(m.id,m),r.modShape(d.id,d),P(),r.refresh()}function B(e){var r,s,o,u,a;for(var l in E){r=E[l];for(var c in r)a=r[c],u=a.length,s=Math.floor(p.start/100*u),o=Math.ceil(p.end/100*u),i[l][c].type!=t.CHART_TYPE_SCATTER?i[l][c].data=a.slice(s,o):i[l][c].data=j(c,a)}!w&&(f.realtime||e)&&n.dispatch(t.EVENT.DATA_ZOOM,null,{zoom:p}),f.start=p.start,f.end=p.end}function j(e,t){var n=[],r=p.scatterMap[e],i,s,o,u,a;f.orient=="horizontal"?(i=r.x.max-r.x.min,s=p.start/100*i+r.x.min,o=p.end/100*i+r.x.min,i=r.y.max-r.y.min,u=p.start2/100*i+r.y.min,a=p.end2/100*i+r.y.min):(i=r.x.max-r.x.min,s=p.start2/100*i+r.x.min,o=p.end2/100*i+r.x.min,i=r.y.max-r.y.min,u=p.start/100*i+r.y.min,a=p.end/100*i+r.y.min);var l;for(var c=0,h=t.length;c=s&&l[0]<=o&&l[1]>=u&&l[1]<=a&&n.push(t[c]);return n}function F(){u.isDragend=!0}function I(e,r){if(!u.isDragend||!e.target)return;B(),r.dragOut=!0,r.dragIn=!0,!w&&!f.realtime&&n.dispatch(t.EVENT.DATA_ZOOM,null,{zoom:p}),r.needRefresh=!1,u.isDragend=!1;return}function q(e,t){t.needRefresh=!0;return}function R(e){f.start=p.start=e.start,f.end=p.end=e.end,f.start2=p.start2=e.start2,f.end2=p.end2=e.end2,H(),B(!0);return}function U(e){if(!e)return f.start=f.start2=p.start=p.start2=0,f.end=f.end2=p.end=p.end2=100,H(),B(!0),p;var t=s.grid.getArea(),n={x:e.x,y:e.y,width:e.width,height:e.height};n.width<0&&(n.x+=n.width,n.width=-n.width),n.height<0&&(n.y+=n.height,n.height=-n.height);if(n.x>t.x+t.width||n.y>t.y+t.height)return!1;n.xt.x+t.width&&(n.width=t.x+t.width-n.x),n.y+n.height>t.y+t.height&&(n.height=t.y+t.height-n.y);var r,i=(n.x-t.x)/t.width,o=1-(n.x+n.width-t.x)/t.width,u=1-(n.y+n.height-t.y)/t.height,a=(n.y-t.y)/t.height;return f.orient=="horizontal"?(r=p.end-p.start,p.start+=r*i,p.end-=r*o,r=p.end2-p.start2,p.start2+=r*u,p.end2-=r*a):(r=p.end-p.start,p.start+=r*u,p.end-=r*a,r=p.end2-p.start2,p.start2+=r*i,p.end2-=r*o),f.start=p.start,f.end=p.end,f.start2=p.start2,f.end2=p.end2,H(),B(!0),p}function z(e,t){var n,r=E.series,i=e.series,s;for(var o=0,u=i.length;o=m-b&&(b=d.x,w+=x+T):y-w<200&&x+(A==t-1||e[A+1]===""?0:T)>=y-w&&(h.x=="right"?b-=d.maxWidth+T:b+=d.maxWidth+T,w=d.y),s=C(b,w,E,x,g[n]?L:"#ccc",r,L),s._name=n,h.selectedMode&&(s.onclick=k),c.shapeList.push(s),o={shape:"text",zlevel:p,style:{x:b+E+5,y:w,color:g[n]?l.color==="auto"?L:l.color:"#ccc",text:n,textFont:v,textBaseline:"top"},highlightStyle:{color:L,brushType:"fill"},hoverable:!!h.selectedMode,clickable:!!h.selectedMode},h.orient=="vertical"&&h.x=="right"&&(o.style.x-=E+10,o.style.textAlign="right"),o._name=n,h.selectedMode&&(o.onclick=k),c.shapeList.push(o),h.orient=="horizontal"?b+=E+5+f.getTextWidth(n,v)+T:w+=x+T}h.orient=="horizontal"&&h.x=="center"&&w!=d.y&&S()}function S(){var e=[],t=d.x;for(var n=2,r=c.shapeList.length;nv?(l=v,p+=s+n):l=Math.max(l,g),p+=s+n,g=0;continue}dataTextStyle=a.merge(e[b].textStyle||{},o,{overwrite:!1}),g+=r+f.getTextWidth(e[b].name||e[b],e[b].textStyle?c.getFont(a.merge(e[b].textStyle||{},o,{overwrite:!1})):u)+n}p=Math.max(p,s),g-=n,g>v?(l=v,p+=s+n):l=Math.max(l,g)}else{for(var b=0;bm?(p=m,l+=y+n):p=Math.max(p,g),l+=y+n,g=0;continue}g+=s+n}l=Math.max(l,y),g-=n,g>m?(p=m,l+=y+n):p=Math.max(p,g)}v=i.getWidth(),m=i.getHeight();var w;switch(h.x){case"center":w=Math.floor((v-l)/2);break;case"left":w=h.padding[3]+h.borderWidth;break;case"right":w=v-l-h.padding[1]-h.padding[3]-h.borderWidth*2;break;default:w=h.x-0,w=isNaN(w)?0:w}var E;switch(h.y){case"top":E=h.padding[0]+h.borderWidth;break;case"bottom":E=m-p-h.padding[0]-h.padding[2]-h.borderWidth*2;break;case"center":E=Math.floor((m-p)/2);break;default:E=h.y-0,E=isNaN(E)?0:E}return{x:w,y:E,width:l,height:p,maxWidth:y}}function N(e){var n=s.series,r;for(var i=0,o=n.length;i1e-4||Math.abs(e.position[0])>1e-4||Math.abs(e.position[1])>1e-4||Math.abs(e.scale[0]-1)>1e-4||Math.abs(e.scale[1]-1)>1e-4?e.__needTransform=!0:e.__needTransform=!1),n=s[0],r=s[1]}var o=e.style.rect;return n>=o.x&&n<=o.x+o.width&&r>=o.y&&r<=o.y+o.height?!0:!1}},e("zrender/shape/base").derive(n),e("zrender/shape").define("handlePolygon",new n),n}),define("echarts/component/dataRange",["require","./base","zrender/tool/area","zrender/tool/color","zrender/tool/color","../util/shape/handlePolygon","../component"],function(e){function t(t,n,r,i){function T(){l=M(),O(),a.splitNumber<=0||a.calculable?C():N();for(var e=0,t=u.shapeList.length;em&&(v-=w)):(gy&&(g-=h))}return{x:v,y:g,width:f,height:l}}function _(e,t,n){return{shape:"text",zlevel:f,style:{x:a.orient=="horizontal"?e:l.x+l.width/2,y:a.orient=="horizontal"?l.y+l.height/2:t,color:a.textStyle.color,text:n,textFont:u.getFont(a.textStyle),textBaseline:a.orient=="horizontal"?"middle":"top",textAlign:a.orient=="horizontal"?"left":"center"},hoverable:!1}}function D(e,t,n,r,i){return{shape:"rectangle",zlevel:f,style:{x:e,y:t+1,width:n,height:r-2,color:i},highlightStyle:{strokeColor:i,lineWidth:1},clickable:!0}}function P(e,t,n){var r=c.x,i=c.y,s=c.width,o=c.height;return a.orient=="horizontal"?e.style.x+t<=r?e.style.x=r:e.style.x+t+e.style.width>=r+s?e.style.x=r+s-e.style.width:e.style.x+=t:e.style.y+n<=i?e.style.y=i:e.style.y+n+e.style.height>=i+o?e.style.y=i+o-e.style.height:e.style.y+=n,e._type=="filler"?F():I(e),a.realtime?R():(clearTimeout(y),y=setTimeout(R,200)),!0}function H(){u.isDragend=!0}function B(e,r){if(!u.isDragend||!e.target)return;R(),r.dragOut=!0,r.dragIn=!0,a.realtime||n.dispatch(t.EVENT.DATA_RANGE,null,{range:{start:g.end,end:g.start}}),r.needRefresh=!1,u.isDragend=!1;return}function j(){if(a.range){typeof a.range.start!="undefined"&&(g.end=a.range.start),typeof a.range.end!="undefined"&&(g.start=a.range.end);if(g.start!=100||g.end!==0){if(a.orient=="horizontal"){var e=m.style.width;m.style.x+=e*(100-g.start)/100,m.style.width=e*(g.start-g.end)/100}else{var t=m.style.height;m.style.y+=t*(100-g.start)/100,m.style.height=t*(g.start-g.end)/100}r.modShape(m.id,m),F()}}}function F(){var e=c.x,t=c.y,n=c.width,r=c.height;a.orient=="horizontal"?(h.style.x=m.style.x,p.style.width=h.style.x-e,d.style.x=m.style.x+m.style.width,v.style.x=d.style.x,v.style.width=e+n-d.style.x,g.start=Math.ceil(100-(h.style.x-e)/n*100),g.end=Math.floor(100-(d.style.x-e)/n*100)):(h.style.y=m.style.y,p.style.height=h.style.y-t,d.style.y=m.style.y+m.style.height,v.style.y=d.style.y,v.style.height=t+r-d.style.y,g.start=Math.ceil(100-(h.style.y-t)/r*100),g.end=Math.floor(100-(d.style.y-t)/r*100)),q(!1)}function I(e){var t=c.x,n=c.y,r=c.width,i=c.height,s,o;a.orient=="horizontal"?(s=h.style.x,o=d.style.x,e.id==h.id&&s>=o?(o=s,d.style.x=s):e.id==d.id&&s>=o&&(s=o,h.style.x=s),m.style.x=s,m.style.width=o-s,p.style.width=s-t,v.style.x=o,v.style.width=t+r-o,g.start=Math.ceil(100-(s-t)/r*100),g.end=Math.floor(100-(o-t)/r*100)):(s=h.style.y,o=d.style.y,e.id==h.id&&s>=o?(o=s,d.style.y=s):e.id==d.id&&s>=o&&(s=o,h.style.y=s),m.style.y=s,m.style.height=o-s,p.style.height=s-n,v.style.y=o,v.style.height=n+i-o,g.start=Math.ceil(100-(s-n)/i*100),g.end=Math.floor(100-(o-n)/i*100)),q(!0)}function q(e){h.position=[h.style.x-h.style._x,h.style.y-h.style._y],a.precision===0?h.style.text=Math.round(w*g.start+a.min)+"":h.style.text=(w*g.start+a.min).toFixed(a.precision),h.style.color=h.highlightStyle.strokeColor=X(w*g.start+a.min),r.modShape(h.id,h),d.position=[d.style.x-d.style._x,d.style.y-d.style._y],a.precision===0?d.style.text=Math.round(w*g.end+a.min)+"":d.style.text=(w*g.end+a.min).toFixed(a.precision),d.style.color=d.highlightStyle.strokeColor=X(w*g.end+a.min),r.modShape(d.id,d),r.modShape(p.id,p),r.modShape(v.id,v),e&&r.modShape(m.id,m),r.refresh()}function R(){a.realtime&&n.dispatch(t.EVENT.DATA_RANGE,null,{range:{start:g.end,end:g.start}})}function U(e){var r=e.target._idx;x[r]=!x[r],n.dispatch(t.EVENT.REFRESH)}function z(t){if(typeof u.query(t,"dataRange.min")=="undefined"||typeof u.query(t,"dataRange.max")=="undefined")return;i=t,i.dataRange=u.reformOption(i.dataRange),i.dataRange.padding=u.reformCssArray(i.dataRange.padding),a=i.dataRange,u.clear(),x={};var n=e("zrender/tool/color"),r=a.splitNumber<=0||a.calculable?100:a.splitNumber;E=n.getGradientColors(a.color,Math.max((r-a.color.length)/(a.color.length-1),0)+1);if(E.length>r){var s=E.length,o=[E[0]],f=s/(r-1);for(var l=1;la.max&&(e=a.max);if(a.calculable)if(e>w*g.start+a.min||e0&&(r.delShape(F.tipShape),F=!1),e&&r.refresh()}function W(e,t,n){var r=N.offsetHeight,i=N.offsetWidth;e+i>j&&(e-=i+40),t+r>B&&(t-=r-20),t<20&&(t=0),N.style.cssText=C+k+(n?n:"")+"left:"+e+"px;top:"+t+"px;",(r<10||i<10)&&setTimeout(X,20)}function X(){if(N){var e="",t=N.offsetHeight,n=N.offsetWidth;N.offsetLeft+n>j&&(e+="left:"+(j-n-20)+"px;"),N.offsetTop+t>B&&(e+="top:"+(B-t-10)+"px;"),e!==""&&(N.style.cssText+=e)}}function V(){var e,t;if(!D)J()||$();else{if(D._type=="island"&&i.tooltip.show){Y();return}var n=a.get(D,"series"),r=a.get(D,"data");e=g.deepQuery([r,n,i],"tooltip.show"),typeof n=="undefined"||typeof r=="undefined"||e===!1?(clearTimeout(A),clearTimeout(M),A=setTimeout(z,O)):(t=g.deepQuery([r,n,i],"tooltip.trigger"),t=="axis"?Q(n.xAxisIndex,n.yAxisIndex,a.get(D,"dataIndex")):Y())}}function $(){if(!E||!S){A=setTimeout(z,O);return}var e=i.series,n,r;for(var s=0,o=e.length;s=r)break;a=t.getCoordByIndex(++n),o=a}return r-sh){a>=i&&(l=a);if(a<=i)break;a=t.getCoordByIndex(++n),f=a}return i-f>l-i?n-=n!==0?1:0:typeof t.getNameByIndex(n)=="undefined"&&(n-=1),n}function Q(e,r,o){!P.connectTrigger&&n.dispatch(t.EVENT.TOOLTIP_IN_GRID,P);if(typeof E=="undefined"||typeof S=="undefined"||typeof e=="undefined"||typeof r=="undefined"||o<0){clearTimeout(A),clearTimeout(M),A=setTimeout(z,O);return}var u=i.series,a=[],f=[],l,h,p,d,v,m="";if(i.tooltip.trigger=="axis"){if(i.tooltip.show===!1)return;d=i.tooltip.formatter}if(e!=-1&&E.getAxis(e).type==t.COMPONENT_TYPE_AXIS_CATEGORY){l=E.getAxis(e);for(var y=0,x=u.length;y0){var T;if(typeof d=="function"){var C=[];for(var y=0,x=a.length;y"+vt(a[y].name||"")+" : ",T=a[y].data[o],T=typeof T!="undefined"?typeof T.value!="undefined"?T.value:T:"-",d+=T instanceof Array?T:g.numAddCommas(T);N.innerHTML=d}if(v===!1||!i.tooltip.showContent)return;g.hasAppend||(N.style.left=j/2+"px",N.style.top=B/2+"px",s.firstChild.appendChild(N),g.hasAppend=!0),W(h,p,m)}}function G(e,t){if(typeof x=="undefined"||typeof e=="undefined"||typeof t=="undefined"||t<0)return!1;var n=i.series,r=[],o,u,a="";if(i.tooltip.trigger=="axis"){if(i.tooltip.show===!1)return!1;o=i.tooltip.formatter}var f=i.polar[e].indicator[t].text;for(var l=0,h=n.length;l0){var p,d,v=[];for(var l=0,h=r.length;l"+vt(v[0][3])+" : "+g.numAddCommas(v[0][2]);for(var l=1,h=v.length;l"+vt(v[l][1])+"
",o+=vt(v[l][3])+" : "+g.numAddCommas(v[l][2]);N.innerHTML=o}if(u===!1||!i.tooltip.showContent)return;return g.hasAppend||(N.style.left=j/2+"px",N.style.top=B/2+"px",s.firstChild.appendChild(N),g.hasAppend=!0),W(c.getX(P),c.getY(P),a),!0}}function Y(){var e=a.get(D,"series"),n=a.get(D,"data"),o=a.get(D,"name"),u=a.get(D,"value"),f=a.get(D,"special"),l=a.get(D,"special2"),h,p,d="",v,m="";D._type!="island"?(i.tooltip.trigger=="item"&&(h=i.tooltip.formatter),g.query(e,"tooltip.trigger")=="item"&&(p=g.query(e,"tooltip.showContent")||p,h=g.query(e,"tooltip.formatter")||h,d+=U(g.query(e,"tooltip"))),p=g.query(n,"tooltip.showContent")||p,h=g.query(n,"tooltip.formatter")||h,d+=U(g.query(n,"tooltip"))):(p=g.deepQuery([n,e,i],"tooltip.showContent"),h=g.deepQuery([n,e,i],"tooltip.islandFormatter"));if(typeof h=="function")H=(e.name||"")+":"+a.get(D,"dataIndex"),N.innerHTML=h([e.name||"",o,u,f,l],H,nt);else if(typeof h=="string")H=NaN,h=h.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}"),h=h.replace("{a0}",vt(e.name||"")).replace("{b0}",vt(o)).replace("{c0}",u instanceof Array?u:g.numAddCommas(u)),h=h.replace("{d}","{d0}").replace("{d0}",f||""),h=h.replace("{e}","{e0}").replace("{e0}",a.get(D,"special2")||""),N.innerHTML=h;else{H=NaN;if(e.type==t.CHART_TYPE_SCATTER)N.innerHTML=(typeof e.name!="undefined"?vt(e.name)+"
":"")+(o===""?"":vt(o)+" : ")+u+(typeof f=="undefined"?"":" ("+f+")");else if(e.type==t.CHART_TYPE_RADAR&&f){v=f,m+=vt(o===""?e.name||"":o),m+=m===""?"":"
";for(var y=0;y";N.innerHTML=m}else if(e.type==t.CHART_TYPE_CHORD)if(typeof l=="undefined")N.innerHTML=vt(o)+" ("+g.numAddCommas(u)+")";else{var b=vt(o),w=vt(f);N.innerHTML=(typeof e.name!="undefined"?vt(e.name)+"
":"")+b+" -> "+w+" ("+g.numAddCommas(u)+")"+"
"+w+" -> "+b+" ("+g.numAddCommas(l)+")"}else N.innerHTML=(typeof e.name!="undefined"?vt(e.name)+"
":"")+vt(o)+" : "+g.numAddCommas(u)+(typeof f=="undefined"?"":" ("+g.numAddCommas(f)+")")}q.invisible||(q.invisible=!0,r.modShape(q.id,q),r.refresh());if(p===!1||!i.tooltip.showContent)return;g.hasAppend||(N.style.left=j/2+"px",N.style.top=B/2+"px",s.firstChild.appendChild(N),g.hasAppend=!0),W(c.getX(P)+20,c.getY(P)-20,d)}function Z(e,t,n,s,o,u){if(e.length>0){var a,f,l=i.tooltip.axisPointer,c=l.type,h=l.lineStyle.color,p=l.lineStyle.width,d=l.lineStyle.type,v=l.areaStyle.size,m=l.areaStyle.color;for(var y=0,b=e.length;y0&&r.delShape(F.tipShape);for(var n=0,i=t.length;n/g,">").replace(/"/g,""").replace(/'/g,"'")}var u=e("./base");u.call(this,t,r);var a=e("../util/ecData"),f=e("zrender/config"),l=e("zrender/shape"),c=e("zrender/tool/event"),h=e("zrender/tool/area"),p=e("zrender/tool/color"),d=e("zrender/tool/util"),v=e("zrender/shape/base"),m=l.get("rectangle"),g=this;g.type=t.COMPONENT_TYPE_TOOLTIP;var y=g.getZlevelBase(),b={},w,E,S,x,T={},N=document.createElement("div"),C="position:absolute;display:block;border-style:solid;white-space:nowrap;",k,L,A,O,M,_,D,P,H,B=r.getHeight(),j=r.getWidth(),F=!1,I=0,q={shape:"line",id:r.newShapeId("tooltip"),zlevel:y,invisible:!0,hoverable:!1,style:{}},R={shape:"line",id:r.newShapeId("tooltip"),zlevel:1,invisible:!0,hoverable:!1,style:{}};r.addShape(q),r.addShape(R),r.on(f.EVENT.MOUSEMOVE,et),r.on(f.EVENT.GLOBALOUT,tt),g.dispose=dt,g.init=ct,g.refresh=ht,g.resize=pt,g.setComponent=rt,g.ontooltipHover=it,g.ondragend=st,g.onlegendSelected=ot,g.showTip=ft,g.hideTip=lt,ct(i,s)}return e("../component").define("tooltip",t),t}),define("echarts/component/toolbox",["require","./base","zrender/config","zrender/tool/util","zrender/tool/event","zrender/tool/env","../component","../component"],function(e){function t(t,n,r,i,s){function B(){y=[];var e=l.toolbox.feature,t=[];for(var n in e)if(e[n].show)switch(n){case"mark":t.push({key:n,name:"mark"}),t.push({key:n,name:"markUndo"}),t.push({key:n,name:"markClear"});break;case"magicType":for(var i=0,s=e[n].type.length;i0){var o,n;for(var i=0,s=t.length;i0?c.dataZoom.absoluteZoom(_[_.length-1]):(c.dataZoom.rectZoom(),G(b.dataZoomReset),r.refresh()),!0}function K(){k=!1,C&&(C=!1,b.mark&&r.modShape(b.mark.id,{style:{strokeColor:b.mark.highlightStyle.strokeColor}}),r.un(u.EVENT.CLICK,X),r.un(u.EVENT.MOUSEMOVE,U))}function Q(){O=!1,A&&(A=!1,b.dataZoom&&r.modShape(b.dataZoom.id,{style:{strokeColor:b.dataZoom.highlightStyle.strokeColor}}),r.un(u.EVENT.MOUSEDOWN,z),r.un(u.EVENT.MOUSEUP,W),r.un(u.EVENT.MOUSEMOVE,U))}function G(e){e.shape!="image"?r.modShape(e.id,{hoverable:!1,clickable:!1,style:{strokeColor:N}}):r.modShape(e.id,{hoverable:!1,clickable:!1,style:{opacity:.3}})}function Y(e){e.shape!="image"?r.modShape(e.id,{hoverable:!0,clickable:!0,style:{strokeColor:e.highlightStyle.strokeColor}}):r.modShape(e.id,{hoverable:!0,clickable:!0,style:{opacity:.8}})}function Z(){return D.show(l),!0}function et(){return K(),Q(),n.dispatch(t.EVENT.RESTORE),!0}function tt(){var e=l.toolbox.feature.saveAsImage,t=e.type||"png";t!="png"&&t!="jpeg"&&(t="png");var n;s.isConnected()?n=s.getConnectedDataURL(t):n=r.toDataURL("image/"+t,l.backgroundColor&&l.backgroundColor.replace(" ","")=="rgba(0,0,0,0)"?"#fff":l.backgroundColor);var i=document.createElement("div");i.id="__echarts_download_wrap__",i.style.cssText="position:fixed;z-index:99999;display:block;top:0;left:0;background-color:rgba(33,33,33,0.5);text-align:center;width:100%;height:100%;line-height:"+document.documentElement.clientHeight+"px;";var o=document.createElement("a");o.href=n,o.setAttribute("download",(e.name?e.name:l.title&&(l.title.text||l.title.subtext)?l.title.text||l.title.subtext:"ECharts")+"."+t),o.innerHTML='
图片另存为")+'"/>',i.appendChild(o),document.body.appendChild(i),o=null,i=null,setTimeout(function(){var e=document.getElementById("__echarts_download_wrap__");e&&(e.onclick=function(){var e=document.getElementById("__echarts_download_wrap__");e.onclick=null,e.innerHTML="",document.body.removeChild(e),e=null},e=null)},500);return}function nt(e){K();var r=e.target._name;return v[r]?v[r]=!1:(v[r]=!0,r==t.CHART_TYPE_LINE?v[t.CHART_TYPE_BAR]=!1:r==t.CHART_TYPE_BAR&&(v[t.CHART_TYPE_LINE]=!1),r==P?v[H]=!1:r==H&&(v[P]=!1)),n.dispatch(t.EVENT.MAGIC_TYPE_CHANGED,e.event,{magicType:v}),!0}function rt(e){K(),v=e,!g&&n.dispatch(t.EVENT.MAGIC_TYPE_CHANGED,null,{magicType:v})}function it(e){var t=e.target.style.iconType,n=l.toolbox.feature[t].onclick;typeof n=="function"&&n(l)}function st(e){if(h.query(e,"toolbox.show")&&h.query(e,"toolbox.feature.magicType.show")){var t=e.toolbox.feature.magicType.type,n=t.length;m={};while(n--)m[t[n]]=!0;n=e.series.length;var r,i;while(n--){r=e.series[n].type,m[r]&&(i=e.xAxis instanceof Array?e.xAxis[e.series[n].xAxisIndex||0]:e.xAxis,i&&(i.type||"category")=="category"&&(i.__boundaryGap=typeof i.boundaryGap!="undefined"?i.boundaryGap:!0),i=e.yAxis instanceof Array?e.yAxis[e.series[n].yAxisIndex||0]:e.yAxis,i&&i.type=="category"&&(i.__boundaryGap=typeof i.boundaryGap!="undefined"?i.boundaryGap:!0),e.series[n].__type=r,e.series[n].__itemStyle=e.series[n].itemStyle?a.clone(e.series[n].itemStyle):{});if(m[P]||m[H])e.series[n].__stack=e.series[n].stack}}v={};var s=e.dataZoom;if(s&&s.show){var o=typeof s.start!="undefined"&&s.start>=0&&s.start<=100?s.start:0,u=typeof s.end!="undefined"&&s.end>=0&&s.end<=100?s.end:100;o>u&&(o+=u,u=o-u,o-=u),_=[{start:o,end:u,start2:0,end2:100}]}else _=[]}function ot(){var e;if(v[t.CHART_TYPE_LINE]||v[t.CHART_TYPE_BAR]){var n=v[t.CHART_TYPE_LINE]?!1:!0;for(var r=0,i=l.series.length;r'+(t[0]||a[0])+"
",c.style.cssText="display:block;margin:0 0 8px 0;padding:4px 6px;overflow:auto;width:"+(b-15)+"px;"+"height:"+(y-100)+"px;";var n=u.query(i,"toolbox.feature.dataView.optionToContent");typeof n!="function"?c.value=S():c.value=n(i),l.appendChild(c),p.style.cssText="float:right;padding:1px 6px;",p.innerHTML=t[1]||a[1],p.onclick=w,l.appendChild(p),u.query(i,"toolbox.feature.dataView.readOnly")===!1?(h.style.cssText="float:right;margin-right:10px;padding:1px 6px;",h.innerHTML=t[2]||a[2],h.onclick=x,l.appendChild(h),c.readOnly=!1,c.style.cursor="default"):(c.readOnly=!0,c.style.cursor="text"),m="width:"+b+"px;"+"height:"+y+"px;"+"background-color:#fff;",l.style.cssText=v+m,s.onselectstart=function(){return!0}}function S(){var e,n,r,s,o,u,a=[],f="";if(i.xAxis){i.xAxis instanceof Array?a=i.xAxis:a=[i.xAxis];for(e=0,s=a.length;e10&&(m="width:"+b+"px;"+"height:"+y+"px;"+"background-color:#fff;",l.style.cssText=v+m,c.style.cssText="display:block;margin:0 0 8px 0;padding:4px 6px;overflow:auto;width:"+(b-15)+"px;"+"height:"+(y-100)+"px;")}function A(){window.removeEventListener?(l.removeEventListener("click",C),l.removeEventListener("mousewheel",C),l.removeEventListener("mousemove",C),l.removeEventListener("mousedown",C),l.removeEventListener("mouseup",C),l.removeEventListener("touchstart",C),l.removeEventListener("touchmove",C),l.removeEventListener("touchend",C)):(l.detachEvent("onclick",C),l.detachEvent("onmousewheel",C),l.detachEvent("onmousemove",C),l.detachEvent("onmousedown",C),l.detachEvent("onmouseup",C)),h.onclick=null,p.onclick=null,d&&(l.removeChild(c),l.removeChild(h),l.removeChild(p)),c=null,h=null,p=null,s.firstChild.removeChild(l),l=null,u=null}var o=e("./base");o.call(this,t,r);var u=this;u.type=t.COMPONENT_TYPE_DATAVIEW;var a=["Data View","close","refresh"],f=e("zrender/tool/env").canvasSupported,l=document.createElement("div"),c=document.createElement("textArea"),h=document.createElement("button"),p=document.createElement("button"),d=!1,v="position:absolute;display:block;overflow:hidden;transition:height 0.8s,background-color 1s;-moz-transition:height 0.8s,background-color 1s;-webkit-transition:height 0.8s,background-color 1s;-o-transition:height 0.8s,background-color 1s;z-index:1;left:0;top:0;",m,g="echarts-dataview",y=r.getHeight(),b=r.getWidth();u.dispose=A,u.resize=L,u.show=E,u.hide=w,k()}return e("../component").define("dataView",t),t}),define("echarts/util/coordinates",["require","zrender/tool/math"],function(e){function n(e,n){return[e*t.sin(n),e*t.cos(n)]}function r(e,t){return[Math.sqrt(e*e+t*t),Math.atan(t/e)]}var t=e("zrender/tool/math");return{polar2cartesian:n,cartesian2polar:r}}),define("echarts/component/polar",["require","./base","../util/coordinates","zrender/tool/util","../component"],function(e){function t(t,n,r,i,s){function p(e,t){s=t,B(e)}function d(){for(var e=0;e0?a="left":Math.round(r[0])<0?a="right":a="center",c.margin?(m=c.margin,d=r[0]>0?m:-m,v=r[1]>0?m:-m,d=r[0]===0?0:d,v=r[1]===0?0:v,r=T(r,o,1)):r=T(r,o,1.2),u.textAlign=a,u.x=r[0]+d,u.y=r[1]+v,c.rotate&&(p=[c.rotate/180*Math.PI,r[0],r[1]]),f.shapeList.push({shape:"text",style:u,draggable:!1,hoverable:!1,rotation:p})}}function b(e){var e=e||0,t=l[e],n=N(e),r=t.__ecIndicator,i=r.length,s=[],o,u;for(var a=0;au||u===undefined)&&(u=e),(e=1)a=Math.floor(a/l)*l-l;else{if(l===0)return u>0?(d=0,p=2*u):u===0?(d=0,p=100):(p=0,d=2*a),{max:p,min:d};c=(l+"").split(".")[1],h=c.length,a=Math.floor(a*Math.pow(10,h))/Math.pow(10,h)-l}Math.abs(a)<=l&&(a=0),u=a+Math.floor(l*Math.pow(10,h)*(n+1))/Math.pow(10,h)}else a=a>0?0:a;return r&&(u=u>0?u*1.2:u*.8,a=a>0?a*.8:a*1.2),{max:u,min:a}}function M(e,t,n,r,i){var s=(e-t)/n,o,u;if(s>1)return i?(s=Math.ceil(s),s%i>0?(Math.ceil(s/i)+1)*i:s):(o=(s+"").split(".")[0],u=o.length,o.charAt(0)>=5?Math.pow(10,u):(o.charAt(0)-0+1)*Math.pow(10,u-1));if(s==1)return 1;if(s===0)return 0;if(!r){o=(s+"").split(".")[1],u=0;while(o[u]=="0")u++;return o[u]>=5?"0."+o.substring(0,u+1)-0+1/Math.pow(10,u):"0."+o.substring(0,u+1)-0+1/Math.pow(10,u+1)}return Math.ceil(s*Math.pow(10,r))/Math.pow(10,r)}function _(e,t,n){e=e||0,t=t||0;var r=l[e].__ecIndicator;if(t>=r.length)return;var i=l[e].__ecIndicator[t],s=N(e),o=i.vector,u=i.value.max,a=i.value.min,f;if(typeof n=="undefined")return s;switch(n){case"min":n=a;break;case"max":n=u;break;case"center":n=(u+a)/2}return u!=a?f=(n-a)/(u-a):f=.5,T(o,s,f)}function D(e){var t=P(e);return t?t.polarIndex:-1}function P(e){var t,n,i,s,o,a,c,h,p,d=Math.min(r.getWidth(),r.getHeight())/2;for(var v=0;vs[0])return{polarIndex:v,valueIndex:Math.floor((p+h/2)/h)%c}}}function H(e){var e=e||0;return l[e].indicator}function B(e){e&&(i=e,l=i.polar,c=i.series),f.clear(),d()}var o=e("./base");o.call(this,t,r);var u=e("../util/coordinates"),a=e("zrender/tool/util"),f=this;f.type=t.COMPONENT_TYPE_POLAR;var l,c,h;f.refresh=B,f.getVector=_,f.getDropBox=b,f.getCenter=N,f.getIndicator=H,f.isInside=D,f.getNearestIndex=P,p(i,s)}return e("../component").define("polar",t),t}),define("echarts/theme/default",[],function(){var e={};return e}),define("echarts/echarts",["require","zrender/tool/env","./config","zrender/tool/util","zrender","zrender/tool/event","zrender/config","./util/shape/icon","./util/shape/markLine","./chart","./chart/island","./component","./component/title","./component/axis","./component/categoryAxis","./component/valueAxis","./component/grid","./component/dataZoom","./component/legend","./component/dataRange","./component/tooltip","./component/toolbox","./component/dataView","./component/polar","./util/ecQuery","./util/ecData","./chart","./component","zrender/tool/util","./util/ecQuery","zrender/tool/util","zrender/tool/color","zrender/tool/util","./util/ecQuery","zrender/tool/util","./util/ecQuery","zrender/tool/util","zrender","zrender/tool/util","zrender/tool/util","./theme/default","./theme/default"],function(e){function u(t){function E(){var r=e("zrender");(r.version||"1.0.3").replace(".","")-00?f.getColor=function(e){return n.getColor(e,t.color)}:f.getColor=function(e){return n.getColor(e,u.color)},typeof t.DRAG_ENABLE_TIME=="undefined"&&(t.DRAG_ENABLE_TIME=u.DRAG_ENABLE_TIME)}function J(t,n){var r=e("zrender/tool/util");n?l=r.clone(t):r.merge(l,r.clone(t),{overwrite:!0,recursive:!0});if(!l.series||l.series.length===0)return;return c=r.clone(l),h=r.clone(l),l.legend&&l.legend.selected?g=l.legend.selected:g={},y.clear(),b.reset(l),z(l),a}function K(){var t=e("./util/ecQuery"),n=e("zrender/tool/util");return t.query(c,"toolbox.show")&&t.query(c,"toolbox.feature.magicType.show")?n.clone(q()):n.clone(q(y.getOption()))}function Q(e,t){return t?(l.series=e,a.setOption(l,t)):a.setOption({series:e}),a}function G(){return K().series}function Y(t,n,r,s,o){var u=e("./util/ecQuery"),f;u.query(c,"toolbox.show")&&u.query(c,"toolbox.feature.magicType.show")?f=q():f=q(y.getOption());var l=e("zrender/tool/util"),v=t instanceof Array?t:[[t,n,r,s,o]],m,w;for(var E=0,S=v.length;Eo[0]&&(i.min0=o[0],i.minY0=r[u][1],i.minX0=r[u][0]),i.max0o[1]&&(i.min1=o[1],i.minY1=r[u][1],i.minX1=r[u][0]),i.max1t.largeThreshold){f.shapeList.push(E(n,f.getItemStyleColor(f.query(t,"itemStyle.normal.color"),s,-1)||h[s]));continue}for(var o=0,u=n.length;o1e-4||Math.abs(e.position[0])>1e-4||Math.abs(e.position[1])>1e-4||Math.abs(e.scale[0]-1)>1e-4||Math.abs(e.scale[1]-1)>1e-4?e.__needTransform=!0:e.__needTransform=!1),n=s[0],r=s[1]}var o;return e.style.__rect?o=e.style.__rect:(o=this.getRect(e.style),o=[o.x,o.x+o.width,o.y,o.y+o.height],e.style.__rect=o),n>=o[0]&&n<=o[1]&&r>=o[2]&&r<=o[3]?!0:!1}},e("zrender/shape/base").derive(n),e("zrender/shape").define("candle",new n),n}),define("echarts/chart/k",["require","../component/base","./calculableBase","../util/ecData","../util/shape/candle","../chart"],function(e){function t(t,n,r,i,s){function h(){f.selectedMap={};var e={top:[],bottom:[]},n;for(var i=0,o=l.length;i0&&p(u,e[u]);for(var i=0,o=f.shapeList.length;i1e-4||Math.abs(e.position[0])>1e-4||Math.abs(e.position[1])>1e-4||Math.abs(e.scale[0]-1)>1e-4||Math.abs(e.scale[1]-1)>1e-4?e.__needTransform=!0:e.__needTransform=!1),t=o[0],i=o[1]}return r.beginPath(),n.prototype.buildPath.call(null,r,e.style),r.closePath(),r.isPointInPath(t,i)}},e("zrender/shape/base").derive(n),e("zrender/shape").define("chord",new n),n}),define("echarts/util/kwargs",[],function(){function e(e,t){var n=new RegExp("(\\/\\*[\\w\\'\\,\\(\\)\\s\\r\\n\\*]*\\*\\/)|(\\/\\/[\\w\\s\\'][^\\n\\r]*$)|(\\/]*>)","gim"),r=new RegExp("\\s+","gim"),i=new RegExp("function.*?\\((.*?)\\)","i"),s=e.toString().replace(n,"").replace(r,"").match(i)[1].split(",");return t!==Object(t)&&(t={}),function(){var n=Array.prototype.slice.call(arguments),r=n[n.length-1];r&&r.constructor===Object?n.pop():r={};for(var i=0;i=0){var n=e.split(/\s*:\s*/),r=parseInt(n[2]||1,10),i,s;if(r===0)throw new Error("Slice step cannot be zero");return r>0?(i=parseInt(n[0]||0,10),s=parseInt(n[1]||t,10)):(i=parseInt(n[0]||t-1,10),s=parseInt(n[1]||-1,10)),i<0&&(i=t+i),s<0&&n[1]&&(s=t+s),r>0?(i=Math.max(Math.min(t,i),0),s=Math.max(Math.min(t,s),0)):(i=Math.max(Math.min(t-1,i),-1),s=Math.max(Math.min(t-1,s),-1)),[i,s,r]}var i=parseInt(e,10);i<0&&(i=t+i);if(i<0||i>t)throw new Error(N(e));return i=Math.max(Math.min(t-1,i),0),[i,i+1,1]}function g(e){var t=e[0];for(var n=1;n=this._shape.length)throw new Error(T(e[r]));if(e.length<=1)return this;var i=n.slice();for(var r=0;r=Math.ceil(e.length/2);s--)i[e[r]]=e[s],i[e[s]]=e[r];return this._transposelike(i,t)}),swapaxes:t(function(e,t,n){return this.transpose([e,t],n)}),rollaxis:t(function(e,t,n){if(e>=this._shape.length)throw new Error(T(e));var r=[];for(var i=0;i=this._shape.length||e<0)throw new Error(T(e));var s=this._shape.slice();s.splice(e,1);if(t&&!S(s,t._shape))throw new Error(x(s,t._shape));t||(t=new v(this._dtype),t.initFromShape(s));var o=t._array,u=w(this._shape,e),a=this._shape[e],f=u*a;return n.call(this,o,i,f,a,u),t}return r.call(this,i)},_withPreprocess2:function(e,t,n,r){var i=this._array;if(!this._size)return;if(t&&!S(this._shape,t._shape))throw new Error(x(this._shape,t._shape));t||(t=new v(this._dtype),t.initFromShape(this._shape));var s=t._array;if(typeof e!="undefined"){e<0&&(e=this._shape.length+e);if(e>=this._shape.length||e<0)throw new Error(T(e));if(e>=this._shape.length)throw new Error(T(e));var o=w(this._shape,e),u=this._shape[e],a=o*u;n.call(this,s,i,a,u,o)}else t.reshape([this._size]),r.call(this,s,i);return t},max:t(function(){function e(e,t,n,r,i){var s=0;for(var o=0;of&&(f=c),a+=i}e[s++]=f}}function t(e){var t=e[0];for(var n=1;nt&&(t=e[n]);return t}return function(n,r){return this._withPreprocess1(n,r,e,t)}}()),min:t(function(){function e(e,t,n,r,i){var s=0;for(var o=0;ol&&(l=h,a=c),f+=i}e[s++]=a}}function t(e){var t=e[0],n=0;for(var r=1;rt&&(n=r,t=e[r]);return n}return function(n,r){return this._withPreprocess1(n,r,e,t)}}()),argmin:t(function(){function e(e,t,n,r,i){var s=0;for(var o=0;ol&&(l=h),a+=i}e[s++]=l-f}}function t(e){var t=e[0],n=e[0];for(var r=1;rn&&(n=e[r]);return n-t}return function(n,r){return this._withPreprocess1(n,r,e,t)}}()),sort:t(function(e,t){e<0&&(e=this._shape.length+e);var n;t==="ascending"?n=function(e,t){return e-t}:t==="descending"&&(n=function(e,t){return t-e});var r=this._array,i=w(this._shape,e),s=this._shape[e],o=i*s,u=new Array(s);for(var a=0;as&&(s=a)}var f=s-i,l=t-e;for(var u=0;u=0&&y>=0){if(e._shape[g]==1)i.unshift(t._shape[y]),b=e.repeat(t._shape[y],g);else if(t._shape[y]==1)i.unshift(e._shape[g]),E=t.repeat(e._shape[g],y);else{if(t._shape[y]!=e._shape[g])throw new Error(x(e._shape,t._shape));i.unshift(e._shape[g])}g--,y--}for(var T=g;T>=0;T--)i.unshift(e._shape[T]);for(var T=y;T>=0;T--)i.unshift(t._shape[T]);e=b,t=E}if(!r)r=new v(this._dtype),r.initFromShape(i);else if(!S(i,r._shape))throw new Error(x(i,r._shape));var N=r._array,C,k,L,A;d?(C=t._shape.length-1,k=!1,L=e,A=t._array):m?(C=e._shape.length-1,k=!0,A=t,L=e._array):(C=Math.abs(e._shape.length-t._shape.length),k=e._shape.length>=t._shape.length,L=e._array,A=t._array);var O=w(i,C),M=i[C],_=O*M,D=r._size/_,P,H,B,j=0;if(k)if(m)for(var F=0;F0)for(var c=r[0];cr[1];c+=r[2])l(e+1,t+s*c);else if(r[2]>0)for(var c=r[0];cr[1];c+=r[2])for(var h=0;hthis._shape.length)throw new Error("Too many indices");var o=i.length,u;s.length?(t=new v(this._dtype),t.initFromShape(s),u=t._array):u=[];var a=this._array,f=0;return l(0,0),s.length?t:u[0]},set:function(e,t){typeof e=="number"&&(e=e.toString());var n=E(this._shape),r=this._parseRanges(e),i=r[0],s=r[1];if(i.length>this._shape.length)throw new Error("Too many indices");var o=typeof t=="number",u=i.length,a=this._array;if(o)var f=t;else{if(!S(s,t.shape()))throw new Error(x(s,t.shape()));var f=t._array}var l=0,c=function(e,t){var r=i[e],s=n[e];if(e0)for(var h=r[0];hr[1];h+=r[2])c(e+1,t+s*h);else if(r[2]>0)for(var h=r[0];hr[1];h+=r[2])for(var p=0;pu)throw new Error(N(e[a]));if(e[a]=0&&h>=0){if(l[c]===1)p=t.repeat(f[h],c);else if(l[c]!==f[h])throw new Error(x(l,f));c--,h--}t=p;var d=w(this._shape,n),u=this._shape[n],m=u*d,y=this._size/m,b=e.length,E=new Uint32Array(y*b),S=0;for(var T=0;T=0){for(var a=_-1;a>=D;a--)i[P--]=A[a];_=D,D=E[--M];for(var a=0;a=0;a--)i[P--]=A[a];return this._array=i,this._shape=k,this._size=L,this}),append:function(){console.warn("TODO")},"delete":t(function(e,t){var n=this._array;typeof e=="number"&&(e=[e]);var r=this._size;typeof t=="undefined"&&(this._shape=[r],t=0);var i=w(this._shape,t),s=this._shape[t],o=i*s,u=0;for(var a=0;as)throw new Error(N(l));if(l=0){var a=Math.floor((u[1]-u[0])/u[2]);a=a<0?0:a,r.push(a)}i++}for(;i0&&(k.style.brushType="both"),k.highlightStyle.lineWidth>0&&(k.highlightStyle.brushType="both"),l.pack(k,w[0],0,t[p],0,d.name);if(o){var L=[g+C]/2;L%=360;var O=L<=90||L>=270;L=L*Math.PI/180;var _=[Math.cos(L),-Math.sin(L)],D=M?45:20,B=h.scale([],_,N+D);h.add(B,B,A);var j={shape:"text",id:i.newShapeId(u.type),zlevel:y-1,hoverable:!1,style:{x:B[0],y:B[1],text:d.name,textAlign:O?"left":"right",color:a}};j.style.textColor=u.deepQuery([d,b],"itemStyle.normal.label.textStyle.color")||"#fff",j.style.textFont=u.getFont(u.deepQuery([d,b],"itemStyle.normal.label.textStyle")),i.addShape(j),u.shapeList.push(j)}k.onmouseover=f(p),k.onmouseout=c(),u.shapeList.push(k),P.push(k),i.addShape(k)}}function R(e,t){var n=e.length;if(!n)return;var r=e[0][0].length,s=b.itemStyle.normal.chordStyle.lineStyle,o=b.itemStyle.emphasis.chordStyle.lineStyle;for(var a=0;a=270,T={shape:"text",id:i.newShapeId(u.type),zlevel:y-1,hoverable:!1,style:{x:E?N+B+4:-N-B-4,y:0,text:Math.round(w.shift()*10)/10+t,textAlign:E?"left":"right"},position:A.slice(),rotation:E?[l/180*Math.PI,0,0]:[(l+180)/180*Math.PI,0,0]};u.shapeList.push(T),i.addShape(T),g+=j*5}}}function z(e){var t=[],n=(new p(e)).max(),r,i;n>1e4?(r="k",i=.001):n>1e7?(r="m",i=1e-6):n>1e10?(r="b",i=1e-9):(r="",i=1);for(var s=0;s=0?e.source=n[i]:u=!1,n[o]>=0?e.target=n[o]:u=!1,e.rawIndex=t,u})}function et(e,t,r){var s=[],o=e.length;for(var a=0;a500)continue;c<5&&(c=5),m.scale(r,r,1/c);var h=1*(u+a)*i/c;m.scaleAndAdd(H[s],H[s],r,-h),m.scaleAndAdd(H[o],H[o],r,h)}for(var s=0,p=_.length;s0&&y(h,e[h]);for(var a=0,f=l.shapeList.length;a0&&(p[r]=p[r]||[],p[r].push(w[r]),w[r]=[]);continue}x>=0?(m-=A>0?h.getCoordSize(x):g-h.getCoord(x),v=m):x<0&&(y+=A>0?h.getCoordSize(x):h.getCoord(x)-b,v=y),w[r].push([d,v,N,a.getNameByIndex(N),d,g]),n[r]=n[r]||{min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY,sum:0,counter:0,average:0},n[r].min>x&&(n[r].min=x,n[r].minY=v,n[r].minX=d),n[r].max0&&(p[_]=p[_]||[],p[_].push(w[_]),w[_]=[]);for(var k=0,L=t.length;k0&&(p[r]=p[r]||[],p[r].push(w[r]),w[r]=[]);continue}x>=0?(m+=A>0?h.getCoordSize(x):h.getCoord(x)-g,d=m):x<0&&(y-=A>0?h.getCoordSize(x):b-h.getCoord(x),d=y),w[r].push([d,v,N,a.getNameByIndex(N),g,v]),n[r]=n[r]||{min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY,sum:0,counter:0,average:0},n[r].min>x&&(n[r].min=x,n[r].minX=d,n[r].minY=v),n[r].max0&&(p[_]=p[_]||[],p[_].push(w[_]),w[_]=[]);for(var k=0,L=t.length;k=0;w--){m=c[w],y=e[w];if(m.type==l.type&&typeof y!="undefined"){r=d[w],i=l.query(m,"itemStyle.normal.lineStyle.width"),o=l.query(m,"itemStyle.normal.lineStyle.type"),u=l.query(m,"itemStyle.normal.lineStyle.color"),a=l.getItemStyleColor(l.query(m,"itemStyle.normal.color"),w,-1),p=typeof l.query(m,"itemStyle.normal.areaStyle")!="undefined",v=l.query(m,"itemStyle.normal.areaStyle.color");for(var E=0,S=y.length;E=0;n--){f=l.shapeList[n]._seriesIndex;if(t[f]&&!t[f][3]){if(l.shapeList[n]._main){h=l.shapeList[n].style.pointList,o=Math.abs(h[0][0]-h[1][0]),a=Math.abs(h[0][1]-h[1][1]),p=l.shapeList[n]._orient=="horizontal";if(t[f][2]){if(l.shapeList[n].shape=="polygon"){var d=h.length;l.shapeList[n].style.pointList[d-3]=h[d-2],p?l.shapeList[n].style.pointList[d-3][0]=h[d-4][0]:l.shapeList[n].style.pointList[d-3][1]=h[d-4][1],l.shapeList[n].style.pointList[d-2]=h[d-1]}l.shapeList[n].style.pointList.pop(),p?(s=o,u=0):(s=0,u=-a)}else{l.shapeList[n].style.pointList.shift();if(l.shapeList[n].shape=="polygon"){var v=l.shapeList[n].style.pointList.pop();p?v[0]=h[0][0]:v[1]=h[0][1],l.shapeList[n].style.pointList.push(v)}p?(s=-o,u=0):(s=0,u=a)}i.modShape(l.shapeList[n].id,{style:{pointList:l.shapeList[n].style.pointList}},!0)}else{if(t[f][2]&&l.shapeList[n]._dataIndex==c[f].data.length-1){i.delShape(l.shapeList[n].id);continue}if(!t[f][2]&&l.shapeList[n]._dataIndex===0){i.delShape(l.shapeList[n].id);continue}}i.animate(l.shapeList[n].id,"").when(500,{position:[s,u]}).start()}}}function M(){var e=l.query(s,"animationDuration"),t=l.query(s,"animationEasing"),n,r,o,u=0;for(var a=0,f=l.shapeList.length;a0&&v(h,e[h]);for(var a=0,f=l.shapeList.length;a0&&(v.style.x+=1,v.style.y+=1,v.style.width-=2,v.style.height-=2,v.style.strokeColor=v.highlightStyle.strokeColor=t.itemStyle.normal.borderColor,v.highlightStyle.lineWidth=3,v.style.brushType="both"),f.setItemShape(a,v))):(l.selectedMap[a]=!0,p[e[m]]=r.getColor(e[m])),l.selectedMap[a]&&(u=t.stack||o+e[m],typeof i[u]=="undefined"?(i[u]=n,h[n]=[e[m]],n++):h[i[u]].push(e[m])),d=Math.max(d,t.data.length);return{locationMap:h,maxDataLength:d}}function g(e,n,r){var o=n[0][0],u=c[o],a=u.xAxisIndex,f=s.xAxis.getAxis(a),h,p,d=b(f,n),v=d.gap,m=d.barGap,g=d.barWidthMap,y=d.barWidth,S=d.barMinHeightMap,x,T={},N,C,k,L,A,O,M,_,D;for(var P=0,H=e;P0?(x=F>0?p.getCoordSize(D):L-p.getCoord(D),I==1&&S[o]>x&&(x=S[o]),k-=x,C=k):D<0?(x=F>0?p.getCoordSize(D):p.getCoord(D)-O,I==1&&S[o]>x&&(x=S[o]),C=A,A+=x):(x=0,k-=x,C=k),M=w(o,P,f.getNameByIndex(P),N,C,g[o]||y,x,"vertical"),T[o]=T[o]||{min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY,sum:0,counter:0,average:0},T[o][P]=N+(g[o]||y)/2,T[o].min>D&&(T[o].min=D,T[o].minY=C,T[o].minX=T[o][P]),T[o].max0?(x=F>0?p.getCoordSize(D):p.getCoord(D)-L,I==1&&S[o]>x&&(x=S[o]),N=k,k+=x):D<0?(x=F>0?p.getCoordSize(D):O-p.getCoord(D),I==1&&S[o]>x&&(x=S[o]),A-=x,N=A):(x=0,N=k,k+=x),M=w(o,P,f.getNameByIndex(P),N,C-(g[o]||y),x,g[o]||y,"horizontal"),T[o]=T[o]||{min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY,sum:0,counter:0,average:0},T[o][P]=C-(g[o]||y)/2,T[o].min>D&&(T[o].min=D,T[o].minX=N+x,T[o].minY=T[o][P]),T[o].max1?typeof f=="string"&&f.match(/%$/)?Math.floor(e.getGap()*(100-parseFloat(f))/100):e.getGap()-f:u,x=0,a=o>1?Math.floor((S-u)/(o-1)):0;if(a<0)return b(e,t,!0)}return{barWidthMap:r,barMinHeightMap:i,gap:S,barWidth:x,barGap:a}}function w(e,t,n,r,s,o,u,d){var v,m=c[e],g=m.data[t],y=p[e],b=[g,m],w=l.deepQuery(b,"itemStyle.normal.color")||y,E=l.deepQuery(b,"itemStyle.emphasis.color"),S=l.deepMerge(b,"itemStyle.normal"),x=S.borderWidth,T=l.deepMerge(b,"itemStyle.emphasis");return v={shape:"rectangle",zlevel:h,clickable:!0,style:{x:r,y:s,width:o,height:u,brushType:"both",color:l.getItemStyleColor(w,e,t,g),radius:S.borderRadius,lineWidth:x,strokeColor:S.borderColor},highlightStyle:{color:l.getItemStyleColor(E,e,t,g),radius:T.borderRadius,lineWidth:T.borderWidth,strokeColor:T.borderColor},_orient:d},v.highlightStyle.color=v.highlightStyle.color||(typeof v.style.color=="string"?f.lift(v.style.color,-0.3):v.style.color),x>0&&v.style.height>x&&v.style.width>x?(v.style.y+=x/2,v.style.height-=x,v.style.x+=x/2,v.style.width-=x):v.style.brushType="fill",v.highlightStyle.textColor=v.highlightStyle.color,v=l.addLabel(v,m,g,n,d),l.deepQuery([g,m,i],"calculable")&&(l.setCalculable(v),v.draggable=!0),a.pack(v,c[e],e,c[e].data[t],t,n),v}function E(e,t,n){for(var r=0,i=e.length;r=0;n--){d=a.get(l.shapeList[n],"seriesIndex");if(t[d]&&!t[d][3]&&l.shapeList[n].shape=="rectangle"){v=a.get(l.shapeList[n],"dataIndex"),p=c[d];if(t[d][2]&&v==p.data.length-1){r.delShape(l.shapeList[n].id);continue}if(!t[d][2]&&v===0){r.delShape(l.shapeList[n].id);continue}l.shapeList[n]._orient=="horizontal"?(h=s.yAxis.getAxis(p.yAxisIndex||0).getGap(),f=t[d][2]?-h:h,o=0):(u=s.xAxis.getAxis(p.xAxisIndex||0).getGap(),o=t[d][2]?u:-u,f=0),r.animate(l.shapeList[n].id,"").when(500,{position:[o,f]}).start()}}}function C(){var e,t,n,s,o,u,f,c,h;for(var p=0,d=l.shapeList.length;p0&&v<4&&m<4&&T(t,n[c],!1)&&h.deepQuery([n[c],t],"itemStyle.normal.label.position")!="center"?g+=v<4?20:-20:g=0,b(e,c,v,g,n[c].selected,L,A,w,E,N),y||(w=E)}}function b(e,t,n,r,i,s,o,u,f,l){var c=w(e,t,n,i,s,o,u,f,l);a.pack(c,p[e],e,p[e].data[t],t,p[e].data[t].name,n),c._lastAddRadius=r,h.shapeList.push(c);var d=E(e,t,n,r,u,f,l,!1);d&&(d._dataIndex=t,h.shapeList.push(d));var v=x(e,t,r,s,o,u,f,l,!1);v&&(v._dataIndex=t,h.shapeList.push(v))}function w(e,t,n,s,o,u,a,l,g){var y=p[e],b=y.data[t],w=[b,y],E=h.parseCenter(r,y.center),S=h.deepMerge(w,"itemStyle.normal")||{},x=h.deepMerge(w,"itemStyle.emphasis")||{},C=h.getItemStyleColor(S.color,e,t,b)||g,k=h.getItemStyleColor(x.color,e,t,b)||(typeof C=="string"?c.lift(C,-0.2):C),L={shape:"sector",zlevel:d,clickable:!0,style:{x:E[0],y:E[1],r0:o,r:u,startAngle:a,endAngle:l,brushType:"both",color:C,lineWidth:S.borderWidth,strokeColor:S.borderColor,lineJoin:"round"},highlightStyle:{color:k,lineWidth:x.borderWidth,strokeColor:x.borderColor,lineJoin:"round"},_seriesIndex:e,_dataIndex:t};if(s){var A=((L.style.startAngle+L.style.endAngle)/2).toFixed(2)-0;L.style._hasSelected=!0,L.style._x=L.style.x,L.style._y=L.style.y;var O=h.query(y,"selectedOffset");L.style.x+=f.cos(A,!0)*O,L.style.y-=f.sin(A,!0)*O,m[e][t]=!0}else m[e][t]=!1;v&&(L.onclick=h.shapeHandler.onclick),h.deepQuery([b,y,i],"calculable")&&(h.setCalculable(L),L.draggable=!0);if(T(y,b,!0)||N(y,b,!0))L.onmouseover=h.shapeHandler.onmouseover;return L}function E(e,t,n,i,s,o,u,a){var c=p[e],v=c.data[t];if(!T(c,v,a))return;var m=a?"emphasis":"normal",g=l.merge(l.clone(v.itemStyle)||{},c.itemStyle,{overwrite:!1,recursive:!0}),y=g[m].label,b=y.textStyle||{},w=h.parseCenter(r,c.center),E=w[0],x=w[1],N,C,k=((o+s)/2+360)%360,L=h.parseRadius(r,c.radius),A,O="middle";return y.position=y.position||g.normal.label.position,y.position=="center"?(L=L[1],N=E,C=x,A="center"):y.position=="inner"?(L=(L[0]+L[1])/2+i,N=Math.round(E+L*f.cos(k,!0)),C=Math.round(x-L*f.sin(k,!0)),u="#fff",A="center"):(L=L[1]- -g[m].labelLine.length+i,N=E+L*f.cos(k,!0),C=x-L*f.sin(k,!0),A=k>=90&&k<=270?"right":"left"),y.position!="center"&&y.position!="inner"&&(N+=A=="left"?20:-20),v.__labelX=N-(A=="left"?5:-5),v.__labelY=C,{shape:"text",zlevel:d+1,hoverable:!1,style:{x:N,y:C,color:b.color||u,text:S(e,t,n,m),textAlign:b.align||A,textBaseline:b.baseline||O,textFont:h.getFont(b)},highlightStyle:{brushType:"fill"},_seriesIndex:e,_dataIndex:t}}function S(e,t,n,r){var i=p[e],s=i.data[t],o=h.deepQuery([s,i],"itemStyle."+r+".label.formatter");if(!o)return s.name;if(typeof o=="function")return o(i.name,s.name,s.value,n);if(typeof o=="string")return o=o.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}").replace("{d}","{d0}"),o=o.replace("{a0}",i.name).replace("{b0}",s.name).replace("{c0}",s.value).replace("{d0}",n),o}function x(e,t,n,i,s,o,u,a,c){var v=p[e],m=v.data[t];if(N(v,m,c)){var g=c?"emphasis":"normal",y=l.merge(l.clone(m.itemStyle)||{},v.itemStyle,{overwrite:!1,recursive:!0}),b=y[g].labelLine,w=b.lineStyle||{},E=h.parseCenter(r,v.center),S=E[0],x=E[1],T=s,C=h.parseRadius(r,v.radius)[1]- -b.length+n,k=(u+o)/2%360,L=f.cos(k,!0),A=f.sin(k,!0);return{shape:"brokenLine",zlevel:d+1,hoverable:!1,style:{pointList:[[S+T*L,x-T*A],[S+C*L,x-C*A],[m.__labelX,m.__labelY]],strokeColor:w.color||a,lineType:w.type,lineWidth:w.width},_seriesIndex:e,_dataIndex:t}}return}function T(e,t,n){return h.deepQuery([t,e],"itemStyle."+(n?"emphasis":"normal")+".label.show")}function N(e,t,n){return h.deepQuery([t,e],"itemStyle."+(n?"emphasis":"normal")+".labelLine.show")}function C(e){var n=l.merge;return e=n(e||{},t.pie,{overwrite:!1,recursive:!0}),e.itemStyle.normal.label.textStyle=n(e.itemStyle.normal.label.textStyle||{},t.textStyle,{overwrite:!1,recursive:!0}),e.itemStyle.emphasis.label.textStyle=n(e.itemStyle.emphasis.label.textStyle||{},t.textStyle,{overwrite:!1,recursive:!0}),e}function k(e,t){s=t,L(e)}function L(e){e&&(i=e,p=i.series),h.clear(),g()}function A(e){var n={};for(var i=0,s=e.length;i