// Copyright 2006 Google Inc. // http://www.apache.org/licenses/LICENSE-2.0 // (c) 2010-2013 Thomas Fuchs // Zepto.js may be freely distributed under the MIT license. /*! * ZRender, a high performance canvas library. * * Copyright (c) 2013, Baidu Inc. * All rights reserved. * * LICENSE * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt */ /*! * ECharts, a javascript interactive chart library. * * Copyright (c) 2014, Baidu Inc. * All rights reserved. * * LICENSE * https://github.com/ecomfe/echarts/blob/master/LICENSE.txt */ define("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",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:{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:{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,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:["Data View","close","refresh"]},magicType:{show:!1,title:{line:"鎶樼嚎鍥惧垏鎹�",bar:"鏌卞舰鍥惧垏鎹�",stack:"鍫嗙Н",tiled:"骞抽摵"},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)",realtime:!0},grid:{x:80,y:60,x2:80,y2:60,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},categoryAxis:{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:{position:"left",name:"",nameLocation:"end",nameTextStyle:{},boundaryGap:[0,0],precision:0,power:100,splitNumber:5,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,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:!1,x:"left",y:"top",width:80,height:120,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,handlerColor:"#6495ed",fillerColor:"#fff",step:15,mapTypeControl:null},bar:{clickable:!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,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,xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{color:"#fff",color0:"#00aa11",lineStyle:{width:1,color:"#ff3200",color0:"#00aa11"}},emphasis:{}}},scatter:{clickable:!0,xAxisIndex:0,yAxisIndex:0,symbolSize:4,large:!1,largeThreshold:2e3,itemStyle:{normal:{label:{show:!1,formatter:function(e,t,n){return typeof n[2]!="undefined"?n[2]:n[0]+" , "+n[1]}}},emphasis:{label:{show:!1,formatter:function(e,t,n){return typeof n[2]!="undefined"?n[2]:n[0]+" , "+n[1]}}}}},radar:{clickable:!0,polarIndex:0,itemStyle:{normal:{label:{show:!1},lineStyle:{width:2,type:"solid"}},emphasis:{label:{show:!1}}},symbolSize:2},pie:{clickable:!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,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%",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,categories:[{}],itemStyle:{normal:{label:{show:!1},nodeStyle:{brushType:"both",color:"#f08c2e",strokeColor:"#5182ab",lineWidth:1},linkStyle:{strokeColor:"#5182ab"}},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,showScale:!1,showScaleText:!1,itemStyle:{normal:{label:{show:!0,rotate:!1,distance:10},lineStyle:{width:0,color:"#000"},chordStyle:{lineStyle:{width:1,color:"#999"}}},emphasis:{lineStyle:{width:0,color:"#000"},chordStyle:{lineStyle:{width:1,color:"#666"}}}},matrix:[]},gauge:{center:["50%","50%"],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,x:80,y:60,x2:80,y2:60,min:0,max:100,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,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}}}},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",LEGEND_SELECTED:"legendSelected",MAP_SELECTED:"mapSelected",PIE_SELECTED:"pieSelected",MAGIC_TYPE_CHANGED:"magicTypeChanged",DATA_VIEW_CHANGED:"dataViewChanged",TIMELINE_CHANGED:"timelineChanged",MAP_ROAM:"mapRoam",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}),define("zrender/dep/excanvas",["require"],function(e){return document.createElement("canvas").getContext?G_vmlCanvasManager=!1:function(){function f(){return this.context_||(this.context_=new I(this))}function c(e,t,n){var r=l.call(arguments,2);return function(){return e.apply(t,r.concat(l.call(arguments)))}}function h(e){return String(e).replace(/&/g,"&").replace(/"/g,""")}function p(e,t,n){e.namespaces[t]||e.namespaces.add(t,n,"#default#VML")}function d(e){p(e,"g_vml_","urn:schemas-microsoft-com:vml"),p(e,"g_o_","urn:schemas-microsoft-com:office:office");if(!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 m(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 g(e){var t=e.srcElement;t.firstChild&&(t.firstChild.style.width=t.clientWidth+"px",t.firstChild.style.height=t.clientHeight+"px")}function E(){return[[1,0,0],[0,1,0],[0,0,1]]}function S(e,t){var n=E();for(var r=0;r<3;r++)for(var i=0;i<3;i++){var s=0;for(var o=0;o<3;o++)s+=e[r][o]*t[o][i];n[r][i]=s}return n}function x(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.arcScaleX_=e.arcScaleX_,t.arcScaleY_=e.arcScaleY_,t.lineScale_=e.lineScale_}function N(e){var t=e.indexOf("(",3),n=e.indexOf(")",t+1),r=e.substring(t+1,n).split(",");if(r.length!=4||e.charAt(3)!="a")r[3]=1;return r}function C(e){return parseFloat(e)/100}function k(e,t,n){return Math.min(n,Math.max(t,e))}function L(e){var t,n,r,i,s,o;i=parseFloat(e[0])/360%360,i<0&&i++,s=k(C(e[1]),0,1),o=k(C(e[2]),0,1);if(s==0)t=n=r=o;else{var u=o<.5?o*(1+s):o+s-o*s,a=2*o-u;t=A(a,u,i+1/3),n=A(a,u,i),r=A(a,u,i-1/3)}return"#"+y[Math.floor(t*255)]+y[Math.floor(n*255)]+y[Math.floor(r*255)]}function A(e,t,n){return n<0&&n++,n>1&&n--,6*n<1?e+(t-e)*6*n:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function M(e){if(e in O)return O[e];var t,n=1;e=String(e);if(e.charAt(0)=="#")t=e;else if(/^rgb/.test(e)){var r=N(e),t="#",i;for(var s=0;s<3;s++)r[s].indexOf("%")!=-1?i=Math.floor(C(r[s])*255):i=+r[s],t+=y[k(i,0,255)];n=+r[3]}else if(/^hsl/.test(e)){var r=N(e);t=L(r),n=r[3]}else t=T[e]||e;return O[e]={color:t,alpha:n}}function P(e){if(D[e])return D[e];var t=document.createElement("div"),n=t.style,r;try{n.font=e,r=n.fontFamily.split(",")[0]}catch(i){}return D[e]={style:n.fontStyle||_.style,variant:n.fontVariant||_.variant,weight:n.fontWeight||_.weight,size:n.fontSize||_.size,family:r||_.family}}function H(e,t){var n={};for(var r in e)n[r]=e[r];var i=parseFloat(t.currentStyle.fontSize),s=parseFloat(e.size);return typeof e.size=="number"?n.size=e.size:e.size.indexOf("px")!=-1?n.size=s:e.size.indexOf("em")!=-1?n.size=i*s:e.size.indexOf("%")!=-1?n.size=i/100*s:e.size.indexOf("pt")!=-1?n.size=s/.75:n.size=i,n}function B(e){return e.style+" "+e.variant+" "+e.weight+" "+e.size+"px '"+e.family+"'"}function F(e){return j[e]||"square"}function I(e){this.m_=E(),this.mStack_=[],this.aStack_=[],this.currentPath_=[],this.strokeStyle="#000",this.fillStyle="#000",this.lineWidth=1,this.lineJoin="miter",this.lineCap="butt",this.miterLimit=o*1,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 r=n.cloneNode(!1);r.style.backgroundColor="#fff",r.style.filter="alpha(opacity=0)",e.appendChild(r),this.element_=n,this.arcScaleX_=1,this.arcScaleY_=1,this.lineScale_=1}function R(e,t,n,r){e.currentPath_.push({type:"bezierCurveTo",cp1x:t.x,cp1y:t.y,cp2x:n.x,cp2y:n.y,x:r.x,y:r.y}),e.currentX_=r.x,e.currentY_=r.y}function U(e,t){var n=M(e.strokeStyle),r=n.color,i=n.alpha*e.globalAlpha,s=e.lineScale_*e.lineWidth;s<1&&(i*=s),t.push("')}function z(t,n,r,i){var s=t.fillStyle,u=t.arcScaleX_,a=t.arcScaleY_,f=i.x-r.x,l=i.y-r.y;if(s instanceof $){var c=0,h={x:0,y:0},p=0,d=1;if(s.type_=="gradient"){var v=s.x0_/u,m=s.y0_/a,g=s.x1_/u,y=s.y1_/a,b=W(t,v,m),w=W(t,g,y),E=w.x-b.x,S=w.y-b.y;c=Math.atan2(E,S)*180/Math.PI,c<0&&(c+=360),c<1e-6&&(c=0)}else{var b=W(t,s.x0_,s.y0_);h={x:(b.x-r.x)/f,y:(b.y-r.y)/l},f/=u*o,l/=a*o;var x=e.max(f,l);p=2*s.r0_/x,d=2*s.r1_/x-p}var T=s.colors_;T.sort(function(e,t){return e.offset-t.offset});var N=T.length,C=T[0].color,k=T[N-1].color,L=T[0].alpha*t.globalAlpha,A=T[N-1].alpha*t.globalAlpha,O=[];for(var _=0;_')}else if(s instanceof J){if(f&&l){var P=-r.x,H=-r.y;n.push("')}}else{var B=M(t.fillStyle),j=B.color,F=B.alpha*t.globalAlpha;n.push('')}}function W(e,t,n){var r=e.m_;return{x:o*(t*r[0][0]+n*r[1][0]+r[2][0])-u,y:o*(t*r[0][1]+n*r[1][1]+r[2][1])-u}}function X(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 V(e,t,n){if(!X(t))return;e.m_=t;if(n){var r=t[0][0]*t[1][1]-t[0][1]*t[1][0];e.lineScale_=s(i(r))}}function $(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 J(e,t){Q(e);switch(t){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=t;break;default:K("SYNTAX_ERR")}this.src_=e.src,this.width_=e.width,this.height_=e.height}function K(e){throw new G(e)}function Q(e){(!e||e.nodeType!=1||e.tagName!="IMG")&&K("TYPE_MISMATCH_ERR"),e.readyState!="complete"&&K("INVALID_STATE_ERR")}function G(e){this.code=this[e],this.message=e+": DOM Exception "+this.code}var e=Math,t=e.round,n=e.sin,r=e.cos,i=e.abs,s=e.sqrt,o=10,u=o/2,a=+navigator.userAgent.match(/MSIE ([\d.]+)?/)[1],l=Array.prototype.slice;d(document);var v={init:function(e){var t=e||document;t.createElement("canvas"),t.attachEvent("onreadystatechange",c(this.init_,this,t))},init_:function(e){var t=e.getElementsByTagName("canvas");for(var n=0;n'),(f||l)&&w.push('
'),w.push('
'),(f||l)&&w.push("
"),w.push("
"),this.element_.insertAdjacentHTML("BeforeEnd",w.join(""))},q.stroke=function(e){var n=[],r=!1,i=10,s=10;n.push("f.x)f.x=c.x;if(a.y==null||c.yf.y)f.y=c.y}}n.push(' ">'),e?z(this,n,a,f):U(this,n),n.push(""),this.element_.insertAdjacentHTML("beforeEnd",n.join(""))},q.fill=function(){this.stroke(!0)},q.closePath=function(){this.currentPath_.push({type:"close"})},q.save=function(){var e={};x(this,e),this.aStack_.push(e),this.mStack_.push(this.m_),this.m_=S(E(),this.m_)},q.restore=function(){this.aStack_.length&&(x(this.aStack_.pop(),this),this.m_=this.mStack_.pop())},q.translate=function(e,t){var n=[[1,0,0],[0,1,0],[e,t,1]];V(this,S(n,this.m_),!1)},q.rotate=function(e){var t=r(e),i=n(e),s=[[t,i,0],[-i,t,0],[0,0,1]];V(this,S(s,this.m_),!1)},q.scale=function(e,t){this.arcScaleX_*=e,this.arcScaleY_*=t;var n=[[e,0,0],[0,t,0],[0,0,1]];V(this,S(n,this.m_),!0)},q.transform=function(e,t,n,r,i,s){var o=[[e,t,0],[n,r,0],[i,s,1]];V(this,S(o,this.m_),!0)},q.setTransform=function(e,t,n,r,i,s){var o=[[e,t,0],[n,r,0],[i,s,1]];V(this,o,!0)},q.drawText_=function(e,n,r,i,s){var u=this.m_,a=1e3,f=0,l=a,c={x:0,y:0},p=[],d=H(P(this.font),this.element_),v=B(d),m=this.element_.currentStyle,g=this.textAlign.toLowerCase();switch(g){case"left":case"center":case"right":break;case"end":g=m.direction=="ltr"?"right":"left";break;case"start":g=m.direction=="rtl"?"right":"left";break;default:g="left"}switch(this.textBaseline){case"hanging":case"top":c.y=d.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":c.y=-d.size/2.25}switch(g){case"right":f=a,l=.05;break;case"center":f=l=a/2}var y=W(this,n+c.x,r+c.y);p.push(''),s?U(this,p):z(this,p,{x:-f,y:0},{x:l,y:d.size});var b=u[0][0].toFixed(3)+","+u[1][0].toFixed(3)+","+u[0][1].toFixed(3)+","+u[1][1].toFixed(3)+",0,0",w=t(y.x/o)+","+t(y.y/o);p.push('','',''),this.element_.insertAdjacentHTML("beforeEnd",p.join(""))},q.fillText=function(e,t,n,r){this.drawText_(e,t,n,r,!1)},q.strokeText=function(e,t,n,r){this.drawText_(e,t,n,r,!0)},q.measureText=function(e){if(!this.textMeasureEl_){var t='';this.element_.insertAdjacentHTML("beforeEnd",t),this.textMeasureEl_=this.element_.lastChild}var n=this.element_.ownerDocument;return this.textMeasureEl_.innerHTML="",this.textMeasureEl_.style.font=this.font,this.textMeasureEl_.appendChild(n.createTextNode(e)),{width:this.textMeasureEl_.offsetWidth}},q.clip=function(){},q.arcTo=function(){},q.createPattern=function(e,t){return new J(e,t)},$.prototype.addColorStop=function(e,t){t=M(t),this.colors_.push({offset:e,color:t.color,alpha:t.alpha})};var Y=G.prototype=new Error;Y.INDEX_SIZE_ERR=1,Y.DOMSTRING_SIZE_ERR=2,Y.HIERARCHY_REQUEST_ERR=3,Y.WRONG_DOCUMENT_ERR=4,Y.INVALID_CHARACTER_ERR=5,Y.NO_DATA_ALLOWED_ERR=6,Y.NO_MODIFICATION_ALLOWED_ERR=7,Y.NOT_FOUND_ERR=8,Y.NOT_SUPPORTED_ERR=9,Y.INUSE_ATTRIBUTE_ERR=10,Y.INVALID_STATE_ERR=11,Y.SYNTAX_ERR=12,Y.INVALID_MODIFICATION_ERR=13,Y.NAMESPACE_ERR=14,Y.INVALID_ACCESS_ERR=15,Y.VALIDATION_ERR=16,Y.TYPE_MISMATCH_ERR=17,G_vmlCanvasManager=v,CanvasRenderingContext2D=I,CanvasGradient=$,CanvasPattern=J,DOMException=G}(),G_vmlCanvasManager}),define("zrender/tool/util",["require","../dep/excanvas"],function(e){function n(e){if(typeof e=="object"&&e!==null){var r=e;if(e instanceof Array){r=[];for(var i=0,s=e.length;if&&(f=e+c+n,u.width=f,r=!0),t+h>l&&(l=t+h+n,u.height=l,r=!0),e<-c&&(c=Math.ceil(-e/n)*n,f+=c,u.width=f,r=!0),t<-h&&(h=Math.ceil(-t/n)*n,l+=h,u.height=l,r=!0),r&&a.translate(c,h)}function v(){return{x:c,y:h}}function m(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n3&&(t=Array.prototype.slice.call(t,1));var r=this._handlers[e],i=r.length;for(var s=0;s4&&(t=Array.prototype.slice.call(t,1,t.length-1));var r=t[t.length-1],i=this._handlers[e],s=i.length;for(var o=0;o1)for(var e in arguments)console.log(arguments[e])}}),define("zrender/tool/guid",[],function(){var e=2311;return function(){return"zrender__"+e++}}),define("zrender/tool/vector",[],function(){var e=typeof Float32Array=="undefined"?Array:Float32Array,t={create:function(t,n){var r=new e(2);return r[0]=t||0,r[1]=n||0,r},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e},set:function(e,t,n){return e[0]=t,e[1]=n,e},add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e},scaleAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e},sub:function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e},len:function(e){return Math.sqrt(this.lenSquare(e))},lenSquare:function(e){return e[0]*e[0]+e[1]*e[1]},mul:function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e},div:function(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e},dot:function(e,t){return e[0]*t[0]+e[1]*t[1]},scale:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e},normalize:function(e,n){var r=t.len(n);return r===0?(e[0]=0,e[1]=0):(e[0]=n[0]/r,e[1]=n[1]/r),e},distance:function(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))},distanceSquare:function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])},negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e},lerp:function(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e},applyTransform:function(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e},max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}};return t.length=t.len,t.lengthSquare=t.lenSquare,t.dist=t.distance,t.distSquare=t.distanceSquare,t}),define("zrender/tool/matrix",[],function(){var e=typeof Float32Array=="undefined"?Array:Float32Array,t={create:function(){var n=new e(6);return t.identity(n),n},identity:function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e},mul:function(e,t,n){return e[0]=t[0]*n[0]+t[2]*n[1],e[1]=t[1]*n[0]+t[3]*n[1],e[2]=t[0]*n[2]+t[2]*n[3],e[3]=t[1]*n[2]+t[3]*n[3],e[4]=t[0]*n[4]+t[2]*n[5]+t[4],e[5]=t[1]*n[4]+t[3]*n[5]+t[5],e},translate:function(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e},rotate:function(e,t,n){var r=t[0],i=t[2],s=t[4],o=t[1],u=t[3],a=t[5],f=Math.sin(n),l=Math.cos(n);return e[0]=r*l+o*f,e[1]=-r*f+o*l,e[2]=i*l+u*f,e[3]=-i*f+l*u,e[4]=l*s+f*a,e[5]=l*a-f*s,e},scale:function(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e},invert:function(e,t){var n=t[0],r=t[2],i=t[4],s=t[1],o=t[3],u=t[5],a=n*o-s*r;return a?(a=1/a,e[0]=o*a,e[1]=-s*a,e[2]=-r*a,e[3]=n*a,e[4]=(r*u-o*i)*a,e[5]=(s*i-n*u)*a,e):null},mulVector:function(e,t,n){var r=t[0],i=t[2],s=t[4],o=t[1],u=t[3],a=t[5];return e[0]=n[0]*r+n[1]*i+s,e[1]=n[0]*o+n[1]*u+a,e}};return t}),define("zrender/Handler",["require","./config","./tool/env","./tool/event","./tool/util","./tool/vector","./tool/matrix","./mixin/Eventful"],function(e){function c(e,t){return function(n){return e.call(t,n)}}function h(e,t){return function(n,r,i){return e.call(t,n,r,i)}}function p(e){var t=f.length;while(t--){var n=f[t];e["_"+n+"Handler"]=c(l[n],e)}}function m(e,t,n){if(this._draggingTarget&&this._draggingTarget.id==e.id||e.isSilent())return!1;var r=this._event;if(e.isCover(t,n)){e.hoverable&&this.storage.addHover(e);var i=e.parent;while(i){if(i.clipShape&&!i.clipShape.isCover(this._mouseX,this._mouseY))return!1;i=i.parent}return this._lastHover!=e&&(this._processOutShape(r),this._processDragLeave(r),this._lastHover=e,this._processDragEnter(r)),this._processOverShape(r),this._processDragOver(r),this._hasfound=1,!0}return!1}var t=e("./config"),n=e("./tool/env"),r=e("./tool/event"),i=e("./tool/util"),s=e("./tool/vector"),o=e("./tool/matrix"),u=t.EVENT,a=e("./mixin/Eventful"),f=["resize","click","dblclick","mousewheel","mousemove","mouseout","mouseup","mousedown","touchstart","touchend","touchmove"],l={resize:function(e){e=e||window.event,this._lastHover=null,this._isMouseDown=0,this.dispatch(u.RESIZE,e)},click:function(e){e=this._zrenderEventFixed(e);var t=this._lastHover;(t&&t.clickable||!t)&&this._dispatchAgency(t,u.CLICK,e),this._mousemoveHandler(e)},dblclick:function(e){e=this._zrenderEventFixed(e);var t=this._lastHover;(t&&t.clickable||!t)&&this._dispatchAgency(t,u.DBLCLICK,e),this._mousemoveHandler(e)},mousewheel:function(e){e=this._zrenderEventFixed(e);var t=e.wheelDelta||-e.detail,n=t>0?1.1:1/1.1,r=this.painter.getLayers(),i=!1;for(var s in r)if(s!=="hover"){var o=r[s],a=o.position;if(o.zoomable){o.__zoom=o.__zoom||1;var f=o.__zoom;f*=n,f=Math.max(Math.min(o.maxZoom,f),o.minZoom),n=f/o.__zoom,o.__zoom=f,a[0]-=(this._mouseX-a[0])*(n-1),a[1]-=(this._mouseY-a[1])*(n-1),o.scale[0]*=n,o.scale[1]*=n,o.dirty=!0,i=!0}}i&&this.painter.refresh(),this._dispatchAgency(this._lastHover,u.MOUSEWHEEL,e),this._mousemoveHandler(e)},mousemove:function(e){if(this.painter.isLoading())return;e=this._zrenderEventFixed(e),this._lastX=this._mouseX,this._lastY=this._mouseY,this._mouseX=r.getX(e),this._mouseY=r.getY(e);var t=this._mouseX-this._lastX,n=this._mouseY-this._lastY;this._processDragStart(e),this._hasfound=0,this._event=e,this._iterateAndFindHover();if(!this._hasfound){if(!this._draggingTarget||this._lastHover&&this._lastHover!=this._draggingTarget)this._processOutShape(e),this._processDragLeave(e);this._lastHover=null,this.storage.delHover(),this.painter.clearHover()}var i="default";if(this._draggingTarget)this.storage.drift(this._draggingTarget.id,t,n),this.storage.addHover(this._draggingTarget);else if(this._isMouseDown){var s=this.painter.getLayers(),o=!1;for(var a in s)if(a!=="hover"){var f=s[a];f.panable&&(i="move",f.position[0]+=t,f.position[1]+=n,o=!0,f.dirty=!0)}o&&this.painter.refresh()}this._draggingTarget||this._hasfound&&this._lastHover.draggable?i="move":this._hasfound&&this._lastHover.clickable&&(i="pointer"),this.root.style.cursor=i,this._dispatchAgency(this._lastHover,u.MOUSEMOVE,e),(this._draggingTarget||this._hasfound||this.storage.hasHoverShape())&&this.painter.refreshHover()},mouseout:function(e){e=this._zrenderEventFixed(e);var t=e.toElement||e.relatedTarget;if(t!=this.root)while(t&&t.nodeType!=9){if(t==this.root){this._mousemoveHandler(e);return}t=t.parentNode}e.zrenderX=this._lastX,e.zrenderY=this._lastY,this.root.style.cursor="default",this._isMouseDown=0,this._processOutShape(e),this._processDrop(e),this._processDragEnd(e),this.painter.isLoading()||this.painter.refreshHover(),this.dispatch(u.GLOBALOUT,e)},mousedown:function(e){if(this._lastDownButton==2){this._lastDownButton=e.button,this._mouseDownTarget=null;return}this._lastMouseDownMoment=new Date,e=this._zrenderEventFixed(e),this._isMouseDown=1,this._mouseDownTarget=this._lastHover,this._dispatchAgency(this._lastHover,u.MOUSEDOWN,e),this._lastDownButton=e.button},mouseup:function(e){e=this._zrenderEventFixed(e),this.root.style.cursor="default",this._isMouseDown=0,this._mouseDownTarget=null,this._dispatchAgency(this._lastHover,u.MOUSEUP,e),this._processDrop(e),this._processDragEnd(e)},touchstart:function(e){e=this._zrenderEventFixed(e,!0),this._lastTouchMoment=new Date,this._mobildFindFixed(e),this._mousedownHandler(e)},touchmove:function(e){e=this._zrenderEventFixed(e,!0),this._mousemoveHandler(e),this._isDragging&&r.stop(e)},touchend:function(e){e=this._zrenderEventFixed(e,!0),this._mouseupHandler(e);var t=new Date;t-this._lastTouchMoment=0;u--){var a=t[u];n!==a.zlevel&&(r=this.painter.getLayer(a.zlevel,r),i[0]=this._mouseX,i[1]=this._mouseY,r.needTransform&&(o.invert(e,r.transform),s.applyTransform(i,i,e)));if(this._findHover(a,i[0],i[1]))break}}}();var v=[{x:10},{x:-20},{x:10,y:10},{y:-20}];return d.prototype._mobildFindFixed=function(e){this._lastHover=null,this._mouseX=e.zrenderX,this._mouseY=e.zrenderY,this._event=e,this._iterateAndFindHover();for(var t=0;!this._lastHover&&t-n&&en||e<-n}function l(e,t,n,r,i){var s=1-i;return s*s*(s*e+3*i*t)+i*i*(i*r+3*s*n)}function c(e,t,n,r,i){var s=1-i;return 3*(((t-e)*s+2*(n-t)*i)*s+(r-n)*i*i)}function h(e,t,n,s,o,u){var f=s+3*(t-n)-e,l=3*(n-t*2+e),c=3*(t-e),h=e-o,p=l*l-3*f*c,d=l*c-9*f*h,v=c*c-3*l*h,m=0;if(a(p)&&a(d))if(a(l))u[0]=0;else{var g=-c/l;g>=0&&g<=1&&(u[m++]=g)}else{var y=d*d-4*p*v;if(a(y)){var b=d/p,g=-l/f+b,w=-b/2;g>=0&&g<=1&&(u[m++]=g),w>=0&&w<=1&&(u[m++]=w)}else if(y>0){var E=Math.sqrt(y),S=p*l+1.5*f*(-d+E),x=p*l+1.5*f*(-d-E);S<0?S=-Math.pow(-S,i):S=Math.pow(S,i),x<0?x=-Math.pow(-x,i):x=Math.pow(x,i);var g=(-l-(S+x))/(3*f);g>=0&&g<=1&&(u[m++]=g)}else{var T=(2*p*l-3*f*d)/(2*Math.sqrt(p*p*p)),N=Math.acos(T)/3,C=Math.sqrt(p),k=Math.cos(N),g=(-l-2*C*k)/(3*f),w=(-l+C*(k+r*Math.sin(N)))/(3*f),L=(-l+C*(k-r*Math.sin(N)))/(3*f);g>=0&&g<=1&&(u[m++]=g),w>=0&&w<=1&&(u[m++]=w),L>=0&&L<=1&&(u[m++]=L)}}return m}function p(e,t,n,r,i){var s=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,u=3*t-3*e,l=0;if(a(o)){if(f(s)){var c=-u/s;c>=0&&c<=1&&(i[l++]=c)}}else{var h=s*s-4*o*u;if(a(h))i[0]=-s/(2*o);else if(h>0){var p=Math.sqrt(h),c=(-s+p)/(2*o),d=(-s-p)/(2*o);c>=0&&c<=1&&(i[l++]=c),d>=0&&d<=1&&(i[l++]=d)}}return l}function d(e,t,n,r,i,s){var o=(t-e)*i+e,u=(n-t)*i+t,a=(r-n)*i+n,f=(u-o)*i+o,l=(a-u)*i+u,c=(l-f)*i+f;s[0]=e,s[1]=o,s[2]=f,s[3]=c,s[4]=c,s[5]=l,s[6]=a,s[7]=r}function v(e,r,i,a,f,c,h,p,d,v,m){var g,y=.005,b=Infinity;s[0]=d,s[1]=v;for(var w=0;w<1;w+=.05){o[0]=l(e,i,f,h,w),o[1]=l(r,a,c,p,w);var E=t.distSquare(s,o);E=0&&E=0&&c<=1&&(i[l++]=c)}}else{var h=o*o-4*s*u;if(a(h)){var c=-o/(2*s);c>=0&&c<=1&&(i[l++]=c)}else if(h>0){var p=Math.sqrt(h),c=(-o+p)/(2*s),d=(-o-p)/(2*s);c>=0&&c<=1&&(i[l++]=c),d>=0&&d<=1&&(i[l++]=d)}}return l}function b(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function w(e,r,i,a,f,l,c,h,p){var d,v=.005,g=Infinity;s[0]=c,s[1]=h;for(var y=0;y<1;y+=.05){o[0]=m(e,i,f,y),o[1]=m(r,a,l,y);var b=t.distSquare(s,o);b=0&&bt+u&&o>r+u||oe+u&&s>n+u||st+h&&c>i+h&&c>o+h&&c>a+h||ce+h&&l>r+h&&l>s+h&&l>u+h||lt+l&&f>i+l&&f>o+l||fe+l&&a>r+l&&a>s+l||an||h+ci&&(i+=f);var p=Math.atan2(a,u);return p<0&&(p+=f),p>=r&&p<=i||p+f>=r&&p+f<=i}function b(e,t,n,r){var t=Math.max(t,10);for(var i=0,s=e.length-1;in*n}function E(e,t,n,r,i,s){return i>=e&&i<=e+n&&s>=t&&s<=t+r}function S(e,t,n,r,i){return(r-e)*(r-e)+(i-t)*(i-t)=360)return!0;var r=(360-Math.atan2(n-e.y,t-e.x)/Math.PI*180)%360,i=(360+e.endAngle)%360,s=(360+e.startAngle)%360;return i>s?r>=s&&r<=i:!(r>=i&&r<=s)}function T(e,t,n){var r=e.length,i=0;for(var s=0,o=r-1;st&&s>r||si?o:0}function L(){var e=k[0];k[0]=k[1],k[1]=e}function A(e,t,r,i,s,o,u,a,f,l){if(l>t&&l>i&&l>o&&l>a||l1&&L(),d=n.cubicAt(t,i,o,a,k[0]),p>1&&(v=n.cubicAt(t,i,o,a,k[1]))),p==2?gt&&a>i&&a>o||a=0&&l<=1){var c=0,h=n.quadraticAt(t,i,o,l);for(var p=0;pu)continue;C[p]u?0:on||u<-n)return 0;var a=Math.sqrt(n*n-u*u);C[0]=-a,C[1]=a,s?(r=l(i),i=l(r)):(r=l(r),i=l(i)),r>i&&(i+=f);var c=0;for(var h=0;h<2;h++){var p=C[h];if(p+e>o){var d=Math.atan2(u,p),v=s?1:-1;d<0&&(d=f+d);if(d>=r&&d<=i||d+f>=r&&d+f<=i)d>Math.PI/2&&d0){h&&(s+=N(o,u,a,f,r,i));if(s!==0)return!0}a=b[b.length-2],f=b[b.length-1],l=!1}switch(d.command){case"M":o=b[0],u=b[1];break;case"L":if(c&&v(o,u,b[0],b[1],t,r,i))return!0;h&&(s+=N(o,u,b[0],b[1],r,i)),o=b[0],u=b[1];break;case"C":if(c&&m(o,u,b[0],b[1],b[2],b[3],b[4],b[5],t,r,i))return!0;h&&(s+=A(o,u,b[0],b[1],b[2],b[3],b[4],b[5],r,i)),o=b[4],u=b[5];break;case"Q":if(c&&g(o,u,b[0],b[1],b[2],b[3],t,r,i))return!0;h&&(s+=O(o,u,b[0],b[1],b[2],b[3],r,i)),o=b[2],u=b[3];break;case"A":var w=b[0],E=b[1],S=b[2],x=b[3],T=b[4],C=b[5],k=Math.cos(T)*S+w,L=Math.sin(T)*x+E;s+=N(o,u,k,L);var _=(r-w)*x/S+w;if(c&&y(w,E,x,T,T+C,1-b[7],t,_,i))return!0;h&&(s+=M(w,E,x,T,T+C,1-b[7],_,i)),o=Math.cos(T+C)*S+w,u=Math.sin(T+C)*x+E;break;case"z":if(c&&v(o,u,a,f,t,r,i))return!0;l=!0}}return h&&(s+=N(o,u,a,f,r,i)),s!==0}function D(e,n){var s=e+":"+n;if(i[s])return i[s];r=r||t.getContext(),r.save(),n&&(r.font=n),e=(e+"").split("\n");var u=0;for(var f=0,l=e.length;fa&&(o=0,i={}),u}function P(e,n){var i=e+":"+n;if(s[i])return s[i];r=r||t.getContext(),r.save(),n&&(r.font=n),e=(e+"").split("\n");var o=(r.measureText("鍥�").width+2)*e.length;return r.restore(),s[i]=o,++u>a&&(u=0,s={}),o}var t=e("./util"),n=e("./curve"),r,i={},s={},o=0,u=0,a=5e3,f=Math.PI*2,C=[-1,-1,-1],k=[-1,-1];return{isInside:c,isOutside:d,getTextWidth:D,getTextHeight:P,isInsidePath:_,isInsidePolygon:T,isInsideSector:x,isInsideCircle:S,isInsideLine:v,isInsideRect:E,isInsideBrokenLine:b}}),define("zrender/mixin/Transformable",["require","../tool/matrix","../tool/vector"],function(e){function s(e){return e>-i&&ei||e<-i}var t=e("../tool/matrix"),n=e("../tool/vector"),r=[0,0],i=5e-5,u=function(){this.position||(this.position=[0,0]),typeof this.rotation=="undefined"&&(this.rotation=[0,0,0]),this.scale||(this.scale=[1,1,0,0]),this.needLocalTransform=!1,this.needTransform=!1};return u.prototype={constructor:u,updateNeedTransform:function(){this.needLocalTransform=o(this.rotation[0])||o(this.position[0])||o(this.position[1])||o(this.scale[0]-1)||o(this.scale[1]-1)},updateTransform:function(){this.updateNeedTransform(),this.parent?this.needTransform=this.needLocalTransform||this.parent.needTransform:this.needTransform=this.needLocalTransform;if(!this.needTransform)return;var e=this.transform||t.create();t.identity(e);if(this.needLocalTransform){if(o(this.scale[0])||o(this.scale[1])){r[0]=-this.scale[2]||0,r[1]=-this.scale[3]||0;var n=o(r[0])||o(r[1]);n&&t.translate(e,e,r),t.scale(e,e,this.scale),n&&(r[0]=-r[0],r[1]=-r[1],t.translate(e,e,r))}if(this.rotation instanceof Array){if(this.rotation[0]!==0){r[0]=-this.rotation[1]||0,r[1]=-this.rotation[2]||0;var n=o(r[0])||o(r[1]);n&&t.translate(e,e,r),t.rotate(e,e,this.rotation[0]),n&&(r[0]=-r[0],r[1]=-r[1],t.translate(e,e,r))}}else this.rotation!==0&&t.rotate(e,e,this.rotation);(o(this.position[0])||o(this.position[1]))&&t.translate(e,e,this.position)}this.transform=e,this.parent&&this.parent.needTransform&&(this.needLocalTransform?t.mul(this.transform,this.parent.transform,this.transform):t.copy(this.transform,this.parent.transform))},setTransform:function(e){if(this.needTransform){var t=this.transform;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}},lookAt:function(){var e=n.create();return function(r){this.transform||(this.transform=t.create());var i=this.transform;n.sub(e,r,this.position);if(s(e[0])&&s(e[1]))return;n.normalize(e,e),i[2]=e[0]*this.scale[1],i[3]=e[1]*this.scale[1],i[0]=e[1]*this.scale[0],i[1]=-e[0]*this.scale[0],i[4]=this.position[0],i[5]=this.position[1],this.decomposeTransform()}}(),decomposeTransform:function(){if(!this.transform)return;var e=this.transform,t=e[0]*e[0]+e[1]*e[1],n=this.position,r=this.scale,i=this.rotation;o(t-1)&&(t=Math.sqrt(t));var s=e[2]*e[2]+e[3]*e[3];o(s-1)&&(s=Math.sqrt(s)),n[0]=e[4],n[1]=e[5],r[0]=t,r[1]=s,r[2]=r[3]=0,i[0]=Math.atan2(-e[1]/s,e[0]/t),i[1]=i[2]=0}},u}),define("zrender/tool/color",["require","../tool/util"],function(e){function f(e){r=e}function l(){r=i}function c(e,t){return e|=0,t=t||r,t[e%t.length]}function h(e){s=e}function p(){o=s}function d(){return s}function v(e,r,i,s,o,u,a){n||(n=t.getContext());var f=n.createRadialGradient(e,r,i,s,o,u);for(var l=0,c=a.length;l1)for(var i=0,s=r-1;i1?Math.ceil(e):e});if(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=q(e.slice(1,3),function(e){return e+"%"});e[1]=n[0],e[2]=n[1]}return t.indexOf("a")>-1?(e.length===3&&e.push(1),e[3]=R(e[3],[0,1]),t+"("+e.slice(0,4).join(",")+")"):t+"("+e.slice(0,3).join(",")+")"}}function w(e){e=_(e),e.indexOf("rgba")<0&&(e=S(e));var t=[],n=0;return e.replace(/[\d.]+/g,function(e){n<3?e|=0:e=+e,t[n++]=e}),t}function E(e,t){var n=F(e),r=n[3];return typeof r=="undefined"&&(r=1),e.indexOf("hsb")>-1?n=U(n):e.indexOf("hsl")>-1&&(n=z(n)),t.indexOf("hsb")>-1||t.indexOf("hsv")>-1?n=X(n):t.indexOf("hsl")>-1&&(n=V(n)),n[3]=r,b(n,t)}function S(e){return E(e,"rgba")}function x(e){return E(e,"rgb")}function T(e){return E(e,"hex")}function N(e){return E(e,"hsva")}function C(e){return E(e,"hsv")}function k(e){return E(e,"hsba")}function L(e){return E(e,"hsb")}function A(e){return E(e,"hsla")}function O(e){return E(e,"hsl")}function M(e){for(var t in a)if(T(a[t])===T(e))return t;return null}function _(e){return String(e).replace(/\s+/g,"")}function D(e){a[e]&&(e=a[e]),e=_(e),e=e.replace(/hsv/i,"hsb");if(/^#[\da-f]{3}$/i.test(e)){e=parseInt(e.slice(1),16);var t=(e&3840)<<8,n=(e&240)<<4,r=e&15;e="#"+((1<<24)+(t<<4)+t+(n<<4)+n+(r<<4)+r).toString(16).slice(1)}return e}function P(e,t){var n=t>0?1:-1;typeof t=="undefined"&&(t=0),t=Math.abs(t)>1?1:Math.abs(t),e=x(e);var r=F(e);for(var i=0;i<3;i++)n===1?r[i]=r[i]*(1-t)|0:r[i]=(255-r[i])*t+r[i]|0;return"rgb("+r.join(",")+")"}function H(e){var t=F(S(e));return t=q(t,function(e){return 255-e}),b(t,"rgb")}function B(e,t,n){typeof n=="undefined"&&(n=.5),n=1-R(n,[0,1]);var r=n*2-1,i=F(S(e)),s=F(S(t)),o=i[3]-s[3],u=((r*o===-1?r:(r+o)/(1+r*o))+1)/2,a=1-u,f=[];for(var l=0;l<3;l++)f[l]=i[l]*u+s[l]*a;var c=i[3]*n+s[3]*(1-n);return c=Math.max(0,Math.min(1,c)),i[3]===1&&s[3]===1?b(f,"rgb"):(f[3]=c,b(f,"rgba"))}function j(){return"#"+Math.random().toString(16).slice(2,8)}function F(e){e=D(e);var t=e.match(u);if(t===null)throw new Error("The color format error");var n,r,i=[],s;if(t[2])n=t[2].replace("#","").split(""),s=[n[0]+n[1],n[2]+n[3],n[4]+n[5]],i=q(s,function(e){return R(parseInt(e,16),[0,255])});else if(t[4]){var o=t[4].split(",");r=o[3],s=o.slice(0,3),i=q(s,function(e){return e=Math.floor(e.indexOf("%")>0?parseInt(e,0)*2.55:e),R(e,[0,255])}),typeof r!="undefined"&&i.push(R(parseFloat(r),[0,1]))}else if(t[5]||t[6]){var a=(t[5]||t[6]).split(","),f=parseInt(a[0],0)/360,l=a[1],c=a[2];r=a[3],i=q([l,c],function(e){return R(parseFloat(e)/100,[0,1])}),i.unshift(f),typeof r!="undefined"&&i.push(R(parseFloat(r),[0,1]))}return i}function I(e,t){t===null&&(t=1);var n=F(S(e));return n[3]=R(Number(t).toFixed(4),[0,1]),b(n,"rgba")}function q(e,t){if(typeof t!="function")throw new TypeError;var n=e?e.length:0;for(var r=0;r=t[1]&&(e=t[1]),e}function U(e){var t=e[0],n=e[1],r=e[2],i,s,o;if(n===0)i=r*255,s=r*255,o=r*255;else{var u=t*6;u===6&&(u=0);var a=u|0,f=r*(1-n),l=r*(1-n*(u-a)),c=r*(1-n*(1-(u-a))),h=0,p=0,d=0;a===0?(h=r,p=c,d=f):a===1?(h=l,p=r,d=f):a===2?(h=f,p=r,d=c):a===3?(h=f,p=l,d=r):a===4?(h=c,p=f,d=r):(h=r,p=f,d=l),i=h*255,s=p*255,o=d*255}return[i,s,o]}function z(e){var t=e[0],n=e[1],r=e[2],i,s,o;if(n===0)i=r*255,s=r*255,o=r*255;else{var u;r<.5?u=r*(1+n):u=r+n-n*r;var a=2*r-u;i=255*W(a,u,t+1/3),s=255*W(a,u,t),o=255*W(a,u,t-1/3)}return[i,s,o]}function W(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),6*n<1?e+(t-e)*6*n:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function X(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),s=Math.max(t,n,r),o=s-i,u=s,a,f;if(o===0)a=0,f=0;else{f=o/s;var l=((s-t)/6+o/2)/o,c=((s-n)/6+o/2)/o,h=((s-r)/6+o/2)/o;t===s?a=h-c:n===s?a=1/3+l-h:r===s&&(a=2/3+c-l),a<0&&(a+=1),a>1&&(a-=1)}return a*=360,f*=100,u*=100,[a,f,u]}function V(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),s=Math.max(t,n,r),o=s-i,u=(s+i)/2,a,f;if(o===0)a=0,f=0;else{u<.5?f=o/(s+i):f=o/(2-s-i);var l=((s-t)/6+o/2)/o,c=((s-n)/6+o/2)/o,h=((s-r)/6+o/2)/o;t===s?a=h-c:n===s?a=1/3+l-h:r===s&&(a=2/3+c-l),a<0&&(a+=1),a>1&&(a-=1)}return a*=360,f*=100,u*=100,[a,f,u]}var t=e("../tool/util"),n,r=["#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"],i=r,s="rgba(255,255,0,0.5)",o=s,u=/^\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,a={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:f,resetPalette:l,getColor:c,getHighlightColor:d,customHighlight:h,resetHighlight:p,getRadialGradient:v,getLinearGradient:m,getGradientColors:y,getStepColors:g,reverse:H,mix:B,lift:P,trim:_,random:j,toRGB:x,toRGBA:S,toHex:T,toHSL:O,toHSLA:A,toHSB:L,toHSBA:k,toHSV:C,toHSVA:N,toName:M,toColor:b,toArray:w,alpha:I,getData:F}}),define("zrender/shape/Base",["require","../tool/matrix","../tool/guid","../tool/util","../tool/log","../mixin/Transformable","../mixin/Eventful","../tool/area","../tool/area","../tool/color","../tool/area"],function(e){function u(t,n,r,i,s,o,u){s&&(t.font=s),t.textAlign=o,t.textBaseline=u;var f=a(n,r,i,s,o,u);n=(n+"").split("\n");var l=e("../tool/area").getTextHeight("鍥�",s);switch(u){case"top":i=f.y;break;case"bottom":i=f.y+l;break;default:i=f.y+l/2}for(var c=0,h=n.length;c0&&e.stroke();break;default:e.fill()}this.drawText(e,n,this.style),e.restore()};var l=[["color","fillStyle"],["strokeColor","strokeStyle"],["opacity","globalAlpha"],["lineCap","lineCap"],["lineJoin","lineJoin"],["miterLimit","miterLimit"],["lineWidth","lineWidth"],["shadowBlur","shadowBlur"],["shadowColor","shadowColor"],["shadowOffsetX","shadowOffsetX"],["shadowOffsetY","shadowOffsetY"]];return f.prototype.setContext=function(e,t){for(var n=0,r=l.length;n=i.x&&t<=i.x+i.width&&n>=i.y&&n<=i.y+i.height?e("../tool/area").isInside(this,this.style,t,n):!1},f.prototype.drawText=function(e,t,n){if(typeof t.text=="undefined"||t.text===!1)return;var r=t.textColor||t.color||t.strokeColor;e.fillStyle=r;var i=10,s,o,a,f,l=t.textPosition||this.textPosition||"top";switch(l){case"inside":case"top":case"bottom":case"left":case"right":if(this.getRect){var c=(n||t).__rect||this.getRect(n||t);switch(l){case"inside":a=c.x+c.width/2,f=c.y+c.height/2,s="center",o="middle",t.brushType!="stroke"&&r==t.color&&(e.fillStyle="#fff");break;case"left":a=c.x-i,f=c.y+c.height/2,s="end",o="middle";break;case"right":a=c.x+c.width+i,f=c.y+c.height/2,s="start",o="middle";break;case"top":a=c.x+c.width/2,f=c.y-i,s="center",o="bottom";break;case"bottom":a=c.x+c.width/2,f=c.y+c.height+i,s="center",o="top"}}break;case"start":case"end":var h,p,d,v;if(typeof t.pointList!="undefined"){var m=t.pointList;if(m.length<2)return;var g=m.length;switch(l){case"start":h=m[0][0],p=m[1][0],d=m[0][1],v=m[1][1];break;case"end":h=m[g-2][0],p=m[g-1][0],d=m[g-2][1],v=m[g-1][1]}}else h=t.xStart||0,p=t.xEnd||0,d=t.yStart||0,v=t.yEnd||0;switch(l){case"start":s=hi&&(c=u+a,u*=i/c,a*=i/c),f+l>i&&(c=f+l,f*=i/c,l*=i/c),a+f>s&&(c=a+f,a*=s/c,f*=s/c),u+l>s&&(c=u+l,u*=s/c,l*=s/c),e.moveTo(n+u,r),e.lineTo(n+i-a,r),a!==0&&e.quadraticCurveTo(n+i,r,n+i,r+a),e.lineTo(n+i,r+s-f),f!==0&&e.quadraticCurveTo(n+i,r+s,n+i-f,r+s),e.lineTo(n+l,r+s),l!==0&&e.quadraticCurveTo(n,r+s,n,r+s-l),e.lineTo(n,r+u),u!==0&&e.quadraticCurveTo(n,r,n+u,r)},buildPath:function(e,t){t.radius?this._buildRadiusPath(e,t):(e.moveTo(t.x,t.y),e.lineTo(t.x+t.width,t.y),e.lineTo(t.x+t.width,t.y+t.height),e.lineTo(t.x,t.y+t.height),e.lineTo(t.x,t.y)),e.closePath();return},getRect:function(e){if(e.__rect)return e.__rect;var t;return e.brushType=="stroke"||e.brushType=="fill"?t=e.lineWidth||1:t=0,e.__rect={x:Math.round(e.x-t/2),y:Math.round(e.y-t/2),width:e.width+t,height:e.height+t},e.__rect}},e("../tool/util").inherits(n,t),n}),define("zrender/loadingEffect/Base",["require","../tool/util","../shape/Text","../shape/Rectangle"],function(e){function o(e){this.setOptions(e)}var t=e("../tool/util"),n=e("../shape/Text"),r=e("../shape/Rectangle"),i="Loading...",s="normal 16px Arial";return o.prototype.createTextShape=function(e){return new n({highlightStyle:t.merge({x:this.canvasWidth/2,y:this.canvasHeight/2,text:i,textAlign:"center",textBaseline:"middle",textFont:s,color:"#333",brushType:"fill"},e,!0)})},o.prototype.createBackgroundShape=function(e){return new r({highlightStyle:{x:0,y:0,width:this.canvasWidth,height:this.canvasHeight,brushType:"fill",color:e}})},o.prototype.start=function(e){function t(t){e.storage.addHover(t)}function n(){e.refreshHover()}this.canvasWidth=e._width,this.canvasHeight=e._height,this.loadingTimer=this._start(t,n)},o.prototype._start=function(){return setInterval(function(){},1e4)},o.prototype.stop=function(){clearInterval(this.loadingTimer)},o.prototype.setOptions=function(e){this.options=e||{}},o.prototype.adjust=function(e,t){return e<=t[0]?e=t[0]:e>=t[1]&&(e=t[1]),e},o.prototype.getLocation=function(e,t,n){var r=e.x!=null?e.x:"center";switch(r){case"center":r=Math.floor((this.canvasWidth-t)/2);break;case"left":r=0;break;case"right":r=this.canvasWidth-t}var i=e.y!=null?e.y:"center";switch(i){case"center":i=Math.floor((this.canvasHeight-n)/2);break;case"top":i=0;break;case"bottom":i=this.canvasHeight-n}return{x:r,y:i,width:t,height:n}},o}),define("zrender/shape/Image",["require","./Base","../tool/util"],function(e){var t=[],n,r=e("./Base"),i=function(e){r.call(this,e),this._imageCache={}};return i.prototype={type:"image",brush:function(e,r,i){var s=this.style||{};r&&(s=this.getHighlightStyle(s,this.highlightStyle||{}));var o=s.image,u=this;if(typeof o=="string"){var a=o;this._imageCache[a]?o=this._imageCache[a]:(o=new Image,o.onload=function(){o.onload=null,clearTimeout(n),t.push(u),n=setTimeout(function(){i&&i(t),t=[]},10)},o.src=a,this._imageCache[a]=o)}if(o){if(o.nodeName.toUpperCase()=="IMG")if(window.ActiveXObject){if(o.readyState!="complete")return}else if(!o.complete)return;var f=s.width||o.width,l=s.height||o.height,c=s.x,h=s.y;if(!o.width||!o.height)return;e.save(),this.setContext(e,s),this.setTransform(e);if(s.sWidth&&s.sHeight){var p=s.sx||0,d=s.sy||0;e.drawImage(o,p,d,s.sWidth,s.sHeight,c,h,f,l)}else if(s.sx&&s.sy){var p=s.sx,d=s.sy,v=f-p,m=l-d;e.drawImage(o,p,d,v,m,c,h,f,l)}else e.drawImage(o,c,h,f,l);s.width||(s.width=f),s.height||(s.height=l),this.style.width||(this.style.width=f),this.style.height||(this.style.height=l),this.drawText(e,s,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(i,r),i}),define("zrender/Painter",["require","./config","./tool/util","./tool/log","./tool/matrix","./loadingEffect/Base","./mixin/Transformable","./shape/Image"],function(e){function f(){return!1}function l(){}function h(e,t,n){var r=document.createElement(t),i=n._width,s=n._height;return r.style.position="absolute",r.style.left=0,r.style.top=0,r.style.width=i+"px",r.style.height=s+"px",r.setAttribute("width",i*u),r.setAttribute("height",s*u),r.setAttribute("data-zr-dom-id",e),r}var t=e("./config"),n=e("./tool/util"),r=e("./tool/log"),i=e("./tool/matrix"),s=e("./loadingEffect/Base"),o=e("./mixin/Transformable"),u=window.devicePixelRatio||1;u=Math.max(u,1);var a=window.G_vmlCanvasManager,c=function(e,t){this.root=e,this.storage=t,e.innerHTML="",this._width=this._getWidth(),this._height=this._getHeight();var n=document.createElement("div");this._domRoot=n,n.style.position="relative",n.style.overflow="hidden",n.style.width=this._width+"px",n.style.height=this._height+"px",e.appendChild(n),this._layers={},this._layerConfig={},this._loadingEffect=new s({}),this.shapeToImage=this._createShapeToImageProcessor(),this._bgDom=h("bg","div",this),n.appendChild(this._bgDom),this._bgDom.onselectstart=f,this._bgDom.style["-webkit-user-select"]="none",this._bgDom.style["user-select"]="none";var r=new p("_zrender_hover_",this);this._layers.hover=r,n.appendChild(r.dom),r.initContext(),r.dom.onselectstart=f,r.dom.style["-webkit-user-select"]="none",r.dom.style["user-select"]="none";var i=this;this.updatePainter=function(e,t){i.refreshShapes(e,t)}};c.prototype.render=function(e){return this.isLoading()&&this.hideLoading(),this.refresh(e,!0),this},c.prototype.refresh=function(e,t){var n=this.storage.getShapeList(!0);return this._paintList(n,t),typeof e=="function"&&e(),this},c.prototype._paintList=function(e,n){typeof n=="undefined"&&(n=!1),this._updateLayerStatus(e);var s,o,u;for(var f in this._layers)f!=="hover"&&(this._layers[f].unusedCount++,this._layers[f].updateTransform());var l=[];for(var c=0,h=e.length;c0},s.prototype.addRoot=function(e){e instanceof n&&e.addChildrenToStorage(this),this.addToMap(e),this._roots.push(e)},s.prototype.delRoot=function(e){if(typeof e=="undefined"){for(var r=0;r=0&&(this.delFromMap(o.id),this._roots.splice(u,1),o instanceof n&&o.delChildrenFromStorage(this))},s.prototype.addToMap=function(e){return e instanceof n&&(e._storage=this),e.modSelf(),this._elements[e.id]=e,this},s.prototype.get=function(e){return this._elements[e]},s.prototype.delFromMap=function(e){var t=this._elements[e];return t&&(delete this._elements[e],t instanceof n&&(t._storage=null)),this},s.prototype.dispose=function(){this._elements=this._renderList=this._roots=this._hoverElements=null},s}),define("zrender/animation/easing",[],function(){var e={Linear:function(e){return e},QuadraticIn:function(e){return e*e},QuadraticOut:function(e){return e*(2-e)},QuadraticInOut:function(e){return(e*=2)<1?.5*e*e:-0.5*(--e*(e-2)-1)},CubicIn:function(e){return e*e*e},CubicOut:function(e){return--e*e*e+1},CubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},QuarticIn:function(e){return e*e*e*e},QuarticOut:function(e){return 1- --e*e*e*e},QuarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-0.5*((e-=2)*e*e*e-2)},QuinticIn:function(e){return e*e*e*e*e},QuinticOut:function(e){return--e*e*e*e*e+1},QuinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},SinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},SinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},SinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},ExponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},ExponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},ExponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},CircularIn:function(e){return 1-Math.sqrt(1-e*e)},CircularOut:function(e){return Math.sqrt(1- --e*e)},CircularInOut:function(e){return(e*=2)<1?-0.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},ElasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*2*Math.PI/r)))},ElasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*2*Math.PI/r)+1)},ElasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-0.5*n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*2*Math.PI/r):n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*2*Math.PI/r)*.5+1)},BackIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},BackOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},BackInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*e*e*((t+1)*e-t):.5*((e-=2)*e*((t+1)*e+t)+2)},BounceIn:function(t){return 1-e.BounceOut(1-t)},BounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},BounceInOut:function(t){return t<.5?e.BounceIn(t*2)*.5:e.BounceOut(t*2-1)*.5+.5}};return e}),define("zrender/animation/Clip",["require","./easing"],function(e){function n(e){this._targetPool=e.target||{},this._targetPool instanceof Array||(this._targetPool=[this._targetPool]),this._life=e.life||1e3,this._delay=e.delay||0,this._startTime=(new Date).getTime()+this._delay,this._endTime=this._startTime+this._life*1e3,this.loop=typeof e.loop=="undefined"?!1:e.loop,this.gap=e.gap||0,this.easing=e.easing||"Linear",this.onframe=e.onframe,this.ondestroy=e.ondestroy,this.onrestart=e.onrestart}var t=e("./easing");return n.prototype={step:function(e){var n=(e-this._startTime)/this._life;if(n<0)return;n=Math.min(n,1);var r=typeof this.easing=="string"?t[this.easing]:this.easing,i=typeof r=="function"?r(n):n;return this.fire("frame",i),n==1?this.loop?(this.restart(),"restart"):(this._needsRemove=!0,"destroy"):null},restart:function(){var e=(new Date).getTime(),t=(e-this._startTime)%this._life;this._startTime=(new Date).getTime()-t+this.gap},fire:function(e,t){for(var n=0,r=this._targetPool.length;n=0&&this._clips.splice(t,1)},_update:function(){var e=(new Date).getTime(),t=e-this._time,n=this._clips,r=n.length,i=[],s=[];for(var o=0;o=0;N--)if(x[N]<=t)break;N=Math.min(N,g-2)}else{for(N=k;Nt)break;N=Math.min(N-1,g-2)}k=N,L=t;var n=x[N+1]-x[N];if(n===0)return;O=(t-x[N])/n;if(u){_=T[N],M=T[N===0?N:N-1],D=T[N>g-2?g-1:N+1],P=T[N>g-3?g-1:N+2];if(b)p(M,_,D,P,O,O*O,O*O*O,s(e,v),E);else{var a;w?(a=p(M,_,D,P,O,O*O,O*O*O,H,1),a=m(H)):a=d(M,_,D,P,O,O*O,O*O*O),i(e,v,a)}}else if(b)c(T[N],T[N+1],O,s(e,v),E);else{var a;w?(c(T[N],T[N+1],O,H,1),a=m(H)):a=l(T[N],T[N+1],O),i(e,v,a)}for(N=0;N1?"."+e[1]:""))}return{parsePercent:t,parseCenter:n,parseRadius:r,addCommas:i}}),define("echarts/component/base",["require","../config","../util/ecQuery","../util/number","zrender/tool/util","zrender/tool/env"],function(e){function s(e,t,n,r,i){this.ecTheme=e,this.messageCenter=t,this.zr=n,this.option=r,this.series=r.series,this.myChart=i,this.component=i.component,this._zlevelBase=this.getZlevelBase(),this.shapeList=[],this.effectList=[];var s=this;s.hoverConnect=function(e){var t=(e.target||{}).hoverConnect;if(t){var n=10,r;if(t instanceof Array)for(var i=0,o=t.length;i4?a*r(2*i/s)/r(i/s):a/3);var l=i/s,c=-i/2,h=o+a*r(c),p=u+a*n(c);c+=l;var d=t.pointList=[];d.push([h,p]);for(var v=0,m=s*2-1,g;v=r.x-i&&e<=r.x+r.width+i&&t>=r.y-i&&t<=r.y+r.height+i?!0:!1}},t.inherits(C,N),C}),define("zrender/shape/util/dashedLineTo",[],function(){var e=[5,5];return function(t,n,r,i,s,o){if(t.setLineDash){e[0]=e[1]=o,t.setLineDash(e),t.moveTo(n,r),t.lineTo(i,s);return}o=typeof o!="number"?5:o;var u=i-n,a=s-r,f=Math.floor(Math.sqrt(u*u+a*a)/o);u/=f,a/=f;var l=!0;for(var c=0;cs-2?s-1:c+1],m=e[c>s-3?s-1:c+2]);var g=h*h,y=h*g;o.push([n(p[0],d[0],v[0],m[0],h,g,y),n(p[1],d[1],v[1],m[1],h,g,y)])}return o}}),define("zrender/shape/util/smoothBezier",["require","../../tool/vector"],function(e){var t=e("../../tool/vector");return function(e,n,r,i){var s=[],o=[],u=[],a=[],f,l,c=!!i,h,p;if(c){h=[Infinity,Infinity],p=[-Infinity,-Infinity];for(var d=0,v=e.length;d0&&(n.brushType=="stroke"||n.brushType=="both")&&(r||(e.beginPath(),this.buildPath(e,n)),e.stroke()),this.drawText(e,n,this.style),e.restore();return},buildPath:function(e,t){var s=t.pointList;if(s.length<2)return;if(t.smooth&&t.smooth!=="spline"){var o=r(s,t.smooth,!0,t.smoothConstraint);e.moveTo(s[0][0],s[0][1]);var u,a,f,l=s.length;for(var c=0;cn&&(n=s[o][0]),s[o][1]i&&(i=s[o][1]);var a;return e.brushType=="stroke"||e.brushType=="fill"?a=e.lineWidth||1:a=0,e.__rect={x:Math.round(t-a/2),y:Math.round(r-a/2),width:n-t+a,height:i-r+a},e.__rect}},e("../tool/util").inherits(s,t),s}),define("zrender/shape/BrokenLine",["require","./Base","./util/smoothSpline","./util/smoothBezier","./util/dashedLineTo","./Polygon","../tool/util"],function(e){var t=e("./Base"),n=e("./util/smoothSpline"),r=e("./util/smoothBezier"),i=e("./util/dashedLineTo"),s=function(e){this.brushTypeOnly="stroke",this.textPosition="end",t.call(this,e)};return s.prototype={type:"broken-line",buildPath:function(e,t){var s=t.pointList;if(s.length<2)return;var o=Math.min(t.pointList.length,Math.round(t.pointListLength||t.pointList.length));if(t.smooth&&t.smooth!=="spline"){var u=r(s,t.smooth,!1,t.smoothConstraint);e.moveTo(s[0][0],s[0][1]);var a,f,l;for(var c=0;cs?a>u?l=Math.PI*2-l+f:l+=f:a>u?l+=Math.PI-f:l=Math.PI-l-f:s>o?u>a?l=Math.PI*2-l+f:l+=f:u>a?l+=Math.PI-f:l=Math.PI-l-f;var c=Math.PI/8,h=n===0?s:o,p=n===0?u:a,d=[[h+i*Math.cos(l-c),p-i*Math.sin(l-c)],[h+i*.6*Math.cos(l),p-i*.6*Math.sin(l)],[h+i*Math.cos(l+c),p-i*Math.sin(l+c)]];e.moveTo(h,p);for(var v=0,m=d.length;v=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height?this.style.smooth!=="spline"?a.isInside(i,this.style,e,t):a.isInside(o,this.style,e,t):!1}},c.inherits(h,t),h}),define("echarts/util/shape/normalIsCover",[],function(){return function(e,t){var n=this.getTansform(e,t);e=n[0],t=n[1];var r=this.style.__rect;return r||(r=this.style.__rect=this.getRect(this.style)),e>=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height}}),define("echarts/util/shape/Symbol",["require","zrender/shape/Base","zrender/shape/Polygon","zrender/tool/util","./normalIsCover"],function(e){function s(e){t.call(this,e)}var t=e("zrender/shape/Base"),n=e("zrender/shape/Polygon"),r=new n({}),i=e("zrender/tool/util");return s.prototype={type:"symbol",buildPath:function(e,t){var n=t.pointList,r=n.length;if(r===0)return;var i=1e4,s=Math.ceil(r/i),o,u,a=n[0]instanceof Array,f=t.size?t.size:2,l=f,c=f/2,h=Math.PI*2,p,d,v;for(var m=0;mr?r:u;for(var g=o;g0&&e.stroke();break;case"stroke":t.lineWidth>0&&e.stroke();break;default:e.fill()}}},getRect:function(e){return e.__rect||r.getRect(e)},isCover:e("./normalIsCover")},i.inherits(s,t),s}),define("echarts/util/ecData",[],function(){function e(e,t,n,r,i,s,o,u){var a;return typeof r!="undefined"&&(a=r.value==null?r:r.value),e._echartsData={_series:t,_seriesIndex:n,_data:r,_dataIndex:i,_name:s,_value:a,_special:o,_special2:u},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){e._echartsData=e._echartsData||{};switch(t){case"series":case"seriesIndex":case"data":case"dataIndex":case"name":case"value":case"special":case"special2":e._echartsData["_"+t]=n}}function r(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:r}}),define("echarts/util/ecAnimation",["require","zrender/tool/util","zrender/shape/Polygon"],function(e){function n(e,n,r,i,s){var o=r.style.pointList,u=o.length,a;if(!n){a=[];if(r._orient!="vertical"){var f=o[0][1];for(var l=0;l1?t.symbol:[t.symbol[0],t.symbol[0]]:[t.symbol,t.symbol],t.symbolSize=t.symbolSize instanceof Array?t.symbolSize.length>1?t.symbolSize:[t.symbolSize[0],t.symbolSize[0]]:[t.symbolSize,t.symbolSize],t.symbolRotate=t.symbolRotate instanceof Array?t.symbolRotate.length>1?t.symbolRotate:[t.symbolRotate[0],t.symbolRotate[0]]:[t.symbolRotate,t.symbolRotate],t.name=n.name;var i=[],u=t.data,a,f=r.dataRange,c=r.legend,h,p,d,v,m,g,y=this.zr.getWidth(),b=this.zr.getHeight(),w;for(var E=0,S=u.length;E "+u[E][1].name:""),p),i.push(a)}return i},getMarkCoord:function(){return[0,0]},getSymbolShape:function(e,r,i,s,u,a,f,l,c,h,p){var d=[i,e],v=i!=null?i.value!=null?i.value:i:"-";l=this.deepQuery(d,"symbol")||l;var m=this.deepQuery(d,"symbolSize");m=typeof m=="function"?m(v):m;var g=this.deepQuery(d,"symbolRotate"),y=this.deepMerge(d,"itemStyle.normal"),b=this.deepMerge(d,"itemStyle.emphasis"),w=y.borderWidth!=null?y.borderWidth:y.lineStyle&&y.lineStyle.width;w==null&&(w=l.match("empty")?2:0);var E=b.borderWidth!=null?b.borderWidth:b.lineStyle&&b.lineStyle.width;E==null&&(E=w+2);var S=new n({style:{iconType:l.replace("empty","").toLowerCase(),x:a-m,y:f-m,width:m*2,height:m*2,brushType:"both",color:l.match("empty")?h:this.getItemStyleColor(y.color,r,s,i)||c,strokeColor:y.borderColor||this.getItemStyleColor(y.color,r,s,i)||c,lineWidth:w},highlightStyle:{color:l.match("empty")?h:this.getItemStyleColor(b.color,r,s,i),strokeColor:b.borderColor||y.borderColor||this.getItemStyleColor(y.color,r,s,i)||c,lineWidth:E},clickable:this.deepQuery(d,"clickable")});return l.match("image")&&(S.style.image=l.replace(new RegExp("^image:\\/\\/"),""),S=new t({style:S.style,highlightStyle:S.highlightStyle,clickable:this.deepQuery(d,"clickable")})),g!=null&&(S.rotation=[g*Math.PI/180,a,f]),l.match("star")&&(S.style.iconType="star",S.style.n=l.replace("empty","").replace("star","")-0||5),l==="none"&&(S.invisible=!0,S.hoverable=!1),S=this.addLabel(S,e,i,u,p),l.match("empty")&&(S.style.textColor==null&&(S.style.textColor=S.style.strokeColor),S.highlightStyle.textColor==null&&(S.highlightStyle.textColor=S.highlightStyle.strokeColor)),o.pack(S,e,r,i,s,u),S._x=a,S._y=f,S._dataIndex=s,S._seriesIndex=r,S},getLineMarkShape:function(e,t,n,i,s,o,u,a,f){var l=n[0]!=null?n[0].value!=null?n[0].value:n[0]:"-",c=n[1]!=null?n[1].value!=null?n[1].value:n[1]:"-",h=[this.query(n[0],"symbol")||e.symbol[0],this.query(n[1],"symbol")||e.symbol[1]],p=[this.query(n[0],"symbolSize")||e.symbolSize[0],this.query(n[1],"symbolSize")||e.symbolSize[1]];p[0]=typeof p[0]=="function"?p[0](l):p[0],p[1]=typeof p[1]=="function"?p[1](c):p[1];var d=[this.query(n[0],"symbolRotate")||e.symbolRotate[0],this.query(n[1],"symbolRotate")||e.symbolRotate[1]],v=[n[0],e],m=this.deepMerge(v,"itemStyle.normal");m.color=this.getItemStyleColor(m.color,t,i,n);var g=this.deepMerge(v,"itemStyle.emphasis");g.color=this.getItemStyleColor(g.color,t,i,n);var y=m.lineStyle,b=g.lineStyle,w=y.width;w==null&&(w=m.borderWidth);var E=b.width;E==null&&(E=g.borderWidth!=null?g.borderWidth:w+2);var S=new r({style:{smooth:e.smooth?"spline":!1,symbol:h,symbolSize:p,symbolRotate:d,xStart:s,yStart:o,xEnd:u,yEnd:a,brushType:"both",lineType:y.type,shadowColor:y.shadowColor||y.color||m.borderColor||m.color||f,shadowBlur:y.shadowBlur,shadowOffsetX:y.shadowOffsetX,shadowOffsetY:y.shadowOffsetY,color:m.color||f,strokeColor:y.color||m.borderColor||m.color||f,lineWidth:w,symbolBorderColor:m.borderColor||m.color||f,symbolBorder:m.borderWidth},highlightStyle:{shadowColor:b.shadowColor,shadowBlur:b.shadowBlur,shadowOffsetX:b.shadowOffsetX,shadowOffsetY:b.shadowOffsetY,color:g.color||m.color||f,strokeColor:b.color||y.color||g.borderColor||m.borderColor||g.color||m.color||f,lineWidth:E,symbolBorderColor:g.borderColor||m.borderColor||g.color||m.color||f,symbolBorder:g.borderWidth==null?m.borderWidth+2:g.borderWidth},clickable:this.deepQuery(v,"clickable")});return S=this.addLabel(S,e,n[0],n[0].name+" : "+n[1].name),S._x=u,S._y=a,S},getLargeMarkPoingShape:function(e,t){var n=this.series[e],r=this.component,s=t.data,o,u=r.dataRange,a=r.legend,f,l,c=[s[0],t],h,p,d;a&&(f=a.getColor(n.name));if(u){l=s[0]!=null?s[0].value!=null?s[0].value:s[0]:"-",f=isNaN(l)?f:u.getColor(l),h=this.deepQuery(c,"itemStyle.normal.color")||f,p=this.deepQuery(c,"itemStyle.emphasis.color")||h;if(h==null&&p==null)return}f=this.deepMerge(c,"itemStyle.normal").color||f;var v=this.deepQuery(c,"symbol")||"circle";v=v.replace("empty","").replace(/\d/g,""),d=this.deepMerge([s[0],t],"effect");var m=window.devicePixelRatio||1;return o=new i({style:{pointList:s,color:f,strokeColor:f,shadowColor:d.shadowColor||f,shadowBlur:(d.shadowBlur!=null?d.shadowBlur:8)*m,size:this.deepQuery(c,"symbolSize"),iconType:v,brushType:"fill",lineWidth:1},draggable:!1,hoverable:!1}),d.show&&(o.effect=d),o},backupShapeList:function(){this.shapeList&&this.shapeList.length>0?(this.lastShapeList=this.shapeList,this.shapeList=[]):this.lastShapeList=[]},addShapeList:function(){var e=this.option.animationThreshold/(this.canvasSupported?2:4),t=this.lastShapeList,n=this.shapeList,r=t.length>0?500:this.query(this.option,"animationDuration"),i=this.query(this.option,"animationEasing"),s,o={},u={};if(this.option.animation&&!this.option.renderAsImage&&n.length500?u.candle(this.zr,e,t,n,r):this.zr.addShape(t);break;case"ring":case"sector":case"circle":n>500?u.ring(this.zr,e,t,n+(o.get(t,"dataIndex")||0)%20*100,r):t.type==="sector"?u.sector(this.zr,e,t,n,r):this.zr.addShape(t);break;case"text":u.text(this.zr,e,t,n,r);break;case"polygon":n>500?u.polygon(this.zr,e,t,n,r):u.pointList(this.zr,e,t,n,r);break;case"chord":u.chord(this.zr,e,t,n,r);break;case"gauge-pointer":u.gaugePointer(this.zr,e,t,n,r);break;case"mark-line":u.markline(this.zr,e,t,n,r);break;case"line":u.line(this.zr,e,t,n,r);break;default:this.zr.addShape(t)}},animationMark:function(e,t,n){var r=n||this.shapeList;for(var i=0,s=r.length;i0&&(e&&this.zr.modLayer(s.EFFECT_ZLEVEL,{motionBlur:!1}),this.zr.delShape(this.effectList)),this.effectList=[]},addMark:function(e,t,n){var r=this.series[e];if(this.selectedMap[r.name]){var i=500,s=this.query(this.option,"animationEasing"),o=r[n].data,u=this.shapeList.length;r[n].data=t.data,this["_build"+n.replace("m","M")](e);if(this.option.animation&&!this.option.renderAsImage)this.animationMark(i,s,this.shapeList.slice(u));else{for(var a=u,f=this.shapeList.length;a0?-1:1,t.style.r-=r,t.style.r=t.style.r<5?5:t.style.r;var i=s.get(t,"value"),o=i*f.option.island.calculateStep;o>1?i=Math.round(i-o*r):i=(i-o*r).toFixed(2)-0;var a=s.get(t,"name");t.style.text=a+":"+i,s.set(t,"value",i),s.set(t,"name",a),f.zr.modShape(t.id),f.zr.refresh(),u.stop(n)}}var t=e("../component/base"),n=e("./base"),r=e("zrender/shape/Circle"),i=e("../config"),s=e("../util/ecData"),o=e("zrender/tool/util"),u=e("zrender/tool/event");return a.prototype={type:i.CHART_TYPE_ISLAND,_combine:function(t,n){var r=e("zrender/tool/color"),i=e("../util/accMath"),o=i.accAdd(s.get(t,"value"),s.get(n,"value")),u=s.get(t,"name")+this._nameConnector+s.get(n,"name");t.style.text=u+this._valueConnector+o,s.set(t,"value",o),s.set(t,"name",u),t.style.r=this.option.island.r,t.style.color=r.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),r=t/(this._zrHeight||t);if(n===1&&r===1)return;this._zrWidth=e,this._zrHeight=t;for(var i=0,s=this.shapeList.length;i'+(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");typeof n!="function"?this._textArea.value=this._optionToContent():this._textArea.value=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 r=this;this._buttonClose.onclick=function(){r.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(){r._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,r,i,s,o,u=[],a="";if(this.option.xAxis){this.option.xAxis instanceof Array?u=this.option.xAxis:u=[this.option.xAxis];for(e=0,i=u.length;e10&&(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}},r.inherits(i,t),e("../component").define("dataView",i),i}),define("echarts/component/toolbox",["require","./base","zrender/shape/Line","zrender/shape/Image","zrender/shape/Rectangle","../util/shape/Icon","../config","zrender/tool/util","zrender/config","zrender/tool/event","./dataView","../component"],function(e){function h(e,n,r,i,s){t.call(this,e,n,r,i,s),this.dom=s.dom,this._magicType={},this._magicMap={},this._isSilence=!1,this._iconList,this._iconShapeMap={},this._featureTitle={},this._featureIcon={},this._featureColor={},this._enableColor="red",this._disableColor="#ccc",this._markShapeList=[];var o=this;o._onMark=function(e){o.__onMark(e)},o._onMarkUndo=function(e){o.__onMarkUndo(e)},o._onMarkClear=function(e){o.__onMarkClear(e)},o._onDataZoom=function(e){o.__onDataZoom(e)},o._onDataZoomReset=function(e){o.__onDataZoomReset(e)},o._onDataView=function(e){o.__onDataView(e)},o._onRestore=function(e){o.__onRestore(e)},o._onSaveAsImage=function(e){o.__onSaveAsImage(e)},o._onMagicType=function(e){o.__onMagicType(e)},o._onCustomHandler=function(e){o.__onCustomHandler(e)},o._onmousemove=function(e){return o.__onmousemove(e)},o._onmousedown=function(e){return o.__onmousedown(e)},o._onmouseup=function(e){return o.__onmouseup(e)},o._onclick=function(e){return o.__onclick(e)}}var t=e("./base"),n=e("zrender/shape/Line"),r=e("zrender/shape/Image"),i=e("zrender/shape/Rectangle"),s=e("../util/shape/Icon"),o=e("../config"),u=e("zrender/tool/util"),a=e("zrender/config"),f=e("zrender/tool/event"),l="stack",c="tiled";return h.prototype={type:o.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 r in t)if(t[r].show)switch(r){case"mark":n.push({key:r,name:"mark"}),n.push({key:r,name:"markUndo"}),n.push({key:r,name:"markClear"});break;case"magicType":for(var i=0,s=t[r].type.length;i0){var o,r;for(var i=0,s=n.length;i=1){var t=this._markShapeList[e-1];this.zr.delShape(t.id),this.zr.refresh(),this._markShapeList.pop(),e===1&&(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){while(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(a.EVENT.MOUSEDOWN,n._onmousedown)&&n.zr.on(a.EVENT.MOUSEUP,n._onmouseup)&&n.zr.on(a.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(a.EVENT.CLICK,this._onclick),this.zr.un(a.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(a.EVENT.MOUSEDOWN,this._onmousedown),this.zr.un(a.EVENT.MOUSEUP,this._onmouseup),this.zr.un(a.EVENT.MOUSEMOVE,this._onmousemove))},_iconDisable:function(e){e.type!="image"?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){e.type!="image"?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(o.EVENT.RESTORE,null,null,this.myChart),!0},__onSaveAsImage:function(){var e=this.option.toolbox.feature.saveAsImage,t=e.type||"png";t!="png"&&t!="jpeg"&&(t="png");var n;this.myChart.isConnected()?n=this.myChart.getConnectedDataURL(t):n=this.zr.toDataURL("image/"+t,this.option.backgroundColor&&this.option.backgroundColor.replace(" ","")==="rgba(0,0,0,0)"?"#fff":this.option.backgroundColor);var r=document.createElement("div");r.id="__echarts_download_wrap__",r.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 i=document.createElement("a");i.href=n,i.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),i.innerHTML='鍥剧墖鍙﹀瓨涓�")+'"/>',r.appendChild(i),document.body.appendChild(r),i=null,r=null,setTimeout(function(){var e=document.getElementById("__echarts_download_wrap__");e&&(e.onclick=function(){var e=document.getElementById("__echarts_download_wrap__");e.onclick=null,e.innerHTML="",document.body.removeChild(e),e=null},e=null)},500);return},__onMagicType:function(e){this._resetMark();var t=e.target._name;return this._magicType[t]||(this._magicType[t]=!0,t===o.CHART_TYPE_LINE?this._magicType[o.CHART_TYPE_BAR]=!1:t===o.CHART_TYPE_BAR&&(this._magicType[o.CHART_TYPE_LINE]=!1),t===l?this._magicType[c]=!1:t===c&&(this._magicType[l]=!1),this.messageCenter.dispatch(o.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(o.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;typeof n=="function"&&n.call(this,this.option)},reset:function(e,t){t&&this.clear();if(this.query(e,"toolbox.show")&&this.query(e,"toolbox.feature.magicType.show")){var n=e.toolbox.feature.magicType.type,r=n.length;this._magicMap={};while(r--)this._magicMap[n[r]]=!0;r=e.series.length;var i,s;while(r--){i=e.series[r].type,this._magicMap[i]&&(s=e.xAxis instanceof Array?e.xAxis[e.series[r].xAxisIndex||0]:e.xAxis,s&&(s.type||"category")==="category"&&(s.__boundaryGap=s.boundaryGap!=null?s.boundaryGap:!0),s=e.yAxis instanceof Array?e.yAxis[e.series[r].yAxisIndex||0]:e.yAxis,s&&s.type==="category"&&(s.__boundaryGap=s.boundaryGap!=null?s.boundaryGap:!0),e.series[r].__type=i,e.series[r].__itemStyle=u.clone(e.series[r].itemStyle||{}));if(this._magicMap[l]||this._magicMap[c])e.series[r].__stack=e.series[r].stack}}this._magicType=t?{}:this._magicType||{};for(var o in this._magicType)if(this._magicType[o]){this.option=e,this.getMagicOption();break}var a=e.dataZoom;if(a&&a.show){var f=a.start!=null&&a.start>=0&&a.start<=100?a.start:0,h=a.end!=null&&a.end>=0&&a.end<=100?a.end:100;f>h&&(f+=h,h=f-h,f-=h),this._zoomQueue=[{start:f,end:h,start2:0,end2:100}]}else this._zoomQueue=[]},getMagicOption:function(){var e;if(this._magicType[o.CHART_TYPE_LINE]||this._magicType[o.CHART_TYPE_BAR]){var t=this._magicType[o.CHART_TYPE_LINE]?!1:!0;for(var n=0,r=this.option.series.length;n0&&(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,r){var i=this._tDom.offsetHeight,s=this._tDom.offsetWidth;e&&(typeof e=="function"&&(e=e([t,n])),e instanceof Array&&(t=e[0],n=e[1])),t+s>this._zrWidth&&(t-=s+40),n+i>this._zrHeight&&(n-=i-20),n<20&&(n=0),this._tDom.style.cssText=this._gCssText+this._defaultCssText+(r?r:"")+"left:"+t+"px;top:"+n+"px;",(i<10||s<10)&&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)this._findPolarTrigger()||this._findAxisTrigger();else{if(this._curTarget._type==="island"&&this.option.tooltip.show){this._showItemTrigger();return}var n=u.get(this._curTarget,"series"),r=u.get(this._curTarget,"data");e=this.deepQuery([r,n,this.option],"tooltip.show"),n==null||r==null||!e?(clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),this._hidingTicket=setTimeout(this._hide,this._hideDelay)):(t=this.deepQuery([r,n,this.option],"tooltip.trigger"),t==="axis"?this._showAxisTrigger(n.xAxisIndex,n.yAxisIndex,u.get(this._curTarget,"dataIndex")):this._showItemTrigger())}},_findAxisTrigger:function(){if(!this.component.xAxis||!this.component.yAxis){this._hidingTicket=setTimeout(this._hide,this._hideDelay);return}var e=this.option.series,t,n;for(var r=0,i=e.length;rh){l=a;if(!(a>=i))break;c=a,a=t.getCoordByIndex(++n)}return n<=0?n=0:i-l>=c-i?n-=1:t.getNameByIndex(n)==null&&(n-=1),n},_showAxisTrigger:function(e,t,n){!this._event.connectTrigger&&this.messageCenter.dispatch(o.EVENT.TOOLTIP_IN_GRID,this._event,null,this.myChart);if(this.component.xAxis==null||this.component.yAxis==null||e==null||t==null){clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),this._hidingTicket=setTimeout(this._hide,this._hideDelay);return}var r=this.option.series,i=[],s=[],u,a,l,c,h,p,d="";if(this.option.tooltip.trigger==="axis"){if(!this.option.tooltip.show)return;c=this.option.tooltip.formatter,h=this.option.tooltip.position}if(e!=-1&&this.component.xAxis.getAxis(e).type===o.COMPONENT_TYPE_AXIS_CATEGORY){u=this.component.xAxis.getAxis(e);for(var v=0,m=r.length;v=0?this._showItemTrigger():(clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),this._tDom.style.display="none");if(i.length>0){var g;if(typeof c=="function"){var y=[];for(var v=0,m=i.length;v"+this._encodeHTML(i[v].name||"")+" : ",g=i[v].data[n],g=g!=null?g.value!=null?g.value:g:"-",c+=g instanceof Array?g:this.numAddCommas(g);this._tDom.innerHTML=c}if(p===!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(h,a+10,l+10,d)}},_showPolarTrigger:function(e,t){if(this.component.polar==null||e==null||t==null||t<0)return!1;var n=this.option.series,r=[],i,s,o,u="";if(this.option.tooltip.trigger==="axis"){if(!this.option.tooltip.show)return!1;i=this.option.tooltip.formatter,s=this.option.tooltip.position}var a=this.option.polar[e].indicator[t].text;for(var l=0,c=n.length;l0){var h,p,d=[];for(var l=0,c=r.length;l"+this._encodeHTML(d[0][3])+" : "+this.numAddCommas(d[0][2]);for(var l=1,c=d.length;l"+this._encodeHTML(d[l][1])+"
",i+=this._encodeHTML(d[l][3])+" : "+this.numAddCommas(d[l][2]);this._tDom.innerHTML=i}if(o===!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(s,f.getX(this._event),f.getY(this._event),u),!0}},_showItemTrigger:function(){if(!this._curTarget)return;var e=u.get(this._curTarget,"series"),t=u.get(this._curTarget,"data"),n=u.get(this._curTarget,"name"),r=u.get(this._curTarget,"value"),i=u.get(this._curTarget,"special"),s=u.get(this._curTarget,"special2"),a,l,c,h="",p,d="";this._curTarget._type!="island"?(this.option.tooltip.trigger==="item"&&(a=this.option.tooltip.formatter,l=this.option.tooltip.position),this.query(e,"tooltip.trigger")==="item"&&(c=this.query(e,"tooltip.showContent")||c,a=this.query(e,"tooltip.formatter")||a,l=this.query(e,"tooltip.position")||l,h+=this._style(this.query(e,"tooltip"))),c=this.query(t,"tooltip.showContent")||c,a=this.query(t,"tooltip.formatter")||a,l=this.query(t,"tooltip.position")||l,h+=this._style(this.query(t,"tooltip"))):(c=this.deepQuery([t,e,this.option],"tooltip.showContent"),a=this.deepQuery([t,e,this.option],"tooltip.islandFormatter"),l=this.deepQuery([t,e,this.option],"tooltip.islandPosition"));if(typeof a=="function")this._curTicket=(e.name||"")+":"+u.get(this._curTarget,"dataIndex"),this._tDom.innerHTML=a.call(this.myChart,[e.name||"",n,r,i,s,t],this._curTicket,this._setContent);else if(typeof a=="string")this._curTicket=NaN,a=a.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}"),a=a.replace("{a0}",this._encodeHTML(e.name||"")).replace("{b0}",this._encodeHTML(n)).replace("{c0}",r instanceof Array?r:this.numAddCommas(r)),a=a.replace("{d}","{d0}").replace("{d0}",i||""),a=a.replace("{e}","{e0}").replace("{e0}",u.get(this._curTarget,"special2")||""),this._tDom.innerHTML=a;else{this._curTicket=NaN;if(e.type===o.CHART_TYPE_SCATTER)this._tDom.innerHTML=""+(e.name!=null?this._encodeHTML(e.name)+"
":"")+(n===""?"":this._encodeHTML(n)+" : ")+r+(i==null?"":" ("+i+")");else if(e.type===o.CHART_TYPE_RADAR&&i){p=i,d+=this._encodeHTML(n===""?e.name||"":n),d+=d===""?"":"
";for(var v=0;v";this._tDom.innerHTML=d}else if(e.type===o.CHART_TYPE_CHORD)if(s==null)this._tDom.innerHTML=this._encodeHTML(n)+" ("+this.numAddCommas(r)+")";else{var m=this._encodeHTML(n),g=this._encodeHTML(i);this._tDom.innerHTML=""+(e.name!=null?this._encodeHTML(e.name)+"
":"")+m+" -> "+g+" ("+this.numAddCommas(r)+")"+"
"+g+" -> "+m+" ("+this.numAddCommas(s)+")"}else this._tDom.innerHTML=""+(e.name!=null?this._encodeHTML(e.name)+"
":"")+this._encodeHTML(n)+" : "+this.numAddCommas(r)+(i==null?"":" ("+this.numAddCommas(i)+")")}if(!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();if(c===!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(l,f.getX(this._event)+20,f.getY(this._event)-20,h)},_styleAxisPointer:function(e,t,n,r,i,s,o,u){if(e.length>0){var a,f,l=this.option.tooltip.axisPointer,c=l.type,h={line:{},cross:{},shadow:{}};for(var p in h)h[p].color=l[p+"Style"].color,h[p].width=l[p+"Style"].width,h[p].type=l[p+"Style"].type;for(var d=0,v=e.length;d100?(this._axisCrossShape.style.textAlign="left",this._axisCrossShape.style.textX=o+10):(this._axisCrossShape.style.textAlign="right",this._axisCrossShape.style.textX=o-10),u-this.component.grid.getY()>50?(this._axisCrossShape.style.textBaseline="bottom",this._axisCrossShape.style.textY=u-10):(this._axisCrossShape.style.textBaseline="top",this._axisCrossShape.style.textY=u+10),this._axisCrossShape.invisible=!1,this.zr.modShape(this._axisCrossShape.id);else if(c==="shadow"){if(h.shadow.width==null||h.shadow.width==="auto"||isNaN(h.shadow.width))h.shadow.width=s;t===r?Math.abs(this.component.grid.getX()-t)<2?(h.shadow.width/=2,t=r+=h.shadow.width/2):Math.abs(this.component.grid.getXend()-t)<2&&(h.shadow.width/=2,t=r-=h.shadow.width/2):n===i&&(Math.abs(this.component.grid.getY()-n)<2?(h.shadow.width/=2,n=i+=h.shadow.width/2):Math.abs(this.component.grid.getYend()-n)<2&&(h.shadow.width/=2,n=i-=h.shadow.width/2)),this._axisShadowShape.style={xStart:t,yStart:n,xEnd:r,yEnd:i,strokeColor:h.shadow.color,lineWidth:h.shadow.width},this._axisShadowShape.invisible=!1,this.zr.modShape(this._axisShadowShape.id)}this.zr.refresh()}},__onmousemove:function(e){clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket);var t=e.target,n=f.getX(e.event),r=f.getY(e.event);if(!t)this._curTarget=!1,this._event=e.event,this._event.zrenderX=n,this._event.zrenderY=r,this._needAxisTrigger&&this.component.grid&&l.isInside(s,this.component.grid.getArea(),n,r)?this._showingTicket=setTimeout(this._tryShow,this._showDelay):this._needAxisTrigger&&this.component.polar&&this.component.polar.isInside([n,r])!=-1?this._showingTicket=setTimeout(this._tryShow,this._showDelay):(!this._event.connectTrigger&&this.messageCenter.dispatch(o.EVENT.TOOLTIP_OUT_GRID,this._event,null,this.myChart),this._hidingTicket=setTimeout(this._hide,this._hideDelay));else{this._curTarget=t,this._event=e.event,this._event.zrenderX=n,this._event.zrenderY=r;var i;if(this._needAxisTrigger&&this.component.polar&&(i=this.component.polar.isInside([n,r]))!=-1){var u=this.option.series;for(var a=0,c=u.length;a0&&(this.zr.delShape(this._lastTipShape.tipShape),this.shapeList.length=2);for(var n=0,r=t.length;n0&&this.zr.delShape(this._lastTipShape.tipShape),this._lastTipShape=!1,this.shapeList.length=2;if(e){this.option=e,this.option.tooltip=this.reformOption(this.option.tooltip),this.option.tooltip.textStyle=h.merge(this.option.tooltip.textStyle,this.ecTheme.textStyle),this.option.tooltip.padding=this.reformCssArray(this.option.tooltip.padding),this._needAxisTrigger=!1,this.option.tooltip.trigger==="axis"&&(this._needAxisTrigger=!0);var t=this.option.series;for(var n=0,r=t.length;n0&&this.zr.delShape(this._lastTipShape.tipShape),this.clear(),this.shapeList=null,clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),this.zr.un(a.EVENT.MOUSEMOVE,this._onmousemove),this.zr.un(a.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,"'")}},h.inherits(d,t),e("../component").define("tooltip",d),d}),define("zrender/shape/Ring",["require","./Base","../tool/util"],function(e){var t=e("./Base"),n=function(e){t.call(this,e)};return n.prototype={type:"ring",buildPath:function(e,t){e.arc(t.x,t.y,t.r,0,Math.PI*2,!1),e.moveTo(t.x+t.r0,t.y),e.arc(t.x,t.y,t.r0,0,Math.PI*2,!0);return},getRect:function(e){if(e.__rect)return e.__rect;var t;return e.brushType=="stroke"||e.brushType=="fill"?t=e.lineWidth||1:t=0,e.__rect={x:Math.round(e.x-e.r-t/2),y:Math.round(e.y-e.r-t/2),width:e.r*2+t,height:e.r*2+t},e.__rect}},e("../tool/util").inherits(n,t),n}),define("zrender/shape/Sector",["require","../tool/math","./Base","./Ring","./Polygon","../tool/util"],function(e){var t=e("../tool/math"),n=e("./Base"),r=function(e){n.call(this,e)};return r.prototype={type:"sector",buildPath:function(e,n){var r=n.x,i=n.y,s=typeof n.r0=="undefined"?0:n.r0,o=n.r,u=n.startAngle,a=n.endAngle;if(Math.abs(a-u)>=360){e.arc(r,i,o,0,Math.PI*2,!1),s!==0&&(e.moveTo(r+s,i),e.arc(r,i,s,0,Math.PI*2,!0));return}u=t.degreeToRadian(u),a=t.degreeToRadian(a);var f=Math.PI*2,l=t.cos(u),c=t.sin(u);e.moveTo(l*s+r,i-c*s),e.lineTo(l*o+r,i-c*o),e.arc(r,i,o,f-u,f-a,!0),e.lineTo(t.cos(a)*s+r,i-t.sin(a)*s),s!==0&&e.arc(r,i,s,f-a,f-u,!1),e.closePath();return},getRect:function(n){if(n.__rect)return n.__rect;var r=n.x,i=n.y,s=typeof n.r0=="undefined"?0:n.r0,o=n.r,u=n.startAngle,a=n.endAngle;if(Math.abs(a-u)>=360)return n.__rect=e("./Ring").prototype.getRect(n),n.__rect;u=(720+u)%360,a=(720+a)%360,a<=u&&(a+=360);var f=[];return u<=90&&a>=90&&f.push([r,i-o]),u<=180&&a>=180&&f.push([r-o,i]),u<=270&&a>=270&&f.push([r,i+o]),u<=360&&a>=360&&f.push([r+o,i]),u=t.degreeToRadian(u),a=t.degreeToRadian(a),f.push([t.cos(u)*s+r,i-t.sin(u)*s]),f.push([t.cos(u)*o+r,i-t.sin(u)*o]),f.push([t.cos(a)*o+r,i-t.sin(a)*o]),f.push([t.cos(a)*s+r,i-t.sin(a)*s]),n.__rect=e("./Polygon").prototype.getRect({brushType:n.brushType,lineWidth:n.lineWidth,pointList:f}),n.__rect}},e("../tool/util").inherits(r,n),r}),define("echarts/util/shape/Candle",["require","zrender/shape/Base","zrender/tool/util","./normalIsCover"],function(e){function r(e){t.call(this,e)}var t=e("zrender/shape/Base"),n=e("zrender/tool/util");return r.prototype={type:"candle",_numberOrder:function(e,t){return t-e},buildPath:function(e,t){var r=n.clone(t.y).sort(this._numberOrder);e.moveTo(t.x,r[3]),e.lineTo(t.x,r[2]),e.moveTo(t.x-t.width/2,r[2]),e.rect(t.x-t.width/2,r[2],t.width,r[1]-r[2]),e.moveTo(t.x,r[1]),e.lineTo(t.x,r[0])},getRect:function(e){if(!e.__rect){var t=0;if(e.brushType=="stroke"||e.brushType=="fill")t=e.lineWidth||1;var r=n.clone(e.y).sort(this._numberOrder);e.__rect={x:Math.round(e.x-e.width/2-t/2),y:Math.round(r[3]-t/2),width:e.width+t,height:r[0]-r[3]+t}}return e.__rect},isCover:e("./normalIsCover")},n.inherits(r,t),r}),define("echarts/component/legend",["require","./base","zrender/shape/Text","zrender/shape/Rectangle","zrender/shape/Sector","../util/shape/Icon","../util/shape/Candle","../config","zrender/tool/util","zrender/tool/area","../component"],function(e){function l(e,n,r,i,s){if(!this.query(i,"legend.data")){console.error("option.legend.data has not been defined.");return}t.call(this,e,n,r,i,s);var o=this;o._legendSelected=function(e){o.__legendSelected(e)},this._colorIndex=0,this._colorMap={},this._selectedMap={},this.refresh(i)}var t=e("./base"),n=e("zrender/shape/Text"),r=e("zrender/shape/Rectangle"),i=e("zrender/shape/Sector"),s=e("../util/shape/Icon"),o=e("../util/shape/Candle"),u=e("../config"),a=e("zrender/tool/util"),f=e("zrender/tool/area");l.prototype={type:u.COMPONENT_TYPE_LEGEND,_buildShape:function(){this._itemGroupLocation=this._getItemGroupLocation(),this._buildBackground(),this._buildItem();for(var e=0,t=this.shapeList.length;e=d-m&&(m=this._itemGroupLocation.x,g+=b+w):v-g<200&&b+(S===t-1||e[S+1]===""?0:w)>=v-g&&(this.legendOption.x==="right"?m-=this._itemGroupLocation.maxWidth+w:m+=this._itemGroupLocation.maxWidth+w,g=this._itemGroupLocation.y),o=this._getItemShapeByType(m,g,y,b,this._selectedMap[r]?E:"#ccc",i,E),o._name=r,o=new s(o),u={zlevel:this._zlevelBase,style:{x:m+y+5,y:g+b/2,color:this._selectedMap[r]?c.color==="auto"?E:c.color:"#ccc",text:p,textFont:h,textBaseline:"middle"},highlightStyle:{color:E,brushType:"fill"},hoverable:!!this.legendOption.selectedMode,clickable:!!this.legendOption.selectedMode},this.legendOption.orient==="vertical"&&this.legendOption.x==="right"&&(u.style.x-=y+10,u.style.textAlign="right"),u._name=r,u=new n(u),this.legendOption.selectedMode&&(o.onclick=u.onclick=this._legendSelected,o.onmouseover=u.onmouseover=this.hoverConnect,o.hoverConnect=u.id,u.hoverConnect=o.id),this.shapeList.push(o),this.shapeList.push(u),this.legendOption.orient==="horizontal"?m+=y+5+f.getTextWidth(p,h)+w:g+=b+w}this.legendOption.orient==="horizontal"&&this.legendOption.x==="center"&&g!=this._itemGroupLocation.y&&this._mLineOptimize()},_getName:function(e){return typeof e.name!="undefined"?e.name:e},_getFormatterName:function(e){var t=this.legendOption.formatter,n;return typeof t=="function"?n=t.call(this.myChart,e):typeof t=="string"?n=t.replace("{name}",e):n=e,n},_getFormatterNameFromData:function(e){var t=this._getName(e);return this._getFormatterName(t)},_mLineOptimize:function(){var e=[],t=this._itemGroupLocation.x;for(var n=2,r=this.shapeList.length;nh?(u=h,l+=i+n):u=Math.max(u,d),l+=i+n,d=0;continue}d+=r+f.getTextWidth(this._getFormatterNameFromData(e[m]),e[m].textStyle?this.getFont(a.merge(e[m].textStyle||{},s)):o)+n}l=Math.max(l,i),d-=n,d>h?(u=h,l+=i+n):u=Math.max(u,d)}else{for(var m=0;mp?(l=p,u+=v+n):l=Math.max(l,d),u+=v+n,d=0;continue}d+=i+n}u=Math.max(u,v),d-=n,d>p?(l=p,u+=v+n):l=Math.max(l,d)}h=this.zr.getWidth(),p=this.zr.getHeight();var g;switch(this.legendOption.x){case"center":g=Math.floor((h-u)/2);break;case"left":g=this.legendOption.padding[3]+this.legendOption.borderWidth;break;case"right":g=h-u-this.legendOption.padding[1]-this.legendOption.padding[3]-this.legendOption.borderWidth*2;break;default:g=this.parsePercent(this.legendOption.x,h)}var y;switch(this.legendOption.y){case"top":y=this.legendOption.padding[0]+this.legendOption.borderWidth;break;case"bottom":y=p-l-this.legendOption.padding[0]-this.legendOption.padding[2]-this.legendOption.borderWidth*2;break;case"center":y=Math.floor((p-l)/2);break;default:y=this.parsePercent(this.legendOption.y,p)}return{x:g,y:y,width:u,height:l,maxWidth:v}},_getSomethingByName:function(e){var t=this.option.series,n;for(var r=0,i=t.length;r=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height?!0:!1}},i.inherits(o,t),o}),define("echarts/component/timeline",["require","./base","zrender/shape/Rectangle","../util/shape/Icon","../util/shape/Chain","../config","zrender/tool/util","zrender/tool/area","zrender/tool/event","../component"],function(e){function f(e,n,r,i,u){t.call(this,e,n,r,i,u);var a=this;a._onclick=function(e){return a.__onclick(e)},a._ondrift=function(e,t){return a.__ondrift(this,e,t)},a._ondragend=function(){return a.__ondragend()},a._setCurrentOption=function(){var e=a.timelineOption;a.currentIndex%=e.data.length;var t=a.options[a.currentIndex]||{};a.myChart.setOption(t,e.notMerge),a.messageCenter.dispatch(s.EVENT.TIMELINE_CHANGED,null,{currentIndex:a.currentIndex,data:e.data[a.currentIndex].name!=null?e.data[a.currentIndex].name:e.data[a.currentIndex]},a.myChart)},a._onFrame=function(){a._setCurrentOption(),a._syncHandleShape(),a.timelineOption.autoPlay&&(a.playTicket=setTimeout(function(){a.currentIndex+=1;if(!a.timelineOption.loop&&a.currentIndex>=a.timelineOption.data.length){a.currentIndex=a.timelineOption.data.length-1,a.stop();return}a._onFrame()},a.timelineOption.playInterval))},this.setTheme(!1),this.options=this.option.options,this.currentIndex=this.timelineOption.currentIndex%this.timelineOption.data.length,!this.timelineOption.notMerge&&this.currentIndex!==0&&(this.options[this.currentIndex]=o.merge(this.options[this.currentIndex],this.options[0])),this.timelineOption.show&&(this._buildShape(),this._syncHandleShape()),this._setCurrentOption();if(this.timelineOption.autoPlay){var a=this;this.playTicket=setTimeout(function(){a.play()},this.ecTheme.animationDuration)}}function l(e,t){var n=2,i=t.x+n,s=t.y+n+2,o=t.width-n,u=t.height-n,a=t.symbol;if(a==="last")e.moveTo(i+o-2,s+u/3),e.lineTo(i+o-2,s),e.lineTo(i+2,s+u/2),e.lineTo(i+o-2,s+u),e.lineTo(i+o-2,s+u/3*2),e.moveTo(i,s),e.lineTo(i,s);else if(a==="next")e.moveTo(i+2,s+u/3),e.lineTo(i+2,s),e.lineTo(i+o-2,s+u/2),e.lineTo(i+2,s+u),e.lineTo(i+2,s+u/3*2),e.moveTo(i,s),e.lineTo(i,s);else if(a==="play")if(t.status==="stop")e.moveTo(i+2,s),e.lineTo(i+o-2,s+u/2),e.lineTo(i+2,s+u),e.lineTo(i+2,s);else{var f=t.brushType==="both"?2:3;e.rect(i+2,s,f,u),e.rect(i+o-f-2,s,f,u)}else if(a.match("image")){var l="";l=a.replace(new RegExp("^image:\\/\\/"),""),a=r.prototype.iconLibrary.image,a(e,{x:i,y:s,width:o,height:u,image:l})}}var t=e("./base"),n=e("zrender/shape/Rectangle"),r=e("../util/shape/Icon"),i=e("../util/shape/Chain"),s=e("../config"),o=e("zrender/tool/util"),u=e("zrender/tool/area"),a=e("zrender/tool/event");return f.prototype={type:s.COMPONENT_TYPE_TIMELINE,_buildShape:function(){this._location=this._getLocation(),this._buildBackground(),this._buildControl(),this._chainPoint=this._getChainPoint();if(this.timelineOption.label.show){var e=this._getInterval();for(var t=0,n=this._chainPoint.length;t3){var o=!1,a,f;n=0;while(!o&&n1){var v=c/h;v=v>50?50:v<20?5:v,c-=v*2;if(e.type==="number")for(var m=0;m0?"right":"left",S=[r*Math.PI/180,f,l-5]):S=!1,g.push({x:f,n:b,isEmpty:w,symbol:y,symbolSize:a[m].symbolSize||n,color:a[m].color,borderColor:a[m].borderColor,borderWidth:a[m].borderWidth,name:this._getReformedLabel(m),textColor:u.color,textAlign:E,textBaseline:u.baseline||"middle",textX:f,textY:l-(r?5:0),textFont:a[m].textStyle?this.getFont(u):s,rotation:S,showLabel:!1});return g},_buildBackground:function(){var e=this.timelineOption,t=e.padding,r=this._location.width,i=this._location.height;(e.borderWidth!==0||e.backgroundColor.replace(/\s/g,"")!="rgba(0,0,0,0)")&&this.shapeList.push(new n({zlevel:this._zlevelBase,hoverable:!1,style:{x:this._location.x-t[3],y:this._location.y-t[0],width:r+t[1]+t[3],height:i+t[0]+t[2],brushType:e.borderWidth===0?"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(t.controlPosition==="none")return;var s=15,u=5,a;t.controlPosition==="left"?(a=this._location.x,this._location.x+=(s+u)*3):(a=this._location.x2-((s+u)*3-u),this._location.x2-=(s+u)*3);var f=this._location.y,l={zlevel:this._zlevelBase+1,style:{iconType:"timelineControl",symbol:"last",x:a,y:f,width:s,height:s,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 r(l),this._ctrLastShape.onclick=function(){e.last()},this.shapeList.push(this._ctrLastShape),a+=s+u,this._ctrPlayShape=new r(o.clone(l)),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(){e._ctrPlayShape.style.status==="stop"?e.play():e.stop()},this.shapeList.push(this._ctrPlayShape),a+=s+u,this._ctrNextShape=new r(o.clone(l)),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 i(this._timelineShae),this.shapeList.push(this._timelineShae)},_buildHandle:function(){var e=this._chainPoint[this.currentIndex],t=e.symbolSize+1;t=t<5?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:t*2,height:t*2,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 r(this._handleShape),this.shapeList.push(this._handleShape)},_syncHandleShape:function(){if(!this.timelineOption.show)return;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,t.symbol==="auto"?this._handleShape.style.iconType=n.symbol!="none"?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 r;t.symbolSize==="auto"?(r=n.symbolSize+2,r=r<5?5:r):r=t.symbolSize-0,this._handleShape.style.color=t.color==="auto"?n.color?n.color:e.controlStyle.emphasis.color:t.color,this._handleShape.style.textColor=t.label.textStyle.color==="auto"?this._handleShape.style.color:t.label.textStyle.color,this._handleShape.highlightStyle.strokeColor=this._handleShape.style.strokeColor=t.borderColor==="auto"?n.borderColor?n.borderColor:"#fff":t.borderColor,this._handleShape.style.lineWidth=t.borderWidth==="auto"?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-r,textX:n.x,y:this._location.y+this._location.height/4-r,width:r*2,height:r*2}).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 r=0;r=t[r].x&&e<=t[r+1].x)return Math.abs(e-t[r].x)=n[r-1].x-n[r-1].symbolSize?(e.style.x=n[r-1].x-n[r-1].symbolSize,i=r-1):(e.style.x+=t,i=this._findChainIndex(e.style.x));var s=n[i],o=s.symbolSize+2;e.style.iconType=s.symbol,e.style.n=s.n,e.style.textX=e.style.x+o/2,e.style.y=this._location.y+this._location.height/4-o,e.style.width=o*2,e.style.height=o*2,e.style.text=s.name;if(i===this.currentIndex)return!0;this.currentIndex=i;if(this.timelineOption.realtime){clearTimeout(this.playTicket);var u=this;this.playTicket=setTimeout(function(){u._setCurrentOption()},200)}return!0},__ondragend:function(){this.isDragend=!0},ondragend:function(e,t){if(!this.isDragend||!e.target)return;!this.timelineOption.realtime&&this._setCurrentOption(),t.dragOut=!0,t.dragIn=!0,t.needRefresh=!1,this.isDragend=!1,this._syncHandleShape();return},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&&this._ctrPlayShape.style.status!="playing"&&(this._ctrPlayShape.style.status="playing",this.zr.modShape(this._ctrPlayShape.id),this.zr.refresh()),this.timelineOption.autoPlay=t!=null?t:!0,this.timelineOption.autoPlay||clearTimeout(this.playTicket),this.currentIndex=e!=null?e:this.currentIndex+1,this.currentIndex>=this.timelineOption.data.length&&(this.currentIndex=0),this._onFrame(),this.currentIndex},stop:function(){return this._ctrPlayShape&&this._ctrPlayShape.style.status!="stop"&&(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(o.clone(this.option.timeline)),this.timelineOption.padding=this.reformCssArray(this.timelineOption.padding),this.timelineOption.label.textStyle=o.merge(this.timelineOption.label.textStyle||{},this.ecTheme.textStyle),this.timelineOption.checkpointStyle.label.textStyle=o.merge(this.timelineOption.checkpointStyle.label.textStyle||{},this.ecTheme.textStyle),this.timelineOption.show&&e&&(this.clear(),this._buildShape(),this._syncHandleShape())},dispose:function(){this.clear(),this.shapeList=null,clearTimeout(this.playTicket)}},r.prototype.iconLibrary.timelineControl=l,o.inherits(f,t),e("../component").define("timeline",f),f}),define("zrender/loadingEffect/Bar",["require","./Base","../tool/util","../tool/color","../shape/Rectangle"],function(e){function s(e){t.call(this,e)}var t=e("./Base"),n=e("../tool/util"),r=e("../tool/color"),i=e("../shape/Rectangle");return n.inherits(s,t),s.prototype._start=function(e,t){var s=n.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}}),o=this.createTextShape(s.textStyle),u=this.createBackgroundShape(s.backgroundColor),a=s.effectOption,f=new i({highlightStyle:n.clone(a)});f.highlightStyle.color=a.color||r.getLinearGradient(a.x,a.y,a.x+a.width,a.y+a.height,[[0,"#ff6400"],[.5,"#ffe100"],[1,"#b1ff00"]]);if(s.progress!=null){e(u),f.highlightStyle.width=this.adjust(s.progress,[0,1])*s.effectOption.width,e(f),e(o),t();return}return f.highlightStyle.width=0,setInterval(function(){e(u),f.highlightStyle.width=h&&(c[n].len=Math.ceil(Math.random()*400),r.xStart=-400,r.xEnd=-400+c[n].len,r.yStart=Math.ceil(Math.random()*p),r.yEnd=r.yStart),r.xStart+=c[n].animationX,r.xEnd+=c[n].animationX,e(c[n])}e(o),t()},a.timeInterval)},s}),define("zrender/loadingEffect/Ring",["require","./Base","../tool/util","../tool/color","../shape/Ring","../shape/Sector"],function(e){function o(e){t.call(this,e)}var t=e("./Base"),n=e("../tool/util"),r=e("../tool/color"),i=e("../shape/Ring"),s=e("../shape/Sector");return n.inherits(o,t),o.prototype._start=function(e,t){var o=n.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}}),u=o.effect,a=o.textStyle;a.x==null&&(a.x=u.x),a.y==null&&(a.y=u.y+(u.r0+u.r)/2-5);var f=this.createTextShape(o.textStyle),l=this.createBackgroundShape(o.backgroundColor),c=u.x,h=u.y,p=u.r0+6,d=u.r-6,v=u.color,m=r.lift(v,.1),g=new i({highlightStyle:n.clone(u)}),y=[],b=r.getGradientColors(["#ff6400","#ffe100","#97ff00"],25),w=15,E=240;for(var S=0;S<16;S++)y.push(new s({highlightStyle:{x:c,y:h,r0:p,r:d,startAngle:E-w,endAngle:E,brushType:"fill",color:m},_color:r.getLinearGradient(c+p*Math.cos(E,!0),h-p*Math.sin(E,!0),c+p*Math.cos(E-w,!0),h-p*Math.sin(E-w,!0),[[0,b[S*2]],[1,b[S*2+1]]])})),E-=w;E=360;for(var S=0;S<4;S++)y.push(new s({highlightStyle:{x:c,y:h,r0:p,r:d,startAngle:E-w,endAngle:E,brushType:"fill",color:m},_color:r.getLinearGradient(c+p*Math.cos(E,!0),h-p*Math.sin(E,!0),c+p*Math.cos(E-w,!0),h-p*Math.sin(E-w,!0),[[0,b[S*2+32]],[1,b[S*2+33]]])})),E-=w;var x=0;if(o.progress!=null){e(l),x=this.adjust(o.progress,[0,1]).toFixed(2)*100/5,g.highlightStyle.text=x*5+"%",e(g);for(var S=0;S<20;S++)y[S].highlightStyle.color=S=20?-20:1,e(g);for(var n=0;n<20;n++)y[n].highlightStyle.color=n ");var u=-1;for(var a=0,f=o.length;a-1){o.splice(u,1),this._optionRestore.series[e][n].data.splice(u,1);var c=this.chart[i.type];c&&c.delMark(e,t.join(" > "),n)}return this},getDom:function(){return this.dom},getZrender:function(){return this._zr},getDataURL:function(e){if(!s)return"";if(this._chartList.length===0){var t="IMG"+this.id,n=document.getElementById(t);if(n)return n.src}var r=this.component.tooltip;r&&r.hideTip();switch(e){case"jpeg":break;default:e="png"}var i=this._option.backgroundColor;return i&&i.replace(" ","")==="rgba(0,0,0,0)"&&(i="#fff"),this._zr.toDataURL("image/"+e,i)},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,r={self:{img:this.getDataURL(t),left:n.offsetLeft,top:n.offsetTop,right:n.offsetLeft+n.offsetWidth,bottom:n.offsetTop+n.offsetHeight}},i=r.self.left,s=r.self.top,o=r.self.right,u=r.self.bottom;for(var a in this._connected)n=this._connected[a].getDom(),r[a]={img:this._connected[a].getDataURL(t),left:n.offsetLeft,top:n.offsetTop,right:n.offsetLeft+n.offsetWidth,bottom:n.offsetTop+n.offsetHeight},i=Math.min(i,r[a].left),s=Math.min(s,r[a].top),o=Math.max(o,r[a].right),u=Math.max(u,r[a].bottom);var f=document.createElement("div");f.style.position="absolute",f.style.left="-4000px",f.style.width=o-i+"px",f.style.height=u-s+"px",document.body.appendChild(f);var l=e("zrender").init(f),c=e("zrender/shape/Image");for(var a in r)l.addShape(new c({style:{x:r[a].left-i,y:r[a].top-s,image:r[a].img}}));l.render();var h=this._option.backgroundColor;h&&h.replace(/ /g,"")==="rgba(0,0,0,0)"&&(h="#fff");var p=l.toDataURL("image/png",h);return setTimeout(function(){l.dispose(),f.parentNode.removeChild(f),f=null},100),p},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;this._connected||(this._connected={});if(e instanceof Array)for(var t=0,n=e.length;t=n/3?1:2),o=t.y+Math.sin(i)*r*(r>=n/3?1:2);i=t.angle-Math.PI/2,e.moveTo(s,o),e.lineTo(t.x+Math.cos(i)*r,t.y-Math.sin(i)*r),e.lineTo(t.x+Math.cos(t.angle)*n,t.y-Math.sin(t.angle)*n),e.lineTo(t.x-Math.cos(i)*r,t.y+Math.sin(i)*r),e.lineTo(s,o);return},getRect:function(e){if(e.__rect)return e.__rect;var t=e.width*2,n=e.x,r=e.y,i=n+Math.cos(e.angle)*e.r,s=r-Math.sin(e.angle)*e.r;return e.__rect={x:Math.min(n,i)-t,y:Math.min(r,s)-t,width:Math.abs(n-i)+t,height:Math.abs(r-s)+t},e.__rect},isCover:e("./normalIsCover")},n.inherits(r,t),r}),define("echarts/chart/gauge",["require","../component/base","./base","../util/shape/GaugePointer","zrender/shape/Text","zrender/shape/Line","zrender/shape/Rectangle","zrender/shape/Circle","zrender/shape/Sector","../config","../util/ecData","../util/accMath","zrender/tool/util","../chart"],function(e){function p(e,r,i,s,o){t.call(this,e,r,i,s,o),n.call(this),this.refresh(s)}var t=e("../component/base"),n=e("./base"),r=e("../util/shape/GaugePointer"),i=e("zrender/shape/Text"),s=e("zrender/shape/Line"),o=e("zrender/shape/Rectangle"),u=e("zrender/shape/Circle"),a=e("zrender/shape/Sector"),f=e("../config"),l=e("../util/ecData"),c=e("../util/accMath"),h=e("zrender/tool/util");return p.prototype={type:f.CHART_TYPE_GAUGE,_buildShape:function(){var e=this.series;this._paramsMap={};for(var t=0,n=e.length;t=110&&v<=250?"left":v<=70||v>=290?"right":"center",textBaseline:v>=10&&v<=170?"top":v>=190&&v<=350?"bottom":"middle",textFont:u,shadowColor:o.shadowColor,shadowBlur:o.shadowBlur,shadowOffsetX:o.shadowOffsetX,shadowOffsetY:o.shadowOffsetY}}))},_buildPointer:function(e){var t=this.series[e];if(!t.pointer.show)return;var n=t.max-t.min,i=t.pointer,s=this._paramsMap[e],o=this.parsePercent(i.length,s.radius[1]),a=this.parsePercent(i.width,s.radius[1]),f=s.center,c=this._getValue(e);c=c2?2:a/2,color:"#fff"}});l.pack(d,this.series[e],e,this.series[e].data[0],0,this.series[e].data[0].name,c),this.shapeList.push(d),this.shapeList.push(new u({zlevel:this._zlevelBase+2,hoverable:!1,style:{x:f[0],y:f[1],r:i.width/2.5,color:"#fff"}}))},_buildTitle:function(e){var t=this.series[e];if(!t.title.show)return;var n=t.data[0],r=n.name!=null?n.name:"";if(r!==""){var s=t.title,o=s.offsetCenter,u=s.textStyle,a=u.color,f=this._paramsMap[e],l=f.center[0]+this.parsePercent(o[0],f.radius[1]),c=f.center[1]+this.parsePercent(o[1],f.radius[1]);this.shapeList.push(new i({zlevel:this._zlevelBase+(Math.abs(l-f.center[0])+Math.abs(c-f.center[1]))=t)return n[r][1];return n[n.length-1][1]},_getSector:function(e,t,n,r,i,s,o){return new a({zlevel:this._zlevelBase,hoverable:!1,style:{x:e[0],y:e[1],r0:t,r:n,startAngle:r,endAngle:i,brushType:"fill",color:s,shadowColor:o.shadowColor,shadowBlur:o.shadowBlur,shadowOffsetX:o.shadowOffsetX,shadowOffsetY:o.shadowOffsetY}})},_getLabelText:function(e,t){if(e){if(typeof e=="function")return e.call(this.myChart,t);if(typeof e=="string")return e.replace("{value}",t)}return t},refresh:function(e){e&&(this.option=e,this.series=e.series),this.backupShapeList(),this._buildShape()}},h.inherits(p,n),h.inherits(p,t),e("../chart").define("gauge",p),p}),define("echarts/chart/funnel",["require","../component/base","./base","zrender/shape/Text","zrender/shape/Line","zrender/shape/Polygon","../config","../util/ecData","../util/number","zrender/tool/util","zrender/tool/color","zrender/tool/area","../chart"],function(e){function h(e,r,i,s,o){t.call(this,e,r,i,s,o),n.call(this),this.refresh(s)}var t=e("../component/base"),n=e("./base"),r=e("zrender/shape/Text"),i=e("zrender/shape/Line"),s=e("zrender/shape/Polygon"),o=e("../config"),u=e("../util/ecData"),a=e("../util/number"),f=e("zrender/tool/util"),l=e("zrender/tool/color"),c=e("zrender/tool/area");return h.prototype={type:o.CHART_TYPE_FUNNEL,_buildShape:function(){var e=this.series,t=this.component.legend;this._paramsMap={},this._selected={},this.selectedMap={};var n;for(var r=0,i=e.length;r1?(i.height-(o-1)*h)/o:i.height,d,v=i.y,m=n.sort==="descending"?this._getItemWidth(e,u[0].value):a.parsePercent(n.minSize,i.width),g=n.sort==="descending"?1:0,y=i.centerX,b=[[y-m/2-(m===0?0:10),v-(m===0?10:5)],[y+m/2+(m===0?0:10),v-(m===0?10:5)]];for(var f=0,l=u.length;fc.getTextWidth(w,E)?T="#fff":T=l.reverse(n)):g.position==="left"?(S="right",x=b==="auto"?d.x-10:d.centerX-Math.max(o,u)/2-b):(S="left",x=b==="auto"?d.x+d.width+10:d.centerX+Math.max(o,u)/2+b);var N={zlevel:this._zlevelBase+1,style:{x:x,y:s+a/2,color:y.color||T,text:w,textAlign:y.align||S,textBaseline:y.baseline||"middle",textFont:E}};return m="emphasis",g=v[m].label||g,y=g.textStyle||y,b=v[m].labelLine.length||b,g.position=g.position||v.normal.label.position,w=this.getLabelText(e,t,m),E=this.getFont(y),T=n,g.position==="inner"||g.position==="inside"?(S="center",x=i+o/2,Math.max(o,u)/2>c.getTextWidth(w,E)?T="#fff":T=l.reverse(n)):g.position==="left"?(S="right",x=b==="auto"?d.x-10:d.centerX-Math.max(o,u)/2-b):(S="left",x=b==="auto"?d.x+d.width+10:d.centerX+Math.max(o,u)/2+b),N.highlightStyle={x:x,color:y.color||T,text:w,textAlign:y.align||S,textFont:E,brushType:"fill"},new r(N)},getLabelText:function(e,t,n){var r=this.series,i=r[e],s=i.data[t],o=this.deepQuery([s,i],"itemStyle."+n+".label.formatter");if(!o)return s.name;if(typeof o=="function")return o.call(this.myChart,i.name,s.name,s.value);if(typeof o=="string")return o=o.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}"),o=o.replace("{a0}",i.name).replace("{b0}",s.name).replace("{c0}",s.value),o},getLabelLine:function(e,t,n,r,s,o,u,a){var l=this.series[e],c=l.data[t],h=this._paramsMap[e].location,p=f.merge(f.clone(c.itemStyle)||{},l.itemStyle),d="normal",v=p[d].labelLine,m=p[d].labelLine.length,g=v.lineStyle||{},y=p[d].label;y.position=y.position||p.normal.label.position;var b;y.position==="inner"||y.position==="inside"?b=r+o/2:y.position==="left"?b=m==="auto"?h.x-10:h.centerX-Math.max(o,u)/2-m:b=m==="auto"?h.x+h.width+10:h.centerX+Math.max(o,u)/2+m;var w={zlevel:this._zlevelBase+1,hoverable:!1,style:{xStart:h.centerX,yStart:s+a/2,xEnd:b,yEnd:s+a/2,strokeColor:g.color||n,lineType:g.type,lineWidth:g.width}};return d="emphasis",v=p[d].labelLine||v,m=p[d].labelLine.length||m,g=v.lineStyle||g,y=p[d].label||y,y.position=y.position,y.position==="inner"||y.position==="inside"?b=r+o/2:y.position==="left"?b=m==="auto"?h.x-10:h.centerX-Math.max(o,u)/2-m:b=m==="auto"?h.x+h.width+10:h.centerX+Math.max(o,u)/2+m,w.highlightStyle={xEnd:b,strokeColor:g.color||n,lineType:g.type,lineWidth:g.width},new i(w)},_needLabel:function(e,t,n){return this.deepQuery([t,e],"itemStyle."+(n?"emphasis":"normal")+".label.show")},_needLabelLine:function(e,t,n){return this.deepQuery([t,e],"itemStyle."+(n?"emphasis":"normal")+".labelLine.show")},refresh:function(e){e&&(this.option=e,this.series=e.series),this.backupShapeList(),this._buildShape()}},f.inherits(h,n),f.inherits(h,t),e("../chart").define("funnel",h),h}),define("echarts/component/categoryAxis",["require","./base","zrender/shape/Text","zrender/shape/Line","zrender/shape/Rectangle","../config","zrender/tool/util","zrender/tool/area","../component"],function(e){function a(e,n,r,i,s,o){if(i.data.length<1){console.error("option.data.length < 1.");return}t.call(this,e,n,r,i,s),this.grid=this.component.grid;for(var u in o)this[u]=o[u];this.refresh(i)}var t=e("./base"),n=e("zrender/shape/Text"),r=e("zrender/shape/Line"),i=e("zrender/shape/Rectangle"),s=e("../config"),o=e("zrender/tool/util"),u=e("zrender/tool/area");return a.prototype={type:s.COMPONENT_TYPE_AXIS_CATEGORY,_getReformedLabel:function(e){var t=typeof this.option.data[e].value!="undefined"?this.option.data[e].value:this.option.data[e],n=this.option.data[e].formatter||this.option.axisLabel.formatter;return n&&(typeof n=="function"?t=n.call(this.myChart,t):typeof n=="string"&&(t=n.replace("{value}",t))),t},_getInterval:function(){var e=this.option.axisLabel.interval;if(e=="auto"){var t=this.option.axisLabel.textStyle.fontSize,n=this.option.data,r=this.option.data.length;if(this.isHorizontal())if(r>3){var i=this.getGap(),s=!1,a,f,l=Math.floor(.5/i);l=l<1?1:l,e=Math.floor(15/i);while(!s&&e=0;c-=e){if(this.option.axisLabel.rotate!==0)f=t;else if(n[c].textStyle)f=u.getTextWidth(this._getReformedLabel(c),this.getFont(o.merge(n[c].textStyle,this.option.axisLabel.textStyle)));else{var h=this._getReformedLabel(c)+"",p=(h.match(/\w/g)||"").length,d=h.length-p;f=p*t*2/3+d*t}if(a3){var i=this.getGap();e=Math.floor(11/i);while(i*e-60?-u:0;if(this.isHorizontal()){var c=this.option.position=="bottom"?n.inside?this.grid.getYend()-i-1:this.grid.getYend()+1:n.inside?this.grid.getY()+1:this.grid.getY()-i-1,h;for(var p=l;p=0?f:0),o),e={_axisShape:"axisTick",zlevel:this._zlevelBase,hoverable:!1,style:{xStart:h,yStart:c,xEnd:h,yEnd:c+i,strokeColor:s,lineWidth:o}},this.shapeList.push(new r(e))}else{var d=this.option.position=="left"?n.inside?this.grid.getX()+1:this.grid.getX()-i-1:n.inside?this.grid.getXend()-i-1:this.grid.getXend()+1,v;for(var p=l;p=0?f:0),o),e={_axisShape:"axisTick",zlevel:this._zlevelBase,hoverable:!1,style:{xStart:d,yStart:v,xEnd:d+i,yEnd:v,strokeColor:s,lineWidth:o}},this.shapeList.push(new r(e))}},_buildAxisLabel:function(){var e,t=this.option.data,r=this.option.data.length,i=this.option.axisLabel.rotate,s=this.option.axisLabel.margin,u=this.option.axisLabel.clickable,a=this.option.axisLabel.textStyle,f;if(this.isHorizontal()){var l,c;this.option.position=="bottom"?(l=this.grid.getYend()+s,c="top"):(l=this.grid.getY()-s,c="bottom");for(var h=0;h0?this.option.position=="bottom"?"right":"left":this.option.position=="bottom"?"left":"right",e.rotation=[i*Math.PI/180,e.style.x,e.style.y]),this.shapeList.push(new n(this._axisLabelClickable(u,e)))}}else{var p,d;this.option.position=="left"?(p=this.grid.getX()-s,d="right"):(p=this.grid.getXend()+s,d="left");for(var h=0;h1?e-1:1)},getCoord:function(e){var t=this.option.data,n=t.length,r=this.getGap(),i=this.option.boundaryGap?r/2:0;for(var s=0;sthis.option.data.length-1)return this.isHorizontal()?this.grid.getXend():this.grid.getY();var t=this.getGap(),n=this.option.boundaryGap?t/2:0;return n+=e*t,this.isHorizontal()?n=this.grid.getX()+n:n=this.grid.getYend()-n,n},getNameByIndex:function(e){var t=this.option.data[e];return typeof t!="undefined"&&typeof t.value!="undefined"?t.value:t},getIndexByName:function(e){var t=this.option.data,n=t.length;for(var r=0;r0?this.option.position==="bottom"?"right":"left":this.option.position==="bottom"?"left":"right",e.rotation=[i*Math.PI/180,e.style.x,e.style.y]),this.shapeList.push(new n(this._axisLabelClickable(o,e)))}else{var c,h;this.option.position==="left"?(c=this.grid.getX()-s,h="right"):(c=this.grid.getXend()+s,h="left");for(var l=0;l=0?t[h][l]!=null?t[h][l]+=n:t[h][l]=n:t[p][l]!=null?t[p][l]+=n:t[p][l]=n,this.option.scale&&t[f].push(n)}}}for(var u in t){e=t[u];for(var l=0,c=e.length;l0?this.option.power:1:this._max>0?this._min=this._max/this.option.splitNumber:this._max=this._max/this.option.splitNumber),this._reformValue(this.option.scale)}else this._hasData=!0,this._min=this.option.min-0,this._max=this.option.max-0,this._customerValue()},_reformValue:function(e){var t=this.option.splitNumber,n=this.option.precision,r,i;n===0?i=this.option.power>1?this.option.power:1:(i=Math.pow(10,n),this._min*=i,this._max*=i,i=this.option.power);var s;if(this._min>=0&&this._max>=0){if(!e){while(this._max/i1?i/10:1,s=this._max-this._min,r=Math.ceil(s/t/i)*i,this._max=this._min+r*t}else if(this._min<=0&&this._max<=0){i=-i;if(!e){while(this._min/ii&&i!=-1)i/=10;n===0&&(this._min=Math.ceil(this._min/i)*i,this._max=Math.floor(this._max/i)*i)}i=i<-1?i/10:-1,s=this._min-this._max,r=-Math.ceil(s/t/i)*i,this._min=-r*t+this._max}else{s=this._max-this._min;while(s/ithis._max?this._max:e;var t;return this.isHorizontal()?t=this.grid.getX()+(e-this._min)/(this._max-this._min)*this.grid.getWidth():t=this.grid.getYend()-(e-this._min)/(this._max-this._min)*this.grid.getHeight(),t},getCoordSize:function(e){return this.isHorizontal()?Math.abs(e/(this._max-this._min)*this.grid.getWidth()):Math.abs(e/(this._max-this._min)*this.grid.getHeight())},getValueFromCoord:function(e){var t;return this.isHorizontal()?(e=ethis.grid.getXend()?this.grid.getXend():e,t=this._min+(e-this.grid.getX())/this.grid.getWidth()*(this._max-this._min)):(e=ethis.grid.getYend()?this.grid.getYend():e,t=this._max-(e-this.grid.getY())/this.grid.getHeight()*(this._max-this._min)),t.toFixed(2)-0}},o.inherits(u,t),e("../component").define("valueAxis",u),u}),define("echarts/component/axis",["require","./base","zrender/shape/Line","../config","../util/ecData","zrender/tool/util","zrender/tool/color","./categoryAxis","./valueAxis","../component"],function(e){function u(e,n,r,i,s,o){t.call(this,e,n,r,i,s),this.axisType=o,this._axisList=[],this.refresh(i)}var t=e("./base"),n=e("zrender/shape/Line"),r=e("../config"),i=e("../util/ecData"),s=e("zrender/tool/util"),o=e("zrender/tool/color");return u.prototype={type:r.COMPONENT_TYPE_AXIS,axisBase:{_buildAxisLine:function(){var e=this.option.axisLine.lineStyle.width,t=e/2,r={_axisShape:"axisLine",zlevel:this._zlevelBase+1,hoverable:!1};switch(this.option.position){case"left":r.style={xStart:this.grid.getX()-t,yStart:this.grid.getYend(),xEnd:this.grid.getX()-t,yEnd:this.grid.getY(),lineCap:"round"};break;case"right":r.style={xStart:this.grid.getXend()+t,yStart:this.grid.getYend(),xEnd:this.grid.getXend()+t,yEnd:this.grid.getY(),lineCap:"round"};break;case"bottom":r.style={xStart:this.grid.getX(),yStart:this.grid.getYend()+t,xEnd:this.grid.getXend(),yEnd:this.grid.getYend()+t,lineCap:"round"};break;case"top":r.style={xStart:this.grid.getX(),yStart:this.grid.getY()-t,xEnd:this.grid.getXend(),yEnd:this.grid.getY()-t,lineCap:"round"}}this.option.name!==""&&(r.style.text=this.option.name,r.style.textPosition=this.option.nameLocation,r.style.textFont=this.getFont(this.option.nameTextStyle),this.option.nameTextStyle.align&&(r.style.textAlign=this.option.nameTextStyle.align),this.option.nameTextStyle.baseline&&(r.style.textBaseline=this.option.nameTextStyle.baseline),this.option.nameTextStyle.color&&(r.style.textColor=this.option.nameTextStyle.color)),r.style.strokeColor=this.option.axisLine.lineStyle.color,r.style.lineWidth=e,this.isHorizontal()?r.style.yStart=r.style.yEnd=this.subPixelOptimize(r.style.yEnd,e):r.style.xStart=r.style.xEnd=this.subPixelOptimize(r.style.xEnd,e),r.style.lineType=this.option.axisLine.lineStyle.type,r=new n(r),this.shapeList.push(r)},_axisLabelClickable:function(e,t){return e?(i.pack(t,undefined,-1,undefined,-1,t.style.text),t.hoverable=!0,t.clickable=!0,t.highlightStyle={color:o.lift(t.style.color,1),brushType:"fill"},t):t},refixAxisShape:function(e,t){if(!this.option.axisLine.onZero)return;var n;if(this.isHorizontal()&&t!=null)for(var r=0,i=this.shapeList.length;r2&&(e=[e[0],e[1]]);if(this.axisType==="xAxis"){if(!e[0].position||e[0].position!="bottom"&&e[0].position!="top")e[0].position="bottom";e.length>1&&(e[1].position=e[0].position==="bottom"?"top":"bottom");for(var t=0,n=e.length;t1&&(e[1].position=e[0].position==="left"?"right":"left");for(var t=0,n=e.length;t=0&&(o.isHorizontal()?t=o.getCoord(0):n=o.getCoord(0));if(typeof t!="undefined"||typeof n!="undefined"){s=i.length;while(s--)i[s].refixAxisShape(t,n)}},refresh:function(e){if(e||this._zrWidth!=this.zr.getWidth()||this._zrHeight!=this.zr.getHeight()){this.clear(),this.option=e||this.option,this.option.grid=this.reformOption(this.option.grid);var t=this.option.grid;this._zrWidth=this.zr.getWidth(),this._zrHeight=this.zr.getHeight(),this._x=this.parsePercent(t.x,this._zrWidth),this._y=this.parsePercent(t.y,this._zrHeight);var r=this.parsePercent(t.x2,this._zrWidth),i=this.parsePercent(t.y2,this._zrHeight);typeof t.width=="undefined"?this._width=this._zrWidth-this._x-r:this._width=this.parsePercent(t.width,this._zrWidth),this._width=this._width<=0?10:this._width,typeof t.height=="undefined"?this._height=this._zrHeight-this._y-i:this._height=this.parsePercent(t.height,this._zrHeight),this._height=this._height<=0?10:this._height,this._x=this.subPixelOptimize(this._x,t.borderWidth),this._y=this.subPixelOptimize(this._y,t.borderWidth),this.shapeList.push(new n({zlevel:this._zlevelBase,hoverable:!1,style:{x:this._x,y:this._y,width:this._width,height:this._height,brushType:t.borderWidth>0?"both":"fill",color:t.backgroundColor,strokeColor:t.borderColor,lineWidth:t.borderWidth}})),this.zr.addShape(this.shapeList[0])}}},i.inherits(s,t),e("../component").define("grid",s),s}),define("echarts/component/dataZoom",["require","./base","zrender/shape/Rectangle","zrender/shape/Polygon","../util/shape/Icon","../config","zrender/tool/util","../component","../component"],function(e){function u(e,n,r,i,s){t.call(this,e,n,r,i,s);var o=this;o._ondrift=function(e,t){return o.__ondrift(this,e,t)},o._ondragend=function(){return o.__ondragend()},this._fillerSize=28,this._handleSize=8,this._isSilence=!1,this._zoom={},this.option.dataZoom=this.reformOption(this.option.dataZoom),this.zoomOption=this.option.dataZoom,this._location=this._getLocation(),this._zoom=this._getZoom(),this._backupData(),this.option.dataZoom.show&&this._buildShape(),this._syncData()}var t=e("./base"),n=e("zrender/shape/Rectangle"),r=e("zrender/shape/Polygon"),i=e("../util/shape/Icon"),s=e("../config"),o=e("zrender/tool/util");return u.prototype={type:s.COMPONENT_TYPE_DATAZOOM,_buildShape:function(){this._buildBackground(),this._buildFiller(),this._buildHandle(),this._buildFrame();for(var e=0,t=this.shapeList.length;ep&&(h+=p,p=h-p,h-=p);var d=Math.round((p-h)/100*(this.zoomOption.orient=="horizontal"?this._location.width:this._location.height));return{start:h,end:p,start2:0,end2:100,size:d,xAxisIndex:i,yAxisIndex:o,seriesIndex:r,scatterMap:this._zoom.scatterMap||{}}},_backupData:function(){this._originalData={xAxis:{},yAxis:{},series:{}};var e=this.option.xAxis,t=this._zoom.xAxisIndex;for(var n=0,r=t.length;n1?1:0)),w=t/(i-(i>1?1:0)),E=1;this.zoomOption.orient=="horizontal"&&b<1?E=Math.floor(i*3/e):this.zoomOption.orient=="vertical"&&w<1&&(E=Math.floor(i*3/t));for(var a=0,f=i;athis._location.x?1:0),height:this._location.height-(t>this._location.y?1:0),lineWidth:1,brushType:"stroke",strokeColor:this.zoomOption.handleColor}},this._endFrameShape=o.clone(this._startFrameShape),this._startFrameShape=new n(this._startFrameShape),this._endFrameShape=new n(this._endFrameShape),this.shapeList.push(this._startFrameShape),this.shapeList.push(this._endFrameShape);return},_syncHandleShape:function(){this.zoomOption.orient=="horizontal"?(this._startShape.style.x=this._fillerShae.style.x-this._handleSize,this._endShape.style.x=this._fillerShae.style.x+this._fillerShae.style.width,this._zoom.start=Math.floor((this._startShape.style.x-this._location.x)/this._location.width*100),this._zoom.end=Math.ceil((this._endShape.style.x+this._handleSize-this._location.x)/this._location.width*100)):(this._startShape.style.y=this._fillerShae.style.y-this._handleSize,this._endShape.style.y=this._fillerShae.style.y+this._fillerShae.style.height,this._zoom.start=Math.floor((this._startShape.style.y-this._location.y)/this._location.height*100),this._zoom.end=Math.ceil((this._endShape.style.y+this._handleSize-this._location.y)/this._location.height*100)),this.zr.modShape(this._startShape.id),this.zr.modShape(this._endShape.id),this._syncFrameShape(),this.zr.refresh()},_syncFillerShape:function(){var e,t;this.zoomOption.orient=="horizontal"?(e=this._startShape.style.x,t=this._endShape.style.x,this._fillerShae.style.x=Math.min(e,t)+this._handleSize,this._fillerShae.style.width=Math.abs(e-t)-this._handleSize,this._zoom.start=Math.floor((Math.min(e,t)-this._location.x)/this._location.width*100),this._zoom.end=Math.ceil((Math.max(e,t)+this._handleSize-this._location.x)/this._location.width*100)):(e=this._startShape.style.y,t=this._endShape.style.y,this._fillerShae.style.y=Math.min(e,t)+this._handleSize,this._fillerShae.style.height=Math.abs(e-t)-this._handleSize,this._zoom.start=Math.floor((Math.min(e,t)-this._location.y)/this._location.height*100),this._zoom.end=Math.ceil((Math.max(e,t)+this._handleSize-this._location.y)/this._location.height*100)),this.zr.modShape(this._fillerShae.id),this._syncFrameShape(),this.zr.refresh()},_syncFrameShape:function(){this.zoomOption.orient=="horizontal"?(this._startFrameShape.style.width=this._fillerShae.style.x-this._location.x,this._endFrameShape.style.x=this._fillerShae.style.x+this._fillerShae.style.width,this._endFrameShape.style.width=this._location.x+this._location.width-this._endFrameShape.style.x):(this._startFrameShape.style.height=this._fillerShae.style.y-this._location.y,this._endFrameShape.style.y=this._fillerShae.style.y+this._fillerShae.style.height,this._endFrameShape.style.height=this._location.y+this._location.height-this._endFrameShape.style.y),this.zr.modShape(this._startFrameShape.id),this.zr.modShape(this._endFrameShape.id)},_syncShape:function(){if(!this.zoomOption.show)return;this.zoomOption.orient=="horizontal"?(this._startShape.style.x=this._location.x+this._zoom.start/100*this._location.width,this._endShape.style.x=this._location.x+this._zoom.end/100*this._location.width-this._handleSize,this._fillerShae.style.x=this._startShape.style.x+this._handleSize,this._fillerShae.style.width=this._endShape.style.x-this._startShape.style.x-this._handleSize):(this._startShape.style.y=this._location.y+this._zoom.start/100*this._location.height,this._endShape.style.y=this._location.y+this._zoom.end/100*this._location.height-this._handleSize,this._fillerShae.style.y=this._startShape.style.y+this._handleSize,this._fillerShae.style.height=this._endShape.style.y-this._startShape.style.y-this._handleSize),this.zr.modShape(this._startShape.id),this.zr.modShape(this._endShape.id),this.zr.modShape(this._fillerShae.id),this._syncFrameShape(),this.zr.refresh()},_syncData:function(e){var t,n,r,i,o;for(var u in this._originalData){t=this._originalData[u];for(var a in t){o=t[a];if(typeof o=="undefined")continue;i=o.length,n=Math.floor(this._zoom.start/100*i),r=Math.ceil(this._zoom.end/100*i),this.option[u][a].type!=s.CHART_TYPE_SCATTER?this.option[u][a].data=o.slice(n,r):this.option[u][a].data=this._synScatterData(a,o)}}!this._isSilence&&(this.zoomOption.realtime||e)&&this.messageCenter.dispatch(s.EVENT.DATA_ZOOM,null,{zoom:this._zoom},this.myChart)},_synScatterData:function(e,t){if(this._zoom.start===0&&this._zoom.end==100&&this._zoom.start2===0&&this._zoom.end2==100)return t;var n=[],r=this._zoom.scatterMap[e],i,s,o,u,a;this.zoomOption.orient=="horizontal"?(i=r.x.max-r.x.min,s=this._zoom.start/100*i+r.x.min,o=this._zoom.end/100*i+r.x.min,i=r.y.max-r.y.min,u=this._zoom.start2/100*i+r.y.min,a=this._zoom.end2/100*i+r.y.min):(i=r.x.max-r.x.min,s=this._zoom.start2/100*i+r.x.min,o=this._zoom.end2/100*i+r.x.min,i=r.y.max-r.y.min,u=this._zoom.start/100*i+r.y.min,a=this._zoom.end/100*i+r.y.min);var f;for(var l=0,c=t.length;l=s&&f[0]<=o&&f[1]>=u&&f[1]<=a&&n.push(t[l]);return n},__ondrift:function(e,t,n){this.zoomOption.zoomLock&&(e=this._fillerShae);var r=e._type=="filler"?this._handleSize:0;return this.zoomOption.orient=="horizontal"?e.style.x+t-r<=this._location.x?e.style.x=this._location.x+r:e.style.x+t+e.style.width+r>=this._location.x+this._location.width?e.style.x=this._location.x+this._location.width-e.style.width-r:e.style.x+=t:e.style.y+n-r<=this._location.y?e.style.y=this._location.y+r:e.style.y+n+e.style.height+r>=this._location.y+this._location.height?e.style.y=this._location.y+this._location.height-e.style.height-r:e.style.y+=n,e._type=="filler"?this._syncHandleShape():this._syncFillerShape(),this.zoomOption.realtime&&this._syncData(),!0},__ondragend:function(){this.isDragend=!0},ondragend:function(e,t){if(!this.isDragend||!e.target)return;!this.zoomOption.realtime&&this._syncData(),t.dragOut=!0,t.dragIn=!0,!this._isSilence&&!this.zoomOption.realtime&&this.messageCenter.dispatch(s.EVENT.DATA_ZOOM,null,{zoom:this._zoom},this.myChart),t.needRefresh=!1,this.isDragend=!1;return},ondataZoom:function(e,t){t.needRefresh=!0;return},absoluteZoom:function(e){this._zoom.start=e.start,this._zoom.end=e.end,this._zoom.start2=e.start2,this._zoom.end2=e.end2,this._syncShape(),this._syncData(!0);return},rectZoom:function(e){if(!e)return this._zoom.start=this._zoom.start2=0,this._zoom.end=this._zoom.end2=100,this._syncShape(),this._syncData(!0),this._zoom;var t=this.component.grid.getArea(),n={x:e.x,y:e.y,width:e.width,height:e.height};n.width<0&&(n.x+=n.width,n.width=-n.width),n.height<0&&(n.y+=n.height,n.height=-n.height);if(n.x>t.x+t.width||n.y>t.y+t.height)return!1;n.xt.x+t.width&&(n.width=t.x+t.width-n.x),n.y+n.height>t.y+t.height&&(n.height=t.y+t.height-n.y);var r,i=(n.x-t.x)/t.width,s=1-(n.x+n.width-t.x)/t.width,o=1-(n.y+n.height-t.y)/t.height,u=(n.y-t.y)/t.height;return this.zoomOption.orient=="horizontal"?(r=this._zoom.end-this._zoom.start,this._zoom.start+=r*i,this._zoom.end-=r*s,r=this._zoom.end2-this._zoom.start2,this._zoom.start2+=r*o,this._zoom.end2-=r*u):(r=this._zoom.end-this._zoom.start,this._zoom.start+=r*o,this._zoom.end-=r*u,r=this._zoom.end2-this._zoom.start2,this._zoom.start2+=r*i,this._zoom.end2-=r*s),this._syncShape(),this._syncData(!0),this._zoom},syncBackupData:function(e){var t,n=this._originalData.series,r=e.series,i;for(var s=0,o=r.length;s=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height?!0:!1}},r.inherits(i,t),i}),define("echarts/component/dataRange",["require","./base","zrender/shape/Text","zrender/shape/Rectangle","../util/shape/HandlePolygon","../config","zrender/tool/util","zrender/tool/area","zrender/tool/color","zrender/tool/color","../component"],function(e){function f(e,n,r,i,s){if(typeof this.query(i,"dataRange.min")=="undefined"||typeof this.query(i,"dataRange.max")=="undefined"){console.error("option.dataRange.min or option.dataRange.max has not been defined.");return}t.call(this,e,n,r,i,s);var o=this;o._ondrift=function(e,t){return o.__ondrift(this,e,t)},o._ondragend=function(){return o.__ondragend()},o._dataRangeSelected=function(e){return o.__dataRangeSelected(e)},this._selectedMap={},this._range={},this.refresh(i)}var t=e("./base"),n=e("zrender/shape/Text"),r=e("zrender/shape/Rectangle"),i=e("../util/shape/HandlePolygon"),s=e("../config"),o=e("zrender/tool/util"),u=e("zrender/tool/area"),a=e("zrender/tool/color");return f.prototype={type:s.COMPONENT_TYPE_DATARANGE,_textGap:10,_buildShape:function(){this._itemGroupLocation=this._getItemGroupLocation(),this._buildBackground(),this.dataRangeOption.splitNumber<=0||this.dataRangeOption.calculable?this._buildGradient():this._buildItem();for(var e=0,t=this.shapeList.length;ep&&(h-=m)):(dv&&(d-=f))}return{x:h,y:d,width:s,height:o}},_getTextShape:function(e,t,n){return{zlevel:this._zlevelBase,style:{x:this.dataRangeOption.orient=="horizontal"?e:this._itemGroupLocation.x+this._itemGroupLocation.width/2,y:this.dataRangeOption.orient=="horizontal"?this._itemGroupLocation.y+this._itemGroupLocation.height/2:t,color:this.dataRangeOption.textStyle.color,text:n,textFont:this.getFont(this.dataRangeOption.textStyle),textBaseline:this.dataRangeOption.orient=="horizontal"?"middle":"top",textAlign:this.dataRangeOption.orient=="horizontal"?"left":"center"},hoverable:!1}},_getItemShape:function(e,t,n,r,i){return{zlevel:this._zlevelBase,style:{x:e,y:t+1,width:n,height:r-2,color:i},highlightStyle:{strokeColor:i,lineWidth:1},clickable:!0}},__ondrift:function(e,t,n){var r=this._calculableLocation.x,i=this._calculableLocation.y,s=this._calculableLocation.width,o=this._calculableLocation.height;return this.dataRangeOption.orient=="horizontal"?e.style.x+t<=r?e.style.x=r:e.style.x+t+e.style.width>=r+s?e.style.x=r+s-e.style.width:e.style.x+=t:e.style.y+n<=i?e.style.y=i:e.style.y+n+e.style.height>=i+o?e.style.y=i+o-e.style.height:e.style.y+=n,e._type=="filler"?this._syncHandleShape():this._syncFillerShape(e),this.dataRangeOption.realtime&&this._syncData(),!0},__ondragend:function(){this.isDragend=!0},ondragend:function(e,t){if(!this.isDragend||!e.target)return;!this.dataRangeOption.realtime&&this._syncData(),t.dragOut=!0,t.dragIn=!0,!this.dataRangeOption.realtime&&!1&&this.messageCenter.dispatch(s.EVENT.DATA_RANGE,null,{range:{start:this._range.end,end:this._range.start}},this.myChart),t.needRefresh=!1,this.isDragend=!1;return},_syncShapeFromRange:function(){var e=this.dataRangeOption.range||{};this._range.end=typeof this._range.end!="undefined"?this._range.end:typeof e.start!="undefined"?e.start:0,this._range.start=typeof this._range.start!="undefined"?this._range.start:typeof e.end!="undefined"?e.end:100;if(this._range.start!=100||this._range.end!==0){if(this.dataRangeOption.orient=="horizontal"){var t=this._fillerShae.style.width;this._fillerShae.style.x+=t*(100-this._range.start)/100,this._fillerShae.style.width=t*(this._range.start-this._range.end)/100}else{var n=this._fillerShae.style.height;this._fillerShae.style.y+=n*(100-this._range.start)/100,this._fillerShae.style.height=n*(this._range.start-this._range.end)/100}this.zr.modShape(this._fillerShae.id),this._syncHandleShape()}},_syncHandleShape:function(){var e=this._calculableLocation.x,t=this._calculableLocation.y,n=this._calculableLocation.width,r=this._calculableLocation.height;this.dataRangeOption.orient=="horizontal"?(this._startShape.style.x=this._fillerShae.style.x,this._startMask.style.width=this._startShape.style.x-e,this._endShape.style.x=this._fillerShae.style.x+this._fillerShae.style.width,this._endMask.style.x=this._endShape.style.x,this._endMask.style.width=e+n-this._endShape.style.x,this._range.start=Math.ceil(100-(this._startShape.style.x-e)/n*100),this._range.end=Math.floor(100-(this._endShape.style.x-e)/n*100)):(this._startShape.style.y=this._fillerShae.style.y,this._startMask.style.height=this._startShape.style.y-t,this._endShape.style.y=this._fillerShae.style.y+this._fillerShae.style.height,this._endMask.style.y=this._endShape.style.y,this._endMask.style.height=t+r-this._endShape.style.y,this._range.start=Math.ceil(100-(this._startShape.style.y-t)/r*100),this._range.end=Math.floor(100-(this._endShape.style.y-t)/r*100)),this._syncShape()},_syncFillerShape:function(e){var t=this._calculableLocation.x,n=this._calculableLocation.y,r=this._calculableLocation.width,i=this._calculableLocation.height,s,o;this.dataRangeOption.orient=="horizontal"?(s=this._startShape.style.x,o=this._endShape.style.x,e.id==this._startShape.id&&s>=o?(o=s,this._endShape.style.x=s):e.id==this._endShape.id&&s>=o&&(s=o,this._startShape.style.x=s),this._fillerShae.style.x=s,this._fillerShae.style.width=o-s,this._startMask.style.width=s-t,this._endMask.style.x=o,this._endMask.style.width=t+r-o,this._range.start=Math.ceil(100-(s-t)/r*100),this._range.end=Math.floor(100-(o-t)/r*100)):(s=this._startShape.style.y,o=this._endShape.style.y,e.id==this._startShape.id&&s>=o?(o=s,this._endShape.style.y=s):e.id==this._endShape.id&&s>=o&&(s=o,this._startShape.style.y=s),this._fillerShae.style.y=s,this._fillerShae.style.height=o-s,this._startMask.style.height=s-n,this._endMask.style.y=o,this._endMask.style.height=n+i-o,this._range.start=Math.ceil(100-(s-n)/i*100),this._range.end=Math.floor(100-(o-n)/i*100)),this._syncShape()},_syncShape:function(){this._startShape.position=[this._startShape.style.x-this._startShape.style._x,this._startShape.style.y-this._startShape.style._y],this._startShape.style.text=this._textFormat(this._gap*this._range.start+this.dataRangeOption.min),this._startShape.style.color=this._startShape.highlightStyle.strokeColor=this.getColor(this._gap*this._range.start+this.dataRangeOption.min),this._endShape.position=[this._endShape.style.x-this._endShape.style._x,this._endShape.style.y-this._endShape.style._y],this._endShape.style.text=this._textFormat(this._gap*this._range.end+this.dataRangeOption.min),this._endShape.style.color=this._endShape.highlightStyle.strokeColor=this.getColor(this._gap*this._range.end+this.dataRangeOption.min),this.zr.modShape(this._startShape.id),this.zr.modShape(this._endShape.id),this.zr.modShape(this._startMask.id),this.zr.modShape(this._endMask.id),this.zr.modShape(this._fillerShae.id),this.zr.refresh()},_syncData:function(){this.dataRangeOption.realtime&&this.messageCenter.dispatch(s.EVENT.DATA_RANGE,null,{range:{start:this._range.end,end:this._range.start}},this.myChart)},__dataRangeSelected:function(e){var t=e.target._idx;this._selectedMap[t]=!this._selectedMap[t],this.messageCenter.dispatch(s.EVENT.REFRESH,null,null,this.myChart)},_textFormat:function(e,t){e=e.toFixed(this.dataRangeOption.precision),t=typeof t!="undefined"?t.toFixed(this.dataRangeOption.precision):"";if(this.dataRangeOption.formatter){if(typeof this.dataRangeOption.formatter=="string")return this.dataRangeOption.formatter.replace("{value}",e).replace("{value2}",t);if(typeof this.dataRangeOption.formatter=="function")return this.dataRangeOption.formatter.call(this.myChart,e,t)}return t!==""?e+" - "+t:e},refresh:function(e){if(e){this.option=e,this.option.dataRange=this.reformOption(this.option.dataRange),this.option.dataRange.padding=this.reformCssArray(this.option.dataRange.padding),this.dataRangeOption=this.option.dataRange;var t=this.dataRangeOption.splitNumber<=0||this.dataRangeOption.calculable?100:this.dataRangeOption.splitNumber;this._colorList=a.getGradientColors(this.dataRangeOption.color,Math.max((t-this.dataRangeOption.color.length)/(this.dataRangeOption.color.length-1),0)+1);if(this._colorList.length>t){var n=this._colorList.length,r=[this._colorList[0]],i=n/(t-1);for(var s=1;sthis.dataRangeOption.max&&(e=this.dataRangeOption.max);if(this.dataRangeOption.calculable)if(e-(this._gap*this._range.start+this.dataRangeOption.min)>5e-5||e-(this._gap*this._range.end+this.dataRangeOption.min)<-0.00005)return null;var t=this._colorList.length-Math.ceil((e-this.dataRangeOption.min)/(this.dataRangeOption.max-this.dataRangeOption.min)*this._colorList.length);return t==this._colorList.length&&t--,this._selectedMap[t]?this._colorList[t]:null}},o.inherits(f,t),e("../component").define("dataRange",f),f}),define("echarts/chart/scatter",["require","../component/base","./base","../util/shape/Symbol","../component/axis","../component/grid","../component/dataZoom","../component/dataRange","../config","zrender/tool/util","zrender/tool/color","../chart"],function(e){function u(e,r,i,s,o){t.call(this,e,r,i,s,o),n.call(this),this.refresh(s)}var t=e("../component/base"),n=e("./base"),r=e("../util/shape/Symbol");e("../component/axis"),e("../component/grid"),e("../component/dataZoom"),e("../component/dataRange");var i=e("../config"),s=e("zrender/tool/util"),o=e("zrender/tool/color");return u.prototype={type:i.CHART_TYPE_SCATTER,_buildShape:function(){var e=this.series;this._sIndex2ColorMap={},this._symbol=this.option.symbolList,this._sIndex2ShapeMap={},this.selectedMap={},this.xMarkMap={};var t=this.component.legend,n=[],r,s,u,a;for(var f=0,l=e.length;fs[0]&&(i.min0=s[0],i.minY0=r[o][1],i.minX0=r[o][0]),i.max0s[1]&&(i.min1=s[1],i.minY1=r[o][1],i.minX1=r[o][0]),i.max1n.largeThreshold){this.shapeList.push(this._getLargeSymbol(r,this.getItemStyleColor(this.query(n,"itemStyle.normal.color"),o,-1)||this._sIndex2ColorMap[o]));continue}for(var u=0,a=r.length;u0&&this._buildSinglePosition(o,t[o]);this.addShapeList()},_buildSinglePosition:function(e,t){var n=this._mapData(t),r=n.locationMap,i=n.maxDataLength;if(i===0||r.length===0)return;this._buildHorizontal(t,i,r);for(var s=0,o=t.length;s0?a="left":Math.round(i[0])<0?a="right":a="center",f.margin?(p=f.margin,c=i[0]>0?p:-p,h=i[1]>0?p:-p,c=i[0]===0?0:c,h=i[1]===0?0:h,i=this._mapVector(i,o,1)):i=this._mapVector(i,o,1.2),u.textAlign=a,u.x=i[0]+c,u.y=i[1]+h,f.rotate?l=[f.rotate/180*Math.PI,i[0],i[1]]:l=[0,0,0],this.shapeList.push(new n({zlevel:this._zlevelBase,style:u,draggable:!1,hoverable:!1,rotation:l}))}},getIndicatorText:function(e,t){return this.polar[e]&&this.polar[e].__ecIndicator[t]&&this.polar[e].__ecIndicator[t].text},getDropBox:function(e){var e=e||0,t=this.polar[e],n=this.getCenter(e),r=t.__ecIndicator,i=r.length,s=[],o,u,a=t.type;if(a=="polygon"){for(var f=0;fu||u===undefined)&&(u=e),(e=1)a=Math.floor(a/l)*l-l;else{if(l===0)return u>0?(d=0,p=2*u):u===0?(d=0,p=100):(p=0,d=2*a),{max:p,min:d};c=(l+"").split(".")[1],h=c.length,a=Math.floor(a*Math.pow(10,h))/Math.pow(10,h)-l}Math.abs(a)<=l&&(a=0),u=a+Math.floor(l*Math.pow(10,h)*(n+1))/Math.pow(10,h)}else a=a>0?0:a;return r&&(u=u>0?u*1.2:u*.8,a=a>0?a*.8:a*1.2),{max:u,min:a}},_getDelta:function(e,t,n,r,i){var s=(e-t)/n,o,u;if(s>1)return i?(s=Math.ceil(s),s%i>0?(Math.ceil(s/i)+1)*i:s):(o=(s+"").split(".")[0],u=o.length,o.charAt(0)>=5?Math.pow(10,u):(o.charAt(0)-0+1)*Math.pow(10,u-1));if(s==1)return 1;if(s===0)return 0;if(!r){o=(s+"").split(".")[1],u=0;while(o[u]=="0")u++;return o[u]>=5?"0."+o.substring(0,u+1)-0+1/Math.pow(10,u):"0."+o.substring(0,u+1)-0+1/Math.pow(10,u+1)}return Math.ceil(s*Math.pow(10,r))/Math.pow(10,r)},getVector:function(e,t,n){e=e||0,t=t||0;var r=this.polar[e].__ecIndicator;if(t>=r.length)return;var i=this.polar[e].__ecIndicator[t],s=this.getCenter(e),o=i.vector,u=i.value.max,a=i.value.min,f;if(typeof n=="undefined")return s;switch(n){case"min":n=a;break;case"max":n=u;break;case"center":n=(u+a)/2}return u!=a?f=(n-a)/(u-a):f=.5,this._mapVector(o,s,f)},isInside:function(e){var t=this.getNearestIndex(e);return t?t.polarIndex:-1},getNearestIndex:function(e){var t,n,r,i,s,o,u,a,l;for(var c=0;ci[0])return{polarIndex:c,valueIndex:Math.floor((l+a/2)/a)%u}}},getIndicator:function(e){var e=e||0;return this.polar[e].indicator},refresh:function(e){e&&(this.option=e,this.polar=this.option.polar,this.series=this.option.series),this.clear(),this._buildShape()}},a.inherits(l,t),e("../component").define("polar",l),l}),define("echarts/chart/radar",["require","../component/base","./base","zrender/shape/Polygon","../component/polar","../config","../util/ecData","zrender/tool/util","zrender/tool/color","../util/accMath","../chart"],function(e){function a(e,r,i,s,o){t.call(this,e,r,i,s,o),n.call(this),this.refresh(s)}var t=e("../component/base"),n=e("./base"),r=e("zrender/shape/Polygon");e("../component/polar");var i=e("../config"),s=e("../util/ecData"),o=e("zrender/tool/util"),u=e("zrender/tool/color");return a.prototype={type:i.CHART_TYPE_RADAR,_buildShape:function(){this.selectedMap={},this._symbol=this.option.symbolList,this._queryTarget,this._dropBoxList=[],this._radarDataCounter=0;var e=this.series,t=this.component.legend,n;for(var r=0,s=e.length;r=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height)return i.isInsidePath(this._pathProxy.pathCommands,0,"fill",e,t)}},r.inherits(s,t),s}),define("echarts/util/kwargs",[],function(){function e(e,t){var n=new RegExp("(\\/\\*[\\w\\'\\,\\(\\)\\s\\r\\n\\*]*\\*\\/)|(\\/\\/[\\w\\s\\'][^\\n\\r]*$)|(\\/]*>)","gim"),r=new RegExp("\\s+","gim"),i=new RegExp("function.*?\\((.*?)\\)","i"),s=e.toString().replace(n,"").replace(r,"").match(i)[1].split(",");return t!==Object(t)&&(t={}),function(){var n=Array.prototype.slice.call(arguments),r=n[n.length-1];r&&r.constructor===Object?n.pop():r={};for(var i=0;i=0){var n=e.split(/\s*:\s*/),r=parseInt(n[2]||1,10),i,s;if(r===0)throw new Error("Slice step cannot be zero");return r>0?(i=parseInt(n[0]||0,10),s=parseInt(n[1]||t,10)):(i=parseInt(n[0]||t-1,10),s=parseInt(n[1]||-1,10)),i<0&&(i=t+i),s<0&&n[1]&&(s=t+s),r>0?(i=Math.max(Math.min(t,i),0),s=Math.max(Math.min(t,s),0)):(i=Math.max(Math.min(t-1,i),-1),s=Math.max(Math.min(t-1,s),-1)),[i,s,r]}var i=parseInt(e,10);i<0&&(i=t+i);if(i<0||i>t)throw new Error(N(e));return i=Math.max(Math.min(t-1,i),0),[i,i+1,1]}function g(e){var t=e[0];for(var n=1;n=this._shape.length)throw new Error(T(e[r]));if(e.length<=1)return this;var i=n.slice();for(var r=0;r=Math.ceil(e.length/2);s--)i[e[r]]=e[s],i[e[s]]=e[r];return this._transposelike(i,t)}),swapaxes:t(function(e,t,n){return this.transpose([e,t],n)}),rollaxis:t(function(e,t,n){if(e>=this._shape.length)throw new Error(T(e));var r=[];for(var i=0;i=this._shape.length||e<0)throw new Error(T(e));var s=this._shape.slice();s.splice(e,1);if(t&&!S(s,t._shape))throw new Error(x(s,t._shape));t||(t=new v(this._dtype),t.initFromShape(s));var o=t._array,u=w(this._shape,e),a=this._shape[e],f=u*a;return n.call(this,o,i,f,a,u),t}return r.call(this,i)},_withPreprocess2:function(e,t,n,r){var i=this._array;if(!this._size)return;if(t&&!S(this._shape,t._shape))throw new Error(x(this._shape,t._shape));t||(t=new v(this._dtype),t.initFromShape(this._shape));var s=t._array;if(typeof e!="undefined"){e<0&&(e=this._shape.length+e);if(e>=this._shape.length||e<0)throw new Error(T(e));if(e>=this._shape.length)throw new Error(T(e));var o=w(this._shape,e),u=this._shape[e],a=o*u;n.call(this,s,i,a,u,o)}else t.reshape([this._size]),r.call(this,s,i);return t},max:t(function(){function e(e,t,n,r,i){var s=0;for(var o=0;of&&(f=c),a+=i}e[s++]=f}}function t(e){var t=e[0];for(var n=1;nt&&(t=e[n]);return t}return function(n,r){return this._withPreprocess1(n,r,e,t)}}()),min:t(function(){function e(e,t,n,r,i){var s=0;for(var o=0;ol&&(l=h,a=c),f+=i}e[s++]=a}}function t(e){var t=e[0],n=0;for(var r=1;rt&&(n=r,t=e[r]);return n}return function(n,r){return this._withPreprocess1(n,r,e,t)}}()),argmin:t(function(){function e(e,t,n,r,i){var s=0;for(var o=0;ol&&(l=h),a+=i}e[s++]=l-f}}function t(e){var t=e[0],n=e[0];for(var r=1;rn&&(n=e[r]);return n-t}return function(n,r){return this._withPreprocess1(n,r,e,t)}}()),sort:t(function(e,t){e<0&&(e=this._shape.length+e);var n;t==="ascending"?n=function(e,t){return e-t}:t==="descending"&&(n=function(e,t){return t-e});var r=this._array,i=w(this._shape,e),s=this._shape[e],o=i*s,u=new Array(s);for(var a=0;as&&(s=a)}var f=s-i,l=t-e;for(var u=0;u=0&&y>=0){if(e._shape[g]==1)i.unshift(t._shape[y]),b=e.repeat(t._shape[y],g);else if(t._shape[y]==1)i.unshift(e._shape[g]),E=t.repeat(e._shape[g],y);else{if(t._shape[y]!=e._shape[g])throw new Error(x(e._shape,t._shape));i.unshift(e._shape[g])}g--,y--}for(var T=g;T>=0;T--)i.unshift(e._shape[T]);for(var T=y;T>=0;T--)i.unshift(t._shape[T]);e=b,t=E}if(!r)r=new v(this._dtype),r.initFromShape(i);else if(!S(i,r._shape))throw new Error(x(i,r._shape));var N=r._array,C,k,L,A;d?(C=t._shape.length-1,k=!1,L=e,A=t._array):m?(C=e._shape.length-1,k=!0,A=t,L=e._array):(C=Math.abs(e._shape.length-t._shape.length),k=e._shape.length>=t._shape.length,L=e._array,A=t._array);var O=w(i,C),M=i[C],_=O*M,D=r._size/_,P,H,B,j=0;if(k)if(m)for(var F=0;F0)for(var c=r[0];cr[1];c+=r[2])l(e+1,t+s*c);else if(r[2]>0)for(var c=r[0];cr[1];c+=r[2])for(var h=0;hthis._shape.length)throw new Error("Too many indices");var o=i.length,u;s.length?(t=new v(this._dtype),t.initFromShape(s),u=t._array):u=[];var a=this._array,f=0;return l(0,0),s.length?t:u[0]},set:function(e,t){typeof e=="number"&&(e=e.toString());var n=E(this._shape),r=this._parseRanges(e),i=r[0],s=r[1];if(i.length>this._shape.length)throw new Error("Too many indices");var o=typeof t=="number",u=i.length,a=this._array;if(o)var f=t;else{if(!S(s,t.shape()))throw new Error(x(s,t.shape()));var f=t._array}var l=0,c=function(e,t){var r=i[e],s=n[e];if(e0)for(var h=r[0];hr[1];h+=r[2])c(e+1,t+s*h);else if(r[2]>0)for(var h=r[0];hr[1];h+=r[2])for(var p=0;pu)throw new Error(N(e[a]));if(e[a]=0&&h>=0){if(l[c]===1)p=t.repeat(f[h],c);else if(l[c]!==f[h])throw new Error(x(l,f));c--,h--}t=p;var d=w(this._shape,n),u=this._shape[n],m=u*d,y=this._size/m,b=e.length,E=new Uint32Array(y*b),S=0;for(var T=0;T=0){for(var a=_-1;a>=D;a--)i[P--]=A[a];_=D,D=E[--M];for(var a=0;a=0;a--)i[P--]=A[a];return this._array=i,this._shape=k,this._size=L,this}),append:function(){console.warn("TODO")},"delete":t(function(e,t){var n=this._array;typeof e=="number"&&(e=[e]);var r=this._size;typeof t=="undefined"&&(this._shape=[r],t=0);var i=w(this._shape,t),s=this._shape[t],o=i*s,u=0;for(var a=0;as)throw new Error(N(l));if(l=0){var a=Math.floor((u[1]-u[0])/u[2]);a=a<0?0:a,r.push(a)}i++}for(;i0&&(E.style.brushType="both"),E.highlightStyle.lineWidth>0&&(E.highlightStyle.brushType="both"),a.pack(E,this.chordSeries[0],0,t[m],m,g.name);if(u){var S=[b+w]/2;S%=360;var x=S<=90||S>=270;S=S*Math.PI/180;var T=[Math.cos(S),-Math.sin(S)],N=this.showScaleText?35+h:h,C=l.scale([],T,this.outerRadius+N);l.add(C,C,this.center);var k={zlevel:this._zlevelBase-1,hoverable:!1,style:{text:g.name,textAlign:x?"left":"right",color:f}};c?(k.rotation=x?S:Math.PI+S,x?k.style.x=this.outerRadius+N:k.style.x=-this.outerRadius-N,k.style.y=0,k.position=this.center):(k.style.x=C[0],k.style.y=C[1]),k.style.textColor=this.deepQuery([g,this.chordSerieSample],"itemStyle.normal.label.textStyle.color")||"#fff",k.style.textFont=this.getFont(this.deepQuery([g,this.chordSerieSample],"itemStyle.normal.label.textStyle")),k=new r(k),this.shapeList.push(k)}E.onmouseover=d(m),E.onmouseout=v(),E=new s(E),this.shapeList.push(E),this.sectorShapes.push(E)}},_buildChords:function(e,t){var n=e.length;if(!n)return;var r=e[0][0].length,i=this.chordSerieSample.itemStyle.normal.chordStyle.lineStyle,s=this.chordSerieSample.itemStyle.emphasis.chordStyle.lineStyle;for(var u=0;u=270,E={zlevel:this._zlevelBase-1,hoverable:!1,style:{x:w?this.outerRadius+this.scaleLineLength+4:-this.outerRadius-this.scaleLineLength-4,y:0,text:Math.round(b.shift()*10)/10+t,textAlign:w?"left":"right"},position:this.center.slice(),rotation:w?[h/180*Math.PI,0,0]:[(h+180)/180*Math.PI,0,0]};E=new r(E),this.shapeList.push(E),g+=this.scaleUnitAngle*5}}},normalizeValue:function(e){var t=[],n=(new c(e)).max(),r,i;n>1e4?(r="k",i=.001):n>1e7?(r="m",i=1e-6):n>1e10?(r="b",i=1e-9):(r="",i=1);for(var s=0;s0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i),e},negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e},set:function(e,t,n){return e[0]=t,e[1]=n,e}}:n=t("zrender/tool/vector");var i=typeof Float32Array=="undefined"?Array:Float32Array;s.prototype.beforeUpdate=function(){for(var e=0;e=e&&this.bbox[1]<=t&&this.bbox[3]>=t},s.prototype.setBBox=function(e,t,n,r){this.bbox[0]=e,this.bbox[1]=t,this.bbox[2]=n,this.bbox[3]=r,this.size=(n-e+r-t)/2},s.prototype._newSubRegion=function(){var e=this.subRegions[this.nSubRegions];return e||(e=new s,this.subRegions[this.nSubRegions]=e),this.nSubRegions++,e},s.prototype._addNodeToSubRegion=function(e){var t=this.findSubRegion(e.position[0],e.position[1]),n=this.bbox;if(!t){var r=(n[0]+n[2])/2,i=(n[1]+n[3])/2,s=(n[2]-n[0])/2,o=(n[3]-n[1])/2,u=e.position[0]>=r?1:0,a=e.position[1]>=i?1:0,t=this._newSubRegion();t.setBBox(u*s+n[0],a*o+n[1],(u+1)*s+n[0],(a+1)*o+n[1])}t.addNode(e)},s.prototype._updateCenterOfMass=function(e){this.centerOfMass==null&&(this.centerOfMass=n.create());var t=this.centerOfMass[0]*this.mass,r=this.centerOfMass[1]*this.mass;t+=e.position[0]*e.mass,r+=e.position[1]*e.mass,this.mass+=e.mass,this.centerOfMass[0]=t/this.mass,this.centerOfMass[1]=r/this.mass},a.prototype.initNodes=function(e,t,n){this.temperature=1;var r=e.length/2;this.nodes.length=0;var i=typeof n!="undefined";for(var s=0;s0&&this.applyNodeGravity(o)}for(var t=0;t0){n.scale(f,f,1/p);var d=n.len(s.speedPrev);d>0&&(p=Math.min(p/d,this.maxSpeedIncrease)*d,n.scaleAndAdd(l,s.speedPrev,f,p))}var v=n.len(l),h=Math.min(v,100)/(v+.1);n.scale(l,l,h),n.add(s.position,s.position,l)}},a.prototype.applyRegionToNodeRepulsion=function(){var e=n.create();return function(r,i){if(r.node)this.applyNodeToNodeRepulsion(r.node,i,!0);else{n.sub(e,i.position,r.centerOfMass);var s=e[0]*e[0]+e[1]*e[1];if(s>this.barnesHutTheta*r.size*r.size){var o=this._k*this._k*(i.mass+r.mass)/(s+1);n.scaleAndAdd(i.force,i.force,e,o*2)}else for(var u=0;u0?u=a*f/(l*l):l<=0&&(u=a*10*f)}else u=a*f/o;s||n.scaleAndAdd(r.force,r.force,e,u*2),n.scaleAndAdd(i.force,i.force,e,-u*2)}}(),a.prototype.applyEdgeAttraction=function(){var e=n.create();return function(r){var i=r.node1,s=r.node2;n.sub(e,i.position,s.position);var o=n.len(e),u;this.edgeWeightInfluence===0?u=1:this.edgeWeightInfluence==1?u=r.weight:u=Math.pow(r.weight,this.edgeWeightInfluence);var a;if(this.preventOverlap){o=o-i.size-s.size;if(o<=0)return}var a=-u*o/this._k;n.scaleAndAdd(i.force,i.force,e,a),n.scaleAndAdd(s.force,s.force,e,-a)}}(),a.prototype.applyNodeGravity=function(){var e=n.create();return function(t){n.sub(e,this.center,t.position),this.width>this.height?e[1]*=this.width/this.height:e[0]*=this.height/this.width;var r=n.len(e)/100;this.strongGravity?n.scaleAndAdd(t.force,t.force,e,r*this.gravity*t.mass):n.scaleAndAdd(t.force,t.force,e,this.gravity*t.mass/(r+1))}}(),a.prototype.updateBBox=function(){var e=Infinity,t=Infinity,n=-Infinity,r=-Infinity;for(var i=0;i0?(a.layout.radius=(a.layout.radius-s)*(i-r)/f+r,a.layout.mass=a.layout.radius/i):(a.layout.radius=(i-r)/2,a.layout.mass=.5)}for(var u=0;uo&&(o=v.layout.weight)}for(var u=0;u.01&&this._layout.step(this._steps)},refresh:function(e){e&&(this.option=e,this.series=this.option.series),this._init()},dispose:function(){this.clear(),this.shapeList=null,this.effectList=null,this._layout.dispose(),this._layout=null,this.__nodePositionMap={}}},l.inherits(p,n),l.inherits(p,t),e("../chart").define("force",p),p}),define("echarts/util/shape/HalfSmoothPolygon",["require","zrender/shape/Base","zrender/shape/util/smoothBezier","zrender/tool/util","zrender/shape/Polygon"],function(e){function i(e){t.call(this,e)}var t=e("zrender/shape/Base"),n=e("zrender/shape/util/smoothBezier"),r=e("zrender/tool/util");return i.prototype={type:"half-smooth-polygon",buildPath:function(t,r){var i=r.pointList;if(i.length<2)return;if(r.smooth){var s=n(i.slice(0,-2),r.smooth,!1,r.smoothConstraint);t.moveTo(i[0][0],i[0][1]);var o,u,a,f=i.length;for(var l=0;l0&&this._buildSinglePosition(f,t[f]);this.addShapeList()},_buildSinglePosition:function(e,t){var n=this._mapData(t),r=n.locationMap,i=n.maxDataLength;if(i===0||r.length===0)return;switch(e){case"bottom":case"top":this._buildHorizontal(t,i,r,this.xMarkMap);break;case"left":case"right":this._buildVertical(t,i,r,this.xMarkMap)}for(var s=0,o=t.length;s0&&(this.finalPLMap[s]=this.finalPLMap[s]||[],this.finalPLMap[s].push(g[s]),g[s]=[]);continue}b>=0?(p-=T>0?l.getCoordSize(b):d-l.getCoord(b),h=p):b<0&&(v+=T>0?l.getCoordSize(b):l.getCoord(b)-m,h=v),g[s].push([c,h,w,a.getNameByIndex(w),c,d]),r[s].min>b&&(r[s].min=b,r[s].minY=h,r[s].minX=c),r[s].max0&&(this.finalPLMap[k]=this.finalPLMap[k]||[],this.finalPLMap[k].push(g[k]),g[k]=[]);for(var S=0,x=n.length;S0&&(r[s].average=(r[s].sum/r[s].counter).toFixed(2)-0),h=this.component.yAxis.getAxis(i[s].yAxisIndex||0).getCoord(r[s].average),r[s].averageLine=[[this.component.grid.getX(),h],[this.component.grid.getXend(),h]],r[s].minLine=[[this.component.grid.getX(),r[s].minY],[this.component.grid.getXend(),r[s].minY]],r[s].maxLine=[[this.component.grid.getX(),r[s].maxY],[this.component.grid.getXend(),r[s].maxY]];this._buildBorkenLine(e,this.finalPLMap,a,"horizontal")},_buildVertical:function(e,t,n,r){var i=this.series,s=n[0][0],o=i[s],u=o.yAxisIndex,a=this.component.yAxis.getAxis(u),f,l,c,h,p,d,v,m,g={},y,b;for(var w=0,E=t;w0&&(this.finalPLMap[s]=this.finalPLMap[s]||[],this.finalPLMap[s].push(g[s]),g[s]=[]);continue}b>=0?(p+=T>0?l.getCoordSize(b):l.getCoord(b)-d,c=p):b<0&&(v-=T>0?l.getCoordSize(b):m-l.getCoord(b),c=v),g[s].push([c,h,w,a.getNameByIndex(w),d,h]),r[s].min>b&&(r[s].min=b,r[s].minX=c,r[s].minY=h),r[s].max0&&(this.finalPLMap[k]=this.finalPLMap[k]||[],this.finalPLMap[k].push(g[k]),g[k]=[]);for(var S=0,x=n.length;S0&&(r[s].average=(r[s].sum/r[s].counter).toFixed(2)-0),c=this.component.xAxis.getAxis(i[s].xAxisIndex||0).getCoord(r[s].average),r[s].averageLine=[[c,this.component.grid.getYend()],[c,this.component.grid.getY()]],r[s].minLine=[[r[s].minX,this.component.grid.getYend()],[r[s].minX,this.component.grid.getY()]],r[s].maxLine=[[r[s].maxX,this.component.grid.getYend()],[r[s].maxX,this.component.grid.getY()]];this._buildBorkenLine(e,this.finalPLMap,a,"vertical")},_buildBorkenLine:function(e,t,n,i){var o=this.series,l;for(var c=e.length-1;c>=0;c--){var h=e[c],p=o[h],d=t[h];if(p.type===this.type&&d!=null){var v=this._getBbox(h,i),m=this._sIndex2ColorMap[h],g=this.query(p,"itemStyle.normal.lineStyle.width"),y=this.query(p,"itemStyle.normal.lineStyle.type"),b=this.query(p,"itemStyle.normal.lineStyle.color"),w=this.getItemStyleColor(this.query(p,"itemStyle.normal.color"),h,-1),E=this.query(p,"itemStyle.normal.areaStyle")!=null,S=this.query(p,"itemStyle.normal.areaStyle.color");for(var x=0,T=d.length;x=0;r--){f=this.shapeList[r]._seriesIndex;if(n[f]&&!n[f][3]){if(this.shapeList[r]._main&&this.shapeList[r].style.pointList.length>1){l=this.shapeList[r].style.pointList,o=Math.abs(l[0][0]-l[1][0]),a=Math.abs(l[0][1]-l[1][1]),c=this.shapeList[r]._orient==="horizontal";if(n[f][2]){if(this.shapeList[r].type==="polygon"){var h=l.length;this.shapeList[r].style.pointList[h-3]=l[h-2],c?this.shapeList[r].style.pointList[h-3][0]=l[h-4][0]:this.shapeList[r].style.pointList[h-3][1]=l[h-4][1],this.shapeList[r].style.pointList[h-2]=l[h-1]}this.shapeList[r].style.pointList.pop(),c?(s=o,u=0):(s=0,u=-a)}else{this.shapeList[r].style.pointList.shift();if(this.shapeList[r].type==="polygon"){var p=this.shapeList[r].style.pointList.pop();c?p[0]=l[0][0]:p[1]=l[0][1],this.shapeList[r].style.pointList.push(p)}c?(s=-o,u=0):(s=0,u=a)}this.zr.modShape(this.shapeList[r].id,{style:{pointList:this.shapeList[r].style.pointList}},!0)}else{if(n[f][2]&&this.shapeList[r]._dataIndex===t[f].data.length-1){this.zr.delShape(this.shapeList[r].id);continue}if(!n[f][2]&&this.shapeList[r]._dataIndex===0){this.zr.delShape(this.shapeList[r].id);continue}}this.shapeList[r].position=[0,0],this.zr.animate(this.shapeList[r].id,"").when(500,{position:[s,u]}).start()}}}},i.prototype.iconLibrary.legendLineIcon=c,a.inherits(l,n),a.inherits(l,t),e("../chart").define("line",l),l}),define("echarts/chart/bar",["require","../component/base","./base","zrender/shape/Rectangle","../component/axis","../component/grid","../component/dataZoom","../config","../util/ecData","zrender/tool/util","zrender/tool/color","../chart"],function(e){function a(e,r,i,s,o){t.call(this,e,r,i,s,o),n.call(this),this.refresh(s)}var t=e("../component/base"),n=e("./base"),r=e("zrender/shape/Rectangle");e("../component/axis"),e("../component/grid"),e("../component/dataZoom");var i=e("../config"),s=e("../util/ecData"),o=e("zrender/tool/util"),u=e("zrender/tool/color");return a.prototype={type:i.CHART_TYPE_BAR,_buildShape:function(){var e=this.series;this.selectedMap={},this.xMarkMap={},this._sIndex2colorMap={};var t={top:[],bottom:[],left:[],right:[]},n,r,s,o;for(var u=0,a=e.length;u0&&this._buildSinglePosition(f,t[f],this.xMarkMap);this.addShapeList()},_buildSinglePosition:function(e,t,n){var r=this._mapData(t),i=r.locationMap,s=r.maxDataLength;if(s===0||i.length===0)return;switch(e){case"bottom":case"top":this._buildHorizontal(s,i,t,n);break;case"left":case"right":this._buildVertical(s,i,t,n)}},_mapData:function(e){var t=this.series,n,r=0,i={},s="__kener__stack__",o,u,a=this.component.legend,f=[],l=0,c;for(var h=0,p=e.length;h0&&(c.style.x+=1,c.style.y+=1,c.style.width-=2,c.style.height-=2,c.style.strokeColor=c.highlightStyle.strokeColor=n.itemStyle.normal.barBorderColor,c.highlightStyle.lineWidth=3,c.style.brushType="both"),a.setItemShape(u,c))):(this.selectedMap[u]=!0,this._sIndex2colorMap[e[h]]=this.zr.getColor(e[h])),this.selectedMap[u]&&(o=n.stack||s+e[h],i[o]==null?(i[o]=r,f[r]=[e[h]],r++):f[i[o]].push(e[h])),l=Math.max(l,n.data.length);return{locationMap:f,maxDataLength:l}},_buildHorizontal:function(e,t,n,i){var s=this.series,o=t[0][0],u=s[o],a=u.xAxisIndex,f=this.component.xAxis.getAxis(a),l,c,h=this._mapSize(f,t),p=h.gap,d=h.barGap,v=h.barWidthMap,m=h.barWidth,g=h.barMinHeightMap,y,b=h.interval,w,E,S,x,T,N,C,k,L;for(var A=0,O=e;A0?(y=D>0?c.getCoordSize(L):x-c.getCoord(L),P===1&&g[o]>y&&(y=g[o]),S-=y,E=S):L<0?(y=D>0?c.getCoordSize(L):c.getCoord(L)-N,P===1&&g[o]>y&&(y=g[o]),E=T,T+=y):(y=0,S-=y,E=S),i[o][A]=w+(v[o]||m)/2,i[o].min>L&&(i[o].min=L,i[o].minY=E,i[o].minX=i[o][A]),i[o].max0&&(i[o].average=(i[o].sum/i[o].counter).toFixed(2)-0),E=this.component.yAxis.getAxis(s[o].yAxisIndex||0).getCoord(i[o].average),i[o].averageLine=[[this.component.grid.getX(),E],[this.component.grid.getXend(),E]],i[o].minLine=[[this.component.grid.getX(),i[o].minY],[this.component.grid.getXend(),i[o].minY]],i[o].maxLine=[[this.component.grid.getX(),i[o].maxY],[this.component.grid.getXend(),i[o].maxY]],i[o].isHorizontal=!0,this.buildMark(o)},_buildVertical:function(e,t,n,i){var s=this.series,o=t[0][0],u=s[o],a=u.yAxisIndex,f=this.component.yAxis.getAxis(a),l,c,h=this._mapSize(f,t),p=h.gap,d=h.barGap,v=h.barWidthMap,m=h.barWidth,g=h.barMinHeightMap,y,b=h.interval,w,E,S,x,T,N,C,k,L;for(var A=0,O=e;A0?(y=D>0?c.getCoordSize(L):c.getCoord(L)-x,P===1&&g[o]>y&&(y=g[o]),w=S,S+=y):L<0?(y=D>0?c.getCoordSize(L):N-c.getCoord(L),P===1&&g[o]>y&&(y=g[o]),T-=y,w=T):(y=0,w=S,S+=y),i[o][A]=E-(v[o]||m)/2,i[o].min>L&&(i[o].min=L,i[o].minX=w+y,i[o].minY=i[o][A]),i[o].max0&&(i[o].average=(i[o].sum/i[o].counter).toFixed(2)-0),w=this.component.xAxis.getAxis(s[o].xAxisIndex||0).getCoord(i[o].average),i[o].averageLine=[[w,this.component.grid.getYend()],[w,this.component.grid.getY()]],i[o].minLine=[[i[o].minX,this.component.grid.getYend()],[i[o].minX,this.component.grid.getY()]],i[o].maxLine=[[i[o].maxX,this.component.grid.getYend()],[i[o].maxX,this.component.grid.getY()]],i[o].isHorizontal=!1,this.buildMark(o)},_mapSize:function(e,t,n){var r=this.series,i,s={},o={},u,a=0,f=0,l,c,h,p,d=1;for(var v=0,m=t.length;v1?typeof c=="string"&&c.match(/%$/)?Math.floor(e.getGap()*(100-parseFloat(c))/100):e.getGap()-c:f,x=0,l=a>1?Math.floor((S-f)/(a-1)):0;if(l<0)return this._mapSize(e,t,!0)}return{barWidthMap:s,barMinHeightMap:o,gap:S,barWidth:x,barGap:l,interval:d}},_getBarItem:function(e,t,n,r,i,o,a,f){var l=this.series,c,h=l[e],p=h.data[t],d=this._sIndex2colorMap[e],v=[p,h],m=this.deepQuery(v,"itemStyle.normal.color")||d,g=this.deepQuery(v,"itemStyle.emphasis.color"),y=this.deepMerge(v,"itemStyle.normal"),b=y.barBorderWidth,w=this.deepMerge(v,"itemStyle.emphasis");c={zlevel:this._zlevelBase,clickable:this.deepQuery(v,"clickable"),style:{x:r,y:i,width:o,height:a,brushType:"both",color:this.getItemStyleColor(m,e,t,p),radius:y.barBorderRadius,lineWidth:b,strokeColor:y.barBorderColor},highlightStyle:{color:this.getItemStyleColor(g,e,t,p),radius:w.barBorderRadius,lineWidth:w.barBorderWidth,strokeColor:w.barBorderColor},_orient:f},c.highlightStyle.color=c.highlightStyle.color||(typeof c.style.color=="string"?u.lift(c.style.color,-0.3):c.style.color),b>0&&c.style.height>b&&c.style.width>b?(c.style.y+=b/2,c.style.height-=b,c.style.x+=b/2,c.style.width-=b):c.style.brushType="fill",c.highlightStyle.textColor=c.highlightStyle.color,c=this.addLabel(c,h,p,n,f);if(c.style.textPosition==="insideLeft"||c.style.textPosition==="insideRight"||c.style.textPosition==="insideTop"||c.style.textPosition==="insideBottom"){var E=5;switch(c.style.textPosition){case"insideLeft":c.style.textX=c.style.x+E,c.style.textY=c.style.y+c.style.height/2,c.style.textAlign="left",c.style.textBaseline="middle";break;case"insideRight":c.style.textX=c.style.x+c.style.width-E,c.style.textY=c.style.y+c.style.height/2,c.style.textAlign="right",c.style.textBaseline="middle";break;case"insideTop":c.style.textX=c.style.x+c.style.width/2,c.style.textY=c.style.y+E/2,c.style.textAlign="center",c.style.textBaseline="top";break;case"insideBottom":c.style.textX=c.style.x+c.style.width/2,c.style.textY=c.style.y+c.style.height-E/2,c.style.textAlign="center",c.style.textBaseline="bottom"}c.style.textPosition="specific",c.style.textColor=c.style.textColor||"#fff"}return this.deepQuery([p,h,this.option],"calculable")&&(this.setCalculable(c),c.draggable=!0),s.pack(c,l[e],e,l[e].data[t],t,n),c},getMarkCoord:function(e,t){var n=this.series[e],r=this.xMarkMap[e],i=this.component.xAxis.getAxis(n.xAxisIndex),s=this.component.yAxis.getAxis(n.yAxisIndex),o,u;if(!t.type||t.type!=="max"&&t.type!=="min"&&t.type!=="average")if(r.isHorizontal){o=typeof t.xAxis=="string"&&i.getIndexByName?i.getIndexByName(t.xAxis):t.xAxis||0;var a=r[o];a=a!=null?a:typeof t.xAxis!="string"&&i.getCoordByIndex?i.getCoordByIndex(t.xAxis||0):i.getCoord(t.xAxis||0),u=[a,s.getCoord(t.yAxis||0)]}else{o=typeof t.yAxis=="string"&&s.getIndexByName?s.getIndexByName(t.yAxis):t.yAxis||0;var f=r[o];f=f!=null?f:typeof t.yAxis!="string"&&s.getCoordByIndex?s.getCoordByIndex(t.yAxis||0):s.getCoord(t.yAxis||0),u=[i.getCoord(t.xAxis||0),f]}else u=[r[t.type+"X"],r[t.type+"Y"],r[t.type+"Line"],r[t.type]];return u},refresh:function(e){e&&(this.option=e,this.series=e.series),this.backupShapeList(),this._buildShape()},addDataAnimation:function(e){var t=this.series,n={};for(var r=0,i=e.length;r=0;r--){c=s.get(this.shapeList[r],"seriesIndex");if(n[c]&&!n[c][3]&&this.shapeList[r].type==="rectangle"){h=s.get(this.shapeList[r],"dataIndex"),l=t[c];if(n[c][2]&&h===l.data.length-1){this.zr.delShape(this.shapeList[r].id);continue}if(!n[c][2]&&h===0){this.zr.delShape(this.shapeList[r].id);continue}this.shapeList[r]._orient==="horizontal"?(f=this.component.yAxis.getAxis(l.yAxisIndex||0).getGap(),a=n[c][2]?-f:f,o=0):(u=this.component.xAxis.getAxis(l.xAxisIndex||0).getGap(),o=n[c][2]?u:-u,a=0),this.shapeList[r].position=[0,0],this.zr.animate(this.shapeList[r].id,"").when(500,{position:[o,a]}).start()}}}},o.inherits(a,n),o.inherits(a,t),e("../chart").define("bar",a),a}),define("echarts/chart/pie",["require","../component/base","./base","zrender/shape/Text","zrender/shape/Ring","zrender/shape/Circle","zrender/shape/Sector","zrender/shape/BrokenLine","../config","../util/ecData","zrender/tool/util","zrender/tool/math","zrender/tool/color","../chart"],function(e){function p(e,r,i,s,o){t.call(this,e,r,i,s,o),n.call(this);var u=this;u.shapeHandler.onmouseover=function(e){var t=e.target,n=f.get(t,"seriesIndex"),r=f.get(t,"dataIndex"),i=f.get(t,"special"),s=t._lastAddRadius,o=t.style.startAngle,a=t.style.endAngle,l=t.highlightStyle.color,c=u.getLabel(n,r,i,s,o,a,l,!0);c&&u.zr.addHoverShape(c);var h=u.getLabelLine(n,r,s,t.style.r0,t.style.r,o,a,l,!0);h&&u.zr.addHoverShape(h)},this.refresh(s)}var t=e("../component/base"),n=e("./base"),r=e("zrender/shape/Text"),i=e("zrender/shape/Ring"),s=e("zrender/shape/Circle"),o=e("zrender/shape/Sector"),u=e("zrender/shape/BrokenLine"),a=e("../config"),f=e("../util/ecData"),l=e("zrender/tool/util"),c=e("zrender/tool/math"),h=e("zrender/tool/color");return p.prototype={type:a.CHART_TYPE_PIE,_buildShape:function(){var e=this.series,t=this.component.legend;this.selectedMap={},this._selected={};var n,r,o;this._selectedMode=!1;var u;for(var l=0,c=e.length;l0&&Math.abs(m-g)<15&&p<4&&this._needLabel(n,r[l],!1)&&this.deepQuery([r[l],n],"itemStyle.normal.label.position")!="center"?d+=h<4?20:-20:d=0,this._buildItem(e,l,h,d,r[l].selected,x,T,m,g,w),v||(m=g)}},_buildItem:function(e,t,n,r,i,s,o,u,a,l){var c=this.series,h=this.getSector(e,t,n,i,s,o,u,a,l);f.pack(h,c[e],e,c[e].data[t],t,c[e].data[t].name,n),h._lastAddRadius=r,this.shapeList.push(h);var p=this.getLabel(e,t,n,r,u,a,l,!1);p&&(f.pack(p,c[e],e,c[e].data[t],t,c[e].data[t].name,n),p._dataIndex=t,this.shapeList.push(p));var d=this.getLabelLine(e,t,r,s,o,u,a,l,!1);d&&(f.pack(d,c[e],e,c[e].data[t],t,c[e].data[t].name,n),d._dataIndex=t,this.shapeList.push(d))},getSector:function(e,t,n,r,i,s,u,a,f){var l=this.series,p=l[e],d=p.data[t],v=[d,p],m=this.parseCenter(this.zr,p.center),g=this.deepMerge(v,"itemStyle.normal")||{},y=this.deepMerge(v,"itemStyle.emphasis")||{},b=this.getItemStyleColor(g.color,e,t,d)||f,w=this.getItemStyleColor(y.color,e,t,d)||(typeof b=="string"?h.lift(b,-0.2):b),E={zlevel:this._zlevelBase,clickable:this.deepQuery(v,"clickable"),style:{x:m[0],y:m[1],r0:i,r:s,startAngle:u,endAngle:a,brushType:"both",color:b,lineWidth:g.borderWidth,strokeColor:g.borderColor,lineJoin:"round"},highlightStyle:{color:w,lineWidth:y.borderWidth,strokeColor:y.borderColor,lineJoin:"round"},_seriesIndex:e,_dataIndex:t};if(r){var S=((E.style.startAngle+E.style.endAngle)/2).toFixed(2)-0;E.style._hasSelected=!0,E.style._x=E.style.x,E.style._y=E.style.y;var x=this.query(p,"selectedOffset");E.style.x+=c.cos(S,!0)*x,E.style.y-=c.sin(S,!0)*x,this._selected[e][t]=!0}else this._selected[e][t]=!1;this._selectedMode&&(E.onclick=this.shapeHandler.onclick),this.deepQuery([d,p,this.option],"calculable")&&(this.setCalculable(E),E.draggable=!0);if(this._needLabel(p,d,!0)||this._needLabelLine(p,d,!0))E.onmouseover=this.shapeHandler.onmouseover;return E=new o(E),E},getLabel:function(e,t,n,i,s,o,u,a){var f=this.series,h=f[e],p=h.data[t];if(!this._needLabel(h,p,a))return;var d=a?"emphasis":"normal",v=l.merge(l.clone(p.itemStyle)||{},h.itemStyle),m=v[d].label,g=m.textStyle||{},y=this.parseCenter(this.zr,h.center),b=y[0],w=y[1],E,S,x=((o+s)/2+360)%360,T=this.parseRadius(this.zr,h.radius),N,C="middle";return m.position=m.position||v.normal.label.position,m.position==="center"?(T=T[1],E=b,S=w,N="center"):m.position==="inner"?(T=(T[0]+T[1])/2+i,E=Math.round(b+T*c.cos(x,!0)),S=Math.round(w-T*c.sin(x,!0)),u="#fff",N="center"):(T=T[1]- -v[d].labelLine.length+i,E=b+T*c.cos(x,!0),S=w-T*c.sin(x,!0),N=x>=90&&x<=270?"right":"left"),m.position!="center"&&m.position!="inner"&&(E+=N==="left"?20:-20),p.__labelX=E-(N==="left"?5:-5),p.__labelY=S,new r({zlevel:this._zlevelBase+1,hoverable:!1,style:{x:E,y:S,color:g.color||u,text:this.getLabelText(e,t,n,d),textAlign:g.align||N,textBaseline:g.baseline||C,textFont:this.getFont(g)},highlightStyle:{brushType:"fill"},_seriesIndex:e,_dataIndex:t})},getLabelText:function(e,t,n,r){var i=this.series,s=i[e],o=s.data[t],u=this.deepQuery([o,s],"itemStyle."+r+".label.formatter");if(!u)return o.name;if(typeof u=="function")return u.call(this.myChart,s.name,o.name,o.value,n);if(typeof u=="string")return u=u.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}").replace("{d}","{d0}"),u=u.replace("{a0}",s.name).replace("{b0}",o.name).replace("{c0}",o.value).replace("{d0}",n),u},getLabelLine:function(e,t,n,r,i,s,o,a,f){var h=this.series,p=h[e],d=p.data[t];if(this._needLabelLine(p,d,f)){var v=f?"emphasis":"normal",m=l.merge(l.clone(d.itemStyle)||{},p.itemStyle),g=m[v].labelLine,y=g.lineStyle||{},b=this.parseCenter(this.zr,p.center),w=b[0],E=b[1],S=i,x=this.parseRadius(this.zr,p.radius)[1]- -g.length+n,T=(o+s)/2%360,N=c.cos(T,!0),C=c.sin(T,!0);return new u({zlevel:this._zlevelBase+1,hoverable:!1,style:{pointList:[[w+S*N,E-S*C],[w+x*N,E-x*C],[d.__labelX,d.__labelY]],strokeColor:y.color||a,lineType:y.type,lineWidth:y.width},_seriesIndex:e,_dataIndex:t})}return},_needLabel:function(e,t,n){return this.deepQuery([t,e],"itemStyle."+(n?"emphasis":"normal")+".label.show")},_needLabelLine:function(e,t,n){return this.deepQuery([t,e],"itemStyle."+(n?"emphasis":"normal")+".labelLine.show")},reformOption:function(e){var t=l.merge;return e=t(e||{},this.ecTheme.pie),e.itemStyle.normal.label.textStyle=t(e.itemStyle.normal.label.textStyle||{},this.ecTheme.textStyle),e.itemStyle.emphasis.label.textStyle=t(e.itemStyle.emphasis.label.textStyle||{},this.ecTheme.textStyle),e},refresh:function(e){e&&(this.option=e,this.series=e.series),this.backupShapeList(),this._buildShape()},addDataAnimation:function(e){var t=this.series,n={};for(var r=0,i=e.length;r