!function(Z){var O,u;!function(){function n(f,c){if(!c)return f;if(0===f.indexOf(".")){var l=c.split("/"),m=f.split("/"),e=l.length-1,b=m.length,a=0,d=0,h=0;a:for(;b>h;h++)switch(m[h]){case "..":if(!(e>a))break a;a++;d++;break;case ".":d++;break;default:break a}return l.length=e-a,m=m.slice(d),l.concat(m).join("/")}return f}function k(f){var c={};return function(l,m){if("string"==typeof l){var e=c[l];return e||(e=p(n(l,f)),c[l]=e),e}l instanceof Array&&(m=m||function(){},m.apply(this,q(l,m,f)))}}function q(f,c,l){var m=[],e=g[l],b=0;for(c=Math.min(f.length,c.length);c>b;b++){var a;a=n(f[b],l);switch(a){case "require":a=e&&e.require||O;break;case "exports":a=e.exports;break;case "module":a=e;break;default:a=p(a)}m.push(a)}return m}function p(f){var c=g[f];if(!c)throw Error("No "+f);if(!c.defined){var l=c.factory;f=l.apply(this,q(c.deps||[],l,f));"undefined"!=typeof f&&(c.exports=f);c.defined=1}return c.exports}var g={};u=function(f,c,l){g[f]={id:f,deps:c,factory:l,defined:0,exports:{},require:k(f)}};O=k("")}();u("echarts",["echarts/echarts"],function(n){return n});u("echarts/echarts","require ./config zrender/tool/util zrender/tool/event 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/Bubble zrender/loadingEffect/Spin ./theme/macarons ./theme/infographic".split(" "),function(n){function k(){c.Dispatcher.call(this)}function q(d){d.innerHTML="";this._themeConfig={};this.dom=d;this._connected=!1;this._status={dragIn:!1,dragOut:!1,needRefresh:!1};this._curEventType=!1;this._chartList=[];this._messageCenter=new k;this._messageCenterOutSide=new k;this.resize=this.resize();this._init()}function p(d,h,a,r,b){d=d._chartList;for(var e=d.length;e--;){var c=d[e];"function"==typeof c[h]&&c[h](a,r,b)}}var g=n("./config"),f=n("zrender/tool/util"),c=n("zrender/tool/event"),l={},m=new Date-0,e={};l.version="1.0.0";l.mobile=!0;l.dependencies={zrender:"1.0.0"};l.init=function(d,h){var a=n("zrender");a.version.replace(".","")-0t;t++){var e=a[t],c=b[e];r[c]="_on"+e.toLowerCase();h.on(c,this._onzrevent)}this.chart={};this.component={};this._island=new (n("./chart/island"))(this._themeConfig,this._messageCenter,h,{},this);this.chart.island=this._island;this._toolbox=new (n("./component/toolbox"))(this._themeConfig,this._messageCenter,h,{},this);this.component.toolbox=this._toolbox;t=n("./component");t.define("title",n("./component/title"));t.define("tooltip",n("./component/tooltip"));t.define("legend",n("./component/legend"));0!==h.getWidth()&&0!==h.getHeight()||console.error("Dom\u2019s width \x26 height should be ready before init.")},__onevent:function(d){d.__echartsId=d.__echartsId||this.id;var h=d.__echartsId===this.id;switch(this._curEventType||(this._curEventType=d.type),d.type){case g.EVENT.LEGEND_SELECTED:this._onlegendSelected(d);break;case g.EVENT.DATA_ZOOM:if(!h){var a=this.component.dataZoom;a&&(a.silence(!0),a.absoluteZoom(d.zoom),a.silence(!1))}this._ondataZoom(d);break;case g.EVENT.DATA_RANGE:h&&this._ondataRange(d);break;case g.EVENT.MAGIC_TYPE_CHANGED:h||(a=this.component.toolbox)&&(a.silence(!0),a.setMagicType(d.magicType),a.silence(!1));this._onmagicTypeChanged(d);break;case g.EVENT.DATA_VIEW_CHANGED:h&&this._ondataViewChanged(d);break;case g.EVENT.TOOLTIP_HOVER:h&&this._tooltipHover(d);break;case g.EVENT.RESTORE:this._onrestore();break;case g.EVENT.REFRESH:h&&this._onrefresh(d);break;case g.EVENT.TOOLTIP_IN_GRID:case g.EVENT.TOOLTIP_OUT_GRID:h?this._connected&&(a=this.component.grid)&&(d.x=(d.event.zrenderX-a.getX())/a.getWidth(),d.y=(d.event.zrenderY-a.getY())/a.getHeight()):(a=this.component.grid)&&this._zr.trigger("mousemove",{connectTrigger:!0,zrenderX:a.getX()+d.x*a.getWidth(),zrenderY:a.getY()+d.y*a.getHeight()})}if(this._connected&&h&&this._curEventType===d.type){for(var r in this._connected)this._connected[r].connectedEventHandler(d);this._curEventType=null}(!h||!this._connected&&h)&&(this._curEventType=null)},_onclick:function(d){if(p(this,"onclick",d),d.target){var h=this._eventPackage(d.target);h&&null!=h.seriesIndex&&this._messageCenter.dispatch(g.EVENT.CLICK,d.event,h,this)}},_ondblclick:function(d){if(p(this,"ondblclick",d),d.target){var h=this._eventPackage(d.target);h&&null!=h.seriesIndex&&this._messageCenter.dispatch(g.EVENT.DBLCLICK,d.event,h,this)}},_onmouseover:function(d){if(d.target){var h=this._eventPackage(d.target);h&&null!=h.seriesIndex&&this._messageCenter.dispatch(g.EVENT.HOVER,d.event,h,this)}},_onmouseout:function(d){if(d.target){var h=this._eventPackage(d.target);h&&null!=h.seriesIndex&&this._messageCenter.dispatch(g.EVENT.MOUSEOUT,d.event,h,this)}},_ondragstart:function(d){this._status={dragIn:!1,dragOut:!1,needRefresh:!1};p(this,"ondragstart",d)},_ondragenter:function(d){p(this,"ondragenter",d)},_ondragover:function(d){p(this,"ondragover",d)},_ondragleave:function(d){p(this,"ondragleave",d)},_ondrop:function(d){p(this,"ondrop",d,this._status);this._island.ondrop(d,this._status)},_ondragend:function(d){if(p(this,"ondragend",d,this._status),this._timeline&&this._timeline.ondragend(d,this._status),this._island.ondragend(d,this._status),this._status.needRefresh){this._syncBackupData(this._option);var h=this._messageCenter;h.dispatch(g.EVENT.DATA_CHANGED,d.event,this._eventPackage(d.target),this);h.dispatch(g.EVENT.REFRESH,null,null,this)}},_onlegendSelected:function(d){this._status.needRefresh=!1;p(this,"onlegendSelected",d,this._status);this._status.needRefresh&&this._messageCenter.dispatch(g.EVENT.REFRESH,null,null,this)},_ondataZoom:function(d){this._status.needRefresh=!1;p(this,"ondataZoom",d,this._status);this._status.needRefresh&&this._messageCenter.dispatch(g.EVENT.REFRESH,null,null,this)},_ondataRange:function(d){this._clearEffect();this._status.needRefresh=!1;p(this,"ondataRange",d,this._status);this._status.needRefresh&&this._zr.refreshNextFrame()},_onmagicTypeChanged:function(){this._clearEffect();this._render(this._toolbox.getMagicOption())},_ondataViewChanged:function(d){this._syncBackupData(d.option);this._messageCenter.dispatch(g.EVENT.DATA_CHANGED,null,d,this);this._messageCenter.dispatch(g.EVENT.REFRESH,null,null,this)},_tooltipHover:function(d){p(this,"ontooltipHover",d,[])},_onrestore:function(){this.restore()},_onrefresh:function(d){this._refreshInside=!0;this.refresh(d);this._refreshInside=!1},_syncBackupData:function(d){this.component.dataZoom&&this.component.dataZoom.syncBackupData(d)},_eventPackage:function(d){if(d){var h=n("./util/ecData"),a=h.get(d,"seriesIndex"),r=h.get(d,"dataIndex");return r=-1!=a&&this.component.dataZoom?this.component.dataZoom.getRealDataIndex(a,r):r,{seriesIndex:a,seriesName:(h.get(d,"series")||{}).name,dataIndex:r,data:h.get(d,"data"),name:h.get(d,"name"),value:h.get(d,"value"),special:h.get(d,"special")}}},_noDataCheck:function(d){d=d.series;for(var h=0,a=d.length;a>h;h++)if(d[h].type==g.CHART_TYPE_MAP||d[h].data&&0l;l++)b=c[l],e=this.component[b],d[b]?(e?e.refresh&&e.refresh(d):(r=a.get(/^[xy]Axis$/.test(b)?"axis":b),e=new r(this._themeConfig,this._messageCenter,this._zr,d,this,b),this.component[b]=e),this._chartList.push(e)):e&&(e.dispose(),this.component[b]=null,delete this.component[b]);var m,w,D;r={};l=0;for(f=d.series.length;f>l;l++)(w=d.series[l].type)?r[w]||(r[w]=!0,m=h.get(w),m?(this.chart[w]?(D=this.chart[w],D.refresh(d)):D=new m(this._themeConfig,this._messageCenter,this._zr,d,this),this._chartList.push(D),this.chart[w]=D):console.error(w+" has not been required.")):console.error("series["+l+"] chart type has not been defined.");for(w in this.chart)w==g.CHART_TYPE_ISLAND||r[w]||(this.chart[w].dispose(),this.chart[w]=null,delete this.chart[w]);this.component.grid&&this.component.grid.refixAxisShape(this.component);this._island.refresh(d);this._toolbox.refresh(d);d.animation&&!d.renderAsImage?this._zr.refresh():this._zr.render();m="IMG"+this.id;w=document.getElementById(m);d.renderAsImage?(w?w.src=this.getDataURL(d.renderAsImage):(w=this.getImage(d.renderAsImage),w.id=m,w.style.position="absolute",w.style.left=0,w.style.top=0,this.dom.firstChild.appendChild(w)),this.un(),this._zr.un(),this._disposeChartList(),this._zr.clear()):w&&w.parentNode.removeChild(w);this._option=d}},restore:function(){this._clearEffect();this._option=f.clone(this._optionRestore);this._disposeChartList();this._island.clear();this._toolbox.reset(this._option,!0);this._render(this._option)},refresh:function(d){this._clearEffect();d=d||{};var h=d.option;!this._refreshInside&&h&&(h=this.getOption(),f.merge(h,d.option,!0),f.merge(this._optionRestore,d.option,!0),this._toolbox.reset(h));this._island.refresh(h);this._toolbox.refresh(h);this._zr.clearAnimation();d=0;for(var a=this._chartList.length;a>d;d++)this._chartList[d].refresh&&this._chartList[d].refresh(h);this.component.grid&&this.component.grid.refixAxisShape(this.component);this._zr.refresh()},_disposeChartList:function(){this._clearEffect();this._zr.clearAnimation();for(var d=this._chartList.length;d--;){var a=this._chartList[d];if(a){var t=a.type;this.chart[t]&&delete this.chart[t];this.component[t]&&delete this.component[t];a.dispose&&a.dispose()}}this._chartList=[]},_mergeGlobalConifg:function(d){for(var a="backgroundColor calculable calculableColor calculableHolderColor nameConnector valueConnector animation animationThreshold animationDuration animationDurationUpdate animationEasing addDataAnimation symbolList DRAG_ENABLE_TIME".split(" "),t=a.length;t--;){var r=a[t];null==d[r]&&(d[r]=null!=this._themeConfig[r]?this._themeConfig[r]:g[r])}var b=d.color;b&&b.length||(b=this._themeConfig.color||g.color);this._zr.getColor=function(d){return n("zrender/tool/color").getColor(d,b)}},setOption:function(d,a){return d.timeline?this._setTimelineOption(d):this._setOption(d,a)},_setOption:function(d,a){return this._option=!a&&this._option?f.merge(this.getOption(),f.clone(d),!0):f.clone(d),this._optionRestore=f.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 d(d){var b=t._optionRestore[d];if(b)if(b instanceof Array)for(var e=b.length;e--;)a[d][e].data=f.clone(b[e].data);else a[d].data=f.clone(b.data)}var a=f.clone(this._option),t=this;return d("xAxis"),d("yAxis"),d("series"),a},setSeries:function(d,a){return a?(this._option.series=d,this.setOption(this._option,a)):this.setOption({series:d}),this},getSeries:function(){return this.getOption().series},_setTimelineOption:function(d){this._timeline&&this._timeline.dispose();return this._timeline=new (n("./component/timeline"))(this._themeConfig,this._messageCenter,this._zr,d,this),this.component.timeline=this._timeline,this},addData:function(d,a,t,r,b){for(var e=d instanceof Array?d:[[d,a,t,r,b]],c=this.getOption(),l=this._optionRestore,m=0,p=e.length;p>m;m++){d=e[m][0];a=e[m][1];t=e[m][2];r=e[m][3];b=e[m][4];var w=l.series[d],D=t?"unshift":"push";t=t?"pop":"shift";if(w){var v=w.data,k=c.series[d].data;if(v[D](a),k[D](a),r||(v[t](),a=k[t]()),null!=b){var n,q;if(w.type===g.CHART_TYPE_PIE&&(n=l.legend)&&(q=n.data))w=c.legend.data,(q[D](b),w[D](b),r)||(r=f.indexOf(q,a.name),-1!=r&&q.splice(r,1),r=f.indexOf(w,a.name),-1!=r&&w.splice(r,1));else if(null!=l.xAxis&&null!=l.yAxis){var B,A;a=w.xAxisIndex||0;(null==l.xAxis[a].type||"category"===l.xAxis[a].type)&&(B=l.xAxis[a].data,A=c.xAxis[a].data,B[D](b),A[D](b),r||(B[t](),A[t]()));a=w.yAxisIndex||0;"category"===l.yAxis[a].type&&(B=l.yAxis[a].data,A=c.yAxis[a].data,B[D](b),A[D](b),r||(B[t](),A[t]()))}}this._option.series[d].data=c.series[d].data}}this._zr.clearAnimation();for(var H=this._chartList,m=0,p=H.length;p>m;m++)c.addDataAnimation&&H[m].addDataAnimation&&H[m].addDataAnimation(e);this.component.dataZoom&&this.component.dataZoom.syncOption(c);this._option=c;var N=this;return setTimeout(function(){if(N._zr){N._zr.clearAnimation();for(var d=0,a=H.length;a>d;d++)H[d].motionlessOnce=c.addDataAnimation&&H[d].addDataAnimation;N._messageCenter.dispatch(g.EVENT.REFRESH,null,{option:c},N)}},c.addDataAnimation?c.animationDurationUpdate:0),this},addMarkPoint:function(d,a){return this._addMark(d,a,"markPoint")},addMarkLine:function(d,a){return this._addMark(d,a,"markLine")},_addMark:function(d,a,t){var r,b=this._option.series;if(b&&(r=b[d])){var b=this._optionRestore.series[d],e=r[t],c=b[t],e=r[t]=e||{data:[]},c=b[t]=c||{data:[]},l;for(l in a)"data"===l?(e.data=e.data.concat(a.data),c.data=c.data.concat(a.data)):"object"!=typeof a[l]||null==e[l]?e[l]=c[l]=a[l]:(f.merge(e[l],a[l],!0),f.merge(c[l],a[l],!0));(r=this.chart[r.type])&&r.addMark(d,a,t)}return this},delMarkPoint:function(d,a){return this._delMark(d,a,"markPoint")},delMarkLine:function(d,a){return this._delMark(d,a,"markLine")},_delMark:function(d,a,t){var r,b,e,c=this._option.series;if(!(c&&(r=c[d])&&(b=r[t])&&(e=b.data)))return this;a=a.split(" \x3e ");b=-1;for(var c=0,l=e.length;l>c;c++){var f=e[c];if(f instanceof Array){if(f[0].name===a[0]&&f[1].name===a[1]){b=c;break}}else if(f.name===a[0]){b=c;break}}-1h;h++)this._connected[a[h].id]=a[h];else this._connected[a.id]=a;return this},disConnect:function(a){if(!a||!this._connected)return this;if(a instanceof Array)for(var h=0,t=a.length;t>h;h++)delete this._connected[a[h].id];else delete this._connected[a.id];for(var r in this._connected)return this;return this._connected=!1,this},connectedEventHandler:function(a){a.__echartsId!=this.id&&this._onevent(a)},isConnected:function(){return!!this._connected},showLoading:function(a){var h={bubble:n("zrender/loadingEffect/Bubble"),spin:n("zrender/loadingEffect/Spin")};a=a||{};var t=a.textStyle||{};a.textStyle=t;var r=f.merge(f.merge(f.clone(t),this._themeConfig.textStyle),g.textStyle);t.textFont=r.fontStyle+" "+r.fontWeight+" "+r.fontSize+"px "+r.fontFamily;t.text=a.text||this._option&&this._option.loadingText||this._themeConfig.loadingText||g.loadingText;null!=a.x&&(t.x=a.x);null!=a.y&&(t.y=a.y);a.effectOption=a.effectOption||{};a.effectOption.textStyle=t;t=a.effect;return("string"==typeof t||null==t)&&(t=h[a.effect||this._option&&this._option.loadingEffect||this._themeConfig.loadingEffect||g.loadingEffect]||h.spin),this._zr.showLoading(new t(a.effectOption)),this},hideLoading:function(){return this._zr.hideLoading(),this},setTheme:function(a){if(a){if("string"==typeof a)switch(a){case "macarons":a=n("./theme/macarons");break;case "infographic":a=n("./theme/infographic");break;default:a={}}else a=a||{};this._themeConfig=a}this._timeline&&this._timeline.setTheme(!0);this._optionRestore&&this.restore()},resize:function(){var a=this;return function(){if(a._clearEffect(),a._zr.resize(),a._option&&a._option.renderAsImage)return a._render(a._option),a;a._zr.clearAnimation();a._island.resize();a._toolbox.resize();a._timeline&&a._timeline.resize();for(var h=0,t=a._chartList.length;t>h;h++)a._chartList[h].resize&&a._chartList[h].resize();return a.component.grid&&a.component.grid.refixAxisShape(a.component),a._zr.refresh(),a._messageCenter.dispatch(g.EVENT.RESIZE,null,null,a),a}},_clearEffect:function(){this._zr.modLayer(g.EFFECT_ZLEVEL,{motionBlur:!1});this._zr.painter.clearLayer(g.EFFECT_ZLEVEL)},clear:function(){return this._disposeChartList(),this._zr.clear(),this._option={},this._optionRestore={},this.dom.style.backgroundColor=null,this},dispose:function(){var a=this.dom.getAttribute("_echarts_instance_");a&&delete e[a];this._island.dispose();this._toolbox.dispose();this._timeline&&this._timeline.dispose();this._messageCenter.unbind();this.clear();this._zr.dispose();this._zr=null}},l});u("echarts/config",[],function(){return{CHART_TYPE_LINE:"line",CHART_TYPE_BAR:"bar",CHART_TYPE_SCATTER:"scatter",CHART_TYPE_PIE:"pie",CHART_TYPE_RADAR:"radar",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",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".split(" "),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,2],smoothRadian:.2,precision:2,effect:{show:!1,loop:!0,period:15,scaleSize:2},itemStyle:{normal:{borderWidth:1.5,label:{show:!0,position:"end",textStyle:{align:"right",baseline:"bottom"}},lineStyle:{type:"dashed"}},emphasis:{label:{show:!1,textStyle:{align:"right",baseline:"bottom"}},lineStyle:{}}}},textStyle:{decoration:"none",fontFamily:"Arial, Verdana, sans-serif",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,symbolList:"emptyCircle emptyRectangle emptyTriangle emptyDiamond circle rectangle triangle diamond".split(" "),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:" \x26 ",valueConnector:": ",animation:!0,addDataAnimation:!0,animationThreshold:2E3,animationDuration:2E3,animationDurationUpdate:500,animationEasing:"ExponentialOut"}});u("zrender/tool/util",["require"],function(){function n(a){return a&&1===a.nodeType&&"string"==typeof a.nodeName}function k(a){if("object"==typeof a&&null!==a){var h=a;if(a instanceof Array)for(var h=[],t=0,r=a.length;r>t;t++)h[t]=k(a[t]);else if(!m[e.call(a)]&&!n(a))for(t in h={},a)a.hasOwnProperty(t)&&(h[t]=k(a[t]));return h}return a}function q(a,h,t){for(var r in h){var b=a,c=h,l=r,f=t;if(c.hasOwnProperty(l)){var g=b[l];"object"!=typeof g||m[e.call(g)]||n(g)?!f&&l in b||(b[l]=c[l]):q(b[l],c[l],f)}}return a}var p,g,f,c,l,m={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1},e=Object.prototype.toString,b=0,a=0;return{inherits:function(a,h){function t(){}var r=a.prototype;t.prototype=h.prototype;a.prototype=new t;for(var b in r)a.prototype[b]=r[b];a.constructor=a},clone:k,merge:q,getContext:function(){return p||(p=document.createElement("canvas").getContext("2d")),p},getPixelContext:function(){return f||(g=document.createElement("canvas"),c=g.width,l=g.height,f=g.getContext("2d")),f},getPixelOffset:function(){return{x:b,y:a}},adjustCanvasSize:function(d,h){var t;d+b>c&&(c=d+b+100,g.width=c,t=!0);h+a>l&&(l=h+a+100,g.height=l,t=!0);-b>d&&(b=100*Math.ceil(-d/100),c+=b,g.width=c,t=!0);-a>h&&(a=100*Math.ceil(-h/100),l+=a,g.height=l,t=!0);t&&f.translate(b,a)},indexOf:function(a,h){if(a.indexOf)return a.indexOf(h);for(var t=0,r=a.length;r>t;t++)if(a[t]===h)return t;return-1}}});u("zrender/tool/event",["require","../mixin/Eventful"],function(n){n=n("../mixin/Eventful");return{getX:function(k){return"undefined"!=typeof k.zrenderX&&k.zrenderX||"undefined"!=typeof k.offsetX&&k.offsetX||"undefined"!=typeof k.layerX&&k.layerX||"undefined"!=typeof k.clientX&&k.clientX},getY:function(k){return"undefined"!=typeof k.zrenderY&&k.zrenderY||"undefined"!=typeof k.offsetY&&k.offsetY||"undefined"!=typeof k.layerY&&k.layerY||"undefined"!=typeof k.clientY&&k.clientY},getDelta:function(k){return"undefined"!=typeof k.zrenderDelta&&k.zrenderDelta||"undefined"!=typeof k.wheelDelta&&k.wheelDelta||"undefined"!=typeof k.detail&&-k.detail},stop:"function"==typeof window.addEventListener?function(k){k.preventDefault();k.stopPropagation();k.cancelBubble=!0}:function(k){k.returnValue=!1;k.cancelBubble=!0},Dispatcher:n}});u("zrender",["zrender/zrender"],function(n){return n});u("zrender/zrender","require ./tool/util ./tool/log ./tool/guid ./Handler ./Painter ./Storage ./animation/Animation ./tool/env".split(" "),function(n){function k(a){return function(){for(var h=a.animatingElements,t=0,r=h.length;r>t;t++)a.storage.mod(h[t].id);(h.length||a._needsRefreshNextFrame)&&a.refresh()}}var q=n("./tool/util"),p=n("./tool/log"),g=n("./tool/guid"),f=n("./Handler"),c=n("./Painter"),l=n("./Storage"),m=n("./animation/Animation"),e={},b={version:"1.0.0",init:function(d){d=new a(g(),d);return e[d.id]=d,d},dispose:function(a){if(a)a.dispose();else{for(var h in e)e[h].dispose();e={}}return b},getInstance:function(a){return e[a]},delInstance:function(a){return delete e[a],b}},a=function(a,h){this.id=a;this.env=n("./tool/env");this.storage=new l;this.painter=new c(h,this.storage);this.handler=new f(h,this.storage,this.painter);this.animatingElements=[];this.animation=new m({stage:{update:k(this)}});this.animation.start();var t=this;this.painter.refreshNextFrame=function(){t.refreshNextFrame()};this._needsRefreshNextFrame=!1};return a.prototype.getId=function(){return this.id},a.prototype.addShape=function(a){return this.storage.addRoot(a),this},a.prototype.addGroup=function(a){return this.storage.addRoot(a),this},a.prototype.delShape=function(a){return this.storage.delRoot(a),this},a.prototype.delGroup=function(a){return this.storage.delRoot(a),this},a.prototype.modShape=function(a,h){return this.storage.mod(a,h),this},a.prototype.modGroup=function(a,h){return this.storage.mod(a,h),this},a.prototype.modLayer=function(a,h){return this.painter.modLayer(a,h),this},a.prototype.addHoverShape=function(a){return this.storage.addHover(a),this},a.prototype.render=function(a){return this.painter.render(a),this._needsRefreshNextFrame=!1,this},a.prototype.refresh=function(a){return this.painter.refresh(a),this._needsRefreshNextFrame=!1,this},a.prototype.refreshNextFrame=function(){return this._needsRefreshNextFrame=!0,this},a.prototype.refreshHover=function(a){return this.painter.refreshHover(a),this},a.prototype.refreshShapes=function(a,h){return this.painter.refreshShapes(a,h),this},a.prototype.resize=function(){return this.painter.resize(),this},a.prototype.animate=function(a,h,t){if("string"==typeof a&&(a=this.storage.get(a)),a){var r;if(h){for(var b=h.split("."),e=a,c=0,l=b.length;l>c;c++)e&&(e=e[b[c]]);e&&(r=e)}else r=a;if(!r)return void p('Property "'+h+'" is not existed in element '+a.id);var f=this.animatingElements;return"undefined"==typeof a.__aniCount&&(a.__aniCount=0),0===a.__aniCount&&f.push(a),a.__aniCount++,this.animation.animate(r,{loop:t}).done(function(){if(a.__aniCount--,0===a.__aniCount){var r=q.indexOf(f,a);f.splice(r,1)}})}p("Element not existed")},a.prototype.clearAnimation=function(){this.animation.clear()},a.prototype.showLoading=function(a){return this.painter.showLoading(a),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,h,t){return this.painter.toDataURL(a,h,t)},a.prototype.shapeToImage=function(a,h,t){var r=g();return this.painter.shapeToImage(r,a,h,t)},a.prototype.on=function(a,h,t){return this.handler.on(a,h,t),this},a.prototype.un=function(a,h){return this.handler.un(a,h),this},a.prototype.trigger=function(a,h){return this.handler.trigger(a,h),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.animatingElements=this.storage=this.painter=this.handler=null;b.delInstance(this.id)},b});u("zrender/config",[],function(){return{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},catchBrushException:!1,debugMode:0,devicePixelRatio:Math.max(window.devicePixelRatio||1,1)}});u("echarts/chart/island","require ./base zrender/shape/Circle ../config ../util/ecData zrender/tool/util zrender/tool/event zrender/tool/color ../util/accMath ../chart".split(" "),function(n){function k(c,e,b,a,d){q.call(this,c,e,b,a,d);this._nameConnector;this._valueConnector;this._zrHeight=this.zr.getHeight();this._zrWidth=this.zr.getWidth();var h=this;h.shapeHandler.onmousewheel=function(a){var r=a.target;a=a.event;var d=l.getDelta(a),d=0r.style.r?5:r.style.r;var b=f.get(r,"value"),e=b*h.option.island.calculateStep,b=1c;c++)this.zr.modShape(this.shapeList[c].id,{style:{x:Math.round(this.shapeList[c].style.x*b),y:Math.round(this.shapeList[c].style.y*a)}})},add:function(c){var e=f.get(c,"name"),b=f.get(c,"value"),a=null!=f.get(c,"series")?f.get(c,"series").name:"",d=this.getFont(this.option.island.textStyle),d={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:c.style.x,y:c.style.y,r:this.option.island.r,color:c.style.color||c.style.strokeColor,text:e+this._valueConnector+b,textFont:d},draggable:!0,hoverable:!0,onmousewheel:this.shapeHandler.onmousewheel,_type:"island"};"#fff"===d.style.color&&(d.style.color=c.style.strokeColor);this.setCalculable(d);d.dragEnableTime=0;f.pack(d,{name:a},-1,b,-1,e);d=new p(d);this.shapeList.push(d);this.zr.addShape(d)},del:function(c){this.zr.delShape(c.id);for(var e=[],b=0,a=this.shapeList.length;a>b;b++)this.shapeList[b].id!=c.id&&e.push(this.shapeList[b]);this.shapeList=e},ondrop:function(c,e){if(this.isDrop&&c.target){var b=c.target;this._combine(b,c.dragged);this.zr.modShape(b.id);e.dragIn=!0;this.isDrop=!1}},ondragend:function(c,e){var b=c.target;this.isDragend?e.dragIn&&(this.del(b),e.needRefresh=!0):e.dragIn||(b.style.x=l.getX(c.event),b.style.y=l.getY(c.event),this.add(b),e.needRefresh=!0);this.isDragend=!1}},c.inherits(k,q),n("../chart").define("island",k),k});u("echarts/component/toolbox","require ./base zrender/shape/Image zrender/shape/Rectangle ../util/shape/Icon ../config zrender/tool/util zrender/config zrender/tool/event ../component".split(" "),function(n){function k(b,a,d,h,t){q.call(this,b,a,d,h,t);this.dom=t.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 r=this;r._onDataZoom=function(a){r.__onDataZoom(a)};r._onDataZoomReset=function(a){r.__onDataZoomReset(a)};r._onRestore=function(a){r.__onRestore(a)};r._onMagicType=function(a){r.__onMagicType(a)};r._onCustomHandler=function(a){r.__onCustomHandler(a)};r._onmousemove=function(a){return r.__onmousemove(a)};r._onmousedown=function(a){return r.__onmousedown(a)};r._onmouseup=function(a){return r.__onmouseup(a)}}var q=n("./base"),p=n("zrender/shape/Image"),g=n("zrender/shape/Rectangle"),f=n("../util/shape/Icon"),c=n("../config");c.toolbox={zlevel:0,z:6,show:!1,orient:"horizontal",x:"right",y:"bottom",color:["#1e90ff","#22bb22","#4b0082","#d2691e"],disableColor:"#ddd",effectiveColor:"red",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:1,itemGap:18,itemSize:24,showTitle:!0,feature:{dataZoom:{show:!1,title:{dataZoom:"\u533a\u57df\u7f29\u653e",dataZoomReset:"\u533a\u57df\u7f29\u653e\u540e\u9000"}},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"}}};var l=n("zrender/tool/util"),m=n("zrender/config"),e=n("zrender/tool/event");return k.prototype={type:c.COMPONENT_TYPE_TOOLBOX,_buildShape:function(){this._iconList=[];var b=this.option.toolbox;this._enableColor=b.effectiveColor;this._disableColor=b.disableColor;var b=b.feature,a=[],d;for(d in b)if(b[d].show)switch(d){case "mark":break;case "magicType":for(var h=0,t=b[d].type.length;t>h;h++)b[d].title[b[d].type[h]+"Chart"]=b[d].title[b[d].type[h]],b[d].option&&(b[d].option[b[d].type[h]+"Chart"]=b[d].option[b[d].type[h]]),a.push({key:d,name:b[d].type[h]+"Chart"});break;case "dataZoom":a.push({key:d,name:"dataZoom"});a.push({key:d,name:"dataZoomReset"});break;case "saveAsImage":case "dataView":break;default:a.push({key:d,name:d})}if(0h;h++)r=a[h].name,d=a[h].key,this._iconList.push(r),this._featureTitle[r]=b[d].title[r]||b[d].title,b[d].icon&&(this._featureIcon[r]=b[d].icon[r]||b[d].icon),b[d].color&&(this._featureColor[r]=b[d].color[r]||b[d].color),b[d].option&&(this._featureOption[r]=b[d].option[r]||b[d].option);this._itemGroupLocation=this._getItemGroupLocation();this._buildBackground();this._buildItem();h=0;for(t=this.shapeList.length;t>h;h++)this.zr.addShape(this.shapeList[h]);this._iconShapeMap.dataZoomReset&&0===this._zoomQueue.length&&this._iconDisable(this._iconShapeMap.dataZoomReset)}},_buildItem:function(){var b,a,d,h,t=this.option.toolbox,r=this._iconList.length,y=this._itemGroupLocation.x,e=this._itemGroupLocation.y,c=t.itemSize,l=t.itemGap,g=t.color instanceof Array?t.color:[t.color],m=this.getFont(t.textStyle);"horizontal"===t.orient?(a=.5>this._itemGroupLocation.y/this.zr.getHeight()?"bottom":"top",d=.5>this._itemGroupLocation.x/this.zr.getWidth()?"left":"right",h=.5>this._itemGroupLocation.y/this.zr.getHeight()?"top":"bottom"):a=.5>this._itemGroupLocation.x/this.zr.getWidth()?"right":"left";this._iconShapeMap={};for(var w=0;r>w;w++){switch(b={type:"icon",zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:y,y:e,width:c,height:c,iconType:this._iconList[w],lineWidth:1,strokeColor:this._featureColor[this._iconList[w]]||g[w%g.length],brushType:"stroke"},highlightStyle:{lineWidth:1,text:t.showTitle?this._featureTitle[this._iconList[w]]:void 0,textFont:m,textPosition:a,strokeColor:this._featureColor[this._iconList[w]]||g[w%g.length]},hoverable:!0,clickable:!0},this._featureIcon[this._iconList[w]]&&(b.style.image=this._featureIcon[this._iconList[w]].replace(/^image:\/\//,""),b.style.opacity=.8,b.highlightStyle.opacity=1,b.type="image"),"horizontal"===t.orient&&(0===w&&"left"===d&&(b.highlightStyle.textPosition="specific",b.highlightStyle.textAlign=d,b.highlightStyle.textBaseline=h,b.highlightStyle.textX=y,b.highlightStyle.textY="top"===h?e+c+10:e-10),w===r-1&&"right"===d&&(b.highlightStyle.textPosition="specific",b.highlightStyle.textAlign=d,b.highlightStyle.textBaseline=h,b.highlightStyle.textX=y+c,b.highlightStyle.textY="top"===h?e+c+10:e-10)),this._iconList[w]){case "dataZoom":b.onclick=this._onDataZoom;break;case "dataZoomReset":b.onclick=this._onDataZoomReset;break;case "restore":b.onclick=this._onRestore;break;default:this._iconList[w].match("Chart")?(b._name=this._iconList[w].replace("Chart",""),b.onclick=this._onMagicType):b.onclick=this._onCustomHandler}"icon"===b.type?b=new f(b):"image"===b.type&&(b=new p(b));this.shapeList.push(b);this._iconShapeMap[this._iconList[w]]=b;"horizontal"===t.orient?y+=c+l:e+=c+l}},_buildBackground:function(){var b=this.option.toolbox,a=this.reformCssArray(this.option.toolbox.padding);this.shapeList.push(new g({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._itemGroupLocation.x-a[3],y:this._itemGroupLocation.y-a[0],width:this._itemGroupLocation.width+a[3]+a[1],height:this._itemGroupLocation.height+a[0]+a[2],brushType:0===b.borderWidth?"fill":"both",color:b.backgroundColor,strokeColor:b.borderColor,lineWidth:b.borderWidth}}))},_getItemGroupLocation:function(){var b=this.option.toolbox,a=this.reformCssArray(this.option.toolbox.padding),d=this._iconList.length,h=b.itemGap,t=b.itemSize,r=0,y=0;"horizontal"===b.orient?(r=(t+h)*d-h,y=t):(y=(t+h)*d-h,r=t);d=this.zr.getWidth();switch(b.x){case "center":d=Math.floor((d-r)/2);break;case "left":d=a[3]+b.borderWidth;break;case "right":d=d-r-a[1]-b.borderWidth;break;default:d=b.x-0,d=isNaN(d)?0:d}h=this.zr.getHeight();switch(b.y){case "top":b=a[0]+b.borderWidth;break;case "bottom":b=h-y-a[2]-b.borderWidth;break;case "center":b=Math.floor((h-y)/2);break;default:b=b.y-0,b=isNaN(b)?0:b}return{x:d,y:b,width:r,height:y}},__onmousemove:function(b){this._zooming&&(this._zoomShape.style.width=e.getX(b.event)-this._zoomShape.style.x,this._zoomShape.style.height=e.getY(b.event)-this._zoomShape.style.y,this.zr.addHoverShape(this._zoomShape),this.dom.style.cursor="crosshair",e.stop(b.event));this._zoomStart&&"pointer"!=this.dom.style.cursor&&"move"!=this.dom.style.cursor&&(this.dom.style.cursor="crosshair")},__onmousedown:function(b){if(!b.target){this._zooming=!0;var a=e.getX(b.event);b=e.getY(b.event);var d=this.option.dataZoom||{};return this._zoomShape=new g({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:a,y:b,width:1,height:1,brushType:"both"},highlightStyle:{lineWidth:2,color:d.fillerColor||c.dataZoom.fillerColor,strokeColor:d.handleColor||c.dataZoom.handleColor,brushType:"both"}}),this.zr.addHoverShape(this._zoomShape),!0}},__onmouseup:function(){if(!this._zoomShape||10>Math.abs(this._zoomShape.style.width)||10>Math.abs(this._zoomShape.style.height))return this._zooming=!1,!0;if(this._zooming&&this.component.dataZoom){this._zooming=!1;var b=this.component.dataZoom.rectZoom(this._zoomShape.style);b&&(this._zoomQueue.push({start:b.start,end:b.end,start2:b.start2,end2:b.end2}),this._iconEnable(this._iconShapeMap.dataZoomReset),this.zr.refreshNextFrame())}return!0},__onDataZoom:function(b){b=b.target;if(this._zooming||this._zoomStart)this._resetZoom(),this.zr.refreshNextFrame(),this.dom.style.cursor="default";else{this.zr.modShape(b.id,{style:{strokeColor:this._enableColor}});this.zr.refreshNextFrame();this._zoomStart=!0;var a=this;setTimeout(function(){a.zr&&a.zr.on(m.EVENT.MOUSEDOWN,a._onmousedown)&&a.zr.on(m.EVENT.MOUSEUP,a._onmouseup)&&a.zr.on(m.EVENT.MOUSEMOVE,a._onmousemove)},10);this.dom.style.cursor="crosshair"}return!0},__onDataZoomReset:function(){return this._zooming&&(this._zooming=!1),this._zoomQueue.pop(),0=t.start?t.start:0,t=null!=t.end&&0<=t.end&&100>=t.end?t.end:100,h>t&&(h+=t,t=h-t,h-=t),this._zoomQueue=[{start:h,end:t,start2:0,end2:100}]):this._zoomQueue=[]},getMagicOption:function(){var b,a;if(this._magicType[c.CHART_TYPE_LINE]||this._magicType[c.CHART_TYPE_BAR]){for(var d=this._magicType[c.CHART_TYPE_LINE]?!1:!0,h=0,t=this.option.series.length;t>h;h++)a=this.option.series[h].type,(a==c.CHART_TYPE_LINE||a==c.CHART_TYPE_BAR)&&(b=this.option.xAxis instanceof Array?this.option.xAxis[this.option.series[h].xAxisIndex||0]:this.option.xAxis,b&&"category"===(b.type||"category")&&(b.boundaryGap=d?!0:b.__boundaryGap),b=this.option.yAxis instanceof Array?this.option.yAxis[this.option.series[h].yAxisIndex||0]:this.option.yAxis,b&&"category"===b.type&&(b.boundaryGap=d?!0:b.__boundaryGap));this._defaultMagic(c.CHART_TYPE_LINE,c.CHART_TYPE_BAR)}if(this._defaultMagic(c.CHART_TYPE_CHORD,c.CHART_TYPE_FORCE),this._defaultMagic(c.CHART_TYPE_PIE,c.CHART_TYPE_FUNNEL),this._magicType.stack||this._magicType.tiled)for(h=0,t=this.option.series.length;t>h;h++)this._magicType.stack?(this.option.series[h].stack="_ECHARTS_STACK_KENER_2014_",a="stack"):this._magicType.tiled&&(this.option.series[h].stack=null,a="tiled"),this._featureOption[a+"Chart"]&&l.merge(this.option.series[h],this._featureOption[a+"Chart"]||{},!0);return this.option},_defaultMagic:function(b,a){if(this._magicType[b]||this._magicType[a])for(var d=0,h=this.option.series.length;h>d;d++){var t=this.option.series[d].type;(t==b||t==a)&&(this.option.series[d].type=this._magicType[b]?b:a,this.option.series[d].itemStyle=l.clone(this.option.series[d].__itemStyle),t=this.option.series[d].type,this._featureOption[t+"Chart"]&&l.merge(this.option.series[d],this._featureOption[t+"Chart"]||{},!0))}},silence:function(b){this._isSilence=b},resize:function(){this.clear();this.option&&this.option.toolbox&&this.option.toolbox.show&&this._buildShape()},clear:function(b){this.zr&&(this.zr.delShape(this.shapeList),this.shapeList=[],b||(this.zr.delShape(this._markShapeList),this._markShapeList=[]))},onbeforDispose:function(){this._markShapeList=null},refresh:function(b){b&&(this._resetZoom(),b.toolbox=this.reformOption(b.toolbox),this.option=b,this.clear(!0),b.toolbox.show&&this._buildShape())}},l.inherits(k,q),n("../component").define("toolbox",k),k});u("echarts/component",[],function(){var n={},k={};return n.define=function(q,p){return k[q]=p,n},n.get=function(n){return k[n]},n});u("echarts/component/title","require ./base zrender/shape/Text zrender/shape/Rectangle ../config zrender/tool/util zrender/tool/area zrender/tool/color ../component".split(" "),function(n){function k(e,b,a,d,h){q.call(this,e,b,a,d,h);this.refresh(d)}var q=n("./base"),p=n("zrender/shape/Text"),g=n("zrender/shape/Rectangle"),f=n("../config");f.title={zlevel:0,z:6,show:!0,text:"",subtext:"",x:"center",y:"top",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:1,itemGap:5,textStyle:{fontSize:20,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}};var c=n("zrender/tool/util"),l=n("zrender/tool/area"),m=n("zrender/tool/color");return k.prototype={type:f.COMPONENT_TYPE_TITLE,_buildShape:function(){if(this.titleOption.show){this._itemGroupLocation=this._getItemGroupLocation();this._buildBackground();this._buildItem();for(var e=0,b=this.shapeList.length;b>e;e++)this.zr.addShape(this.shapeList[e])}},_buildItem:function(){var e=this.titleOption.text,b=this.titleOption.link,a=this.titleOption.target,d=this.titleOption.subtext,h=this.titleOption.sublink,t=this.titleOption.subtarget,r=this.getFont(this.titleOption.textStyle),y=this.getFont(this.titleOption.subtextStyle),c=this._itemGroupLocation.x,l=this._itemGroupLocation.y,f=this._itemGroupLocation.width,g=this._itemGroupLocation.height,e={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{y:l,color:this.titleOption.textStyle.color,text:e,textFont:r,textBaseline:"top"},highlightStyle:{color:m.lift(this.titleOption.textStyle.color,1),brushType:"fill"},hoverable:!1};b&&(e.hoverable=!0,e.clickable=!0,e.onclick=function(){a&&"self"==a?window.location=b:window.open(b)});y={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{y:l+g,color:this.titleOption.subtextStyle.color,text:d,textFont:y,textBaseline:"bottom"},highlightStyle:{color:m.lift(this.titleOption.subtextStyle.color,1),brushType:"fill"},hoverable:!1};switch(h&&(y.hoverable=!0,y.clickable=!0,y.onclick=function(){t&&"self"==t?window.location=h:window.open(h)}),this.titleOption.x){case "center":e.style.x=y.style.x=c+f/2;e.style.textAlign=y.style.textAlign="center";break;case "left":e.style.x=y.style.x=c;e.style.textAlign=y.style.textAlign="left";break;case "right":e.style.x=y.style.x=c+f;e.style.textAlign=y.style.textAlign="right";break;default:c=this.titleOption.x-0,c=isNaN(c)?0:c,e.style.x=y.style.x=c}this.titleOption.textAlign&&(e.style.textAlign=y.style.textAlign=this.titleOption.textAlign);this.shapeList.push(new p(e));""!==d&&this.shapeList.push(new p(y))},_buildBackground:function(){var e=this.reformCssArray(this.titleOption.padding);this.shapeList.push(new g({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._itemGroupLocation.x-e[3],y:this._itemGroupLocation.y-e[0],width:this._itemGroupLocation.width+e[3]+e[1],height:this._itemGroupLocation.height+e[0]+e[2],brushType:0===this.titleOption.borderWidth?"fill":"both",color:this.titleOption.backgroundColor,strokeColor:this.titleOption.borderColor,lineWidth:this.titleOption.borderWidth}}))},_getItemGroupLocation:function(){var e,b=this.reformCssArray(this.titleOption.padding),a=this.titleOption.text;e=this.titleOption.subtext;var d=this.getFont(this.titleOption.textStyle),h=this.getFont(this.titleOption.subtextStyle),t=Math.max(l.getTextWidth(a,d),l.getTextWidth(e,h)),a=l.getTextHeight(a,d)+(""===e?0:this.titleOption.itemGap+l.getTextHeight(e,h));e=this.zr.getWidth();switch(this.titleOption.x){case "center":e=Math.floor((e-t)/2);break;case "left":e=b[3]+this.titleOption.borderWidth;break;case "right":e=e-t-b[1]-this.titleOption.borderWidth;break;default:e=this.titleOption.x-0,e=isNaN(e)?0:e}d=this.zr.getHeight();switch(this.titleOption.y){case "top":b=b[0]+this.titleOption.borderWidth;break;case "bottom":b=d-a-b[2]-this.titleOption.borderWidth;break;case "center":b=Math.floor((d-a)/2);break;default:b=this.titleOption.y-0,b=isNaN(b)?0:b}return{x:e,y:b,width:t,height:a}},refresh:function(e){e&&(this.option=e,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()}},c.inherits(k,q),n("../component").define("title",k),k});u("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".split(" "),function(n){function k(a,r,d,h,b){q.call(this,a,r,d,h,b);this.dom=b.dom;var e=this;e._onmousemove=function(a){return e.__onmousemove(a)};e._onglobalout=function(a){return e.__onglobalout(a)};this.zr.on(m.EVENT.CLICK,e._onmousemove);this.zr.on(m.EVENT.MOUSEMOVE,e._onmousemove);this.zr.on(m.EVENT.GLOBALOUT,e._onglobalout);e._hide=function(a){return e.__hide(a)};e._tryShow=function(a){return e.__tryShow(a)};e._refixed=function(a){return e.__refixed(a)};e._setContent=function(a,r){return e.__setContent(a,r)};this._tDom=this._tDom||document.createElement("div");this._tDom.onselectstart=function(){return!1};this._tDom.onmouseover=function(){e._mousein=!0};this._tDom.onmouseout=function(){e._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 g({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 g({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 p({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(h)}var q=n("./base"),p=n("../util/shape/Cross"),g=n("zrender/shape/Line"),f=new (n("zrender/shape/Rectangle"))({}),c=n("../config");c.tooltip={zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",islandFormatter:"{a} \x3cbr/\x3e{b} : {c}",showDelay:0,hideDelay:200,transitionDuration:.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 l=n("../util/ecData"),m=n("zrender/config"),e=n("zrender/tool/event"),b=n("zrender/tool/area"),a=n("zrender/tool/color"),d=n("zrender/tool/util"),h=n("zrender/shape/Base");return k.prototype={type:c.COMPONENT_TYPE_TOOLTIP,_gCssText:"position:absolute;display:block;border-style:solid;white-space:nowrap;",_style:function(d){if(!d)return"";var r=[];if(d.transitionDuration){var h="left "+d.transitionDuration+"s,top "+d.transitionDuration+"s";r.push("transition:"+h);r.push("-moz-transition:"+h);r.push("-webkit-transition:"+h);r.push("-o-transition:"+h)}d.backgroundColor&&(r.push("background-Color:"+a.toHex(d.backgroundColor)),r.push("filter:alpha(opacity\x3d70)"),r.push("background-Color:"+d.backgroundColor));null!=d.borderWidth&&r.push("border-width:"+d.borderWidth+"px");null!=d.borderColor&&r.push("border-color:"+d.borderColor);null!=d.borderRadius&&(r.push("border-radius:"+d.borderRadius+"px"),r.push("-moz-border-radius:"+d.borderRadius+"px"),r.push("-webkit-border-radius:"+d.borderRadius+"px"),r.push("-o-border-radius:"+d.borderRadius+"px"));(h=d.textStyle)&&(h.color&&r.push("color:"+h.color),h.decoration&&r.push("text-decoration:"+h.decoration),h.align&&r.push("text-align:"+h.align),h.fontFamily&&r.push("font-family:"+h.fontFamily),h.fontSize&&r.push("font-size:"+h.fontSize+"px"),h.fontSize&&r.push("line-height:"+Math.round(3*h.fontSize/2)+"px"),h.fontStyle&&r.push("font-style:"+h.fontStyle),h.fontWeight&&r.push("font-weight:"+h.fontWeight));d=d.padding;return null!=d&&(d=this.reformCssArray(d),r.push("padding:"+d[0]+"px "+d[1]+"px "+d[2]+"px "+d[3]+"px")),r.join(";")+";"},__hide:function(){this._lastItemTriggerId=this._lastSeriesIndex=this._lastDataIndex=-1;this._tDom&&(this._tDom.style.display="none");var a=!1;this._axisLineShape.invisible||(this._axisLineShape.invisible=!0,this.zr.modShape(this._axisLineShape.id),a=!0);this._axisShadowShape.invisible||(this._axisShadowShape.invisible=!0,this.zr.modShape(this._axisShadowShape.id),a=!0);this._axisCrossShape.invisible||(this._axisCrossShape.invisible=!0,this.zr.modShape(this._axisCrossShape.id),a=!0);this._lastTipShape&&0this._zrWidth&&(r-=e+40);d+b>this._zrHeight&&(d-=b-20);20>d&&(d=0);this._tDom.style.cssText=this._gCssText+this._defaultCssText+(h?h:"")+"left:"+r+"px;top:"+d+"px;";(10>b||10>e)&&setTimeout(this._refixed,20);this.showing=!0},__refixed:function(){if(this._tDom){var a="",d=this._tDom.offsetHeight,h=this._tDom.offsetWidth;this._tDom.offsetLeft+h>this._zrWidth&&(a+="left:"+(this._zrWidth-h-20)+"px;");this._tDom.offsetTop+d>this._zrHeight&&(a+="top:"+(this._zrHeight-d-10)+"px;");""!==a&&(this._tDom.style.cssText+=a)}},__tryShow:function(){var a,d;if(this._curTarget){if("island"===this._curTarget._type&&this.option.tooltip.show)return void this._showItemTrigger();var h=l.get(this._curTarget,"series"),b=l.get(this._curTarget,"data");a=this.deepQuery([b,h,this.option],"tooltip.show");null!=h&&null!=b&&a?(d=this.deepQuery([b,h,this.option],"tooltip.trigger"),"axis"===d?this._showAxisTrigger(h.xAxisIndex,h.yAxisIndex,l.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 a,d,h=this.option.series,b=0,e=h.length;e>b;b++)if("axis"===this.deepQuery([h[b],this.option],"tooltip.trigger"))return a=h[b].xAxisIndex||0,d=h[b].yAxisIndex||0,this.component.xAxis.getAxis(a)&&this.component.xAxis.getAxis(a).type===c.COMPONENT_TYPE_AXIS_CATEGORY?void this._showAxisTrigger(a,d,this._getNearestDataIndex("x",this.component.xAxis.getAxis(a))):this.component.yAxis.getAxis(d)&&this.component.yAxis.getAxis(d).type===c.COMPONENT_TYPE_AXIS_CATEGORY?void this._showAxisTrigger(a,d,this._getNearestDataIndex("y",this.component.yAxis.getAxis(d))):void this._showAxisTrigger(a,d,-1);"cross"===this.option.tooltip.axisPointer.type&&this._showAxisTrigger(-1,-1,-1)},_findPolarTrigger:function(){if(!this.component.polar)return!1;var a,d=e.getX(this._event),h=e.getY(this._event),d=this.component.polar.getNearestIndex([d,h]);return d?(a=d.valueIndex,d=d.polarIndex):d=-1,-1!=d?this._showPolarTrigger(d,a):!1},_getNearestDataIndex:function(a,d){var h=-1,b=e.getX(this._event),c=e.getY(this._event);if("x"===a){for(var l,f,c=this.component.grid.getXend(),g=d.getCoordByIndex(h);c>g&&(f=g,b>=g);)l=g,g=d.getCoordByIndex(++h);return 0>=h?h=0:f-b>=b-l?--h:null==d.getNameByIndex(h)&&--h,h}for(var m,D,b=this.component.grid.getY(),g=d.getCoordByIndex(h);g>b&&(m=g,g>=c);)D=g,g=d.getCoordByIndex(++h);return 0>=h?h=0:c-m>=D-c?--h:null==d.getNameByIndex(h)&&--h,h},_showAxisTrigger:function(a,d,h){if(!this._event.connectTrigger&&this.messageCenter.dispatch(c.EVENT.TOOLTIP_IN_GRID,this._event,null,this.myChart),null==this.component.xAxis||null==this.component.yAxis||null==a||null==d)return clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),void(this._hidingTicket=setTimeout(this._hide,this._hideDelay));var b,l,f,g,m=this.option.series,w=[],D=[],v="";if("axis"===this.option.tooltip.trigger){if(!this.option.tooltip.show)return;l=this.option.tooltip.formatter;f=this.option.tooltip.position}var p,k,n=-1!=a&&this.component.xAxis.getAxis(a).type===c.COMPONENT_TYPE_AXIS_CATEGORY?"xAxis":-1!=d&&this.component.yAxis.getAxis(d).type===c.COMPONENT_TYPE_AXIS_CATEGORY?"yAxis":!1;if(n){var q="xAxis"==n?a:d;b=this.component[n].getAxis(q);a=0;for(d=m.length;d>a;a++)this._isSelected(m[a].name)&&m[a][n+"Index"]===q&&"axis"===this.deepQuery([m[a],this.option],"tooltip.trigger")&&(g=this.query(m[a],"tooltip.showContent")||g,l=this.query(m[a],"tooltip.formatter")||l,f=this.query(m[a],"tooltip.position")||f,v+=this._style(this.query(m[a],"tooltip")),null!=m[a].stack&&"xAxis"==n?(w.unshift(m[a]),D.unshift(a)):(w.push(m[a]),D.push(a)));this.messageCenter.dispatch(c.EVENT.TOOLTIP_HOVER,this._event,{seriesIndex:D,dataIndex:h},this.myChart);var A;"xAxis"==n?(p=this.subPixelOptimize(b.getCoordByIndex(h),this._axisLineWidth),k=e.getY(this._event),A=[p,this.component.grid.getY(),p,this.component.grid.getYend()]):(p=e.getX(this._event),k=this.subPixelOptimize(b.getCoordByIndex(h),this._axisLineWidth),A=[this.component.grid.getX(),k,this.component.grid.getXend(),k]);this._styleAxisPointer(w,A[0],A[1],A[2],A[3],b.getGap(),p,k)}else p=e.getX(this._event),k=e.getY(this._event),this._styleAxisPointer(m,this.component.grid.getX(),k,this.component.grid.getXend(),k,0,p,k),0<=h?this._showItemTrigger(!0):(clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),this._tDom.style.display="none");if(0a;a++)m=w[a].data[h],n=this.getDataFromOption(m,"-"),A.push({seriesIndex:D[a],seriesName:w[a].name||"",series:w[a],dataIndex:h,data:m,name:b.getNameByIndex(h),value:n,0:w[a].name||"",1:b.getNameByIndex(h),2:n,3:m});this._curTicket="axis:"+h;this._tDom.innerHTML=l.call(this.myChart,A,this._curTicket,this._setContent)}else{if("string"==typeof l)for(this._curTicket=0/0,l=l.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}"),a=0,d=w.length;d>a;a++)l=l.replace("{a"+a+"}",this._encodeHTML(w[a].name||"")),l=l.replace("{b"+a+"}",this._encodeHTML(b.getNameByIndex(h))),m=w[a].data[h],m=this.getDataFromOption(m,"-"),l=l.replace("{c"+a+"}",m instanceof Array?m:this.numAddCommas(m));else for(this._curTicket=0/0,l=this._encodeHTML(b.getNameByIndex(h)),a=0,d=w.length;d>a;a++)l+="\x3cbr/\x3e"+this._encodeHTML(w[a].name||"")+" : ",m=w[a].data[h],m=this.getDataFromOption(m,"-"),l+=m instanceof Array?m:this.numAddCommas(m);this._tDom.innerHTML=l}!1!==g&&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(f,p+10,k+10,v))}},_showPolarTrigger:function(a,d){if(null==this.component.polar||null==a||null==d||0>d)return!1;var h,b,c,l=this.option.series,f=[],m=[],g="";if("axis"===this.option.tooltip.trigger){if(!this.option.tooltip.show)return!1;h=this.option.tooltip.formatter;b=this.option.tooltip.position}for(var p=this.option.polar[a].indicator[d].text,v=0,k=l.length;k>v;v++)this._isSelected(l[v].name)&&l[v].polarIndex===a&&"axis"===this.deepQuery([l[v],this.option],"tooltip.trigger")&&(c=this.query(l[v],"tooltip.showContent")||c,h=this.query(l[v],"tooltip.formatter")||h,b=this.query(l[v],"tooltip.position")||b,g+=this._style(this.query(l[v],"tooltip")),f.push(l[v]),m.push(v));if(0v;v++)for(var l=f[v].data,A=0,H=l.length;H>A;A++)n=l[A],this._isSelected(n.name)&&(n=null!=n?n:{name:"",value:{dataIndex:"-"}},q=this.getDataFromOption(n.value[d]),B.push({seriesIndex:m[v],seriesName:f[v].name||"",series:f[v],dataIndex:d,data:n,name:n.name,indicator:p,value:q,0:f[v].name||"",1:n.name,2:q,3:p}));if(!(0>=B.length)){if(this._lastItemTriggerId=-1,this._lastDataIndex!=d||this._lastSeriesIndex!=m[0])if(this._lastDataIndex=d,this._lastSeriesIndex=m[0],"function"==typeof h)this._curTicket="axis:"+d,this._tDom.innerHTML=h.call(this.myChart,B,this._curTicket,this._setContent);else{if("string"==typeof h)for(h=h.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}").replace("{d}","{d0}"),v=0,k=B.length;k>v;v++)h=h.replace("{a"+v+"}",this._encodeHTML(B[v].seriesName)),h=h.replace("{b"+v+"}",this._encodeHTML(B[v].name)),h=h.replace("{c"+v+"}",this.numAddCommas(B[v].value)),h=h.replace("{d"+v+"}",this._encodeHTML(B[v].indicator));else for(h=this._encodeHTML(B[0].name)+"\x3cbr/\x3e"+this._encodeHTML(B[0].indicator)+" : "+this.numAddCommas(B[0].value),v=1,k=B.length;k>v;v++)h+="\x3cbr/\x3e"+this._encodeHTML(B[v].name)+"\x3cbr/\x3e",h+=this._encodeHTML(B[v].indicator)+" : "+this.numAddCommas(B[v].value);this._tDom.innerHTML=h}if(!1!==c&&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(b,e.getX(this._event),e.getY(this._event),g),!0}}},_showItemTrigger:function(a){if(this._curTarget){var h,d,b,f=l.get(this._curTarget,"series"),m=l.get(this._curTarget,"seriesIndex"),g=l.get(this._curTarget,"data"),p=l.get(this._curTarget,"dataIndex"),w=l.get(this._curTarget,"name"),D=l.get(this._curTarget,"value"),v=l.get(this._curTarget,"special"),k=l.get(this._curTarget,"special2"),n=[g,f,this.option],q="";"island"!=this._curTarget._type?(a=a?"axis":"item",this.option.tooltip.trigger===a&&(h=this.option.tooltip.formatter,d=this.option.tooltip.position),this.query(f,"tooltip.trigger")===a&&(b=this.query(f,"tooltip.showContent")||b,h=this.query(f,"tooltip.formatter")||h,d=this.query(f,"tooltip.position")||d,q+=this._style(this.query(f,"tooltip"))),b=this.query(g,"tooltip.showContent")||b,h=this.query(g,"tooltip.formatter")||h,d=this.query(g,"tooltip.position")||d,q+=this._style(this.query(g,"tooltip"))):(this._lastItemTriggerId=0/0,b=this.deepQuery(n,"tooltip.showContent"),h=this.deepQuery(n,"tooltip.islandFormatter"),d=this.deepQuery(n,"tooltip.islandPosition"));this._lastSeriesIndex=this._lastDataIndex=-1;this._lastItemTriggerId!==this._curTarget.id&&(this._lastItemTriggerId=this._curTarget.id,"function"==typeof h?(this._curTicket=(f.name||"")+":"+p,this._tDom.innerHTML=h.call(this.myChart,{seriesIndex:m,seriesName:f.name||"",series:f,dataIndex:p,data:g,name:w,value:D,percent:v,indicator:v,value2:k,indicator2:k,0:f.name||"",1:w,2:D,3:v,4:k,5:g,6:m,7:p},this._curTicket,this._setContent)):"string"==typeof h?(this._curTicket=0/0,h=h.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}"),h=h.replace("{a0}",this._encodeHTML(f.name||"")).replace("{b0}",this._encodeHTML(w)).replace("{c0}",D instanceof Array?D:this.numAddCommas(D)),h=h.replace("{d}","{d0}").replace("{d0}",v||""),h=h.replace("{e}","{e0}").replace("{e0}",l.get(this._curTarget,"special2")||""),this._tDom.innerHTML=h):(this._curTicket=0/0,this._tDom.innerHTML=f.type===c.CHART_TYPE_RADAR&&v?this._itemFormatter.radar.call(this,f,w,D,v):f.type===c.CHART_TYPE_EVENTRIVER?this._itemFormatter.eventRiver.call(this,f,w,D,g):""+(null!=f.name?this._encodeHTML(f.name)+"\x3cbr/\x3e":"")+(""===w?"":this._encodeHTML(w)+" : ")+(D instanceof Array?D:this.numAddCommas(D))));h=e.getX(this._event);m=e.getY(this._event);this.deepQuery(n,"tooltip.axisPointer.show")&&this.component.grid&&this._styleAxisPointer([f],this.component.grid.getX(),m,this.component.grid.getXend(),m,0,h,m);!1!==b&&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(d,h+20,m-20,q))}},_itemFormatter:{radar:function(a,h,d,b){a=""+this._encodeHTML(""===h?a.name||"":h);a+=""===a?"":"\x3cbr /\x3e";for(h=0;hh;h++)a+='\x3cdiv style\x3d"padding-top:5px;"\x3e',b[h].detail&&(b[h].detail.img&&(a+='\x3cimg src\x3d"'+b[h].detail.img+'" style\x3d"float:left;width:40px;height:40px;"\x3e'),a+='\x3cdiv style\x3d"margin-left:45px;"\x3e'+b[h].time+"\x3cbr/\x3e",a+='\x3ca href\x3d"'+b[h].detail.link+'" target\x3d"_blank"\x3e',a+=b[h].detail.text+"\x3c/a\x3e\x3c/div\x3e",a+="\x3c/div\x3e");return a}},_styleAxisPointer:function(a,h,d,b,e,c,l,f){if(0n;n++)m=a[n],p=(g=this.query(m,"tooltip.axisPointer.type"))||p,g&&(k[g].color=this.query(m,"tooltip.axisPointer."+g+"Style.color")||k[g].color,k[g].width=this.query(m,"tooltip.axisPointer."+g+"Style.width")||k[g].width,k[g].type=this.query(m,"tooltip.axisPointer."+g+"Style.type")||k[g].type);"line"===p?(l=k.line.width,f=h==b,this._axisLineShape.style={xStart:f?this.subPixelOptimize(h,l):h,yStart:f?d:this.subPixelOptimize(d,l),xEnd:f?this.subPixelOptimize(b,l):b,yEnd:f?e:this.subPixelOptimize(e,l),strokeColor:k.line.color,lineWidth:l,lineType:k.line.type},this._axisLineShape.invisible=!1,this.zr.modShape(this._axisLineShape.id)):"cross"===p?(h=k.cross.width,this._axisCrossShape.style={brushType:"stroke",rect:this.component.grid.getArea(),x:this.subPixelOptimize(l,h),y:this.subPixelOptimize(f,h),text:("( "+this.component.xAxis.getAxis(0).getValueFromCoord(l)+" , "+this.component.yAxis.getAxis(0).getValueFromCoord(f)+" )").replace(" , "," ").replace(" , "," "),textPosition:"specific",strokeColor:k.cross.color,lineWidth:h,lineType:k.cross.type},100Math.abs(this.component.grid.getX()-h)?(k.shadow.width/=2,h=b+=k.shadow.width/2):2>Math.abs(this.component.grid.getXend()-h)&&(k.shadow.width/=2,h=b-=k.shadow.width/2):d===e&&(2>Math.abs(this.component.grid.getY()-d)?(k.shadow.width/=2,d=e+=k.shadow.width/2):2>Math.abs(this.component.grid.getYend()-d)&&(k.shadow.width/=2,d=e-=k.shadow.width/2)),this._axisShadowShape.style={xStart:h,yStart:d,xEnd:b,yEnd:e,strokeColor:k.shadow.color,lineWidth:k.shadow.width},this._axisShadowShape.invisible=!1,this.zr.modShape(this._axisShadowShape.id));this.zr.refreshNextFrame()}},__onmousemove:function(a){if(clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),!this._mousein||!this._enterable){var h=a.target,d=e.getX(a.event),l=e.getY(a.event);if(h){this._curTarget=h;this._event=a.event;this._event.zrenderX=d;this._event.zrenderY=l;var g;if(this._needAxisTrigger&&this.component.polar&&-1!=(g=this.component.polar.isInside([d,l])))for(a=this.option.series,h=0,d=a.length;d>h;h++)if(a[h].polarIndex===g&&"axis"===this.deepQuery([a[h],this.option],"tooltip.trigger")){this._curTarget=null;break}this._showingTicket=setTimeout(this._tryShow,this._showDelay)}else this._curTarget=!1,this._event=a.event,this._event.zrenderX=d,this._event.zrenderY=l,this._needAxisTrigger&&this.component.grid&&b.isInside(f,this.component.grid.getArea(),d,l)?this._showingTicket=setTimeout(this._tryShow,this._showDelay):this._needAxisTrigger&&this.component.polar&&-1!=this.component.polar.isInside([d,l])?this._showingTicket=setTimeout(this._tryShow,this._showDelay):(!this._event.connectTrigger&&this.messageCenter.dispatch(c.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(a,h){this._tDom&&(a===this._curTicket&&(this._tDom.innerHTML=h),setTimeout(this._refixed,20))},ontooltipHover:function(a,d){if(!this._lastTipShape||this._lastTipShape&&this._lastTipShape.dataIndex!=a.dataIndex){this._lastTipShape&&0b;b++)d[b].zlevel=this.getZlevelBase(),d[b].z=this.getZBase(),d[b].style=h.prototype.getHighlightStyle(d[b].style,d[b].highlightStyle),d[b].draggable=!1,d[b].hoverable=!1,d[b].clickable=!1,d[b].ondragend=null,d[b].ondragover=null,d[b].ondrop=null,this.shapeList.push(d[b]),this.zr.addShape(d[b]);this._lastTipShape={dataIndex:a.dataIndex,tipShape:d}}},ondragend:function(){this._hide()},onlegendSelected:function(a){this._selectedMap=a.selected},_setSelectedMap:function(){this._selectedMap=this.component.legend?d.clone(this.component.legend.getSelectedMap()):{}},_isSelected:function(a){return null!=this._selectedMap[a]?this._selectedMap[a]:!0},showTip:function(a){if(a){var h,d=this.option.series;if(null!=a.seriesIndex)h=a.seriesIndex;else for(var b=a.seriesName,e=0,f=d.length;f>e;e++)if(d[e].name===b){h=e;break}d=d[h];if(null!=d){var g=this.myChart.chart[d.type],e="axis"===this.deepQuery([d,this.option],"tooltip.trigger");if(g)if(e)switch(a=a.dataIndex,g.type){case c.CHART_TYPE_LINE:case c.CHART_TYPE_BAR:case c.CHART_TYPE_K:if(null==this.component.xAxis||null==this.component.yAxis||d.data.length<=a)break;var p=d.xAxisIndex||0,w=d.yAxisIndex||0;this._event=this.component.xAxis.getAxis(p).type===c.COMPONENT_TYPE_AXIS_CATEGORY?{zrenderX:this.component.xAxis.getAxis(p).getCoordByIndex(a),zrenderY:this.component.grid.getY()+(this.component.grid.getYend()-this.component.grid.getY())/4}:{zrenderX:this.component.grid.getX()+(this.component.grid.getXend()-this.component.grid.getX())/4,zrenderY:this.component.yAxis.getAxis(w).getCoordByIndex(a)};this._showAxisTrigger(p,w,a);break;case c.CHART_TYPE_RADAR:null==this.component.polar||d.data[0].value.length<=a||(p=d.polarIndex||0,w=this.component.polar.getVector(p,a,"max"),this._event={zrenderX:w[0],zrenderY:w[1]},this._showPolarTrigger(p,a))}else{b=g.shapeList;switch(g.type){case c.CHART_TYPE_LINE:case c.CHART_TYPE_BAR:case c.CHART_TYPE_K:case c.CHART_TYPE_SCATTER:a=a.dataIndex;e=0;for(f=b.length;f>e;e++)if(null==b[e]._mark&&l.get(b[e],"seriesIndex")==h&&l.get(b[e],"dataIndex")==a){this._curTarget=b[e];p=b[e].style.x;w=g.type!=c.CHART_TYPE_K?b[e].style.y:b[e].style.y[0];break}break;case c.CHART_TYPE_RADAR:a=a.dataIndex;e=0;for(f=b.length;f>e;e++)if("polygon"===b[e].type&&l.get(b[e],"seriesIndex")==h&&l.get(b[e],"dataIndex")==a){this._curTarget=b[e];w=this.component.polar.getCenter(d.polarIndex||0);p=w[0];w=w[1];break}break;case c.CHART_TYPE_PIE:a=a.name;e=0;for(f=b.length;f>e;e++)if("sector"===b[e].type&&l.get(b[e],"seriesIndex")==h&&l.get(b[e],"name")==a){this._curTarget=b[e];h=this._curTarget.style;e=(h.startAngle+h.endAngle)/2*Math.PI/180;p=this._curTarget.style.x+Math.cos(e)*h.r/1.5;w=this._curTarget.style.y-Math.sin(e)*h.r/1.5;break}break;case c.CHART_TYPE_MAP:a=a.name;h=d.mapType;e=0;for(f=b.length;f>e;e++)if("text"===b[e].type&&b[e]._mapType===h&&b[e].style._name===a){this._curTarget=b[e];p=this._curTarget.style.x+this._curTarget.position[0];w=this._curTarget.style.y+this._curTarget.position[1];break}break;case c.CHART_TYPE_CHORD:a=a.name;e=0;for(f=b.length;f>e;e++)if("sector"===b[e].type&&l.get(b[e],"name")==a)return this._curTarget=b[e],h=this._curTarget.style,e=(h.startAngle+h.endAngle)/2*Math.PI/180,p=this._curTarget.style.x+Math.cos(e)*(h.r-2),w=this._curTarget.style.y-Math.sin(e)*(h.r-2),void this.zr.trigger(m.EVENT.MOUSEMOVE,{zrenderX:p,zrenderY:w});break;case c.CHART_TYPE_FORCE:for(a=a.name,e=0,f=b.length;f>e;e++)if("circle"===b[e].type&&l.get(b[e],"name")==a){this._curTarget=b[e];p=this._curTarget.position[0];w=this._curTarget.position[1];break}}null!=p&&null!=w&&(this._event={zrenderX:p,zrenderY:w},this.zr.addHoverShape(this._curTarget),this.zr.refreshHover(),this._showItemTrigger())}}}},hideTip:function(){this._hide()},refresh:function(a){if(this._zrHeight=this.zr.getHeight(),this._zrWidth=this.zr.getWidth(),this._lastTipShape&&0h;h++)if("axis"===this.query(a[h],"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}if(this.showing){var e=this;setTimeout(function(){e.zr.trigger(m.EVENT.MOUSEMOVE,e.zr.handler._event)},50)}},onbeforDispose:function(){this._lastTipShape&&0/g,"\x26gt;").replace(/"/g,"\x26quot;").replace(/'/g,"\x26#39;")}},d.inherits(k,q),n("../component").define("tooltip",k),k});u("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".split(" "),function(n){function k(a,d,r,b,e){if(!this.query(b,"legend.data"))return void console.error("option.legend.data has not been defined.");q.call(this,a,d,r,b,e);var c=this;c._legendSelected=function(a){c.__legendSelected(a)};this._colorIndex=0;this._colorMap={};this._selectedMap={};this._hasDataMap={};this.refresh(b)}var q=n("./base"),p=n("zrender/shape/Text"),g=n("zrender/shape/Rectangle"),f=n("zrender/shape/Sector"),c=n("../util/shape/Icon"),l=n("../util/shape/Candle"),m=n("../config");m.legend={zlevel:0,z:4,show:!0,orient:"horizontal",x:"center",y:"top",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:1,itemGap:10,itemWidth:18,itemHeight:18,textStyle:{fontSize:18,color:"#333"},selectedMode:!0};var e=n("zrender/tool/util"),b=n("zrender/tool/area");k.prototype={type:m.COMPONENT_TYPE_LEGEND,_buildShape:function(){if(this.legendOption.show){this._itemGroupLocation=this._getItemGroupLocation();this._buildBackground();this._buildItem();for(var a=0,d=this.shapeList.length;d>a;a++)this.zr.addShape(this.shapeList[a])}},_buildItem:function(){var a,d,r,y,l,f,g,m,k=this.legendOption.data,w=k.length,D=this.legendOption.textStyle,v=this.zr.getWidth(),n=this.zr.getHeight(),q=this._itemGroupLocation.x,z=this._itemGroupLocation.y,B=this.legendOption.itemWidth,A=this.legendOption.itemHeight,H=this.legendOption.itemGap;"vertical"===this.legendOption.orient&&"right"===this.legendOption.x&&(q=this._itemGroupLocation.x+this._itemGroupLocation.width-B);for(var N=0;w>N;N++)l=e.merge(k[N].textStyle||{},D),f=this.getFont(l),a=this._getName(k[N]),g=this._getFormatterName(a),""!==a?(d=k[N].icon||this._getSomethingByName(a).type,m=this.getColor(a),"horizontal"===this.legendOption.orient?200>v-q&&B+5+b.getTextWidth(g,f)+(N===w-1||""===k[N+1]?0:H)>=v-q&&(q=this._itemGroupLocation.x,z+=A+H):200>n-z&&A+(N===w-1||""===k[N+1]?0:H)>=n-z&&("right"===this.legendOption.x?q-=this._itemGroupLocation.maxWidth+H:q+=this._itemGroupLocation.maxWidth+H,z=this._itemGroupLocation.y),r=this._getItemShapeByType(q,z,B,A,this._selectedMap[a]&&this._hasDataMap[a]?m:"#ccc",d,m),r._name=a,r=new c(r),y={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:q+B+5,y:z+A/2,color:this._selectedMap[a]?"auto"===l.color?m:l.color:"#ccc",text:g,textFont:f,textBaseline:"middle"},highlightStyle:{color:m,brushType:"fill"},hoverable:!!this.legendOption.selectedMode,clickable:!!this.legendOption.selectedMode},"vertical"===this.legendOption.orient&&"right"===this.legendOption.x&&(y.style.x-=B+10,y.style.textAlign="right"),y._name=a,y=new p(y),this.legendOption.selectedMode&&(r.onclick=y.onclick=this._legendSelected,r.onmouseover=y.onmouseover=this._dispatchHoverLink,r.hoverConnect=y.id,y.hoverConnect=r.id),this.shapeList.push(r),this.shapeList.push(y),"horizontal"===this.legendOption.orient?q+=B+5+b.getTextWidth(g,f)+H:z+=A+H):"horizontal"===this.legendOption.orient?(q=this._itemGroupLocation.x,z+=A+H):("right"===this.legendOption.x?q-=this._itemGroupLocation.maxWidth+H:q+=this._itemGroupLocation.maxWidth+H,z=this._itemGroupLocation.y);"horizontal"===this.legendOption.orient&&"center"===this.legendOption.x&&z!=this._itemGroupLocation.y&&this._mLineOptimize()},_getName:function(a){return"undefined"!=typeof a.name?a.name:a},_getFormatterName:function(a){var d=this.legendOption.formatter;return"function"==typeof d?d.call(this.myChart,a):"string"==typeof d?d.replace("{name}",a):a},_getFormatterNameFromData:function(a){a=this._getName(a);return this._getFormatterName(a)},_mLineOptimize:function(){for(var a=[],d=this._itemGroupLocation.x,r=2,e=this.shapeList.length;e>r;r++)this.shapeList[r].style.x===d?a.push((this._itemGroupLocation.width-(this.shapeList[r-1].style.x+b.getTextWidth(this.shapeList[r-1].style.text,this.shapeList[r-1].style.textFont)-d))/2):r===e-1&&a.push((this._itemGroupLocation.width-(this.shapeList[r].style.x+b.getTextWidth(this.shapeList[r].style.text,this.shapeList[r].style.textFont)-d))/2);for(var c=-1,r=1,e=this.shapeList.length;e>r;r++)this.shapeList[r].style.x===d&&c++,0!==a[c]&&(this.shapeList[r].style.x+=a[c])},_buildBackground:function(){var a=this.reformCssArray(this.legendOption.padding);this.shapeList.push(new g({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._itemGroupLocation.x-a[3],y:this._itemGroupLocation.y-a[0],width:this._itemGroupLocation.width+a[3]+a[1],height:this._itemGroupLocation.height+a[0]+a[2],brushType:0===this.legendOption.borderWidth?"fill":"both",color:this.legendOption.backgroundColor,strokeColor:this.legendOption.borderColor,lineWidth:this.legendOption.borderWidth}}))},_getItemGroupLocation:function(){var a=this.legendOption.data,d=a.length,r=this.legendOption.itemGap,c=this.legendOption.itemWidth+5,l=this.legendOption.itemHeight,f=this.legendOption.textStyle,g=this.getFont(f),m=0,p=0,w=this.reformCssArray(this.legendOption.padding),k=this.zr.getWidth()-w[1]-w[3],v=this.zr.getHeight()-w[0]-w[2],n=0,q=0;if("horizontal"===this.legendOption.orient)for(var p=l,z=0;d>z;z++)""!==this._getName(a[z])?(v=b.getTextWidth(this._getFormatterNameFromData(a[z]),a[z].textStyle?this.getFont(e.merge(a[z].textStyle||{},f)):g),n+c+v+r>k?(n-=r,m=Math.max(m,n),p+=l+r,n=0):(n+=c+v+r,m=Math.max(m,n-r))):(n-=r,m=Math.max(m,n),p+=l+r,n=0);else{for(z=0;d>z;z++)q=Math.max(q,b.getTextWidth(this._getFormatterNameFromData(a[z]),a[z].textStyle?this.getFont(e.merge(a[z].textStyle||{},f)):g));m=q+=c;for(z=0;d>z;z++)""!==this._getName(a[z])?n+l+r>v?(m+=q+r,n-=r,p=Math.max(p,n),n=0):(n+=l+r,p=Math.max(p,n-r)):(m+=q+r,n-=r,p=Math.max(p,n),n=0)}k=this.zr.getWidth();v=this.zr.getHeight();switch(this.legendOption.x){case "center":a=Math.floor((k-m)/2);break;case "left":a=w[3]+this.legendOption.borderWidth;break;case "right":a=k-m-w[1]-w[3]-2*this.legendOption.borderWidth;break;default:a=this.parsePercent(this.legendOption.x,k)}switch(this.legendOption.y){case "top":w=w[0]+this.legendOption.borderWidth;break;case "bottom":w=v-p-w[0]-w[2]-2*this.legendOption.borderWidth;break;case "center":w=Math.floor((v-p)/2);break;default:w=this.parsePercent(this.legendOption.y,v)}return{x:a,y:w,width:m,height:p,maxWidth:q}},_getSomethingByName:function(a){for(var d,r=this.option.series,b=0,e=r.length;e>b;b++){if(r[b].name===a)return{type:r[b].type,series:r[b],seriesIndex:b,data:null,dataIndex:-1};if(r[b].type===m.CHART_TYPE_PIE||r[b].type===m.CHART_TYPE_RADAR||r[b].type===m.CHART_TYPE_CHORD||r[b].type===m.CHART_TYPE_FORCE||r[b].type===m.CHART_TYPE_FUNNEL){d=r[b].categories||r[b].data||r[b].nodes;for(var c=0,l=d.length;l>c;c++)if(d[c].name===a)return{type:r[b].type,series:r[b],seriesIndex:b,data:d[c],dataIndex:c}}}return{type:"bar",series:null,seriesIndex:-1,data:null,dataIndex:-1}},_getItemShapeByType:function(a,d,b,e,c,l,f){var g;f="#ccc"===c?f:c;a={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{iconType:"legendicon"+l,x:a,y:d,width:b,height:e,color:c,strokeColor:c,lineWidth:2},highlightStyle:{color:f,strokeColor:f,lineWidth:1},hoverable:this.legendOption.selectedMode,clickable:this.legendOption.selectedMode};l.match("image")&&(g=l.replace(/^image:\/\//,""),l="image");switch(l){case "line":a.style.brushType="stroke";a.highlightStyle.lineWidth=3;break;case "radar":case "scatter":a.highlightStyle.lineWidth=3;break;case "k":a.style.brushType="both";a.highlightStyle.lineWidth=3;a.highlightStyle.color=a.style.color=this.deepQuery([this.ecTheme,m],"k.itemStyle.normal.color")||"#fff";a.style.strokeColor="#ccc"!=c?this.deepQuery([this.ecTheme,m],"k.itemStyle.normal.lineStyle.color")||"#ff3200":c;break;case "image":a.style.iconType="image",a.style.image=g,"#ccc"===c&&(a.style.opacity=.5)}return a},__legendSelected:function(a){var d=a.target._name;if("single"===this.legendOption.selectedMode)for(var b in this._selectedMap)this._selectedMap[b]=!1;this._selectedMap[d]=!this._selectedMap[d];this.messageCenter.dispatch(m.EVENT.LEGEND_SELECTED,a.event,{selected:this._selectedMap,target:d},this.myChart)},refresh:function(a){if(a){this.option=a||this.option;this.option.legend=this.reformOption(this.option.legend);this.legendOption=this.option.legend;var d,b,e,c;a=this.legendOption.data||[];if(this.legendOption.selected)for(d in this.legendOption.selected)this._selectedMap[d]="undefined"!=typeof this._selectedMap[d]?this._selectedMap[d]:this.legendOption.selected[d];for(var l=0,f=a.length;f>l;l++)d=this._getName(a[l]),""!==d&&(b=this._getSomethingByName(d),b.series?(this._hasDataMap[d]=!0,c=!b.data||b.type!==m.CHART_TYPE_PIE&&b.type!==m.CHART_TYPE_FORCE&&b.type!==m.CHART_TYPE_FUNNEL?[b.series]:[b.data,b.series],e=this.getItemStyleColor(this.deepQuery(c,"itemStyle.normal.color"),b.seriesIndex,b.dataIndex,b.data),e&&b.type!=m.CHART_TYPE_K&&this.setColor(d,e),this._selectedMap[d]=null!=this._selectedMap[d]?this._selectedMap[d]:!0):this._hasDataMap[d]=!1)}this.clear();this._buildShape()},getRelatedAmount:function(a){for(var d,b=0,e=this.option.series,c=0,l=e.length;l>c;c++)if(e[c].name===a&&b++,e[c].type===m.CHART_TYPE_PIE||e[c].type===m.CHART_TYPE_RADAR||e[c].type===m.CHART_TYPE_CHORD||e[c].type===m.CHART_TYPE_FORCE||e[c].type===m.CHART_TYPE_FUNNEL){d=e[c].type!=m.CHART_TYPE_FORCE?e[c].data:e[c].categories;for(var f=0,g=d.length;g>f;f++)d[f].name===a&&"-"!=d[f].value&&b++}return b},setColor:function(a,d){this._colorMap[a]=d},getColor:function(a){return this._colorMap[a]||(this._colorMap[a]=this.zr.getColor(this._colorIndex++)),this._colorMap[a]},hasColor:function(a){return this._colorMap[a]?this._colorMap[a]:!1},add:function(a,d){for(var b=this.legendOption.data,e=0,c=b.length;c>e;e++)if(this._getName(b[e])===a)return;this.legendOption.data.push(a);this.setColor(a,d);this._selectedMap[a]=!0;this._hasDataMap[a]=!0},del:function(a){for(var d=this.legendOption.data,b=0,e=d.length;e>b;b++)if(this._getName(d[b])===a)return this.legendOption.data.splice(b,1)},getItemShape:function(a){if(null!=a)for(var d,b=0,e=this.shapeList.length;e>b;b++)if(d=this.shapeList[b],d._name===a&&"text"!=d.type)return d},setItemShape:function(a,d){for(var b,e=0,c=this.shapeList.length;c>e;e++)b=this.shapeList[e],b._name===a&&"text"!=b.type&&(this._selectedMap[a]||(d.style.color="#ccc",d.style.strokeColor="#ccc"),this.zr.modShape(b.id,d))},isSelected:function(a){return"undefined"!=typeof this._selectedMap[a]?this._selectedMap[a]:!0},getSelectedMap:function(){return this._selectedMap},setSelected:function(a,d){if("single"===this.legendOption.selectedMode)for(var b in this._selectedMap)this._selectedMap[b]=!1;this._selectedMap[a]=d;this.messageCenter.dispatch(m.EVENT.LEGEND_SELECTED,null,{selected:this._selectedMap,target:a},this.myChart)},onlegendSelected:function(a,d){var b=a.selected,e;for(e in b)this._selectedMap[e]!=b[e]&&(d.needRefresh=!0),this._selectedMap[e]=b[e]}};var a={line:function(a,d){var b=d.height/2;a.moveTo(d.x,d.y+b);a.lineTo(d.x+d.width,d.y+b)},pie:function(a,d){var b=d.height;f.prototype.buildPath(a,{x:d.x+d.width,y:d.y+b,r:b,r0:6,startAngle:90,endAngle:180})},eventRiver:function(a,d){var b=d.x,e=d.y,c=d.width,l=d.height;a.moveTo(b,e+l);a.bezierCurveTo(b+c,e+l,b,e+4,b+c,e+4);a.lineTo(b+c,e);a.bezierCurveTo(b,e,b+c,e+l-4,b,e+l-4);a.lineTo(b,e+l)},k:function(a,d){var b=d.y,e=d.width,c=d.height;l.prototype.buildPath(a,{x:d.x+e/2,y:[b+1,b+1,b+c-6,b+c],width:e-6})},bar:function(a,d){var b=d.x,e=d.y+1,c=d.width,l=d.height-2;a.moveTo(b+3,e);a.lineTo(b+c-3,e);a.quadraticCurveTo(b+c,e,b+c,e+3);a.lineTo(b+c,e+l-3);a.quadraticCurveTo(b+c,e+l,b+c-3,e+l);a.lineTo(b+3,e+l);a.quadraticCurveTo(b,e+l,b,e+l-3);a.lineTo(b,e+3);a.quadraticCurveTo(b,e,b+3,e)},force:function(a,d){c.prototype.iconLibrary.circle(a,d)},radar:function(a,d){var b=d.x+d.width/2,e=d.y+d.height/2,c=d.height/2,l=2*Math.PI/6,f=-Math.PI/2,g=b+c*Math.cos(f),m=e+c*Math.sin(f);a.moveTo(g,m);for(var f=f+l,w=0;5>w;w++)a.lineTo(b+c*Math.cos(f),e+c*Math.sin(f)),f+=l;a.lineTo(g,m)}};a.chord=a.pie;a.map=a.bar;for(var d in a)c.prototype.iconLibrary["legendicon"+d]=a[d];return e.inherits(k,q),n("../component").define("legend",k),k});u("echarts/util/ecData",[],function(){return{pack:function(n,k,q,p,g,f,c,l){var m;return"undefined"!=typeof p&&(m=null==p.value?p:p.value),n._echartsData={_series:k,_seriesIndex:q,_data:p,_dataIndex:g,_name:f,_value:m,_special:c,_special2:l},n._echartsData},set:function(n,k,q){switch(n._echartsData=n._echartsData||{},k){case "series":case "seriesIndex":case "data":case "dataIndex":case "name":case "value":case "special":case "special2":n._echartsData["_"+k]=q}},get:function(n,k){var q=n._echartsData;if(!k)return q;switch(k){case "series":case "seriesIndex":case "data":case "dataIndex":case "name":case "value":case "special":case "special2":return q&&q["_"+k]}return null},clone:function(n,k){k._echartsData={_series:n._echartsData._series,_seriesIndex:n._echartsData._seriesIndex,_data:n._echartsData._data,_dataIndex:n._echartsData._dataIndex,_name:n._echartsData._name,_value:n._echartsData._value,_special:n._echartsData._special,_special2:n._echartsData._special2}}}});u("echarts/chart",[],function(){var n={},k={};return n.define=function(q,p){return k[q]=p,n},n.get=function(n){return k[n]},n});u("zrender/tool/color",["require","../tool/util"],function(n){function k(a){if(a instanceof Array||-1!=a.indexOf("rgb")||-1!=a.indexOf("hs"))return a;if(!L[a]){var d=y.getPixelContext();d.fillStyle=a;d.rect(0,0,10,10);d.fill();d=d.getImageData(5,5,1,1).data;L[a]=p([d[0],d[1],d[2],d[3]],"rgba")}return L[a]}function q(a,h,r){a=f(a);h=f(h);a=b(a);h=b(h);var e=[],t=(h[0]-a[0])/r,c=(h[1]-a[1])/r,l=(h[2]-a[2])/r,y=(h[3]-a[3])/r,g=0,m=a[0],x=a[1],J=a[2];for(a=a[3];r>g;g++)e[g]=p([d(Math.floor(m),[0,255]),d(Math.floor(x),[0,255]),d(Math.floor(J),[0,255]),a.toFixed(4)-0],"rgba"),m+=t,x+=c,J+=l,a+=y;return m=h[0],x=h[1],J=h[2],a=h[3],e[g]=p([m,x,J,a],"rgba"),e}function p(h,b){if(b=b||"rgb",h&&(3===h.length||4===h.length)){if(h=a(h,function(a){return 1g?g*(1+l):g+l-l*g,g=2*g-f,r=255*t(g,f,c+1/3),l=255*t(g,f,c),c=255*t(g,f,c-1/3)),r=[r,l,c]);if(-1J&&(J+=1),1l?y/(f+g):y/(2-f-g),m=((f-J)/6+y/2)/y,x=((f-c)/6+y/2)/y,y=((f-r)/6+y/2)/y,J===f?F=y-x:c===f?F=1/3+m-y:r===f&&(F=2/3+x-m),0>F&&(F+=1),1b;b++)a[b]=d(a[b]);return a}function d(a,d){return a<=d[0]?a=d[0]:a>=d[1]&&(a=d[1]),a}function h(a){return a instanceof Array||"string"==typeof a}function t(a,d,h){return 0>h&&(h+=1),16*h?a+6*(d-a)*h:1>2*h?d:2>3*h?a+(d-a)*(2/3-h)*6:a}var r,y=n("../tool/util"),x=["#ff9277"," #dddd00"," #ffc877"," #bbe3ff"," #d5ffbb"],J=x,F="rgba(255,255,0,0.5)",E=/^\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,L={};return{customPalette:function(a){x=a},resetPalette:function(){x=J},getColor:function(a,d){return a|=0,d=d||x,d[a%d.length]},getNameColor:k,getHighlightColor:function(){return F},customHighlight:function(a){F=a},resetHighlight:function(){},getRadialGradient:function(a,d,h,b,e,t,c){r=r||y.getContext();a=r.createRadialGradient(a,d,h,b,e,t);d=0;for(h=c.length;h>d;d++)a.addColorStop(c[d][0],c[d][1]);return a.__nonRecursion=!0,a},getLinearGradient:function(a,d,h,b,e){r=r||y.getContext();a=r.createLinearGradient(a,d,h,b);d=0;for(h=e.length;h>d;d++)a.addColorStop(e[d][0],e[d][1]);return a.__nonRecursion=!0,a},getGradientColors:function(a,d){var h=[],b=a.length;if(void 0===d&&(d=20),1===b)h=q(a[0],a[0],d);else if(1r;r++){var e=q(a[r],a[r+1],d);b-1>r&&e.pop();h=h.concat(e)}return h},getStepColors:q,reverse:function(d){if(!h(d))return d;d=b(f(d));return d=a(d,function(a){return 255-a}),p(d,"rgb")},mix:function(a,r,e){if(!h(a)||!h(r))return a;"undefined"==typeof e&&(e=.5);e=1-d(e,[0,1]);var t=2*e-1;a=b(f(a));r=b(f(r));for(var c=a[3]-r[3],c=((-1===t*c?t:(t+c)/(1+t*c))+1)/2,l=1-c,t=[],y=0;3>y;y++)t[y]=a[y]*c+r[y]*l;e=a[3]*e+r[3]*(1-e);return e=Math.max(0,Math.min(1,e)),1===a[3]&&1===r[3]?p(t,"rgb"):(t[3]=e,p(t,"rgba"))},lift:function(a,d){if(!h(a))return a;var r=0t;t++)e[t]=1===r?e[t]*(1-d)|0:(255-e[t])*d+e[t]|0;return"rgb("+e.join(",")+")"},trim:m,random:function(){return"#"+(Math.random().toString(16)+"0000").slice(2,8)},toRGB:c,toRGBA:f,toHex:l,toHSL:function(a){return g(a,"hsl")},toHSLA:function(a){return g(a,"hsla")},toHSB:function(a){return g(a,"hsb")},toHSBA:function(a){return g(a,"hsba")},toHSV:function(a){return g(a,"hsv")},toHSVA:function(a){return g(a,"hsva")},toName:function(a){for(var d in L)if(l(L[d])===l(a))return d;return null},toColor:p,toArray:function(a){a=m(a);0>a.indexOf("rgba")&&(a=f(a));var d=[],h=0;return a.replace(/[\d.]+/g,function(a){a=3>h?0|a:+a;d[h++]=a}),d},alpha:function(a,r){if(!h(a))return a;null===r&&(r=1);var e=b(f(a));return e[3]=d(Number(r).toFixed(4),[0,1]),p(e,"rgba")},getData:b}});u("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".split(" "),function(n){function k(b,a,d,h,e){q.call(this,b,a,d,h,e);var r=this;if(r._onclick=function(a){return r.__onclick(a)},r._ondrift=function(a,d){return r.__ondrift(this,a,d)},r._ondragend=function(){return r.__ondragend()},r._setCurrentOption=function(){var a=r.timelineOption;r.currentIndex%=a.data.length;r.myChart.setOption(r.options[r.currentIndex]||{},a.notMerge);r.messageCenter.dispatch(c.EVENT.TIMELINE_CHANGED,null,{currentIndex:r.currentIndex,data:null!=a.data[r.currentIndex].name?a.data[r.currentIndex].name:a.data[r.currentIndex]},r.myChart)},r._onFrame=function(){r._setCurrentOption();r._syncHandleShape();r.timelineOption.autoPlay&&(r.playTicket=setTimeout(function(){return r.currentIndex+=1,!r.timelineOption.loop&&r.currentIndex>=r.timelineOption.data.length?(r.currentIndex=r.timelineOption.data.length-1,void r.stop()):void r._onFrame()},r.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]=l.merge(this.options[this.currentIndex],this.options[0])),this.timelineOption.show&&(this._buildShape(),this._syncHandleShape()),this._setCurrentOption(),this.timelineOption.autoPlay)r=this,this.playTicket=setTimeout(function(){r.play()},null!=this.ecTheme.animationDuration?this.ecTheme.animationDuration:c.animationDuration)}var q=n("./base"),p=n("zrender/shape/Rectangle"),g=n("../util/shape/Icon"),f=n("../util/shape/Chain"),c=n("../config");c.timeline={zlevel:0,z:4,show:!0,type:"time",notMerge:!1,realtime:!1,x:1,x2:2,y2:0,height:50,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:1,controlPosition:"left",autoPlay:!1,loop:!0,playInterval:2E3,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:!0,textStyle:{color:"auto"}}},controlStyle:{itemSize:22,itemGap:8,normal:{color:"#333"},emphasis:{color:"#1e90ff"}},symbol:"emptyDiamond",symbolSize:4,currentIndex:0};var l=n("zrender/tool/util"),m=n("zrender/tool/area"),e=n("zrender/tool/event");return k.prototype={type:c.COMPONENT_TYPE_TIMELINE,_buildShape:function(){if(this._location=this._getLocation(),this._buildBackground(),this._buildControl(),this._chainPoint=this._getChainPoint(),this.timelineOption.label.show)for(var b=this._getInterval(),a=0,d=this._chainPoint.length;d>a;a+=b)this._chainPoint[a].showLabel=!0;this._buildChain();this._buildHandle();a=0;for(b=this.shapeList.length;b>a;a++)this.zr.addShape(this.shapeList[a])},_getLocation:function(){var b,a=this.timelineOption,d=this.reformCssArray(this.timelineOption.padding),h=this.zr.getWidth(),e=this.parsePercent(a.x,h),r=this.parsePercent(a.x2,h);null==a.width?(b=h-e-r,r=h-r):(b=this.parsePercent(a.width,h),r=e+b);var c,l,h=this.zr.getHeight(),f=this.parsePercent(a.height,h);return null!=a.y?(c=this.parsePercent(a.y,h),l=c+f):(l=h-this.parsePercent(a.y2,h),c=l-f),{x:e+d[3],y:c+d[0],x2:r-d[1],y2:l-d[2],width:b-d[1]-d[3],height:f-d[0]-d[2]}},_getReformedLabel:function(b){var a=this.timelineOption,d=null!=a.data[b].name?a.data[b].name:a.data[b];b=a.data[b].formatter||a.label.formatter;return b&&("function"==typeof b?d=b.call(this.myChart,d):"string"==typeof b&&(d=b.replace("{value}",d))),d},_getInterval:function(){var b=this._chainPoint,a=this.timelineOption,d=a.label.interval;if("auto"===d){var h=a.label.textStyle.fontSize,e=a.data,r=a.data.length;if(3d;){d++;for(var f=!0,g=d;r>g;g+=d){if(c=b[g].x-b[g-d].x,0!==a.label.rotate)l=h;else if(e[g].textStyle)l=m.getTextWidth(b[g].name,b[g].textFont);else{l=b[g].name+"";var E=(l.match(/\w/g)||"").length;l=E*h*2/3+(l.length-E)*h}if(l>c){f=!1;break}}}else d=1}else d=d-0+1;return d},_getChainPoint:function(){function b(a){return null!=g[a].name?g[a].name:g[a]+""}var a,d=this.timelineOption,h=d.symbol.toLowerCase(),e=d.symbolSize,r=d.label.rotate,c=d.label.textStyle,f=this.getFont(c),g=d.data,m=this._location.x,E=this._location.y+this._location.height/4*3;a=this._location.x2-this._location.x;var p=g.length,w=[];if(1k?5:k,a-=2*k,"number"===d.type)for(d=0;p>d;d++)w.push(m+k+a/(p-1)*d);else{w[0]=new Date(b(0).replace(/-/g,"/"));w[p-1]=new Date(b(p-1).replace(/-/g,"/"))-w[0];for(d=1;p>d;d++)w[d]=m+k+a*(new Date(b(d).replace(/-/g,"/"))-w[0])/w[p-1];w[0]=m+k}}else w.push(m+a/2);for(var n,q,C,z,B=[],d=0;p>d;d++)m=w[d],k=g[d].symbol&&g[d].symbol.toLowerCase()||h,k.match("empty")?(k=k.replace("empty",""),q=!0):q=!1,k.match("star")&&(n=k.replace("star","")-0||5,k="star"),a=g[d].textStyle?l.merge(g[d].textStyle||{},c):c,C=a.align||"center",r?(C=0a?5:a;this._handleShape={zlevel:this.getZlevelBase(),z:this.getZBase()+1,hoverable:!1,draggable:!0,style:{iconType:"diamond",n:b.n,x:b.x-a,y:this._location.y+this._location.height/4-a,width:2*a,height:2*a,brushType:"both",textPosition:"specific",textX:b.x,textY:this._location.y-this._location.height/4,textAlign:"center",textBaseline:"middle"},highlightStyle:{},ondrift:this._ondrift,ondragend:this._ondragend};this._handleShape=new g(this._handleShape);this.shapeList.push(this._handleShape)},_syncHandleShape:function(){if(this.timelineOption.show){var b=this.timelineOption,a=b.checkpointStyle,d=this._chainPoint[this.currentIndex];this._handleShape.style.text=a.label.show?d.name:"";this._handleShape.style.textFont=d.textFont;this._handleShape.style.n=d.n;"auto"===a.symbol?this._handleShape.style.iconType="none"!=d.symbol?d.symbol:"diamond":(this._handleShape.style.iconType=a.symbol,a.symbol.match("star")&&(this._handleShape.style.n=a.symbol.replace("star","")-0||5,this._handleShape.style.iconType="star"));var h;"auto"===a.symbolSize?(h=d.symbolSize+2,h=5>h?5:h):h=a.symbolSize-0;this._handleShape.style.color="auto"===a.color?d.color?d.color:b.controlStyle.emphasis.color:a.color;this._handleShape.style.textColor="auto"===a.label.textStyle.color?this._handleShape.style.color:a.label.textStyle.color;this._handleShape.highlightStyle.strokeColor=this._handleShape.style.strokeColor="auto"===a.borderColor?d.borderColor?d.borderColor:"#fff":a.borderColor;this._handleShape.style.lineWidth="auto"===a.borderWidth?d.borderWidth?d.borderWidth:0:a.borderWidth-0;this._handleShape.highlightStyle.lineWidth=this._handleShape.style.lineWidth+1;this.zr.animate(this._handleShape.id,"style").when(500,{x:d.x-h,textX:d.x,y:this._location.y+this._location.height/4-h,width:2*h,height:2*h}).start("ExponentialOut")}},_findChainIndex:function(b){var a=this._chainPoint,d=a.length;if(b<=a[0].x)return 0;if(b>=a[d-1].x)return d-1;for(var h=0;d-1>h;h++)if(b>=a[h].x&&b<=a[h+1].x)return Math.abs(b-a[h].x)=h[e-1].x-h[e-1].symbolSize?(b.style.x=h[e-1].x-h[e-1].symbolSize,d=e-1):(b.style.x+=a,d=this._findChainIndex(b.style.x));h=h[d];e=h.symbolSize+2;if(b.style.iconType=h.symbol,b.style.n=h.n,b.style.textX=b.style.x+e/2,b.style.y=this._location.y+this._location.height/4-e,b.style.width=2*e,b.style.height=2*e,b.style.text=h.name,d===this.currentIndex)return!0;if(this.currentIndex=d,this.timelineOption.realtime){clearTimeout(this.playTicket);var r=this;this.playTicket=setTimeout(function(){r._setCurrentOption()},200)}return!0},__ondragend:function(){this.isDragend=!0},ondragend:function(b,a){this.isDragend&&b.target&&(!this.timelineOption.realtime&&this._setCurrentOption(),a.dragOut=!0,a.dragIn=!0,a.needRefresh=!1,this.isDragend=!1,this._syncHandleShape())},last:function(){return this.timelineOption.autoPlay&&this.stop(),--this.currentIndex,0>this.currentIndex&&(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(b,a){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!=a?a:!0,this.timelineOption.autoPlay||clearTimeout(this.playTicket),this.currentIndex=null!=b?b: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(b){this.timelineOption=this.reformOption(l.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.timelineOption.show&&b&&(this.clear(),this._buildShape(),this._syncHandleShape())},onbeforDispose:function(){clearTimeout(this.playTicket)}},g.prototype.iconLibrary.timelineControl=function(b,a){var d=a.x+2,h=a.y+2+2,e=a.width-2,r=a.height-2,c=a.symbol;if("last"===c)b.moveTo(d+e-2,h+r/3),b.lineTo(d+e-2,h),b.lineTo(d+2,h+r/2),b.lineTo(d+e-2,h+r),b.lineTo(d+e-2,h+r/3*2),b.moveTo(d,h),b.lineTo(d,h);else if("next"===c)b.moveTo(d+2,h+r/3),b.lineTo(d+2,h),b.lineTo(d+e-2,h+r/2),b.lineTo(d+2,h+r),b.lineTo(d+2,h+r/3*2),b.moveTo(d,h),b.lineTo(d,h);else if("play"===c)"stop"===a.status?(b.moveTo(d+2,h),b.lineTo(d+e-2,h+r/2),b.lineTo(d+2,h+r),b.lineTo(d+2,h)):(c="both"===a.brushType?2:3,b.rect(d+2,h,c,r),b.rect(d+e-c-2,h,c,r));else if(c.match("image")){var l;l=c.replace(/^image:\/\//,"");c=g.prototype.iconLibrary.image;c(b,{x:d,y:h,width:e,height:r,image:l})}},l.inherits(k,q),n("../component").define("timeline",k),k});u("zrender/shape/Image",["require","./Base","../tool/util"],function(n){var k=n("./Base"),q=function(p){k.call(this,p)};return q.prototype={type:"image",brush:function(p,g,f){var c=this.style||{};g&&(c=this.getHighlightStyle(c,this.highlightStyle||{}));var l=c.image,m=this;if(this._imageCache||(this._imageCache={}),"string"==typeof l)g=l,this._imageCache[g]?l=this._imageCache[g]:(l=new Image,l.onload=function(){l.onload=null;m.modSelf();f()},l.src=g,this._imageCache[g]=l);if(l){if("IMG"==l.nodeName.toUpperCase())if(window.ActiveXObject){if("complete"!=l.readyState)return}else if(!l.complete)return;g=c.width||l.width;var e=c.height||l.height,b=c.x,a=c.y;if(l.width&&l.height){if(p.save(),this.doClip(p),this.setContext(p,c),this.setTransform(p),c.sWidth&&c.sHeight){var d=c.sx||0,h=c.sy||0;p.drawImage(l,d,h,c.sWidth,c.sHeight,b,a,g,e)}else c.sx&&c.sy?(d=c.sx,h=c.sy,p.drawImage(l,d,h,g-d,e-h,b,a,g,e)):p.drawImage(l,b,a,g,e);c.width||(c.width=g);c.height||(c.height=e);this.style.width||(this.style.width=g);this.style.height||(this.style.height=e);this.drawText(p,c,this.style);p.restore()}}},getRect:function(p){return{x:p.x,y:p.y,width:p.width,height:p.height}},clearCache:function(){this._imageCache={}}},n("../tool/util").inherits(q,k),q});u("zrender/loadingEffect/Bubble",["require","./Base","../tool/util","../tool/color","../shape/Circle"],function(n){function k(c){q.call(this,c)}var q=n("./Base"),p=n("../tool/util"),g=n("../tool/color"),f=n("../shape/Circle");return p.inherits(k,q),k.prototype._start=function(c,l){for(var m=p.merge(this.options,{textStyle:{color:"#888"},backgroundColor:"rgba(250, 250, 250, 0.8)",effect:{n:50,lineWidth:2,brushType:"stroke",color:"random",timeInterval:100}}),e=this.createTextShape(m.textStyle),b=this.createBackgroundShape(m.backgroundColor),m=m.effect,a=m.n,d=m.brushType,h=m.lineWidth,t=[],r=this.canvasWidth,y=this.canvasHeight,x=0;a>x;x++){var J="random"==m.color?g.alpha(g.random(),.3):m.color;t[x]=new f({highlightStyle:{x:Math.ceil(Math.random()*r),y:Math.ceil(Math.random()*y),r:Math.ceil(40*Math.random()),brushType:d,color:J,strokeColor:J,lineWidth:h},animationY:Math.ceil(20*Math.random())})}return setInterval(function(){c(b);for(var d=0;a>d;d++){var h=t[d].highlightStyle;0>=h.y-t[d].animationY+h.r&&(t[d].highlightStyle.y=y+h.r,t[d].highlightStyle.x=Math.ceil(Math.random()*r));t[d].highlightStyle.y-=t[d].animationY;c(t[d])}c(e);l()},m.timeInterval)},k});u("zrender/loadingEffect/Spin","require ./Base ../tool/util ../tool/color ../tool/area ../shape/Sector".split(" "),function(n){function k(c){q.call(this,c)}var q=n("./Base"),p=n("../tool/util"),g=n("../tool/color"),f=n("../tool/area"),c=n("../shape/Sector");return p.inherits(k,q),k.prototype._start=function(l,m){var e=p.merge(this.options,{textStyle:{color:"#fff",textAlign:"start"},backgroundColor:"rgba(0, 0, 0, 0.8)"}),b=this.createTextShape(e.textStyle),a=f.getTextWidth(b.highlightStyle.text,b.highlightStyle.textFont),d=f.getTextHeight(b.highlightStyle.text,b.highlightStyle.textFont),h=p.merge(this.options.effect||{},{r0:9,r:15,n:18,color:"#fff",timeInterval:100}),a=this.getLocation(this.options.textStyle,a+10+2*h.r,Math.max(2*h.r,d));h.x=a.x+h.r;h.y=b.highlightStyle.y=a.y+a.height/2;b.highlightStyle.x=h.x+h.r+10;for(var t=this.createBackgroundShape(e.backgroundColor),r=h.n,e=h.x,a=h.y,d=h.r0,y=h.r,x=h.color,J=[],F=Math.round(180/r),E=0;r>E;E++)J[E]=new c({highlightStyle:{x:e,y:a,r0:d,r:y,startAngle:F*E*2,endAngle:F*E*2+F,color:g.alpha(x,(E+1)/r),brushType:"fill"}});var k=[0,e,a];return setInterval(function(){l(t);k[0]-=.3;for(var a=0;r>a;a++)J[a].rotation=k,l(J[a]);l(b);m()},h.timeInterval)},k});u("echarts/theme/macarons",[],function(){return{color:"#2ec7c9 #b6a2de #5ab1ef #ffb980 #d87a80 #8d98b3 #e5cf0d #97b552 #95706d #dc69aa #07a2a4 #9a7fd1 #588dd5 #f5994e #c05050 #59678c #c9ab00 #7eb00a #6f5553 #c14089".split(" "),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:[[.2,"#2ec7c9"],[.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"}}});u("echarts/theme/infographic",[],function(){return{color:"#C1232B #B5C334 #FCCE10 #E87C25 #27727B #FE8463 #9BCA63 #FAD860 #F3A43B #60C0DD #D7504B #C6E579 #F4E001 #F0805A #26C0C0".split(" "),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".split(" "),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:{itemdStyle:{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:[[.2,"#B5C334"],[.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"}}});u("zrender/mixin/Eventful",["require"],function(){var n=function(){this._handlers={}};return n.prototype.one=function(k,n,p){var g=this._handlers;return n&&k?(g[k]||(g[k]=[]),g[k].push({h:n,one:!0,ctx:p||this}),this):this},n.prototype.bind=function(k,n,p){var g=this._handlers;return n&&k?(g[k]||(g[k]=[]),g[k].push({h:n,one:!1,ctx:p||this}),this):this},n.prototype.unbind=function(k,n){var p=this._handlers;if(!k)return this._handlers={},this;if(n){if(p[k]){for(var g=[],f=0,c=p[k].length;c>f;f++)p[k][f].h!=n&&g.push(p[k][f]);p[k]=g}p[k]&&0===p[k].length&&delete p[k]}else delete p[k];return this},n.prototype.dispatch=function(k){if(this._handlers[k]){var n=arguments,p=n.length;3c;){switch(p){case 1:g[c].h.call(g[c].ctx);break;case 2:g[c].h.call(g[c].ctx,n[1]);break;case 3:g[c].h.call(g[c].ctx,n[1],n[2]);break;default:g[c].h.apply(g[c].ctx,n)}g[c].one?(g.splice(c,1),f--):c++}}return this},n.prototype.dispatchWithContext=function(k){if(this._handlers[k]){var n=arguments,p=n.length;4l;){switch(p){case 1:f[l].h.call(g);break;case 2:f[l].h.call(g,n[1]);break;case 3:f[l].h.call(g,n[1],n[2]);break;default:f[l].h.apply(g,n)}f[l].one?(f.splice(l,1),c--):l++}}return this},n});u("zrender/tool/log",["require","../config"],function(n){var k=n("../config");return function(){if(0!==k.debugMode)if(1==k.debugMode)for(var n in arguments)throw Error(arguments[n]);else if(1this._clickThreshold&&this._dispatchAgency(d,b.CLICK,a);this._mousemoveHandler(a)},dblclick:function(a){a=a||window.event;a=this._zrenderEventFixed(a);var d=this._lastHover;(d&&d.clickable||!d)&&5>this._clickThreshold&&this._dispatchAgency(d,b.DBLCLICK,a);this._mousemoveHandler(a)},mousewheel:function(a){a=this._zrenderEventFixed(a);var d=0<(a.wheelDelta||-a.detail)?1.1:1/1.1,h=!1,e=this._mouseX,t=this._mouseY;this.painter.eachBuildinLayer(function(b){var l=b.position;if(b.zoomable){b.__zoom=b.__zoom||1;var f=b.__zoom,f=f*d,f=Math.max(Math.min(b.maxZoom,f),b.minZoom);d=f/b.__zoom;b.__zoom=f;l[0]-=(e-l[0])*(d-1);l[1]-=(t-l[1])*(d-1);b.scale[0]*=d;b.scale[1]*=d;h=b.dirty=!0;c.stop(a)}});h&&this.painter.refresh();this._dispatchAgency(this._lastHover,b.MOUSEWHEEL,a);this._mousemoveHandler(a)},mousemove:function(a){if(!this.painter.isLoading()){a=this._zrenderEventFixed(a);this._lastX=this._mouseX;this._lastY=this._mouseY;this._mouseX=c.getX(a);this._mouseY=c.getY(a);var d=this._mouseX-this._lastX,h=this._mouseY-this._lastY;this._processDragStart(a);this._hasfound=0;this._event=a;this._iterateAndFindHover();this._hasfound||((!this._draggingTarget||this._lastHover&&this._lastHover!=this._draggingTarget)&&(this._processOutShape(a),this._processDragLeave(a)),this._lastHover=null,this.storage.delHover(),this.painter.clearHover());var e="default";if(this._draggingTarget)this.storage.drift(this._draggingTarget.id,d,h),this._draggingTarget.modSelf(),this.storage.addHover(this._draggingTarget),this._clickThreshold++;else if(this._isMouseDown){var t=!1;this.painter.eachBuildinLayer(function(a){a.panable&&(e="move",a.position[0]+=d,a.position[1]+=h,t=!0,a.dirty=!0)});t&&this.painter.refresh()}this._draggingTarget||this._hasfound&&this._lastHover.draggable?e="move":this._hasfound&&this._lastHover.clickable&&(e="pointer");this.root.style.cursor=e;this._dispatchAgency(this._lastHover,b.MOUSEMOVE,a);(this._draggingTarget||this._hasfound||this.storage.hasHoverShape())&&this.painter.refreshHover()}},mouseout:function(a){a=this._zrenderEventFixed(a);var d=a.toElement||a.relatedTarget;if(d!=this.root)for(;d&&9!=d.nodeType;){if(d==this.root)return void this._mousemoveHandler(a);d=d.parentNode}a.zrenderX=this._lastX;a.zrenderY=this._lastY;this.root.style.cursor="default";this._isMouseDown=0;this._processOutShape(a);this._processDrop(a);this._processDragEnd(a);this.painter.isLoading()||this.painter.refreshHover();this.dispatch(b.GLOBALOUT,a)},mousedown:function(a){return this._clickThreshold=0,2==this._lastDownButton?(this._lastDownButton=a.button,void(this._mouseDownTarget=null)):(this._lastMouseDownMoment=new Date,a=this._zrenderEventFixed(a),this._isMouseDown=1,this._mouseDownTarget=this._lastHover,this._dispatchAgency(this._lastHover,b.MOUSEDOWN,a),void(this._lastDownButton=a.button))},mouseup:function(a){a=this._zrenderEventFixed(a);this.root.style.cursor="default";this._isMouseDown=0;this._mouseDownTarget=null;this._dispatchAgency(this._lastHover,b.MOUSEUP,a);this._processDrop(a);this._processDragEnd(a)},touchstart:function(a){a=this._zrenderEventFixed(a,!0);this._lastTouchMoment=new Date;this._mobileFindFixed(a);this._mousedownHandler(a)},touchmove:function(a){a=this._zrenderEventFixed(a,!0);this._mousemoveHandler(a);this._isDragging&&c.stop(a)},touchend:function(a){a=this._zrenderEventFixed(a,!0);this._mouseupHandler(a);var d=new Date;d-this._lastTouchMomentt;t++){var c=e[t];if(d!==c.zlevel&&(a&&(a.needTransform&&h.restore(),h.flush&&h.flush()),d=c.zlevel,a=this.getLayer(d),a.isBuildin||f("ZLevel "+d+" has been used by unkown layer "+a.id),h=a.ctx,a.unusedCount=0,(a.dirty||b)&&a.clear(),a.needTransform&&(h.save(),a.setTransform(h))),(a.dirty||b)&&!c.invisible&&(!c.onbrush||c.onbrush&&!c.onbrush(h,!1)))if(p.catchBrushException)try{c.brush(h,!1,this.refreshNextFrame)}catch(l){f(l,"brush error of "+c.type,c)}else c.brush(h,!1,this.refreshNextFrame);c.__dirty=!1}a&&(a.needTransform&&h.restore(),h.flush&&h.flush());this.eachBuildinLayer(this._postProcessLayer)},m.prototype.getLayer=function(e){var b=this._layers[e];return b||(b=new l(e,this),b.isBuildin=!0,this._layerConfig[e]&&g.merge(b,this._layerConfig[e],!0),b.updateTransform(),this.insertLayer(e,b),b.initContext()),b},m.prototype.insertLayer=function(e,b){if(this._layers[e])return void f("ZLevel "+e+" has been used already");if(!b||!(b.isBuildin||"function"==typeof b.resize&&"function"==typeof b.refresh))return void f("Layer of zlevel "+e+" is not valid");var a=this._zlevelList.length,d=null,h=-1;if(0this._zlevelList[0]){for(h=0;a-1>h&&!(this._zlevelList[h]e);h++);d=this._layers[this._zlevelList[h]]}this._zlevelList.splice(h+1,0,e);a=d?d.dom:this._bgDom;a.nextSibling?a.parentNode.insertBefore(b.dom,a.nextSibling):a.parentNode.appendChild(b.dom);this._layers[e]=b},m.prototype.eachLayer=function(e,b){for(var a=0;ad;d++){var t=e[d],r=b[t.zlevel];r&&(r.elCount++,!r.dirty)&&(r.dirty=t.__dirty)}this.eachBuildinLayer(function(d,h){a[h]!==d.elCount&&(d.dirty=!0)})},m.prototype.refreshShapes=function(e,b){for(var a=0,d=e.length;d>a;a++)e[a].modSelf();return this.refresh(b),this},m.prototype.setLoadingEffect=function(e){return this._loadingEffect=e,this},m.prototype.clear=function(){return this.eachBuildinLayer(this._clearLayer),this},m.prototype._clearLayer=function(e){e.clear()},m.prototype.modLayer=function(e,b){if(b){this._layerConfig[e]?g.merge(this._layerConfig[e],b,!0):this._layerConfig[e]=b;var a=this._layers[e];a&&g.merge(a,this._layerConfig[e],!0)}},m.prototype.delLayer=function(e){var b=this._layers[e];b&&(this.modLayer(e,{position:b.position,rotation:b.rotation,scale:b.scale}),b.dom.parentNode.removeChild(b.dom),delete this._layers[e],this._zlevelList.splice(g.indexOf(this._zlevelList,e),1))},m.prototype.refreshHover=function(){this.clearHover();for(var e=this.storage.getHoverShapes(!0),b=0,a=e.length;a>b;b++)this._brushHover(e[b]);e=this._layers.hover.ctx;return e.flush&&e.flush(),this.storage.delHover(),this},m.prototype.clearHover=function(){var e=this._layers.hover;return e&&e.clear(),this},m.prototype.showLoading=function(e){return this._loadingEffect&&this._loadingEffect.stop(),e&&this.setLoadingEffect(e),this._loadingEffect.start(this),this.loading=!0,this},m.prototype.hideLoading=function(){return this._loadingEffect.stop(),this.clearHover(),this.loading=!1,this},m.prototype.isLoading=function(){return this.loading},m.prototype.resize=function(){var e=this._domRoot;e.style.display="none";var b=this._getWidth(),a=this._getHeight();if(e.style.display="",this._width!=b||a!=this._height){this._width=b;this._height=a;e.style.width=b+"px";e.style.height=a+"px";for(var d in this._layers)this._layers[d].resize(b,a);this.refresh(null,!0)}return this},m.prototype.clearLayer=function(e){(e=this._layers[e])&&e.clear()},m.prototype.dispose=function(){this.isLoading()&&this.hideLoading();this.root.innerHTML="";this.root=this.storage=this._domRoot=this._layers=null},m.prototype.getDomHover=function(){return this._layers.hover.dom},m.prototype.toDataURL=function(e,b,a){if(window.G_vmlCanvasManager)return null;var d=new l("image",this);this._bgDom.appendChild(d.dom);d.initContext();var h=d.ctx;d.clearColor=b||"#fff";d.clear();var t=this;this.storage.iterShape(function(a){if(!a.invisible&&(!a.onbrush||a.onbrush&&!a.onbrush(h,!1)))if(p.catchBrushException)try{a.brush(h,!1,t.refreshNextFrame)}catch(d){f(d,"brush error of "+a.type,a)}else a.brush(h,!1,t.refreshNextFrame)},{normal:"up",update:!0});e=d.dom.toDataURL(e,a);return h=null,this._bgDom.removeChild(d.dom),e},m.prototype.getWidth=function(){return this._width},m.prototype.getHeight=function(){return this._height},m.prototype._getWidth=function(){var e=this.root,b=e.currentStyle||document.defaultView.getComputedStyle(e);return((e.clientWidth||parseInt(b.width,10))-parseInt(b.paddingLeft,10)-parseInt(b.paddingRight,10)).toFixed(0)-0},m.prototype._getHeight=function(){var e=this.root,b=e.currentStyle||document.defaultView.getComputedStyle(e);return((e.clientHeight||parseInt(b.height,10))-parseInt(b.paddingTop,10)-parseInt(b.paddingBottom,10)).toFixed(0)-0},m.prototype._brushHover=function(e){var b=this._layers.hover.ctx;if(!e.onbrush||e.onbrush&&!e.onbrush(b,!0)){var a=this.getLayer(e.zlevel);if(a.needTransform&&(b.save(),a.setTransform(b)),p.catchBrushException)try{e.brush(b,!0,this.refreshNextFrame)}catch(d){f(d,"hoverBrush error of "+e.type,e)}else e.brush(b,!0,this.refreshNextFrame);a.needTransform&&b.restore()}},m.prototype._shapeToImage=function(e,b,a,d,h){var t=document.createElement("canvas"),r=t.getContext("2d");t.style.width=a+"px";t.style.height=d+"px";t.setAttribute("width",a*h);t.setAttribute("height",d*h);r.clearRect(0,0,a*h,d*h);a=b.position;d=b.rotation;h=b.scale;b.position=[0,0,0];b.rotation=0;b.scale=[1,1];b&&b.brush(r,!1);e=new (n("./shape/Image"))({id:e,style:{x:0,y:0,image:t}});return null!=a&&(e.position=b.position=a),null!=d&&(e.rotation=b.rotation=d),null!=h&&(e.scale=b.scale=h),e},m.prototype._createShapeToImageProcessor=function(){if(window.G_vmlCanvasManager)return q;var e=this;return function(b,a,d,h){return e._shapeToImage(b,a,d,h,p.devicePixelRatio)}},m});u("zrender/Storage",["require","./tool/util","./Group"],function(n){function k(f,c){return f.zlevel==c.zlevel?f.z==c.z?f.__renderidx-c.__renderidx:f.z-c.z:f.zlevel-c.zlevel}var q=n("./tool/util"),p=n("./Group"),g={hover:!1,normal:"down",update:!1};n=function(){this._elements={};this._hoverElements=[];this._roots=[];this._shapeList=[];this._shapeListOffset=0};return n.prototype.iterShape=function(f,c){if(c||(c=g),c.hover)for(var l=0,m=this._hoverElements.length;m>l;l++){var e=this._hoverElements[l];if(e.updateTransform(),f(e))return this}switch(c.update&&this.updateShapeList(),c.normal){case "down":for(m=this._shapeList.length;m--;)if(f(this._shapeList[m]))return this;break;default:for(l=0,m=this._shapeList.length;m>l&&!f(this._shapeList[l]);l++);}return this},n.prototype.getHoverShapes=function(f){for(var c=[],l=0,g=this._hoverElements.length;g>l;l++){c.push(this._hoverElements[l]);var e=this._hoverElements[l].hoverConnect;if(e)for(var b,e=e instanceof Array?e:[e],a=0,d=e.length;d>a;a++)(b=e[a].id?e[a]:this.get(e[a]))&&c.push(b)}if(c.sort(k),f)for(l=0,g=c.length;g>l;l++)c[l].updateTransform();return c},n.prototype.getShapeList=function(f){return f&&this.updateShapeList(),this._shapeList},n.prototype.updateShapeList=function(){for(var f=this._shapeListOffset=0,c=this._roots.length;c>f;f++)this._updateAndAddShape(this._roots[f]);this._shapeList.length=this._shapeListOffset;f=0;for(c=this._shapeList.length;c>f;f++)this._shapeList[f].__renderidx=f;this._shapeList.sort(k)},n.prototype._updateAndAddShape=function(f,c){if(!f.ignore)if(f.updateTransform(),"group"==f.type){f.clipShape&&(f.clipShape.parent=f,f.clipShape.updateTransform(),c?(c=c.slice(),c.push(f.clipShape)):c=[f.clipShape]);for(var l=0;lc;c++)this.delRoot(f[c]);else c="string"==typeof f?this._elements[f]:f,f=q.indexOf(this._roots,c),0<=f&&(this.delFromMap(c.id),this._roots.splice(f,1),c instanceof p&&c.delChildrenFromStorage(this))},n.prototype.addToMap=function(f){return f instanceof p&&(f._storage=this),f.modSelf(),this._elements[f.id]=f,this},n.prototype.get=function(f){return this._elements[f]},n.prototype.delFromMap=function(f){var c=this._elements[f];return c&&(delete this._elements[f],c instanceof p&&(c._storage=null)),this},n.prototype.dispose=function(){this._elements=this._renderList=this._roots=this._hoverElements=null},n});u("zrender/animation/Animation",["require","./Clip","../tool/color","../tool/util","../tool/event"],function(n){function k(a,d){return a[d]}function q(a,d,h){a[d]=h}function p(a,d,h,b,e){var r=a.length;if(1==e)for(e=0;r>e;e++){var t=a[e];b[e]=(d[e]-t)*h+t}else for(t=a[0].length,e=0;r>e;e++)for(var c=0;t>c;c++){var l=a[e][c];b[e][c]=(d[e][c]-l)*h+l}}function g(a){switch(typeof a){case "undefined":case "string":return!1}return"undefined"!=typeof a.length}function f(a,d,h,b,e,r,t,l,f){var g=a.length;if(1==f)for(f=0;g>f;f++)l[f]=c(a[f],d[f],h[f],b[f],e,r,t);else{var m=a[0].length;for(f=0;g>f;f++)for(var p=0;m>p;p++)l[f][p]=c(a[f][p],d[f][p],h[f][p],b[f][p],e,r,t)}}function c(a,d,h,b,e,r,t){a=.5*(h-a);b=.5*(b-d);return(2*(d-h)+a+b)*t+(-3*(d-h)-2*a-b)*r+a*e+d}function l(a){if(g(a)){var d=a.length;if(g(a[0])){for(var h=[],b=0;d>b;b++)h.push(t.call(a[b]));return h}return t.call(a)}return a}function m(a){return a[0]=Math.floor(a[0]),a[1]=Math.floor(a[1]),a[2]=Math.floor(a[2]),"rgba("+a.join(",")+")"}var e=n("./Clip"),b=n("../tool/color"),a=n("../tool/util"),d=n("../tool/event").Dispatcher,h=window.requestAnimationFrame||window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){setTimeout(a,16)},t=Array.prototype.slice;n=function(a){a=a||{};this.stage=a.stage||{};this.onframe=a.onframe||function(){};this._clips=[];this._running=!1;this._time=0;d.call(this)};n.prototype={add:function(a){this._clips.push(a)},remove:function(d){d=a.indexOf(this._clips,d);0<=d&&this._clips.splice(d,1)},_update:function(){for(var a=(new Date).getTime(),d=a-this._time,h=this._clips,b=h.length,e=[],r=[],t=0;b>t;t++){var c=h[t],l=c.step(a);l&&(e.push(l),r.push(c))}for(t=0;b>t;)h[t]._needsRemove?(h[t]=h[b-1],h.pop(),b--):t++;b=e.length;for(t=0;b>t;t++)r[t].fire(e[t]);this._time=a;this.onframe(d);this.dispatch("frame",d);this.stage.update&&this.stage.update()},start:function(){function a(){d._running&&(d._update(),h(a))}var d=this;this._running=!0;this._time=(new Date).getTime();h(a)},stop:function(){this._running=!1},clear:function(){this._clips=[]},animate:function(a,d){d=d||{};var h=new r(a,d.loop,d.getter,d.setter);return h.animation=this,h},constructor:n};a.merge(n.prototype,d.prototype,!0);var r=function(a,d,h,b){this._tracks={};this._target=a;this._loop=d||!1;this._getter=h||k;this._setter=b||q;this._delay=this._clipCount=0;this._doneList=[];this._onframeList=[];this._clipList=[]};return r.prototype={when:function(a,d){for(var h in d)this._tracks[h]||(this._tracks[h]=[],0!==a&&this._tracks[h].push({time:0,value:l(this._getter(this._target,h))})),this._tracks[h].push({time:parseInt(a,10),value:d[h]});return this},during:function(a){return this._onframeList.push(a),this},start:function(a){var d=this,h=this._setter,r=this._getter,t="spline"===a,l=function(){if(d._clipCount--,0===d._clipCount){d._tracks={};for(var a=d._doneList.length,h=0;a>h;h++)d._doneList[h].call(d)}},w=function(w,k){var n=w.length;if(n){var q=w[0].value,D=g(q),A=!1,H=D&&g(q[0])?2:1;w.sort(function(a,d){return a.time-d.time});if(n){for(var q=w[n-1].time,N=[],u=[],I=0;n>I;I++){N.push(w[I].time/q);var M=w[I].value;"string"==typeof M&&(M=b.toArray(M),0===M.length&&(M[0]=M[1]=M[2]=0,M[3]=1),A=!0);u.push(M)}var O,P,S,Q,R,U,T=0,V=0;if(A)var W=[0,0,0,0];q=new e({target:d._target,life:q,loop:d._loop,delay:d._delay,onframe:function(a,b){if(V>b){for(I=O=Math.min(T+1,n-1);0<=I&&!(N[I]<=b);I--);I=Math.min(I,n-2)}else{for(I=T;n>I&&!(N[I]>b);I++);I=Math.min(I-1,n-2)}T=I;V=b;var e=N[I+1]-N[I];if(0!==e){if(P=(b-N[I])/e,t)if(Q=u[I],S=u[0===I?I:I-1],R=u[I>n-2?n-1:I+1],U=u[I>n-3?n-1:I+2],D)f(S,Q,R,U,P,P*P,P*P*P,r(a,k),H);else{var l;A?(f(S,Q,R,U,P,P*P,P*P*P,W,1),l=m(W)):l=c(S,Q,R,U,P,P*P,P*P*P);h(a,k,l)}else D?p(u[I],u[I+1],P,r(a,k),H):(A?(p(u[I],u[I+1],P,W,1),l=m(W)):(e=u[I],l=(u[I+1]-e)*P+e),h(a,k,l));for(I=0;I=c[1]&&(f=c[1]),f},k.prototype.getLocation=function(f,c,l){var g=null!=f.x?f.x:"center";switch(g){case "center":g=Math.floor((this.canvasWidth-c)/2);break;case "left":g=0;break;case "right":g=this.canvasWidth-c}f=null!=f.y?f.y:"center";switch(f){case "center":f=Math.floor((this.canvasHeight-l)/2);break;case "top":f=0;break;case "bottom":f=this.canvasHeight-l}return{x:g,y:f,width:c,height:l}},k});u("zrender/Layer",["require","./mixin/Transformable","./tool/util","./config"],function(n){function k(){return!1}function q(l,f,e){f=document.createElement(f);var b=e.getWidth();e=e.getHeight();return f.style.position="absolute",f.style.left=0,f.style.top=0,f.style.width=b+"px",f.style.height=e+"px",f.width=b*c.devicePixelRatio,f.height=e*c.devicePixelRatio,f.setAttribute("data-zr-dom-id",l),f}var p=n("./mixin/Transformable"),g=n("./tool/util"),f=window.G_vmlCanvasManager,c=n("./config");n=function(c,g){this.id=c;this.dom=q(c,"canvas",g);this.dom.onselectstart=k;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)";f&&f.initElement(this.dom);this.ctxBack=this.domBack=null;this.painter=g;this.unusedCount=0;this.config=null;this.dirty=!0;this.clearColor=this.elCount=0;this.motionBlur=!1;this.lastFrameAlpha=.7;this.panable=this.zoomable=!1;this.maxZoom=1/0;this.minZoom=0;p.call(this)};return n.prototype.initContext=function(){this.ctx=this.dom.getContext("2d");var l=c.devicePixelRatio;1!=l&&this.ctx.scale(l,l)},n.prototype.createBackBuffer=function(){if(!f){this.domBack=q("back-"+this.id,"canvas",this.painter);this.ctxBack=this.domBack.getContext("2d");var l=c.devicePixelRatio;1!=l&&this.ctxBack.scale(l,l)}},n.prototype.resize=function(l,f){var e=c.devicePixelRatio;this.dom.style.width=l+"px";this.dom.style.height=f+"px";this.dom.setAttribute("width",l*e);this.dom.setAttribute("height",f*e);1!=e&&this.ctx.scale(e,e);this.domBack&&(this.domBack.setAttribute("width",l*e),this.domBack.setAttribute("height",f*e),1!=e&&this.ctxBack.scale(e,e))},n.prototype.clear=function(){var l=this.dom,g=this.ctx,e=l.width,b=l.height,a=this.clearColor&&!f,d=this.motionBlur&&!f,h=this.lastFrameAlpha,t=c.devicePixelRatio;if(d&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(l,0,0,e/t,b/t)),g.clearRect(0,0,e/t,b/t),a&&(g.save(),g.fillStyle=this.clearColor,g.fillRect(0,0,e/t,b/t),g.restore()),d)l=this.domBack,g.save(),g.globalAlpha=h,g.drawImage(l,0,0,e/t,b/t),g.restore()},g.merge(n.prototype,p.prototype),n});u("zrender/shape/Text",["require","../tool/area","./Base","../tool/util"],function(n){var k=n("../tool/area"),q=n("./Base"),p=function(g){q.call(this,g)};return p.prototype={type:"text",brush:function(g,f){var c=this.style;if(f&&(c=this.getHighlightStyle(c,this.highlightStyle||{})),"undefined"!=typeof c.text&&!1!==c.text){g.save();this.doClip(g);this.setContext(g,c);this.setTransform(g);c.textFont&&(g.font=c.textFont);g.textAlign=c.textAlign||"start";g.textBaseline=c.textBaseline||"middle";var l,m=(c.text+"").split("\n"),e=k.getTextHeight("\u56fd",c.textFont);l=this.getRect(c);var b=c.x;l="top"==c.textBaseline?l.y:"bottom"==c.textBaseline?l.y+e:l.y+e/2;for(var a=0,d=m.length;d>a;a++){if(c.maxWidth)switch(c.brushType){case "fill":g.fillText(m[a],b,l,c.maxWidth);break;case "stroke":g.strokeText(m[a],b,l,c.maxWidth);break;case "both":g.fillText(m[a],b,l,c.maxWidth);g.strokeText(m[a],b,l,c.maxWidth);break;default:g.fillText(m[a],b,l,c.maxWidth)}else switch(c.brushType){case "fill":g.fillText(m[a],b,l);break;case "stroke":g.strokeText(m[a],b,l);break;case "both":g.fillText(m[a],b,l);g.strokeText(m[a],b,l);break;default:g.fillText(m[a],b,l)}l+=e}g.restore()}},getRect:function(g){if(g.__rect)return g.__rect;var f=k.getTextWidth(g.text,g.textFont),c=k.getTextHeight(g.text,g.textFont),l=g.x;"end"==g.textAlign||"right"==g.textAlign?l-=f:"center"==g.textAlign&&(l-=f/2);var m;return m="top"==g.textBaseline?g.y:"bottom"==g.textBaseline?g.y-c:g.y-c/2,g.__rect={x:l,y:m,width:f,height:c},g.__rect}},n("../tool/util").inherits(p,q),p});u("zrender/shape/Rectangle",["require","./Base","../tool/util"],function(n){var k=n("./Base"),q=function(p){k.call(this,p)};return q.prototype={type:"rectangle",_buildRadiusPath:function(k,g){var f,c,l,m,e=g.x,b=g.y,a=g.width,d=g.height,h=g.radius;"number"==typeof h?f=c=l=m=h:h instanceof Array?1===h.length?f=c=l=m=h[0]:2===h.length?(f=l=h[0],c=m=h[1]):3===h.length?(f=h[0],c=m=h[1],l=h[2]):(f=h[0],c=h[1],l=h[2],m=h[3]):f=c=l=m=0;var t;f+c>a&&(t=f+c,f*=a/t,c*=a/t);l+m>a&&(t=l+m,l*=a/t,m*=a/t);c+l>d&&(t=c+l,c*=d/t,l*=d/t);f+m>d&&(t=f+m,f*=d/t,m*=d/t);k.moveTo(e+f,b);k.lineTo(e+a-c,b);0!==c&&k.quadraticCurveTo(e+a,b,e+a,b+c);k.lineTo(e+a,b+d-l);0!==l&&k.quadraticCurveTo(e+a,b+d,e+a-l,b+d);k.lineTo(e+m,b+d);0!==m&&k.quadraticCurveTo(e,b+d,e,b+d-m);k.lineTo(e,b+f);0!==f&&k.quadraticCurveTo(e,b,e+f,b)},buildPath:function(k,g){g.radius?this._buildRadiusPath(k,g):(k.moveTo(g.x,g.y),k.lineTo(g.x+g.width,g.y),k.lineTo(g.x+g.width,g.y+g.height),k.lineTo(g.x,g.y+g.height),k.lineTo(g.x,g.y));k.closePath()},getRect:function(k){if(k.__rect)return k.__rect;var g;return g="stroke"==k.brushType||"fill"==k.brushType?k.lineWidth||1:0,k.__rect={x:Math.round(k.x-g/2),y:Math.round(k.y-g/2),width:k.width+g,height:k.height+g},k.__rect}},n("../tool/util").inherits(q,k),q});u("zrender/tool/area",["require","./util"],function(n){function k(e,b,a,d){if(!b||!e)return!1;p=p||g.getContext();var h;a:{switch(e.type){case "line":h=b.xStart;var t=b.yStart,r=b.xEnd,c=b.yEnd,l=b.lineWidth;if(0===l)h=!1;else{var l=Math.max(l,5),f;d>t+l&&d>c+l||t-l>d&&c-l>d||a>h+l&&a>r+l||h-l>a&&r-l>a?h=!1:h===r?h=Math.abs(a-h)<=l/2:(f=(t-c)/(h-r),h=f*a-d+(h*c-r*t)/(h-r),h=l/2*l/2>=h*h/(f*f+1))}break a;case "text":h=b.__rect||e.getRect(b);h=q(h.x,h.y,h.width,h.height,a,d);break a;case "rectangle":case "image":h=q(b.x,b.y,b.width,b.height,a,d);break a}h=void 0}"undefined"!=typeof h?e=h:(h=p,e=(h.beginPath(),e.buildPath(h,b),h.closePath(),h.isPointInPath(a,d)));return e}function q(e,b,a,d,h,t){return h>=e&&e+a>=h&&t>=b&&b+d>=t}var p,g=n("./util"),f={},c={},l=0,m=0;return{isInside:k,isOutside:function(e,b,a,d){return!k(e,b,a,d)},getTextWidth:function(e,b){var a=e+":"+b;if(f[a])return f[a];p=p||g.getContext();p.save();b&&(p.font=b);e=(e+"").split("\n");for(var d=0,h=0,t=e.length;t>h;h++)d=Math.max(p.measureText(e[h]).width,d);return p.restore(),f[a]=d,5E3<++l&&(l=0,f={}),d},getTextHeight:function(e,b){var a=e+":"+b;if(c[a])return c[a];p=p||g.getContext();p.save();b&&(p.font=b);e=(e+"").split("\n");var d=(p.measureText("\u56fd").width+2)*e.length;return p.restore(),c[a]=d,5E3<++m&&(m=0,c={}),d},isInsideRect:q}});u("zrender/shape/Base","require ../tool/matrix ../tool/guid ../tool/util ../tool/log ../mixin/Transformable ../mixin/Eventful ../tool/area ../tool/color".split(" "),function(n){var k=window.G_vmlCanvasManager,q=n("../tool/matrix"),p=n("../tool/guid"),g=n("../tool/util"),f=n("../tool/log"),c=n("../mixin/Transformable"),l=n("../mixin/Eventful"),m=function(a){a=a||{};this.id=a.id||p();for(var d in a)this[d]=a[d];this.style=this.style||{};this.highlightStyle=this.highlightStyle||null;this.parent=null;this.__dirty=!0;this.__clipShapes=[];c.call(this);l.call(this)};m.prototype.invisible=!1;m.prototype.ignore=!1;m.prototype.zlevel=0;m.prototype.draggable=!1;m.prototype.clickable=!1;m.prototype.hoverable=!0;m.prototype.z=0;m.prototype.brush=function(a,d){var h=this.beforeBrush(a,d);switch(a.beginPath(),this.buildPath(a,h),h.brushType){case "both":a.fill();case "stroke":0h;h++){var r=d[e[h][0]],c=e[h][1];"undefined"!=typeof r&&(a[c]=r)}};var b=q.create();return m.prototype.doClip=function(a){if(this.__clipShapes&&!k)for(var d=0;d=h.x&&a<=h.x+h.width&&d>=h.y&&d<=h.y+h.height?n("../tool/area").isInside(this,this.style,a,d):!1},m.prototype.drawText=function(a,d,h){var b;if("undefined"!=typeof d.text&&!1!==d.text){var e=d.textColor||d.color||d.strokeColor;a.fillStyle=e;var c,l,f,g=10,m=d.textPosition||this.textPosition||"top";switch(m){case "inside":case "top":case "bottom":case "left":case "right":if(this.getRect){var k=(h||d).__rect||this.getRect(h||d);switch(m){case "inside":f=k.x+k.width/2;b=k.y+k.height/2;c="center";l="middle";"stroke"!=d.brushType&&e==d.color&&(a.fillStyle="#fff");break;case "left":f=k.x-g;b=k.y+k.height/2;c="end";l="middle";break;case "right":f=k.x+k.width+g;b=k.y+k.height/2;c="start";l="middle";break;case "top":f=k.x+k.width/2;b=k.y-g;c="center";l="bottom";break;case "bottom":f=k.x+k.width/2,b=k.y+k.height+g,c="center",l="top"}}break;case "start":case "end":b=d.pointList||[[d.xStart||0,d.yStart||0],[d.xEnd||0,d.yEnd||0]];f=b.length;if(2>f)return;var w,p,v;switch(m){case "start":k=b[1][0];w=b[0][0];p=b[1][1];v=b[0][1];break;case "end":k=b[f-2][0],w=b[f-1][0],p=b[f-2][1],v=b[f-1][1]}f=w;b=v;m=Math.atan((p-v)/(w-k))/Math.PI*180;0>w-k?m+=180:0>p-v&&(m+=360);g=5;30<=m&&150>=m?(c="center",l="bottom",b-=g):150m?(c="right",l="middle",f-=g):210<=m&&330>=m?(c="center",l="top",b+=g):(c="left",l="middle",f+=g);break;case "specific":f=d.textX||0,b=d.textY||0,c="start",l="middle"}if(null!=f&&null!=b){m=d.text;k=d.textFont;c=d.textAlign||c;d=d.textBaseline||l;k&&(a.font=k);a.textAlign=c;a.textBaseline=d;l=m;c=n("../tool/area");c.getTextWidth(l,k);c=c.getTextHeight("\u56fd",k);l=(l+"").split("\n");switch(d){case "top":break;case "bottom":b-=c*l.length;break;default:b-=c*l.length/2}m=(m+"").split("\n");l=n("../tool/area").getTextHeight("\u56fd",k);switch(d){case "top":d=b;break;case "bottom":d=b+l;break;default:d=b+l/2}b=0;for(c=m.length;c>b;b++)a.fillText(m[b],f,d),d+=l}}},m.prototype.modSelf=function(){this.__dirty=!0;this.style&&(this.style.__rect=null);this.highlightStyle&&(this.highlightStyle.__rect=null)},m.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)},g.merge(m.prototype,c.prototype,!0),g.merge(m.prototype,l.prototype,!0),m});u("zrender/mixin/Transformable",["require","../tool/matrix","../tool/vector"],function(n){function k(l){return l>-c&&c>l}function q(l){return l>c||-c>l}var p=n("../tool/matrix"),g=n("../tool/vector"),f=[0,0],c=5E-5;n=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.needTransform=this.needLocalTransform=!1};return n.prototype={constructor:n,updateNeedTransform:function(){this.needLocalTransform=q(this.rotation[0])||q(this.position[0])||q(this.position[1])||q(this.scale[0]-1)||q(this.scale[1]-1)},updateTransform:function(){if(this.updateNeedTransform(),this.needTransform=this.parent?this.needLocalTransform||this.parent.needTransform:this.needLocalTransform,this.needTransform){var c=this.transform||p.create();if(p.identity(c),this.needLocalTransform){if(q(this.scale[0])||q(this.scale[1])){f[0]=-this.scale[2]||0;f[1]=-this.scale[3]||0;var g=q(f[0])||q(f[1]);g&&p.translate(c,c,f);p.scale(c,c,this.scale);g&&(f[0]=-f[0],f[1]=-f[1],p.translate(c,c,f))}this.rotation instanceof Array?0!==this.rotation[0]&&(f[0]=-this.rotation[1]||0,f[1]=-this.rotation[2]||0,(g=q(f[0])||q(f[1]))&&p.translate(c,c,f),p.rotate(c,c,this.rotation[0]),g&&(f[0]=-f[0],f[1]=-f[1],p.translate(c,c,f))):0!==this.rotation&&p.rotate(c,c,this.rotation);(q(this.position[0])||q(this.position[1]))&&p.translate(c,c,this.position)}this.transform=c;this.parent&&this.parent.needTransform&&(this.needLocalTransform?p.mul(this.transform,this.parent.transform,this.transform):p.copy(this.transform,this.parent.transform))}},setTransform:function(c){if(this.needTransform){var f=this.transform;c.transform(f[0],f[1],f[2],f[3],f[4],f[5])}},lookAt:function(){var c=g.create();return function(f){this.transform||(this.transform=p.create());var e=this.transform;g.sub(c,f,this.position);k(c[0])&&k(c[1])||(g.normalize(c,c),e[2]=c[0]*this.scale[1],e[3]=c[1]*this.scale[1],e[0]=c[1]*this.scale[0],e[1]=-c[0]*this.scale[0],e[4]=this.position[0],e[5]=this.position[1],this.decomposeTransform())}}(),decomposeTransform:function(){if(this.transform){var c=this.transform,f=c[0]*c[0]+c[1]*c[1],e=this.position,b=this.scale,a=this.rotation;q(f-1)&&(f=Math.sqrt(f));var d=c[2]*c[2]+c[3]*c[3];q(d-1)&&(d=Math.sqrt(d));e[0]=c[4];e[1]=c[5];b[0]=f;b[1]=d;b[2]=b[3]=0;a[0]=Math.atan2(-c[1]/d,c[0]/f);a[1]=a[2]=0}}},n});u("zrender/Group",["require","./tool/guid","./tool/util","./mixin/Transformable","./mixin/Eventful"],function(n){var k=n("./tool/guid"),q=n("./tool/util"),p=n("./mixin/Transformable"),g=n("./mixin/Eventful"),f=function(c){c=c||{};this.id=c.id||k();for(var l in c)this[l]=c[l];this.type="group";this.clipShape=null;this._children=[];this._storage=null;this.__dirty=!0;p.call(this);g.call(this)};return f.prototype.ignore=!1,f.prototype.children=function(){return this._children.slice()},f.prototype.childAt=function(c){return this._children[c]},f.prototype.addChild=function(c){c!=this&&c.parent!=this&&(c.parent&&c.parent.removeChild(c),this._children.push(c),c.parent=this,this._storage&&this._storage!==c._storage&&(this._storage.addToMap(c),c instanceof f&&c.addChildrenToStorage(this._storage)))},f.prototype.removeChild=function(c){var l=q.indexOf(this._children,c);this._children.splice(l,1);c.parent=null;this._storage&&(this._storage.delFromMap(c.id),c instanceof f&&c.delChildrenFromStorage(this._storage))},f.prototype.clearChildren=function(){for(var c=0;ck)){k=Math.min(k,1);var g="string"==typeof this.easing?q[this.easing]:this.easing,g="function"==typeof g?g(k):k;return this.fire("frame",g),1==k?this.loop?(this.restart(),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(){var k=((new Date).getTime()-this._startTime)%this._life;this._startTime=(new Date).getTime()-k+this.gap;this._needsRemove=!1},fire:function(k,g){for(var f=0,c=this._targetPool.length;c>f;f++)this["on"+k]&&this["on"+k](this._targetPool[f],g)},constructor:k},k});u("zrender/animation/easing",[],function(){var n={Linear:function(k){return k},QuadraticIn:function(k){return k*k},QuadraticOut:function(k){return k*(2-k)},QuadraticInOut:function(k){return 1>(k*=2)?.5*k*k:-.5*(--k*(k-2)-1)},CubicIn:function(k){return k*k*k},CubicOut:function(k){return--k*k*k+1},CubicInOut:function(k){return 1>(k*=2)?.5*k*k*k:.5*((k-=2)*k*k+2)},QuarticIn:function(k){return k*k*k*k},QuarticOut:function(k){return 1- --k*k*k*k},QuarticInOut:function(k){return 1>(k*=2)?.5*k*k*k*k:-.5*((k-=2)*k*k*k-2)},QuinticIn:function(k){return k*k*k*k*k},QuinticOut:function(k){return--k*k*k*k*k+1},QuinticInOut:function(k){return 1>(k*=2)?.5*k*k*k*k*k:.5*((k-=2)*k*k*k*k+2)},SinusoidalIn:function(k){return 1-Math.cos(k*Math.PI/2)},SinusoidalOut:function(k){return Math.sin(k*Math.PI/2)},SinusoidalInOut:function(k){return.5*(1-Math.cos(Math.PI*k))},ExponentialIn:function(k){return 0===k?0:Math.pow(1024,k-1)},ExponentialOut:function(k){return 1===k?1:1-Math.pow(2,-10*k)},ExponentialInOut:function(k){return 0===k?0:1===k?1:1>(k*=2)?.5*Math.pow(1024,k-1):.5*(-Math.pow(2,-10*(k-1))+2)},CircularIn:function(k){return 1-Math.sqrt(1-k*k)},CircularOut:function(k){return Math.sqrt(1- --k*k)},CircularInOut:function(k){return 1>(k*=2)?-.5*(Math.sqrt(1-k*k)-1):.5*(Math.sqrt(1-(k-=2)*k)+1)},ElasticIn:function(k){var n,p=.1;return 0===k?0:1===k?1:(!p||1>p?(p=1,n=.1):n=.4*Math.asin(1/p)/(2*Math.PI),-(p*Math.pow(2,10*--k)*Math.sin(2*(k-n)*Math.PI/.4)))},ElasticOut:function(k){var n,p=.1;return 0===k?0:1===k?1:(!p||1>p?(p=1,n=.1):n=.4*Math.asin(1/p)/(2*Math.PI),p*Math.pow(2,-10*k)*Math.sin(2*(k-n)*Math.PI/.4)+1)},ElasticInOut:function(k){var n,p=.1;return 0===k?0:1===k?1:(!p||1>p?(p=1,n=.1):n=.4*Math.asin(1/p)/(2*Math.PI),1>(k*=2)?-.5*p*Math.pow(2,10*--k)*Math.sin(2*(k-n)*Math.PI/.4):p*Math.pow(2,-10*--k)*Math.sin(2*(k-n)*Math.PI/.4)*.5+1)},BackIn:function(k){return k*k*(2.70158*k-1.70158)},BackOut:function(k){return--k*k*(2.70158*k+1.70158)+1},BackInOut:function(k){return 1>(k*=2)?.5*k*k*(3.5949095*k-2.5949095):.5*((k-=2)*k*(3.5949095*k+2.5949095)+2)},BounceIn:function(k){return 1-n.BounceOut(1-k)},BounceOut:function(k){return 1/2.75>k?7.5625*k*k:2/2.75>k?7.5625*(k-=1.5/2.75)*k+.75:2.5/2.75>k?7.5625*(k-=2.25/2.75)*k+.9375:7.5625*(k-=2.625/2.75)*k+.984375},BounceInOut:function(k){return.5>k?.5*n.BounceIn(2*k):.5*n.BounceOut(2*k-1)+.5}};return n});u("echarts/chart/base","require zrender/shape/Image ../util/shape/Icon ../util/shape/MarkLine ../util/shape/Symbol ../config ../util/ecData ../util/ecAnimation ../util/ecEffect ../util/accMath ../component/base zrender/tool/util zrender/tool/area".split(" "),function(n){function k(d,h,b,e,f){a.call(this,d,h,b,e,f);var g=this;this.selectedMap={};this.lastShapeList=[];this.shapeHandler={onclick:function(){g.isClick=!0},ondragover:function(a){a=a.target;a.highlightStyle=a.highlightStyle||{};var d=a.highlightStyle,h=d.brushTyep,b=d.strokeColor,e=d.lineWidth;d.brushType="stroke";d.strokeColor=g.ecTheme.calculableColor||c.calculableColor;d.lineWidth="icon"===a.type?30:10;g.zr.addHoverShape(a);setTimeout(function(){d&&(d.brushType=h,d.strokeColor=b,d.lineWidth=e)},20)},ondrop:function(a){null!=l.get(a.dragged,"data")&&(g.isDrop=!0)},ondragend:function(){g.isDragend=!0}}}var q=n("zrender/shape/Image"),p=n("../util/shape/Icon"),g=n("../util/shape/MarkLine"),f=n("../util/shape/Symbol"),c=n("../config"),l=n("../util/ecData"),m=n("../util/ecAnimation"),e=n("../util/ecEffect"),b=n("../util/accMath"),a=n("../component/base"),d=n("zrender/tool/util"),h=n("zrender/tool/area");return k.prototype={setCalculable:function(a){return a.dragEnableTime=this.ecTheme.DRAG_ENABLE_TIME||c.DRAG_ENABLE_TIME,a.ondragover=this.shapeHandler.ondragover,a.ondragend=this.shapeHandler.ondragend,a.ondrop=this.shapeHandler.ondrop,a},ondrop:function(a,d){if(this.isDrop&&a.target&&!d.dragIn){var h;h=a.target;var e=a.dragged,f=l.get(h,"seriesIndex"),g=l.get(h,"dataIndex"),m=this.series,k=this.component.legend;if(-1===g){if(l.get(e,"seriesIndex")==f)return d.dragOut=d.dragIn=d.needRefresh=!0,void(this.isDrop=!1);h={value:l.get(e,"value"),name:l.get(e,"name")};this.type===c.CHART_TYPE_PIE&&0>h.value&&(h.value=0);for(var g=!1,w=m[f].data,p=0,n=w.length;n>p;p++)w[p].name===h.name&&"-"===w[p].value&&(m[f].data[p].value=h.value,g=!0);!g&&m[f].data.push(h);k&&k.add(h.name,e.style.color||e.style.strokeColor)}else h=m[f].data[g]||"-",null!=h.value?(m[f].data[g].value="-"!=h.value?b.accAdd(m[f].data[g].value,l.get(e,"value")):l.get(e,"value"),(this.type===c.CHART_TYPE_FUNNEL||this.type===c.CHART_TYPE_PIE)&&(k&&1===k.getRelatedAmount(h.name)&&this.component.legend.del(h.name),h.name+=this.option.nameConnector+l.get(e,"name"),k&&k.add(h.name,e.style.color||e.style.strokeColor))):m[f].data[g]="-"!=h?b.accAdd(m[f].data[g],l.get(e,"value")):l.get(e,"value");d.dragIn=d.dragIn||!0;this.isDrop=!1;var q=this;setTimeout(function(){q.zr.trigger("mousemove",a.event)},300)}},ondragend:function(a,d){if(this.isDragend&&a.target&&!d.dragOut){var h=a.target,b=l.get(h,"seriesIndex"),h=l.get(h,"dataIndex"),e=this.series;null!=e[b].data[h].value?(e[b].data[h].value="-",b=e[b].data[h].name,(h=this.component.legend)&&0===h.getRelatedAmount(b)&&h.del(b)):e[b].data[h]="-";d.dragOut=!0;d.needRefresh=!0;this.isDragend=!1}},onlegendSelected:function(a,d){var h=a.selected,b;for(b in this.selectedMap)this.selectedMap[b]!=h[b]&&(d.needRefresh=!0),this.selectedMap[b]=h[b]},_buildPosition:function(){this._symbol=this.option.symbolList;this._sIndex2ShapeMap={};this._sIndex2ColorMap={};this.selectedMap={};this.xMarkMap={};for(var a,d,h,b,e=this.series,f={top:[],bottom:[],left:[],right:[],other:[]},l=0,g=e.length;g>l;l++)e[l].type===this.type&&(e[l]=this.reformOption(e[l]),this.legendHoverLink=e[l].legendHoverLink||this.legendHoverLink,a=e[l].xAxisIndex,d=e[l].yAxisIndex,h=this.component.xAxis.getAxis(a),b=this.component.yAxis.getAxis(d),h.type===c.COMPONENT_TYPE_AXIS_CATEGORY?f[h.getPosition()].push(l):b.type===c.COMPONENT_TYPE_AXIS_CATEGORY?f[b.getPosition()].push(l):f.other.push(l));for(var m in f)0b;b++)this.buildMark(d[b])}},_mapData:function(a){for(var d,h,b,e,f=this.series,l=0,g={},m=this.component.legend,k=[],p=0,n=0,q=a.length;q>n;n++){if(d=f[a[n]],b=d.name,this._sIndex2ShapeMap[a[n]]=this._sIndex2ShapeMap[a[n]]||this.query(d,"symbol")||this._symbol[n%this._symbol.length],m){if(this.selectedMap[b]=m.isSelected(b),this._sIndex2ColorMap[a[n]]=m.getColor(b),e=m.getItemShape(b)){var z=e.style;if(this.type==c.CHART_TYPE_LINE)z.iconType="legendLineIcon",z.symbol=this._sIndex2ShapeMap[a[n]];else if(0e;e++)for(var f=0,l=d[e].length;l>f;f++){var g=d[e][f],m="xy"==h?0:"",k=this.component.grid,p=a[g];if("-1"!=h.indexOf("x")){0g;g++)b=f.data[g],e=this.getMarkCoord(a,b),b.x=null!=b.x?b.x:e[0],b.y=null!=b.y?b.y:e[1],!b.type||"max"!==b.type&&"min"!==b.type||(b.value=e[3],b.name=b.name||b.type,b.symbolSize=b.symbolSize||h.getTextWidth(e[3],this.getFont())/2+5);a=this._markPoint(a,f);g=0;for(m=a.length;m>g;g++){b=a[g];b.zlevel=this.getZlevelBase();b.z=this.getZBase()+1;for(var k in l)b[k]=d.clone(l[k]);this.shapeList.push(b)}if(this.type===c.CHART_TYPE_FORCE||this.type===c.CHART_TYPE_CHORD)for(g=0,m=a.length;m>g;g++)this.zr.addShape(a[g])},_buildMarkLine:function(a){for(var h,b=(this.markAttachStyle||{})[a],e=d.clone(this.series[a].markLine),l=0,f=e.data.length;f>l;l++){var g=e.data[l];!g.type||"max"!==g.type&&"min"!==g.type&&"average"!==g.type?h=[this.getMarkCoord(a,g[0]),this.getMarkCoord(a,g[1])]:(h=this.getMarkCoord(a,g),e.data[l]=[d.clone(g),{}],e.data[l][0].name=g.name||g.type,e.data[l][0].value="average"!==g.type?h[3]:+h[3].toFixed(null!=e.precision?e.precision:this.deepQuery([this.ecTheme,c],"markLine.precision")),h=h[2],g=[{},{}]);null!=h&&null!=h[0]&&null!=h[1]&&(e.data[l][0].x=null!=g[0].x?g[0].x:h[0][0],e.data[l][0].y=null!=g[0].y?g[0].y:h[0][1],e.data[l][1].x=null!=g[1].x?g[1].x:h[1][0],e.data[l][1].y=null!=g[1].y?g[1].y:h[1][1])}a=this._markLine(a,e);l=0;for(f=a.length;f>l;l++){h=a[l];h.zlevel=this.getZlevelBase();h.z=this.getZBase()+1;for(var m in b)h[m]=d.clone(b[m]);this.shapeList.push(h)}if(this.type===c.CHART_TYPE_FORCE||this.type===c.CHART_TYPE_CHORD)for(l=0,f=a.length;f>l;l++)this.zr.addShape(a[l])},_markPoint:function(a,h){var b=this.series[a],e=this.component;d.merge(d.merge(h,d.clone(this.ecTheme.markPoint||{})),d.clone(c.markPoint));h.name=b.name;var f,g,m,k,p,n,v,q=[],C=h.data,z=e.dataRange,e=e.legend,B=this.zr.getWidth(),A=this.zr.getHeight();if(h.large)f=this.getLargeMarkPoingShape(a,h),f._mark="largePoint",f&&q.push(f);else for(var H=0,u=C.length;u>H;H++)null!=C[H].x&&null!=C[H].y&&(m=null!=C[H].value?C[H].value:"",e&&(g=e.getColor(b.name)),z&&(g=isNaN(m)?g:z.getColor(m),k=[C[H],h],p=this.deepQuery(k,"itemStyle.normal.color")||g,n=this.deepQuery(k,"itemStyle.emphasis.color")||p,null==p&&null==n)||(g=null==g?this.zr.getColor(a):g,C[H].tooltip=C[H].tooltip||h.tooltip||{trigger:"item"},C[H].name=null!=C[H].name?C[H].name:"",C[H].value=m,f=this.getSymbolShape(h,a,C[H],H,C[H].name,this.parsePercent(C[H].x,B),this.parsePercent(C[H].y,A),"pin",g,"rgba(0,0,0,0)","horizontal"),f._mark="point",v=this.deepMerge([C[H],h],"effect"),v.show&&(f.effect=v),b.type===c.CHART_TYPE_MAP&&(f._geo=this.getMarkGeo(C[H])),l.pack(f,b,a,C[H],H,C[H].name,m),q.push(f)));return q},_markLine:function(a,h){var b=this.series[a],e=this.component;d.merge(d.merge(h,d.clone(this.ecTheme.markLine||{})),d.clone(c.markLine));h.symbol=h.symbol instanceof Array?1u;u++){var I=z[u];null!=I[0].x&&null!=I[0].y&&null!=I[1].x&&null!=I[1].y&&(g=e?e.getColor(b.name):this.zr.getColor(a),q=this.deepMerge(I),m=null!=q.value?q.value:"",B&&(g=isNaN(m)?g:B.getColor(m),k=[q,h],p=this.deepQuery(k,"itemStyle.normal.color")||g,n=this.deepQuery(k,"itemStyle.emphasis.color")||p,null==p&&null==n)||(I[0].tooltip=q.tooltip||h.tooltip||{trigger:"item"},I[0].name=null!=I[0].name?I[0].name:"",I[1].name=null!=I[1].name?I[1].name:"",I[0].value=m,f=this.getLineMarkShape(h,a,I,u,this.parsePercent(I[0].x,A),this.parsePercent(I[0].y,H),this.parsePercent(I[1].x,A),this.parsePercent(I[1].y,H),g),f._mark="line",v=this.deepMerge([q,h],"effect"),v.show&&(f.effect=v),b.type===c.CHART_TYPE_MAP&&(f._geo=[this.getMarkGeo(I[0]),this.getMarkGeo(I[1])]),l.pack(f,b,a,I[0],u,I[0].name+(""!==I[1].name?" \x3e "+I[1].name:""),m),C.push(f)))}return C},getMarkCoord:function(){return[0,0]},getSymbolShape:function(a,d,h,b,e,c,f,g,m,k,n){var G=[h,a],C=this.getDataFromOption(h,"-");g=this.deepQuery(G,"symbol")||g;var z=this.deepQuery(G,"symbolSize"),z="function"==typeof z?z(C):z,C=this.deepQuery(G,"symbolRotate"),B=this.deepMerge(G,"itemStyle.normal"),A=this.deepMerge(G,"itemStyle.emphasis"),H=null!=B.borderWidth?B.borderWidth:B.lineStyle&&B.lineStyle.width;null==H&&(H=g.match("empty")?2:0);var u=null!=A.borderWidth?A.borderWidth:A.lineStyle&&A.lineStyle.width;null==u&&(u=H+2);m=new p({style:{iconType:g.replace("empty","").toLowerCase(),x:c-z,y:f-z,width:2*z,height:2*z,brushType:"both",color:g.match("empty")?k:this.getItemStyleColor(B.color,d,b,h)||m,strokeColor:B.borderColor||this.getItemStyleColor(B.color,d,b,h)||m,lineWidth:H},highlightStyle:{color:g.match("empty")?k:this.getItemStyleColor(A.color,d,b,h),strokeColor:A.borderColor||B.borderColor||this.getItemStyleColor(B.color,d,b,h)||m,lineWidth:u},clickable:this.deepQuery(G,"clickable")});return g.match("image")&&(m.style.image=g.replace(/^image:\/\//,""),m=new q({style:m.style,highlightStyle:m.highlightStyle,clickable:this.deepQuery(G,"clickable")})),null!=C&&(m.rotation=[C*Math.PI/180,c,f]),g.match("star")&&(m.style.iconType="star",m.style.n=g.replace("empty","").replace("star","")-0||5),"none"===g&&(m.invisible=!0,m.hoverable=!1),m=this.addLabel(m,a,h,e,n),g.match("empty")&&(null==m.style.textColor&&(m.style.textColor=m.style.strokeColor),null==m.highlightStyle.textColor&&(m.highlightStyle.textColor=m.highlightStyle.strokeColor)),l.pack(m,a,d,h,b,e),m._x=c,m._y=f,m._dataIndex=b,m._seriesIndex=d,m},getLineMarkShape:function(a,d,h,b,e,c,f,l,m){var k=null!=h[0].value?h[0].value:"-",p=null!=h[1].value?h[1].value:"-",n=[this.query(h[0],"symbol")||a.symbol[0],this.query(h[1],"symbol")||a.symbol[1]],q=[this.query(h[0],"symbolSize")||a.symbolSize[0],this.query(h[1],"symbolSize")||a.symbolSize[1]];q[0]="function"==typeof q[0]?q[0](k):q[0];q[1]="function"==typeof q[1]?q[1](p):q[1];var k=[this.query(h[0],"symbolRotate")||a.symbolRotate[0],this.query(h[1],"symbolRotate")||a.symbolRotate[1]],p=[h[0],h[1],a],z=this.deepMerge(p,"itemStyle.normal");z.color=this.getItemStyleColor(z.color,d,b,h);var B=this.deepMerge(p,"itemStyle.emphasis");B.color=this.getItemStyleColor(B.color,d,b,h);d=z.lineStyle;b=B.lineStyle;var A=d.width;null==A&&(A=z.borderWidth);var H=b.width;null==H&&(H=null!=B.borderWidth?B.borderWidth:A+2);e=new g({style:{smooth:this.deepQuery([h[0],h[1],a],"smooth")?"spline":!1,smoothRadian:this.deepQuery([h[0],h[1],a],"smoothRadian"),symbol:n,symbolSize:q,symbolRotate:k,xStart:e,yStart:c,xEnd:f,yEnd:l,brushType:"both",lineType:d.type,shadowColor:d.shadowColor||d.color||z.borderColor||z.color||m,shadowBlur:d.shadowBlur,shadowOffsetX:d.shadowOffsetX,shadowOffsetY:d.shadowOffsetY,color:z.color||m,strokeColor:d.color||z.borderColor||z.color||m,lineWidth:A,symbolBorderColor:z.borderColor||z.color||m,symbolBorder:z.borderWidth},highlightStyle:{shadowColor:b.shadowColor,shadowBlur:b.shadowBlur,shadowOffsetX:b.shadowOffsetX,shadowOffsetY:b.shadowOffsetY,color:B.color||z.color||m,strokeColor:b.color||d.color||B.borderColor||z.borderColor||B.color||z.color||m,lineWidth:H,symbolBorderColor:B.borderColor||z.borderColor||B.color||z.color||m,symbolBorder:null==B.borderWidth?z.borderWidth+2:B.borderWidth},clickable:this.deepQuery(p,"clickable")});return e=this.addLabel(e,a,h[0],h[0].name+" : "+h[1].name),e._x=f,e._y=l,e},getLargeMarkPoingShape:function(a,d){var h,b,e,c,l,g=this.series[a],m=this.component,k=d.data,p=m.dataRange,n=m.legend,m=[k[0],d];if(n&&(b=n.getColor(g.name)),!p||(e=null!=k[0].value?k[0].value:"",b=isNaN(e)?b:p.getColor(e),c=this.deepQuery(m,"itemStyle.normal.color")||b,l=this.deepQuery(m,"itemStyle.emphasis.color")||c,null!=c||null!=l))return b=this.deepMerge(m,"itemStyle.normal").color||b,c=this.deepQuery(m,"symbol")||"circle",c=c.replace("empty","").replace(/\d/g,""),e=this.deepMerge([k[0],d],"effect"),h=new f({style:{pointList:k,color:b,strokeColor:b,shadowColor:e.shadowColor||b,shadowBlur:(null!=e.shadowBlur?e.shadowBlur:8)*(window.devicePixelRatio||1),size:this.deepQuery(m,"symbolSize"),iconType:c,brushType:"fill",lineWidth:1},draggable:!1,hoverable:!1}),e.show&&(h.effect=e),h},backupShapeList:function(){this.shapeList&&0h;h++)d=this._getAnimationKey(b[h]),d.match("undefined")?this.zr.delShape(b[h].id):(d+=b[h].type,m[d]?this.zr.delShape(b[h].id):m[d]=b[h]);h=0;for(p=e.length;p>h;h++)d=this._getAnimationKey(e[h]),d.match("undefined")?this.zr.addShape(e[h]):(d+=e[h].type,k[d]=e[h]);for(d in m)k[d]||this.zr.delShape(m[d].id);for(d in k)m[d]?(this.zr.delShape(m[d].id),this._animateMod(m[d],k[d],l,g,0,f)):(a=this.type!=c.CHART_TYPE_LINE&&this.type!=c.CHART_TYPE_RADAR||0===d.indexOf("icon")?0:l/2,this._animateMod(!1,k[d],l,g,a,f));this.zr.refresh();this.animationEffect()}else for(this.motionlessOnce=!1,this.zr.delShape(b),h=0,p=e.length;p>h;h++)this.zr.addShape(e[h])},_getAnimationKey:function(a){return this.type!=c.CHART_TYPE_MAP?l.get(a,"seriesIndex")+"_"+l.get(a,"dataIndex")+(a._mark?a._mark:"")+(this.type===c.CHART_TYPE_RADAR?l.get(a,"special"):""):l.get(a,"seriesIndex")+"_"+l.get(a,"dataIndex")+(a._mark?a._mark:"undefined")},_animateMod:function(a,d,h,b,e,c){switch(d.type){case "polyline":case "half-smooth-polygon":m.pointList(this.zr,a,d,h,b);break;case "rectangle":m.rectangle(this.zr,a,d,h,b);break;case "image":case "icon":m.icon(this.zr,a,d,h,b,e);break;case "candle":c?this.zr.addShape(d):m.candle(this.zr,a,d,h,b);break;case "ring":case "sector":case "circle":c?"sector"===d.type?m.sector(this.zr,a,d,h,b):this.zr.addShape(d):m.ring(this.zr,a,d,h+(l.get(d,"dataIndex")||0)%20*100,b);break;case "text":m.text(this.zr,a,d,h,b);break;case "polygon":c?m.pointList(this.zr,a,d,h,b):m.polygon(this.zr,a,d,h,b);break;case "ribbon":m.ribbon(this.zr,a,d,h,b);break;case "gauge-pointer":m.gaugePointer(this.zr,a,d,h,b);break;case "mark-line":m.markline(this.zr,a,d,h,b);break;case "bezier-curve":case "line":m.line(this.zr,a,d,h,b);break;default:this.zr.addShape(d)}},animationMark:function(a,d,h){for(var b=h||this.shapeList,e=0,c=b.length;c>e;e++)b[e]._mark&&this._animateMod(!1,b[e],a,d,0,!0);this.animationEffect(h)},animationEffect:function(a){!a&&this.clearEffectShape();a=a||this.shapeList;if(null!=a){var d=c.EFFECT_ZLEVEL;this.zr.modLayer(d,{motionBlur:!0,lastFrameAlpha:.95});for(var h,b=0,f=a.length;f>b;b++)h=a[b],h._mark&&h.effect&&h.effect.show&&e[h._mark]&&(e[h._mark](this.zr,this.effectList,h,d),this.effectList[this.effectList.length-1]._mark=h._mark)}},clearEffectShape:function(a){this.zr&&this.effectList&&0a;a++)this.zr.addShape(this.shapeList[a]);this.zr.refreshNextFrame()}b[h].data=f}},delMark:function(a,d,h){h=h.replace("mark","").replace("large","").toLowerCase();if(this.selectedMap[this.series[a].name]){for(var b=!1,e=[this.shapeList,this.effectList],c=2;c--;)for(var f=0,g=e[c].length;g>f;f++)if(e[c][f]._mark==h&&l.get(e[c][f],"seriesIndex")==a&&l.get(e[c][f],"name")==d){this.zr.delShape(e[c][f].id);e[c].splice(f,1);b=!0;break}b&&this.zr.refreshNextFrame()}}},d.inherits(k,a),k});u("zrender/shape/Circle",["require","./Base","../tool/util"],function(n){var k=n("./Base"),q=function(p){k.call(this,p)};return q.prototype={type:"circle",buildPath:function(k,g){k.arc(g.x,g.y,g.r,0,2*Math.PI,!0)},getRect:function(k){if(k.__rect)return k.__rect;var g;return g="stroke"==k.brushType||"fill"==k.brushType?k.lineWidth||1:0,k.__rect={x:Math.round(k.x-k.r-g/2),y:Math.round(k.y-k.r-g/2),width:2*k.r+g,height:2*k.r+g},k.__rect}},n("../tool/util").inherits(q,k),q});u("echarts/util/accMath",[],function(){function n(k,n){var p=0,g=0;try{p=k.toString().split(".")[1].length}catch(f){}try{g=n.toString().split(".")[1].length}catch(f){}p=Math.pow(10,Math.max(p,g));return(Math.round(k*p)+Math.round(n*p))/p}return{accDiv:function(k,n){var p=k.toString(),g=n.toString(),f=0;try{f=g.split(".")[1].length}catch(c){}try{f-=p.split(".")[1].length}catch(c){}return(p.replace(".","")-0)/(g.replace(".","")-0)*Math.pow(10,f)},accMul:function(k,n){var p=k.toString(),g=n.toString(),f=0;try{f+=p.split(".")[1].length}catch(c){}try{f+=g.split(".")[1].length}catch(c){}return(p.replace(".","")-0)*(g.replace(".","")-0)/Math.pow(10,f)},accAdd:n,accSub:function(k,q){return n(k,-q)}}});u("echarts/util/shape/Icon","require zrender/tool/util zrender/shape/Star zrender/shape/Heart zrender/shape/Droplet zrender/shape/Image zrender/shape/Base".split(" "),function(n){function k(g){p.call(this,g)}var q=n("zrender/tool/util"),p=n("zrender/shape/Base");return k.prototype={type:"icon",iconLibrary:{mark:function(g,f){var c=f.x,l=f.y,m=f.width/16,e=f.height/16;g.moveTo(c,l+f.height);g.lineTo(c+5*m,l+14*e);g.lineTo(c+f.width,l+3*e);g.lineTo(c+13*m,l);g.lineTo(c+2*m,l+11*e);g.lineTo(c,l+f.height);g.moveTo(c+6*m,l+10*e);g.lineTo(c+14*m,l+2*e);g.moveTo(c+10*m,l+13*e);g.lineTo(c+f.width,l+13*e);g.moveTo(c+13*m,l+10*e);g.lineTo(c+13*m,l+f.height)},markUndo:function(g,f){var c=f.x,l=f.y,m=f.width/16,e=f.height/16;g.moveTo(c,l+f.height);g.lineTo(c+5*m,l+14*e);g.lineTo(c+f.width,l+3*e);g.lineTo(c+13*m,l);g.lineTo(c+2*m,l+11*e);g.lineTo(c,l+f.height);g.moveTo(c+6*m,l+10*e);g.lineTo(c+14*m,l+2*e);g.moveTo(c+10*m,l+13*e);g.lineTo(c+f.width,l+13*e)},markClear:function(g,f){var c=f.x,l=f.y,m=f.width/16,e=f.height/16;g.moveTo(c+4*m,l+15*e);g.lineTo(c+9*m,l+13*e);g.lineTo(c+14*m,l+8*e);g.lineTo(c+11*m,l+5*e);g.lineTo(c+6*m,l+10*e);g.lineTo(c+4*m,l+15*e);g.moveTo(c+5*m,l);g.lineTo(c+11*m,l);g.moveTo(c+5*m,l+e);g.lineTo(c+11*m,l+e);g.moveTo(c,l+2*e);g.lineTo(c+f.width,l+2*e);g.moveTo(c,l+5*e);g.lineTo(c+3*m,l+f.height);g.lineTo(c+13*m,l+f.height);g.lineTo(c+f.width,l+5*e)},dataZoom:function(g,f){var c=f.x,l=f.y,m=f.width/16,e=f.height/16;g.moveTo(c,l+3*e);g.lineTo(c+6*m,l+3*e);g.moveTo(c+3*m,l);g.lineTo(c+3*m,l+6*e);g.moveTo(c+3*m,l+8*e);g.lineTo(c+3*m,l+f.height);g.lineTo(c+f.width,l+f.height);g.lineTo(c+f.width,l+3*e);g.lineTo(c+8*m,l+3*e)},dataZoomReset:function(g,f){var c=f.x,l=f.y,m=f.width/16,e=f.height/16;g.moveTo(c+6*m,l);g.lineTo(c+2*m,l+3*e);g.lineTo(c+6*m,l+6*e);g.moveTo(c+2*m,l+3*e);g.lineTo(c+14*m,l+3*e);g.lineTo(c+14*m,l+11*e);g.moveTo(c+2*m,l+5*e);g.lineTo(c+2*m,l+13*e);g.lineTo(c+14*m,l+13*e);g.moveTo(c+10*m,l+10*e);g.lineTo(c+14*m,l+13*e);g.lineTo(c+10*m,l+f.height)},restore:function(g,f){var c=f.x,l=f.y,m=f.width/16,e=f.height/16,b=f.width/2;g.lineWidth=1.5;g.arc(c+b,l+b,b-m,0,2*Math.PI/3);g.moveTo(c+3*m,l+f.height);g.lineTo(c+0*m,l+12*e);g.lineTo(c+5*m,l+11*e);g.moveTo(c,l+8*e);g.arc(c+b,l+b,b-m,Math.PI,5*Math.PI/3);g.moveTo(c+13*m,l);g.lineTo(c+f.width,l+4*e);g.lineTo(c+11*m,l+5*e)},lineChart:function(g,f){var c=f.x,l=f.y,m=f.width/16,e=f.height/16;g.moveTo(c,l);g.lineTo(c,l+f.height);g.lineTo(c+f.width,l+f.height);g.moveTo(c+2*m,l+14*e);g.lineTo(c+7*m,l+6*e);g.lineTo(c+11*m,l+11*e);g.lineTo(c+15*m,l+2*e)},barChart:function(g,f){var c=f.x,l=f.y,m=f.width/16,e=f.height/16;g.moveTo(c,l);g.lineTo(c,l+f.height);g.lineTo(c+f.width,l+f.height);g.moveTo(c+3*m,l+14*e);g.lineTo(c+3*m,l+6*e);g.lineTo(c+4*m,l+6*e);g.lineTo(c+4*m,l+14*e);g.moveTo(c+7*m,l+14*e);g.lineTo(c+7*m,l+2*e);g.lineTo(c+8*m,l+2*e);g.lineTo(c+8*m,l+14*e);g.moveTo(c+11*m,l+14*e);g.lineTo(c+11*m,l+9*e);g.lineTo(c+12*m,l+9*e);g.lineTo(c+12*m,l+14*e)},pieChart:function(g,f){var c=f.x,l=f.y,m=Math.min(f.width-2,f.height-2)/2,l=l+2;g.moveTo(c+m+3,l+m-3);g.arc(c+m+3,l+m-3,m-1,0,-Math.PI/2,!0);g.lineTo(c+m+3,l+m-3);g.moveTo(c+m,l);g.lineTo(c+m,l+m);g.arc(c+m,l+m,m,-Math.PI/2,2*Math.PI,!0);g.lineTo(c+m,l+m);g.lineWidth=1.5},funnelChart:function(g,f){var c=f.x,l=f.y,m=f.width/16,e=f.height/16,l=l-e;g.moveTo(c+1*m,l+2*e);g.lineTo(c+15*m,l+2*e);g.lineTo(c+14*m,l+3*e);g.lineTo(c+2*m,l+3*e);g.moveTo(c+3*m,l+6*e);g.lineTo(c+13*m,l+6*e);g.lineTo(c+12*m,l+7*e);g.lineTo(c+4*m,l+7*e);g.moveTo(c+5*m,l+10*e);g.lineTo(c+11*m,l+10*e);g.lineTo(c+10*m,l+11*e);g.lineTo(c+6*m,l+11*e);g.moveTo(c+7*m,l+14*e);g.lineTo(c+9*m,l+14*e);g.lineTo(c+8*m,l+15*e);g.lineTo(c+7*m,l+15*e)},forceChart:function(g,f){var c=f.x,l=f.y,m=f.width/16,e=f.height/16,b=2*Math.min(m,e);g.moveTo(c+m+b,l+e+b);g.arc(c+m,l+e,b,Math.PI/4,3*Math.PI);g.lineTo(c+7*m-b,l+6*e-b);g.arc(c+7*m,l+6*e,b,Math.PI/4*5,4*Math.PI);g.arc(c+7*m,l+6*e,b/2,Math.PI/4*5,4*Math.PI);g.moveTo(c+7*m-b/2,l+6*e+b);g.lineTo(c+m+b,l+14*e-b);g.arc(c+m,l+14*e,b,-Math.PI/4,2*Math.PI);g.moveTo(c+7*m+b/2,l+6*e);g.lineTo(c+14*m-b,l+10*e-b/2);g.moveTo(c+16*m,l+10*e);g.arc(c+14*m,l+10*e,b,0,3*Math.PI);g.lineWidth=1.5},chordChart:function(g,f){var c=f.x,l=f.y,m=f.width,e=f.height,b=Math.min(m,e)/2;g.moveTo(c+m,l+e/2);g.arc(c+b,l+b,b,0,2*Math.PI);g.arc(c+b,l,b,Math.PI/4,Math.PI/5*4);g.arc(c,l+b,b,-Math.PI/3,Math.PI/3);g.arc(c+m,l+e,b,Math.PI,Math.PI/2*3);g.lineWidth=1.5},stackChart:function(g,f){for(var c=f.x,l=f.y,m=f.width,e=Math.round(f.height/3),b=Math.round((e-2)/2),a=3;a--;)g.rect(c,l+e*a+b,m,2)},tiledChart:function(g,f){for(var c=f.x,l=f.y,m=f.height,e=Math.round(f.width/3),b=Math.round((e-2)/2),a=3;a--;)g.rect(c+e*a+b,l,2,m)},dataView:function(g,f){var c=f.x,l=f.y,m=f.width/16;g.moveTo(c+m,l);g.lineTo(c+m,l+f.height);g.lineTo(c+15*m,l+f.height);g.lineTo(c+15*m,l);g.lineTo(c+m,l);g.moveTo(c+3*m,l+3*m);g.lineTo(c+13*m,l+3*m);g.moveTo(c+3*m,l+6*m);g.lineTo(c+13*m,l+6*m);g.moveTo(c+3*m,l+9*m);g.lineTo(c+13*m,l+9*m);g.moveTo(c+3*m,l+12*m);g.lineTo(c+9*m,l+12*m)},saveAsImage:function(g,f){var c=f.x,l=f.y,m=f.width/16,e=f.height/16;g.moveTo(c,l);g.lineTo(c,l+f.height);g.lineTo(c+f.width,l+f.height);g.lineTo(c+f.width,l);g.lineTo(c,l);g.moveTo(c+4*m,l);g.lineTo(c+4*m,l+8*e);g.lineTo(c+12*m,l+8*e);g.lineTo(c+12*m,l);g.moveTo(c+6*m,l+11*e);g.lineTo(c+6*m,l+13*e);g.lineTo(c+10*m,l+13*e);g.lineTo(c+10*m,l+11*e);g.lineTo(c+6*m,l+11*e)},cross:function(g,f){var c=f.x,l=f.y,m=f.width,e=f.height;g.moveTo(c,l+e/2);g.lineTo(c+m,l+e/2);g.moveTo(c+m/2,l);g.lineTo(c+m/2,l+e)},circle:function(g,f){var c=f.width/2,l=f.height/2,m=Math.min(c,l);g.moveTo(f.x+c+m,f.y+l);g.arc(f.x+c,f.y+l,m,0,2*Math.PI);g.closePath()},rectangle:function(g,f){g.rect(f.x,f.y,f.width,f.height);g.closePath()},triangle:function(g,f){var c=f.width/2,l=f.height/2,m=f.x+c,e=f.y+l,c=Math.min(c,l);g.moveTo(m,e-c);g.lineTo(m+c,e+c);g.lineTo(m-c,e+c);g.lineTo(m,e-c);g.closePath()},diamond:function(g,f){var c=f.width/2,l=f.height/2,m=f.x+c,e=f.y+l,c=Math.min(c,l);g.moveTo(m,e-c);g.lineTo(m+c,e);g.lineTo(m,e+c);g.lineTo(m-c,e);g.lineTo(m,e-c);g.closePath()},arrow:function(g,f){var c=f.x,l=f.y,m=f.width/16;g.moveTo(c+8*m,l);g.lineTo(c+m,l+f.height);g.lineTo(c+8*m,l+f.height/4*3);g.lineTo(c+15*m,l+f.height);g.lineTo(c+8*m,l);g.closePath()},star:function(g,f){var c=n("zrender/shape/Star"),l=f.width/2,m=f.height/2;c.prototype.buildPath(g,{x:f.x+l,y:f.y+m,r:Math.min(l,m),n:f.n||5})},heart:function(g,f){n("zrender/shape/Heart").prototype.buildPath(g,{x:f.x+f.width/2,y:f.y+.2*f.height,a:f.width/2,b:.8*f.height})},droplet:function(g,f){n("zrender/shape/Droplet").prototype.buildPath(g,{x:f.x+.5*f.width,y:f.y+.5*f.height,a:.5*f.width,b:.8*f.height})},pin:function(g,f){var c=f.x,l=f.y-f.height/2*1.5,m=f.width/2,e=f.height/2,b=Math.min(m,e);g.arc(c+m,l+e,b,Math.PI/5*4,Math.PI/5);g.lineTo(c+m,l+e+1.5*b);g.closePath()},image:function(g,f,c){var l=n("zrender/shape/Image");this._imageShape=this._imageShape||new l({style:{}});for(var m in f)this._imageShape.style[m]=f[m];this._imageShape.brush(g,!1,c)}},brush:function(g,f,c){var l=f?this.highlightStyle:this.style,l=l||{};if("image"===(l.iconType||this.style.iconType))n("zrender/shape/Image").prototype.brush.call(this,g,f,c);else{l=this.beforeBrush(g,f);switch(g.beginPath(),this.buildPath(g,l,c),l.brushType){case "both":g.fill();case "stroke":0c.height||8>c.width?4:0;return g>=c.x-l&&g<=c.x+c.width+l&&f>=c.y-l&&f<=c.y+c.height+l?!0:!1}},q.inherits(k,p),k});u("echarts/util/shape/MarkLine","require zrender/shape/Base ./Icon zrender/shape/Line zrender/shape/Polyline zrender/tool/matrix zrender/tool/area zrender/shape/util/dashedLineTo zrender/shape/util/smoothSpline zrender/tool/util".split(" "),function(n){function k(b){q.call(this,b)}var q=n("zrender/shape/Base"),p=n("./Icon"),g=new (n("zrender/shape/Line"))({}),f=new (n("zrender/shape/Polyline"))({}),c=n("zrender/tool/matrix"),l=n("zrender/tool/area"),m=n("zrender/shape/util/dashedLineTo"),e=n("zrender/shape/util/smoothSpline");n=n("zrender/tool/util");return k.prototype={type:"mark-line",brush:function(b,a){var d=this.style;a&&(d=this.getHighlightStyle(d,this.highlightStyle||{}));b.save();this.setContext(b,d);this.setTransform(b);b.save();b.beginPath();this.buildLinePath(b,d,this.style.lineWidth||1);b.stroke();b.restore();this.brushSymbol(b,d,0);this.brushSymbol(b,d,1);this.drawText(b,d,this.style);b.restore()},buildLinePath:function(b,a,d){var h=a.pointList||this.getPointList(a);a.pointList=h;var e=Math.min(a.pointList.length,Math.round(a.pointListLength||a.pointList.length));if(a.lineType&&"solid"!=a.lineType){if("dashed"==a.lineType||"dotted"==a.lineType)if("spline"!==a.smooth)for(a=d*("dashed"==a.lineType?5:1),b.moveTo(h[0][0],h[0][1]),d=1;e>d;d++)m(b,h[d-1][0],h[d-1][1],h[d][0],h[d][1],a);else for(d=1;e>d;d+=2)b.moveTo(h[d-1][0],h[d-1][1]),b.lineTo(h[d][0],h[d][1])}else for(b.moveTo(h[0][0],h[0][1]),d=1;e>d;d++)b.lineTo(h[d][0],h[d][1])},brushSymbol:function(b,a,d){if("none"!=a.symbol[d]){b.save();b.beginPath();b.lineWidth=a.symbolBorder;b.strokeStyle=a.symbolBorderColor;a.iconType=a.symbol[d].replace("empty","").toLowerCase();a.symbol[d].match("empty")&&(b.fillStyle="#fff");var h,e=Math.min(a.pointList.length,Math.round(a.pointListLength||a.pointList.length)),f=0===d?a.pointList[0][0]:a.pointList[e-1][0],e=0===d?a.pointList[0][1]:a.pointList[e-1][1],l="undefined"!=typeof a.symbolRotate[d]?a.symbolRotate[d]-0:0;(0!==l&&(h=c.create(),c.identity(h),(f||e)&&c.translate(h,h,[-f,-e]),c.rotate(h,h,l*Math.PI/180),(f||e)&&c.translate(h,h,[f,e]),b.transform.apply(b,h)),"arrow"==a.iconType&&0===l)?this.buildArrawPath(b,a,d):(d=a.symbolSize[d],a.x=f-d,a.y=e-d,a.width=2*d,a.height=2*d,p.prototype.buildPath(b,a));b.closePath();b.fill();b.stroke();b.restore()}},buildArrawPath:function(b,a,d){var h=Math.min(a.pointList.length,Math.round(a.pointListLength||a.pointList.length)),e=2*a.symbolSize[d],c=a.pointList[0][0],f=a.pointList[h-1][0],l=a.pointList[0][1],h=a.pointList[h-1][1],g=0;"spline"===a.smooth&&(g=a.smoothRadian*(f>=c?1:-1));a=Math.atan(Math.abs((h-l)/(c-f)));0===d?f>c?h>l?a=2*Math.PI-a+g:a+=g:h>l?a+=Math.PI-g:a=Math.PI-a-g:c>f?l>h?a=2*Math.PI-a+g:a+=g:l>h?a+=Math.PI-g:a=Math.PI-a-g;g=Math.PI/8;c=0===d?c:f;d=0===d?l:h;e=[[c+e*Math.cos(a-g),d-e*Math.sin(a-g)],[c+.6*e*Math.cos(a),d-.6*e*Math.sin(a)],[c+e*Math.cos(a+g),d-e*Math.sin(a+g)]];b.moveTo(c,d);l=0;for(f=e.length;f>l;l++)b.lineTo(e[l][0],e[l][1]);b.lineTo(c,d)},getPointList:function(b){var a=[[b.xStart,b.yStart],[b.xEnd,b.yEnd]];if("spline"===b.smooth){var d=a[1][0],h=a[1][1];if(.8>=b.smoothRadian){a[3]=[d,h];var c=a[0][0]<=a[3][0];a[1]=this.getOffetPoint(a[0],a[3],c,b.smoothRadian);a[2]=this.getOffetPoint(a[3],a[0],c,b.smoothRadian)}else a[2]=[d,h],a[1]=this.getOffetPoint(a[0],a[2],a[0][0]<=a[2][0],b.smoothRadian);a=e(a,!1);a[a.length-1]=[d,h]}return a},getOffetPoint:function(b,a,d,h){var e,c=Math.sqrt(Math.round((b[0]-a[0])*(b[0]-a[0])+(b[1]-a[1])*(b[1]-a[1])))/((2-Math.abs(h))/.6),f=[b[0],b[1]];e=b[0]!=a[0]&&b[1]!=a[1]?Math.atan((a[1]-b[1])/(a[0]-b[0])):b[0]==a[0]?(b[1]<=a[1]?1:-1)*Math.PI/2:0;var l,g;return b[0]<=a[0]?(e-=h*(d?1:-1),l=Math.round(Math.cos(e)*c),g=Math.round(Math.sin(e)*c),f[0]+=l,f[1]+=g):(e+=h*(d?1:-1),l=Math.round(Math.cos(e)*c),g=Math.round(Math.sin(e)*c),f[0]-=l,f[1]-=g),f},getRect:function(b){if(b.__rect)return b.__rect;var a=b.lineWidth||1;return b.__rect={x:Math.min(b.xStart,b.xEnd)-a,y:Math.min(b.yStart,b.yEnd)-a,width:Math.abs(b.xStart-b.xEnd)+a,height:Math.abs(b.yStart-b.yEnd)+a},b.__rect},isCover:function(b,a){var d=this.getTansform(b,a);b=d[0];a=d[1];d=this.style.__rect;return d||(d=this.style.__rect=this.getRect(this.style)),b>=d.x&&b<=d.x+d.width&&a>=d.y&&a<=d.y+d.height?"spline"!==this.style.smooth?l.isInside(g,this.style,b,a):l.isInside(f,this.style,b,a):!1}},n.inherits(k,q),k});u("echarts/util/shape/Symbol",["require","zrender/shape/Base","zrender/shape/Polygon","zrender/tool/util","./normalIsCover"],function(n){function k(f){q.call(this,f)}var q=n("zrender/shape/Base"),p=new (n("zrender/shape/Polygon"))({}),g=n("zrender/tool/util");return k.prototype={type:"symbol",buildPath:function(f,c){var l=c.pointList,g=l.length;if(0!==g)for(var e,b,a,d,h,t=Math.ceil(g/1E4),r=l[0]instanceof Array,k=c.size?c.size:2,x=k,p=k/2,n=2*Math.PI,E=0;t>E;E++){f.beginPath();e=1E4*E;b=e+1E4;for(b=b>g?g:b;b>e;e++)if(c.random&&(a=c["randomMap"+e%20]/100,x=k*a*a,p=x/2),r?(d=l[e][0],h=l[e][1]):(d=l[e].x,h=l[e].y),3>x)f.rect(d-p,h-p,x,x);else switch(c.iconType){case "circle":f.moveTo(d,h);f.arc(d,h,p,0,n,!0);break;case "diamond":f.moveTo(d,h-p);f.lineTo(d+p/3,h-p/3);f.lineTo(d+p,h);f.lineTo(d+p/3,h+p/3);f.lineTo(d,h+p);f.lineTo(d-p/3,h+p/3);f.lineTo(d-p,h);f.lineTo(d-p/3,h-p/3);f.lineTo(d,h-p);break;default:f.rect(d-p,h-p,x,x)}if(f.closePath(),t-1>E)switch(c.brushType){case "both":f.fill();0l;l++){var m=arguments[l];g.style[m]=f.style[m]}}function q(g,f,c,l,m){var e=c.style;f||(f={position:c.position,style:{x:e.x,y:"vertical"==c._orient?e.y+e.height:e.y,width:"vertical"==c._orient?e.width:0,height:"vertical"!=c._orient?e.height:0}});var b=e.x,a=e.y,d=e.width,e=e.height,h=[c.position[0],c.position[1]];k(c,f,"x","y","width","height");c.position=f.position;g.addShape(c);h[0]==f.position[0]&&h[1]==f.position[1]||g.animate(c.id,"").when(l,{position:h}).start(m);g.animate(c.id,"style").when(l,{x:b,y:a,width:d,height:e}).start(m)}var p=n("zrender/tool/util");return{pointList:function(g,f,c,l,m){var e=c.style.pointList,b=e.length;if(!f){if(f=[],"vertical"!=c._orient)for(var a=e[0][1],d=0;b>d;d++)f[d]=[e[d][0],a];else for(a=e[0][0],d=0;b>d;d++)f[d]=[a,e[d][1]];"half-smooth-polygon"==c.type&&(f[b-1]=p.clone(e[b-1]),f[b-2]=p.clone(e[b-2]));f={style:{pointList:f}}}f=f.style.pointList;d=f.length;c.style.pointList=d==b?f:b>d?f.concat(e.slice(d)):f.slice(0,b);g.addShape(c);g.animate(c.id,"style").when(l,{pointList:e}).start(m)},rectangle:q,candle:function(g,f,c,l,m){f||(f=c.style.y,f={style:{y:[f[0],f[0],f[0],f[0]]}});var e=c.style.y;c.style.y=f.style.y;g.addShape(c);g.animate(c.id,"style").when(l,{y:e}).start(m)},ring:function(g,f,c,l,m){f=c.style.x;var e=c.style.y,b=c.style.r0,a=c.style.r;"r"!=c._animationAdd?(c.style.r0=0,c.style.r=0,c.rotation=[2*Math.PI,f,e],g.addShape(c),g.animate(c.id,"style").when(l,{r0:b,r:a}).start(m),g.animate(c.id,"").when(Math.round(l/3*2),{rotation:[0,f,e]}).start(m)):(c.style.r0=c.style.r,g.addShape(c),g.animate(c.id,"style").when(l,{r0:b}).start(m))},sector:function(g,f,c,l,m){f||(f="r"!=c._animationAdd?{style:{startAngle:c.style.startAngle,endAngle:c.style.startAngle}}:{style:{r0:c.style.r}});var e=c.style.startAngle,b=c.style.endAngle;k(c,f,"startAngle","endAngle");g.addShape(c);g.animate(c.id,"style").when(l,{startAngle:e,endAngle:b}).start(m)},text:function(g,f,c,l,m){f||(f={style:{x:"left"==c.style.textAlign?c.style.x+100:c.style.x-100,y:c.style.y}});var e=c.style.x,b=c.style.y;k(c,f,"x","y");g.addShape(c);g.animate(c.id,"style").when(l,{x:e,y:b}).start(m)},polygon:function(g,f,c,l,m){var e=n("zrender/shape/Polygon").prototype.getRect(c.style);f=e.x+e.width/2;e=e.y+e.height/2;c.scale=[.1,.1,f,e];g.addShape(c);g.animate(c.id,"").when(l,{scale:[1,1,f,e]}).start(m)},ribbon:function(g,f,c,l,m){f||(f={style:{source0:0,source1:0a;a++)e.style["randomMap"+a]=0,g={},g["randomMap"+a]=100,b={},b["randomMap"+a]=0,e.style["randomMap"+a]=100*Math.random(),c.animate(e.id,"style",!0).when(l,g).when(2*l,b).when(3*l,g).when(4*l,g).delay(Math.random()*l*a).start()},line:function(c,f,g,e){var b=g.effect,a=b.color||g.style.strokeColor||g.style.color,d=g.style.lineWidth*b.scaleSize,h="undefined"!=typeof b.shadowBlur?b.shadowBlur:d,t=new q({zlevel:e,style:{x:h,y:h,r:d,color:a,shadowColor:b.shadowColor||g.style.strokeColor||a,shadowBlur:h},draggable:!1,hoverable:!1});t.style.image=c.shapeToImage(t,2*(d+h),2*(d+h)).style.image;t=new p({zlevel:t.zlevel,style:t.style,draggable:!1,hoverable:!1});k.clone(g,t);t.position=g.position;f.push(t);c.addShape(t);t.style.x=g.style.xStart-h;t.style.y=g.style.yStart-h;f=Math.round(Math.sqrt(Math.round(((g.style.xStart-g.style.xEnd)*(g.style.xStart-g.style.xEnd)+(g.style.yStart-g.style.yEnd)*(g.style.yStart-g.style.yEnd))*b.period*b.period)));if(g.style.smooth){e=g.style.pointList||g.getPointList(g.style);a=e.length;f=Math.round(f/a);for(var b=c.animate(t.id,"style",b.loop),d=Math.ceil(a/8),r=0;a-d>r;r+=d)b.when(f*(r+1),{x:e[r][0]-h,y:e[r][1]-h});b.when(f*a,{x:e[a-1][0]-h,y:e[a-1][1]-h});b.done(function(){g.effect.show=!1;c.delShape(t.id)});b.start("spline")}else c.animate(t.id,"style",b.loop).when(f,{x:g._x-h,y:g._y-h}).done(function(){g.effect.show=!1;c.delShape(t.id)}).start()}}});u("echarts/component/base",["require","../config","../util/ecQuery","../util/number","zrender/tool/util"],function(n){function k(c,f,g,e,b){this.ecTheme=c;this.messageCenter=f;this.zr=g;this.option=e;this.series=e.series;this.myChart=b;this.component=b.component;this.shapeList=[];this.effectList=[]}var q=n("../config"),p=n("../util/ecQuery"),g=n("../util/number"),f=n("zrender/tool/util");return k.prototype={canvasSupported:!0,_getZ:function(c){var f=this.ecTheme[this.type];return f&&null!=f[c]?f[c]:(f=q[this.type],f&&null!=f[c]?f[c]:0)},getZlevelBase:function(){return this._getZ("zlevel")},getZBase:function(){return this._getZ("z")},reformOption:function(c){return f.merge(f.merge(c||{},f.clone(this.ecTheme[this.type]||{})),f.clone(q[this.type]||{}))},reformCssArray:function(c){if(!(c instanceof Array))return[c,c,c,c];switch(c.length+""){case "4":return c;case "3":return[c[0],c[1],c[2],c[1]];case "2":return[c[0],c[1],c[0],c[1]];case "1":return[c[0],c[0],c[0],c[0]];case "0":return[0,0,0,0]}},getShapeById:function(c){for(var f=0,g=this.shapeList.length;g>f;f++)if(this.shapeList[f].id===c)return this.shapeList[f];return null},getFont:function(c){c=this.getTextStyle(f.clone(c));return c.fontStyle+" "+c.fontWeight+" "+c.fontSize+"px "+c.fontFamily},getTextStyle:function(c){return f.merge(f.merge(c||{},this.ecTheme.textStyle),q.textStyle)},getItemStyleColor:function(c,f,g,e){return"function"==typeof c?c.call(this.myChart,{seriesIndex:f,series:this.series[f],dataIndex:g,data:e}):c},getDataFromOption:function(c,f){return null!=c?null!=c.value?c.value:c:f},subPixelOptimize:function(c,f){return 1===f%2?Math.floor(c)+.5:Math.round(c)},resize:function(){this.refresh&&this.refresh();this.clearEffectShape&&this.clearEffectShape(!0);var c=this;setTimeout(function(){c.animationEffect&&c.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.effectList=this.shapeList=null;this.onafterDispose&&this.onafterDispose()},query:p.query,deepQuery:p.deepQuery,deepMerge:p.deepMerge,parsePercent:g.parsePercent,parseCenter:g.parseCenter,parseRadius:g.parseRadius,numAddCommas:g.addCommas},k});u("zrender/shape/Star",["require","../tool/math","./Base","../tool/util"],function(n){var k=n("../tool/math"),q=k.sin,p=k.cos,g=Math.PI,f=n("./Base"),k=function(c){f.call(this,c)};return k.prototype={type:"star",buildPath:function(c,f){var m=f.n;if(m&&!(2>m)){var e=f.x,b=f.y,a=f.r,d=f.r0;null==d&&(d=4n;n++)m=0===n%2?d:a,x.push([e+m*p(t),b+m*q(t)]),t+=h;x.push([r,k]);c.moveTo(x[0][0],x[0][1]);for(n=0;nc;c+=2)p[0]=Math.min(p[0],p[0],l[c]),p[1]=Math.min(p[1],p[1],l[c+1]),g[0]=Math.max(g[0],g[0],l[c]),g[1]=Math.max(g[1],g[1],l[c+1]);break;case "Q":for(c=0;4>c;c+=2)p[0]=Math.min(p[0],p[0],l[c]),p[1]=Math.min(p[1],p[1],l[c+1]),g[0]=Math.max(g[0],g[0],l[c]),g[1]=Math.max(g[1],g[1],l[c+1]);break;case "A":var c=l[0],m=l[1],e=l[2],l=l[3];p[0]=Math.min(p[0],p[0],c-e);p[1]=Math.min(p[1],p[1],m-l);g[0]=Math.max(g[0],g[0],c+e);g[1]=Math.max(g[1],g[1],m+l)}}return{x:p[0],y:p[1],width:g[0]-p[0],height:g[1]-p[1]}},n.prototype.begin=function(k){return this._ctx=k||null,this.pathCommands.length=0,this},n.prototype.moveTo=function(k,g){return this.pathCommands.push(new q("M",[k,g])),this._ctx&&this._ctx.moveTo(k,g),this},n.prototype.lineTo=function(k,g){return this.pathCommands.push(new q("L",[k,g])),this._ctx&&this._ctx.lineTo(k,g),this},n.prototype.bezierCurveTo=function(k,g,f,c,l,m){return this.pathCommands.push(new q("C",[k,g,f,c,l,m])),this._ctx&&this._ctx.bezierCurveTo(k,g,f,c,l,m),this},n.prototype.quadraticCurveTo=function(k,g,f,c){return this.pathCommands.push(new q("Q",[k,g,f,c])),this._ctx&&this._ctx.quadraticCurveTo(k,g,f,c),this},n.prototype.arc=function(k,g,f,c,l,m){return this.pathCommands.push(new q("A",[k,g,f,f,c,l-c,0,m?0:1])),this._ctx&&this._ctx.arc(k,g,f,c,l,m),this},n.prototype.arcTo=function(k,g,f,c,l){return this._ctx&&this._ctx.arcTo(k,g,f,c,l),this},n.prototype.rect=function(k,g,f,c){return this._ctx&&this._ctx.rect(k,g,f,c),this},n.prototype.closePath=function(){return this.pathCommands.push(new q("z")),this._ctx&&this._ctx.closePath(),this},n.prototype.isEmpty=function(){return 0===this.pathCommands.length},n.PathSegment=q,n});u("zrender/shape/Line",["require","./Base","./util/dashedLineTo","../tool/util"],function(n){var k=n("./Base"),q=n("./util/dashedLineTo"),p=function(g){this.brushTypeOnly="stroke";this.textPosition="end";k.call(this,g)};return p.prototype={type:"line",buildPath:function(g,f){f.lineType&&"solid"!=f.lineType?"dashed"!=f.lineType&&"dotted"!=f.lineType||q(g,f.xStart,f.yStart,f.xEnd,f.yEnd,(f.lineWidth||1)*("dashed"==f.lineType?5:1)):(g.moveTo(f.xStart,f.yStart),g.lineTo(f.xEnd,f.yEnd))},getRect:function(g){if(g.__rect)return g.__rect;var f=g.lineWidth||1;return g.__rect={x:Math.min(g.xStart,g.xEnd)-f,y:Math.min(g.yStart,g.yEnd)-f,width:Math.abs(g.xStart-g.xEnd)+f,height:Math.abs(g.yStart-g.yEnd)+f},g.__rect}},n("../tool/util").inherits(p,k),p});u("zrender/shape/Polyline","require ./Base ./util/smoothSpline ./util/smoothBezier ./util/dashedLineTo ./Polygon ../tool/util".split(" "),function(n){var k=n("./Base"),q=n("./util/smoothSpline"),p=n("./util/smoothBezier"),g=n("./util/dashedLineTo"),f=function(c){this.brushTypeOnly="stroke";this.textPosition="end";k.call(this,c)};return f.prototype={type:"polyline",buildPath:function(c,f){var m=f.pointList;if(!(2>m.length)){var e=Math.min(f.pointList.length,Math.round(f.pointListLength||f.pointList.length));if(f.smooth&&"spline"!==f.smooth){var b=p(m,f.smooth,!1,f.smoothConstraint);c.moveTo(m[0][0],m[0][1]);for(var a,d,h,t=0;e-1>t;t++)a=b[2*t],d=b[2*t+1],h=m[t+1],c.bezierCurveTo(a[0],a[1],d[0],d[1],h[0],h[1])}else if("spline"===f.smooth&&(m=q(m),e=m.length),f.lineType&&"solid"!=f.lineType){if("dashed"==f.lineType||"dotted"==f.lineType)for(b=(f.lineWidth||1)*("dashed"==f.lineType?5:1),c.moveTo(m[0][0],m[0][1]),t=1;e>t;t++)g(c,m[t-1][0],m[t-1][1],m[t][0],m[t][1],b)}else for(c.moveTo(m[0][0],m[0][1]),t=1;e>t;t++)c.lineTo(m[t][0],m[t][1])}},getRect:function(c){return n("./Polygon").prototype.getRect(c)}},n("../tool/util").inherits(f,k),f});u("zrender/shape/util/dashedLineTo",[],function(){var n=[5,5];return function(k,q,p,g,f,c){if(k.setLineDash)return n[0]=n[1]=c,k.setLineDash(n),k.moveTo(q,p),void k.lineTo(g,f);var l=g-q,m=f-p;c=Math.floor(Math.sqrt(l*l+m*m)/("number"!=typeof c?5:c));for(var l=l/c,m=m/c,e=!0,b=0;c>b;++b)e?k.moveTo(q,p):k.lineTo(q,p),e=!e,q+=l,p+=m;k.lineTo(g,f)}});u("zrender/shape/util/smoothSpline",["require","../../tool/vector"],function(n){function k(k,g,f,c,l,m,e){k=.5*(f-k);c=.5*(c-g);return(2*(g-f)+k+c)*e+(-3*(g-f)-2*k-c)*m+k*l+g}var q=n("../../tool/vector");return function(p,g){for(var f=p.length,c=[],l=0,m=1;f>m;m++)l+=q.distance(p[m-1],p[m]);l/=5;l=f>l?f:l;for(m=0;l>m;m++){var e,b,a,d=m/(l-1)*(g?f:f-1),h=Math.floor(d),d=d-h,t=p[h%f];g?(e=p[(h-1+f)%f],b=p[(h+1)%f],a=p[(h+2)%f]):(e=p[0===h?h:h-1],b=p[h>f-2?f-1:h+1],a=p[h>f-3?f-1:h+2]);var h=d*d,r=d*h;c.push([k(e[0],t[0],b[0],a[0],d,h,r),k(e[1],t[1],b[1],a[1],d,h,r)])}return c}});u("zrender/shape/util/smoothBezier",["require","../../tool/vector"],function(n){var k=n("../../tool/vector");return function(n,p,g,f){var c,l,m,e,b=[],a=[],d=[],h=[],t=!!f;if(t){m=[1/0,1/0];e=[-1/0,-1/0];for(var r=0,y=n.length;y>r;r++)k.min(m,m,n[r]),k.max(e,e,n[r]);k.min(m,m,f[0]);k.max(e,e,f[1])}r=0;for(y=n.length;y>r;r++){f=n[r];if(g)c=n[r?r-1:y-1],l=n[(r+1)%y];else{if(0===r||r===y-1){b.push(n[r]);continue}c=n[r-1];l=n[r+1]}k.sub(a,l,c);k.scale(a,a,p);c=k.distance(f,c);l=k.distance(f,l);var x=c+l;0!==x&&(c/=x,l/=x);k.scale(d,a,-c);k.scale(h,a,l);c=k.add([],f,d);f=k.add([],f,h);t&&(k.max(c,c,m),k.min(c,c,e),k.max(f,f,m),k.min(f,f,e));b.push(c);b.push(f)}return g&&b.push(b.shift()),b}});u("zrender/shape/Polygon","require ./Base ./util/smoothSpline ./util/smoothBezier ./util/dashedLineTo ../tool/util".split(" "),function(n){var k=n("./Base"),q=n("./util/smoothSpline"),p=n("./util/smoothBezier"),g=n("./util/dashedLineTo"),f=function(c){k.call(this,c)};return f.prototype={type:"polygon",buildPath:function(c,f){var m=f.pointList;if(!(2>m.length)){if(f.smooth&&"spline"!==f.smooth){var e=p(m,f.smooth,!0,f.smoothConstraint);c.moveTo(m[0][0],m[0][1]);for(var b,a,d,h=m.length,t=0;h>t;t++)b=e[2*t],a=e[2*t+1],d=m[(t+1)%h],c.bezierCurveTo(b[0],b[1],a[0],a[1],d[0],d[1])}else if("spline"===f.smooth&&(m=q(m,!0)),f.lineType&&"solid"!=f.lineType){if("dashed"==f.lineType||"dotted"==f.lineType){e=f._dashLength||(f.lineWidth||1)*("dashed"==f.lineType?5:1);f._dashLength=e;c.moveTo(m[0][0],m[0][1]);t=1;for(b=m.length;b>t;t++)g(c,m[t-1][0],m[t-1][1],m[t][0],m[t][1],e);g(c,m[m.length-1][0],m[m.length-1][1],m[0][0],m[0][1],e)}}else{c.moveTo(m[0][0],m[0][1]);t=1;for(b=m.length;b>t;t++)c.lineTo(m[t][0],m[t][1]);c.lineTo(m[0][0],m[0][1])}c.closePath()}},getRect:function(c){if(c.__rect)return c.__rect;for(var f=Number.MAX_VALUE,g=Number.MIN_VALUE,e=Number.MAX_VALUE,b=Number.MIN_VALUE,a=c.pointList,d=0,h=a.length;h>d;d++)a[d][0]g&&(g=a[d][0]),a[d][1]b&&(b=a[d][1]);var t;return t="stroke"==c.brushType||"fill"==c.brushType?c.lineWidth||1:0,c.__rect={x:Math.round(f-t/2),y:Math.round(e-t/2),width:g-f+t,height:b-e+t},c.__rect}},n("../tool/util").inherits(f,k),f});u("echarts/util/shape/normalIsCover",[],function(){return function(n,k){var q=this.getTansform(n,k);n=q[0];k=q[1];q=this.style.__rect;return q||(q=this.style.__rect=this.getRect(this.style)),n>=q.x&&n<=q.x+q.width&&k>=q.y&&k<=q.y+q.height}});u("echarts/util/ecQuery",["require","zrender/tool/util"],function(n){function k(k,g){if("undefined"!=typeof k){if(!g)return k;g=g.split(".");for(var f=g.length,c=0;f>c;){if(k=k[g[c]],"undefined"==typeof k)return;c++}return k}}var q=n("zrender/tool/util");return{query:k,deepQuery:function(p,g){for(var f,c=0,l=p.length;l>c;c++)if(f=k(p[c],g),"undefined"!=typeof f)return f},deepMerge:function(p,g){for(var f,c=p.length;c--;){var l=k(p[c],g);"undefined"!=typeof l&&("undefined"==typeof f?f=q.clone(l):q.merge(f,l,!0))}return f}}});u("echarts/util/number",[],function(){function n(k,n){return"string"==typeof k?k.replace(/^\s+/,"").replace(/\s+$/,"").match(/%$/)?parseFloat(k)/100*n:parseFloat(k):k}return{parsePercent:n,parseCenter:function(k,q){return[n(q[0],k.getWidth()),n(q[1],k.getHeight())]},parseRadius:function(k,q){q instanceof Array||(q=[0,q]);var p=Math.min(k.getWidth(),k.getHeight())/2;return[n(q[0],p),n(q[1],p)]},addCommas:function(k){return isNaN(k)?"-":(k=(k+"").split("."),k[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1a&&(a=r[0]);r[1]h&&(h=r[1])}f[0]=b;f[1]=d;e[0]=a;e[1]=h}}var q=n("./vector"),p=n("./curve"),g=q.create(),f=q.create(),c=q.create();return k.cubeBezier=function(c,f,e,b,a,d){var h=[];p.cubicExtrema(c[0],f[0],e[0],b[0],h);for(var g=0;g=2*Math.PI)return h[0]=l-e,h[1]=m-e,t[0]=l+e,void(t[1]=m+e);if(g[0]=Math.cos(b)*e+l,g[1]=Math.sin(b)*e+m,f[0]=Math.cos(a)*e+l,f[1]=Math.sin(a)*e+m,q.min(h,g,f),q.max(t,g,f),b%=2*Math.PI,0>b&&(b+=2*Math.PI),a%=2*Math.PI,0>a&&(a+=2*Math.PI),b>a&&!d?a+=2*Math.PI:a>b&&d&&(b+=2*Math.PI),d)b=a=b;for(d=0;a>d;d+=Math.PI/2)d>b&&(c[0]=Math.cos(d)*e+l,c[1]=Math.sin(d)*e+m,q.min(h,c,h),q.max(t,c,t))},k});u("zrender/tool/curve",["require","./vector"],function(n){function k(a){return a>-f&&f>a}function q(a,d,h,b,e){var c=1-e;return c*c*(c*a+3*e*d)+e*e*(e*b+3*c*h)}function p(a,d,h,b){var e=1-b;return e*(e*a+2*b*d)+b*b*h}var g=n("./vector"),f=1E-4,c=Math.sqrt(3),l=1/3,m=g.create(),e=g.create(),b=g.create();return{cubicAt:q,cubicDerivativeAt:function(a,d,h,b,e){var c=1-e;return 3*(((d-a)*c+2*(h-d)*e)*c+(b-h)*e*e)},cubicRootAt:function(a,d,h,b,e,f){b=b+3*(d-h)-a;h=3*(h-2*d+a);var g=3*(d-a);a-=e;e=h*h-3*b*g;d=h*g-9*b*a;var m=g*g-3*h*a;a=0;if(k(e)&&k(d))k(h)?f[0]=0:(e=-g/h,0<=e&&1>=e&&(f[a++]=e));else if(g=d*d-4*e*m,k(g))d/=e,e=-h/b+d,d=-d/2,0<=e&&1>=e&&(f[a++]=e),0<=d&&1>=d&&(f[a++]=d);else if(0g?-Math.pow(-g,l):Math.pow(g,l),e=0>e?-Math.pow(-e,l):Math.pow(e,l),e=(-h-(g+e))/(3*b),0<=e&&1>=e&&(f[a++]=e);else{var g=Math.acos((2*e*h-3*b*d)/(2*Math.sqrt(e*e*e)))/3,m=Math.sqrt(e),p=Math.cos(g);e=(-h-2*m*p)/(3*b);d=(-h+m*(p+c*Math.sin(g)))/(3*b);b=(-h+m*(p-c*Math.sin(g)))/(3*b);0<=e&&1>=e&&(f[a++]=e);0<=d&&1>=d&&(f[a++]=d);0<=b&&1>=b&&(f[a++]=b)}return a},cubicExtrema:function(a,d,h,b,e){var c=6*h-12*d+6*a;h=9*d+3*b-3*a-9*h;d=3*d-3*a;a=0;if(k(h)){if(c>f||-f>c)d=-d/c,0<=d&&1>=d&&(e[a++]=d)}else d=c*c-4*h*d,k(d)?e[0]=-c/(2*h):0=d&&(e[a++]=d),0<=c&&1>=c&&(e[a++]=c));return a},cubicSubdivide:function(a,d,h,b,e,c){var f=(d-a)*e+a,g=(h-d)*e+d;h=(b-h)*e+h;d=(g-f)*e+f;g=(h-g)*e+g;e=(g-d)*e+d;c[0]=a;c[1]=f;c[2]=d;c[3]=e;c[4]=e;c[5]=g;c[6]=h;c[7]=b},cubicProjectPoint:function(a,d,h,c,l,k,x,p,n,E,L){var w,D=.005,v=1/0;m[0]=n;m[1]=E;for(E=0;1>E;E+=.05)e[0]=q(a,h,l,x,E),e[1]=q(d,c,k,p,E),n=g.distSquare(m,e),v>n&&(w=E,v=n);v=1/0;for(E=0;32>E&&!(f>D);E++){var G=w-D,C=w+D;e[0]=q(a,h,l,x,G);e[1]=q(d,c,k,p,G);n=g.distSquare(e,m);0<=G&&v>n?(w=G,v=n):(b[0]=q(a,h,l,x,C),b[1]=q(d,c,k,p,C),n=g.distSquare(b,m),1>=C&&v>n?(w=C,v=n):D*=.5)}return L&&(L[0]=q(a,h,l,x,w),L[1]=q(d,c,k,p,w)),Math.sqrt(v)},quadraticAt:p,quadraticDerivativeAt:function(a,d,h,b){return 2*((1-b)*(d-a)+b*(h-d))},quadraticRootAt:function(a,d,h,b,e){h=a-2*d+h;d=2*(d-a);b=a-b;a=0;if(k(h)){if(d>f||-f>d)b=-b/d,0<=b&&1>=b&&(e[a++]=b)}else if(b=d*d-4*h*b,k(b))b=-d/(2*h),0<=b&&1>=b&&(e[a++]=b);else if(0=b&&(e[a++]=b);0<=h&&1>=h&&(e[a++]=h)}return a},quadraticExtremum:function(a,d,h){h=a+h-2*d;return 0===h?.5:(a-d)/h},quadraticProjectPoint:function(a,d,h,c,l,k,x,n,F){var E,L=.005,w=1/0;m[0]=x;m[1]=n;for(n=0;1>n;n+=.05)e[0]=p(a,h,l,n),e[1]=p(d,c,k,n),x=g.distSquare(m,e),w>x&&(E=n,w=x);w=1/0;for(n=0;32>n&&!(f>L);n++){var D=E-L,v=E+L;e[0]=p(a,h,l,D);e[1]=p(d,c,k,D);x=g.distSquare(e,m);0<=D&&w>x?(E=D,w=x):(b[0]=p(a,h,l,v),b[1]=p(d,c,k,v),x=g.distSquare(b,m),1>=v&&w>x?(E=v,w=x):L*=.5)}return F&&(F[0]=p(a,h,l,E),F[1]=p(d,c,k,E)),Math.sqrt(w)}}});u("echarts/util/shape/Chain","require zrender/shape/Base ./Icon zrender/shape/util/dashedLineTo zrender/tool/util zrender/tool/matrix".split(" "),function(n){function k(c){q.call(this,c)}var q=n("zrender/shape/Base"),p=n("./Icon"),g=n("zrender/shape/util/dashedLineTo"),f=n("zrender/tool/util"),c=n("zrender/tool/matrix");return k.prototype={type:"chain",brush:function(c,f){var e=this.style;f&&(e=this.getHighlightStyle(e,this.highlightStyle||{}));c.save();this.setContext(c,e);this.setTransform(c);c.save();c.beginPath();this.buildLinePath(c,e);c.stroke();c.restore();this.brushSymbol(c,e);c.restore()},buildLinePath:function(c,f){var e=f.x,b=f.y+5,a=f.width,d=f.height/2-10;(c.moveTo(e,b),c.lineTo(e,b+d),c.moveTo(e+a,b),c.lineTo(e+a,b+d),c.moveTo(e,b+d/2),f.lineType&&"solid"!=f.lineType)?"dashed"!=f.lineType&&"dotted"!=f.lineType||g(c,e,b+d/2,e+a,b+d/2,(f.lineWidth||1)*("dashed"==f.lineType?5:1)):c.lineTo(e+a,b+d/2)},brushSymbol:function(c,f){var e=f.y+f.height/4;c.save();for(var b,a=f.chainPoint,d=0,h=a.length;h>d;d++){if(b=a[d],"none"!=b.symbol){c.beginPath();var g=b.symbolSize;p.prototype.buildPath(c,{iconType:b.symbol,x:b.x-g,y:e-g,width:2*g,height:2*g,n:b.n});c.fillStyle=b.isEmpty?"#fff":f.strokeColor;c.closePath();c.fill();c.stroke()}b.showLabel&&(c.font=b.textFont,c.fillStyle=b.textColor,c.textAlign=b.textAlign,c.textBaseline=b.textBaseline,b.rotation?(c.save(),this._updateTextTransform(c,b.rotation),c.fillText(b.name,b.textX,b.textY),c.restore()):c.fillText(b.name,b.textX,b.textY))}c.restore()},_updateTextTransform:function(f,g){var e=c.create();if(c.identity(e),0!==g[0]){var b=g[1]||0,a=g[2]||0;(b||a)&&c.translate(e,e,[-b,-a]);c.rotate(e,e,g[0]);(b||a)&&c.translate(e,e,[b,a])}f.transform.apply(f,e)},isCover:function(c,f){var e=this.style;return c>=e.x&&c<=e.x+e.width&&f>=e.y&&f<=e.y+e.height?!0:!1}},f.inherits(k,q),k});u("echarts/chart/line","require ./base zrender/shape/Polyline ../util/shape/Icon ../util/shape/HalfSmoothPolygon ../component/axis ../component/grid ../component/dataZoom ../config ../util/ecData zrender/tool/util zrender/tool/color ../chart".split(" "),function(n){function k(b,a,d,h,e){q.call(this,b,a,d,h,e);this.refresh(h)}var q=n("./base"),p=n("zrender/shape/Polyline"),g=n("../util/shape/Icon"),f=n("../util/shape/HalfSmoothPolygon");n("../component/axis");n("../component/grid");n("../component/dataZoom");var c=n("../config");c.line={zlevel:0,z:2,clickable:!0,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{label:{show:!1},lineStyle:{width:1.5,type:"solid",shadowColor:"rgba(0,0,0,0)",shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0}},emphasis:{label:{show:!1}}},symbolSize:2,showAllSymbol:!1};var l=n("../util/ecData"),m=n("zrender/tool/util"),e=n("zrender/tool/color");return k.prototype={type:c.CHART_TYPE_LINE,_buildShape:function(){this.finalPLMap={};this._buildPosition()},_buildHorizontal:function(b,a,d,h){for(var e,c,f,g,l,m,k,p,n,D=this.series,v=d[0][0],q=D[v],C=this.component.xAxis.getAxis(q.xAxisIndex||0),z={},B=0;a>B&&null!=C.getNameByIndex(B);B++){c=C.getCoordByIndex(B);for(var A=0,H=d.length;H>A;A++){e=this.component.yAxis.getAxis(D[d[A][0]].yAxisIndex||0);l=g=k=m=e.getCoord(0);for(var u=0,K=d[A].length;K>u;u++)v=d[A][u],q=D[v],p=q.data[B],n=this.getDataFromOption(p,"-"),z[v]=z[v]||[],h[v]=h[v]||{min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY,sum:0,counter:0,average:0},"-"!==n?(0<=n?(g-=0n&&(m+=0n&&(h[v].min=n,h[v].minY=f,h[v].minX=c),h[v].maxA;A++)for(u=0,K=d[A].length;K>u;u++)v=d[A][u],q=D[v],p=q.data[B],n=this.getDataFromOption(p,"-"),"-"==n&&this.deepQuery([p,q,this.option],"calculable")&&(I=this.deepQuery([p,q],"symbolSize"),g+=2*I+5,f=g,this.shapeList.push(this._getCalculableItem(v,B,C.getNameByIndex(B),c,f,"horizontal")))}for(var M in z)0B&&null!=C.getNameByIndex(B);B++){f=C.getCoordByIndex(B);for(var A=0,H=d.length;H>A;A++){e=this.component.xAxis.getAxis(D[d[A][0]].xAxisIndex||0);l=g=k=m=e.getCoord(0);for(var u=0,K=d[A].length;K>u;u++)v=d[A][u],q=D[v],n=q.data[B],p=this.getDataFromOption(n,"-"),z[v]=z[v]||[],h[v]=h[v]||{min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY,sum:0,counter:0,average:0},"-"!==p?(0<=p?(g+=0p&&(m-=0p&&(h[v].min=p,h[v].minX=c,h[v].minY=f),h[v].maxA;A++)for(u=0,K=d[A].length;K>u;u++)v=d[A][u],q=D[v],n=q.data[B],p=this.getDataFromOption(n,"-"),"-"==p&&this.deepQuery([n,q,this.option],"calculable")&&(I=this.deepQuery([n,q],"symbolSize"),g-=2*I+5,c=g,this.shapeList.push(this._getCalculableItem(v,B,C.getNameByIndex(B),c,f,"vertical")))}for(var M in z)0f;f++)for(var l=0,m=d[f].length;m>l;l++){var k=d[f][l],p=a[k];e=this.component.xAxis.getAxis(p.xAxisIndex||0);var n=this.component.yAxis.getAxis(p.yAxisIndex||0),D=n.getCoord(0);c[k]=c[k]||[];h[k]=h[k]||{min0:Number.POSITIVE_INFINITY,min1:Number.POSITIVE_INFINITY,max0:Number.NEGATIVE_INFINITY,max1:Number.NEGATIVE_INFINITY,sum0:0,sum1:0,counter0:0,counter1:0,average0:0,average1:0};for(var v=0,q=p.data.length;q>v;v++){var C=this.getDataFromOption(p.data[v],"-");if(C instanceof Array){var z=e.getCoord(C[0]),B=n.getCoord(C[1]);c[k].push([z,B,v,C[0],z,D]);h[k].min0>C[0]&&(h[k].min0=C[0],h[k].minY0=B,h[k].minX0=z);h[k].max0C[1]&&(h[k].min1=C[1],h[k].minY1=B,h[k].minX1=z);h[k].max1A;A++){var u=E[A];if("other"!=h&&this._isLarge(g,u))u=this._getLargePointList(g,u);else for(var K=0,I=u.length;I>K;K++)c=F.data[u[K][2]],(this.deepQuery([c,F,this.option],"calculable")||this.deepQuery([c,F],"showAllSymbol")||"categoryAxis"===d.type&&d.isMainAxis(u[K][2])&&"none"!=this.deepQuery([c,F],"symbol"))&&this.shapeList.push(this._getSymbol(J,u[K][2],u[K][3],u[K][0],u[K][1],g));c=new p({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{miterLimit:D,pointList:u,strokeColor:G||C||w,lineWidth:D,lineType:v,smooth:this._getSmooth(F.smooth),smoothConstraint:q,shadowColor:this.query(F,"itemStyle.normal.lineStyle.shadowColor"),shadowBlur:this.query(F,"itemStyle.normal.lineStyle.shadowBlur"),shadowOffsetX:this.query(F,"itemStyle.normal.lineStyle.shadowOffsetX"),shadowOffsetY:this.query(F,"itemStyle.normal.lineStyle.shadowOffsetY")},hoverable:!1,_main:!0,_seriesIndex:J,_orient:g});if(l.pack(c,k[J],J,0,A,k[J].name),this.shapeList.push(c),z)u=new f({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{miterLimit:D,pointList:m.clone(u).concat([[u[u.length-1][4],u[u.length-1][5]],[u[0][4],u[0][5]]]),brushType:"fill",smooth:this._getSmooth(F.smooth),smoothConstraint:q,color:B?B:e.alpha(w,.5)},highlightStyle:{brushType:"fill"},hoverable:!1,_main:!0,_seriesIndex:J,_orient:g}),l.pack(u,k[J],J,0,A,k[J].name),this.shapeList.push(u)}}},_getBbox:function(b,a){var d=this.component.grid.getBbox(),h=this.xMarkMap[b];return null!=h.minX0?[[Math.min(h.minX0,h.maxX0,h.minX1,h.maxX1),Math.min(h.minY0,h.maxY0,h.minY1,h.maxY1)],[Math.max(h.minX0,h.maxX0,h.minX1,h.maxX1),Math.max(h.minY0,h.maxY0,h.minY1,h.maxY1)]]:("horizontal"===a?(d[0][1]=Math.min(h.minY,h.maxY),d[1][1]=Math.max(h.minY,h.maxY)):(d[0][0]=Math.min(h.minX,h.maxX),d[1][0]=Math.max(h.minX,h.maxX)),d)},_isLarge:function(b,a){return 2>a.length?!1:"horizontal"===b?.5>Math.abs(a[0][0]-a[1][0]):.5>Math.abs(a[0][1]-a[1][1])},_getLargePointList:function(b,a){var d;d="horizontal"===b?this.component.grid.getWidth():this.component.grid.getHeight();for(var h=a.length,e=[],c=0;d>c;c++)e[c]=a[Math.floor(h/d*c)];return e},_getSmooth:function(b){return b?.3:0},_getCalculableItem:function(b,a,d,h,e,f){var g=this.series[b].calculableHolderColor||this.ecTheme.calculableHolderColor||c.calculableHolderColor;b=this._getSymbol(b,a,d,h,e,f);return b.style.color=g,b.style.strokeColor=g,b.rotation=[0,0],b.hoverable=!1,b.draggable=!1,b.style.text=void 0,b},_getSymbol:function(b,a,d,h,e,c){var f=this.series[b],g=f.data[a];b=this.getSymbolShape(f,b,g,a,d,h,e,this._sIndex2ShapeMap[b],this._sIndex2ColorMap[b],"#fff","vertical"===c?"horizontal":"vertical");return b.zlevel=this.getZlevelBase(),b.z=this.getZBase()+1,this.deepQuery([g,f,this.option],"calculable")&&(this.setCalculable(b),b.draggable=!0),b},getMarkCoord:function(b,a){var d=this.series[b],h=this.xMarkMap[b],e=this.component.xAxis.getAxis(d.xAxisIndex),d=this.component.yAxis.getAxis(d.yAxisIndex);return!a.type||"max"!==a.type&&"min"!==a.type&&"average"!==a.type?["string"!=typeof a.xAxis&&e.getCoordByIndex?e.getCoordByIndex(a.xAxis||0):e.getCoord(a.xAxis||0),"string"!=typeof a.yAxis&&d.getCoordByIndex?d.getCoordByIndex(a.yAxis||0):d.getCoord(a.yAxis||0)]:(e=null!=a.valueIndex?a.valueIndex:null!=h.maxX0?"1":"",[h[a.type+"X"+e],h[a.type+"Y"+e],h[a.type+"Line"+e],h[a.type+e]])},refresh:function(b){b&&(this.option=b,this.series=b.series);this.backupShapeList();this._buildShape()},ontooltipHover:function(b,a){for(var d,h,e=b.seriesIndex,c=b.dataIndex,f=e.length;f--;)if(d=this.finalPLMap[e[f]])for(var g=0,l=d.length;l>g;g++){h=d[g];for(var m=0,k=h.length;k>m;m++)c===h[m][2]&&a.push(this._getSymbol(e[f],h[m][2],h[m][3],h[m][0],h[m][1],"horizontal"))}},addDataAnimation:function(b){for(var a=this.series,d={},h=0,e=b.length;e>h;h++)d[b[h][0]]=b[h];for(var c,f,g,l,m,h=this.shapeList.length-1;0<=h;h--)if(g=this.shapeList[h]._seriesIndex,d[g]&&!d[g][3]){if(this.shapeList[h]._main&&1g.length))if(c.smooth){var m=p(g.slice(0,-2),c.smooth,!1,c.smoothConstraint);f.moveTo(g[0][0],g[0][1]);for(var e,b,a,d=g.length,h=0;d-3>h;h++)e=m[2*h],b=m[2*h+1],a=g[h+1],f.bezierCurveTo(e[0],e[1],b[0],b[1],a[0],a[1]);f.lineTo(g[d-2][0],g[d-2][1]);f.lineTo(g[d-1][0],g[d-1][1]);f.lineTo(g[0][0],g[0][1])}else n("zrender/shape/Polygon").prototype.buildPath(f,c)}},g.inherits(k,q),k});u("echarts/component/axis","require ./base zrender/shape/Line ../config ../util/ecData zrender/tool/util zrender/tool/color ./categoryAxis ./valueAxis ../component".split(" "),function(n){function k(c,e,b,a,d,h){q.call(this,c,e,b,a,d);this.axisType=h;this._axisList=[];this.refresh(a)}var q=n("./base"),p=n("zrender/shape/Line"),g=n("../config"),f=n("../util/ecData"),c=n("zrender/tool/util"),l=n("zrender/tool/color");return k.prototype={type:g.COMPONENT_TYPE_AXIS,axisBase:{_buildAxisLine:function(){var c=this.option.axisLine.lineStyle.width,e=c/2,b={_axisShape:"axisLine",zlevel:this.getZlevelBase(),z:this.getZBase()+3,hoverable:!1},a=this.grid;switch(this.option.position){case "left":b.style={xStart:a.getX()-e,yStart:a.getYend(),xEnd:a.getX()-e,yEnd:a.getY(),lineCap:"round"};break;case "right":b.style={xStart:a.getXend()+e,yStart:a.getYend(),xEnd:a.getXend()+e,yEnd:a.getY(),lineCap:"round"};break;case "bottom":b.style={xStart:a.getX(),yStart:a.getYend()+e,xEnd:a.getXend(),yEnd:a.getYend()+e,lineCap:"round"};break;case "top":b.style={xStart:a.getX(),yStart:a.getY()-e,xEnd:a.getXend(),yEnd:a.getY()-e,lineCap:"round"}}e=b.style;""!==this.option.name&&(e.text=this.option.name,e.textPosition=this.option.nameLocation,e.textFont=this.getFont(this.option.nameTextStyle),this.option.nameTextStyle.align&&(e.textAlign=this.option.nameTextStyle.align),this.option.nameTextStyle.baseline&&(e.textBaseline=this.option.nameTextStyle.baseline),this.option.nameTextStyle.color&&(e.textColor=this.option.nameTextStyle.color));e.strokeColor=this.option.axisLine.lineStyle.color;e.lineWidth=c;this.isHorizontal()?e.yStart=e.yEnd=this.subPixelOptimize(e.yEnd,c):e.xStart=e.xEnd=this.subPixelOptimize(e.xEnd,c);e.lineType=this.option.axisLine.lineStyle.type;b=new p(b);this.shapeList.push(b)},_axisLabelClickable:function(c,e){return c?(f.pack(e,void 0,-1,void 0,-1,e.style.text),e.hoverable=!0,e.clickable=!0,e.highlightStyle={color:l.lift(e.style.color,1),brushType:"fill"},e):e},refixAxisShape:function(c,e){if(this.option.axisLine.onZero){var b;if(this.isHorizontal()&&null!=e)for(var a=0,d=this.shapeList.length;d>a;a++)"axisLine"===this.shapeList[a]._axisShape?(this.shapeList[a].style.yStart=this.shapeList[a].style.yEnd=this.subPixelOptimize(e,this.shapeList[a].stylelineWidth),this.zr.modShape(this.shapeList[a].id)):"axisTick"===this.shapeList[a]._axisShape&&(b=this.shapeList[a].style.yEnd-this.shapeList[a].style.yStart,this.shapeList[a].style.yStart=e-b,this.shapeList[a].style.yEnd=e,this.zr.modShape(this.shapeList[a].id));if(!this.isHorizontal()&&null!=c)for(a=0,d=this.shapeList.length;d>a;a++)"axisLine"===this.shapeList[a]._axisShape?(this.shapeList[a].style.xStart=this.shapeList[a].style.xEnd=this.subPixelOptimize(c,this.shapeList[a].stylelineWidth),this.zr.modShape(this.shapeList[a].id)):"axisTick"===this.shapeList[a]._axisShape&&(b=this.shapeList[a].style.xEnd-this.shapeList[a].style.xStart,this.shapeList[a].style.xStart=c,this.shapeList[a].style.xEnd=c+b,this.zr.modShape(this.shapeList[a].id))}},getPosition:function(){return this.option.position},isHorizontal:function(){return"bottom"===this.option.position||"top"===this.option.position}},reformOption:function(c){if(!c||c instanceof Array&&0===c.length?c=[{type:g.COMPONENT_TYPE_AXIS_VALUE}]:c instanceof Array||(c=[c]),2e;e++)c[e].type=c[e].type||"category",c[e].xAxisIndex=e,c[e].yAxisIndex=-1}else for((!c[0].position||"left"!=c[0].position&&"right"!=c[0].position)&&(c[0].position="left"),1e;e++)c[e].type=c[e].type||"value",c[e].xAxisIndex=-1,c[e].yAxisIndex=e;return c},refresh:function(c){var e;c&&(this.option=c,"xAxis"===this.axisType?(this.option.xAxis=this.reformOption(c.xAxis),e=this.option.xAxis):(this.option.yAxis=this.reformOption(c.yAxis),e=this.option.yAxis),this.series=c.series);for(var b=n("./categoryAxis"),a=n("./valueAxis"),d=Math.max(e&&e.length||0,this._axisList.length),h=0;d>h;h++)!this._axisList[h]||!c||e[h]&&this._axisList[h].type==e[h].type||(this._axisList[h].dispose&&this._axisList[h].dispose(),this._axisList[h]=!1),this._axisList[h]?this._axisList[h].refresh&&this._axisList[h].refresh(e?e[h]:!1,this.series):e&&e[h]&&(this._axisList[h]="category"===e[h].type?new b(this.ecTheme,this.messageCenter,this.zr,e[h],this.myChart,this.axisBase):new a(this.ecTheme,this.messageCenter,this.zr,e[h],this.myChart,this.axisBase,this.series))},getAxis:function(c){return this._axisList[c]},clear:function(){for(var c=0,e=this._axisList.length;e>c;c++)this._axisList[c].dispose&&this._axisList[c].dispose();this._axisList=[]}},c.inherits(k,q),n("../component").define("axis",k),k});u("echarts/component/grid","require ./base zrender/shape/Rectangle ../config zrender/tool/util ../component".split(" "),function(n){function k(c,f,g,e,b){q.call(this,c,f,g,e,b);this.refresh(e)}var q=n("./base"),p=n("zrender/shape/Rectangle"),g=n("../config");g.grid={zlevel:0,z:0,x:12,y:60,x2:12,y2:60,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc"};var f=n("zrender/tool/util");return k.prototype={type:g.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(c){for(var f,m,e=c.xAxis._axisList.concat(c.yAxis?c.yAxis._axisList:[]),b=e.length;b--;)c=e[b],c.type==g.COMPONENT_TYPE_AXIS_VALUE&&0>c._min&&0<=c._max&&(c.isHorizontal()?f=c.getCoord(0):m=c.getCoord(0));if("undefined"!=typeof f||"undefined"!=typeof m)for(b=e.length;b--;)e[b].refixAxisShape(f,m)},refresh:function(c){if(c||this._zrWidth!=this.zr.getWidth()||this._zrHeight!=this.zr.getHeight()){this.clear();this.option=c||this.option;this.option.grid=this.reformOption(this.option.grid);c=this.option.grid;this._zrWidth=this.zr.getWidth();this._zrHeight=this.zr.getHeight();this._x=this.parsePercent(c.x,this._zrWidth);this._y=this.parsePercent(c.y,this._zrHeight);var f=this.parsePercent(c.x2,this._zrWidth),g=this.parsePercent(c.y2,this._zrHeight);this._width="undefined"==typeof c.width?this._zrWidth-this._x-f:this.parsePercent(c.width,this._zrWidth);this._width=0>=this._width?10:this._width;this._height="undefined"==typeof c.height?this._zrHeight-this._y-g:this.parsePercent(c.height,this._zrHeight);this._height=0>=this._height?10:this._height;this._x=this.subPixelOptimize(this._x,c.borderWidth);this._y=this.subPixelOptimize(this._y,c.borderWidth);this.shapeList.push(new p({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._x,y:this._y,width:this._width,height:this._height,brushType:0e;e++)this.zr.addShape(this.shapeList[e]);this._syncFrameShape()},_getLocation:function(){var e,b,a,d,h=this.component.grid;return"horizontal"==this.zoomOption.orient?(a=this.zoomOption.width||h.getWidth(),d=this.zoomOption.height||this._fillerSize,e=null!=this.zoomOption.x?this.zoomOption.x:h.getX(),b=null!=this.zoomOption.y?this.zoomOption.y:this.zr.getHeight()-d-2):(a=this.zoomOption.width||this._fillerSize,d=this.zoomOption.height||h.getHeight(),e=null!=this.zoomOption.x?this.zoomOption.x:2,b=null!=this.zoomOption.y?this.zoomOption.y:h.getY()),{x:e,y:b,width:a,height:d}},_getZoom:function(){var e=this.option.series,b=this.option.xAxis;!b||b instanceof Array||(b=[b],this.option.xAxis=b);var a=this.option.yAxis;!a||a instanceof Array||(a=[a],this.option.yAxis=a);var d,h=[],f=this.zoomOption.xAxisIndex;if(b&&null==f){d=[];for(var g=0,l=b.length;l>g;g++)"category"!=b[g].type&&null!=b[g].type||d.push(g)}else d=f instanceof Array?f:null!=f?[f]:[];if(f=this.zoomOption.yAxisIndex,a&&null==f)for(b=[],g=0,l=a.length;l>g;g++)"category"==a[g].type&&b.push(g);else b=f instanceof Array?f:null!=f?[f]:[];for(var m,g=0,l=e.length;l>g;g++)if(m=e[g],m.type==c.CHART_TYPE_LINE||m.type==c.CHART_TYPE_BAR||m.type==c.CHART_TYPE_SCATTER||m.type==c.CHART_TYPE_K){a=0;for(f=d.length;f>a;a++)if(d[a]==(m.xAxisIndex||0)){h.push(g);break}a=0;for(f=b.length;f>a;a++)if(b[a]==(m.yAxisIndex||0)){h.push(g);break}null==this.zoomOption.xAxisIndex&&null==this.zoomOption.yAxisIndex&&m.data&&this.getDataFromOption(m.data[0])instanceof Array&&(m.type==c.CHART_TYPE_SCATTER||m.type==c.CHART_TYPE_LINE||m.type==c.CHART_TYPE_BAR)&&h.push(g)}e=null!=this._zoom.start?this._zoom.start:null!=this.zoomOption.start?this.zoomOption.start:0;g=null!=this._zoom.end?this._zoom.end:null!=this.zoomOption.end?this.zoomOption.end:100;e>g&&(e+=g,g=e-g,e-=g);return{start:e,end:g,start2:0,end2:100,size:Math.round((g-e)/100*("horizontal"==this.zoomOption.orient?this._location.width:this._location.height)),xAxisIndex:d,yAxisIndex:b,seriesIndex:h,scatterMap:this._zoom.scatterMap||{}}},_backupData:function(){this._originalData={xAxis:{},yAxis:{},series:{}};for(var e=this.option.xAxis,b=this._zoom.xAxisIndex,a=0,d=b.length;d>a;a++)this._originalData.xAxis[b[a]]=e[b[a]].data;e=this.option.yAxis;b=this._zoom.yAxisIndex;a=0;for(d=b.length;d>a;a++)this._originalData.yAxis[b[a]]=e[b[a]].data;for(var b=this.option.series,h=this._zoom.seriesIndex,a=0,d=h.length;d>a;a++)e=b[h[a]],(this._originalData.series[h[a]]=e.data)&&this.getDataFromOption(e.data[0])instanceof Array&&(e.type==c.CHART_TYPE_SCATTER||e.type==c.CHART_TYPE_LINE||e.type==c.CHART_TYPE_BAR)&&(this._backupScale(),this._calculScatterMap(h[a]))},_calculScatterMap:function(e){this._zoom.scatterMap=this._zoom.scatterMap||{};this._zoom.scatterMap[e]=this._zoom.scatterMap[e]||{};var b=n("../component").get("axis"),a=m.clone(this.option.xAxis);"category"==a[0].type&&(a[0].type="value");a[1]&&"category"==a[1].type&&(a[1].type="value");var a=new b(this.ecTheme,null,!1,{xAxis:a,series:this.option.series},this,"xAxis"),d=this.option.series[e].xAxisIndex||0;this._zoom.scatterMap[e].x=a.getAxis(d).getExtremum();a.dispose();a=m.clone(this.option.yAxis);"category"==a[0].type&&(a[0].type="value");a[1]&&"category"==a[1].type&&(a[1].type="value");a=new b(this.ecTheme,null,!1,{yAxis:a,series:this.option.series},this,"yAxis");d=this.option.series[e].yAxisIndex||0;this._zoom.scatterMap[e].y=a.getAxis(d).getExtremum();a.dispose()},_buildBackground:function(){var e=this._location.width,b=this._location.height;this.shapeList.push(new p({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._location.x,y:this._location.y,width:e,height:b,color:this.zoomOption.backgroundColor}}));for(var a=0,d=this._originalData.xAxis,h=this._zoom.xAxisIndex,f=0,l=h.length;l>f;f++)a=Math.max(a,d[h[f]].length);d=this._originalData.yAxis;h=this._zoom.yAxisIndex;f=0;for(l=h.length;l>f;f++)a=Math.max(a,d[h[f]].length);for(var h=this._zoom.seriesIndex[0],m=this._originalData.series[h],k=Number.MIN_VALUE,n=Number.MAX_VALUE,f=0,l=m.length;l>f;f++)d=this.getDataFromOption(m[f],0),this.option.series[h].type==c.CHART_TYPE_K&&(d=d[1]),isNaN(d)&&(d=0),k=Math.max(k,d),n=Math.min(n,d);var k=k-n,F=[],E=e/(a-(1E?w=Math.floor(3*a/e):"vertical"==this.zoomOption.orient&&1>q&&(w=Math.floor(3*a/b));f=0;for(l=a;l>f;f+=w)d=this.getDataFromOption(m[f],0),this.option.series[h].type==c.CHART_TYPE_K&&(d=d[1]),isNaN(d)&&(d=0),F.push("horizontal"==this.zoomOption.orient?[this._location.x+E*f,this._location.y+b-1-Math.round((d-n)/k*(b-10))]:[this._location.x+1+Math.round((d-n)/k*(e-10)),this._location.y+q*(l-f-1)]);"horizontal"==this.zoomOption.orient?(F.push([this._location.x+e,this._location.y+b]),F.push([this._location.x,this._location.y+b])):(F.push([this._location.x,this._location.y]),F.push([this._location.x,this._location.y+b]));this.shapeList.push(new g({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{pointList:F,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 p(this._fillerShae);this.shapeList.push(this._fillerShae)},_buildHandle:function(){var e=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:"\x3d",textPosition:"inside"},highlightStyle:{text:e.start,brushType:"fill",textPosition:"left"},ondrift:this._ondrift,ondragend:this._ondragend};"horizontal"==this.zoomOption.orient?(this._startShape.style.height=this._location.height,this._endShape=m.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=e.end,this._endShape.highlightStyle.textPosition="right"):(this._startShape.style.width=this._location.width,this._endShape=m.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=e.end,this._endShape.highlightStyle.textPosition="top");this._startShape=new f(this._startShape);this._endShape=new f(this._endShape);this.shapeList.push(this._startShape);this.shapeList.push(this._endShape)},_buildFrame:function(){var e=this.subPixelOptimize(this._location.x,1),b=this.subPixelOptimize(this._location.y,1);this._startFrameShape={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:e,y:b,width:this._location.width-(e>this._location.x?1:0),height:this._location.height-(b>this._location.y?1:0),lineWidth:1,brushType:"stroke",strokeColor:this.zoomOption.handleColor}};this._endFrameShape=m.clone(this._startFrameShape);this._startFrameShape=new p(this._startFrameShape);this._endFrameShape=new p(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 e,b;"horizontal"==this.zoomOption.orient?(e=this._startShape.style.x,b=this._endShape.style.x,this._fillerShae.style.x=Math.min(e,b)+this._handleSize,this._fillerShae.style.width=Math.abs(e-b)-this._handleSize,this._zoom.start=(Math.min(e,b)-this._location.x)/this._location.width*100,this._zoom.end=(Math.max(e,b)+this._handleSize-this._location.x)/this._location.width*100):(e=this._startShape.style.y,b=this._endShape.style.y,this._fillerShae.style.y=Math.min(e,b)+this._handleSize,this._fillerShae.style.height=Math.abs(e-b)-this._handleSize,this._zoom.start=(this._location.y+this._location.height-Math.max(e,b))/this._location.height*100,this._zoom.end=(this._location.y+this._location.height-Math.min(e,b)-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(e){var b,a,d,h,f,g;for(g in this._originalData){b=this._originalData[g];for(var l in b)f=b[l],null!=f&&(h=f.length,a=Math.floor(this._zoom.start/100*h),d=Math.ceil(this._zoom.end/100*h),this.getDataFromOption(f[0])instanceof Array&&this.option[g][l].type!=c.CHART_TYPE_K?(this._setScale(),this.option[g][l].data=this._synScatterData(l,f)):this.option[g][l].data=f.slice(a,d))}this._isSilence||!this.zoomOption.realtime&&!e||this.messageCenter.dispatch(c.EVENT.DATA_ZOOM,null,{zoom:this._zoom},this.myChart)},_synScatterData:function(e,b){if(0===this._zoom.start&&100==this._zoom.end&&0===this._zoom.start2&&100==this._zoom.end2)return b;var a,d,h,c,f,g=[],l=this._zoom.scatterMap[e];"horizontal"==this.zoomOption.orient?(a=l.x.max-l.x.min,d=this._zoom.start/100*a+l.x.min,h=this._zoom.end/100*a+l.x.min,a=l.y.max-l.y.min,c=this._zoom.start2/100*a+l.y.min,f=this._zoom.end2/100*a+l.y.min):(a=l.x.max-l.x.min,d=this._zoom.start2/100*a+l.x.min,h=this._zoom.end2/100*a+l.x.min,a=l.y.max-l.y.min,c=this._zoom.start/100*a+l.y.min,f=this._zoom.end/100*a+l.y.min);for(var l=0,m=b.length;m>l;l++)a=b[l].value||b[l],a[0]>=d&&a[0]<=h&&a[1]>=c&&a[1]<=f&&g.push(b[l]);return g},_setScale:function(){var e=0!==this._zoom.start||100!==this._zoom.end||0!==this._zoom.start2||100!==this._zoom.end2,b={xAxis:this.option.xAxis,yAxis:this.option.yAxis},a;for(a in b)for(var d=0,h=b[a].length;h>d;d++)b[a][d].scale=e||b[a][d]._scale},_backupScale:function(){var e={xAxis:this.option.xAxis,yAxis:this.option.yAxis},b;for(b in e)for(var a=0,d=e[b].length;d>a;a++)e[b][a]._scale=e[b][a].scale},_getDetail:function(){var e="horizontal"==this.zoomOption.orient?"xAxis":"yAxis",b=this._originalData[e],a;for(a in b){var d=b[a];if(null!=d)return b=d.length,e=Math.floor(this._zoom.start/100*b),b=Math.ceil(this._zoom.end/100*b),b-=0=this._location.x+this._location.width?e.style.x=this._location.x+this._location.width-e.style.width-d:e.style.x+=b:e.style.y+a-d<=this._location.y?e.style.y=this._location.y+d:e.style.y+a+e.style.height+d>=this._location.y+this._location.height?e.style.y=this._location.y+this._location.height-e.style.height-d:e.style.y+=a,"filler"==e._type?this._syncHandleShape():this._syncFillerShape(),this.zoomOption.realtime&&this._syncData(),this.zoomOption.showDetail)e=this._getDetail(),this._startShape.style.text=this._startShape.highlightStyle.text=e.start,this._endShape.style.text=this._endShape.highlightStyle.text=e.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="\x3d",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(e,b){this.isDragend&&e.target&&(!this.zoomOption.realtime&&this._syncData(),b.dragOut=!0,b.dragIn=!0,this._isSilence||this.zoomOption.realtime||this.messageCenter.dispatch(c.EVENT.DATA_ZOOM,null,{zoom:this._zoom},this.myChart),b.needRefresh=!1,this.isDragend=!1)},ondataZoom:function(e,b){b.needRefresh=!0},absoluteZoom:function(e){this._zoom.start=e.start;this._zoom.end=e.end;this._zoom.start2=e.start2;this._zoom.end2=e.end2;this._syncShape();this._syncData(!0)},rectZoom:function(e){if(!e)return this._zoom.start=this._zoom.start2=0,this._zoom.end=this._zoom.end2=100,this._syncShape(),this._syncData(!0),this._zoom;var b=this.component.grid.getArea(),a=e.x,d=e.y,h=e.width,c=e.height;if(0>h&&(a+=h,h=-h),0>c&&(d+=c,c=-c),a>b.x+b.width||d>b.y+b.height)return!1;ab.x+b.width&&(h=b.x+b.width-a);d+c>b.y+b.height&&(c=b.y+b.height-d);var f;e=(a-b.x)/b.width;a=1-(a+h-b.x)/b.width;h=1-(d+c-b.y)/b.height;b=(d-b.y)/b.height;return"horizontal"==this.zoomOption.orient?(f=this._zoom.end-this._zoom.start,this._zoom.start+=f*e,this._zoom.end-=f*a,f=this._zoom.end2-this._zoom.start2,this._zoom.start2+=f*h,this._zoom.end2-=f*b):(f=this._zoom.end-this._zoom.start,this._zoom.start+=f*h,this._zoom.end-=f*b,f=this._zoom.end2-this._zoom.start2,this._zoom.start2+=f*e,this._zoom.end2-=f*a),this._syncShape(),this._syncData(!0),this._zoom},syncBackupData:function(e){for(var b,a=this._originalData.series,d=e.series,h=0,c=d.length;c>h;h++){b=d[h].data||d[h].eventList;e=a[h]?Math.floor(this._zoom.start/100*a[h].length):0;for(var f=0,g=b.length;g>f;f++)a[h]&&(a[h][f+e]=b[f])}},syncOption:function(e){this.silence(!0);this.option=e;this.option.dataZoom=this.reformOption(this.option.dataZoom);this.zoomOption=this.option.dataZoom;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(e){this._isSilence=e},getRealDataIndex:function(e,b){if(!this._originalData||0===this._zoom.start&&100==this._zoom.end)return b;var a=this._originalData.series;return a[e]?Math.floor(this._zoom.start/100*a[e].length)+b:-1},resize:function(){this.clear();this._location=this._getLocation();this._zoom=this._getZoom();this.option.dataZoom.show&&this._buildShape()}},m.inherits(k,q),n("../component").define("dataZoom",k),k});u("echarts/component/categoryAxis","require ./base zrender/shape/Text zrender/shape/Line zrender/shape/Rectangle ../config zrender/tool/util zrender/tool/area ../component".split(" "),function(n){function k(e,b,a,d,h,c){if(1>d.data.length)return void console.error("option.data.length \x3c 1.");q.call(this,e,b,a,d,h);this.grid=this.component.grid;for(var f in c)this[f]=c[f];this.refresh(d)}var q=n("./base"),p=n("zrender/shape/Text"),g=n("zrender/shape/Line"),f=n("zrender/shape/Rectangle"),c=n("../config");c.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:!1,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 l=n("zrender/tool/util"),m=n("zrender/tool/area");return k.prototype={type:c.COMPONENT_TYPE_AXIS_CATEGORY,_getReformedLabel:function(e){var b=this.getDataFromOption(this.option.data[e]);e=this.option.data[e].formatter||this.option.axisLabel.formatter;return e&&("function"==typeof e?b=e.call(this.myChart,b):"string"==typeof e&&(b=e.replace("{value}",b))),b},_getInterval:function(){var e=this.option.axisLabel.interval;if("auto"==e){var b=this.option.axisLabel.textStyle.fontSize,a=this.option.data,d=this.option.data.length;if(this.isHorizontal())if(3k?1:k,e=Math.floor(15/f);!g&&d>e;){e+=k;g=!0;h=Math.floor(f*e);for(var n=Math.floor((d-1)/e)*e;0<=n;n-=e){if(0!==this.option.axisLabel.rotate)c=b;else if(a[n].textStyle)c=m.getTextWidth(this._getReformedLabel(n),this.getFont(l.merge(a[n].textStyle,this.option.axisLabel.textStyle)));else{c=this._getReformedLabel(n)+"";var p=(c.match(/\w/g)||"").length;c=p*b*2/3+(c.length-p)*b}if(c>h){g=!1;break}}}else e=1;else if(3f*e-6&&d>e;)e++;else e=1}else e="function"==typeof e?1:e-0+1;return e},_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 e=0,b=this.shapeList.length;b>e;e++)this.zr.addShape(this.shapeList[e])}},_buildAxisTick:function(){var e,b=this.option.data,a=this.option.data.length,d=this.option.axisTick,h=d.length,c=d.lineStyle.color,f=d.lineStyle.width,l="function"==typeof d.interval?d.interval:"auto"==d.interval&&"function"==typeof this.option.axisLabel.interval?this.option.axisLabel.interval:!1,m=l?1:"auto"==d.interval?this._interval:d.interval-0+1,k=d.onGap,k=k?this.getGap()/2:"undefined"==typeof k&&this.option.boundaryGap?this.getGap()/2:0,n=0n;n+=m)l&&!l(n,b[n])||(p=this.subPixelOptimize(this.getCoordByIndex(n)+(0<=n?k:0),f),e={_axisShape:"axisTick",zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:p,yStart:q,xEnd:p,yEnd:q+h,strokeColor:c,lineWidth:f}},this.shapeList.push(new g(e)));else for(p="left"==this.option.position?d.inside?this.grid.getX()+1:this.grid.getX()-h-1:d.inside?this.grid.getXend()-h-1:this.grid.getXend()+1;a>n;n+=m)l&&!l(n,b[n])||(q=this.subPixelOptimize(this.getCoordByIndex(n)-(0<=n?k:0),f),e={_axisShape:"axisTick",zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:p,yStart:q,xEnd:p+h,yEnd:q,strokeColor:c,lineWidth:f}},this.shapeList.push(new g(e)))},_buildAxisLabel:function(){var e,b,a=this.option.data,d=this.option.data.length,h=this.option.axisLabel,c=h.rotate,f=h.margin,g=h.clickable,m=h.textStyle,h="function"==typeof h.interval?h.interval:!1;if(this.isHorizontal()){var k,n;"bottom"==this.option.position?(k=this.grid.getYend()+f,n="top"):(k=this.grid.getY()-f,n="bottom");for(f=0;d>f;f+=this._interval)h&&!h(f,a[f])||""===this._getReformedLabel(f)||(b=l.merge(a[f].textStyle||{},m),e={zlevel:this.getZlevelBase(),z:this.getZBase()+3,hoverable:!1,style:{x:this.getCoordByIndex(f),y:k,color:b.color,text:this._getReformedLabel(f),textFont:this.getFont(b),textAlign:b.align||"center",textBaseline:b.baseline||n}},c&&(e.style.textAlign=0f;f+=this._interval)h&&!h(f,a[f])||""===this._getReformedLabel(f)||(b=l.merge(a[f].textStyle||{},m),e={zlevel:this.getZlevelBase(),z:this.getZBase()+3,hoverable:!1,style:{x:E,y:this.getCoordByIndex(f),color:b.color,text:this._getReformedLabel(f),textFont:this.getFont(b),textAlign:b.align||q,textBaseline:b.baseline||0===f&&""!==this.option.name?"bottom":f==d-1&&""!==this.option.name?"top":"middle"}},c&&(e.rotation=[c*Math.PI/180,e.style.x,e.style.y]),this.shapeList.push(new p(this._axisLabelClickable(g,e))))}},_buildSplitLine:function(){var e,b=this.option.data,a=this.option.data.length,d=this.option.splitLine,h=d.lineStyle.type,c=d.lineStyle.width,f=d.lineStyle.color,f=f instanceof Array?f:[f],l=f.length,m="function"==typeof this.option.axisLabel.interval?this.option.axisLabel.interval:!1,k=d.onGap,d=k?this.getGap()/2:"undefined"==typeof k&&this.option.boundaryGap?this.getGap()/2:0;if(a-=k||"undefined"==typeof k&&this.option.boundaryGap?1:0,this.isHorizontal())for(var n,p=this.grid.getY(),q=this.grid.getYend(),k=0;a>k;k+=this._interval)m&&!m(k,b[k])||(n=this.subPixelOptimize(this.getCoordByIndex(k)+d,c),e={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:n,yStart:p,xEnd:n,yEnd:q,strokeColor:f[k/this._interval%l],lineType:h,lineWidth:c}},this.shapeList.push(new g(e)));else for(n=this.grid.getX(),q=this.grid.getXend(),k=0;a>k;k+=this._interval)m&&!m(k,b[k])||(p=this.subPixelOptimize(this.getCoordByIndex(k)-d,c),e={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:n,yStart:p,xEnd:q,yEnd:p,strokeColor:f[k/this._interval%l],lineType:h,lineWidth:c}},this.shapeList.push(new g(e)))},_buildSplitArea:function(){var e,b=this.option.data,a=this.option.splitArea,d=a.areaStyle.color;if(d instanceof Array){var h=d.length,c=this.option.data.length,g="function"==typeof this.option.axisLabel.interval?this.option.axisLabel.interval:!1,a=(a=a.onGap)?this.getGap()/2:"undefined"==typeof a&&this.option.boundaryGap?this.getGap()/2:0;if(this.isHorizontal())for(var l,m=this.grid.getY(),k=this.grid.getHeight(),n=this.grid.getX(),p=0;c>=p;p+=this._interval)g&&!g(p,b[p])&&c>p||(l=c>p?this.getCoordByIndex(p)+a:this.grid.getXend(),e={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:n,y:m,width:l-n,height:k,color:d[p/this._interval%h]}},this.shapeList.push(new f(e)),n=l);else for(l=this.grid.getX(),k=this.grid.getWidth(),n=this.grid.getYend(),p=0;c>=p;p+=this._interval)g&&!g(p,b[p])&&c>p||(m=c>p?this.getCoordByIndex(p)-a:this.grid.getY(),e={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:l,y:m,width:k,height:n-m,color:d[p/this._interval%h]}},this.shapeList.push(new f(e)),n=m)}else e={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:d}},this.shapeList.push(new f(e))},refresh:function(e){e&&(this.option=this.reformOption(e),this.option.axisLabel.textStyle=this.getTextStyle(this.option.axisLabel.textStyle));this.clear();this._buildShape()},getGap:function(){var e=this.option.data.length,b=this.isHorizontal()?this.grid.getWidth():this.grid.getHeight();return this.option.boundaryGap?b/e:b/(1c;c++){if(this.getDataFromOption(b[c])==e)return this.isHorizontal()?this.grid.getX()+h:this.grid.getYend()-h;h+=d}},getCoordByIndex:function(e){if(0>e)return this.isHorizontal()?this.grid.getX():this.grid.getYend();if(e>this.option.data.length-1)return this.isHorizontal()?this.grid.getXend():this.grid.getY();var b=this.getGap(),a=this.option.boundaryGap?b/2:0;return a+=e*b,this.isHorizontal()?this.grid.getX()+a:this.grid.getYend()-a},getNameByIndex:function(e){return this.getDataFromOption(this.option.data[e])},getIndexByName:function(e){for(var b=this.option.data,a=b.length,d=0;a>d;d++)if(this.getDataFromOption(b[d])==e)return d;return-1},getValueFromCoord:function(){return""},isMainAxis:function(e){return 0===e%this._interval}},l.inherits(k,q),n("../component").define("categoryAxis",k),k});u("echarts/component/valueAxis","require ./base zrender/shape/Text zrender/shape/Line zrender/shape/Rectangle ../config ../util/date zrender/tool/util ../util/smartSteps ../util/accMath ../component".split(" "),function(n){function k(e,b,a,d,h,c,f){if(!f||0===f.length)return void console.err("option.series.length \x3d\x3d 0.");q.call(this,e,b,a,d,h);this.series=f;this.grid=this.component.grid;for(var g in c)this[g]=c[g];this.refresh(d,f)}var q=n("./base"),p=n("zrender/shape/Text"),g=n("zrender/shape/Line"),f=n("zrender/shape/Rectangle"),c=n("../config");c.valueAxis={zlevel:0,z:0,show:!0,position:"left",name:"",nameLocation:"end",nameTextStyle:{},boundaryGap:[0,0],axisLine:{show:!1,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:-1,textStyle:{align:"left",baseline:"bottom",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 l=n("../util/date"),m=n("zrender/tool/util");return k.prototype={type:c.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 e=0,b=this.shapeList.length;b>e;e++)this.zr.addShape(this.shapeList[e])}},_buildAxisTick:function(){var e,b=this._valueList,a=this._valueList.length,d=this.option.axisTick,h=d.length,c=d.lineStyle.color,f=d.lineStyle.width;if(this.isHorizontal())for(var l="bottom"===this.option.position?d.inside?this.grid.getYend()-h-1:this.grid.getYend()+1:d.inside?this.grid.getY()+1:this.grid.getY()-h-1,d=0;a>d;d++)e=this.subPixelOptimize(this.getCoord(b[d]),f),e={_axisShape:"axisTick",zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:e,yStart:l,xEnd:e,yEnd:l+h,strokeColor:c,lineWidth:f}},this.shapeList.push(new g(e));else for(l="left"===this.option.position?d.inside?this.grid.getX()+1:this.grid.getX()-h-1:d.inside?this.grid.getXend()-h-1:this.grid.getXend()+1,d=0;a>d;d++)e=this.subPixelOptimize(this.getCoord(b[d]),f),e={_axisShape:"axisTick",zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:l,yStart:e,xEnd:l+h,yEnd:e,strokeColor:c,lineWidth:f}},this.shapeList.push(new g(e))},_buildAxisLabel:function(){var e,b=this._valueList,a=this._valueList.length,d=this.option.axisLabel.rotate;e=this.option.axisLabel.margin;var h=this.option.axisLabel.clickable,c=this.option.axisLabel.textStyle;if(this.isHorizontal()){var f,g;"bottom"===this.option.position?(f=this.grid.getYend()+e,g="top"):(f=this.grid.getY()-e,g="bottom");for(var l=0;a>l;l++)e={zlevel:this.getZlevelBase(),z:this.getZBase()+3,hoverable:!1,style:{x:this.getCoord(b[l]),y:f,color:"function"==typeof c.color?c.color(b[l]):c.color,text:this._valueLabel[l],textFont:this.getFont(c),textAlign:c.align||"center",textBaseline:c.baseline||g}},d&&(e.style.textAlign=0l;l++)e={zlevel:this.getZlevelBase(),z:this.getZBase()+3,hoverable:!1,style:{x:m,y:this.getCoord(b[l]),color:"function"==typeof c.color?c.color(b[l]):c.color,text:this._valueLabel[l],textFont:this.getFont(c),textAlign:c.align||k,textBaseline:c.baseline||(0===l&&""!==this.option.name?"bottom":l===a-1&&""!==this.option.name?"top":"middle")}},d&&(e.rotation=[d*Math.PI/180,e.style.x,e.style.y]),this.shapeList.push(new p(this._axisLabelClickable(h,e)))}},_buildSplitLine:function(){var e,b=this._valueList,a=this._valueList.length,d=this.option.splitLine,h=d.lineStyle.type,c=d.lineStyle.width,d=d.lineStyle.color,d=d instanceof Array?d:[d],f=d.length;if(this.isHorizontal())for(var l=this.grid.getY(),m=this.grid.getYend(),k=0;a>k;k++)e=this.subPixelOptimize(this.getCoord(b[k]),c),e={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:e,yStart:l,xEnd:e,yEnd:m,strokeColor:d[k%f],lineType:h,lineWidth:c}},this.shapeList.push(new g(e));else for(l=this.grid.getX(),m=this.grid.getXend(),k=0;a>k;k++)e=this.subPixelOptimize(this.getCoord(b[k]),c),e={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:l,yStart:e,xEnd:m,yEnd:e,strokeColor:d[k%f],lineType:h,lineWidth:c}},this.shapeList.push(new g(e))},_buildSplitArea:function(){var e,b=this.option.splitArea.areaStyle.color;if(b instanceof Array){var a=b.length,d=this._valueList,h=this._valueList.length;if(this.isHorizontal()){var c,g=this.grid.getY(),l=this.grid.getHeight();e=this.grid.getX();for(var m=0;h>=m;m++)c=h>m?this.getCoord(d[m]):this.grid.getXend(),e={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:e,y:g,width:c-e,height:l,color:b[m%a]}},this.shapeList.push(new f(e)),e=c}else for(g=this.grid.getX(),l=this.grid.getWidth(),e=this.grid.getYend(),m=0;h>=m;m++)c=h>m?this.getCoord(d[m]):this.grid.getY(),e={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:g,y:c,width:l,height:e-c,color:b[m%a]}},this.shapeList.push(new f(e)),e=c}else e={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:b}},this.shapeList.push(new f(e))},_calculateValue:function(){if(isNaN(this.option.min-0)||isNaN(this.option.max-0)){for(var e,b,a={},d=this.component.legend,h=0,f=this.series.length;f>h;h++)!(this.series[h].type!=c.CHART_TYPE_LINE&&this.series[h].type!=c.CHART_TYPE_BAR&&this.series[h].type!=c.CHART_TYPE_SCATTER&&this.series[h].type!=c.CHART_TYPE_K&&this.series[h].type!=c.CHART_TYPE_EVENTRIVER||d&&!d.isSelected(this.series[h].name)||(e=this.series[h].xAxisIndex||0,b=this.series[h].yAxisIndex||0,this.option.xAxisIndex!=e&&this.option.yAxisIndex!=b||!this._calculSum(a,h)));for(h in a){e=a[h];b=0;for(d=e.length;d>b;b++)if(!isNaN(e[b])){this._hasData=!0;this._min=e[b];this._max=e[b];break}if(this._hasData)break}for(h in a)for(e=a[h],b=0,d=e.length;d>b;b++)isNaN(e[b])||(this._min=Math.min(this._min,e[b]),this._max=Math.max(this._max,e[b]));a=Math.abs(this._max-this._min);this._min=isNaN(this.option.min-0)?this._min-Math.abs(a*this.option.boundaryGap[0]):this.option.min-0;this._max=isNaN(this.option.max-0)?this._max+Math.abs(a*this.option.boundaryGap[1]):this.option.max-0;this._min===this._max&&(0===this._max?this._max=1:0m;m++)a=this.getDataFromOption(d[m]),"-"!==a&&(a-=0,0<=a?null!=e[f][m]?e[f][m]+=a:e[f][m]=a:null!=e[g][m]?e[g][m]+=a:e[g][m]=a,this.option.scale&&e[h].push(a))}else if(e[h]=e[h]||[],this.series[b].type!=c.CHART_TYPE_EVENTRIVER)for(d=this.series[b].data,m=0,k=d.length;k>m;m++)a=this.getDataFromOption(d[m]),this.series[b].type===c.CHART_TYPE_K?(e[h].push(a[0]),e[h].push(a[1]),e[h].push(a[2]),e[h].push(a[3])):a instanceof Array?(-1!=this.option.xAxisIndex&&e[h].push("time"!=this.option.type?a[0]:l.getNewDate(a[0])),-1!=this.option.yAxisIndex&&e[h].push("time"!=this.option.type?a[1]:l.getNewDate(a[1]))):e[h].push(a);else for(d=this.series[b].eventList,m=0,k=d.length;k>m;m++)for(a=d[m].evolution,f=0,g=a.length;g>f;f++)e[h].push(l.getNewDate(a[f].time))},_reformValue:function(e){var b=n("../util/smartSteps"),a=this.option.splitNumber;!e&&0<=this._min&&0<=this._max&&(this._min=0);!e&&0>=this._min&&0>=this._max&&(this._max=0);e=b(this._min,this._max,a);this._min=e.min;this._max=e.max;this._valueList=e.pnts;this._reformLabelData()},_reformTimeValue:function(){var e=null!=this.option.splitNumber?this.option.splitNumber:5,b=l.getAutoFormatter(this._min,this._max,e),a=b.formatter,d=b.gapValue;this._valueList=[l.getNewDate(this._min)];var h;switch(a){case "week":h=l.nextMonday(this._min);break;case "month":h=l.nextNthOnMonth(this._min,1);break;case "quarter":h=l.nextNthOnQuarterYear(this._min,1);break;case "half-year":h=l.nextNthOnHalfYear(this._min,1);break;case "year":h=l.nextNthOnYear(this._min,1);break;default:72E5>=d?h=(Math.floor(this._min/d)+1)*d:(h=l.getNewDate(this._min- -d),h.setHours(6*Math.round(h.getHours()/6)),h.setMinutes(0),h.setSeconds(0))}h-this._min=d;d++)this._valueList.push(e.accAdd(this._min,e.accMul(a,d)));this._reformLabelData()},_reformLabelData:function(e){this._valueLabel=[];var b=this.option.axisLabel.formatter;if(b)for(var a=0,d=this._valueList.length;d>a;a++)"function"==typeof b?this._valueLabel.push(e?b.call(this.myChart,this._valueList[a],e):b.call(this.myChart,this._valueList[a])):"string"==typeof b&&this._valueLabel.push(e?l.format(b,this._valueList[a]):b.replace("{value}",this._valueList[a]));else if(e)for(a=0,d=this._valueList.length;d>a;a++)this._valueLabel.push(l.format(e,this._valueList[a]));else for(a=0,d=this._valueList.length;d>a;a++)this._valueLabel.push(this.numAddCommas(this._valueList[a]))},getExtremum:function(){return this._calculateValue(),{min:this._min,max:this._max}},refresh:function(e,b){e&&(this.option=this.reformOption(e),this.option.axisLabel.textStyle=m.merge(this.option.axisLabel.textStyle||{},this.ecTheme.textStyle),this.series=b);this.zr&&(this.clear(),this._buildShape())},getCoord:function(e){e=ethis._max?this._max:e;return this.isHorizontal()?this.grid.getX()+(e-this._min)/(this._max-this._min)*this.grid.getWidth():this.grid.getYend()-(e-this._min)/(this._max-this._min)*this.grid.getHeight()},getCoordSize:function(e){return Math.abs(this.isHorizontal()?e/(this._max-this._min)*this.grid.getWidth():e/(this._max-this._min)*this.grid.getHeight())},getValueFromCoord:function(e){var b;return this.isHorizontal()?(e=ethis.grid.getXend()?this.grid.getXend():e,b=this._min+(e-this.grid.getX())/this.grid.getWidth()*(this._max-this._min)):(e=ethis.grid.getYend()?this.grid.getYend():e,b=this._max-(e-this.grid.getY())/this.grid.getHeight()*(this._max-this._min)),b.toFixed(2)-0},isMaindAxis:function(e){for(var b=0,a=this._valueList.length;a>b;b++)if(this._valueList[b]===e)return!0;return!1}},m.inherits(k,q),n("../component").define("valueAxis",k),k});u("echarts/util/date",[],function(){function n(g){return 10>g?"0"+g:g}function k(g,f,c){return g=q(g),g.setMonth(Math.ceil((g.getMonth()+1)/c)*c),g.setDate(f),g}function q(g){return g instanceof Date?g:new Date("string"==typeof g?g.replace(/-/g,"/"):g)}var p=[{formatter:"hh : mm : ss",value:1E3},{formatter:"hh : mm : ss",value:5E3},{formatter:"hh : mm : ss",value:1E4},{formatter:"hh : mm : ss",value:15E3},{formatter:"hh : mm : ss",value:3E4},{formatter:"hh : mm\nMM - dd",value:6E4},{formatter:"hh : mm\nMM - dd",value:3E5},{formatter:"hh : mm\nMM - dd",value:6E5},{formatter:"hh : mm\nMM - dd",value:9E5},{formatter:"hh : mm\nMM - dd",value:18E5},{formatter:"hh : mm\nMM - dd",value:36E5},{formatter:"hh : mm\nMM - dd",value:72E5},{formatter:"hh : mm\nMM - dd",value:216E5},{formatter:"hh : mm\nMM - dd",value:432E5},{formatter:"MM - dd\nyyyy",value:864E5},{formatter:"week",value:6048E5},{formatter:"month",value:26784E5},{formatter:"quarter",value:8208E6},{formatter:"half-year",value:16416E6},{formatter:"year",value:32832E6}];return{getAutoFormatter:function(g,f,c){c=1a;a++)if(l=p[a].value,m=Math.ceil(f/l)*l-Math.floor(g/l)*l,Math.round(m/l)<=1.2*c){e=p[a].formatter;b=p[a].value;break}return null==e&&(e="year",l=317088E5,m=Math.ceil(f/l)*l-Math.floor(g/l)*l,b=Math.round(m/(c-1)/l)*l),{formatter:e,gapValue:b}},getNewDate:q,format:function(g,f){"week"!=g&&"month"!=g&&"quarter"!=g&&"half-year"!=g&&"year"!=g||(g="MM - dd\nyyyy");var c=q(f),l=c.getFullYear(),m=c.getMonth()+1,e=c.getDate(),b=c.getHours(),a=c.getMinutes(),c=c.getSeconds();return g=g.replace("MM",n(m)),g=g.toLowerCase(),g=g.replace("yyyy",l),g=g.replace("yy",l%100),g=g.replace("dd",n(e)),g=g.replace("d",e),g=g.replace("hh",n(b)),g=g.replace("h",b),g=g.replace("mm",n(a)),g=g.replace("m",a),g=g.replace("ss",n(c)),g.replace("s",c)},nextMonday:function(g){return g=q(g),g.setDate(g.getDate()+8-g.getDay()),g},nextNthPerNmonth:k,nextNthOnMonth:function(g,f){return k(g,f,1)},nextNthOnQuarterYear:function(g,f){return k(g,f,3)},nextNthOnHalfYear:function(g,f){return k(g,f,6)},nextNthOnYear:function(g,f){return k(g,f,12)}}});u("echarts/util/smartSteps",[],function(){function n(h,e,c,f){f=f||0;var g=k((e-h)/c,-1);h=k(h,-1,1);e=k(e,-1);var l=x.min(g.e,h.e,e.e);0===h.c?l=x.min(g.e,e.e):0===e.c&&(l=x.min(g.e,h.e));q(g,{c:0,e:l});q(h,g,1);q(e,g);f+=l;h=h.c;e=e.c;for(var g=(e-h)/c,l=x.pow(10,f),m=0,r=[],t=c+1;t--;)r[t]=(h+g*t)*l;if(0>f)for(t=l,m=(t=(+t).toFixed(15).split("."),t.pop().replace(/0+$/,"").length),g=+(g*l).toFixed(m),h=+(h*l).toFixed(m),e=+(e*l).toFixed(m),t=r.length;t--;)r[t]=r[t].toFixed(m),0===+r[t]&&(r[t]="0");else h*=l,e*=l,g*=l;return d=0,a=0,b=0,{min:h,max:e,secs:c,step:g,fix:m,exp:f,pnts:r}}function k(a,d,h){d=J(d%10)||2;0>d&&(a===F(a)?d=(""+L(a)).replace(/0+$/,"").length||1:(a=a.toFixed(15).replace(/0+$/,""),d=a.replace(".","").replace(/^[-0]+/,"").length,a=+a));var b=F(x.log(L(a))/x.LN10)-d+1;a=+(a*x.pow(10,-b)).toFixed(15)||0;return a=h?F(a):E(a),!a&&(b=0),(""+L(a)).length>d&&(b+=1,a/=10),{c:a,e:b}}function q(a,d,h){(d=d.e-a.e)&&(a.e+=d,a.c*=x.pow(10,-d),a.c=h?F(a.c):E(a.c))}function p(a,d,h){a.ed[b];)b++;if(!d[b])for(h/=10,a.e+=1,b=0;h>d[b];)b++;return a.c=d[b],a}function f(b,e,f){var r=f||+d.slice(-1),y=g((e-b)/r,a),L=k(e-b),B=k(b,-1,1),A=k(e,-1);q(L,y);q(B,y,1);q(A,y);if(f){var L=r,H,u;H=A.c;for(y=(A.c-B.c)/L-1;H>B.c;)y=g(y+1,a),y=y.c*x.pow(10,y.e),H=y*L,u=E(A.c/y)*y,H=u-H;L=B.c-H-(u-A.c);L>1.1*y&&(L=J(L/y/2)*y,H+=L,u+=L);B.c=H;A.c=u}else r=c(B,A);if(b===F(b)&&e===F(e)&&0<=b*e){if(r>e-b)return l(b,e,r);u=A.c-B.c;y=u/r*x.pow(10,A.e);y!==F(y)&&(y=F(y),u=y*r,e-b>u&&(y+=1,u=y*r,!f&&y*(r-1)>=e-b&&(--r,u=y*r)),u>=e-b)&&(f=u-(e-b),B.c=J(b-f/2),A.c=J(e+f/2),B.e=0,A.e=0)}f=m(b,e,B.c,A.c);B.c=f[0];A.c=f[1];if(h||t)h?(b=k(b,4,1),6e?2*e:e}function l(a,d,b){if(b=b||5,h)d=a+b;else if(t)a=d-b;else{var e=b-(d-a),c=J(a-e/2),e=J(d+e/2);d=m(a,d,c,e);a=d[0];d=d[1]}return n(a,d,b)}function m(a,d,h,b){return 0<=a&&0>h?(b-=h,h=0):0>=d&&0L(h/c)&&(h=0);1E-6>L(a/c)&&(a=0);var f,g,l=[[5,10],[10,2],[50,10],[100,2]],m=[],r=k(h-a,3);a=k(a,-1,1);var t=k(h,-1);q(a,r,1);q(t,r);c=t.c-a.c;r.c=c;for(var p=e.length;p--;){b=e[p];h=E(c/b);f=h*b-c;g=3*(f+3);g+=2*(b-e[0]+2);0===b%5&&(g-=10);for(var y=l.length;y--;)0===h%l[y][0]&&(g/=l[y][1]);[b,h,f,g].join();m[p]={secs:b,step:h,delta:f,score:g}}return m.sort(function(a,d){return a.score-d.score}),m=m[0],a.c=J(a.c-m.delta/2),t.c=J(t.c+m.delta/2),n(a.c,t.c,m.secs,r.e)}var b,a,d,h,t,r=[10,20,25,50],y=[4,5,6],x=Math,J=x.round,F=x.floor,E=x.ceil,L=x.abs;return function(c,g,m,k){b=k||{};a=b.steps||r;d=b.secs||y;m=J(+m||0)%99;c=+c||0;g=+g||0;h=t=0;"min"in b&&(c=+b.min||0,h=1);"max"in b&&(g=+b.max||0,t=1);c>g&&(g=[c,c=g][0]);k=g-c;if(h&&t)return e(c,g,m);if((m||5)>k){if(c===F(c)&&g===F(g))return l(c,g,m);if(0===k)return m=m||5,k=x.min(L(g/m),m)/2.1,h?g=c+k:t?c=g-k:(c-=k,g+=k),f(c,g,m)}return f(c,g,m)}});u("echarts/chart/bar","require ./base zrender/shape/Rectangle ../component/axis ../component/grid ../component/dataZoom ../config ../util/ecData zrender/tool/util zrender/tool/color ../chart".split(" "),function(n){function k(c,e,b,a,d){q.call(this,c,e,b,a,d);this.refresh(a)}var q=n("./base"),p=n("zrender/shape/Rectangle");n("../component/axis");n("../component/grid");n("../component/dataZoom");var g=n("../config");g.bar={zlevel:0,z:2,clickable:!0,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,barMinHeight:0,barGap:"30%",barCategoryGap:"20%",itemStyle:{normal:{barBorderColor:"#fff",barBorderRadius:0,barBorderWidth:0,label:{show:!1}},emphasis:{barBorderColor:"#fff",barBorderRadius:0,barBorderWidth:0,label:{show:!1}}}};var f=n("../util/ecData"),c=n("zrender/tool/util"),l=n("zrender/tool/color");return k.prototype={type:g.CHART_TYPE_BAR,_buildShape:function(){this._buildPosition()},_buildNormal:function(c,e,b,a,d){var h,f,l,k,n,J,F,E,q,w,D,v;c=this.series;var G=b[0][0],C=c[G];d="horizontal"==d;for(var z=this.component.xAxis,B=this.component.yAxis,A=d?z.getAxis(C.xAxisIndex):B.getAxis(C.yAxisIndex),u=this._mapSize(A,b),N=u.gap,K=u.barGap,I=u.barWidthMap,M=u.barMaxWidthMap,O=u.barWidth,P=u.barMinHeightMap,u=u.interval,S=this.deepQuery([this.ecTheme,g],"island.r"),Q=0;e>Q&&null!=A.getNameByIndex(Q);Q++){d?k=A.getCoordByIndex(Q)-N/2:n=A.getCoordByIndex(Q)+N/2;for(var R=0,U=b.length;U>R;R++){G=c[b[R][0]].yAxisIndex||0;C=c[b[R][0]].xAxisIndex||0;h=d?B.getAxis(G):z.getAxis(C);F=J=q=E=h.getCoord(0);for(var T=0,V=b[R].length;V>T;T++)G=b[R][T],C=c[G],D=C.data[Q],v=this.getDataFromOption(D,"-"),a[G]=a[G]||{min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY,sum:0,counter:0,average:0},l=Math.min(M[G]||Number.MAX_VALUE,I[G]||O),"-"!==v&&(0f&&(f=P[G]),d?(J-=f,n=J):(k=J,J+=f)):0>v?(f=0f&&(f=P[G]),d?(n=E,E+=f):(E-=f,k=E)):(f=0,d?(J-=f,n=J):(k=J,J+=f)),a[G][Q]=d?k+l/2:n-l/2,a[G].min>v&&(a[G].min=v,d?(a[G].minY=n,a[G].minX=a[G][Q]):(a[G].minX=k+f,a[G].minY=a[G][Q])),a[G].maxT;T++)G=b[R][T],C=c[G],D=C.data[Q],v=this.getDataFromOption(D,"-"),l=Math.min(M[G]||Number.MAX_VALUE,I[G]||O),"-"==v&&this.deepQuery([D,C,this.option],"calculable")&&(d?(J-=S,n=J):(k=J,J+=S),w=this._getBarItem(G,Q,A.getNameByIndex(Q),k,n-(d?0:l),d?l:S,d?S:l,d?"vertical":"horizontal"),w.hoverable=!1,w.draggable=!1,w.style.lineWidth=1,w.style.brushType="stroke",w.style.strokeColor=C.calculableHolderColor||this.ecTheme.calculableHolderColor||g.calculableHolderColor,this.shapeList.push(new p(w)));d?k+=l+K:n-=l+K}}this._calculMarkMapXY(a,b,d?"y":"x")},_buildHorizontal:function(c,e,b,a){return this._buildNormal(c,e,b,a,"horizontal")},_buildVertical:function(c,e,b,a){return this._buildNormal(c,e,b,a,"vertical")},_buildOther:function(c,e,b,a){c=this.series;e=0;for(var d=b.length;d>e;e++)for(var h=0,f=b[e].length;f>h;h++){var g=b[e][h],l=c[g],k=this.component.xAxis.getAxis(l.xAxisIndex||0),n=k.getCoord(0),F=this.component.yAxis.getAxis(l.yAxisIndex||0),E=F.getCoord(0);a[g]=a[g]||{min0:Number.POSITIVE_INFINITY,min1:Number.POSITIVE_INFINITY,max0:Number.NEGATIVE_INFINITY,max1:Number.NEGATIVE_INFINITY,sum0:0,sum1:0,counter0:0,counter1:0,average0:0,average1:0};for(var q=0,w=l.data.length;w>q;q++){var D=l.data[q],v=this.getDataFromOption(D,"-");if(v instanceof Array){var G,C,z=k.getCoord(v[0]),B=F.getCoord(v[1]),A=[D,l],D=this.deepQuery(A,"barWidth")||10,A=this.deepQuery(A,"barHeight");null!=A?(G="horizontal",0v[0]?n-z:0,C=this._getBarItem(g,q,v[0],z,B-A/2,D,A,G)):(G="vertical",0v[1]?(A=B-E,B-=A):A=0,C=this._getBarItem(g,q,v[0],z-D/2,B,D,A,G));this.shapeList.push(new p(C));z=k.getCoord(v[0]);B=F.getCoord(v[1]);a[g].min0>v[0]&&(a[g].min0=v[0],a[g].minY0=B,a[g].minX0=z);a[g].max0v[1]&&(a[g].min1=v[1],a[g].minY1=B,a[g].minX1=z);a[g].max1=d&&(E=Math.floor(e.length/a),d=1);else{if(a="string"==typeof h&&h.match(/%$/)?(c.getGap()*(100-parseFloat(h))/100).toFixed(2)-0:c.getGap()-h,"string"==typeof p&&p.match(/%$/)?(p=parseFloat(p)/100,d=+((a-n)/((e.length-1)*p+e.length-k)).toFixed(2),p*=d):(p=parseFloat(p),d=+((a-n-p*(e.length-1))/(e.length-k)).toFixed(2)),0>=d)return this._mapSize(c,e,!0)}else if(a=1p)return this._mapSize(c,e,!0);return this._recheckBarMaxWidth(e,f,g,l,a,d,p,E)},_findSpecialBarSzie:function(c,e){for(var b,a,d,h,f=this.series,g={},l={},k={},n=0,p=0,E=0,q=c.length;q>E;E++)for(var w=!1,D=!1,v=0,G=c[E].length;G>v;v++){var C=c[E][v],z=f[C];if(!e){if(w)g[C]=b;else if(b=this.query(z,"barWidth"),null!=b){g[C]=b;p+=b;n++;for(var w=!0,B=0,A=v;A>B;B++){var u=c[E][B];g[u]=b}}if(D)l[C]=a;else if(a=this.query(z,"barMaxWidth"),null!=a)for(l[C]=a,D=!0,B=0,A=v;A>B;B++)u=c[E][B],l[u]=a}k[C]=this.query(z,"barMinHeight");d=null!=d?d:this.query(z,"barGap");h=null!=h?h:this.query(z,"barCategoryGap")}return{barWidthMap:g,barMaxWidthMap:l,barMinHeightMap:k,sBarWidth:b,sBarMaxWidth:a,sBarWidthCounter:n,sBarWidthTotal:p,barGap:d,barCategoryGap:h}},_recheckBarMaxWidth:function(c,e,b,a,d,h,f,g){for(var l=0,k=c.length;k>l;l++){var n=c[l][0];b[n]&&b[n]D&&d.width>D?(d.y+=D/2,d.height-=D,d.x+=D/2,d.width-=D):d.brushType="fill";a.highlightStyle.textColor=a.highlightStyle.color;a=this.addLabel(a,p,q,b,k);k=d.textPosition;if("insideLeft"===k||"insideRight"===k||"insideTop"===k||"insideBottom"===k){switch(k){case "insideLeft":d.textX=d.x+5;d.textY=d.y+d.height/2;d.textAlign="left";d.textBaseline="middle";break;case "insideRight":d.textX=d.x+d.width-5;d.textY=d.y+d.height/2;d.textAlign="right";d.textBaseline="middle";break;case "insideTop":d.textX=d.x+d.width/2;d.textY=d.y+2.5;d.textAlign="center";d.textBaseline="top";break;case "insideBottom":d.textX=d.x+d.width/2,d.textY=d.y+d.height-2.5,d.textAlign="center",d.textBaseline="bottom"}d.textPosition="specific";d.textColor=d.textColor||"#fff"}return this.deepQuery([q,p,this.option],"calculable")&&(this.setCalculable(a),a.draggable=!0),f.pack(a,n[c],c,n[c].data[e],e,b),a},getMarkCoord:function(c,e){var b,a,d=this.series[c],h=this.xMarkMap[c];a=this.component.xAxis.getAxis(d.xAxisIndex);d=this.component.yAxis.getAxis(d.yAxisIndex);!e.type||"max"!==e.type&&"min"!==e.type&&"average"!==e.type?h.isHorizontal?(b="string"==typeof e.xAxis&&a.getIndexByName?a.getIndexByName(e.xAxis):e.xAxis||0,h=h[b],h=null!=h?h:"string"!=typeof e.xAxis&&a.getCoordByIndex?a.getCoordByIndex(e.xAxis||0):a.getCoord(e.xAxis||0),a=[h,d.getCoord(e.yAxis||0)]):(b="string"==typeof e.yAxis&&d.getIndexByName?d.getIndexByName(e.yAxis):e.yAxis||0,h=h[b],h=null!=h?h:"string"!=typeof e.yAxis&&d.getCoordByIndex?d.getCoordByIndex(e.yAxis||0):d.getCoord(e.yAxis||0),a=[a.getCoord(e.xAxis||0),h]):(a=null!=e.valueIndex?e.valueIndex:null!=h.maxX0?"1":"",a=[h[e.type+"X"+a],h[e.type+"Y"+a],h[e.type+"Line"+a],h[e.type+a]]);return a},refresh:function(c){c&&(this.option=c,this.series=c.series);this.backupShapeList();this._buildShape()},addDataAnimation:function(c){for(var e=this.series,b={},a=0,d=c.length;d>a;a++)b[c[a][0]]=c[a];for(var h,g,l,k,n,p,F,a=this.shapeList.length-1;0<=a;a--)if(p=f.get(this.shapeList[a],"seriesIndex"),b[p]&&!b[p][3]&&"rectangle"===this.shapeList[a].type)(F=f.get(this.shapeList[a],"dataIndex"),n=e[p],b[p][2]&&F===n.data.length-1)?this.zr.delShape(this.shapeList[a].id):b[p][2]||0!==F?("horizontal"===this.shapeList[a]._orient?(k=this.component.yAxis.getAxis(n.yAxisIndex||0).getGap(),l=b[p][2]?-k:k,h=0):(g=this.component.xAxis.getAxis(n.xAxisIndex||0).getGap(),h=b[p][2]?g:-g,l=0),this.shapeList[a].position=[0,0],this.zr.animate(this.shapeList[a].id,"").when(this.query(this.option,"animationDurationUpdate"),{position:[h,l]}).start()):this.zr.delShape(this.shapeList[a].id)}},c.inherits(k,q),n("../chart").define("bar",k),k});u("echarts/chart/scatter","require ./base ../util/shape/Symbol ../component/axis ../component/grid ../component/dataZoom ../component/dataRange ../config zrender/tool/util zrender/tool/color ../chart".split(" "),function(n){function k(c,f,e,b,a){q.call(this,c,f,e,b,a);this.refresh(b)}var q=n("./base"),p=n("../util/shape/Symbol");n("../component/axis");n("../component/grid");n("../component/dataZoom");n("../component/dataRange");var g=n("../config");g.scatter={zlevel:0,z:2,clickable:!0,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbolSize:4,large:!1,largeThreshold:2E3,itemStyle:{normal:{label:{show:!1}},emphasis:{label:{show:!1}}}};var f=n("zrender/tool/util"),c=n("zrender/tool/color");return k.prototype={type:g.CHART_TYPE_SCATTER,_buildShape:function(){var f=this.series;this._sIndex2ColorMap={};this._symbol=this.option.symbolList;this._sIndex2ShapeMap={};this.selectedMap={};this.xMarkMap={};for(var k,e,b,a,d=this.component.legend,h=[],t=0,r=f.length;r>t;t++)if(k=f[t],e=k.name,k.type===g.CHART_TYPE_SCATTER){if(f[t]=this.reformOption(f[t]),this.legendHoverLink=f[t].legendHoverLink||this.legendHoverLink,this._sIndex2ShapeMap[t]=this.query(k,"symbol")||this._symbol[t%this._symbol.length],d){if(this.selectedMap[e]=d.isSelected(e),this._sIndex2ColorMap[t]=c.alpha(d.getColor(e),.5),b=d.getItemShape(e))a=this._sIndex2ShapeMap[t],b.style.brushType=a.match("empty")?"stroke":"both",a=a.replace("empty","").toLowerCase(),a.match("rectangle")&&(b.style.x+=Math.round((b.style.width-b.style.height)/2),b.style.width=b.style.height),a.match("star")&&(b.style.n=a.replace("star","")-0||5,a="star"),a.match("image")&&(b.style.image=a.replace(/^image:\/\//,""),b.style.x+=Math.round((b.style.width-b.style.height)/2),b.style.width=b.style.height,a="image"),b.style.iconType=a,d.setItemShape(e,b)}else this.selectedMap[e]=!0,this._sIndex2ColorMap[t]=c.alpha(this.zr.getColor(t),.5);this.selectedMap[e]&&h.push(t)}this._buildSeries(h);this.addShapeList()},_buildSeries:function(c){if(0!==c.length){for(var f,e,b,a,d,h,g,k,n=this.series,p={},q=0,F=c.length;F>q;q++)if(f=c[q],e=n[f],0!==e.data.length){d=this.component.xAxis.getAxis(e.xAxisIndex||0);h=this.component.yAxis.getAxis(e.yAxisIndex||0);p[f]=[];for(var E=0,L=e.data.length;L>E;E++)b=e.data[E],a=this.getDataFromOption(b,"-"),"-"===a||2>a.length||(g=d.getCoord(a[0]),k=h.getCoord(a[1]),p[f].push([g,k,E,b.name||""]));this.xMarkMap[f]=this._markMap(d,h,e.data,p[f]);this.buildMark(f)}this._buildPointList(p)}},_markMap:function(c,f,e,b){for(var a,d={min0:Number.POSITIVE_INFINITY,max0:Number.NEGATIVE_INFINITY,sum0:0,counter0:0,average0:0,min1:Number.POSITIVE_INFINITY,max1:Number.NEGATIVE_INFINITY,sum1:0,counter1:0,average1:0},h=0,g=b.length;g>h;h++)a=e[b[h][2]].value||e[b[h][2]],d.min0>a[0]&&(d.min0=a[0],d.minY0=b[h][1],d.minX0=b[h][0]),d.max0a[1]&&(d.min1=a[1],d.minY1=b[h][1],d.minX1=b[h][0]),d.max1f.largeThreshold)this.shapeList.push(this._getLargeSymbol(e,this.getItemStyleColor(this.query(f,"itemStyle.normal.color"),d,-1)||this._sIndex2ColorMap[d]));else for(var h=0,g=e.length;g>h;h++)b=e[h],(b=this._getSymbol(d,b[2],b[3],b[0],b[1]))&&this.shapeList.push(b)},_getSymbol:function(c,f,e,b,a){var d,h=this.series[c],g=h.data[f],k=this.component.dataRange;if(k){if(d=isNaN(g[2])?this._sIndex2ColorMap[c]:k.getColor(g[2]),!d)return null}else d=this._sIndex2ColorMap[c];c=this.getSymbolShape(h,c,g,f,e,b,a,this._sIndex2ShapeMap[c],d,"rgba(0,0,0,0)","vertical");return c.zlevel=this.getZlevelBase(),c.z=this.getZBase(),c._main=!0,c},_getLargeSymbol:function(c,f){return new p({zlevel:this.getZlevelBase(),z:this.getZBase(),_main:!0,hoverable:!1,style:{pointList:c,color:f,strokeColor:f},highlightStyle:{pointList:[]}})},getMarkCoord:function(c,f){var e,b=this.series[c];e=this.xMarkMap[c];var a=this.component.xAxis.getAxis(b.xAxisIndex),b=this.component.yAxis.getAxis(b.yAxisIndex);!f.type||"max"!==f.type&&"min"!==f.type&&"average"!==f.type?e=["string"!=typeof f.xAxis&&a.getCoordByIndex?a.getCoordByIndex(f.xAxis||0):a.getCoord(f.xAxis||0),"string"!=typeof f.yAxis&&b.getCoordByIndex?b.getCoordByIndex(f.yAxis||0):b.getCoord(f.yAxis||0)]:(a=null!=f.valueIndex?f.valueIndex:1,e=[e[f.type+"X"+a],e[f.type+"Y"+a],e[f.type+"Line"+a],e[f.type+a]]);return e},refresh:function(c){c&&(this.option=c,this.series=c.series);this.backupShapeList();this._buildShape()},ondataRange:function(c,f){this.component.dataRange&&(this.refresh(),f.needRefresh=!0)}},f.inherits(k,q),n("../chart").define("scatter",k),k});u("echarts/component/dataRange","require ./base zrender/shape/Text zrender/shape/Rectangle ../util/shape/HandlePolygon ../config zrender/tool/util zrender/tool/event zrender/tool/area zrender/tool/color ../component".split(" "),function(n){function k(a,d,h,b,e){if("undefined"==typeof this.query(b,"dataRange.min")||"undefined"==typeof this.query(b,"dataRange.max"))return void console.error("option.dataRange.min or option.dataRange.max has not been defined.");q.call(this,a,d,h,b,e);var f=this;f._ondrift=function(a,d){return f.__ondrift(this,a,d)};f._ondragend=function(){return f.__ondragend()};f._dataRangeSelected=function(a){return f.__dataRangeSelected(a)};f._dispatchHoverLink=function(a){return f.__dispatchHoverLink(a)};f._onhoverlink=function(a){return f.__onhoverlink(a)};this._selectedMap={};this._range={};this.refresh(b);d.bind(c.EVENT.HOVER,this._onhoverlink)}var q=n("./base"),p=n("zrender/shape/Text"),g=n("zrender/shape/Rectangle"),f=n("../util/shape/HandlePolygon"),c=n("../config");c.dataRange={zlevel:0,z:4,show:!0,orient:"vertical",x:"left",y:"bottom",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:1,itemGap:15,itemWidth:25,itemHeight:25,precision:0,splitNumber:5,calculable:!1,selectedMode:!0,hoverLink:!0,realtime:!0,color:["#006edd","#e0ffff"],textStyle:{fontSize:18,color:"#333"}};var l=n("zrender/tool/util"),m=n("zrender/tool/event"),e=n("zrender/tool/area"),b=n("zrender/tool/color");return k.prototype={type:c.COMPONENT_TYPE_DATARANGE,_textGap:10,_buildShape:function(){if(this._itemGroupLocation=this._getItemGroupLocation(),this._buildBackground(),0>=this.dataRangeOption.splitNumber||this.dataRangeOption.calculable?this._buildGradient():this._buildItem(),this.dataRangeOption.show)for(var a=0,d=this.shapeList.length;d>a;a++)this.zr.addShape(this.shapeList[a]);this._syncShapeFromRange()},_buildItem:function(){var a,d,h,b=this._valueTextList,c=b.length,f=this.getFont(this.dataRangeOption.textStyle),l=this._itemGroupLocation.x,k=this._itemGroupLocation.y,m=this.dataRangeOption.itemWidth,n=this.dataRangeOption.itemHeight,q=this.dataRangeOption.itemGap;a=e.getTextHeight("\u56fd",f);"vertical"==this.dataRangeOption.orient&&"right"==this.dataRangeOption.x&&(l=this._itemGroupLocation.x+this._itemGroupLocation.width-m);var w=!0;this.dataRangeOption.text&&(w=!1,this.dataRangeOption.text[0]&&(h=this._getTextShape(l,k,this.dataRangeOption.text[0]),"horizontal"==this.dataRangeOption.orient?l+=e.getTextWidth(this.dataRangeOption.text[0],f)+this._textGap:(k+=a+this._textGap,h.style.y+=a/2+this._textGap,h.style.textBaseline="bottom"),this.shapeList.push(new p(h))));for(var D=0;c>D;D++)a=b[D],d=this.getColorByIndex(D),d=this._getItemShape(l,k,m,n,this._selectedMap[D]?d:"#ccc"),d._idx=D,d.onmousemove=this._dispatchHoverLink,this.dataRangeOption.selectedMode&&(d.clickable=!0,d.onclick=this._dataRangeSelected),this.shapeList.push(new g(d)),w&&(h={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:l+m+5,y:k,color:this._selectedMap[D]?this.dataRangeOption.textStyle.color:"#ccc",text:b[D],textFont:f,textBaseline:"top"},highlightStyle:{brushType:"fill"}},"vertical"==this.dataRangeOption.orient&&"right"==this.dataRangeOption.x&&(h.style.x-=m+10,h.style.textAlign="right"),h._idx=D,h.onmousemove=this._dispatchHoverLink,this.dataRangeOption.selectedMode&&(h.clickable=!0,h.onclick=this._dataRangeSelected),this.shapeList.push(new p(h))),"horizontal"==this.dataRangeOption.orient?l+=m+(w?5:0)+(w?e.getTextWidth(a,f):0)+q:k+=n+q;!w&&this.dataRangeOption.text[1]&&("horizontal"==this.dataRangeOption.orient?l=l-q+this._textGap:k=k-q+this._textGap,h=this._getTextShape(l,k,this.dataRangeOption.text[1]),"horizontal"!=this.dataRangeOption.orient&&(h.style.y-=5,h.style.textBaseline="top"),this.shapeList.push(new p(h)))},_buildGradient:function(){var a,d,h=this.getFont(this.dataRangeOption.textStyle),b=this._itemGroupLocation.x,c=this._itemGroupLocation.y,f=this.dataRangeOption.itemWidth,l=this.dataRangeOption.itemHeight,k=e.getTextHeight("\u56fd",h),m=!0;this.dataRangeOption.text&&(m=!1,this.dataRangeOption.text[0]&&(d=this._getTextShape(b,c,this.dataRangeOption.text[0]),"horizontal"==this.dataRangeOption.orient?b+=e.getTextWidth(this.dataRangeOption.text[0],h)+this._textGap:(c+=k+this._textGap,d.style.y+=k/2+this._textGap,d.style.textBaseline="bottom"),this.shapeList.push(new p(d))));for(var h=n("zrender/tool/color"),k=1/(this.dataRangeOption.color.length-1),E=[],q=0,w=this.dataRangeOption.color.length;w>q;q++)E.push([q*k,this.dataRangeOption.color[q]]);"horizontal"==this.dataRangeOption.orient?(a={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:b,y:c,width:6*f,height:l,color:h.getLinearGradient(b,c,b+6*f,c,E)},hoverable:!1},b+=6*f+this._textGap):(a={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:b,y:c,width:f,height:6*l,color:h.getLinearGradient(b,c,b,c+6*l,E)},hoverable:!1},c+=6*l+this._textGap);this.shapeList.push(new g(a));this._calculableLocation=a.style;this.dataRangeOption.calculable&&(this._buildFiller(),this._bulidMask(),this._bulidHandle());this._buildIndicator();!m&&this.dataRangeOption.text[1]&&(d=this._getTextShape(b,c,this.dataRangeOption.text[1]),this.shapeList.push(new p(d)))},_buildIndicator:function(){var a,d,h=this._calculableLocation.x,b=this._calculableLocation.y,c=this._calculableLocation.width,e=this._calculableLocation.height;"horizontal"==this.dataRangeOption.orient?"bottom"!=this.dataRangeOption.y?(a=[[h,b+e],[h-5,b+e+5],[h+5,b+e+5]],d="bottom"):(a=[[h,b],[h-5,b-5],[h+5,b-5]],d="top"):"right"!=this.dataRangeOption.x?(a=[[h+c,b],[h+c+5,b-5],[h+c+5,b+5]],d="right"):(a=[[h,b],[h-5,b-5],[h-5,b+5]],d="left");this._indicatorShape={style:{pointList:a,color:"#fff",__rect:{x:Math.min(a[0][0],a[1][0]),y:Math.min(a[0][1],a[1][1]),width:5*("horizontal"==this.dataRangeOption.orient?2:1),height:5*("horizontal"==this.dataRangeOption.orient?1:2)}},highlightStyle:{brushType:"fill",textPosition:d,textColor:this.dataRangeOption.textStyle.color},hoverable:!1};this._indicatorShape=new f(this._indicatorShape)},_buildFiller:function(){this._fillerShape={zlevel:this.getZlevelBase(),z:this.getZBase()+1,style:{x:this._calculableLocation.x,y:this._calculableLocation.y,width:this._calculableLocation.width,height:this._calculableLocation.height,color:"rgba(255,255,255,0)"},highlightStyle:{strokeColor:"rgba(255,255,255,0.5)",lineWidth:1},draggable:!0,ondrift:this._ondrift,ondragend:this._ondragend,onmousemove:this._dispatchHoverLink,_type:"filler"};this._fillerShape=new g(this._fillerShape);this.shapeList.push(this._fillerShape)},_bulidHandle:function(){var a,d,h,b,c,g,l,k,m=this._calculableLocation.x,n=this._calculableLocation.y,p=this._calculableLocation.width,w=this._calculableLocation.height,q=this.getFont(this.dataRangeOption.textStyle),v=e.getTextHeight("\u56fd",q),G=Math.max(e.getTextWidth(this._textFormat(this.dataRangeOption.max),q),e.getTextWidth(this._textFormat(this.dataRangeOption.min),q))+2;"horizontal"==this.dataRangeOption.orient?"bottom"!=this.dataRangeOption.y?(a=[[m,n],[m,n+w+v],[m-v,n+w+v],[m-1,n+w],[m-1,n]],d=m-G/2-v,h=n+w+v/2+2,b={x:m-G-v,y:n+w,width:G+v,height:v},c=[[m+p,n],[m+p,n+w+v],[m+p+v,n+w+v],[m+p+1,n+w],[m+p+1,n]],g=m+p+G/2+v,l=h,k={x:m+p,y:n+w,width:G+v,height:v}):(a=[[m,n+w],[m,n-v],[m-v,n-v],[m-1,n],[m-1,n+w]],d=m-G/2-v,h=n-v/2-2,b={x:m-G-v,y:n-v,width:G+v,height:v},c=[[m+p,n+w],[m+p,n-v],[m+p+v,n-v],[m+p+1,n],[m+p+1,n+w]],g=m+p+G/2+v,l=h,k={x:m+p,y:n-v,width:G+v,height:v}):(G+=v,"right"!=this.dataRangeOption.x?(a=[[m,n],[m+p+v,n],[m+p+v,n-v],[m+p,n-1],[m,n-1]],d=m+p+G/2+v/2,h=n-v/2,b={x:m+p,y:n-v,width:G+v,height:v},c=[[m,n+w],[m+p+v,n+w],[m+p+v,n+v+w],[m+p,n+1+w],[m,n+w+1]],g=d,l=n+w+v/2,k={x:m+p,y:n+w,width:G+v,height:v}):(a=[[m+p,n],[m-v,n],[m-v,n-v],[m,n-1],[m+p,n-1]],d=m-G/2-v/2,h=n-v/2,b={x:m-G-v,y:n-v,width:G+v,height:v},c=[[m+p,n+w],[m-v,n+w],[m-v,n+v+w],[m,n+1+w],[m+p,n+w+1]],g=d,l=n+w+v/2,k={x:m-G-v,y:n+w,width:G+v,height:v}));this._startShape={style:{pointList:a,text:this._textFormat(this.dataRangeOption.max),textX:d,textY:h,textFont:q,color:this.getColor(this.dataRangeOption.max),rect:b,x:a[0][0],y:a[0][1],_x:a[0][0],_y:a[0][1]}};this._startShape.highlightStyle={strokeColor:this._startShape.style.color,lineWidth:1};this._endShape={style:{pointList:c,text:this._textFormat(this.dataRangeOption.min),textX:g,textY:l,textFont:q,color:this.getColor(this.dataRangeOption.min),rect:k,x:c[0][0],y:c[0][1],_x:c[0][0],_y:c[0][1]}};this._endShape.highlightStyle={strokeColor:this._endShape.style.color,lineWidth:1};this._startShape.zlevel=this._endShape.zlevel=this.getZlevelBase();this._startShape.z=this._endShape.z=this.getZBase()+1;this._startShape.draggable=this._endShape.draggable=!0;this._startShape.ondrift=this._endShape.ondrift=this._ondrift;this._startShape.ondragend=this._endShape.ondragend=this._ondragend;this._startShape.style.textColor=this._endShape.style.textColor=this.dataRangeOption.textStyle.color;this._startShape.style.textAlign=this._endShape.style.textAlign="center";this._startShape.style.textPosition=this._endShape.style.textPosition="specific";this._startShape.style.textBaseline=this._endShape.style.textBaseline="middle";this._startShape.style.width=this._endShape.style.width=0;this._startShape.style.height=this._endShape.style.height=0;this._startShape.style.textPosition=this._endShape.style.textPosition="specific";this._startShape=new f(this._startShape);this._endShape=new f(this._endShape);this.shapeList.push(this._startShape);this.shapeList.push(this._endShape)},_bulidMask:function(){var a=this._calculableLocation.x,d=this._calculableLocation.y,h=this._calculableLocation.width,b=this._calculableLocation.height;this._startMask={zlevel:this.getZlevelBase(),z:this.getZBase()+1,style:{x:a,y:d,width:"horizontal"==this.dataRangeOption.orient?0:h,height:"horizontal"==this.dataRangeOption.orient?b:0,color:"#ccc"},hoverable:!1};this._endMask={zlevel:this.getZlevelBase(),z:this.getZBase()+1,style:{x:"horizontal"==this.dataRangeOption.orient?a+h:a,y:"horizontal"==this.dataRangeOption.orient?d:d+b,width:"horizontal"==this.dataRangeOption.orient?0:h,height:"horizontal"==this.dataRangeOption.orient?b:0,color:"#ccc"},hoverable:!1};this._startMask=new g(this._startMask);this._endMask=new g(this._endMask);this.shapeList.push(this._startMask);this.shapeList.push(this._endMask)},_buildBackground:function(){var a=this.reformCssArray(this.dataRangeOption.padding);this.shapeList.push(new g({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._itemGroupLocation.x-a[3],y:this._itemGroupLocation.y-a[0],width:this._itemGroupLocation.width+a[3]+a[1],height:this._itemGroupLocation.height+a[0]+a[2],brushType:0===this.dataRangeOption.borderWidth?"fill":"both",color:this.dataRangeOption.backgroundColor,strokeColor:this.dataRangeOption.borderColor,lineWidth:this.dataRangeOption.borderWidth}}))},_getItemGroupLocation:function(){var a=this._valueTextList,d=a.length,h=this.dataRangeOption.itemGap,b=this.dataRangeOption.itemWidth,c=this.dataRangeOption.itemHeight,f=0,g=this.getFont(this.dataRangeOption.textStyle),l=e.getTextHeight("\u56fd",g);if("horizontal"==this.dataRangeOption.orient){if(this.dataRangeOption.text||0>=this.dataRangeOption.splitNumber||this.dataRangeOption.calculable)f=(0>=this.dataRangeOption.splitNumber||this.dataRangeOption.calculable?6*b+h:d*(b+h))+(this.dataRangeOption.text&&"undefined"!=typeof this.dataRangeOption.text[0]?e.getTextWidth(this.dataRangeOption.text[0],g)+this._textGap:0)+(this.dataRangeOption.text&&"undefined"!=typeof this.dataRangeOption.text[1]?e.getTextWidth(this.dataRangeOption.text[1],g)+this._textGap:0);else for(var b=b+5,k=0;d>k;k++)f+=b+e.getTextWidth(a[k],g)+h;f-=h;c=Math.max(l,c)}else{if(this.dataRangeOption.text||0>=this.dataRangeOption.splitNumber||this.dataRangeOption.calculable)c=(0>=this.dataRangeOption.splitNumber||this.dataRangeOption.calculable?6*c+h:d*(c+h))+(this.dataRangeOption.text&&"undefined"!=typeof this.dataRangeOption.text[0]?this._textGap+l:0)+(this.dataRangeOption.text&&"undefined"!=typeof this.dataRangeOption.text[1]?this._textGap+l:0),f=Math.max(e.getTextWidth(this.dataRangeOption.text&&this.dataRangeOption.text[0]||"",g),e.getTextWidth(this.dataRangeOption.text&&this.dataRangeOption.text[1]||"",g)),f=Math.max(b,f);else{c=(c+h)*d;b+=5;for(k=f=0;d>k;k++)f=Math.max(f,e.getTextWidth(a[k],g));f=b+f}c-=h}b=this.reformCssArray(this.dataRangeOption.padding);d=this.zr.getWidth();switch(this.dataRangeOption.x){case "center":a=Math.floor((d-f)/2);break;case "left":a=b[3]+this.dataRangeOption.borderWidth;break;case "right":a=d-f-b[1]-this.dataRangeOption.borderWidth;break;default:a=this.parsePercent(this.dataRangeOption.x,d),a=isNaN(a)?0:a}h=this.zr.getHeight();switch(this.dataRangeOption.y){case "top":b=b[0]+this.dataRangeOption.borderWidth;break;case "bottom":b=h-c-b[2]-this.dataRangeOption.borderWidth;break;case "center":b=Math.floor((h-c)/2);break;default:b=this.parsePercent(this.dataRangeOption.y,h),b=isNaN(b)?0:b}this.dataRangeOption.calculable&&(g=Math.max(e.getTextWidth(this.dataRangeOption.max,g),e.getTextWidth(this.dataRangeOption.min,g))+l,"horizontal"==this.dataRangeOption.orient?(g>a&&(a=g),a+f+g>d&&(a-=g)):(l>b&&(b=l),b+c+l>h&&(b-=l)));return{x:a,y:b,width:f,height:c}},_getTextShape:function(a,d,h){return{zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:"horizontal"==this.dataRangeOption.orient?a:this._itemGroupLocation.x+this._itemGroupLocation.width/2,y:"horizontal"==this.dataRangeOption.orient?this._itemGroupLocation.y+this._itemGroupLocation.height/2:d,color:this.dataRangeOption.textStyle.color,text:h,textFont:this.getFont(this.dataRangeOption.textStyle),textBaseline:"horizontal"==this.dataRangeOption.orient?"middle":"top",textAlign:"horizontal"==this.dataRangeOption.orient?"left":"center"},hoverable:!1}},_getItemShape:function(a,d,h,b,c){return{zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:a,y:d+1,width:h,height:b-2,color:c},highlightStyle:{strokeColor:c,lineWidth:1}}},__ondrift:function(a,d,h){var b=this._calculableLocation.x,c=this._calculableLocation.y,e=this._calculableLocation.width,f=this._calculableLocation.height;return"horizontal"==this.dataRangeOption.orient?a.style.x+d<=b?a.style.x=b:a.style.x+d+a.style.width>=b+e?a.style.x=b+e-a.style.width:a.style.x+=d:a.style.y+h<=c?a.style.y=c:a.style.y+h+a.style.height>=c+f?a.style.y=c+f-a.style.height:a.style.y+=h,"filler"==a._type?this._syncHandleShape():this._syncFillerShape(a),this.dataRangeOption.realtime&&this._dispatchDataRange(),!0},__ondragend:function(){this.isDragend=!0},ondragend:function(a,d){this.isDragend&&a.target&&(d.dragOut=!0,d.dragIn=!0,this.dataRangeOption.realtime||this._dispatchDataRange(),d.needRefresh=!1,this.isDragend=!1)},_syncShapeFromRange:function(){var a=this.dataRangeOption.range||{};if(this._range.end="undefined"!=typeof this._range.end?this._range.end:"undefined"!=typeof a.start?a.start:0,this._range.start="undefined"!=typeof this._range.start?this._range.start:"undefined"!=typeof a.end?a.end:100,100!=this._range.start||0!==this._range.end)"horizontal"==this.dataRangeOption.orient?(a=this._fillerShape.style.width,this._fillerShape.style.x+=a*(100-this._range.start)/100,this._fillerShape.style.width=a*(this._range.start-this._range.end)/100):(a=this._fillerShape.style.height,this._fillerShape.style.y+=a*(100-this._range.start)/100,this._fillerShape.style.height=a*(this._range.start-this._range.end)/100),this.zr.modShape(this._fillerShape.id),this._syncHandleShape()},_syncHandleShape:function(){var a=this._calculableLocation.x,d=this._calculableLocation.y,h=this._calculableLocation.width,b=this._calculableLocation.height;"horizontal"==this.dataRangeOption.orient?(this._startShape.style.x=this._fillerShape.style.x,this._startMask.style.width=this._startShape.style.x-a,this._endShape.style.x=this._fillerShape.style.x+this._fillerShape.style.width,this._endMask.style.x=this._endShape.style.x,this._endMask.style.width=a+h-this._endShape.style.x,this._range.start=Math.ceil(100-(this._startShape.style.x-a)/h*100),this._range.end=Math.floor(100-(this._endShape.style.x-a)/h*100)):(this._startShape.style.y=this._fillerShape.style.y,this._startMask.style.height=this._startShape.style.y-d,this._endShape.style.y=this._fillerShape.style.y+this._fillerShape.style.height,this._endMask.style.y=this._endShape.style.y,this._endMask.style.height=d+b-this._endShape.style.y,this._range.start=Math.ceil(100-(this._startShape.style.y-d)/b*100),this._range.end=Math.floor(100-(this._endShape.style.y-d)/b*100));this._syncShape()},_syncFillerShape:function(a){var d,h,b=this._calculableLocation.x,c=this._calculableLocation.y,e=this._calculableLocation.width,f=this._calculableLocation.height;"horizontal"==this.dataRangeOption.orient?(d=this._startShape.style.x,h=this._endShape.style.x,a.id==this._startShape.id&&d>=h?(h=d,this._endShape.style.x=d):a.id==this._endShape.id&&d>=h&&(d=h,this._startShape.style.x=d),this._fillerShape.style.x=d,this._fillerShape.style.width=h-d,this._startMask.style.width=d-b,this._endMask.style.x=h,this._endMask.style.width=b+e-h,this._range.start=Math.ceil(100-(d-b)/e*100),this._range.end=Math.floor(100-(h-b)/e*100)):(d=this._startShape.style.y,h=this._endShape.style.y,a.id==this._startShape.id&&d>=h?(h=d,this._endShape.style.y=d):a.id==this._endShape.id&&d>=h&&(d=h,this._startShape.style.y=d),this._fillerShape.style.y=d,this._fillerShape.style.height=h-d,this._startMask.style.height=d-c,this._endMask.style.y=h,this._endMask.style.height=c+f-h,this._range.start=Math.ceil(100-(d-c)/f*100),this._range.end=Math.floor(100-(h-c)/f*100));this._syncShape()},_syncShape:function(){this._startShape.position=[this._startShape.style.x-this._startShape.style._x,this._startShape.style.y-this._startShape.style._y];this._startShape.style.text=this._textFormat(this._gap*this._range.start+this.dataRangeOption.min);this._startShape.style.color=this._startShape.highlightStyle.strokeColor=this.getColor(this._gap*this._range.start+this.dataRangeOption.min);this._endShape.position=[this._endShape.style.x-this._endShape.style._x,this._endShape.style.y-this._endShape.style._y];this._endShape.style.text=this._textFormat(this._gap*this._range.end+this.dataRangeOption.min);this._endShape.style.color=this._endShape.highlightStyle.strokeColor=this.getColor(this._gap*this._range.end+this.dataRangeOption.min);this.zr.modShape(this._startShape.id);this.zr.modShape(this._endShape.id);this.zr.modShape(this._startMask.id);this.zr.modShape(this._endMask.id);this.zr.modShape(this._fillerShape.id);this.zr.refreshNextFrame()},_dispatchDataRange:function(){this.messageCenter.dispatch(c.EVENT.DATA_RANGE,null,{range:{start:this._range.end,end:this._range.start}},this.myChart)},__dataRangeSelected:function(a){if("single"===this.dataRangeOption.selectedMode)for(var d in this._selectedMap)this._selectedMap[d]=!1;d=a.target._idx;this._selectedMap[d]=!this._selectedMap[d];var h=(this._colorList.length-d)*this._gap+this.dataRangeOption.min;this.messageCenter.dispatch(c.EVENT.DATA_RANGE_SELECTED,a.event,{selected:this._selectedMap,target:d,valueMax:h,valueMin:h-this._gap},this.myChart);this.messageCenter.dispatch(c.EVENT.REFRESH,null,null,this.myChart)},__dispatchHoverLink:function(a){var d,h;if(this.dataRangeOption.calculable){var b=this.dataRangeOption.max-this.dataRangeOption.min;h="horizontal"==this.dataRangeOption.orient?(1-(m.getX(a.event)-this._calculableLocation.x)/this._calculableLocation.width)*b:(1-(m.getY(a.event)-this._calculableLocation.y)/this._calculableLocation.height)*b;d=h-.05*b;h+=.05*b}else h=(this._colorList.length-a.target._idx)*this._gap+this.dataRangeOption.min,d=h-this._gap;this.messageCenter.dispatch(c.EVENT.DATA_RANGE_HOVERLINK,a.event,{valueMin:d,valueMax:h},this.myChart)},__onhoverlink:function(a){if(this.dataRangeOption.show&&this.dataRangeOption.hoverLink&&this._indicatorShape&&a&&null!=a.seriesIndex&&null!=a.dataIndex){var d=a.value;""===d||isNaN(d)||(dthis.dataRangeOption.max&&(d=this.dataRangeOption.max),this._indicatorShape.position="horizontal"==this.dataRangeOption.orient?[(this.dataRangeOption.max-d)/(this.dataRangeOption.max-this.dataRangeOption.min)*this._calculableLocation.width,0]:[0,(this.dataRangeOption.max-d)/(this.dataRangeOption.max-this.dataRangeOption.min)*this._calculableLocation.height],this._indicatorShape.style.text=this._textFormat(a.value),this._indicatorShape.style.color=this.getColor(d),this.zr.addHoverShape(this._indicatorShape))}},_textFormat:function(a,d){if(a=a.toFixed(this.dataRangeOption.precision),d=null!=d?d.toFixed(this.dataRangeOption.precision):"",this.dataRangeOption.formatter){if("string"==typeof this.dataRangeOption.formatter)return this.dataRangeOption.formatter.replace("{value}",a).replace("{value2}",d);if("function"==typeof this.dataRangeOption.formatter)return this.dataRangeOption.formatter.call(this.myChart,a,d)}return""!==d?a+" - "+d:a},refresh:function(a){if(a){this.option=a;this.option.dataRange=this.reformOption(this.option.dataRange);this.dataRangeOption=this.option.dataRange;a=0>=this.dataRangeOption.splitNumber||this.dataRangeOption.calculable?100:this.dataRangeOption.splitNumber;if(this._colorList=b.getGradientColors(this.dataRangeOption.color,Math.max((a-this.dataRangeOption.color.length)/(this.dataRangeOption.color.length-1),0)+1),this._colorList.length>a){for(var d=this._colorList.length,h=[this._colorList[0]],c=d/(a-1),e=1;a-1>e;e++)h.push(this._colorList[Math.floor(e*c)]);h.push(this._colorList[d-1]);this._colorList=h}d=this.dataRangeOption.precision;for(this._gap=(this.dataRangeOption.max-this.dataRangeOption.min)/a;this._gap.toFixed(d)-0!=this._gap&&5>d;)d++;this.dataRangeOption.precision=d;this._gap=((this.dataRangeOption.max-this.dataRangeOption.min)/a).toFixed(d)-0;this._valueTextList=[];for(e=0;a>e;e++)this._selectedMap[e]=!0,this._valueTextList.unshift(this._textFormat(e*this._gap+this.dataRangeOption.min,(e+1)*this._gap+this.dataRangeOption.min))}this.clear();this._buildShape()},getColor:function(a){if(isNaN(a))return null;if(this.dataRangeOption.min==this.dataRangeOption.max)return this._colorList[0];if(athis.dataRangeOption.max&&(a=this.dataRangeOption.max),this.dataRangeOption.calculable&&(5E-5a-(this._gap*this._range.end+this.dataRangeOption.min)))return null;a=this._colorList.length-Math.ceil((a-this.dataRangeOption.min)/(this.dataRangeOption.max-this.dataRangeOption.min)*this._colorList.length);return a==this._colorList.length&&a--,this._selectedMap[a]?this._colorList[a]:null},getColorByIndex:function(a){return a>=this._colorList.length?a=this._colorList.length-1:0>a&&(a=0),this._colorList[a]},onbeforDispose:function(){this.messageCenter.unbind(c.EVENT.HOVER,this._onhoverlink)}},l.inherits(k,q),n("../component").define("dataRange",k),k});u("echarts/util/shape/HandlePolygon",["require","zrender/shape/Base","zrender/shape/Polygon","zrender/tool/util"],function(n){function k(g){q.call(this,g)}var q=n("zrender/shape/Base"),p=n("zrender/shape/Polygon");n=n("zrender/tool/util");return k.prototype={type:"handle-polygon",buildPath:function(g,f){p.prototype.buildPath(g,f)},isCover:function(g,f){var c=this.getTansform(g,f);g=c[0];f=c[1];c=this.style.rect;return g>=c.x&&g<=c.x+c.width&&f>=c.y&&f<=c.y+c.height?!0:!1}},n.inherits(k,q),k});u("echarts/chart/k","require ./base ../util/shape/Candle ../component/axis ../component/grid ../component/dataZoom ../config ../util/ecData zrender/tool/util ../chart".split(" "),function(n){function k(c,f,e,b,a){q.call(this,c,f,e,b,a);this.refresh(b)}var q=n("./base"),p=n("../util/shape/Candle");n("../component/axis");n("../component/grid");n("../component/dataZoom");var g=n("../config");g.k={zlevel:0,z:2,clickable:!0,hoverable:!0,legendHoverLink:!1,xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{color:"#fff",color0:"#00aa11",lineStyle:{width:1,color:"#ff3200",color0:"#00aa11"}},emphasis:{}}};var f=n("../util/ecData"),c=n("zrender/tool/util");return k.prototype={type:g.CHART_TYPE_K,_buildShape:function(){var c=this.series;this.selectedMap={};for(var f,e={top:[],bottom:[]},b=0,a=c.length;a>b;b++)c[b].type===g.CHART_TYPE_K&&(c[b]=this.reformOption(c[b]),this.legendHoverLink=c[b].legendHoverLink||this.legendHoverLink,f=this.component.xAxis.getAxis(c[b].xAxisIndex),f.type===g.COMPONENT_TYPE_AXIS_CATEGORY&&e[f.getPosition()].push(b));for(var d in e)0b;b++)this.buildMark(f[b])},_mapData:function(c){for(var f,e,b=this.series,a=this.component.legend,d=[],h=0,g=0,k=c.length;k>g;g++)f=b[c[g]],e=f.name,this.selectedMap[e]=a?a.isSelected(e):!0,this.selectedMap[e]&&d.push(c[g]),h=Math.max(h,f.data.length);return{locationMap:d,maxDataLength:h}},_buildHorizontal:function(c,f,e){for(var b,a,d,h,g,k,n=this.series,p={},q=0,F=e.length;F>q;q++){b=e[q];a=n[b];d=a.xAxisIndex||0;d=this.component.xAxis.getAxis(d);g=a.barWidth||Math.floor(d.getGap()/2);(h=a.barMaxWidth)&&g>h&&(g=h);h=a.yAxisIndex||0;h=this.component.yAxis.getAxis(h);p[b]=[];for(var E=0,L=f;L>E&&null!=d.getNameByIndex(E);E++)k=a.data[E],k=this.getDataFromOption(k,"-"),"-"!==k&&4==k.length&&p[b].push([d.getCoordByIndex(E),g,h.getCoord(k[0]),h.getCoord(k[1]),h.getCoord(k[2]),h.getCoord(k[3]),E,d.getNameByIndex(E)])}this._buildKLine(c,p)},_buildKLine:function(c,f){for(var e,b,a,d,h,k,r,n,p,q,F,E,L,w,D,v,G=this.series,C=0,z=c.length;z>C;C++)if(v=c[C],F=G[v],L=f[v],this._isLarge(L)&&(L=this._getLargePointList(L)),F.type===g.CHART_TYPE_K&&null!=L){E=F;e=this.query(E,"itemStyle.normal.lineStyle.width");b=this.query(E,"itemStyle.normal.lineStyle.color");a=this.query(E,"itemStyle.normal.lineStyle.color0");d=this.query(E,"itemStyle.normal.color");h=this.query(E,"itemStyle.normal.color0");k=this.query(E,"itemStyle.emphasis.lineStyle.width");r=this.query(E,"itemStyle.emphasis.lineStyle.color");n=this.query(E,"itemStyle.emphasis.lineStyle.color0");p=this.query(E,"itemStyle.emphasis.color");q=this.query(E,"itemStyle.emphasis.color0");for(var B=0,A=L.length;A>B;B++)w=L[B],E=F.data[w[6]],D=w[3]c[0][1]},_getLargePointList:function(c){for(var f=this.component.grid.getWidth(),e=c.length,b=[],a=0;f>a;a++)b[a]=c[Math.floor(e/f*a)];return b},_getCandle:function(c,g,e,b,a,d,h,k,r,n,x,q,F,E,L){var w=this.series;b={zlevel:this.getZlevelBase(),z:this.getZBase(),clickable:this.deepQuery([w[c].data[g],w[c]],"clickable"),hoverable:this.deepQuery([w[c].data[g],w[c]],"hoverable"),style:{x:b,y:[d,h,k,r],width:a,color:n,strokeColor:q,lineWidth:x,brushType:"both"},highlightStyle:{color:F,strokeColor:L,lineWidth:E},_seriesIndex:c};return f.pack(b,w[c],c,w[c].data[g],g,e),new p(b)},getMarkCoord:function(c,f){var e=this.series[c],b=this.component.xAxis.getAxis(e.xAxisIndex),e=this.component.yAxis.getAxis(e.yAxisIndex);return["string"!=typeof f.xAxis&&b.getCoordByIndex?b.getCoordByIndex(f.xAxis||0):b.getCoord(f.xAxis||0),"string"!=typeof f.yAxis&&e.getCoordByIndex?e.getCoordByIndex(f.yAxis||0):e.getCoord(f.yAxis||0)]},refresh:function(c){c&&(this.option=c,this.series=c.series);this.backupShapeList();this._buildShape()},addDataAnimation:function(c){for(var g=this.series,e={},b=0,a=c.length;a>b;b++)e[c[b][0]]=c[b];for(var d,h,k,b=0,a=this.shapeList.length;a>b;b++)if(h=this.shapeList[b]._seriesIndex,e[h]&&!e[h][3]&&"candle"===this.shapeList[b].type)(k=f.get(this.shapeList[b],"dataIndex"),d=g[h],e[h][2]&&k===d.data.length-1)?this.zr.delShape(this.shapeList[b].id):e[h][2]||0!==k?(c=this.component.xAxis.getAxis(d.xAxisIndex||0).getGap(),c=e[h][2]?c:-c,this.zr.animate(this.shapeList[b].id,"").when(this.query(this.option,"animationDurationUpdate"),{position:[c,0]}).start()):this.zr.delShape(this.shapeList[b].id)}},c.inherits(k,q),n("../chart").define("k",k),k});u("echarts/chart/pie","require ./base zrender/shape/Text zrender/shape/Ring zrender/shape/Circle zrender/shape/Sector zrender/shape/Polyline ../config ../util/ecData zrender/tool/util zrender/tool/math zrender/tool/color ../chart".split(" "),function(n){function k(a,d,b,c,f){q.call(this,a,d,b,c,f);var g=this;g.shapeHandler.onmouseover=function(a){a=a.target;var d=e.get(a,"seriesIndex"),b=e.get(a,"dataIndex"),h=e.get(a,"special"),c=[a.style.x,a.style.y],f=((a.style.endAngle+a.style.startAngle)/2+360)%360,l=a.highlightStyle.color;(h=g.getLabel(d,b,h,c,f,l,!0))&&g.zr.addHoverShape(h);(a=g.getLabelLine(d,b,c,a.style.r0,a.style.r,f,l,!0))&&g.zr.addHoverShape(a)};this.refresh(c)}var q=n("./base"),p=n("zrender/shape/Text"),g=n("zrender/shape/Ring"),f=n("zrender/shape/Circle"),c=n("zrender/shape/Sector"),l=n("zrender/shape/Polyline"),m=n("../config");m.pie={zlevel:0,z:2,clickable:!0,legendHoverLink:!0,center:["50%","50%"],radius:[0,"55%"],clockWise:!0,startAngle:90,minAngle:0,selectedOffset:10,itemStyle:{normal:{borderColor:"rgba(0,0,0,0)",borderWidth:1,label:{show:!0,position:"outer"},labelLine:{show:!0,length:10,lineStyle:{width:1,type:"solid"}}},emphasis:{borderColor:"rgba(0,0,0,0)",borderWidth:1,label:{show:!1},labelLine:{show:!1,length:10,lineStyle:{width:1,type:"solid"}}}}};var e=n("../util/ecData"),b=n("zrender/tool/util"),a=n("zrender/tool/math"),d=n("zrender/tool/color");return k.prototype={type:m.CHART_TYPE_PIE,_buildShape:function(){var a=this.series,d=this.component.legend;this.selectedMap={};this._selected={};var b,c,l;this._selectedMode=!1;for(var k,n=0,p=a.length;p>n;n++)a[n].type===m.CHART_TYPE_PIE&&(a[n]=this.reformOption(a[n]),this.legendHoverLink=a[n].legendHoverLink||this.legendHoverLink,k=a[n].name||"",this.selectedMap[k]=d?d.isSelected(k):!0,this.selectedMap[k])&&(b=this.parseCenter(this.zr,a[n].center),c=this.parseRadius(this.zr,a[n].radius),this._selectedMode=this._selectedMode||a[n].selectedMode,this._selected[n]=[],this.deepQuery([a[n],this.option],"calculable")&&(l={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:b[0],y:b[1],r0:10>=c[0]?0:c[0]-10,r:c[1]+10,brushType:"stroke",lineWidth:1,strokeColor:a[n].calculableHolderColor||this.ecTheme.calculableHolderColor||m.calculableHolderColor}},e.pack(l,a[n],n,void 0,-1),this.setCalculable(l),l=10>=c[0]?new f(l):new g(l),this.shapeList.push(l)),this._buildSinglePie(n),this.buildMark(n));this.addShapeList()},_buildSinglePie:function(a){for(var d,b=this.series[a],c=b.data,e=this.component.legend,f=0,g=0,l=0,k=Number.NEGATIVE_INFINITY,m=[],n=0,p=c.length;p>n;n++)d=c[n].name,this.selectedMap[d]=e?e.isSelected(d):!0,this.selectedMap[d]&&!isNaN(c[n].value)&&(0!==+c[n].value?f++:g++,l+=+c[n].value,k=Math.max(k,+c[n].value));if(0!==l){for(var q,C,z,B,A,u=100,N=b.clockWise,K=(b.startAngle.toFixed(2)-0+360)%360,I=b.minAngle||.01,g=360-I*f-.01*g,M=b.roseType,n=0,p=c.length;p>n;n++)if(d=c[n].name,this.selectedMap[d]&&!isNaN(c[n].value)){if(f=e?e.getColor(d):this.zr.getColor(n),u=c[n].value/l,q="area"!=M?N?K-u*g-(0!==u?I:.01):u*g+K+(0!==u?I:.01):N?K-360/p:360/p+K,q=q.toFixed(2)-0,u=(100*u).toFixed(2),C=this.parseCenter(this.zr,b.center),z=this.parseRadius(this.zr,b.radius),B=+z[0],A=+z[1],"radius"===M?A=c[n].value/k*(A-B)*.8+.2*(A-B)+B:"area"===M&&(A=Math.sqrt(c[n].value/k)*(A-B)+B),N){var O;O=K;K=q;q=O}this._buildItem(m,a,n,u,c[n].selected,C,B,A,K,q,f);N||(K=q)}this._autoLabelLayout(m,C,A);n=0;for(p=m.length;p>n;n++)this.shapeList.push(m[n])}},_buildItem:function(a,d,b,c,f,g,l,k,m,n,p){var q=this.series,G=((n+m)/2+360)%360;f=this.getSector(d,b,c,f,g,l,k,m,n,p);e.pack(f,q[d],d,q[d].data[b],b,q[d].data[b].name,c);a.push(f);f=this.getLabel(d,b,c,g,G,p,!1);(g=this.getLabelLine(d,b,g,l,k,G,p,!1))&&(e.pack(g,q[d],d,q[d].data[b],b,q[d].data[b].name,c),a.push(g));f&&(e.pack(f,q[d],d,q[d].data[b],b,q[d].data[b].name,c),f._labelLine=g,a.push(f))},getSector:function(b,e,f,g,l,k,m,n,p,q){f=this.series[b];var D=f.data[e],v=[D,f],G=this.deepMerge(v,"itemStyle.normal")||{},C=this.deepMerge(v,"itemStyle.emphasis")||{};q=this.getItemStyleColor(G.color,b,e,D)||q;var z=this.getItemStyleColor(C.color,b,e,D)||("string"==typeof q?d.lift(q,-.2):q);l={zlevel:this.getZlevelBase(),z:this.getZBase(),clickable:this.deepQuery(v,"clickable"),style:{x:l[0],y:l[1],r0:k,r:m,startAngle:n,endAngle:p,brushType:"both",color:q,lineWidth:G.borderWidth,strokeColor:G.borderColor,lineJoin:"round"},highlightStyle:{color:z,lineWidth:C.borderWidth,strokeColor:C.borderColor,lineJoin:"round"},_seriesIndex:b,_dataIndex:e};g?(g=((l.style.startAngle+l.style.endAngle)/2).toFixed(2)-0,l.style._hasSelected=!0,l.style._x=l.style.x,l.style._y=l.style.y,k=this.query(f,"selectedOffset"),l.style.x+=a.cos(g,!0)*k,l.style.y-=a.sin(g,!0)*k,this._selected[b][e]=!0):this._selected[b][e]=!1;return this._selectedMode&&(l.onclick=this.shapeHandler.onclick),this.deepQuery([D,f,this.option],"calculable")&&(this.setCalculable(l),l.draggable=!0),(this._needLabel(f,D,!0)||this._needLabelLine(f,D,!0))&&(l.onmouseover=this.shapeHandler.onmouseover),new c(l)},getLabel:function(d,c,e,f,g,l,k){var m=this.series[d],n=m.data[c];if(this._needLabel(m,n,k)){var q,D,v,G=k?"emphasis":"normal",C=b.merge(b.clone(n.itemStyle)||{},m.itemStyle);k=C[G].label;var z=k.textStyle||{},B=f[0];f=f[1];m=this.parseRadius(this.zr,m.radius);k.position=k.position||C.normal.label.position;"center"===k.position?(q=B,D=f,v="center"):"inner"===k.position||"inside"===k.position?(m=(m[0]+m[1])*(k.distance||.5),q=Math.round(B+m*a.cos(g,!0)),D=Math.round(f-m*a.sin(g,!0)),l="#fff",v="center"):(m=m[1]- -C[G].labelLine.length,q=Math.round(B+m*a.cos(g,!0)),D=Math.round(f-m*a.sin(g,!0)),v=90<=g&&270>=g?"right":"left");"center"!=k.position&&"inner"!=k.position&&"inside"!=k.position&&(q+="left"===v?20:-20);n.__labelX=q-("left"===v?5:-5);n.__labelY=D;e=new p({zlevel:this.getZlevelBase(),z:this.getZBase()+1,hoverable:!1,style:{x:q,y:D,color:z.color||l,text:this.getLabelText(d,c,e,G),textAlign:z.align||v,textBaseline:z.baseline||"middle",textFont:this.getFont(z)},highlightStyle:{brushType:"fill"}});return e._radius=m,e._labelPosition=k.position||"outer",e._rect=e.getRect(e.style),e._seriesIndex=d,e._dataIndex=c,e}},getLabelText:function(a,d,b,c){var e=this.series[a],f=e.data[d];return(c=this.deepQuery([f,e],"itemStyle."+c+".label.formatter"))?"function"==typeof c?c.call(this.myChart,{seriesIndex:a,seriesName:e.name||"",series:e,dataIndex:d,data:f,name:f.name,value:f.value,percent:b}):"string"==typeof c?(c=c.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}").replace("{d}","{d0}"),c.replace("{a0}",e.name).replace("{b0}",f.name).replace("{c0}",f.value).replace("{d0}",b)):void 0:f.name},getLabelLine:function(d,c,e,f,g,k,m,n){var p=this.series[d];f=p.data[c];if(this._needLabelLine(p,f,n)){n=n?"emphasis":"normal";var q=b.merge(b.clone(f.itemStyle)||{},p.itemStyle)[n].labelLine;n=q.lineStyle||{};var D=e[0];e=e[1];p=this.parseRadius(this.zr,p.radius)[1]- -q.length;q=a.cos(k,!0);k=a.sin(k,!0);return new l({zlevel:this.getZlevelBase(),z:this.getZBase()+1,hoverable:!1,style:{pointList:[[D+g*q,e-g*k],[D+p*q,e-p*k],[f.__labelX,f.__labelY]],strokeColor:n.color||m,lineType:n.type,lineWidth:n.width},_seriesIndex:d,_dataIndex:c})}},_needLabel:function(a,d,b){return this.deepQuery([d,a],"itemStyle."+(b?"emphasis":"normal")+".label.show")},_needLabelLine:function(a,d,b){return this.deepQuery([d,a],"itemStyle."+(b?"emphasis":"normal")+".labelLine.show")},_autoLabelLayout:function(a,d,b){for(var c=[],e=[],f=0,g=a.length;g>f;f++)("outer"===a[f]._labelPosition||"outside"===a[f]._labelPosition)&&(a[f]._rect._y=a[f]._rect.y,a[f]._rect.xg;g++)if(a[g]._rect.y+=c,a[g].style.y+=c,a[g]._labelLine&&(a[g]._labelLine.style.pointList[1][1]+=c,a[g]._labelLine.style.pointList[2][1]+=c),g>d&&b>g+1&&a[g+1]._rect.y>a[g]._rect.y+a[g]._rect.height)return void f(g,c/2);f(b-1,c/2)}function f(d,b){for(var c=d;0<=c&&(a[c]._rect.y-=b,a[c].style.y-=b,a[c]._labelLine&&(a[c]._labelLine.style.pointList[1][1]-=b,a[c]._labelLine.style.pointList[2][1]-=b),!(0a[c-1]._rect.y+a[c-1]._rect.height));c--);}function g(a,d,b,h,c){var e,f,l=b[0];b=b[1];for(var k=d?Number.MAX_VALUE:0,m=0,n=a.length;n>m;m++)e=Math.abs(a[m]._rect.y-b),f=a[m]._radius-h,e=h+f>e?Math.sqrt((h+f+20)*(h+f+20)-Math.pow(a[m]._rect.y-b,2)):Math.abs(a[m]._rect.x+(0=k&&(e=k-10),!d&&k>=e&&(e=k+10),a[m]._rect.x=a[m].style.x=l+e*c,a[m]._labelLine&&(a[m]._labelLine.style.pointList[2][0]=l+(e-5)*c,a[m]._labelLine.style.pointList[1][0]=l+(e-20)*c),k=e}a.sort(function(a,d){return a._rect.y-d._rect.y});var l;l=0;for(var k=a.length,m=[],n=[],p=0;k>p;p++)l=a[p]._rect.y-l,0>l&&e(p,k,-l,c),l=a[p]._rect.y+a[p]._rect.height;0>this.zr.getHeight()-l&&f(k-1,l-this.zr.getHeight());for(p=0;k>p;p++)a[p]._rect.y>=d[1]?n.push(a[p]):m.push(a[p]);g(n,!0,d,b,c);g(m,!1,d,b,c)},reformOption:function(a){var d=b.merge;return a=d(d(a||{},b.clone(this.ecTheme.pie||{})),b.clone(m.pie)),a.itemStyle.normal.label.textStyle=this.getTextStyle(a.itemStyle.normal.label.textStyle),a.itemStyle.emphasis.label.textStyle=this.getTextStyle(a.itemStyle.emphasis.label.textStyle),a},refresh:function(a){a&&(this.option=a,this.series=a.series);this.backupShapeList();this._buildShape()},addDataAnimation:function(a){for(var d=this.series,b={},c=0,e=a.length;e>c;c++)b[a[c][0]]=a[c];var f={},g={},l={},k=this.shapeList;this.shapeList=[];for(var n,p,q,G={},c=0,e=a.length;e>c;c++)n=a[c][0],p=a[c][2],q=a[c][3],d[n]&&d[n].type===m.CHART_TYPE_PIE&&(p?(q||(f[n+"_"+d[n].data.length]="delete"),G[n]=1):q?G[n]=0:(f[n+"_-1"]="delete",G[n]=-1),this._buildSinglePie(n));for(var C,z,c=0,e=this.shapeList.length;e>c;c++)switch(n=this.shapeList[c]._seriesIndex,C=this.shapeList[c]._dataIndex,z=n+"_"+C,this.shapeList[c].type){case "sector":f[z]=this.shapeList[c];break;case "text":g[z]=this.shapeList[c];break;case "polyline":l[z]=this.shapeList[c]}this.shapeList=[];for(var u,c=0,e=k.length;e>c;c++)if((n=k[c]._seriesIndex,b[n])&&(C=k[c]._dataIndex+G[n],z=n+"_"+C,u=f[z],u))if("sector"===k[c].type)"delete"!=u?this.zr.animate(k[c].id,"style").when(400,{startAngle:u.style.startAngle,endAngle:u.style.endAngle}).start():this.zr.animate(k[c].id,"style").when(400,0>G[n]?{startAngle:k[c].style.startAngle}:{endAngle:k[c].style.endAngle}).start();else if("text"===k[c].type||"polyline"===k[c].type)if("delete"===u)this.zr.delShape(k[c].id);else switch(k[c].type){case "text":u=g[z];this.zr.animate(k[c].id,"style").when(400,{x:u.style.x,y:u.style.y}).start();break;case "polyline":u=l[z],this.zr.animate(k[c].id,"style").when(400,{pointList:u.style.pointList}).start()}this.shapeList=k},onclick:function(d){var b=this.series;if(this.isClick&&d.target){this.isClick=!1;for(var c,f=d.target,g=f.style,l=e.get(f,"seriesIndex"),k=e.get(f,"dataIndex"),n=0,p=this.shapeList.length;p>n;n++)if(this.shapeList[n].id===f.id){if(l=e.get(f,"seriesIndex"),k=e.get(f,"dataIndex"),g._hasSelected)f.style.x=f.style._x,f.style.y=f.style._y,f.style._hasSelected=!1,this._selected[l][k]=!1;else{var q=((g.startAngle+g.endAngle)/2).toFixed(2)-0;f.style._hasSelected=!0;this._selected[l][k]=!0;f.style._x=f.style.x;f.style._y=f.style.y;c=this.query(b[l],"selectedOffset");f.style.x+=a.cos(q,!0)*c;f.style.y-=a.sin(q,!0)*c}this.zr.modShape(f.id,f)}else this.shapeList[n].style._hasSelected&&"single"===this._selectedMode&&(l=e.get(this.shapeList[n],"seriesIndex"),k=e.get(this.shapeList[n],"dataIndex"),this.shapeList[n].style.x=this.shapeList[n].style._x,this.shapeList[n].style.y=this.shapeList[n].style._y,this.shapeList[n].style._hasSelected=!1,this._selected[l][k]=!1,this.zr.modShape(this.shapeList[n].id,this.shapeList[n]));this.messageCenter.dispatch(m.EVENT.PIE_SELECTED,d.event,{selected:this._selected,target:e.get(f,"name")},this.myChart);this.zr.refreshNextFrame()}}},b.inherits(k,q),n("../chart").define("pie",k),k});u("zrender/shape/Ring",["require","./Base","../tool/util"],function(n){var k=n("./Base"),q=function(n){k.call(this,n)};return q.prototype={type:"ring",buildPath:function(k,g){k.arc(g.x,g.y,g.r,0,2*Math.PI,!1);k.moveTo(g.x+g.r0,g.y);k.arc(g.x,g.y,g.r0,0,2*Math.PI,!0)},getRect:function(k){if(k.__rect)return k.__rect;var g;return g="stroke"==k.brushType||"fill"==k.brushType?k.lineWidth||1:0,k.__rect={x:Math.round(k.x-k.r-g/2),y:Math.round(k.y-k.r-g/2),width:2*k.r+g,height:2*k.r+g},k.__rect}},n("../tool/util").inherits(q,k),q});u("echarts/chart/radar","require ./base zrender/shape/Polygon ../component/polar ../config ../util/ecData zrender/tool/util zrender/tool/color ../util/accMath ../chart".split(" "),function(n){function k(c,e,b,a,d){q.call(this,c,e,b,a,d);this.refresh(a)}var q=n("./base"),p=n("zrender/shape/Polygon");n("../component/polar");var g=n("../config");g.radar={zlevel:0,z:2,clickable:!0,legendHoverLink:!0,polarIndex:0,itemStyle:{normal:{label:{show:!1},lineStyle:{width:2,type:"solid"}},emphasis:{label:{show:!1}}},symbolSize:2};var f=n("../util/ecData"),c=n("zrender/tool/util"),l=n("zrender/tool/color");return k.prototype={type:g.CHART_TYPE_RADAR,_buildShape:function(){this.selectedMap={};this._symbol=this.option.symbolList;this._queryTarget;this._dropBoxList=[];this._radarDataCounter=0;for(var c,e=this.series,b=this.component.legend,a=0,d=e.length;d>a;a++)e[a].type===g.CHART_TYPE_RADAR&&(this.serie=this.reformOption(e[a]),this.legendHoverLink=e[a].legendHoverLink||this.legendHoverLink,c=this.serie.name||"",this.selectedMap[c]=b?b.isSelected(c):!0,this.selectedMap[c]&&(this._queryTarget=[this.serie,this.option],this.deepQuery(this._queryTarget,"calculable")&&this._addDropBox(a),this._buildSingleRadar(a),this.buildMark(a)));this.addShapeList()},_buildSingleRadar:function(c){for(var e,b,a,d,h=this.component.legend,f=this.serie.data,g=this.deepQuery(this._queryTarget,"calculable"),l=0;lh;h++)b=this.getDataFromOption(e.value[h]),(b="-"!=b?d.getVector(c,h,b):!1)&&a.push(b);return a},_addSymbol:function(c,e,b,a,d){for(var h,g=this.series,l=this.component.polar,k=0,n=c.length;n>k;k++)h=this.getSymbolShape(this.deepMerge([g[a].data[b],g[a]]),a,g[a].data[b].value[k],k,l.getIndicatorText(d,k),c[k][0],c[k][1],this._symbol[this._radarDataCounter%this._symbol.length],e,"#fff","vertical"),h.zlevel=this.getZlevelBase(),h.z=this.getZBase()+1,f.set(h,"data",g[a].data[b]),f.set(h,"value",g[a].data[b].value),f.set(h,"dataIndex",b),f.set(h,"special",k),this.shapeList.push(h)},_addDataShape:function(c,e,b,a,d,h){var g=this.series,k=[b,this.serie],n=this.getItemStyleColor(this.deepQuery(k,"itemStyle.normal.color"),a,d,b),q=this.deepQuery(k,"itemStyle.normal.lineStyle.width"),J=this.deepQuery(k,"itemStyle.normal.lineStyle.type"),F=this.deepQuery(k,"itemStyle.normal.areaStyle.color"),E=this.deepQuery(k,"itemStyle.normal.areaStyle");c={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{pointList:c,brushType:E?"both":"stroke",color:F||n||("string"==typeof e?l.alpha(e,.5):e),strokeColor:n||e,lineWidth:q,lineType:J},highlightStyle:{brushType:this.deepQuery(k,"itemStyle.emphasis.areaStyle")||E?"both":"stroke",color:this.deepQuery(k,"itemStyle.emphasis.areaStyle.color")||F||n||("string"==typeof e?l.alpha(e,.5):e),strokeColor:this.getItemStyleColor(this.deepQuery(k,"itemStyle.emphasis.color"),a,d,b)||n||e,lineWidth:this.deepQuery(k,"itemStyle.emphasis.lineStyle.width")||q,lineType:this.deepQuery(k,"itemStyle.emphasis.lineStyle.type")||J}};f.pack(c,g[a],a,b,d,b.name,this.component.polar.getIndicator(g[a].polarIndex));h&&(c.draggable=!0,this.setCalculable(c));c=new p(c);this.shapeList.push(c)},_addDropBox:function(c){var e=this.series,b=this.deepQuery(this._queryTarget,"polarIndex");if(!this._dropBoxList[b]){var a=this.component.polar.getDropBox(b);a.zlevel=this.getZlevelBase();a.z=this.getZBase();this.setCalculable(a);f.pack(a,e,c,void 0,-1);this.shapeList.push(a);this._dropBoxList[b]=!0}},ondragend:function(c,e){var b=this.series;if(this.isDragend&&c.target){var a=c.target,d=f.get(a,"seriesIndex"),a=f.get(a,"dataIndex");this.component.legend&&this.component.legend.del(b[d].data[a].name);b[d].data.splice(a,1);e.dragOut=!0;e.needRefresh=!0;this.isDragend=!1}},ondrop:function(c,e){var b=this.series;if(this.isDrop&&c.target){var a,d=c.target,h=c.dragged,g=f.get(d,"seriesIndex");a=f.get(d,"dataIndex");d=this.component.legend;if(-1===a)a={value:f.get(h,"value"),name:f.get(h,"name")},b[g].data.push(a);else{var l=n("../util/accMath");a=b[g].data[a];d&&d.del(a.name);a.name+=this.option.nameConnector+f.get(h,"name");b=f.get(h,"value");for(g=0;gl;l++)d=b.polar2cartesian(f,c*Math.PI/180+e*l),g.push({vector:[d[1],-d[0]]})},_getRadius:function(){return this.parsePercent(this.polar[this._index].radius,Math.min(this.zr.getWidth(),this.zr.getHeight())/2)},_buildSpiderWeb:function(a){var d=this.polar[a],b=d.__ecIndicator,c=d.splitArea,e=d.splitLine;a=this.getCenter(a);var d=d.splitNumber,f=e.lineStyle.color,g=e.lineStyle.width,e=e.show,l=this.deepQuery(this._queryTarget,"axisLine");this._addArea(b,d,a,c,f,g,e);l.show&&this._addLine(b,a,l)},_addAxisLabel:function(a){var d,b,c,f,g,l,k,m,q,L=n("../util/accMath"),w=this.polar[a],D=this.deepQuery(this._queryTarget,"indicator"),v=w.__ecIndicator,G=this.deepQuery(this._queryTarget,"splitNumber");a=this.getCenter(a);for(var C=0;C=z;z+=q+1)f=e.merge({},c),l=L.accAdd(g.min,L.accMul(g.step,z)),f.text=this.numAddCommas(l),f.x=z*b[0]/G+Math.cos(k)*m+a[0],f.y=z*b[1]/G+Math.sin(k)*m+a[1],this.shapeList.push(new p({zlevel:this.getZlevelBase(),z:this.getZBase(),style:f,draggable:!1,hoverable:!1}))}},_buildText:function(a){for(var d,b,c,e,f,g,l=this.polar[a],k=l.__ecIndicator,m=this.deepQuery(this._queryTarget,"indicator"),n=this.getCenter(a),q=0,D=0,v=0;vMath.round(d[0])?"right":"center",null==a.margin?d=this._mapVector(d,n,1.1):(f=a.margin,q=0b;b++)d=c[b].vector,f.push(this._mapVector(d,a,1.2));d=this._getShape(f,"fill","rgba(0,0,0,0)","",1)}else"circle"==b&&(d=this._getCircle("",1,1.2,a,"fill","rgba(0,0,0,0)"));return d},_addArea:function(a,d,b,c,e,f,g){for(var l,k,m,n,p=this.deepQuery(this._queryTarget,"type"),q=0;d>q;q++)k=(d-q)/d,g&&("polygon"==p?(n=this._getPointList(a,k,b),l=this._getShape(n,"stroke","",e,f)):"circle"==p&&(l=this._getCircle(e,f,k,b,"stroke")),this.shapeList.push(l)),c.show&&(m=(d-q-1)/d,this._addSplitArea(a,c,k,m,b,q))},_getCircle:function(a,d,b,e,f,g){var l=this._getRadius();return new c({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:e[0],y:e[1],r:l*b,brushType:f,strokeColor:a,lineWidth:d,color:g},hoverable:!1,draggable:!1})},_getRing:function(a,d,b,c){var e=this._getRadius();return new l({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:c[0],y:c[1],r:d*e,r0:b*e,color:a,brushType:"fill"},hoverable:!1,draggable:!1})},_getPointList:function(a,d,b){for(var c,e=[],f=a.length,g=0;f>g;g++)c=a[g].vector,e.push(this._mapVector(c,b,d));return e},_getShape:function(a,d,b,c,e){return new f({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{pointList:a,brushType:d,color:b,strokeColor:c,lineWidth:e},hoverable:!1,draggable:!1})},_addSplitArea:function(a,d,b,c,e,f){var g,l,k;k=d.areaStyle.color;var m;d=a.length;m=this.deepQuery(this._queryTarget,"type");if("string"==typeof k&&(k=[k]),g=k.length,f=k[f%g],"polygon"==m)for(g=0;d>g;g++)m=[],l=a[g].vector,k=a[(g+1)%d].vector,m.push(this._mapVector(l,e,b)),m.push(this._mapVector(l,e,c)),m.push(this._mapVector(k,e,c)),m.push(this._mapVector(k,e,b)),l=this._getShape(m,"fill",f,"",1),this.shapeList.push(l);else"circle"==m&&(l=this._getRing(f,b,c,e),this.shapeList.push(l))},_mapVector:function(a,d,b){return[a[0]*b+d[0],a[1]*b+d[1]]},getCenter:function(a){return this.parseCenter(this.zr,this.polar[a||0].center)},_addLine:function(a,d,b){var c,e=a.length,f=b.lineStyle;b=f.color;for(var g=f.width,f=f.type,l=0;e>l;l++)c=a[l].vector,c=this._getLine(d[0],d[1],c[0]+d[0],c[1]+d[1],b,g,f),this.shapeList.push(c)},_getLine:function(a,d,b,c,e,f,l){return new g({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{xStart:a,yStart:d,xEnd:b,yEnd:c,strokeColor:e,lineWidth:f,lineType:l},hoverable:!1})},_adjustIndicatorValue:function(a){var d,b,c=this.polar[a],e=this.deepQuery(this._queryTarget,"indicator"),f=e.length,g=c.__ecIndicator;a=this._getSeriesData(a);for(var l=c.boundaryGap,k=c.splitNumber,c=c.scale,m=n("../util/smartSteps"),p=0;f>p;p++)"number"==typeof e[p].max?(d=e[p].max,b=e[p].min||0):(d=this._findValue(a,p,k,l),b=d.min,d=d.max),!c&&0<=b&&0<=d&&(b=0),!c&&0>=b&&0>=d&&(d=0),b=m(b,d,k),g[p].value={min:b.min,max:b.max,step:b.step}},_getSeriesData:function(a){for(var d,b,c,e=[],f=this.component.legend,g=0;gf||void 0===f)&&(f=a);(g>a||void 0===g)&&(g=a)}var f,g;if(a&&0!==a.length){if(1==a.length&&(g=0),1!=a.length)for(var l=0;l=this.polar[a].__ecIndicator.length)){var c;d=this.polar[a].__ecIndicator[d];a=this.getCenter(a);var e=d.vector,f=d.value.max;d=d.value.min;if("undefined"==typeof b)return a;switch(b){case "min":b=d;break;case "max":b=f;break;case "center":b=(f+d)/2}return c=f!=d?(b-d)/(f-d):.5,this._mapVector(e,a,c)}},isInside:function(a){return(a=this.getNearestIndex(a))?a.polarIndex:-1},getNearestIndex:function(a){for(var d,c,e,f,g,l,k,m,n,p=0;pa[0]-c[0]&&(f[1]+=Math.PI),0>f[1]&&(f[1]+=2*Math.PI),n=f[1]-g/180*Math.PI+2*Math.PI,Math.abs(Math.cos(n%(m/2)))*e>f[0])return{polarIndex:p,valueIndex:Math.floor((n+m/2)/m)%k}}},getIndicator:function(a){return this.polar[a||0].indicator},refresh:function(a){a&&(this.option=a,this.polar=this.option.polar,this.series=this.option.series);this.clear();this._buildShape()}},e.inherits(k,q),n("../component").define("polar",k),k});u("echarts/util/coordinates",["require","zrender/tool/math"],function(n){var k=n("zrender/tool/math");return{polar2cartesian:function(n,p){return[n*k.sin(p),n*k.cos(p)]},cartesian2polar:function(k,n){return[Math.sqrt(k*k+n*n),Math.atan(n/k)]}}});u("echarts/chart/chord","require ./base zrender/shape/Text zrender/shape/Line zrender/shape/Sector ../util/shape/Ribbon ../util/shape/Icon zrender/shape/BezierCurve ../config ../util/ecData zrender/tool/util zrender/tool/vector ../data/Graph ../layout/Chord ../chart".split(" "),function(n){function k(a,d,b,c,e){q.call(this,a,d,b,c,e);this.scaleUnitAngle=this.scaleLineLength=4;this.refresh(c)}var q=n("./base"),p=n("zrender/shape/Text"),g=n("zrender/shape/Line"),f=n("zrender/shape/Sector"),c=n("../util/shape/Ribbon"),l=n("../util/shape/Icon"),m=n("zrender/shape/BezierCurve"),e=n("../config");e.chord={zlevel:0,z:2,clickable:!0,radius:["60%","70%"],center:["50%","50%"],padding:2,sort:"none",sortSub:"none",startAngle:90,clockWise:!0,ribbonType:!0,minRadius:10,maxRadius:20,symbol:"circle",showScale:!1,showScaleText:!1,itemStyle:{normal:{borderWidth:0,borderColor:"#000",label:{show:!0,rotate:!1,distance:5},chordStyle:{width:1,color:"black",borderWidth:1,borderColor:"#999",opacity:.5}},emphasis:{borderWidth:0,borderColor:"#000",chordStyle:{width:1,color:"black",borderWidth:1,borderColor:"#999"}}}};var b=n("../util/ecData"),a=n("zrender/tool/util"),d=n("zrender/tool/vector"),h=n("../data/Graph"),t=n("../layout/Chord");return k.prototype={type:e.CHART_TYPE_CHORD,_init:function(){var a=this.series;this.selectedMap={};for(var d={},b={},c=0,e=a.length;e>c;c++)if(a[c].type===this.type){var h=this.isSelected(a[c].name);(this.selectedMap[a[c].name]=h)&&this.buildMark(c);this.reformOption(a[c]);d[a[c].name]=a[c]}c=0;for(e=a.length;e>c;c++)a[c].type===this.type&&(a[c].insertToSerie?a[c]._referenceSerie=d[a[c].insertToSerie]:b[a[c].name]=[a[c]]);c=0;for(e=a.length;e>c;c++)if(a[c].type===this.type&&a[c].insertToSerie){for(d=a[c]._referenceSerie;d&&d._referenceSerie;)d=d._referenceSerie;b[d.name]&&this.selectedMap[a[c].name]&&b[d.name].push(a[c])}for(var f in b)this._buildChords(b[f]);this.addShapeList()},_getNodeCategory:function(a,d){return a.categories&&a.categories[d.category||0]},_getNodeQueryTarget:function(a,d){var b=this._getNodeCategory(a,d);return[d,b,a]},_getEdgeQueryTarget:function(a,d,b){return b=b||"normal",[d.itemStyle&&d.itemStyle[b],a.itemStyle[b].chordStyle]},_buildChords:function(a){for(var d=[],b=a[0],c=function(a){return 0e;e++){var g=c[e];if(g&&!g.ignore){var l=this._getNodeCategory(d,g),l=l?l.name:g.name;if(this.selectedMap[l]=this.isSelected(l),this.selectedMap[l])b.addNode(g.name,g).rawIndex=e}}e=0;for(f=a.links.length;f>e;e++){var g=a.links[e],l=g.source,k=g.target;"number"==typeof l&&(l=c[l],l&&(l=l.name));"number"==typeof k&&(k=c[k],k&&(k=k.name));(g=b.addEdge(l,k,g))&&(g.rawIndex=e)}return b.eachNode(function(a){var b=a.data.value;if(null==b)if(b=0,d.ribbonType)for(var c=0;cb&&(b+=360);var c=90>=b||270<=b,b=b*Math.PI/180,n=[Math.cos(b),-Math.sin(b)],r;r=e.ribbonType?e.showScaleText?35+g:g:g+a.layout.size;n=d.scale([],n,k[1]+r);d.add(n,n,l);var t={zlevel:this.getZlevelBase(),z:this.getZBase()+1,hoverable:!1,style:{text:null==a.data.label?a.id:a.data.label,textAlign:c?"left":"right",color:h||"#000000"}};f?(t.rotation=c?b:Math.PI+b,t.style.x=c?k[1]+r:-k[1]-r,t.style.y=0,t.position=l.slice()):(t.style.x=n[0],t.style.y=n[1]);t.style.textColor=this.deepQuery([a.data,e],"itemStyle.normal.label.textStyle.color")||"#fff";t.style.textFont=this.getFont(this.deepQuery([a.data,e],"itemStyle.normal.label.textStyle"));t=new p(t);this.shapeList.push(t);a.labelShape=t},this)},_buildRibbons:function(a,d,e,h){var f=a[d],g=this.parseCenter(this.zr,h.center),l=this.parseRadius(this.zr,h.radius);e.eachEdge(function(k,m){var n,p=e.getEdge(k.node2,k.node1);if(p&&!k.shape){if(p.shape)return void(k.shape=p.shape);var t=k.layout.startAngle/Math.PI*180,q=k.layout.endAngle/Math.PI*180,u=p.layout.startAngle/Math.PI*180,A=p.layout.endAngle/Math.PI*180;n=this.getColor(1===a.length?k.layout.weight<=p.layout.weight?k.node1.id:k.node2.id:f.name);var H,N,K=this._getEdgeQueryTarget(f,k.data),I=this._getEdgeQueryTarget(f,k.data,"emphasis");n=new c({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:g[0],y:g[1],r:l[0],source0:t,source1:q,target0:u,target1:A,brushType:"both",opacity:this.deepQuery(K,"opacity"),color:n,lineWidth:this.deepQuery(K,"borderWidth"),strokeColor:this.deepQuery(K,"borderColor"),clockWise:h.clockWise},clickable:h.clickable,highlightStyle:{brushType:"both",opacity:this.deepQuery(I,"opacity"),lineWidth:this.deepQuery(I,"borderWidth"),strokeColor:this.deepQuery(I,"borderColor")}});k.layout.weight<=p.layout.weight?(H=p.node1,N=p.node2):(H=k.node1,N=k.node2);b.pack(n,f,d,k.data,null==k.rawIndex?m:k.rawIndex,k.data.name||H.id+"-"+N.id,H.id,N.id);this.shapeList.push(n);k.shape=n}},this)},_buildEdgeCurves:function(a,d,c,e,h){var f=a[d],g=this.parseCenter(this.zr,e.center);c.eachEdge(function(a,c){var e=h.getNodeById(a.node1.id),l=h.getNodeById(a.node2.id),e=e.shape,l=l.shape,k=this._getEdgeQueryTarget(f,a.data),n=this._getEdgeQueryTarget(f,a.data,"emphasis"),e=new m({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{xStart:e.position[0],yStart:e.position[1],xEnd:l.position[0],yEnd:l.position[1],cpX1:g[0],cpY1:g[1],lineWidth:this.deepQuery(k,"width"),strokeColor:this.deepQuery(k,"color"),opacity:this.deepQuery(k,"opacity")},highlightStyle:{lineWidth:this.deepQuery(n,"width"),strokeColor:this.deepQuery(n,"color"),opacity:this.deepQuery(n,"opacity")}});b.pack(e,f,d,a.data,null==a.rawIndex?c:a.rawIndex,a.data.name||a.node1.id+"-"+a.node2.id,a.node1.id,a.node2.id);this.shapeList.push(e);a.shape=e},this)},_buildScales:function(a,b,c){var e,h,f=a.clockWise,l=this.parseCenter(this.zr,a.center),k=this.parseRadius(this.zr,a.radius),m=f?1:-1,n=0,t=-1/0;a.showScaleText&&(c.eachNode(function(a){a=a.data.value;a>t&&(t=a);n+=a}),1E10b||!f&&b>n);){var t=n/180*Math.PI,y=[Math.cos(t),Math.sin(t)],t=d.scale([],y,k[1]+1);d.add(t,t,l);y=d.scale([],y,k[1]+this.scaleLineLength);d.add(y,y,l);t=new g({zlevel:this.getZlevelBase(),z:this.getZBase()-1,hoverable:!1,style:{xStart:t[0],yStart:t[1],xEnd:y[0],yEnd:y[1],lineCap:"round",brushType:"stroke",strokeColor:"#666",lineWidth:1}});this.shapeList.push(t);n+=m*this.scaleUnitAngle}if(a.showScaleText)for(n=5*q*this.scaleUnitAngle,y=0;!(f&&c>b||!f&&b>c);){t=c;t%=360;0>t&&(t+=360);var x=90>=t||270<=t,t=new p({zlevel:this.getZlevelBase(),z:this.getZBase()-1,hoverable:!1,style:{x:x?k[1]+this.scaleLineLength+4:-k[1]-this.scaleLineLength-4,y:0,text:Math.round(10*y)/10+e,textAlign:x?"left":"right"},position:l.slice(),rotation:x?[-t/180*Math.PI,0,0]:[-(t+180)/180*Math.PI,0,0]});this.shapeList.push(t);y+=n*h;c+=m*this.scaleUnitAngle*5}},this)},refresh:function(a){if(a&&(this.option=a,this.series=a.series),this.legend=this.component.legend,this.legend)this.getColor=function(a){return this.legend.getColor(a)},this.isSelected=function(a){return this.legend.isSelected(a)};else{var d={},b=0;this.getColor=function(a){return d[a]?d[a]:(d[a]||(d[a]=this.zr.getColor(b++)),d[a])};this.isSelected=function(){return!0}}this.backupShapeList();this._init()},reformOption:function(d){var b=a.merge;d=b(b(d||{},this.ecTheme.chord),e.chord);d.itemStyle.normal.label.textStyle=this.getTextStyle(d.itemStyle.normal.label.textStyle)}},a.inherits(k,q),n("../chart").define("chord",k),k});u("echarts/util/shape/Ribbon",["require","zrender/shape/Base","zrender/shape/util/PathProxy","zrender/tool/util"],function(n){function k(g){q.call(this,g);this._pathProxy=new p}var q=n("zrender/shape/Base"),p=n("zrender/shape/util/PathProxy");n=n("zrender/tool/util");return k.prototype={type:"ribbon",buildPath:function(g,f){var c=f.clockWise||!1,l=this._pathProxy;l.begin(g);var k=f.x,e=f.y,b=f.r,a=f.source0/180*Math.PI,d=f.source1/180*Math.PI,h=f.target0/180*Math.PI,n=f.target1/180*Math.PI,p=k+Math.cos(a)*b,q=e+Math.sin(a)*b,x=k+Math.cos(d)*b,J=e+Math.sin(d)*b,F=k+Math.cos(h)*b,E=e+Math.sin(h)*b,L=k+Math.cos(n)*b,b=e+Math.sin(n)*b;l.moveTo(p,q);l.arc(k,e,f.r,a,d,!c);l.bezierCurveTo(.7*(k-x)+x,.7*(e-J)+J,.7*(k-F)+F,.7*(e-E)+E,F,E);f.source0===f.target0&&f.source1===f.target1||(l.arc(k,e,f.r,h,n,!c),l.bezierCurveTo(.7*(k-L)+L,.7*(e-b)+b,.7*(k-p)+p,.7*(e-q)+q,p,q))},getRect:function(g){return g.__rect?g.__rect:(this._pathProxy.isEmpty()||this.buildPath(null,g),this._pathProxy.fastBoundingRect())}},n.inherits(k,q),k});u("zrender/shape/BezierCurve",["require","./Base","../tool/util"],function(n){var k=n("./Base"),q=function(n){this.brushTypeOnly="stroke";this.textPosition="end";k.call(this,n)};return q.prototype={type:"bezier-curve",buildPath:function(k,g){k.moveTo(g.xStart,g.yStart);"undefined"!=typeof g.cpX2&&"undefined"!=typeof g.cpY2?k.bezierCurveTo(g.cpX1,g.cpY1,g.cpX2,g.cpY2,g.xEnd,g.yEnd):k.quadraticCurveTo(g.cpX1,g.cpY1,g.xEnd,g.yEnd)},getRect:function(k){if(k.__rect)return k.__rect;var g=Math.min(k.xStart,k.xEnd,k.cpX1),f=Math.min(k.yStart,k.yEnd,k.cpY1),c=Math.max(k.xStart,k.xEnd,k.cpX1),l=Math.max(k.yStart,k.yEnd,k.cpY1),m=k.cpX2,e=k.cpY2;"undefined"!=typeof m&&"undefined"!=typeof e&&(g=Math.min(g,m),f=Math.min(f,e),c=Math.max(c,m),l=Math.max(l,e));m=k.lineWidth||1;return k.__rect={x:g-m,y:f-m,width:c-g+m,height:l-f+m},k.__rect}},n("../tool/util").inherits(q,k),q});u("echarts/data/Graph",["require","zrender/tool/util"],function(n){var k=n("zrender/tool/util"),q=function(k){this._directed=k||!1;this.nodes=[];this.edges=[];this._nodesMap={};this._edgesMap={}};q.prototype.isDirected=function(){return this._directed};q.prototype.addNode=function(k,g){if(this._nodesMap[k])return this._nodesMap[k];var f=new q.Node(k,g);return this.nodes.push(f),this._nodesMap[k]=f,f};q.prototype.getNodeById=function(k){return this._nodesMap[k]};q.prototype.addEdge=function(k,g,f){if("string"==typeof k&&(k=this._nodesMap[k]),"string"==typeof g&&(g=this._nodesMap[g]),k&&g){var c=k.id+"-"+g.id;if(this._edgesMap[c])return this._edgesMap[c];f=new q.Edge(k,g,f);return this._directed&&(k.outEdges.push(f),g.inEdges.push(f)),k.edges.push(f),k!==g&&g.edges.push(f),this.edges.push(f),this._edgesMap[c]=f,f}};q.prototype.removeEdge=function(n){var g=n.node1,f=n.node2,c=g.id+"-"+f.id;this._directed&&(g.outEdges.splice(k.indexOf(g.outEdges,n),1),f.inEdges.splice(k.indexOf(f.inEdges,n),1));g.edges.splice(k.indexOf(g.edges,n),1);g!==f&&f.edges.splice(k.indexOf(f.edges,n),1);delete this._edgesMap[c];this.edges.splice(k.indexOf(this.edges,n),1)};q.prototype.getEdge=function(k,g){return"string"!=typeof k&&(k=k.id),"string"!=typeof g&&(g=g.id),this._directed?this._edgesMap[k+"-"+g]:this._edgesMap[k+"-"+g]||this._edgesMap[g+"-"+k]};q.prototype.removeNode=function(n){if("string"!=typeof n||(n=this._nodesMap[n])){delete this._nodesMap[n.id];this.nodes.splice(k.indexOf(this.nodes,n),1);for(var g=0;gc;)k.call(g,this.nodes[c],c)?c++:(this.removeNode(this.nodes[c]),f--)};q.prototype.filterEdge=function(k,g){for(var f=this.edges.length,c=0;f>c;)k.call(g,this.edges[c],c)?c++:(this.removeEdge(this.edges[c]),f--)};q.prototype.eachNode=function(k,g){for(var f=this.nodes.length,c=0;f>c;c++)this.nodes[c]&&k.call(g,this.nodes[c],c)};q.prototype.eachEdge=function(k,g){for(var f=this.edges.length,c=0;f>c;c++)this.edges[c]&&k.call(g,this.edges[c],c)};q.prototype.clear=function(){this.nodes.length=0;this.edges.length=0;this._nodesMap={};this._edgesMap={}};q.prototype.breadthFirstTraverse=function(k,g,f,c){if("string"==typeof g&&(g=this._nodesMap[g]),g){var l="edges";"out"===f?l="outEdges":"in"===f&&(l="inEdges");for(f=0;fm;m++){var e=l.addNode(k[m].id,k[m]);e.data.value=0;f&&(e.data.outValue=e.data.inValue=0)}for(m=0;c>m;m++)for(k=0;c>k;k++)e=g[m][k],f&&(l.nodes[m].data.outValue+=e,l.nodes[k].data.inValue+=e),l.nodes[m].data.value+=e,l.nodes[k].data.value+=e;for(m=0;c>m;m++)for(k=m;c>k;k++)if(e=g[m][k],0!==e){var b=l.nodes[m],a=l.nodes[k];if(l.addEdge(b,a,{}).data.weight=e,m!==k&&f&&g[k][m])l.addEdge(a,b,{}).data.weight=g[k][m]}return l}},q});u("echarts/layout/Chord",["require"],function(){var n=function(k){k=k||{};this.sort=k.sort||null;this.sortSub=k.sortSub||null;this.padding=.05;this.startAngle=k.startAngle||0;this.clockWise=null==k.clockWise?!1:k.clockWise;this.center=k.center||[0,0];this.directed=!0};n.prototype.run=function(n){n instanceof Array||(n=[n]);if(n.length){for(var g=n[0],f=g.nodes.length,c=[],l=0,m=0;f>m;m++){var e=g.nodes[m],b={size:0,subGroups:[],node:e};c.push(b);for(var a=0,d=0;dm;m++){b=c[m];b.node.layout.startAngle=n;b.node.layout.endAngle=n+g*b.size*e;b.node.layout.subGroups=[];for(t=0;te;e++){var f=c[e];if(f.type===d.CHART_TYPE_FORCE&&(c[e]=this.reformOption(c[e]),a=c[e].name||"",this.selectedMap[a]=b?b.isSelected(a):!0,this.selectedMap[a])){this.buildMark(e);this._initSerie(f,e);break}}this.animationEffect()},_getNodeCategory:function(a,d){return a.categories&&a.categories[d.category||0]},_getNodeQueryTarget:function(a,d,b){b=b||"normal";var c=this._getNodeCategory(a,d)||{};return[d.itemStyle&&d.itemStyle[b],c&&c.itemStyle&&c.itemStyle[b],a.itemStyle[b].nodeStyle]},_getEdgeQueryTarget:function(a,d,b){return b=b||"normal",[d.itemStyle&&d.itemStyle[b],a.itemStyle[b].linkStyle]},_initSerie:function(a,b){this._temperature=1;this._graph=a.data?this._getSerieGraphFromDataMatrix(a):this._getSerieGraphFromNodeLinks(a);this._buildLinkShapes(a,b);this._buildNodeShapes(a,b);var c=!0===a.roam||"move"===a.roam,e=!0===a.roam||"scale"===a.roam;this.zr.modLayer(this.getZlevelBase(),{panable:c,zoomable:e});(this.query("markPoint.effect.show")||this.query("markLine.effect.show"))&&this.zr.modLayer(d.EFFECT_ZLEVEL,{panable:c,zoomable:e});this._initLayout(a);this._step()},_getSerieGraphFromDataMatrix:function(a){for(var d=[],b=0,e=[],h=0;he;e++){var f=b[e];if(f&&!f.ignore){var g=this._getNodeCategory(a,f),g=g?g.name:f.name;if(this.selectedMap[g]=this.isSelected(g),this.selectedMap[g])d.addNode(f.name,f).rawIndex=e}}e=0;for(h=a.links.length;h>e;e++){var f=a.links[e],g=f.source,l=f.target;"number"==typeof g&&(g=b[g],g&&(g=g.name));"number"==typeof l&&(l=b[l],l&&(l=l.name));(f=d.addEdge(g,l,f))&&(f.rawIndex=e)}return d.eachNode(function(a){var d=a.data.value;if(null==d)for(var b=d=0;bg;g++)var l=d.nodes[g],f=Math.max(l.layout.size,f),h=Math.min(l.layout.size,h);f-=h;for(g=0;b>g;g++)l=d.nodes[g],0g;g++){l=d.nodes[g];if("undefined"!=typeof this.__nodePositionMap[l.id])l.layout.position=y.create(),y.copy(l.layout.position,this.__nodePositionMap[l.id]);else if("undefined"!=typeof l.data.initial)l.layout.position=y.create(),y.copy(l.layout.position,l.data.initial);else{var h=this._layout.center,c=l.layout,e=h[0],h=h[1],f=.8*Math.min(this._layout.width,this._layout.height),k=y.create(),e=(k[0]=(Math.random()-.5)*f+e,k[1]=(Math.random()-.5)*f+h,k);c.position=e}c=l.shape.style;e=l.layout.size;c.width=c.width||2*e;c.height=c.height||2*e;c.x=-c.width/2;c.y=-c.height/2;y.copy(l.shape.position,l.layout.position)}b=d.edges.length;f=-1/0;for(g=0;b>g;g++)l=d.edges[g],l.layout.weight>f&&(f=l.layout.weight);for(g=0;b>g;g++)l=d.edges[g],l.layout.weight/=f;this._layout.init(d,a.useWorker)},_buildNodeShapes:function(d,c){var e=this._graph;this.query(d,"categories");e.eachNode(function(e){var f=this._getNodeCategory(d,e.data),g=[e.data,f,d],l=this._getNodeQueryTarget(d,e.data),k=this._getNodeQueryTarget(d,e.data,"emphasis"),l=new a({style:{x:0,y:0,color:this.deepQuery(l,"color"),brushType:"both",strokeColor:this.deepQuery(l,"strokeColor")||this.deepQuery(l,"borderColor"),lineWidth:this.deepQuery(l,"lineWidth")||this.deepQuery(l,"borderWidth")},highlightStyle:{color:this.deepQuery(k,"color"),strokeColor:this.deepQuery(k,"strokeColor")||this.deepQuery(k,"borderColor"),lineWidth:this.deepQuery(k,"lineWidth")||this.deepQuery(k,"borderWidth")},clickable:d.clickable,zlevel:this.getZlevelBase(),z:this.getZBase()});l.style.color||(l.style.color=this.getColor(f?f.name:e.id));l.style.iconType=this.deepQuery(g,"symbol");l.style.width=l.style.height=2*(this.deepQuery(g,"symbolSize")||0);l.style.iconType.match("image")&&(l.style.image=l.style.iconType.replace(/^image:\/\//,""),l=new b({style:l.style,highlightStyle:l.highlightStyle,clickable:l.clickable,zlevel:this.getZlevelBase(),z:this.getZBase()}));this.deepQuery(g,"itemStyle.normal.label.show")&&(l.style.text=null==e.data.label?e.id:e.data.label,l.style.textPosition=this.deepQuery(g,"itemStyle.normal.label.position"),l.style.textColor=this.deepQuery(g,"itemStyle.normal.label.textStyle.color"),l.style.textFont=this.getFont(this.deepQuery(g,"itemStyle.normal.label.textStyle")||{}));this.deepQuery(g,"itemStyle.emphasis.label.show")&&(l.highlightStyle.textPosition=this.deepQuery(g,"itemStyle.emphasis.label.position"),l.highlightStyle.textColor=this.deepQuery(g,"itemStyle.emphasis.label.textStyle.color"),l.highlightStyle.textFont=this.getFont(this.deepQuery(g,"itemStyle.emphasis.label.textStyle")||{}));this.deepQuery(g,"draggable")&&(this.setCalculable(l),l.dragEnableTime=0,l.draggable=!0,l.ondragstart=this.shapeHandler.ondragstart,l.ondragover=null);h.pack(l,d,c,e.data,e.rawIndex,e.data.name||"",e.category);this.shapeList.push(l);this.zr.addShape(l);e.shape=l},this)},_buildLinkShapes:function(d,b){for(var c=this._graph,f=c.edges.length,g=0;f>g;g++){var l=c.edges[g],k=l.data,n=l.node1,p=l.node2,r=this._getEdgeQueryTarget(d,k),r=this.deepQuery(r,"type");d.linkSymbol&&"none"!==d.linkSymbol&&(r="line");r=new ("line"===r?m:e)({style:{xStart:0,yStart:0,xEnd:0,yEnd:0},clickable:this.query(d,"clickable"),highlightStyle:{},zlevel:this.getZlevelBase(),z:this.getZBase()});if(t.merge(r.style,this.query(d,"itemStyle.normal.linkStyle"),!0),t.merge(r.highlightStyle,this.query(d,"itemStyle.emphasis.linkStyle"),!0),"undefined"!=typeof k.itemStyle&&(k.itemStyle.normal&&t.merge(r.style,k.itemStyle.normal,!0),k.itemStyle.emphasis&&t.merge(r.highlightStyle,k.itemStyle.emphasis,!0)),r.style.lineWidth=r.style.lineWidth||r.style.width,r.style.strokeColor=r.style.strokeColor||r.style.color,r.highlightStyle.lineWidth=r.highlightStyle.lineWidth||r.highlightStyle.width,r.highlightStyle.strokeColor=r.highlightStyle.strokeColor||r.highlightStyle.color,h.pack(r,d,b,l.data,null==l.rawIndex?g:l.rawIndex,l.data.name||n.id+" - "+p.id,n.id,p.id),this.shapeList.push(r),this.zr.addShape(r),l.shape=r,d.linkSymbol&&"none"!==d.linkSymbol)l=new a({style:{x:-5,y:0,width:d.linkSymbolSize[0],height:d.linkSymbolSize[1],iconType:d.linkSymbol,brushType:"fill",color:r.style.strokeColor},highlightStyle:{brushType:"fill"},position:[0,0],rotation:0}),r._symbolShape=l,this.shapeList.push(l),this.zr.addShape(l)}},_updateLinkShapes:function(){for(var a=y.create(),d=this._graph.edges,b=0,c=d.length;c>b;b++){var e=d[b],h=e.node1.shape,f=e.node2.shape,g=h.position,l=f.position;if(e.shape.style.xStart=g[0],e.shape.style.yStart=g[1],e.shape.style.xEnd=l[0],e.shape.style.yEnd=l[1],"bezier-curve"===e.shape.type&&(e.shape.style.cpX1=(g[0]+l[0])/2-(l[1]-g[1])/4,e.shape.style.cpY1=(g[1]+l[1])/2-(g[0]-l[0])/4),e.shape.modSelf(),e.shape._symbolShape)e=e.shape._symbolShape,y.copy(e.position,f.position),y.sub(a,h.position,f.position),y.normalize(a,a),y.scaleAndAdd(e.position,e.position,a,f.style.width/2+2),e.rotation=Math.PI/2-Math.atan2(a[1],a[0]),e.modSelf()}},_syncNodePositions:function(){for(var a=this._graph,d=0;dh;h++){var n=f.nodes[h];b[2*h]=n.layout.position[0];b[2*h+1]=n.layout.position[1];a[h]="undefined"==typeof n.layout.mass?1:n.layout.mass;d[h]="undefined"==typeof n.layout.size?1:n.layout.size;n.layout.__index=h}for(var e=f.edges.length,n=new c(2*e),r=new c(e),h=0;e>h;h++){var y=f.edges[h];n[2*h]=y.node1.layout.__index;n[2*h+1]=y.node2.layout.__index;r[h]=y.layout.weight||1}this._layoutWorker?this._layoutWorker.postMessage({cmd:"init",nodesPosition:b,nodesMass:a,nodesSize:d,edges:n,edgesWeight:r}):(this._layout.initNodes(b,a,d),this._layout.initEdges(n,r));this.updateConfig()},n.prototype.step=function(l){var k=this.graph.nodes;if(this._layoutWorker){for(var e=new c(2*k.length),b=0;bb;b++)this.temperature*=this.coolDown}else{f(this._$onupdate);for(b=0;bb;b++)this._layout.temperature=this.temperature,this._layout.update(),this.temperature*=this.coolDown}},n.prototype._$onupdate=function(c){if(this._layoutWorker){c=new Float32Array(c.data);for(var f=0;f=a&&this.bbox[1]<=d&&this.bbox[3]>=d},p.prototype.setBBox=function(a,d,b,c){this.bbox[0]=a;this.bbox[1]=d;this.bbox[2]=b;this.bbox[3]=c;this.size=(b-a+c-d)/2},p.prototype._newSubRegion=function(){var a=this.subRegions[this.nSubRegions];return a||(a=new p,this.subRegions[this.nSubRegions]=a),this.nSubRegions++,a},p.prototype._addNodeToSubRegion=function(a){var d=this.findSubRegion(a.position[0],a.position[1]),b=this.bbox;if(!d){var c=(b[2]-b[0])/2,e=(b[3]-b[1])/2,f=a.position[0]>=(b[0]+b[2])/2?1:0,g=a.position[1]>=(b[1]+b[3])/2?1:0,d=this._newSubRegion();d.setBBox(f*c+b[0],g*e+b[1],(f+1)*c+b[0],(g+1)*e+b[1])}d.addNode(a)},p.prototype._updateCenterOfMass=function(a){null==this.centerOfMass&&(this.centerOfMass=l.create());var d=this.centerOfMass[0]*this.mass,b=this.centerOfMass[1]*this.mass,d=d+a.position[0]*a.mass,b=b+a.position[1]*a.mass;this.mass+=a.mass;this.centerOfMass[0]=d/this.mass;this.centerOfMass[1]=b/this.mass},c.prototype.nodeToNodeRepulsionFactor=function(a,d,b){return b*b*a/d},c.prototype.edgeToNodeRepulsionFactor=function(a,d,b){return b*a/d},c.prototype.attractionFactor=function(a,d,b){return a*d/b},c.prototype.initNodes=function(a,d,b){this.temperature=1;var c=a.length/2;this.nodes.length=0;for(var e="undefined"!=typeof b,f=0;c>f;f++){var l=new g;l.position[0]=a[2*f];l.position[1]=a[2*f+1];l.mass=d[f];e&&(l.size=b[f]);this.nodes.push(l)}this._massArr=d;e&&(this._sizeArr=b)},c.prototype.initEdges=function(a,d){var b=a.length/2;this.edges.length=0;for(var c="undefined"!=typeof d,e=0;b>e;e++){var g=this.nodes[a[2*e]],l=this.nodes[a[2*e+1]];g&&l&&(g.outDegree++,l.inDegree++,g=new f(g,l),c&&(g.weight=d[e]),this.edges.push(g))}},c.prototype.update=function(){var a=this.nodes.length;if(this.updateBBox(),this._k=.4*this.scaling*Math.sqrt(this.width*this.height/a),this.barnesHutOptimize){this._rootRegion.setBBox(this.bbox[0],this.bbox[1],this.bbox[2],this.bbox[3]);this._rootRegion.beforeUpdate();for(var d=0;a>d;d++)this._rootRegion.addNode(this.nodes[d]);this._rootRegion.afterUpdate()}else{var b=0,c=this._rootRegion.centerOfMass;l.set(c,0,0);for(d=0;a>d;d++){var e=this.nodes[d],b=b+e.mass;l.scaleAndAdd(c,c,e.position,e.mass)}0d;d++){var b=this.nodes[d];l.copy(b.forcePrev,b.force);l.copy(b.speedPrev,b.speed);l.set(b.force,0,0)}this.updateNodeNodeForce();0b;b++){var c=this.nodes[b],e=c.speed;l.scale(c.force,c.force,1/30);var f=l.len(c.force)+.1,f=Math.min(f,500)/f;l.scale(c.force,c.force,f);l.add(e,e,c.force);l.scale(e,e,this.temperature);l.sub(d,e,c.speedPrev);f=l.len(d);if(0d;d++){var b=this.nodes[d];if(this.barnesHutOptimize)this.applyRegionToNodeRepulsion(this._rootRegion,b);else for(var c=d+1;a>c;c++)this.applyNodeToNodeRepulsion(b,this.nodes[c],!1)}},c.prototype.updateGravityForce=function(){for(var a=0;athis.barnesHutTheta*d.size*d.size)l.scaleAndAdd(b.force,b.force,a,this._k*this._k*(b.mass+d.mass)/(c+1)*2);else for(c=0;c=f&&(g=this._k*this._k*10*k)):g=this.nodeToNodeRepulsionFactor(k,f,this._k);e||l.scaleAndAdd(b.force,b.force,a,2*g);l.scaleAndAdd(c.force,c.force,a,2*-g)}}}}(),c.prototype.applyEdgeAttraction=function(){var a=l.create();return function(b){var c=b.node1,e=b.node2;l.sub(a,c.position,e.position);var f=l.len(a);b=0===this.edgeWeightInfluence?1:1==this.edgeWeightInfluence?b.weight:Math.pow(b.weight,this.edgeWeightInfluence);this.preventOverlap&&(f=f-c.size-e.size,0>=f)||(f=this.attractionFactor(b,f,this._k),l.scaleAndAdd(c.force,c.force,a,-f),l.scaleAndAdd(e.force,e.force,a,f))}}(),c.prototype.applyNodeGravity=function(){var a=l.create();return function(b){l.sub(a,this.center,b.position);this.width>this.height?a[1]*=this.width/this.height:a[0]*=this.height/this.width;var c=l.len(a)/100;this.strongGravity?l.scaleAndAdd(b.force,b.force,a,c*this.gravity*b.mass):l.scaleAndAdd(b.force,b.force,a,this.gravity*b.mass/(c+1))}}(),c.prototype.applyEdgeToNodeRepulsion=function(){var a=l.create(),b=l.create(),c=l.create();return function(e,f){var g=e.node1,k=e.node2;if(g!==f&&k!==f){l.sub(a,k.position,g.position);l.sub(b,f.position,g.position);var m=l.len(a);l.scale(a,a,1/m);var p=l.dot(a,b);0>p||p>m||(l.scaleAndAdd(c,g.position,a,p),m=l.dist(c,f.position)-f.size,m=this.edgeToNodeRepulsionFactor(f.mass,Math.max(m,.1),100),l.sub(a,f.position,c),l.normalize(a,a),l.scaleAndAdd(f.force,f.force,a,m),l.scaleAndAdd(g.force,g.force,a,-m),l.scaleAndAdd(k.force,k.force,a,-m))}}}(),c.prototype.updateBBox=function(){for(var a=1/0,b=1/0,c=-1/0,e=-1/0,f=0;ff;f++)a=b.nodes[f],a.position[0]=d[2*f],a.position[1]=d[2*f+1]}else switch(a.data.cmd){case "init":b||(b=new c);b.initNodes(a.data.nodesPosition,a.data.nodesMass,a.data.nodesSize);b.initEdges(a.data.edges,a.data.edgesWeight);break;case "updateConfig":if(b)for(d in a.data.config)b[d]=a.data.config[d];break;case "update":var g=a.data.steps;if(b){e=b.nodes.length;d=new Float32Array(2*e);b.temperature=a.data.temperature;for(f=0;g>f;f++)b.update(),b.temperature*=a.data.coolDown;for(f=0;e>f;f++)a=b.nodes[f],d[2*f]=a.position[0],d[2*f+1]=a.position[1];self.postMessage(d.buffer,[d.buffer])}else a=new Float32Array,self.postMessage(a.buffer,[a.buffer])}}}return c});u("echarts/chart/map","require ./base zrender/shape/Text zrender/shape/Path zrender/shape/Circle zrender/shape/Rectangle zrender/shape/Line zrender/shape/Polygon zrender/shape/Ellipse ../component/dataRange ../component/roamController ../config ../util/ecData zrender/tool/util zrender/config zrender/tool/event ../util/mapData/params ../util/mapData/textFixed ../util/mapData/geoCoord ../util/projection/svg ../util/projection/normal ../chart".split(" "),function(k){function q(b,d,c,e,f){p.call(this,b,d,c,e,f);var h=this;h._onmousewheel=function(a){return h.__onmousewheel(a)};h._onmousedown=function(a){return h.__onmousedown(a)};h._onmousemove=function(a){return h.__onmousemove(a)};h._onmouseup=function(a){return h.__onmouseup(a)};h._onroamcontroller=function(a){return h.__onroamcontroller(a)};h._ondrhoverlink=function(a){return h.__ondrhoverlink(a)};this._isAlive=!0;this._selectedMode={};this._activeMapType={};this._clickable={};this._hoverable={};this._showLegendSymbol={};this._selected={};this._mapTypeMap={};this._mapDataMap={};this._nameMap={};this._specialArea={};this._refreshDelayTicket;this._mapDataRequireCounter;this._markAnimation=!1;this._hoverLinkMap={};this._roamMap={};this._scaleLimitMap={};this._mx;this._my;this._mousedown;this._justMove;this._curMapType;this.refresh(e);this.zr.on(t.EVENT.MOUSEWHEEL,this._onmousewheel);this.zr.on(t.EVENT.MOUSEDOWN,this._onmousedown);d.bind(a.EVENT.ROAMCONTROLLER,this._onroamcontroller);d.bind(a.EVENT.DATA_RANGE_HOVERLINK,this._ondrhoverlink)}var p=k("./base"),g=k("zrender/shape/Text"),f=k("zrender/shape/Path"),c=k("zrender/shape/Circle"),l=k("zrender/shape/Rectangle"),m=k("zrender/shape/Line"),e=k("zrender/shape/Polygon"),b=k("zrender/shape/Ellipse");k("../component/dataRange");k("../component/roamController");var a=k("../config");a.map={zlevel:0,z:2,mapType:"china",mapValuePrecision:0,showLegendSymbol:!0,dataRangeHoverLink:!0,hoverable:!0,clickable:!0,itemStyle:{normal:{borderColor:"rgba(0,0,0,0)",borderWidth:1,areaStyle:{color:"#ccc"},label:{show:!1,textStyle:{color:"rgb(139,69,19)"}}},emphasis:{borderColor:"rgba(0,0,0,0)",borderWidth:1,areaStyle:{color:"rgba(255,215,0,0.8)"},label:{show:!1,textStyle:{color:"rgb(100,0,0)"}}}}};var d=k("../util/ecData"),h=k("zrender/tool/util"),t=k("zrender/config"),r=k("zrender/tool/event"),y=k("../util/mapData/params").params,x=k("../util/mapData/textFixed"),u=k("../util/mapData/geoCoord");return q.prototype={type:a.CHART_TYPE_MAP,_buildShape:function(){var b=this.series;this.selectedMap={};this._activeMapType={};for(var d,c,e,f,g=this.component.legend,l={},k={},m={},p={},r=0,t=b.length;t>r;r++)if(b[r].type==a.CHART_TYPE_MAP&&(b[r]=this.reformOption(b[r]),c=b[r].mapType,k[c]=k[c]||{},k[c][r]=!0,m[c]=m[c]||b[r].mapValuePrecision,this._scaleLimitMap[c]=this._scaleLimitMap[c]||{},b[r].scaleLimit&&h.merge(this._scaleLimitMap[c],b[r].scaleLimit,!0),this._roamMap[c]=b[r].roam||this._roamMap[c],this._hoverLinkMap[c]=b[r].dataRangeHoverLink||this._hoverLinkMap[c],this._nameMap[c]=this._nameMap[c]||{},b[r].nameMap&&h.merge(this._nameMap[c],b[r].nameMap,!0),this._activeMapType[c]=!0,b[r].textFixed&&h.merge(x,b[r].textFixed,!0),b[r].geoCoord&&h.merge(u,b[r].geoCoord,!0),this._selectedMode[c]=this._selectedMode[c]||b[r].selectedMode,(null==this._hoverable[c]||this._hoverable[c])&&(this._hoverable[c]=b[r].hoverable),(null==this._clickable[c]||this._clickable[c])&&(this._clickable[c]=b[r].clickable),(null==this._showLegendSymbol[c]||this._showLegendSymbol[c])&&(this._showLegendSymbol[c]=b[r].showLegendSymbol),p[c]=p[c]||b[r].mapValueCalculation,d=b[r].name,this.selectedMap[d]=g?g.isSelected(d):!0,this.selectedMap[d])){l[c]=l[c]||{};e=b[r].data;for(var q=0,K=e.length;K>q;q++){f=this._nameChange(c,e[q].name);l[c][f]=l[c][f]||{seriesIndex:[]};for(var I in e[q])"value"!=I?l[c][f][I]=e[q][I]:isNaN(e[q].value)||(null==l[c][f].value&&(l[c][f].value=0),l[c][f].value+=e[q].value);l[c][f].seriesIndex.push(r)}}this._mapDataRequireCounter=0;for(var M in l)this._mapDataRequireCounter++;this._clearSelected();0===this._mapDataRequireCounter&&(this.clear(),this.zr&&this.zr.delShape(this.lastShapeList),this.lastShapeList=[]);for(M in l){if(p[M]&&"average"==p[M])for(K in l[M])l[M][K].value=(l[M][K].value/l[M][K].seriesIndex.length).toFixed(m[M])-0;this._mapDataMap[M]=this._mapDataMap[M]||{};this._mapDataMap[M].mapData?this._mapDataCallback(M,l[M],k[M])(this._mapDataMap[M].mapData):y[M.replace(/\|.*/,"")].getGeoJson&&(this._specialArea[M]=y[M.replace(/\|.*/,"")].specialArea||this._specialArea[M],y[M.replace(/\|.*/,"")].getGeoJson(this._mapDataCallback(M,l[M],k[M])))}},_mapDataCallback:function(a,b,d){var c=this;return function(e){c._isAlive&&null!=c._activeMapType[a]&&(-1!=a.indexOf("|")&&(e=c._getSubMapData(a,e)),c._mapDataMap[a].mapData=e,e.firstChild?(c._mapDataMap[a].rate=1,c._mapDataMap[a].projection=k("../util/projection/svg")):(c._mapDataMap[a].rate=.75,c._mapDataMap[a].projection=k("../util/projection/normal")),c._buildMap(a,c._getProjectionData(a,e,d),b,d),c._buildMark(a,d),0>=--c._mapDataRequireCounter&&(c.addShapeList(),c.zr.refreshNextFrame()))}},_clearSelected:function(){for(var a in this._selected)this._activeMapType[this._mapTypeMap[a]]||(delete this._selected[a],delete this._mapTypeMap[a])},_getSubMapData:function(a,b){for(var d=a.replace(/^.*\|/,""),c=b.features,e=0,f=c.length;f>e;e++)if(c[e].properties&&c[e].properties.name==d){c=c[e];"United States of America"==d&&1f;f++)e.push(this._getSingleProvince(a,g[f],c));if(this._specialArea[a])for(var k in this._specialArea[a])e.push(this._getSpecialProjectionData(a,b,k,this._specialArea[a][k],c));"china"==a&&(b=this.geo2pos(a,u["\u5357\u6d77\u8bf8\u5c9b"]||y["\u5357\u6d77\u8bf8\u5c9b"].textCoord),d=d.scale.x/10.5,g=[32*d+b[0],83*d+b[1]],x["\u5357\u6d77\u8bf8\u5c9b"]&&(g[0]+=x["\u5357\u6d77\u8bf8\u5c9b"][0],g[1]+=x["\u5357\u6d77\u8bf8\u5c9b"][1]),e.push({name:this._nameChange(a,"\u5357\u6d77\u8bf8\u5c9b"),path:y["\u5357\u6d77\u8bf8\u5c9b"].getPath(b,d),position:c,textX:g[0],textY:g[1]}));return e},_getSpecialProjectionData:function(a,b,d,c,e){b=this._getSubMapData("x|"+d,b);d=k("../util/projection/normal");var f=d.getBbox(b),h=this.geo2pos(a,[c.left,c.top]),g=this.geo2pos(a,[c.left+c.width,c.top+c.height]);c=Math.abs(g[0]-h[0])/.75/f.width;f=Math.abs(g[1]-h[1])/f.height;c>f?c=.75*f:(f=c,c=.75*f);b=d.geoJson2Path(b,{OffsetLeft:h[0],OffsetTop:h[1],scale:{x:c,y:f}});return this._getSingleProvince(a,b[0],e)},_getSingleProvince:function(a,b,d){var c,e=b.properties.name,f=x[e]||[0,0];u[e]?c=this.geo2pos(a,u[e]):b.cp?c=[b.cp[0]+f[0],b.cp[1]+f[1]]:(c=this._mapDataMap[a].bbox,c=this.geo2pos(a,[c.left+c.width/2,c.top+c.height/2]),c[0]+=f[0],c[1]+=f[1]);return b.name=this._nameChange(a,e),b.position=d,b.textX=c[0],b.textY=c[1],b},_getTransform:function(a,b,d){var c,e,f,h,g,l;c=this.series;var k=this.zr.getWidth(),m=this.zr.getHeight(),p=Math.round(.02*Math.min(k,m));for(f in b)b=c[f].mapLocation||{},e=b.x||e,h=b.y||h,g=b.width||g,l=b.height||l;c=this.parsePercent(e,k);c=isNaN(c)?p:c;f=this.parsePercent(h,m);f=isNaN(f)?p:f;g=null==g?k-c-2*p:this.parsePercent(g,k);l=null==l?m-f-2*p:this.parsePercent(l,m);p=a.width;a=a.height;b=g/d/p;var r=l/a;if(b>r?(b=r*d,g=p*b):(r=b,b=r*d,l=a*r),isNaN(e))switch(e=e||"center",e+""){case "center":c=Math.floor((k-g)/2);break;case "right":c=k-g}if(isNaN(h))switch(h=h||"center",h+""){case "center":f=Math.floor((m-l)/2);break;case "bottom":f=m-l}return{left:c,top:f,width:g,height:l,baseScale:1,scale:{x:b,y:r}}},_buildMap:function(k,p,r,t){for(var q,y,x,u,J,B,A,H,N,K,I,M=this.series,O=this.component.legend,P=this.component.dataRange,S=0,Q=p.length;Q>S;S++){if(H=h.clone(p[S]),N={name:H.name,path:H.path,position:h.clone(H.position)},y=H.name,x=r[y]){J=[x];q="";u=0;for(var R=x.seriesIndex.length;R>u;u++)J.push(M[x.seriesIndex[u]]),q+=M[x.seriesIndex[u]].name+" ",O&&this._showLegendSymbol[k]&&O.hasColor(M[x.seriesIndex[u]].name)&&this.shapeList.push(new c({zlevel:this.getZlevelBase(),z:this.getZBase()+1,position:h.clone(H.position),_mapType:k,style:{x:H.textX+3+7*u,y:H.textY-10,r:3,color:O.getColor(M[x.seriesIndex[u]].name)},hoverable:!1}));u=x.value}else{x="-";q="";J=[];for(var U in t)J.push(M[U]);u="-"}switch(this.ecTheme.map&&J.push(this.ecTheme.map),J.push(a),B=P&&!isNaN(u)?P.getColor(u):null,H.color=H.color||B||this.getItemStyleColor(this.deepQuery(J,"itemStyle.normal.color"),x.seriesIndex,-1,x)||this.deepQuery(J,"itemStyle.normal.areaStyle.color"),H.strokeColor=H.strokeColor||this.deepQuery(J,"itemStyle.normal.borderColor"),H.lineWidth=H.lineWidth||this.deepQuery(J,"itemStyle.normal.borderWidth"),N.color=this.getItemStyleColor(this.deepQuery(J,"itemStyle.emphasis.color"),x.seriesIndex,-1,x)||this.deepQuery(J,"itemStyle.emphasis.areaStyle.color")||H.color,N.strokeColor=this.deepQuery(J,"itemStyle.emphasis.borderColor")||H.strokeColor,N.lineWidth=this.deepQuery(J,"itemStyle.emphasis.borderWidth")||H.lineWidth,H.brushType=N.brushType=H.brushType||"both",H.lineJoin=N.lineJoin="round",H._name=N._name=y,A=this.deepQuery(J,"itemStyle.normal.label.textStyle"),I={zlevel:this.getZlevelBase(),z:this.getZBase()+1,position:h.clone(H.position),_mapType:k,_geo:this.pos2geo(k,[H.textX,H.textY]),style:{brushType:"fill",x:H.textX,y:H.textY,text:this.getLabelText(y,u,J,"normal"),_name:y,textAlign:"center",color:this.deepQuery(J,"itemStyle.normal.label.show")?this.deepQuery(J,"itemStyle.normal.label.textStyle.color"):"rgba(0,0,0,0)",textFont:this.getFont(A)}},I._style=h.clone(I.style),I.highlightStyle=h.clone(I.style),this.deepQuery(J,"itemStyle.emphasis.label.show")?(I.highlightStyle.text=this.getLabelText(y,u,J,"emphasis"),I.highlightStyle.color=this.deepQuery(J,"itemStyle.emphasis.label.textStyle.color")||I.style.color,A=this.deepQuery(J,"itemStyle.emphasis.label.textStyle")||A,I.highlightStyle.textFont=this.getFont(A)):I.highlightStyle.color="rgba(0,0,0,0)",K={zlevel:this.getZlevelBase(),z:this.getZBase(),position:h.clone(H.position),style:H,highlightStyle:N,_style:h.clone(H),_mapType:k},null!=H.scale&&(K.scale=h.clone(H.scale)),I=new g(I),K.style.shapeType){case "rectangle":K=new l(K);break;case "line":K=new m(K);break;case "circle":K=new c(K);break;case "polygon":K=new e(K);break;case "ellipse":K=new b(K);break;default:K=new f(K),K.buildPathArray&&(K.style.pathArray=K.buildPathArray(K.style.path))}(this._selectedMode[k]&&this._selected[y]||x.selected&&!1!==this._selected[y])&&(I.style=I.highlightStyle,K.style=K.highlightStyle);I.clickable=K.clickable=this._clickable[k]&&(null==x.clickable||x.clickable);this._selectedMode[k]&&(this._selected[y]=null!=this._selected[y]?this._selected[y]:x.selected,this._mapTypeMap[y]=k,(null==x.selectable||x.selectable)&&(K.clickable=I.clickable=!0,K.onclick=I.onclick=this.shapeHandler.onclick));this._hoverable[k]&&(null==x.hoverable||x.hoverable)?(I.hoverable=K.hoverable=!0,K.hoverConnect=I.id,I.hoverConnect=K.id):I.hoverable=K.hoverable=!1;d.pack(I,{name:q,tooltip:this.deepQuery(J,"tooltip")},0,x,0,y);this.shapeList.push(I);d.pack(K,{name:q,tooltip:this.deepQuery(J,"tooltip")},0,x,0,y);this.shapeList.push(K)}},_buildMark:function(a,b){this._seriesIndexToMapType=this._seriesIndexToMapType||{};this.markAttachStyle=this.markAttachStyle||{};var d=[this._mapDataMap[a].transform.left,this._mapDataMap[a].transform.top];"none"==a&&(d=[0,0]);for(var c in b)this._seriesIndexToMapType[c]=a,this.markAttachStyle[c]={position:d,_mapType:a},this.buildMark(c)},getMarkCoord:function(a,b){return b.geoCoord||u[b.name]?this.geo2pos(this._seriesIndexToMapType[a],b.geoCoord||u[b.name]):[0,0]},getMarkGeo:function(a){return a.geoCoord||u[a.name]},_nameChange:function(a,b){return this._nameMap[a][b]||b},getLabelText:function(a,b,d,c){return(d=this.deepQuery(d,"itemStyle."+c+".label.formatter"))?"function"==typeof d?d.call(this.myChart,a,b):"string"==typeof d?(d=d.replace("{a}","{a0}").replace("{b}","{b0}"),d.replace("{a0}",a).replace("{b0}",b)):void 0:a},_findMapTypeByPos:function(a,b){var d,c,e,f,h,g;for(g in this._mapDataMap)if(d=this._mapDataMap[g].transform,d&&this._roamMap[g]&&this._activeMapType[g]&&(c=d.left,e=d.top,f=d.width,h=d.height,a>=c&&c+f>=a&&b>=e&&e+h>=b))return g},__onmousewheel:function(b){if(!(0>=this.shapeList.length)){var d,c,e=b.event,f=r.getX(e),h=r.getY(e),g=r.getDelta(e),l=b.mapTypeControl;l||(l={},c=this._findMapTypeByPos(f,h),c&&this._roamMap[c]&&"move"!=this._roamMap[c]&&(l[c]=!0));var k=!1;for(c in l)if(l[c]){var k=!0,m=this._mapDataMap[c].transform,p=m.left,t=m.top,q=m.width,y=m.height,x=this.pos2geo(c,[f-p,h-t]);if(0=this._scaleLimitMap[c].max)continue}else if(d=1/1.2,null!=this._scaleLimitMap[c].min&&m.baseScale<=this._scaleLimitMap[c].min)continue;m.baseScale*=d;m.scale.x*=d;m.scale.y*=d;m.width=q*d;m.height=y*d;this._mapDataMap[c].hasRoam=!0;this._mapDataMap[c].transform=m;x=this.geo2pos(c,x);m.left-=x[0]-(f-p);m.top-=x[1]-(h-t);this._mapDataMap[c].transform=m;this.clearEffectShape(!0);p=0;for(t=this.shapeList.length;t>p;p++)this.shapeList[p]._mapType==c&&(this.shapeList[p].position[0]=m.left,this.shapeList[p].position[1]=m.top,"path"==this.shapeList[p].type||"symbol"==this.shapeList[p].type||"circle"==this.shapeList[p].type||"rectangle"==this.shapeList[p].type||"polygon"==this.shapeList[p].type||"line"==this.shapeList[p].type||"ellipse"==this.shapeList[p].type?(this.shapeList[p].scale[0]*=d,this.shapeList[p].scale[1]*=d):"mark-line"==this.shapeList[p].type?(this.shapeList[p].style.pointListLength=void 0,this.shapeList[p].style.pointList=!1,x=this.geo2pos(c,this.shapeList[p]._geo[0]),this.shapeList[p].style.xStart=x[0],this.shapeList[p].style.yStart=x[1],x=this.geo2pos(c,this.shapeList[p]._geo[1]),this.shapeList[p]._x=this.shapeList[p].style.xEnd=x[0],this.shapeList[p]._y=this.shapeList[p].style.yEnd=x[1]):"icon"==this.shapeList[p].type||"image"==this.shapeList[p].type?(x=this.geo2pos(c,this.shapeList[p]._geo),this.shapeList[p].style.x=this.shapeList[p].style._x=x[0]-this.shapeList[p].style.width/2,this.shapeList[p].style.y=this.shapeList[p].style._y=x[1]-this.shapeList[p].style.height/2):(x=this.geo2pos(c,this.shapeList[p]._geo),this.shapeList[p].style.x=x[0],this.shapeList[p].style.y=x[1],"text"==this.shapeList[p].type&&(this.shapeList[p]._style.x=this.shapeList[p].highlightStyle.x=x[0],this.shapeList[p]._style.y=this.shapeList[p].highlightStyle.y=x[1])),this.zr.modShape(this.shapeList[p].id))}if(k){r.stop(e);this.zr.refreshNextFrame();var u=this;clearTimeout(this._refreshDelayTicket);this._refreshDelayTicket=setTimeout(function(){u&&u.shapeList&&u.animationEffect()},100);this.messageCenter.dispatch(a.EVENT.MAP_ROAM,b.event,{type:"scale"},this.myChart)}}},__onmousedown:function(a){if(!(0>=this.shapeList.length)){var b=a.target;if(!b||!b.draggable){b=a.event;a=r.getX(b);var b=r.getY(b),d=this._findMapTypeByPos(a,b);if(d&&this._roamMap[d]&&"scale"!=this._roamMap[d]){this._mousedown=!0;this._mx=a;this._my=b;this._curMapType=d;this.zr.on(t.EVENT.MOUSEUP,this._onmouseup);var c=this;setTimeout(function(){c.zr.on(t.EVENT.MOUSEMOVE,c._onmousemove)},100)}}}},__onmousemove:function(b){if(this._mousedown&&this._isAlive){var d=b.event,c=r.getX(d),e=r.getY(d),f=this._mapDataMap[this._curMapType].transform;f.hasRoam=!0;f.left-=this._mx-c;f.top-=this._my-e;this._mx=c;this._my=e;this._mapDataMap[this._curMapType].transform=f;c=0;for(e=this.shapeList.length;e>c;c++)this.shapeList[c]._mapType==this._curMapType&&(this.shapeList[c].position[0]=f.left,this.shapeList[c].position[1]=f.top,this.zr.modShape(this.shapeList[c].id));this.messageCenter.dispatch(a.EVENT.MAP_ROAM,b.event,{type:"move"},this.myChart);this.clearEffectShape(!0);this.zr.refreshNextFrame();this._justMove=!0;r.stop(d)}},__onmouseup:function(a){a=a.event;this._mx=r.getX(a);this._my=r.getY(a);this._mousedown=!1;var b=this;setTimeout(function(){b._justMove&&b.animationEffect();b._justMove=!1;b.zr.un(t.EVENT.MOUSEMOVE,b._onmousemove);b.zr.un(t.EVENT.MOUSEUP,b._onmouseup)},120)},__onroamcontroller:function(b){var d=b.event;d.zrenderX=this.zr.getWidth()/2;d.zrenderY=this.zr.getHeight()/2;var c=b.mapTypeControl,e=0,f=0,h=b.step;switch(b.roamType){case "scaleUp":return d.zrenderDelta=1,void this.__onmousewheel({event:d,mapTypeControl:c});case "scaleDown":return d.zrenderDelta=-1,void this.__onmousewheel({event:d,mapTypeControl:c});case "up":e=-h;break;case "down":e=h;break;case "left":f=-h;break;case "right":f=h}var g,l;for(l in c)this._mapDataMap[l]&&this._activeMapType[l]&&(g=this._mapDataMap[l].transform,g.hasRoam=!0,g.left-=f,g.top-=e,this._mapDataMap[l].transform=g);d=0;for(e=this.shapeList.length;e>d;d++)l=this.shapeList[d]._mapType,c[l]&&this._activeMapType[l]&&(g=this._mapDataMap[l].transform,this.shapeList[d].position[0]=g.left,this.shapeList[d].position[1]=g.top,this.zr.modShape(this.shapeList[d].id));this.messageCenter.dispatch(a.EVENT.MAP_ROAM,b.event,{type:"move"},this.myChart);this.clearEffectShape(!0);this.zr.refreshNextFrame();clearTimeout(this.dircetionTimer);var k=this;this.dircetionTimer=setTimeout(function(){k.animationEffect()},150)},__ondrhoverlink:function(a){for(var b,c,e=0,f=this.shapeList.length;f>e;e++)b=this.shapeList[e]._mapType,this._hoverLinkMap[b]&&this._activeMapType[b]&&(c=d.get(this.shapeList[e],"value"),null!=c&&c>=a.valueMin&&c<=a.valueMax&&this.zr.addHoverShape(this.shapeList[e]))},onclick:function(b){if(this.isClick&&b.target&&!this._justMove&&"icon"!=b.target.type){this.isClick=!1;var d=b.target,c=d.style._name,e=this.shapeList.length,d=d._mapType||"";if("single"==this._selectedMode[d])for(var f in this._selected)if(this._selected[f]&&this._mapTypeMap[f]==d){for(var h=0;e>h;h++)this.shapeList[h].style._name==f&&this.shapeList[h]._mapType==d&&(this.shapeList[h].style=this.shapeList[h]._style,this.zr.modShape(this.shapeList[h].id));f!=c&&(this._selected[f]=!1)}this._selected[c]=!this._selected[c];for(h=0;e>h;h++)this.shapeList[h].style._name==c&&this.shapeList[h]._mapType==d&&(this.shapeList[h].style=this._selected[c]?this.shapeList[h].highlightStyle:this.shapeList[h]._style,this.zr.modShape(this.shapeList[h].id));this.messageCenter.dispatch(a.EVENT.MAP_SELECTED,b.event,{selected:this._selected,target:c},this.myChart);this.zr.refreshNextFrame();var g=this;setTimeout(function(){g.zr.trigger(t.EVENT.MOUSEMOVE,b.event)},100)}},refresh:function(a){a&&(this.option=a,this.series=a.series);0x;x+=2)F[x]+=f,F[x+1]+=e;b.push(new p(q||k,F))}"z"!==k&&"Z"!==k||b.push(new p("z",[]))}return b},_convertPoint:function(c,k,e,b,a,d,h,p,r){r*=Math.PI/180;var q=Math.cos(r)*(c-e)/2+Math.sin(r)*(k-b)/2,x=-1*Math.sin(r)*(c-e)/2+Math.cos(r)*(k-b)/2,u=q*q/(h*h)+x*x/(p*p);1=g(e,q)&&(x=Math.PI),1<=g(e,q)&&(x=0),0===d&&0x&&(x+=2*Math.PI),[c,k,h,p,b,x,r,d]},buildPath:function(c,f){var e=f.path,b=f.x||0,a=f.y||0;f.pathArray=f.pathArray||this.buildPathArray(e,b,a);for(var e=f.pathArray,d=f.pointList=[],h=[],b=0,a=e.length;a>b;b++){"M"==e[b].command.toUpperCase()&&(0k;k+=2)h.push([g[k],g[k+1]])}0b;b++)switch(d=e[b].command,g=e[b].points,d){case "L":c.lineTo(g[0],g[1]);break;case "M":c.moveTo(g[0],g[1]);break;case "C":c.bezierCurveTo(g[0],g[1],g[2],g[3],g[4],g[5]);break;case "Q":c.quadraticCurveTo(g[0],g[1],g[2],g[3]);break;case "A":var d=g[0],h=g[1],q=g[2],u=g[3],k=g[4],p=g[5],F=g[6],g=g[7],E=q>u?q:u,L=q>u?1:q/u,q=q>u?u/q:1;c.translate(d,h);c.rotate(F);c.scale(L,q);c.arc(0,0,E,k,k+p,1-g);c.scale(1/L,1/q);c.rotate(-F);c.translate(-d,-h);break;case "z":c.closePath()}},getRect:function(c){if(c.__rect)return c.__rect;var f;f="stroke"==c.brushType||"fill"==c.brushType?c.lineWidth||1:0;for(var e=Number.MAX_VALUE,b=Number.MIN_VALUE,a=Number.MAX_VALUE,d=Number.MIN_VALUE,h=c.x||0,g=c.y||0,k=c.pathArray||this.buildPathArray(c.path),p=0;pb&&(b=q[u])):(q[u]+gd&&(d=q[u]));var F;return F=e===Number.MAX_VALUE||b===Number.MIN_VALUE||a===Number.MAX_VALUE||d===Number.MIN_VALUE?{x:0,y:0,width:0,height:0}:{x:Math.round(e-f/2),y:Math.round(a-f/2),width:b-e+f,height:d-a+f},c.__rect=F,F}},k("../tool/util").inherits(c,q),c});u("zrender/shape/Ellipse",["require","./Base","../tool/util"],function(k){var q=k("./Base"),p=function(g){q.call(this,g)};return p.prototype={type:"ellipse",buildPath:function(g,f){var c=f.x,k=f.y,m=f.a,e=f.b,b=.5522848*m,a=.5522848*e;g.moveTo(c-m,k);g.bezierCurveTo(c-m,k-a,c-b,k-e,c,k-e);g.bezierCurveTo(c+b,k-e,c+m,k-a,c+m,k);g.bezierCurveTo(c+m,k+a,c+b,k+e,c,k+e);g.bezierCurveTo(c-b,k+e,c-m,k+a,c-m,k);g.closePath()},getRect:function(g){if(g.__rect)return g.__rect;var f;return f="stroke"==g.brushType||"fill"==g.brushType?g.lineWidth||1:0,g.__rect={x:Math.round(g.x-g.a-f/2),y:Math.round(g.y-g.b-f/2),width:2*g.a+f,height:2*g.b+f},g.__rect}},k("../tool/util").inherits(p,q),p});u("echarts/component/roamController","require ./base zrender/shape/Rectangle zrender/shape/Sector zrender/shape/Circle ../config zrender/tool/util zrender/tool/color zrender/tool/event ../component".split(" "),function(k){function q(a,b,c,e,f){if(e.roamController&&e.roamController.show){if(!e.roamController.mapTypeControl)return void console.error("option.roamController.mapTypeControl has not been defined.");p.call(this,a,b,c,e,f);this.rcOption=e.roamController;var g=this;this._drictionMouseDown=function(a){return g.__drictionMouseDown(a)};this._drictionMouseUp=function(a){return g.__drictionMouseUp(a)};this._drictionMouseMove=function(a){return g.__drictionMouseMove(a)};this._drictionMouseOut=function(a){return g.__drictionMouseOut(a)};this._scaleHandler=function(a){return g.__scaleHandler(a)};this.refresh(e)}}var p=k("./base"),g=k("zrender/shape/Rectangle"),f=k("zrender/shape/Sector"),c=k("zrender/shape/Circle"),l=k("../config");l.roamController={zlevel:0,z:4,show:!0,x:"left",y:"top",width:80,height:120,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:1,handleColor:"#6495ed",fillerColor:"#fff",step:15,mapTypeControl:null};var m=k("zrender/tool/util"),e=k("zrender/tool/color"),b=k("zrender/tool/event");return q.prototype={type:l.COMPONENT_TYPE_ROAMCONTROLLER,_buildShape:function(){if(this.rcOption.show){this._itemGroupLocation=this._getItemGroupLocation();this._buildBackground();this._buildItem();for(var a=0,b=this.shapeList.length;b>a;a++)this.zr.addShape(this.shapeList[a])}},_buildItem:function(){this.shapeList.push(this._getDirectionShape("up"));this.shapeList.push(this._getDirectionShape("down"));this.shapeList.push(this._getDirectionShape("left"));this.shapeList.push(this._getDirectionShape("right"));this.shapeList.push(this._getScaleShape("scaleUp"));this.shapeList.push(this._getScaleShape("scaleDown"))},_getDirectionShape:function(a){var b=this._itemGroupLocation.r,c=this._itemGroupLocation.x+b,g=this._itemGroupLocation.y+b,b={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:c,y:g,r:b,startAngle:-45,endAngle:45,color:this.rcOption.handleColor,text:"\x3e",textX:c+b/2+4,textY:g-.5,textAlign:"center",textBaseline:"middle",textPosition:"specific",textColor:this.rcOption.fillerColor,textFont:Math.floor(b/2)+"px arial"},highlightStyle:{color:e.lift(this.rcOption.handleColor,-.2),brushType:"fill"},clickable:!0};switch(a){case "up":b.rotation=[Math.PI/2,c,g];break;case "left":b.rotation=[Math.PI,c,g];break;case "down":b.rotation=[-Math.PI/2,c,g]}return b=new f(b),b._roamType=a,b.onmousedown=this._drictionMouseDown,b.onmouseup=this._drictionMouseUp,b.onmousemove=this._drictionMouseMove,b.onmouseout=this._drictionMouseOut,b},_getScaleShape:function(a){var b=this._itemGroupLocation.width,f=this._itemGroupLocation.height-b,f=Math.min(b/2-5,0>f?20:f)/2,b=this._itemGroupLocation.x+("scaleDown"===a?b-f:f),g=this._itemGroupLocation.y+this._itemGroupLocation.height-f,f={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:b,y:g,r:f,color:this.rcOption.handleColor,text:"scaleDown"===a?"-":"+",textX:b,textY:g-2,textAlign:"center",textBaseline:"middle",textPosition:"specific",textColor:this.rcOption.fillerColor,textFont:Math.floor(f)+"px verdana"},highlightStyle:{color:e.lift(this.rcOption.handleColor,-.2),brushType:"fill"},clickable:!0};return f=new c(f),f._roamType=a,f.onmousedown=this._scaleHandler,f},_buildBackground:function(){var a=this.reformCssArray(this.rcOption.padding);this.shapeList.push(new g({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._itemGroupLocation.x-a[3],y:this._itemGroupLocation.y-a[0],width:this._itemGroupLocation.width+a[3]+a[1],height:this._itemGroupLocation.height+a[0]+a[2],brushType:0===this.rcOption.borderWidth?"fill":"both",color:this.rcOption.backgroundColor,strokeColor:this.rcOption.borderColor,lineWidth:this.rcOption.borderWidth}}))},_getItemGroupLocation:function(){var a,b=this.reformCssArray(this.rcOption.padding),c=this.rcOption.width,e=this.rcOption.height;a=this.zr.getWidth();var f=this.zr.getHeight();switch(this.rcOption.x){case "center":a=Math.floor((a-c)/2);break;case "left":a=b[3]+this.rcOption.borderWidth;break;case "right":a=a-c-b[1]-b[3]-2*this.rcOption.borderWidth;break;default:a=this.parsePercent(this.rcOption.x,a)}switch(this.rcOption.y){case "top":b=b[0]+this.rcOption.borderWidth;break;case "bottom":b=f-e-b[0]-b[2]-2*this.rcOption.borderWidth;break;case "center":b=Math.floor((f-e)/2);break;default:b=this.parsePercent(this.rcOption.y,f)}return{x:a,y:b,r:c/2,width:c,height:e}},__drictionMouseDown:function(a){this.mousedown=!0;this._drictionHandlerOn(a)},__drictionMouseUp:function(a){this.mousedown=!1;this._drictionHandlerOff(a)},__drictionMouseMove:function(a){this.mousedown&&this._drictionHandlerOn(a)},__drictionMouseOut:function(a){this._drictionHandlerOff(a)},_drictionHandlerOn:function(a){this._dispatchEvent(a.event,a.target._roamType);clearInterval(this.dircetionTimer);var c=this;this.dircetionTimer=setInterval(function(){c._dispatchEvent(a.event,a.target._roamType)},100);b.stop(a.event)},_drictionHandlerOff:function(){clearInterval(this.dircetionTimer)},__scaleHandler:function(a){this._dispatchEvent(a.event,a.target._roamType);b.stop(a.event)},_dispatchEvent:function(a,b){this.messageCenter.dispatch(l.EVENT.ROAMCONTROLLER,a,{roamType:b,mapTypeControl:this.rcOption.mapTypeControl,step:this.rcOption.step},this.myChart)},refresh:function(a){a&&(this.option=a||this.option,this.option.roamController=this.reformOption(this.option.roamController),this.rcOption=this.option.roamController);this.clear();this._buildShape()}},m.inherits(q,p),k("../component").define("roamController",q),q});u("echarts/util/mapData/params",["require"],function(k){function q(g){if(!g.UTF8Encoding)return g;for(var f=g.features,c=0;c>1^-(1&b),a=a>>1^-(1&a),b=b+k,a=a+m,k=b,m=a;c.push([b/1024,a/1024])}return c}return{decode:q,params:{none:{getGeoJson:function(g){g({type:"FeatureCollection",features:[{type:"Feature",geometry:{coordinates:[],encodeOffsets:[],type:"Polygon"},properties:{}}]})}},world:{getGeoJson:function(g){k(["./geoJson/world_geo"],function(f){g(q(f))})}},china:{getGeoJson:function(g){k(["./geoJson/china_geo"],function(f){g(q(f))})}},"\u5357\u6d77\u8bf8\u5c9b":{textCoord:[126,25],getPath:function(g,f){for(var c=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],k="",m=g[0],e=g[1],b=0,a=c.length;a>b;b++)for(var k=k+("M "+((c[b][0][0]*f+m).toFixed(2)-0)+" "+((c[b][0][1]*f+e).toFixed(2)-0)+" "),d=1,h=c[b].length;h>d;d++)k+="L "+((c[b][d][0]*f+m).toFixed(2)-0)+" "+((c[b][d][1]*f+e).toFixed(2)-0)+" ";return k+" Z"}},"\u65b0\u7586":{getGeoJson:function(g){k(["./geoJson/xin_jiang_geo"],function(f){g(q(f))})}},"\u897f\u85cf":{getGeoJson:function(g){k(["./geoJson/xi_zang_geo"],function(f){g(q(f))})}},"\u5185\u8499\u53e4":{getGeoJson:function(g){k(["./geoJson/nei_meng_gu_geo"],function(f){g(q(f))})}},"\u9752\u6d77":{getGeoJson:function(g){k(["./geoJson/qing_hai_geo"],function(f){g(q(f))})}},"\u56db\u5ddd":{getGeoJson:function(g){k(["./geoJson/si_chuan_geo"],function(f){g(q(f))})}},"\u9ed1\u9f99\u6c5f":{getGeoJson:function(g){k(["./geoJson/hei_long_jiang_geo"],function(f){g(q(f))})}},"\u7518\u8083":{getGeoJson:function(g){k(["./geoJson/gan_su_geo"],function(f){g(q(f))})}},"\u4e91\u5357":{getGeoJson:function(g){k(["./geoJson/yun_nan_geo"],function(f){g(q(f))})}},"\u5e7f\u897f":{getGeoJson:function(g){k(["./geoJson/guang_xi_geo"],function(f){g(q(f))})}},"\u6e56\u5357":{getGeoJson:function(g){k(["./geoJson/hu_nan_geo"],function(f){g(q(f))})}},"\u9655\u897f":{getGeoJson:function(g){k(["./geoJson/shan_xi_1_geo"],function(f){g(q(f))})}},"\u5e7f\u4e1c":{getGeoJson:function(g){k(["./geoJson/guang_dong_geo"],function(f){g(q(f))})}},"\u5409\u6797":{getGeoJson:function(g){k(["./geoJson/ji_lin_geo"],function(f){g(q(f))})}},"\u6cb3\u5317":{getGeoJson:function(g){k(["./geoJson/he_bei_geo"],function(f){g(q(f))})}},"\u6e56\u5317":{getGeoJson:function(g){k(["./geoJson/hu_bei_geo"],function(f){g(q(f))})}},"\u8d35\u5dde":{getGeoJson:function(g){k(["./geoJson/gui_zhou_geo"],function(f){g(q(f))})}},"\u5c71\u4e1c":{getGeoJson:function(g){k(["./geoJson/shan_dong_geo"],function(f){g(q(f))})}},"\u6c5f\u897f":{getGeoJson:function(g){k(["./geoJson/jiang_xi_geo"],function(f){g(q(f))})}},"\u6cb3\u5357":{getGeoJson:function(g){k(["./geoJson/he_nan_geo"],function(f){g(q(f))})}},"\u8fbd\u5b81":{getGeoJson:function(g){k(["./geoJson/liao_ning_geo"],function(f){g(q(f))})}},"\u5c71\u897f":{getGeoJson:function(g){k(["./geoJson/shan_xi_2_geo"],function(f){g(q(f))})}},"\u5b89\u5fbd":{getGeoJson:function(g){k(["./geoJson/an_hui_geo"],function(f){g(q(f))})}},"\u798f\u5efa":{getGeoJson:function(g){k(["./geoJson/fu_jian_geo"],function(f){g(q(f))})}},"\u6d59\u6c5f":{getGeoJson:function(g){k(["./geoJson/zhe_jiang_geo"],function(f){g(q(f))})}},"\u6c5f\u82cf":{getGeoJson:function(g){k(["./geoJson/jiang_su_geo"],function(f){g(q(f))})}},"\u91cd\u5e86":{getGeoJson:function(g){k(["./geoJson/chong_qing_geo"],function(f){g(q(f))})}},"\u5b81\u590f":{getGeoJson:function(g){k(["./geoJson/ning_xia_geo"],function(f){g(q(f))})}},"\u6d77\u5357":{getGeoJson:function(g){k(["./geoJson/hai_nan_geo"],function(f){g(q(f))})}},"\u53f0\u6e7e":{getGeoJson:function(g){k(["./geoJson/tai_wan_geo"],function(f){g(q(f))})}},"\u5317\u4eac":{getGeoJson:function(g){k(["./geoJson/bei_jing_geo"],function(f){g(q(f))})}},"\u5929\u6d25":{getGeoJson:function(g){k(["./geoJson/tian_jin_geo"],function(f){g(q(f))})}},"\u4e0a\u6d77":{getGeoJson:function(g){k(["./geoJson/shang_hai_geo"],function(f){g(q(f))})}},"\u9999\u6e2f":{getGeoJson:function(g){k(["./geoJson/xiang_gang_geo"],function(f){g(q(f))})}},"\u6fb3\u95e8":{getGeoJson:function(g){k(["./geoJson/ao_men_geo"],function(f){g(q(f))})}}}}});u("echarts/util/mapData/textFixed",[],function(){return{"\u5e7f\u4e1c":[0,-10],"\u9999\u6e2f":[10,10],"\u6fb3\u95e8":[-10,18],"\u9ed1\u9f99\u6c5f":[0,20],"\u5929\u6d25":[5,5],"\u6df1\u5733\u5e02":[-35,0],"\u7ea2\u6cb3\u54c8\u5c3c\u65cf\u5f5d\u65cf\u81ea\u6cbb\u5dde":[0,20],"\u695a\u96c4\u5f5d\u65cf\u81ea\u6cbb\u5dde":[-5,15],"\u77f3\u6cb3\u5b50\u5e02":[-5,5],"\u4e94\u5bb6\u6e20\u5e02":[0,-10],"\u660c\u5409\u56de\u65cf\u81ea\u6cbb\u5dde":[10,10],"\u660c\u6c5f\u9ece\u65cf\u81ea\u6cbb\u53bf":[0,20],"\u9675\u6c34\u9ece\u65cf\u81ea\u6cbb\u53bf":[0,20],"\u4e1c\u65b9\u5e02":[0,20],"\u6e2d\u5357\u5e02":[0,20]}});u("echarts/util/mapData/geoCoord",[],function(){return{Russia:[100,60],"United States of America":[-99,38]}});u("echarts/util/projection/svg",["require","zrender/shape/Path"],function(k){function q(f){return parseFloat(f||0)}var p=k("zrender/shape/Path"),g={path:function(f,c){var g=f.getAttribute("d"),k=p.prototype.getRect({path:g});return{shapeType:"path",path:g,cp:[(k.x+k.width/2)*c[0],(k.y+k.height/2)*c[1]]}},rect:function(f,c){var g=q(f.getAttribute("x")),k=q(f.getAttribute("y")),e=q(f.getAttribute("width")),b=q(f.getAttribute("height"));return{shapeType:"rectangle",x:g,y:k,width:e,height:b,cp:[(g+e/2)*c[0],(k+b/2)*c[1]]}},line:function(f,c){var g=q(f.getAttribute("x1")),k=q(f.getAttribute("y1")),e=q(f.getAttribute("x2")),b=q(f.getAttribute("y2"));return{shapeType:"line",xStart:g,yStart:k,xEnd:e,yEnd:b,cp:[.5*(g+e)*c[0],.5*(k+b)*c[1]]}},circle:function(f,c){var g=q(f.getAttribute("cx")),k=q(f.getAttribute("cy")),e=q(f.getAttribute("r"));return{shapeType:"circle",x:g,y:k,r:e,cp:[g*c[0],k*c[1]]}},ellipse:function(f,c){var g=parseFloat(f.getAttribute("cx")||0),k=parseFloat(f.getAttribute("cy")||0),e=parseFloat(f.getAttribute("rx")||0),b=parseFloat(f.getAttribute("ry")||0);return{shapeType:"ellipse",x:g,y:k,a:e,b:b,cp:[g*c[0],k*c[1]]}},polygon:function(f,c){var g=f.getAttribute("points"),k=[1/0,1/0],e=[-1/0,-1/0];if(g){for(var g=g.replace(/^\s\s*/,"").replace(/\s\s*$/,"").replace(/,/g," ").split(/\s+/),b=[],a=0;aa;a++)k(b[a])}var m=[c.scale.x,c.scale.y],e=[];return k(f),e},pos2geo:function(f,c){var g=c instanceof Array?[1*c[0],1*c[1]]:[1*c.x,1*c.y];return[g[0]/f.scale.x,g[1]/f.scale.y]},geo2pos:function(f,c){var g=c instanceof Array?[1*c[0],1*c[1]]:[1*c.x,1*c.y];return[g[0]*f.scale.x,g[1]*f.scale.y]}}});u("echarts/util/projection/normal",[],function(){function k(g,f){f=f||{};p.xmin=360;p.xmax=-360;p.ymin=180;p.ymax=-180;for(var c,k,m=g.features,e=0,b=m.length;b>e;e++)if(k=m[e],!k.properties.name||!f[k.properties.name])switch(k.type){case "Feature":p[k.geometry.type](k.geometry.coordinates);break;case "GeometryCollection":c=k.geometries;for(var a=0,d=c.length;d>a;a++)p[c[a].type](c[a].coordinates)}return g.srcSize={left:1*p.xmin.toFixed(4),top:1*p.ymin.toFixed(4),width:1*(p.xmax-p.xmin).toFixed(4),height:1*(p.ymax-p.ymin).toFixed(4)},g}var q={formatPoint:function(g){return[(-168.5>g[0]&&63.8g[0]&&(this._bbox.xmin=g[0]);this._bbox.xmaxg[1]&&(this._bbox.ymin=g[1]);this._bbox.ymaxk;k++)f=q.makePoint(g[k]),c=0===k?"M"+f.join(","):c+"L"+f.join(",");return c},Polygon:function(g){for(var f="",c=0,k=g.length;k>c;c++)f=f+q.LineString(g[c])+"z";return f},MultiPoint:function(g){for(var f=[],c=0,k=g.length;k>c;c++)f.push(q.Point(g[c]));return f},MultiLineString:function(g){for(var f="",c=0,k=g.length;k>c;c++)f+=q.LineString(g[c]);return f},MultiPolygon:function(g){for(var f="",c=0,k=g.length;k>c;c++)f+=q.Polygon(g[c]);return f}},p={formatPoint:q.formatPoint,makePoint:function(g){var f=this.formatPoint(g);g=f[0];f=f[1];this.xmin>g&&(this.xmin=g);this.xmaxf&&(this.ymin=f);this.ymaxf;f++)this.makePoint(g[f])},Polygon:function(g){for(var f=0,c=g.length;c>f;f++)this.LineString(g[f])},MultiPoint:function(g){for(var f=0,c=g.length;c>f;f++)this.Point(g[f])},MultiLineString:function(g){for(var f=0,c=g.length;c>f;f++)this.LineString(g[f])},MultiPolygon:function(g){for(var f=0,c=g.length;c>f;f++)this.Polygon(g[f])}};return{getBbox:function(g,f){return f=f||{},g.srcSize||k(g,f),g.srcSize},geoJson2Path:function(g,f,c){function l(a,c){r=a.type;y=a.coordinates;q._bbox={xmin:360,xmax:-360,ymin:180,ymax:-180};x=q[r](y);b.push({path:x,cp:q.makePoint(c.properties.cp?c.properties.cp:[(q._bbox.xmin+q._bbox.xmax)/2,(q._bbox.ymin+q._bbox.ymax)/2]),properties:c.properties,id:c.id})}c=c||{};q.scale=null;q.offset=null;g.srcSize||k(g,c);f.offset={x:g.srcSize.left,y:g.srcSize.top,left:f.OffsetLeft||0,top:f.OffsetTop||0};q.scale=f.scale;q.offset=f.offset;for(var m,e=g.features,b=[],a=0,d=e.length;d>a;a++)if(m=e[a],!m.properties.name||!c[m.properties.name])if("Feature"==m.type)l(m.geometry,m);else if("GeometryCollection"==m.type){g=m.geometries;for(var h=0,p=g.length;p>h;h++)f=g[h],l(f,f)}var r,y,x;return b},pos2geo:function(g,f){var c,k;return f instanceof Array?(c=1*f[0],k=1*f[1]):(c=1*f.x,k=1*f.y),c=c/g.scale.x+g.offset.x-168.5,c=180c;c++)a[c].type===b.CHART_TYPE_GAUGE&&(a[c]=this.reformOption(a[c]),this.legendHoverLink=a[c].legendHoverLink||this.legendHoverLink,this._buildSingleGauge(c),this.buildMark(c));this.addShapeList()},_buildSingleGauge:function(a){var b=this.series[a];this._paramsMap[a]={center:this.parseCenter(this.zr,b.center),radius:this.parseRadius(this.zr,b.radius),startAngle:b.startAngle.toFixed(2)-0,endAngle:b.endAngle.toFixed(2)-0};this._paramsMap[a].totalAngle=this._paramsMap[a].startAngle-this._paramsMap[a].endAngle;this._colorMap(a);this._buildAxisLine(a);this._buildSplitLine(a);this._buildAxisTick(a);this._buildAxisLabel(a);this._buildPointer(a);this._buildTitle(a);this._buildDetail(a)},_buildAxisLine:function(b){var c=this.series[b];if(c.axisLine.show){var d,e,f=c.min,g=c.max-f,h=this._paramsMap[b],k=h.center,l=h.startAngle,m=h.totalAngle,p=h.colorArray,c=c.axisLine.lineStyle;d=this.parsePercent(c.width,h.radius[1]);for(var h=h.radius[1],q=h-d,u=l,z=0,B=p.length;B>z;z++)e=l-m*(p[z][0]-f)/g,d=this._getSector(k,q,h,e,u,p[z][1],c),u=e,d._animationAdd="r",a.set(d,"seriesIndex",b),a.set(d,"dataIndex",z),this.shapeList.push(d)}},_buildSplitLine:function(a){var b=this.series[a];if(b.splitLine.show){var d,e,f=this._paramsMap[a],g=b.splitNumber,h=b.min,k=b.max-h,b=b.splitLine;e=this.parsePercent(b.length,f.radius[1]);for(var b=b.lineStyle,l=b.color,m=f.center,p=f.startAngle*Math.PI/180,q=f.totalAngle*Math.PI/180,f=f.radius[1],u=f-e,z=0;g>=z;z++)d=p-q/g*z,e=Math.sin(d),d=Math.cos(d),this.shapeList.push(new c({zlevel:this.getZlevelBase(),z:this.getZBase()+1,hoverable:!1,style:{xStart:m[0]+d*f,yStart:m[1]-e*f,xEnd:m[0]+d*u,yEnd:m[1]-e*u,strokeColor:"auto"===l?this._getColor(a,h+k/g*z):l,lineType:b.type,lineWidth:b.width,shadowColor:b.shadowColor,shadowBlur:b.shadowBlur,shadowOffsetX:b.shadowOffsetX,shadowOffsetY:b.shadowOffsetY}}))}},_buildAxisTick:function(a){var b=this.series[a];if(b.axisTick.show)for(var d,e,f,g=this._paramsMap[a],h=b.splitNumber,k=b.min,l=b.max-k,m=b.axisTick,b=m.splitNumber,p=this.parsePercent(m.length,g.radius[1]),m=m.lineStyle,q=m.color,u=g.center,z=g.startAngle*Math.PI/180,B=g.totalAngle*Math.PI/180,g=g.radius[1],p=g-p,A=0,h=h*b;h>=A;A++)0!==A%b&&(d=z-B/h*A,e=Math.sin(d),f=Math.cos(d),this.shapeList.push(new c({zlevel:this.getZlevelBase(),z:this.getZBase()+1,hoverable:!1,style:{xStart:u[0]+f*g,yStart:u[1]-e*g,xEnd:u[0]+f*p,yEnd:u[1]-e*p,strokeColor:"auto"===q?this._getColor(a,k+l/h*A):q,lineType:m.type,lineWidth:m.width,shadowColor:m.shadowColor,shadowBlur:m.shadowBlur,shadowOffsetX:m.shadowOffsetX,shadowOffsetY:m.shadowOffsetY}})))},_buildAxisLabel:function(a){var b=this.series[a];if(b.axisLabel.show){var c,e,g,h,k=b.splitNumber,l=b.min,m=b.max-l,p=b.axisLabel.textStyle,q=this.getFont(p),u=p.color;c=this._paramsMap[a];for(var C=c.center,z=c.startAngle,B=c.totalAngle,A=c.radius[1]-this.parsePercent(b.splitLine.length,c.radius[1])-5,H=0;k>=H;H++)h=d.accAdd(l,d.accMul(d.accDiv(m,k),H)),c=z-B/k*H,e=Math.sin(c*Math.PI/180),g=Math.cos(c*Math.PI/180),c=(c+360)%360,this.shapeList.push(new f({zlevel:this.getZlevelBase(),z:this.getZBase()+1,hoverable:!1,style:{x:C[0]+g*A,y:C[1]-e*A,color:"auto"===u?this._getColor(a,h):u,text:this._getLabelText(b.axisLabel.formatter,h),textAlign:110<=c&&250>=c?"left":70>=c||290<=c?"right":"center",textBaseline:10<=c&&170>=c?"top":190<=c&&350>=c?"bottom":"middle",textFont:q,shadowColor:p.shadowColor,shadowBlur:p.shadowBlur,shadowOffsetX:p.shadowOffsetX,shadowOffsetY:p.shadowOffsetY}}))}},_buildPointer:function(b){var c=this.series[b];if(c.pointer.show){var d=c.max-c.min,e=c.pointer,f=this._paramsMap[b],h=this.parsePercent(e.length,f.radius[1]),k=this.parsePercent(e.width,f.radius[1]),l=f.center,p=this._getValue(b),p=pf;f++)e.push([b[f][0]*d+c,b[f][1]]);this._paramsMap[a].colorArray=e},_getColor:function(a,b){null==b&&(b=this._getValue(a));for(var c=this._paramsMap[a].colorArray,d=0,e=c.length;e>d;d++)if(c[d][0]>=b)return c[d][1];return c[c.length-1][1]},_getSector:function(a,b,c,d,f,g,h){return new e({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:a[0],y:a[1],r0:b,r:c,startAngle:d,endAngle:f,brushType:"fill",color:g,shadowColor:h.shadowColor,shadowBlur:h.shadowBlur,shadowOffsetX:h.shadowOffsetX,shadowOffsetY:h.shadowOffsetY}})},_getLabelText:function(a,b){if(a){if("function"==typeof a)return a.call(this.myChart,b);if("string"==typeof a)return a.replace("{value}",b)}return b},refresh:function(a){a&&(this.option=a,this.series=a.series);this.backupShapeList();this._buildShape()}},h.inherits(q,p),k("../chart").define("gauge",q),q});u("echarts/util/shape/GaugePointer",["require","zrender/shape/Base","zrender/tool/util","./normalIsCover"],function(k){function q(f){p.call(this,f)}var p=k("zrender/shape/Base"),g=k("zrender/tool/util");return q.prototype={type:"gauge-pointer",buildPath:function(f,c){var g=c.r,k=c.width,e=c.angle,b=c.x-Math.cos(e)*k*(k>=g/3?1:2),a=c.y+Math.sin(e)*k*(k>=g/3?1:2),e=c.angle-Math.PI/2;f.moveTo(b,a);f.lineTo(c.x+Math.cos(e)*k,c.y-Math.sin(e)*k);f.lineTo(c.x+Math.cos(c.angle)*g,c.y-Math.sin(c.angle)*g);f.lineTo(c.x-Math.cos(e)*k,c.y+Math.sin(e)*k);f.lineTo(b,a)},getRect:function(f){if(f.__rect)return f.__rect;var c=2*f.width,g=f.x,k=f.y,e=g+Math.cos(f.angle)*f.r,b=k-Math.sin(f.angle)*f.r;return f.__rect={x:Math.min(g,e)-c,y:Math.min(k,b)-c,width:Math.abs(g-e)+c,height:Math.abs(k-b)+c},f.__rect},isCover:k("./normalIsCover")},g.inherits(q,p),q});u("echarts/chart/funnel","require ./base zrender/shape/Text zrender/shape/Line zrender/shape/Polygon ../config ../util/ecData ../util/number zrender/tool/util zrender/tool/color zrender/tool/area ../chart".split(" "),function(k){function q(a,b,c,d,e){p.call(this,a,b,c,d,e);this.refresh(d)}var p=k("./base"),g=k("zrender/shape/Text"),f=k("zrender/shape/Line"),c=k("zrender/shape/Polygon"),l=k("../config");l.funnel={zlevel:0,z:2,clickable:!0,legendHoverLink:!0,x:10,y:80,x2:10,y2:60,min:0,max:100,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",itemStyle:{normal:{borderColor:"#fff",borderWidth:1,label:{show:!0,position:"outer"},labelLine:{show:!0,length:10,lineStyle:{width:1,type:"solid"}}},emphasis:{borderColor:"rgba(0,0,0,0)",borderWidth:1,label:{show:!0},labelLine:{show:!0}}}};var m=k("../util/ecData"),e=k("../util/number"),b=k("zrender/tool/util"),a=k("zrender/tool/color"),d=k("zrender/tool/area");return q.prototype={type:l.CHART_TYPE_FUNNEL,_buildShape:function(){var a=this.series,b=this.component.legend;this._paramsMap={};this._selected={};this.selectedMap={};for(var c,d=0,e=a.length;e>d;d++)a[d].type===l.CHART_TYPE_FUNNEL&&(a[d]=this.reformOption(a[d]),this.legendHoverLink=a[d].legendHoverLink||this.legendHoverLink,c=a[d].name||"",this.selectedMap[c]=b?b.isSelected(c):!0,this.selectedMap[c])&&(this._buildSingleFunnel(d),this.buildMark(d));this.addShapeList()},_buildSingleFunnel:function(a){var b=this.component.legend,c=this.series[a],d=this._mapData(a),f=this._getLocation(a);this._paramsMap[a]={location:f,data:d};for(var g,k=0,l=[],m=0,p=d.length;p>m;m++)g=d[m].name,this.selectedMap[g]=b?b.isSelected(g):!0,this.selectedMap[g]&&!isNaN(d[m].value)&&(l.push(d[m]),k++);if(0!==k){for(var q,u,d=this._buildFunnelCase(a),G=c.funnelAlign,C=c.gap,z=1m;m++)if(g=l[m].name,this.selectedMap[g]&&!isNaN(l[m].value)){switch(k=p-2>=m?this._getItemWidth(a,l[m+H].value):"descending"===c.sort?e.parsePercent(c.minSize,f.width):e.parsePercent(c.maxSize,f.width),G){case "left":q=f.x;break;case "right":q=f.x+f.width-A;break;default:q=N-A/2}u=this._buildItem(a,l[m]._index,b?b.getColor(g):this.zr.getColor(l[m]._index),q,B,A,k,z,G);B+=z+C;q=u.style.pointList;K.unshift([q[0][0]-10,q[0][1]]);K.push([q[1][0]+10,q[1][1]]);0===m&&(0===A?(q=K.pop(),"center"==G&&(K[0][0]+=10),"right"==G&&(K[0][0]=q[0]),K[0][1]-="center"==G?10:15,1==p&&(q=u.style.pointList)):(K[K.length-1][1]-=5,K[0][1]-=5));A=k}d&&(K.unshift([q[3][0]-10,q[3][1]]),K.push([q[2][0]+10,q[2][1]]),0===A?(q=K.pop(),"center"==G&&(K[0][0]+=10),"right"==G&&(K[0][0]=q[0]),K[0][1]+="center"==G?10:15):(K[K.length-1][1]+=5,K[0][1]+=5),d.style.pointList=K)}},_buildFunnelCase:function(a){var b=this.series[a];if(this.deepQuery([b,this.option],"calculable")){var d=this._paramsMap[a].location,d={hoverable:!1,style:{pointListd:[[d.x-10,d.y-10],[d.x+d.width+10,d.y-10],[d.x+d.width+10,d.y+d.height+10],[d.x-10,d.y+d.height+10]],brushType:"stroke",lineWidth:1,strokeColor:b.calculableHolderColor||this.ecTheme.calculableHolderColor||l.calculableHolderColor}};return m.pack(d,b,a,void 0,-1),this.setCalculable(d),d=new c(d),this.shapeList.push(d),d}},_getLocation:function(a){a=this.series[a];var b=this.zr.getWidth(),c=this.zr.getHeight(),d=this.parsePercent(a.x,b),e=this.parsePercent(a.y,c),b=null==a.width?b-d-this.parsePercent(a.x2,b):this.parsePercent(a.width,b);return{x:d,y:e,width:b,height:null==a.height?c-e-this.parsePercent(a.y2,c):this.parsePercent(a.height,c),centerX:d+b/2}},_mapData:function(a){function c(a,b){return"-"===a.value?1:"-"===b.value?-1:b.value-a.value}function d(a,b){return-c(a,b)}a=this.series[a];for(var e=b.clone(a.data),f=0,g=e.length;g>f;f++)e[f]._index=f;return"none"!=a.sort&&e.sort("descending"===a.sort?c:d),e},_buildItem:function(a,b,c,d,e,f,g,k,l){var p=this.series,q=p[a],u=q.data[b],G=this.getPolygon(a,b,c,d,e,f,g,k,l);m.pack(G,p[a],a,p[a].data[b],b,p[a].data[b].name);this.shapeList.push(G);var C=this.getLabel(a,b,c,d,e,f,g,k,l);m.pack(C,p[a],a,p[a].data[b],b,p[a].data[b].name);this.shapeList.push(C);this._needLabel(q,u,!1)||(C.invisible=!0);a=this.getLabelLine(a,b,c,d,e,f,g,k,l);this.shapeList.push(a);this._needLabelLine(q,u,!1)||(a.invisible=!0);b=[];c=[];return this._needLabelLine(q,u,!0)&&(b.push(a.id),c.push(a.id)),this._needLabel(q,u,!0)&&(b.push(C.id),c.push(G.id)),G.hoverConnect=b,C.hoverConnect=c,G},_getItemWidth:function(a,b){var c=this.series[a],d=this._paramsMap[a].location,f=c.min,g=c.max,k=e.parsePercent(c.minSize,d.width),c=e.parsePercent(c.maxSize,d.width);return b*(c-k)/(g-f)},getPolygon:function(b,d,e,f,g,k,l,m,p){var q=this.series[b],u=q.data[d],v=[u,q],G=this.deepMerge(v,"itemStyle.normal")||{},C=this.deepMerge(v,"itemStyle.emphasis")||{};e=this.getItemStyleColor(G.color,b,d,u)||e;b=this.getItemStyleColor(C.color,b,d,u)||("string"==typeof e?a.lift(e,-.2):e);switch(p){case "left":p=f;break;case "right":p=f+(k-l);break;default:p=f+(k-l)/2}f={zlevel:this.getZlevelBase(),z:this.getZBase(),clickable:this.deepQuery(v,"clickable"),style:{pointList:[[f,g],[f+k,g],[p+l,g+m],[p,g+m]],brushType:"both",color:e,lineWidth:G.borderWidth,strokeColor:G.borderColor},highlightStyle:{color:b,lineWidth:C.borderWidth,strokeColor:C.borderColor}};return this.deepQuery([u,q,this.option],"calculable")&&(this.setCalculable(f),f.draggable=!0),new c(f)},getLabel:function(c,e,f,k,l,m,p,q,u){var w,D=this.series[c],v=this._paramsMap[c].location,D=b.merge(b.clone(D.data[e].itemStyle)||{},D.itemStyle),G="normal",C=D[G].label,z=C.textStyle||{},B=D[G].labelLine.length,A=this.getLabelText(c,e,G),H=this.getFont(z),N=f;C.position=C.position||D.normal.label.position;"inner"===C.position||"inside"===C.position||"center"===C.position?(w=u,N=Math.max(m,p)/2>d.getTextWidth(A,H)?"#fff":a.reverse(f)):w="left"===C.position?"right":"left";l={zlevel:this.getZlevelBase(),z:this.getZBase()+1,style:{x:this._getLabelPoint(C.position,k,v,m,p,B,u),y:l+q/2,color:z.color||N,text:A,textAlign:z.align||w,textBaseline:z.baseline||"middle",textFont:H}};return G="emphasis",C=D[G].label||C,z=C.textStyle||z,B=D[G].labelLine.length||B,C.position=C.position||D.normal.label.position,A=this.getLabelText(c,e,G),H=this.getFont(z),N=f,"inner"===C.position||"inside"===C.position||"center"===C.position?(w=u,N=Math.max(m,p)/2>d.getTextWidth(A,H)?"#fff":a.reverse(f)):w="left"===C.position?"right":"left",l.highlightStyle={x:this._getLabelPoint(C.position,k,v,m,p,B,u),color:z.color||N,text:A,textAlign:z.align||w,textFont:H,brushType:"fill"},new g(l)},getLabelText:function(a,b,c){var d=this.series[a],e=d.data[b];return(c=this.deepQuery([e,d],"itemStyle."+c+".label.formatter"))?"function"==typeof c?c.call(this.myChart,{seriesIndex:a,seriesName:d.name||"",series:d,dataIndex:b,data:e,name:e.name,value:e.value}):"string"==typeof c?c.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}").replace("{a0}",d.name).replace("{b0}",e.name).replace("{c0}",e.value):void 0:e.name},getLabelLine:function(a,c,d,e,g,k,l,m,p){var q=this.series[a];a=this._paramsMap[a].location;c=b.merge(b.clone(q.data[c].itemStyle)||{},q.itemStyle);var q="normal",u=c[q].labelLine,v=c[q].labelLine.length,G=u.lineStyle||{},C=c[q].label;C.position=C.position||c.normal.label.position;g={zlevel:this.getZlevelBase(),z:this.getZBase()+1,hoverable:!1,style:{xStart:this._getLabelLineStartPoint(e,a,k,l,p),yStart:g+m/2,xEnd:this._getLabelPoint(C.position,e,a,k,l,v,p),yEnd:g+m/2,strokeColor:G.color||d,lineType:G.type,lineWidth:G.width}};return q="emphasis",u=c[q].labelLine||u,v=c[q].labelLine.length||v,G=u.lineStyle||G,C=c[q].label||C,C.position=C.position,g.highlightStyle={xEnd:this._getLabelPoint(C.position,e,a,k,l,v,p),strokeColor:G.color||d,lineType:G.type,lineWidth:G.width},new f(g)},_getLabelPoint:function(a,b,c,d,e,f,g){switch("inner"===a||"inside"===a?"center":a){case "center":return"center"==g?b+d/2:"left"==g?b+10:b+d-10;case "left":return"auto"===f?c.x-10:"center"==g?c.centerX-Math.max(d,e)/2-f:"right"==g?b-(e>d?e-d:0)-f:c.x-f;default:return"auto"===f?c.x+c.width+10:"center"==g?c.centerX+Math.max(d,e)/2+f:"right"==g?c.x+c.width+f:b+Math.max(d,e)+f}},_getLabelLineStartPoint:function(a,b,c,d,e){return"center"==e?b.centerX:d>c?a+Math.min(c,d)/2:a+Math.max(c,d)/2},_needLabel:function(a,b,c){return this.deepQuery([b,a],"itemStyle."+(c?"emphasis":"normal")+".label.show")},_needLabelLine:function(a,b,c){return this.deepQuery([b,a],"itemStyle."+(c?"emphasis":"normal")+".labelLine.show")},refresh:function(a){a&&(this.option=a,this.series=a.series);this.backupShapeList();this._buildShape()}},b.inherits(q,p),k("../chart").define("funnel",q),q});u("echarts/chart/eventRiver","require ./base ../layout/eventRiver zrender/shape/Polygon ../component/axis ../component/grid ../component/dataZoom ../config ../util/ecData ../util/date zrender/tool/util zrender/tool/color ../chart".split(" "),function(k){function q(a,b,c,e,f){p.call(this,a,b,c,e,f);var g=this;g._ondragend=function(){g.isDragend=!0};this.refresh(e)}var p=k("./base"),g=k("../layout/eventRiver"),f=k("zrender/shape/Polygon");k("../component/axis");k("../component/grid");k("../component/dataZoom");var c=k("../config");c.eventRiver={zlevel:0,z:2,clickable:!0,legendHoverLink:!0,itemStyle:{normal:{borderColor:"rgba(0,0,0,0)",borderWidth:1,label:{show:!0,position:"inside",formatter:"{b}"}},emphasis:{borderColor:"rgba(0,0,0,0)",borderWidth:1,label:{show:!0}}}};var l=k("../util/ecData"),m=k("../util/date"),e=k("zrender/tool/util"),b=k("zrender/tool/color");return q.prototype={type:c.CHART_TYPE_EVENTRIVER,_buildShape:function(){var a=this.series;this.selectedMap={};this._dataPreprocessing();for(var b=this.component.legend,c=[],e=0;ee;e++)if(c[e].type===this.type){a=this.component.xAxis.getAxis(c[e].xAxisIndex||0);for(var g=0,k=c[e].eventList.length;k>g;g++){b=c[e].eventList[g].evolution;for(var l=0,p=b.length;p>l;l++)b[l].timeScale=a.getCoord(m.getNewDate(b[l].time)-0),b[l].valueScale=Math.pow(b[l].value,.8)}}this._intervalX=Math.round(this.component.grid.getWidth()/40)},_drawEventRiver:function(){for(var a=this.series,b=0;ba)){for(var f=[],g=[],k=0;a>k;k++)f.push(e[k].timeScale),g.push(e[k].valueScale);e=[];e.push([f[0],c]);for(k=0;a-1>k;k++)e.push([(f[k]+f[k+1])/2,g[k]/-2+c]);e.push([(f[k]+(f[k]+b))/2,g[k]/-2+c]);e.push([f[k]+b,c]);e.push([(f[k]+(f[k]+b))/2,g[k]/2+c]);for(k=a-1;0f+1){var k=Math.round((f+c)/2);g.leftChild=q(f,k);g.rightChild=q(k,c)}return g}function p(f,c,g){if(1>g-c)return 0;var k=Math.round((f.left+f.right)/2);if(c==f.left&&g==f.right)f=f.maxValue;else if(k>=g&&null!=f.leftChild)f=p(f.leftChild,c,g);else if(c>=k&&null!=f.rightChild)f=p(f.rightChild,c,g);else{var e=0,b=0;null!=f.leftChild&&(e=p(f.leftChild,c,k));null!=f.rightChild&&(b=p(f.rightChild,k,g));f=e>b?e:b}return f}function g(f,c,k,m){if(null!=f){var e=Math.round((f.left+f.right)/2);f.maxValue=f.maxValue>m?f.maxValue:m;(Math.floor(10*c)!=Math.floor(10*f.left)||Math.floor(10*k)!=Math.floor(10*f.right))&&(e>=k?g(f.leftChild,c,k,m):c>=e?g(f.rightChild,c,k,m):(g(f.leftChild,c,e,m),g(f.rightChild,e,k,m)))}}return function(f,c,l){function m(a,b){var c=a.importance,d=b.importance;return c>d?-1:d>c?1:0}function e(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}for(var b=0;b