coo.mvc.static.echarts.echarts-all.js Maven / Gradle / Ivy
!function(e){var t,n;!function(){function e(e,t){if(!t)return e;if(0===e.indexOf(".")){var n=t.split("/"),i=e.split("/"),a=n.length-1,o=i.length,r=0,s=0;e:for(var l=0;o>l;l++)switch(i[l]){case"..":if(!(a>r))break e;r++,s++;break;case".":s++;break;default:break e}return n.length=a-r,i=i.slice(s),n.concat(i).join("/")}return e}function i(t){function n(n,r){if("string"==typeof n){var s=i[n];return s||(s=o(e(n,t)),i[n]=s),s}n instanceof Array&&(r=r||function(){},r.apply(this,a(n,r,t)))}var i={};return n}function a(n,i,a){for(var s=[],l=r[a],h=0,m=Math.min(n.length,i.length);m>h;h++){var V,U=e(n[h],a);switch(U){case"require":V=l&&l.require||t;break;case"exports":V=l.exports;break;case"module":V=l;break;default:V=o(U)}s.push(V)}return s}function o(e){var t=r[e];if(!t)throw new Error("No "+e);if(!t.defined){var n=t.factory,i=n.apply(this,a(t.deps||[],n,e));"undefined"!=typeof i&&(t.exports=i),t.defined=1}return t.exports}var r={};n=function(e,t,n){r[e]={id:e,deps:t,factory:n,defined:0,exports:{},require:i(e)}},t=i("")}(),n("echarts",["echarts/echarts"],function(e){return e}),n("echarts/echarts",["require","./config","zrender/tool/util","zrender/tool/event","zrender/tool/env","zrender","zrender/config","./chart/island","./component/toolbox","./component","./component/title","./component/tooltip","./component/legend","./util/ecData","./chart","zrender/tool/color","./component/timeline","zrender/shape/Image","zrender/loadingEffect/Bar","zrender/loadingEffect/Bubble","zrender/loadingEffect/DynamicLine","zrender/loadingEffect/Ring","zrender/loadingEffect/Spin","zrender/loadingEffect/Whirling","./theme/default"],function(e){function t(){r.Dispatcher.call(this)}function n(e){this._themeConfig=o.clone(a),this.dom=e,this._connected=!1,this._status={dragIn:!1,dragOut:!1,needRefresh:!1},this._curEventType=!1,this._chartList=[],this._messageCenter=new t,this._messageCenterOutSide=new t,this.resize=this.resize(),this._init()}function i(e,t,n,i,a){for(var o=e._chartList,r=o.length;r--;){var s=o[r];"function"==typeof s[t]&&s[t](n,i,a)}}var a=e("./config"),o=e("zrender/tool/util"),r=e("zrender/tool/event"),s={},l=e("zrender/tool/env").canvasSupported,h=new Date-0,m={},V="_echarts_instance_";s.version="2.1.8",s.dependencies={zrender:"2.0.5"},s.init=function(t,i){var a=e("zrender");(a.version||"1.0.3").replace(".","")-0r;r++){var l=d[r],h=U[l];o[h]="_on"+l.toLowerCase(),n.on(h,this._onzrevent)}this.chart={},this.component={};var m=e("./chart/island");this._island=new m(this._themeConfig,this._messageCenter,n,{},this),this.chart.island=this._island;var V=e("./component/toolbox");this._toolbox=new V(this._themeConfig,this._messageCenter,n,{},this),this.component.toolbox=this._toolbox;var p=e("./component");p.define("title",e("./component/title")),p.define("tooltip",e("./component/tooltip")),p.define("legend",e("./component/legend")),(0===n.getWidth()||0===n.getHeight())&&console.error("Dom’s width & height should be ready before init.")},__onevent:function(e){e.__echartsId=e.__echartsId||this.id;var t=e.__echartsId===this.id;switch(this._curEventType||(this._curEventType=e.type),e.type){case a.EVENT.LEGEND_SELECTED:this._onlegendSelected(e);break;case a.EVENT.DATA_ZOOM:if(!t){var n=this.component.dataZoom;n&&(n.silence(!0),n.absoluteZoom(e.zoom),n.silence(!1))}this._ondataZoom(e);break;case a.EVENT.DATA_RANGE:t&&this._ondataRange(e);break;case a.EVENT.MAGIC_TYPE_CHANGED:if(!t){var i=this.component.toolbox;i&&(i.silence(!0),i.setMagicType(e.magicType),i.silence(!1))}this._onmagicTypeChanged(e);break;case a.EVENT.DATA_VIEW_CHANGED:t&&this._ondataViewChanged(e);break;case a.EVENT.TOOLTIP_HOVER:t&&this._tooltipHover(e);break;case a.EVENT.RESTORE:this._onrestore();break;case a.EVENT.REFRESH:t&&this._onrefresh(e);break;case a.EVENT.TOOLTIP_IN_GRID:case a.EVENT.TOOLTIP_OUT_GRID:if(t){if(this._connected){var o=this.component.grid;o&&(e.x=(e.event.zrenderX-o.getX())/o.getWidth(),e.y=(e.event.zrenderY-o.getY())/o.getHeight())}}else{var o=this.component.grid;o&&this._zr.trigger("mousemove",{connectTrigger:!0,zrenderX:o.getX()+e.x*o.getWidth(),zrenderY:o.getY()+e.y*o.getHeight()})}}if(this._connected&&t&&this._curEventType===e.type){for(var r in this._connected)this._connected[r].connectedEventHandler(e);this._curEventType=null}(!t||!this._connected&&t)&&(this._curEventType=null)},_onclick:function(e){if(i(this,"onclick",e),e.target){var t=this._eventPackage(e.target);t&&null!=t.seriesIndex&&this._messageCenter.dispatch(a.EVENT.CLICK,e.event,t,this)}},_ondblclick:function(e){if(i(this,"ondblclick",e),e.target){var t=this._eventPackage(e.target);t&&null!=t.seriesIndex&&this._messageCenter.dispatch(a.EVENT.DBLCLICK,e.event,t,this)}},_onmouseover:function(e){if(e.target){var t=this._eventPackage(e.target);t&&null!=t.seriesIndex&&this._messageCenter.dispatch(a.EVENT.HOVER,e.event,t,this)}},_onmouseout:function(e){if(e.target){var t=this._eventPackage(e.target);t&&null!=t.seriesIndex&&this._messageCenter.dispatch(a.EVENT.MOUSEOUT,e.event,t,this)}},_ondragstart:function(e){this._status={dragIn:!1,dragOut:!1,needRefresh:!1},i(this,"ondragstart",e)},_ondragenter:function(e){i(this,"ondragenter",e)},_ondragover:function(e){i(this,"ondragover",e)},_ondragleave:function(e){i(this,"ondragleave",e)},_ondrop:function(e){i(this,"ondrop",e,this._status),this._island.ondrop(e,this._status)},_ondragend:function(e){if(i(this,"ondragend",e,this._status),this._timeline&&this._timeline.ondragend(e,this._status),this._island.ondragend(e,this._status),this._status.needRefresh){this._syncBackupData(this._option);var t=this._messageCenter;t.dispatch(a.EVENT.DATA_CHANGED,e.event,this._eventPackage(e.target),this),t.dispatch(a.EVENT.REFRESH,null,null,this)}},_onlegendSelected:function(e){this._status.needRefresh=!1,i(this,"onlegendSelected",e,this._status),this._status.needRefresh&&this._messageCenter.dispatch(a.EVENT.REFRESH,null,null,this)},_ondataZoom:function(e){this._status.needRefresh=!1,i(this,"ondataZoom",e,this._status),this._status.needRefresh&&this._messageCenter.dispatch(a.EVENT.REFRESH,null,null,this)},_ondataRange:function(e){this._clearEffect(),this._status.needRefresh=!1,i(this,"ondataRange",e,this._status),this._status.needRefresh&&this._zr.refresh()},_onmagicTypeChanged:function(){this._clearEffect(),this._render(this._toolbox.getMagicOption())},_ondataViewChanged:function(e){this._syncBackupData(e.option),this._messageCenter.dispatch(a.EVENT.DATA_CHANGED,null,e,this),this._messageCenter.dispatch(a.EVENT.REFRESH,null,null,this)},_tooltipHover:function(e){var t=[];i(this,"ontooltipHover",e,t)},_onrestore:function(){this.restore()},_onrefresh:function(e){this._refreshInside=!0,this.refresh(e),this._refreshInside=!1},_syncBackupData:function(e){this.component.dataZoom&&this.component.dataZoom.syncBackupData(e)},_eventPackage:function(t){if(t){var n=e("./util/ecData"),i=n.get(t,"seriesIndex"),a=n.get(t,"dataIndex");return a=-1!=i&&this.component.dataZoom?this.component.dataZoom.getRealDataIndex(i,a):a,{seriesIndex:i,seriesName:(n.get(t,"series")||{}).name,dataIndex:a,data:n.get(t,"data"),name:n.get(t,"name"),value:n.get(t,"value"),special:n.get(t,"special")}}},_render:function(t){this._mergeGlobalConifg(t);var n=t.backgroundColor;if(n)if(l||-1==n.indexOf("rgba"))this.dom.style.backgroundColor=n;else{var i=n.split(",");this.dom.style.filter="alpha(opacity="+100*i[3].substring(0,i[3].lastIndexOf(")"))+")",i.length=3,i[0]=i[0].replace("a",""),this.dom.style.backgroundColor=i.join(",")+")"}this._zr.clearAnimation(),this._chartList=[];var o=e("./chart"),r=e("./component");(t.xAxis||t.yAxis)&&(t.grid=t.grid||{},t.dataZoom=t.dataZoom||{});for(var s,h,m,V=["title","legend","tooltip","dataRange","roamController","grid","dataZoom","xAxis","yAxis","polar"],U=0,d=V.length;d>U;U++)h=V[U],m=this.component[h],t[h]?(m?m.refresh&&m.refresh(t):(s=r.get(/^[xy]Axis$/.test(h)?"axis":h),m=new s(this._themeConfig,this._messageCenter,this._zr,t,this,h),this.component[h]=m),this._chartList.push(m)):m&&(m.dispose(),this.component[h]=null,delete this.component[h]);for(var p,c,u,y={},U=0,d=t.series.length;d>U;U++)c=t.series[U].type,c?y[c]||(y[c]=!0,p=o.get(c),p?(this.chart[c]?(u=this.chart[c],u.refresh(t)):u=new p(this._themeConfig,this._messageCenter,this._zr,t,this),this._chartList.push(u),this.chart[c]=u):console.error(c+" has not been required.")):console.error("series["+U+"] chart type has not been defined.");for(c in this.chart)c==a.CHART_TYPE_ISLAND||y[c]||(this.chart[c].dispose(),this.chart[c]=null,delete this.chart[c]);this.component.grid&&this.component.grid.refixAxisShape(this.component),this._island.refresh(t),this._toolbox.refresh(t),t.animation&&!t.renderAsImage?this._zr.refresh():this._zr.render();var b="IMG"+this.id,g=document.getElementById(b);t.renderAsImage&&l?(g?g.src=this.getDataURL(t.renderAsImage):(g=this.getImage(t.renderAsImage),g.id=b,g.style.position="absolute",g.style.left=0,g.style.top=0,this.dom.firstChild.appendChild(g)),this.un(),this._zr.un(),this._disposeChartList(),this._zr.clear()):g&&g.parentNode.removeChild(g),g=null,this._option=t},restore:function(){this._clearEffect(),this._option=o.clone(this._optionRestore),this._disposeChartList(),this._island.clear(),this._toolbox.reset(this._option,!0),this._render(this._option)},refresh:function(e){this._clearEffect(),e=e||{};var t=e.option;!this._refreshInside&&t&&(t=this.getOption(),o.merge(t,e.option,!0),o.merge(this._optionRestore,e.option,!0),this._toolbox.reset(t)),this._island.refresh(t),this._toolbox.refresh(t),this._zr.clearAnimation();for(var n=0,i=this._chartList.length;i>n;n++)this._chartList[n].refresh&&this._chartList[n].refresh(t);this.component.grid&&this.component.grid.refixAxisShape(this.component),this._zr.refresh()},_disposeChartList:function(){this._clearEffect(),this._zr.clearAnimation();for(var e=this._chartList.length;e--;){var t=this._chartList[e];if(t){var n=t.type;this.chart[n]&&delete this.chart[n],this.component[n]&&delete this.component[n],t.dispose&&t.dispose()}}this._chartList=[]},_mergeGlobalConifg:function(t){for(var n=["backgroundColor","calculable","calculableColor","calculableHolderColor","nameConnector","valueConnector","animation","animationThreshold","animationDuration","animationEasing","addDataAnimation","symbolList","DRAG_ENABLE_TIME"],i=n.length;i--;){var a=n[i];null==t[a]&&(t[a]=this._themeConfig[a])}var o=t.color;o&&o.length||(o=this._themeConfig.color),l||(t.animation=!1,t.addDataAnimation=!1),this._zr.getColor=function(t){var n=e("zrender/tool/color");return n.getColor(t,o)}},setOption:function(e,t){return e.timeline?this._setTimelineOption(e):this._setOption(e,t)},_setOption:function(e,t){return this._option=!t&&this._option?o.merge(this.getOption(),o.clone(e),!0):o.clone(e),this._optionRestore=o.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 e(e){var i=n._optionRestore[e];if(i)if(i instanceof Array)for(var a=i.length;a--;)t[e][a].data=o.clone(i[a].data);else t[e].data=o.clone(i.data)}var t=o.clone(this._option),n=this;return e("xAxis"),e("yAxis"),e("series"),t},setSeries:function(e,t){return t?(this._option.series=e,this.setOption(this._option,t)):this.setOption({series:e}),this},getSeries:function(){return this.getOption().series},_setTimelineOption:function(t){this._timeline&&this._timeline.dispose();var n=e("./component/timeline"),i=new n(this._themeConfig,this._messageCenter,this._zr,t,this);return this._timeline=i,this.component.timeline=this._timeline,this},addData:function(e,t,n,i,r){for(var s=e instanceof Array?e:[[e,t,n,i,r]],l=this.getOption(),h=this._optionRestore,m=0,V=s.length;V>m;m++){e=s[m][0],t=s[m][1],n=s[m][2],i=s[m][3],r=s[m][4];var U=h.series[e],d=n?"unshift":"push",p=n?"pop":"shift";if(U){var c=U.data,u=l.series[e].data;if(c[d](t),u[d](t),i||(c[p](),t=u[p]()),null!=r){var y,b;if(U.type===a.CHART_TYPE_PIE&&(y=h.legend)&&(b=y.data)){var g=l.legend.data;if(b[d](r),g[d](r),!i){var k=o.indexOf(b,t.name);-1!=k&&b.splice(k,1),k=o.indexOf(g,t.name),-1!=k&&g.splice(k,1)}}else if(null!=h.xAxis&&null!=h.yAxis){var f,x,_=U.xAxisIndex||0;(null==h.xAxis[_].type||"category"===h.xAxis[_].type)&&(f=h.xAxis[_].data,x=l.xAxis[_].data,f[d](r),x[d](r),i||(f[p](),x[p]())),_=U.yAxisIndex||0,"category"===h.yAxis[_].type&&(f=h.yAxis[_].data,x=l.yAxis[_].data,f[d](r),x[d](r),i||(f[p](),x[p]()))}}this._option.series[e].data=l.series[e].data}}this._zr.clearAnimation();for(var L=this._chartList,m=0,V=L.length;V>m;m++)l.addDataAnimation&&L[m].addDataAnimation&&L[m].addDataAnimation(s);this.component.dataZoom&&this.component.dataZoom.syncOption(l),this._option=l;var W=this;return setTimeout(function(){if(W._zr){W._zr.clearAnimation();for(var e=0,t=L.length;t>e;e++)L[e].motionlessOnce=l.addDataAnimation&&L[e].addDataAnimation;W._messageCenter.dispatch(a.EVENT.REFRESH,null,{option:l},W)}},l.addDataAnimation?500:0),this},addMarkPoint:function(e,t){return this._addMark(e,t,"markPoint")},addMarkLine:function(e,t){return this._addMark(e,t,"markLine")},_addMark:function(e,t,n){var i,a=this._option.series;if(a&&(i=a[e])){var r=this._optionRestore.series,s=r[e],l=i[n],h=s[n];l=i[n]=l||{data:[]},h=s[n]=h||{data:[]};for(var m in t)"data"===m?(l.data=l.data.concat(t.data),h.data=h.data.concat(t.data)):"object"!=typeof t[m]||null==l[m]?l[m]=h[m]=t[m]:(o.merge(l[m],t[m],!0),o.merge(h[m],t[m],!0));var V=this.chart[i.type];V&&V.addMark(e,t,n)}return this},delMarkPoint:function(e,t){return this._delMark(e,t,"markPoint")},delMarkLine:function(e,t){return this._delMark(e,t,"markLine")},_delMark:function(e,t,n){var i,a,o,r=this._option.series;if(!(r&&(i=r[e])&&(a=i[n])&&(o=a.data)))return this;t=t.split(" > ");for(var s=-1,l=0,h=o.length;h>l;l++){var m=o[l];if(m instanceof Array){if(m[0].name===t[0]&&m[1].name===t[1]){s=l;break}}else if(m.name===t[0]){s=l;break}}if(s>-1){o.splice(s,1),this._optionRestore.series[e][n].data.splice(s,1);var V=this.chart[i.type];V&&V.delMark(e,t.join(" > "),n)}return this},getDom:function(){return this.dom},getZrender:function(){return this._zr},getDataURL:function(e){if(!l)return"";if(0===this._chartList.length){var t="IMG"+this.id,n=document.getElementById(t);if(n)return n.src}var i=this.component.tooltip;switch(i&&i.hideTip(),e){case"jpeg":break;default:e="png"}var a=this._option.backgroundColor;return a&&"rgba(0,0,0,0)"===a.replace(" ","")&&(a="#fff"),this._zr.toDataURL("image/"+e,a)},getImage:function(e){var t=this._optionRestore.title,n=document.createElement("img");return n.src=this.getDataURL(e),n.title=t&&t.text||"ECharts",n},getConnectedDataURL:function(t){if(!this.isConnected())return this.getDataURL(t);var n=this.dom,i={self:{img:this.getDataURL(t),left:n.offsetLeft,top:n.offsetTop,right:n.offsetLeft+n.offsetWidth,bottom:n.offsetTop+n.offsetHeight}},a=i.self.left,o=i.self.top,r=i.self.right,s=i.self.bottom;for(var l in this._connected)n=this._connected[l].getDom(),i[l]={img:this._connected[l].getDataURL(t),left:n.offsetLeft,top:n.offsetTop,right:n.offsetLeft+n.offsetWidth,bottom:n.offsetTop+n.offsetHeight},a=Math.min(a,i[l].left),o=Math.min(o,i[l].top),r=Math.max(r,i[l].right),s=Math.max(s,i[l].bottom);var h=document.createElement("div");h.style.position="absolute",h.style.left="-4000px",h.style.width=r-a+"px",h.style.height=s-o+"px",document.body.appendChild(h);var m=e("zrender").init(h),V=e("zrender/shape/Image");for(var l in i)m.addShape(new V({style:{x:i[l].left-a,y:i[l].top-o,image:i[l].img}}));m.render();var U=this._option.backgroundColor;U&&"rgba(0,0,0,0)"===U.replace(/ /g,"")&&(U="#fff");var d=m.toDataURL("image/png",U);return setTimeout(function(){m.dispose(),h.parentNode.removeChild(h),h=null},100),d},getConnectedImage:function(e){var t=this._optionRestore.title,n=document.createElement("img");return n.src=this.getConnectedDataURL(e),n.title=t&&t.text||"ECharts",n},on:function(e,t){return this._messageCenterOutSide.bind(e,t,this),this},un:function(e,t){return this._messageCenterOutSide.unbind(e,t),this},connect:function(e){if(!e)return this;if(this._connected||(this._connected={}),e instanceof Array)for(var t=0,n=e.length;n>t;t++)this._connected[e[t].id]=e[t];else this._connected[e.id]=e;return this},disConnect:function(e){if(!e||!this._connected)return this;if(e instanceof Array)for(var t=0,n=e.length;n>t;t++)delete this._connected[e[t].id];else delete this._connected[e.id];for(var i in this._connected)return this;return this._connected=!1,this},connectedEventHandler:function(e){e.__echartsId!=this.id&&this._onevent(e)},isConnected:function(){return!!this._connected},showLoading:function(t){var n={bar:e("zrender/loadingEffect/Bar"),bubble:e("zrender/loadingEffect/Bubble"),dynamicLine:e("zrender/loadingEffect/DynamicLine"),ring:e("zrender/loadingEffect/Ring"),spin:e("zrender/loadingEffect/Spin"),whirling:e("zrender/loadingEffect/Whirling")};this._toolbox.hideDataView(),t=t||{};var i=t.textStyle||{};t.textStyle=i;var a=o.merge(o.clone(i),this._themeConfig.textStyle);i.textFont=a.fontStyle+" "+a.fontWeight+" "+a.fontSize+"px "+a.fontFamily,i.text=t.text||this._themeConfig.loadingText,null!=t.x&&(i.x=t.x),null!=t.y&&(i.y=t.y),t.effectOption=t.effectOption||{},t.effectOption.textStyle=i;var r=t.effect;return("string"==typeof r||null==r)&&(r=n[t.effect||"spin"]),this._zr.showLoading(new r(t.effectOption)),this},hideLoading:function(){return this._zr.hideLoading(),this},setTheme:function(t){if(t){if("string"==typeof t)switch(t){default:t=e("./theme/default")}else t=t||{};for(var n in this._themeConfig)delete this._themeConfig[n];for(var n in a)this._themeConfig[n]=o.clone(a[n]);t.color&&(this._themeConfig.color=[]),t.symbolList&&(this._themeConfig.symbolList=[]),o.merge(this._themeConfig,o.clone(t),!0)}l||(this._themeConfig.textStyle.fontFamily=this._themeConfig.textStyle.fontFamily2),this._timeline&&this._timeline.setTheme(!0),this._optionRestore&&this.restore()},resize:function(){var e=this;return function(){if(e._clearEffect(),e._zr.resize(),e._option&&e._option.renderAsImage&&l)return e._render(e._option),e;e._zr.clearAnimation(),e._island.resize(),e._toolbox.resize(),e._timeline&&e._timeline.resize();for(var t=0,n=e._chartList.length;n>t;t++)e._chartList[t].resize&&e._chartList[t].resize();return e.component.grid&&e.component.grid.refixAxisShape(e.component),e._zr.refresh(),e._messageCenter.dispatch(a.EVENT.RESIZE,null,null,e),e}},_clearEffect:function(){this._zr.modLayer(a.EFFECT_ZLEVEL,{motionBlur:!1}),this._zr.painter.clearLayer(a.EFFECT_ZLEVEL)},clear:function(){return this._disposeChartList(),this._zr.clear(),this._option={},this._optionRestore={},this.dom.style.backgroundColor=null,this},dispose:function(){var e=this.dom.getAttribute(V);e&&delete m[e],this._island.dispose(),this._toolbox.dispose(),this._timeline&&this._timeline.dispose(),this._messageCenter.unbind(),this.clear(),this._zr.dispose(),this._zr=null}},s}),n("echarts/config",[],function(){var e={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","#1e90ff","#ff6347","#7b68ee","#00fa9a","#ffd700","#6699FF","#ff6666","#3cb371","#b8860b","#30e0e0"],title:{text:"",subtext:"",x:"left",y:"top",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:5,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}},legend:{show:!0,orient:"horizontal",x:"center",y:"top",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,itemWidth:20,itemHeight:14,textStyle:{color:"#333"},selectedMode:!0},dataRange:{show:!0,orient:"vertical",x:"left",y:"bottom",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,itemWidth:20,itemHeight:14,precision:0,splitNumber:5,calculable:!1,hoverLink:!0,realtime:!0,color:["#006edd","#e0ffff"],textStyle:{color:"#333"}},toolbox:{show:!1,orient:"horizontal",x:"right",y:"top",color:["#1e90ff","#22bb22","#4b0082","#d2691e"],disableColor:"#ddd",effectiveColor:"red",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,itemSize:16,showTitle:!0,feature:{mark:{show:!1,title:{mark:"辅助线开关",markUndo:"删除辅助线",markClear:"清空辅助线"},lineStyle:{width:1,color:"#1e90ff",type:"dashed"}},dataZoom:{show:!1,title:{dataZoom:"区域缩放",dataZoomReset:"区域缩放后退"}},dataView:{show:!1,title:"数据视图",readOnly:!1,lang:["数据视图","关闭","刷新"]},magicType:{show:!1,title:{line:"折线图切换",bar:"柱形图切换",stack:"堆积",tiled:"平铺",force:"力导向布局图切换",chord:"和弦图切换",pie:"饼图切换",funnel:"漏斗图切换"},type:[]},restore:{show:!1,title:"还原"},saveAsImage:{show:!1,title:"保存为图片",type:"png",lang:["点击保存"]}}},tooltip:{show:!0,showContent:!0,trigger:"item",islandFormatter:"{a}
{b} : {c}",showDelay:20,hideDelay:100,transitionDuration:.4,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"}},dataZoom:{show:!1,orient:"horizontal",backgroundColor:"rgba(0,0,0,0)",dataBackgroundColor:"#eee",fillerColor:"rgba(144,197,237,0.2)",handleColor:"rgba(70,130,180,0.8)",showDetail:!0,realtime:!0},grid:{x:80,y:60,x2:80,y2:60,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},categoryAxis:{show:!0,position:"bottom",name:"",nameLocation:"end",nameTextStyle:{},boundaryGap:!0,axisLine:{show:!0,onZero:!0,lineStyle:{color:"#48b",width:2,type:"solid"}},axisTick:{show:!0,interval:"auto",inside:!1,length:5,lineStyle:{color:"#333",width:1}},axisLabel:{show:!0,interval:"auto",rotate:0,margin:8,textStyle:{color:"#333"}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},valueAxis:{show:!0,position:"left",name:"",nameLocation:"end",nameTextStyle:{},boundaryGap:[0,0],axisLine:{show:!0,onZero:!0,lineStyle:{color:"#48b",width:2,type:"solid"}},axisTick:{show:!1,inside:!1,length:5,lineStyle:{color:"#333",width:1}},axisLabel:{show:!0,rotate:0,margin:8,textStyle:{color:"#333"}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},polar:{center:["50%","50%"],radius:"75%",startAngle:90,boundaryGap:[0,0],splitNumber:5,name:{show:!0,textStyle:{color:"#333"}},axisLine:{show:!0,lineStyle:{color:"#ccc",width:1,type:"solid"}},axisLabel:{show:!1,textStyle:{color:"#333"}},splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}},splitLine:{show:!0,lineStyle:{width:1,color:"#ccc"}},type:"polygon"},timeline:{show:!0,type:"time",notMerge:!1,realtime:!0,x:80,x2:80,y2:0,height:50,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,controlPosition:"left",autoPlay:!1,loop:!0,playInterval: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:!1,textStyle:{color:"auto"}}},controlStyle:{normal:{color:"#333"},emphasis:{color:"#1e90ff"}},symbol:"emptyDiamond",symbolSize:4,currentIndex:0},roamController:{show:!0,x:"left",y:"top",width:80,height:120,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,handleColor:"#6495ed",fillerColor:"#fff",step:15,mapTypeControl:null},bar:{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}}}},line:{clickable:!0,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{label:{show:!1},lineStyle:{width:2,type:"solid",shadowColor:"rgba(0,0,0,0)",shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0}},emphasis:{label:{show:!1}}},symbolSize:2,showAllSymbol:!1},k:{clickable:!0,legendHoverLink:!1,xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{color:"#fff",color0:"#00aa11",lineStyle:{width:1,color:"#ff3200",color0:"#00aa11"}},emphasis:{}}},scatter:{clickable:!0,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbolSize:4,large:!1,largeThreshold:2e3,itemStyle:{normal:{label:{show:!1,formatter:function(e,t,n){return"undefined"!=typeof n[2]?n[2]:n[0]+" , "+n[1]}}},emphasis:{label:{show:!1,formatter:function(e,t,n){return"undefined"!=typeof n[2]?n[2]:n[0]+" , "+n[1]}}}}},radar:{clickable:!0,legendHoverLink:!0,polarIndex:0,itemStyle:{normal:{label:{show:!1},lineStyle:{width:2,type:"solid"}},emphasis:{label:{show:!1}}},symbolSize:2},pie:{clickable:!0,legendHoverLink:!0,center:["50%","50%"],radius:[0,"75%"],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:20,lineStyle:{width:1,type:"solid"}}},emphasis:{borderColor:"rgba(0,0,0,0)",borderWidth:1,label:{show:!1},labelLine:{show:!1,length:20,lineStyle:{width:1,type:"solid"}}}}},map:{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)"}}}}},force:{center:["50%","50%"],size:"100%",preventOverlap:!1,coolDown:.99,minRadius:10,maxRadius:20,ratioScaling:!1,large:!1,useWorker:!1,steps:1,scaling:1,gravity:1,symbol:"circle",symbolSize:0,linkSymbol:null,linkSymbolSize:[10,15],draggable:!0,clickable:!0,roam:!1,itemStyle:{normal:{label:{show:!1,position:"inside"},nodeStyle:{brushType:"both",borderColor:"#5182ab",borderWidth:1},linkStyle:{color:"#5182ab",width:1,type:"line"}},emphasis:{label:{show:!1},nodeStyle:{},linkStyle:{opacity:0}}}},chord:{clickable:!0,radius:["65%","75%"],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"}}}},gauge:{center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,min:0,max:100,precision:0,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#228b22"],[.8,"#48b"],[1,"#ff4500"]],width:30}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,textStyle:{color:"auto"}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},pointer:{show:!0,length:"80%",width:8,color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],textStyle:{color:"#333",fontSize:15}},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:40,offsetCenter:[0,"40%"],textStyle:{color:"auto",fontSize:30}}},funnel:{clickable:!0,legendHoverLink:!0,x:80,y:60,x2:80,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}}}},eventRiver:{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}}}},island:{r:15,calculateStep:.1},markPoint:{clickable:!0,symbol:"pin",symbolSize:10,large:!1,effect:{show:!1,loop:!0,period:15,scaleSize:2},itemStyle:{normal:{borderWidth:2,label:{show:!0,position:"inside"}},emphasis:{label:{show:!0}}}},markLine:{clickable:!0,symbol:["circle","arrow"],symbolSize:[2,4],large:!1,effect:{show:!1,loop:!0,period:15,scaleSize:2},itemStyle:{normal:{borderWidth:1.5,label:{show:!0,position:"end"},lineStyle:{type:"dashed"}},emphasis:{label:{show:!1},lineStyle:{}}}},textStyle:{decoration:"none",fontFamily:"Arial, Verdana, sans-serif",fontFamily2:"微软雅黑",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_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:7,symbolList:["circle","rectangle","triangle","diamond","emptyCircle","emptyRectangle","emptyTriangle","emptyDiamond"],loadingText:"Loading...",calculable:!1,calculableColor:"rgba(255,165,0,0.6)",calculableHolderColor:"#ccc",nameConnector:" & ",valueConnector:": ",animation:!0,addDataAnimation:!0,animationThreshold:2e3,animationDuration:2e3,animationEasing:"ExponentialOut"};return e}),n("zrender/tool/util",["require","../dep/excanvas"],function(e){function t(e){if("object"==typeof e&&null!==e){var n=e;
if(e instanceof Array){n=[];for(var i=0,a=e.length;a>i;i++)n[i]=t(e[i])}else if(!c[Object.prototype.toString.call(e)]){n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=t(e[o]))}return n}return e}function n(e,t,n,a){t.hasOwnProperty(n)&&("object"!=typeof e[n]||c[Object.prototype.toString.call(e[n])]?!a&&n in e||(e[n]=t[n]):i(e[n],t[n],a))}function i(e,t,i){for(var a in t)n(e,t,a,i);return e}function a(){if(!m)if(e("../dep/excanvas"),window.G_vmlCanvasManager){var t=document.createElement("div");t.style.position="absolute",t.style.top="-1000px",document.body.appendChild(t),m=G_vmlCanvasManager.initElement(t).getContext("2d")}else m=document.createElement("canvas").getContext("2d");return m}function o(){return U||(V=document.createElement("canvas"),d=V.width,p=V.height,U=V.getContext("2d")),U}function r(e,t){var n,i=100;e+u>d&&(d=e+u+i,V.width=d,n=!0),t+y>p&&(p=t+y+i,V.height=p,n=!0),-u>e&&(u=Math.ceil(-e/i)*i,d+=u,V.width=d,n=!0),-y>t&&(y=Math.ceil(-t/i)*i,p+=y,V.height=p,n=!0),n&&U.translate(u,y)}function s(){return{x:u,y:y}}function l(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;i>n;n++)if(e[n]===t)return n;return-1}function h(e,t){function n(){}var i=e.prototype;n.prototype=t.prototype,e.prototype=new n;for(var a in i)e.prototype[a]=i[a];e.constructor=e}var m,V,U,d,p,c={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1},u=0,y=0;return{inherits:h,clone:t,merge:i,getContext:a,getPixelContext:o,getPixelOffset:s,adjustCanvasSize:r,indexOf:l}}),n("zrender/tool/event",["require","../mixin/Eventful"],function(e){"use strict";function t(e){return"undefined"!=typeof e.zrenderX&&e.zrenderX||"undefined"!=typeof e.offsetX&&e.offsetX||"undefined"!=typeof e.layerX&&e.layerX||"undefined"!=typeof e.clientX&&e.clientX}function n(e){return"undefined"!=typeof e.zrenderY&&e.zrenderY||"undefined"!=typeof e.offsetY&&e.offsetY||"undefined"!=typeof e.layerY&&e.layerY||"undefined"!=typeof e.clientY&&e.clientY}function i(e){return"undefined"!=typeof e.zrenderDelta&&e.zrenderDelta||"undefined"!=typeof e.wheelDelta&&e.wheelDelta||"undefined"!=typeof e.detail&&-e.detail}var a=e("../mixin/Eventful"),o="function"==typeof window.addEventListener?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0};return{getX:t,getY:n,getDelta:i,stop:o,Dispatcher:a}}),n("zrender/tool/env",[],function(){function e(e){var t=this.os={},n=this.browser={},i=e.match(/Web[kK]it[\/]{0,1}([\d.]+)/),a=e.match(/(Android);?[\s\/]+([\d.]+)?/),o=e.match(/(iPad).*OS\s([\d_]+)/),r=e.match(/(iPod)(.*OS\s([\d_]+))?/),s=!o&&e.match(/(iPhone\sOS)\s([\d_]+)/),l=e.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),h=l&&e.match(/TouchPad/),m=e.match(/Kindle\/([\d.]+)/),V=e.match(/Silk\/([\d._]+)/),U=e.match(/(BlackBerry).*Version\/([\d.]+)/),d=e.match(/(BB10).*Version\/([\d.]+)/),p=e.match(/(RIM\sTablet\sOS)\s([\d.]+)/),c=e.match(/PlayBook/),u=e.match(/Chrome\/([\d.]+)/)||e.match(/CriOS\/([\d.]+)/),y=e.match(/Firefox\/([\d.]+)/),b=e.match(/MSIE ([\d.]+)/),g=i&&e.match(/Mobile\//)&&!u,k=e.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/)&&!u,b=e.match(/MSIE\s([\d.]+)/);return(n.webkit=!!i)&&(n.version=i[1]),a&&(t.android=!0,t.version=a[2]),s&&!r&&(t.ios=t.iphone=!0,t.version=s[2].replace(/_/g,".")),o&&(t.ios=t.ipad=!0,t.version=o[2].replace(/_/g,".")),r&&(t.ios=t.ipod=!0,t.version=r[3]?r[3].replace(/_/g,"."):null),l&&(t.webos=!0,t.version=l[2]),h&&(t.touchpad=!0),U&&(t.blackberry=!0,t.version=U[2]),d&&(t.bb10=!0,t.version=d[2]),p&&(t.rimtabletos=!0,t.version=p[2]),c&&(n.playbook=!0),m&&(t.kindle=!0,t.version=m[1]),V&&(n.silk=!0,n.version=V[1]),!V&&t.android&&e.match(/Kindle Fire/)&&(n.silk=!0),u&&(n.chrome=!0,n.version=u[1]),y&&(n.firefox=!0,n.version=y[1]),b&&(n.ie=!0,n.version=b[1]),g&&(e.match(/Safari/)||t.ios)&&(n.safari=!0),k&&(n.webview=!0),b&&(n.ie=!0,n.version=b[1]),t.tablet=!!(o||c||a&&!e.match(/Mobile/)||y&&e.match(/Tablet/)||b&&!e.match(/Phone/)&&e.match(/Touch/)),t.phone=!(t.tablet||t.ipod||!(a||s||l||U||d||u&&e.match(/Android/)||u&&e.match(/CriOS\/([\d.]+)/)||y&&e.match(/Mobile/)||b&&e.match(/Touch/))),{browser:n,os:t,canvasSupported:document.createElement("canvas").getContext?!0:!1}}return e(navigator.userAgent)}),n("zrender",["zrender/zrender"],function(e){return e}),n("zrender/zrender",["require","./dep/excanvas","./tool/util","./tool/log","./tool/guid","./Handler","./Painter","./Storage","./animation/Animation","./tool/env"],function(e){function t(e){return function(){for(var t=e.animatingElements,n=0,i=t.length;i>n;n++)e.storage.mod(t[n].id);(t.length||e._needsRefreshNextFrame)&&e.refresh()}}e("./dep/excanvas");var n=e("./tool/util"),i=e("./tool/log"),a=e("./tool/guid"),o=e("./Handler"),r=e("./Painter"),s=e("./Storage"),l=e("./animation/Animation"),h={},m={};m.version="2.0.5",m.init=function(e){var t=new V(a(),e);return h[t.id]=t,t},m.dispose=function(e){if(e)e.dispose();else{for(var t in h)h[t].dispose();h={}}return m},m.getInstance=function(e){return h[e]},m.delInstance=function(e){return delete h[e],m};var V=function(n,i){this.id=n,this.env=e("./tool/env"),this.storage=new s,this.painter=new r(i,this.storage),this.handler=new o(i,this.storage,this.painter),this.animatingElements=[],this.animation=new l({stage:{update:t(this)}}),this.animation.start(),this._needsRefreshNextFrame=!1};return V.prototype.getId=function(){return this.id},V.prototype.addShape=function(e){return this.storage.addRoot(e),this},V.prototype.addGroup=function(e){return this.storage.addRoot(e),this},V.prototype.delShape=function(e){return this.storage.delRoot(e),this},V.prototype.delGroup=function(e){return this.storage.delRoot(e),this},V.prototype.modShape=function(e,t){return this.storage.mod(e,t),this},V.prototype.modGroup=function(e,t){return this.storage.mod(e,t),this},V.prototype.modLayer=function(e,t){return this.painter.modLayer(e,t),this},V.prototype.addHoverShape=function(e){return this.storage.addHover(e),this},V.prototype.render=function(e){return this.painter.render(e),this._needsRefreshNextFrame=!1,this},V.prototype.refresh=function(e){return this.painter.refresh(e),this._needsRefreshNextFrame=!1,this},V.prototype.refreshNextFrame=function(){return this._needsRefreshNextFrame=!0,this},V.prototype.refreshHover=function(e){return this.painter.refreshHover(e),this},V.prototype.refreshShapes=function(e,t){return this.painter.refreshShapes(e,t),this},V.prototype.resize=function(){return this.painter.resize(),this},V.prototype.animate=function(e,t,a){if("string"==typeof e&&(e=this.storage.get(e)),e){var o;if(t){for(var r=t.split("."),s=e,l=0,h=r.length;h>l;l++)s&&(s=s[r[l]]);s&&(o=s)}else o=e;if(!o)return void i('Property "'+t+'" is not existed in element '+e.id);var m=this.animatingElements;return"undefined"==typeof e.__aniCount&&(e.__aniCount=0),0===e.__aniCount&&m.push(e),e.__aniCount++,this.animation.animate(o,{loop:a}).done(function(){if(e.__aniCount--,0===e.__aniCount){var t=n.indexOf(m,e);m.splice(t,1)}})}i("Element not existed")},V.prototype.clearAnimation=function(){this.animation.clear()},V.prototype.showLoading=function(e){return this.painter.showLoading(e),this},V.prototype.hideLoading=function(){return this.painter.hideLoading(),this},V.prototype.getWidth=function(){return this.painter.getWidth()},V.prototype.getHeight=function(){return this.painter.getHeight()},V.prototype.toDataURL=function(e,t,n){return this.painter.toDataURL(e,t,n)},V.prototype.shapeToImage=function(e,t,n){var i=a();return this.painter.shapeToImage(i,e,t,n)},V.prototype.on=function(e,t){return this.handler.on(e,t),this},V.prototype.un=function(e,t){return this.handler.un(e,t),this},V.prototype.trigger=function(e,t){return this.handler.trigger(e,t),this},V.prototype.clear=function(){return this.storage.delRoot(),this.painter.clear(),this},V.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,m.delInstance(this.id)},m}),n("zrender/config",[],function(){var e={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};return e}),n("echarts/chart/island",["require","../component/base","./base","zrender/shape/Circle","../config","../util/ecData","zrender/tool/util","zrender/tool/event","zrender/tool/color","../util/accMath","../chart"],function(e){function t(e,t,a,o,s){n.call(this,e,t,a,{},s),i.call(this),this._nameConnector,this._valueConnector,this._zrHeight=this.zr.getHeight(),this._zrWidth=this.zr.getWidth();var h=this;h.shapeHandler.onmousewheel=function(e){var t=e.target,n=e.event,i=l.getDelta(n);i=i>0?-1:1,t.style.r-=i,t.style.r=t.style.r<5?5:t.style.r;var a=r.get(t,"value"),o=a*h.option.island.calculateStep;a=o>1?Math.round(a-o*i):(a-o*i).toFixed(2)-0;var s=r.get(t,"name");t.style.text=s+":"+a,r.set(t,"value",a),r.set(t,"name",s),h.zr.modShape(t.id),h.zr.refresh(),l.stop(n)}}var n=e("../component/base"),i=e("./base"),a=e("zrender/shape/Circle"),o=e("../config"),r=e("../util/ecData"),s=e("zrender/tool/util"),l=e("zrender/tool/event");return t.prototype={type:o.CHART_TYPE_ISLAND,_combine:function(t,n){var i=e("zrender/tool/color"),a=e("../util/accMath"),o=a.accAdd(r.get(t,"value"),r.get(n,"value")),s=r.get(t,"name")+this._nameConnector+r.get(n,"name");t.style.text=s+this._valueConnector+o,r.set(t,"value",o),r.set(t,"name",s),t.style.r=this.option.island.r,t.style.color=i.mix(t.style.color,n.style.color)},refresh:function(e){e&&(e.island=this.reformOption(e.island),this.option=e,this._nameConnector=this.option.nameConnector,this._valueConnector=this.option.valueConnector)},getOption:function(){return this.option},resize:function(){var e=this.zr.getWidth(),t=this.zr.getHeight(),n=e/(this._zrWidth||e),i=t/(this._zrHeight||t);if(1!==n||1!==i){this._zrWidth=e,this._zrHeight=t;for(var a=0,o=this.shapeList.length;o>a;a++)this.zr.modShape(this.shapeList[a].id,{style:{x:Math.round(this.shapeList[a].style.x*n),y:Math.round(this.shapeList[a].style.y*i)}})}},add:function(e){var t=r.get(e,"name"),n=r.get(e,"value"),i=null!=r.get(e,"series")?r.get(e,"series").name:"",o=this.getFont(this.option.island.textStyle),s={zlevel:this._zlevelBase,style:{x:e.style.x,y:e.style.y,r:this.option.island.r,color:e.style.color||e.style.strokeColor,text:t+this._valueConnector+n,textFont:o},draggable:!0,hoverable:!0,onmousewheel:this.shapeHandler.onmousewheel,_type:"island"};"#fff"===s.style.color&&(s.style.color=e.style.strokeColor),this.setCalculable(s),s.dragEnableTime=0,r.pack(s,{name:i},-1,n,-1,t),s=new a(s),this.shapeList.push(s),this.zr.addShape(s)},del:function(e){this.zr.delShape(e.id);for(var t=[],n=0,i=this.shapeList.length;i>n;n++)this.shapeList[n].id!=e.id&&t.push(this.shapeList[n]);this.shapeList=t},ondrop:function(e,t){if(this.isDrop&&e.target){var n=e.target,i=e.dragged;this._combine(n,i),this.zr.modShape(n.id),t.dragIn=!0,this.isDrop=!1}},ondragend:function(e,t){var n=e.target;this.isDragend?t.dragIn&&(this.del(n),t.needRefresh=!0):t.dragIn||(n.style.x=l.getX(e.event),n.style.y=l.getY(e.event),this.add(n),t.needRefresh=!0),this.isDragend=!1}},s.inherits(t,i),s.inherits(t,n),e("../chart").define("island",t),t}),n("echarts/component/toolbox",["require","./base","zrender/shape/Line","zrender/shape/Image","zrender/shape/Rectangle","../util/shape/Icon","../config","zrender/tool/util","zrender/config","zrender/tool/event","./dataView","../component"],function(e){function t(e,t,i,a,o){n.call(this,e,t,i,a,o),this.dom=o.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._onMark=function(e){r.__onMark(e)},r._onMarkUndo=function(e){r.__onMarkUndo(e)},r._onMarkClear=function(e){r.__onMarkClear(e)},r._onDataZoom=function(e){r.__onDataZoom(e)},r._onDataZoomReset=function(e){r.__onDataZoomReset(e)},r._onDataView=function(e){r.__onDataView(e)},r._onRestore=function(e){r.__onRestore(e)},r._onSaveAsImage=function(e){r.__onSaveAsImage(e)},r._onMagicType=function(e){r.__onMagicType(e)},r._onCustomHandler=function(e){r.__onCustomHandler(e)},r._onmousemove=function(e){return r.__onmousemove(e)},r._onmousedown=function(e){return r.__onmousedown(e)},r._onmouseup=function(e){return r.__onmouseup(e)},r._onclick=function(e){return r.__onclick(e)}}var n=e("./base"),i=e("zrender/shape/Line"),a=e("zrender/shape/Image"),o=e("zrender/shape/Rectangle"),r=e("../util/shape/Icon"),s=e("../config"),l=e("zrender/tool/util"),h=e("zrender/config"),m=e("zrender/tool/event"),V="stack",U="tiled";return t.prototype={type:s.COMPONENT_TYPE_TOOLBOX,_buildShape:function(){this._iconList=[];var e=this.option.toolbox;this._enableColor=e.effectiveColor,this._disableColor=e.disableColor;var t=e.feature,n=[];for(var i in t)if(t[i].show)switch(i){case"mark":n.push({key:i,name:"mark"}),n.push({key:i,name:"markUndo"}),n.push({key:i,name:"markClear"});break;case"magicType":for(var a=0,o=t[i].type.length;o>a;a++)t[i].title[t[i].type[a]+"Chart"]=t[i].title[t[i].type[a]],t[i].option&&(t[i].option[t[i].type[a]+"Chart"]=t[i].option[t[i].type[a]]),n.push({key:i,name:t[i].type[a]+"Chart"});break;case"dataZoom":n.push({key:i,name:"dataZoom"}),n.push({key:i,name:"dataZoomReset"});break;case"saveAsImage":this.canvasSupported&&n.push({key:i,name:"saveAsImage"});break;default:n.push({key:i,name:i})}if(n.length>0){for(var r,i,a=0,o=n.length;o>a;a++)r=n[a].name,i=n[a].key,this._iconList.push(r),this._featureTitle[r]=t[i].title[r]||t[i].title,t[i].icon&&(this._featureIcon[r]=t[i].icon[r]||t[i].icon),t[i].color&&(this._featureColor[r]=t[i].color[r]||t[i].color),t[i].option&&(this._featureOption[r]=t[i].option[r]||t[i].option);this._itemGroupLocation=this._getItemGroupLocation(),this._buildBackground(),this._buildItem();for(var a=0,o=this.shapeList.length;o>a;a++)this.zr.addShape(this.shapeList[a]);this._iconShapeMap.mark&&(this._iconDisable(this._iconShapeMap.markUndo),this._iconDisable(this._iconShapeMap.markClear)),this._iconShapeMap.dataZoomReset&&0===this._zoomQueue.length&&this._iconDisable(this._iconShapeMap.dataZoomReset)}},_buildItem:function(){var t,n,i,o,s=this.option.toolbox,l=this._iconList.length,h=this._itemGroupLocation.x,m=this._itemGroupLocation.y,V=s.itemSize,U=s.itemGap,d=s.color instanceof Array?s.color:[s.color],p=this.getFont(s.textStyle);"horizontal"===s.orient?(n=this._itemGroupLocation.y/this.zr.getHeight()<.5?"bottom":"top",i=this._itemGroupLocation.x/this.zr.getWidth()<.5?"left":"right",o=this._itemGroupLocation.y/this.zr.getHeight()<.5?"top":"bottom"):n=this._itemGroupLocation.x/this.zr.getWidth()<.5?"right":"left",this._iconShapeMap={};for(var c=this,u=0;l>u;u++){switch(t={type:"icon",zlevel:this._zlevelBase,style:{x:h,y:m,width:V,height:V,iconType:this._iconList[u],lineWidth:1,strokeColor:this._featureColor[this._iconList[u]]||d[u%d.length],brushType:"stroke"},highlightStyle:{lineWidth:1,text:s.showTitle?this._featureTitle[this._iconList[u]]:void 0,textFont:p,textPosition:n,strokeColor:this._featureColor[this._iconList[u]]||d[u%d.length]},hoverable:!0,clickable:!0},this._featureIcon[this._iconList[u]]&&(t.style.image=this._featureIcon[this._iconList[u]].replace(new RegExp("^image:\\/\\/"),""),t.style.opacity=.8,t.highlightStyle.opacity=1,t.type="image"),"horizontal"===s.orient&&(0===u&&"left"===i&&(t.highlightStyle.textPosition="specific",t.highlightStyle.textAlign=i,t.highlightStyle.textBaseline=o,t.highlightStyle.textX=h,t.highlightStyle.textY="top"===o?m+V+10:m-10),u===l-1&&"right"===i&&(t.highlightStyle.textPosition="specific",t.highlightStyle.textAlign=i,t.highlightStyle.textBaseline=o,t.highlightStyle.textX=h+V,t.highlightStyle.textY="top"===o?m+V+10:m-10)),this._iconList[u]){case"mark":t.onclick=c._onMark;break;case"markUndo":t.onclick=c._onMarkUndo;break;case"markClear":t.onclick=c._onMarkClear;break;case"dataZoom":t.onclick=c._onDataZoom;break;case"dataZoomReset":t.onclick=c._onDataZoomReset;break;case"dataView":if(!this._dataView){var y=e("./dataView");this._dataView=new y(this.ecTheme,this.messageCenter,this.zr,this.option,this.myChart)}t.onclick=c._onDataView;break;case"restore":t.onclick=c._onRestore;break;case"saveAsImage":t.onclick=c._onSaveAsImage;break;default:this._iconList[u].match("Chart")?(t._name=this._iconList[u].replace("Chart",""),t.onclick=c._onMagicType):t.onclick=c._onCustomHandler}"icon"===t.type?t=new r(t):"image"===t.type&&(t=new a(t)),this.shapeList.push(t),this._iconShapeMap[this._iconList[u]]=t,"horizontal"===s.orient?h+=V+U:m+=V+U}},_buildBackground:function(){var e=this.option.toolbox,t=e.padding[0],n=e.padding[1],i=e.padding[2],a=e.padding[3];this.shapeList.push(new o({zlevel:this._zlevelBase,hoverable:!1,style:{x:this._itemGroupLocation.x-a,y:this._itemGroupLocation.y-t,width:this._itemGroupLocation.width+a+n,height:this._itemGroupLocation.height+t+i,brushType:0===e.borderWidth?"fill":"both",color:e.backgroundColor,strokeColor:e.borderColor,lineWidth:e.borderWidth}}))},_getItemGroupLocation:function(){var e=this.option.toolbox,t=this._iconList.length,n=e.itemGap,i=e.itemSize,a=0,o=0;"horizontal"===e.orient?(a=(i+n)*t-n,o=i):(o=(i+n)*t-n,a=i);var r,s=this.zr.getWidth();switch(e.x){case"center":r=Math.floor((s-a)/2);break;case"left":r=e.padding[3]+e.borderWidth;break;case"right":r=s-a-e.padding[1]-e.borderWidth;break;default:r=e.x-0,r=isNaN(r)?0:r}var l,h=this.zr.getHeight();switch(e.y){case"top":l=e.padding[0]+e.borderWidth;break;case"bottom":l=h-o-e.padding[2]-e.borderWidth;break;case"center":l=Math.floor((h-o)/2);break;default:l=e.y-0,l=isNaN(l)?0:l}return{x:r,y:l,width:a,height:o}},__onmousemove:function(e){this._marking&&(this._markShape.style.xEnd=m.getX(e.event),this._markShape.style.yEnd=m.getY(e.event),this.zr.addHoverShape(this._markShape)),this._zooming&&(this._zoomShape.style.width=m.getX(e.event)-this._zoomShape.style.x,this._zoomShape.style.height=m.getY(e.event)-this._zoomShape.style.y,this.zr.addHoverShape(this._zoomShape),this.dom.style.cursor="crosshair"),this._zoomStart&&"pointer"!=this.dom.style.cursor&&"move"!=this.dom.style.cursor&&(this.dom.style.cursor="crosshair")},__onmousedown:function(e){if(!e.target){this._zooming=!0;var t=m.getX(e.event),n=m.getY(e.event),i=this.option.dataZoom||{};return this._zoomShape=new o({zlevel:this._zlevelBase,style:{x:t,y:n,width:1,height:1,brushType:"both"},highlightStyle:{lineWidth:2,color:i.fillerColor||s.dataZoom.fillerColor,strokeColor:i.handleColor||s.dataZoom.handleColor,brushType:"both"}}),this.zr.addHoverShape(this._zoomShape),!0}},__onmouseup:function(){if(!this._zoomShape||Math.abs(this._zoomShape.style.width)<10||Math.abs(this._zoomShape.style.height)<10)return this._zooming=!1,!0;if(this._zooming&&this.component.dataZoom){this._zooming=!1;var e=this.component.dataZoom.rectZoom(this._zoomShape.style);e&&(this._zoomQueue.push({start:e.start,end:e.end,start2:e.start2,end2:e.end2}),this._iconEnable(this._iconShapeMap.dataZoomReset),this.zr.refresh())}return!0},__onclick:function(e){if(!e.target)if(this._marking)this._marking=!1,this._markShapeList.push(this._markShape),this._iconEnable(this._iconShapeMap.markUndo),this._iconEnable(this._iconShapeMap.markClear),this.zr.addShape(this._markShape),this.zr.refresh();else if(this._markStart){this._marking=!0;var t=m.getX(e.event),n=m.getY(e.event);this._markShape=new i({zlevel:this._zlevelBase,style:{xStart:t,yStart:n,xEnd:t,yEnd:n,lineWidth:this.query(this.option,"toolbox.feature.mark.lineStyle.width"),strokeColor:this.query(this.option,"toolbox.feature.mark.lineStyle.color"),lineType:this.query(this.option,"toolbox.feature.mark.lineStyle.type")}}),this.zr.addHoverShape(this._markShape)}},__onMark:function(e){var t=e.target;if(this._marking||this._markStart)this._resetMark(),this.zr.refresh();else{this._resetZoom(),this.zr.modShape(t.id,{style:{strokeColor:this._enableColor}}),this.zr.refresh(),this._markStart=!0;var n=this;setTimeout(function(){n.zr&&n.zr.on(h.EVENT.CLICK,n._onclick)&&n.zr.on(h.EVENT.MOUSEMOVE,n._onmousemove)},10)}return!0},__onMarkUndo:function(){if(this._marking)this._marking=!1;else{var e=this._markShapeList.length;if(e>=1){var t=this._markShapeList[e-1];this.zr.delShape(t.id),this.zr.refresh(),this._markShapeList.pop(),1===e&&(this._iconDisable(this._iconShapeMap.markUndo),this._iconDisable(this._iconShapeMap.markClear))}}return!0},__onMarkClear:function(){this._marking&&(this._marking=!1);var e=this._markShapeList.length;if(e>0){for(;e--;)this.zr.delShape(this._markShapeList.pop().id);this._iconDisable(this._iconShapeMap.markUndo),this._iconDisable(this._iconShapeMap.markClear),this.zr.refresh()}return!0},__onDataZoom:function(e){var t=e.target;if(this._zooming||this._zoomStart)this._resetZoom(),this.zr.refresh(),this.dom.style.cursor="default";else{this._resetMark(),this.zr.modShape(t.id,{style:{strokeColor:this._enableColor}}),this.zr.refresh(),this._zoomStart=!0;var n=this;setTimeout(function(){n.zr&&n.zr.on(h.EVENT.MOUSEDOWN,n._onmousedown)&&n.zr.on(h.EVENT.MOUSEUP,n._onmouseup)&&n.zr.on(h.EVENT.MOUSEMOVE,n._onmousemove)},10),this.dom.style.cursor="crosshair"}return!0},__onDataZoomReset:function(){return this._zooming&&(this._zooming=!1),this._zoomQueue.pop(),this._zoomQueue.length>0?this.component.dataZoom.absoluteZoom(this._zoomQueue[this._zoomQueue.length-1]):(this.component.dataZoom.rectZoom(),this._iconDisable(this._iconShapeMap.dataZoomReset),this.zr.refresh()),!0},_resetMark:function(){this._marking=!1,this._markStart&&(this._markStart=!1,this._iconShapeMap.mark&&this.zr.modShape(this._iconShapeMap.mark.id,{style:{strokeColor:this._iconShapeMap.mark.highlightStyle.strokeColor}}),this.zr.un(h.EVENT.CLICK,this._onclick),this.zr.un(h.EVENT.MOUSEMOVE,this._onmousemove))},_resetZoom:function(){this._zooming=!1,this._zoomStart&&(this._zoomStart=!1,this._iconShapeMap.dataZoom&&this.zr.modShape(this._iconShapeMap.dataZoom.id,{style:{strokeColor:this._iconShapeMap.dataZoom.highlightStyle.strokeColor}}),this.zr.un(h.EVENT.MOUSEDOWN,this._onmousedown),this.zr.un(h.EVENT.MOUSEUP,this._onmouseup),this.zr.un(h.EVENT.MOUSEMOVE,this._onmousemove))},_iconDisable:function(e){"image"!=e.type?this.zr.modShape(e.id,{hoverable:!1,clickable:!1,style:{strokeColor:this._disableColor}}):this.zr.modShape(e.id,{hoverable:!1,clickable:!1,style:{opacity:.3}})},_iconEnable:function(e){"image"!=e.type?this.zr.modShape(e.id,{hoverable:!0,clickable:!0,style:{strokeColor:e.highlightStyle.strokeColor}}):this.zr.modShape(e.id,{hoverable:!0,clickable:!0,style:{opacity:.8}})},__onDataView:function(){return this._dataView.show(this.option),!0},__onRestore:function(){return this._resetMark(),this._resetZoom(),this.messageCenter.dispatch(s.EVENT.RESTORE,null,null,this.myChart),!0},__onSaveAsImage:function(){var e=this.option.toolbox.feature.saveAsImage,t=e.type||"png";"png"!=t&&"jpeg"!=t&&(t="png");var n;n=this.myChart.isConnected()?this.myChart.getConnectedDataURL(t):this.zr.toDataURL("image/"+t,this.option.backgroundColor&&"rgba(0,0,0,0)"===this.option.backgroundColor.replace(" ","")?"#fff":this.option.backgroundColor);var i=document.createElement("div");i.id="__echarts_download_wrap__",i.style.cssText="position:fixed;z-index:99999;display:block;top:0;left:0;background-color:rgba(33,33,33,0.5);text-align:center;width:100%;height:100%;line-height:"+document.documentElement.clientHeight+"px;";var a=document.createElement("a");a.href=n,a.setAttribute("download",(e.name?e.name:this.option.title&&(this.option.title.text||this.option.title.subtext)?this.option.title.text||this.option.title.subtext:"ECharts")+"."+t),a.innerHTML='图片另存为":e.lang?e.lang[0]:"点击保存")+'"/>',i.appendChild(a),document.body.appendChild(i),a=null,i=null,setTimeout(function(){var e=document.getElementById("__echarts_download_wrap__");e&&(e.onclick=function(){var e=document.getElementById("__echarts_download_wrap__");e.onclick=null,e.innerHTML="",document.body.removeChild(e),e=null},e=null)},500)},__onMagicType:function(e){this._resetMark();var t=e.target._name;return this._magicType[t]||(this._magicType[t]=!0,t===s.CHART_TYPE_LINE?this._magicType[s.CHART_TYPE_BAR]=!1:t===s.CHART_TYPE_BAR&&(this._magicType[s.CHART_TYPE_LINE]=!1),t===s.CHART_TYPE_PIE?this._magicType[s.CHART_TYPE_FUNNEL]=!1:t===s.CHART_TYPE_FUNNEL&&(this._magicType[s.CHART_TYPE_PIE]=!1),t===s.CHART_TYPE_FORCE?this._magicType[s.CHART_TYPE_CHORD]=!1:t===s.CHART_TYPE_CHORD&&(this._magicType[s.CHART_TYPE_FORCE]=!1),t===V?this._magicType[U]=!1:t===U&&(this._magicType[V]=!1),this.messageCenter.dispatch(s.EVENT.MAGIC_TYPE_CHANGED,e.event,{magicType:this._magicType},this.myChart)),!0},setMagicType:function(e){this._resetMark(),this._magicType=e,!this._isSilence&&this.messageCenter.dispatch(s.EVENT.MAGIC_TYPE_CHANGED,null,{magicType:this._magicType},this.myChart)},__onCustomHandler:function(e){var t=e.target.style.iconType,n=this.option.toolbox.feature[t].onclick;"function"==typeof n&&n.call(this,this.option)},reset:function(e,t){if(t&&this.clear(),this.query(e,"toolbox.show")&&this.query(e,"toolbox.feature.magicType.show")){var n=e.toolbox.feature.magicType.type,i=n.length;for(this._magicMap={};i--;)this._magicMap[n[i]]=!0;i=e.series.length;for(var a,o;i--;)a=e.series[i].type,this._magicMap[a]&&(o=e.xAxis instanceof Array?e.xAxis[e.series[i].xAxisIndex||0]:e.xAxis,o&&"category"===(o.type||"category")&&(o.__boundaryGap=null!=o.boundaryGap?o.boundaryGap:!0),o=e.yAxis instanceof Array?e.yAxis[e.series[i].yAxisIndex||0]:e.yAxis,o&&"category"===o.type&&(o.__boundaryGap=null!=o.boundaryGap?o.boundaryGap:!0),e.series[i].__type=a,e.series[i].__itemStyle=l.clone(e.series[i].itemStyle||{})),(this._magicMap[V]||this._magicMap[U])&&(e.series[i].__stack=e.series[i].stack)}this._magicType=t?{}:this._magicType||{};for(var r in this._magicType)if(this._magicType[r]){this.option=e,this.getMagicOption();break}var s=e.dataZoom;if(s&&s.show){var h=null!=s.start&&s.start>=0&&s.start<=100?s.start:0,m=null!=s.end&&s.end>=0&&s.end<=100?s.end:100;h>m&&(h+=m,m=h-m,h-=m),this._zoomQueue=[{start:h,end:m,start2:0,end2:100}]}else this._zoomQueue=[]},getMagicOption:function(){var e,t;if(this._magicType[s.CHART_TYPE_LINE]||this._magicType[s.CHART_TYPE_BAR]){for(var n=this._magicType[s.CHART_TYPE_LINE]?!1:!0,i=0,a=this.option.series.length;a>i;i++)t=this.option.series[i].type,(t==s.CHART_TYPE_LINE||t==s.CHART_TYPE_BAR)&&(e=this.option.xAxis instanceof Array?this.option.xAxis[this.option.series[i].xAxisIndex||0]:this.option.xAxis,e&&"category"===(e.type||"category")&&(e.boundaryGap=n?!0:e.__boundaryGap),e=this.option.yAxis instanceof Array?this.option.yAxis[this.option.series[i].yAxisIndex||0]:this.option.yAxis,e&&"category"===e.type&&(e.boundaryGap=n?!0:e.__boundaryGap));this._defaultMagic(s.CHART_TYPE_LINE,s.CHART_TYPE_BAR)}if(this._defaultMagic(s.CHART_TYPE_CHORD,s.CHART_TYPE_FORCE),this._defaultMagic(s.CHART_TYPE_PIE,s.CHART_TYPE_FUNNEL),this._magicType[V]||this._magicType[U])for(var i=0,a=this.option.series.length;a>i;i++)this._magicType[V]?(this.option.series[i].stack="_ECHARTS_STACK_KENER_2014_",t=V):this._magicType[U]&&(this.option.series[i].stack=null,t=U),this._featureOption[t+"Chart"]&&l.merge(this.option.series[i],this._featureOption[t+"Chart"]||{},!0);return this.option},_defaultMagic:function(e,t){if(this._magicType[e]||this._magicType[t])for(var n=0,i=this.option.series.length;i>n;n++){var a=this.option.series[n].type;(a==e||a==t)&&(this.option.series[n].type=this._magicType[e]?e:t,this.option.series[n].itemStyle=l.clone(this.option.series[n].__itemStyle),a=this.option.series[n].type,this._featureOption[a+"Chart"]&&l.merge(this.option.series[n],this._featureOption[a+"Chart"]||{},!0))}},silence:function(e){this._isSilence=e},resize:function(){this._resetMark(),this.clear(),this.option&&this.option.toolbox&&this.option.toolbox.show&&this._buildShape(),this._dataView&&this._dataView.resize()},hideDataView:function(){this._dataView&&this._dataView.hide()},clear:function(e){this.zr&&(this.zr.delShape(this.shapeList),this.shapeList=[],e||(this.zr.delShape(this._markShapeList),this._markShapeList=[]))},onbeforDispose:function(){this._dataView&&(this._dataView.dispose(),this._dataView=null),this._markShapeList=null},refresh:function(e){e&&(this._resetMark(),this._resetZoom(),e.toolbox=this.reformOption(e.toolbox),e.toolbox.padding=this.reformCssArray(e.toolbox.padding),this.option=e,this.clear(!0),e.toolbox.show&&this._buildShape(),this.hideDataView())}},l.inherits(t,n),e("../component").define("toolbox",t),t}),n("echarts/component",[],function(){var e={},t={};return e.define=function(n,i){return t[n]=i,e},e.get=function(e){return t[e]},e}),n("echarts/component/title",["require","./base","zrender/shape/Text","zrender/shape/Rectangle","../config","zrender/tool/util","zrender/tool/area","zrender/tool/color","../component"],function(e){function t(e,t,i,a,o){n.call(this,e,t,i,a,o),this.refresh(a)}var n=e("./base"),i=e("zrender/shape/Text"),a=e("zrender/shape/Rectangle"),o=e("../config"),r=e("zrender/tool/util"),s=e("zrender/tool/area"),l=e("zrender/tool/color");return t.prototype={type:o.COMPONENT_TYPE_TITLE,_buildShape:function(){this._itemGroupLocation=this._getItemGroupLocation(),this._buildBackground(),this._buildItem();for(var e=0,t=this.shapeList.length;t>e;e++)this.zr.addShape(this.shapeList[e])},_buildItem:function(){var e=this.titleOption.text,t=this.titleOption.link,n=this.titleOption.target,a=this.titleOption.subtext,o=this.titleOption.sublink,r=this.titleOption.subtarget,s=this.getFont(this.titleOption.textStyle),h=this.getFont(this.titleOption.subtextStyle),m=this._itemGroupLocation.x,V=this._itemGroupLocation.y,U=this._itemGroupLocation.width,d=this._itemGroupLocation.height,p={zlevel:this._zlevelBase,style:{y:V,color:this.titleOption.textStyle.color,text:e,textFont:s,textBaseline:"top"},highlightStyle:{color:l.lift(this.titleOption.textStyle.color,1),brushType:"fill"},hoverable:!1};t&&(p.hoverable=!0,p.clickable=!0,p.onclick=function(){n&&"self"==n?window.location=t:window.open(t)});var c={zlevel:this._zlevelBase,style:{y:V+d,color:this.titleOption.subtextStyle.color,text:a,textFont:h,textBaseline:"bottom"},highlightStyle:{color:l.lift(this.titleOption.subtextStyle.color,1),brushType:"fill"},hoverable:!1};switch(o&&(c.hoverable=!0,c.clickable=!0,c.onclick=function(){r&&"self"==r?window.location=o:window.open(o)}),this.titleOption.x){case"center":p.style.x=c.style.x=m+U/2,p.style.textAlign=c.style.textAlign="center";break;case"left":p.style.x=c.style.x=m,p.style.textAlign=c.style.textAlign="left";break;case"right":p.style.x=c.style.x=m+U,p.style.textAlign=c.style.textAlign="right";break;default:m=this.titleOption.x-0,m=isNaN(m)?0:m,p.style.x=c.style.x=m}this.titleOption.textAlign&&(p.style.textAlign=c.style.textAlign=this.titleOption.textAlign),this.shapeList.push(new i(p)),""!==a&&this.shapeList.push(new i(c))},_buildBackground:function(){var e=this.titleOption.padding[0],t=this.titleOption.padding[1],n=this.titleOption.padding[2],i=this.titleOption.padding[3];this.shapeList.push(new a({zlevel:this._zlevelBase,hoverable:!1,style:{x:this._itemGroupLocation.x-i,y:this._itemGroupLocation.y-e,width:this._itemGroupLocation.width+i+t,height:this._itemGroupLocation.height+e+n,brushType:0===this.titleOption.borderWidth?"fill":"both",color:this.titleOption.backgroundColor,strokeColor:this.titleOption.borderColor,lineWidth:this.titleOption.borderWidth}}))},_getItemGroupLocation:function(){var e,t=this.titleOption.text,n=this.titleOption.subtext,i=this.getFont(this.titleOption.textStyle),a=this.getFont(this.titleOption.subtextStyle),o=Math.max(s.getTextWidth(t,i),s.getTextWidth(n,a)),r=s.getTextHeight(t,i)+(""===n?0:this.titleOption.itemGap+s.getTextHeight(n,a)),l=this.zr.getWidth();
switch(this.titleOption.x){case"center":e=Math.floor((l-o)/2);break;case"left":e=this.titleOption.padding[3]+this.titleOption.borderWidth;break;case"right":e=l-o-this.titleOption.padding[1]-this.titleOption.borderWidth;break;default:e=this.titleOption.x-0,e=isNaN(e)?0:e}var h,m=this.zr.getHeight();switch(this.titleOption.y){case"top":h=this.titleOption.padding[0]+this.titleOption.borderWidth;break;case"bottom":h=m-r-this.titleOption.padding[2]-this.titleOption.borderWidth;break;case"center":h=Math.floor((m-r)/2);break;default:h=this.titleOption.y-0,h=isNaN(h)?0:h}return{x:e,y:h,width:o,height:r}},refresh:function(e){e&&(this.option=e,this.option.title=this.reformOption(this.option.title),this.option.title.padding=this.reformCssArray(this.option.title.padding),this.titleOption=this.option.title,this.titleOption.textStyle=r.merge(this.titleOption.textStyle,this.ecTheme.textStyle),this.titleOption.subtextStyle=r.merge(this.titleOption.subtextStyle,this.ecTheme.textStyle)),this.clear(),this._buildShape()}},r.inherits(t,n),e("../component").define("title",t),t}),n("echarts/component/tooltip",["require","./base","../util/shape/Cross","zrender/shape/Line","zrender/shape/Rectangle","../config","../util/ecData","zrender/config","zrender/tool/event","zrender/tool/area","zrender/tool/color","zrender/tool/util","zrender/shape/Base","../component"],function(e){function t(e,t,o,r,s){n.call(this,e,t,o,r,s),this.dom=s.dom;var l=this;l._onmousemove=function(e){return l.__onmousemove(e)},l._onglobalout=function(e){return l.__onglobalout(e)},this.zr.on(h.EVENT.MOUSEMOVE,l._onmousemove),this.zr.on(h.EVENT.GLOBALOUT,l._onglobalout),l._hide=function(e){return l.__hide(e)},l._tryShow=function(e){return l.__tryShow(e)},l._refixed=function(e){return l.__refixed(e)},l._setContent=function(e,t){return l.__setContent(e,t)},this._tDom=this._tDom||document.createElement("div"),this._tDom.onselectstart=function(){return!1},this._tDom.onmouseover=function(){l._mousein=!0},this._tDom.onmouseout=function(){l._mousein=!1},this._tDom.style.position="absolute",this.hasAppend=!1,this._axisLineShape&&this.zr.delShape(this._axisLineShape.id),this._axisLineShape=new a({zlevel:this._zlevelBase,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 a({zlevel: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 i({zlevel:this._zlevelBase,invisible:!0,hoverable:!1}),this.shapeList.push(this._axisCrossShape),this.zr.addShape(this._axisCrossShape),this.showing=!1,this.refresh(r)}var n=e("./base"),i=e("../util/shape/Cross"),a=e("zrender/shape/Line"),o=e("zrender/shape/Rectangle"),r=new o({}),s=e("../config"),l=e("../util/ecData"),h=e("zrender/config"),m=e("zrender/tool/event"),V=e("zrender/tool/area"),U=e("zrender/tool/color"),d=e("zrender/tool/util"),p=e("zrender/shape/Base");return t.prototype={type:s.COMPONENT_TYPE_TOOLTIP,_gCssText:"position:absolute;display:block;border-style:solid;white-space:nowrap;",_style:function(e){if(!e)return"";var t=[];if(e.transitionDuration){var n="left "+e.transitionDuration+"s,top "+e.transitionDuration+"s";t.push("transition:"+n),t.push("-moz-transition:"+n),t.push("-webkit-transition:"+n),t.push("-o-transition:"+n)}e.backgroundColor&&(t.push("background-Color:"+U.toHex(e.backgroundColor)),t.push("filter:alpha(opacity=70)"),t.push("background-Color:"+e.backgroundColor)),null!=e.borderWidth&&t.push("border-width:"+e.borderWidth+"px"),null!=e.borderColor&&t.push("border-color:"+e.borderColor),null!=e.borderRadius&&(t.push("border-radius:"+e.borderRadius+"px"),t.push("-moz-border-radius:"+e.borderRadius+"px"),t.push("-webkit-border-radius:"+e.borderRadius+"px"),t.push("-o-border-radius:"+e.borderRadius+"px"));var i=e.textStyle;i&&(i.color&&t.push("color:"+i.color),i.decoration&&t.push("text-decoration:"+i.decoration),i.align&&t.push("text-align:"+i.align),i.fontFamily&&t.push("font-family:"+i.fontFamily),i.fontSize&&t.push("font-size:"+i.fontSize+"px"),i.fontSize&&t.push("line-height:"+Math.round(3*i.fontSize/2)+"px"),i.fontStyle&&t.push("font-style:"+i.fontStyle),i.fontWeight&&t.push("font-weight:"+i.fontWeight));var a=e.padding;return null!=a&&(a=this.reformCssArray(a),t.push("padding:"+a[0]+"px "+a[1]+"px "+a[2]+"px "+a[3]+"px")),t=t.join(";")+";"},__hide:function(){this._tDom&&(this._tDom.style.display="none");var e=!1;this._axisLineShape.invisible||(this._axisLineShape.invisible=!0,this.zr.modShape(this._axisLineShape.id),e=!0),this._axisShadowShape.invisible||(this._axisShadowShape.invisible=!0,this.zr.modShape(this._axisShadowShape.id),e=!0),this._axisCrossShape.invisible||(this._axisCrossShape.invisible=!0,this.zr.modShape(this._axisCrossShape.id),e=!0),this._lastTipShape&&this._lastTipShape.tipShape.length>0&&(this.zr.delShape(this._lastTipShape.tipShape),this._lastTipShape=!1,this.shapeList.length=2),e&&this.zr.refresh(),this.showing=!1},_show:function(e,t,n,i){var a=this._tDom.offsetHeight,o=this._tDom.offsetWidth;e&&("function"==typeof e&&(e=e([t,n])),e instanceof Array&&(t=e[0],n=e[1])),t+o>this._zrWidth&&(t-=o+40),n+a>this._zrHeight&&(n-=a-20),20>n&&(n=0),this._tDom.style.cssText=this._gCssText+this._defaultCssText+(i?i:"")+"left:"+t+"px;top:"+n+"px;",(10>a||10>o)&&setTimeout(this._refixed,20),this.showing=!0},__refixed:function(){if(this._tDom){var e="",t=this._tDom.offsetHeight,n=this._tDom.offsetWidth;this._tDom.offsetLeft+n>this._zrWidth&&(e+="left:"+(this._zrWidth-n-20)+"px;"),this._tDom.offsetTop+t>this._zrHeight&&(e+="top:"+(this._zrHeight-t-10)+"px;"),""!==e&&(this._tDom.style.cssText+=e)}},__tryShow:function(){var e,t;if(this._curTarget){if("island"===this._curTarget._type&&this.option.tooltip.show)return void this._showItemTrigger();var n=l.get(this._curTarget,"series"),i=l.get(this._curTarget,"data");e=this.deepQuery([i,n,this.option],"tooltip.show"),null!=n&&null!=i&&e?(t=this.deepQuery([i,n,this.option],"tooltip.trigger"),"axis"===t?this._showAxisTrigger(n.xAxisIndex,n.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 e,t,n=this.option.series,i=0,a=n.length;a>i;i++)if("axis"===this.deepQuery([n[i],this.option],"tooltip.trigger"))return e=n[i].xAxisIndex||0,t=n[i].yAxisIndex||0,this.component.xAxis.getAxis(e)&&this.component.xAxis.getAxis(e).type===s.COMPONENT_TYPE_AXIS_CATEGORY?void this._showAxisTrigger(e,t,this._getNearestDataIndex("x",this.component.xAxis.getAxis(e))):this.component.yAxis.getAxis(t)&&this.component.yAxis.getAxis(t).type===s.COMPONENT_TYPE_AXIS_CATEGORY?void this._showAxisTrigger(e,t,this._getNearestDataIndex("y",this.component.yAxis.getAxis(t))):void this._showAxisTrigger(e,t,-1);"cross"===this.option.tooltip.axisPointer.type&&this._showAxisTrigger(-1,-1,-1)},_findPolarTrigger:function(){if(!this.component.polar)return!1;var e,t=m.getX(this._event),n=m.getY(this._event),i=this.component.polar.getNearestIndex([t,n]);return i?(e=i.valueIndex,i=i.polarIndex):i=-1,-1!=i?this._showPolarTrigger(i,e):!1},_getNearestDataIndex:function(e,t){var n=-1,i=m.getX(this._event),a=m.getY(this._event);if("x"===e){for(var o,r,s=this.component.grid.getXend(),l=t.getCoordByIndex(n);s>l&&(r=l,i>=l);)o=l,l=t.getCoordByIndex(++n);return 0>=n?n=0:r-i>=i-o?n-=1:null==t.getNameByIndex(n)&&(n-=1),n}for(var h,V,U=this.component.grid.getY(),l=t.getCoordByIndex(n);l>U&&(h=l,l>=a);)V=l,l=t.getCoordByIndex(++n);return 0>=n?n=0:a-h>=V-a?n-=1:null==t.getNameByIndex(n)&&(n-=1),n},_showAxisTrigger:function(e,t,n){if(!this._event.connectTrigger&&this.messageCenter.dispatch(s.EVENT.TOOLTIP_IN_GRID,this._event,null,this.myChart),null==this.component.xAxis||null==this.component.yAxis||null==e||null==t)return clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),void(this._hidingTicket=setTimeout(this._hide,this._hideDelay));var i,a,o,r,l=this.option.series,h=[],V=[],U="";if("axis"===this.option.tooltip.trigger){if(!this.option.tooltip.show)return;a=this.option.tooltip.formatter,o=this.option.tooltip.position}var d,p,c=-1!=e&&this.component.xAxis.getAxis(e).type===s.COMPONENT_TYPE_AXIS_CATEGORY?"xAxis":-1!=t&&this.component.yAxis.getAxis(t).type===s.COMPONENT_TYPE_AXIS_CATEGORY?"yAxis":!1;if(c){var u="xAxis"==c?e:t;i=this.component[c].getAxis(u);for(var y=0,b=l.length;b>y;y++)this._isSelected(l[y].name)&&l[y][c+"Index"]===u&&"axis"===this.deepQuery([l[y],this.option],"tooltip.trigger")&&(r=this.query(l[y],"tooltip.showContent")||r,a=this.query(l[y],"tooltip.formatter")||a,o=this.query(l[y],"tooltip.position")||o,U+=this._style(this.query(l[y],"tooltip")),null!=l[y].stack&&"xAxis"==c?(h.unshift(l[y]),V.unshift(y)):(h.push(l[y]),V.push(y)));this.messageCenter.dispatch(s.EVENT.TOOLTIP_HOVER,this._event,{seriesIndex:V,dataIndex:n},this.myChart);var g;"xAxis"==c?(d=this.subPixelOptimize(i.getCoordByIndex(n),this._axisLineWidth),p=m.getY(this._event),g=[d,this.component.grid.getY(),d,this.component.grid.getYend()]):(d=m.getX(this._event),p=this.subPixelOptimize(i.getCoordByIndex(n),this._axisLineWidth),g=[this.component.grid.getX(),p,this.component.grid.getXend(),p]),this._styleAxisPointer(h,g[0],g[1],g[2],g[3],i.getGap(),d,p)}else d=m.getX(this._event),p=m.getY(this._event),this._styleAxisPointer(l,this.component.grid.getX(),p,this.component.grid.getXend(),p,0,d,p),n>=0?this._showItemTrigger(!0):(clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),this._tDom.style.display="none");if(h.length>0){var k,f;if("function"==typeof a){for(var x=[],y=0,b=h.length;b>y;y++)k=h[y].data[n],f=null!=k?null!=k.value?k.value:k:"-",x.push({seriesIndex:V[y],seriesName:h[y].name||"",series:h[y],dataIndex:n,data:k,name:i.getNameByIndex(n),value:f,0:h[y].name||"",1:i.getNameByIndex(n),2:f,3:k});this._curTicket="axis:"+n,this._tDom.innerHTML=a.call(this.myChart,x,this._curTicket,this._setContent)}else if("string"==typeof a){this._curTicket=0/0,a=a.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}");for(var y=0,b=h.length;b>y;y++)a=a.replace("{a"+y+"}",this._encodeHTML(h[y].name||"")),a=a.replace("{b"+y+"}",this._encodeHTML(i.getNameByIndex(n))),k=h[y].data[n],k=null!=k?null!=k.value?k.value:k:"-",a=a.replace("{c"+y+"}",k instanceof Array?k:this.numAddCommas(k));this._tDom.innerHTML=a}else{this._curTicket=0/0,a=this._encodeHTML(i.getNameByIndex(n));for(var y=0,b=h.length;b>y;y++)a+="
"+this._encodeHTML(h[y].name||"")+" : ",k=h[y].data[n],k=null!=k?null!=k.value?k.value:k:"-",a+=k instanceof Array?k:this.numAddCommas(k);this._tDom.innerHTML=a}if(r===!1||!this.option.tooltip.showContent)return;this.hasAppend||(this._tDom.style.left=this._zrWidth/2+"px",this._tDom.style.top=this._zrHeight/2+"px",this.dom.firstChild.appendChild(this._tDom),this.hasAppend=!0),this._show(o,d+10,p+10,U)}},_showPolarTrigger:function(e,t){if(null==this.component.polar||null==e||null==t||0>t)return!1;var n,i,a,o=this.option.series,r=[],s=[],l="";if("axis"===this.option.tooltip.trigger){if(!this.option.tooltip.show)return!1;n=this.option.tooltip.formatter,i=this.option.tooltip.position}for(var h=this.option.polar[e].indicator[t].text,V=0,U=o.length;U>V;V++)this._isSelected(o[V].name)&&o[V].polarIndex===e&&"axis"===this.deepQuery([o[V],this.option],"tooltip.trigger")&&(a=this.query(o[V],"tooltip.showContent")||a,n=this.query(o[V],"tooltip.formatter")||n,i=this.query(o[V],"tooltip.position")||i,l+=this._style(this.query(o[V],"tooltip")),r.push(o[V]),s.push(V));if(r.length>0){for(var d,p,c,u=[],V=0,U=r.length;U>V;V++){d=r[V].data;for(var y=0,b=d.length;b>y;y++)p=d[y],this._isSelected(p.name)&&(p=null!=p?p:{name:"",value:{dataIndex:"-"}},c=null!=p.value[t].value?p.value[t].value:p.value[t],u.push({seriesIndex:s[V],seriesName:r[V].name||"",series:r[V],dataIndex:t,data:p,name:p.name,indicator:h,value:c,0:r[V].name||"",1:p.name,2:c,3:h}))}if(u.length<=0)return;if("function"==typeof n)this._curTicket="axis:"+t,this._tDom.innerHTML=n.call(this.myChart,u,this._curTicket,this._setContent);else if("string"==typeof n){n=n.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}").replace("{d}","{d0}");for(var V=0,U=u.length;U>V;V++)n=n.replace("{a"+V+"}",this._encodeHTML(u[V].seriesName)),n=n.replace("{b"+V+"}",this._encodeHTML(u[V].name)),n=n.replace("{c"+V+"}",this.numAddCommas(u[V].value)),n=n.replace("{d"+V+"}",this._encodeHTML(u[V].indicator));this._tDom.innerHTML=n}else{n=this._encodeHTML(u[0].name)+"
"+this._encodeHTML(u[0].indicator)+" : "+this.numAddCommas(u[0].value);for(var V=1,U=u.length;U>V;V++)n+="
"+this._encodeHTML(u[V].name)+"
",n+=this._encodeHTML(u[V].indicator)+" : "+this.numAddCommas(u[V].value);this._tDom.innerHTML=n}if(a===!1||!this.option.tooltip.showContent)return;return this.hasAppend||(this._tDom.style.left=this._zrWidth/2+"px",this._tDom.style.top=this._zrHeight/2+"px",this.dom.firstChild.appendChild(this._tDom),this.hasAppend=!0),this._show(i,m.getX(this._event),m.getY(this._event),l),!0}},_showItemTrigger:function(e){if(this._curTarget){var t,n,i,a=l.get(this._curTarget,"series"),o=l.get(this._curTarget,"data"),r=l.get(this._curTarget,"dataIndex"),h=l.get(this._curTarget,"name"),V=l.get(this._curTarget,"value"),U=l.get(this._curTarget,"special"),d=l.get(this._curTarget,"special2"),p="";if("island"!=this._curTarget._type){var c=e?"axis":"item";this.option.tooltip.trigger===c&&(t=this.option.tooltip.formatter,n=this.option.tooltip.position),this.query(a,"tooltip.trigger")===c&&(i=this.query(a,"tooltip.showContent")||i,t=this.query(a,"tooltip.formatter")||t,n=this.query(a,"tooltip.position")||n,p+=this._style(this.query(a,"tooltip"))),i=this.query(o,"tooltip.showContent")||i,t=this.query(o,"tooltip.formatter")||t,n=this.query(o,"tooltip.position")||n,p+=this._style(this.query(o,"tooltip"))}else i=this.deepQuery([o,a,this.option],"tooltip.showContent"),t=this.deepQuery([o,a,this.option],"tooltip.islandFormatter"),n=this.deepQuery([o,a,this.option],"tooltip.islandPosition");"function"==typeof t?(this._curTicket=(a.name||"")+":"+r,this._tDom.innerHTML=t.call(this.myChart,{seriesIndex:l.get(this._curTarget,"seriesIndex"),seriesName:a.name||"",series:a,dataIndex:r,data:o,name:h,value:V,percent:U,indicator:U,value2:d,indicator2:d,0:a.name||"",1:h,2:V,3:U,4:d,5:o,6:l.get(this._curTarget,"seriesIndex"),7:r},this._curTicket,this._setContent)):"string"==typeof t?(this._curTicket=0/0,t=t.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}"),t=t.replace("{a0}",this._encodeHTML(a.name||"")).replace("{b0}",this._encodeHTML(h)).replace("{c0}",V instanceof Array?V:this.numAddCommas(V)),t=t.replace("{d}","{d0}").replace("{d0}",U||""),t=t.replace("{e}","{e0}").replace("{e0}",l.get(this._curTarget,"special2")||""),this._tDom.innerHTML=t):(this._curTicket=0/0,this._tDom.innerHTML=a.type===s.CHART_TYPE_RADAR&&U?this._itemFormatter.radar.call(this,a,h,V,U):a.type===s.CHART_TYPE_EVENTRIVER?this._itemFormatter.eventRiver.call(this,a,h,V,o):""+(null!=a.name?this._encodeHTML(a.name)+"
":"")+(""===h?"":this._encodeHTML(h)+" : ")+(V instanceof Array?V:this.numAddCommas(V))+(null==U?"":" ("+U+")")),this._axisLineShape.invisible&&this._axisShadowShape.invisible||(this._axisLineShape.invisible=!0,this.zr.modShape(this._axisLineShape.id),this._axisShadowShape.invisible=!0,this.zr.modShape(this._axisShadowShape.id),this.zr.refresh()),i!==!1&&this.option.tooltip.showContent&&(this.hasAppend||(this._tDom.style.left=this._zrWidth/2+"px",this._tDom.style.top=this._zrHeight/2+"px",this.dom.firstChild.appendChild(this._tDom),this.hasAppend=!0),this._show(n,m.getX(this._event)+20,m.getY(this._event)-20,p))}},_itemFormatter:{radar:function(e,t,n,i){var a="";a+=this._encodeHTML(""===t?e.name||"":t),a+=""===a?"":"
";for(var o=0;o ";return a},chord:function(e,t,n,i,a){if(null==a)return this._encodeHTML(t)+" ("+this.numAddCommas(n)+")";var o=this._encodeHTML(t),r=this._encodeHTML(i);return""+(null!=e.name?this._encodeHTML(e.name)+"
":"")+o+" -> "+r+" ("+this.numAddCommas(n)+")
"+r+" -> "+o+" ("+this.numAddCommas(a)+")"},eventRiver:function(e,t,n,i){var a="";a+=this._encodeHTML(""===e.name?"":e.name+" : "),a+=this._encodeHTML(t),a+=""===a?"":"
",i=i.evolution;for(var o=0,r=i.length;r>o;o++)a+='',i[o].detail&&(i[o].detail.img&&(a+=''),a+=''+i[o].time+"
",a+='',a+=i[o].detail.text+"",a+="");return a}},_styleAxisPointer:function(e,t,n,i,a,o,r,s){if(e.length>0){var l,h,m=this.option.tooltip.axisPointer,V=m.type,U={line:{},cross:{},shadow:{}};for(var d in U)U[d].color=m[d+"Style"].color,U[d].width=m[d+"Style"].width,U[d].type=m[d+"Style"].type;for(var p=0,c=e.length;c>p;p++)"axis"===this.deepQuery([e[p],this.option],"tooltip.trigger")&&(l=e[p],h=this.query(l,"tooltip.axisPointer.type"),V=h||V,h&&(U[h].color=this.query(l,"tooltip.axisPointer."+h+"Style.color")||U[h].color,U[h].width=this.query(l,"tooltip.axisPointer."+h+"Style.width")||U[h].width,U[h].type=this.query(l,"tooltip.axisPointer."+h+"Style.type")||U[h].type));"line"===V?(this._axisLineShape.style={xStart:t,yStart:n,xEnd:i,yEnd:a,strokeColor:U.line.color,lineWidth:U.line.width,lineType:U.line.type},this._axisLineShape.invisible=!1,this.zr.modShape(this._axisLineShape.id)):"cross"===V?(this._axisCrossShape.style={brushType:"stroke",rect:this.component.grid.getArea(),x:r,y:s,text:("( "+this.component.xAxis.getAxis(0).getValueFromCoord(r)+" , "+this.component.yAxis.getAxis(0).getValueFromCoord(s)+" )").replace(" , "," ").replace(" , "," "),textPosition:"specific",strokeColor:U.cross.color,lineWidth:U.cross.width,lineType:U.cross.type},this.component.grid.getXend()-r>100?(this._axisCrossShape.style.textAlign="left",this._axisCrossShape.style.textX=r+10):(this._axisCrossShape.style.textAlign="right",this._axisCrossShape.style.textX=r-10),s-this.component.grid.getY()>50?(this._axisCrossShape.style.textBaseline="bottom",this._axisCrossShape.style.textY=s-10):(this._axisCrossShape.style.textBaseline="top",this._axisCrossShape.style.textY=s+10),this._axisCrossShape.invisible=!1,this.zr.modShape(this._axisCrossShape.id)):"shadow"===V&&((null==U.shadow.width||"auto"===U.shadow.width||isNaN(U.shadow.width))&&(U.shadow.width=o),t===i?Math.abs(this.component.grid.getX()-t)<2?(U.shadow.width/=2,t=i+=U.shadow.width/2):Math.abs(this.component.grid.getXend()-t)<2&&(U.shadow.width/=2,t=i-=U.shadow.width/2):n===a&&(Math.abs(this.component.grid.getY()-n)<2?(U.shadow.width/=2,n=a+=U.shadow.width/2):Math.abs(this.component.grid.getYend()-n)<2&&(U.shadow.width/=2,n=a-=U.shadow.width/2)),this._axisShadowShape.style={xStart:t,yStart:n,xEnd:i,yEnd:a,strokeColor:U.shadow.color,lineWidth:U.shadow.width},this._axisShadowShape.invisible=!1,this.zr.modShape(this._axisShadowShape.id)),this.zr.refresh()}},__onmousemove:function(e){if(clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),!this._mousein){var t=e.target,n=m.getX(e.event),i=m.getY(e.event);if(t){this._curTarget=t,this._event=e.event,this._event.zrenderX=n,this._event.zrenderY=i;var a;if(this._needAxisTrigger&&this.component.polar&&-1!=(a=this.component.polar.isInside([n,i])))for(var o=this.option.series,l=0,h=o.length;h>l;l++)if(o[l].polarIndex===a&&"axis"===this.deepQuery([o[l],this.option],"tooltip.trigger")){this._curTarget=null;break}this._showingTicket=setTimeout(this._tryShow,this._showDelay)}else this._curTarget=!1,this._event=e.event,this._event.zrenderX=n,this._event.zrenderY=i,this._needAxisTrigger&&this.component.grid&&V.isInside(r,this.component.grid.getArea(),n,i)?this._showingTicket=setTimeout(this._tryShow,this._showDelay):this._needAxisTrigger&&this.component.polar&&-1!=this.component.polar.isInside([n,i])?this._showingTicket=setTimeout(this._tryShow,this._showDelay):(!this._event.connectTrigger&&this.messageCenter.dispatch(s.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(e,t){this._tDom&&(e===this._curTicket&&(this._tDom.innerHTML=t),setTimeout(this._refixed,20))},ontooltipHover:function(e,t){if(!this._lastTipShape||this._lastTipShape&&this._lastTipShape.dataIndex!=e.dataIndex){this._lastTipShape&&this._lastTipShape.tipShape.length>0&&(this.zr.delShape(this._lastTipShape.tipShape),this.shapeList.length=2);for(var n=0,i=t.length;i>n;n++)t[n].zlevel=this._zlevelBase,t[n].style=p.prototype.getHighlightStyle(t[n].style,t[n].highlightStyle),t[n].draggable=!1,t[n].hoverable=!1,t[n].clickable=!1,t[n].ondragend=null,t[n].ondragover=null,t[n].ondrop=null,this.shapeList.push(t[n]),this.zr.addShape(t[n]);this._lastTipShape={dataIndex:e.dataIndex,tipShape:t}}},ondragend:function(){this._hide()},onlegendSelected:function(e){this._selectedMap=e.selected},_setSelectedMap:function(){this._selectedMap=this.component.legend?d.clone(this.component.legend.getSelectedMap()):{}},_isSelected:function(e){return null!=this._selectedMap[e]?this._selectedMap[e]:!0},showTip:function(e){if(e){var t,n=this.option.series;if(null!=e.seriesIndex)t=e.seriesIndex;else for(var i=e.seriesName,a=0,o=n.length;o>a;a++)if(n[a].name===i){t=a;break}var r=n[t];if(null!=r){var m=this.myChart.chart[r.type],V="axis"===this.deepQuery([r,this.option],"tooltip.trigger");if(m)if(V){var U=e.dataIndex;switch(m.type){case s.CHART_TYPE_LINE:case s.CHART_TYPE_BAR:case s.CHART_TYPE_K:if(null==this.component.xAxis||null==this.component.yAxis||r.data.length<=U)return;var d=r.xAxisIndex||0,p=r.yAxisIndex||0;this._event=this.component.xAxis.getAxis(d).type===s.COMPONENT_TYPE_AXIS_CATEGORY?{zrenderX:this.component.xAxis.getAxis(d).getCoordByIndex(U),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(p).getCoordByIndex(U)},this._showAxisTrigger(d,p,U);break;case s.CHART_TYPE_RADAR:if(null==this.component.polar||r.data[0].value.length<=U)return;var c=r.polarIndex||0,u=this.component.polar.getVector(c,U,"max");this._event={zrenderX:u[0],zrenderY:u[1]},this._showPolarTrigger(c,U)}}else{var y,b,g=m.shapeList;switch(m.type){case s.CHART_TYPE_LINE:case s.CHART_TYPE_BAR:case s.CHART_TYPE_K:case s.CHART_TYPE_SCATTER:for(var U=e.dataIndex,a=0,o=g.length;o>a;a++)if(l.get(g[a],"seriesIndex")==t&&l.get(g[a],"dataIndex")==U){this._curTarget=g[a],y=g[a].style.x,b=m.type!=s.CHART_TYPE_K?g[a].style.y:g[a].style.y[0];break}break;case s.CHART_TYPE_RADAR:for(var U=e.dataIndex,a=0,o=g.length;o>a;a++)if("polygon"===g[a].type&&l.get(g[a],"seriesIndex")==t&&l.get(g[a],"dataIndex")==U){this._curTarget=g[a];var u=this.component.polar.getCenter(r.polarIndex||0);y=u[0],b=u[1];break}break;case s.CHART_TYPE_PIE:for(var k=e.name,a=0,o=g.length;o>a;a++)if("sector"===g[a].type&&l.get(g[a],"seriesIndex")==t&&l.get(g[a],"name")==k){this._curTarget=g[a];var f=this._curTarget.style,x=(f.startAngle+f.endAngle)/2*Math.PI/180;y=this._curTarget.style.x+Math.cos(x)*f.r/1.5,b=this._curTarget.style.y-Math.sin(x)*f.r/1.5;break}break;case s.CHART_TYPE_MAP:for(var k=e.name,_=r.mapType,a=0,o=g.length;o>a;a++)if("text"===g[a].type&&g[a]._mapType===_&&g[a].style._name===k){this._curTarget=g[a],y=this._curTarget.style.x+this._curTarget.position[0],b=this._curTarget.style.y+this._curTarget.position[1];break}break;case s.CHART_TYPE_CHORD:for(var k=e.name,a=0,o=g.length;o>a;a++)if("sector"===g[a].type&&l.get(g[a],"name")==k){this._curTarget=g[a];var f=this._curTarget.style,x=(f.startAngle+f.endAngle)/2*Math.PI/180;return y=this._curTarget.style.x+Math.cos(x)*(f.r-2),b=this._curTarget.style.y-Math.sin(x)*(f.r-2),void this.zr.trigger(h.EVENT.MOUSEMOVE,{zrenderX:y,zrenderY:b})}break;case s.CHART_TYPE_FORCE:for(var k=e.name,a=0,o=g.length;o>a;a++)if("circle"===g[a].type&&l.get(g[a],"name")==k){this._curTarget=g[a],y=this._curTarget.position[0],b=this._curTarget.position[1];break}}null!=y&&null!=b&&(this._event={zrenderX:y,zrenderY:b},this.zr.addHoverShape(this._curTarget),this.zr.refreshHover(),this._showItemTrigger())}}}},hideTip:function(){this._hide()},refresh:function(e){if(this._zrHeight=this.zr.getHeight(),this._zrWidth=this.zr.getWidth(),this._lastTipShape&&this._lastTipShape.tipShape.length>0&&this.zr.delShape(this._lastTipShape.tipShape),this._lastTipShape=!1,this.shapeList.length=2,e){this.option=e,this.option.tooltip=this.reformOption(this.option.tooltip),this.option.tooltip.textStyle=d.merge(this.option.tooltip.textStyle,this.ecTheme.textStyle),this.option.tooltip.padding=this.reformCssArray(this.option.tooltip.padding),this._needAxisTrigger=!1,"axis"===this.option.tooltip.trigger&&(this._needAxisTrigger=!0);for(var t=this.option.series,n=0,i=t.length;i>n;n++)if("axis"===this.query(t[n],"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}if(this.showing){var a=this;setTimeout(function(){a.zr.trigger(h.EVENT.MOUSEMOVE,a.zr.handler._event)},50)}},onbeforDispose:function(){this._lastTipShape&&this._lastTipShape.tipShape.length>0&&this.zr.delShape(this._lastTipShape.tipShape),clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),this.zr.un(h.EVENT.MOUSEMOVE,this._onmousemove),this.zr.un(h.EVENT.GLOBALOUT,this._onglobalout),this.hasAppend&&this.dom.firstChild.removeChild(this._tDom),this._tDom=null},_encodeHTML:function(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}},d.inherits(t,n),e("../component").define("tooltip",t),t}),n("echarts/component/legend",["require","./base","zrender/shape/Text","zrender/shape/Rectangle","zrender/shape/Sector","../util/shape/Icon","../util/shape/Candle","../config","zrender/tool/util","zrender/tool/area","../component"],function(e){function t(e,t,i,a,o){if(!this.query(a,"legend.data"))return void console.error("option.legend.data has not been defined.");n.call(this,e,t,i,a,o);var r=this;r._legendSelected=function(e){r.__legendSelected(e)},r._dispatchHoverLink=function(e){return r.__dispatchHoverLink(e)},this._colorIndex=0,this._colorMap={},this._selectedMap={},this.refresh(a)}var n=e("./base"),i=e("zrender/shape/Text"),a=e("zrender/shape/Rectangle"),o=e("zrender/shape/Sector"),r=e("../util/shape/Icon"),s=e("../util/shape/Candle"),l=e("../config"),h=e("zrender/tool/util"),m=e("zrender/tool/area");t.prototype={type:l.COMPONENT_TYPE_LEGEND,_buildShape:function(){if(this.legendOption.show){this._itemGroupLocation=this._getItemGroupLocation(),this._buildBackground(),this._buildItem();for(var e=0,t=this.shapeList.length;t>e;e++)this.zr.addShape(this.shapeList[e])}},_buildItem:function(){var e,t,n,a,o,s,l,V,U=this.legendOption.data,d=U.length,p=this.legendOption.textStyle,c=this.zr.getWidth(),u=this.zr.getHeight(),y=this._itemGroupLocation.x,b=this._itemGroupLocation.y,g=this.legendOption.itemWidth,k=this.legendOption.itemHeight,f=this.legendOption.itemGap;"vertical"===this.legendOption.orient&&"right"===this.legendOption.x&&(y=this._itemGroupLocation.x+this._itemGroupLocation.width-g);for(var x=0;d>x;x++)o=h.merge(U[x].textStyle||{},p),s=this.getFont(o),e=this._getName(U[x]),l=this._getFormatterName(e),""!==e?(t=U[x].icon||this._getSomethingByName(e).type,V=this.getColor(e),"horizontal"===this.legendOption.orient?200>c-y&&g+5+m.getTextWidth(l,s)+(x===d-1||""===U[x+1]?0:f)>=c-y&&(y=this._itemGroupLocation.x,b+=k+f):200>u-b&&k+(x===d-1||""===U[x+1]?0:f)>=u-b&&("right"===this.legendOption.x?y-=this._itemGroupLocation.maxWidth+f:y+=this._itemGroupLocation.maxWidth+f,b=this._itemGroupLocation.y),n=this._getItemShapeByType(y,b,g,k,this._selectedMap[e]?V:"#ccc",t,V),n._name=e,n=new r(n),a={zlevel:this._zlevelBase,style:{x:y+g+5,y:b+k/2,color:this._selectedMap[e]?"auto"===o.color?V:o.color:"#ccc",text:l,textFont:s,textBaseline:"middle"},highlightStyle:{color:V,brushType:"fill"},hoverable:!!this.legendOption.selectedMode,clickable:!!this.legendOption.selectedMode},"vertical"===this.legendOption.orient&&"right"===this.legendOption.x&&(a.style.x-=g+10,a.style.textAlign="right"),a._name=e,a=new i(a),this.legendOption.selectedMode&&(n.onclick=a.onclick=this._legendSelected,n.onmouseover=a.onmouseover=this._dispatchHoverLink,n.hoverConnect=a.id,a.hoverConnect=n.id),this.shapeList.push(n),this.shapeList.push(a),"horizontal"===this.legendOption.orient?y+=g+5+m.getTextWidth(l,s)+f:b+=k+f):"horizontal"===this.legendOption.orient?(y=this._itemGroupLocation.x,b+=k+f):("right"===this.legendOption.x?y-=this._itemGroupLocation.maxWidth+f:y+=this._itemGroupLocation.maxWidth+f,b=this._itemGroupLocation.y);"horizontal"===this.legendOption.orient&&"center"===this.legendOption.x&&b!=this._itemGroupLocation.y&&this._mLineOptimize()},_getName:function(e){return"undefined"!=typeof e.name?e.name:e},_getFormatterName:function(e){var t,n=this.legendOption.formatter;return t="function"==typeof n?n.call(this.myChart,e):"string"==typeof n?n.replace("{name}",e):e},_getFormatterNameFromData:function(e){var t=this._getName(e);return this._getFormatterName(t)},_mLineOptimize:function(){for(var e=[],t=this._itemGroupLocation.x,n=2,i=this.shapeList.length;i>n;n++)this.shapeList[n].style.x===t?e.push((this._itemGroupLocation.width-(this.shapeList[n-1].style.x+m.getTextWidth(this.shapeList[n-1].style.text,this.shapeList[n-1].style.textFont)-t))/2):n===i-1&&e.push((this._itemGroupLocation.width-(this.shapeList[n].style.x+m.getTextWidth(this.shapeList[n].style.text,this.shapeList[n].style.textFont)-t))/2);for(var a=-1,n=1,i=this.shapeList.length;i>n;n++)this.shapeList[n].style.x===t&&a++,0!==e[a]&&(this.shapeList[n].style.x+=e[a])},_buildBackground:function(){var e=this.legendOption.padding[0],t=this.legendOption.padding[1],n=this.legendOption.padding[2],i=this.legendOption.padding[3];this.shapeList.push(new a({zlevel:this._zlevelBase,hoverable:!1,style:{x:this._itemGroupLocation.x-i,y:this._itemGroupLocation.y-e,width:this._itemGroupLocation.width+i+t,height:this._itemGroupLocation.height+e+n,brushType:0===this.legendOption.borderWidth?"fill":"both",color:this.legendOption.backgroundColor,strokeColor:this.legendOption.borderColor,lineWidth:this.legendOption.borderWidth}}))},_getItemGroupLocation:function(){var e=this.legendOption.data,t=e.length,n=this.legendOption.itemGap,i=this.legendOption.itemWidth+5,a=this.legendOption.itemHeight,o=this.legendOption.textStyle,r=this.getFont(o),s=0,l=0,V=this.legendOption.padding,U=this.zr.getWidth()-V[1]-V[3],d=this.zr.getHeight()-V[0]-V[2],p=0,c=0;if("horizontal"===this.legendOption.orient){l=a;for(var u=0;t>u;u++)""!==this._getName(e[u])?p+=i+m.getTextWidth(this._getFormatterNameFromData(e[u]),e[u].textStyle?this.getFont(h.merge(e[u].textStyle||{},o)):r)+n:(p-=n,p>U?(s=U,l+=a+n):s=Math.max(s,p),l+=a+n,p=0);l=Math.max(l,a),p-=n,p>U?(s=U,l+=a+n):s=Math.max(s,p)}else{for(var u=0;t>u;u++)c=Math.max(c,m.getTextWidth(this._getFormatterNameFromData(e[u]),e[u].textStyle?this.getFont(h.merge(e[u].textStyle||{},o)):r));c+=i,s=c;for(var u=0;t>u;u++)""!==this._getName(e[u])?p+=a+n:(p-=n,p>d?(l=d,s+=c+n):l=Math.max(l,p),s+=c+n,p=0);
s=Math.max(s,c),p-=n,p>d?(l=d,s+=c+n):l=Math.max(l,p)}U=this.zr.getWidth(),d=this.zr.getHeight();var y;switch(this.legendOption.x){case"center":y=Math.floor((U-s)/2);break;case"left":y=this.legendOption.padding[3]+this.legendOption.borderWidth;break;case"right":y=U-s-this.legendOption.padding[1]-this.legendOption.padding[3]-2*this.legendOption.borderWidth;break;default:y=this.parsePercent(this.legendOption.x,U)}var b;switch(this.legendOption.y){case"top":b=this.legendOption.padding[0]+this.legendOption.borderWidth;break;case"bottom":b=d-l-this.legendOption.padding[0]-this.legendOption.padding[2]-2*this.legendOption.borderWidth;break;case"center":b=Math.floor((d-l)/2);break;default:b=this.parsePercent(this.legendOption.y,d)}return{x:y,y:b,width:s,height:l,maxWidth:c}},_getSomethingByName:function(e){for(var t,n=this.option.series,i=0,a=n.length;a>i;i++){if(n[i].name===e)return{type:n[i].type,series:n[i],seriesIndex:i,data:null,dataIndex:-1};if(n[i].type===l.CHART_TYPE_PIE||n[i].type===l.CHART_TYPE_RADAR||n[i].type===l.CHART_TYPE_CHORD||n[i].type===l.CHART_TYPE_FORCE||n[i].type===l.CHART_TYPE_FUNNEL){t=n[i].categories||n[i].data||n[i].nodes;for(var o=0,r=t.length;r>o;o++)if(t[o].name===e)return{type:n[i].type,series:n[i],seriesIndex:i,data:t[o],dataIndex:o}}}return{type:"bar",series:null,seriesIndex:-1,data:null,dataIndex:-1}},_getItemShapeByType:function(e,t,n,i,a,o,r){var s,l="#ccc"===a?r:a,h={zlevel:this._zlevelBase,style:{iconType:"legendicon"+o,x:e,y:t,width:n,height:i,color:a,strokeColor:a,lineWidth:2},highlightStyle:{color:l,strokeColor:l,lineWidth:1},hoverable:this.legendOption.selectedMode,clickable:this.legendOption.selectedMode};if(o.match("image")){var s=o.replace(new RegExp("^image:\\/\\/"),"");o="image"}switch(o){case"line":h.style.brushType="stroke",h.highlightStyle.lineWidth=3;break;case"radar":case"scatter":h.highlightStyle.lineWidth=3;break;case"k":h.style.brushType="both",h.highlightStyle.lineWidth=3,h.highlightStyle.color=h.style.color=this.query(this.ecTheme,"k.itemStyle.normal.color")||"#fff",h.style.strokeColor="#ccc"!=a?this.query(this.ecTheme,"k.itemStyle.normal.lineStyle.color")||"#ff3200":a;break;case"image":h.style.iconType="image",h.style.image=s,"#ccc"===a&&(h.style.opacity=.5)}return h},__legendSelected:function(e){var t=e.target._name;if("single"===this.legendOption.selectedMode)for(var n in this._selectedMap)this._selectedMap[n]=!1;this._selectedMap[t]=!this._selectedMap[t],this.messageCenter.dispatch(l.EVENT.LEGEND_SELECTED,e.event,{selected:this._selectedMap,target:t},this.myChart)},__dispatchHoverLink:function(e){this.messageCenter.dispatch(l.EVENT.LEGEND_HOVERLINK,e.event,{target:e.target._name},this.myChart)},refresh:function(e){if(e){this.option=e||this.option,this.option.legend=this.reformOption(this.option.legend),this.option.legend.padding=this.reformCssArray(this.option.legend.padding),this.legendOption=this.option.legend;var t,n,i,a,o=this.legendOption.data||[];if(this.legendOption.selected)for(var r in this.legendOption.selected)this._selectedMap[r]="undefined"!=typeof this._selectedMap[r]?this._selectedMap[r]:this.legendOption.selected[r];for(var s=0,h=o.length;h>s;s++)t=this._getName(o[s]),""!==t&&(n=this._getSomethingByName(t),n.series?(a=!n.data||n.type!==l.CHART_TYPE_PIE&&n.type!==l.CHART_TYPE_FORCE&&n.type!==l.CHART_TYPE_FUNNEL?[n.series]:[n.data,n.series],i=this.getItemStyleColor(this.deepQuery(a,"itemStyle.normal.color"),n.seriesIndex,n.dataIndex,n.data),i&&n.type!=l.CHART_TYPE_K&&this.setColor(t,i),this._selectedMap[t]="undefined"!=typeof this._selectedMap[t]?this._selectedMap[t]:!0):this._selectedMap[t]=!1)}this.clear(),this._buildShape()},getRelatedAmount:function(e){for(var t,n=0,i=this.option.series,a=0,o=i.length;o>a;a++)if(i[a].name===e&&n++,i[a].type===l.CHART_TYPE_PIE||i[a].type===l.CHART_TYPE_RADAR||i[a].type===l.CHART_TYPE_CHORD||i[a].type===l.CHART_TYPE_FORCE||i[a].type===l.CHART_TYPE_FUNNEL){t=i[a].type!=l.CHART_TYPE_FORCE?i[a].data:i[a].categories;for(var r=0,s=t.length;s>r;r++)t[r].name===e&&"-"!=t[r].value&&n++}return n},setColor:function(e,t){this._colorMap[e]=t},getColor:function(e){return this._colorMap[e]||(this._colorMap[e]=this.zr.getColor(this._colorIndex++)),this._colorMap[e]},hasColor:function(e){return this._colorMap[e]?this._colorMap[e]:!1},add:function(e,t){for(var n=this.legendOption.data,i=0,a=n.length;a>i;i++)if(this._getName(n[i])===e)return;this.legendOption.data.push(e),this.setColor(e,t),this._selectedMap[e]=!0},del:function(e){for(var t=this.legendOption.data,n=0,i=t.length;i>n;n++)if(this._getName(t[n])===e)return this.legendOption.data.splice(n,1)},getItemShape:function(e){if(null!=e)for(var t,n=0,i=this.shapeList.length;i>n;n++)if(t=this.shapeList[n],t._name===e&&"text"!=t.type)return t},setItemShape:function(e,t){for(var n,i=0,a=this.shapeList.length;a>i;i++)n=this.shapeList[i],n._name===e&&"text"!=n.type&&(this._selectedMap[e]||(t.style.color="#ccc",t.style.strokeColor="#ccc"),this.zr.modShape(n.id,t))},isSelected:function(e){return"undefined"!=typeof this._selectedMap[e]?this._selectedMap[e]:!0},getSelectedMap:function(){return this._selectedMap},setSelected:function(e,t){if("single"===this.legendOption.selectedMode)for(var n in this._selectedMap)this._selectedMap[n]=!1;this._selectedMap[e]=t,this.messageCenter.dispatch(l.EVENT.LEGEND_SELECTED,null,{selected:this._selectedMap,target:e},this.myChart)},onlegendSelected:function(e,t){var n=e.selected;for(var i in n)this._selectedMap[i]!=n[i]&&(t.needRefresh=!0),this._selectedMap[i]=n[i]}};var V={line:function(e,t){var n=t.height/2;e.moveTo(t.x,t.y+n),e.lineTo(t.x+t.width,t.y+n)},pie:function(e,t){var n=t.x,i=t.y,a=t.width,r=t.height;o.prototype.buildPath(e,{x:n+a/2,y:i+r+2,r:r+2,r0:6,startAngle:45,endAngle:135})},eventRiver:function(e,t){var n=t.x,i=t.y,a=t.width,o=t.height;e.moveTo(n,i+o),e.bezierCurveTo(n+a,i+o,n,i+4,n+a,i+4),e.lineTo(n+a,i),e.bezierCurveTo(n,i,n+a,i+o-4,n,i+o-4),e.lineTo(n,i+o)},k:function(e,t){var n=t.x,i=t.y,a=t.width,o=t.height;s.prototype.buildPath(e,{x:n+a/2,y:[i+1,i+1,i+o-6,i+o],width:a-6})},bar:function(e,t){var n=t.x,i=t.y+1,a=t.width,o=t.height-2,r=3;e.moveTo(n+r,i),e.lineTo(n+a-r,i),e.quadraticCurveTo(n+a,i,n+a,i+r),e.lineTo(n+a,i+o-r),e.quadraticCurveTo(n+a,i+o,n+a-r,i+o),e.lineTo(n+r,i+o),e.quadraticCurveTo(n,i+o,n,i+o-r),e.lineTo(n,i+r),e.quadraticCurveTo(n,i,n+r,i)},force:function(e,t){r.prototype.iconLibrary.circle(e,t)},radar:function(e,t){var n=6,i=t.x+t.width/2,a=t.y+t.height/2,o=t.height/2,r=2*Math.PI/n,s=-Math.PI/2,l=i+o*Math.cos(s),h=a+o*Math.sin(s);e.moveTo(l,h),s+=r;for(var m=0,V=n-1;V>m;m++)e.lineTo(i+o*Math.cos(s),a+o*Math.sin(s)),s+=r;e.lineTo(l,h)}};V.chord=V.pie,V.map=V.bar;for(var U in V)r.prototype.iconLibrary["legendicon"+U]=V[U];return h.inherits(t,n),e("../component").define("legend",t),t}),n("echarts/util/ecData",[],function(){function e(e,t,n,i,a,o,r,s){var l;return"undefined"!=typeof i&&(l=null==i.value?i:i.value),e._echartsData={_series:t,_seriesIndex:n,_data:i,_dataIndex:a,_name:o,_value:l,_special:r,_special2:s},e._echartsData}function t(e,t){var n=e._echartsData;if(!t)return n;switch(t){case"series":case"seriesIndex":case"data":case"dataIndex":case"name":case"value":case"special":case"special2":return n&&n["_"+t]}return null}function n(e,t,n){switch(e._echartsData=e._echartsData||{},t){case"series":case"seriesIndex":case"data":case"dataIndex":case"name":case"value":case"special":case"special2":e._echartsData["_"+t]=n}}function i(e,t){t._echartsData={_series:e._echartsData._series,_seriesIndex:e._echartsData._seriesIndex,_data:e._echartsData._data,_dataIndex:e._echartsData._dataIndex,_name:e._echartsData._name,_value:e._echartsData._value,_special:e._echartsData._special,_special2:e._echartsData._special2}}return{pack:e,set:n,get:t,clone:i}}),n("echarts/chart",[],function(){var e={},t={};return e.define=function(n,i){return t[n]=i,e},e.get=function(e){return t[e]},e}),n("zrender/tool/color",["require","../tool/util"],function(e){function t(e){D=e}function n(){D=N}function i(e,t){return e=0|e,t=t||D,t[e%t.length]}function a(e){B=e}function o(){H=B}function r(){return B}function s(e,t,n,i,a,o,r){O||(O=P.getContext());for(var s=O.createRadialGradient(e,t,n,i,a,o),l=0,h=r.length;h>l;l++)s.addColorStop(r[l][0],r[l][1]);return s.__nonRecursion=!0,s}function l(e,t,n,i,a){O||(O=P.getContext());for(var o=O.createLinearGradient(e,t,n,i),r=0,s=a.length;s>r;r++)o.addColorStop(a[r][0],a[r][1]);return o.__nonRecursion=!0,o}function h(e,t,n){e=p(e),t=p(t),e=v(e),t=v(t);for(var i=[],a=(t[0]-e[0])/n,o=(t[1]-e[1])/n,r=(t[2]-e[2])/n,s=(t[3]-e[3])/n,l=0,h=e[0],m=e[1],U=e[2],d=e[3];n>l;l++)i[l]=V([S(Math.floor(h),[0,255]),S(Math.floor(m),[0,255]),S(Math.floor(U),[0,255]),d.toFixed(4)-0],"rgba"),h+=a,m+=o,U+=r,d+=s;return h=t[0],m=t[1],U=t[2],d=t[3],i[l]=V([h,m,U,d],"rgba"),i}function m(e,t){var n=[],i=e.length;if(void 0===t&&(t=20),1===i)n=h(e[0],e[0],t);else if(i>1)for(var a=0,o=i-1;o>a;a++){var r=h(e[a],e[a+1],t);o-1>a&&r.pop(),n=n.concat(r)}return n}function V(e,t){if(t=t||"rgb",e&&(3===e.length||4===e.length)){if(e=C(e,function(e){return e>1?Math.ceil(e):e}),t.indexOf("hex")>-1)return"#"+((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1);if(t.indexOf("hs")>-1){var n=C(e.slice(1,3),function(e){return e+"%"});e[1]=n[0],e[2]=n[1]}return t.indexOf("a")>-1?(3===e.length&&e.push(1),e[3]=S(e[3],[0,1]),t+"("+e.slice(0,4).join(",")+")"):t+"("+e.slice(0,3).join(",")+")"}}function U(e){e=L(e),e.indexOf("rgba")<0&&(e=p(e));var t=[],n=0;return e.replace(/[\d.]+/g,function(e){e=3>n?0|e:+e,t[n++]=e}),t}function d(e,t){if(!E(e))return e;var n=v(e),i=n[3];return"undefined"==typeof i&&(i=1),e.indexOf("hsb")>-1?n=T(n):e.indexOf("hsl")>-1&&(n=F(n)),t.indexOf("hsb")>-1||t.indexOf("hsv")>-1?n=M(n):t.indexOf("hsl")>-1&&(n=z(n)),n[3]=i,V(n,t)}function p(e){return d(e,"rgba")}function c(e){return d(e,"rgb")}function u(e){return d(e,"hex")}function y(e){return d(e,"hsva")}function b(e){return d(e,"hsv")}function g(e){return d(e,"hsba")}function k(e){return d(e,"hsb")}function f(e){return d(e,"hsla")}function x(e){return d(e,"hsl")}function _(e){for(var t in G)if(u(G[t])===u(e))return t;return null}function L(e){return String(e).replace(/\s+/g,"")}function W(e){if(G[e]&&(e=G[e]),e=L(e),e=e.replace(/hsv/i,"hsb"),/^#[\da-f]{3}$/i.test(e)){e=parseInt(e.slice(1),16);var t=(3840&e)<<8,n=(240&e)<<4,i=15&e;e="#"+((1<<24)+(t<<4)+t+(n<<4)+n+(i<<4)+i).toString(16).slice(1)}return e}function X(e,t){if(!E(e))return e;var n=t>0?1:-1;"undefined"==typeof t&&(t=0),t=Math.abs(t)>1?1:Math.abs(t),e=c(e);for(var i=v(e),a=0;3>a;a++)i[a]=1===n?i[a]*(1-t)|0:(255-i[a])*t+i[a]|0;return"rgb("+i.join(",")+")"}function K(e){if(!E(e))return e;var t=v(p(e));return t=C(t,function(e){return 255-e}),V(t,"rgb")}function w(e,t,n){if(!E(e)||!E(t))return e;"undefined"==typeof n&&(n=.5),n=1-S(n,[0,1]);for(var i=2*n-1,a=v(p(e)),o=v(p(t)),r=a[3]-o[3],s=((i*r===-1?i:(i+r)/(1+i*r))+1)/2,l=1-s,h=[],m=0;3>m;m++)h[m]=a[m]*s+o[m]*l;var U=a[3]*n+o[3]*(1-n);return U=Math.max(0,Math.min(1,U)),1===a[3]&&1===o[3]?V(h,"rgb"):(h[3]=U,V(h,"rgba"))}function I(){return"#"+Math.random().toString(16).slice(2,8)}function v(e){e=W(e);var t=e.match(R);if(null===t)throw new Error("The color format error");var n,i,a,o=[];if(t[2])n=t[2].replace("#","").split(""),a=[n[0]+n[1],n[2]+n[3],n[4]+n[5]],o=C(a,function(e){return S(parseInt(e,16),[0,255])});else if(t[4]){var r=t[4].split(",");i=r[3],a=r.slice(0,3),o=C(a,function(e){return e=Math.floor(e.indexOf("%")>0?2.55*parseInt(e,0):e),S(e,[0,255])}),"undefined"!=typeof i&&o.push(S(parseFloat(i),[0,1]))}else if(t[5]||t[6]){var s=(t[5]||t[6]).split(","),l=parseInt(s[0],0)/360,h=s[1],m=s[2];i=s[3],o=C([h,m],function(e){return S(parseFloat(e)/100,[0,1])}),o.unshift(l),"undefined"!=typeof i&&o.push(S(parseFloat(i),[0,1]))}return o}function J(e,t){if(!E(e))return e;null===t&&(t=1);var n=v(p(e));return n[3]=S(Number(t).toFixed(4),[0,1]),V(n,"rgba")}function C(e,t){if("function"!=typeof t)throw new TypeError;for(var n=e?e.length:0,i=0;n>i;i++)e[i]=t(e[i]);return e}function S(e,t){return e<=t[0]?e=t[0]:e>=t[1]&&(e=t[1]),e}function E(e){return e instanceof Array||"string"==typeof e}function T(e){var t,n,i,a=e[0],o=e[1],r=e[2];if(0===o)t=255*r,n=255*r,i=255*r;else{var s=6*a;6===s&&(s=0);var l=0|s,h=r*(1-o),m=r*(1-o*(s-l)),V=r*(1-o*(1-(s-l))),U=0,d=0,p=0;0===l?(U=r,d=V,p=h):1===l?(U=m,d=r,p=h):2===l?(U=h,d=r,p=V):3===l?(U=h,d=m,p=r):4===l?(U=V,d=h,p=r):(U=r,d=h,p=m),t=255*U,n=255*d,i=255*p}return[t,n,i]}function F(e){var t,n,i,a=e[0],o=e[1],r=e[2];if(0===o)t=255*r,n=255*r,i=255*r;else{var s;s=.5>r?r*(1+o):r+o-o*r;var l=2*r-s;t=255*A(l,s,a+1/3),n=255*A(l,s,a),i=255*A(l,s,a-1/3)}return[t,n,i]}function A(e,t,n){return 0>n&&(n+=1),n>1&&(n-=1),1>6*n?e+6*(t-e)*n:1>2*n?t:2>3*n?e+(t-e)*(2/3-n)*6:e}function M(e){var t,n,i=e[0]/255,a=e[1]/255,o=e[2]/255,r=Math.min(i,a,o),s=Math.max(i,a,o),l=s-r,h=s;if(0===l)t=0,n=0;else{n=l/s;var m=((s-i)/6+l/2)/l,V=((s-a)/6+l/2)/l,U=((s-o)/6+l/2)/l;i===s?t=U-V:a===s?t=1/3+m-U:o===s&&(t=2/3+V-m),0>t&&(t+=1),t>1&&(t-=1)}return t=360*t,n=100*n,h=100*h,[t,n,h]}function z(e){var t,n,i=e[0]/255,a=e[1]/255,o=e[2]/255,r=Math.min(i,a,o),s=Math.max(i,a,o),l=s-r,h=(s+r)/2;if(0===l)t=0,n=0;else{n=.5>h?l/(s+r):l/(2-s-r);var m=((s-i)/6+l/2)/l,V=((s-a)/6+l/2)/l,U=((s-o)/6+l/2)/l;i===s?t=U-V:a===s?t=1/3+m-U:o===s&&(t=2/3+V-m),0>t&&(t+=1),t>1&&(t-=1)}return t=360*t,n=100*n,h=100*h,[t,n,h]}var O,P=e("../tool/util"),D=["#ff9277"," #dddd00"," #ffc877"," #bbe3ff"," #d5ffbb","#bbbbff"," #ddb000"," #b0dd00"," #e2bbff"," #ffbbe3","#ff7777"," #ff9900"," #83dd00"," #77e3ff"," #778fff","#c877ff"," #ff77ab"," #ff6600"," #aa8800"," #77c7ff","#ad77ff"," #ff77ff"," #dd0083"," #777700"," #00aa00","#0088aa"," #8400dd"," #aa0088"," #dd0000"," #772e00"],N=D,B="rgba(255,255,0,0.5)",H=B,R=/^\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,G={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"};return{customPalette:t,resetPalette:n,getColor:i,getHighlightColor:r,customHighlight:a,resetHighlight:o,getRadialGradient:s,getLinearGradient:l,getGradientColors:m,getStepColors:h,reverse:K,mix:w,lift:X,trim:L,random:I,toRGB:c,toRGBA:p,toHex:u,toHSL:x,toHSLA:f,toHSB:k,toHSBA:g,toHSV:b,toHSVA:y,toName:_,toColor:V,toArray:U,alpha:J,getData:v}}),n("echarts/component/timeline",["require","./base","zrender/shape/Rectangle","../util/shape/Icon","../util/shape/Chain","../config","zrender/tool/util","zrender/tool/area","zrender/tool/event","../component"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o);var r=this;if(r._onclick=function(e){return r.__onclick(e)},r._ondrift=function(e,t){return r.__ondrift(this,e,t)},r._ondragend=function(){return r.__ondragend()},r._setCurrentOption=function(){var e=r.timelineOption;r.currentIndex%=e.data.length;var t=r.options[r.currentIndex]||{};r.myChart.setOption(t,e.notMerge),r.messageCenter.dispatch(s.EVENT.TIMELINE_CHANGED,null,{currentIndex:r.currentIndex,data:null!=e.data[r.currentIndex].name?e.data[r.currentIndex].name:e.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){var r=this;this.playTicket=setTimeout(function(){r.play()},this.ecTheme.animationDuration)}}function n(e,t){var n=2,i=t.x+n,a=t.y+n+2,r=t.width-n,s=t.height-n,l=t.symbol;if("last"===l)e.moveTo(i+r-2,a+s/3),e.lineTo(i+r-2,a),e.lineTo(i+2,a+s/2),e.lineTo(i+r-2,a+s),e.lineTo(i+r-2,a+s/3*2),e.moveTo(i,a),e.lineTo(i,a);else if("next"===l)e.moveTo(i+2,a+s/3),e.lineTo(i+2,a),e.lineTo(i+r-2,a+s/2),e.lineTo(i+2,a+s),e.lineTo(i+2,a+s/3*2),e.moveTo(i,a),e.lineTo(i,a);else if("play"===l)if("stop"===t.status)e.moveTo(i+2,a),e.lineTo(i+r-2,a+s/2),e.lineTo(i+2,a+s),e.lineTo(i+2,a);else{var h="both"===t.brushType?2:3;e.rect(i+2,a,h,s),e.rect(i+r-h-2,a,h,s)}else if(l.match("image")){var m="";m=l.replace(new RegExp("^image:\\/\\/"),""),l=o.prototype.iconLibrary.image,l(e,{x:i,y:a,width:r,height:s,image:m})}}var i=e("./base"),a=e("zrender/shape/Rectangle"),o=e("../util/shape/Icon"),r=e("../util/shape/Chain"),s=e("../config"),l=e("zrender/tool/util"),h=e("zrender/tool/area"),m=e("zrender/tool/event");return t.prototype={type:s.COMPONENT_TYPE_TIMELINE,_buildShape:function(){if(this._location=this._getLocation(),this._buildBackground(),this._buildControl(),this._chainPoint=this._getChainPoint(),this.timelineOption.label.show)for(var e=this._getInterval(),t=0,n=this._chainPoint.length;n>t;t+=e)this._chainPoint[t].showLabel=!0;this._buildChain(),this._buildHandle();for(var t=0,i=this.shapeList.length;i>t;t++)this.zr.addShape(this.shapeList[t])},_getLocation:function(){var e,t=this.timelineOption,n=t.padding,i=this.zr.getWidth(),a=this.parsePercent(t.x,i),o=this.parsePercent(t.x2,i);null==t.width?(e=i-a-o,o=i-o):(e=this.parsePercent(t.width,i),o=a+e);var r,s,l=this.zr.getHeight(),h=this.parsePercent(t.height,l);return null!=t.y?(r=this.parsePercent(t.y,l),s=r+h):(s=l-this.parsePercent(t.y2,l),r=s-h),{x:a+n[3],y:r+n[0],x2:o-n[1],y2:s-n[2],width:e-n[1]-n[3],height:h-n[0]-n[2]}},_getReformedLabel:function(e){var t=this.timelineOption,n=null!=t.data[e].name?t.data[e].name:t.data[e],i=t.data[e].formatter||t.label.formatter;return i&&("function"==typeof i?n=i.call(this.myChart,n):"string"==typeof i&&(n=i.replace("{value}",n))),n},_getInterval:function(){var e=this._chainPoint,t=this.timelineOption,n=t.label.interval;if("auto"===n){var i=t.label.textStyle.fontSize,a=t.data,o=t.data.length;if(o>3){var r,s,l=!1;for(n=0;!l&&o>n;){n++,l=!0;for(var m=n;o>m;m+=n){if(r=e[m].x-e[m-n].x,0!==t.label.rotate)s=i;else if(a[m].textStyle)s=h.getTextWidth(e[m].name,e[m].textFont);else{var V=e[m].name+"",U=(V.match(/\w/g)||"").length,d=V.length-U;s=U*i*2/3+d*i}if(s>r){l=!1;break}}}}else n=1}else n=n-0+1;return n},_getChainPoint:function(){function e(e){return null!=h[e].name?h[e].name:h[e]}var t,n=this.timelineOption,i=n.symbol.toLowerCase(),a=n.symbolSize,o=n.label.rotate,r=n.label.textStyle,s=this.getFont(r),h=n.data,m=this._location.x,V=this._location.y+this._location.height/4*3,U=this._location.x2-this._location.x,d=h.length,p=[];if(d>1){var c=U/d;if(c=c>50?50:20>c?5:c,U-=2*c,"number"===n.type)for(var u=0;d>u;u++)p.push(m+c+U/(d-1)*u);else{p[0]=new Date(e(0).replace(/-/g,"/")),p[d-1]=new Date(e(d-1).replace(/-/g,"/"))-p[0];for(var u=1;d>u;u++)p[u]=m+c+U*(new Date(e(u).replace(/-/g,"/"))-p[0])/p[d-1];p[0]=m+c}}else p.push(m+U/2);for(var y,b,g,k,f,x=[],u=0;d>u;u++)m=p[u],y=h[u].symbol&&h[u].symbol.toLowerCase()||i,y.match("empty")?(y=y.replace("empty",""),g=!0):g=!1,y.match("star")&&(b=y.replace("star","")-0||5,y="star"),t=h[u].textStyle?l.merge(h[u].textStyle||{},r):r,k=t.align||"center",o?(k=o>0?"right":"left",f=[o*Math.PI/180,m,V-5]):f=!1,x.push({x:m,n:b,isEmpty:g,symbol:y,symbolSize:h[u].symbolSize||a,color:h[u].color,borderColor:h[u].borderColor,borderWidth:h[u].borderWidth,name:this._getReformedLabel(u),textColor:t.color,textAlign:k,textBaseline:t.baseline||"middle",textX:m,textY:V-(o?5:0),textFont:h[u].textStyle?this.getFont(t):s,rotation:f,showLabel:!1});return x},_buildBackground:function(){var e=this.timelineOption,t=e.padding,n=this._location.width,i=this._location.height;(0!==e.borderWidth||"rgba(0,0,0,0)"!=e.backgroundColor.replace(/\s/g,""))&&this.shapeList.push(new a({zlevel:this._zlevelBase,hoverable:!1,style:{x:this._location.x-t[3],y:this._location.y-t[0],width:n+t[1]+t[3],height:i+t[0]+t[2],brushType:0===e.borderWidth?"fill":"both",color:e.backgroundColor,strokeColor:e.borderColor,lineWidth:e.borderWidth}}))},_buildControl:function(){var e=this,t=this.timelineOption,n=t.lineStyle,i=t.controlStyle;if("none"!==t.controlPosition){var a,r=15,s=5;"left"===t.controlPosition?(a=this._location.x,this._location.x+=3*(r+s)):(a=this._location.x2-(3*(r+s)-s),this._location.x2-=3*(r+s));var h=this._location.y,m={zlevel:this._zlevelBase+1,style:{iconType:"timelineControl",symbol:"last",x:a,y:h,width:r,height:r,brushType:"stroke",color:i.normal.color,strokeColor:i.normal.color,lineWidth:n.width},highlightStyle:{color:i.emphasis.color,strokeColor:i.emphasis.color,lineWidth:n.width+1},clickable:!0};this._ctrLastShape=new o(m),this._ctrLastShape.onclick=function(){e.last()},this.shapeList.push(this._ctrLastShape),a+=r+s,this._ctrPlayShape=new o(l.clone(m)),this._ctrPlayShape.style.brushType="fill",this._ctrPlayShape.style.symbol="play",this._ctrPlayShape.style.status=this.timelineOption.autoPlay?"playing":"stop",this._ctrPlayShape.style.x=a,this._ctrPlayShape.onclick=function(){"stop"===e._ctrPlayShape.style.status?e.play():e.stop()},this.shapeList.push(this._ctrPlayShape),a+=r+s,this._ctrNextShape=new o(l.clone(m)),this._ctrNextShape.style.symbol="next",this._ctrNextShape.style.x=a,this._ctrNextShape.onclick=function(){e.next()},this.shapeList.push(this._ctrNextShape)}},_buildChain:function(){var e=this.timelineOption,t=e.lineStyle;this._timelineShae={zlevel:this._zlevelBase,style:{x:this._location.x,y:this.subPixelOptimize(this._location.y,t.width),width:this._location.x2-this._location.x,height:this._location.height,chainPoint:this._chainPoint,brushType:"both",strokeColor:t.color,lineWidth:t.width,lineType:t.type},hoverable:!1,clickable:!0,onclick:this._onclick},this._timelineShae=new r(this._timelineShae),this.shapeList.push(this._timelineShae)},_buildHandle:function(){var e=this._chainPoint[this.currentIndex],t=e.symbolSize+1;t=5>t?5:t,this._handleShape={zlevel:this._zlevelBase+1,hoverable:!1,draggable:!0,style:{iconType:"diamond",n:e.n,x:e.x-t,y:this._location.y+this._location.height/4-t,width:2*t,height:2*t,brushType:"both",textPosition:"specific",textX:e.x,textY:this._location.y-this._location.height/4,textAlign:"center",textBaseline:"middle"},highlightStyle:{},ondrift:this._ondrift,ondragend:this._ondragend},this._handleShape=new o(this._handleShape),this.shapeList.push(this._handleShape)},_syncHandleShape:function(){if(this.timelineOption.show){var e=this.timelineOption,t=e.checkpointStyle,n=this._chainPoint[this.currentIndex];this._handleShape.style.text=t.label.show?n.name:"",this._handleShape.style.textFont=n.textFont,this._handleShape.style.n=n.n,"auto"===t.symbol?this._handleShape.style.iconType="none"!=n.symbol?n.symbol:"diamond":(this._handleShape.style.iconType=t.symbol,t.symbol.match("star")&&(this._handleShape.style.n=t.symbol.replace("star","")-0||5,this._handleShape.style.iconType="star"));var i;"auto"===t.symbolSize?(i=n.symbolSize+2,i=5>i?5:i):i=t.symbolSize-0,this._handleShape.style.color="auto"===t.color?n.color?n.color:e.controlStyle.emphasis.color:t.color,this._handleShape.style.textColor="auto"===t.label.textStyle.color?this._handleShape.style.color:t.label.textStyle.color,this._handleShape.highlightStyle.strokeColor=this._handleShape.style.strokeColor="auto"===t.borderColor?n.borderColor?n.borderColor:"#fff":t.borderColor,this._handleShape.style.lineWidth="auto"===t.borderWidth?n.borderWidth?n.borderWidth:0:t.borderWidth-0,this._handleShape.highlightStyle.lineWidth=this._handleShape.style.lineWidth+1,this.zr.animate(this._handleShape.id,"style").when(500,{x:n.x-i,textX:n.x,y:this._location.y+this._location.height/4-i,width:2*i,height:2*i}).start("ExponentialOut")}},_findChainIndex:function(e){var t=this._chainPoint,n=t.length;if(e<=t[0].x)return 0;if(e>=t[n-1].x)return n-1;for(var i=0;n-1>i;i++)if(e>=t[i].x&&e<=t[i+1].x)return Math.abs(e-t[i].x)=i[a-1].x-i[a-1].symbolSize?(e.style.x=i[a-1].x-i[a-1].symbolSize,n=a-1):(e.style.x+=t,n=this._findChainIndex(e.style.x));var o=i[n],r=o.symbolSize+2;if(e.style.iconType=o.symbol,e.style.n=o.n,e.style.textX=e.style.x+r/2,e.style.y=this._location.y+this._location.height/4-r,e.style.width=2*r,e.style.height=2*r,e.style.text=o.name,n===this.currentIndex)return!0;if(this.currentIndex=n,this.timelineOption.realtime){clearTimeout(this.playTicket);var s=this;this.playTicket=setTimeout(function(){s._setCurrentOption()},200)}return!0},__ondragend:function(){this.isDragend=!0},ondragend:function(e,t){this.isDragend&&e.target&&(!this.timelineOption.realtime&&this._setCurrentOption(),t.dragOut=!0,t.dragIn=!0,t.needRefresh=!1,this.isDragend=!1,this._syncHandleShape())},last:function(){return this.timelineOption.autoPlay&&this.stop(),this.currentIndex-=1,this.currentIndex<0&&(this.currentIndex=this.timelineOption.data.length-1),this._onFrame(),this.currentIndex},next:function(){return this.timelineOption.autoPlay&&this.stop(),this.currentIndex+=1,this.currentIndex>=this.timelineOption.data.length&&(this.currentIndex=0),this._onFrame(),this.currentIndex},play:function(e,t){return this._ctrPlayShape&&"playing"!=this._ctrPlayShape.style.status&&(this._ctrPlayShape.style.status="playing",this.zr.modShape(this._ctrPlayShape.id),this.zr.refresh()),this.timelineOption.autoPlay=null!=t?t:!0,this.timelineOption.autoPlay||clearTimeout(this.playTicket),this.currentIndex=null!=e?e: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.refresh()),this.timelineOption.autoPlay=!1,clearTimeout(this.playTicket),this.currentIndex},resize:function(){this.timelineOption.show&&(this.clear(),this._buildShape(),this._syncHandleShape())},setTheme:function(e){this.timelineOption=this.reformOption(l.clone(this.option.timeline)),this.timelineOption.padding=this.reformCssArray(this.timelineOption.padding),this.timelineOption.label.textStyle=l.merge(this.timelineOption.label.textStyle||{},this.ecTheme.textStyle),this.timelineOption.checkpointStyle.label.textStyle=l.merge(this.timelineOption.checkpointStyle.label.textStyle||{},this.ecTheme.textStyle),this.myChart.canvasSupported||(this.timelineOption.realtime=!1),this.timelineOption.show&&e&&(this.clear(),this._buildShape(),this._syncHandleShape())},onbeforDispose:function(){clearTimeout(this.playTicket)}},o.prototype.iconLibrary.timelineControl=n,l.inherits(t,i),e("../component").define("timeline",t),t}),n("zrender/shape/Image",["require","./Base","../tool/util"],function(e){var t,n=[],i=e("./Base"),a=function(e){i.call(this,e)};return a.prototype={type:"image",brush:function(e,i,a){var o=this.style||{};i&&(o=this.getHighlightStyle(o,this.highlightStyle||{}));var r=o.image,s=this;if(this._imageCache||(this._imageCache={}),"string"==typeof r){var l=r;this._imageCache[l]?r=this._imageCache[l]:(r=new Image,r.onload=function(){r.onload=null,clearTimeout(t),n.push(s),t=setTimeout(function(){a&&a(n),n=[]},10)},r.src=l,this._imageCache[l]=r)}if(r){if("IMG"==r.nodeName.toUpperCase())if(window.ActiveXObject){if("complete"!=r.readyState)return}else if(!r.complete)return;var h=o.width||r.width,m=o.height||r.height,V=o.x,U=o.y;if(!r.width||!r.height)return;if(e.save(),this.doClip(e),this.setContext(e,o),this.setTransform(e),o.sWidth&&o.sHeight){var d=o.sx||0,p=o.sy||0;e.drawImage(r,d,p,o.sWidth,o.sHeight,V,U,h,m)}else if(o.sx&&o.sy){var d=o.sx,p=o.sy,c=h-d,u=m-p;e.drawImage(r,d,p,c,u,V,U,h,m)}else e.drawImage(r,V,U,h,m);o.width||(o.width=h),o.height||(o.height=m),this.style.width||(this.style.width=h),this.style.height||(this.style.height=m),this.drawText(e,o,this.style),e.restore()}},getRect:function(e){return{x:e.x,y:e.y,width:e.width,height:e.height}},clearCache:function(){this._imageCache={}}},e("../tool/util").inherits(a,i),a}),n("zrender/loadingEffect/Bar",["require","./Base","../tool/util","../tool/color","../shape/Rectangle"],function(e){function t(e){n.call(this,e)}var n=e("./Base"),i=e("../tool/util"),a=e("../tool/color"),o=e("../shape/Rectangle");return i.inherits(t,n),t.prototype._start=function(e,t){var n=i.merge(this.options,{textStyle:{color:"#888"},backgroundColor:"rgba(250, 250, 250, 0.8)",effectOption:{x:0,y:this.canvasHeight/2-30,width:this.canvasWidth,height:5,brushType:"fill",timeInterval:100}}),r=this.createTextShape(n.textStyle),s=this.createBackgroundShape(n.backgroundColor),l=n.effectOption,h=new o({highlightStyle:i.clone(l)});
return h.highlightStyle.color=l.color||a.getLinearGradient(l.x,l.y,l.x+l.width,l.y+l.height,[[0,"#ff6400"],[.5,"#ffe100"],[1,"#b1ff00"]]),null!=n.progress?(e(s),h.highlightStyle.width=this.adjust(n.progress,[0,1])*n.effectOption.width,e(h),e(r),void t()):(h.highlightStyle.width=0,setInterval(function(){e(s),h.highlightStyle.widthc;c++){var u="random"==l.color?a.alpha(a.random(),.3):l.color;U[c]=new o({highlightStyle:{x:Math.ceil(Math.random()*d),y:Math.ceil(Math.random()*p),r:Math.ceil(40*Math.random()),brushType:m,color:u,strokeColor:u,lineWidth:V},animationY:Math.ceil(20*Math.random())})}return setInterval(function(){e(s);for(var n=0;h>n;n++){var i=U[n].highlightStyle;i.y-U[n].animationY+i.r<=0&&(U[n].highlightStyle.y=p+i.r,U[n].highlightStyle.x=Math.ceil(Math.random()*d)),U[n].highlightStyle.y-=U[n].animationY,e(U[n])}e(r),t()},l.timeInterval)},t}),n("zrender/loadingEffect/DynamicLine",["require","./Base","../tool/util","../tool/color","../shape/Line"],function(e){function t(e){n.call(this,e)}var n=e("./Base"),i=e("../tool/util"),a=e("../tool/color"),o=e("../shape/Line");return i.inherits(t,n),t.prototype._start=function(e,t){for(var n=i.merge(this.options,{textStyle:{color:"#fff"},backgroundColor:"rgba(0, 0, 0, 0.8)",effectOption:{n:30,lineWidth:1,color:"random",timeInterval:100}}),r=this.createTextShape(n.textStyle),s=this.createBackgroundShape(n.backgroundColor),l=n.effectOption,h=l.n,m=l.lineWidth,V=[],U=this.canvasWidth,d=this.canvasHeight,p=0;h>p;p++){var c=-Math.ceil(1e3*Math.random()),u=Math.ceil(400*Math.random()),y=Math.ceil(Math.random()*d),b="random"==l.color?a.random():l.color;V[p]=new o({highlightStyle:{xStart:c,yStart:y,xEnd:c+u,yEnd:y,strokeColor:b,lineWidth:m},animationX:Math.ceil(100*Math.random()),len:u})}return setInterval(function(){e(s);for(var n=0;h>n;n++){var i=V[n].highlightStyle;i.xStart>=U&&(V[n].len=Math.ceil(400*Math.random()),i.xStart=-400,i.xEnd=-400+V[n].len,i.yStart=Math.ceil(Math.random()*d),i.yEnd=i.yStart),i.xStart+=V[n].animationX,i.xEnd+=V[n].animationX,e(V[n])}e(r),t()},l.timeInterval)},t}),n("zrender/loadingEffect/Ring",["require","./Base","../tool/util","../tool/color","../shape/Ring","../shape/Sector"],function(e){function t(e){n.call(this,e)}var n=e("./Base"),i=e("../tool/util"),a=e("../tool/color"),o=e("../shape/Ring"),r=e("../shape/Sector");return i.inherits(t,n),t.prototype._start=function(e,t){var n=i.merge(this.options,{textStyle:{color:"#07a"},backgroundColor:"rgba(250, 250, 250, 0.8)",effect:{x:this.canvasWidth/2,y:this.canvasHeight/2,r0:60,r:100,color:"#bbdcff",brushType:"fill",textPosition:"inside",textFont:"normal 30px verdana",textColor:"rgba(30, 144, 255, 0.6)",timeInterval:100}}),s=n.effect,l=n.textStyle;null==l.x&&(l.x=s.x),null==l.y&&(l.y=s.y+(s.r0+s.r)/2-5);for(var h=this.createTextShape(n.textStyle),m=this.createBackgroundShape(n.backgroundColor),V=s.x,U=s.y,d=s.r0+6,p=s.r-6,c=s.color,u=a.lift(c,.1),y=new o({highlightStyle:i.clone(s)}),b=[],g=a.getGradientColors(["#ff6400","#ffe100","#97ff00"],25),k=15,f=240,x=0;16>x;x++)b.push(new r({highlightStyle:{x:V,y:U,r0:d,r:p,startAngle:f-k,endAngle:f,brushType:"fill",color:u},_color:a.getLinearGradient(V+d*Math.cos(f,!0),U-d*Math.sin(f,!0),V+d*Math.cos(f-k,!0),U-d*Math.sin(f-k,!0),[[0,g[2*x]],[1,g[2*x+1]]])})),f-=k;f=360;for(var x=0;4>x;x++)b.push(new r({highlightStyle:{x:V,y:U,r0:d,r:p,startAngle:f-k,endAngle:f,brushType:"fill",color:u},_color:a.getLinearGradient(V+d*Math.cos(f,!0),U-d*Math.sin(f,!0),V+d*Math.cos(f-k,!0),U-d*Math.sin(f-k,!0),[[0,g[2*x+32]],[1,g[2*x+33]]])})),f-=k;var _=0;if(null!=n.progress){e(m),_=100*this.adjust(n.progress,[0,1]).toFixed(2)/5,y.highlightStyle.text=5*_+"%",e(y);for(var x=0;20>x;x++)b[x].highlightStyle.color=_>x?b[x]._color:u,e(b[x]);return e(h),void t()}return setInterval(function(){e(m),_+=_>=20?-20:1,e(y);for(var n=0;20>n;n++)b[n].highlightStyle.color=_>n?b[n]._color:u,e(b[n]);e(h),t()},s.timeInterval)},t}),n("zrender/loadingEffect/Spin",["require","./Base","../tool/util","../tool/color","../tool/area","../shape/Sector"],function(e){function t(e){n.call(this,e)}var n=e("./Base"),i=e("../tool/util"),a=e("../tool/color"),o=e("../tool/area"),r=e("../shape/Sector");return i.inherits(t,n),t.prototype._start=function(e,t){var n=i.merge(this.options,{textStyle:{color:"#fff",textAlign:"start"},backgroundColor:"rgba(0, 0, 0, 0.8)"}),s=this.createTextShape(n.textStyle),l=10,h=o.getTextWidth(s.highlightStyle.text,s.highlightStyle.textFont),m=o.getTextHeight(s.highlightStyle.text,s.highlightStyle.textFont),V=i.merge(this.options.effect||{},{r0:9,r:15,n:18,color:"#fff",timeInterval:100}),U=this.getLocation(this.options.textStyle,h+l+2*V.r,Math.max(2*V.r,m));V.x=U.x+V.r,V.y=s.highlightStyle.y=U.y+U.height/2,s.highlightStyle.x=V.x+V.r+l;for(var d=this.createBackgroundShape(n.backgroundColor),p=V.n,c=V.x,u=V.y,y=V.r0,b=V.r,g=V.color,k=[],f=Math.round(180/p),x=0;p>x;x++)k[x]=new r({highlightStyle:{x:c,y:u,r0:y,r:b,startAngle:f*x*2,endAngle:f*x*2+f,color:a.alpha(g,(x+1)/p),brushType:"fill"}});var _=[0,c,u];return setInterval(function(){e(d),_[0]-=.3;for(var n=0;p>n;n++)k[n].rotation=_,e(k[n]);e(s),t()},V.timeInterval)},t}),n("zrender/loadingEffect/Whirling",["require","./Base","../tool/util","../tool/area","../shape/Ring","../shape/Droplet","../shape/Circle"],function(e){function t(e){n.call(this,e)}var n=e("./Base"),i=e("../tool/util"),a=e("../tool/area"),o=e("../shape/Ring"),r=e("../shape/Droplet"),s=e("../shape/Circle");return i.inherits(t,n),t.prototype._start=function(e,t){var n=i.merge(this.options,{textStyle:{color:"#888",textAlign:"start"},backgroundColor:"rgba(250, 250, 250, 0.8)"}),l=this.createTextShape(n.textStyle),h=10,m=a.getTextWidth(l.highlightStyle.text,l.highlightStyle.textFont),V=a.getTextHeight(l.highlightStyle.text,l.highlightStyle.textFont),U=i.merge(this.options.effect||{},{r:18,colorIn:"#fff",colorOut:"#555",colorWhirl:"#6cf",timeInterval:50}),d=this.getLocation(this.options.textStyle,m+h+2*U.r,Math.max(2*U.r,V));U.x=d.x+U.r,U.y=l.highlightStyle.y=d.y+d.height/2,l.highlightStyle.x=U.x+U.r+h;var p=this.createBackgroundShape(n.backgroundColor),c=new r({highlightStyle:{a:Math.round(U.r/2),b:Math.round(U.r-U.r/6),brushType:"fill",color:U.colorWhirl}}),u=new s({highlightStyle:{r:Math.round(U.r/6),brushType:"fill",color:U.colorIn}}),y=new o({highlightStyle:{r0:Math.round(U.r-U.r/3),r:U.r,brushType:"fill",color:U.colorOut}}),b=[0,U.x,U.y];return c.highlightStyle.x=u.highlightStyle.x=y.highlightStyle.x=b[1],c.highlightStyle.y=u.highlightStyle.y=y.highlightStyle.y=b[2],setInterval(function(){e(p),e(y),b[0]-=.3,c.rotation=b,e(c),e(u),e(l),t()},U.timeInterval)},t}),n("echarts/theme/default",[],function(){var e={};return e}),n("zrender/dep/excanvas",["require"],function(){return document.createElement("canvas").getContext?G_vmlCanvasManager=!1:!function(){function e(){return this.context_||(this.context_=new k(this))}function t(e,t){var n=O.call(arguments,2);return function(){return e.apply(t,n.concat(O.call(arguments)))}}function n(e){return String(e).replace(/&/g,"&").replace(/"/g,""")}function i(e,t,n){e.namespaces[t]||e.namespaces.add(t,n,"#default#VML")}function a(e){if(i(e,"g_vml_","urn:schemas-microsoft-com:vml"),i(e,"g_o_","urn:schemas-microsoft-com:office:office"),!e.styleSheets.ex_canvas_){var t=e.createStyleSheet();t.owningElement.id="ex_canvas_",t.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}function o(e){var t=e.srcElement;switch(e.propertyName){case"width":t.getContext().clearRect(),t.style.width=t.attributes.width.nodeValue+"px",t.firstChild.style.width=t.clientWidth+"px";break;case"height":t.getContext().clearRect(),t.style.height=t.attributes.height.nodeValue+"px",t.firstChild.style.height=t.clientHeight+"px"}}function r(e){var t=e.srcElement;t.firstChild&&(t.firstChild.style.width=t.clientWidth+"px",t.firstChild.style.height=t.clientHeight+"px")}function s(){return[[1,0,0],[0,1,0],[0,0,1]]}function l(e,t){for(var n=s(),i=0;3>i;i++)for(var a=0;3>a;a++){for(var o=0,r=0;3>r;r++)o+=e[i][r]*t[r][a];n[i][a]=o}return n}function h(e,t){t.fillStyle=e.fillStyle,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.lineWidth=e.lineWidth,t.miterLimit=e.miterLimit,t.shadowBlur=e.shadowBlur,t.shadowColor=e.shadowColor,t.shadowOffsetX=e.shadowOffsetX,t.shadowOffsetY=e.shadowOffsetY,t.strokeStyle=e.strokeStyle,t.globalAlpha=e.globalAlpha,t.font=e.font,t.textAlign=e.textAlign,t.textBaseline=e.textBaseline,t.scaleX_=e.scaleX_,t.scaleY_=e.scaleY_,t.lineScale_=e.lineScale_}function m(e){var t=e.indexOf("(",3),n=e.indexOf(")",t+1),i=e.substring(t+1,n).split(",");return(4!=i.length||"a"!=e.charAt(3))&&(i[3]=1),i}function V(e){return parseFloat(e)/100}function U(e,t,n){return Math.min(n,Math.max(t,e))}function d(e){var t,n,i,a,o,r;if(a=parseFloat(e[0])/360%360,0>a&&a++,o=U(V(e[1]),0,1),r=U(V(e[2]),0,1),0==o)t=n=i=r;else{var s=.5>r?r*(1+o):r+o-r*o,l=2*r-s;t=p(l,s,a+1/3),n=p(l,s,a),i=p(l,s,a-1/3)}return"#"+D[Math.floor(255*t)]+D[Math.floor(255*n)]+D[Math.floor(255*i)]}function p(e,t,n){return 0>n&&n++,n>1&&n--,1>6*n?e+6*(t-e)*n:1>2*n?t:2>3*n?e+(t-e)*(2/3-n)*6:e}function c(e){if(e in R)return R[e];var t,n=1;if(e=String(e),"#"==e.charAt(0))t=e;else if(/^rgb/.test(e)){for(var i,a=m(e),t="#",o=0;3>o;o++)i=-1!=a[o].indexOf("%")?Math.floor(255*V(a[o])):+a[o],t+=D[U(i,0,255)];n=+a[3]}else if(/^hsl/.test(e)){var a=m(e);t=d(a),n=a[3]}else t=H[e]||e;return R[e]={color:t,alpha:n}}function u(e){if(Y[e])return Y[e];var t,n=document.createElement("div"),i=n.style;try{i.font=e,t=i.fontFamily.split(",")[0]}catch(a){}return Y[e]={style:i.fontStyle||G.style,variant:i.fontVariant||G.variant,weight:i.fontWeight||G.weight,size:i.fontSize||G.size,family:t||G.family}}function y(e,t){var n={};for(var i in e)n[i]=e[i];var a=parseFloat(t.currentStyle.fontSize),o=parseFloat(e.size);return n.size="number"==typeof e.size?e.size:-1!=e.size.indexOf("px")?o:-1!=e.size.indexOf("em")?a*o:-1!=e.size.indexOf("%")?a/100*o:-1!=e.size.indexOf("pt")?o/.75:a,n}function b(e){return e.style+" "+e.variant+" "+e.weight+" "+e.size+"px '"+e.family+"'"}function g(e){return Q[e]||"square"}function k(e){this.m_=s(),this.mStack_=[],this.aStack_=[],this.currentPath_=[],this.strokeStyle="#000",this.fillStyle="#000",this.lineWidth=1,this.lineJoin="miter",this.lineCap="butt",this.miterLimit=1*M,this.globalAlpha=1,this.font="12px 微软雅黑",this.textAlign="left",this.textBaseline="alphabetic",this.canvas=e;var t="width:"+e.clientWidth+"px;height:"+e.clientHeight+"px;overflow:hidden;position:absolute",n=e.ownerDocument.createElement("div");n.style.cssText=t,e.appendChild(n);var i=n.cloneNode(!1);i.style.backgroundColor="#fff",i.style.filter="alpha(opacity=0)",e.appendChild(i),this.element_=n,this.scaleX_=1,this.scaleY_=1,this.lineScale_=1}function f(e,t,n,i){e.currentPath_.push({type:"bezierCurveTo",cp1x:t.x,cp1y:t.y,cp2x:n.x,cp2y:n.y,x:i.x,y:i.y}),e.currentX_=i.x,e.currentY_=i.y}function x(e,t){var n=c(e.strokeStyle),i=n.color,a=n.alpha*e.globalAlpha,o=e.lineScale_*e.lineWidth;1>o&&(a*=o),t.push(" ')}function _(e,t,n,i){var a=e.fillStyle,o=e.scaleX_,r=e.scaleY_,s=i.x-n.x,l=i.y-n.y;if(a instanceof K){var h=0,m={x:0,y:0},V=0,U=1;if("gradient"==a.type_){var d=a.x0_/o,p=a.y0_/r,u=a.x1_/o,y=a.y1_/r,b=L(e,d,p),g=L(e,u,y),k=g.x-b.x,f=g.y-b.y;h=180*Math.atan2(k,f)/Math.PI,0>h&&(h+=360),1e-6>h&&(h=0)}else{var b=L(e,a.x0_,a.y0_);m={x:(b.x-n.x)/s,y:(b.y-n.y)/l},s/=o*M,l/=r*M;var x=C.max(s,l);V=2*a.r0_/x,U=2*a.r1_/x-V}var _=a.colors_;_.sort(function(e,t){return e.offset-t.offset});for(var W=_.length,X=_[0].color,I=_[W-1].color,v=_[0].alpha*e.globalAlpha,J=_[W-1].alpha*e.globalAlpha,S=[],E=0;W>E;E++){var T=_[E];S.push(T.offset*U+V+" "+T.color)}t.push(' ')}else if(a instanceof w){if(s&&l){var F=-n.x,A=-n.y;t.push(" ')}}else{var z=c(e.fillStyle),O=z.color,P=z.alpha*e.globalAlpha;t.push(' ')}}function L(e,t,n){var i=e.m_;return{x:M*(t*i[0][0]+n*i[1][0]+i[2][0])-z,y:M*(t*i[0][1]+n*i[1][1]+i[2][1])-z}}function W(e){return isFinite(e[0][0])&&isFinite(e[0][1])&&isFinite(e[1][0])&&isFinite(e[1][1])&&isFinite(e[2][0])&&isFinite(e[2][1])}function X(e,t,n){if(W(t)&&(e.m_=t,e.scaleX_=Math.sqrt(t[0][0]*t[0][0]+t[0][1]*t[0][1]),e.scaleY_=Math.sqrt(t[1][0]*t[1][0]+t[1][1]*t[1][1]),n)){var i=t[0][0]*t[1][1]-t[0][1]*t[1][0];e.lineScale_=A(F(i))}}function K(e){this.type_=e,this.x0_=0,this.y0_=0,this.r0_=0,this.x1_=0,this.y1_=0,this.r1_=0,this.colors_=[]}function w(e,t){switch(v(e),t){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=t;break;default:I("SYNTAX_ERR")}this.src_=e.src,this.width_=e.width,this.height_=e.height}function I(e){throw new J(e)}function v(e){e&&1==e.nodeType&&"IMG"==e.tagName||I("TYPE_MISMATCH_ERR"),"complete"!=e.readyState&&I("INVALID_STATE_ERR")}function J(e){this.code=this[e],this.message=e+": DOM Exception "+this.code}var C=Math,S=C.round,E=C.sin,T=C.cos,F=C.abs,A=C.sqrt,M=10,z=M/2,O=(+navigator.userAgent.match(/MSIE ([\d.]+)?/)[1],Array.prototype.slice);a(document);var P={init:function(e){var n=e||document;n.createElement("canvas"),n.attachEvent("onreadystatechange",t(this.init_,this,n))},init_:function(e){for(var t=e.getElementsByTagName("canvas"),n=0;nN;N++)for(var B=0;16>B;B++)D[16*N+B]=N.toString(16)+B.toString(16);var H={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"},R={},G={style:"normal",variant:"normal",weight:"normal",size:12,family:"微软雅黑"},Y={},Q={butt:"flat",round:"round"},q=k.prototype;q.clearRect=function(){this.textMeasureEl_&&(this.textMeasureEl_.removeNode(!0),this.textMeasureEl_=null),this.element_.innerHTML=""},q.beginPath=function(){this.currentPath_=[]},q.moveTo=function(e,t){var n=L(this,e,t);this.currentPath_.push({type:"moveTo",x:n.x,y:n.y}),this.currentX_=n.x,this.currentY_=n.y},q.lineTo=function(e,t){var n=L(this,e,t);this.currentPath_.push({type:"lineTo",x:n.x,y:n.y}),this.currentX_=n.x,this.currentY_=n.y},q.bezierCurveTo=function(e,t,n,i,a,o){var r=L(this,a,o),s=L(this,e,t),l=L(this,n,i);f(this,s,l,r)},q.quadraticCurveTo=function(e,t,n,i){var a=L(this,e,t),o=L(this,n,i),r={x:this.currentX_+2/3*(a.x-this.currentX_),y:this.currentY_+2/3*(a.y-this.currentY_)},s={x:r.x+(o.x-this.currentX_)/3,y:r.y+(o.y-this.currentY_)/3};f(this,r,s,o)},q.arc=function(e,t,n,i,a,o){n*=M;var r=o?"at":"wa",s=e+T(i)*n-z,l=t+E(i)*n-z,h=e+T(a)*n-z,m=t+E(a)*n-z;s!=h||o||(s+=.125);var V=L(this,e,t),U=L(this,s,l),d=L(this,h,m);this.currentPath_.push({type:r,x:V.x,y:V.y,radius:n,xStart:U.x,yStart:U.y,xEnd:d.x,yEnd:d.y})},q.rect=function(e,t,n,i){this.moveTo(e,t),this.lineTo(e+n,t),this.lineTo(e+n,t+i),this.lineTo(e,t+i),this.closePath()},q.strokeRect=function(e,t,n,i){var a=this.currentPath_;this.beginPath(),this.moveTo(e,t),this.lineTo(e+n,t),this.lineTo(e+n,t+i),this.lineTo(e,t+i),this.closePath(),this.stroke(),this.currentPath_=a},q.fillRect=function(e,t,n,i){var a=this.currentPath_;this.beginPath(),this.moveTo(e,t),this.lineTo(e+n,t),this.lineTo(e+n,t+i),this.lineTo(e,t+i),this.closePath(),this.fill(),this.currentPath_=a},q.createLinearGradient=function(e,t,n,i){var a=new K("gradient");return a.x0_=e,a.y0_=t,a.x1_=n,a.y1_=i,a},q.createRadialGradient=function(e,t,n,i,a,o){var r=new K("gradientradial");return r.x0_=e,r.y0_=t,r.r0_=n,r.x1_=i,r.y1_=a,r.r1_=o,r},q.drawImage=function(e){var t,n,i,a,o,r,s,l,h=e.runtimeStyle.width,m=e.runtimeStyle.height;e.runtimeStyle.width="auto",e.runtimeStyle.height="auto";var V=e.width,U=e.height;if(e.runtimeStyle.width=h,e.runtimeStyle.height=m,3==arguments.length)t=arguments[1],n=arguments[2],o=r=0,s=i=V,l=a=U;else if(5==arguments.length)t=arguments[1],n=arguments[2],i=arguments[3],a=arguments[4],o=r=0,s=V,l=U;else{if(9!=arguments.length)throw Error("Invalid number of arguments");o=arguments[1],r=arguments[2],s=arguments[3],l=arguments[4],t=arguments[5],n=arguments[6],i=arguments[7],a=arguments[8]}var d=L(this,t,n),p=[],c=10,u=10,y=g=1;if(p.push(" '),(o||r)&&p.push('
'+(t[0]||this._lang[0])+"
",this._textArea.style.cssText="display:block;margin:0 0 8px 0;padding:4px 6px;overflow:auto;width:"+(this._zrWidth-15)+"px;height:"+(this._zrHeight-100)+"px;";var n=this.query(this.option,"toolbox.feature.dataView.optionToContent");this._textArea.value="function"!=typeof n?this._optionToContent():n(this.option),this._tDom.appendChild(this._textArea),this._buttonClose.style.cssText="float:right;padding:1px 6px;",this._buttonClose.innerHTML=t[1]||this._lang[1];var i=this;this._buttonClose.onclick=function(){i.hide()},this._tDom.appendChild(this._buttonClose),this.query(this.option,"toolbox.feature.dataView.readOnly")===!1?(this._buttonRefresh.style.cssText="float:right;margin-right:10px;padding:1px 6px;",this._buttonRefresh.innerHTML=t[2]||this._lang[2],this._buttonRefresh.onclick=function(){i._save()},this._tDom.appendChild(this._buttonRefresh),this._textArea.readOnly=!1,this._textArea.style.cursor="default"):(this._textArea.readOnly=!0,this._textArea.style.cursor="text"),this._sizeCssText="width:"+this._zrWidth+"px;height:"+this._zrHeight+"px;background-color:#fff;",this._tDom.style.cssText=this._gCssText+this._sizeCssText},_optionToContent:function(){var e,t,n,a,o,r,s=[],l="";if(this.option.xAxis)for(s=this.option.xAxis instanceof Array?this.option.xAxis:[this.option.xAxis],e=0,a=s.length;a>e;e++)if("category"==(s[e].type||"category")){for(r=[],t=0,n=s[e].data.length;n>t;t++)o=s[e].data[t],r.push("undefined"!=typeof o.value?o.value:o);l+=r.join(", ")+"\n\n"}if(this.option.yAxis)for(s=this.option.yAxis instanceof Array?this.option.yAxis:[this.option.yAxis],e=0,a=s.length;a>e;e++)if("category"==s[e].type){for(r=[],t=0,n=s[e].data.length;n>t;t++)o=s[e].data[t],r.push("undefined"!=typeof o.value?o.value:o);l+=r.join(", ")+"\n\n"}var h,m=this.option.series;for(e=0,a=m.length;a>e;e++){for(r=[],t=0,n=m[e].data.length;n>t;t++)o=m[e].data[t],h=m[e].type==i.CHART_TYPE_PIE||m[e].type==i.CHART_TYPE_MAP?(o.name||"-")+":":"",m[e].type==i.CHART_TYPE_SCATTER&&(o="undefined"!=typeof o.value?o.value:o,o=o.join(", ")),r.push(h+("undefined"!=typeof o.value?o.value:o));l+=(m[e].name||"-")+" : \n",l+=r.join(m[e].type==i.CHART_TYPE_SCATTER?"\n":", "),l+="\n\n"}return l},_save:function(){var e=this._textArea.value,t=this.query(this.option,"toolbox.feature.dataView.contentToOption");if("function"!=typeof t){e=e.split("\n");for(var n=[],a=0,o=e.length;o>a;a++)e[a]=this._trim(e[a]),""!==e[a]&&n.push(e[a]);this._contentToOption(n)}else t(e,this.option);this.hide();var r=this;setTimeout(function(){r.messageCenter&&r.messageCenter.dispatch(i.EVENT.DATA_VIEW_CHANGED,null,{option:r.option},r.myChart)},r.canvasSupported?800:100)},_contentToOption:function(e){var t,n,a,o,r,s,l,h=[],m=0;if(this.option.xAxis)for(h=this.option.xAxis instanceof Array?this.option.xAxis:[this.option.xAxis],t=0,o=h.length;o>t;t++)if("category"==(h[t].type||"category")){for(s=e[m].split(","),n=0,a=h[t].data.length;a>n;n++)l=this._trim(s[n]||""),r=h[t].data[n],"undefined"!=typeof h[t].data[n].value?h[t].data[n].value=l:h[t].data[n]=l;m++}if(this.option.yAxis)for(h=this.option.yAxis instanceof Array?this.option.yAxis:[this.option.yAxis],t=0,o=h.length;o>t;t++)if("category"==h[t].type){for(s=e[m].split(","),n=0,a=h[t].data.length;a>n;n++)l=this._trim(s[n]||""),r=h[t].data[n],"undefined"!=typeof h[t].data[n].value?h[t].data[n].value=l:h[t].data[n]=l;m++}var V=this.option.series;for(t=0,o=V.length;o>t;t++)if(m++,V[t].type==i.CHART_TYPE_SCATTER)for(var n=0,a=V[t].data.length;a>n;n++)s=e[m],l=s.replace(" ","").split(","),"undefined"!=typeof V[t].data[n].value?V[t].data[n].value=l:V[t].data[n]=l,m++;else{s=e[m].split(",");for(var n=0,a=V[t].data.length;a>n;n++)l=(s[n]||"").replace(/.*:/,""),l=this._trim(l),l="-"!=l&&""!==l?l-0:"-","undefined"!=typeof V[t].data[n].value?V[t].data[n].value=l:V[t].data[n]=l;m++}},_trim:function(e){var t=new RegExp("(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+$)","g");return e.replace(t,"")},_stop:function(e){e=e||window.event,e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},resize:function(){this._zrHeight=this.zr.getHeight(),this._zrWidth=this.zr.getWidth(),this._tDom.offsetHeight>10&&(this._sizeCssText="width:"+this._zrWidth+"px;height:"+this._zrHeight+"px;background-color:#fff;",this._tDom.style.cssText=this._gCssText+this._sizeCssText,this._textArea.style.cssText="display:block;margin:0 0 8px 0;padding:4px 6px;overflow:auto;width:"+(this._zrWidth-15)+"px;height:"+(this._zrHeight-100)+"px;")},dispose:function(){window.removeEventListener?(this._tDom.removeEventListener("click",this._stop),this._tDom.removeEventListener("mousewheel",this._stop),this._tDom.removeEventListener("mousemove",this._stop),this._tDom.removeEventListener("mousedown",this._stop),this._tDom.removeEventListener("mouseup",this._stop),this._tDom.removeEventListener("touchstart",this._stop),this._tDom.removeEventListener("touchmove",this._stop),this._tDom.removeEventListener("touchend",this._stop)):(this._tDom.detachEvent("onclick",this._stop),this._tDom.detachEvent("onmousewheel",this._stop),this._tDom.detachEvent("onmousemove",this._stop),this._tDom.detachEvent("onmousedown",this._stop),this._tDom.detachEvent("onmouseup",this._stop)),this._buttonRefresh.onclick=null,this._buttonClose.onclick=null,this._hasShow&&(this._tDom.removeChild(this._textArea),this._tDom.removeChild(this._buttonRefresh),this._tDom.removeChild(this._buttonClose)),this._textArea=null,this._buttonRefresh=null,this._buttonClose=null,this.dom.firstChild.removeChild(this._tDom),this._tDom=null}},a.inherits(t,n),e("../component").define("dataView",t),t}),n("echarts/util/shape/Cross",["require","zrender/shape/Base","zrender/shape/Line","zrender/tool/util","./normalIsCover"],function(e){function t(e){n.call(this,e)}var n=e("zrender/shape/Base"),i=e("zrender/shape/Line"),a=e("zrender/tool/util");return t.prototype={type:"cross",buildPath:function(e,t){var n=t.rect;t.xStart=n.x,t.xEnd=n.x+n.width,t.yStart=t.yEnd=t.y,i.prototype.buildPath(e,t),t.xStart=t.xEnd=t.x,t.yStart=n.y,t.yEnd=n.y+n.height,i.prototype.buildPath(e,t)},getRect:function(e){return e.rect},isCover:e("./normalIsCover")},a.inherits(t,n),t}),n("zrender/shape/Sector",["require","../tool/math","../tool/computeBoundingBox","../tool/vector","./Base","../tool/util"],function(e){var t=e("../tool/math"),n=e("../tool/computeBoundingBox"),i=e("../tool/vector"),a=e("./Base"),o=i.create(),r=i.create(),s=i.create(),l=i.create(),h=function(e){a.call(this,e)};return h.prototype={type:"sector",buildPath:function(e,n){var i=n.x,a=n.y,o=n.r0||0,r=n.r,s=n.startAngle,l=n.endAngle,h=n.clockWise||!1;s=t.degreeToRadian(s),l=t.degreeToRadian(l),h||(s=-s,l=-l);var m=t.cos(s),V=t.sin(s);e.moveTo(m*o+i,V*o+a),e.lineTo(m*r+i,V*r+a),e.arc(i,a,r,s,l,!h),e.lineTo(t.cos(l)*o+i,t.sin(l)*o+a),0!==o&&e.arc(i,a,o,l,s,h),e.closePath()},getRect:function(e){if(e.__rect)return e.__rect;var a=e.x,h=e.y,m=e.r0||0,V=e.r,U=t.degreeToRadian(e.startAngle),d=t.degreeToRadian(e.endAngle),p=e.clockWise;return p||(U=-U,d=-d),m>1?n.arc(a,h,m,U,d,!p,o,s):(o[0]=s[0]=a,o[1]=s[1]=h),n.arc(a,h,V,U,d,!p,r,l),i.min(o,o,r),i.max(s,s,l),e.__rect={x:o[0],y:o[1],width:s[0]-o[0],height:s[1]-o[1]},e.__rect}},e("../tool/util").inherits(h,a),h}),n("echarts/util/shape/Candle",["require","zrender/shape/Base","zrender/tool/util","./normalIsCover"],function(e){function t(e){n.call(this,e)}var n=e("zrender/shape/Base"),i=e("zrender/tool/util");return t.prototype={type:"candle",_numberOrder:function(e,t){return t-e},buildPath:function(e,t){var n=i.clone(t.y).sort(this._numberOrder);e.moveTo(t.x,n[3]),e.lineTo(t.x,n[2]),e.moveTo(t.x-t.width/2,n[2]),e.rect(t.x-t.width/2,n[2],t.width,n[1]-n[2]),e.moveTo(t.x,n[1]),e.lineTo(t.x,n[0])},getRect:function(e){if(!e.__rect){var t=0;("stroke"==e.brushType||"fill"==e.brushType)&&(t=e.lineWidth||1);var n=i.clone(e.y).sort(this._numberOrder);e.__rect={x:Math.round(e.x-e.width/2-t/2),y:Math.round(n[3]-t/2),width:e.width+t,height:n[0]-n[3]+t}}return e.__rect},isCover:e("./normalIsCover")},i.inherits(t,n),t}),n("zrender/tool/computeBoundingBox",["require","./vector","./curve"],function(e){function t(e,t,n){if(0!==e.length){for(var i=e[0][0],a=e[0][0],o=e[0][1],r=e[0][1],s=1;s