/** * almond 0.2.5 Copyright (c) 2011-2012, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/jrburke/almond for details */ // 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 lightweight canvas library with a MVC architecture, data-driven * and provides an event model like DOM. * * Copyright (c) 2013, Baidu Inc. * All rights reserved. * * Redistribution and use of this software in source and binary forms, with or * without modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of Baidu Inc. nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission of Baidu Inc. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /*! * ECharts, a javascript interactive chart library. * * Copyright (c) 2013, Baidu Inc. * All rights reserved. * * Redistribution and use of this software in source and binary forms, with or * without modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of Baidu Inc. nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission of Baidu Inc. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ (function(e){var t,n,r;(function(e){function d(e,t){return h.call(e,t)}function v(e,t){var n,r,i,s,o,u,a,f,c,h,p=t&&t.split("/"),d=l.map,v=d&&d["*"]||{};if(e&&e.charAt(0)===".")if(t){p=p.slice(0,p.length-1),e=p.concat(e.split("/"));for(f=0;f0&&(e.splice(f-1,2),f-=2)}}e=e.join("/")}else e.indexOf("./")===0&&(e=e.substring(2));if((p||v)&&d){n=e.split("/");for(f=n.length;f>0;f-=1){r=n.slice(0,f).join("/");if(p)for(c=p.length;c>0;c-=1){i=d[p.slice(0,c).join("/")];if(i){i=i[r];if(i){s=i,o=f;break}}}if(s)break;!u&&v&&v[r]&&(u=v[r],a=f)}!s&&u&&(s=u,o=a),s&&(n.splice(0,o,s),e=n.join("/"))}return e}function m(t,n){return function(){return s.apply(e,p.call(arguments,0).concat([t,n]))}}function g(e){return function(t){return v(t,e)}}function y(e){return function(t){a[e]=t}}function b(t){if(d(f,t)){var n=f[t];delete f[t],c[t]=!0,i.apply(e,n)}if(!d(a,t)&&!d(c,t))throw new Error("No "+t);return a[t]}function w(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function E(e){return function(){return l&&l.config&&l.config[e]||{}}}var i,s,o,u,a={},f={},l={},c={},h=Object.prototype.hasOwnProperty,p=[].slice;o=function(e,t){var n,r=w(e),i=r[0];return e=r[1],i&&(i=v(i,t),n=b(i)),i?n&&n.normalize?e=n.normalize(e,g(t)):e=v(e,t):(e=v(e,t),r=w(e),i=r[0],e=r[1],i&&(n=b(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},u={require:function(e){return m(e)},exports:function(e){var t=a[e];return typeof t!="undefined"?t:a[e]={}},module:function(e){return{id:e,uri:"",exports:a[e],config:E(e)}}},i=function(t,n,r,i){var s,l,h,p,v,g=[],w;i=i||t;if(typeof r=="function"){n=!n.length&&r.length?["require","exports","module"]:n;for(v=0;v{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"},areaStyle:{size:"auto",color:"rgba(150,150,150,0.3)"}},textStyle:{color:"#fff"}},dataZoom:{show:!1,orient:"horizontal",backgroundColor:"#eee",dataBackgroundColor:"#ccc",fillerColor:"rgba(50,205,50,0.4)",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",boundaryGap:!0,axisLine:{show:!0,lineStyle:{color:"#48b",width:2,type:"solid"}},axisTick:{show:!1,length:4,lineStyle:{color:"#ccc",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)"],type:"default"}}},valueAxis:{position:"left",name:"",nameLocation:"end",boundaryGap:[0,0],precision:0,power:100,splitNumber:5,axisLine:{show:!0,lineStyle:{color:"#48b",width:2,type:"solid"}},axisTick:{show:!1,length:4,lineStyle:{color:"#ccc",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)"],type:"default"}}},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"}}},bar:{xAxisIndex:0,yAxisIndex:0,barMinHeight:0,barGap:"30%",barCategoryGap:"20%",itemStyle:{normal:{borderColor:"#fff",borderRadius:0,borderWidth:1,label:{show:!1}},emphasis:{borderColor:"rgba(0,0,0,0)",borderRadius:0,borderWidth:1,label:{show:!1}}}},line:{xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{label:{show:!1},lineStyle:{width:2,type:"solid",shadowColor:"rgba(0,0,0,0)",shadowBlur:5,shadowOffsetX:3,shadowOffsetY:3}},emphasis:{label:{show:!1}}},symbolSize:2,showAllSymbol:!1},k:{xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{color:"#fff",color0:"#00aa11",lineStyle:{width:1,color:"#ff3200",color0:"#00aa11"}},emphasis:{}}},scatter:{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:{polarIndex:0,itemStyle:{normal:{lineStyle:{width:2,type:"solid"}},emphasis:{}},symbolSize:2},pie:{center:["50%","50%"],radius:[0,"75%"],startAngle:90,minAngle:0,selectedOffset:10,itemStyle:{normal:{label:{show:!0,position:"outer"},labelLine:{show:!0,length:30,lineStyle:{width:1,type:"solid"}}},emphasis:{label:{show:!1,position:"outer"},labelLine:{show:!1,length:40,lineStyle:{width:1,type:"solid"}}}}},map:{mapType:"china",mapLocation:{x:"center",y:"center"},itemStyle:{normal:{lineStyle:{width:2,color:"#fff"},areaStyle:{color:"#ccc"},label:{show:!1,textStyle:{color:"rgba(139,69,19,1)"}}},emphasis:{lineStyle:{width:2,color:"#fff"},areaStyle:{color:"rgba(255,215,0,0.8)"},label:{show:!1,textStyle:{color:"rgba(139,69,19,1)"}}}}},force:{minRadius:10,maxRadius:20,density:1,attractiveness:1,initSize:300,centripetal:1,coolDown:.99,categories:[],itemStyle:{normal:{label:{show:!1},nodeStyle:{brushType:"both",color:"#f08c2e",strokeColor:"#5182ab"},linkStyle:{strokeColor:"#5182ab"}},emphasis:{label:{show:!1},nodeStyle:{},linkStyle:{}}}},chord:{radius:["65%","75%"],center:["50%","50%"],padding:2,sort:"none",sortSub:"none",startAngle:90,clockWise:!1,showScale:!1,showScaleText:!1,itemStyle:{normal:{label:{show:!0},lineStyle:{width:0,color:"#000"},chordStyle:{lineStyle:{width:1,color:"#666"}}},emphasis:{lineStyle:{width:0,color:"#000"},chordStyle:{lineStyle:{width:2,color:"#333"}}}},matrix:[]},island:{r:15,calculateStep:.1},textStyle:{decoration:"none",fontFamily:"Arial, Verdana, sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},EVENT:{REFRESH:"refresh",RESTORE:"restore",CLICK:"click",HOVER:"hover",MOUSEWHEEL:"mousewheel",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",TOOLTIP_HOVER:"tooltipHover"},calculable:!1,calculableColor:"rgba(255,165,0,0.6)",calculableHolderColor:"#ccc",nameConnector:" & ",valueConnector:" : ",animation:!0,addDataAnimation:!0,animationDuration:2e3,animationEasing:"ExponentialOut"};return e}),r("zrender/lib/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;try{n.font=e}catch(r){}return D[e]={style:n.fontStyle||_.style,variant:n.fontVariant||_.variant,weight:n.fontWeight||_.weight,size:n.fontSize||_.size,family:n.fontFamily||_.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.size*=.981,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="10px sans-serif",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="red",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','",""),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}),r("zrender/tool/env",[],function(){function e(e){var t=this.os={},n=this.browser={},r=e.match(/Web[kK]it[\/]{0,1}([\d.]+)/),i=e.match(/(Android);?[\s\/]+([\d.]+)?/),s=e.match(/(iPad).*OS\s([\d_]+)/),o=e.match(/(iPod)(.*OS\s([\d_]+))?/),u=!s&&e.match(/(iPhone\sOS)\s([\d_]+)/),a=e.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),f=a&&e.match(/TouchPad/),l=e.match(/Kindle\/([\d.]+)/),c=e.match(/Silk\/([\d._]+)/),h=e.match(/(BlackBerry).*Version\/([\d.]+)/),p=e.match(/(BB10).*Version\/([\d.]+)/),d=e.match(/(RIM\sTablet\sOS)\s([\d.]+)/),v=e.match(/PlayBook/),m=e.match(/Chrome\/([\d.]+)/)||e.match(/CriOS\/([\d.]+)/),g=e.match(/Firefox\/([\d.]+)/),y=e.match(/MSIE ([\d.]+)/),b=r&&e.match(/Mobile\//)&&!m,w=e.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/)&&!m,y=e.match(/MSIE\s([\d.]+)/);if(n.webkit=!!r)n.version=r[1];return i&&(t.android=!0,t.version=i[2]),u&&!o&&(t.ios=t.iphone=!0,t.version=u[2].replace(/_/g,".")),s&&(t.ios=t.ipad=!0,t.version=s[2].replace(/_/g,".")),o&&(t.ios=t.ipod=!0,t.version=o[3]?o[3].replace(/_/g,"."):null),a&&(t.webos=!0,t.version=a[2]),f&&(t.touchpad=!0),h&&(t.blackberry=!0,t.version=h[2]),p&&(t.bb10=!0,t.version=p[2]),d&&(t.rimtabletos=!0,t.version=d[2]),v&&(n.playbook=!0),l&&(t.kindle=!0,t.version=l[1]),c&&(n.silk=!0,n.version=c[1]),!c&&t.android&&e.match(/Kindle Fire/)&&(n.silk=!0),m&&(n.chrome=!0,n.version=m[1]),g&&(n.firefox=!0,n.version=g[1]),y&&(n.ie=!0,n.version=y[1]),b&&(e.match(/Safari/)||!!t.ios)&&(n.safari=!0),w&&(n.webview=!0),y&&(n.ie=!0,n.version=y[1]),t.tablet=!!(s||v||i&&!e.match(/Mobile/)||g&&e.match(/Tablet/)||y&&!e.match(/Phone/)&&e.match(/Touch/)),t.phone=!!(!t.tablet&&!t.ipod&&(i||u||a||h||p||m&&e.match(/Android/)||m&&e.match(/CriOS\/([\d.]+)/)||g&&e.match(/Mobile/)||y&&e.match(/Touch/))),{browser:n,os:t,canvasSupported:document.createElement("canvas").getContext?!0:!1}}return e(navigator.userAgent)}),r("zrender/shape",[],function(){var e={},t={};return e.define=function(n,r){return t[n]=r,e},e.get=function(e){return t[e]},e}),r("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){e[0]=t[0],e[1]=t[1]},set:function(e,t,n){e[0]=t,e[1]=n},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},length:function(e){return Math.sqrt(this.lengthSquare(e))},lengthSquare: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},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.length(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]))},negate:function(e,t){e[0]=-t[0],e[1]=-t[1]},middle:function(e,t,n){return e[0]=(t[0]+n[0])/2,e[1]=(t[1]+n[1])/2,e}};return t}),r("zrender/tool/util",["require","./vector","../lib/excanvas"],function(e){function n(e){var t={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1},n=e,r,i;if(!e||e instanceof Number||e instanceof String||e instanceof Boolean)return n;if(e instanceof Array){n=[];var s=0;for(r=0,i=e.length;rf&&(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;ni&&(i=a[0]),a[1]o&&(o=a[1])}t[0]=r,t[1]=s,n[0]=i,n[1]=o}function y(e,t,n,r,i,s){var o=b(e[0],t[0],n[0],r[0]),u=b(e[1],t[1],n[1],r[1]);o.push(e[0],r[0]),u.push(e[1],r[1]);var a=Math.min.apply(null,o),f=Math.max.apply(null,o),l=Math.min.apply(null,u),c=Math.max.apply(null,u);i[0]=a,i[1]=l,s[0]=f,s[1]=c}function b(e,t,n,r){var i=[],s=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,u=3*t-3*e,a=s*s-4*o*u;if(a>0){var f=Math.sqrt(a),l=(-s+f)/(2*o),c=(-s-f)/(2*o);i.push(l,c)}else a===0&&i.push(-s/(2*o));var h=[];for(var p=0;p1e-4&&d<1&&d>0){var v=1-d,m=v*v*v*e+3*v*v*d*t+3*v*d*d*n+d*d*d*r;h.push(m)}}return h}function w(e,t,n,r,i){var s=e[0]+n[0]-2*t[0],o;s===0?o=.5:o=(e[0]-t[0])/s,s=e[1]+n[1]-2*t[1];var u;s===0?u=.5:u=(e[1]-t[1])/s,o=Math.max(Math.min(o,1),0),u=Math.max(Math.min(u,1),0);var a=1-o,f=1-u,l=a*a*e[0]+2*a*o*t[0]+o*o*n[0],c=a*a*e[1]+2*a*o*t[1]+o*o*n[1],h=f*f*e[0]+2*f*u*t[0]+u*u*n[0],p=f*f*e[1]+2*f*u*t[1]+u*u*n[1];return g([e.slice(),n.slice(),[l,c],[h,p]],r,i)}var t=e("./vector"),r=function(){function t(t,n,i,s,o){if(n.hasOwnProperty(i))if(o&&typeof t[i]=="object"&&e[Object.prototype.toString.call(t[i])]!=1)r(t[i],n[i],{overwrite:s,recursive:o});else if(s||!(i in t))t[i]=n[i]}var e={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1};return function(e,n,r){var i=0,s=r||{},o=s.overwrite,u=s.whiteList,a=s.recursive,f;if(u&&u.length){f=u.length;for(;iu&&(u+=Math.PI*2);var c=0;for(var h=0;ho){var p=r[c++];p[0]=Math.cos(h),p[1]=Math.sin(h)*a,t.scale(p,p,s),t.add(p,p,i)}var d=r.slice(0,c);d.push(e,n),g(d,f,l)}}();return{clone:n,merge:r,mergeFast:i,getContext:o,getPixelContext:p,getPixelOffset:v,adjustCanvasSize:d,computeBoundingBox:g,computeCubeBezierBoundingBox:y,computeQuadraticBezierBoundingBox:w,computeArcBoundingBox:E,indexOf:m}}),r("zrender/tool/area",["require","../tool/util"],function(e){function r(e,r,u,a){if(!r||!e)return!1;var f=e.type;n||(n=t.getContext());if(!h(r.__rect||e.getRect(r),u,a))return!1;var l=i(f,r,u,a);if(typeof l!="undefined")return l;if(f!="beziercurve"&&e.buildPath&&n.isPointInPath)return s(e,n,r,u,a);if(n.getImageData)return o(e,r,u,a);switch(f){case"heart":return!0;case"droplet":return!0;case"ellipse":return!0;case"trochoid":var c=r.location=="out"?r.r1+r.r2+r.d:r.r1-r.r2+r.d;return p(r,u,a,c);case"rose":return p(r,u,a,r.maxr);default:return!1}}function i(e,t,n,r){switch(e){case"line":return f(t,n,r);case"brokenLine":return l(t,n,r);case"text":return!0;case"ring":return c(t,n,r);case"rectangle":return!0;case"circle":return p(t,n,r,t.r);case"sector":return d(t,n,r);case"path":return m(t,n,r);case"polygon":case"star":case"isogon":return v(t,n,r);case"image":return!0}}function s(e,t,n,r,i){return t.beginPath(),e.buildPath(t,n),t.closePath(),t.isPointInPath(r,i)}function o(e,n,r,i){var s=n.__rect||e.getRect(n),o=t.getPixelContext(),a=t.getPixelOffset();return t.adjustCanvasSize(r,i),o.clearRect(s.x,s.y,s.width,s.height),o.beginPath(),e.brush(o,{style:n}),o.closePath(),u(o,r+a.x,i+a.y)}function u(e,t,n,r){var i;typeof r!="undefined"?(r=Math.floor((r||1)/2),i=e.getImageData(t-r,n-r,r+r,r+r).data):i=e.getImageData(t,n,1,1).data;var s=i.length;while(s--)if(i[s]!==0)return!0;return!1}function a(e,t,n,i){return!r(e,t,n,i)}function f(e,t,n){var r=e.xStart,i=e.yStart,s=e.xEnd,o=e.yEnd,u=Math.max(e.lineWidth,3),a=0,f=r;if(r===s)return Math.abs(t-r)<=u/2;a=(i-o)/(r-s),f=(r*o-s*i)/(r-s);var l=(a*t-n+f)*(a*t-n+f)/(a*a+1);return l<=u/2*u/2}function l(e,t,n){var r=e.pointList,i,s=!1;for(var o=0,u=r.length-1;o=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height?!0:!1}function p(e,t,n,r){return(t-e.x)*(t-e.x)+(n-e.y)*(n-e.y)0&&p({x:e.x,y:e.y},t,n,e.r0))return!1;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 v(e,t,n){var r,i,s=e.pointList,o=s.length,u=!1,a=!0,f;for(r=0;rs[i][1]?--n:++n;break}}else if(s[r][1]==s[i][1]&&n==s[r][1]&&(s[r][0]1)for(var i=0,s=r-1;i1?Math.ceil(e):e});if(t.indexOf("hex")>-1)return e=q(e.slice(0,3),function(e){return e=Number(e).toString(16),e.length===1?"0"+e:e}),"#"+e.join("");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("#")>-1&&(e=x(e));var t=e.replace(/[rgbahsvl%\(\)]/ig,"").split(",");return t=q(t,function(e){return Number(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 e=String(e),e=e.replace(/(^\s*)|(\s*$)/g,""),/^[^#]*?$/i.test(e)&&(e=e.replace(/\s/g,"")),e}function D(e){a[e]&&(e=a[e]),e=_(e),e=e.replace(/hsv/i,"hsb");if(/^#[0-9a-f]{3}$/i.test(e)){var t=e.replace("#","").split("");e="#"+t[0]+t[0]+t[1]+t[1]+t[2]+t[2]}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]=Math.floor(r[i]*(1-t)):r[i]=Math.floor((255-r[i])*t+r[i]);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 T("rgb("+Math.round(Math.random()*256)+","+Math.round(Math.random()*256)+","+Math.round(Math.random()*256)+")")}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=Math.floor(u),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}}),r("zrender/shape/base",["require","../tool/area","../tool/matrix","../tool/vector","../tool/color"],function(e){function s(e){var n=["brush","setContext","dashedLineTo","smoothBezier","smoothSpline","drawText","getHighlightStyle","getHighlightZoom","drift","isCover","updateTransform"],r=n.length,i=e.prototype,s=0,o;for(;sn-2?n-1:f+1],v=e[f>n-3?n-1:f+2]);var m=l*l,g=l*m;r.push([c(h[0],p[0],d[0],v[0],l,m,g),c(h[1],p[1],d[1],v[1],l,m,g)])}return r}function c(e,t,n,r,i,s,o){var u=(n-e)*.5,a=(r-t)*.5;return(2*(t-n)+u+a)*o+(-3*(t-n)-2*u-a)*s+u*i+t}function h(e,t,n){t.textColor=t.textColor||t.color||t.strokeColor,e.fillStyle=t.textColor,t.textPosition=="inside"&&(e.shadowColor="rgba(0,0,0,0)");var r=10,i,s,o,u,a=t.textPosition||this.textPosition||"top";if(a!="inside"&&a!="top"&&a!="bottom"&&a!="left"&&a!="right"||!this.getRect)if(a=="start"||a=="end"){var l,c,h,p;if(typeof t.pointList!="undefined"){var d=t.pointList;if(d.length<2)return;var v=d.length;switch(a){case"start":l=d[0][0],c=d[1][0],h=d[0][1],p=d[1][1];break;case"end":l=d[v-2][0],c=d[v-1][0],h=d[v-2][1],p=d[v-1][1]}}else l=t.xStart||0,c=t.xEnd||0,h=t.yStart||0,p=t.yEnd||0;switch(a){case"start":i=l1e-4||Math.abs(e.position[0])>1e-4||Math.abs(e.position[1])>1e-4||Math.abs(e.scale[0]-1)>1e-4||Math.abs(e.scale[1]-1)>1e-4?e.__needTransform=!0:e.__needTransform=!1),t=o[0],i=o[1]}var u;return e.style.__rect?u=e.style.__rect:(u=this.getRect(e.style),e.style.__rect=u),t>=u.x&&t<=u.x+u.width&&i>=u.y&&i<=u.y+u.height?n.isInside(this,e.style,t,i):!1}function g(e){var t=e._transform||r.create();r.identity(t);if(e.scale&&(e.scale[0]!==1||e.scale[1]!==1)){var n=e.scale[2]||0,i=e.scale[3]||0;(n||i)&&r.translate(t,t,[-n,-i]),r.scale(t,t,e.scale),(n||i)&&r.translate(t,t,[n,i])}if(e.rotation)if(e.rotation instanceof Array){if(e.rotation[0]!==0){var n=e.rotation[1]||0,i=e.rotation[2]||0;(n||i)&&r.translate(t,t,[-n,-i]),r.rotate(t,t,e.rotation[0]),(n||i)&&r.translate(t,t,[n,i])}}else e.rotation!==0&&r.rotate(t,t,e.rotation);return e.position&&(e.position[0]!==0||e.position[1]!==0)&&r.translate(t,t,e.position),e._transform=t,t}var t,n=e("../tool/area"),r=e("../tool/matrix"),i=e("../tool/vector");return t={derive:s,brush:o,setContext:u,dashedLineTo:a,smoothBezier:f,smoothSpline:l,drawText:h,getHighlightStyle:p,getHighlightZoom:d,drift:v,isCover:m,updateTransform:g},t}),r("zrender/shape/circle",["require","./base","../shape"],function(e){function t(){this.type="circle"}t.prototype={buildPath:function(e,t){e.arc(t.x,t.y,t.r,0,Math.PI*2,!0);return},getRect:function(e){var t;return e.brushType=="stroke"||e.brushType=="fill"?t=e.lineWidth||1:t=0,{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}}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("circle",new t),t}),r("zrender/shape/ellipse",["require","./base","../shape"],function(e){function t(){this.type="ellipse"}t.prototype={buildPath:function(e,t){var n=.5522848,r=t.x,i=t.y,s=t.a,o=t.b,u=s*n,a=o*n;e.moveTo(r-s,i),e.bezierCurveTo(r-s,i-a,r-u,i-o,r,i-o),e.bezierCurveTo(r+u,i-o,r+s,i-a,r+s,i),e.bezierCurveTo(r+s,i+a,r+u,i+o,r,i+o),e.bezierCurveTo(r-u,i+o,r-s,i+a,r-s,i);return},getRect:function(e){var t;return e.brushType=="stroke"||e.brushType=="fill"?t=e.lineWidth||1:t=0,{x:Math.round(e.x-e.a-t/2),y:Math.round(e.y-e.b-t/2),width:e.a*2+t,height:e.b*2+t}}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("ellipse",new t),t}),r("zrender/shape/line",["require","./base","../shape"],function(e){function t(){this.type="line",this.brushTypeOnly="stroke",this.textPosition="end"}t.prototype={buildPath:function(e,t){if(!t.lineType||t.lineType=="solid")e.moveTo(t.xStart,t.yStart),e.lineTo(t.xEnd,t.yEnd);else if(t.lineType=="dashed"||t.lineType=="dotted"){var n=(t.lineWidth||1)*(t.lineType=="dashed"?5:1);this.dashedLineTo(e,t.xStart,t.yStart,t.xEnd,t.yEnd,n)}},getRect:function(e){var t=e.lineWidth||1;return{x:Math.min(e.xStart,e.xEnd)-t,y:Math.min(e.yStart,e.yEnd)-t,width:Math.abs(e.xStart-e.xEnd)+t,height:Math.abs(e.yStart-e.yEnd)+t}}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("line",new t),t}),r("zrender/shape/polygon",["require","./base","../shape"],function(e){function t(){this.type="polygon"}t.prototype={brush:function(e,t,n){var r=t.style||{};n&&(r=this.getHighlightStyle(r,t.highlightStyle||{})),e.save(),this.setContext(e,r),t.__needTransform&&e.transform.apply(e,this.updateTransform(t)),e.beginPath(),this.buildPath(e,r),e.closePath(),(r.brushType=="stroke"||r.brushType=="both")&&e.stroke();if(r.brushType=="fill"||r.brushType=="both"||typeof r.brushType=="undefined"){if(r.lineType=="dashed"||r.lineType=="dotted")e.beginPath(),this.buildPath(e,{lineType:"solid",lineWidth:r.lineWidth,pointList:r.pointList}),e.closePath();e.fill()}r.text&&this.drawText(e,r,t.style),e.restore();return},buildPath:function(e,t){var n=t.pointList,r=n[0],i=n[n.length-1];r&&i&&r[0]==i[0]&&r[1]==i[1]&&n.pop();if(n.length<2)return;if(t.smooth&&t.smooth!=="spline"){var s=this.smoothBezier(n,t.smooth,!0);e.moveTo(n[0][0],n[0][1]);var o,u,a,f=n.length;for(var l=0;ln&&(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,{x:Math.round(t-a/2),y:Math.round(r-a/2),width:n-t+a,height:i-r+a}}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("polygon",new t),t}),r("zrender/shape/brokenLine",["require","../shape","./base","../shape"],function(e){function t(){this.type="brokenLine",this.brushTypeOnly="stroke",this.textPosition="end"}t.prototype={buildPath:function(e,t){var n=t.pointList;if(n.length<2)return;if(t.smooth&&t.smooth!=="spline"){var r=this.smoothBezier(n,t.smooth,!1);e.moveTo(n[0][0],n[0][1]);var i,s,o;for(var u=0,a=n.length;u90&&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]);var l=e("../shape");return l.get("polygon").getRect({brushType:n.brushType,lineWidth:n.lineWidth,pointList:f})}};var r=e("./base");r.derive(n);var i=e("../shape");return i.define("sector",new n),n}),r("zrender/shape/text",["require","../tool/area","./base","../shape"],function(e){function t(){this.type="text"}t.prototype={brush:function(e,t,n){var r=t.style||{};n&&(r=this.getHighlightStyle(r,t.highlightStyle||{})),e.save(),this.setContext(e,r),t.__needTransform&&e.transform.apply(e,this.updateTransform(t)),r.textFont&&(e.font=r.textFont),e.textAlign=r.textAlign||"start",e.textBaseline=r.textBaseline||"middle";if(r.maxWidth)switch(r.brushType){case"fill":e.fillText(r.text,r.x,r.y,r.maxWidth);break;case"stroke":e.strokeText(r.text,r.x,r.y,r.maxWidth);break;case"both":e.strokeText(r.text,r.x,r.y,r.maxWidth),e.fillText(r.text,r.x,r.y,r.maxWidth);break;default:e.fillText(r.text,r.x,r.y,r.maxWidth)}else switch(r.brushType){case"fill":e.fillText(r.text,r.x,r.y);break;case"stroke":e.strokeText(r.text,r.x,r.y);break;case"both":e.strokeText(r.text,r.x,r.y),e.fillText(r.text,r.x,r.y);break;default:e.fillText(r.text,r.x,r.y)}e.restore();return},getRect:function(t){var n=e("../tool/area"),r=n.getTextWidth(t.text,t.textFont),i=n.getTextWidth("国",t.textFont),s=t.x;t.textAlign=="end"||t.textAlign=="right"?s-=r:t.textAlign=="center"&&(s-=r/2);var o=t.y-i/2;return t.textBaseline=="top"?o+=i/2:t.textBaseline=="bottom"&&(s-=i/2),{x:s,y:o,width:r,height:i}}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("text",new t),t}),r("zrender/shape/heart",["require","./base","../shape"],function(e){function t(){this.type="heart"}t.prototype={buildPath:function(e,t){e.moveTo(t.x,t.y),e.bezierCurveTo(t.x+t.a/2,t.y-t.b*2/3,t.x+t.a*2,t.y+t.b/3,t.x,t.y+t.b),e.bezierCurveTo(t.x-t.a*2,t.y+t.b/3,t.x-t.a/2,t.y-t.b*2/3,t.x,t.y);return},getRect:function(e){var t;return e.brushType=="stroke"||e.brushType=="fill"?t=e.lineWidth||1:t=0,{x:Math.round(e.x-e.a-t/2),y:Math.round(e.y-e.b/4-t/2),width:e.a*2+t,height:e.b*5/4+t}}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("heart",new t),t}),r("zrender/shape/droplet",["require","./base","../shape"],function(e){function t(){this.type="droplet"}t.prototype={buildPath:function(e,t){e.moveTo(t.x,t.y+t.a),e.bezierCurveTo(t.x+t.a,t.y+t.a,t.x+t.a*3/2,t.y-t.a/3,t.x,t.y-t.b),e.bezierCurveTo(t.x-t.a*3/2,t.y-t.a/3,t.x-t.a,t.y+t.a,t.x,t.y+t.a);return},getRect:function(e){var t;return e.brushType=="stroke"||e.brushType=="fill"?t=e.lineWidth||1:t=0,{x:Math.round(e.x-e.a-t/2),y:Math.round(e.y-e.b-t/2),width:e.a*2+t,height:e.a+e.b+t}}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("droplet",new t),t}),r("zrender/shape/path",["require","./base","../shape"],function(e){function t(){this.type="path"}t.prototype={_parsePathData:function(e){if(!e)return[];var t=e,n=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];t=t.replace(/ /g," "),t=t.replace(/ /g,","),t=t.replace(/,,/g,",");var r;for(r=0;r0&&l[0]===""&&l.shift();for(var c=0;c0){if(isNaN(l[0]))break;var h=null,p=[],d,v,m,g,y,b,w,E,S=o,x=u;switch(f){case"l":o+=l.shift(),u+=l.shift(),h="L",p.push(o,u);break;case"L":o=l.shift(),u=l.shift(),p.push(o,u);break;case"m":o+=l.shift(),u+=l.shift(),h="M",p.push(o,u),f="l";break;case"M":o=l.shift(),u=l.shift(),h="M",p.push(o,u),f="L";break;case"h":o+=l.shift(),h="L",p.push(o,u);break;case"H":o=l.shift(),h="L",p.push(o,u);break;case"v":u+=l.shift(),h="L",p.push(o,u);break;case"V":u=l.shift(),h="L",p.push(o,u);break;case"C":p.push(l.shift(),l.shift(),l.shift(),l.shift()),o=l.shift(),u=l.shift(),p.push(o,u);break;case"c":p.push(o+l.shift(),u+l.shift(),o+l.shift(),u+l.shift()),o+=l.shift(),u+=l.shift(),h="C",p.push(o,u);break;case"S":d=o,v=u,m=s[s.length-1],m.command==="C"&&(d=o+(o-m.points[2]),v=u+(u-m.points[3])),p.push(d,v,l.shift(),l.shift()),o=l.shift(),u=l.shift(),h="C",p.push(o,u);break;case"s":d=o,v=u,m=s[s.length-1],m.command==="C"&&(d=o+(o-m.points[2]),v=u+(u-m.points[3])),p.push(d,v,o+l.shift(),u+l.shift()),o+=l.shift(),u+=l.shift(),h="C",p.push(o,u);break;case"Q":p.push(l.shift(),l.shift()),o=l.shift(),u=l.shift(),p.push(o,u);break;case"q":p.push(o+l.shift(),u+l.shift()),o+=l.shift(),u+=l.shift(),h="Q",p.push(o,u);break;case"T":d=o,v=u,m=s[s.length-1],m.command==="Q"&&(d=o+(o-m.points[0]),v=u+(u-m.points[1])),o=l.shift(),u=l.shift(),h="Q",p.push(d,v,o,u);break;case"t":d=o,v=u,m=s[s.length-1],m.command==="Q"&&(d=o+(o-m.points[0]),v=u+(u-m.points[1])),o+=l.shift(),u+=l.shift(),h="Q",p.push(d,v,o,u);break;case"A":g=l.shift(),y=l.shift(),b=l.shift(),w=l.shift(),E=l.shift(),S=o,x=u,o=l.shift(),u=l.shift(),h="A",p=this._convertPoint(S,x,o,u,w,E,g,y,b);break;case"a":g=l.shift(),y=l.shift(),b=l.shift(),w=l.shift(),E=l.shift(),S=o,x=u,o+=l.shift(),u+=l.shift(),h="A",p=this._convertPoint(S,x,o,u,w,E,g,y,b)}s.push({command:h||f,points:p})}(f==="z"||f==="Z")&&s.push({command:"z",points:[]})}return s},_convertPoint:function(e,t,n,r,i,s,o,u,a){var f=a*(Math.PI/180),l=Math.cos(f)*(e-n)/2+Math.sin(f)*(t-r)/2,c=-1*Math.sin(f)*(e-n)/2+Math.cos(f)*(t-r)/2,h=l*l/(o*o)+c*c/(u*u);h>1&&(o*=Math.sqrt(h),u*=Math.sqrt(h));var p=Math.sqrt((o*o*u*u-o*o*c*c-u*u*l*l)/(o*o*c*c+u*u*l*l));i===s&&(p*=-1),isNaN(p)&&(p=0);var d=p*o*c/u,v=p*-u*l/o,m=(e+n)/2+Math.cos(f)*d-Math.sin(f)*v,g=(t+r)/2+Math.sin(f)*d+Math.cos(f)*v,y=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},b=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(y(e)*y(t))},w=function(e,t){return(e[0]*t[1]=1&&(T=0),s===0&&T>0&&(T-=2*Math.PI),s===1&&T<0&&(T+=2*Math.PI),[m,g,o,u,E,T,f,s]},buildPath:function(e,t){var n=t.path,r=this._parsePathData(n),i=t.x||0,s=t.y||0,o,u=t.pointList=[],a=[];for(var f=0,l=r.length;f0&&u.push(a),a=[]),o=r[f].points;for(var c=0,h=o.length;c0&&u.push(a);var p;for(var f=0,l=r.length;fg?m:g,x=m>g?1:m/g,T=m>g?g/m:1;e.translate(d,v),e.rotate(w),e.scale(x,T),e.arc(0,0,S,y,y+b,1-E),e.scale(1/x,1/T),e.rotate(-w),e.translate(-d,-v);break;case"z":e.closePath()}}return},getRect:function(e){var t;e.brushType=="stroke"||e.brushType=="fill"?t=e.lineWidth||1:t=0;var n=Number.MAX_VALUE,r=Number.MIN_VALUE,i=Number.MAX_VALUE,s=Number.MIN_VALUE,o=e.x||0,u=e.y||0,a=this._parsePathData(e.path);for(var f=0;fr&&(r=l[c]+o)):(l[c]+us&&(s=l[c]+u))}var h;return n===Number.MAX_VALUE||r===Number.MIN_VALUE||i===Number.MAX_VALUE||s===Number.MIN_VALUE?h={x:0,y:0,width:0,height:0}:h={x:Math.round(n-t/2),y:Math.round(i-t/2),width:r-n+t,height:s-i+t},h}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("path",new t),t}),r("zrender/shape/image",["require","./base","../shape"],function(e){function i(){this.type="image"}var t={},n=[],r;i.prototype={brush:function(e,i,s,o){var u=i.style||{};s&&(u=this.getHighlightStyle(u,i.highlightStyle||{}));var a=u.image;if(typeof a=="string"){var f=a;t[f]?a=t[f]:(a=new Image,a.onload=function(){a.onload=null,clearTimeout(r),n.push(i),r=setTimeout(function(){o(n),n=[]},10)},t[f]=a,a.src=f)}if(a){if(window.ActiveXObject){if(a.readyState!="complete")return}else if(!a.complete)return;e.save(),this.setContext(e,u),i.__needTransform&&e.transform.apply(e,this.updateTransform(i));var l=u.width||a.width,c=u.height||a.height,h=u.x,p=u.y;if(u.sWidth&&u.sHeight){var d=u.sx||0,v=u.sy||0;e.drawImage(a,d,v,u.sWidth,u.sHeight,h,p,l,c)}else if(u.sx&&u.sy){var d=u.sx,v=u.sy,m=l-d,g=c-v;e.drawImage(a,d,v,m,g,h,p,l,c)}else e.drawImage(a,h,p,l,c);u.width=l,u.height=c,i.style.width=l,i.style.height=c,u.text&&this.drawText(e,u,i.style),e.restore()}return},buildPath:function(e,t){e.rect(t.x,t.y,t.width,t.height);return},getRect:function(e){return{x:e.x,y:e.y,width:e.width,height:e.height}}};var s=e("./base");s.derive(i);var o=e("../shape");return o.define("image",new i),i}),r("zrender/shape/beziercurve",["require","./base","../shape"],function(e){function t(){this.type="beziercurve",this.brushTypeOnly="stroke",this.textPosition="end"}t.prototype={buildPath:function(e,t){e.moveTo(t.xStart,t.yStart),typeof t.cpX2!="undefined"&&typeof t.cpY2!="undefined"?e.bezierCurveTo(t.cpX1,t.cpY1,t.cpX2,t.cpY2,t.xEnd,t.yEnd):e.quadraticCurveTo(t.cpX1,t.cpY1,t.xEnd,t.yEnd)},getRect:function(e){var t=Math.min(e.xStart,e.xEnd,e.cpX1),n=Math.min(e.yStart,e.yEnd,e.cpY1),r=Math.max(e.xStart,e.xEnd,e.cpX1),i=Math.max(e.yStart,e.yEnd,e.cpY1),s=e.cpX2,o=e.cpY2;typeof s!="undefined"&&typeof o!="undefined"&&(t=Math.min(t,s),n=Math.min(n,o),r=Math.max(r,s),i=Math.max(i,o));var u=e.lineWidth||1;return{x:t-u,y:n-u,width:r-t+u,height:i-n+u}}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("beziercurve",new t),t}),r("zrender/shape/star",["require","../tool/math","./base","../shape"],function(e){function s(){this.type="heart"}var t=e("../tool/math"),n=t.sin,r=t.cos,i=Math.PI;s.prototype={buildPath:function(e,t){var s=t.n;if(!s||s<2)return;var o=t.x,u=t.y,a=t.r,f=t.r0;f==null&&(f=s>4?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=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;x--)if(E[x]<=t)break;x=Math.min(x,m-2)}else{for(x=N;xt)break;x=Math.min(x-1,m-2)}N=x,C=t;var r=E[x+1]-E[x];if(r===0)return;L=(t-E[x])/r,L<0&&console.log(L),h?(O=S[x],A=S[x===0?x:x-1],M=S[x>m-2?m-1:x+1],_=S[x>m-3?m-1:x+2],y?l(A,O,M,_,L,L*L,L*L*L,s(e,v),b):i(e,v,c(A,O,M,_,L,L*L,L*L*L))):y?a(S[x],S[x+1],L,s(e,v),b):i(e,v,u(S[x],S[x+1],L));for(x=0;x=t[1]&&(e=t[1]),e}function c(n,r,i){var u=e("./color");n=t.merge(n,{textStyle:{color:"#888"},backgroundColor:"rgba(250, 250, 250, 0.8)",effectOption:{x:0,y:o/2-30,width:s,height:5,brushType:"fill",timeInterval:100}},{overwrite:!1,recursive:!0});var c=a(n.textStyle),h=f(n.backgroundColor),p=n.effectOption,d={shape:"rectangle",highlightStyle:t.clone(p)};d.highlightStyle.color=p.color||u.getLinearGradient(p.x,p.y,p.x+p.width,p.y+p.height,[[0,"#ff6400"],[.5,"#ffe100"],[1,"#b1ff00"]]);if(typeof n.progress!="undefined"){r(h),d.highlightStyle.width=l(n.progress,[0,1])*n.effectOption.width,r(d),r(c),i();return}return d.highlightStyle.width=0,setInterval(function(){r(h),d.highlightStyle.width=s&&(v[t].len=Math.ceil(Math.random()*400),v[t].highlightStyle.xStart=-400,v[t].highlightStyle.xEnd=-400+v[t].len,v[t].highlightStyle.yStart=Math.ceil(Math.random()*o),v[t].highlightStyle.yEnd=v[t].highlightStyle.yStart),v[t].highlightStyle.xStart+=v[t].animationX,v[t].highlightStyle.xEnd+=v[t].animationX,r(v[t]);r(l),i()},h.timeInterval)}function d(n,r,i){var u=e("./color");n=t.merge(n,{textStyle:{color:"#888"},backgroundColor:"rgba(250, 250, 250, 0.8)",effectOption:{n:50,lineWidth:2,brushType:"stroke",color:"random",timeInterval:100}},{overwrite:!1,recursive:!0});var l=a(n.textStyle),c=f(n.backgroundColor),h=n.effectOption,p=h.n,d=h.brushType,v=h.lineWidth,m=[],g;for(var y=0;y=20?-20:1,r(S);for(var e=0;e<20;e++)x[e].highlightStyle.color=e1e-4||Math.abs(e.position[0])>1e-4||Math.abs(e.position[1])>1e-4||Math.abs(e.scale[0]-1)>1e-4||Math.abs(e.scale[1]-1)>1e-4?e.__needTransform=!0:e.__needTransform=!1,e.style=e.style||{},e.style.__rect=null}function h(e){return(e||"")+ ++s}function p(e){var t={shape:"circle",id:e.id||i.newShapeId(),zlevel:0,draggable:!1,clickable:!1,hoverable:!0,position:[0,0],rotation:[0,0,0],scale:[1,1,0,0]};return r.merge(t,e,{overwrite:!0,recursive:!0}),c(t),o[t.id]=t,u[t.zlevel]=u[t.zlevel]||[],u[t.zlevel].push(t),f=Math.max(f,t.zlevel),l[t.zlevel]=!0,i}function d(e){return o[e]}function v(e){if(typeof e!="undefined"){var t={};if(e instanceof Array)for(var n=0,r=e.length;n1e-4||e.position&&(Math.abs(e.position[0])>1e-4||Math.abs(e.position[1])>1e-4)||e.scale&&(Math.abs(e.scale[0]-1)>1e-4||Math.abs(e.scale[1]-1)>1e-4)?e.__needTransform=!0:e.__needTransform=!1,a.push(e),i}function b(){return a=[],i}function w(){return a.length>0}function E(e,t){t||(t={hover:!1,normal:"down"});if(t.hover)for(var n=0,r=a.length;n=0;r--){s=u[r];if(s){f=s.length;while(f--)if(e(s[f]))return i}}break;case"up":for(var n=0,r=u.length;n1)for(var e in arguments)console.log(arguments[e]);return t},t}),r("zrender",["zrender/zrender"],function(e){return e}),r("echarts/util/shape/icon",["require","zrender/tool/matrix","zrender/shape","zrender/shape","zrender/shape/base","zrender/shape"],function(e){function n(){this.type="icon",this._iconLibrary={mark:r,markUndo:i,markClear:s,dataZoom:o,dataZoomReset:u,restore:a,lineChart:f,barChart:l,dataView:c,saveAsImage:h,cross:p,circle:d,rectangle:v,triangle:m,diamond:g,arrow:y,star:b,image:w}}function r(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x,t.y+t.height),e.lineTo(t.x+5*n,t.y+14*r),e.lineTo(t.x+t.width,t.y+3*r),e.lineTo(t.x+13*n,t.y),e.lineTo(t.x+2*n,t.y+11*r),e.lineTo(t.x,t.y+t.height),e.moveTo(t.x+6*n,t.y+10*r),e.lineTo(t.x+14*n,t.y+2*r),e.moveTo(t.x+10*n,t.y+13*r),e.lineTo(t.x+t.width,t.y+13*r),e.moveTo(t.x+13*n,t.y+10*r),e.lineTo(t.x+13*n,t.y+t.height)}function i(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x,t.y+t.height),e.lineTo(t.x+5*n,t.y+14*r),e.lineTo(t.x+t.width,t.y+3*r),e.lineTo(t.x+13*n,t.y),e.lineTo(t.x+2*n,t.y+11*r),e.lineTo(t.x,t.y+t.height),e.moveTo(t.x+6*n,t.y+10*r),e.lineTo(t.x+14*n,t.y+2*r),e.moveTo(t.x+10*n,t.y+13*r),e.lineTo(t.x+t.width,t.y+13*r)}function s(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x+4*n,t.y+15*r),e.lineTo(t.x+9*n,t.y+13*r),e.lineTo(t.x+14*n,t.y+8*r),e.lineTo(t.x+11*n,t.y+5*r),e.lineTo(t.x+6*n,t.y+10*r),e.lineTo(t.x+4*n,t.y+15*r),e.moveTo(t.x+5*n,t.y),e.lineTo(t.x+11*n,t.y),e.moveTo(t.x+5*n,t.y+r),e.lineTo(t.x+11*n,t.y+r),e.moveTo(t.x,t.y+2*r),e.lineTo(t.x+t.width,t.y+2*r),e.moveTo(t.x,t.y+5*r),e.lineTo(t.x+3*n,t.y+t.height),e.lineTo(t.x+13*n,t.y+t.height),e.lineTo(t.x+t.width,t.y+5*r)}function o(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x,t.y+3*r),e.lineTo(t.x+6*n,t.y+3*r),e.moveTo(t.x+3*n,t.y),e.lineTo(t.x+3*n,t.y+6*r),e.moveTo(t.x+3*n,t.y+8*r),e.lineTo(t.x+3*n,t.y+t.height),e.lineTo(t.x+t.width,t.y+t.height),e.lineTo(t.x+t.width,t.y+3*r),e.lineTo(t.x+8*n,t.y+3*r),e.moveTo(t.x,t.y),e.lineTo(t.x,t.y)}function u(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x+6*n,t.y),e.lineTo(t.x+2*n,t.y+3*r),e.lineTo(t.x+6*n,t.y+6*r),e.moveTo(t.x+2*n,t.y+3*r),e.lineTo(t.x+14*n,t.y+3*r),e.lineTo(t.x+14*n,t.y+11*r),e.moveTo(t.x+2*n,t.y+5*r),e.lineTo(t.x+2*n,t.y+13*r),e.lineTo(t.x+14*n,t.y+13*r),e.moveTo(t.x+10*n,t.y+10*r),e.lineTo(t.x+14*n,t.y+13*r),e.lineTo(t.x+10*n,t.y+t.height),e.moveTo(t.x,t.y),e.lineTo(t.x,t.y)}function a(e,t){var n=t.width/16,r=t.height/16,i=t.width/2;e.lineWidth=1.5,e.arc(t.x+i,t.y+i,i-n,0,Math.PI*2/3),e.moveTo(t.x+3*n,t.y+t.height),e.lineTo(t.x+0*n,t.y+12*r),e.lineTo(t.x+5*n,t.y+11*r),e.moveTo(t.x,t.y+8*r),e.arc(t.x+i,t.y+i,i-n,Math.PI,Math.PI*5/3),e.moveTo(t.x+13*n,t.y),e.lineTo(t.x+t.width,t.y+4*r),e.lineTo(t.x+11*n,t.y+5*r),e.moveTo(t.x,t.y),e.lineTo(t.x,t.y)}function f(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x,t.y),e.lineTo(t.x,t.y+t.height),e.lineTo(t.x+t.width,t.y+t.height),e.moveTo(t.x+2*n,t.y+14*r),e.lineTo(t.x+7*n,t.y+6*r),e.lineTo(t.x+11*n,t.y+11*r),e.lineTo(t.x+15*n,t.y+2*r),e.moveTo(t.x,t.y),e.lineTo(t.x,t.y)}function l(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x,t.y),e.lineTo(t.x,t.y+t.height),e.lineTo(t.x+t.width,t.y+t.height),e.moveTo(t.x+3*n,t.y+14*r),e.lineTo(t.x+3*n,t.y+6*r),e.lineTo(t.x+4*n,t.y+6*r),e.lineTo(t.x+4*n,t.y+14*r),e.moveTo(t.x+7*n,t.y+14*r),e.lineTo(t.x+7*n,t.y+2*r),e.lineTo(t.x+8*n,t.y+2*r),e.lineTo(t.x+8*n,t.y+14*r),e.moveTo(t.x+11*n,t.y+14*r),e.lineTo(t.x+11*n,t.y+9*r),e.lineTo(t.x+12*n,t.y+9*r),e.lineTo(t.x+12*n,t.y+14*r)}function c(e,t){var n=t.width/16;e.moveTo(t.x+n,t.y),e.lineTo(t.x+n,t.y+t.height),e.lineTo(t.x+15*n,t.y+t.height),e.lineTo(t.x+15*n,t.y),e.lineTo(t.x+n,t.y),e.moveTo(t.x+3*n,t.y+3*n),e.lineTo(t.x+13*n,t.y+3*n),e.moveTo(t.x+3*n,t.y+6*n),e.lineTo(t.x+13*n,t.y+6*n),e.moveTo(t.x+3*n,t.y+9*n),e.lineTo(t.x+13*n,t.y+9*n),e.moveTo(t.x+3*n,t.y+12*n),e.lineTo(t.x+9*n,t.y+12*n)}function h(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x,t.y),e.lineTo(t.x,t.y+t.height),e.lineTo(t.x+t.width,t.y+t.height),e.lineTo(t.x+t.width,t.y),e.lineTo(t.x,t.y),e.moveTo(t.x+4*n,t.y),e.lineTo(t.x+4*n,t.y+8*r),e.lineTo(t.x+12*n,t.y+8*r),e.lineTo(t.x+12*n,t.y),e.moveTo(t.x+6*n,t.y+11*r),e.lineTo(t.x+6*n,t.y+13*r),e.lineTo(t.x+10*n,t.y+13*r),e.lineTo(t.x+10*n,t.y+11*r),e.lineTo(t.x+6*n,t.y+11*r),e.moveTo(t.x,t.y),e.lineTo(t.x,t.y)}function p(e,t){var n=t.x,r=t.y,i=t.width,s=t.height;e.moveTo(n,r+s/2),e.lineTo(n+i,r+s/2),e.moveTo(n+i/2,r),e.lineTo(n+i/2,r+s)}function d(e,t){var n=t.width/2,r=t.height/2;e.arc(t.x+n,t.y+r,Math.min(n,r),0,Math.PI*2)}function v(e,t){e.rect(t.x,t.y,t.width,t.height)}function m(e,t){var n=t.width/2,r=t.height/2,i=t.x+n,s=t.y+r,o=Math.min(n,r);e.moveTo(i,s-o),e.lineTo(i+o,s+o),e.lineTo(i-o,s+o),e.lineTo(i,s-o)}function g(e,t){var n=t.width/2,r=t.height/2,i=t.x+n,s=t.y+r,o=Math.min(n,r);e.moveTo(i,s-o),e.lineTo(i+o,s),e.lineTo(i,s+o),e.lineTo(i-o,s),e.lineTo(i,s-o)}function y(e,t){var n=t.x,r=t.y,i=t.width/16;e.moveTo(n+8*i,r),e.lineTo(n+i,r+t.height),e.lineTo(n+8*i,r+t.height/4*3),e.lineTo(n+15*i,r+t.height),e.lineTo(n+8*i,r)}function b(t,n){var r=n.width/2,i=n.height/2,s=e("zrender/shape").get("star");s.buildPath(t,{x:n.x+r,y:n.y+i,r:Math.min(r,i),n:n.n||5})}function w(t,n){setTimeout(function(){e("zrender/shape").get("image").brush(t,{style:n})},100)}var t=e("zrender/tool/matrix");return n.prototype={buildPath:function(e,t){this._iconLibrary[t.iconType]?this._iconLibrary[t.iconType](e,t):(e.moveTo(t.x,t.y),e.lineTo(t.x+t.width,t.y),e.lineTo(t.x+t.width,t.y+t.height),e.lineTo(t.x,t.y+t.height),e.lineTo(t.x,t.y));return},getRect:function(e){return{x:Math.round(e.x),y:Math.round(e.y),width:e.width,height:e.height}},isCover:function(e,n,r){if(e.__needTransform&&e._transform){var i=[];t.invert(i,e._transform);var s=[n,r];t.mulVector(s,i,[n,r,1]),n==s[0]&&r==s[1]&&(Math.abs(e.rotation[0])>1e-4||Math.abs(e.position[0])>1e-4||Math.abs(e.position[1])>1e-4||Math.abs(e.scale[0]-1)>1e-4||Math.abs(e.scale[1]-1)>1e-4?e.__needTransform=!0:e.__needTransform=!1),n=s[0],r=s[1]}var o;e.style.__rect?o=e.style.__rect:(o=this.getRect(e.style),e.style.__rect=o);var u=5;return n>=o.x-u&&n<=o.x+o.width+2*u&&r>=o.y-u&&r<=o.y+o.height+2*u?!0:!1},define:function(e,t){this._iconLibrary[e]=t},get:function(e){return this._iconLibrary[e]}},e("zrender/shape/base").derive(n),e("zrender/shape").define("icon",new n),n}),r("echarts/chart",[],function(){var e={},t={};return e.define=function(n,r){return t[n]=r,e},e.get=function(e){return t[e]},e}),r("echarts/component/base",["require","../config","zrender/tool/util"],function(e){function t(t){function s(e){e=e||i.type+"";switch(e){case n.COMPONENT_TYPE_GRID:case n.COMPONENT_TYPE_AXIS_CATEGORY:case n.COMPONENT_TYPE_AXIS_VALUE:return 0;case n.CHART_TYPE_LINE:case n.CHART_TYPE_BAR:case n.CHART_TYPE_SCATTER:case n.CHART_TYPE_PIE:case n.CHART_TYPE_RADAR:case n.CHART_TYPE_MAP:case n.CHART_TYPE_K:case n.CHART_TYPE_CHORD:return 2;case n.COMPONENT_TYPE_LEGEND:case n.COMPONENT_TYPE_DATARANGE:case n.COMPONENT_TYPE_DATAZOOM:return 4;case n.CHART_TYPE_ISLAND:return 5;case n.COMPONENT_TYPE_TOOLBOX:case n.COMPONENT_TYPE_TITLE:return 6;case n.COMPONENT_TYPE_TOOLTIP:return 7;default:return 0}}function o(e){return r.merge(e||{},n[i.type]||{},{overwrite:!1,recursive:!0})}function u(e){if(!(e instanceof Array))return[e,e,e,e];switch(e.length+""){case"4":return e;case"3":return[e[0],e[1],e[2],e[1]];case"2":return[e[0],e[1],e[0],e[1]];case"1":return[e[0],e[0],e[0],e[0]];case"0":return[0,0,0,0]}}function a(e,t){if(typeof e=="undefined")return undefined;if(!t)return e;t=t.split(".");var n=t.length,r=0;while(r0?-1:1,t.style.r-=i,t.style.r=t.style.r<5?5:t.style.r;var s=o.get(t,"value"),a=s*f.island.calculateStep;a>1?s=Math.round(s-a*i):s=(s-a*i).toFixed(2)-0;var l=o.get(t,"name");t.style.text=l+":"+s,o.set(t,"value",s),o.set(t,"name",l),n.modShape(t.id,t),n.refresh(),u.stop(r)},a.refresh=m,a.render=g,a.resize=b,a.getOption=y,a.add=w,a.del=E,a.ondrop=S,a.ondragend=x}return e("../chart").define("island",t),t}),r("echarts/component",[],function(){var e={},t={};return e.define=function(n,r){return t[n]=r,e},e.get=function(e){return t[e]},e}),r("echarts/component/title",["require","./base","../config","zrender/tool/area","zrender/tool/util","../component"],function(e){function t(t,n,r){function h(){c=v(),d(),p();for(var e=0,t=a.shapeList.length;e3){var o=T(),l=!1,c,h;e=0;while(!l&&e3){var o=T();e=1;while(o*e-60?r.position=="bottom"?"right":"left":r.position=="bottom"?"left":"right",e.rotation=[i*Math.PI/180,e.style.x,e.style.y]),f.shapeList.push(e)}else{var g,y;r.position=="left"?(g=l.getX()-s,y="right"):(g=l.getXend()+s,y="left");for(var m=0;m1?e-1:1)}function N(e){var t=r.data,n=t.length,i=T(),s=r.boundaryGap?i:0;for(var o=0;o=r.data.length)return r.position=="bottom"||r.position=="top"?l.getXend():l.getY();var t=T(),n=r.boundaryGap?t:0;return n+=e*t,r.position=="bottom"||r.position=="top"?n=l.getX()+n:n=l.getYend()-n,e===0||e==r.data.length-1?n:Math.floor(n)}function k(e){return r.data[e]}function L(e){return e%h===0}function A(){return r.position}var s=e("./base");s.call(this,n);var o=e("../config"),u=e("zrender/tool/util"),a=e("zrender/tool/area"),f=this;f.type=o.COMPONENT_TYPE_AXIS_CATEGORY;var l=i.grid,c=f.getZlevelBase(),h,p;f.init=S,f.refresh=x,f.getGap=T,f.getCoord=N,f.getCoordByIndex=C,f.getNameByIndex=k,f.isMainAxis=L,f.getPosition=A,S(r,l)}return e("../component").define("categoryAxis",t),t}),r("echarts/component/valueAxis",["require","./base","../config","zrender/tool/util","../component"],function(e){function t(t,n,r,i,s){function g(){d=!1,x();if(!d)return;r.splitArea.show&&S(),r.splitLine.show&&E(),r.axisLine.show&&y(),r.axisTick.show&&b(),r.axisLabel.show&&w();for(var e=0,t=f.shapeList.length;e0?r.position=="bottom"?"right":"left":r.position=="bottom"?"left":"right",e.rotation=[i*Math.PI/180,e.style.x,e.style.y]),f.shapeList.push(e)}else{var p,d;r.position=="left"?(p=l.getX()-s,d="right"):(p=l.getXend()+s,d="left");for(var h=0;h=0?typeof t[y][m]!="undefined"?t[y][m]+=n:t[y][m]=n:typeof t[b][m]!="undefined"?t[b][m]+=n:t[b][m]=n}}}for(var l in t){e=t[l];for(var m=0,g=e.length;m0?r.power:1:p>0?h=p/r.splitNumber:p/=r.splitNumber),T(r.scale)}function T(e){var t=r.splitNumber,n=r.precision,i,s;n===0?s=r.power:(s=Math.pow(10,n),h*=s,p*=s,s=r.power);var o;if(h>=0&&p>=0){e||(h=0);while(p/sh&&(i=Math.ceil((h-p)/t/s)*s)),h=-i*t+p}else{o=p-h;while(o/sp?p:e;var t=p-h,n,i;return r.position=="left"||r.position=="right"?(n=l.getHeight(),i=l.getYend()-(e-h)/t*n):(n=l.getWidth(),i=(e-h)/t*n+l.getX()),e==h||e==p?i:Math.floor(i)}function O(){return r.position}var o=e("./base");o.call(this,n);var u=e("../config"),a=e("zrender/tool/util"),f=this;f.type=u.COMPONENT_TYPE_AXIS_VALUE;var l=i.grid,c=f.getZlevelBase(),h,p,d,v,m;f.init=k,f.refresh=L,f.getExtremum=C,f.getCoord=A,f.getPosition=O,k(r,l,s)}return e("../component").define("valueAxis",t),t}),r("echarts/component/axis",["require","./base","../config","./categoryAxis","./valueAxis","../component"],function(e){function t(t,n,r,i,s){function l(e){!e||e instanceof Array&&e.length===0?e=[{type:u.COMPONENT_TYPE_AXIS_VALUE}]:e instanceof Array||(e=[e]),e.length>2&&(e=[e[0],e[1]]);if(s=="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;t0?"both":"fill",color:t.backgroundColor,strokeColor:t.borderColor,lineWidth:t.borderWidth}}),n.addShape(o.shapeList[0])}function v(){return a}function m(){return f}function g(){return l}function y(){return c}function b(){return a+l}function w(){return f+c}function E(){return{x:a,y:f,width:l,height:c}}function S(e){if(h!=n.getWidth()||p!=n.getHeight()||e)o.clear(),d(e||r)}var i=e("./base");i.call(this,n);var s=e("../config"),o=this;o.type=s.COMPONENT_TYPE_GRID;var u=o.getZlevelBase(),a,f,l,c,h,p;o.init=d,o.getX=v,o.getY=m,o.getWidth=g,o.getHeight=y,o.getXend=b,o.getYend=w,o.getArea=E,o.refresh=S,d(r)}return e("../component").define("grid",t),t}),r("echarts/component/dataZoom",["require","./base","../config","../component","zrender/tool/util","../component"],function(e){function t(t,n,r,i){function w(){N(),C(),k(),L();for(var e=0,t=u.shapeList.length;e=0&&f.start<=100?f.start:0,m=typeof f.end!="undefined"&&f.end>=0&&f.end<=100?f.end:100;v>m&&(v+=m,m=v-m,v-=m);var g=Math.round((m-v)/100*(f.orient=="horizontal"?h.width:h.height));return{start:v,end:m,start2:0,end2:100,size:g,xAxisIndex:s,yAxisIndex:u,seriesIndex:i}}function x(){b={xAxis:{},yAxis:{},series:{}};var e=r.xAxis,t=p.xAxisIndex;for(var n=0,i=t.length;n=h.x+h.width?e.style.x=h.x+h.width-e.style.width-r:e.style.x+=t:e.style.y+n-r<=h.y?e.style.y=h.y+r:e.style.y+n+e.style.height+r>=h.y+h.height?e.style.y=h.y+h.height-e.style.height-r:e.style.y+=n,e._type=="filler"?O():M(),f.realtime?D():(clearTimeout(g),g=setTimeout(D,200)),!0}function O(){f.orient=="horizontal"?(v.style.x=d.style.x-c,m.style.x=d.style.x+d.style.width,p.start=Math.floor((v.style.x-h.x)/h.width*100),p.end=Math.ceil((m.style.x+c-h.x)/h.width*100)):(v.style.y=d.style.y-c,m.style.y=d.style.y+d.style.height,p.start=Math.floor((v.style.y-h.y)/h.height*100),p.end=Math.ceil((m.style.y+c-h.y)/h.height*100)),n.modShape(v.id,v),n.modShape(m.id,m),n.refresh()}function M(){var e,t;f.orient=="horizontal"?(e=v.style.x,t=m.style.x,d.style.x=Math.min(e,t)+c,d.style.width=Math.abs(e-t)-c,p.start=Math.floor((Math.min(e,t)-h.x)/h.width*100),p.end=Math.ceil((Math.max(e,t)+c-h.x)/h.width*100)):(e=v.style.y,t=m.style.y,d.style.y=Math.min(e,t)+c,d.style.height=Math.abs(e-t)-c,p.start=Math.floor((Math.min(e,t)-h.y)/h.height*100),p.end=Math.ceil((Math.max(e,t)+c-h.y)/h.height*100)),n.modShape(d.id,d),n.refresh()}function _(){if(!f.show)return;f.orient=="horizontal"?(v.style.x=h.x+p.start/100*h.width,m.style.x=h.x+p.end/100*h.width-c,d.style.x=v.style.x+c,d.style.width=m.style.x-v.style.x-c):(v.style.y=h.y+p.start/100*h.height,m.style.y=h.y+p.end/100*h.height-c,d.style.y=v.style.y+c,d.style.height=m.style.y-v.style.y-c),n.modShape(v.id,v),n.modShape(m.id,m),n.modShape(d.id,d),n.refresh()}function D(e){var n,i,s,u,a;for(var l in b){n=b[l];for(var c in n)a=n[c],u=a.length,i=Math.floor(p.start/100*u),s=Math.ceil(p.end/100*u),r[l][c].type!=o.CHART_TYPE_SCATTER?r[l][c].data=a.slice(i,s):r[l][c].data=P(c,a)}!y&&(f.realtime||e)&&t.dispatch(o.EVENT.DATA_ZOOM,null,{zoom:p}),f.start=p.start,f.end=p.end}function P(e,t){var n=[],r=p.scatterMap[e],i,s,o,u,a;f.orient=="horizontal"?(i=r.x.max-r.x.min,s=p.start/100*i+r.x.min,o=p.end/100*i+r.x.min,i=r.y.max-r.y.min,u=p.start2/100*i+r.y.min,a=p.end2/100*i+r.y.min):(i=r.x.max-r.x.min,s=p.start2/100*i+r.x.min,o=p.end2/100*i+r.x.min,i=r.y.max-r.y.min,u=p.start/100*i+r.y.min,a=p.end/100*i+r.y.min);for(var l=0,c=t.length;l=s&&t[l][0]<=o&&t[l][1]>=u&&t[l][1]<=a&&n.push(t[l]);return n}function H(){u.isDragend=!0}function B(e,n){if(!u.isDragend||!e.target)return;D(),n.dragOut=!0,n.dragIn=!0,!y&&!f.realtime&&t.dispatch(o.EVENT.DATA_ZOOM,null,{zoom:p}),n.needRefresh=!1,u.isDragend=!1;return}function j(e,t){t.needRefresh=!0;return}function F(e){f.start=p.start=e.start,f.end=p.end=e.end,f.start2=p.start2=e.start2,f.end2=p.end2=e.end2,_(),D(!0);return}function I(e){if(!e)return f.start=f.start2=p.start=p.start2=0,f.end=f.end2=p.end=p.end2=100,_(),D(!0),p;var t=i.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,s=(n.x-t.x)/t.width,o=1-(n.x+n.width-t.x)/t.width,u=1-(n.y+n.height-t.y)/t.height,a=(n.y-t.y)/t.height;return f.orient=="horizontal"?(r=p.end-p.start,p.start+=r*s,p.end-=r*o,r=p.end2-p.start2,p.start2+=r*u,p.end2-=r*a):(r=p.end-p.start,p.start+=r*u,p.end-=r*a,r=p.end2-p.start2,p.start2+=r*s,p.end2-=r*o),f.start=p.start,f.end=p.end,f.start2=p.start2,f.end2=p.end2,_(),D(!0),p}function q(e,t){var n,r=b.series,i=e.series,s;for(var o=0,u=i.length;o=p-m&&(m=h.x,g+=b+w):d-g<200&&b+(N==t-1||e[N+1]===""?0:w)>=d-g&&(l.x=="right"?m-=h.maxWidth+w:m+=h.maxWidth+w,g=h.y),s=x(m,g,y,b,v[n]?E:"#ccc",i),s._name=n,l.selectedMode&&(s.onclick=T),f.shapeList.push(s),o={shape:"text",zlevel:c,style:{x:m+y+5,y:g,color:v[n]?l.textStyle.color:"#ccc",text:n,textFont:u,textBaseline:"top"},hoverable:l.selectedMode,clickable:l.selectedMode},l.orient=="vertical"&&l.x=="right"&&(o.style.x-=y+10,o.style.textAlign="right"),o._name=n,l.selectedMode&&(o.onclick=T),f.shapeList.push(o),l.orient=="horizontal"?m+=y+5+a.getTextWidth(n,u)+w:g+=b+w}}function w(){var e=l.padding[0],t=l.padding[1],n=l.padding[2],r=l.padding[3];f.shapeList.push({shape:"rectangle",zlevel:c,hoverable:!1,style:{x:h.x-r,y:h.y-e,width:h.width+r+t,height:h.height+e+n,brushType:l.borderWidth===0?"fill":"both",color:l.backgroundColor,strokeColor:l.borderColor,lineWidth:l.borderWidth}})}function E(){var e=l.data,t=e.length,n=l.itemGap,i=l.itemWidth+5,s=l.itemHeight,o=f.getFont(l.textStyle),u=0,c=0,h=l.padding,p=r.getWidth()-h[1]-h[3],d=r.getHeight()-h[0]-h[2],v=0,m=0;if(l.orient=="horizontal"){c=s;for(var g=0;gp?(u=p,c+=s+n):u=Math.max(u,v),c+=s+n,v=0;continue}v+=i+a.getTextWidth(e[g],o)+n}c=Math.max(c,s),v-=n,v>p?(u=p,c+=s+n):u=Math.max(u,v)}else{for(var g=0;gd?(c=d,u+=m+n):c=Math.max(c,v),u+=m+n,v=0;continue}v+=s+n}u=Math.max(u,m),v-=n,v>d?(c=d,u+=m+n):c=Math.max(c,v)}p=r.getWidth(),d=r.getHeight();var y;switch(l.x){case"center":y=Math.floor((p-u)/2);break;case"left":y=l.padding[3]+l.borderWidth;break;case"right":y=p-u-l.padding[1]-l.padding[3]-l.borderWidth*2;break;default:y=l.x-0,y=isNaN(y)?0:y}var b;switch(l.y){case"top":b=l.padding[0]+l.borderWidth;break;case"bottom":b=d-c-l.padding[0]-l.padding[2]-l.borderWidth*2;break;case"center":b=Math.floor((d-c)/2);break;default:b=l.y-0,b=isNaN(b)?0:b}return{x:y,y:b,width:u,height:c,maxWidth:m}}function S(e){var t=i.series,n,r;for(var s=0,o=t.length;sm&&(v-=w+5)):(gy&&(g-=h+5))}return{x:v,y:g,width:f,height:l}}function _(e,t,n){return{shape:"text",zlevel:f,style:{x:a.orient=="horizontal"?e:l.x+l.width/2,y:a.orient=="horizontal"?l.y+l.height/2:t,color:a.textStyle.color,text:n,textFont:u.getFont(a.textStyle),textBaseline:a.orient=="horizontal"?"middle":"top",textAlign:a.orient=="horizontal"?"left":"center"}}}function D(e,t,n,r,i){return{shape:"rectangle",zlevel:f,style:{x:e,y:t+1,width:n,height:r-2,color:i},clickable:!0}}function P(e,t,n){var r=c.x,i=c.y,s=c.width,o=c.height;return a.orient=="horizontal"?e.style.x+t<=r?e.style.x=r:e.style.x+t+e.style.width>=r+s?e.style.x=r+s-e.style.width:e.style.x+=t:e.style.y+n<=i?e.style.y=i:e.style.y+n+e.style.height>=i+o?e.style.y=i+o-e.style.height:e.style.y+=n,e._type=="filler"?F():I(e),a.realtime?R():(clearTimeout(y),y=setTimeout(R,200)),!0}function H(){u.isDragend=!0}function B(e,n){if(!u.isDragend||!e.target)return;R(),n.dragOut=!0,n.dragIn=!0,a.realtime||t.dispatch(s.EVENT.DATA_RANGE,null,{range:{start:g.end,end:g.start}}),n.needRefresh=!1,u.isDragend=!1;return}function j(){if(a.range){typeof a.range.start!="undefined"&&(g.end=a.range.start),typeof a.range.end!="undefined"&&(g.start=a.range.end);if(g.start!=100||g.end!==0){if(a.orient=="horizontal"){var e=m.style.width;m.style.x+=e*(100-g.start)/100,m.style.width=e*(g.start-g.end)/100}else{var t=m.style.height;m.style.y+=t*(100-g.start)/100,m.style.height=t*(g.start-g.end)/100}n.modShape(m.id,m),F()}}}function F(){var e=c.x,t=c.y,n=c.width,r=c.height;a.orient=="horizontal"?(h.style.x=m.style.x,p.style.width=h.style.x-e,d.style.x=m.style.x+m.style.width,v.style.x=d.style.x,v.style.width=e+n-d.style.x,g.start=Math.ceil(100-(h.style.x-e)/n*100),g.end=Math.floor(100-(d.style.x-e)/n*100)):(h.style.y=m.style.y,p.style.height=h.style.y-t,d.style.y=m.style.y+m.style.height,v.style.y=d.style.y,v.style.height=t+r-d.style.y,g.start=Math.ceil(100-(h.style.y-t)/r*100),g.end=Math.floor(100-(d.style.y-t)/r*100)),q(!1)}function I(e){var t=c.x,n=c.y,r=c.width,i=c.height,s,o;a.orient=="horizontal"?(s=h.style.x,o=d.style.x,e.id==h.id&&s>=o?(o=s,d.style.x=s):e.id==d.id&&s>=o&&(s=o,h.style.x=s),m.style.x=s,m.style.width=o-s,p.style.width=s-t,v.style.x=o,v.style.width=t+r-o,g.start=Math.ceil(100-(s-t)/r*100),g.end=Math.floor(100-(o-t)/r*100)):(s=h.style.y,o=d.style.y,e.id==h.id&&s>=o?(o=s,d.style.y=s):e.id==d.id&&s>=o&&(s=o,h.style.y=s),m.style.y=s,m.style.height=o-s,p.style.height=s-n,v.style.y=o,v.style.height=n+i-o,g.start=Math.ceil(100-(s-n)/i*100),g.end=Math.floor(100-(o-n)/i*100)),q(!0)}function q(e){h.position=[h.style.x-h.style._x,h.style.y-h.style._y],a.precision===0?h.style.text=Math.round(w*g.start+a.min)+"":h.style.text=(w*g.start+a.min).toFixed(a.precision),h.style.color=X(w*g.start+a.min),n.modShape(h.id,h),d.position=[d.style.x-d.style._x,d.style.y-d.style._y],a.precision===0?d.style.text=Math.round(w*g.end+a.min)+"":d.style.text=(w*g.end+a.min).toFixed(a.precision),d.style.color=X(w*g.end+a.min),n.modShape(d.id,d),n.modShape(p.id,p),n.modShape(v.id,v),e&&n.modShape(m.id,m),n.refresh()}function R(){a.realtime&&t.dispatch(s.EVENT.DATA_RANGE,null,{range:{start:g.end,end:g.start}})}function U(e){var n=e.target._idx;x[n]=!x[n],t.dispatch(s.EVENT.REFRESH)}function z(t){if(typeof u.deepQuery([t],"dataRange.min")=="undefined"||typeof u.deepQuery([t],"dataRange.max")=="undefined")return;r=t,r.dataRange=u.reformOption(r.dataRange),r.dataRange.padding=u.reformCssArray(r.dataRange.padding),a=r.dataRange,u.clear(),x={};var n=e("zrender/tool/color"),i=a.splitNumber<=0||a.calculable?100:a.splitNumber;E=n.getGradientColors(a.color,(i-a.color.length)/(a.color.length-1)+1),E=E.slice(0,i),a.precision===0?w=Math.round((a.max-a.min)/i)||1:(w=(a.max-a.min)/i,w=w.toFixed(a.precision)-0),S=[];for(var s=0;sa.max&&(e=a.max);if(a.calculable)if(e>w*g.start+a.min||e0&&(n.delShape(B.tipShape),B=!1),e&&n.refresh()}function R(e,t,n){var r=x.offsetHeight,i=x.offsetWidth;e+i>H&&(e=H-i),t+r>P&&(t=P-r),t<20&&(t=0),x.style.cssText=T+N+(n?n:"")+"left:"+e+"px;top:"+t+"px;",(H-e<100||P-t<100)&&setTimeout(U,20)}function U(){if(x){var e="",t=x.offsetHeight,n=x.offsetWidth;x.offsetLeft+n>H&&(e+="left:"+(H-n)+"px;"),x.offsetTop+t>P&&(e+="top:"+(P-t)+"px;"),e!==""&&(x.style.cssText+=e)}}function z(){var e,t;if(!M)X()||W();else{if(M._type=="island"&&r.tooltip.show){K();return}var n=u.get(M,"series"),i=u.get(M,"data");e=m.deepQuery([i,n,r],"tooltip.show"),typeof n=="undefined"||typeof i=="undefined"||e===!1?(clearTimeout(k),clearTimeout(A),k=setTimeout(q,L)):(t=m.deepQuery([i,n,r],"tooltip.trigger"),t=="axis"?$(n.xAxisIndex,n.yAxisIndex,u.get(M,"dataIndex")):K())}}function W(){if(!w||!E){k=setTimeout(q,L);return}var e=r.series,t,n;for(var i=0,s=e.length;i=r)break;a=t.getCoordByIndex(++n),o=a}return r-sh){a>=i&&(c=a);if(a<=i)break;a=t.getCoordByIndex(++n),f=a}return i-f>c-i?n-=1:typeof t.getNameByIndex(n)=="undefined"&&(n=-1),n}function $(e,n,s){if(typeof w=="undefined"||typeof E=="undefined"||typeof e=="undefined"||typeof n=="undefined"||s<0){clearTimeout(k),clearTimeout(A),k=setTimeout(q,L);return}var u=r.series,a=[],f=[],c,h,p,d,v,g="";if(r.tooltip.trigger=="axis"){if(r.tooltip.show===!1)return;d=r.tooltip.formatter}if(e!=-1&&w.getAxis(e).type==o.COMPONENT_TYPE_AXIS_CATEGORY){c=w.getAxis(e);for(var y=0,S=u.length;y0){var T;if(typeof d=="function"){var N=[];for(var y=0,S=a.length;y"+ut(a[y].name||"")+" : ",T=a[y].data[s],T=typeof T!="undefined"?typeof T.value!="undefined"?T.value:T:"-",d+=T;x.innerHTML=d}if(v===!1||!r.tooltip.showContent)return;m.hasAppend||(x.style.left=H/2+"px",x.style.top=P/2+"px",i.firstChild.appendChild(x),m.hasAppend=!0),R(h,p,g)}}function J(e,t){if(typeof S=="undefined"||typeof e=="undefined"||typeof t=="undefined"||t<0)return!1;var n=r.series,s=[],o,u,a="";if(r.tooltip.trigger=="axis"){if(r.tooltip.show===!1)return!1;o=r.tooltip.formatter}for(var f=0,c=n.length;f0){var h,p,d=[],v=r.polar[e].indicator[t].text;for(var f=0,c=s.length;f"+ut(d[0][3])+" : "+d[0][2];for(var f=1,c=d.length;f"+ut(d[f][1])+"
",o+=ut(d[f][3])+" : "+d[f][2];x.innerHTML=o}if(u===!1||!r.tooltip.showContent)return;return m.hasAppend||(x.style.left=H/2+"px",x.style.top=P/2+"px",i.firstChild.appendChild(x),m.hasAppend=!0),R(l.getX(_),l.getY(_),a),!0}}function K(){var e=u.get(M,"series"),t=u.get(M,"data"),s=u.get(M,"name"),a=u.get(M,"value"),f=u.get(M,"special"),c=u.get(M,"special2"),h,p,d="",v,g="";M._type!="island"?(r.tooltip.trigger=="item"&&(h=r.tooltip.formatter),m.deepQuery([e],"tooltip.trigger")=="item"&&(p=m.deepQuery([e],"tooltip.showContent")||p,h=m.deepQuery([e],"tooltip.formatter")||h,d+=I(m.deepQuery([e],"tooltip"))),p=m.deepQuery([t],"tooltip.showContent")||p,h=m.deepQuery([t],"tooltip.formatter")||h,d+=I(m.deepQuery([t],"tooltip"))):(p=m.deepQuery([t,e,r],"tooltip.showContent"),h=m.deepQuery([t,e,r],"tooltip.islandFormatter"));if(typeof h=="function")D=(e.name||"")+":"+u.get(M,"dataIndex"),x.innerHTML=h([e.name||"",s,a,f,c],D,Z);else if(typeof h=="string")D=NaN,h=h.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}"),h=h.replace("{a0}",ut(e.name||"")).replace("{b0}",ut(s)).replace("{c0}",a),h=h.replace("{d}","{d0}").replace("{d0}",f||""),h=h.replace("{e}","{e0}").replace("{e0}",u.get(M,"special2")||""),x.innerHTML=h;else{D=NaN;if(e.type==o.CHART_TYPE_SCATTER)x.innerHTML=(typeof e.name!="undefined"?ut(e.name)+"
":"")+(s===""?"":ut(s)+" : ")+a+(typeof f=="undefined"?"":" ("+f+")");else if(e.type==o.CHART_TYPE_RADAR){v=f,g+=ut(s===""?e.name||"":s),g+=g===""?"":"
";for(var y=0;y";x.innerHTML=g}else if(e.type==o.CHART_TYPE_CHORD)if(typeof c=="undefined")x.innerHTML=ut(s)+" ("+a+")";else{var b=ut(s),w=ut(f);x.innerHTML=(typeof e.name!="undefined"?ut(e.name)+"
":"")+b+" -> "+w+" ("+a+")"+"
"+w+" -> "+b+" ("+c+")"}else x.innerHTML=(typeof e.name!="undefined"?ut(e.name)+"
":"")+ut(s)+" : "+a+(typeof f=="undefined"?"":" ("+f+")")}j.invisible||(j.invisible=!0,n.modShape(j.id,j),n.refresh());if(p===!1||!r.tooltip.showContent)return;m.hasAppend||(x.style.left=H/2+"px",x.style.top=P/2+"px",i.firstChild.appendChild(x),m.hasAppend=!0),R(l.getX(_)+20,l.getY(_)-20,d)}function Q(e,t,i,s,o,u){if(e.length>0){var a,f,l=r.tooltip.axisPointer,c=l.type,h=l.lineStyle.color,p=l.lineStyle.width,d=l.lineStyle.type,v=l.areaStyle.size,g=l.areaStyle.color;for(var y=0,w=e.length;yH&&(n+="left:"+(H-i)+"px;"),x.offsetTop+r>P&&(n+="top:"+(P-r)+"px;"),n!==""&&(x.style.cssText+=n),(H-x.offsetLeft<100||P-x.offsetTop<100)&&setTimeout(U,20)}function et(e){y=e,b=y.grid,w=y.xAxis,E=y.yAxis,S=y.polar}function tt(e,t){if(!B||B&&B.dataIndex!=e.dataIndex){B&&B.tipShape.length>0&&n.delShape(B.tipShape);for(var r=0,i=t.length;r/g,">").replace(/"/g,""").replace(/'/g,"'")}var s=e("./base");s.call(this,n);var o=e("../config"),u=e("../util/ecData"),a=e("zrender/config"),f=e("zrender/shape"),l=e("zrender/tool/event"),c=e("zrender/tool/area"),h=e("zrender/tool/color"),p=e("zrender/tool/util"),d=e("zrender/shape/base"),v=f.get("rectangle"),m=this;m.type=o.COMPONENT_TYPE_TOOLTIP;var g=m.getZlevelBase(),y={},b,w,E,S,x=document.createElement("div"),T="position:absolute;display:block;border-style:solid;white-space:nowrap;",N,C,k,L,A,O,M,_,D,P=n.getHeight(),H=n.getWidth(),B=!1,j={shape:"line",id:n.newShapeId("tooltip"),zlevel:g,invisible:!0,hoverable:!1,style:{}},F={shape:"line",id:n.newShapeId("tooltip"),zlevel:1,invisible:!0,hoverable:!1,style:{}};n.addShape(j),n.addShape(F),n.on(a.EVENT.MOUSEMOVE,G),n.on(a.EVENT.GLOBALOUT,Y),m.dispose=ot,m.init=rt,m.refresh=it,m.resize=st,m.setComponent=et,m.ontooltipHover=tt,m.ondragend=nt,rt(r,i)}return e("../component").define("tooltip",t),t}),r("echarts/component/toolbox",["require","./base","../config","zrender/config","zrender/tool/event","../component","../component"],function(e){function t(t,n,r){function L(){d=[];var e=a.toolbox.feature;for(var t in e)if(e[t])switch(t){case"mark":d.push("mark"),d.push("markUndo"),d.push("markClear");break;case"magicType":for(var r=0,i=e[t].length;r0){m=M(),O(),A();for(var r=0,i=l.shapeList.length;r0?f.dataZoom.absoluteZoom(C[C.length-1]):(f.dataZoom.rectZoom(),z(v.dataZoomReset),n.refresh()),!0}function R(){E=!1,w&&(w=!1,v.mark&&n.modShape(v.mark.id,{style:{strokeColor:v.mark.highlightStyle.strokeColor}}),n.un(o.EVENT.CLICK,j),n.un(o.EVENT.MOUSEMOVE,P))}function U(){T=!1,x&&(x=!1,v.dataZoom&&n.modShape(v.dataZoom.id,{style:{strokeColor:v.dataZoom.highlightStyle.strokeColor}}),n.un(o.EVENT.MOUSEDOWN,H),n.un(o.EVENT.MOUSEUP,B),n.un(o.EVENT.MOUSEMOVE,P))}function z(e){n.modShape(e.id,{hoverable:!1,clickable:!1,style:{strokeColor:y}})}function W(e){n.modShape(e.id,{hoverable:!0,clickable:!0,style:{strokeColor:e.highlightStyle.strokeColor}})}function X(){return k.show(a),!0}function V(){return R(),U(),t.dispatch(s.EVENT.RESTORE),!0}function $(){var e=a.toolbox.feature.saveAsImage,t=e.type||"png";t!="png"&&t!="jpeg"&&(t="png");var r=n.toDataURL("image/"+t),i=document.createElement("div");i.id="__echarts_download_wrap__",i.style.cssText="position:fixed;z-index:99999;display:block;top:0;left:0;background-color:rgba(33,33,33,0.5);text-align:center;width:100%;height:100%;line-height:"+document.documentElement.clientHeight+"px;";var s=document.createElement("a");s.href=r,s.setAttribute("download",(e.name?e.name:a.title&&(a.title.text||a.title.subtext)?a.title.text||a.title.subtext:"ECharts")+"."+t),s.innerHTML='图片另存为")+'"/>',i.appendChild(s),document.body.appendChild(i),s=null,i=null,setTimeout(function(){var e=document.getElementById("__echarts_download_wrap__");e&&(e.onclick=function(){var e=document.getElementById("__echarts_download_wrap__");e.onclick=null,e.innerHTML="",document.body.removeChild(e),e=null},e=null)},500);return}function J(e){R();var n=e.target._name;return n==h?h=!1:h=n,t.dispatch(s.EVENT.MAGIC_TYPE_CHANGED,e.event,{magicType:h}),!0}function K(e){if(e.toolbox&&e.toolbox.show&&e.toolbox.feature.magicType&&e.toolbox.feature.magicType.length>0){var t=e.toolbox.feature.magicType,n=t.length;p={};while(n--)p[t[n]]=!0;n=e.series.length;var r,i;while(n--)r=e.series[n].type,p[r]&&(i=e.xAxis instanceof Array?e.xAxis[e.series[n].xAxisIndex||0]:e.xAxis,i&&i.type=="category"&&(i.__boundaryGap=typeof i.boundaryGap!="undefined"?i.boundaryGap:!0),i=e.yAxis instanceof Array?e.yAxis[e.series[n].yAxisIndex||0]:e.yAxis,i&&i.type=="category"&&(i.__boundaryGap=typeof i.boundaryGap!="undefined"?i.boundaryGap:!0),e.series[n].__type=r)}h=!1;var s=e.dataZoom;if(s&&s.show){var o=typeof s.start!="undefined"&&s.start>=0&&s.start<=100?s.start:0,u=typeof s.end!="undefined"&&s.end>=0&&s.end<=100?s.end:100;o>u&&(o+=u,u=o-u,o-=u),C=[{start:o,end:u,start2:0,end2:100}]}else C=[]}function Q(){if(h){for(var e=0,t=a.series.length;e'+(t[0]||a[0])+"

",l.style.cssText="display:block;margin:0 0 8px 0;padding:4px 6px;overflow:auto;width:"+(y-15)+"px;"+"height:"+(g-100)+"px;";var n=u.deepQuery([r],"toolbox.feature.dataView.optionToContent");typeof n!="function"?l.value=E():l.value=n(r),f.appendChild(l),h.style.cssText="float:right;padding:1px 6px;",h.innerHTML=t[1]||a[1],h.onclick=b,f.appendChild(h),u.deepQuery([r],"toolbox.feature.dataView.readOnly")===!1?(c.style.cssText="float:right;margin-right:10px;padding:1px 6px;",c.innerHTML=t[2]||a[2],c.onclick=S,f.appendChild(c),l.readOnly=!1,l.style.cursor="default"):(l.readOnly=!0,l.style.cursor="text"),v="width:"+y+"px;"+"height:"+g+"px;"+"background-color:#fff;",f.style.cssText=d+v,i.onselectstart=function(){return!0}}function E(){var e,t,n,i,s,u,a=[],f="";if(r.xAxis){r.xAxis instanceof Array?a=r.xAxis:a=[r.xAxis];for(e=0,i=a.length;e10&&(v="width:"+y+"px;"+"height:"+g+"px;"+"background-color:#fff;",f.style.cssText=d+v,l.style.cssText="display:block;margin:0 0 8px 0;padding:4px 6px;overflow:auto;width:"+(y-15)+"px;"+"height:"+(g-100)+"px;")}function L(){window.removeEventListener?(f.removeEventListener("click",N),f.removeEventListener("mousewheel",N),f.removeEventListener("mousemove",N),f.removeEventListener("mousedown",N),f.removeEventListener("mouseup",N),f.removeEventListener("touchstart",N),f.removeEventListener("touchmove",N),f.removeEventListener("touchend",N)):(f.detachEvent("onclick",N),f.detachEvent("onmousewheel",N),f.detachEvent("onmousemove",N),f.detachEvent("onmousedown",N),f.detachEvent("onmouseup",N)),c.onclick=null,h.onclick=null,p&&(f.removeChild(l),f.removeChild(c),f.removeChild(h)),l=null,c=null,h=null,i.firstChild.removeChild(f),f=null,u=null}var s=e("./base");s.call(this,n);var o=e("../config"),u=this;u.type=o.COMPONENT_TYPE_DATAVIEW;var a=["Data View","close","refresh"],f=document.createElement("div"),l=document.createElement("textArea"),c=document.createElement("button"),h=document.createElement("button"),p=!1,d="position:absolute;display:block;overflow:hidden;transition:height 0.8s,background-color 1s;-moz-transition:height 0.8s,background-color 1s;-webkit-transition:height 0.8s,background-color 1s;-o-transition:height 0.8s,background-color 1s;z-index:1;left:0;top:0;",v,m="echarts-dataview",g=n.getHeight(),y=n.getWidth();u.dispose=L,u.resize=k,u.show=w,u.hide=b,C()}return e("../component").define("dataView",t),t}),r("echarts/util/coordinates",["require","zrender/tool/math"],function(e){function n(e,n){return[e*t.sin(n),e*t.cos(n)]}function r(e,t){return[Math.sqrt(e*e+t*t),Math.atan(t/e)]}var t=e("zrender/tool/math");return{polar2cartesian:n,cartesian2polar:r}}),r("echarts/component/polar",["require","./base","../config","../util/coordinates","zrender/tool/util","../component"],function(e){function t(t,n,r,i){function p(e,t){i=t,B(e)}function d(){for(var e=0;e0?a="left":Math.round(i[0])<0?a="right":a="center",c.margin?(m=c.margin,d=i[0]>0?m:-m,v=i[1]>0?m:-m,d=i[0]===0?0:d,v=i[1]===0?0:v,i=T(i,o,1)):i=T(i,o,1.2),u.textAlign=a,u.x=i[0]+d,u.y=i[1]+v,c.rotate&&(p=[c.rotate/180*Math.PI,i[0],i[1]]),f.shapeList.push({shape:"text",style:u,draggable:!1,hoverable:!1,rotation:p})}}function b(e){var e=e||0,t=l[e],n=N(e),r=t.__ecIndicator,i=r.length,s=[],o,u;for(var a=0;au||u===undefined)&&(u=e),(e=1)a=Math.floor(a/l)*l-l;else{if(l===0)return u>0?(d=0,p=2*u):u===0?(d=0,p=100):(p=0,d=2*a),{max:p,min:d};c=(l+"").split(".")[1],h=c.length,a=Math.floor(a*Math.pow(10,h))/Math.pow(10,h)-l}Math.abs(a)<=l&&(a=0),u=a+Math.floor(l*Math.pow(10,h)*(n+1))/Math.pow(10,h)}else a=a>0?0:a;return r&&(u=u>0?u*1.2:u*.8,a=a>0?a*.8:a*1.2),{max:u,min:a}}function M(e,t,n,r,i){var s=(e-t)/n,o,u;if(s>1)return i?(s=Math.ceil(s),s%i>0?(Math.ceil(s/i)+1)*i:s):(o=(s+"").split(".")[0],u=o.length,o[0]>=5?Math.pow(10,u):(o[0]-0+1)*Math.pow(10,u-1));if(s==1)return 1;if(s===0)return 0;if(!r){o=(s+"").split(".")[1],u=0;while(o[u]=="0")u++;return o[u]>=5?"0."+o.substring(0,u+1)-0+1/Math.pow(10,u):"0."+o.substring(0,u+1)-0+1/Math.pow(10,u+1)}return Math.ceil(s*Math.pow(10,r))/Math.pow(10,r)}function _(e,t,n){e=e||0,t=t||0;var r=l[e].__ecIndicator;if(t>=r.length)return;var i=l[e].__ecIndicator[t],s=N(e),o=i.vector,u=i.value.max,a=i.value.min,f;return typeof n!="number"?s:(u!=a?f=(n-a)/(u-a):f=.5,T(o,s,f))}function D(e){var t=P(e);return t?t.polarIndex:-1}function P(e){var t,r,i,s,o,a,c,h,p,d=Math.min(n.getWidth(),n.getHeight())/2;for(var v=0;vs[0])return{polarIndex:v,valueIndex:Math.floor((p+h/2)/h)%c}}}function H(e){var e=e||0;return l[e].indicator}function B(e){e&&(r=e,l=r.polar,c=r.series),f.clear(),d()}var s=e("./base");s.call(this,n);var o=e("../config"),u=e("../util/coordinates"),a=e("zrender/tool/util"),f=this;f.type=o.COMPONENT_TYPE_POLAR;var l,c,h;f.refresh=B,f.getVector=_,f.getDropBox=b,f.getCenter=N,f.getIndicator=H,f.isInside=D,f.getNearestIndex=P,p(r,i)}return e("../component").define("polar",t),t}),r("echarts/echarts",["require","./config","zrender","zrender/tool/util","zrender/tool/event","zrender/config","./util/shape/icon","./chart","./chart/island","./component","./component/title","./component/axis","./component/categoryAxis","./component/valueAxis","./component/grid","./component/dataZoom","./component/legend","./component/dataRange","./component/tooltip","./component/toolbox","./component/dataView","./component/polar","./util/ecData","./chart","./component","zrender/tool/util","zrender/tool/util","zrender/tool/util","zrender/tool/color","zrender/tool/util","zrender/tool/util","zrender/tool/util"],function(e){function r(t,r){function y(){var s=e("zrender");(s.version||"1.0.3").replace(".","")-00?n=B():n=B(v.getOption()),r.merge(n,t.option,{overwrite:!0,recursive:!0}),r.merge(f,t.option,{overwrite:!0,recursive:!0}),r.merge(l,t.option,{overwrite:!0,recursive:!0}),v.refresh(n),m.refresh(n)}for(var i=0,s=c.length;i0?u.getColor=function(e){return o.getColor(e,a.color)}:u.getColor=function(e){return o.getColor(e,i.color)},u.getCalculableColor=function(){return a.calculableColor||i.calculableColor},f=r.clone(a),l=r.clone(a),a.legend&&a.legend.selected?d=a.legend.selected:d={},v.clear(),m.reset(a),I(a),s}function W(){var t=e("zrender/tool/util");return f.toolbox&&f.toolbox.show&&f.toolbox.feature.magicType&&f.toolbox.feature.magicType.length>0?t.clone(B()):t.clone(B(v.getOption()))}function X(e,t){return t?(a.series=e,s.setOption(a,t)):s.setOption({series:e}),s}function V(){return W().series}function $(t,n,r,o,u){var a=e("zrender/tool/util"),p=t instanceof Array?t:[[t,n,r,o,u]],g,y,b;f.toolbox&&f.toolbox.show&&f.toolbox.feature.magicType&&f.toolbox.feature.magicType.length>0?b=B():b=B(v.getOption());for(var w=0,E=p.length;wa.largeThreshold){l.shapeList.push(w(d,r,o));continue}for(var y=0,E=d.length;y1e-4||Math.abs(e.position[0])>1e-4||Math.abs(e.position[1])>1e-4||Math.abs(e.scale[0]-1)>1e-4||Math.abs(e.scale[1]-1)>1e-4?e.__needTransform=!0:e.__needTransform=!1),n=s[0],r=s[1]}var o;return e.style.__rect?o=e.style.__rect:(o=this.getRect(e.style),o=[o.x,o.x+o.width,o.y,o.y+o.height],e.style.__rect=o),n>=o[0]&&n<=o[1]&&r>=o[2]&&r<=o[3]?!0:!1}},e("zrender/shape/base").derive(n),e("zrender/shape").define("candle",new n),n}),r("echarts/chart/k",["require","../component/base","./calculableBase","../config","../util/ecData","../util/shape/candle","../chart"],function(e){function t(t,n,r,i){function h(){f.selectedMap={};var e={top:[],bottom:[]},t;for(var r=0,s=l.length;r0&&p(o,e[o]);for(var r=0,s=f.shapeList.length;r1e-4||Math.abs(e.position[0])>1e-4||Math.abs(e.position[1])>1e-4||Math.abs(e.scale[0]-1)>1e-4||Math.abs(e.scale[1]-1)>1e-4?e.__needTransform=!0:e.__needTransform=!1),t=o[0],i=o[1]}return r.beginPath(),n.prototype.buildPath.call(null,r,e.style),r.closePath(),r.isPointInPath(t,i)}},e("zrender/shape/base").derive(n),e("zrender/shape").define("chord",new n),n}),r("echarts/util/kwargs",[],function(){function e(e){var t=this,n=new RegExp("(\\/\\*[\\w\\'\\,\\(\\)\\s\\r\\n\\*]*\\*\\/)|(\\/\\/[\\w\\s\\'][^\\n\\r]*$)|(\\/]*>)","gim"),r=new RegExp("\\s+","gim"),i=new RegExp("function.*?\\((.*?)\\)","i"),s=t.toString().replace(n,"").replace(r,"").match(i)[1].split(",");return e!==Object(e)&&(e={}),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)}.kwargs(),swapaxes:function(e,t,n){return this.transpose([e,t],n)}.kwargs(),rollaxis: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: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)}}().kwargs(),min: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)}}().kwargs(),argmin: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)}}().kwargs(),sort: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}.kwargs(),append:function(){console.warn("TODO")}.kwargs(),"delete":function(e,t){var n=this._array;typeof e=="number"&&(e=[e]);var r=this._size;typeof t=="undefined"&&(this._shape=[r],t=0);var i=w(this._shape,t),s=this._shape[t],o=i*s,u=0;for(var a=0;as)throw new Error(N(l));if(l=0){var a=Math.floor((u[1]-u[0])/u[2]);a=a<0?0:a,r.push(a)}i++}for(;i0&&(k.style.brushType="both"),k.highlightStyle.lineWidth>0&&(k.highlightStyle.brushType="both"),l.pack(k,w[0],0,t[p],0,d.name);if(u){var L=[g+C]/2;L%=360;var O=L<=90||L>=270;L=L*Math.PI/180;var _=[Math.cos(L),-Math.sin(L)],D=M?45:20,B=h.scale([],_,N+D);h.add(B,B,A);var j={shape:"text",id:r.newShapeId(o.type),zlevel:y-1,hoverable:!1,style:{x:B[0],y:B[1],text:d.name,textAlign:O?"left":"right",color:a}};j.style.textColor=o.deepQuery([d,b],"itemStyle.normal.label.textStyle.color")||"#fff",j.style.textFont=o.getFont(o.deepQuery([d,b],"itemStyle.normal.label.textStyle")),r.addShape(j),o.shapeList.push(j)}k.onmouseover=f(p),k.onmouseout=c(),o.shapeList.push(k),P.push(k),r.addShape(k)}}function R(e,t){var n=e.length;if(!n)return;var i=e[0][0].length,s=b.itemStyle.normal.chordStyle.lineStyle,u=b.itemStyle.emphasis.chordStyle.lineStyle;for(var a=0;a=270,T={shape:"text",id:r.newShapeId(o.type),zlevel:y-1,hoverable:!1,style:{x:E?N+B+4:-N-B-4,y:0,text:Math.round(w.shift()*10)/10+t,textAlign:E?"left":"right"},position:A.slice(),rotation:E?[l/180*Math.PI,0,0]:[(l+180)/180*Math.PI,0,0]};o.shapeList.push(T),r.addShape(T),g+=j*5}}}function z(e){var t=[],n=(new p(e)).max(),r,i;n>1e4?(r="k",i=.001):n>1e7?(r="m",i=1e-6):n>1e10?(r="b",i=1e-9):(r="",i=1);for(var s=0;s=0?e.source=n[s]:u=!1,n[o]>=0?e.target=n[o]:u=!1,e.rawIndex=t,u})}function Y(e,t,n){var i=[],o=e.length;for(var u=0;u500)continue;l<5&&(l=5),v.scale(n,n,1/l);var c=1*(o+u)*r/l;v.scaleAndAdd(D[i],D[i],n,-c),v.scaleAndAdd(D[s],D[s],n,c)}for(var i=0,h=O.length;i>1^-(o&1),u=u>>1^-(u&1),o+=r,u+=i,r=o,i=u,n.push([o/1024,u/1024])}return n}var r={world:{getGeoJson:function(n){e(["./geoJson/world_geo"],function(e){n(t(e))})}},china:{getGeoJson:function(n){e(["./geoJson/china_geo"],function(e){n(t(e))})}},"南海诸岛":{textCoord:[126,24.5],getPath:function(e,t){var n=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],r="",i=e[0],s=e[1];for(var o=0,u=n.length;o180?n-360:n,r=90-(r/e.scale.y+e.offset.y),[n,r]}function o(e,t){return n.offset=e.offset,n.scale=e.scale,t instanceof Array?n.makePoint([t[0]*1,t[1]*1]):n.makePoint([t.x*1,t.y*1])}var n={formatPoint:function(e){return[(e[0]<-168.5&&e[1]>63.8?e[0]+360:e[0])+168.5,90-e[1]]},makePoint:function(e){var t=this,r=t.formatPoint(e);t._bbox.xmin>e[0]&&(t._bbox.xmin=e[0]),t._bbox.xmaxe[1]&&(t._bbox.ymin=e[1]),t._bbox.ymaxr&&(t.xmin=r),t.xmaxi&&(t.ymin=i),t.ymax10?n[S][g].value=Math.round(n[S][g].value):n[S][g].value=n[S][g].value.toFixed(2)-0;b[S]=b[S]||{},b[S].mapData?H(S,n[S],a[S])(b[S].mapData):T[S.replace(/\|.*/,"")].getGeoJson&&(E[S]=T[S.replace(/\|.*/,"")].specialArea||E[S],T[S.replace(/\|.*/,"")].getGeoJson(H(S,n[S],a[S])))}}function H(e,t,r){return function(i){e.indexOf("|")!=-1&&(i=B(e,i)),b[e].mapData=i,R(e,j(e,i,r),t,r);if(--x<=0){for(var s=0,o=p.shapeList.length;s1&&(r={geometry:{coordinates:r.geometry.coordinates.slice(5,6),type:r.geometry.type},id:r.id,properties:r.properties,type:r.type});break}return{type:"FeatureCollection",features:[r]}}function j(t,n,r){var i=e("../util/projection/normal"),s=[],o=b[t].bbox||i.getBbox(n,E[t]),u;b[t].hasRoam?u=b[t].transform:u=q(o,r);var a=b[t].lastTransform||{scale:{}},f;u.left!=a.left||u.top!=a.top||u.scale.x!=a.scale.x||u.scale.y!=a.scale.y?(f=i.geoJson2Path(n,u,E[t]),a=l.clone(u)):(u=b[t].transform,f=b[t].pathArray),b[t].bbox=o,b[t].transform=u,b[t].lastTransform=a,b[t].pathArray=f;var c=[u.left,u.top];for(var h=0,p=f.length;hv?(d=v*.75,l=h*d):(v=d,d=v*.75,c=p*v);var m={OffsetLeft:a[0],OffsetTop:a[1],scale:{x:d,y:v}},g=o.geoJson2Path(n,m);return I(t,g[0],s)}function I(e,t,n){var r,i=t.properties.name;return C[i]?r=et(e,C[i]):t.cp&&(r=[t.cp[0],t.cp[1]]),N[i]&&(r[0]+=N[i][0],r[1]+=N[i][1]),{text:U(e,i),path:t.path,position:n,textX:r[0],textY:r[1]}}function q(e,t){var r,i,s,o,u,a,f,l=n.getWidth(),c=n.getHeight(),h=Math.round(Math.min(l,c)*.02);for(var v in t)r=d[v].mapLocation,s=r.x||s,u=r.y||u,a=r.width||a,f=r.height||f;i=p.parsePercent(s,l),i=isNaN(i)?h:i,o=p.parsePercent(u,c),o=isNaN(o)?h:o,typeof a=="undefined"?a=isNaN(s)?l:l-i-2*h:a=p.parsePercent(a,l),typeof f=="undefined"?f=isNaN(u)?c:c-o-2*h:f=p.parsePercent(f,c);var m=e.width,g=e.height,y=a/.75/m,b=f/g;y>b?(y=b*.75,a=m*y):(b=y,y=b*.75,f=g*b);if(isNaN(s))switch(s+""){case"center":i=Math.floor((l-a)/2);break;case"right":i=l-a;break;default:}if(isNaN(u))switch(u+""){case"center":o=Math.floor((c-f)/2);break;case"bottom":o=c-f;break;default:}return{left:i,top:o,width:a,height:f,scale:{x:y,y:b}}}function R(e,t,n,r){var s=i.legend,o=i.dataRange,f,c,h,b,w,E=u.map,S,x,T,N,C,k;for(var L=0,A=t.length;L=r&&e<=r+s&&t>=i&&t<=i+o)return a}return}function X(e){var t=e.event,n=h.getX(t),r=h.getY(t),i=h.getDelta(t),s=W(n,r);if(s){var o=b[s].transform,u=o.left,a=o.top,f=o.width,l=o.height;geoAndPos=Z(s,[n-u,r-a]),i>0?(i=1.2,o.scale.x*=i,o.scale.y*=i,o.width=f*i,o.height=l*i):(i=1.2,o.scale.x/=i,o.scale.y/=i,o.width=f/i,o.height=l/i),b[s].hasRoam=!0,b[s].transform=o,geoAndPos=et(s,geoAndPos),o.left-=geoAndPos[0]-(n-u),o.top-=geoAndPos[1]-(r-a),b[s].transform=o,clearTimeout(S),S=setTimeout(G,100),h.stop(t)}}function V(e){var t=e.target;if(t&&t.draggable)return;var r=e.event,i=h.getX(r),s=h.getY(r),o=W(i,s);o&&(M=!0,A=i,O=s,D=o,setTimeout(function(){n.on(f.EVENT.MOUSEMOVE,$),n.on(f.EVENT.MOUSEUP,J)},50))}function $(e){if(!M||!p)return;var t=e.event,r=h.getX(t),i=h.getY(t),s=b[D].transform;s.hasRoam=!0,s.left-=A-r,s.top-=O-i,A=r,O=i,b[D].transform=s;var o=[s.left,s.top],u={position:[s.left,s.top]};for(var a=0,f=p.shapeList.length;a0&&b(l,e[l]);for(var u=0,f=c.shapeList.length;u0&&(d[n]=d[n]||[],d[n].push(b[n]),b[n]=[]);continue}p=f.getCoord(E),E>=0?(v-=m-p,p=v):E<0&&(g+=p-y,p=g),b[n].push([l,p,S,u.getNameByIndex(S),l,m])}}v=s.grid.getY();var O;for(var C=0,k=t.length;C0&&(d[M]=d[M]||[],d[M].push(b[M]),b[M]=[]);x(d,u,"horizontal")}function S(e,t){var n=t[0][0],r=h[n],o=r.yAxisIndex,u=s.yAxis.getAxis(o),a,f,l,p,v,m,g,y,b={},w,E;for(var S=0,T=e;S0&&(d[n]=d[n]||[],d[n].push(b[n]),b[n]=[]);continue}l=f.getCoord(E),E>=0?(v+=l-m,l=v):E<0&&(g-=y-l,l=g),b[n].push([l,p,S,u.getNameByIndex(S),m,p])}}v=s.grid.getXend();var O;for(var C=0,k=t.length;C0&&(d[M]=d[M]||[],d[M].push(b[M]),b[M]=[]);x(d,u,"vertical")}function x(e,t,n){var r,s,o,u,a,f,d,m,g,y,b,w;for(var E=h.length-1;E>=0;E--){g=h[E],b=e[E];if(g.type==c.type&&typeof b!="undefined"){r=v[E],s=c.deepQuery([g],"itemStyle.normal.lineStyle.width"),o=c.deepQuery([g],"itemStyle.normal.lineStyle.type"),u=c.deepQuery([g],"itemStyle.normal.lineStyle.color"),a=c.deepQuery([g],"itemStyle.normal.color"),f=c.deepQuery([g],"itemStyle.emphasis.color"),d=typeof c.deepQuery([g],"itemStyle.normal.areaStyle")!="undefined",m=c.deepQuery([g],"itemStyle.normal.areaStyle.color");for(var S=0,x=b.length;S=0;n--){f=c.shapeList[n]._seriesIndex;if(t[f]&&!t[f][3]){if(c.shapeList[n]._main){l=c.shapeList[n].style.pointList,o=Math.abs(l[0][0]-l[1][0]),a=Math.abs(l[0][1]-l[1][1]),p=c.shapeList[n]._orient=="horizontal";if(t[f][2]){if(c.shapeList[n].shape=="polygon"){var d=l.length;c.shapeList[n].style.pointList[d-3]=l[d-2],p?c.shapeList[n].style.pointList[d-3][0]=l[d-4][0]:c.shapeList[n].style.pointList[d-3][1]=l[d-4][1],c.shapeList[n].style.pointList[d-2]=l[d-1]}c.shapeList[n].style.pointList.pop(),p?(s=o,u=0):(s=0,u=-a)}else{c.shapeList[n].style.pointList.shift();if(c.shapeList[n].shape=="polygon"){var v=c.shapeList[n].style.pointList.pop();p?v[0]=l[0][0]:v[1]=l[0][1],c.shapeList[n].style.pointList.push(v)}p?(s=-o,u=0):(s=0,u=a)}r.modShape(c.shapeList[n].id,{style:{pointList:c.shapeList[n].style.pointList}},!0)}else{if(t[f][2]&&c.shapeList[n]._dataIndex==h[f].data.length-1){r.delShape(c.shapeList[n].id);continue}if(!t[f][2]&&c.shapeList[n]._dataIndex===0){r.delShape(c.shapeList[n].id);continue}}r.animate(c.shapeList[n].id,"").when(500,{position:[s,u]}).start()}}}function M(){var e=c.deepQuery([i],"animationDuration"),t=c.deepQuery([i],"animationEasing"),n,s,o,u=0;for(var a=0,f=c.shapeList.length;a0&&v(h,e[h]);for(var a=0,f=l.shapeList.length;a0?(E=N-x,B==1&&y[n]>E&&(E=y[n]),T-=E,x=T):O<0?(E=x-k,B==1&&y[n]>E&&(E=y[n]),x=C,C+=E):(E=N-x,T-=E,x=T),L=w(n,M,a.getNameByIndex(M),S,x,m[n]||g,E,"vertical"),l.shapeList.push(L)}for(var H=0,B=t[D].length;H0?(E=S-N,B==1&&y[n]>E&&(E=y[n]),S=T,T+=E):O<0?(E=k-S,B==1&&y[n]>E&&(E=y[n]),C-=E,S=C):(E=S-N,S=T,T+=E),L=w(n,M,a.getNameByIndex(M),S,x-(m[n]||g),E,m[n]||g,"horizontal"),l.shapeList.push(L)}for(var H=0,B=t[D].length;H1?typeof f=="string"&&f.match(/%$/)?Math.floor(e.getGap()*(100-parseFloat(f))/100):e.getGap()-f:u,w=0,a=o>1?Math.floor((y-u)/(o-1)):0;if(a<0)return b(e,t,!0)}return{barWidthMap:r,barMinHeightMap:i,gap:y,barWidth:w,barGap:a}}function w(e,t,n,i,s,o,u,d){var v,m=c[e],g=m.data[t],y=p[e],b=[g,m],w=l.deepQuery(b,"itemStyle.normal.color")||y,E=l.deepQuery(b,"itemStyle.emphasis.color"),S=l.deepMerge(b,"itemStyle.normal"),x=S.borderWidth,T=l.deepMerge(b,"itemStyle.emphasis");return v={shape:"rectangle",zlevel:h,clickable:!0,style:{x:i,y:s,width:o,height:u,brushType:"both",color:w,radius:S.borderRadius,lineWidth:x,strokeColor:S.borderColor},highlightStyle:{color:E||(typeof w=="string"?f.lift(w,-0.2):w),radius:T.borderRadius,lineWidth:T.borderWidth,strokeColor:T.borderColor},_orient:d},v.style.height>x&&v.style.width>x?(v.style.y+=x/2,v.style.height-=x,v.style.x+=x/2,v.style.width-=x):v.style.brushType="fill",v.highlightStyle.textColor=v.highlightStyle.color,v=l.addLabel(v,m,g,n,d),l.deepQuery([g,m,r],"calculable")&&(l.setCalculable(v),v.draggable=!0),a.pack(v,c[e],e,c[e].data[t],t,n),v}function E(e,t){i=t,S(e)}function S(e){e&&(r=e,c=r.series),l.clear(),d()}function x(e){var t={};for(var r=0,s=e.length;r=0;r--){d=a.get(l.shapeList[r],"seriesIndex");if(t[d]&&!t[d][3]&&l.shapeList[r].shape=="rectangle"){v=a.get(l.shapeList[r],"dataIndex"),p=c[d];if(t[d][2]&&v==p.data.length-1){n.delShape(l.shapeList[r].id);continue}if(!t[d][2]&&v===0){n.delShape(l.shapeList[r].id);continue}l.shapeList[r]._orient=="horizontal"?(h=i.yAxis.getAxis(p.yAxisIndex||0).getGap(),f=t[d][2]?-h:h,o=0):(u=i.xAxis.getAxis(p.xAxisIndex||0).getGap(),o=t[d][2]?u:-u,f=0),n.animate(l.shapeList[r].id,"").when(500,{position:[o,f]}).start()}}}function T(){var e,t,i,s,o,u,f,c,h;for(var p=0,d=l.shapeList.length;p=150&&E<=210?"right":E<=30||E>=330?"left":"center",{shape:"text",zlevel:d+1,hoverable:!1,style:{x:b+x*f.cos(E,!0),y:w-x*f.sin(E,!0),color:g.color||s,text:S(e,t,n,c),textAlign:g.align||N,textBaseline:g.baseline||"middle",textFont:h.getFont(g)},highlightStyle:{brushType:"fill"},_seriesIndex:e,_dataIndex:t};if(m.position=="center")return{shape:"text",zlevel:d+1,hoverable:!1,style:{x:b,y:w,color:g.color||s,text:S(e,t,n,c),textAlign:g.align||"center",textBaseline:g.baseline||"middle",textFont:h.getFont(g)},highlightStyle:{brushType:"fill"},_seriesIndex:e,_dataIndex:t};return}return}function S(e,t,n,r){var i=p[e],s=i.data[t],o=h.deepQuery([s,i],"itemStyle."+r+".label.formatter");if(!o)return s.name;if(typeof o=="function")return o(i.name,s.name,s.value,n);if(typeof o=="string")return o=o.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}").replace("{d}","{d0}"),o=o.replace("{a0}",i.name).replace("{b0}",s.name).replace("{c0}",s.value).replace("{d0}",n),o}function x(e,t,n,r,i,s,o,u){var a=p[e],c=a.data[t];if(N(a,c,u)){var v=u?"emphasis":"normal",m=l.merge(l.clone(c.itemStyle)||{},a.itemStyle,{overwrite:!1,recursive:!0}),g=m[v].labelLine,y=g.lineStyle||{},b=h.parseCenter(a.center),w=b[0],E=b[1],S=r,x=h.parseRadius(a.radius)[1]- -g.length,T=(s+i)/2%360,C=f.cos(T,!0),k=f.sin(T,!0);return{shape:"line",zlevel:d+1,hoverable:!1,style:{xStart:w+S*C,yStart:E-S*k,xEnd:w+x*C,yEnd:E-x*k,strokeColor:y.color||o,lineType:y.type,lineWidth:y.width},_seriesIndex:e,_dataIndex:t}}return}function T(e,t,n){return h.deepQuery([t,e],"itemStyle."+(n?"emphasis":"normal")+".label.show")}function N(e,t,n){return h.deepQuery([t,e],"itemStyle."+(n?"emphasis":"normal")+".labelLine.show")}function C(e){var t=l.merge;return e=t(e||{},u.pie,{overwrite:!1,recursive:!0}),e.itemStyle.normal.label.textStyle=t(e.itemStyle.normal.label.textStyle||{},u.textStyle,{overwrite:!1,recursive:!0}),e.itemStyle.emphasis.label.textStyle=t(e.itemStyle.emphasis.label.textStyle||{},u.textStyle,{overwrite:!1,recursive:!0}),e}function k(e,t){i=t,L(e)}function L(e){e&&(r=e,p=r.series),h.clear(),g()}function A(e){var t={};for(var r=0,i=e.length;r