var define,require,esl;!function(d){function t($){l($,M)||(J[$]=1)}function p(B,A){function F($){0===$.indexOf(".")&&C.push($)}var C=[];if("string"==typeof B?F(B):E(B,function($){F($)}),C.length>0)throw new Error("[REQUIRE_FATAL]Relative ID is not allowed in global require: "+C.join(", "));var D=H.waitSeconds;return D&&B instanceof Array&&(_&&clearTimeout(_),_=setTimeout(i,1000*D)),$(B,A)}function i(){function $(H,B){if(!F[H]&&!l(H,M)){F[H]=1,l(H,A)||D[H]||(D[H]=1,_.push(H));var I=z[H];I?B&&(D[H]||(D[H]=1,_.push(H)),E(I.depMs,function(_){$(_.absId,_.hard)})):C[H]||(C[H]=1,G.push(H))}}var _=[],G=[],D={},C={},F={};for(var B in J)$(B,1);if(_.length||G.length)throw new Error("[MODULE_TIMEOUT]Hang( "+(_.join(", ")||"none")+" ) Miss( "+(G.join(", ")||"none")+" )")}function h($){E(D,function(_){v($,_.deps,_.factory)}),D.length=0}function j(_,$,C){if(null==C&&(null==$?(C=_,_=null):(C=$,$=null,_ instanceof Array&&($=_,_=null))),null!=C){var B=window.opera;if(!_&&document.attachEvent&&(!B||"[object Opera]"!==B.toString())){var A=L();_=A&&A.getAttribute("data-require-id")}_?v(_,$,C):D[0]={deps:$,factory:C}}}function w(){var $=H.config[this.id];return $&&"object"==typeof $?$:{}}function v(_,$,A){z[_]||(z[_]={id:_,depsDec:$,deps:$||["require","exports","module"],factoryDeps:[],factory:A,exports:{},config:w,state:C,require:r(_),depMs:[],depMkv:{},depRs:[]})}function k(_){var $=z[_];if($&&!l(_,G)){var H=$.deps,C=$.factory,B=0;"function"==typeof C&&(B=Math.min(C.length,H.length),!$.depsDec&&C.toString().replace(/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,"").replace(/require\(\s*(['"'])([^'"]+)\1\s*\)/g,function(_,$,A){H.push(A)}));var D=[],A=[];E(H,function(J,G){var E,H,I=Q(J),C=F(I.mod,_);C&&!T[C]?(I.res&&(H={id:J,mod:C,res:I.res},A.push(J),$.depRs.push(H)),E=$.depMkv[C],E||(E={id:I.mod,absId:C,hard:B>G},$.depMs.push(E),$.depMkv[C]=E,D.push(C))):E={absId:C},B>G&&$.factoryDeps.push(H||E)}),$.state=G,f(_),b(D),A.length&&$.require(A,function(){E($.depRs,function($){$.absId||($.absId=F($.id,_))}),o()})}}function o(){for(var $ in J)k($),c($),y($)}function c(_){function $(_){if(k(_),!l(_,G))return!1;if(l(_,A)||B[_])return!0;B[_]=1;var D=z[_],C=!0;return E(D.depMs,function(_){return C=$(_.absId)}),C&&E(D.depRs,function($){return C=!!$.absId}),C&&(D.state=A),C}var B={};$(_)}function f($){function C(){if(!B&&_.state===A){B=1;var H=1;if(E(_.factoryDeps,function(_){var $=_.absId;return T[$]?void 0:(y($),H=l($,M))}),H){try{var F=_.factory,D="function"==typeof F?F.apply(d,s(_.factoryDeps,{require:_.require,exports:_.exports,module:_})):F;null!=D&&(_.exports=D),_.invokeFactory=null}catch(C){if(/^\[MODULE_MISS\]"([^"]+)/.test(C.message)){var G=_.depMkv[RegExp.$1];return G&&(G.hard=1),void(B=0)}throw C}O($)}}}var B,_=z[$];_.invokeFactory=C}function l(_,$){return z[_]&&z[_].state>=$}function y(_){var $=z[_];$&&$.invokeFactory&&$.invokeFactory()}function s(_,$){var A=[];return E(_,function(_,B){"object"==typeof _&&(_=_.absId),A[B]=$[_]||z[_].exports}),A}function R(_,$){if(l(_,M))return void $();var A=K[_];A||(A=K[_]=[]),A.push($)}function O(_){var $=z[_];$.state=M,delete J[_];for(var B=K[_]||[],A=B.length;A--;)B[A]();B.length=0,K[_]=null}function b($,C,A){function _(){if("function"==typeof C&&!B){var _=1;E($,function($){return T[$]?void 0:_=!!l($,M)}),_&&(B=1,C.apply(d,s($,T)))}}var B=0;E($,function($){T[$]||l($,M)||(R($,_),($.indexOf("!")>0?$0:a)($,A))}),_()}function a(_){function D(){var $=S[_];U($||_,C)}function C(){if(B){var $;"function"==typeof B.init&&($=B.init.apply(d,s(A,T))),null==$&&B.exports&&($=d,E(B.exports.split("."),function(_){return $=$[_],!!$})),j(_,A,$||{})}else h(_);o()}if(!V[_]&&!z[_]){V[_]=1;var B=H.shim[_];B instanceof Array&&(H.shim[_]=B={deps:B});var A=B&&(B.deps||[]);A?(E(A,function($){H.shim[$]||(H.shim[$]={})}),$(A,D)):D()}}function $0(A,_){function F($){E.exports=$||!0,O(A)}function C(D){var C=_?z[_].require:$;D.load(B.res,C,F,w.call({id:A}))}if(!z[A]){var D=S[A];if(D)return void a(D);var B=Q(A),E={id:A,state:G};z[A]=E,F.fromText=function(_,$){new Function($)(),h(_)},C($(B.mod))}}function e(_,$){var A=Y(_,1,$);return A.sort(P),A}function W(){function $($){S[$]=_}H.baseUrl=H.baseUrl.replace(/\/$/,"")+"/",B=e(H.paths),Z=e(H.map,1),E(Z,function($){$.v=e($.v)}),X=[],E(H.packages,function(_){var $=_;"string"==typeof _&&($={name:_.split("/")[0],location:_,main:"main"}),$.location=$.location||$.name,$.main=($.main||"main").replace(/\.js$/i,""),$.reg=N($.name),X.push($)}),X.sort(P),x=e(H.urlArgs,1),S={};for(var _ in H.bundles)E(H.bundles[_],$)}function _0(_,$,A){E($,function($){return $.reg.test(_)?(A($.v,$.k,$),!1):void 0})}function n(_){var $=/(\.[a-z0-9]+)$/i,G=/(\?[^#]*)$/,E="",D=_,F="";G.test(_)&&(F=RegExp.$1,_=_.replace(G,"")),$.test(_)&&(E=RegExp.$1,D=_.replace($,""));var C,A=D;return _0(D,B,function(_,$){A=A.replace($,_),C=1}),C||_0(D,X,function(_,$,B){A=A.replace(B.name,B.location)}),/^([a-z]{2,10}:\/)?\//i.test(A)||(A=H.baseUrl+A),A+=E+F,_0(D,x,function($){A+=(A.indexOf("?")>0?"&":"?")+$}),A}function r($){function A(G,C){if("string"==typeof G){if(!_[G]){var D=F(G,$);if(y(D),!l(D,M))throw new Error("[MODULE_MISS]\""+D+"\" is not exists!");_[G]=z[D].exports}return _[G]}if(G instanceof Array){var B=[],A=[];E(G,function(I,D){var C=Q(I),E=F(C.mod,$),G=C.res,H=E;if(G){var _=E+"!"+G;0!==G.indexOf(".")&&S[_]?E=H=_:H=null}A[D]=H,t(E),B.push(E)}),b(B,function(){E(A,function(B,_){null==B&&(B=A[_]=F(G[_],$),t(B))}),b(A,C,$),o()},$),o()}}var _={};return A.toUrl=function(_){return n(F(_,$))},A}function F(A,_){if(!A)return"";_=_||"";var G=Q(A);if(!G)return A;var C=G.res,B=q(G.mod,_);if(E(X,function(_){var $=_.name;return $===B?(B=$+"/"+_.main,!1):void 0}),_0(_,Z,function($){_0(B,$,function(_,$){B=B.replace($,_)})}),C){var D=l(B,M)&&$(B);C=D&&D.normalize?D.normalize(C,function($){return F($,_)}):F(C,_),B+="!"+C}return B}function q(_,$){if(0===_.indexOf(".")){var G=$.split("/"),D=_.split("/"),C=G.length-1,E=D.length,B=0,A=0;$:for(var F=0;E>F;F++)switch(D[F]){case"..":if(!(C>B))break $;B++,A++;break;case".":A++;break;default:break $}return G.length=C-B,D=D.slice(A),G.concat(D).join("/")}return _}function Q(_){var $=_.split("!");return $[0]?{mod:$[0],res:$[1]}:void 0}function Y(_,$,D){var B=[];for(var A in _)if(_.hasOwnProperty(A)){var C={k:A,v:_[A]};B.push(C),$&&(C.reg="*"===A&&D?/^/:N(A))}return B}function L(){if(m)return m;if(g&&"interactive"===g.readyState)return g;for(var _=document.getElementsByTagName("script"),$=_.length;$--;){var A=_[$];if("interactive"===A.readyState)return g=A,A}}function U(_,$){function B(){var _=A.readyState;("undefined"==typeof _||/^(loaded|complete)$/.test(_))&&(A.onload=A.onreadystatechange=null,A=null,$())}var A=document.createElement("script");A.setAttribute("data-require-id",_),A.src=n(_+".js"),A.async=!0,A.readyState?A.onreadystatechange=B:A.onload=B,m=A,I?u.insertBefore(A,I):u.appendChild(A),m=null}function N($){return new RegExp("^"+$+"(/|$)")}function E(_,$){if(_ instanceof Array)for(var B=0,A=_.length;A>B&&$(_[B],B)!==!1;B++);}function P(_,$){var B=_.k||_.name,A=$.k||$.name;return"*"===A?-1:"*"===B?1:A.length-B.length}var _,z={},C=1,G=2,A=3,M=4,J={},T={require:p,exports:1,module:1},$=r(),H={baseUrl:"./",paths:{},config:{},map:{},packages:[],shim:{},waitSeconds:0,bundles:{},urlArgs:{}};p.version="2.0.2",p.loader="esl",p.toUrl=$.toUrl;var D=[];j.amd={};var K={},V={};p.config=function(_){if(_){for(var $ in H){var C=_[$],B=H[$];if(C)if("urlArgs"===$&&"string"==typeof C)H.urlArgs["*"]=C;else if(B instanceof Array)B.push.apply(B,C);else if("object"==typeof B){for(var A in C)B[A]=C[A]}else H[$]=C}W()}},W();var B,X,Z,S,x,m,g,u=document.getElementsByTagName("head")[0],I=document.getElementsByTagName("base")[0];I&&(u=I.parentNode),define||(define=j,require||(require=p),esl=p)}(this),define("echarts",["echarts/echarts"],function($){return $}),define("echarts/echarts",["require","./config","zrender/tool/util","zrender/tool/event","zrender/tool/env","zrender","zrender/config","./chart/island","./component/toolbox","./component","./component/title","./component/tooltip","./component/legend","./util/ecData","./chart","zrender/tool/color","./component/timeline","zrender/shape/Image","zrender/loadingEffect/Bar","zrender/loadingEffect/Bubble","zrender/loadingEffect/DynamicLine","zrender/loadingEffect/Ring","zrender/loadingEffect/Spin","zrender/loadingEffect/Whirling","./theme/macarons","./theme/infographic"],function(_){function I(){K.Dispatcher.call(this)}function H($){$.innerHTML="",this._themeConfig={},this.dom=$,this._connected=!1,this._status={dragIn:!1,dragOut:!1,needRefresh:!1},this._curEventType=!1,this._chartList=[],this._messageCenter=new I,this._messageCenterOutSide=new I,this.resize=this.resize(),this._init()}function C(_,$,F,D,C){for(var E=_._chartList,B=E.length;B--;){var A=E[B];"function"==typeof A[$]&&A[$](F,D,C)}}var B=_("./config"),D=_("zrender/tool/util"),K=_("zrender/tool/event"),J={},E=_("zrender/tool/env").canvasSupported,G=new Date-0,$={},A="_echarts_instance_";J.version="2.2.7",J.dependencies={zrender:"2.1.1"},J.init=function(B,D){var C=_("zrender");C.version.replace(".","")-0G;G++){var J=L[G],K=F[J];I[K]="_on"+J.toLowerCase(),M.on(K,this._onzrevent)}this.chart={},this.component={};var A=_("./chart/island");this._island=new A(this._themeConfig,this._messageCenter,M,{},this),this.chart.island=this._island;var E=_("./component/toolbox");this._toolbox=new E(this._themeConfig,this._messageCenter,M,{},this),this.component.toolbox=this._toolbox;var $=_("./component");$.define("title",_("./component/title")),$.define("tooltip",_("./component/tooltip")),$.define("legend",_("./component/legend")),(0===M.getWidth()||0===M.getHeight())&&console.error("Dom\u2019s width & height should be ready before init.")},__onevent:function(_){_.__echartsId=_.__echartsId||this.id;var $=_.__echartsId===this.id;switch(this._curEventType||(this._curEventType=_.type),_.type){case B.EVENT.LEGEND_SELECTED:this._onlegendSelected(_);break;case B.EVENT.DATA_ZOOM:if(!$){var E=this.component.dataZoom;E&&(E.silence(!0),E.absoluteZoom(_.zoom),E.silence(!1))}this._ondataZoom(_);break;case B.EVENT.DATA_RANGE:$&&this._ondataRange(_);break;case B.EVENT.MAGIC_TYPE_CHANGED:if(!$){var C=this.component.toolbox;C&&(C.silence(!0),C.setMagicType(_.magicType),C.silence(!1))}this._onmagicTypeChanged(_);break;case B.EVENT.DATA_VIEW_CHANGED:$&&this._ondataViewChanged(_);break;case B.EVENT.TOOLTIP_HOVER:$&&this._tooltipHover(_);break;case B.EVENT.RESTORE:this._onrestore();break;case B.EVENT.REFRESH:$&&this._onrefresh(_);break;case B.EVENT.TOOLTIP_IN_GRID:case B.EVENT.TOOLTIP_OUT_GRID:if($){if(this._connected){var D=this.component.grid;D&&(_.x=(_.event.zrenderX-D.getX())/D.getWidth(),_.y=(_.event.zrenderY-D.getY())/D.getHeight())}}else{D=this.component.grid;D&&this._zr.trigger("mousemove",{connectTrigger:!0,zrenderX:D.getX()+_.x*D.getWidth(),zrenderY:D.getY()+_.y*D.getHeight()})}}if(this._connected&&$&&this._curEventType===_.type){for(var A in this._connected)this._connected[A].connectedEventHandler(_);this._curEventType=null}(!$||!this._connected&&$)&&(this._curEventType=null)},_onclick:function(_){if(C(this,"onclick",_),_.target){var $=this._eventPackage(_.target);$&&null!=$.seriesIndex&&this._messageCenter.dispatch(B.EVENT.CLICK,_.event,$,this)}},_ondblclick:function(_){if(C(this,"ondblclick",_),_.target){var $=this._eventPackage(_.target);$&&null!=$.seriesIndex&&this._messageCenter.dispatch(B.EVENT.DBLCLICK,_.event,$,this)}},_onmouseover:function(_){if(_.target){var $=this._eventPackage(_.target);$&&null!=$.seriesIndex&&this._messageCenter.dispatch(B.EVENT.HOVER,_.event,$,this)}},_onmouseout:function(_){if(_.target){var $=this._eventPackage(_.target);$&&null!=$.seriesIndex&&this._messageCenter.dispatch(B.EVENT.MOUSEOUT,_.event,$,this)}},_ondragstart:function($){this._status={dragIn:!1,dragOut:!1,needRefresh:!1},C(this,"ondragstart",$)},_ondragenter:function($){C(this,"ondragenter",$)},_ondragover:function($){C(this,"ondragover",$)},_ondragleave:function($){C(this,"ondragleave",$)},_ondrop:function($){C(this,"ondrop",$,this._status),this._island.ondrop($,this._status)},_ondragend:function(_){if(C(this,"ondragend",_,this._status),this._timeline&&this._timeline.ondragend(_,this._status),this._island.ondragend(_,this._status),this._status.needRefresh){this._syncBackupData(this._option);var $=this._messageCenter;$.dispatch(B.EVENT.DATA_CHANGED,_.event,this._eventPackage(_.target),this),$.dispatch(B.EVENT.REFRESH,null,null,this)}},_onlegendSelected:function($){this._status.needRefresh=!1,C(this,"onlegendSelected",$,this._status),this._status.needRefresh&&this._messageCenter.dispatch(B.EVENT.REFRESH,null,null,this)},_ondataZoom:function($){this._status.needRefresh=!1,C(this,"ondataZoom",$,this._status),this._status.needRefresh&&this._messageCenter.dispatch(B.EVENT.REFRESH,null,null,this)},_ondataRange:function($){this._clearEffect(),this._status.needRefresh=!1,C(this,"ondataRange",$,this._status),this._status.needRefresh&&this._zr.refreshNextFrame()},_onmagicTypeChanged:function(){this._clearEffect(),this._render(this._toolbox.getMagicOption())},_ondataViewChanged:function($){this._syncBackupData($.option),this._messageCenter.dispatch(B.EVENT.DATA_CHANGED,null,$,this),this._messageCenter.dispatch(B.EVENT.REFRESH,null,null,this)},_tooltipHover:function(_){var $=[];C(this,"ontooltipHover",_,$)},_onrestore:function(){this.restore()},_onrefresh:function($){this._refreshInside=!0,this.refresh($),this._refreshInside=!1},_syncBackupData:function($){this.component.dataZoom&&this.component.dataZoom.syncBackupData($)},_eventPackage:function($){if($){var C=_("./util/ecData"),B=C.get($,"seriesIndex"),A=C.get($,"dataIndex");return A=-1!=B&&this.component.dataZoom?this.component.dataZoom.getRealDataIndex(B,A):A,{seriesIndex:B,seriesName:(C.get($,"series")||{}).name,dataIndex:A,data:C.get($,"data"),name:C.get($,"name"),value:C.get($,"value"),special:C.get($,"special")}}},_noDataCheck:function(_){for(var $=_.series,D=0,A=$.length;A>D;D++)if($[D].type==B.CHART_TYPE_MAP||$[D].data&&$[D].data.length>0||$[D].markPoint&&$[D].markPoint.data&&$[D].markPoint.data.length>0||$[D].markLine&&$[D].markLine.data&&$[D].markLine.data.length>0||$[D].nodes&&$[D].nodes.length>0||$[D].links&&$[D].links.length>0||$[D].matrix&&$[D].matrix.length>0||$[D].eventList&&$[D].eventList.length>0)return!1;var C=this._option&&this._option.noDataLoadingOption||this._themeConfig.noDataLoadingOption||B.noDataLoadingOption||{text:this._option&&this._option.noDataText||this._themeConfig.noDataText||B.noDataText,effect:this._option&&this._option.noDataEffect||this._themeConfig.noDataEffect||B.noDataEffect};return this.clear(),this.showLoading(C),!0},_render:function(N){if(this._mergeGlobalConifg(N),!this._noDataCheck(N)){var J=N.backgroundColor;if(J)if(E||-1==J.indexOf("rgba"))this.dom.style.backgroundColor=J;else{var F=J.split(",");this.dom.style.filter="alpha(opacity="+100*F[3].substring(0,F[3].lastIndexOf(")"))+")",F.length=3,F[0]=F[0].replace("a",""),this.dom.style.backgroundColor=F.join(",")+")"}this._zr.clearAnimation(),this._chartList=[];var G=_("./chart"),P=_("./component");(N.xAxis||N.yAxis)&&(N.grid=N.grid||{},N.dataZoom=N.dataZoom||{});for(var O,I,C,D=["title","legend","tooltip","dataRange","roamController","grid","dataZoom","xAxis","yAxis","polar"],H=0,Q=D.length;Q>H;H++)I=D[H],C=this.component[I],N[I]?(C?C.refresh&&C.refresh(N):(O=P.get(/^[xy]Axis$/.test(I)?"axis":I),C=new O(this._themeConfig,this._messageCenter,this._zr,N,this,I),this.component[I]=C),this._chartList.push(C)):C&&(C.dispose(),this.component[I]=null,delete this.component[I]);for(var L,M,K,A={},H=0,Q=N.series.length;Q>H;H++)M=N.series[H].type,M?A[M]||(A[M]=!0,L=G.get(M),L?(this.chart[M]?(K=this.chart[M],K.refresh(N)):K=new L(this._themeConfig,this._messageCenter,this._zr,N,this),this._chartList.push(K),this.chart[M]=K):console.error(M+" has not been required.")):console.error("series["+H+"] chart type has not been defined.");for(M in this.chart)M==B.CHART_TYPE_ISLAND||A[M]||(this.chart[M].dispose(),this.chart[M]=null,delete this.chart[M]);this.component.grid&&this.component.grid.refixAxisShape(this.component),this._island.refresh(N),this._toolbox.refresh(N),N.animation&&!N.renderAsImage?this._zr.refresh():this._zr.render();var $="IMG"+this.id,R=document.getElementById($);N.renderAsImage&&E?(R?R.src=this.getDataURL(N.renderAsImage):(R=this.getImage(N.renderAsImage),R.id=$,R.style.position="absolute",R.style.left=0,R.style.top=0,this.dom.firstChild.appendChild(R)),this.un(),this._zr.un(),this._disposeChartList(),this._zr.clear()):R&&R.parentNode.removeChild(R),R=null,this._option=N}},restore:function(){this._clearEffect(),this._option=D.clone(this._optionRestore),this._disposeChartList(),this._island.clear(),this._toolbox.reset(this._option,!0),this._render(this._option)},refresh:function(_){this._clearEffect(),_=_||{};var $=_.option;!this._refreshInside&&$&&($=this.getOption(),D.merge($,_.option,!0),D.merge(this._optionRestore,_.option,!0),this._toolbox.reset($)),this._island.refresh($),this._toolbox.refresh($),this._zr.clearAnimation();for(var B=0,A=this._chartList.length;A>B;B++)this._chartList[B].refresh&&this._chartList[B].refresh($);this.component.grid&&this.component.grid.refixAxisShape(this.component),this._zr.refresh()},_disposeChartList:function(){this._clearEffect(),this._zr.clearAnimation();for(var _=this._chartList.length;_--;){var $=this._chartList[_];if($){var A=$.type;this.chart[A]&&delete this.chart[A],this.component[A]&&delete this.component[A],$.dispose&&$.dispose()}}this._chartList=[]},_mergeGlobalConifg:function($){for(var F=["backgroundColor","calculable","calculableColor","calculableHolderColor","nameConnector","valueConnector","animation","animationThreshold","animationDuration","animationDurationUpdate","animationEasing","addDataAnimation","symbolList","DRAG_ENABLE_TIME"],C=F.length;C--;){var D=F[C];null==$[D]&&($[D]=null!=this._themeConfig[D]?this._themeConfig[D]:B[D])}var A=$.color;A&&A.length||(A=this._themeConfig.color||B.color),this._zr.getColor=function($){var B=_("zrender/tool/color");return B.getColor($,A)},E||($.animation=!1,$.addDataAnimation=!1)},setOption:function(_,$){return _.timeline?this._setTimelineOption(_):this._setOption(_,$)},_setOption:function(_,$,A){return!$&&this._option?this._option=D.merge(this.getOption(),D.clone(_),!0):(this._option=D.clone(_),!A&&this._timeline&&this._timeline.dispose()),this._optionRestore=D.clone(this._option),this._option.series&&0!==this._option.series.length?(this.component.dataZoom&&(this._option.dataZoom||this._option.toolbox&&this._option.toolbox.feature&&this._option.toolbox.feature.dataZoom&&this._option.toolbox.feature.dataZoom.show)&&this.component.dataZoom.syncOption(this._option),this._toolbox.reset(this._option),this._render(this._option),this):void this._zr.clear()},getOption:function(){function $($){var C=A._optionRestore[$];if(C)if(C instanceof Array){for(var B=C.length;B--;)_[$][B].data=D.clone(C[B].data)}else _[$].data=D.clone(C.data)}var _=D.clone(this._option),A=this;return $("xAxis"),$("yAxis"),$("series"),_},setSeries:function(_,$){return $?(this._option.series=_,this.setOption(this._option,$)):this.setOption({series:_}),this},getSeries:function(){return this.getOption().series},_setTimelineOption:function($){this._timeline&&this._timeline.dispose();var B=_("./component/timeline"),A=new B(this._themeConfig,this._messageCenter,this._zr,$,this);return this._timeline=A,this.component.timeline=this._timeline,this},addData:function(J,V,R,M,X){function W(){if(L._zr){L._zr.clearAnimation();for(var _=0,$=S.length;$>_;_++)S[_].motionlessOnce=Q.addDataAnimation&&S[_].addDataAnimation;L._messageCenter.dispatch(B.EVENT.REFRESH,null,{option:Q},L)}}for(var N=J instanceof Array?J:[[J,V,R,M,X]],Q=this.getOption(),I=this._optionRestore,L=this,O=0,Y=N.length;Y>O;O++){J=N[O][0],V=N[O][1],R=N[O][2],M=N[O][3],X=N[O][4];var U=I.series[J],C=R?"unshift":"push",_=R?"pop":"shift";if(U){var H=U.data,G=Q.series[J].data;if(H[C](V),G[C](V),M||(H[_](),V=G[_]()),null!=X){var Z,K;if(U.type===B.CHART_TYPE_PIE&&(Z=I.legend)&&(K=Z.data)){var E=Q.legend.data;if(K[C](X),E[C](X),!M){var a=D.indexOf(K,V.name);-1!=a&&K.splice(a,1),a=D.indexOf(E,V.name),-1!=a&&E.splice(a,1)}}else if(null!=I.xAxis&&null!=I.yAxis){var P,T,$=U.xAxisIndex||0;(null==I.xAxis[$].type||"category"===I.xAxis[$].type)&&(P=I.xAxis[$].data,T=Q.xAxis[$].data,P[C](X),T[C](X),M||(P[_](),T[_]())),$=U.yAxisIndex||0,"category"===I.yAxis[$].type&&(P=I.yAxis[$].data,T=Q.yAxis[$].data,P[C](X),T[C](X),M||(P[_](),T[_]()))}}this._option.series[J].data=Q.series[J].data}}this._zr.clearAnimation();for(var S=this._chartList,A=0,F=function(){A--,0===A&&W()},O=0,Y=S.length;Y>O;O++)Q.addDataAnimation&&S[O].addDataAnimation&&(A++,S[O].addDataAnimation(N,F));return this.component.dataZoom&&this.component.dataZoom.syncOption(Q),this._option=Q,Q.addDataAnimation||setTimeout(W,0),this},addMarkPoint:function(_,$){return this._addMark(_,$,"markPoint")},addMarkLine:function(_,$){return this._addMark(_,$,"markLine")},_addMark:function(A,_,J){var G,F=this._option.series;if(F&&(G=F[A])){var E=this._optionRestore.series,B=E[A],H=G[J],I=B[J];H=G[J]=H||{data:[]},I=B[J]=I||{data:[]};for(var $ in _)"data"===$?(H.data=H.data.concat(_.data),I.data=I.data.concat(_.data)):"object"!=typeof _[$]||null==H[$]?H[$]=I[$]=_[$]:(D.merge(H[$],_[$],!0),D.merge(I[$],_[$],!0));var C=this.chart[G.type];C&&C.addMark(A,_,J)}return this},delMarkPoint:function(_,$){return this._delMark(_,$,"markPoint")},delMarkLine:function(_,$){return this._delMark(_,$,"markLine")},_delMark:function(_,H,G){var C,B,D,J=this._option.series;if(!(J&&(C=J[_])&&(B=C[G])&&(D=B.data)))return this;H=H.split(" > ");for(var I=-1,E=0,F=D.length;F>E;E++){var $=D[E];if($ instanceof Array){if($[0].name===H[0]&&$[1].name===H[1]){I=E;break}}else if($.name===H[0]){I=E;break}}if(I>-1){D.splice(I,1),this._optionRestore.series[_][G].data.splice(I,1);var A=this.chart[C.type];A&&A.delMark(_,H.join(" > "),G)}return this},getDom:function(){return this.dom},getZrender:function(){return this._zr},getDataURL:function(_){if(!E)return"";if(0===this._chartList.length){var $="IMG"+this.id,C=document.getElementById($);if(C)return C.src}var B=this.component.tooltip;switch(B&&B.hideTip(),_){case"jpeg":break;default:_="png"}var A=this._option.backgroundColor;return A&&"rgba(0,0,0,0)"===A.replace(" ","")&&(A="#fff"),this._zr.toDataURL("image/"+_,A)},getImage:function(_){var $=this._optionRestore.title,A=document.createElement("img");return A.src=this.getDataURL(_),A.title=$&&$.text||"ECharts",A},getConnectedDataURL:function(I){if(!this.isConnected())return this.getDataURL(I);var H=this.dom,C={self:{img:this.getDataURL(I),left:H.offsetLeft,top:H.offsetTop,right:H.offsetLeft+H.offsetWidth,bottom:H.offsetTop+H.offsetHeight}},B=C.self.left,D=C.self.top,K=C.self.right,J=C.self.bottom;for(var E in this._connected)H=this._connected[E].getDom(),C[E]={img:this._connected[E].getDataURL(I),left:H.offsetLeft,top:H.offsetTop,right:H.offsetLeft+H.offsetWidth,bottom:H.offsetTop+H.offsetHeight},B=Math.min(B,C[E].left),D=Math.min(D,C[E].top),K=Math.max(K,C[E].right),J=Math.max(J,C[E].bottom);var G=document.createElement("div");G.style.position="absolute",G.style.left="-4000px",G.style.width=K-B+"px",G.style.height=J-D+"px",document.body.appendChild(G);var $=_("zrender").init(G),A=_("zrender/shape/Image");for(E in C)$.addShape(new A({style:{x:C[E].left-B,y:C[E].top-D,image:C[E].img}}));$.render();var F=this._option.backgroundColor;F&&"rgba(0,0,0,0)"===F.replace(/ /g,"")&&(F="#fff");var L=$.toDataURL("image/png",F);return setTimeout(function(){$.dispose(),G.parentNode.removeChild(G),G=null},100),L},getConnectedImage:function(_){var $=this._optionRestore.title,A=document.createElement("img");return A.src=this.getConnectedDataURL(_),A.title=$&&$.text||"ECharts",A},on:function(_,$){return this._messageCenterOutSide.bind(_,$,this),this},un:function(_,$){return this._messageCenterOutSide.unbind(_,$),this},connect:function(_){if(!_)return this;if(this._connected||(this._connected={}),_ instanceof Array){for(var $=0,A=_.length;A>$;$++)this._connected[_[$].id]=_[$]}else this._connected[_.id]=_;return this},disConnect:function(_){if(!_||!this._connected)return this;if(_ instanceof Array){for(var $=0,B=_.length;B>$;$++)delete this._connected[_[$].id]}else delete this._connected[_.id];for(var A in this._connected)return this;return this._connected=!1,this},connectedEventHandler:function($){$.__echartsId!=this.id&&this._onevent($)},isConnected:function(){return!!this._connected},showLoading:function($){var F={bar:_("zrender/loadingEffect/Bar"),bubble:_("zrender/loadingEffect/Bubble"),dynamicLine:_("zrender/loadingEffect/DynamicLine"),ring:_("zrender/loadingEffect/Ring"),spin:_("zrender/loadingEffect/Spin"),whirling:_("zrender/loadingEffect/Whirling")};this._toolbox.hideDataView(),$=$||{};var E=$.textStyle||{};$.textStyle=E;var C=D.merge(D.merge(D.clone(E),this._themeConfig.textStyle),B.textStyle);E.textFont=C.fontStyle+" "+C.fontWeight+" "+C.fontSize+"px "+C.fontFamily,E.text=$.text||this._option&&this._option.loadingText||this._themeConfig.loadingText||B.loadingText,null!=$.x&&(E.x=$.x),null!=$.y&&(E.y=$.y),$.effectOption=$.effectOption||{},$.effectOption.textStyle=E;var A=$.effect;return("string"==typeof A||null==A)&&(A=F[$.effect||this._option&&this._option.loadingEffect||this._themeConfig.loadingEffect||B.loadingEffect]||F.spin),this._zr.showLoading(new A($.effectOption)),this},hideLoading:function(){return this._zr.hideLoading(),this},setTheme:function($){if($){if("string"==typeof $)switch($){case"macarons":$=_("./theme/macarons");break;case"infographic":$=_("./theme/infographic");break;default:$={}}else $=$||{};this._themeConfig=$}if(!E){var A=this._themeConfig.textStyle;A&&A.fontFamily&&A.fontFamily2&&(A.fontFamily=A.fontFamily2),A=B.textStyle,A.fontFamily=A.fontFamily2}this._timeline&&this._timeline.setTheme(!0),this._optionRestore&&this.restore()},resize:function(){var $=this;return function(){if($._clearEffect(),$._zr.resize(),$._option&&$._option.renderAsImage&&E)return $._render($._option),$;$._zr.clearAnimation(),$._island.resize(),$._toolbox.resize(),$._timeline&&$._timeline.resize();for(var _=0,A=$._chartList.length;A>_;_++)$._chartList[_].resize&&$._chartList[_].resize();return $.component.grid&&$.component.grid.refixAxisShape($.component),$._zr.refresh(),$._messageCenter.dispatch(B.EVENT.RESIZE,null,null,$),$}},_clearEffect:function(){this._zr.modLayer(B.EFFECT_ZLEVEL,{motionBlur:!1}),this._zr.painter.clearLayer(B.EFFECT_ZLEVEL)},clear:function(){return this._disposeChartList(),this._zr.clear(),this._option={},this._optionRestore={},this.dom.style.backgroundColor=null,this},dispose:function(){var _=this.dom.getAttribute(A);_&&delete $[_],this._island.dispose(),this._toolbox.dispose(),this._timeline&&this._timeline.dispose(),this._messageCenter.unbind(),this.clear(),this._zr.dispose(),this._zr=null}},J}),define("echarts/config",[],function(){var $={CHART_TYPE_LINE:"line",CHART_TYPE_BAR:"bar",CHART_TYPE_SCATTER:"scatter",CHART_TYPE_PIE:"pie",CHART_TYPE_RADAR:"radar",CHART_TYPE_VENN:"venn",CHART_TYPE_TREEMAP:"treemap",CHART_TYPE_TREE:"tree",CHART_TYPE_MAP:"map",CHART_TYPE_K:"k",CHART_TYPE_ISLAND:"island",CHART_TYPE_FORCE:"force",CHART_TYPE_CHORD:"chord",CHART_TYPE_GAUGE:"gauge",CHART_TYPE_FUNNEL:"funnel",CHART_TYPE_EVENTRIVER:"eventRiver",CHART_TYPE_WORDCLOUD:"wordCloud",CHART_TYPE_HEATMAP:"heatmap",COMPONENT_TYPE_TITLE:"title",COMPONENT_TYPE_LEGEND:"legend",COMPONENT_TYPE_DATARANGE:"dataRange",COMPONENT_TYPE_DATAVIEW:"dataView",COMPONENT_TYPE_DATAZOOM:"dataZoom",COMPONENT_TYPE_TOOLBOX:"toolbox",COMPONENT_TYPE_TOOLTIP:"tooltip",COMPONENT_TYPE_GRID:"grid",COMPONENT_TYPE_AXIS:"axis",COMPONENT_TYPE_POLAR:"polar",COMPONENT_TYPE_X_AXIS:"xAxis",COMPONENT_TYPE_Y_AXIS:"yAxis",COMPONENT_TYPE_AXIS_CATEGORY:"categoryAxis",COMPONENT_TYPE_AXIS_VALUE:"valueAxis",COMPONENT_TYPE_TIMELINE:"timeline",COMPONENT_TYPE_ROAMCONTROLLER:"roamController",backgroundColor:"rgba(0,0,0,0)",color:["#ff7f50","#87cefa","#da70d6","#32cd32","#6495ed","#ff69b4","#ba55d3","#cd5c5c","#ffa500","#40e0d0","#1e90ff","#ff6347","#7b68ee","#00fa9a","#ffd700","#6699FF","#ff6666","#3cb371","#b8860b","#30e0e0"],markPoint:{clickable:!0,symbol:"pin",symbolSize:10,large:!1,effect:{show:!1,loop:!0,period:15,type:"scale",scaleSize:2,bounceDistance:10},itemStyle:{normal:{borderWidth:2,label:{show:!0,position:"inside"}},emphasis:{label:{show:!0}}}},markLine:{clickable:!0,symbol:["circle","arrow"],symbolSize:[2,4],smoothness:0.2,precision:2,effect:{show:!1,loop:!0,period:15,scaleSize:2},bundling:{enable:!1,maxTurningAngle:45},itemStyle:{normal:{borderWidth:1.5,label:{show:!0,position:"end"},lineStyle:{type:"dashed"}},emphasis:{label:{show:!1},lineStyle:{}}}},textStyle:{decoration:"none",fontFamily:"Arial, Verdana, sans-serif",fontFamily2:"\u5fae\u8f6f\u96c5\u9ed1",fontSize:12,fontStyle:"normal",fontWeight:"normal"},EVENT:{REFRESH:"refresh",RESTORE:"restore",RESIZE:"resize",CLICK:"click",DBLCLICK:"dblclick",HOVER:"hover",MOUSEOUT:"mouseout",DATA_CHANGED:"dataChanged",DATA_ZOOM:"dataZoom",DATA_RANGE:"dataRange",DATA_RANGE_SELECTED:"dataRangeSelected",DATA_RANGE_HOVERLINK:"dataRangeHoverLink",LEGEND_SELECTED:"legendSelected",LEGEND_HOVERLINK:"legendHoverLink",MAP_SELECTED:"mapSelected",PIE_SELECTED:"pieSelected",MAGIC_TYPE_CHANGED:"magicTypeChanged",DATA_VIEW_CHANGED:"dataViewChanged",TIMELINE_CHANGED:"timelineChanged",MAP_ROAM:"mapRoam",FORCE_LAYOUT_END:"forceLayoutEnd",TOOLTIP_HOVER:"tooltipHover",TOOLTIP_IN_GRID:"tooltipInGrid",TOOLTIP_OUT_GRID:"tooltipOutGrid",ROAMCONTROLLER:"roamController"},DRAG_ENABLE_TIME:120,EFFECT_ZLEVEL:10,effectBlendAlpha:0.95,symbolList:["circle","rectangle","triangle","diamond","emptyCircle","emptyRectangle","emptyTriangle","emptyDiamond"],loadingEffect:"spin",loadingText:"\u6570\u636e\u8bfb\u53d6\u4e2d...",noDataEffect:"bubble",noDataText:"\u6682\u65e0\u6570\u636e",calculable:!1,calculableColor:"rgba(255,165,0,0.6)",calculableHolderColor:"#ccc",nameConnector:" & ",valueConnector:": ",animation:!0,addDataAnimation:!0,animationThreshold:2000,animationDuration:2000,animationDurationUpdate:500,animationEasing:"ExponentialOut"};return $}),define("zrender/tool/util",["require","../dep/excanvas"],function(B){function N($){return $&&1===$.nodeType&&"string"==typeof $.nodeName}function J(A){if("object"==typeof A&&null!==A){var D=A;if(A instanceof Array){D=[];for(var C=0,E=A.length;E>C;C++)D[C]=J(A[C])}else if(!_[$.call(A)]&&!N(A)){D={};for(var B in A)A.hasOwnProperty(B)&&(D[B]=J(A[B]))}return D}return A}function E(A,F,C,E){if(F.hasOwnProperty(C)){var B=A[C];"object"!=typeof B||_[$.call(B)]||N(B)?!E&&C in A||(A[C]=F[C]):D(A[C],F[C],E)}}function D(_,$,B){for(var A in $)E(_,$,A,B);return _}function F(){if(!H)if(B("../dep/excanvas"),window.G_vmlCanvasManager){var $=document.createElement("div");$.style.position="absolute",$.style.top="-1000px",document.body.appendChild($),H=G_vmlCanvasManager.initElement($).getContext("2d")}else H=document.createElement("canvas").getContext("2d");return H}function P(_,$){if(_.indexOf)return _.indexOf($);for(var B=0,A=_.length;A>B;B++)if(_[B]===$)return B;return-1}function O(_,$){function C(){}var B=_.prototype;C.prototype=$.prototype,_.prototype=new C;for(var A in B)_.prototype[A]=B[A];_.constructor=_}function G(_,$,D){if(_&&$)if(_.forEach&&_.forEach===L)_.forEach($,D);else if(_.length===+_.length){for(var B=0,A=_.length;A>B;B++)$.call(D,_[B],B,_)}else for(var C in _)_.hasOwnProperty(C)&&$.call(D,_[C],C,_)}function I(_,$,D){if(_&&$){if(_.map&&_.map===M)return _.map($,D);for(var B=[],A=0,C=_.length;C>A;A++)B.push($.call(D,_[A],A,_));return B}}function A(_,$,D){if(_&&$){if(_.filter&&_.filter===K)return _.filter($,D);for(var B=[],A=0,C=_.length;C>A;A++)$.call(D,_[A],A,_)&&B.push(_[A]);return B}}function C(_,$){return function(){_.apply($,arguments)}}var H,Q=Array.prototype,L=Q.forEach,M=Q.map,K=Q.filter,_={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1},$=Object.prototype.toString;return{inherits:O,clone:J,merge:D,getContext:F,indexOf:P,each:G,map:I,filter:A,bind:C}}),define("zrender/tool/event",["require","../mixin/Eventful"],function(_){"use strict";function $($){return"undefined"!=typeof $.zrenderX&&$.zrenderX||"undefined"!=typeof $.offsetX&&$.offsetX||"undefined"!=typeof $.layerX&&$.layerX||"undefined"!=typeof $.clientX&&$.clientX}function D($){return"undefined"!=typeof $.zrenderY&&$.zrenderY||"undefined"!=typeof $.offsetY&&$.offsetY||"undefined"!=typeof $.layerY&&$.layerY||"undefined"!=typeof $.clientY&&$.clientY}function B($){return"undefined"!=typeof $.zrenderDelta&&$.zrenderDelta||"undefined"!=typeof $.wheelDelta&&$.wheelDelta||"undefined"!=typeof $.detail&&-$.detail}var A=_("../mixin/Eventful"),C="function"==typeof window.addEventListener?function($){$.preventDefault(),$.stopPropagation(),$.cancelBubble=!0}:function($){$.returnValue=!1,$.cancelBubble=!0};return{getX:$,getY:D,getDelta:B,stop:C,Dispatcher:A}}),define("zrender/tool/env",[],function(){function $(B){var O=this.os={},K=this.browser={},F=B.match(/Web[kK]it[\/]{0,1}([\d.]+)/),E=B.match(/(Android);?[\s\/]+([\d.]+)?/),G=B.match(/(iPad).*OS\s([\d_]+)/),Q=B.match(/(iPod)(.*OS\s([\d_]+))?/),P=!G&&B.match(/(iPhone\sOS)\s([\d_]+)/),H=B.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),J=H&&B.match(/TouchPad/),A=B.match(/Kindle\/([\d.]+)/),D=B.match(/Silk\/([\d._]+)/),I=B.match(/(BlackBerry).*Version\/([\d.]+)/),R=B.match(/(BB10).*Version\/([\d.]+)/),M=B.match(/(RIM\sTablet\sOS)\s([\d.]+)/),N=B.match(/PlayBook/),L=B.match(/Chrome\/([\d.]+)/)||B.match(/CriOS\/([\d.]+)/),_=B.match(/Firefox\/([\d.]+)/),$=B.match(/MSIE ([\d.]+)/),S=F&&B.match(/Mobile\//)&&!L,C=B.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/)&&!L,$=B.match(/MSIE\s([\d.]+)/);return(K.webkit=!!F)&&(K.version=F[1]),E&&(O.android=!0,O.version=E[2]),P&&!Q&&(O.ios=O.iphone=!0,O.version=P[2].replace(/_/g,".")),G&&(O.ios=O.ipad=!0,O.version=G[2].replace(/_/g,".")),Q&&(O.ios=O.ipod=!0,O.version=Q[3]?Q[3].replace(/_/g,"."):null),H&&(O.webos=!0,O.version=H[2]),J&&(O.touchpad=!0),I&&(O.blackberry=!0,O.version=I[2]),R&&(O.bb10=!0,O.version=R[2]),M&&(O.rimtabletos=!0,O.version=M[2]),N&&(K.playbook=!0),A&&(O.kindle=!0,O.version=A[1]),D&&(K.silk=!0,K.version=D[1]),!D&&O.android&&B.match(/Kindle Fire/)&&(K.silk=!0),L&&(K.chrome=!0,K.version=L[1]),_&&(K.firefox=!0,K.version=_[1]),$&&(K.ie=!0,K.version=$[1]),S&&(B.match(/Safari/)||O.ios)&&(K.safari=!0),C&&(K.webview=!0),$&&(K.ie=!0,K.version=$[1]),O.tablet=!!(G||N||E&&!B.match(/Mobile/)||_&&B.match(/Tablet/)||$&&!B.match(/Phone/)&&B.match(/Touch/)),O.phone=!(O.tablet||O.ipod||!(E||P||H||I||R||L&&B.match(/Android/)||L&&B.match(/CriOS\/([\d.]+)/)||_&&B.match(/Mobile/)||$&&B.match(/Touch/))),{browser:K,os:O,canvasSupported:document.createElement("canvas").getContext?!0:!1}}return $(navigator.userAgent)}),define("zrender",["zrender/zrender"],function($){return $}),define("zrender/zrender",["require","./dep/excanvas","./tool/util","./tool/log","./tool/guid","./Handler","./Painter","./Storage","./animation/Animation","./tool/env"],function(_){function H($){return function(){$._needsRefreshNextFrame&&$.refresh()}}_("./dep/excanvas");var G=_("./tool/util"),C=_("./tool/log"),B=_("./tool/guid"),D=_("./Handler"),J=_("./Painter"),I=_("./Storage"),E=_("./animation/Animation"),F={},$={};$.version="2.1.1",$.init=function(_){var $=new A(B(),_);return F[$.id]=$,$},$.dispose=function(A){if(A)A.dispose();else{for(var _ in F)F[_].dispose();F={}}return $},$.getInstance=function($){return F[$]},$.delInstance=function(_){return delete F[_],$};var A=function(F,B){this.id=F,this.env=_("./tool/env"),this.storage=new I,this.painter=new J(B,this.storage),this.handler=new D(B,this.storage,this.painter),this.animation=new E({stage:{update:H(this)}}),this.animation.start();var A=this;this.painter.refreshNextFrame=function(){A.refreshNextFrame()},this._needsRefreshNextFrame=!1;var A=this,C=this.storage,$=C.delFromMap;C.delFromMap=function(B){var _=C.get(B);A.stopAnimation(_),$.call(C,B)}};return A.prototype.getId=function(){return this.id},A.prototype.addShape=function($){return this.addElement($),this},A.prototype.addGroup=function($){return this.addElement($),this},A.prototype.delShape=function($){return this.delElement($),this},A.prototype.delGroup=function($){return this.delElement($),this},A.prototype.modShape=function(_,$){return this.modElement(_,$),this},A.prototype.modGroup=function(_,$){return this.modElement(_,$),this},A.prototype.addElement=function($){return this.storage.addRoot($),this._needsRefreshNextFrame=!0,this},A.prototype.delElement=function($){return this.storage.delRoot($),this._needsRefreshNextFrame=!0,this},A.prototype.modElement=function(_,$){return this.storage.mod(_,$),this._needsRefreshNextFrame=!0,this},A.prototype.modLayer=function(_,$){return this.painter.modLayer(_,$),this._needsRefreshNextFrame=!0,this},A.prototype.addHoverShape=function($){return this.storage.addHover($),this},A.prototype.render=function($){return this.painter.render($),this._needsRefreshNextFrame=!1,this},A.prototype.refresh=function($){return this.painter.refresh($),this._needsRefreshNextFrame=!1,this},A.prototype.refreshNextFrame=function(){return this._needsRefreshNextFrame=!0,this},A.prototype.refreshHover=function($){return this.painter.refreshHover($),this},A.prototype.refreshShapes=function(_,$){return this.painter.refreshShapes(_,$),this},A.prototype.resize=function(){return this.painter.resize(),this},A.prototype.animate=function(A,_,F){var H=this;if("string"==typeof A&&(A=this.storage.get(A)),A){var E;if(_){for(var B=_.split("."),I=A,K=0,$=B.length;$>K;K++)I&&(I=I[B[K]]);I&&(E=I)}else E=A;if(!E)return void C("Property \""+_+"\" is not existed in element "+A.id);null==A.__animators&&(A.__animators=[]);var D=A.__animators,J=this.animation.animate(E,{loop:F}).during(function(){H.modShape(A)}).done(function(){var $=G.indexOf(A.__animators,J);$>=0&&D.splice($,1)});return D.push(J),J}C("Element not existed")},A.prototype.stopAnimation=function(_){if(_.__animators){for(var $=_.__animators,B=$.length,A=0;B>A;A++)$[A].stop();$.length=0}return this},A.prototype.clearAnimation=function(){return this.animation.clear(),this},A.prototype.showLoading=function($){return this.painter.showLoading($),this},A.prototype.hideLoading=function(){return this.painter.hideLoading(),this},A.prototype.getWidth=function(){return this.painter.getWidth()},A.prototype.getHeight=function(){return this.painter.getHeight()},A.prototype.toDataURL=function(_,$,A){return this.painter.toDataURL(_,$,A)},A.prototype.shapeToImage=function(_,$,C){var A=B();return this.painter.shapeToImage(A,_,$,C)},A.prototype.on=function(_,$,A){return this.handler.on(_,$,A),this},A.prototype.un=function(_,$){return this.handler.un(_,$),this},A.prototype.trigger=function(_,$){return this.handler.trigger(_,$),this},A.prototype.clear=function(){return this.storage.delRoot(),this.painter.clear(),this},A.prototype.dispose=function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,$.delInstance(this.id)},$}),define("zrender/config",[],function(){var $={EVENT:{RESIZE:"resize",CLICK:"click",DBLCLICK:"dblclick",MOUSEWHEEL:"mousewheel",MOUSEMOVE:"mousemove",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",GLOBALOUT:"globalout",DRAGSTART:"dragstart",DRAGEND:"dragend",DRAGENTER:"dragenter",DRAGOVER:"dragover",DRAGLEAVE:"dragleave",DROP:"drop",touchClickDelay:300},elementClassName:"zr-element",catchBrushException:!1,debugMode:0,devicePixelRatio:Math.max(window.devicePixelRatio||1,1)};return $}),define("echarts/chart/island",["require","./base","zrender/shape/Circle","../config","../util/ecData","zrender/tool/util","zrender/tool/event","zrender/tool/color","../util/accMath","../chart"],function(_){function $(_,$,D,C,B){F.call(this,_,$,D,C,B),this._nameConnector,this._valueConnector,this._zrHeight=this.zr.getHeight(),this._zrWidth=this.zr.getWidth();var G=this;G.shapeHandler.onmousewheel=function(_){var $=_.target,H=_.event,D=A.getDelta(H);D=D>0?-1:1,$.style.r-=D,$.style.r=$.style.r<5?5:$.style.r;var C=E.get($,"value"),B=C*G.option.island.calculateStep;C=B>1?Math.round(C-B*D):+(C-B*D).toFixed(2);var F=E.get($,"name");$.style.text=F+":"+C,E.set($,"value",C),E.set($,"name",F),G.zr.modShape($.id),G.zr.refreshNextFrame(),A.stop(H)}}var F=_("./base"),D=_("zrender/shape/Circle"),C=_("../config");C.island={zlevel:0,z:5,r:15,calculateStep:0.1};var E=_("../util/ecData"),B=_("zrender/tool/util"),A=_("zrender/tool/event");return $.prototype={type:C.CHART_TYPE_ISLAND,_combine:function($,F){var D=_("zrender/tool/color"),C=_("../util/accMath"),B=C.accAdd(E.get($,"value"),E.get(F,"value")),A=E.get($,"name")+this._nameConnector+E.get(F,"name");$.style.text=A+this._valueConnector+B,E.set($,"value",B),E.set($,"name",A),$.style.r=this.option.island.r,$.style.color=D.mix($.style.color,F.style.color)},refresh:function($){$&&($.island=this.reformOption($.island),this.option=$,this._nameConnector=this.option.nameConnector,this._valueConnector=this.option.valueConnector)},getOption:function(){return this.option},resize:function(){var _=this.zr.getWidth(),$=this.zr.getHeight(),D=_/(this._zrWidth||_),B=$/(this._zrHeight||$);if(1!==D||1!==B){this._zrWidth=_,this._zrHeight=$;for(var A=0,C=this.shapeList.length;C>A;A++)this.zr.modShape(this.shapeList[A].id,{style:{x:Math.round(this.shapeList[A].style.x*D),y:Math.round(this.shapeList[A].style.y*B)}})}},add:function(_){var $=E.get(_,"name"),G=E.get(_,"value"),C=null!=E.get(_,"series")?E.get(_,"series").name:"",B=this.getFont(this.option.island.textStyle),A=this.option.island,F={zlevel:A.zlevel,z:A.z,style:{x:_.style.x,y:_.style.y,r:this.option.island.r,color:_.style.color||_.style.strokeColor,text:$+this._valueConnector+G,textFont:B},draggable:!0,hoverable:!0,onmousewheel:this.shapeHandler.onmousewheel,_type:"island"};"#fff"===F.style.color&&(F.style.color=_.style.strokeColor),this.setCalculable(F),F.dragEnableTime=0,E.pack(F,{name:C},-1,G,-1,$),F=new D(F),this.shapeList.push(F),this.zr.addShape(F)},del:function(_){this.zr.delShape(_.id);for(var $=[],B=0,A=this.shapeList.length;A>B;B++)this.shapeList[B].id!=_.id&&$.push(this.shapeList[B]);this.shapeList=$},ondrop:function(_,$){if(this.isDrop&&_.target){var B=_.target,A=_.dragged;this._combine(B,A),this.zr.modShape(B.id),$.dragIn=!0,this.isDrop=!1}},ondragend:function(_,$){var B=_.target;this.isDragend?$.dragIn&&(this.del(B),$.needRefresh=!0):$.dragIn||(B.style.x=A.getX(_.event),B.style.y=A.getY(_.event),this.add(B),$.needRefresh=!0),this.isDragend=!1}},B.inherits($,F),_("../chart").define("island",$),$}),define("echarts/component/toolbox",["require","./base","zrender/shape/Line","zrender/shape/Image","zrender/shape/Rectangle","../util/shape/Icon","../config","zrender/tool/util","zrender/config","zrender/tool/event","./dataView","../component"],function(_){function I(_,$,C,B,D){H.call(this,_,$,C,B,D),this.dom=D.dom,this._magicType={},this._magicMap={},this._isSilence=!1,this._iconList,this._iconShapeMap={},this._featureTitle={},this._featureIcon={},this._featureColor={},this._featureOption={},this._enableColor="red",this._disableColor="#ccc",this._markShapeList=[];var A=this;A._onMark=function($){A.__onMark($)},A._onMarkUndo=function($){A.__onMarkUndo($)},A._onMarkClear=function($){A.__onMarkClear($)},A._onDataZoom=function($){A.__onDataZoom($)},A._onDataZoomReset=function($){A.__onDataZoomReset($)},A._onDataView=function($){A.__onDataView($)},A._onRestore=function($){A.__onRestore($)},A._onSaveAsImage=function($){A.__onSaveAsImage($)},A._onMagicType=function($){A.__onMagicType($)},A._onCustomHandler=function($){A.__onCustomHandler($)},A._onmousemove=function($){return A.__onmousemove($)},A._onmousedown=function($){return A.__onmousedown($)},A._onmouseup=function($){return A.__onmouseup($)},A._onclick=function($){return A.__onclick($)}}var H=_("./base"),C=_("zrender/shape/Line"),B=_("zrender/shape/Image"),D=_("zrender/shape/Rectangle"),K=_("../util/shape/Icon"),J=_("../config");J.toolbox={zlevel:0,z:6,show:!1,orient:"horizontal",x:"right",y:"top",color:["#1e90ff","#22bb22","#4b0082","#d2691e"],disableColor:"#ddd",effectiveColor:"red",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,itemSize:16,showTitle:!0,feature:{mark:{show:!1,title:{mark:"\u8f85\u52a9\u7ebf\u5f00\u5173",markUndo:"\u5220\u9664\u8f85\u52a9\u7ebf",markClear:"\u6e05\u7a7a\u8f85\u52a9\u7ebf"},lineStyle:{width:1,color:"#1e90ff",type:"dashed"}},dataZoom:{show:!1,title:{dataZoom:"\u533a\u57df\u7f29\u653e",dataZoomReset:"\u533a\u57df\u7f29\u653e\u540e\u9000"}},dataView:{show:!1,title:"\u6570\u636e\u89c6\u56fe",readOnly:!1,lang:["\u6570\u636e\u89c6\u56fe","\u5173\u95ed","\u5237\u65b0"]},magicType:{show:!1,title:{line:"\u6298\u7ebf\u56fe\u5207\u6362",bar:"\u67f1\u5f62\u56fe\u5207\u6362",stack:"\u5806\u79ef",tiled:"\u5e73\u94fa",force:"\u529b\u5bfc\u5411\u5e03\u5c40\u56fe\u5207\u6362",chord:"\u548c\u5f26\u56fe\u5207\u6362",pie:"\u997c\u56fe\u5207\u6362",funnel:"\u6f0f\u6597\u56fe\u5207\u6362"},type:[]},restore:{show:!1,title:"\u8fd8\u539f"},saveAsImage:{show:!1,title:"\u4fdd\u5b58\u4e3a\u56fe\u7247",type:"png",lang:["\u70b9\u51fb\u4fdd\u5b58"]}}};var E=_("zrender/tool/util"),G=_("zrender/config"),$=_("zrender/tool/event"),A="stack",F="tiled";return I.prototype={type:J.COMPONENT_TYPE_TOOLBOX,_buildShape:function(){this._iconList=[];var _=this.option.toolbox;this._enableColor=_.effectiveColor,this._disableColor=_.disableColor;var $=_.feature,E=[];for(var C in $)if($[C].show)switch(C){case"mark":E.push({key:C,name:"mark"}),E.push({key:C,name:"markUndo"}),E.push({key:C,name:"markClear"});break;case"magicType":for(var B=0,D=$[C].type.length;D>B;B++)$[C].title[$[C].type[B]+"Chart"]=$[C].title[$[C].type[B]],$[C].option&&($[C].option[$[C].type[B]+"Chart"]=$[C].option[$[C].type[B]]),E.push({key:C,name:$[C].type[B]+"Chart"});break;case"dataZoom":E.push({key:C,name:"dataZoom"}),E.push({key:C,name:"dataZoomReset"});break;case"saveAsImage":this.canvasSupported&&E.push({key:C,name:"saveAsImage"});break;default:E.push({key:C,name:C})}if(E.length>0){for(var A,C,B=0,D=E.length;D>B;B++)A=E[B].name,C=E[B].key,this._iconList.push(A),this._featureTitle[A]=$[C].title[A]||$[C].title,$[C].icon&&(this._featureIcon[A]=$[C].icon[A]||$[C].icon),$[C].color&&(this._featureColor[A]=$[C].color[A]||$[C].color),$[C].option&&(this._featureOption[A]=$[C].option[A]||$[C].option);this._itemGroupLocation=this._getItemGroupLocation(),this._buildBackground(),this._buildItem();for(B=0,D=this.shapeList.length;D>B;B++)this.zr.addShape(this.shapeList[B]);this._iconShapeMap.mark&&(this._iconDisable(this._iconShapeMap.markUndo),this._iconDisable(this._iconShapeMap.markClear)),this._iconShapeMap.dataZoomReset&&0===this._zoomQueue.length&&this._iconDisable(this._iconShapeMap.dataZoomReset)}},_buildItem:function(){var N,I,D,E,O=this.option.toolbox,F=this._iconList.length,H=this._itemGroupLocation.x,A=this._itemGroupLocation.y,C=O.itemSize,G=O.itemGap,P=O.color instanceof Array?O.color:[O.color],L=this.getFont(O.textStyle);"horizontal"===O.orient?(I=this._itemGroupLocation.y/this.zr.getHeight()<0.5?"bottom":"top",D=this._itemGroupLocation.x/this.zr.getWidth()<0.5?"left":"right",E=this._itemGroupLocation.y/this.zr.getHeight()<0.5?"top":"bottom"):I=this._itemGroupLocation.x/this.zr.getWidth()<0.5?"right":"left",this._iconShapeMap={};for(var M=this,J=0;F>J;J++){switch(N={type:"icon",zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:H,y:A,width:C,height:C,iconType:this._iconList[J],lineWidth:1,strokeColor:this._featureColor[this._iconList[J]]||P[J%P.length],brushType:"stroke"},highlightStyle:{lineWidth:1,text:O.showTitle?this._featureTitle[this._iconList[J]]:void 0,textFont:L,textPosition:I,strokeColor:this._featureColor[this._iconList[J]]||P[J%P.length]},hoverable:!0,clickable:!0},this._featureIcon[this._iconList[J]]&&(N.style.image=this._featureIcon[this._iconList[J]].replace(new RegExp("^image:\\/\\/"),""),N.style.opacity=0.8,N.highlightStyle.opacity=1,N.type="image"),"horizontal"===O.orient&&(0===J&&"left"===D&&(N.highlightStyle.textPosition="specific",N.highlightStyle.textAlign=D,N.highlightStyle.textBaseline=E,N.highlightStyle.textX=H,N.highlightStyle.textY="top"===E?A+C+10:A-10),J===F-1&&"right"===D&&(N.highlightStyle.textPosition="specific",N.highlightStyle.textAlign=D,N.highlightStyle.textBaseline=E,N.highlightStyle.textX=H+C,N.highlightStyle.textY="top"===E?A+C+10:A-10)),this._iconList[J]){case"mark":N.onclick=M._onMark;break;case"markUndo":N.onclick=M._onMarkUndo;break;case"markClear":N.onclick=M._onMarkClear;break;case"dataZoom":N.onclick=M._onDataZoom;break;case"dataZoomReset":N.onclick=M._onDataZoomReset;break;case"dataView":if(!this._dataView){var $=_("./dataView");this._dataView=new $(this.ecTheme,this.messageCenter,this.zr,this.option,this.myChart)}N.onclick=M._onDataView;break;case"restore":N.onclick=M._onRestore;break;case"saveAsImage":N.onclick=M._onSaveAsImage;break;default:this._iconList[J].match("Chart")?(N._name=this._iconList[J].replace("Chart",""),N.onclick=M._onMagicType):N.onclick=M._onCustomHandler}"icon"===N.type?N=new K(N):"image"===N.type&&(N=new B(N)),this.shapeList.push(N),this._iconShapeMap[this._iconList[J]]=N,"horizontal"===O.orient?H+=C+G:A+=C+G}},_buildBackground:function(){var _=this.option.toolbox,$=this.reformCssArray(this.option.toolbox.padding);this.shapeList.push(new D({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._itemGroupLocation.x-$[3],y:this._itemGroupLocation.y-$[0],width:this._itemGroupLocation.width+$[3]+$[1],height:this._itemGroupLocation.height+$[0]+$[2],brushType:0===_.borderWidth?"fill":"both",color:_.backgroundColor,strokeColor:_.borderColor,lineWidth:_.borderWidth}}))},_getItemGroupLocation:function(){var A=this.option.toolbox,_=this.reformCssArray(this.option.toolbox.padding),I=this._iconList.length,E=A.itemGap,D=A.itemSize,F=0,C=0;"horizontal"===A.orient?(F=(D+E)*I-E,C=D):(C=(D+E)*I-E,F=D);var B,G=this.zr.getWidth();switch(A.x){case"center":B=Math.floor((G-F)/2);break;case"left":B=_[3]+A.borderWidth;break;case"right":B=G-F-_[1]-A.borderWidth;break;default:B=A.x-0,B=isNaN(B)?0:B}var H,$=this.zr.getHeight();switch(A.y){case"top":H=_[0]+A.borderWidth;break;case"bottom":H=$-C-_[2]-A.borderWidth;break;case"center":H=Math.floor(($-C)/2);break;default:H=A.y-0,H=isNaN(H)?0:H}return{x:B,y:H,width:F,height:C}},__onmousemove:function(_){this._marking&&(this._markShape.style.xEnd=$.getX(_.event),this._markShape.style.yEnd=$.getY(_.event),this.zr.addHoverShape(this._markShape)),this._zooming&&(this._zoomShape.style.width=$.getX(_.event)-this._zoomShape.style.x,this._zoomShape.style.height=$.getY(_.event)-this._zoomShape.style.y,this.zr.addHoverShape(this._zoomShape),this.dom.style.cursor="crosshair",$.stop(_.event)),this._zoomStart&&"pointer"!=this.dom.style.cursor&&"move"!=this.dom.style.cursor&&(this.dom.style.cursor="crosshair")},__onmousedown:function(A){if(!A.target){this._zooming=!0;var _=$.getX(A.event),C=$.getY(A.event),B=this.option.dataZoom||{};return this._zoomShape=new D({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:_,y:C,width:1,height:1,brushType:"both"},highlightStyle:{lineWidth:2,color:B.fillerColor||J.dataZoom.fillerColor,strokeColor:B.handleColor||J.dataZoom.handleColor,brushType:"both"}}),this.zr.addHoverShape(this._zoomShape),!0}},__onmouseup:function(){if(!this._zoomShape||Math.abs(this._zoomShape.style.width)<10||Math.abs(this._zoomShape.style.height)<10)return this._zooming=!1,!0;if(this._zooming&&this.component.dataZoom){this._zooming=!1;var $=this.component.dataZoom.rectZoom(this._zoomShape.style);$&&(this._zoomQueue.push({start:$.start,end:$.end,start2:$.start2,end2:$.end2}),this._iconEnable(this._iconShapeMap.dataZoomReset),this.zr.refreshNextFrame())}return!0},__onclick:function(A){if(!A.target)if(this._marking)this._marking=!1,this._markShapeList.push(this._markShape),this._iconEnable(this._iconShapeMap.markUndo),this._iconEnable(this._iconShapeMap.markClear),this.zr.addShape(this._markShape),this.zr.refreshNextFrame();else if(this._markStart){this._marking=!0;var _=$.getX(A.event),B=$.getY(A.event);this._markShape=new C({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{xStart:_,yStart:B,xEnd:_,yEnd:B,lineWidth:this.query(this.option,"toolbox.feature.mark.lineStyle.width"),strokeColor:this.query(this.option,"toolbox.feature.mark.lineStyle.color"),lineType:this.query(this.option,"toolbox.feature.mark.lineStyle.type")}}),this.zr.addHoverShape(this._markShape)}},__onMark:function(_){var $=_.target;if(this._marking||this._markStart)this._resetMark(),this.zr.refreshNextFrame();else{this._resetZoom(),this.zr.modShape($.id,{style:{strokeColor:this._enableColor}}),this.zr.refreshNextFrame(),this._markStart=!0;var A=this;setTimeout(function(){A.zr&&A.zr.on(G.EVENT.CLICK,A._onclick)&&A.zr.on(G.EVENT.MOUSEMOVE,A._onmousemove)},10)}return!0},__onMarkUndo:function(){if(this._marking)this._marking=!1;else{var _=this._markShapeList.length;if(_>=1){var $=this._markShapeList[_-1];this.zr.delShape($.id),this.zr.refreshNextFrame(),this._markShapeList.pop(),1===_&&(this._iconDisable(this._iconShapeMap.markUndo),this._iconDisable(this._iconShapeMap.markClear))}}return!0},__onMarkClear:function(){this._marking&&(this._marking=!1);var $=this._markShapeList.length;if($>0){for(;$--;)this.zr.delShape(this._markShapeList.pop().id);this._iconDisable(this._iconShapeMap.markUndo),this._iconDisable(this._iconShapeMap.markClear),this.zr.refreshNextFrame()}return!0},__onDataZoom:function(_){var $=_.target;if(this._zooming||this._zoomStart)this._resetZoom(),this.zr.refreshNextFrame(),this.dom.style.cursor="default";else{this._resetMark(),this.zr.modShape($.id,{style:{strokeColor:this._enableColor}}),this.zr.refreshNextFrame(),this._zoomStart=!0;var A=this;setTimeout(function(){A.zr&&A.zr.on(G.EVENT.MOUSEDOWN,A._onmousedown)&&A.zr.on(G.EVENT.MOUSEUP,A._onmouseup)&&A.zr.on(G.EVENT.MOUSEMOVE,A._onmousemove)},10),this.dom.style.cursor="crosshair"}return!0},__onDataZoomReset:function(){return this._zooming&&(this._zooming=!1),this._zoomQueue.pop(),this._zoomQueue.length>0?this.component.dataZoom.absoluteZoom(this._zoomQueue[this._zoomQueue.length-1]):(this.component.dataZoom.rectZoom(),this._iconDisable(this._iconShapeMap.dataZoomReset),this.zr.refreshNextFrame()),!0},_resetMark:function(){this._marking=!1,this._markStart&&(this._markStart=!1,this._iconShapeMap.mark&&this.zr.modShape(this._iconShapeMap.mark.id,{style:{strokeColor:this._iconShapeMap.mark.highlightStyle.strokeColor}}),this.zr.un(G.EVENT.CLICK,this._onclick),this.zr.un(G.EVENT.MOUSEMOVE,this._onmousemove))},_resetZoom:function(){this._zooming=!1,this._zoomStart&&(this._zoomStart=!1,this._iconShapeMap.dataZoom&&this.zr.modShape(this._iconShapeMap.dataZoom.id,{style:{strokeColor:this._iconShapeMap.dataZoom.highlightStyle.strokeColor}}),this.zr.un(G.EVENT.MOUSEDOWN,this._onmousedown),this.zr.un(G.EVENT.MOUSEUP,this._onmouseup),this.zr.un(G.EVENT.MOUSEMOVE,this._onmousemove))},_iconDisable:function($){"image"!=$.type?this.zr.modShape($.id,{hoverable:!1,clickable:!1,style:{strokeColor:this._disableColor}}):this.zr.modShape($.id,{hoverable:!1,clickable:!1,style:{opacity:0.3}})},_iconEnable:function($){"image"!=$.type?this.zr.modShape($.id,{hoverable:!0,clickable:!0,style:{strokeColor:$.highlightStyle.strokeColor}}):this.zr.modShape($.id,{hoverable:!0,clickable:!0,style:{opacity:0.8}})},__onDataView:function(){return this._dataView.show(this.option),!0},__onRestore:function(){return this._resetMark(),this._resetZoom(),this.messageCenter.dispatch(J.EVENT.RESTORE,null,null,this.myChart),!0},__onSaveAsImage:function(){var _=this.option.toolbox.feature.saveAsImage,$=_.type||"png";"png"!=$&&"jpeg"!=$&&($="png");var C;C=this.myChart.isConnected()?this.myChart.getConnectedDataURL($):this.zr.toDataURL("image/"+$,this.option.backgroundColor&&"rgba(0,0,0,0)"===this.option.backgroundColor.replace(" ","")?"#fff":this.option.backgroundColor);var B=document.createElement("div");B.id="__echarts_download_wrap__",B.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 A=document.createElement("a");A.href=C,A.setAttribute("download",(_.name?_.name:this.option.title&&(this.option.title.text||this.option.title.subtext)?this.option.title.text||this.option.title.subtext:"ECharts")+"."+$),A.innerHTML="\u56fe\u7247\u53e6\u5b58\u4e3a":_.lang?_.lang[0]:"\u70b9\u51fb\u4fdd\u5b58")+"\"/>",B.appendChild(A),document.body.appendChild(B),A=null,B=null,setTimeout(function(){var $=document.getElementById("__echarts_download_wrap__");$&&($.onclick=function(){var $=document.getElementById("__echarts_download_wrap__");$.onclick=null,$.innerHTML="",document.body.removeChild($),$=null},$=null)},500)},__onMagicType:function(_){this._resetMark();var $=_.target._name;return this._magicType[$]||(this._magicType[$]=!0,$===J.CHART_TYPE_LINE?this._magicType[J.CHART_TYPE_BAR]=!1:$===J.CHART_TYPE_BAR&&(this._magicType[J.CHART_TYPE_LINE]=!1),$===J.CHART_TYPE_PIE?this._magicType[J.CHART_TYPE_FUNNEL]=!1:$===J.CHART_TYPE_FUNNEL&&(this._magicType[J.CHART_TYPE_PIE]=!1),$===J.CHART_TYPE_FORCE?this._magicType[J.CHART_TYPE_CHORD]=!1:$===J.CHART_TYPE_CHORD&&(this._magicType[J.CHART_TYPE_FORCE]=!1),$===A?this._magicType[F]=!1:$===F&&(this._magicType[A]=!1),this.messageCenter.dispatch(J.EVENT.MAGIC_TYPE_CHANGED,_.event,{magicType:this._magicType},this.myChart)),!0},setMagicType:function($){this._resetMark(),this._magicType=$,!this._isSilence&&this.messageCenter.dispatch(J.EVENT.MAGIC_TYPE_CHANGED,null,{magicType:this._magicType},this.myChart)},__onCustomHandler:function(_){var $=_.target.style.iconType,A=this.option.toolbox.feature[$].onclick;"function"==typeof A&&A.call(this,this.option)},reset:function(B,_){if(_&&this.clear(),this.query(B,"toolbox.show")&&this.query(B,"toolbox.feature.magicType.show")){var K=B.toolbox.feature.magicType.type,H=K.length;for(this._magicMap={};H--;)this._magicMap[K[H]]=!0;H=B.series.length;for(var G,I;H--;)G=B.series[H].type,this._magicMap[G]&&(I=B.xAxis instanceof Array?B.xAxis[B.series[H].xAxisIndex||0]:B.xAxis,I&&"category"===(I.type||"category")&&(I.__boundaryGap=null!=I.boundaryGap?I.boundaryGap:!0),I=B.yAxis instanceof Array?B.yAxis[B.series[H].yAxisIndex||0]:B.yAxis,I&&"category"===I.type&&(I.__boundaryGap=null!=I.boundaryGap?I.boundaryGap:!0),B.series[H].__type=G,B.series[H].__itemStyle=E.clone(B.series[H].itemStyle||{})),(this._magicMap[A]||this._magicMap[F])&&(B.series[H].__stack=B.series[H].stack)}this._magicType=_?{}:this._magicType||{};for(var D in this._magicType)if(this._magicType[D]){this.option=B,this.getMagicOption();break}var C=B.dataZoom;if(C&&C.show){var J=null!=C.start&&C.start>=0&&C.start<=100?C.start:0,$=null!=C.end&&C.end>=0&&C.end<=100?C.end:100;J>$&&(J+=$,$=J-$,J-=$),this._zoomQueue=[{start:J,end:$,start2:0,end2:100}]}else this._zoomQueue=[]},getMagicOption:function(){var _,$;if(this._magicType[J.CHART_TYPE_LINE]||this._magicType[J.CHART_TYPE_BAR]){for(var D=this._magicType[J.CHART_TYPE_LINE]?!1:!0,C=0,B=this.option.series.length;B>C;C++)$=this.option.series[C].type,($==J.CHART_TYPE_LINE||$==J.CHART_TYPE_BAR)&&(_=this.option.xAxis instanceof Array?this.option.xAxis[this.option.series[C].xAxisIndex||0]:this.option.xAxis,_&&"category"===(_.type||"category")&&(_.boundaryGap=D?!0:_.__boundaryGap),_=this.option.yAxis instanceof Array?this.option.yAxis[this.option.series[C].yAxisIndex||0]:this.option.yAxis,_&&"category"===_.type&&(_.boundaryGap=D?!0:_.__boundaryGap));this._defaultMagic(J.CHART_TYPE_LINE,J.CHART_TYPE_BAR)}if(this._defaultMagic(J.CHART_TYPE_CHORD,J.CHART_TYPE_FORCE),this._defaultMagic(J.CHART_TYPE_PIE,J.CHART_TYPE_FUNNEL),this._magicType[A]||this._magicType[F])for(C=0,B=this.option.series.length;B>C;C++)this._magicType[A]?(this.option.series[C].stack="_ECHARTS_STACK_KENER_2014_",$=A):this._magicType[F]&&(this.option.series[C].stack=null,$=F),this._featureOption[$+"Chart"]&&E.merge(this.option.series[C],this._featureOption[$+"Chart"]||{},!0);return this.option},_defaultMagic:function(_,$){if(this._magicType[_]||this._magicType[$])for(var C=0,B=this.option.series.length;B>C;C++){var A=this.option.series[C].type;(A==_||A==$)&&(this.option.series[C].type=this._magicType[_]?_:$,this.option.series[C].itemStyle=E.clone(this.option.series[C].__itemStyle),A=this.option.series[C].type,this._featureOption[A+"Chart"]&&E.merge(this.option.series[C],this._featureOption[A+"Chart"]||{},!0))}},silence:function($){this._isSilence=$},resize:function(){this._resetMark(),this.clear(),this.option&&this.option.toolbox&&this.option.toolbox.show&&this._buildShape(),this._dataView&&this._dataView.resize()},hideDataView:function(){this._dataView&&this._dataView.hide()},clear:function($){this.zr&&(this.zr.delShape(this.shapeList),this.shapeList=[],$||(this.zr.delShape(this._markShapeList),this._markShapeList=[]))},onbeforDispose:function(){this._dataView&&(this._dataView.dispose(),this._dataView=null),this._markShapeList=null},refresh:function($){$&&(this._resetMark(),this._resetZoom(),$.toolbox=this.reformOption($.toolbox),this.option=$,this.clear(!0),$.toolbox.show&&this._buildShape(),this.hideDataView())}},E.inherits(I,H),_("../component").define("toolbox",I),I}),define("echarts/component",[],function(){var _={},$={};return _.define=function(B,A){return $[B]=A,_},_.get=function(_){return $[_]},_}),define("echarts/component/title",["require","./base","zrender/shape/Text","zrender/shape/Rectangle","../config","zrender/tool/util","zrender/tool/area","zrender/tool/color","../component"],function(_){function $(_,$,B,A,C){G.call(this,_,$,B,A,C),this.refresh(A)}var G=_("./base"),D=_("zrender/shape/Text"),C=_("zrender/shape/Rectangle"),E=_("../config");E.title={zlevel:0,z:6,show:!0,text:"",subtext:"",x:"left",y:"top",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:5,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}};var B=_("zrender/tool/util"),A=_("zrender/tool/area"),F=_("zrender/tool/color");return $.prototype={type:E.COMPONENT_TYPE_TITLE,_buildShape:function(){if(this.titleOption.show){this._itemGroupLocation=this._getItemGroupLocation(),this._buildBackground(),this._buildItem();for(var _=0,$=this.shapeList.length;$>_;_++)this.zr.addShape(this.shapeList[_])}},_buildItem:function(){var _=this.titleOption.text,K=this.titleOption.link,H=this.titleOption.target,B=this.titleOption.subtext,C=this.titleOption.sublink,M=this.titleOption.subtarget,L=this.getFont(this.titleOption.textStyle),G=this.getFont(this.titleOption.subtextStyle),$=this._itemGroupLocation.x,A=this._itemGroupLocation.y,E=this._itemGroupLocation.width,N=this._itemGroupLocation.height,I={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{y:A,color:this.titleOption.textStyle.color,text:_,textFont:L,textBaseline:"top"},highlightStyle:{color:F.lift(this.titleOption.textStyle.color,1),brushType:"fill"},hoverable:!1};K&&(I.hoverable=!0,I.clickable=!0,I.onclick=function(){H&&"self"==H?window.location=K:window.open(K)});var J={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{y:A+N,color:this.titleOption.subtextStyle.color,text:B,textFont:G,textBaseline:"bottom"},highlightStyle:{color:F.lift(this.titleOption.subtextStyle.color,1),brushType:"fill"},hoverable:!1};switch(C&&(J.hoverable=!0,J.clickable=!0,J.onclick=function(){M&&"self"==M?window.location=C:window.open(C)}),this.titleOption.x){case"center":I.style.x=J.style.x=$+E/2,I.style.textAlign=J.style.textAlign="center";break;case"left":I.style.x=J.style.x=$,I.style.textAlign=J.style.textAlign="left";break;case"right":I.style.x=J.style.x=$+E,I.style.textAlign=J.style.textAlign="right";break;default:$=this.titleOption.x-0,$=isNaN($)?0:$,I.style.x=J.style.x=$}this.titleOption.textAlign&&(I.style.textAlign=J.style.textAlign=this.titleOption.textAlign),this.shapeList.push(new D(I)),""!==B&&this.shapeList.push(new D(J))},_buildBackground:function(){var $=this.reformCssArray(this.titleOption.padding);this.shapeList.push(new C({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._itemGroupLocation.x-$[3],y:this._itemGroupLocation.y-$[0],width:this._itemGroupLocation.width+$[3]+$[1],height:this._itemGroupLocation.height+$[0]+$[2],brushType:0===this.titleOption.borderWidth?"fill":"both",color:this.titleOption.backgroundColor,strokeColor:this.titleOption.borderColor,lineWidth:this.titleOption.borderWidth}}))},_getItemGroupLocation:function(){var B,_=this.reformCssArray(this.titleOption.padding),J=this.titleOption.text,F=this.titleOption.subtext,E=this.getFont(this.titleOption.textStyle),G=this.getFont(this.titleOption.subtextStyle),D=Math.max(A.getTextWidth(J,E),A.getTextWidth(F,G)),H=A.getTextHeight(J,E)+(""===F?0:this.titleOption.itemGap+A.getTextHeight(F,G)),I=this.zr.getWidth();switch(this.titleOption.x){case"center":B=Math.floor((I-D)/2);break;case"left":B=_[3]+this.titleOption.borderWidth;break;case"right":B=I-D-_[1]-this.titleOption.borderWidth;break;default:B=this.titleOption.x-0,B=isNaN(B)?0:B}var $,C=this.zr.getHeight();switch(this.titleOption.y){case"top":$=_[0]+this.titleOption.borderWidth;break;case"bottom":$=C-H-_[2]-this.titleOption.borderWidth;break;case"center":$=Math.floor((C-H)/2);break;default:$=this.titleOption.y-0,$=isNaN($)?0:$}return{x:B,y:$,width:D,height:H}},refresh:function($){$&&(this.option=$,this.option.title=this.reformOption(this.option.title),this.titleOption=this.option.title,this.titleOption.textStyle=this.getTextStyle(this.titleOption.textStyle),this.titleOption.subtextStyle=this.getTextStyle(this.titleOption.subtextStyle)),this.clear(),this._buildShape()}},B.inherits($,G),_("../component").define("title",$),$}),define("echarts/component/tooltip",["require","./base","../util/shape/Cross","zrender/shape/Line","zrender/shape/Rectangle","../config","../util/ecData","zrender/config","zrender/tool/event","zrender/tool/area","zrender/tool/color","zrender/tool/util","zrender/shape/Base","../component"],function(_){function J(_,$,E,D,A){H.call(this,_,$,E,D,A),this.dom=A.dom;var F=this;F._onmousemove=function($){return F.__onmousemove($)},F._onglobalout=function($){return F.__onglobalout($)},this.zr.on(G.EVENT.MOUSEMOVE,F._onmousemove),this.zr.on(G.EVENT.GLOBALOUT,F._onglobalout),F._hide=function($){return F.__hide($)},F._tryShow=function($){return F.__tryShow($)},F._refixed=function($){return F.__refixed($)},F._setContent=function(_,$){return F.__setContent(_,$)},this._tDom=this._tDom||document.createElement("div"),this._tDom.onselectstart=function(){return!1},this._tDom.onmouseover=function(){F._mousein=!0},this._tDom.onmouseout=function(){F._mousein=!1},this._tDom.className="echarts-tooltip",this._tDom.style.position="absolute",this.hasAppend=!1,this._axisLineShape&&this.zr.delShape(this._axisLineShape.id),this._axisLineShape=new B({zlevel:this.getZlevelBase(),z:this.getZBase(),invisible:!0,hoverable:!1}),this.shapeList.push(this._axisLineShape),this.zr.addShape(this._axisLineShape),this._axisShadowShape&&this.zr.delShape(this._axisShadowShape.id),this._axisShadowShape=new B({zlevel:this.getZlevelBase(),z:1,invisible:!0,hoverable:!1}),this.shapeList.push(this._axisShadowShape),this.zr.addShape(this._axisShadowShape),this._axisCrossShape&&this.zr.delShape(this._axisCrossShape.id),this._axisCrossShape=new C({zlevel:this.getZlevelBase(),z:this.getZBase(),invisible:!0,hoverable:!1}),this.shapeList.push(this._axisCrossShape),this.zr.addShape(this._axisCrossShape),this.showing=!1,this.refresh(D)}var H=_("./base"),C=_("../util/shape/Cross"),B=_("zrender/shape/Line"),D=_("zrender/shape/Rectangle"),L=new D({}),K=_("../config");K.tooltip={zlevel:1,z:8,show:!0,showContent:!0,trigger:"item",islandFormatter:"{a}
{b} : {c}",showDelay:20,hideDelay:100,transitionDuration:0.4,enterable:!1,backgroundColor:"rgba(0,0,0,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,axisPointer:{type:"line",lineStyle:{color:"#48b",width:2,type:"solid"},crossStyle:{color:"#1e90ff",width:1,type:"dashed"},shadowStyle:{color:"rgba(150,150,150,0.3)",width:"auto",type:"default"}},textStyle:{color:"#fff"}};var E=_("../util/ecData"),G=_("zrender/config"),$=_("zrender/tool/event"),A=_("zrender/tool/area"),F=_("zrender/tool/color"),M=_("zrender/tool/util"),I=_("zrender/shape/Base");return J.prototype={type:K.COMPONENT_TYPE_TOOLTIP,_gCssText:"position:absolute;display:block;border-style:solid;white-space:nowrap;",_style:function(_){if(!_)return"";var $=[];if(_.transitionDuration){var C="left "+_.transitionDuration+"s,top "+_.transitionDuration+"s";$.push("transition:"+C),$.push("-moz-transition:"+C),$.push("-webkit-transition:"+C),$.push("-o-transition:"+C)}_.backgroundColor&&($.push("background-Color:"+F.toHex(_.backgroundColor)),$.push("filter:alpha(opacity=70)"),$.push("background-Color:"+_.backgroundColor)),null!=_.borderWidth&&$.push("border-width:"+_.borderWidth+"px"),null!=_.borderColor&&$.push("border-color:"+_.borderColor),null!=_.borderRadius&&($.push("border-radius:"+_.borderRadius+"px"),$.push("-moz-border-radius:"+_.borderRadius+"px"),$.push("-webkit-border-radius:"+_.borderRadius+"px"),$.push("-o-border-radius:"+_.borderRadius+"px"));var B=_.textStyle;B&&(B.color&&$.push("color:"+B.color),B.decoration&&$.push("text-decoration:"+B.decoration),B.align&&$.push("text-align:"+B.align),B.fontFamily&&$.push("font-family:"+B.fontFamily),B.fontSize&&$.push("font-size:"+B.fontSize+"px"),B.fontSize&&$.push("line-height:"+Math.round(3*B.fontSize/2)+"px"),B.fontStyle&&$.push("font-style:"+B.fontStyle),B.fontWeight&&$.push("font-weight:"+B.fontWeight));var A=_.padding;return null!=A&&(A=this.reformCssArray(A),$.push("padding:"+A[0]+"px "+A[1]+"px "+A[2]+"px "+A[3]+"px")),$=$.join(";")+";"},__hide:function(){this._lastDataIndex=-1,this._lastSeriesIndex=-1,this._lastItemTriggerId=-1,this._tDom&&(this._tDom.style.display="none");var $=!1;this._axisLineShape.invisible||(this._axisLineShape.invisible=!0,this.zr.modShape(this._axisLineShape.id),$=!0),this._axisShadowShape.invisible||(this._axisShadowShape.invisible=!0,this.zr.modShape(this._axisShadowShape.id),$=!0),this._axisCrossShape.invisible||(this._axisCrossShape.invisible=!0,this.zr.modShape(this._axisCrossShape.id),$=!0),this._lastTipShape&&this._lastTipShape.tipShape.length>0&&(this.zr.delShape(this._lastTipShape.tipShape),this._lastTipShape=!1,this.shapeList.length=2),$&&this.zr.refreshNextFrame(),this.showing=!1},_show:function(_,$,D,B){var A=this._tDom.offsetHeight,C=this._tDom.offsetWidth;_&&("function"==typeof _&&(_=_([$,D])),_ instanceof Array&&($=_[0],D=_[1])),$+C>this._zrWidth&&($-=C+40),D+A>this._zrHeight&&(D-=A-20),20>D&&(D=0),this._tDom.style.cssText=this._gCssText+this._defaultCssText+(B?B:"")+"left:"+$+"px;top:"+D+"px;",(10>A||10>C)&&setTimeout(this._refixed,20),this.showing=!0},__refixed:function(){if(this._tDom){var _="",$=this._tDom.offsetHeight,A=this._tDom.offsetWidth;this._tDom.offsetLeft+A>this._zrWidth&&(_+="left:"+(this._zrWidth-A-20)+"px;"),this._tDom.offsetTop+$>this._zrHeight&&(_+="top:"+(this._zrHeight-$-10)+"px;"),""!==_&&(this._tDom.style.cssText+=_)}},__tryShow:function(){var _,$;if(this._curTarget){if("island"===this._curTarget._type&&this.option.tooltip.show)return void this._showItemTrigger();var B=E.get(this._curTarget,"series"),A=E.get(this._curTarget,"data");_=this.deepQuery([A,B,this.option],"tooltip.show"),null!=B&&null!=A&&_?($=this.deepQuery([A,B,this.option],"tooltip.trigger"),"axis"===$?this._showAxisTrigger(B.xAxisIndex,B.yAxisIndex,E.get(this._curTarget,"dataIndex")):this._showItemTrigger()):(clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),this._hidingTicket=setTimeout(this._hide,this._hideDelay))}else this._findPolarTrigger()||this._findAxisTrigger()},_findAxisTrigger:function(){if(!this.component.xAxis||!this.component.yAxis)return void(this._hidingTicket=setTimeout(this._hide,this._hideDelay));for(var _,$,C=this.option.series,B=0,A=C.length;A>B;B++)if("axis"===this.deepQuery([C[B],this.option],"tooltip.trigger"))return _=C[B].xAxisIndex||0,$=C[B].yAxisIndex||0,this.component.xAxis.getAxis(_)&&this.component.xAxis.getAxis(_).type===K.COMPONENT_TYPE_AXIS_CATEGORY?void this._showAxisTrigger(_,$,this._getNearestDataIndex("x",this.component.xAxis.getAxis(_))):this.component.yAxis.getAxis($)&&this.component.yAxis.getAxis($).type===K.COMPONENT_TYPE_AXIS_CATEGORY?void this._showAxisTrigger(_,$,this._getNearestDataIndex("y",this.component.yAxis.getAxis($))):void this._showAxisTrigger(_,$,-1);"cross"===this.option.tooltip.axisPointer.type&&this._showAxisTrigger(-1,-1,-1)},_findPolarTrigger:function(){if(!this.component.polar)return!1;var A,_=$.getX(this._event),C=$.getY(this._event),B=this.component.polar.getNearestIndex([_,C]);return B?(A=B.valueIndex,B=B.polarIndex):B=-1,-1!=B?this._showPolarTrigger(B,A):!1},_getNearestDataIndex:function(A,_){var K=-1,F=$.getX(this._event),E=$.getY(this._event);if("x"===A){for(var G,D,B=this.component.grid.getXend(),H=_.getCoordByIndex(K);B>H&&(D=H,F>=H);)G=H,H=_.getCoordByIndex(++K);return 0>=K?K=0:D-F>=F-G?K-=1:null==_.getNameByIndex(K)&&(K-=1),K}for(var J,C,I=this.component.grid.getY(),H=_.getCoordByIndex(K);H>I&&(J=H,H>=E);)C=H,H=_.getCoordByIndex(++K);return 0>=K?K=0:E-J>=C-E?K-=1:null==_.getNameByIndex(K)&&(K-=1),K},_showAxisTrigger:function(B,P,L){if(!this._event.connectTrigger&&this.messageCenter.dispatch(K.EVENT.TOOLTIP_IN_GRID,this._event,null,this.myChart),null==this.component.xAxis||null==this.component.yAxis||null==B||null==P)return clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),void(this._hidingTicket=setTimeout(this._hide,this._hideDelay));var F,E,G,Q,H=this.option.series,J=[],D=[],I="";if("axis"===this.option.tooltip.trigger){if(!this.option.tooltip.show)return;E=this.option.tooltip.formatter,G=this.option.tooltip.position}var R,N,O=-1!=B&&this.component.xAxis.getAxis(B).type===K.COMPONENT_TYPE_AXIS_CATEGORY?"xAxis":-1!=P&&this.component.yAxis.getAxis(P).type===K.COMPONENT_TYPE_AXIS_CATEGORY?"yAxis":!1;if(O){var M="xAxis"==O?B:P;F=this.component[O].getAxis(M);for(var A=0,_=H.length;_>A;A++)this._isSelected(H[A].name)&&H[A][O+"Index"]===M&&"axis"===this.deepQuery([H[A],this.option],"tooltip.trigger")&&(Q=this.query(H[A],"tooltip.showContent")||Q,E=this.query(H[A],"tooltip.formatter")||E,G=this.query(H[A],"tooltip.position")||G,I+=this._style(this.query(H[A],"tooltip")),null!=H[A].stack&&"xAxis"==O?(J.unshift(H[A]),D.unshift(A)):(J.push(H[A]),D.push(A)));this.messageCenter.dispatch(K.EVENT.TOOLTIP_HOVER,this._event,{seriesIndex:D,dataIndex:L},this.myChart);var T;"xAxis"==O?(R=this.subPixelOptimize(F.getCoordByIndex(L),this._axisLineWidth),N=$.getY(this._event),T=[R,this.component.grid.getY(),R,this.component.grid.getYend()]):(R=$.getX(this._event),N=this.subPixelOptimize(F.getCoordByIndex(L),this._axisLineWidth),T=[this.component.grid.getX(),N,this.component.grid.getXend(),N]),this._styleAxisPointer(J,T[0],T[1],T[2],T[3],F.getGap(),R,N)}else R=$.getX(this._event),N=$.getY(this._event),this._styleAxisPointer(H,this.component.grid.getX(),N,this.component.grid.getXend(),N,0,R,N),L>=0?this._showItemTrigger(!0):(clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),this._tDom.style.display="none");if(J.length>0){if(this._lastItemTriggerId=-1,this._lastDataIndex!=L||this._lastSeriesIndex!=D[0]){this._lastDataIndex=L,this._lastSeriesIndex=D[0];var C,S;if("function"==typeof E){for(var U=[],A=0,_=J.length;_>A;A++)C=J[A].data[L],S=this.getDataFromOption(C,"-"),U.push({seriesIndex:D[A],seriesName:J[A].name||"",series:J[A],dataIndex:L,data:C,name:F.getNameByIndex(L),value:S,0:J[A].name||"",1:F.getNameByIndex(L),2:S,3:C});this._curTicket="axis:"+L,this._tDom.innerHTML=E.call(this.myChart,U,this._curTicket,this._setContent)}else if("string"==typeof E){this._curTicket=0/0,E=E.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}");for(A=0,_=J.length;_>A;A++)E=E.replace("{a"+A+"}",this._encodeHTML(J[A].name||"")),E=E.replace("{b"+A+"}",this._encodeHTML(F.getNameByIndex(L))),C=J[A].data[L],C=this.getDataFromOption(C,"-"),E=E.replace("{c"+A+"}",C instanceof Array?C:this.numAddCommas(C));this._tDom.innerHTML=E}else{this._curTicket=0/0,E=this._encodeHTML(F.getNameByIndex(L));for(A=0,_=J.length;_>A;A++)E+="
"+this._encodeHTML(J[A].name||"")+" : ",C=J[A].data[L],C=this.getDataFromOption(C,"-"),E+=C instanceof Array?C:this.numAddCommas(C);this._tDom.innerHTML=E}}if(Q===!1||!this.option.tooltip.showContent)return;this.hasAppend||(this._tDom.style.left=this._zrWidth/2+"px",this._tDom.style.top=this._zrHeight/2+"px",this.dom.firstChild.appendChild(this._tDom),this.hasAppend=!0),this._show(G,R+10,N+10,I)}},_showPolarTrigger:function(B,N){if(null==this.component.polar||null==B||null==N||0>N)return!1;var J,E,D,F=this.option.series,P=[],O=[],G="";if("axis"===this.option.tooltip.trigger){if(!this.option.tooltip.show)return!1;J=this.option.tooltip.formatter,E=this.option.tooltip.position}for(var I=this.option.polar[B].indicator[N].text,C=0,H=F.length;H>C;C++)this._isSelected(F[C].name)&&F[C].polarIndex===B&&"axis"===this.deepQuery([F[C],this.option],"tooltip.trigger")&&(D=this.query(F[C],"tooltip.showContent")||D,J=this.query(F[C],"tooltip.formatter")||J,E=this.query(F[C],"tooltip.position")||E,G+=this._style(this.query(F[C],"tooltip")),P.push(F[C]),O.push(C));if(P.length>0){for(var Q,L,M,K=[],C=0,H=P.length;H>C;C++){Q=P[C].data;for(var A=0,_=Q.length;_>A;A++)L=Q[A],this._isSelected(L.name)&&(L=null!=L?L:{name:"",value:{dataIndex:"-"}},M=this.getDataFromOption(L.value[N]),K.push({seriesIndex:O[C],seriesName:P[C].name||"",series:P[C],dataIndex:N,data:L,name:L.name,indicator:I,value:M,0:P[C].name||"",1:L.name,2:M,3:I}))}if(K.length<=0)return;if(this._lastItemTriggerId=-1,this._lastDataIndex!=N||this._lastSeriesIndex!=O[0])if(this._lastDataIndex=N,this._lastSeriesIndex=O[0],"function"==typeof J)this._curTicket="axis:"+N,this._tDom.innerHTML=J.call(this.myChart,K,this._curTicket,this._setContent);else if("string"==typeof J){J=J.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}").replace("{d}","{d0}");for(C=0,H=K.length;H>C;C++)J=J.replace("{a"+C+"}",this._encodeHTML(K[C].seriesName)),J=J.replace("{b"+C+"}",this._encodeHTML(K[C].name)),J=J.replace("{c"+C+"}",this.numAddCommas(K[C].value)),J=J.replace("{d"+C+"}",this._encodeHTML(K[C].indicator));this._tDom.innerHTML=J}else{J=this._encodeHTML(K[0].name)+"
"+this._encodeHTML(K[0].indicator)+" : "+this.numAddCommas(K[0].value);for(C=1,H=K.length;H>C;C++)J+="
"+this._encodeHTML(K[C].name)+"
",J+=this._encodeHTML(K[C].indicator)+" : "+this.numAddCommas(K[C].value);this._tDom.innerHTML=J}if(D===!1||!this.option.tooltip.showContent)return;return this.hasAppend||(this._tDom.style.left=this._zrWidth/2+"px",this._tDom.style.top=this._zrHeight/2+"px",this.dom.firstChild.appendChild(this._tDom),this.hasAppend=!0),this._show(E,$.getX(this._event),$.getY(this._event),G),!0}},_showItemTrigger:function(B){if(this._curTarget){var O,J,F,D=E.get(this._curTarget,"series"),G=E.get(this._curTarget,"seriesIndex"),P=E.get(this._curTarget,"data"),I=E.get(this._curTarget,"dataIndex"),C=E.get(this._curTarget,"name"),H=E.get(this._curTarget,"value"),Q=E.get(this._curTarget,"special"),M=E.get(this._curTarget,"special2"),N=[P,D,this.option],L="";if("island"!=this._curTarget._type){var A=B?"axis":"item";this.option.tooltip.trigger===A&&(O=this.option.tooltip.formatter,J=this.option.tooltip.position),this.query(D,"tooltip.trigger")===A&&(F=this.query(D,"tooltip.showContent")||F,O=this.query(D,"tooltip.formatter")||O,J=this.query(D,"tooltip.position")||J,L+=this._style(this.query(D,"tooltip"))),F=this.query(P,"tooltip.showContent")||F,O=this.query(P,"tooltip.formatter")||O,J=this.query(P,"tooltip.position")||J,L+=this._style(this.query(P,"tooltip"))}else this._lastItemTriggerId=0/0,F=this.deepQuery(N,"tooltip.showContent"),O=this.deepQuery(N,"tooltip.islandFormatter"),J=this.deepQuery(N,"tooltip.islandPosition");this._lastDataIndex=-1,this._lastSeriesIndex=-1,this._lastItemTriggerId!==this._curTarget.id&&(this._lastItemTriggerId=this._curTarget.id,"function"==typeof O?(this._curTicket=(D.name||"")+":"+I,this._tDom.innerHTML=O.call(this.myChart,{seriesIndex:G,seriesName:D.name||"",series:D,dataIndex:I,data:P,name:C,value:H,percent:Q,indicator:Q,value2:M,indicator2:M,0:D.name||"",1:C,2:H,3:Q,4:M,5:P,6:G,7:I},this._curTicket,this._setContent)):"string"==typeof O?(this._curTicket=0/0,O=O.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}"),O=O.replace("{a0}",this._encodeHTML(D.name||"")).replace("{b0}",this._encodeHTML(C)).replace("{c0}",H instanceof Array?H:this.numAddCommas(H)),O=O.replace("{d}","{d0}").replace("{d0}",Q||""),O=O.replace("{e}","{e0}").replace("{e0}",E.get(this._curTarget,"special2")||""),this._tDom.innerHTML=O):(this._curTicket=0/0,this._tDom.innerHTML=D.type===K.CHART_TYPE_RADAR&&Q?this._itemFormatter.radar.call(this,D,C,H,Q):D.type===K.CHART_TYPE_EVENTRIVER?this._itemFormatter.eventRiver.call(this,D,C,H,P):""+(null!=D.name?this._encodeHTML(D.name)+"
":"")+(""===C?"":this._encodeHTML(C)+" : ")+(H instanceof Array?H:this.numAddCommas(H))));var _=$.getX(this._event),R=$.getY(this._event);this.deepQuery(N,"tooltip.axisPointer.show")&&this.component.grid?this._styleAxisPointer([D],this.component.grid.getX(),R,this.component.grid.getXend(),R,0,_,R):this._hide(),F!==!1&&this.option.tooltip.showContent&&(this.hasAppend||(this._tDom.style.left=this._zrWidth/2+"px",this._tDom.style.top=this._zrHeight/2+"px",this.dom.firstChild.appendChild(this._tDom),this.hasAppend=!0),this._show(J,_+20,R-20,L))}},_itemFormatter:{radar:function(_,$,D,B){var A="";A+=this._encodeHTML(""===$?_.name||"":$),A+=""===A?"":"
";for(var C=0;C";return A},chord:function(_,$,E,C,B){if(null==B)return this._encodeHTML($)+" ("+this.numAddCommas(E)+")";var D=this._encodeHTML($),A=this._encodeHTML(C);return""+(null!=_.name?this._encodeHTML(_.name)+"
":"")+D+" -> "+A+" ("+this.numAddCommas(E)+")
"+A+" -> "+D+" ("+this.numAddCommas(B)+")"},eventRiver:function(_,$,E,C){var B="";B+=this._encodeHTML(""===_.name?"":_.name+" : "),B+=this._encodeHTML($),B+=""===B?"":"
",C=C.evolution;for(var D=0,A=C.length;A>D;D++)B+="
",C[D].detail&&(C[D].detail.img&&(B+=""),B+="
"+C[D].time+"
",B+="",B+=C[D].detail.text+"
",B+="
");return B}},_styleAxisPointer:function(B,N,J,E,D,F,P,O){if(B.length>0){var G,I,A=this.option.tooltip.axisPointer,C=A.type,H={line:{},cross:{},shadow:{}};for(var Q in H)H[Q].color=A[Q+"Style"].color,H[Q].width=A[Q+"Style"].width,H[Q].type=A[Q+"Style"].type;for(var L=0,M=B.length;M>L;L++)G=B[L],I=this.query(G,"tooltip.axisPointer.type"),C=I||C,I&&(H[I].color=this.query(G,"tooltip.axisPointer."+I+"Style.color")||H[I].color,H[I].width=this.query(G,"tooltip.axisPointer."+I+"Style.width")||H[I].width,H[I].type=this.query(G,"tooltip.axisPointer."+I+"Style.type")||H[I].type);if("line"===C){var K=H.line.width,_=N==E;this._axisLineShape.style={xStart:_?this.subPixelOptimize(N,K):N,yStart:_?J:this.subPixelOptimize(J,K),xEnd:_?this.subPixelOptimize(E,K):E,yEnd:_?D:this.subPixelOptimize(D,K),strokeColor:H.line.color,lineWidth:K,lineType:H.line.type},this._axisLineShape.invisible=!1,this.zr.modShape(this._axisLineShape.id)}else if("cross"===C){var $=H.cross.width;this._axisCrossShape.style={brushType:"stroke",rect:this.component.grid.getArea(),x:this.subPixelOptimize(P,$),y:this.subPixelOptimize(O,$),text:("( "+this.component.xAxis.getAxis(0).getValueFromCoord(P)+" , "+this.component.yAxis.getAxis(0).getValueFromCoord(O)+" )").replace(" , "," ").replace(" , "," "),textPosition:"specific",strokeColor:H.cross.color,lineWidth:$,lineType:H.cross.type},this.component.grid.getXend()-P>100?(this._axisCrossShape.style.textAlign="left",this._axisCrossShape.style.textX=P+10):(this._axisCrossShape.style.textAlign="right",this._axisCrossShape.style.textX=P-10),O-this.component.grid.getY()>50?(this._axisCrossShape.style.textBaseline="bottom",this._axisCrossShape.style.textY=O-10):(this._axisCrossShape.style.textBaseline="top",this._axisCrossShape.style.textY=O+10),this._axisCrossShape.invisible=!1,this.zr.modShape(this._axisCrossShape.id)}else"shadow"===C&&((null==H.shadow.width||"auto"===H.shadow.width||isNaN(H.shadow.width))&&(H.shadow.width=F),N===E?Math.abs(this.component.grid.getX()-N)<2?(H.shadow.width/=2,N=E+=H.shadow.width/2):Math.abs(this.component.grid.getXend()-N)<2&&(H.shadow.width/=2,N=E-=H.shadow.width/2):J===D&&(Math.abs(this.component.grid.getY()-J)<2?(H.shadow.width/=2,J=D+=H.shadow.width/2):Math.abs(this.component.grid.getYend()-J)<2&&(H.shadow.width/=2,J=D-=H.shadow.width/2)),this._axisShadowShape.style={xStart:N,yStart:J,xEnd:E,yEnd:D,strokeColor:H.shadow.color,lineWidth:H.shadow.width},this._axisShadowShape.invisible=!1,this.zr.modShape(this._axisShadowShape.id));this.zr.refreshNextFrame()}},__onmousemove:function(B){if(clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),!this._mousein||!this._enterable){var _=B.target,H=$.getX(B.event),D=$.getY(B.event);if(_){this._curTarget=_,this._event=B.event,this._event.zrenderX=H,this._event.zrenderY=D;var C;if(this._needAxisTrigger&&this.component.polar&&-1!=(C=this.component.polar.isInside([H,D])))for(var E=this.option.series,F=0,G=E.length;G>F;F++)if(E[F].polarIndex===C&&"axis"===this.deepQuery([E[F],this.option],"tooltip.trigger")){this._curTarget=null;break}this._showingTicket=setTimeout(this._tryShow,this._showDelay)}else this._curTarget=!1,this._event=B.event,this._event.zrenderX=H,this._event.zrenderY=D,this._needAxisTrigger&&this.component.grid&&A.isInside(L,this.component.grid.getArea(),H,D)?this._showingTicket=setTimeout(this._tryShow,this._showDelay):this._needAxisTrigger&&this.component.polar&&-1!=this.component.polar.isInside([H,D])?this._showingTicket=setTimeout(this._tryShow,this._showDelay):(!this._event.connectTrigger&&this.messageCenter.dispatch(K.EVENT.TOOLTIP_OUT_GRID,this._event,null,this.myChart),this._hidingTicket=setTimeout(this._hide,this._hideDelay))}},__onglobalout:function(){clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),this._hidingTicket=setTimeout(this._hide,this._hideDelay)},__setContent:function(_,$){this._tDom&&(_===this._curTicket&&(this._tDom.innerHTML=$),setTimeout(this._refixed,20))},ontooltipHover:function(_,$){if(!this._lastTipShape||this._lastTipShape&&this._lastTipShape.dataIndex!=_.dataIndex){this._lastTipShape&&this._lastTipShape.tipShape.length>0&&(this.zr.delShape(this._lastTipShape.tipShape),this.shapeList.length=2);for(var B=0,A=$.length;A>B;B++)$[B].zlevel=this.getZlevelBase(),$[B].z=this.getZBase(),$[B].style=I.prototype.getHighlightStyle($[B].style,$[B].highlightStyle),$[B].draggable=!1,$[B].hoverable=!1,$[B].clickable=!1,$[B].ondragend=null,$[B].ondragover=null,$[B].ondrop=null,this.shapeList.push($[B]),this.zr.addShape($[B]);this._lastTipShape={dataIndex:_.dataIndex,tipShape:$}}},ondragend:function(){this._hide()},onlegendSelected:function($){this._selectedMap=$.selected},_setSelectedMap:function(){this._selectedMap=this.component.legend?M.clone(this.component.legend.getSelectedMap()):{}},_isSelected:function($){return null!=this._selectedMap[$]?this._selectedMap[$]:!0},showTip:function(B){if(B){var P,L=this.option.series;if(null!=B.seriesIndex)P=B.seriesIndex;else for(var H=B.seriesName,F=0,I=L.length;I>F;F++)if(L[F].name===H){P=F;break}var Q=L[P];if(null!=Q){var A=this.myChart.chart[Q.type],D="axis"===this.deepQuery([Q,this.option],"tooltip.trigger");if(A)if(D){var J=B.dataIndex;switch(A.type){case K.CHART_TYPE_LINE:case K.CHART_TYPE_BAR:case K.CHART_TYPE_K:case K.CHART_TYPE_RADAR:if(null==this.component.polar||Q.data[0].value.length<=J)return;var R=Q.polarIndex||0,N=this.component.polar.getVector(R,J,"max");this._event={zrenderX:N[0],zrenderY:N[1]},this._showPolarTrigger(R,J)}}else{var O,M,_=A.shapeList;switch(A.type){case K.CHART_TYPE_LINE:case K.CHART_TYPE_BAR:case K.CHART_TYPE_K:case K.CHART_TYPE_TREEMAP:case K.CHART_TYPE_SCATTER:for(J=B.dataIndex,F=0,I=_.length;I>F;F++)if(null==_[F]._mark&&E.get(_[F],"seriesIndex")==P&&E.get(_[F],"dataIndex")==J){this._curTarget=_[F],O=_[F].style.x,M=A.type!=K.CHART_TYPE_K?_[F].style.y:_[F].style.y[0];break}break;case K.CHART_TYPE_RADAR:for(J=B.dataIndex,F=0,I=_.length;I>F;F++)if("polygon"===_[F].type&&E.get(_[F],"seriesIndex")==P&&E.get(_[F],"dataIndex")==J){this._curTarget=_[F];N=this.component.polar.getCenter(Q.polarIndex||0);O=N[0],M=N[1];break}break;case K.CHART_TYPE_PIE:for(var $=B.name,F=0,I=_.length;I>F;F++)if("sector"===_[F].type&&E.get(_[F],"seriesIndex")==P&&E.get(_[F],"name")==$){this._curTarget=_[F];var T=this._curTarget.style,C=(T.startAngle+T.endAngle)/2*Math.PI/180;O=this._curTarget.style.x+Math.cos(C)*T.r/1.5,M=this._curTarget.style.y-Math.sin(C)*T.r/1.5;break}break;case K.CHART_TYPE_MAP:for(var $=B.name,S=Q.mapType,F=0,I=_.length;I>F;F++)if("text"===_[F].type&&_[F]._mapType===S&&_[F].style._name===$){this._curTarget=_[F],O=this._curTarget.style.x+this._curTarget.position[0],M=this._curTarget.style.y+this._curTarget.position[1];break}break;case K.CHART_TYPE_CHORD:for($=B.name,F=0,I=_.length;I>F;F++)if("sector"===_[F].type&&E.get(_[F],"name")==$){this._curTarget=_[F];T=this._curTarget.style,C=(T.startAngle+T.endAngle)/2*Math.PI/180;return O=this._curTarget.style.x+Math.cos(C)*(T.r-2),M=this._curTarget.style.y-Math.sin(C)*(T.r-2),void this.zr.trigger(G.EVENT.MOUSEMOVE,{zrenderX:O,zrenderY:M})}break;case K.CHART_TYPE_FORCE:for($=B.name,F=0,I=_.length;I>F;F++)if("circle"===_[F].type&&E.get(_[F],"name")==$){this._curTarget=_[F],O=this._curTarget.position[0],M=this._curTarget.position[1];break}}null!=O&&null!=M&&(this._event={zrenderX:O,zrenderY:M},this.zr.addHoverShape(this._curTarget),this.zr.refreshHover(),this._showItemTrigger())}}}},hideTip:function(){this._hide()},refresh:function(_){if(this._zrHeight=this.zr.getHeight(),this._zrWidth=this.zr.getWidth(),this._lastTipShape&&this._lastTipShape.tipShape.length>0&&this.zr.delShape(this._lastTipShape.tipShape),this._lastTipShape=!1,this.shapeList.length=2,this._lastDataIndex=-1,this._lastSeriesIndex=-1,this._lastItemTriggerId=-1,_){this.option=_,this.option.tooltip=this.reformOption(this.option.tooltip),this.option.tooltip.textStyle=M.merge(this.option.tooltip.textStyle,this.ecTheme.textStyle),this._needAxisTrigger=!1,"axis"===this.option.tooltip.trigger&&(this._needAxisTrigger=!0);for(var $=this.option.series,C=0,B=$.length;B>C;C++)if("axis"===this.query($[C],"tooltip.trigger")){this._needAxisTrigger=!0;break}this._showDelay=this.option.tooltip.showDelay,this._hideDelay=this.option.tooltip.hideDelay,this._defaultCssText=this._style(this.option.tooltip),this._setSelectedMap(),this._axisLineWidth=this.option.tooltip.axisPointer.lineStyle.width,this._enterable=this.option.tooltip.enterable,!this._enterable&&this._tDom.className.indexOf(G.elementClassName)<0&&(this._tDom.className+=" "+G.elementClassName)}if(this.showing){var A=this;setTimeout(function(){A.zr.trigger(G.EVENT.MOUSEMOVE,A.zr.handler._event)},50)}},onbeforDispose:function(){this._lastTipShape&&this._lastTipShape.tipShape.length>0&&this.zr.delShape(this._lastTipShape.tipShape),clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),this.zr.un(G.EVENT.MOUSEMOVE,this._onmousemove),this.zr.un(G.EVENT.GLOBALOUT,this._onglobalout),this.hasAppend&&this.dom.firstChild&&this.dom.firstChild.removeChild(this._tDom),this._tDom=null},_encodeHTML:function($){return String($).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}},M.inherits(J,H),_("../component").define("tooltip",J),J}),define("echarts/component/legend",["require","./base","zrender/shape/Text","zrender/shape/Rectangle","zrender/shape/Sector","../util/shape/Icon","../util/shape/Candle","../config","zrender/tool/util","zrender/tool/area","../component"],function(_){function I(_,$,C,B,D){if(!this.query(B,"legend.data"))return void console.error("option.legend.data has not been defined.");H.call(this,_,$,C,B,D);var A=this;A._legendSelected=function($){A.__legendSelected($)},A._dispatchHoverLink=function($){return A.__dispatchHoverLink($)},this._colorIndex=0,this._colorMap={},this._selectedMap={},this._hasDataMap={},this.refresh(B)}var H=_("./base"),C=_("zrender/shape/Text"),B=_("zrender/shape/Rectangle"),D=_("zrender/shape/Sector"),K=_("../util/shape/Icon"),J=_("../util/shape/Candle"),E=_("../config");E.legend={zlevel:0,z:4,show:!0,orient:"horizontal",x:"center",y:"top",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,itemWidth:20,itemHeight:14,textStyle:{color:"#333"},selectedMode:!0};var G=_("zrender/tool/util"),$=_("zrender/tool/area");I.prototype={type:E.COMPONENT_TYPE_LEGEND,_buildShape:function(){if(this.legendOption.show){this._itemGroupLocation=this._getItemGroupLocation(),this._buildBackground(),this._buildItem();for(var _=0,$=this.shapeList.length;$>_;_++)this.zr.addShape(this.shapeList[_])}},_buildItem:function(){var B,P,L,F,H,Q,I,E,J=this.legendOption.data,R=J.length,N=this.legendOption.textStyle,O=this.zr.getWidth(),M=this.zr.getHeight(),A=this._itemGroupLocation.x,_=this._itemGroupLocation.y,T=this.legendOption.itemWidth,D=this.legendOption.itemHeight,S=this.legendOption.itemGap;"vertical"===this.legendOption.orient&&"right"===this.legendOption.x&&(A=this._itemGroupLocation.x+this._itemGroupLocation.width-T);for(var U=0;R>U;U++)H=G.merge(J[U].textStyle||{},N),Q=this.getFont(H),B=this._getName(J[U]),I=this._getFormatterName(B),""!==B?(P=J[U].icon||this._getSomethingByName(B).type,E=this.getColor(B),"horizontal"===this.legendOption.orient?200>O-A&&T+5+$.getTextWidth(I,Q)+(U===R-1||""===J[U+1]?0:S)>=O-A&&(A=this._itemGroupLocation.x,_+=D+S):200>M-_&&D+(U===R-1||""===J[U+1]?0:S)>=M-_&&("right"===this.legendOption.x?A-=this._itemGroupLocation.maxWidth+S:A+=this._itemGroupLocation.maxWidth+S,_=this._itemGroupLocation.y),L=this._getItemShapeByType(A,_,T,D,this._selectedMap[B]&&this._hasDataMap[B]?E:"#ccc",P,E),L._name=B,L=new K(L),F={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:A+T+5,y:_+D/2,color:this._selectedMap[B]?"auto"===H.color?E:H.color:"#ccc",text:I,textFont:Q,textBaseline:"middle"},highlightStyle:{color:E,brushType:"fill"},hoverable:!!this.legendOption.selectedMode,clickable:!!this.legendOption.selectedMode},"vertical"===this.legendOption.orient&&"right"===this.legendOption.x&&(F.style.x-=T+10,F.style.textAlign="right"),F._name=B,F=new C(F),this.legendOption.selectedMode&&(L.onclick=F.onclick=this._legendSelected,L.onmouseover=F.onmouseover=this._dispatchHoverLink,L.hoverConnect=F.id,F.hoverConnect=L.id),this.shapeList.push(L),this.shapeList.push(F),"horizontal"===this.legendOption.orient?A+=T+5+$.getTextWidth(I,Q)+S:_+=D+S):"horizontal"===this.legendOption.orient?(A=this._itemGroupLocation.x,_+=D+S):("right"===this.legendOption.x?A-=this._itemGroupLocation.maxWidth+S:A+=this._itemGroupLocation.maxWidth+S,_=this._itemGroupLocation.y);"horizontal"===this.legendOption.orient&&"center"===this.legendOption.x&&_!=this._itemGroupLocation.y&&this._mLineOptimize()},_getName:function($){return"undefined"!=typeof $.name?$.name:$},_getFormatterName:function(_){var $,A=this.legendOption.formatter;return $="function"==typeof A?A.call(this.myChart,_):"string"==typeof A?A.replace("{name}",_):_},_getFormatterNameFromData:function(_){var $=this._getName(_);return this._getFormatterName($)},_mLineOptimize:function(){for(var A=[],_=this._itemGroupLocation.x,D=2,C=this.shapeList.length;C>D;D++)this.shapeList[D].style.x===_?A.push((this._itemGroupLocation.width-(this.shapeList[D-1].style.x+$.getTextWidth(this.shapeList[D-1].style.text,this.shapeList[D-1].style.textFont)-_))/2):D===C-1&&A.push((this._itemGroupLocation.width-(this.shapeList[D].style.x+$.getTextWidth(this.shapeList[D].style.text,this.shapeList[D].style.textFont)-_))/2);for(var B=-1,D=1,C=this.shapeList.length;C>D;D++)this.shapeList[D].style.x===_&&B++,0!==A[B]&&(this.shapeList[D].style.x+=A[B])},_buildBackground:function(){var $=this.reformCssArray(this.legendOption.padding);this.shapeList.push(new B({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._itemGroupLocation.x-$[3],y:this._itemGroupLocation.y-$[0],width:this._itemGroupLocation.width+$[3]+$[1],height:this._itemGroupLocation.height+$[0]+$[2],brushType:0===this.legendOption.borderWidth?"fill":"both",color:this.legendOption.backgroundColor,strokeColor:this.legendOption.borderColor,lineWidth:this.legendOption.borderWidth}}))},_getItemGroupLocation:function(){var B=this.legendOption.data,N=B.length,J=this.legendOption.itemGap,E=this.legendOption.itemWidth+5,D=this.legendOption.itemHeight,F=this.legendOption.textStyle,P=this.getFont(F),O=0,H=0,C=this.reformCssArray(this.legendOption.padding),I=this.zr.getWidth()-C[1]-C[3],Q=this.zr.getHeight()-C[0]-C[2],L=0,M=0;if("horizontal"===this.legendOption.orient){H=D;for(var K=0;N>K;K++)if(""!==this._getName(B[K])){var A=$.getTextWidth(this._getFormatterNameFromData(B[K]),B[K].textStyle?this.getFont(G.merge(B[K].textStyle||{},F)):P);L+E+A+J>I?(L-=J,O=Math.max(O,L),H+=D+J,L=0):(L+=E+A+J,O=Math.max(O,L-J))}else L-=J,O=Math.max(O,L),H+=D+J,L=0}else{for(K=0;N>K;K++)M=Math.max(M,$.getTextWidth(this._getFormatterNameFromData(B[K]),B[K].textStyle?this.getFont(G.merge(B[K].textStyle||{},F)):P));M+=E,O=M;for(K=0;N>K;K++)""!==this._getName(B[K])?L+D+J>Q?(O+=M+J,L-=J,H=Math.max(H,L),L=0):(L+=D+J,H=Math.max(H,L-J)):(O+=M+J,L-=J,H=Math.max(H,L),L=0)}I=this.zr.getWidth(),Q=this.zr.getHeight();var _;switch(this.legendOption.x){case"center":_=Math.floor((I-O)/2);break;case"left":_=C[3]+this.legendOption.borderWidth;break;case"right":_=I-O-C[1]-C[3]-2*this.legendOption.borderWidth;break;default:_=this.parsePercent(this.legendOption.x,I)}var R;switch(this.legendOption.y){case"top":R=C[0]+this.legendOption.borderWidth;break;case"bottom":R=Q-H-C[0]-C[2]-2*this.legendOption.borderWidth;break;case"center":R=Math.floor((Q-H)/2);break;default:R=this.parsePercent(this.legendOption.y,Q)}return{x:_,y:R,width:O,height:H,maxWidth:M}},_getSomethingByName:function(_){for(var $,F=this.option.series,C=0,B=F.length;B>C;C++){if(F[C].name===_)return{type:F[C].type,series:F[C],seriesIndex:C,data:null,dataIndex:-1};if(F[C].type===E.CHART_TYPE_PIE||F[C].type===E.CHART_TYPE_RADAR||F[C].type===E.CHART_TYPE_CHORD||F[C].type===E.CHART_TYPE_FORCE||F[C].type===E.CHART_TYPE_FUNNEL||F[C].type===E.CHART_TYPE_TREEMAP){$=F[C].categories||F[C].data||F[C].nodes;for(var D=0,A=$.length;A>D;D++)if($[D].name===_)return{type:F[C].type,series:F[C],seriesIndex:C,data:$[D],dataIndex:D}}}return{type:"bar",series:null,seriesIndex:-1,data:null,dataIndex:-1}},_getItemShapeByType:function(A,_,I,F,D,G,C){var B,H="#ccc"===D?C:D,$={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{iconType:"legendicon"+G,x:A,y:_,width:I,height:F,color:D,strokeColor:D,lineWidth:2},highlightStyle:{color:H,strokeColor:H,lineWidth:1},hoverable:this.legendOption.selectedMode,clickable:this.legendOption.selectedMode};if(G.match("image")){B=G.replace(new RegExp("^image:\\/\\/"),"");G="image"}switch(G){case"line":$.style.brushType="stroke",$.highlightStyle.lineWidth=3;break;case"radar":case"venn":case"tree":case"treemap":case"scatter":$.highlightStyle.lineWidth=3;break;case"k":$.style.brushType="both",$.highlightStyle.lineWidth=3,$.highlightStyle.color=$.style.color=this.deepQuery([this.ecTheme,E],"k.itemStyle.normal.color")||"#fff",$.style.strokeColor="#ccc"!=D?this.deepQuery([this.ecTheme,E],"k.itemStyle.normal.lineStyle.color")||"#ff3200":D;break;case"image":$.style.iconType="image",$.style.image=B,"#ccc"===D&&($.style.opacity=0.5)}return $},__legendSelected:function(_){var $=_.target._name;if("single"===this.legendOption.selectedMode)for(var A in this._selectedMap)this._selectedMap[A]=!1;this._selectedMap[$]=!this._selectedMap[$],this.messageCenter.dispatch(E.EVENT.LEGEND_SELECTED,_.event,{selected:this._selectedMap,target:$},this.myChart)},__dispatchHoverLink:function($){this.messageCenter.dispatch(E.EVENT.LEGEND_HOVERLINK,$.event,{target:$.target._name},this.myChart)},refresh:function(_){if(_){this.option=_||this.option,this.option.legend=this.reformOption(this.option.legend),this.legendOption=this.option.legend;var $,H,D,C,F=this.legendOption.data||[];if(this.legendOption.selected)for(var B in this.legendOption.selected)this._selectedMap[B]="undefined"!=typeof this._selectedMap[B]?this._selectedMap[B]:this.legendOption.selected[B];for(var A=0,G=F.length;G>A;A++)$=this._getName(F[A]),""!==$&&(H=this._getSomethingByName($),H.series?(this._hasDataMap[$]=!0,C=!H.data||H.type!==E.CHART_TYPE_PIE&&H.type!==E.CHART_TYPE_FORCE&&H.type!==E.CHART_TYPE_FUNNEL?[H.series]:[H.data,H.series],D=this.getItemStyleColor(this.deepQuery(C,"itemStyle.normal.color"),H.seriesIndex,H.dataIndex,H.data),D&&H.type!=E.CHART_TYPE_K&&this.setColor($,D),this._selectedMap[$]=null!=this._selectedMap[$]?this._selectedMap[$]:!0):this._hasDataMap[$]=!1)}this.clear(),this._buildShape()},getRelatedAmount:function(_){for(var $,G=0,D=this.option.series,C=0,F=D.length;F>C;C++)if(D[C].name===_&&G++,D[C].type===E.CHART_TYPE_PIE||D[C].type===E.CHART_TYPE_RADAR||D[C].type===E.CHART_TYPE_CHORD||D[C].type===E.CHART_TYPE_FORCE||D[C].type===E.CHART_TYPE_FUNNEL){$=D[C].type!=E.CHART_TYPE_FORCE?D[C].data:D[C].categories;for(var B=0,A=$.length;A>B;B++)$[B].name===_&&"-"!=$[B].value&&G++}return G},setColor:function(_,$){this._colorMap[_]=$},getColor:function($){return this._colorMap[$]||(this._colorMap[$]=this.zr.getColor(this._colorIndex++)),this._colorMap[$]},hasColor:function($){return this._colorMap[$]?this._colorMap[$]:!1},add:function(_,$){for(var C=this.legendOption.data,B=0,A=C.length;A>B;B++)if(this._getName(C[B])===_)return;this.legendOption.data.push(_),this.setColor(_,$),this._selectedMap[_]=!0,this._hasDataMap[_]=!0},del:function(_){for(var $=this.legendOption.data,B=0,A=$.length;A>B;B++)if(this._getName($[B])===_)return this.legendOption.data.splice(B,1)},getItemShape:function(_){if(null!=_)for(var $,B=0,A=this.shapeList.length;A>B;B++)if($=this.shapeList[B],$._name===_&&"text"!=$.type)return $},setItemShape:function(_,$){for(var C,B=0,A=this.shapeList.length;A>B;B++)C=this.shapeList[B],C._name===_&&"text"!=C.type&&(this._selectedMap[_]||($.style.color="#ccc",$.style.strokeColor="#ccc"),this.zr.modShape(C.id,$))},isSelected:function($){return"undefined"!=typeof this._selectedMap[$]?this._selectedMap[$]:!0},getSelectedMap:function(){return this._selectedMap},setSelected:function(_,$){if("single"===this.legendOption.selectedMode)for(var A in this._selectedMap)this._selectedMap[A]=!1;this._selectedMap[_]=$,this.messageCenter.dispatch(E.EVENT.LEGEND_SELECTED,null,{selected:this._selectedMap,target:_},this.myChart)},onlegendSelected:function(_,$){var B=_.selected;for(var A in B)this._selectedMap[A]!=B[A]&&($.needRefresh=!0),this._selectedMap[A]=B[A]}};var A={line:function(_,$){var A=$.height/2;_.moveTo($.x,$.y+A),_.lineTo($.x+$.width,$.y+A)},pie:function(_,$){var E=$.x,C=$.y,B=$.width,A=$.height;D.prototype.buildPath(_,{x:E+B/2,y:C+A+2,r:A,r0:6,startAngle:45,endAngle:135})},eventRiver:function(_,$){var D=$.x,B=$.y,A=$.width,C=$.height;_.moveTo(D,B+C),_.bezierCurveTo(D+A,B+C,D,B+4,D+A,B+4),_.lineTo(D+A,B),_.bezierCurveTo(D,B,D+A,B+C-4,D,B+C-4),_.lineTo(D,B+C)},k:function(_,$){var D=$.x,B=$.y,A=$.width,C=$.height;J.prototype.buildPath(_,{x:D+A/2,y:[B+1,B+1,B+C-6,B+C],width:A-6})},bar:function(_,$){var E=$.x,C=$.y+1,B=$.width,D=$.height-2,A=3;_.moveTo(E+A,C),_.lineTo(E+B-A,C),_.quadraticCurveTo(E+B,C,E+B,C+A),_.lineTo(E+B,C+D-A),_.quadraticCurveTo(E+B,C+D,E+B-A,C+D),_.lineTo(E+A,C+D),_.quadraticCurveTo(E,C+D,E,C+D-A),_.lineTo(E,C+A),_.quadraticCurveTo(E,C,E+A,C)},force:function(_,$){K.prototype.iconLibrary.circle(_,$)},radar:function(_,H){var G=6,C=H.x+H.width/2,B=H.y+H.height/2,D=H.height/2,J=2*Math.PI/G,I=-Math.PI/2,E=C+D*Math.cos(I),F=B+D*Math.sin(I);_.moveTo(E,F),I+=J;for(var $=0,A=G-1;A>$;$++)_.lineTo(C+D*Math.cos(I),B+D*Math.sin(I)),I+=J;_.lineTo(E,F)}};A.chord=A.pie,A.map=A.bar;for(var F in A)K.prototype.iconLibrary["legendicon"+F]=A[F];return G.inherits(I,H),_("../component").define("legend",I),I}),define("echarts/util/ecData",[],function(){function _(_,$,G,D,C,E,B,A){var F;return"undefined"!=typeof D&&(F=null==D.value?D:D.value),_._echartsData={_series:$,_seriesIndex:G,_data:D,_dataIndex:C,_name:E,_value:F,_special:B,_special2:A},_._echartsData}function $(_,$){var A=_._echartsData;if(!$)return A;switch($){case"series":case"seriesIndex":case"data":case"dataIndex":case"name":case"value":case"special":case"special2":return A&&A["_"+$]}return null}function B(_,$,A){switch(_._echartsData=_._echartsData||{},$){case"series":case"seriesIndex":case"data":case"dataIndex":case"name":case"value":case"special":case"special2":_._echartsData["_"+$]=A}}function A(_,$){$._echartsData={_series:_._echartsData._series,_seriesIndex:_._echartsData._seriesIndex,_data:_._echartsData._data,_dataIndex:_._echartsData._dataIndex,_name:_._echartsData._name,_value:_._echartsData._value,_special:_._echartsData._special,_special2:_._echartsData._special2}}return{pack:_,set:B,get:$,clone:A}}),define("echarts/chart",[],function(){var _={},$={};return _.define=function(B,A){return $[B]=A,_},_.get=function(_){return $[_]},_}),define("zrender/tool/color",["require","../tool/util"],function(Z){function n(_){$=_}function j(){$=H}function d(A,_){return A=0|A,_=_||$,_[A%_.length]}function c($){D=$}function e(){J=D}function p(){return D}function o(_,$,H,D,C,E,B){I||(I=R.getContext());for(var A=I.createRadialGradient(_,$,H,D,C,E),F=0,G=B.length;G>F;F++)A.addColorStop(B[F][0],B[F][1]);return A.__nonRecursion=!0,A}function f(_,$,F,D,C){I||(I=R.getContext());for(var E=I.createLinearGradient(_,$,F,D),B=0,A=C.length;A>B;B++)E.addColorStop(C[B][0],C[B][1]);return E.__nonRecursion=!0,E}function i(_,H,G){_=m(_),H=m(H),_=S(_),H=S(H);for(var B=[],A=(H[0]-_[0])/G,C=(H[1]-_[1])/G,J=(H[2]-_[2])/G,I=(H[3]-_[3])/G,D=0,F=_[0],$=_[1],E=_[2],K=_[3];G>D;D++)B[D]=b([O(Math.floor(F),[0,255]),O(Math.floor($),[0,255]),O(Math.floor(E),[0,255]),K.toFixed(4)-0],"rgba"),F+=A,$+=C,E+=J,K+=I;return F=H[0],$=H[1],E=H[2],K=H[3],B[D]=b([F,$,E,K],"rgba"),B}function Y(_,$){var E=[],C=_.length;if(void 0===$&&($=20),1===C)E=i(_[0],_[0],$);else if(C>1)for(var B=0,D=C-1;D>B;B++){var A=i(_[B],_[B+1],$);D-1>B&&A.pop(),E=E.concat(A)}return E}function b(_,$){if($=$||"rgb",_&&(3===_.length||4===_.length)){if(_=E(_,function($){return $>1?Math.ceil($):$}),$.indexOf("hex")>-1)return"#"+((1<<24)+(_[0]<<16)+(_[1]<<8)+ +_[2]).toString(16).slice(1);if($.indexOf("hs")>-1){var A=E(_.slice(1,3),function($){return $+"%"});_[1]=A[0],_[2]=A[1]}return $.indexOf("a")>-1?(3===_.length&&_.push(1),_[3]=O(_[3],[0,1]),$+"("+_.slice(0,4).join(",")+")"):$+"("+_.slice(0,3).join(",")+")"}}function g(_){_=l(_),_.indexOf("rgba")<0&&(_=m(_));var $=[],A=0;return _.replace(/[\d.]+/g,function(_){_=3>A?0|_:+_,$[A++]=_}),$}function q(B,$){if(!_(B))return B;var E=S(B),D=E[3];return"undefined"==typeof D&&(D=1),B.indexOf("hsb")>-1?E=r(E):B.indexOf("hsl")>-1&&(E=C(E)),$.indexOf("hsb")>-1||$.indexOf("hsv")>-1?E=A(E):$.indexOf("hsl")>-1&&(E=L(E)),E[3]=D,b(E,$)}function m($){return q($,"rgba")}function Q($){return q($,"rgb")}function N($){return q($,"hex")}function X($){return q($,"hsva")}function W($){return q($,"hsv")}function s($){return q($,"hsba")}function a($){return q($,"hsb")}function U($){return q($,"hsla")}function t($){return q($,"hsl")}function h(_){for(var $ in B)if(N(B[$])===N(_))return $;return null}function l($){return String($).replace(/\s+/g,"")}function F(_){if(B[_]&&(_=B[_]),_=l(_),_=_.replace(/hsv/i,"hsb"),/^#[\da-f]{3}$/i.test(_)){_=parseInt(_.slice(1),16);var $=(3840&_)<<8,C=(240&_)<<4,A=15&_;_="#"+((1<<24)+($<<4)+$+(C<<4)+C+(A<<4)+A).toString(16).slice(1)}return _}function k(A,$){if(!_(A))return A;var D=$>0?1:-1;"undefined"==typeof $&&($=0),$=Math.abs($)>1?1:Math.abs($),A=Q(A);for(var C=S(A),B=0;3>B;B++)C[B]=1===D?C[B]*(1-$)|0:(255-C[B])*$+C[B]|0;return"rgb("+C.join(",")+")"}function P(A){if(!_(A))return A;var $=S(m(A));return $=E($,function($){return 255-$}),b($,"rgb")}function V(B,A,K){if(!_(B)||!_(A))return B;"undefined"==typeof K&&(K=0.5),K=1-O(K,[0,1]);for(var F=2*K-1,E=S(m(B)),G=S(m(A)),D=E[3]-G[3],C=((F*D===-1?F:(F+D)/(1+F*D))+1)/2,H=1-C,J=[],$=0;3>$;$++)J[$]=E[$]*C+G[$]*H;var I=E[3]*K+G[3]*(1-K);return I=Math.max(0,Math.min(1,I)),1===E[3]&&1===G[3]?b(J,"rgb"):(J[3]=I,b(J,"rgba"))}function K(){return"#"+(Math.random().toString(16)+"0000").slice(2,8)}function S(A){A=F(A);var _=A.match(T);if(null===_)throw new Error("The color format error");var K,G,D,H=[];if(_[2])K=_[2].replace("#","").split(""),D=[K[0]+K[1],K[2]+K[3],K[4]+K[5]],H=E(D,function($){return O(parseInt($,16),[0,255])});else if(_[4]){var C=_[4].split(",");G=C[3],D=C.slice(0,3),H=E(D,function($){return $=Math.floor($.indexOf("%")>0?2.55*parseInt($,0):$),O($,[0,255])}),"undefined"!=typeof G&&H.push(O(parseFloat(G),[0,1]))}else if(_[5]||_[6]){var B=(_[5]||_[6]).split(","),I=parseInt(B[0],0)/360,J=B[1],$=B[2];G=B[3],H=E([J,$],function($){return O(parseFloat($)/100,[0,1])}),H.unshift(I),"undefined"!=typeof G&&H.push(O(parseFloat(G),[0,1]))}return H}function M(A,$){if(!_(A))return A;null===$&&($=1);var B=S(m(A));return B[3]=O(Number($).toFixed(4),[0,1]),b(B,"rgba")}function E(_,$){if("function"!=typeof $)throw new TypeError;for(var B=_?_.length:0,A=0;B>A;A++)_[A]=$(_[A]);return _}function O(_,$){return _<=$[0]?_=$[0]:_>=$[1]&&(_=$[1]),_}function _($){return $ instanceof Array||"string"==typeof $}function r(_){var J,H,C,B=_[0],D=_[1],L=_[2];if(0===D)J=255*L,H=255*L,C=255*L;else{var K=6*B;6===K&&(K=0);var E=0|K,G=L*(1-D),$=L*(1-D*(K-E)),A=L*(1-D*(1-(K-E))),F=0,M=0,I=0;0===E?(F=L,M=A,I=G):1===E?(F=$,M=L,I=G):2===E?(F=G,M=L,I=A):3===E?(F=G,M=$,I=L):4===E?(F=A,M=G,I=L):(F=L,M=G,I=$),J=255*F,H=255*M,C=255*I}return[J,H,C]}function C(_){var $,H,D,C=_[0],E=_[1],B=_[2];if(0===E)$=255*B,H=255*B,D=255*B;else{var A;A=0.5>B?B*(1+E):B+E-E*B;var F=2*B-A;$=255*G(F,A,C+1/3),H=255*G(F,A,C),D=255*G(F,A,C-1/3)}return[$,H,D]}function G(_,$,A){return 0>A&&(A+=1),A>1&&(A-=1),1>6*A?_+6*($-_)*A:1>2*A?$:2>3*A?_+($-_)*(2/3-A)*6:_}function A(_){var I,H,C=_[0]/255,B=_[1]/255,D=_[2]/255,K=Math.min(C,B,D),J=Math.max(C,B,D),E=J-K,G=J;if(0===E)I=0,H=0;else{H=E/J;var $=((J-C)/6+E/2)/E,A=((J-B)/6+E/2)/E,F=((J-D)/6+E/2)/E;C===J?I=F-A:B===J?I=1/3+$-F:D===J&&(I=2/3+A-$),0>I&&(I+=1),I>1&&(I-=1)}return I=360*I,H=100*H,G=100*G,[I,H,G]}function L(_){var I,H,C=_[0]/255,B=_[1]/255,D=_[2]/255,K=Math.min(C,B,D),J=Math.max(C,B,D),E=J-K,G=(J+K)/2;if(0===E)I=0,H=0;else{H=0.5>G?E/(J+K):E/(2-J-K);var $=((J-C)/6+E/2)/E,A=((J-B)/6+E/2)/E,F=((J-D)/6+E/2)/E;C===J?I=F-A:B===J?I=1/3+$-F:D===J&&(I=2/3+A-$),0>I&&(I+=1),I>1&&(I-=1)}return I=360*I,H=100*H,G=100*G,[I,H,G]}var I,R=Z("../tool/util"),$=["#ff9277"," #dddd00"," #ffc877"," #bbe3ff"," #d5ffbb","#bbbbff"," #ddb000"," #b0dd00"," #e2bbff"," #ffbbe3","#ff7777"," #ff9900"," #83dd00"," #77e3ff"," #778fff","#c877ff"," #ff77ab"," #ff6600"," #aa8800"," #77c7ff","#ad77ff"," #ff77ff"," #dd0083"," #777700"," #00aa00","#0088aa"," #8400dd"," #aa0088"," #dd0000"," #772e00"],H=$,D="rgba(255,255,0,0.5)",J=D,T=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,B={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"};return{customPalette:n,resetPalette:j,getColor:d,getHighlightColor:p,customHighlight:c,resetHighlight:e,getRadialGradient:o,getLinearGradient:f,getGradientColors:Y,getStepColors:i,reverse:P,mix:V,lift:k,trim:l,random:K,toRGB:Q,toRGBA:m,toHex:N,toHSL:t,toHSLA:U,toHSB:a,toHSBA:s,toHSV:W,toHSVA:X,toName:h,toColor:b,toArray:g,alpha:M,getData:S}}),define("echarts/component/timeline",["require","./base","zrender/shape/Rectangle","../util/shape/Icon","../util/shape/Chain","../config","zrender/tool/util","zrender/tool/area","zrender/tool/event","../component"],function(A){function _(_,$,F,C,D){E.call(this,_,$,F,C,D);var A=this;if(A._onclick=function($){return A.__onclick($)},A._ondrift=function(_,$){return A.__ondrift(this,_,$)},A._ondragend=function(){return A.__ondragend()},A._setCurrentOption=function(){var _=A.timelineOption;A.currentIndex%=_.data.length;var $=A.options[A.currentIndex]||{};A.myChart._setOption($,_.notMerge,!0),A.messageCenter.dispatch(B.EVENT.TIMELINE_CHANGED,null,{currentIndex:A.currentIndex,data:null!=_.data[A.currentIndex].name?_.data[A.currentIndex].name:_.data[A.currentIndex]},A.myChart)},A._onFrame=function(){A._setCurrentOption(),A._syncHandleShape(),A.timelineOption.autoPlay&&(A.playTicket=setTimeout(function(){return A.currentIndex+=1,!A.timelineOption.loop&&A.currentIndex>=A.timelineOption.data.length?(A.currentIndex=A.timelineOption.data.length-1,void A.stop()):void A._onFrame()},A.timelineOption.playInterval))},this.setTheme(!1),this.options=this.option.options,this.currentIndex=this.timelineOption.currentIndex%this.timelineOption.data.length,this.timelineOption.notMerge||0===this.currentIndex||(this.options[this.currentIndex]=G.merge(this.options[this.currentIndex],this.options[0])),this.timelineOption.show&&(this._buildShape(),this._syncHandleShape()),this._setCurrentOption(),this.timelineOption.autoPlay){A=this;this.playTicket=setTimeout(function(){A.play()},null!=this.ecTheme.animationDuration?this.ecTheme.animationDuration:B.animationDuration)}}function I(A,_){var I=2,E=_.x+I,D=_.y+I+2,C=_.width-I,B=_.height-I,G=_.symbol;if("last"===G)A.moveTo(E+C-2,D+B/3),A.lineTo(E+C-2,D),A.lineTo(E+2,D+B/2),A.lineTo(E+C-2,D+B),A.lineTo(E+C-2,D+B/3*2),A.moveTo(E,D),A.lineTo(E,D);else if("next"===G)A.moveTo(E+2,D+B/3),A.lineTo(E+2,D),A.lineTo(E+C-2,D+B/2),A.lineTo(E+2,D+B),A.lineTo(E+2,D+B/3*2),A.moveTo(E,D),A.lineTo(E,D);else if("play"===G){if("stop"===_.status)A.moveTo(E+2,D),A.lineTo(E+C-2,D+B/2),A.lineTo(E+2,D+B),A.lineTo(E+2,D);else{var H="both"===_.brushType?2:3;A.rect(E+2,D,H,B),A.rect(E+C-H-2,D,H,B)}}else if(G.match("image")){var $="";$=G.replace(new RegExp("^image:\\/\\/"),""),G=F.prototype.iconLibrary.image,G(A,{x:E,y:D,width:C,height:B,image:$})}}var E=A("./base"),D=A("zrender/shape/Rectangle"),F=A("../util/shape/Icon"),C=A("../util/shape/Chain"),B=A("../config");B.timeline={zlevel:0,z:4,show:!0,type:"time",notMerge:!1,realtime:!0,x:80,x2:80,y2:0,height:50,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,controlPosition:"left",autoPlay:!1,loop:!0,playInterval:2000,lineStyle:{width:1,color:"#666",type:"dashed"},label:{show:!0,interval:"auto",rotate:0,textStyle:{color:"#333"}},checkpointStyle:{symbol:"auto",symbolSize:"auto",color:"auto",borderColor:"auto",borderWidth:"auto",label:{show:!1,textStyle:{color:"auto"}}},controlStyle:{itemSize:15,itemGap:5,normal:{color:"#333"},emphasis:{color:"#1e90ff"}},symbol:"emptyDiamond",symbolSize:4,currentIndex:0};var G=A("zrender/tool/util"),H=A("zrender/tool/area"),$=A("zrender/tool/event");return _.prototype={type:B.COMPONENT_TYPE_TIMELINE,_buildShape:function(){if(this._location=this._getLocation(),this._buildBackground(),this._buildControl(),this._chainPoint=this._getChainPoint(),this.timelineOption.label.show)for(var _=this._getInterval(),$=0,B=this._chainPoint.length;B>$;$+=_)this._chainPoint[$].showLabel=!0;this._buildChain(),this._buildHandle();for(var $=0,A=this.shapeList.length;A>$;$++)this.zr.addShape(this.shapeList[$])},_getLocation:function(){var _,$=this.timelineOption,H=this.reformCssArray(this.timelineOption.padding),D=this.zr.getWidth(),C=this.parsePercent($.x,D),E=this.parsePercent($.x2,D);null==$.width?(_=D-C-E,E=D-E):(_=this.parsePercent($.width,D),E=C+_);var B,A,F=this.zr.getHeight(),G=this.parsePercent($.height,F);return null!=$.y?(B=this.parsePercent($.y,F),A=B+G):(A=F-this.parsePercent($.y2,F),B=A-G),{x:C+H[3],y:B+H[0],x2:E-H[1],y2:A-H[2],width:_-H[1]-H[3],height:G-H[0]-H[2]}},_getReformedLabel:function(_){var $=this.timelineOption,B=null!=$.data[_].name?$.data[_].name:$.data[_],A=$.data[_].formatter||$.label.formatter;return A&&("function"==typeof A?B=A.call(this.myChart,B):"string"==typeof A&&(B=A.replace("{value}",B))),B},_getInterval:function(){var _=this._chainPoint,I=this.timelineOption,G=I.label.interval;if("auto"===G){var C=I.label.textStyle.fontSize,B=I.data,D=I.data.length;if(D>3){var K,J,E=!1;for(G=0;!E&&D>G;){G++,E=!0;for(var $=G;D>$;$+=G){if(K=_[$].x-_[$-G].x,0!==I.label.rotate)J=C;else if(B[$].textStyle)J=H.getTextWidth(_[$].name,_[$].textFont);else{var A=_[$].name+"",F=(A.match(/\w/g)||"").length,L=A.length-F;J=F*C*2/3+L*C}if(J>K){E=!1;break}}}}else G=1}else G=G-0+1;return G},_getChainPoint:function(){function B($){return null!=J[$].name?J[$].name:J[$]+""}var O,K=this.timelineOption,F=K.symbol.toLowerCase(),E=K.symbolSize,H=K.label.rotate,Q=K.label.textStyle,P=this.getFont(Q),J=K.data,A=this._location.x,D=this._location.y+this._location.height/4*3,I=this._location.x2-this._location.x,R=J.length,M=[];if(R>1){var N=I/R;if(N=N>50?50:20>N?5:N,I-=2*N,"number"===K.type){for(var L=0;R>L;L++)M.push(A+N+I/(R-1)*L)}else{M[0]=new Date(B(0).replace(/-/g,"/")),M[R-1]=new Date(B(R-1).replace(/-/g,"/"))-M[0];for(L=1;R>L;L++)M[L]=A+N+I*(new Date(B(L).replace(/-/g,"/"))-M[0])/M[R-1];M[0]=A+N}}else M.push(A+I/2);for(var _,$,T,C,S,U=[],L=0;R>L;L++)A=M[L],_=J[L].symbol&&J[L].symbol.toLowerCase()||F,_.match("empty")?(_=_.replace("empty",""),T=!0):T=!1,_.match("star")&&($=_.replace("star","")-0||5,_="star"),O=J[L].textStyle?G.merge(J[L].textStyle||{},Q):Q,C=O.align||"center",H?(C=H>0?"right":"left",S=[H*Math.PI/180,A,D-5]):S=!1,U.push({x:A,n:$,isEmpty:T,symbol:_,symbolSize:J[L].symbolSize||E,color:J[L].color,borderColor:J[L].borderColor,borderWidth:J[L].borderWidth,name:this._getReformedLabel(L),textColor:O.color,textAlign:C,textBaseline:O.baseline||"middle",textX:A,textY:D-(H?5:0),textFont:J[L].textStyle?this.getFont(O):P,rotation:S,showLabel:!1});return U},_buildBackground:function(){var _=this.timelineOption,$=this.reformCssArray(this.timelineOption.padding),B=this._location.width,A=this._location.height;(0!==_.borderWidth||"rgba(0,0,0,0)"!=_.backgroundColor.replace(/\s/g,""))&&this.shapeList.push(new D({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._location.x-$[3],y:this._location.y-$[0],width:B+$[1]+$[3],height:A+$[0]+$[2],brushType:0===_.borderWidth?"fill":"both",color:_.backgroundColor,strokeColor:_.borderColor,lineWidth:_.borderWidth}}))},_buildControl:function(){var A=this,_=this.timelineOption,I=_.lineStyle,E=_.controlStyle;if("none"!==_.controlPosition){var D,C=E.itemSize,B=E.itemGap;"left"===_.controlPosition?(D=this._location.x,this._location.x+=3*(C+B)):(D=this._location.x2-(3*(C+B)-B),this._location.x2-=3*(C+B));var H=this._location.y,$={zlevel:this.getZlevelBase(),z:this.getZBase()+1,style:{iconType:"timelineControl",symbol:"last",x:D,y:H,width:C,height:C,brushType:"stroke",color:E.normal.color,strokeColor:E.normal.color,lineWidth:I.width},highlightStyle:{color:E.emphasis.color,strokeColor:E.emphasis.color,lineWidth:I.width+1},clickable:!0};this._ctrLastShape=new F($),this._ctrLastShape.onclick=function(){A.last()},this.shapeList.push(this._ctrLastShape),D+=C+B,this._ctrPlayShape=new F(G.clone($)),this._ctrPlayShape.style.brushType="fill",this._ctrPlayShape.style.symbol="play",this._ctrPlayShape.style.status=this.timelineOption.autoPlay?"playing":"stop",this._ctrPlayShape.style.x=D,this._ctrPlayShape.onclick=function(){"stop"===A._ctrPlayShape.style.status?A.play():A.stop()},this.shapeList.push(this._ctrPlayShape),D+=C+B,this._ctrNextShape=new F(G.clone($)),this._ctrNextShape.style.symbol="next",this._ctrNextShape.style.x=D,this._ctrNextShape.onclick=function(){A.next()},this.shapeList.push(this._ctrNextShape)}},_buildChain:function(){var _=this.timelineOption,$=_.lineStyle;this._timelineShae={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:this._location.x,y:this.subPixelOptimize(this._location.y,$.width),width:this._location.x2-this._location.x,height:this._location.height,chainPoint:this._chainPoint,brushType:"both",strokeColor:$.color,lineWidth:$.width,lineType:$.type},hoverable:!1,clickable:!0,onclick:this._onclick},this._timelineShae=new C(this._timelineShae),this.shapeList.push(this._timelineShae)},_buildHandle:function(){var _=this._chainPoint[this.currentIndex],$=_.symbolSize+1;$=5>$?5:$,this._handleShape={zlevel:this.getZlevelBase(),z:this.getZBase()+1,hoverable:!1,draggable:!0,style:{iconType:"diamond",n:_.n,x:_.x-$,y:this._location.y+this._location.height/4-$,width:2*$,height:2*$,brushType:"both",textPosition:"specific",textX:_.x,textY:this._location.y-this._location.height/4,textAlign:"center",textBaseline:"middle"},highlightStyle:{},ondrift:this._ondrift,ondragend:this._ondragend},this._handleShape=new F(this._handleShape),this.shapeList.push(this._handleShape)},_syncHandleShape:function(){if(this.timelineOption.show){var _=this.timelineOption,$=_.checkpointStyle,B=this._chainPoint[this.currentIndex];this._handleShape.style.text=$.label.show?B.name:"",this._handleShape.style.textFont=B.textFont,this._handleShape.style.n=B.n,"auto"===$.symbol?this._handleShape.style.iconType="none"!=B.symbol?B.symbol:"diamond":(this._handleShape.style.iconType=$.symbol,$.symbol.match("star")&&(this._handleShape.style.n=$.symbol.replace("star","")-0||5,this._handleShape.style.iconType="star"));var A;"auto"===$.symbolSize?(A=B.symbolSize+2,A=5>A?5:A):A=$.symbolSize-0,this._handleShape.style.color="auto"===$.color?B.color?B.color:_.controlStyle.emphasis.color:$.color,this._handleShape.style.textColor="auto"===$.label.textStyle.color?this._handleShape.style.color:$.label.textStyle.color,this._handleShape.highlightStyle.strokeColor=this._handleShape.style.strokeColor="auto"===$.borderColor?B.borderColor?B.borderColor:"#fff":$.borderColor,this._handleShape.style.lineWidth="auto"===$.borderWidth?B.borderWidth?B.borderWidth:0:$.borderWidth-0,this._handleShape.highlightStyle.lineWidth=this._handleShape.style.lineWidth+1,this.zr.animate(this._handleShape.id,"style").when(500,{x:B.x-A,textX:B.x,y:this._location.y+this._location.height/4-A,width:2*A,height:2*A}).start("ExponentialOut")}},_findChainIndex:function(_){var $=this._chainPoint,B=$.length;if(_<=$[0].x)return 0;if(_>=$[B-1].x)return B-1;for(var A=0;B-1>A;A++)if(_>=$[A].x&&_<=$[A+1].x)return Math.abs(_-$[A].x)=D[C-1].x-D[C-1].symbolSize?(_.style.x=D[C-1].x-D[C-1].symbolSize,F=C-1):(_.style.x+=$,F=this._findChainIndex(_.style.x));var E=D[F],B=E.symbolSize+2;if(_.style.iconType=E.symbol,_.style.n=E.n,_.style.textX=_.style.x+B/2,_.style.y=this._location.y+this._location.height/4-B,_.style.width=2*B,_.style.height=2*B,_.style.text=E.name,F===this.currentIndex)return!0;if(this.currentIndex=F,this.timelineOption.realtime){clearTimeout(this.playTicket);var A=this;this.playTicket=setTimeout(function(){A._setCurrentOption()},200)}return!0},__ondragend:function(){this.isDragend=!0},ondragend:function(_,$){this.isDragend&&_.target&&(!this.timelineOption.realtime&&this._setCurrentOption(),$.dragOut=!0,$.dragIn=!0,$.needRefresh=!1,this.isDragend=!1,this._syncHandleShape())},last:function(){return this.timelineOption.autoPlay&&this.stop(),this.currentIndex-=1,this.currentIndex<0&&(this.currentIndex=this.timelineOption.data.length-1),this._onFrame(),this.currentIndex},next:function(){return this.timelineOption.autoPlay&&this.stop(),this.currentIndex+=1,this.currentIndex>=this.timelineOption.data.length&&(this.currentIndex=0),this._onFrame(),this.currentIndex},play:function(_,$){return this._ctrPlayShape&&"playing"!=this._ctrPlayShape.style.status&&(this._ctrPlayShape.style.status="playing",this.zr.modShape(this._ctrPlayShape.id),this.zr.refreshNextFrame()),this.timelineOption.autoPlay=null!=$?$:!0,this.timelineOption.autoPlay||clearTimeout(this.playTicket),this.currentIndex=null!=_?_:this.currentIndex+1,this.currentIndex>=this.timelineOption.data.length&&(this.currentIndex=0),this._onFrame(),this.currentIndex},stop:function(){return this._ctrPlayShape&&"stop"!=this._ctrPlayShape.style.status&&(this._ctrPlayShape.style.status="stop",this.zr.modShape(this._ctrPlayShape.id),this.zr.refreshNextFrame()),this.timelineOption.autoPlay=!1,clearTimeout(this.playTicket),this.currentIndex},resize:function(){this.timelineOption.show&&(this.clear(),this._buildShape(),this._syncHandleShape())},setTheme:function($){this.timelineOption=this.reformOption(G.clone(this.option.timeline)),this.timelineOption.label.textStyle=this.getTextStyle(this.timelineOption.label.textStyle),this.timelineOption.checkpointStyle.label.textStyle=this.getTextStyle(this.timelineOption.checkpointStyle.label.textStyle),this.myChart.canvasSupported||(this.timelineOption.realtime=!1),this.timelineOption.show&&$&&(this.clear(),this._buildShape(),this._syncHandleShape())},onbeforDispose:function(){clearTimeout(this.playTicket)}},F.prototype.iconLibrary.timelineControl=I,G.inherits(_,E),A("../component").define("timeline",_),_}),define("zrender/shape/Image",["require","./Base","../tool/util"],function(_){var $=_("./Base"),A=function(_){$.call(this,_)};return A.prototype={type:"image",brush:function(_,J,H){var C=this.style||{};J&&(C=this.getHighlightStyle(C,this.highlightStyle||{}));var B=C.image,D=this;if(this._imageCache||(this._imageCache={}),"string"==typeof B){var L=B;this._imageCache[L]?B=this._imageCache[L]:(B=new Image,B.onload=function(){B.onload=null,D.modSelf(),H()},B.src=L,this._imageCache[L]=B)}if(B){if("IMG"==B.nodeName.toUpperCase())if(window.ActiveXObject){if("complete"!=B.readyState)return}else if(!B.complete)return;var K=C.width||B.width,E=C.height||B.height,G=C.x,$=C.y;if(!B.width||!B.height)return;if(_.save(),this.doClip(_),this.setContext(_,C),this.setTransform(_),C.sWidth&&C.sHeight){var A=C.sx||0,F=C.sy||0;_.drawImage(B,A,F,C.sWidth,C.sHeight,G,$,K,E)}else if(C.sx&&C.sy){var A=C.sx,F=C.sy,M=K-A,I=E-F;_.drawImage(B,A,F,M,I,G,$,K,E)}else _.drawImage(B,G,$,K,E);C.width||(C.width=K),C.height||(C.height=E),this.style.width||(this.style.width=K),this.style.height||(this.style.height=E),this.drawText(_,C,this.style),_.restore()}},getRect:function($){return{x:$.x,y:$.y,width:$.width,height:$.height}},clearCache:function(){this._imageCache={}}},_("../tool/util").inherits(A,$),A}),define("zrender/loadingEffect/Bar",["require","./Base","../tool/util","../tool/color","../shape/Rectangle"],function(_){function $($){D.call(this,$)}var D=_("./Base"),B=_("../tool/util"),A=_("../tool/color"),C=_("../shape/Rectangle");return B.inherits($,D),$.prototype._start=function(_,$){var H=B.merge(this.options,{textStyle:{color:"#888"},backgroundColor:"rgba(250, 250, 250, 0.8)",effectOption:{x:0,y:this.canvasHeight/2-30,width:this.canvasWidth,height:5,brushType:"fill",timeInterval:100}}),E=this.createTextShape(H.textStyle),D=this.createBackgroundShape(H.backgroundColor),F=H.effectOption,G=new C({highlightStyle:B.clone(F)});return G.highlightStyle.color=F.color||A.getLinearGradient(F.x,F.y,F.x+F.width,F.y+F.height,[[0,"#ff6400"],[0.5,"#ffe100"],[1,"#b1ff00"]]),null!=H.progress?(_(D),G.highlightStyle.width=this.adjust(H.progress,[0,1])*H.effectOption.width,_(G),_(E),void $()):(G.highlightStyle.width=0,setInterval(function(){_(D),G.highlightStyle.widthK;K++){var I="random"==E.color?A.alpha(A.random(),0.3):E.color;F[K]=new C({highlightStyle:{x:Math.ceil(Math.random()*O),y:Math.ceil(Math.random()*J),r:Math.ceil(40*Math.random()),brushType:$,color:I,strokeColor:I,lineWidth:D},animationY:Math.ceil(20*Math.random())})}return setInterval(function(){_(M);for(var A=0;G>A;A++){var $=F[A].highlightStyle;$.y-F[A].animationY+$.r<=0&&(F[A].highlightStyle.y=J+$.r,F[A].highlightStyle.x=Math.ceil(Math.random()*O)),F[A].highlightStyle.y-=F[A].animationY,_(F[A])}_(N),L()},E.timeInterval)},$}),define("zrender/loadingEffect/DynamicLine",["require","./Base","../tool/util","../tool/color","../shape/Line"],function(_){function $($){D.call(this,$)}var D=_("./Base"),B=_("../tool/util"),A=_("../tool/color"),C=_("../shape/Line");return B.inherits($,D),$.prototype._start=function(E,N){for(var J=B.merge(this.options,{textStyle:{color:"#fff"},backgroundColor:"rgba(0, 0, 0, 0.8)",effectOption:{n:30,lineWidth:1,color:"random",timeInterval:100}}),P=this.createTextShape(J.textStyle),O=this.createBackgroundShape(J.backgroundColor),G=J.effectOption,I=G.n,D=G.lineWidth,F=[],H=this.canvasWidth,Q=this.canvasHeight,L=0;I>L;L++){var M=-Math.ceil(1000*Math.random()),K=Math.ceil(400*Math.random()),_=Math.ceil(Math.random()*Q),$="random"==G.color?A.random():G.color;F[L]=new C({highlightStyle:{xStart:M,yStart:_,xEnd:M+K,yEnd:_,strokeColor:$,lineWidth:D},animationX:Math.ceil(100*Math.random()),len:K})}return setInterval(function(){E(O);for(var _=0;I>_;_++){var $=F[_].highlightStyle;$.xStart>=H&&(F[_].len=Math.ceil(400*Math.random()),$.xStart=-400,$.xEnd=-400+F[_].len,$.yStart=Math.ceil(Math.random()*Q),$.yEnd=$.yStart),$.xStart+=F[_].animationX,$.xEnd+=F[_].animationX,E(F[_])}E(P),N()},G.timeInterval)},$}),define("zrender/loadingEffect/Ring",["require","./Base","../tool/util","../tool/color","../shape/Ring","../shape/Sector"],function(_){function $($){E.call(this,$)}var E=_("./Base"),C=_("../tool/util"),B=_("../tool/color"),D=_("../shape/Ring"),A=_("../shape/Sector");return C.inherits($,E),$.prototype._start=function(F,Q){var M=C.merge(this.options,{textStyle:{color:"#07a"},backgroundColor:"rgba(250, 250, 250, 0.8)",effect:{x:this.canvasWidth/2,y:this.canvasHeight/2,r0:60,r:100,color:"#bbdcff",brushType:"fill",textPosition:"inside",textFont:"normal 30px verdana",textColor:"rgba(30, 144, 255, 0.6)",timeInterval:100}}),R=M.effect,I=M.textStyle;null==I.x&&(I.x=R.x),null==I.y&&(I.y=R.y+(R.r0+R.r)/2-5);for(var L=this.createTextShape(M.textStyle),E=this.createBackgroundShape(M.backgroundColor),H=R.x,J=R.y,S=R.r0+6,O=R.r-6,P=R.color,N=B.lift(P,0.1),_=new D({highlightStyle:C.clone(R)}),$=[],U=B.getGradientColors(["#ff6400","#ffe100","#97ff00"],25),G=15,T=240,V=0;16>V;V++)$.push(new A({highlightStyle:{x:H,y:J,r0:S,r:O,startAngle:T-G,endAngle:T,brushType:"fill",color:N},_color:B.getLinearGradient(H+S*Math.cos(T,!0),J-S*Math.sin(T,!0),H+S*Math.cos(T-G,!0),J-S*Math.sin(T-G,!0),[[0,U[2*V]],[1,U[2*V+1]]])})),T-=G;T=360;for(V=0;4>V;V++)$.push(new A({highlightStyle:{x:H,y:J,r0:S,r:O,startAngle:T-G,endAngle:T,brushType:"fill",color:N},_color:B.getLinearGradient(H+S*Math.cos(T,!0),J-S*Math.sin(T,!0),H+S*Math.cos(T-G,!0),J-S*Math.sin(T-G,!0),[[0,U[2*V+32]],[1,U[2*V+33]]])})),T-=G;var K=0;if(null!=M.progress){F(E),K=100*this.adjust(M.progress,[0,1]).toFixed(2)/5,_.highlightStyle.text=5*K+"%",F(_);for(V=0;20>V;V++)$[V].highlightStyle.color=K>V?$[V]._color:N,F($[V]);return F(L),void Q()}return setInterval(function(){F(E),K+=K>=20?-20:1,F(_);for(var A=0;20>A;A++)$[A].highlightStyle.color=K>A?$[A]._color:N,F($[A]);F(L),Q()},R.timeInterval)},$}),define("zrender/loadingEffect/Spin",["require","./Base","../tool/util","../tool/color","../tool/area","../shape/Sector"],function(_){function $($){E.call(this,$)}var E=_("./Base"),C=_("../tool/util"),B=_("../tool/color"),D=_("../tool/area"),A=_("../shape/Sector");return C.inherits($,E),$.prototype._start=function(F,Q){var M=C.merge(this.options,{textStyle:{color:"#fff",textAlign:"start"},backgroundColor:"rgba(0, 0, 0, 0.8)"}),R=this.createTextShape(M.textStyle),I=10,L=D.getTextWidth(R.highlightStyle.text,R.highlightStyle.textFont),E=D.getTextHeight(R.highlightStyle.text,R.highlightStyle.textFont),H=C.merge(this.options.effect||{},{r0:9,r:15,n:18,color:"#fff",timeInterval:100}),J=this.getLocation(this.options.textStyle,L+I+2*H.r,Math.max(2*H.r,E));H.x=J.x+H.r,H.y=R.highlightStyle.y=J.y+J.height/2,R.highlightStyle.x=H.x+H.r+I;for(var S=this.createBackgroundShape(M.backgroundColor),O=H.n,P=H.x,N=H.y,_=H.r0,$=H.r,U=H.color,G=[],T=Math.round(180/O),V=0;O>V;V++)G[V]=new A({highlightStyle:{x:P,y:N,r0:_,r:$,startAngle:T*V*2,endAngle:T*V*2+T,color:B.alpha(U,(V+1)/O),brushType:"fill"}});var K=[0,P,N];return setInterval(function(){F(S),K[0]-=0.3;for(var $=0;O>$;$++)G[$].rotation=K,F(G[$]);F(R),Q()},H.timeInterval)},$}),define("zrender/loadingEffect/Whirling",["require","./Base","../tool/util","../tool/area","../shape/Ring","../shape/Droplet","../shape/Circle"],function(_){function $($){F.call(this,$)}var F=_("./Base"),D=_("../tool/util"),C=_("../tool/area"),E=_("../shape/Ring"),B=_("../shape/Droplet"),A=_("../shape/Circle");return D.inherits($,F),$.prototype._start=function(G,O){var L=D.merge(this.options,{textStyle:{color:"#888",textAlign:"start"},backgroundColor:"rgba(250, 250, 250, 0.8)"}),I=this.createTextShape(L.textStyle),K=10,F=C.getTextWidth(I.highlightStyle.text,I.highlightStyle.textFont),H=C.getTextHeight(I.highlightStyle.text,I.highlightStyle.textFont),J=D.merge(this.options.effect||{},{r:18,colorIn:"#fff",colorOut:"#555",colorWhirl:"#6cf",timeInterval:50}),Q=this.getLocation(this.options.textStyle,F+K+2*J.r,Math.max(2*J.r,H));J.x=Q.x+J.r,J.y=I.highlightStyle.y=Q.y+Q.height/2,I.highlightStyle.x=J.x+J.r+K;var N=this.createBackgroundShape(L.backgroundColor),P=new B({highlightStyle:{a:Math.round(J.r/2),b:Math.round(J.r-J.r/6),brushType:"fill",color:J.colorWhirl}}),M=new A({highlightStyle:{r:Math.round(J.r/6),brushType:"fill",color:J.colorIn}}),_=new E({highlightStyle:{r0:Math.round(J.r-J.r/3),r:J.r,brushType:"fill",color:J.colorOut}}),$=[0,J.x,J.y];return P.highlightStyle.x=M.highlightStyle.x=_.highlightStyle.x=$[1],P.highlightStyle.y=M.highlightStyle.y=_.highlightStyle.y=$[2],setInterval(function(){G(N),G(_),$[0]-=0.3,P.rotation=$,G(P),G(M),G(I),O()},J.timeInterval)},$}),define("echarts/theme/macarons",[],function(){var $={color:["#2ec7c9","#b6a2de","#5ab1ef","#ffb980","#d87a80","#8d98b3","#e5cf0d","#97b552","#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"],title:{textStyle:{fontWeight:"normal",color:"#008acd"}},dataRange:{itemWidth:15,color:["#5ab1ef","#e0ffff"]},toolbox:{color:["#1e90ff","#1e90ff","#1e90ff","#1e90ff"],effectiveColor:"#ff4500"},tooltip:{backgroundColor:"rgba(50,50,50,0.5)",axisPointer:{type:"line",lineStyle:{color:"#008acd"},crossStyle:{color:"#008acd"},shadowStyle:{color:"rgba(200,200,200,0.2)"}}},dataZoom:{dataBackgroundColor:"#efefff",fillerColor:"rgba(182,162,222,0.2)",handleColor:"#008acd"},grid:{borderColor:"#eee"},categoryAxis:{axisLine:{lineStyle:{color:"#008acd"}},splitLine:{lineStyle:{color:["#eee"]}}},valueAxis:{axisLine:{lineStyle:{color:"#008acd"}},splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.1)","rgba(200,200,200,0.1)"]}},splitLine:{lineStyle:{color:["#eee"]}}},polar:{axisLine:{lineStyle:{color:"#ddd"}},splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(200,200,200,0.2)"]}},splitLine:{lineStyle:{color:"#ddd"}}},timeline:{lineStyle:{color:"#008acd"},controlStyle:{normal:{color:"#008acd"},emphasis:{color:"#008acd"}},symbol:"emptyCircle",symbolSize:3},bar:{itemStyle:{normal:{barBorderRadius:5},emphasis:{barBorderRadius:5}}},line:{smooth:!0,symbol:"emptyCircle",symbolSize:3},k:{itemStyle:{normal:{color:"#d87a80",color0:"#2ec7c9",lineStyle:{color:"#d87a80",color0:"#2ec7c9"}}}},scatter:{symbol:"circle",symbolSize:4},radar:{symbol:"emptyCircle",symbolSize:3},map:{itemStyle:{normal:{areaStyle:{color:"#ddd"},label:{textStyle:{color:"#d87a80"}}},emphasis:{areaStyle:{color:"#fe994e"}}}},force:{itemStyle:{normal:{linkStyle:{color:"#1e90ff"}}}},chord:{itemStyle:{normal:{borderWidth:1,borderColor:"rgba(128, 128, 128, 0.5)",chordStyle:{lineStyle:{color:"rgba(128, 128, 128, 0.5)"}}},emphasis:{borderWidth:1,borderColor:"rgba(128, 128, 128, 0.5)",chordStyle:{lineStyle:{color:"rgba(128, 128, 128, 0.5)"}}}}},gauge:{axisLine:{lineStyle:{color:[[0.2,"#2ec7c9"],[0.8,"#5ab1ef"],[1,"#d87a80"]],width:10}},axisTick:{splitNumber:10,length:15,lineStyle:{color:"auto"}},splitLine:{length:22,lineStyle:{color:"auto"}},pointer:{width:5}},textStyle:{fontFamily:"\u5fae\u8f6f\u96c5\u9ed1, Arial, Verdana, sans-serif"}};return $}),define("echarts/theme/infographic",[],function(){var $={color:["#C1232B","#B5C334","#FCCE10","#E87C25","#27727B","#FE8463","#9BCA63","#FAD860","#F3A43B","#60C0DD","#D7504B","#C6E579","#F4E001","#F0805A","#26C0C0"],title:{textStyle:{fontWeight:"normal",color:"#27727B"}},dataRange:{x:"right",y:"center",itemWidth:5,itemHeight:25,color:["#C1232B","#FCCE10"]},toolbox:{color:["#C1232B","#B5C334","#FCCE10","#E87C25","#27727B","#FE8463","#9BCA63","#FAD860","#F3A43B","#60C0DD"],effectiveColor:"#ff4500"},tooltip:{backgroundColor:"rgba(50,50,50,0.5)",axisPointer:{type:"line",lineStyle:{color:"#27727B",type:"dashed"},crossStyle:{color:"#27727B"},shadowStyle:{color:"rgba(200,200,200,0.3)"}}},dataZoom:{dataBackgroundColor:"rgba(181,195,52,0.3)",fillerColor:"rgba(181,195,52,0.2)",handleColor:"#27727B"},grid:{borderWidth:0},categoryAxis:{axisLine:{lineStyle:{color:"#27727B"}},splitLine:{show:!1}},valueAxis:{axisLine:{show:!1},splitArea:{show:!1},splitLine:{lineStyle:{color:["#ccc"],type:"dashed"}}},polar:{axisLine:{lineStyle:{color:"#ddd"}},splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(200,200,200,0.2)"]}},splitLine:{lineStyle:{color:"#ddd"}}},timeline:{lineStyle:{color:"#27727B"},controlStyle:{normal:{color:"#27727B"},emphasis:{color:"#27727B"}},symbol:"emptyCircle",symbolSize:3},line:{itemStyle:{normal:{borderWidth:2,borderColor:"#fff",lineStyle:{width:3}},emphasis:{borderWidth:0}},symbol:"circle",symbolSize:3.5},k:{itemStyle:{normal:{color:"#C1232B",color0:"#B5C334",lineStyle:{width:1,color:"#C1232B",color0:"#B5C334"}}}},scatter:{itemStyle:{normal:{borderWidth:1,borderColor:"rgba(200,200,200,0.5)"},emphasis:{borderWidth:0}},symbol:"star4",symbolSize:4},radar:{symbol:"emptyCircle",symbolSize:3},map:{itemStyle:{normal:{areaStyle:{color:"#ddd"},label:{textStyle:{color:"#C1232B"}}},emphasis:{areaStyle:{color:"#fe994e"},label:{textStyle:{color:"rgb(100,0,0)"}}}}},force:{itemStyle:{normal:{linkStyle:{color:"#27727B"}}}},chord:{itemStyle:{normal:{borderWidth:1,borderColor:"rgba(128, 128, 128, 0.5)",chordStyle:{lineStyle:{color:"rgba(128, 128, 128, 0.5)"}}},emphasis:{borderWidth:1,borderColor:"rgba(128, 128, 128, 0.5)",chordStyle:{lineStyle:{color:"rgba(128, 128, 128, 0.5)"}}}}},gauge:{center:["50%","80%"],radius:"100%",startAngle:180,endAngle:0,axisLine:{show:!0,lineStyle:{color:[[0.2,"#B5C334"],[0.8,"#27727B"],[1,"#C1232B"]],width:"40%"}},axisTick:{splitNumber:2,length:5,lineStyle:{color:"#fff"}},axisLabel:{textStyle:{color:"#fff",fontWeight:"bolder"}},splitLine:{length:"5%",lineStyle:{color:"#fff"}},pointer:{width:"40%",length:"80%",color:"#fff"},title:{offsetCenter:[0,-20],textStyle:{color:"auto",fontSize:20}},detail:{offsetCenter:[0,0],textStyle:{color:"auto",fontSize:40}}},textStyle:{fontFamily:"\u5fae\u8f6f\u96c5\u9ed1, Arial, Verdana, sans-serif"}};return $}),define("zrender/dep/excanvas",["require"],function(){return document.createElement("canvas").getContext?G_vmlCanvasManager=!1:!function(){function c(){return this.context_||(this.context_=new d(this))}function q(_,$){var A=I.call(arguments,2);return function(){return _.apply($,A.concat(I.call(arguments)))}}function m($){return String($).replace(/&/g,"&").replace(/"/g,""")}function g(_,$,A){_.namespaces[$]||_.namespaces.add($,A,"#default#VML")}function f(_){if(g(_,"g_vml_","urn:schemas-microsoft-com:vml"),g(_,"g_o_","urn:schemas-microsoft-com:office:office"),!_.styleSheets.ex_canvas_){var $=_.createStyleSheet();$.owningElement.id="ex_canvas_",$.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}function h(_){var $=_.srcElement;switch(_.propertyName){case"width":$.getContext().clearRect(),$.style.width=$.attributes.width.nodeValue+"px",$.firstChild.style.width=$.clientWidth+"px";break;case"height":$.getContext().clearRect(),$.style.height=$.attributes.height.nodeValue+"px",$.firstChild.style.height=$.clientHeight+"px"}}function s(_){var $=_.srcElement;$.firstChild&&($.firstChild.style.width=$.clientWidth+"px",$.firstChild.style.height=$.clientHeight+"px")}function r(){return[[1,0,0],[0,1,0],[0,0,1]]}function i(_,$){for(var E=r(),C=0;3>C;C++)for(var B=0;3>B;B++){for(var D=0,A=0;3>A;A++)D+=_[C][A]*$[A][B];E[C][B]=D}return E}function l(_,$){$.fillStyle=_.fillStyle,$.lineCap=_.lineCap,$.lineJoin=_.lineJoin,$.lineWidth=_.lineWidth,$.miterLimit=_.miterLimit,$.shadowBlur=_.shadowBlur,$.shadowColor=_.shadowColor,$.shadowOffsetX=_.shadowOffsetX,$.shadowOffsetY=_.shadowOffsetY,$.strokeStyle=_.strokeStyle,$.globalAlpha=_.globalAlpha,$.font=_.font,$.textAlign=_.textAlign,$.textBaseline=_.textBaseline,$.scaleX_=_.scaleX_,$.scaleY_=_.scaleY_,$.lineScale_=_.lineScale_}function b(_){var $=_.indexOf("(",3),B=_.indexOf(")",$+1),A=_.substring($+1,B).split(",");return(4!=A.length||"a"!=_.charAt(3))&&(A[3]=1),A}function e($){return parseFloat($)/100}function j(_,$,A){return Math.min(A,Math.max($,_))}function u(A){var _,H,E,D,F,C;if(D=parseFloat(A[0])/360%360,0>D&&D++,F=j(e(A[1]),0,1),C=j(e(A[2]),0,1),0==F)_=H=E=C;else{var B=0.5>C?C*(1+F):C+F-C*F,G=2*C-B;_=p(G,B,D+1/3),H=p(G,B,D),E=p(G,B,D-1/3)}return"#"+$[Math.floor(255*_)]+$[Math.floor(255*H)]+$[Math.floor(255*E)]}function p(_,$,A){return 0>A&&A++,A>1&&A--,1>6*A?_+6*($-_)*A:1>2*A?$:2>3*A?_+($-_)*(2/3-A)*6:_}function Q(A){if(A in U)return U[A];var _,E=1;if(A=String(A),"#"==A.charAt(0))_=A;else if(/^rgb/.test(A)){for(var C,B=b(A),_="#",D=0;3>D;D++)C=-1!=B[D].indexOf("%")?Math.floor(255*e(B[D])):+B[D],_+=$[j(C,0,255)];E=+B[3]}else if(/^hsl/.test(A)){B=b(A);_=u(B),E=B[3]}else _=J[A]||A;return U[A]={color:_,alpha:E}}function N(_){if(W[_])return W[_];var $,D=document.createElement("div"),C=D.style;try{C.font=_,$=C.fontFamily.split(",")[0]}catch(A){}return W[_]={style:C.fontStyle||B.style,variant:C.fontVariant||B.variant,weight:C.fontWeight||B.weight,size:C.fontSize||B.size,family:$||B.family}}function a(_,$){var D={};for(var B in _)D[B]=_[B];var A=parseFloat($.currentStyle.fontSize),C=parseFloat(_.size);return D.size="number"==typeof _.size?_.size:-1!=_.size.indexOf("px")?C:-1!=_.size.indexOf("em")?A*C:-1!=_.size.indexOf("%")?A/100*C:-1!=_.size.indexOf("pt")?C/0.75:A,D}function Z($){return $.style+" "+$.variant+" "+$.weight+" "+$.size+"px '"+$.family+"'"}function w($){return Y[$]||"square"}function d(_){this.m_=r(),this.mStack_=[],this.aStack_=[],this.currentPath_=[],this.strokeStyle="#000",this.fillStyle="#000",this.lineWidth=1,this.lineJoin="miter",this.lineCap="butt",this.miterLimit=1*A,this.globalAlpha=1,this.font="12px \u5fae\u8f6f\u96c5\u9ed1",this.textAlign="left",this.textBaseline="alphabetic",this.canvas=_;var $="width:"+_.clientWidth+"px;height:"+_.clientHeight+"px;overflow:hidden;position:absolute",C=_.ownerDocument.createElement("div");C.style.cssText=$,_.appendChild(C);var B=C.cloneNode(!1);B.style.backgroundColor="#fff",B.style.filter="alpha(opacity=0)",_.appendChild(B),this.element_=C,this.scaleX_=1,this.scaleY_=1,this.lineScale_=1}function V(_,$,B,A){_.currentPath_.push({type:"bezierCurveTo",cp1x:$.x,cp1y:$.y,cp2x:B.x,cp2y:B.y,x:A.x,y:A.y}),_.currentX_=A.x,_.currentY_=A.y}function x(_,$){var D=Q(_.strokeStyle),B=D.color,A=D.alpha*_.globalAlpha,C=_.lineScale_*_.lineWidth;1>C&&(A*=C),$.push("")}function k(S,g,d,W){var V=S.fillStyle,Y=S.scaleX_,i=S.scaleY_,h=W.x-d.x,Z=W.y-d.y;if(V instanceof P){var c=0,R={x:0,y:0},U=0,a=1;if("gradient"==V.type_){var j=V.x0_/Y,f=V.y0_/i,I=V.x1_/Y,O=V.y1_/i,N=o(S,j,f),l=o(S,I,O),T=l.x-N.x,M=l.y-N.y;c=180*Math.atan2(T,M)/Math.PI,0>c&&(c+=360),0.000001>c&&(c=0)}else{N=o(S,V.x0_,V.y0_);R={x:(N.x-d.x)/h,y:(N.y-d.y)/Z},h/=Y*A,Z/=i*A;var m=E.max(h,Z);U=2*V.r0_/m,a=2*V.r1_/m-U}var b=V.colors_;b.sort(function(_,$){return _.offset-$.offset});for(var B=b.length,e=b[0].color,F=b[B-1].color,L=b[0].alpha*S.globalAlpha,H=b[B-1].alpha*S.globalAlpha,J=[],$=0;B>$;$++){var k=b[$];J.push(k.offset*a+U+" "+k.color)}g.push("")}else if(V instanceof X){if(h&&Z){var _=-d.x,C=-d.y;g.push("")}}else{var G=Q(S.fillStyle),D=G.color,K=G.alpha*S.globalAlpha;g.push("")}}function o(_,$,C){var B=_.m_;return{x:A*($*B[0][0]+C*B[1][0]+B[2][0])-L,y:A*($*B[0][1]+C*B[1][1]+B[2][1])-L}}function F($){return isFinite($[0][0])&&isFinite($[0][1])&&isFinite($[1][0])&&isFinite($[1][1])&&isFinite($[2][0])&&isFinite($[2][1])}function n(_,$,B){if(F($)&&(_.m_=$,_.scaleX_=Math.sqrt($[0][0]*$[0][0]+$[0][1]*$[0][1]),_.scaleY_=Math.sqrt($[1][0]*$[1][0]+$[1][1]*$[1][1]),B)){var A=$[0][0]*$[1][1]-$[0][1]*$[1][0];_.lineScale_=G(C(A))}}function P($){this.type_=$,this.x0_=0,this.y0_=0,this.r0_=0,this.x1_=0,this.y1_=0,this.r1_=0,this.colors_=[]}function X(_,$){switch(T(_),$){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=$;break;default:K("SYNTAX_ERR")}this.src_=_.src,this.width_=_.width,this.height_=_.height}function K($){throw new M($)}function T($){$&&1==$.nodeType&&"IMG"==$.tagName||K("TYPE_MISMATCH_ERR"),"complete"!=$.readyState&&K("INVALID_STATE_ERR")}function M($){this.code=this[$],this.message=$+": DOM Exception "+this.code}var E=Math,O=E.round,_=E.sin,v=E.cos,C=E.abs,G=E.sqrt,A=10,L=A/2,I=(+navigator.userAgent.match(/MSIE ([\d.]+)?/)[1],Array.prototype.slice);f(document);var S={init:function($){var _=$||document;_.createElement("canvas"),_.attachEvent("onreadystatechange",q(this.init_,this,_))},init_:function(_){for(var $=_.getElementsByTagName("canvas"),A=0;A<$.length;A++)this.initElement($[A])},initElement:function($){if(!$.getContext){$.getContext=c,f($.ownerDocument),$.innerHTML="",$.attachEvent("onpropertychange",h),$.attachEvent("onresize",s);var _=$.attributes;_.width&&_.width.specified?$.style.width=_.width.nodeValue+"px":$.width=$.clientWidth,_.height&&_.height.specified?$.style.height=_.height.nodeValue+"px":$.height=$.clientHeight}return $}};S.init();for(var $=[],H=0;16>H;H++)for(var D=0;16>D;D++)$[16*H+D]=H.toString(16)+D.toString(16);var J={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"},U={},B={style:"normal",variant:"normal",weight:"normal",size:12,family:"\u5fae\u8f6f\u96c5\u9ed1"},W={},Y={butt:"flat",round:"round"},R=d.prototype;R.clearRect=function(){this.textMeasureEl_&&(this.textMeasureEl_.removeNode(!0),this.textMeasureEl_=null),this.element_.innerHTML=""},R.beginPath=function(){this.currentPath_=[]},R.moveTo=function(_,$){var A=o(this,_,$);this.currentPath_.push({type:"moveTo",x:A.x,y:A.y}),this.currentX_=A.x,this.currentY_=A.y},R.lineTo=function(_,$){var A=o(this,_,$);this.currentPath_.push({type:"lineTo",x:A.x,y:A.y}),this.currentX_=A.x,this.currentY_=A.y},R.bezierCurveTo=function(_,$,G,D,C,E){var B=o(this,C,E),A=o(this,_,$),F=o(this,G,D);V(this,A,F,B)},R.quadraticCurveTo=function(_,$,F,D){var C=o(this,_,$),E=o(this,F,D),B={x:this.currentX_+2/3*(C.x-this.currentX_),y:this.currentY_+2/3*(C.y-this.currentY_)},A={x:B.x+(E.x-this.currentX_)/3,y:B.y+(E.y-this.currentY_)/3};V(this,B,A,E)},R.arc=function(B,K,J,E,D,F){J*=A;var N=F?"at":"wa",M=B+v(E)*J-L,G=K+_(E)*J-L,I=B+v(D)*J-L,$=K+_(D)*J-L;M!=I||F||(M+=0.125);var C=o(this,B,K),H=o(this,M,G),O=o(this,I,$);this.currentPath_.push({type:N,x:C.x,y:C.y,radius:J,xStart:H.x,yStart:H.y,xEnd:O.x,yEnd:O.y})},R.rect=function(_,$,B,A){this.moveTo(_,$),this.lineTo(_+B,$),this.lineTo(_+B,$+A),this.lineTo(_,$+A),this.closePath()},R.strokeRect=function(_,$,C,B){var A=this.currentPath_;this.beginPath(),this.moveTo(_,$),this.lineTo(_+C,$),this.lineTo(_+C,$+B),this.lineTo(_,$+B),this.closePath(),this.stroke(),this.currentPath_=A},R.fillRect=function(_,$,C,B){var A=this.currentPath_;this.beginPath(),this.moveTo(_,$),this.lineTo(_+C,$),this.lineTo(_+C,$+B),this.lineTo(_,$+B),this.closePath(),this.fill(),this.currentPath_=A},R.createLinearGradient=function(_,$,C,B){var A=new P("gradient");return A.x0_=_,A.y0_=$,A.x1_=C,A.y1_=B,A},R.createRadialGradient=function(_,$,E,C,B,D){var A=new P("gradientradial");return A.x0_=_,A.y0_=$,A.r0_=E,A.x1_=C,A.y1_=B,A.r1_=D,A},R.drawImage=function(C){var S,N,H,G,I,U,T,J,M=C.runtimeStyle.width,B=C.runtimeStyle.height;C.runtimeStyle.width="auto",C.runtimeStyle.height="auto";var F=C.width,K=C.height;if(C.runtimeStyle.width=M,C.runtimeStyle.height=B,3==arguments.length)S=arguments[1],N=arguments[2],I=U=0,T=H=F,J=G=K;else if(5==arguments.length)S=arguments[1],N=arguments[2],H=arguments[3],G=arguments[4],I=U=0,T=F,J=K;else{if(9!=arguments.length)throw Error("Invalid number of arguments");I=arguments[1],U=arguments[2],T=arguments[3],J=arguments[4],S=arguments[5],N=arguments[6],H=arguments[7],G=arguments[8]}var V=o(this,S,N),Q=[],R=10,P=10,_=X=1;if(Q.push(" "),(I||U)&&Q.push("
"),Q.push("
"),(I||U)&&Q.push("
"),Q.push("
"),this.element_.insertAdjacentHTML("BeforeEnd",Q.join(""))},R.stroke=function(_){var $=[],H=10,E=10;$.push("F.x)&&(F.x=G.x),(null==D.y||G.yF.y)&&(F.y=G.y))}$.push(" \">"),_?k(this,$,D,F):x(this,$),$.push(""),this.element_.insertAdjacentHTML("beforeEnd",$.join(""))},R.fill=function(){this.stroke(!0)},R.closePath=function(){this.currentPath_.push({type:"close"})},R.save=function(){var $={};l(this,$),this.aStack_.push($),this.mStack_.push(this.m_),this.m_=i(r(),this.m_)},R.restore=function(){this.aStack_.length&&(l(this.aStack_.pop(),this),this.m_=this.mStack_.pop())},R.translate=function(_,$){var A=[[1,0,0],[0,1,0],[_,$,1]];n(this,i(A,this.m_),!1)},R.rotate=function(A){var $=v(A),C=_(A),B=[[$,C,0],[-C,$,0],[0,0,1]];n(this,i(B,this.m_),!1)},R.scale=function(_,$){var A=[[_,0,0],[0,$,0],[0,0,1]];n(this,i(A,this.m_),!0)},R.transform=function(_,$,E,C,B,D){var A=[[_,$,0],[E,C,0],[B,D,1]];n(this,i(A,this.m_),!0)},R.setTransform=function(_,$,E,C,B,D){var A=[[_,$,0],[E,C,0],[B,D,1]];n(this,A,!0)},R.drawText_=function(_,L,E,D,F){var P=this.m_,M=1000,G=0,I=M,$={x:0,y:0},C=[],H=a(N(this.font),this.element_),Q=Z(H),J=this.element_.currentStyle,K=this.textAlign.toLowerCase();switch(K){case"left":case"center":case"right":break;case"end":K="ltr"==J.direction?"right":"left";break;case"start":K="rtl"==J.direction?"right":"left";break;default:K="left"}switch(this.textBaseline){case"hanging":case"top":$.y=H.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":$.y=-H.size/2.25}switch(K){case"right":G=M,I=0.05;break;case"center":G=I=M/2}var S=o(this,L+$.x,E+$.y);C.push(""),F?x(this,C):k(this,C,{x:-G,y:0},{x:I,y:H.size});var B=P[0][0].toFixed(3)+","+P[1][0].toFixed(3)+","+P[0][1].toFixed(3)+","+P[1][1].toFixed(3)+",0,0",R=O(S.x/A)+","+O(S.y/A);C.push("","",""),this.element_.insertAdjacentHTML("beforeEnd",C.join(""))},R.fillText=function(_,$,B,A){this.drawText_(_,$,B,A,!1)},R.strokeText=function(_,$,B,A){this.drawText_(_,$,B,A,!0)},R.measureText=function(_){if(!this.textMeasureEl_){var $="";this.element_.insertAdjacentHTML("beforeEnd",$),this.textMeasureEl_=this.element_.lastChild}var B=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";try{this.textMeasureEl_.style.font=this.font}catch(A){}return this.textMeasureEl_.appendChild(B.createTextNode(_)),{width:this.textMeasureEl_.offsetWidth}},R.clip=function(){},R.arcTo=function(){},R.createPattern=function(_,$){return new X(_,$)},P.prototype.addColorStop=function(_,$){$=Q($),this.colors_.push({offset:_,color:$.color,alpha:$.alpha})};var t=M.prototype=new Error;t.INDEX_SIZE_ERR=1,t.DOMSTRING_SIZE_ERR=2,t.HIERARCHY_REQUEST_ERR=3,t.WRONG_DOCUMENT_ERR=4,t.INVALID_CHARACTER_ERR=5,t.NO_DATA_ALLOWED_ERR=6,t.NO_MODIFICATION_ALLOWED_ERR=7,t.NOT_FOUND_ERR=8,t.NOT_SUPPORTED_ERR=9,t.INUSE_ATTRIBUTE_ERR=10,t.INVALID_STATE_ERR=11,t.SYNTAX_ERR=12,t.INVALID_MODIFICATION_ERR=13,t.NAMESPACE_ERR=14,t.INVALID_ACCESS_ERR=15,t.VALIDATION_ERR=16,t.TYPE_MISMATCH_ERR=17,G_vmlCanvasManager=S,CanvasRenderingContext2D=d,CanvasGradient=P,CanvasPattern=X,DOMException=M}(),G_vmlCanvasManager}),define("zrender/mixin/Eventful",["require"],function(){var $=function(){this._handlers={}};return $.prototype.one=function(_,$,B){var A=this._handlers;return $&&_?(A[_]||(A[_]=[]),A[_].push({h:$,one:!0,ctx:B||this}),this):this},$.prototype.bind=function(_,$,B){var A=this._handlers;return $&&_?(A[_]||(A[_]=[]),A[_].push({h:$,one:!1,ctx:B||this}),this):this},$.prototype.unbind=function(_,$){var D=this._handlers;if(!_)return this._handlers={},this;if($){if(D[_]){for(var B=[],A=0,C=D[_].length;C>A;A++)D[_][A].h!=$&&B.push(D[_][A]);D[_]=B}D[_]&&0===D[_].length&&delete D[_]}else delete D[_];return this},$.prototype.dispatch=function(_){if(this._handlers[_]){var $=arguments,D=$.length;D>3&&($=Array.prototype.slice.call($,1));for(var B=this._handlers[_],A=B.length,C=0;A>C;){switch(D){case 1:B[C].h.call(B[C].ctx);break;case 2:B[C].h.call(B[C].ctx,$[1]);break;case 3:B[C].h.call(B[C].ctx,$[1],$[2]);break;default:B[C].h.apply(B[C].ctx,$)}B[C].one?(B.splice(C,1),A--):C++}}return this},$.prototype.dispatchWithContext=function(_){if(this._handlers[_]){var $=arguments,E=$.length;E>4&&($=Array.prototype.slice.call($,1,$.length-1));for(var C=$[$.length-1],B=this._handlers[_],D=B.length,A=0;D>A;){switch(E){case 1:B[A].h.call(C);break;case 2:B[A].h.call(C,$[1]);break;case 3:B[A].h.call(C,$[1],$[2]);break;default:B[A].h.apply(C,$)}B[A].one?(B.splice(A,1),D--):A++}}return this},$}),define("zrender/tool/log",["require","../config"],function(_){var $=_("../config");return function(){if(0!==$.debugMode)if(1==$.debugMode){for(var _ in arguments)throw new Error(arguments[_])}else if($.debugMode>1)for(_ in arguments)console.log(arguments[_])}}),define("zrender/tool/guid",[],function(){var $=2311;return function(){return"zrender__"+$++}}),define("zrender/Handler",["require","./config","./tool/env","./tool/event","./tool/util","./tool/vector","./tool/matrix","./mixin/Eventful"],function(A){"use strict";function L(_,$){return function(B,A){return _.call($,B,A)}}function I(_,$){return function(C,B,A){return _.call($,C,B,A)}}function D($){for(var A=P.length;A--;){var _=P[A];$["_"+_+"Handler"]=L(M[_],$)}}function C(_,$,C){if(this._draggingTarget&&this._draggingTarget.id==_.id||_.isSilent())return!1;var B=this._event;if(_.isCover($,C)){_.hoverable&&this.storage.addHover(_);for(var A=_.parent;A;){if(A.clipShape&&!A.clipShape.isCover(this._mouseX,this._mouseY))return!1;A=A.parent}return this._lastHover!=_&&(this._processOutShape(B),this._processDragLeave(B),this._lastHover=_,this._processDragEnter(B)),this._processOverShape(B),this._processDragOver(B),this._hasfound=1,!0}return!1}var E=A("./config"),O=A("./tool/env"),N=A("./tool/event"),F=A("./tool/util"),H=A("./tool/vector"),_=A("./tool/matrix"),B=E.EVENT,G=A("./mixin/Eventful"),P=["resize","click","dblclick","mousewheel","mousemove","mouseout","mouseup","mousedown","touchstart","touchend","touchmove"],K=function(_){if(window.G_vmlCanvasManager)return!0;_=_||window.event;var $=_.toElement||_.relatedTarget||_.srcElement||_.target;return $&&$.className.match(E.elementClassName)},M={resize:function($){$=$||window.event,this._lastHover=null,this._isMouseDown=0,this.dispatch(B.RESIZE,$)},click:function(_,$){if(K(_)||$){_=this._zrenderEventFixed(_);var A=this._lastHover;(A&&A.clickable||!A)&&this._clickThreshold<5&&this._dispatchAgency(A,B.CLICK,_),this._mousemoveHandler(_)}},dblclick:function(_,$){if(K(_)||$){_=_||window.event,_=this._zrenderEventFixed(_);var A=this._lastHover;(A&&A.clickable||!A)&&this._clickThreshold<5&&this._dispatchAgency(A,B.DBLCLICK,_),this._mousemoveHandler(_)}},mousewheel:function(_,$){if(K(_)||$){_=this._zrenderEventFixed(_);var F=_.wheelDelta||-_.detail,D=F>0?1.1:1/1.1,C=!1,E=this._mouseX,A=this._mouseY;this.painter.eachBuildinLayer(function($){var F=$.position;if($.zoomable){$.__zoom=$.__zoom||1;var B=$.__zoom;B*=D,B=Math.max(Math.min($.maxZoom,B),$.minZoom),D=B/$.__zoom,$.__zoom=B,F[0]-=(E-F[0])*(D-1),F[1]-=(A-F[1])*(D-1),$.scale[0]*=D,$.scale[1]*=D,$.dirty=!0,C=!0,N.stop(_)}}),C&&this.painter.refresh(),this._dispatchAgency(this._lastHover,B.MOUSEWHEEL,_),this._mousemoveHandler(_)}},mousemove:function(_,$){if((K(_)||$)&&!this.painter.isLoading()){_=this._zrenderEventFixed(_),this._lastX=this._mouseX,this._lastY=this._mouseY,this._mouseX=N.getX(_),this._mouseY=N.getY(_);var E=this._mouseX-this._lastX,C=this._mouseY-this._lastY;this._processDragStart(_),this._hasfound=0,this._event=_,this._iterateAndFindHover(),this._hasfound||((!this._draggingTarget||this._lastHover&&this._lastHover!=this._draggingTarget)&&(this._processOutShape(_),this._processDragLeave(_)),this._lastHover=null,this.storage.delHover(),this.painter.clearHover());var A="default";if(this._draggingTarget)this.storage.drift(this._draggingTarget.id,E,C),this._draggingTarget.modSelf(),this.storage.addHover(this._draggingTarget),this._clickThreshold++;else if(this._isMouseDown){var D=!1;this.painter.eachBuildinLayer(function($){$.panable&&(A="move",$.position[0]+=E,$.position[1]+=C,D=!0,$.dirty=!0)}),D&&this.painter.refresh()}this._draggingTarget||this._hasfound&&this._lastHover.draggable?A="move":this._hasfound&&this._lastHover.clickable&&(A="pointer"),this.root.style.cursor=A,this._dispatchAgency(this._lastHover,B.MOUSEMOVE,_),(this._draggingTarget||this._hasfound||this.storage.hasHoverShape())&&this.painter.refreshHover()}},mouseout:function(_,$){if(K(_)||$){_=this._zrenderEventFixed(_);var A=_.toElement||_.relatedTarget;if(A!=this.root)for(;A&&9!=A.nodeType;){if(A==this.root)return void this._mousemoveHandler(_);A=A.parentNode}_.zrenderX=this._lastX,_.zrenderY=this._lastY,this.root.style.cursor="default",this._isMouseDown=0,this._processOutShape(_),this._processDrop(_),this._processDragEnd(_),this.painter.isLoading()||this.painter.refreshHover(),this.dispatch(B.GLOBALOUT,_)}},mousedown:function(_,$){if(K(_)||$){if(this._clickThreshold=0,2==this._lastDownButton)return this._lastDownButton=_.button,void(this._mouseDownTarget=null);this._lastMouseDownMoment=new Date,_=this._zrenderEventFixed(_),this._isMouseDown=1,this._mouseDownTarget=this._lastHover,this._dispatchAgency(this._lastHover,B.MOUSEDOWN,_),this._lastDownButton=_.button}},mouseup:function(_,$){(K(_)||$)&&(_=this._zrenderEventFixed(_),this.root.style.cursor="default",this._isMouseDown=0,this._mouseDownTarget=null,this._dispatchAgency(this._lastHover,B.MOUSEUP,_),this._processDrop(_),this._processDragEnd(_))},touchstart:function(_,$){(K(_)||$)&&(_=this._zrenderEventFixed(_,!0),this._lastTouchMoment=new Date,this._mobileFindFixed(_),this._mousedownHandler(_))},touchmove:function(_,$){(K(_)||$)&&(_=this._zrenderEventFixed(_,!0),this._mousemoveHandler(_),this._isDragging&&N.stop(_))},touchend:function(_,$){if(K(_)||$){_=this._zrenderEventFixed(_,!0),this._mouseupHandler(_);var A=new Date;A-this._lastTouchMoment=0;E--){var B=D[E];if(A!==B.zlevel&&(F=this.painter.getLayer(B.zlevel,F),C[0]=this._mouseX,C[1]=this._mouseY,F.needTransform&&(_.invert($,F.transform),H.applyTransform(C,C,$))),this._findHover(B,C[0],C[1]))break}}}();var $=[{x:10},{x:-20},{x:10,y:10},{y:-20}];return J.prototype._mobileFindFixed=function(A){this._lastHover=null,this._mouseX=A.zrenderX,this._mouseY=A.zrenderY,this._event=A,this._iterateAndFindHover();for(var _=0;!this._lastHover&&_<$.length;_++){var B=$[_];B.x&&(this._mouseX+=B.x),B.y&&(this._mouseY+=B.y),this._iterateAndFindHover()}this._lastHover&&(A.zrenderX=this._mouseX,A.zrenderY=this._mouseY)},J.prototype._zrenderEventFixed=function(_,$){if(_.zrenderFixed)return _;if($){var C="touchend"!=_.type?_.targetTouches[0]:_.changedTouches[0];if(C){var B=this.painter._domRoot.getBoundingClientRect();_.zrenderX=C.clientX-B.left,_.zrenderY=C.clientY-B.top}}else{_=_||window.event;var A=_.toElement||_.relatedTarget||_.srcElement||_.target;A&&A!=this._domHover&&(_.zrenderX=("undefined"!=typeof _.offsetX?_.offsetX:_.layerX)+A.offsetLeft,_.zrenderY=("undefined"!=typeof _.offsetY?_.offsetY:_.layerY)+A.offsetTop)}return _.zrenderFixed=1,_},F.merge(J.prototype,G.prototype,!0),J}),define("zrender/Painter",["require","./config","./tool/util","./tool/log","./loadingEffect/Base","./Layer","./shape/Image"],function(_){"use strict";function $(){return!1}function H(){}function D($){return $?$.isBuildin?!0:"function"!=typeof $.resize||"function"!=typeof $.refresh?!1:!0:!1}var C=_("./config"),E=_("./tool/util"),B=_("./tool/log"),A=_("./loadingEffect/Base"),F=_("./Layer"),G=function(_,E){this.root=_,_.style["-webkit-tap-highlight-color"]="transparent",_.style["-webkit-user-select"]="none",_.style["user-select"]="none",_.style["-webkit-touch-callout"]="none",this.storage=E,_.innerHTML="",this._width=this._getWidth(),this._height=this._getHeight();var B=document.createElement("div");this._domRoot=B,B.style.position="relative",B.style.overflow="hidden",B.style.width=this._width+"px",B.style.height=this._height+"px",_.appendChild(B),this._layers={},this._zlevelList=[],this._layerConfig={},this._loadingEffect=new A({}),this.shapeToImage=this._createShapeToImageProcessor(),this._bgDom=document.createElement("div"),this._bgDom.style.cssText=["position:absolute;left:0px;top:0px;width:",this._width,"px;height:",this._height+"px;","-webkit-user-select:none;user-select;none;","-webkit-touch-callout:none;"].join(""),this._bgDom.setAttribute("data-zr-dom-id","bg"),this._bgDom.className=C.elementClassName,B.appendChild(this._bgDom),this._bgDom.onselectstart=$;var D=new F("_zrender_hover_",this);this._layers.hover=D,B.appendChild(D.dom),D.initContext(),D.dom.onselectstart=$,D.dom.style["-webkit-user-select"]="none",D.dom.style["user-select"]="none",D.dom.style["-webkit-touch-callout"]="none",this.refreshNextFrame=null};return G.prototype.render=function($){return this.isLoading()&&this.hideLoading(),this.refresh($,!0),this},G.prototype.refresh=function(_,$){var D=this.storage.getShapeList(!0);this._paintList(D,$);for(var B=0;BD;D++){var H=A[D];if(E!==H.zlevel&&(I&&(I.needTransform&&F.restore(),F.flush&&F.flush()),E=H.zlevel,I=this.getLayer(E),I.isBuildin||B("ZLevel "+E+" has been used by unkown layer "+I.id),F=I.ctx,I.unusedCount=0,(I.dirty||_)&&I.clear(),I.needTransform&&(F.save(),I.setTransform(F))),(I.dirty||_)&&!H.invisible&&(!H.onbrush||H.onbrush&&!H.onbrush(F,!1)))if(C.catchBrushException){try{H.brush(F,!1,this.refreshNextFrame)}catch($){B($,"brush error of "+H.type,H)}}else H.brush(F,!1,this.refreshNextFrame);H.__dirty=!1}I&&(I.needTransform&&F.restore(),F.flush&&F.flush()),this.eachBuildinLayer(this._postProcessLayer)},G.prototype.getLayer=function(_){var $=this._layers[_];return $||($=new F(_,this),$.isBuildin=!0,this._layerConfig[_]&&E.merge($,this._layerConfig[_],!0),$.updateTransform(),this.insertLayer(_,$),$.initContext()),$},G.prototype.insertLayer=function(_,$){if(this._layers[_])return void B("ZLevel "+_+" has been used already");if(!D($))return void B("Layer of zlevel "+_+" is not valid");var F=this._zlevelList.length,C=null,E=-1;if(F>0&&_>this._zlevelList[0]){for(E=0;F-1>E&&!(this._zlevelList[E]<_&&this._zlevelList[E+1]>_);E++);C=this._layers[this._zlevelList[E]]}this._zlevelList.splice(E+1,0,_);var A=C?C.dom:this._bgDom;A.nextSibling?A.parentNode.insertBefore($.dom,A.nextSibling):A.parentNode.appendChild($.dom),this._layers[_]=$},G.prototype.eachLayer=function(_,$){for(var B=0;BD;D++){var E=_[D],B=E.zlevel,A=$[B];if(A){if(A.elCount++,A.dirty)continue;A.dirty=E.__dirty}}this.eachBuildinLayer(function(_,$){F[$]!==_.elCount&&(_.dirty=!0)})},G.prototype.refreshShapes=function(_,$){for(var C=0,B=_.length;B>C;C++){var A=_[C];A.modSelf()}return this.refresh($),this},G.prototype.setLoadingEffect=function($){return this._loadingEffect=$,this},G.prototype.clear=function(){return this.eachBuildinLayer(this._clearLayer),this},G.prototype._clearLayer=function($){$.clear()},G.prototype.modLayer=function(_,$){if($){this._layerConfig[_]?E.merge(this._layerConfig[_],$,!0):this._layerConfig[_]=$;var A=this._layers[_];A&&E.merge(A,this._layerConfig[_],!0)}},G.prototype.delLayer=function(_){var $=this._layers[_];$&&(this.modLayer(_,{position:$.position,rotation:$.rotation,scale:$.scale}),$.dom.parentNode.removeChild($.dom),delete this._layers[_],this._zlevelList.splice(E.indexOf(this._zlevelList,_),1))},G.prototype.refreshHover=function(){this.clearHover();for(var _=this.storage.getHoverShapes(!0),$=0,B=_.length;B>$;$++)this._brushHover(_[$]);var A=this._layers.hover.ctx;return A.flush&&A.flush(),this.storage.delHover(),this},G.prototype.clearHover=function(){var $=this._layers.hover;return $&&$.clear(),this},G.prototype.showLoading=function($){return this._loadingEffect&&this._loadingEffect.stop(),$&&this.setLoadingEffect($),this._loadingEffect.start(this),this.loading=!0,this},G.prototype.hideLoading=function(){return this._loadingEffect.stop(),this.clearHover(),this.loading=!1,this},G.prototype.isLoading=function(){return this.loading},G.prototype.resize=function(){var _=this._domRoot;_.style.display="none";var $=this._getWidth(),B=this._getHeight();if(_.style.display="",this._width!=$||B!=this._height){this._width=$,this._height=B,_.style.width=$+"px",_.style.height=B+"px";for(var A in this._layers)this._layers[A].resize($,B);this.refresh(null,!0)}return this},G.prototype.clearLayer=function(_){var $=this._layers[_];$&&$.clear()},G.prototype.dispose=function(){this.isLoading()&&this.hideLoading(),this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},G.prototype.getDomHover=function(){return this._layers.hover.dom},G.prototype.toDataURL=function(_,$,H){if(window.G_vmlCanvasManager)return null;var D=new F("image",this);this._bgDom.appendChild(D.dom),D.initContext();var E=D.ctx;D.clearColor=$||"#fff",D.clear();var A=this;this.storage.iterShape(function(_){if(!_.invisible&&(!_.onbrush||_.onbrush&&!_.onbrush(E,!1)))if(C.catchBrushException){try{_.brush(E,!1,A.refreshNextFrame)}catch($){B($,"brush error of "+_.type,_)}}else _.brush(E,!1,A.refreshNextFrame)},{normal:"up",update:!0});var G=D.dom.toDataURL(_,H);return E=null,this._bgDom.removeChild(D.dom),G},G.prototype.getWidth=function(){return this._width},G.prototype.getHeight=function(){return this._height},G.prototype._getWidth=function(){var _=this.root,$=_.currentStyle||document.defaultView.getComputedStyle(_);return((_.clientWidth||parseInt($.width,10))-parseInt($.paddingLeft,10)-parseInt($.paddingRight,10)).toFixed(0)-0},G.prototype._getHeight=function(){var _=this.root,$=_.currentStyle||document.defaultView.getComputedStyle(_);return((_.clientHeight||parseInt($.height,10))-parseInt($.paddingTop,10)-parseInt($.paddingBottom,10)).toFixed(0)-0},G.prototype._brushHover=function(_){var $=this._layers.hover.ctx;if(!_.onbrush||_.onbrush&&!_.onbrush($,!0)){var D=this.getLayer(_.zlevel);if(D.needTransform&&($.save(),D.setTransform($)),C.catchBrushException){try{_.brush($,!0,this.refreshNextFrame)}catch(A){B(A,"hoverBrush error of "+_.type,_)}}else _.brush($,!0,this.refreshNextFrame);D.needTransform&&$.restore()}},G.prototype._shapeToImage=function(A,I,E,D,F){var C=document.createElement("canvas"),B=C.getContext("2d");C.style.width=E+"px",C.style.height=D+"px",C.setAttribute("width",E*F),C.setAttribute("height",D*F),B.clearRect(0,0,E*F,D*F);var G={position:I.position,rotation:I.rotation,scale:I.scale};I.position=[0,0,0],I.rotation=0,I.scale=[1,1],I&&I.brush(B,!1);var H=_("./shape/Image"),$=new H({id:A,style:{x:0,y:0,image:C}});return null!=G.position&&($.position=I.position=G.position),null!=G.rotation&&($.rotation=I.rotation=G.rotation),null!=G.scale&&($.scale=I.scale=G.scale),$},G.prototype._createShapeToImageProcessor=function(){if(window.G_vmlCanvasManager)return H;var $=this;return function(_,D,A,B){return $._shapeToImage(_,D,A,B,C.devicePixelRatio)}},G}),define("zrender/Storage",["require","./tool/util","./Group"],function(_){"use strict";function $(_,$){return _.zlevel==$.zlevel?_.z==$.z?_.__renderidx-$.__renderidx:_.z-$.z:_.zlevel-$.zlevel}var D=_("./tool/util"),B=_("./Group"),A={hover:!1,normal:"down",update:!1},C=function(){this._elements={},this._hoverElements=[],this._roots=[],this._shapeList=[],this._shapeListOffset=0};return C.prototype.iterShape=function(_,$){if($||($=A),$.hover)for(var D=0,B=this._hoverElements.length;B>D;D++){var C=this._hoverElements[D];if(C.updateTransform(),_(C))return this}switch($.update&&this.updateShapeList(),$.normal){case"down":for(B=this._shapeList.length;B--;)if(_(this._shapeList[B]))return this;break;default:for(D=0,B=this._shapeList.length;B>D;D++)if(_(this._shapeList[D]))return this}return this},C.prototype.getHoverShapes=function(_){for(var G=[],D=0,C=this._hoverElements.length;C>D;D++){G.push(this._hoverElements[D]);var E=this._hoverElements[D].hoverConnect;if(E){var B;E=E instanceof Array?E:[E];for(var A=0,F=E.length;F>A;A++)B=E[A].id?E[A]:this.get(E[A]),B&&G.push(B)}}if(G.sort($),_)for(D=0,C=G.length;C>D;D++)G[D].updateTransform();return G},C.prototype.getShapeList=function($){return $&&this.updateShapeList(),this._shapeList},C.prototype.updateShapeList=function(){this._shapeListOffset=0;for(var _=0,B=this._roots.length;B>_;_++){var A=this._roots[_];this._updateAndAddShape(A)}this._shapeList.length=this._shapeListOffset;for(_=0,B=this._shapeList.length;B>_;_++)this._shapeList[_].__renderidx=_;this._shapeList.sort($)},C.prototype._updateAndAddShape=function(_,$){if(!_.ignore)if(_.updateTransform(),_.clipShape&&(_.clipShape.parent=_,_.clipShape.updateTransform(),$?($=$.slice(),$.push(_.clipShape)):$=[_.clipShape]),"group"==_.type){for(var B=0;B<_._children.length;B++){var A=_._children[B];A.__dirty=_.__dirty||A.__dirty,this._updateAndAddShape(A,$)}_.__dirty=!1}else _.__clipShapes=$,this._shapeList[this._shapeListOffset++]=_},C.prototype.mod=function(_,$){if("string"==typeof _&&(_=this._elements[_]),_&&(_.modSelf(),$))if($.parent||$._storage||$.__clipShapes){var B={};for(var A in $)"parent"!==A&&"_storage"!==A&&"__clipShapes"!==A&&$.hasOwnProperty(A)&&(B[A]=$[A]);D.merge(_,B,!0)}else D.merge(_,$,!0);return this},C.prototype.drift=function(_,$,B){var A=this._elements[_];return A&&(A.needTransform=!0,"horizontal"===A.draggable?B=0:"vertical"===A.draggable&&($=0),(!A.ondrift||A.ondrift&&!A.ondrift($,B))&&A.drift($,B)),this},C.prototype.addHover=function($){return $.updateNeedTransform(),this._hoverElements.push($),this},C.prototype.delHover=function(){return this._hoverElements=[],this},C.prototype.hasHoverShape=function(){return this._hoverElements.length>0},C.prototype.addRoot=function($){this._elements[$.id]||($ instanceof B&&$.addChildrenToStorage(this),this.addToMap($),this._roots.push($))},C.prototype.delRoot=function(_){if("undefined"==typeof _){for(var $=0;$$;$++)this.delRoot(_[$])}else{var C;C="string"==typeof _?this._elements[_]:_;var A=D.indexOf(this._roots,C);A>=0&&(this.delFromMap(C.id),this._roots.splice(A,1),C instanceof B&&C.delChildrenFromStorage(this))}},C.prototype.addToMap=function($){return $ instanceof B&&($._storage=this),$.modSelf(),this._elements[$.id]=$,this},C.prototype.get=function($){return this._elements[$]},C.prototype.delFromMap=function(_){var $=this._elements[_];return $&&(delete this._elements[_],$ instanceof B&&($._storage=null)),this},C.prototype.dispose=function(){this._elements=this._renderList=this._roots=this._hoverElements=null},C}),define("zrender/animation/Animation",["require","./Clip","../tool/color","../tool/util","../tool/event"],function(A){"use strict";function M(_,$){return _[$]}function I(_,$,A){_[$]=A}function D(_,$,A){return($-_)*A+_}function C(_,$,H,C,E){var B=_.length;if(1==E){for(var A=0;B>A;A++)C[A]=D(_[A],$[A],H)}else for(var F=_[0].length,A=0;B>A;A++)for(var G=0;F>G;G++)C[A][G]=D(_[A][G],$[A][G],H)}function E($){switch(typeof $){case"undefined":case"string":return!1}return"undefined"!=typeof $.length}function O(_,I,H,C,B,D,J,E,G){var $=_.length;if(1==G){for(var A=0;$>A;A++)E[A]=N(_[A],I[A],H[A],C[A],B,D,J)}else for(var F=_[0].length,A=0;$>A;A++)for(var K=0;F>K;K++)E[A][K]=N(_[A][K],I[A][K],H[A][K],C[A][K],B,D,J)}function N(_,$,G,D,C,E,B){var A=0.5*(G-_),F=0.5*(D-$);return(2*($-G)+A+F)*B+(-3*($-G)-2*A-F)*E+A*C+$}function F(_){if(E(_)){var $=_.length;if(E(_[0])){for(var B=[],A=0;$>A;A++)B.push(L.call(_[A]));return B}return L.call(_)}return _}function H($){return $[0]=Math.floor($[0]),$[1]=Math.floor($[1]),$[2]=Math.floor($[2]),"rgba("+$.join(",")+")"}var _=A("./Clip"),B=A("../tool/color"),G=A("../tool/util"),P=A("../tool/event").Dispatcher,K=window.requestAnimationFrame||window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function($){setTimeout($,16)},L=Array.prototype.slice,J=function($){$=$||{},this.stage=$.stage||{},this.onframe=$.onframe||function(){},this._clips=[],this._running=!1,this._time=0,P.call(this)};J.prototype={add:function($){this._clips.push($)},remove:function(_){if(_.__inStep)_.__needsRemove=!0;else{var $=G.indexOf(this._clips,_);$>=0&&this._clips.splice($,1)}},_update:function(){for(var _=(new Date).getTime(),$=_-this._time,G=this._clips,D=G.length,C=[],E=[],B=0;D>B;B++){var A=G[B];A.__inStep=!0;var F=A.step(_);A.__inStep=!1,F&&(C.push(F),E.push(A))}for(B=0;D>B;)G[B].__needsRemove?(G[B]=G[D-1],G.pop(),D--):B++;D=C.length;for(B=0;D>B;B++)E[B].fire(C[B]);this._time=_,this.onframe($),this.dispatch("frame",$),this.stage.update&&this.stage.update()},start:function(){function $(){_._running&&(K($),_._update())}var _=this;this._running=!0,this._time=(new Date).getTime(),K($)},stop:function(){this._running=!1},clear:function(){this._clips=[]},animate:function(A,_){_=_||{};var B=new $(A,_.loop,_.getter,_.setter);return B.animation=this,B},constructor:J},G.merge(J.prototype,P.prototype,!0);var $=function($,A,_,B){this._tracks={},this._target=$,this._loop=A||!1,this._getter=_||M,this._setter=B||I,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};return $.prototype={when:function(_,$){for(var A in $)this._tracks[A]||(this._tracks[A]=[],0!==_&&this._tracks[A].push({time:0,value:F(this._getter(this._target,A))})),this._tracks[A].push({time:parseInt(_,10),value:$[A]});return this},during:function($){return this._onframeList.push($),this},start:function(G){var F=this,L=this._setter,J=this._getter,K="spline"===G,I=function(){if(F._clipCount--,0===F._clipCount){F._tracks={};for(var $=F._doneList.length,_=0;$>_;_++)F._doneList[_].call(F)}},$=function(b,c){var X=b.length;if(X){var M=b[0].value,$=E(M),h=!1,P=$&&E(M[0])?2:1;b.sort(function(_,$){return _.time-$.time});var e;if(X){e=b[X-1].time;for(var i=[],U=[],Z=0;X>Z;Z++){i.push(b[Z].time/e);var S=b[Z].value;"string"==typeof S&&(S=B.toArray(S),0===S.length&&(S[0]=S[1]=S[2]=0,S[3]=1),h=!0),U.push(S)}var W,Z,a,g,T,d,V,R=0,Y=0;if(h)var A=[0,0,0,0];var f=function(B,G){if(Y>G){for(W=Math.min(R+1,X-1),Z=W;Z>=0&&!(i[Z]<=G);Z--);Z=Math.min(Z,X-2)}else{for(Z=R;X>Z&&!(i[Z]>G);Z++);Z=Math.min(Z-1,X-2)}R=Z,Y=G;var _=i[Z+1]-i[Z];if(0!==_){if(a=(G-i[Z])/_,K){if(T=U[Z],g=U[0===Z?Z:Z-1],d=U[Z>X-2?X-1:Z+1],V=U[Z>X-3?X-1:Z+2],$)O(g,T,d,V,a,a*a,a*a*a,J(B,c),P);else{var E;h?(E=O(g,T,d,V,a,a*a,a*a*a,A,1),E=H(A)):E=N(g,T,d,V,a,a*a,a*a*a),L(B,c,E)}}else if($)C(U[Z],U[Z+1],a,J(B,c),P);else{E;h?(C(U[Z],U[Z+1],a,A,1),E=H(A)):E=D(U[Z],U[Z+1],a),L(B,c,E)}for(Z=0;Z=$[1]&&(_=$[1]),_},$.prototype.getLocation=function(_,$,C){var B=null!=_.x?_.x:"center";switch(B){case"center":B=Math.floor((this.canvasWidth-$)/2);break;case"left":B=0;break;case"right":B=this.canvasWidth-$}var A=null!=_.y?_.y:"center";switch(A){case"center":A=Math.floor((this.canvasHeight-C)/2);break;case"top":A=0;break;case"bottom":A=this.canvasHeight-C}return{x:B,y:A,width:$,height:C}},$}),define("zrender/Layer",["require","./mixin/Transformable","./tool/util","./config"],function(_){function $(){return!1}function F(_,$,E){var C=document.createElement($),A=E.getWidth(),D=E.getHeight();return C.style.position="absolute",C.style.left=0,C.style.top=0,C.style.width=A+"px",C.style.height=D+"px",C.width=A*B.devicePixelRatio,C.height=D*B.devicePixelRatio,C.setAttribute("data-zr-dom-id",_),C}var D=_("./mixin/Transformable"),C=_("./tool/util"),E=window.G_vmlCanvasManager,B=_("./config"),A=function(_,A){this.id=_,this.dom=F(_,"canvas",A),this.dom.onselectstart=$,this.dom.style["-webkit-user-select"]="none",this.dom.style["user-select"]="none",this.dom.style["-webkit-touch-callout"]="none",this.dom.style["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",this.dom.className=B.elementClassName,E&&E.initElement(this.dom),this.domBack=null,this.ctxBack=null,this.painter=A,this.unusedCount=0,this.config=null,this.dirty=!0,this.elCount=0,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=0.7,this.zoomable=!1,this.panable=!1,this.maxZoom=1/0,this.minZoom=0,D.call(this)};return A.prototype.initContext=function(){this.ctx=this.dom.getContext("2d");var $=B.devicePixelRatio;1!=$&&this.ctx.scale($,$)},A.prototype.createBackBuffer=function(){if(!E){this.domBack=F("back-"+this.id,"canvas",this.painter),this.ctxBack=this.domBack.getContext("2d");var $=B.devicePixelRatio;1!=$&&this.ctxBack.scale($,$)}},A.prototype.resize=function(_,$){var A=B.devicePixelRatio;this.dom.style.width=_+"px",this.dom.style.height=$+"px",this.dom.setAttribute("width",_*A),this.dom.setAttribute("height",$*A),1!=A&&this.ctx.scale(A,A),this.domBack&&(this.domBack.setAttribute("width",_*A),this.domBack.setAttribute("height",$*A),1!=A&&this.ctxBack.scale(A,A))},A.prototype.clear=function(){var A=this.dom,_=this.ctx,I=A.width,F=A.height,D=this.clearColor&&!E,C=this.motionBlur&&!E,G=this.lastFrameAlpha,H=B.devicePixelRatio;if(C&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(A,0,0,I/H,F/H)),_.clearRect(0,0,I/H,F/H),D&&(_.save(),_.fillStyle=this.clearColor,_.fillRect(0,0,I/H,F/H),_.restore()),C){var $=this.domBack;_.save(),_.globalAlpha=G,_.drawImage($,0,0,I/H,F/H),_.restore()}},C.merge(A.prototype,D.prototype),A}),define("zrender/shape/Text",["require","../tool/area","./Base","../tool/util"],function(_){var $=_("../tool/area"),B=_("./Base"),A=function($){B.call(this,$)};return A.prototype={type:"text",brush:function(A,I){var E=this.style;if(I&&(E=this.getHighlightStyle(E,this.highlightStyle||{})),"undefined"!=typeof E.text&&E.text!==!1){A.save(),this.doClip(A),this.setContext(A,E),this.setTransform(A),E.textFont&&(A.font=E.textFont),A.textAlign=E.textAlign||"start",A.textBaseline=E.textBaseline||"middle";var D,F=(E.text+"").split("\n"),C=$.getTextHeight("\u56fd",E.textFont),B=this.getRect(E),G=E.x;D="top"==E.textBaseline?B.y:"bottom"==E.textBaseline?B.y+C:B.y+C/2;for(var H=0,_=F.length;_>H;H++){if(E.maxWidth)switch(E.brushType){case"fill":A.fillText(F[H],G,D,E.maxWidth);break;case"stroke":A.strokeText(F[H],G,D,E.maxWidth);break;case"both":A.fillText(F[H],G,D,E.maxWidth),A.strokeText(F[H],G,D,E.maxWidth);break;default:A.fillText(F[H],G,D,E.maxWidth)}else switch(E.brushType){case"fill":A.fillText(F[H],G,D);break;case"stroke":A.strokeText(F[H],G,D);break;case"both":A.fillText(F[H],G,D),A.strokeText(F[H],G,D);break;default:A.fillText(F[H],G,D)}D+=C}A.restore()}},getRect:function(_){if(_.__rect)return _.__rect;var D=$.getTextWidth(_.text,_.textFont),B=$.getTextHeight(_.text,_.textFont),A=_.x;"end"==_.textAlign||"right"==_.textAlign?A-=D:"center"==_.textAlign&&(A-=D/2);var C;return C="top"==_.textBaseline?_.y:"bottom"==_.textBaseline?_.y-B:_.y-B/2,_.__rect={x:A,y:C,width:D,height:B},_.__rect}},_("../tool/util").inherits(A,B),A}),define("zrender/shape/Rectangle",["require","./Base","../tool/util"],function(_){var $=_("./Base"),A=function(_){$.call(this,_)};return A.prototype={type:"rectangle",_buildRadiusPath:function(_,H){var G,C,B,D,J=H.x,I=H.y,E=H.width,F=H.height,$=H.radius;"number"==typeof $?G=C=B=D=$:$ instanceof Array?1===$.length?G=C=B=D=$[0]:2===$.length?(G=B=$[0],C=D=$[1]):3===$.length?(G=$[0],C=D=$[1],B=$[2]):(G=$[0],C=$[1],B=$[2],D=$[3]):G=C=B=D=0;var A;G+C>E&&(A=G+C,G*=E/A,C*=E/A),B+D>E&&(A=B+D,B*=E/A,D*=E/A),C+B>F&&(A=C+B,C*=F/A,B*=F/A),G+D>F&&(A=G+D,G*=F/A,D*=F/A),_.moveTo(J+G,I),_.lineTo(J+E-C,I),0!==C&&_.quadraticCurveTo(J+E,I,J+E,I+C),_.lineTo(J+E,I+F-B),0!==B&&_.quadraticCurveTo(J+E,I+F,J+E-B,I+F),_.lineTo(J+D,I+F),0!==D&&_.quadraticCurveTo(J,I+F,J,I+F-D),_.lineTo(J,I+G),0!==G&&_.quadraticCurveTo(J,I,J+G,I)},buildPath:function(_,$){$.radius?this._buildRadiusPath(_,$):(_.moveTo($.x,$.y),_.lineTo($.x+$.width,$.y),_.lineTo($.x+$.width,$.y+$.height),_.lineTo($.x,$.y+$.height),_.lineTo($.x,$.y)),_.closePath()},getRect:function(_){if(_.__rect)return _.__rect;var $;return $="stroke"==_.brushType||"fill"==_.brushType?_.lineWidth||1:0,_.__rect={x:Math.round(_.x-$/2),y:Math.round(_.y-$/2),width:_.width+$,height:_.height+$},_.__rect}},_("../tool/util").inherits(A,$),A}),define("zrender/tool/area",["require","./util","./curve"],function(N){"use strict";function b($){return $%=_,0>$&&($+=_),$}function X(_,$,F,D){if(!$||!_)return!1;var C=_.type;Z=Z||A.getContext();var B=R(_,$,F,D);if("undefined"!=typeof B)return B;if(_.buildPath&&Z.isPointInPath)return Q(_,Z,$,F,D);switch(C){case"ellipse":return!0;case"trochoid":var E="out"==$.location?$.r1+$.r2+$.d:$.r1-$.r2+$.d;return e($,F,D,E);case"rose":return e($,F,D,$.maxr);default:return!1}}function R(A,_,F,C){var B=A.type;switch(B){case"bezier-curve":return"undefined"==typeof _.cpX2?T(_.xStart,_.yStart,_.cpX1,_.cpY1,_.xEnd,_.yEnd,_.lineWidth,F,C):c(_.xStart,_.yStart,_.cpX1,_.cpY1,_.cpX2,_.cpY2,_.xEnd,_.yEnd,_.lineWidth,F,C);case"line":return d(_.xStart,_.yStart,_.xEnd,_.yEnd,_.lineWidth,F,C);case"polyline":return M(_.pointList,_.lineWidth,F,C);case"ring":return P(_.x,_.y,_.r0,_.r,F,C);case"circle":return e(_.x,_.y,_.r,F,C);case"sector":var D=_.startAngle*Math.PI/180,E=_.endAngle*Math.PI/180;return _.clockWise||(D=-D,E=-E),a(_.x,_.y,_.r0,_.r,D,E,!_.clockWise,F,C);case"path":return _.pathArray&&I(_.pathArray,Math.max(_.lineWidth,5),_.brushType,F,C);case"polygon":case"star":case"isogon":return G(_.pointList,F,C);case"text":var $=_.__rect||A.getRect(_);return U($.x,$.y,$.width,$.height,F,C);case"rectangle":case"image":return U(_.x,_.y,_.width,_.height,F,C)}}function Q(_,$,C,B,A){return $.beginPath(),_.buildPath($,C),$.closePath(),$.isPointInPath(B,A)}function S(_,$,B,A){return!X(_,$,B,A)}function d(_,H,G,C,B,D,J){if(0===B)return!1;var I=Math.max(B,5),E=0,F=_;if(J>H+I&&J>C+I||H-I>J&&C-I>J||D>_+I&&D>G+I||_-I>D&&G-I>D)return!1;if(_===G)return Math.abs(D-_)<=I/2;E=(H-C)/(_-G),F=(_*C-G*H)/(_-G);var $=E*D-J+F,A=$*$/(E*E+1);return I/2*I/2>=A}function c(_,I,H,C,B,D,K,J,E,G,$){if(0===E)return!1;var A=Math.max(E,5);if($>I+A&&$>C+A&&$>D+A&&$>J+A||I-A>$&&C-A>$&&D-A>$&&J-A>$||G>_+A&&G>H+A&&G>B+A&&G>K+A||_-A>G&&H-A>G&&B-A>G&&K-A>G)return!1;var F=Y.cubicProjectPoint(_,I,H,C,B,D,K,J,G,$,null);return A/2>=F}function T(A,_,I,E,D,F,C,B,G){if(0===C)return!1;var H=Math.max(C,5);if(G>_+H&&G>E+H&&G>F+H||_-H>G&&E-H>G&&F-H>G||B>A+H&&B>I+H&&B>D+H||A-H>B&&I-H>B&&D-H>B)return!1;var $=Y.quadraticProjectPoint(A,_,I,E,D,F,B,G,null);return H/2>=$}function W(A,I,D,C,E,K,J,F,H){if(0===J)return!1;var $=Math.max(J,5);F-=A,H-=I;var B=Math.sqrt(F*F+H*H);if(B-$>D||D>B+$)return!1;if(Math.abs(C-E)>=_)return!0;if(K){var G=C;C=b(E),E=b(G)}else C=b(C),E=b(E);C>E&&(E+=_);var L=Math.atan2(H,F);return 0>L&&(L+=_),L>=C&&E>=L||L+_>=C&&E>=L+_}function M(A,_,H,D){for(var _=Math.max(_,10),C=0,E=A.length-1;E>C;C++){var B=A[C][0],F=A[C][1],G=A[C+1][0],$=A[C+1][1];if(d(B,F,G,$,_,H,D))return!0}return!1}function P(_,$,E,C,B,D){var A=(B-_)*(B-_)+(D-$)*(D-$);return C*C>A&&A>E*E}function U(_,$,D,B,A,C){return A>=_&&_+D>=A&&C>=$&&$+B>=C}function e(_,$,C,B,A){return C*C>(B-_)*(B-_)+(A-$)*(A-$)}function a(_,$,G,D,C,E,B,A,F){return W(_,$,(G+D)/2,C,E,B,D-G,A,F)}function G(A,_,J){for(var F=A.length,E=0,G=0,C=F-1;F>G;G++){var B=A[C][0],H=A[C][1],I=A[G][0],$=A[G][1];E+=D(B,H,I,$,_,J),C=G}return 0!==E}function D(_,$,G,D,C,E){if(E>$&&E>D||$>E&&D>E)return 0;if(D==$)return 0;var B=$>D?1:-1,A=(E-$)/(D-$),F=A*(G-_)+_;return F>C?B:0}function L(){var _=$[0];$[0]=$[1],$[1]=_}function K(B,P,K,F,D,G,R,Q,H,J){if(J>P&&J>F&&J>G&&J>Q||P>J&&F>J&&G>J&&Q>J)return 0;var A=Y.cubicRootAt(P,F,G,Q,J,E);if(0===A)return 0;for(var C,I,S=0,N=-1,O=0;A>O;O++){var M=E[O],_=Y.cubicAt(B,K,D,R,M);H>_||(0>N&&(N=Y.cubicExtrema(P,F,G,Q,$),$[1]<$[0]&&N>1&&L(),C=Y.cubicAt(P,F,G,Q,$[0]),N>1&&(I=Y.cubicAt(P,F,G,Q,$[1]))),S+=2==N?M<$[0]?P>C?1:-1:M<$[1]?C>I?1:-1:I>Q?1:-1:M<$[0]?P>C?1:-1:C>Q?1:-1)}return S}function f(_,J,I,C,B,D,L,K){if(K>J&&K>C&&K>D||J>K&&C>K&&D>K)return 0;var F=Y.quadraticRootAt(J,C,D,K,E);if(0===F)return 0;var H=Y.quadraticExtremum(J,C,D);if(H>=0&&1>=H){for(var $=0,A=Y.quadraticAt(J,C,D,H),G=0;F>G;G++){var M=Y.quadraticAt(_,I,B,E[G]);L>M||($+=E[G]A?1:-1:A>D?1:-1)}return $}M=Y.quadraticAt(_,I,B,E[0]);return L>M?0:J>D?1:-1}function O(A,J,D,C,F,M,L,G){if(G-=J,G>D||-D>G)return 0;var I=Math.sqrt(D*D-G*G);if(E[0]=-I,E[1]=I,Math.abs(C-F)>=_){C=0,F=_;var $=M?1:-1;return L>=E[0]+A&&L<=E[1]+A?$:0}if(M){I=C;C=b(F),F=b(I)}else C=b(C),F=b(F);C>F&&(F+=_);for(var B=0,H=0;2>H;H++){var N=E[H];if(N+A>L){var K=Math.atan2(G,N),$=M?1:-1;0>K&&(K=_+K),(K>=C&&F>=K||K+_>=C&&F>=K+_)&&(K>Math.PI/2&&K<1.5*Math.PI&&($=-$),B+=$)}}return B}function I(M,a,V,Q,P){var R=0,L=0,N=0,S=0,b=0,Z=!0,F=!0;V=V||"fill";for(var J="stroke"===V||"both"===V,H="fill"===V||"both"===V,e=0;e0&&(H&&(R+=D(L,N,S,b,Q,P)),0!==R))return!0;S=Y[Y.length-2],b=Y[Y.length-1],Z=!1,F&&"A"!==U.command&&(F=!1,L=S,N=b)}switch(U.command){case"M":L=Y[0],N=Y[1];break;case"L":if(J&&d(L,N,Y[0],Y[1],a,Q,P))return!0;H&&(R+=D(L,N,Y[0],Y[1],Q,P)),L=Y[0],N=Y[1];break;case"C":if(J&&c(L,N,Y[0],Y[1],Y[2],Y[3],Y[4],Y[5],a,Q,P))return!0;H&&(R+=K(L,N,Y[0],Y[1],Y[2],Y[3],Y[4],Y[5],Q,P)),L=Y[4],N=Y[5];break;case"Q":if(J&&T(L,N,Y[0],Y[1],Y[2],Y[3],a,Q,P))return!0;H&&(R+=f(L,N,Y[0],Y[1],Y[2],Y[3],Q,P)),L=Y[2],N=Y[3];break;case"A":var _=Y[0],X=Y[1],E=Y[2],I=Y[3],A=Y[4],G=Y[5],B=Math.cos(A)*E+_,$=Math.sin(A)*I+X;F?(F=!1,S=B,b=$):R+=D(L,N,B,$);var C=(Q-_)*I/E+_;if(J&&W(_,X,I,A,A+G,1-Y[7],a,C,P))return!0;H&&(R+=O(_,X,I,A,A+G,1-Y[7],C,P)),L=Math.cos(A+G)*E+_,N=Math.sin(A+G)*I+X;break;case"z":if(J&&d(L,N,S,b,a,Q,P))return!0;Z=!0}}return H&&(R+=D(L,N,S,b,Q,P)),0!==R}function g(_,$){var H=_+":"+$;if(F[H])return F[H];Z=Z||A.getContext(),Z.save(),$&&(Z.font=$),_=(_+"").split("\n");for(var E=0,D=0,G=_.length;G>D;D++)E=Math.max(Z.measureText(_[D]).width,E);return Z.restore(),F[H]=E,++B>C&&(B=0,F={}),E}function V(_,$){var D=_+":"+$;if(J[D])return J[D];Z=Z||A.getContext(),Z.save(),$&&(Z.font=$),_=(_+"").split("\n");var B=(Z.measureText("\u56fd").width+2)*_.length;return Z.restore(),J[D]=B,++H>C&&(H=0,J={}),B}var Z,A=N("./util"),Y=N("./curve"),F={},J={},B=0,H=0,C=5000,_=2*Math.PI,E=[-1,-1,-1],$=[-1,-1];return{isInside:X,isOutside:S,getTextWidth:g,getTextHeight:V,isInsidePath:I,isInsidePolygon:G,isInsideSector:a,isInsideCircle:e,isInsideLine:d,isInsideRect:U,isInsidePolyline:M,isInsideCubicStroke:c,isInsideQuadraticStroke:T}}),define("zrender/shape/Base",["require","../tool/matrix","../tool/guid","../tool/util","../tool/log","../mixin/Transformable","../mixin/Eventful","../tool/area","../tool/color"],function(_){function I(A,F,E,G,D,B,I){D&&(A.font=D),A.textAlign=B,A.textBaseline=I;var K=H(F,E,G,D,B,I);F=(F+"").split("\n");var $=_("../tool/area").getTextHeight("\u56fd",D);switch(I){case"top":G=K.y;break;case"bottom":G=K.y+$;break;default:G=K.y+$/2}for(var C=0,J=F.length;J>C;C++)A.fillText(F[C],E,G),G+=$}function H($,H,D,C,E,B){var A=_("../tool/area"),F=A.getTextWidth($,C),G=A.getTextHeight("\u56fd",C);switch($=($+"").split("\n"),E){case"end":case"right":H-=F;break;case"center":H-=F/2}switch(B){case"top":break;case"bottom":D-=G*$.length;break;default:D-=G*$.length/2}return{x:H,y:D,width:F,height:G*$.length}}var C=window.G_vmlCanvasManager,B=_("../tool/matrix"),D=_("../tool/guid"),K=_("../tool/util"),J=_("../tool/log"),E=_("../mixin/Transformable"),G=_("../mixin/Eventful"),$=function(_){_=_||{},this.id=_.id||D();for(var $ in _)this[$]=_[$];this.style=this.style||{},this.highlightStyle=this.highlightStyle||null,this.parent=null,this.__dirty=!0,this.__clipShapes=[],E.call(this),G.call(this)};$.prototype.invisible=!1,$.prototype.ignore=!1,$.prototype.zlevel=0,$.prototype.draggable=!1,$.prototype.clickable=!1,$.prototype.hoverable=!0,$.prototype.z=0,$.prototype.brush=function(_,$){var A=this.beforeBrush(_,$);switch(_.beginPath(),this.buildPath(_,A),A.brushType){case"both":_.fill();case"stroke":A.lineWidth>0&&_.stroke();break;default:_.fill()}this.drawText(_,A,this.style),this.afterBrush(_)},$.prototype.beforeBrush=function(_,$){var A=this.style;return this.brushTypeOnly&&(A.brushType=this.brushTypeOnly),$&&(A=this.getHighlightStyle(A,this.highlightStyle||{},this.brushTypeOnly)),"stroke"==this.brushTypeOnly&&(A.strokeColor=A.strokeColor||A.color),_.save(),this.doClip(_),this.setContext(_,A),this.setTransform(_),A},$.prototype.afterBrush=function($){$.restore()};var A=[["color","fillStyle"],["strokeColor","strokeStyle"],["opacity","globalAlpha"],["lineCap","lineCap"],["lineJoin","lineJoin"],["miterLimit","miterLimit"],["lineWidth","lineWidth"],["shadowBlur","shadowBlur"],["shadowColor","shadowColor"],["shadowOffsetX","shadowOffsetX"],["shadowOffsetY","shadowOffsetY"]];$.prototype.setContext=function(_,$){for(var F=0,D=A.length;D>F;F++){var C=A[F][0],E=$[C],B=A[F][1];"undefined"!=typeof E&&(_[B]=E)}};var F=B.create();return $.prototype.doClip=function(_){if(this.__clipShapes&&!C)for(var $=0;$=A.x&&_<=A.x+A.width&&$>=A.y&&$<=A.y+A.height},$.prototype.drawText=function(B,K,E){if("undefined"!=typeof K.text&&K.text!==!1){var D=K.textColor||K.color||K.strokeColor;B.fillStyle=D;var F,P,O,G,J=10,A=K.textPosition||this.textPosition||"top";switch(A){case"inside":case"top":case"bottom":case"left":case"right":if(this.getRect){var C=(E||K).__rect||this.getRect(E||K);switch(A){case"inside":O=C.x+C.width/2,G=C.y+C.height/2,F="center",P="middle","stroke"!=K.brushType&&D==K.color&&(B.fillStyle="#fff");break;case"left":O=C.x-J,G=C.y+C.height/2,F="end",P="middle";break;case"right":O=C.x+C.width+J,G=C.y+C.height/2,F="start",P="middle";break;case"top":O=C.x+C.width/2,G=C.y-J,F="center",P="bottom";break;case"bottom":O=C.x+C.width/2,G=C.y+C.height+J,F="center",P="top"}}break;case"start":case"end":var H=K.pointList||[[K.xStart||0,K.yStart||0],[K.xEnd||0,K.yEnd||0]],Q=H.length;if(2>Q)return;var M,N,L,_;switch(A){case"start":M=H[1][0],N=H[0][0],L=H[1][1],_=H[0][1];break;case"end":M=H[Q-2][0],N=H[Q-1][0],L=H[Q-2][1],_=H[Q-1][1]}O=N,G=_;var $=Math.atan((L-_)/(N-M))/Math.PI*180;0>N-M?$+=180:0>L-_&&($+=360),J=5,$>=30&&150>=$?(F="center",P="bottom",G-=J):$>150&&210>$?(F="right",P="middle",O-=J):$>=210&&330>=$?(F="center",P="top",G+=J):(F="left",P="middle",O+=J);break;case"specific":O=K.textX||0,G=K.textY||0,F="start",P="middle"}null!=O&&null!=G&&I(B,K.text,O,G,K.textFont,K.textAlign||F,K.textBaseline||P)}},$.prototype.modSelf=function(){this.__dirty=!0,this.style&&(this.style.__rect=null),this.highlightStyle&&(this.highlightStyle.__rect=null)},$.prototype.isSilent=function(){return!(this.hoverable||this.draggable||this.clickable||this.onmousemove||this.onmouseover||this.onmouseout||this.onmousedown||this.onmouseup||this.onclick||this.ondragenter||this.ondragover||this.ondragleave||this.ondrop)},K.merge($.prototype,E.prototype,!0),K.merge($.prototype,G.prototype,!0),$}),define("zrender/tool/curve",["require","./vector"],function(B){function O($){return $>-L&&L>$}function K($){return $>L||-L>$}function F(_,$,D,B,A){var C=1-A;return C*C*(C*_+3*A*$)+A*A*(A*B+3*C*D)}function E(_,$,D,B,A){var C=1-A;return 3*((($-_)*C+2*(D-$)*A)*C+(B-D)*A*A)}function G(H,S,L,K,M,X){var W=K+3*(S-L)-H,N=3*(L-2*S+H),R=3*(S-H),G=H-M,J=N*N-3*W*R,P=N*R-9*W*G,Y=R*R-3*N*G,V=0;if(O(J)&&O(P)){if(O(N))X[0]=0;else{var D=-R/N;D>=0&&1>=D&&(X[V++]=D)}}else{var B=P*P-4*J*Y;if(O(B)){var Z=P/J,D=-N/W+Z,I=-Z/2;D>=0&&1>=D&&(X[V++]=D),I>=0&&1>=I&&(X[V++]=I)}else if(B>0){var E=Math.sqrt(B),a=J*N+1.5*W*(-P+E),Q=J*N+1.5*W*(-P-E);a=0>a?-Math.pow(-a,$):Math.pow(a,$),Q=0>Q?-Math.pow(-Q,$):Math.pow(Q,$);D=(-N-(a+Q))/(3*W);D>=0&&1>=D&&(X[V++]=D)}else{var U=(2*J*N-3*W*P)/(2*Math.sqrt(J*J*J)),A=Math.acos(U)/3,T=Math.sqrt(J),C=Math.cos(A),D=(-N-2*T*C)/(3*W),I=(-N+T*(C+_*Math.sin(A)))/(3*W),F=(-N+T*(C-_*Math.sin(A)))/(3*W);D>=0&&1>=D&&(X[V++]=D),I>=0&&1>=I&&(X[V++]=I),F>=0&&1>=F&&(X[V++]=F)}}return V}function Q(_,C,B,D,J){var I=6*B-12*C+6*_,E=9*C+3*D-3*_-9*B,G=3*C-3*_,$=0;if(O(E)){if(K(I)){var A=-G/I;A>=0&&1>=A&&(J[$++]=A)}}else{var F=I*I-4*E*G;if(O(F))J[0]=-I/(2*E);else if(F>0){var L=Math.sqrt(F),A=(-I+L)/(2*E),H=(-I-L)/(2*E);A>=0&&1>=A&&(J[$++]=A),H>=0&&1>=H&&(J[$++]=H)}}return $}function P(_,H,G,C,B,D){var J=(H-_)*B+_,I=(G-H)*B+H,E=(C-G)*B+G,F=(I-J)*B+J,$=(E-I)*B+I,A=($-F)*B+F;D[0]=_,D[1]=J,D[2]=F,D[3]=A,D[4]=A,D[5]=$,D[6]=E,D[7]=C}function H(B,R,O,E,H,V,U,I,M,A,D){var J,W=0.005,Q=1/0;T[0]=M,T[1]=A;for(var _=0;1>_;_+=0.05){C[0]=F(B,O,H,U,_),C[1]=F(R,E,V,I,_);var $=N.distSquare(T,C);Q>$&&(J=_,Q=$)}Q=1/0;for(var X=0;32>X&&!(L>W);X++){var K=J-W,P=J+W;C[0]=F(B,O,H,U,K),C[1]=F(R,E,V,I,K);$=N.distSquare(C,T);if(K>=0&&Q>$)J=K,Q=$;else{S[0]=F(B,O,H,U,P),S[1]=F(R,E,V,I,P);var G=N.distSquare(S,T);1>=P&&Q>G?(J=P,Q=G):W*=0.5}}return D&&(D[0]=F(B,O,H,U,J),D[1]=F(R,E,V,I,J)),Math.sqrt(Q)}function J(_,$,C,B){var A=1-B;return A*(A*_+2*B*$)+B*B*C}function A(_,$,B,A){return 2*((1-A)*($-_)+A*(B-$))}function D(_,C,B,D,J){var I=_-2*C+B,E=2*(C-_),G=_-D,$=0;if(O(I)){if(K(E)){var A=-G/E;A>=0&&1>=A&&(J[$++]=A)}}else{var F=E*E-4*I*G;if(O(F)){A=-E/(2*I);A>=0&&1>=A&&(J[$++]=A)}else if(F>0){var L=Math.sqrt(F),A=(-E+L)/(2*I),H=(-E-L)/(2*I);A>=0&&1>=A&&(J[$++]=A),H>=0&&1>=H&&(J[$++]=H)}}return $}function I(_,$,B){var A=_+B-2*$;return 0===A?0.5:(_-$)/A}function R(_,$,F,D,C){var E=($-_)*D+_,B=(F-$)*D+$,A=(B-E)*D+E;C[0]=_,C[1]=E,C[2]=A,C[3]=A,C[4]=B,C[5]=F}function M(B,P,M,F,E,G,R,Q,H){var A,D=0.005,I=1/0;T[0]=R,T[1]=Q;for(var U=0;1>U;U+=0.05){C[0]=J(B,M,E,U),C[1]=J(P,F,G,U);var O=N.distSquare(T,C);I>O&&(A=U,I=O)}I=1/0;for(var _=0;32>_&&!(L>D);_++){var $=A-D,V=A+D;C[0]=J(B,M,E,$),C[1]=J(P,F,G,$);O=N.distSquare(C,T);if($>=0&&I>O)A=$,I=O;else{S[0]=J(B,M,E,V),S[1]=J(P,F,G,V);var K=N.distSquare(S,T);1>=V&&I>K?(A=V,I=K):D*=0.5}}return H&&(H[0]=J(B,M,E,A),H[1]=J(P,F,G,A)),Math.sqrt(I)}var N=B("./vector"),L=0.0001,_=Math.sqrt(3),$=1/3,T=N.create(),C=N.create(),S=N.create();return{cubicAt:F,cubicDerivativeAt:E,cubicRootAt:G,cubicExtrema:Q,cubicSubdivide:P,cubicProjectPoint:H,quadraticAt:J,quadraticDerivativeAt:A,quadraticRootAt:D,quadraticExtremum:I,quadraticSubdivide:R,quadraticProjectPoint:M}}),define("zrender/mixin/Transformable",["require","../tool/matrix","../tool/vector"],function(_){"use strict";function $($){return $>-A&&A>$}function G($){return $>A||-A>$}var D=_("../tool/matrix"),C=_("../tool/vector"),E=[0,0],B=D.translate,A=0.00005,F=function(){this.position||(this.position=[0,0]),"undefined"==typeof this.rotation&&(this.rotation=[0,0,0]),this.scale||(this.scale=[1,1,0,0]),this.needLocalTransform=!1,this.needTransform=!1};return F.prototype={constructor:F,updateNeedTransform:function(){this.needLocalTransform=G(this.rotation[0])||G(this.position[0])||G(this.position[1])||G(this.scale[0]-1)||G(this.scale[1]-1)},updateTransform:function(){this.updateNeedTransform();var _=this.parent&&this.parent.needTransform;if(this.needTransform=this.needLocalTransform||_,this.needTransform){var $=this.transform||D.create();if(D.identity($),this.needLocalTransform){var C=this.scale;if(G(C[0])||G(C[1])){E[0]=-C[2]||0,E[1]=-C[3]||0;var A=G(E[0])||G(E[1]);A&&B($,$,E),D.scale($,$,C),A&&(E[0]=-E[0],E[1]=-E[1],B($,$,E))}if(this.rotation instanceof Array){if(0!==this.rotation[0]){E[0]=-this.rotation[1]||0,E[1]=-this.rotation[2]||0;A=G(E[0])||G(E[1]);A&&B($,$,E),D.rotate($,$,this.rotation[0]),A&&(E[0]=-E[0],E[1]=-E[1],B($,$,E))}}else 0!==this.rotation&&D.rotate($,$,this.rotation);(G(this.position[0])||G(this.position[1]))&&B($,$,this.position)}_&&(this.needLocalTransform?D.mul($,this.parent.transform,$):D.copy($,this.parent.transform)),this.transform=$,this.invTransform=this.invTransform||D.create(),D.invert(this.invTransform,$)}},setTransform:function(_){if(this.needTransform){var $=this.transform;_.transform($[0],$[1],$[2],$[3],$[4],$[5])}},lookAt:function(){var _=C.create();return function(E){this.transform||(this.transform=D.create());var B=this.transform;if(C.sub(_,E,this.position),!$(_[0])||!$(_[1])){C.normalize(_,_);var A=this.scale;B[2]=_[0]*A[1],B[3]=_[1]*A[1],B[0]=_[1]*A[0],B[1]=-_[0]*A[0],B[4]=this.position[0],B[5]=this.position[1],this.decomposeTransform()}}}(),decomposeTransform:function(){if(this.transform){var _=this.transform,$=_[0]*_[0]+_[1]*_[1],C=this.position,B=this.scale,D=this.rotation;G($-1)&&($=Math.sqrt($));var A=_[2]*_[2]+_[3]*_[3];G(A-1)&&(A=Math.sqrt(A)),C[0]=_[4],C[1]=_[5],B[0]=$,B[1]=A,B[2]=B[3]=0,D[0]=Math.atan2(-_[1]/A,_[0]/$),D[1]=D[2]=0}},transformCoordToLocal:function(_,$){var A=[_,$];return this.needTransform&&this.invTransform&&C.applyTransform(A,A,this.invTransform),A}},F}),define("zrender/Group",["require","./tool/guid","./tool/util","./mixin/Transformable","./mixin/Eventful"],function(_){var $=_("./tool/guid"),D=_("./tool/util"),B=_("./mixin/Transformable"),A=_("./mixin/Eventful"),C=function(_){_=_||{},this.id=_.id||$();for(var C in _)this[C]=_[C];this.type="group",this.clipShape=null,this._children=[],this._storage=null,this.__dirty=!0,B.call(this),A.call(this)};return C.prototype.ignore=!1,C.prototype.children=function(){return this._children.slice()},C.prototype.childAt=function($){return this._children[$]},C.prototype.addChild=function($){$!=this&&$.parent!=this&&($.parent&&$.parent.removeChild($),this._children.push($),$.parent=this,this._storage&&this._storage!==$._storage&&(this._storage.addToMap($),$ instanceof C&&$.addChildrenToStorage(this._storage)))},C.prototype.removeChild=function(_){var $=D.indexOf(this._children,_);$>=0&&this._children.splice($,1),_.parent=null,this._storage&&(this._storage.delFromMap(_.id),_ instanceof C&&_.delChildrenFromStorage(this._storage))},C.prototype.clearChildren=function(){for(var _=0;_$)){$=Math.min($,1);var C="string"==typeof this.easing?A[this.easing]:this.easing,B="function"==typeof C?C($):$;return this.fire("frame",B),1==$?this.loop?(this.restart(),"restart"):(this.__needsRemove=!0,"destroy"):null}},restart:function(){var _=(new Date).getTime(),$=(_-this._startTime)%this._life;this._startTime=(new Date).getTime()-$+this.gap,this.__needsRemove=!1},fire:function(_,$){for(var B=0,A=this._targetPool.length;A>B;B++)this["on"+_]&&this["on"+_](this._targetPool[B],$)},constructor:$},$}),define("zrender/animation/easing",[],function(){var $={Linear:function($){return $},QuadraticIn:function($){return $*$},QuadraticOut:function($){return $*(2-$)},QuadraticInOut:function($){return($*=2)<1?0.5*$*$:-0.5*(--$*($-2)-1)},CubicIn:function($){return $*$*$},CubicOut:function($){return--$*$*$+1},CubicInOut:function($){return($*=2)<1?0.5*$*$*$:0.5*(($-=2)*$*$+2)},QuarticIn:function($){return $*$*$*$},QuarticOut:function($){return 1- --$*$*$*$},QuarticInOut:function($){return($*=2)<1?0.5*$*$*$*$:-0.5*(($-=2)*$*$*$-2)},QuinticIn:function($){return $*$*$*$*$},QuinticOut:function($){return--$*$*$*$*$+1},QuinticInOut:function($){return($*=2)<1?0.5*$*$*$*$*$:0.5*(($-=2)*$*$*$*$+2)},SinusoidalIn:function($){return 1-Math.cos($*Math.PI/2)},SinusoidalOut:function($){return Math.sin($*Math.PI/2)},SinusoidalInOut:function($){return 0.5*(1-Math.cos(Math.PI*$))},ExponentialIn:function($){return 0===$?0:Math.pow(1024,$-1)},ExponentialOut:function($){return 1===$?1:1-Math.pow(2,-10*$)},ExponentialInOut:function($){return 0===$?0:1===$?1:($*=2)<1?0.5*Math.pow(1024,$-1):0.5*(-Math.pow(2,-10*($-1))+2)},CircularIn:function($){return 1-Math.sqrt(1-$*$)},CircularOut:function($){return Math.sqrt(1- --$*$)},CircularInOut:function($){return($*=2)<1?-0.5*(Math.sqrt(1-$*$)-1):0.5*(Math.sqrt(1-($-=2)*$)+1)},ElasticIn:function(_){var $,B=0.1,A=0.4;return 0===_?0:1===_?1:(!B||1>B?(B=1,$=A/4):$=A*Math.asin(1/B)/(2*Math.PI),-(B*Math.pow(2,10*(_-=1))*Math.sin(2*(_-$)*Math.PI/A)))},ElasticOut:function(_){var $,B=0.1,A=0.4;return 0===_?0:1===_?1:(!B||1>B?(B=1,$=A/4):$=A*Math.asin(1/B)/(2*Math.PI),B*Math.pow(2,-10*_)*Math.sin(2*(_-$)*Math.PI/A)+1)},ElasticInOut:function(_){var $,B=0.1,A=0.4;return 0===_?0:1===_?1:(!B||1>B?(B=1,$=A/4):$=A*Math.asin(1/B)/(2*Math.PI),(_*=2)<1?-0.5*B*Math.pow(2,10*(_-=1))*Math.sin(2*(_-$)*Math.PI/A):B*Math.pow(2,-10*(_-=1))*Math.sin(2*(_-$)*Math.PI/A)*0.5+1)},BackIn:function(_){var $=1.70158;return _*_*(($+1)*_-$)},BackOut:function(_){var $=1.70158;return--_*_*(($+1)*_+$)+1},BackInOut:function(_){var $=2.5949095;return(_*=2)<1?0.5*_*_*(($+1)*_-$):0.5*((_-=2)*_*(($+1)*_+$)+2)},BounceIn:function(_){return 1-$.BounceOut(1-_)},BounceOut:function($){return 1/2.75>$?7.5625*$*$:2/2.75>$?7.5625*($-=1.5/2.75)*$+0.75:2.5/2.75>$?7.5625*($-=2.25/2.75)*$+0.9375:7.5625*($-=2.625/2.75)*$+0.984375},BounceInOut:function(_){return 0.5>_?0.5*$.BounceIn(2*_):0.5*$.BounceOut(2*_-1)+0.5}};return $}),define("echarts/chart/base",["require","zrender/shape/Image","../util/shape/Icon","../util/shape/MarkLine","../util/shape/Symbol","zrender/shape/Polyline","zrender/shape/ShapeBundle","../config","../util/ecData","../util/ecAnimation","../util/ecEffect","../util/accMath","../component/base","../layout/EdgeBundling","zrender/tool/util","zrender/tool/area"],function(A){function L($){return null!=$.x&&null!=$.y}function I(A,$,E,C,B){K.call(this,A,$,E,C,B);var D=this;this.selectedMap={},this.lastShapeList=[],this.shapeHandler={onclick:function(){D.isClick=!0},ondragover:function(_){var $=_.target;$.highlightStyle=$.highlightStyle||{};var E=$.highlightStyle,C=E.brushTyep,B=E.strokeColor,A=E.lineWidth;E.brushType="stroke",E.strokeColor=D.ecTheme.calculableColor||H.calculableColor,E.lineWidth="icon"===$.type?30:10,D.zr.addHoverShape($),setTimeout(function(){E&&(E.brushType=C,E.strokeColor=B,E.lineWidth=A)},20)},ondrop:function($){null!=_.get($.dragged,"data")&&(D.isDrop=!0)},ondragend:function(){D.isDragend=!0}}}var D=A("zrender/shape/Image"),C=A("../util/shape/Icon"),E=A("../util/shape/MarkLine"),O=A("../util/shape/Symbol"),N=A("zrender/shape/Polyline"),F=A("zrender/shape/ShapeBundle"),H=A("../config"),_=A("../util/ecData"),B=A("../util/ecAnimation"),G=A("../util/ecEffect"),P=A("../util/accMath"),K=A("../component/base"),M=A("../layout/EdgeBundling"),J=A("zrender/tool/util"),$=A("zrender/tool/area");return I.prototype={setCalculable:function($){return $.dragEnableTime=this.ecTheme.DRAG_ENABLE_TIME||H.DRAG_ENABLE_TIME,$.ondragover=this.shapeHandler.ondragover,$.ondragend=this.shapeHandler.ondragend,$.ondrop=this.shapeHandler.ondrop,$},ondrop:function($,L){if(this.isDrop&&$.target&&!L.dragIn){var G,C=$.target,B=$.dragged,D=_.get(C,"seriesIndex"),N=_.get(C,"dataIndex"),M=this.series,E=this.component.legend;if(-1===N){if(_.get(B,"seriesIndex")==D)return L.dragOut=L.dragIn=L.needRefresh=!0,void(this.isDrop=!1);G={value:_.get(B,"value"),name:_.get(B,"name")},this.type===H.CHART_TYPE_PIE&&G.value<0&&(G.value=0);for(var A=!1,F=M[D].data,J=0,K=F.length;K>J;J++)F[J].name===G.name&&"-"===F[J].value&&(M[D].data[J].value=G.value,A=!0);!A&&M[D].data.push(G),E&&E.add(G.name,B.style.color||B.style.strokeColor)}else G=M[D].data[N]||"-",null!=G.value?(M[D].data[N].value="-"!=G.value?P.accAdd(M[D].data[N].value,_.get(B,"value")):_.get(B,"value"),(this.type===H.CHART_TYPE_FUNNEL||this.type===H.CHART_TYPE_PIE)&&(E&&1===E.getRelatedAmount(G.name)&&this.component.legend.del(G.name),G.name+=this.option.nameConnector+_.get(B,"name"),E&&E.add(G.name,B.style.color||B.style.strokeColor))):M[D].data[N]="-"!=G?P.accAdd(M[D].data[N],_.get(B,"value")):_.get(B,"value");L.dragIn=L.dragIn||!0,this.isDrop=!1;var I=this;setTimeout(function(){I.zr.trigger("mousemove",$.event)},300)}},ondragend:function(A,$){if(this.isDragend&&A.target&&!$.dragOut){var G=A.target,E=_.get(G,"seriesIndex"),D=_.get(G,"dataIndex"),F=this.series;if(null!=F[E].data[D].value){F[E].data[D].value="-";var C=F[E].data[D].name,B=this.component.legend;B&&0===B.getRelatedAmount(C)&&B.del(C)}else F[E].data[D]="-";$.dragOut=!0,$.needRefresh=!0,this.isDragend=!1}},onlegendSelected:function(_,$){var B=_.selected;for(var A in this.selectedMap)this.selectedMap[A]!=B[A]&&($.needRefresh=!0),this.selectedMap[A]=B[A]},_buildPosition:function(){this._symbol=this.option.symbolList,this._sIndex2ShapeMap={},this._sIndex2ColorMap={},this.selectedMap={},this.xMarkMap={};for(var _,$,G,D,C=this.series,E={top:[],bottom:[],left:[],right:[],other:[]},B=0,A=C.length;A>B;B++)C[B].type===this.type&&(C[B]=this.reformOption(C[B]),this.legendHoverLink=C[B].legendHoverLink||this.legendHoverLink,_=C[B].xAxisIndex,$=C[B].yAxisIndex,G=this.component.xAxis.getAxis(_),D=this.component.yAxis.getAxis($),G.type===H.COMPONENT_TYPE_AXIS_CATEGORY?E[G.getPosition()].push(B):D.type===H.COMPONENT_TYPE_AXIS_CATEGORY?E[D.getPosition()].push(B):E.other.push(B));for(var F in E)E[F].length>0&&this._buildSinglePosition(F,E[F]);this.addShapeList()},_buildSinglePosition:function(_,$){var E=this._mapData($),C=E.locationMap,B=E.maxDataLength;if(0!==B&&0!==C.length){switch(_){case"bottom":case"top":this._buildHorizontal($,B,C,this.xMarkMap);break;case"left":case"right":this._buildVertical($,B,C,this.xMarkMap);break;case"other":this._buildOther($,B,C,this.xMarkMap)}for(var D=0,A=$.length;A>D;D++)this.buildMark($[D])}},_mapData:function(_){for(var L,G,C,B,D=this.series,N=0,M={},E="__kener__stack__",$=this.component.legend,A=[],F=0,O=0,J=_.length;J>O;O++){if(L=D[_[O]],C=L.name,this._sIndex2ShapeMap[_[O]]=this._sIndex2ShapeMap[_[O]]||this.query(L,"symbol")||this._symbol[O%this._symbol.length],$){if(this.selectedMap[C]=$.isSelected(C),this._sIndex2ColorMap[_[O]]=$.getColor(C),B=$.getItemShape(C)){var K=B.style;if(this.type==H.CHART_TYPE_LINE)K.iconType="legendLineIcon",K.symbol=this._sIndex2ShapeMap[_[O]];else if(L.itemStyle.normal.barBorderWidth>0){var I=B.highlightStyle;K.brushType="both",K.x+=1,K.y+=1,K.width-=2,K.height-=2,K.strokeColor=I.strokeColor=L.itemStyle.normal.barBorderColor,I.lineWidth=3}$.setItemShape(C,B)}}else this.selectedMap[C]=!0,this._sIndex2ColorMap[_[O]]=this.zr.getColor(_[O]);this.selectedMap[C]&&(G=L.stack||E+_[O],null==M[G]?(M[G]=N,A[N]=[_[O]],N++):A[M[G]].push(_[O])),F=Math.max(F,L.data.length)}return{locationMap:A,maxDataLength:F}},_calculMarkMapXY:function(_,I,H){for(var C=this.series,B=0,D=I.length;D>B;B++)for(var K=0,J=I[B].length;J>K;K++){var E=I[B][K],G="xy"==H?0:"",$=this.component.grid,A=_[E];if("-1"!=H.indexOf("x")){A["counter"+G]>0&&(A["average"+G]=A["sum"+G]/A["counter"+G]);var F=this.component.xAxis.getAxis(C[E].xAxisIndex||0).getCoord(A["average"+G]);A["averageLine"+G]=[[F,$.getYend()],[F,$.getY()]],A["minLine"+G]=[[A["minX"+G],$.getYend()],[A["minX"+G],$.getY()]],A["maxLine"+G]=[[A["maxX"+G],$.getYend()],[A["maxX"+G],$.getY()]],A.isHorizontal=!1}if(G="xy"==H?1:"","-1"!=H.indexOf("y")){A["counter"+G]>0&&(A["average"+G]=A["sum"+G]/A["counter"+G]);var L=this.component.yAxis.getAxis(C[E].yAxisIndex||0).getCoord(A["average"+G]);A["averageLine"+G]=[[$.getX(),L],[$.getXend(),L]],A["minLine"+G]=[[$.getX(),A["minY"+G]],[$.getXend(),A["minY"+G]]],A["maxLine"+G]=[[$.getX(),A["maxY"+G]],[$.getXend(),A["maxY"+G]]],A.isHorizontal=!0}}},addLabel:function(_,H,G,C,B){var D=[G,H],J=this.deepMerge(D,"itemStyle.normal.label"),I=this.deepMerge(D,"itemStyle.emphasis.label"),E=J.textStyle||{},F=I.textStyle||{};if(J.show){var $=_.style;$.text=this._getLabelText(H,G,C,"normal"),$.textPosition=null==J.position?"horizontal"===B?"right":"top":J.position,$.textColor=E.color,$.textFont=this.getFont(E),$.textAlign=E.align,$.textBaseline=E.baseline}if(I.show){var A=_.highlightStyle;A.text=this._getLabelText(H,G,C,"emphasis"),A.textPosition=J.show?_.style.textPosition:null==I.position?"horizontal"===B?"right":"top":I.position,A.textColor=F.color,A.textFont=this.getFont(F),A.textAlign=F.align,A.textBaseline=F.baseline}return _},_getLabelText:function(_,$,D,B){var A=this.deepQuery([$,_],"itemStyle."+B+".label.formatter");A||"emphasis"!==B||(A=this.deepQuery([$,_],"itemStyle.normal.label.formatter"));var C=this.getDataFromOption($,"-");return A?"function"==typeof A?A.call(this.myChart,{seriesName:_.name,series:_,name:D,value:C,data:$,status:B}):"string"==typeof A?A=A.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}").replace("{a0}",_.name).replace("{b0}",D).replace("{c0}",this.numAddCommas(C)):void 0:C instanceof Array?null!=C[2]?this.numAddCommas(C[2]):C[0]+" , "+C[1]:this.numAddCommas(C)},buildMark:function(_){var $=this.series[_];this.selectedMap[$.name]&&($.markLine&&this._buildMarkLine(_),$.markPoint&&this._buildMarkPoint(_))},_buildMarkPoint:function(B){for(var A,L,G=(this.markAttachStyle||{})[B],F=this.series[B],I=J.clone(F.markPoint),E=0,C=I.data.length;C>E;E++)A=I.data[E],L=this.getMarkCoord(B,A),A.x=null!=A.x?A.x:L[0],A.y=null!=A.y?A.y:L[1],!A.type||"max"!==A.type&&"min"!==A.type||(A.value=L[3],A.name=A.name||A.type,A.symbolSize=A.symbolSize||$.getTextWidth(L[3],this.getFont())/2+5);for(var K=this._markPoint(B,I),E=0,C=K.length;C>E;E++){var _=K[E];_.zlevel=F.zlevel,_.z=F.z+1;for(var D in G)_[D]=J.clone(G[D]);this.shapeList.push(_)}if(this.type===H.CHART_TYPE_FORCE||this.type===H.CHART_TYPE_CHORD)for(E=0,C=K.length;C>E;E++)this.zr.addShape(K[E])},_buildMarkLine:function(A){for(var M,I=(this.markAttachStyle||{})[A],D=this.series[A],C=J.clone(D.markLine),E=0,O=C.data.length;O>E;E++){var N=C.data[E];!N.type||"max"!==N.type&&"min"!==N.type&&"average"!==N.type?M=[this.getMarkCoord(A,N[0]),this.getMarkCoord(A,N[1])]:(M=this.getMarkCoord(A,N),C.data[E]=[J.clone(N),{}],C.data[E][0].name=N.name||N.type,C.data[E][0].value="average"!==N.type?M[3]:+M[3].toFixed(null!=C.precision?C.precision:this.deepQuery([this.ecTheme,H],"markLine.precision")),M=M[2],N=[{},{}]),null!=M&&null!=M[0]&&null!=M[1]&&(C.data[E][0].x=null!=N[0].x?N[0].x:M[0][0],C.data[E][0].y=null!=N[0].y?N[0].y:M[0][1],C.data[E][1].x=null!=N[1].x?N[1].x:M[1][0],C.data[E][1].y=null!=N[1].y?N[1].y:M[1][1])}var _=this._markLine(A,C),B=C.large;if(B){var G=new F({style:{shapeList:_}}),P=_[0];if(P){J.merge(G.style,P.style),J.merge(G.highlightStyle={},P.highlightStyle),G.style.brushType="stroke",G.zlevel=D.zlevel,G.z=D.z+1,G.hoverable=!1;for(var K in I)G[K]=J.clone(I[K])}this.shapeList.push(G),this.zr.addShape(G),G._mark="largeLine";var L=C.effect;L.show&&(G.effect=L)}else{for(E=0,O=_.length;O>E;E++){var $=_[E];$.zlevel=D.zlevel,$.z=D.z+1;for(K in I)$[K]=J.clone(I[K]);this.shapeList.push($)}if(this.type===H.CHART_TYPE_FORCE||this.type===H.CHART_TYPE_CHORD)for(E=0,O=_.length;O>E;E++)this.zr.addShape(_[E])}},_markPoint:function(B,O){var L=this.series[B],F=this.component;J.merge(J.merge(O,J.clone(this.ecTheme.markPoint||{})),J.clone(H.markPoint)),O.name=L.name;var E,G,Q,P,I,D,K,R=[],M=O.data,N=F.dataRange,A=F.legend,$=this.zr.getWidth(),T=this.zr.getHeight();if(O.large)E=this.getLargeMarkPointShape(B,O),E._mark="largePoint",E&&R.push(E);else for(var C=0,S=M.length;S>C;C++)null!=M[C].x&&null!=M[C].y&&(Q=null!=M[C].value?M[C].value:"",A&&(G=A.getColor(L.name)),N&&(G=isNaN(Q)?G:N.getColor(Q),P=[M[C],O],I=this.deepQuery(P,"itemStyle.normal.color")||G,D=this.deepQuery(P,"itemStyle.emphasis.color")||I,null==I&&null==D)||(G=null==G?this.zr.getColor(B):G,M[C].tooltip=M[C].tooltip||O.tooltip||{trigger:"item"},M[C].name=null!=M[C].name?M[C].name:"",M[C].value=Q,E=this.getSymbolShape(O,B,M[C],C,M[C].name,this.parsePercent(M[C].x,$),this.parsePercent(M[C].y,T),"pin",G,"rgba(0,0,0,0)","horizontal"),E._mark="point",K=this.deepMerge([M[C],O],"effect"),K.show&&(E.effect=K),L.type===H.CHART_TYPE_MAP&&(E._geo=this.getMarkGeo(M[C])),_.pack(E,L,B,M[C],C,M[C].name,Q),R.push(E)));return R},_markLine:function(){function $(_,$){_[$]=_[$]instanceof Array?_[$].length>1?_[$]:[_[$][0],_[$][0]]:[_[$],_[$]]}return function(W,R){var Q=this.series[W],S=this.component,b=S.dataRange,a=S.legend;J.merge(J.merge(R,J.clone(this.ecTheme.markLine||{})),J.clone(H.markLine));var T=a?a.getColor(Q.name):this.zr.getColor(W);$(R,"symbol"),$(R,"symbolSize"),$(R,"symbolRotate");for(var P=R.data,U=[],c=this.zr.getWidth(),Z=this.zr.getHeight(),N=0;NN;N++){var C=U[N],F=C.rawEdge||C,K=F.rawData,e=null!=K.value?K.value:"",D=this.getMarkLineShape(R,W,K,N,C.points,B,F.color);D._mark="line";var A=this.deepMerge([K[0],K[1],R],"effect");A.show&&(D.effect=A,D.effect.large=R.large),Q.type===H.CHART_TYPE_MAP&&(D._geo=[this.getMarkGeo(K[0]),this.getMarkGeo(K[1])]),_.pack(D,Q,W,K[0],N,K[0].name+(""!==K[1].name?" > "+K[1].name:""),e),E.push(D)}return E}}(),getMarkCoord:function(){return[0,0]},getSymbolShape:function(H,T,P,K,V,U,L,O,J,M,W){var S=[P,H],B=this.getDataFromOption(P,"-");O=this.deepQuery(S,"symbol")||O;var A=this.deepQuery(S,"symbolSize");A="function"==typeof A?A(B):A,"number"==typeof A&&(A=[A,A]);var G=this.deepQuery(S,"symbolRotate"),F=this.deepMerge(S,"itemStyle.normal"),X=this.deepMerge(S,"itemStyle.emphasis"),I=null!=F.borderWidth?F.borderWidth:F.lineStyle&&F.lineStyle.width;null==I&&(I=O.match("empty")?2:0);var E=null!=X.borderWidth?X.borderWidth:X.lineStyle&&X.lineStyle.width;null==E&&(E=I+2);var Y=this.getItemStyleColor(F.color,T,K,P),N=this.getItemStyleColor(X.color,T,K,P),R=A[0],$=A[1],Q=new C({style:{iconType:O.replace("empty","").toLowerCase(),x:U-R,y:L-$,width:2*R,height:2*$,brushType:"both",color:O.match("empty")?M:Y||J,strokeColor:F.borderColor||Y||J,lineWidth:I},highlightStyle:{color:O.match("empty")?M:N||Y||J,strokeColor:X.borderColor||F.borderColor||N||Y||J,lineWidth:E},clickable:this.deepQuery(S,"clickable")});return O.match("image")&&(Q.style.image=O.replace(new RegExp("^image:\\/\\/"),""),Q=new D({style:Q.style,highlightStyle:Q.highlightStyle,clickable:this.deepQuery(S,"clickable")})),null!=G&&(Q.rotation=[G*Math.PI/180,U,L]),O.match("star")&&(Q.style.iconType="star",Q.style.n=O.replace("empty","").replace("star","")-0||5),"none"===O&&(Q.invisible=!0,Q.hoverable=!1),Q=this.addLabel(Q,H,P,V,W),O.match("empty")&&(null==Q.style.textColor&&(Q.style.textColor=Q.style.strokeColor),null==Q.highlightStyle.textColor&&(Q.highlightStyle.textColor=Q.highlightStyle.strokeColor)),_.pack(Q,H,T,P,K,V),Q._x=U,Q._y=L,Q._dataIndex=K,Q._seriesIndex=T,Q},getMarkLineShape:function(B,R,L,G,F,S,H){var K=null!=L[0].value?L[0].value:"-",A=null!=L[1].value?L[1].value:"-",D=[L[0].symbol||B.symbol[0],L[1].symbol||B.symbol[1]],I=[L[0].symbolSize||B.symbolSize[0],L[1].symbolSize||B.symbolSize[1]];I[0]="function"==typeof I[0]?I[0](K):I[0],I[1]="function"==typeof I[1]?I[1](A):I[1];var T=[this.query(L[0],"symbolRotate")||B.symbolRotate[0],this.query(L[1],"symbolRotate")||B.symbolRotate[1]],P=[L[0],L[1],B],Q=this.deepMerge(P,"itemStyle.normal");Q.color=this.getItemStyleColor(Q.color,R,G,L);var M=this.deepMerge(P,"itemStyle.emphasis");M.color=this.getItemStyleColor(M.color,R,G,L);var _=Q.lineStyle,$=M.lineStyle,V=_.width;null==V&&(V=Q.borderWidth);var C=$.width;null==C&&(C=null!=M.borderWidth?M.borderWidth:V+2);var U=this.deepQuery(P,"smoothness");this.deepQuery(P,"smooth")||(U=0);var W=S?N:E,J=new W({style:{symbol:D,symbolSize:I,symbolRotate:T,brushType:"both",lineType:_.type,shadowColor:_.shadowColor||_.color||Q.borderColor||Q.color||H,shadowBlur:_.shadowBlur,shadowOffsetX:_.shadowOffsetX,shadowOffsetY:_.shadowOffsetY,color:Q.color||H,strokeColor:_.color||Q.borderColor||Q.color||H,lineWidth:V,symbolBorderColor:Q.borderColor||Q.color||H,symbolBorder:Q.borderWidth},highlightStyle:{shadowColor:$.shadowColor,shadowBlur:$.shadowBlur,shadowOffsetX:$.shadowOffsetX,shadowOffsetY:$.shadowOffsetY,color:M.color||Q.color||H,strokeColor:$.color||_.color||M.borderColor||Q.borderColor||M.color||Q.color||H,lineWidth:C,symbolBorderColor:M.borderColor||Q.borderColor||M.color||Q.color||H,symbolBorder:null==M.borderWidth?Q.borderWidth+2:M.borderWidth},clickable:this.deepQuery(P,"clickable")}),O=J.style;return S?(O.pointList=F,O.smooth=U):(O.xStart=F[0][0],O.yStart=F[0][1],O.xEnd=F[1][0],O.yEnd=F[1][1],O.curveness=U,J.updatePoints(J.style)),J=this.addLabel(J,B,L[0],L[0].name+" : "+L[1].name)},getLargeMarkPointShape:function(_,L){var H,C,B,D,M,E,G=this.series[_],$=this.component,A=L.data,F=$.dataRange,N=$.legend,J=[A[0],L];if(N&&(C=N.getColor(G.name)),!F||(B=null!=A[0].value?A[0].value:"",C=isNaN(B)?C:F.getColor(B),D=this.deepQuery(J,"itemStyle.normal.color")||C,M=this.deepQuery(J,"itemStyle.emphasis.color")||D,null!=D||null!=M)){C=this.deepMerge(J,"itemStyle.normal").color||C;var K=this.deepQuery(J,"symbol")||"circle";K=K.replace("empty","").replace(/\d/g,""),E=this.deepMerge([A[0],L],"effect");var I=window.devicePixelRatio||1;return H=new O({style:{pointList:A,color:C,strokeColor:C,shadowColor:E.shadowColor||C,shadowBlur:(null!=E.shadowBlur?E.shadowBlur:8)*I,size:this.deepQuery(J,"symbolSize"),iconType:K,brushType:"fill",lineWidth:1},draggable:!1,hoverable:!1}),E.show&&(H.effect=E),H}},backupShapeList:function(){this.shapeList&&this.shapeList.length>0?(this.lastShapeList=this.shapeList,this.shapeList=[]):this.lastShapeList=[]},addShapeList:function(){var A,_,K=this.option.animationThreshold/(this.canvasSupported?2:4),F=this.lastShapeList,E=this.shapeList,G=F.length>0,D=G?this.query(this.option,"animationDurationUpdate"):this.query(this.option,"animationDuration"),B=this.query(this.option,"animationEasing"),I={},$={};if(this.option.animation&&!this.option.renderAsImage&&E.lengthC;C++)_=this._getAnimationKey(F[C]),_.match("undefined")?this.zr.delShape(F[C].id):(_+=F[C].type,I[_]?this.zr.delShape(F[C].id):I[_]=F[C]);for(C=0,J=E.length;J>C;C++)_=this._getAnimationKey(E[C]),_.match("undefined")?this.zr.addShape(E[C]):(_+=E[C].type,$[_]=E[C]);for(_ in I)$[_]||this.zr.delShape(I[_].id);for(_ in $)I[_]?(this.zr.delShape(I[_].id),this._animateMod(I[_],$[_],D,B,0,G)):(A=this.type!=H.CHART_TYPE_LINE&&this.type!=H.CHART_TYPE_RADAR||0===_.indexOf("icon")?0:D/2,this._animateMod(!1,$[_],D,B,A,G));this.zr.refresh(),this.animationEffect()}else{this.motionlessOnce=!1,this.zr.delShape(F);for(C=0,J=E.length;J>C;C++)this.zr.addShape(E[C])}},_getAnimationKey:function($){return this.type!=H.CHART_TYPE_MAP&&this.type!=H.CHART_TYPE_TREEMAP&&this.type!=H.CHART_TYPE_VENN&&this.type!=H.CHART_TYPE_TREE?_.get($,"seriesIndex")+"_"+_.get($,"dataIndex")+($._mark?$._mark:"")+(this.type===H.CHART_TYPE_RADAR?_.get($,"special"):""):_.get($,"seriesIndex")+"_"+_.get($,"dataIndex")+($._mark?$._mark:"undefined")},_animateMod:function(A,$,F,D,C,E){switch($.type){case"polyline":case"half-smooth-polygon":B.pointList(this.zr,A,$,F,D);break;case"rectangle":B.rectangle(this.zr,A,$,F,D);break;case"image":case"icon":B.icon(this.zr,A,$,F,D,C);break;case"candle":E?this.zr.addShape($):B.candle(this.zr,A,$,F,D);break;case"ring":case"sector":case"circle":E?"sector"===$.type?B.sector(this.zr,A,$,F,D):this.zr.addShape($):B.ring(this.zr,A,$,F+(_.get($,"dataIndex")||0)%20*100,D);break;case"text":B.text(this.zr,A,$,F,D);break;case"polygon":E?B.pointList(this.zr,A,$,F,D):B.polygon(this.zr,A,$,F,D);break;case"ribbon":B.ribbon(this.zr,A,$,F,D);break;case"gauge-pointer":B.gaugePointer(this.zr,A,$,F,D);break;case"mark-line":B.markline(this.zr,A,$,F,D);break;case"bezier-curve":case"line":B.line(this.zr,A,$,F,D);break;default:this.zr.addShape($)}},animationMark:function(_,$,C){for(var C=C||this.shapeList,B=0,A=C.length;A>B;B++)C[B]._mark&&this._animateMod(!1,C[B],_,$,0,!0);this.animationEffect(C)},animationEffect:function(_){if(!_&&this.clearEffectShape(),_=_||this.shapeList,null!=_){var $=H.EFFECT_ZLEVEL;this.canvasSupported&&this.zr.modLayer($,{motionBlur:!0,lastFrameAlpha:this.option.effectBlendAlpha||H.effectBlendAlpha});for(var C,B=0,A=_.length;A>B;B++)C=_[B],C._mark&&C.effect&&C.effect.show&&G[C._mark]&&(G[C._mark](this.zr,this.effectList,C,$),this.effectList[this.effectList.length-1]._mark=C._mark)}},clearEffectShape:function(_){var $=this.effectList;if(this.zr&&$&&$.length>0){_&&this.zr.modLayer(H.EFFECT_ZLEVEL,{motionBlur:!1}),this.zr.delShape($);for(var A=0;A<$.length;A++)$[A].effectAnimator&&$[A].effectAnimator.stop()}this.effectList=[]},addMark:function(_,$,H){var D=this.series[_];if(this.selectedMap[D.name]){var C=this.query(this.option,"animationDurationUpdate"),E=this.query(this.option,"animationEasing"),B=D[H].data,A=this.shapeList.length;if(D[H].data=$.data,this["_build"+H.replace("m","M")](_),this.option.animation&&!this.option.renderAsImage)this.animationMark(C,E,this.shapeList.slice(A));else{for(var F=A,G=this.shapeList.length;G>F;F++)this.zr.addShape(this.shapeList[F]);this.zr.refreshNextFrame()}D[H].data=B}},delMark:function(A,$,H){H=H.replace("mark","").replace("large","").toLowerCase();var E=this.series[A];if(this.selectedMap[E.name]){for(var D=!1,F=[this.shapeList,this.effectList],C=2;C--;)for(var B=0,G=F[C].length;G>B;B++)if(F[C][B]._mark==H&&_.get(F[C][B],"seriesIndex")==A&&_.get(F[C][B],"name")==$){this.zr.delShape(F[C][B].id),F[C].splice(B,1),D=!0;break}D&&this.zr.refreshNextFrame()}}},J.inherits(I,K),I}),define("zrender/shape/Circle",["require","./Base","../tool/util"],function(_){"use strict";var $=_("./Base"),A=function(_){$.call(this,_)};return A.prototype={type:"circle",buildPath:function(_,$){_.moveTo($.x+$.r,$.y),_.arc($.x,$.y,$.r,0,2*Math.PI,!0)},getRect:function(_){if(_.__rect)return _.__rect;var $;return $="stroke"==_.brushType||"fill"==_.brushType?_.lineWidth||1:0,_.__rect={x:Math.round(_.x-_.r-$/2),y:Math.round(_.y-_.r-$/2),width:2*_.r+$,height:2*_.r+$},_.__rect}},_("../tool/util").inherits(A,$),A}),define("echarts/util/accMath",[],function(){function _(_,$){var D=_.toString(),B=$.toString(),A=0;try{A=B.split(".")[1].length}catch(C){}try{A-=D.split(".")[1].length}catch(C){}return(D.replace(".","")-0)/(B.replace(".","")-0)*Math.pow(10,A)}function $(_,$){var D=_.toString(),B=$.toString(),A=0;try{A+=D.split(".")[1].length}catch(C){}try{A+=B.split(".")[1].length}catch(C){}return(D.replace(".","")-0)*(B.replace(".","")-0)/Math.pow(10,A)}function B(_,$){var D=0,B=0;try{D=_.toString().split(".")[1].length}catch(A){}try{B=$.toString().split(".")[1].length}catch(A){}var C=Math.pow(10,Math.max(D,B));return(Math.round(_*C)+Math.round($*C))/C}function A(_,$){return B(_,-$)}return{accDiv:_,accMul:$,accAdd:B,accSub:A}}),define("echarts/util/shape/Icon",["require","zrender/tool/util","zrender/shape/Star","zrender/shape/Heart","zrender/shape/Droplet","zrender/shape/Image","zrender/shape/Base"],function(J){function X(_,$){var D=$.x,B=$.y,A=$.width/16,C=$.height/16;_.moveTo(D,B+$.height),_.lineTo(D+5*A,B+14*C),_.lineTo(D+$.width,B+3*C),_.lineTo(D+13*A,B),_.lineTo(D+2*A,B+11*C),_.lineTo(D,B+$.height),_.moveTo(D+6*A,B+10*C),_.lineTo(D+14*A,B+2*C),_.moveTo(D+10*A,B+13*C),_.lineTo(D+$.width,B+13*C),_.moveTo(D+13*A,B+10*C),_.lineTo(D+13*A,B+$.height)}function T(_,$){var D=$.x,B=$.y,A=$.width/16,C=$.height/16;_.moveTo(D,B+$.height),_.lineTo(D+5*A,B+14*C),_.lineTo(D+$.width,B+3*C),_.lineTo(D+13*A,B),_.lineTo(D+2*A,B+11*C),_.lineTo(D,B+$.height),_.moveTo(D+6*A,B+10*C),_.lineTo(D+14*A,B+2*C),_.moveTo(D+10*A,B+13*C),_.lineTo(D+$.width,B+13*C)}function N(_,$){var D=$.x,B=$.y,A=$.width/16,C=$.height/16;_.moveTo(D+4*A,B+15*C),_.lineTo(D+9*A,B+13*C),_.lineTo(D+14*A,B+8*C),_.lineTo(D+11*A,B+5*C),_.lineTo(D+6*A,B+10*C),_.lineTo(D+4*A,B+15*C),_.moveTo(D+5*A,B),_.lineTo(D+11*A,B),_.moveTo(D+5*A,B+C),_.lineTo(D+11*A,B+C),_.moveTo(D,B+2*C),_.lineTo(D+$.width,B+2*C),_.moveTo(D,B+5*C),_.lineTo(D+3*A,B+$.height),_.lineTo(D+13*A,B+$.height),_.lineTo(D+$.width,B+5*C)}function M(_,$){var D=$.x,B=$.y,A=$.width/16,C=$.height/16;_.moveTo(D,B+3*C),_.lineTo(D+6*A,B+3*C),_.moveTo(D+3*A,B),_.lineTo(D+3*A,B+6*C),_.moveTo(D+3*A,B+8*C),_.lineTo(D+3*A,B+$.height),_.lineTo(D+$.width,B+$.height),_.lineTo(D+$.width,B+3*C),_.lineTo(D+8*A,B+3*C)}function O(_,$){var D=$.x,B=$.y,A=$.width/16,C=$.height/16;_.moveTo(D+6*A,B),_.lineTo(D+2*A,B+3*C),_.lineTo(D+6*A,B+6*C),_.moveTo(D+2*A,B+3*C),_.lineTo(D+14*A,B+3*C),_.lineTo(D+14*A,B+11*C),_.moveTo(D+2*A,B+5*C),_.lineTo(D+2*A,B+13*C),_.lineTo(D+14*A,B+13*C),_.moveTo(D+10*A,B+10*C),_.lineTo(D+14*A,B+13*C),_.lineTo(D+10*A,B+$.height)}function Z(_,$){var E=$.x,C=$.y,B=$.width/16,D=$.height/16,A=$.width/2;_.lineWidth=1.5,_.arc(E+A,C+A,A-B,0,2*Math.PI/3),_.moveTo(E+3*B,C+$.height),_.lineTo(E+0*B,C+12*D),_.lineTo(E+5*B,C+11*D),_.moveTo(E,C+8*D),_.arc(E+A,C+A,A-B,Math.PI,5*Math.PI/3),_.moveTo(E+13*B,C),_.lineTo(E+$.width,C+4*D),_.lineTo(E+11*B,C+5*D)}function Y(_,$){var D=$.x,B=$.y,A=$.width/16,C=$.height/16;_.moveTo(D,B),_.lineTo(D,B+$.height),_.lineTo(D+$.width,B+$.height),_.moveTo(D+2*A,B+14*C),_.lineTo(D+7*A,B+6*C),_.lineTo(D+11*A,B+11*C),_.lineTo(D+15*A,B+2*C)}function P(_,$){var D=$.x,B=$.y,A=$.width/16,C=$.height/16;_.moveTo(D,B),_.lineTo(D,B+$.height),_.lineTo(D+$.width,B+$.height),_.moveTo(D+3*A,B+14*C),_.lineTo(D+3*A,B+6*C),_.lineTo(D+4*A,B+6*C),_.lineTo(D+4*A,B+14*C),_.moveTo(D+7*A,B+14*C),_.lineTo(D+7*A,B+2*C),_.lineTo(D+8*A,B+2*C),_.lineTo(D+8*A,B+14*C),_.moveTo(D+11*A,B+14*C),_.lineTo(D+11*A,B+9*C),_.lineTo(D+12*A,B+9*C),_.lineTo(D+12*A,B+14*C)}function S(_,$){var E=$.x,C=$.y,B=$.width-2,D=$.height-2,A=Math.min(B,D)/2;C+=2,_.moveTo(E+A+3,C+A-3),_.arc(E+A+3,C+A-3,A-1,0,-Math.PI/2,!0),_.lineTo(E+A+3,C+A-3),_.moveTo(E+A,C),_.lineTo(E+A,C+A),_.arc(E+A,C+A,A,-Math.PI/2,2*Math.PI,!0),_.lineTo(E+A,C+A),_.lineWidth=1.5}function I(_,$){var D=$.x,B=$.y,A=$.width/16,C=$.height/16;B-=C,_.moveTo(D+1*A,B+2*C),_.lineTo(D+15*A,B+2*C),_.lineTo(D+14*A,B+3*C),_.lineTo(D+2*A,B+3*C),_.moveTo(D+3*A,B+6*C),_.lineTo(D+13*A,B+6*C),_.lineTo(D+12*A,B+7*C),_.lineTo(D+4*A,B+7*C),_.moveTo(D+5*A,B+10*C),_.lineTo(D+11*A,B+10*C),_.lineTo(D+10*A,B+11*C),_.lineTo(D+6*A,B+11*C),_.moveTo(D+7*A,B+14*C),_.lineTo(D+9*A,B+14*C),_.lineTo(D+8*A,B+15*C),_.lineTo(D+7*A,B+15*C)}function L(_,$){var G=$.x,D=$.y,C=$.width,E=$.height,B=C/16,A=E/16,F=2*Math.min(B,A);_.moveTo(G+B+F,D+A+F),_.arc(G+B,D+A,F,Math.PI/4,3*Math.PI),_.lineTo(G+7*B-F,D+6*A-F),_.arc(G+7*B,D+6*A,F,Math.PI/4*5,4*Math.PI),_.arc(G+7*B,D+6*A,F/2,Math.PI/4*5,4*Math.PI),_.moveTo(G+7*B-F/2,D+6*A+F),_.lineTo(G+B+F,D+14*A-F),_.arc(G+B,D+14*A,F,-Math.PI/4,2*Math.PI),_.moveTo(G+7*B+F/2,D+6*A),_.lineTo(G+14*B-F,D+10*A-F/2),_.moveTo(G+16*B,D+10*A),_.arc(G+14*B,D+10*A,F,0,3*Math.PI),_.lineWidth=1.5}function Q(_,$){var E=$.x,C=$.y,B=$.width,D=$.height,A=Math.min(B,D)/2;_.moveTo(E+B,C+D/2),_.arc(E+A,C+A,A,0,2*Math.PI),_.arc(E+A,C,A,Math.PI/4,Math.PI/5*4),_.arc(E,C+A,A,-Math.PI/3,Math.PI/3),_.arc(E+B,C+D,A,Math.PI,Math.PI/2*3),_.lineWidth=1.5}function a(_,$){for(var G=$.x,D=$.y,C=$.width,E=$.height,B=Math.round(E/3),A=Math.round((B-2)/2),F=3;F--;)_.rect(G,D+B*F+A,C,2)}function W(_,$){for(var G=$.x,D=$.y,C=$.width,E=$.height,B=Math.round(C/3),A=Math.round((B-2)/2),F=3;F--;)_.rect(G+B*F+A,D,2,E)}function C(_,$){var C=$.x,B=$.y,A=$.width/16;_.moveTo(C+A,B),_.lineTo(C+A,B+$.height),_.lineTo(C+15*A,B+$.height),_.lineTo(C+15*A,B),_.lineTo(C+A,B),_.moveTo(C+3*A,B+3*A),_.lineTo(C+13*A,B+3*A),_.moveTo(C+3*A,B+6*A),_.lineTo(C+13*A,B+6*A),_.moveTo(C+3*A,B+9*A),_.lineTo(C+13*A,B+9*A),_.moveTo(C+3*A,B+12*A),_.lineTo(C+9*A,B+12*A)}function A(_,$){var D=$.x,B=$.y,A=$.width/16,C=$.height/16;_.moveTo(D,B),_.lineTo(D,B+$.height),_.lineTo(D+$.width,B+$.height),_.lineTo(D+$.width,B),_.lineTo(D,B),_.moveTo(D+4*A,B),_.lineTo(D+4*A,B+8*C),_.lineTo(D+12*A,B+8*C),_.lineTo(D+12*A,B),_.moveTo(D+6*A,B+11*C),_.lineTo(D+6*A,B+13*C),_.lineTo(D+10*A,B+13*C),_.lineTo(D+10*A,B+11*C),_.lineTo(D+6*A,B+11*C)}function H(_,$){var D=$.x,B=$.y,A=$.width,C=$.height;_.moveTo(D,B+C/2),_.lineTo(D+A,B+C/2),_.moveTo(D+A/2,B),_.lineTo(D+A/2,B+C)}function G(_,$){var C=$.width/2,B=$.height/2,A=Math.min(C,B);_.moveTo($.x+C+A,$.y+B),_.arc($.x+C,$.y+B,A,0,2*Math.PI),_.closePath()}function b(_,$){_.rect($.x,$.y,$.width,$.height),_.closePath()}function K(_,$){var E=$.width/2,C=$.height/2,B=$.x+E,D=$.y+C,A=Math.min(E,C);_.moveTo(B,D-A),_.lineTo(B+A,D+A),_.lineTo(B-A,D+A),_.lineTo(B,D-A),_.closePath()}function E(_,$){var E=$.width/2,C=$.height/2,B=$.x+E,D=$.y+C,A=Math.min(E,C);_.moveTo(B,D-A),_.lineTo(B+A,D),_.lineTo(B,D+A),_.lineTo(B-A,D),_.lineTo(B,D-A),_.closePath()}function c(_,$){var C=$.x,B=$.y,A=$.width/16;_.moveTo(C+8*A,B),_.lineTo(C+A,B+$.height),_.lineTo(C+8*A,B+$.height/4*3),_.lineTo(C+15*A,B+$.height),_.lineTo(C+8*A,B),_.closePath()}function R($,C){var A=J("zrender/shape/Star"),_=C.width/2,B=C.height/2;A.prototype.buildPath($,{x:C.x+_,y:C.y+B,r:Math.min(_,B),n:C.n||5})}function V($,A){var _=J("zrender/shape/Heart");_.prototype.buildPath($,{x:A.x+A.width/2,y:A.y+0.2*A.height,a:A.width/2,b:0.8*A.height})}function $($,A){var _=J("zrender/shape/Droplet");_.prototype.buildPath($,{x:A.x+0.5*A.width,y:A.y+0.5*A.height,a:0.5*A.width,b:0.8*A.height})}function U(_,$){var E=$.x,C=$.y-$.height/2*1.5,B=$.width/2,D=$.height/2,A=Math.min(B,D);_.arc(E+B,C+D,A,Math.PI/5*4,Math.PI/5),_.lineTo(E+B,C+D+1.5*A),_.closePath()}function B($,C,A){var _=J("zrender/shape/Image");this._imageShape=this._imageShape||new _({style:{}});for(var B in C)this._imageShape.style[B]=C[B];this._imageShape.brush($,!1,A)}function F($){D.call(this,$)}var _=J("zrender/tool/util"),D=J("zrender/shape/Base");return F.prototype={type:"icon",iconLibrary:{mark:X,markUndo:T,markClear:N,dataZoom:M,dataZoomReset:O,restore:Z,lineChart:Y,barChart:P,pieChart:S,funnelChart:I,forceChart:L,chordChart:Q,stackChart:a,tiledChart:W,dataView:C,saveAsImage:A,cross:H,circle:G,rectangle:b,triangle:K,diamond:E,arrow:c,star:R,heart:V,droplet:$,pin:U,image:B},brush:function($,D,B){var A=D?this.highlightStyle:this.style;A=A||{};var C=A.iconType||this.style.iconType;if("image"===C){var _=J("zrender/shape/Image");_.prototype.brush.call(this,$,D,B)}else{A=this.beforeBrush($,D);switch($.beginPath(),this.buildPath($,A,B),A.brushType){case"both":$.fill();case"stroke":A.lineWidth>0&&$.stroke();break;default:$.fill()}this.drawText($,A,this.style),this.afterBrush($)}},buildPath:function(_,$,A){this.iconLibrary[$.iconType]?this.iconLibrary[$.iconType].call(this,_,$,A):(_.moveTo($.x,$.y),_.lineTo($.x+$.width,$.y),_.lineTo($.x+$.width,$.y+$.height),_.lineTo($.x,$.y+$.height),_.lineTo($.x,$.y),_.closePath())},getRect:function($){return $.__rect?$.__rect:($.__rect={x:Math.round($.x),y:Math.round($.y-("pin"==$.iconType?$.height/2*1.5:0)),width:$.width,height:$.height*("pin"===$.iconType?1.25:1)},$.__rect)},isCover:function(_,$){var C=this.transformCoordToLocal(_,$);_=C[0],$=C[1];var B=this.style.__rect;B||(B=this.style.__rect=this.getRect(this.style));var A=B.height<8||B.width<8?4:0;return _>=B.x-A&&_<=B.x+B.width+A&&$>=B.y-A&&$<=B.y+B.height+A}},_.inherits(F,D),F}),define("echarts/util/shape/MarkLine",["require","zrender/shape/Base","./Icon","zrender/shape/Line","zrender/shape/BezierCurve","zrender/tool/area","zrender/shape/util/dashedLineTo","zrender/tool/util","zrender/tool/curve"],function(_){function H($){G.call(this,$),this.style.curveness>0&&this.updatePoints(this.style),this.highlightStyle.curveness>0&&this.updatePoints(this.highlightStyle)}var G=_("zrender/shape/Base"),C=_("./Icon"),B=_("zrender/shape/Line"),D=new B({}),J=_("zrender/shape/BezierCurve"),I=new J({}),E=_("zrender/tool/area"),F=_("zrender/shape/util/dashedLineTo"),$=_("zrender/tool/util"),A=_("zrender/tool/curve");return H.prototype={type:"mark-line",brush:function(_,$){var A=this.style;$&&(A=this.getHighlightStyle(A,this.highlightStyle||{})),_.save(),this.setContext(_,A),this.setTransform(_),_.save(),_.beginPath(),this.buildPath(_,A),_.stroke(),_.restore(),this.brushSymbol(_,A,0),this.brushSymbol(_,A,1),this.drawText(_,A,this.style),_.restore()},buildPath:function(_,$){var C=$.lineType||"solid";if(_.moveTo($.xStart,$.yStart),$.curveness>0){var B=null;switch(C){case"dashed":B=[5,5];break;case"dotted":B=[1,1]}B&&_.setLineDash&&_.setLineDash(B),_.quadraticCurveTo($.cpX1,$.cpY1,$.xEnd,$.yEnd)}else if("solid"==C)_.lineTo($.xEnd,$.yEnd);else{var A=($.lineWidth||1)*("dashed"==$.lineType?5:1);F(_,$.xStart,$.yStart,$.xEnd,$.yEnd,A)}},updatePoints:function(_){var $=_.curveness||0,G=1,D=_.xStart,C=_.yStart,E=_.xEnd,B=_.yEnd,A=(D+E)/2-G*(C-B)*$,F=(C+B)/2-G*(E-D)*$;_.cpX1=A,_.cpY1=F},brushSymbol:function(D,O,K){if("none"!=O.symbol[K]){D.save(),D.beginPath(),D.lineWidth=O.symbolBorder,D.strokeStyle=O.symbolBorderColor;var F=O.symbol[K].replace("empty","").toLowerCase();O.symbol[K].match("empty")&&(D.fillStyle="#fff");var G=O.xStart,Q=O.yStart,P=O.xEnd,H=O.yEnd,J=0===K?G:P,B=0===K?Q:H,I=O.curveness||0,R=null!=O.symbolRotate[K]?O.symbolRotate[K]-0:0;if(R=R/180*Math.PI,"arrow"==F&&0===R)if(0===I){var M=0===K?-1:1;R=Math.PI/2+Math.atan2(M*(H-Q),M*(P-G))}else{var N=O.cpX1,L=O.cpY1,_=A.quadraticDerivativeAt,$=_(G,N,P,K),S=_(Q,L,H,K);R=Math.PI/2+Math.atan2(S,$)}D.translate(J,B),0!==R&&D.rotate(R);var E=O.symbolSize[K];C.prototype.buildPath(D,{x:-E,y:-E,width:2*E,height:2*E,iconType:F}),D.closePath(),D.fill(),D.stroke(),D.restore()}},getRect:function($){return $.curveness>0?I.getRect($):D.getRect($),$.__rect},isCover:function(_,$){var A=this.transformCoordToLocal(_,$);return _=A[0],$=A[1],this.isCoverRect(_,$)?this.style.curveness>0?E.isInside(I,this.style,_,$):E.isInside(D,this.style,_,$):!1}},$.inherits(H,G),H}),define("echarts/util/shape/Symbol",["require","zrender/shape/Base","zrender/shape/Polygon","zrender/tool/util","./normalIsCover"],function(_){function $($){D.call(this,$)}var D=_("zrender/shape/Base"),B=_("zrender/shape/Polygon"),A=new B({}),C=_("zrender/tool/util");return $.prototype={type:"symbol",buildPath:function(A,M){var I=M.pointList,D=I.length;if(0!==D)for(var C,E,O,N,F,H=10000,_=Math.ceil(D/H),B=I[0]instanceof Array,G=M.size?M.size:2,P=G,K=G/2,L=2*Math.PI,J=0;_>J;J++){A.beginPath(),C=J*H,E=C+H,E=E>D?D:E;for(var $=C;E>$;$++)if(M.random&&(O=M["randomMap"+$%20]/100,P=G*O*O,K=P/2),B?(N=I[$][0],F=I[$][1]):(N=I[$].x,F=I[$].y),3>P)A.rect(N-K,F-K,P,P);else switch(M.iconType){case"circle":A.moveTo(N,F),A.arc(N,F,K,0,L,!0);break;case"diamond":A.moveTo(N,F-K),A.lineTo(N+K/3,F-K/3),A.lineTo(N+K,F),A.lineTo(N+K/3,F+K/3),A.lineTo(N,F+K),A.lineTo(N-K/3,F+K/3),A.lineTo(N-K,F),A.lineTo(N-K/3,F-K/3),A.lineTo(N,F-K);break;default:A.rect(N-K,F-K,P,P)}if(A.closePath(),_-1>J)switch(M.brushType){case"both":A.fill(),M.lineWidth>0&&A.stroke();break;case"stroke":M.lineWidth>0&&A.stroke();break;default:A.fill()}}},getRect:function($){return $.__rect||A.getRect($)},isCover:_("./normalIsCover")},C.inherits($,D),$}),define("zrender/shape/Polyline",["require","./Base","./util/smoothSpline","./util/smoothBezier","./util/dashedLineTo","./Polygon","../tool/util"],function(_){var $=_("./Base"),D=_("./util/smoothSpline"),B=_("./util/smoothBezier"),A=_("./util/dashedLineTo"),C=function(_){this.brushTypeOnly="stroke",this.textPosition="end",$.call(this,_)};return C.prototype={type:"polyline",buildPath:function(B,_){var G=_.pointList;if(!(G.length<2)){var H=Math.min(_.pointList.length,Math.round(_.pointListLength||_.pointList.length));if(_.smooth&&"spline"!==_.smooth){_.controlPointList||this.updateControlPoints(_);var F=_.controlPointList;B.moveTo(G[0][0],G[0][1]);for(var C,I,J,$=0;H-1>$;$++)C=F[2*$],I=F[2*$+1],J=G[$+1],B.bezierCurveTo(C[0],C[1],I[0],I[1],J[0],J[1])}else if("spline"===_.smooth&&(G=D(G),H=G.length),_.lineType&&"solid"!=_.lineType){if("dashed"==_.lineType||"dotted"==_.lineType){var E=(_.lineWidth||1)*("dashed"==_.lineType?5:1);B.moveTo(G[0][0],G[0][1]);for($=1;H>$;$++)A(B,G[$-1][0],G[$-1][1],G[$][0],G[$][1],E)}}else{B.moveTo(G[0][0],G[0][1]);for($=1;H>$;$++)B.lineTo(G[$][0],G[$][1])}}},updateControlPoints:function($){$.controlPointList=B($.pointList,$.smooth,!1,$.smoothConstraint)},getRect:function($){return _("./Polygon").prototype.getRect($)}},_("../tool/util").inherits(C,$),C}),define("zrender/shape/ShapeBundle",["require","./Base","../tool/util"],function(_){var $=_("./Base"),A=function(_){$.call(this,_)};return A.prototype={constructor:A,type:"shape-bundle",brush:function(_,$){var D=this.beforeBrush(_,$);_.beginPath();for(var B=0;B0&&_.stroke();break;default:_.fill()}this.drawText(_,D,this.style),this.afterBrush(_)},getRect:function(_){if(_.__rect)return _.__rect;for(var $=1/0,F=-(1/0),D=1/0,C=-(1/0),E=0;E<_.shapeList.length;E++)var B=_.shapeList[E],A=B.getRect(B.style),$=Math.min(A.x,$),D=Math.min(A.y,D),F=Math.max(A.x+A.width,F),C=Math.max(A.y+A.height,C);return _.__rect={x:$,y:D,width:F-$,height:C-D},_.__rect},isCover:function(_,$){var C=this.transformCoordToLocal(_,$);if(_=C[0],$=C[1],this.isCoverRect(_,$))for(var B=0;BF;F++)D[F]=[K[F][0],E]}else for(var $=K[0][0],F=0;J>F;F++)D[F]=[$,K[F][1]];"half-smooth-polygon"==G.type&&(D[J-1]=I.clone(K[J-1]),D[J-2]=I.clone(K[J-2])),H={style:{pointList:D}}}D=H.style.pointList;var A=D.length;G.style.pointList=A==J?D:J>A?D.concat(K.slice(A)):D.slice(0,J),_.addShape(G),G.__animating=!0,_.animate(G.id,"style").when(C,{pointList:K}).during(function(){G.updateControlPoints&&G.updateControlPoints(G.style)}).done(function(){G.__animating=!1}).start(B)}function H(_,$){for(var C=arguments.length,B=2;C>B;B++){var A=arguments[B];_.style[A]=$.style[A]}}function C(A,_,F,E,G){var D=F.style;_||(_={position:F.position,style:{x:D.x,y:"vertical"==F._orient?D.y+D.height:D.y,width:"vertical"==F._orient?D.width:0,height:"vertical"!=F._orient?D.height:0}});var B=D.x,I=D.y,J=D.width,$=D.height,C=[F.position[0],F.position[1]];H(F,_,"x","y","width","height"),F.position=_.position,A.addShape(F),(C[0]!=_.position[0]||C[1]!=_.position[1])&&A.animate(F.id,"").when(E,{position:C}).start(G),F.__animating=!0,A.animate(F.id,"style").when(E,{x:B,y:I,width:J,height:$}).done(function(){F.__animating=!1}).start(G)}function B(_,$,E,C,B){if(!$){var D=E.style.y;$={style:{y:[D[0],D[0],D[0],D[0]]}}}var A=E.style.y;E.style.y=$.style.y,_.addShape(E),E.__animating=!0,_.animate(E.id,"style").when(C,{y:A}).done(function(){E.__animating=!1}).start(B)}function D(_,$,G,D,C){var E=G.style.x,B=G.style.y,A=G.style.r0,F=G.style.r;G.__animating=!0,"r"!=G._animationAdd?(G.style.r0=0,G.style.r=0,G.rotation=[2*Math.PI,E,B],_.addShape(G),_.animate(G.id,"style").when(D,{r0:A,r:F}).done(function(){G.__animating=!1}).start(C),_.animate(G.id,"").when(D,{rotation:[0,E,B]}).start(C)):(G.style.r0=G.style.r,_.addShape(G),_.animate(G.id,"style").when(D,{r0:A}).done(function(){G.__animating=!1}).start(C))}function M(_,$,D,C,E){$||($="r"!=D._animationAdd?{style:{startAngle:D.style.startAngle,endAngle:D.style.startAngle}}:{style:{r0:D.style.r}});var B=D.style.startAngle,A=D.style.endAngle;H(D,$,"startAngle","endAngle"),_.addShape(D),D.__animating=!0,_.animate(D.id,"style").when(C,{startAngle:B,endAngle:A}).done(function(){D.__animating=!1}).start(E)}function L(_,$,D,C,E){$||($={style:{x:"left"==D.style.textAlign?D.style.x+100:D.style.x-100,y:D.style.y}});var B=D.style.x,A=D.style.y;H(D,$,"x","y"),_.addShape(D),D.__animating=!0,_.animate(D.id,"style").when(C,{x:B,y:A}).done(function(){D.__animating=!1}).start(E)}function E($,G,D,C,E){var B=_("zrender/shape/Polygon").prototype.getRect(D.style),A=B.x+B.width/2,F=B.y+B.height/2;D.scale=[0.1,0.1,A,F],$.addShape(D),D.__animating=!0,$.animate(D.id,"").when(C,{scale:[1,1,A,F]}).done(function(){D.__animating=!1}).start(E)}function G(_,$,D,C,E){$||($={style:{source0:0,source1:D.style.source1>0?360:-360,target0:0,target1:D.style.target1>0?360:-360}});var B=D.style.source0,A=D.style.source1,F=D.style.target0,G=D.style.target1;$.style&&H(D,$,"source0","source1","target0","target1"),_.addShape(D),D.__animating=!0,_.animate(D.id,"style").when(C,{source0:B,source1:A,target0:F,target1:G}).done(function(){D.__animating=!1}).start(E)}function $(_,$,D,B,A){$||($={style:{angle:D.style.startAngle}});var C=D.style.angle;D.style.angle=$.style.angle,_.addShape(D),D.__animating=!0,_.animate(D.id,"style").when(B,{angle:C}).done(function(){D.__animating=!1}).start(A)}function A(_,$,G,D,E,B){if(G.style._x=G.style.x,G.style._y=G.style.y,G.style._width=G.style.width,G.style._height=G.style.height,$)C(_,$,G,D,E);else{var A=G._x||0,F=G._y||0;G.scale=[0.01,0.01,A,F],_.addShape(G),G.__animating=!0,_.animate(G.id,"").delay(B).when(D,{scale:[1,1,A,F]}).done(function(){G.__animating=!1}).start(E||"QuinticOut")}}function F(_,$,D,C,E){$||($={style:{xStart:D.style.xStart,yStart:D.style.yStart,xEnd:D.style.xStart,yEnd:D.style.yStart}});var B=D.style.xStart,A=D.style.xEnd,F=D.style.yStart,G=D.style.yEnd;H(D,$,"xStart","xEnd","yStart","yEnd"),_.addShape(D),D.__animating=!0,_.animate(D.id,"style").when(C,{xStart:B,xEnd:A,yStart:F,yEnd:G}).done(function(){D.__animating=!1}).start(E)}function N(A,M,I,D,C){C=C||"QuinticOut",I.__animating=!0,A.addShape(I);var E=I.style,O=function(){I.__animating=!1},N=E.xStart,F=E.yStart,H=E.xEnd,_=E.yEnd;if(E.curveness>0){I.updatePoints(E);var B={p:0},G=E.cpX1,P=E.cpY1,L=[],K=[],$=J.quadraticSubdivide;A.animation.animate(B).when(D,{p:1}).during(function(){$(N,G,H,B.p,L),$(F,P,_,B.p,K),E.cpX1=L[1],E.cpY1=K[1],E.xEnd=L[2],E.yEnd=K[2],A.modShape(I)}).done(O).start(C)}else A.animate(I.id,"style").when(0,{xEnd:N,yEnd:F}).when(D,{xEnd:H,yEnd:_}).done(O).start(C)}var I=_("zrender/tool/util"),J=_("zrender/tool/curve");return{pointList:K,rectangle:C,candle:B,ring:D,sector:M,text:L,polygon:E,ribbon:G,gaugePointer:$,icon:A,line:F,markline:N}}),define("echarts/util/ecEffect",["require","../util/ecData","zrender/shape/Circle","zrender/shape/Image","zrender/tool/curve","../util/shape/Icon","../util/shape/Symbol","zrender/shape/ShapeBundle","zrender/shape/Polyline","zrender/tool/vector","zrender/tool/env"],function(_){function J(B,O,L,F){var E,P=L.effect,H=P.color||L.style.strokeColor||L.style.color,A=P.shadowColor||H,C=P.scaleSize,J=P.bounceDistance,Q="undefined"!=typeof P.shadowBlur?P.shadowBlur:C;"image"!==L.type?(E=new G({zlevel:F,style:{brushType:"stroke",iconType:"droplet"!=L.style.iconType?L.style.iconType:"circle",x:Q+1,y:Q+1,n:L.style.n,width:L.style._width*C,height:L.style._height*C,lineWidth:1,strokeColor:H,shadowColor:A,shadowBlur:Q},draggable:!1,hoverable:!1}),"pin"==L.style.iconType&&(E.style.y+=E.style.height/2*1.5),I&&(E.style.image=B.shapeToImage(E,E.style.width+2*Q+2,E.style.height+2*Q+2).style.image,E=new K({zlevel:E.zlevel,style:E.style,draggable:!1,hoverable:!1}))):E=new K({zlevel:F,style:L.style,draggable:!1,hoverable:!1}),D.clone(L,E),E.position=L.position,O.push(E),B.addShape(E);var N="image"!==L.type?window.devicePixelRatio||1:1,M=(E.style.width/N-L.style._width)/2;E.style.x=L.style._x-M,E.style.y=L.style._y-M,"pin"==L.style.iconType&&(E.style.y-=L.style.height/2*1.5);var _=100*(P.period+10*Math.random());B.modShape(L.id,{invisible:!0});var $=E.style.x+E.style.width/2/N,R=E.style.y+E.style.height/2/N;"scale"===P.type?(B.modShape(E.id,{scale:[0.1,0.1,$,R]}),B.animate(E.id,"",P.loop).when(_,{scale:[1,1,$,R]}).done(function(){L.effect.show=!1,B.delShape(E.id)}).start()):B.animate(E.id,"style",P.loop).when(_,{y:E.style.y-J}).when(2*_,{y:E.style.y}).done(function(){L.effect.show=!1,B.delShape(E.id)}).start()}function H(_,K,H,C){var B=H.effect,D=B.color||H.style.strokeColor||H.style.color,M=B.scaleSize,L=B.shadowColor||D,E="undefined"!=typeof B.shadowBlur?B.shadowBlur:2*M,G=window.devicePixelRatio||1,A=new $({zlevel:C,position:H.position,scale:H.scale,style:{pointList:H.style.pointList,iconType:H.style.iconType,color:D,strokeColor:D,shadowColor:L,shadowBlur:E*G,random:!0,brushType:"fill",lineWidth:1,size:H.style.size},draggable:!1,hoverable:!1});K.push(A),_.addShape(A),_.modShape(H.id,{invisible:!0});for(var F=Math.round(100*B.period),N={},I={},J=0;20>J;J++)A.style["randomMap"+J]=0,N={},N["randomMap"+J]=100,I={},I["randomMap"+J]=0,A.style["randomMap"+J]=100*Math.random(),_.animate(A.id,"style",!0).when(F,N).when(2*F,I).when(3*F,N).when(4*F,N).delay(Math.random()*F*J).start()}function C(U,e,b,Y,X){var f=b.effect,a=b.style,T=f.color||a.strokeColor||a.color,W=f.shadowColor||a.strokeColor||T,N=a.lineWidth*f.scaleSize,H="undefined"!=typeof f.shadowBlur?f.shadowBlur:N,S=new L({zlevel:Y,style:{x:H,y:H,r:N,color:T,shadowColor:W,shadowBlur:H},hoverable:!1}),R=0;if(I&&!X){var Y=S.zlevel;S=U.shapeToImage(S,2*(N+H),2*(N+H)),S.zlevel=Y,S.hoverable=!1,R=H}X||(D.clone(b,S),S.position=b.position,e.push(S),U.addShape(S));var h=function(){X||(b.effect.show=!1,U.delShape(S.id)),S.effectAnimator=null};if(b instanceof F){for(var V=[0],P=0,i=a.pointList,Z=a.controlPointList,d=1;d0){var g=a.cpX1-R,_=a.cpY1-R;S.effectAnimator=U.animation.animate(S,{loop:f.loop}).when($,{p:1}).during(function($,B){S.style.x=E.quadraticAt(C,g,G,B),S.style.y=E.quadraticAt(O,_,A,B),X||U.modShape(S)}).done(h).start()}else S.effectAnimator=U.animation.animate(S.style,{loop:f.loop}).when($,{x:G,y:A}).during(function(){X||U.modShape(S)}).done(h).start();S.effectAnimator.duration=$}return S}function B(_,L,H,B){var D=new A({style:{shapeList:[]},zlevel:B,hoverable:!1}),N=H.style.shapeList,M=H.effect;D.position=H.position;for(var E=0,G=[],$=0;$E&&(E=O.duration),0===$&&(D.style.color=F.style.color,D.style.shadowBlur=F.style.shadowBlur,D.style.shadowColor=F.style.shadowColor),G.push(O)}L.push(D),_.addShape(D);var J=function(){for(var $=0;$=0;D--)$=A.type==E.CHART_TYPE_PIE||A.type==E.CHART_TYPE_FUNNEL?C.get(A.shapeList[D],"name"):(C.get(A.shapeList[D],"series")||{}).name,$!=B||A.shapeList[D].invisible||A.shapeList[D].__animating||A.zr.addHoverShape(A.shapeList[D])},$&&$.bind(E.EVENT.LEGEND_HOVERLINK,this._onlegendhoverlink)}var E=_("../config"),C=_("../util/ecData"),B=_("../util/ecQuery"),D=_("../util/number"),A=_("zrender/tool/util");return $.prototype={canvasSupported:_("zrender/tool/env").canvasSupported,_getZ:function(_){if(null!=this[_])return this[_];var $=this.ecTheme[this.type];return $&&null!=$[_]?$[_]:($=E[this.type],$&&null!=$[_]?$[_]:0)},getZlevelBase:function(){return this._getZ("zlevel")},getZBase:function(){return this._getZ("z")},reformOption:function($){return $=A.merge(A.merge($||{},A.clone(this.ecTheme[this.type]||{})),A.clone(E[this.type]||{})),this.z=$.z,this.zlevel=$.zlevel,$},reformCssArray:function($){if(!($ instanceof Array))return[$,$,$,$];switch($.length+""){case"4":return $;case"3":return[$[0],$[1],$[2],$[1]];case"2":return[$[0],$[1],$[0],$[1]];case"1":return[$[0],$[0],$[0],$[0]];case"0":return[0,0,0,0]}},getShapeById:function(_){for(var $=0,A=this.shapeList.length;A>$;$++)if(this.shapeList[$].id===_)return this.shapeList[$];return null},getFont:function(_){var $=this.getTextStyle(A.clone(_));return $.fontStyle+" "+$.fontWeight+" "+$.fontSize+"px "+$.fontFamily},getTextStyle:function($){return A.merge(A.merge($||{},this.ecTheme.textStyle),E.textStyle)},getItemStyleColor:function(_,$,B,A){return"function"==typeof _?_.call(this.myChart,{seriesIndex:$,series:this.series[$],dataIndex:B,data:A}):_},getDataFromOption:function(_,$){return null!=_?null!=_.value?_.value:_:$},subPixelOptimize:function(_,$){return _=$%2===1?Math.floor(_)+0.5:Math.round(_)},resize:function(){this.refresh&&this.refresh(),this.clearEffectShape&&this.clearEffectShape(!0);var $=this;setTimeout(function(){$.animationEffect&&$.animationEffect()},200)},clear:function(){this.clearEffectShape&&this.clearEffectShape(),this.zr&&this.zr.delShape(this.shapeList),this.shapeList=[]},dispose:function(){this.onbeforDispose&&this.onbeforDispose(),this.clear(),this.shapeList=null,this.effectList=null,this.messageCenter&&this.messageCenter.unbind(E.EVENT.LEGEND_HOVERLINK,this._onlegendhoverlink),this.onafterDispose&&this.onafterDispose()},query:B.query,deepQuery:B.deepQuery,deepMerge:B.deepMerge,parsePercent:D.parsePercent,parseCenter:D.parseCenter,parseRadius:D.parseRadius,numAddCommas:D.addCommas,getPrecision:D.getPrecision},$}),define("echarts/layout/EdgeBundling",["require","../data/KDTree","zrender/tool/vector"],function(A){function _(_,$){_=_.array,$=$.array;var D=$[0]-_[0],B=$[1]-_[1],A=$[2]-_[2],C=$[3]-_[3];return D*D+B*B+A*A+C*C}function K($){this.points=[$.mp0,$.mp1],this.group=$}function F(A){var _=A.points;_[0][1]<_[1][1]||A instanceof K?(this.array=[_[0][0],_[0][1],_[1][0],_[1][1]],this._startPoint=_[0],this._endPoint=_[1]):(this.array=[_[1][0],_[1][1],_[0][0],_[0][1]],this._startPoint=_[1],this._endPoint=_[0]),this.ink=$(_[0],_[1]),this.edge=A,this.group=null}function E(){this.edgeList=[],this.mp0=H(),this.mp1=H(),this.ink=0}function G(){this.maxNearestEdge=6,this.maxTurningAngle=Math.PI/4,this.maxIteration=20}var D=A("../data/KDTree"),B=A("zrender/tool/vector"),H=B.create,J=B.distSquare,$=B.dist,C=B.copy,I=B.clone;return F.prototype.getStartPoint=function(){return this._startPoint},F.prototype.getEndPoint=function(){return this._endPoint},E.prototype.addEdge=function($){$.group=this,this.edgeList.push($)},E.prototype.removeEdge=function($){$.group=null,this.edgeList.splice(this.edgeList.indexOf($),1)},G.prototype={constructor:G,run:function(A){function _(_,$){return J(_,$)<1e-10}function F($,D){for(var B=[],A=0,C=0;C<$.length;C++)A>0&&_($[C],B[A-1])||(B[A++]=I($[C]));return D[0]&&!_(B[0],D[0])&&(B=B.reverse()),B}for(var E=this._iterate(A),G=0;G++I&&(I=J,W=R,C($,T),C(A,S),X=Q)}if(W){U+=I;var P;W.group||(P=new E,K.push(P),P.addEdge(W)),P=W.group,C(P.mp0,A),C(P.mp1,$),P.ink=X,W.group.addEdge(B)}else{P=new E;K.push(P),C(P.mp0,B.getStartPoint()),C(P.mp1,B.getEndPoint()),P.ink=B.ink,P.addEdge(B)}}}return{groups:K,edges:O,savedInk:U}},_calculateEdgeEdgeInk:function(){var A=[],_=[];return function(F,D,C,E){A[0]=F.getStartPoint(),A[1]=D.getStartPoint(),_[0]=F.getEndPoint(),_[1]=D.getEndPoint(),this._calculateMeetPoints(A,_,C,E);var B=$(A[0],C)+$(C,E)+$(E,_[0])+$(A[1],C)+$(E,_[1]);return B}}(),_calculateGroupEdgeInk:function(A,_,H,E){for(var D=[],F=[],C=0;CF;F++)B.add(_,_,G[F]);B.scale(_,_,1/A),A=D.length;for(F=0;A>F;F++)B.add($,$,D[F]);B.scale($,$,1/A),this._limitTurningAngle(G,_,$,C),this._limitTurningAngle(D,$,_,E)}}(),_limitTurningAngle:function(){var A=H(),_=H(),D=H(),C=H();return function(I,K,Q,L){var H=Math.cos(this.maxTurningAngle),M=Math.tan(this.maxTurningAngle);B.sub(A,K,Q),B.normalize(A,A),B.copy(L,K);for(var R=0,O=0;OF){B.scaleAndAdd(D,K,A,N*F);var E=$(D,P),S=E/M;B.scaleAndAdd(C,D,A,-S);var G=J(C,K);G>R&&(R=G,B.copy(L,C))}}}}()},G}),define("zrender/shape/Star",["require","../tool/math","./Base","../tool/util"],function(_){var $=_("../tool/math"),E=$.sin,C=$.cos,B=Math.PI,D=_("./Base"),A=function($){D.call(this,$)};return A.prototype={type:"star",buildPath:function(A,M){var F=M.n;if(F&&!(2>F)){var O=M.x,N=M.y,G=M.r,I=M.r0;null==I&&(I=F>4?G*C(2*B/F)/C(B/F):G/3);var _=B/F,D=-B/2,H=O+G*C(D),P=N+G*E(D);D+=_;var K=M.pointList=[];K.push([H,P]);for(var L,J=0,$=2*F-1;$>J;J++)L=J%2===0?I:G,K.push([O+L*C(D),N+L*E(D)]),D+=_;K.push([H,P]),A.moveTo(K[0][0],K[0][1]);for(J=0;JC;C+=2)A[0]=Math.min(A[0],A[0],F[C]),A[1]=Math.min(A[1],A[1],F[C+1]),I[0]=Math.max(I[0],I[0],F[C]),I[1]=Math.max(I[1],I[1],F[C+1]);break;case"Q":for(C=0;4>C;C+=2)A[0]=Math.min(A[0],A[0],F[C]),A[1]=Math.min(A[1],A[1],F[C+1]),I[0]=Math.max(I[0],I[0],F[C]),I[1]=Math.max(I[1],I[1],F[C+1]);break;case"A":var B=F[0],G=F[1],H=F[2],_=F[3];A[0]=Math.min(A[0],A[0],B-H),A[1]=Math.min(A[1],A[1],G-_),I[0]=Math.max(I[0],I[0],B+H),I[1]=Math.max(I[1],I[1],G+_)}}return{x:A[0],y:A[1],width:I[0]-A[0],height:I[1]-A[1]}},A.prototype.begin=function($){return this._ctx=$||null,this.pathCommands.length=0,this},A.prototype.moveTo=function(_,$){return this.pathCommands.push(new B("M",[_,$])),this._ctx&&this._ctx.moveTo(_,$),this},A.prototype.lineTo=function(_,$){return this.pathCommands.push(new B("L",[_,$])),this._ctx&&this._ctx.lineTo(_,$),this},A.prototype.bezierCurveTo=function(_,$,D,C,E,A){return this.pathCommands.push(new B("C",[_,$,D,C,E,A])),this._ctx&&this._ctx.bezierCurveTo(_,$,D,C,E,A),this},A.prototype.quadraticCurveTo=function(_,$,C,A){return this.pathCommands.push(new B("Q",[_,$,C,A])),this._ctx&&this._ctx.quadraticCurveTo(_,$,C,A),this},A.prototype.arc=function(_,$,D,C,E,A){return this.pathCommands.push(new B("A",[_,$,D,D,C,E-C,0,A?0:1])),this._ctx&&this._ctx.arc(_,$,D,C,E,A),this},A.prototype.arcTo=function(_,$,C,B,A){return this._ctx&&this._ctx.arcTo(_,$,C,B,A),this},A.prototype.rect=function(_,$,B,A){return this._ctx&&this._ctx.rect(_,$,B,A),this},A.prototype.closePath=function(){return this.pathCommands.push(new B("z")),this._ctx&&this._ctx.closePath(),this},A.prototype.isEmpty=function(){return 0===this.pathCommands.length},A.PathSegment=B,A}),define("zrender/shape/Line",["require","./Base","./util/dashedLineTo","../tool/util"],function(_){var $=_("./Base"),B=_("./util/dashedLineTo"),A=function(_){this.brushTypeOnly="stroke",this.textPosition="end",$.call(this,_)};return A.prototype={type:"line",buildPath:function(_,$){if($.lineType&&"solid"!=$.lineType){if("dashed"==$.lineType||"dotted"==$.lineType){var A=($.lineWidth||1)*("dashed"==$.lineType?5:1);B(_,$.xStart,$.yStart,$.xEnd,$.yEnd,A)}}else _.moveTo($.xStart,$.yStart),_.lineTo($.xEnd,$.yEnd)},getRect:function(_){if(_.__rect)return _.__rect;var $=_.lineWidth||1;return _.__rect={x:Math.min(_.xStart,_.xEnd)-$,y:Math.min(_.yStart,_.yEnd)-$,width:Math.abs(_.xStart-_.xEnd)+$,height:Math.abs(_.yStart-_.yEnd)+$},_.__rect}},_("../tool/util").inherits(A,$),A}),define("zrender/shape/BezierCurve",["require","./Base","../tool/util"],function(_){"use strict";var $=_("./Base"),A=function(_){this.brushTypeOnly="stroke",this.textPosition="end",$.call(this,_)};return A.prototype={type:"bezier-curve",buildPath:function(_,$){_.moveTo($.xStart,$.yStart),"undefined"!=typeof $.cpX2&&"undefined"!=typeof $.cpY2?_.bezierCurveTo($.cpX1,$.cpY1,$.cpX2,$.cpY2,$.xEnd,$.yEnd):_.quadraticCurveTo($.cpX1,$.cpY1,$.xEnd,$.yEnd)},getRect:function(_){if(_.__rect)return _.__rect;var $=Math.min(_.xStart,_.xEnd,_.cpX1),F=Math.min(_.yStart,_.yEnd,_.cpY1),D=Math.max(_.xStart,_.xEnd,_.cpX1),C=Math.max(_.yStart,_.yEnd,_.cpY1),E=_.cpX2,B=_.cpY2;"undefined"!=typeof E&&"undefined"!=typeof B&&($=Math.min($,E),F=Math.min(F,B),D=Math.max(D,E),C=Math.max(C,B));var A=_.lineWidth||1;return _.__rect={x:$-A,y:F-A,width:D-$+A,height:C-F+A},_.__rect}},_("../tool/util").inherits(A,$),A}),define("zrender/shape/util/dashedLineTo",[],function(){var $=[5,5];return function(A,J,F,E,G,D){if(A.setLineDash)return $[0]=$[1]=D,A.setLineDash($),A.moveTo(J,F),void A.lineTo(E,G);D="number"!=typeof D?5:D;var B=E-J,H=G-F,I=Math.floor(Math.sqrt(B*B+H*H)/D);B/=I,H/=I;for(var _=!0,C=0;I>C;++C)_?A.moveTo(J,F):A.lineTo(J,F),_=!_,J+=B,F+=H;A.lineTo(E,G)}}),define("zrender/shape/Polygon",["require","./Base","./util/smoothSpline","./util/smoothBezier","./util/dashedLineTo","../tool/util"],function(_){var $=_("./Base"),D=_("./util/smoothSpline"),B=_("./util/smoothBezier"),A=_("./util/dashedLineTo"),C=function(_){$.call(this,_)};return C.prototype={type:"polygon",buildPath:function(C,_){var I=_.pointList;if(!(I.length<2)){if(_.smooth&&"spline"!==_.smooth){var G=B(I,_.smooth,!0,_.smoothConstraint);C.moveTo(I[0][0],I[0][1]);for(var E,J,L,$=I.length,F=0;$>F;F++)E=G[2*F],J=G[2*F+1],L=I[(F+1)%$],C.bezierCurveTo(E[0],E[1],J[0],J[1],L[0],L[1])}else if("spline"===_.smooth&&(I=D(I,!0)),_.lineType&&"solid"!=_.lineType){if("dashed"==_.lineType||"dotted"==_.lineType){var K=_._dashLength||(_.lineWidth||1)*("dashed"==_.lineType?5:1);_._dashLength=K,C.moveTo(I[0][0],I[0][1]);for(var F=1,H=I.length;H>F;F++)A(C,I[F-1][0],I[F-1][1],I[F][0],I[F][1],K);A(C,I[I.length-1][0],I[I.length-1][1],I[0][0],I[0][1],K)}}else{C.moveTo(I[0][0],I[0][1]);for(F=1,H=I.length;H>F;F++)C.lineTo(I[F][0],I[F][1]);C.lineTo(I[0][0],I[0][1])}C.closePath()}},getRect:function(_){if(_.__rect)return _.__rect;for(var $=Number.MAX_VALUE,G=Number.MIN_VALUE,D=Number.MAX_VALUE,C=Number.MIN_VALUE,E=_.pointList,B=0,A=E.length;A>B;B++)E[B][0]<$&&($=E[B][0]),E[B][0]>G&&(G=E[B][0]),E[B][1]C&&(C=E[B][1]);var F;return F="stroke"==_.brushType||"fill"==_.brushType?_.lineWidth||1:0,_.__rect={x:Math.round($-F/2),y:Math.round(D-F/2),width:G-$+F,height:C-D+F},_.__rect}},_("../tool/util").inherits(C,$),C}),define("echarts/util/shape/normalIsCover",[],function(){return function(_,$){var A=this.transformCoordToLocal(_,$);return _=A[0],$=A[1],this.isCoverRect(_,$)}}),define("zrender/shape/util/smoothSpline",["require","../../tool/vector"],function(_){function $(_,$,G,D,C,E,B){var A=0.5*(G-_),F=0.5*(D-$);return(2*($-G)+A+F)*B+(-3*($-G)-2*A-F)*E+A*C+$}var A=_("../../tool/vector");return function(C,F){for(var E=C.length,G=[],O=0,N=1;E>N;N++)O+=A.distance(C[N-1],C[N]);var H=O/5;H=E>H?E:H;for(N=0;H>N;N++){var J,B,D,I=N/(H-1)*(F?E:E-1),P=Math.floor(I),L=I-P,M=C[P%E];F?(J=C[(P-1+E)%E],B=C[(P+1)%E],D=C[(P+2)%E]):(J=C[0===P?P:P-1],B=C[P>E-2?E-1:P+1],D=C[P>E-3?E-1:P+2]);var K=L*L,_=L*K;G.push([$(J[0],M[0],B[0],D[0],L,K,_),$(J[1],M[1],B[1],D[1],L,K,_)])}return G}}),define("zrender/shape/util/smoothBezier",["require","../../tool/vector"],function(_){var $=_("../../tool/vector");return function(C,L,G,F){var H,Q,P,I,K=[],B=[],E=[],J=[],R=!!F;if(R){P=[1/0,1/0],I=[-(1/0),-(1/0)];for(var N=0,O=C.length;O>N;N++)$.min(P,P,C[N]),$.max(I,I,C[N]);$.min(P,P,F[0]),$.max(I,I,F[1])}for(N=0,O=C.length;O>N;N++){var H,Q,M=C[N];if(G)H=C[N?N-1:O-1],Q=C[(N+1)%O];else{if(0===N||N===O-1){K.push($.clone(C[N]));continue}H=C[N-1],Q=C[N+1]}$.sub(B,Q,H),$.scale(B,B,L);var A=$.distance(M,H),_=$.distance(M,Q),T=A+_;0!==T&&(A/=T,_/=T),$.scale(E,B,-A),$.scale(J,B,_);var D=$.add([],M,E),S=$.add([],M,J);R&&($.max(D,D,P),$.min(D,D,I),$.max(S,S,P),$.min(S,S,I)),K.push(D),K.push(S)}return G&&K.push($.clone(K.shift())),K}}),define("echarts/util/ecQuery",["require","zrender/tool/util"],function(_){function $(_,$){if("undefined"!=typeof _){if(!$)return _;$=$.split(".");for(var B=$.length,A=0;B>A;){if(_=_[$[A]],"undefined"==typeof _)return;A++}return _}}function C(_,D){for(var B,A=0,C=_.length;C>A;A++)if(B=$(_[A],D),"undefined"!=typeof B)return B}function B(_,E){for(var C,D=_.length;D--;){var B=$(_[D],E);"undefined"!=typeof B&&("undefined"==typeof C?C=A.clone(B):A.merge(C,B,!0))}return C}var A=_("zrender/tool/util");return{query:$,deepQuery:C,deepMerge:B}}),define("echarts/util/number",[],function(){function _($){return $.replace(/^\s+/,"").replace(/\s+$/,"")}function $($,A){return"string"==typeof $?_($).match(/%$/)?parseFloat($)/100*A:parseFloat($):$}function D(_,A){return[$(A[0],_.getWidth()),$(A[1],_.getHeight())]}function B(_,B){B instanceof Array||(B=[0,B]);var A=Math.min(_.getWidth(),_.getHeight())/2;return[$(B[0],A),$(B[1],A)]}function A($){return isNaN($)?"-":($=($+"").split("."),$[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+($.length>1?"."+$[1]:""))}function C(_){for(var $=1,A=0;Math.round(_*$)/$!==_;)$*=10,A++;return A}return{parsePercent:$,parseCenter:D,parseRadius:B,addCommas:A,getPrecision:C}}),define("echarts/data/KDTree",["require","./quickSelect"],function(_){function $(_,$){this.left=null,this.right=null,this.axis=_,this.data=$}var B=_("./quickSelect"),A=function(_,$){_.length&&($||($=_[0].array.length),this.dimension=$,this.root=this._buildTree(_,0,_.length-1,0),this._stack=[],this._nearstNList=[])};return A.prototype._buildTree=function(_,E,D,F){if(E>D)return null;var C=Math.floor((E+D)/2);C=B(_,E,D,C,function(_,$){return _.array[F]-$.array[F]});var A=_[C],G=new $(F,A);return F=(F+1)%this.dimension,D>E&&(G.left=this._buildTree(_,E,C-1,F),G.right=this._buildTree(_,C+1,D,F)),G},A.prototype.nearest=function(_,$){var H=this.root,D=this._stack,C=0,E=1/0,B=null;for(H.data!==_&&(E=$(H.data,_),B=H),_.array[H.axis]A,G=!1;A*=A,E>A&&(A=$(H.data,_),E>A&&H.data!==_&&(E=A,B=H),G=!0),F?(G&&H.right&&(D[C++]=H.right),H.left&&(D[C++]=H.left)):(G&&H.left&&(D[C++]=H.left),H.right&&(D[C++]=H.right))}return B.data},A.prototype._addNearest=function(_,$,C){for(var B=this._nearstNList,A=_-1;A>0&&!($>=B[A-1].dist);A--)B[A].dist=B[A-1].dist,B[A].node=B[A-1].node;B[A].dist=$,B[A].node=C},A.prototype.nearestN=function(_,I,H,C){if(0>=I)return C.length=0,C;for(var B=this.root,D=this._stack,K=0,J=this._nearstNList,E=0;I>E;E++)J[E]||(J[E]={}),J[E].dist=0,J[E].node=null;var G=H(B.data,_),$=0;for(B.data!==_&&($++,this._addNearest($,G,B)),_.array[B.axis]G,F=!1;G*=G,(I>$||G$||G$&&$++,this._addNearest($,G,B)),F=!0),A?(F&&B.right&&(D[K++]=B.right),B.left&&(D[K++]=B.left)):(F&&B.left&&(D[K++]=B.left),B.right&&(D[K++]=B.right))}for(E=0;$>E;E++)C[E]=J[E].node.data;return C.length=$,C},A}),define("echarts/data/quickSelect",["require"],function(){function _(_,$){return _-$}function $(_,$,B){var A=_[$];_[$]=_[B],_[B]=A}function B(_,G,D,C,E){for(var B=G;D>G;){var B=Math.round((D+G)/2),A=_[B];$(_,B,D),B=G;for(var F=G;D-1>=F;F++)E(A,_[F])>=0&&($(_,F,B),B++);if($(_,D,B),B===C)return B;C>B?G=B+1:D=B-1}return G}function A($,D,C,E,A){return arguments.length<=3&&(E=D,A=2==arguments.length?_:C,D=0,C=$.length-1),B($,D,C,E,A)}return A}),define("echarts/component/dataView",["require","./base","../config","zrender/tool/util","../component"],function(_){function $(_,$,B,A,D){C.call(this,_,$,B,A,D),this.dom=D.dom,this._tDom=document.createElement("div"),this._textArea=document.createElement("textArea"),this._buttonRefresh=document.createElement("button"),this._buttonRefresh.setAttribute("type","button"),this._buttonClose=document.createElement("button"),this._buttonClose.setAttribute("type","button"),this._hasShow=!1,this._zrHeight=B.getHeight(),this._zrWidth=B.getWidth(),this._tDom.className="echarts-dataview",this.hide(),this.dom.firstChild.appendChild(this._tDom),window.addEventListener?(this._tDom.addEventListener("click",this._stop),this._tDom.addEventListener("mousewheel",this._stop),this._tDom.addEventListener("mousemove",this._stop),this._tDom.addEventListener("mousedown",this._stop),this._tDom.addEventListener("mouseup",this._stop),this._tDom.addEventListener("touchstart",this._stop),this._tDom.addEventListener("touchmove",this._stop),this._tDom.addEventListener("touchend",this._stop)):(this._tDom.attachEvent("onclick",this._stop),this._tDom.attachEvent("onmousewheel",this._stop),this._tDom.attachEvent("onmousemove",this._stop),this._tDom.attachEvent("onmousedown",this._stop),this._tDom.attachEvent("onmouseup",this._stop))}var C=_("./base"),B=_("../config"),A=_("zrender/tool/util");return $.prototype={type:B.COMPONENT_TYPE_DATAVIEW,_lang:["Data View","close","refresh"],_gCssText:"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;",hide:function(){this._sizeCssText="width:"+this._zrWidth+"px;height:0px;background-color:#f0ffff;",this._tDom.style.cssText=this._gCssText+this._sizeCssText},show:function(_){this._hasShow=!0;var $=this.query(this.option,"toolbox.feature.dataView.lang")||this._lang;this.option=_,this._tDom.innerHTML="

"+($[0]||this._lang[0])+"

";var B=this.query(this.option,"toolbox.feature.dataView.optionToContent");"function"!=typeof B?this._textArea.value=this._optionToContent():(this._textArea=document.createElement("div"),this._textArea.innerHTML=B(this.option)),this._textArea.style.cssText="display:block;margin:0 0 8px 0;padding:4px 6px;overflow:auto;width:100%;height:"+(this._zrHeight-100)+"px;",this._tDom.appendChild(this._textArea),this._buttonClose.style.cssText="float:right;padding:1px 6px;",this._buttonClose.innerHTML=$[1]||this._lang[1];var A=this;this._buttonClose.onclick=function(){A.hide()},this._tDom.appendChild(this._buttonClose),this.query(this.option,"toolbox.feature.dataView.readOnly")===!1?(this._buttonRefresh.style.cssText="float:right;margin-right:10px;padding:1px 6px;",this._buttonRefresh.innerHTML=$[2]||this._lang[2],this._buttonRefresh.onclick=function(){A._save()},this._textArea.readOnly=!1,this._textArea.style.cursor="default"):(this._buttonRefresh.style.cssText="display:none",this._textArea.readOnly=!0,this._textArea.style.cursor="text"),this._tDom.appendChild(this._buttonRefresh),this._sizeCssText="width:"+this._zrWidth+"px;height:"+this._zrHeight+"px;background-color:#fff;",this._tDom.style.cssText=this._gCssText+this._sizeCssText},_optionToContent:function(){var A,_,I,E,F,D,C=[],G="";if(this.option.xAxis)for(C=this.option.xAxis instanceof Array?this.option.xAxis:[this.option.xAxis],A=0,E=C.length;E>A;A++)if("category"==(C[A].type||"category")){for(D=[],_=0,I=C[A].data.length;I>_;_++)D.push(this.getDataFromOption(C[A].data[_]));G+=D.join(", ")+"\n\n"}if(this.option.yAxis)for(C=this.option.yAxis instanceof Array?this.option.yAxis:[this.option.yAxis],A=0,E=C.length;E>A;A++)if("category"==C[A].type){for(D=[],_=0,I=C[A].data.length;I>_;_++)D.push(this.getDataFromOption(C[A].data[_]));G+=D.join(", ")+"\n\n"}var H,$=this.option.series;for(A=0,E=$.length;E>A;A++){for(D=[],_=0,I=$[A].data.length;I>_;_++)F=$[A].data[_],H=$[A].type==B.CHART_TYPE_PIE||$[A].type==B.CHART_TYPE_MAP?(F.name||"-")+":":"",$[A].type==B.CHART_TYPE_SCATTER&&(F=this.getDataFromOption(F).join(", ")),D.push(H+this.getDataFromOption(F));G+=($[A].name||"-")+" : \n",G+=D.join($[A].type==B.CHART_TYPE_SCATTER?"\n":", "),G+="\n\n"}return G},_save:function(){var _=this.query(this.option,"toolbox.feature.dataView.contentToOption");if("function"!=typeof _){for(var $=this._textArea.value.split("\n"),E=[],C=0,D=$.length;D>C;C++)$[C]=this._trim($[C]),""!==$[C]&&E.push($[C]);this._contentToOption(E)}else _(this._textArea,this.option);this.hide();var A=this;setTimeout(function(){A.messageCenter&&A.messageCenter.dispatch(B.EVENT.DATA_VIEW_CHANGED,null,{option:A.option},A.myChart)},A.canvasSupported?800:100)},_contentToOption:function(A){var _,J,F,G,E,C,H,I=[],$=0;if(this.option.xAxis)for(I=this.option.xAxis instanceof Array?this.option.xAxis:[this.option.xAxis],_=0,G=I.length;G>_;_++)if("category"==(I[_].type||"category")){for(C=A[$].split(","),J=0,F=I[_].data.length;F>J;J++)H=this._trim(C[J]||""),E=I[_].data[J],"undefined"!=typeof I[_].data[J].value?I[_].data[J].value=H:I[_].data[J]=H;$++}if(this.option.yAxis)for(I=this.option.yAxis instanceof Array?this.option.yAxis:[this.option.yAxis],_=0,G=I.length;G>_;_++)if("category"==I[_].type){for(C=A[$].split(","),J=0,F=I[_].data.length;F>J;J++)H=this._trim(C[J]||""),E=I[_].data[J],"undefined"!=typeof I[_].data[J].value?I[_].data[J].value=H:I[_].data[J]=H;$++}var D=this.option.series;for(_=0,G=D.length;G>_;_++)if($++,D[_].type==B.CHART_TYPE_SCATTER){for(J=0,F=D[_].data.length;F>J;J++)C=A[$],H=C.replace(" ","").split(","),"undefined"!=typeof D[_].data[J].value?D[_].data[J].value=H:D[_].data[J]=H,$++}else{C=A[$].split(",");for(J=0,F=D[_].data.length;F>J;J++)H=(C[J]||"").replace(/.*:/,""),H=this._trim(H),H="-"!=H&&""!==H?H-0:"-","undefined"!=typeof D[_].data[J].value?D[_].data[J].value=H:D[_].data[J]=H;$++}},_trim:function(_){var $=new RegExp("(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+$)","g");return _.replace($,"")},_stop:function($){$=$||window.event,$.stopPropagation?$.stopPropagation():$.cancelBubble=!0},resize:function(){this._zrHeight=this.zr.getHeight(),this._zrWidth=this.zr.getWidth(),this._tDom.offsetHeight>10&&(this._sizeCssText="width:"+this._zrWidth+"px;height:"+this._zrHeight+"px;background-color:#fff;",this._tDom.style.cssText=this._gCssText+this._sizeCssText,this._textArea.style.cssText="display:block;margin:0 0 8px 0;padding:4px 6px;overflow:auto;width:100%;height:"+(this._zrHeight-100)+"px;")},dispose:function(){window.removeEventListener?(this._tDom.removeEventListener("click",this._stop),this._tDom.removeEventListener("mousewheel",this._stop),this._tDom.removeEventListener("mousemove",this._stop),this._tDom.removeEventListener("mousedown",this._stop),this._tDom.removeEventListener("mouseup",this._stop),this._tDom.removeEventListener("touchstart",this._stop),this._tDom.removeEventListener("touchmove",this._stop),this._tDom.removeEventListener("touchend",this._stop)):(this._tDom.detachEvent("onclick",this._stop),this._tDom.detachEvent("onmousewheel",this._stop),this._tDom.detachEvent("onmousemove",this._stop),this._tDom.detachEvent("onmousedown",this._stop),this._tDom.detachEvent("onmouseup",this._stop)),this._buttonRefresh.onclick=null,this._buttonClose.onclick=null,this._hasShow&&(this._tDom.removeChild(this._textArea),this._tDom.removeChild(this._buttonRefresh),this._tDom.removeChild(this._buttonClose)),this._textArea=null,this._buttonRefresh=null,this._buttonClose=null,this.dom.firstChild.removeChild(this._tDom),this._tDom=null}},A.inherits($,C),_("../component").define("dataView",$),$}),define("echarts/util/shape/Cross",["require","zrender/shape/Base","zrender/shape/Line","zrender/tool/util","./normalIsCover"],function(_){function $($){C.call(this,$)}var C=_("zrender/shape/Base"),B=_("zrender/shape/Line"),A=_("zrender/tool/util");return $.prototype={type:"cross",buildPath:function(_,$){var A=$.rect;$.xStart=A.x,$.xEnd=A.x+A.width,$.yStart=$.yEnd=$.y,B.prototype.buildPath(_,$),$.xStart=$.xEnd=$.x,$.yStart=A.y,$.yEnd=A.y+A.height,B.prototype.buildPath(_,$)},getRect:function($){return $.rect},isCover:_("./normalIsCover")},A.inherits($,C),$}),define("zrender/shape/Sector",["require","../tool/math","../tool/computeBoundingBox","../tool/vector","./Base","../tool/util"],function(_){var $=_("../tool/math"),H=_("../tool/computeBoundingBox"),D=_("../tool/vector"),C=_("./Base"),E=D.create(),B=D.create(),A=D.create(),F=D.create(),G=function($){C.call(this,$)};return G.prototype={type:"sector",buildPath:function(A,J){var F=J.x,E=J.y,G=J.r0||0,D=J.r,B=J.startAngle,H=J.endAngle,I=J.clockWise||!1;B=$.degreeToRadian(B),H=$.degreeToRadian(H),I||(B=-B,H=-H);var _=$.cos(B),C=$.sin(B);A.moveTo(_*G+F,C*G+E),A.lineTo(_*D+F,C*D+E),A.arc(F,E,D,B,H,!I),A.lineTo($.cos(H)*G+F,$.sin(H)*G+E),0!==G&&A.arc(F,E,G,H,B,I),A.closePath()},getRect:function(G){if(G.__rect)return G.__rect;var K=G.x,M=G.y,C=G.r0||0,I=G.r,L=$.degreeToRadian(G.startAngle),J=$.degreeToRadian(G.endAngle),_=G.clockWise;return _||(L=-L,J=-J),C>1?H.arc(K,M,C,L,J,!_,E,A):(E[0]=A[0]=K,E[1]=A[1]=M),H.arc(K,M,I,L,J,!_,B,F),D.min(E,E,B),D.max(A,A,F),G.__rect={x:E[0],y:E[1],width:A[0]-E[0],height:A[1]-E[1]},G.__rect}},_("../tool/util").inherits(G,C),G}),define("echarts/util/shape/Candle",["require","zrender/shape/Base","zrender/tool/util","./normalIsCover"],function(_){function $($){B.call(this,$)}var B=_("zrender/shape/Base"),A=_("zrender/tool/util");return $.prototype={type:"candle",_numberOrder:function(_,$){return $-_},buildPath:function(_,$){var B=A.clone($.y).sort(this._numberOrder);_.moveTo($.x,B[3]),_.lineTo($.x,B[2]),_.moveTo($.x-$.width/2,B[2]),_.rect($.x-$.width/2,B[2],$.width,B[1]-B[2]),_.moveTo($.x,B[1]),_.lineTo($.x,B[0])},getRect:function(_){if(!_.__rect){var $=0;("stroke"==_.brushType||"fill"==_.brushType)&&($=_.lineWidth||1);var B=A.clone(_.y).sort(this._numberOrder);_.__rect={x:Math.round(_.x-_.width/2-$/2),y:Math.round(B[3]-$/2),width:_.width+$,height:B[0]-B[3]+$}}return _.__rect},isCover:_("./normalIsCover")},A.inherits($,B),$}),define("zrender/tool/computeBoundingBox",["require","./vector","./curve"],function(_){function $(_,$,G){if(0!==_.length){for(var D=_[0][0],C=_[0][0],E=_[0][1],B=_[0][1],A=1;A<_.length;A++){var F=_[A];F[0]C&&(C=F[0]),F[1]B&&(B=F[1])}$[0]=D,$[1]=E,G[0]=C,G[1]=B}}function H(_,I,H,C,B,K){var J=[];E.cubicExtrema(_[0],I[0],H[0],C[0],J);for(var D=0;D=2*Math.PI)return $[0]=D-L,$[1]=_-L,E[0]=D+L,void(E[1]=_+L);if(B[0]=Math.cos(H)*L+D,B[1]=Math.sin(H)*L+_,A[0]=Math.cos(I)*L+D,A[1]=Math.sin(I)*L+_,C.min($,B,A),C.max(E,B,A),H%=2*Math.PI,0>H&&(H+=2*Math.PI),I%=2*Math.PI,0>I&&(I+=2*Math.PI),H>I&&!K?I+=2*Math.PI:I>H&&K&&(H+=2*Math.PI),K){var J=I;I=H,H=J}for(var G=0;I>G;G+=Math.PI/2)G>H&&(F[0]=Math.cos(G)*L+D,F[1]=Math.sin(G)*L+_,C.min($,F,$),C.max(E,F,E))};return $.cubeBezier=H,$.quadraticBezier=D,$.arc=G,$}),define("echarts/util/shape/Chain",["require","zrender/shape/Base","./Icon","zrender/shape/util/dashedLineTo","zrender/tool/util","zrender/tool/matrix"],function(_){function $($){E.call(this,$)}var E=_("zrender/shape/Base"),C=_("./Icon"),B=_("zrender/shape/util/dashedLineTo"),D=_("zrender/tool/util"),A=_("zrender/tool/matrix");return $.prototype={type:"chain",brush:function(_,$){var A=this.style;$&&(A=this.getHighlightStyle(A,this.highlightStyle||{})),_.save(),this.setContext(_,A),this.setTransform(_),_.save(),_.beginPath(),this.buildLinePath(_,A),_.stroke(),_.restore(),this.brushSymbol(_,A),_.restore()},buildLinePath:function(_,$){var F=$.x,D=$.y+5,E=$.width,C=$.height/2-10;if(_.moveTo(F,D),_.lineTo(F,D+C),_.moveTo(F+E,D),_.lineTo(F+E,D+C),_.moveTo(F,D+C/2),$.lineType&&"solid"!=$.lineType){if("dashed"==$.lineType||"dotted"==$.lineType){var A=($.lineWidth||1)*("dashed"==$.lineType?5:1);B(_,F,D+C/2,F+E,D+C/2,A)}}else _.lineTo(F+E,D+C/2)},brushSymbol:function(_,$){var G=$.y+$.height/4;_.save();for(var D,E=$.chainPoint,B=0,A=E.length;A>B;B++){if(D=E[B],"none"!=D.symbol){_.beginPath();var F=D.symbolSize;C.prototype.buildPath(_,{iconType:D.symbol,x:D.x-F,y:G-F,width:2*F,height:2*F,n:D.n}),_.fillStyle=D.isEmpty?"#fff":$.strokeColor,_.closePath(),_.fill(),_.stroke()}D.showLabel&&(_.font=D.textFont,_.fillStyle=D.textColor,_.textAlign=D.textAlign,_.textBaseline=D.textBaseline,D.rotation?(_.save(),this._updateTextTransform(_,D.rotation),_.fillText(D.name,D.textX,D.textY),_.restore()):_.fillText(D.name,D.textX,D.textY))}_.restore()},_updateTextTransform:function(_,$){var D=A.create();if(A.identity(D),0!==$[0]){var C=$[1]||0,B=$[2]||0;(C||B)&&A.translate(D,D,[-C,-B]),A.rotate(D,D,$[0]),(C||B)&&A.translate(D,D,[C,B])}_.transform.apply(_,D)},isCover:function(_,$){var A=this.style;return _>=A.x&&_<=A.x+A.width&&$>=A.y&&$<=A.y+A.height?!0:!1}},D.inherits($,E),$}),define("zrender/shape/Ring",["require","./Base","../tool/util"],function(_){var $=_("./Base"),A=function(_){$.call(this,_)};return A.prototype={type:"ring",buildPath:function(_,$){_.arc($.x,$.y,$.r,0,2*Math.PI,!1),_.moveTo($.x+$.r0,$.y),_.arc($.x,$.y,$.r0,0,2*Math.PI,!0)},getRect:function(_){if(_.__rect)return _.__rect;var $;return $="stroke"==_.brushType||"fill"==_.brushType?_.lineWidth||1:0,_.__rect={x:Math.round(_.x-_.r-$/2),y:Math.round(_.y-_.r-$/2),width:2*_.r+$,height:2*_.r+$},_.__rect}},_("../tool/util").inherits(A,$),A}),define("echarts/component/axis",["require","./base","zrender/shape/Line","../config","../util/ecData","zrender/tool/util","zrender/tool/color","./categoryAxis","./valueAxis","../component"],function(_){function $(_,$,C,B,D,A){F.call(this,_,$,C,B,D),this.axisType=A,this._axisList=[],this.refresh(B)}var F=_("./base"),D=_("zrender/shape/Line"),C=_("../config"),E=_("../util/ecData"),B=_("zrender/tool/util"),A=_("zrender/tool/color");return $.prototype={type:C.COMPONENT_TYPE_AXIS,axisBase:{_buildAxisLine:function(){var _=this.option.axisLine.lineStyle.width,$=_/2,C={_axisShape:"axisLine",zlevel:this.getZlevelBase(),z:this.getZBase()+3,hoverable:!1},A=this.grid;switch(this.option.position){case"left":C.style={xStart:A.getX()-$,yStart:A.getYend(),xEnd:A.getX()-$,yEnd:A.getY(),lineCap:"round"};break;case"right":C.style={xStart:A.getXend()+$,yStart:A.getYend(),xEnd:A.getXend()+$,yEnd:A.getY(),lineCap:"round"};break;case"bottom":C.style={xStart:A.getX(),yStart:A.getYend()+$,xEnd:A.getXend(),yEnd:A.getYend()+$,lineCap:"round"};break;case"top":C.style={xStart:A.getX(),yStart:A.getY()-$,xEnd:A.getXend(),yEnd:A.getY()-$,lineCap:"round"}}var B=C.style;""!==this.option.name&&(B.text=this.option.name,B.textPosition=this.option.nameLocation,B.textFont=this.getFont(this.option.nameTextStyle),this.option.nameTextStyle.align&&(B.textAlign=this.option.nameTextStyle.align),this.option.nameTextStyle.baseline&&(B.textBaseline=this.option.nameTextStyle.baseline),this.option.nameTextStyle.color&&(B.textColor=this.option.nameTextStyle.color)),B.strokeColor=this.option.axisLine.lineStyle.color,B.lineWidth=_,this.isHorizontal()?B.yStart=B.yEnd=this.subPixelOptimize(B.yEnd,_):B.xStart=B.xEnd=this.subPixelOptimize(B.xEnd,_),B.lineType=this.option.axisLine.lineStyle.type,C=new D(C),this.shapeList.push(C)},_axisLabelClickable:function(_,$){return _?(E.pack($,void 0,-1,void 0,-1,$.style.text),$.hoverable=!0,$.clickable=!0,$.highlightStyle={color:A.lift($.style.color,1),brushType:"fill"},$):$},refixAxisShape:function(_,$){if(this.option.axisLine.onZero){var C;if(this.isHorizontal()&&null!=$)for(var B=0,A=this.shapeList.length;A>B;B++)"axisLine"===this.shapeList[B]._axisShape?(this.shapeList[B].style.yStart=this.shapeList[B].style.yEnd=this.subPixelOptimize($,this.shapeList[B].stylelineWidth),this.zr.modShape(this.shapeList[B].id)):"axisTick"===this.shapeList[B]._axisShape&&(C=this.shapeList[B].style.yEnd-this.shapeList[B].style.yStart,this.shapeList[B].style.yStart=$-C,this.shapeList[B].style.yEnd=$,this.zr.modShape(this.shapeList[B].id));if(!this.isHorizontal()&&null!=_)for(B=0,A=this.shapeList.length;A>B;B++)"axisLine"===this.shapeList[B]._axisShape?(this.shapeList[B].style.xStart=this.shapeList[B].style.xEnd=this.subPixelOptimize(_,this.shapeList[B].stylelineWidth),this.zr.modShape(this.shapeList[B].id)):"axisTick"===this.shapeList[B]._axisShape&&(C=this.shapeList[B].style.xEnd-this.shapeList[B].style.xStart,this.shapeList[B].style.xStart=_,this.shapeList[B].style.xEnd=_+C,this.zr.modShape(this.shapeList[B].id))}},getPosition:function(){return this.option.position},isHorizontal:function(){return"bottom"===this.option.position||"top"===this.option.position}},reformOption:function(_){if(!_||_ instanceof Array&&0===_.length?_=[{type:C.COMPONENT_TYPE_AXIS_VALUE}]:_ instanceof Array||(_=[_]),_.length>2&&(_=[_[0],_[1]]),"xAxis"===this.axisType){(!_[0].position||"bottom"!=_[0].position&&"top"!=_[0].position)&&(_[0].position="bottom"),_.length>1&&(_[1].position="bottom"===_[0].position?"top":"bottom");for(var $=0,A=_.length;A>$;$++)_[$].type=_[$].type||"category",_[$].xAxisIndex=$,_[$].yAxisIndex=-1}else{(!_[0].position||"left"!=_[0].position&&"right"!=_[0].position)&&(_[0].position="left"),_.length>1&&(_[1].position="left"===_[0].position?"right":"left");for($=0,A=_.length;A>$;$++)_[$].type=_[$].type||"value",_[$].xAxisIndex=-1,_[$].yAxisIndex=$}return _},refresh:function($){var E;$&&(this.option=$,"xAxis"===this.axisType?(this.option.xAxis=this.reformOption($.xAxis),E=this.option.xAxis):(this.option.yAxis=this.reformOption($.yAxis),E=this.option.yAxis),this.series=$.series);for(var C=_("./categoryAxis"),B=_("./valueAxis"),D=Math.max(E&&E.length||0,this._axisList.length),A=0;D>A;A++)!this._axisList[A]||!$||E[A]&&this._axisList[A].type==E[A].type||(this._axisList[A].dispose&&this._axisList[A].dispose(),this._axisList[A]=!1),this._axisList[A]?this._axisList[A].refresh&&this._axisList[A].refresh(E?E[A]:!1,this.series):E&&E[A]&&(this._axisList[A]="category"===E[A].type?new C(this.ecTheme,this.messageCenter,this.zr,E[A],this.myChart,this.axisBase):new B(this.ecTheme,this.messageCenter,this.zr,E[A],this.myChart,this.axisBase,this.series))},getAxis:function($){return this._axisList[$]},getAxisCount:function(){return this._axisList.length},clear:function(){for(var _=0,$=this._axisList.length;$>_;_++)this._axisList[_].dispose&&this._axisList[_].dispose();this._axisList=[]}},B.inherits($,F),_("../component").define("axis",$),$}),define("echarts/component/grid",["require","./base","zrender/shape/Rectangle","../config","zrender/tool/util","../component"],function(_){function $(_,$,B,A,C){D.call(this,_,$,B,A,C),this.refresh(A)}var D=_("./base"),B=_("zrender/shape/Rectangle"),A=_("../config");A.grid={zlevel:0,z:0,x:80,y:60,x2:80,y2:60,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"};var C=_("zrender/tool/util");return $.prototype={type:A.COMPONENT_TYPE_GRID,getX:function(){return this._x},getY:function(){return this._y},getWidth:function(){return this._width},getHeight:function(){return this._height},getXend:function(){return this._x+this._width},getYend:function(){return this._y+this._height},getArea:function(){return{x:this._x,y:this._y,width:this._width,height:this._height}},getBbox:function(){return[[this._x,this._y],[this.getXend(),this.getYend()]]},refixAxisShape:function(_){for(var $,E,C,D=_.xAxis._axisList.concat(_.yAxis?_.yAxis._axisList:[]),B=D.length;B--;)C=D[B],C.type==A.COMPONENT_TYPE_AXIS_VALUE&&C._min<0&&C._max>=0&&(C.isHorizontal()?$=C.getCoord(0):E=C.getCoord(0));if("undefined"!=typeof $||"undefined"!=typeof E)for(B=D.length;B--;)D[B].refixAxisShape($,E)},refresh:function(_){if(_||this._zrWidth!=this.zr.getWidth()||this._zrHeight!=this.zr.getHeight()){this.clear(),this.option=_||this.option,this.option.grid=this.reformOption(this.option.grid);var $=this.option.grid;this._zrWidth=this.zr.getWidth(),this._zrHeight=this.zr.getHeight(),this._x=this.parsePercent($.x,this._zrWidth),this._y=this.parsePercent($.y,this._zrHeight);var C=this.parsePercent($.x2,this._zrWidth),A=this.parsePercent($.y2,this._zrHeight);this._width="undefined"==typeof $.width?this._zrWidth-this._x-C:this.parsePercent($.width,this._zrWidth),this._width=this._width<=0?10:this._width,this._height="undefined"==typeof $.height?this._zrHeight-this._y-A:this.parsePercent($.height,this._zrHeight),this._height=this._height<=0?10:this._height,this._x=this.subPixelOptimize(this._x,$.borderWidth),this._y=this.subPixelOptimize(this._y,$.borderWidth),this.shapeList.push(new B({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._x,y:this._y,width:this._width,height:this._height,brushType:$.borderWidth>0?"both":"fill",color:$.backgroundColor,strokeColor:$.borderColor,lineWidth:$.borderWidth}})),this.zr.addShape(this.shapeList[0])}}},C.inherits($,D),_("../component").define("grid",$),$}),define("echarts/component/dataZoom",["require","./base","zrender/shape/Rectangle","zrender/shape/Polygon","../util/shape/Icon","../config","../util/date","zrender/tool/util","../component"],function(_){function $(_,$,C,B,D){G.call(this,_,$,C,B,D);var A=this;A._ondrift=function(_,$){return A.__ondrift(this,_,$)},A._ondragend=function(){return A.__ondragend()},this._fillerSize=30,this._isSilence=!1,this._zoom={},this.option.dataZoom=this.reformOption(this.option.dataZoom),this.zoomOption=this.option.dataZoom,this._handleSize=this.zoomOption.handleSize,this.myChart.canvasSupported||(this.zoomOption.realtime=!1),this._location=this._getLocation(),this._zoom=this._getZoom(),this._backupData(),this.option.dataZoom.show&&this._buildShape(),this._syncData()}var G=_("./base"),D=_("zrender/shape/Rectangle"),C=_("zrender/shape/Polygon"),E=_("../util/shape/Icon"),B=_("../config");B.dataZoom={zlevel:0,z:4,show:!1,orient:"horizontal",backgroundColor:"rgba(0,0,0,0)",dataBackgroundColor:"#eee",fillerColor:"rgba(144,197,237,0.2)",handleColor:"rgba(70,130,180,0.8)",handleSize:8,showDetail:!0,realtime:!0};var A=_("../util/date"),F=_("zrender/tool/util");return $.prototype={type:B.COMPONENT_TYPE_DATAZOOM,_buildShape:function(){this._buildBackground(),this._buildFiller(),this._buildHandle(),this._buildFrame();for(var _=0,$=this.shapeList.length;$>_;_++)this.zr.addShape(this.shapeList[_]);this._syncFrameShape()},_getLocation:function(){var _,$,C,B,A=this.component.grid;return"horizontal"==this.zoomOption.orient?(C=this.zoomOption.width||A.getWidth(),B=this.zoomOption.height||this._fillerSize,_=null!=this.zoomOption.x?this.zoomOption.x:A.getX(),$=null!=this.zoomOption.y?this.zoomOption.y:this.zr.getHeight()-B-2):(C=this.zoomOption.width||this._fillerSize,B=this.zoomOption.height||A.getHeight(),_=null!=this.zoomOption.x?this.zoomOption.x:2,$=null!=this.zoomOption.y?this.zoomOption.y:A.getY()),{x:_,y:$,width:C,height:B}},_getZoom:function(){var _=this.option.series,L=this.option.xAxis;!L||L instanceof Array||(L=[L],this.option.xAxis=L);var I=this.option.yAxis;!I||I instanceof Array||(I=[I],this.option.yAxis=I);var D,C,E=[],M=this.zoomOption.xAxisIndex;if(L&&null==M){D=[];for(var F=0,H=L.length;H>F;F++)("category"==L[F].type||null==L[F].type)&&D.push(F)}else D=M instanceof Array?M:null!=M?[M]:[];if(M=this.zoomOption.yAxisIndex,I&&null==M){C=[];for(F=0,H=I.length;H>F;F++)"category"==I[F].type&&C.push(F)}else C=M instanceof Array?M:null!=M?[M]:[];for(var $,F=0,H=_.length;H>F;F++)if($=_[F],$.type==B.CHART_TYPE_LINE||$.type==B.CHART_TYPE_BAR||$.type==B.CHART_TYPE_SCATTER||$.type==B.CHART_TYPE_K){for(var A=0,G=D.length;G>A;A++)if(D[A]==($.xAxisIndex||0)){E.push(F);break}for(A=0,G=C.length;G>A;A++)if(C[A]==($.yAxisIndex||0)){E.push(F);break}null==this.zoomOption.xAxisIndex&&null==this.zoomOption.yAxisIndex&&$.data&&this.getDataFromOption($.data[0])instanceof Array&&($.type==B.CHART_TYPE_SCATTER||$.type==B.CHART_TYPE_LINE||$.type==B.CHART_TYPE_BAR)&&E.push(F)}var N=null!=this._zoom.start?this._zoom.start:null!=this.zoomOption.start?this.zoomOption.start:0,J=null!=this._zoom.end?this._zoom.end:null!=this.zoomOption.end?this.zoomOption.end:100;N>J&&(N+=J,J=N-J,N-=J);var K=Math.round((J-N)/100*("horizontal"==this.zoomOption.orient?this._location.width:this._location.height));return{start:N,end:J,start2:0,end2:100,size:K,xAxisIndex:D,yAxisIndex:C,seriesIndex:E,scatterMap:this._zoom.scatterMap||{}}},_backupData:function(){this._originalData={xAxis:{},yAxis:{},series:{}};for(var _=this.option.xAxis,$=this._zoom.xAxisIndex,H=0,D=$.length;D>H;H++)this._originalData.xAxis[$[H]]=_[$[H]].data;for(var C=this.option.yAxis,E=this._zoom.yAxisIndex,H=0,D=E.length;D>H;H++)this._originalData.yAxis[E[H]]=C[E[H]].data;for(var A,F=this.option.series,G=this._zoom.seriesIndex,H=0,D=G.length;D>H;H++)A=F[G[H]],this._originalData.series[G[H]]=A.data,A.data&&this.getDataFromOption(A.data[0])instanceof Array&&(A.type==B.CHART_TYPE_SCATTER||A.type==B.CHART_TYPE_LINE||A.type==B.CHART_TYPE_BAR)&&(this._backupScale(),this._calculScatterMap(G[H]))},_calculScatterMap:function($){this._zoom.scatterMap=this._zoom.scatterMap||{},this._zoom.scatterMap[$]=this._zoom.scatterMap[$]||{};var E=_("../component"),C=E.get("axis"),B=F.clone(this.option.xAxis);"category"==B[0].type&&(B[0].type="value"),B[1]&&"category"==B[1].type&&(B[1].type="value");var D=new C(this.ecTheme,null,!1,{xAxis:B,series:this.option.series},this,"xAxis"),A=this.option.series[$].xAxisIndex||0;this._zoom.scatterMap[$].x=D.getAxis(A).getExtremum(),D.dispose(),B=F.clone(this.option.yAxis),"category"==B[0].type&&(B[0].type="value"),B[1]&&"category"==B[1].type&&(B[1].type="value"),D=new C(this.ecTheme,null,!1,{yAxis:B,series:this.option.series},this,"yAxis"),A=this.option.series[$].yAxisIndex||0,this._zoom.scatterMap[$].y=D.getAxis(A).getExtremum(),D.dispose()},_buildBackground:function(){var E=this._location.width,P=this._location.height;this.shapeList.push(new D({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._location.x,y:this._location.y,width:E,height:P,color:this.zoomOption.backgroundColor}}));for(var L=0,H=this._originalData.xAxis,Q=this._zoom.xAxisIndex,I=0,K=Q.length;K>I;I++)L=Math.max(L,H[Q[I]].length);for(var A=this._originalData.yAxis,G=this._zoom.yAxisIndex,I=0,K=G.length;K>I;I++)L=Math.max(L,A[G[I]].length);for(var J,R=this._zoom.seriesIndex[0],N=this._originalData.series[R],O=Number.MIN_VALUE,M=Number.MAX_VALUE,I=0,K=N.length;K>I;I++)J=this.getDataFromOption(N[I],0),this.option.series[R].type==B.CHART_TYPE_K&&(J=J[1]),isNaN(J)&&(J=0),O=Math.max(O,J),M=Math.min(M,J);var _=O-M,$=[],T=E/(L-(L>1?1:0)),F=P/(L-(L>1?1:0)),S=1;"horizontal"==this.zoomOption.orient&&1>T?S=Math.floor(3*L/E):"vertical"==this.zoomOption.orient&&1>F&&(S=Math.floor(3*L/P));for(I=0,K=L;K>I;I+=S)J=this.getDataFromOption(N[I],0),this.option.series[R].type==B.CHART_TYPE_K&&(J=J[1]),isNaN(J)&&(J=0),$.push("horizontal"==this.zoomOption.orient?[this._location.x+T*I,this._location.y+P-1-Math.round((J-M)/_*(P-10))]:[this._location.x+1+Math.round((J-M)/_*(E-10)),this._location.y+F*(K-I-1)]);"horizontal"==this.zoomOption.orient?($.push([this._location.x+E,this._location.y+P]),$.push([this._location.x,this._location.y+P])):($.push([this._location.x,this._location.y]),$.push([this._location.x,this._location.y+P])),this.shapeList.push(new C({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{pointList:$,color:this.zoomOption.dataBackgroundColor},hoverable:!1}))},_buildFiller:function(){this._fillerShae={zlevel:this.getZlevelBase(),z:this.getZBase(),draggable:!0,ondrift:this._ondrift,ondragend:this._ondragend,_type:"filler"},this._fillerShae.style="horizontal"==this.zoomOption.orient?{x:this._location.x+Math.round(this._zoom.start/100*this._location.width)+this._handleSize,y:this._location.y,width:this._zoom.size-2*this._handleSize,height:this._location.height,color:this.zoomOption.fillerColor,text:":::",textPosition:"inside"}:{x:this._location.x,y:this._location.y+Math.round(this._zoom.start/100*this._location.height)+this._handleSize,width:this._location.width,height:this._zoom.size-2*this._handleSize,color:this.zoomOption.fillerColor,text:"::",textPosition:"inside"},this._fillerShae.highlightStyle={brushType:"fill",color:"rgba(0,0,0,0)"},this._fillerShae=new D(this._fillerShae),this.shapeList.push(this._fillerShae)},_buildHandle:function(){var $=this.zoomOption.showDetail?this._getDetail():{start:"",end:""};this._startShape={zlevel:this.getZlevelBase(),z:this.getZBase(),draggable:!0,style:{iconType:"rectangle",x:this._location.x,y:this._location.y,width:this._handleSize,height:this._handleSize,color:this.zoomOption.handleColor,text:"=",textPosition:"inside"},highlightStyle:{text:$.start,brushType:"fill",textPosition:"left"},ondrift:this._ondrift,ondragend:this._ondragend},"horizontal"==this.zoomOption.orient?(this._startShape.style.height=this._location.height,this._endShape=F.clone(this._startShape),this._startShape.style.x=this._fillerShae.style.x-this._handleSize,this._endShape.style.x=this._fillerShae.style.x+this._fillerShae.style.width,this._endShape.highlightStyle.text=$.end,this._endShape.highlightStyle.textPosition="right"):(this._startShape.style.width=this._location.width,this._endShape=F.clone(this._startShape),this._startShape.style.y=this._fillerShae.style.y+this._fillerShae.style.height,this._startShape.highlightStyle.textPosition="bottom",this._endShape.style.y=this._fillerShae.style.y-this._handleSize,this._endShape.highlightStyle.text=$.end,this._endShape.highlightStyle.textPosition="top"),this._startShape=new E(this._startShape),this._endShape=new E(this._endShape),this.shapeList.push(this._startShape),this.shapeList.push(this._endShape)},_buildFrame:function(){var _=this.subPixelOptimize(this._location.x,1),$=this.subPixelOptimize(this._location.y,1);this._startFrameShape={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:_,y:$,width:this._location.width-(_>this._location.x?1:0),height:this._location.height-($>this._location.y?1:0),lineWidth:1,brushType:"stroke",strokeColor:this.zoomOption.handleColor}},this._endFrameShape=F.clone(this._startFrameShape),this._startFrameShape=new D(this._startFrameShape),this._endFrameShape=new D(this._endFrameShape),this.shapeList.push(this._startFrameShape),this.shapeList.push(this._endFrameShape)},_syncHandleShape:function(){"horizontal"==this.zoomOption.orient?(this._startShape.style.x=this._fillerShae.style.x-this._handleSize,this._endShape.style.x=this._fillerShae.style.x+this._fillerShae.style.width,this._zoom.start=(this._startShape.style.x-this._location.x)/this._location.width*100,this._zoom.end=(this._endShape.style.x+this._handleSize-this._location.x)/this._location.width*100):(this._startShape.style.y=this._fillerShae.style.y+this._fillerShae.style.height,this._endShape.style.y=this._fillerShae.style.y-this._handleSize,this._zoom.start=(this._location.y+this._location.height-this._startShape.style.y)/this._location.height*100,this._zoom.end=(this._location.y+this._location.height-this._endShape.style.y-this._handleSize)/this._location.height*100),this.zr.modShape(this._startShape.id),this.zr.modShape(this._endShape.id),this._syncFrameShape(),this.zr.refreshNextFrame()},_syncFillerShape:function(){var _,$;"horizontal"==this.zoomOption.orient?(_=this._startShape.style.x,$=this._endShape.style.x,this._fillerShae.style.x=Math.min(_,$)+this._handleSize,this._fillerShae.style.width=Math.abs(_-$)-this._handleSize,this._zoom.start=(Math.min(_,$)-this._location.x)/this._location.width*100,this._zoom.end=(Math.max(_,$)+this._handleSize-this._location.x)/this._location.width*100):(_=this._startShape.style.y,$=this._endShape.style.y,this._fillerShae.style.y=Math.min(_,$)+this._handleSize,this._fillerShae.style.height=Math.abs(_-$)-this._handleSize,this._zoom.start=(this._location.y+this._location.height-Math.max(_,$))/this._location.height*100,this._zoom.end=(this._location.y+this._location.height-Math.min(_,$)-this._handleSize)/this._location.height*100),this.zr.modShape(this._fillerShae.id),this._syncFrameShape(),this.zr.refreshNextFrame()},_syncFrameShape:function(){"horizontal"==this.zoomOption.orient?(this._startFrameShape.style.width=this._fillerShae.style.x-this._location.x,this._endFrameShape.style.x=this._fillerShae.style.x+this._fillerShae.style.width,this._endFrameShape.style.width=this._location.x+this._location.width-this._endFrameShape.style.x):(this._startFrameShape.style.y=this._fillerShae.style.y+this._fillerShae.style.height,this._startFrameShape.style.height=this._location.y+this._location.height-this._startFrameShape.style.y,this._endFrameShape.style.height=this._fillerShae.style.y-this._location.y),this.zr.modShape(this._startFrameShape.id),this.zr.modShape(this._endFrameShape.id)},_syncShape:function(){this.zoomOption.show&&("horizontal"==this.zoomOption.orient?(this._startShape.style.x=this._location.x+this._zoom.start/100*this._location.width,this._endShape.style.x=this._location.x+this._zoom.end/100*this._location.width-this._handleSize,this._fillerShae.style.x=this._startShape.style.x+this._handleSize,this._fillerShae.style.width=this._endShape.style.x-this._startShape.style.x-this._handleSize):(this._startShape.style.y=this._location.y+this._location.height-this._zoom.start/100*this._location.height,this._endShape.style.y=this._location.y+this._location.height-this._zoom.end/100*this._location.height-this._handleSize,this._fillerShae.style.y=this._endShape.style.y+this._handleSize,this._fillerShae.style.height=this._startShape.style.y-this._endShape.style.y-this._handleSize),this.zr.modShape(this._startShape.id),this.zr.modShape(this._endShape.id),this.zr.modShape(this._fillerShae.id),this._syncFrameShape(),this.zr.refresh())},_syncData:function(_){var $,G,D,C,E;for(var A in this._originalData){$=this._originalData[A];for(var F in $)E=$[F],null!=E&&(C=E.length,G=Math.floor(this._zoom.start/100*C),D=Math.ceil(this._zoom.end/100*C),this.getDataFromOption(E[0])instanceof Array&&this.option[A][F].type!=B.CHART_TYPE_K?(this._setScale(),this.option[A][F].data=this._synScatterData(F,E)):this.option[A][F].data=E.slice(G,D))}this._isSilence||!this.zoomOption.realtime&&!_||this.messageCenter.dispatch(B.EVENT.DATA_ZOOM,null,{zoom:this._zoom},this.myChart)},_synScatterData:function(_,I){if(0===this._zoom.start&&100==this._zoom.end&&0===this._zoom.start2&&100==this._zoom.end2)return I;var H,C,B,D,K,J=[],E=this._zoom.scatterMap[_];"horizontal"==this.zoomOption.orient?(H=E.x.max-E.x.min,C=this._zoom.start/100*H+E.x.min,B=this._zoom.end/100*H+E.x.min,H=E.y.max-E.y.min,D=this._zoom.start2/100*H+E.y.min,K=this._zoom.end2/100*H+E.y.min):(H=E.x.max-E.x.min,C=this._zoom.start2/100*H+E.x.min,B=this._zoom.end2/100*H+E.x.min,H=E.y.max-E.y.min,D=this._zoom.start/100*H+E.y.min,K=this._zoom.end/100*H+E.y.min);var G;(G=E.x.dataMappingMethods)&&(C=G.coord2Value(C),B=G.coord2Value(B)),(G=E.y.dataMappingMethods)&&(D=G.coord2Value(D),K=G.coord2Value(K));for(var $,A=0,F=I.length;F>A;A++)$=I[A].value||I[A],$[0]>=C&&$[0]<=B&&$[1]>=D&&$[1]<=K&&J.push(I[A]);return J},_setScale:function(){var _=0!==this._zoom.start||100!==this._zoom.end||0!==this._zoom.start2||100!==this._zoom.end2,$={xAxis:this.option.xAxis,yAxis:this.option.yAxis};for(var C in $)for(var B=0,A=$[C].length;A>B;B++)$[C][B].scale=_||$[C][B]._scale},_backupScale:function(){var _={xAxis:this.option.xAxis,yAxis:this.option.yAxis};for(var $ in _)for(var B=0,A=_[$].length;A>B;B++)_[$][B]._scale=_[$][B].scale},_getDetail:function(){for(var _=["xAxis","yAxis"],M=0,I=_.length;I>M;M++){var D=this._originalData[_[M]];for(var C in D){var E=D[C];if(null!=E){var N=E.length,F=Math.floor(this._zoom.start/100*N),H=Math.ceil(this._zoom.end/100*N);return H-=H>0?1:0,{start:this.getDataFromOption(E[F]),end:this.getDataFromOption(E[H])}}}}_="horizontal"==this.zoomOption.orient?"xAxis":"yAxis";var $=this._zoom.seriesIndex[0],B=this.option.series[$][_+"Index"]||0,G=this.option[_][B].type,O=this._zoom.scatterMap[$][_.charAt(0)].min,K=this._zoom.scatterMap[$][_.charAt(0)].max,L=K-O;if("value"==G)return{start:O+L*this._zoom.start/100,end:O+L*this._zoom.end/100};if("time"==G){K=O+L*this._zoom.end/100,O+=L*this._zoom.start/100;var J=A.getAutoFormatter(O,K).formatter;return{start:A.format(J,O),end:A.format(J,K)}}return{start:"",end:""}},__ondrift:function(_,$,C){this.zoomOption.zoomLock&&(_=this._fillerShae);var B="filler"==_._type?this._handleSize:0;if("horizontal"==this.zoomOption.orient?_.style.x+$-B<=this._location.x?_.style.x=this._location.x+B:_.style.x+$+_.style.width+B>=this._location.x+this._location.width?_.style.x=this._location.x+this._location.width-_.style.width-B:_.style.x+=$:_.style.y+C-B<=this._location.y?_.style.y=this._location.y+B:_.style.y+C+_.style.height+B>=this._location.y+this._location.height?_.style.y=this._location.y+this._location.height-_.style.height-B:_.style.y+=C,"filler"==_._type?this._syncHandleShape():this._syncFillerShape(),this.zoomOption.realtime&&this._syncData(),this.zoomOption.showDetail){var A=this._getDetail();this._startShape.style.text=this._startShape.highlightStyle.text=A.start,this._endShape.style.text=this._endShape.highlightStyle.text=A.end,this._startShape.style.textPosition=this._startShape.highlightStyle.textPosition,this._endShape.style.textPosition=this._endShape.highlightStyle.textPosition}return!0},__ondragend:function(){this.zoomOption.showDetail&&(this._startShape.style.text=this._endShape.style.text="=",this._startShape.style.textPosition=this._endShape.style.textPosition="inside",this.zr.modShape(this._startShape.id),this.zr.modShape(this._endShape.id),this.zr.refreshNextFrame()),this.isDragend=!0},ondragend:function(_,$){this.isDragend&&_.target&&(!this.zoomOption.realtime&&this._syncData(),$.dragOut=!0,$.dragIn=!0,this._isSilence||this.zoomOption.realtime||this.messageCenter.dispatch(B.EVENT.DATA_ZOOM,null,{zoom:this._zoom},this.myChart),$.needRefresh=!1,this.isDragend=!1)},ondataZoom:function(_,$){$.needRefresh=!0},absoluteZoom:function($){this._zoom.start=$.start,this._zoom.end=$.end,this._zoom.start2=$.start2,this._zoom.end2=$.end2,this._syncShape(),this._syncData(!0)},rectZoom:function(_){if(!_)return this._zoom.start=this._zoom.start2=0,this._zoom.end=this._zoom.end2=100,this._syncShape(),this._syncData(!0),this._zoom;var $=this.component.grid.getArea(),F={x:_.x,y:_.y,width:_.width,height:_.height};if(F.width<0&&(F.x+=F.width,F.width=-F.width),F.height<0&&(F.y+=F.height,F.height=-F.height),F.x>$.x+$.width||F.y>$.y+$.height)return!1;F.x<$.x&&(F.x=$.x),F.x+F.width>$.x+$.width&&(F.width=$.x+$.width-F.x),F.y+F.height>$.y+$.height&&(F.height=$.y+$.height-F.y);var D,C=(F.x-$.x)/$.width,E=1-(F.x+F.width-$.x)/$.width,B=1-(F.y+F.height-$.y)/$.height,A=(F.y-$.y)/$.height;return"horizontal"==this.zoomOption.orient?(D=this._zoom.end-this._zoom.start,this._zoom.start+=D*C,this._zoom.end-=D*E,D=this._zoom.end2-this._zoom.start2,this._zoom.start2+=D*B,this._zoom.end2-=D*A):(D=this._zoom.end-this._zoom.start,this._zoom.start+=D*B,this._zoom.end-=D*A,D=this._zoom.end2-this._zoom.start2,this._zoom.start2+=D*C,this._zoom.end2-=D*E),this._syncShape(),this._syncData(!0),this._zoom},syncBackupData:function(_){for(var $,G,D=this._originalData.series,C=_.series,E=0,B=C.length;B>E;E++){G=C[E].data||C[E].eventList,$=D[E]?Math.floor(this._zoom.start/100*D[E].length):0;for(var A=0,F=G.length;F>A;A++)D[E]&&(D[E][A+$]=G[A])}},syncOption:function($){this.silence(!0),this.option=$,this.option.dataZoom=this.reformOption(this.option.dataZoom),this.zoomOption=this.option.dataZoom,this.myChart.canvasSupported||(this.zoomOption.realtime=!1),this.clear(),this._location=this._getLocation(),this._zoom=this._getZoom(),this._backupData(),this.option.dataZoom&&this.option.dataZoom.show&&this._buildShape(),this._syncData(),this.silence(!1)},silence:function($){this._isSilence=$},getRealDataIndex:function(_,$){if(!this._originalData||0===this._zoom.start&&100==this._zoom.end)return $;var A=this._originalData.series;return A[_]?Math.floor(this._zoom.start/100*A[_].length)+$:-1},resize:function(){this.clear(),this._location=this._getLocation(),this._zoom=this._getZoom(),this.option.dataZoom.show&&this._buildShape()}},F.inherits($,G),_("../component").define("dataZoom",$),$}),define("echarts/component/categoryAxis",["require","./base","zrender/shape/Text","zrender/shape/Line","zrender/shape/Rectangle","../config","zrender/tool/util","zrender/tool/area","../component"],function(_){function $(_,$,D,C,E,B){if(C.data.length<1)return void console.error("option.data.length < 1.");G.call(this,_,$,D,C,E),this.grid=this.component.grid;for(var A in B)this[A]=B[A];this.refresh(C)}var G=_("./base"),D=_("zrender/shape/Text"),C=_("zrender/shape/Line"),E=_("zrender/shape/Rectangle"),B=_("../config");B.categoryAxis={zlevel:0,z:0,show:!0,position:"bottom",name:"",nameLocation:"end",nameTextStyle:{},boundaryGap:!0,axisLine:{show:!0,onZero:!0,lineStyle:{color:"#48b",width:2,type:"solid"}},axisTick:{show:!0,interval:"auto",inside:!1,length:5,lineStyle:{color:"#333",width:1}},axisLabel:{show:!0,interval:"auto",rotate:0,margin:8,textStyle:{color:"#333"}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}};var A=_("zrender/tool/util"),F=_("zrender/tool/area");return $.prototype={type:B.COMPONENT_TYPE_AXIS_CATEGORY,_getReformedLabel:function(_){var $=this.getDataFromOption(this.option.data[_]),A=this.option.data[_].formatter||this.option.axisLabel.formatter;return A&&("function"==typeof A?$=A.call(this.myChart,$):"string"==typeof A&&($=A.replace("{value}",$))),$},_getInterval:function(){var _=this.option.axisLabel.interval;if("auto"==_){var K=this.option.axisLabel.textStyle.fontSize,I=this.option.data,D=this.option.data.length;if(this.isHorizontal()){if(D>3){var C,E,L=this.getGap(),H=!1,$=Math.floor(0.5/L);for($=1>$?1:$,_=Math.floor(15/L);!H&&D>_;){_+=$,H=!0,C=Math.floor(L*_);for(var B=Math.floor((D-1)/_)*_;B>=0;B-=_){if(0!==this.option.axisLabel.rotate)E=K;else if(I[B].textStyle)E=F.getTextWidth(this._getReformedLabel(B),this.getFont(A.merge(I[B].textStyle,this.option.axisLabel.textStyle)));else{var G=this._getReformedLabel(B)+"",M=(G.match(/\w/g)||"").length,J=G.length-M;E=M*K*2/3+J*K}if(E>C){H=!1;break}}}}else _=1}else if(D>3){L=this.getGap();for(_=Math.floor(11/L);K>L*_-6&&D>_;)_++}else _=1}else _="function"==typeof _?1:_-0+1;return _},_buildShape:function(){if(this._interval=this._getInterval(),this.option.show){this.option.splitArea.show&&this._buildSplitArea(),this.option.splitLine.show&&this._buildSplitLine(),this.option.axisLine.show&&this._buildAxisLine(),this.option.axisTick.show&&this._buildAxisTick(),this.option.axisLabel.show&&this._buildAxisLabel();for(var _=0,$=this.shapeList.length;$>_;_++)this.zr.addShape(this.shapeList[_])}},_buildAxisTick:function(){var A,M=this.option.data,I=this.option.data.length,D=this.option.axisTick,E=D.length,O=D.lineStyle.color,N=D.lineStyle.width,F="function"==typeof D.interval?D.interval:"auto"==D.interval&&"function"==typeof this.option.axisLabel.interval?this.option.axisLabel.interval:!1,H=F?1:"auto"==D.interval?this._interval:D.interval-0+1,_=D.onGap,B=_?this.getGap()/2:"undefined"==typeof _&&this.option.boundaryGap?this.getGap()/2:0,G=B>0?-H:0;if(this.isHorizontal()){for(var P,K="bottom"==this.option.position?D.inside?this.grid.getYend()-E-1:this.grid.getYend()+1:D.inside?this.grid.getY()+1:this.grid.getY()-E-1,L=G;I>L;L+=H)(!F||F(L,M[L]))&&(P=this.subPixelOptimize(this.getCoordByIndex(L)+(L>=0?B:0),N),A={_axisShape:"axisTick",zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:P,yStart:K,xEnd:P,yEnd:K+E,strokeColor:O,lineWidth:N}},this.shapeList.push(new C(A)))}else for(var J,$="left"==this.option.position?D.inside?this.grid.getX()+1:this.grid.getX()-E-1:D.inside?this.grid.getXend()-E-1:this.grid.getXend()+1,L=G;I>L;L+=H)(!F||F(L,M[L]))&&(J=this.subPixelOptimize(this.getCoordByIndex(L)-(L>=0?B:0),N),A={_axisShape:"axisTick",zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:$,yStart:J,xEnd:$+E,yEnd:J,strokeColor:O,lineWidth:N}},this.shapeList.push(new C(A)))},_buildAxisLabel:function(){var _,M,I=this.option.data,C=this.option.data.length,E=this.option.axisLabel,N=E.rotate,F=E.margin,H=E.clickable,$=E.textStyle,B="function"==typeof E.interval?E.interval:!1;if(this.isHorizontal()){var G,O;"bottom"==this.option.position?(G=this.grid.getYend()+F,O="top"):(G=this.grid.getY()-F,O="bottom");for(var K=0;C>K;K+=this._interval)B&&!B(K,I[K])||""===this._getReformedLabel(K)||(M=A.merge(I[K].textStyle||{},$),_={zlevel:this.getZlevelBase(),z:this.getZBase()+3,hoverable:!1,style:{x:this.getCoordByIndex(K),y:G,color:M.color,text:this._getReformedLabel(K),textFont:this.getFont(M),textAlign:M.align||"center",textBaseline:M.baseline||O}},N&&(_.style.textAlign=N>0?"bottom"==this.option.position?"right":"left":"bottom"==this.option.position?"left":"right",_.rotation=[N*Math.PI/180,_.style.x,_.style.y]),this.shapeList.push(new D(this._axisLabelClickable(H,_))))}else{var L,J;"left"==this.option.position?(L=this.grid.getX()-F,J="right"):(L=this.grid.getXend()+F,J="left");for(K=0;C>K;K+=this._interval)B&&!B(K,I[K])||""===this._getReformedLabel(K)||(M=A.merge(I[K].textStyle||{},$),_={zlevel:this.getZlevelBase(),z:this.getZBase()+3,hoverable:!1,style:{x:L,y:this.getCoordByIndex(K),color:M.color,text:this._getReformedLabel(K),textFont:this.getFont(M),textAlign:M.align||J,textBaseline:M.baseline||0===K&&""!==this.option.name?"bottom":K==C-1&&""!==this.option.name?"top":"middle"}},N&&(_.rotation=[N*Math.PI/180,_.style.x,_.style.y]),this.shapeList.push(new D(this._axisLabelClickable(H,_))))}},_buildSplitLine:function(){var B,N=this.option.data,J=this.option.data.length,E=this.option.splitLine,F=E.lineStyle.type,P=E.lineStyle.width,O=E.lineStyle.color;O=O instanceof Array?O:[O];var G=O.length,I="function"==typeof this.option.axisLabel.interval?this.option.axisLabel.interval:!1,A=E.onGap,D=A?this.getGap()/2:"undefined"==typeof A&&this.option.boundaryGap?this.getGap()/2:0;if(J-=A||"undefined"==typeof A&&this.option.boundaryGap?1:0,this.isHorizontal()){for(var H,Q=this.grid.getY(),L=this.grid.getYend(),M=0;J>M;M+=this._interval)(!I||I(M,N[M]))&&(H=this.subPixelOptimize(this.getCoordByIndex(M)+D,P),B={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:H,yStart:Q,xEnd:H,yEnd:L,strokeColor:O[M/this._interval%G],lineType:F,lineWidth:P}},this.shapeList.push(new C(B)))}else for(var K,_=this.grid.getX(),$=this.grid.getXend(),M=0;J>M;M+=this._interval)(!I||I(M,N[M]))&&(K=this.subPixelOptimize(this.getCoordByIndex(M)-D,P),B={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:_,yStart:K,xEnd:$,yEnd:K,strokeColor:O[M/this._interval%G],lineType:F,lineWidth:P}},this.shapeList.push(new C(B)))},_buildSplitArea:function(){var B,N=this.option.data,J=this.option.splitArea,F=J.areaStyle.color;if(F instanceof Array){var D=F.length,P=this.option.data.length,O="function"==typeof this.option.axisLabel.interval?this.option.axisLabel.interval:!1,G=J.onGap,I=G?this.getGap()/2:"undefined"==typeof G&&this.option.boundaryGap?this.getGap()/2:0;if(this.isHorizontal()){for(var A,C=this.grid.getY(),H=this.grid.getHeight(),Q=this.grid.getX(),L=0;P>=L;L+=this._interval)O&&!O(L,N[L])&&P>L||(A=P>L?this.getCoordByIndex(L)+I:this.grid.getXend(),B={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:Q,y:C,width:A-Q,height:H,color:F[L/this._interval%D]}},this.shapeList.push(new E(B)),Q=A)}else for(var M,K=this.grid.getX(),_=this.grid.getWidth(),$=this.grid.getYend(),L=0;P>=L;L+=this._interval)O&&!O(L,N[L])&&P>L||(M=P>L?this.getCoordByIndex(L)-I:this.grid.getY(),B={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:K,y:M,width:_,height:$-M,color:F[L/this._interval%D]}},this.shapeList.push(new E(B)),$=M)}else B={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this.grid.getX(),y:this.grid.getY(),width:this.grid.getWidth(),height:this.grid.getHeight(),color:F}},this.shapeList.push(new E(B))},refresh:function($){$&&(this.option=this.reformOption($),this.option.axisLabel.textStyle=this.getTextStyle(this.option.axisLabel.textStyle)),this.clear(),this._buildShape()},getGap:function(){var _=this.option.data.length,$=this.isHorizontal()?this.grid.getWidth():this.grid.getHeight();return this.option.boundaryGap?$/_:$/(_>1?_-1:1)},getCoord:function(_){for(var $=this.option.data,D=$.length,B=this.getGap(),A=this.option.boundaryGap?B/2:0,C=0;D>C;C++){if(this.getDataFromOption($[C])==_)return A=this.isHorizontal()?this.grid.getX()+A:this.grid.getYend()-A;A+=B}},getCoordByIndex:function(_){if(0>_)return this.isHorizontal()?this.grid.getX():this.grid.getYend();if(_>this.option.data.length-1)return this.isHorizontal()?this.grid.getXend():this.grid.getY();var $=this.getGap(),A=this.option.boundaryGap?$/2:0;return A+=_*$,A=this.isHorizontal()?this.grid.getX()+A:this.grid.getYend()-A},getNameByIndex:function($){return this.getDataFromOption(this.option.data[$])},getIndexByName:function(_){for(var $=this.option.data,B=$.length,A=0;B>A;A++)if(this.getDataFromOption($[A])==_)return A;return-1},getValueFromCoord:function(){return""},isMainAxis:function($){return $%this._interval===0}},A.inherits($,G),_("../component").define("categoryAxis",$),$}),define("echarts/component/valueAxis",["require","./base","zrender/shape/Text","zrender/shape/Line","zrender/shape/Rectangle","../config","../util/date","zrender/tool/util","../util/smartSteps","../util/accMath","../util/smartLogSteps","../component"],function(_){function $(_,$,D,C,E,B,A){if(!A||0===A.length)return void console.err("option.series.length == 0.");G.call(this,_,$,D,C,E),this.series=A,this.grid=this.component.grid;for(var F in B)this[F]=B[F];this.refresh(C,A)}var G=_("./base"),D=_("zrender/shape/Text"),C=_("zrender/shape/Line"),E=_("zrender/shape/Rectangle"),B=_("../config");B.valueAxis={zlevel:0,z:0,show:!0,position:"left",name:"",nameLocation:"end",nameTextStyle:{},boundaryGap:[0,0],axisLine:{show:!0,onZero:!0,lineStyle:{color:"#48b",width:2,type:"solid"}},axisTick:{show:!1,inside:!1,length:5,lineStyle:{color:"#333",width:1}},axisLabel:{show:!0,rotate:0,margin:8,textStyle:{color:"#333"}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}};var A=_("../util/date"),F=_("zrender/tool/util");return $.prototype={type:B.COMPONENT_TYPE_AXIS_VALUE,_buildShape:function(){if(this._hasData=!1,this._calculateValue(),this._hasData&&this.option.show){this.option.splitArea.show&&this._buildSplitArea(),this.option.splitLine.show&&this._buildSplitLine(),this.option.axisLine.show&&this._buildAxisLine(),this.option.axisTick.show&&this._buildAxisTick(),this.option.axisLabel.show&&this._buildAxisLabel();for(var _=0,$=this.shapeList.length;$>_;_++)this.zr.addShape(this.shapeList[_])}},_buildAxisTick:function(){var A,_=this._valueList,K=this._valueList.length,F=this.option.axisTick,G=F.length,E=F.lineStyle.color,B=F.lineStyle.width;if(this.isHorizontal()){for(var H,J="bottom"===this.option.position?F.inside?this.grid.getYend()-G-1:this.grid.getYend()+1:F.inside?this.grid.getY()+1:this.grid.getY()-G-1,$=0;K>$;$++)H=this.subPixelOptimize(this.getCoord(_[$]),B),A={_axisShape:"axisTick",zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:H,yStart:J,xEnd:H,yEnd:J+G,strokeColor:E,lineWidth:B}},this.shapeList.push(new C(A))}else for(var D,I="left"===this.option.position?F.inside?this.grid.getX()+1:this.grid.getX()-G-1:F.inside?this.grid.getXend()-G-1:this.grid.getXend()+1,$=0;K>$;$++)D=this.subPixelOptimize(this.getCoord(_[$]),B),A={_axisShape:"axisTick",zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:I,yStart:D,xEnd:I+G,yEnd:D,strokeColor:E,lineWidth:B}},this.shapeList.push(new C(A))},_buildAxisLabel:function(){var A,_=this._valueList,K=this._valueList.length,F=this.option.axisLabel.rotate,G=this.option.axisLabel.margin,E=this.option.axisLabel.clickable,B=this.option.axisLabel.textStyle;if(this.isHorizontal()){var H,J;"bottom"===this.option.position?(H=this.grid.getYend()+G,J="top"):(H=this.grid.getY()-G,J="bottom");for(var $=0;K>$;$++)A={zlevel:this.getZlevelBase(),z:this.getZBase()+3,hoverable:!1,style:{x:this.getCoord(_[$]),y:H,color:"function"==typeof B.color?B.color(_[$]):B.color,text:this._valueLabel[$],textFont:this.getFont(B),textAlign:B.align||"center",textBaseline:B.baseline||J}},F&&(A.style.textAlign=F>0?"bottom"===this.option.position?"right":"left":"bottom"===this.option.position?"left":"right",A.rotation=[F*Math.PI/180,A.style.x,A.style.y]),this.shapeList.push(new D(this._axisLabelClickable(E,A)))}else{var C,I;"left"===this.option.position?(C=this.grid.getX()-G,I="right"):(C=this.grid.getXend()+G,I="left");for($=0;K>$;$++)A={zlevel:this.getZlevelBase(),z:this.getZBase()+3,hoverable:!1,style:{x:C,y:this.getCoord(_[$]),color:"function"==typeof B.color?B.color(_[$]):B.color,text:this._valueLabel[$],textFont:this.getFont(B),textAlign:B.align||I,textBaseline:B.baseline||(0===$&&""!==this.option.name?"bottom":$===K-1&&""!==this.option.name?"top":"middle")}},F&&(A.rotation=[F*Math.PI/180,A.style.x,A.style.y]),this.shapeList.push(new D(this._axisLabelClickable(E,A)))}},_buildSplitLine:function(){var _,K=this._valueList,H=this._valueList.length,B=this.option.splitLine,D=B.lineStyle.type,M=B.lineStyle.width,L=B.lineStyle.color;L=L instanceof Array?L:[L];var E=L.length;if(this.isHorizontal()){for(var G,$=this.grid.getY(),A=this.grid.getYend(),F=0;H>F;F++)G=this.subPixelOptimize(this.getCoord(K[F]),M),_={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:G,yStart:$,xEnd:G,yEnd:A,strokeColor:L[F%E],lineType:D,lineWidth:M}},this.shapeList.push(new C(_))}else for(var N,I=this.grid.getX(),J=this.grid.getXend(),F=0;H>F;F++)N=this.subPixelOptimize(this.getCoord(K[F]),M),_={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:I,yStart:N,xEnd:J,yEnd:N,strokeColor:L[F%E],lineType:D,lineWidth:M}},this.shapeList.push(new C(_))},_buildSplitArea:function(){var _,J=this.option.splitArea.areaStyle.color;if(J instanceof Array){var H=J.length,C=this._valueList,B=this._valueList.length;if(this.isHorizontal()){for(var L,K=this.grid.getY(),D=this.grid.getHeight(),G=this.grid.getX(),$=0;B>=$;$++)L=B>$?this.getCoord(C[$]):this.grid.getXend(),_={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:G,y:K,width:L-G,height:D,color:J[$%H]}},this.shapeList.push(new E(_)),G=L}else for(var A,F=this.grid.getX(),M=this.grid.getWidth(),I=this.grid.getYend(),$=0;B>=$;$++)A=B>$?this.getCoord(C[$]):this.grid.getY(),_={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:F,y:A,width:M,height:I-A,color:J[$%H]}},this.shapeList.push(new E(_)),I=A}else _={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this.grid.getX(),y:this.grid.getY(),width:this.grid.getWidth(),height:this.grid.getHeight(),color:J}},this.shapeList.push(new E(_))},_calculateValue:function(){if(isNaN(this.option.min-0)||isNaN(this.option.max-0)){for(var A,_,J={},F=this.component.legend,E=0,G=this.series.length;G>E;E++)!(this.series[E].type!=B.CHART_TYPE_LINE&&this.series[E].type!=B.CHART_TYPE_BAR&&this.series[E].type!=B.CHART_TYPE_SCATTER&&this.series[E].type!=B.CHART_TYPE_K&&this.series[E].type!=B.CHART_TYPE_EVENTRIVER||F&&!F.isSelected(this.series[E].name)||(A=this.series[E].xAxisIndex||0,_=this.series[E].yAxisIndex||0,this.option.xAxisIndex!=A&&this.option.yAxisIndex!=_||!this._calculSum(J,E)));var C;for(E in J){C=J[E];for(var H=0,I=C.length;I>H;H++)if(!isNaN(C[H])){this._hasData=!0,this._min=C[H],this._max=C[H];break}if(this._hasData)break}for(E in J){C=J[E];for(H=0,I=C.length;I>H;H++)isNaN(C[H])||(this._min=Math.min(this._min,C[H]),this._max=Math.max(this._max,C[H]))}var $="log"!==this.option.type?this.option.boundaryGap:[0,0],D=Math.abs(this._max-this._min);this._min=isNaN(this.option.min-0)?this._min-Math.abs(D*$[0]):this.option.min-0,this._max=isNaN(this.option.max-0)?this._max+Math.abs(D*$[1]):this.option.max-0,this._min===this._max&&(0===this._max?this._max=1:this._max>0?this._min=this._max/this.option.splitNumber!=null?this.option.splitNumber:5:this._max=this._max/this.option.splitNumber!=null?this.option.splitNumber:5),"time"===this.option.type?this._reformTimeValue():"log"===this.option.type?this._reformLogValue():this._reformValue(this.option.scale)}else this._hasData=!0,this._min=this.option.min-0,this._max=this.option.max-0,"time"===this.option.type?this._reformTimeValue():"log"===this.option.type?this._reformLogValue():this._customerValue()},_calculSum:function(_,K){var J,E,D=this.series[K].name||"kener";if(this.series[K].stack){var F="__Magic_Key_Positive__"+this.series[K].stack,G="__Magic_Key_Negative__"+this.series[K].stack;_[F]=_[F]||[],_[G]=_[G]||[],_[D]=_[D]||[],E=this.series[K].data;for(var I=0,$=E.length;$>I;I++)J=this.getDataFromOption(E[I]),"-"!==J&&(J-=0,J>=0?null!=_[F][I]?_[F][I]+=J:_[F][I]=J:null!=_[G][I]?_[G][I]+=J:_[G][I]=J,this.option.scale&&_[D].push(J))}else if(_[D]=_[D]||[],this.series[K].type!=B.CHART_TYPE_EVENTRIVER){E=this.series[K].data;for(I=0,$=E.length;$>I;I++)J=this.getDataFromOption(E[I]),this.series[K].type===B.CHART_TYPE_K?(_[D].push(J[0]),_[D].push(J[1]),_[D].push(J[2]),_[D].push(J[3])):J instanceof Array?(-1!=this.option.xAxisIndex&&_[D].push("time"!=this.option.type?J[0]:A.getNewDate(J[0])),-1!=this.option.yAxisIndex&&_[D].push("time"!=this.option.type?J[1]:A.getNewDate(J[1]))):_[D].push(J)}else{E=this.series[K].data;for(I=0,$=E.length;$>I;I++)for(var C=E[I].evolution,H=0,L=C.length;L>H;H++)_[D].push(A.getNewDate(C[H].time))}},_reformValue:function($){var C=_("../util/smartSteps"),B=this.option.splitNumber;!$&&this._min>=0&&this._max>=0&&(this._min=0),!$&&this._min<=0&&this._max<=0&&(this._max=0);var A=C(this._min,this._max,B);B=null!=B?B:A.secs,this._min=A.min,this._max=A.max,this._valueList=A.pnts,this._reformLabelData()},_reformTimeValue:function(){var _=null!=this.option.splitNumber?this.option.splitNumber:5,$=A.getAutoFormatter(this._min,this._max,_),D=$.formatter,C=$.gapValue;this._valueList=[A.getNewDate(this._min)];var B;switch(D){case"week":B=A.nextMonday(this._min);break;case"month":B=A.nextNthOnMonth(this._min,1);break;case"quarter":B=A.nextNthOnQuarterYear(this._min,1);break;case"half-year":B=A.nextNthOnHalfYear(this._min,1);break;case"year":B=A.nextNthOnYear(this._min,1);break;default:7200000>=C?B=(Math.floor(this._min/C)+1)*C:(B=A.getNewDate(this._min- -C),B.setHours(6*Math.round(B.getHours()/6)),B.setMinutes(0),B.setSeconds(0))}for(B-this._min=0&&(("month"==D||"quarter"==D||"half-year"==D||"year"==D)&&$.setDate(1),!(this._max-$=A;A++)this._valueList.push($.accAdd(this._min,$.accMul(B,A)));this._reformLabelData()},_reformLogValue:function(){var $=this.option,A=_("../util/smartLogSteps")({dataMin:this._min,dataMax:this._max,logPositive:$.logPositive,logLabelBase:$.logLabelBase,splitNumber:$.splitNumber});this._min=A.dataMin,this._max=A.dataMax,this._valueList=A.tickList,this._dataMappingMethods=A.dataMappingMethods,this._reformLabelData(A.labelFormatter)},_reformLabelData:function(_){this._valueLabel=[];var $=this.option.axisLabel.formatter;if($){for(var C=0,B=this._valueList.length;B>C;C++)"function"==typeof $?this._valueLabel.push(_?$.call(this.myChart,this._valueList[C],_):$.call(this.myChart,this._valueList[C])):"string"==typeof $&&this._valueLabel.push(_?A.format($,this._valueList[C]):$.replace("{value}",this._valueList[C]))}else for(C=0,B=this._valueList.length;B>C;C++)this._valueLabel.push(_?_(this._valueList[C]):this.numAddCommas(this._valueList[C]))},getExtremum:function(){this._calculateValue();var $=this._dataMappingMethods;return{min:this._min,max:this._max,dataMappingMethods:$?F.merge({},$):null}},refresh:function(_,$){_&&(this.option=this.reformOption(_),this.option.axisLabel.textStyle=F.merge(this.option.axisLabel.textStyle||{},this.ecTheme.textStyle),this.series=$),this.zr&&(this.clear(),this._buildShape())},getCoord:function(_){this._dataMappingMethods&&(_=this._dataMappingMethods.value2Coord(_)),_=_this._max?this._max:_;var $;return $=this.isHorizontal()?this.grid.getX()+(_-this._min)/(this._max-this._min)*this.grid.getWidth():this.grid.getYend()-(_-this._min)/(this._max-this._min)*this.grid.getHeight()},getCoordSize:function($){return Math.abs(this.isHorizontal()?$/(this._max-this._min)*this.grid.getWidth():$/(this._max-this._min)*this.grid.getHeight())},getValueFromCoord:function(_){var $;return this.isHorizontal()?(_=_this.grid.getXend()?this.grid.getXend():_,$=this._min+(_-this.grid.getX())/this.grid.getWidth()*(this._max-this._min)):(_=_this.grid.getYend()?this.grid.getYend():_,$=this._max-(_-this.grid.getY())/this.grid.getHeight()*(this._max-this._min)),this._dataMappingMethods&&($=this._dataMappingMethods.coord2Value($)),$.toFixed(2)-0},isMaindAxis:function(_){for(var $=0,A=this._valueList.length;A>$;$++)if(this._valueList[$]===_)return!0;return!1}},F.inherits($,G),_("../component").define("valueAxis",$),$}),define("echarts/util/date",[],function(){function A(A,_,H){H=H>1?H:2;for(var E,D,F,C,B=0,G=$.length;G>B;B++)if(E=$[B].value,D=Math.ceil(_/E)*E-Math.floor(A/E)*E,Math.round(D/E)<=1.2*H){F=$[B].formatter,C=$[B].value;break}return null==F&&(F="year",E=31708800000,D=Math.ceil(_/E)*E-Math.floor(A/E)*E,C=Math.round(D/(H-1)/E)*E),{formatter:F,gapValue:C}}function _($){return 10>$?"0"+$:$}function I(A,I){("week"==A||"month"==A||"quarter"==A||"half-year"==A||"year"==A)&&(A="MM - dd\nyyyy");var E=H(I),D=E.getFullYear(),F=E.getMonth()+1,C=E.getDate(),B=E.getHours(),G=E.getMinutes(),$=E.getSeconds();return A=A.replace("MM",_(F)),A=A.toLowerCase(),A=A.replace("yyyy",D),A=A.replace("yy",D%100),A=A.replace("dd",_(C)),A=A.replace("d",C),A=A.replace("hh",_(B)),A=A.replace("h",B),A=A.replace("mm",_(G)),A=A.replace("m",G),A=A.replace("ss",_($)),A=A.replace("s",$)}function E($){return $=H($),$.setDate($.getDate()+8-$.getDay()),$}function D(_,$,A){return _=H(_),_.setMonth(Math.ceil((_.getMonth()+1)/A)*A),_.setDate($),_}function F(_,$){return D(_,$,1)}function C(_,$){return D(_,$,3)}function B(_,$){return D(_,$,6)}function G(_,$){return D(_,$,12)}function H($){return $ instanceof Date?$:new Date("string"==typeof $?$.replace(/-/g,"/"):$)}var $=[{formatter:"hh : mm : ss",value:1000},{formatter:"hh : mm : ss",value:5000},{formatter:"hh : mm : ss",value:10000},{formatter:"hh : mm : ss",value:15000},{formatter:"hh : mm : ss",value:30000},{formatter:"hh : mm\nMM - dd",value:60000},{formatter:"hh : mm\nMM - dd",value:300000},{formatter:"hh : mm\nMM - dd",value:600000},{formatter:"hh : mm\nMM - dd",value:900000},{formatter:"hh : mm\nMM - dd",value:1800000},{formatter:"hh : mm\nMM - dd",value:3600000},{formatter:"hh : mm\nMM - dd",value:7200000},{formatter:"hh : mm\nMM - dd",value:21600000},{formatter:"hh : mm\nMM - dd",value:43200000},{formatter:"MM - dd\nyyyy",value:86400000},{formatter:"week",value:604800000},{formatter:"month",value:2678400000},{formatter:"quarter",value:8208000000},{formatter:"half-year",value:16416000000},{formatter:"year",value:32832000000}];return{getAutoFormatter:A,getNewDate:H,format:I,nextMonday:E,nextNthPerNmonth:D,nextNthOnMonth:F,nextNthOnQuarterYear:C,nextNthOnHalfYear:B,nextNthOnYear:G}}),define("echarts/util/smartSteps",[],function(){function J($){return U.log(D($))/U.LN10}function X($){return U.pow(10,$)}function T($){return $===F($)}function N(A,_,D,C){b=C||{},K=b.steps||V,E=b.secs||$,D=B(+D||0)%99,A=+A||0,_=+_||0,c=R=0,"min"in b&&(A=+b.min||0,c=1),"max"in b&&(_=+b.max||0,R=1),A>_&&(_=[A,A=_][0]);var F=_-A;if(c&&R)return G(A,_,D);if((D||5)>F){if(T(A)&&T(_))return a(A,_,D);if(0===F)return W(A,_,D)}return S(A,_,D)}function M(_,I,D,C){C=C||0;var M=O((I-_)/D,-1),F=O(_,-1,1),H=O(I,-1),$=U.min(M.e,F.e,H.e);0===F.c?$=U.min(M.e,H.e):0===H.c&&($=U.min(M.e,F.e)),Z(M,{c:0,e:$}),Z(F,M,1),Z(H,M),C+=$,_=F.c,I=H.c;for(var B=(I-_)/D,G=X(C),N=0,J=[],L=D+1;L--;)J[L]=(_+B*L)*G;if(0>C){N=A(G),B=+(B*G).toFixed(N),_=+(_*G).toFixed(N),I=+(I*G).toFixed(N);for(L=J.length;L--;)J[L]=J[L].toFixed(N),0===+J[L]&&(J[L]="0")}else _*=G,I*=G,B*=G;return E=0,K=0,b=0,{min:_,max:I,secs:D,step:B,fix:N,exp:C,pnts:J}}function O(E,C,G){C=B(C%10)||2,0>C&&(T(E)?C=(""+D(E)).replace(/0+$/,"").length||1:(E=E.toFixed(15).replace(/0+$/,""),C=E.replace(".","").replace(/^[-0]+/,"").length,E=+E));var A=F(J(E))-C+1,$=+(E*X(-A)).toFixed(15)||0;return $=G?F($):_($),!$&&(A=0),(""+D($)).length>C&&(A+=1,$/=10),{c:$,e:A}}function Z($,C,B){var A=C.e-$.e;A&&($.e+=A,$.c*=X(-A),$.c=B?F($.c):_($.c))}function Y(_,$,A){_.e<$.e?Z($,_,A):Z(_,$,A)}function P(_,$){$=$||V,_=O(_);for(var B=_.c,A=0;B>$[A];)A++;if(!$[A])for(B/=10,_.e+=1,A=0;B>$[A];)A++;return _.c=$[A],_}function S(F,D,J){var G,S=J||+E.slice(-1),B=P((D-F)/S,K),_=O(D-F),$=O(F,-1,1),N=O(D,-1);if(Z(_,B),Z($,B,1),Z(N,B),J?G=L($,N,S):S=I($,N),T(F)&&T(D)&&F*D>=0){if(S>D-F)return a(F,D,S);S=Q(F,D,J,$,N,S)}var A=C(F,D,$.c,N.c);return $.c=A[0],N.c=A[1],(c||R)&&H(F,D,$,N),M($.c,N.c,S,N.e)}function I($,I){for(var D,C,G,B,A=[],H=E.length;H--;)D=E[H],C=P((I.c-$.c)/D,K),C=C.c*X(C.e),G=F($.c/C)*C,B=_(I.c/C)*C,A[H]={min:G,max:B,step:C,span:B-G};return A.sort(function(_,$){var A=_.span-$.span;return 0===A&&(A=_.step-$.step),A}),A=A[0],D=A.span/A.step,$.c=A.min,I.c=A.max,3>D?2*D:D}function L(A,J,G){for(var F,H,E=J.c,C=(J.c-A.c)/G-1;E>A.c;)C=P(C+1,K),C=C.c*X(C.e),F=C*G,H=_(J.c/C)*C,E=H-F;var I=A.c-E,$=H-J.c,D=I-$;return D>1.1*C&&(D=B(D/C/2)*C,E+=D,H+=D),A.c=E,J.c=H,C}function Q(_,E,D,G,C,A){var H=C.c-G.c,I=H/A*X(C.e);if(!T(I)&&(I=F(I),H=I*A,E-_>H&&(I+=1,H=I*A,!D&&I*(A-1)>=E-_&&(A-=1,H=I*A)),H>=E-_)){var $=H-(E-_);G.c=B(_-$/2),C.c=B(E+$/2),G.e=0,C.e=0}return A}function a(_,$,G){if(G=G||5,c)$=_+G;else if(R)_=$-G;else{var E=G-($-_),F=B(_-E/2),D=B($+E/2),A=C(_,$,F,D);_=A[0],$=A[1]}return M(_,$,G)}function W(_,$,B){B=B||5;var A=U.min(D($/B),B)/2.1;return c?$=_+A:R?_=$-A:(_-=A,$+=A),S(_,$,B)}function C(_,$,B,A){return _>=0&&0>B?(A-=B,B=0):0>=$&&A>0&&(B-=A,A=0),[B,A]}function A($){return $=(+$).toFixed(15).split("."),$.pop().replace(/0+$/,"").length}function H(_,$,D,C){if(c){var B=O(_,4,1);D.e-B.e>6&&(B={c:0,e:D.e}),Y(D,B),Y(C,B),C.c+=B.c-D.c,D.c=B.c}else if(R){var A=O($,4);C.e-A.e>6&&(A={c:0,e:C.e}),Y(D,A),Y(C,A),D.c+=A.c-C.c,C.c=A.c}}function G(F,R,L){var H=L?[L]:E,S=R-F;if(0===S)return R=O(R,3),L=H[0],R.c=B(R.c+L/2),M(R.c-L,R.c,L,R.e);D(R/S)<0.000001&&(R=0),D(F/S)<0.000001&&(F=0);var I,K,C,G=[[5,10],[10,2],[50,10],[100,2]],J=[],T=[],P=O(R-F,3),Q=O(F,-1,1),N=O(R,-1);Z(Q,P,1),Z(N,P),S=N.c-Q.c,P.c=S;for(var A=H.length;A--;){L=H[A],I=_(S/L),K=I*L-S,C=3*(K+3),C+=2*(L-H[0]+2),L%5===0&&(C-=10);for(var $=G.length;$--;)I%G[$][0]===0&&(C/=G[$][1]);T[A]=[L,I,K,C].join(),J[A]={secs:L,step:I,delta:K,score:C}}return J.sort(function(_,$){return _.score-$.score}),J=J[0],Q.c=B(Q.c-J.delta/2),N.c=B(N.c+J.delta/2),M(Q.c,N.c,J.secs,P.e)}var b,K,E,c,R,V=[10,20,25,50],$=[4,5,6],U=Math,B=U.round,F=U.floor,_=U.ceil,D=U.abs;return N}),define("echarts/util/smartLogSteps",["require","./number"],function(O){function c($){return Y(),E=$||{},S(),R(),[T(),Y()][0]}function Y(){V=E=L=H=h=P=M=J=f=b=null}function S(){f=E.logLabelBase,null==f?(b="plain",f=10,H=I):(f=+f,1>f&&(f=10),b="exponent",H=a(f)),M=E.splitNumber,null==M&&(M=$);var A=parseFloat(E.dataMin),_=parseFloat(E.dataMax);isFinite(A)||isFinite(_)?isFinite(A)?isFinite(_)?A>_&&(_=[A,A=_][0]):_=A:A=_:A=_=1,V=E.logPositive,null==V&&(V=_>0||0===A),h=V?A:-_,P=V?_:-A,F>h&&(h=F),F>P&&(P=F)}function R(){function C(){M>$&&(M=$);var A=K(U($/M)),_=G(U($/A)),I=A*_,E=(I-S)/2,D=K(U(F-E));Q(D-F)&&(D-=1),L=-D*H;for(var C=D;R>=C-A;C+=A)J.push(B(f,C))}function _(){for(var C=V(T,0),_=C+2;_>C&&N(C+1)+O(C+1)*A_&&N(H-1)+O(H-1)*A>R;)H--;L=-(N(C)*I+O(C)*D);for(var $=C;H>=$;$++){var G=N($),K=O($);J.push(B(10,G)*B(2,K))}}function V(_,$){return 3*_+$}function O($){return $-3*N($)}function N($){return K(U($/3))}J=[];var R=U(a(P)/H),F=U(a(h)/H),E=G(R),T=K(F),$=E-T,S=R-F;"exponent"===b?C():g>=$&&M>g?_():C()}function T(){for(var _=[],$=0,E=J.length;E>$;$++)_[$]=(V?1:-1)*J[$];!V&&_.reverse();var B=d(),A=B.value2Coord,C=A(_[0]),D=A(_[_.length-1]);return C===D&&(C-=1,D+=1),{dataMin:C,dataMax:D,tickList:_,logPositive:V,labelFormatter:e(),dataMappingMethods:B}}function e(){if("exponent"===b){var _=f,$=H;return function(B){if(!isFinite(parseFloat(B)))return"";var A="";return 0>B&&(B=-B,A="-"),A+_+N(a(B)/$)}}return function($){return isFinite(parseFloat($))?i.addCommas(X($)):""}}function d(){var _=V,$=L;return{value2Coord:function(A){return null==A||isNaN(A)||!isFinite(A)?A:(A=parseFloat(A),isFinite(A)?_&&F>A?A=F:!_&&A>-F&&(A=-F):A=F,A=Z(A),(_?1:-1)*(a(A)+$))},coord2Value:function(A){return null==A||isNaN(A)||!isFinite(A)?A:(A=parseFloat(A),isFinite(A)||(A=F),_?B(C,A-$):-B(C,-A+$))}}}function U($){return+Number(+$).toFixed(14)}function X($){return Number($).toFixed(15).replace(/\.?0*$/,"")}function N(A){A=X(Math.round(A));for(var $=[],D=0,C=A.length;C>D;D++){var B=A.charAt(D);$.push(_[B]||"")}return $.join("")}function Q($){return $>-F&&F>$}var V,f,b,H,E,M,L,h,P,J,i=O("./number"),W=Math,a=W.log,B=W.pow,Z=W.abs,G=W.ceil,K=W.floor,C=W.E,I=W.LN10,D=W.LN2,A=D/I,F=1e-9,$=5,g=2,_={0:"\u2070",1:"\xb9",2:"\xb2",3:"\xb3",4:"\u2074",5:"\u2075",6:"\u2076",7:"\u2077",8:"\u2078",9:"\u2079","-":"\u207b"};return c})