/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,n=function(){return e++},m="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);n&&(e.firefox=!0,e.version=n[1]);i&&(e.ie=!0,e.version=i[1]);r&&(e.edge=!0,e.version=r[1]);a&&(e.weChat=!0);return{browser:e,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointerEventsSupported:"onpointerdown"in window&&(e.edge||e.ie&&11<=e.version),domSupported:"undefined"!=typeof document}}(navigator.userAgent);var s={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},l={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},h=Object.prototype.toString,i=Array.prototype,o=i.forEach,u=i.filter,r=i.slice,c=i.map,d=i.reduce,a={};function b(t){if(null==t||"object"!=typeof t)return t;var e=t,n=h.call(t);if("[object Array]"===n){if(!q(t)){e=[];for(var i=0,r=t.length;i>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",r[h]+":0",i[1-l]+":auto",r[1-h]+":auto",""].join("!important;"),t.appendChild(o),n.push(o)}return n}(e,a),a,r);if(o)return o(t,n,i),!0}return!1}function xt(t){return"CANVAS"===t.nodeName.toUpperCase()}var wt="undefined"!=typeof window&&!!window.addEventListener,bt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,St=[];function Mt(t,e,n,i){return n=n||{},i||!m.canvasSupported?It(t,e,n):m.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):It(t,e,n),n}function It(t,e,n){if(m.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(xt(t)){var a=t.getBoundingClientRect();return n.zrX=i-a.left,void(n.zrY=r-a.top)}if(_t(St,t,i,r))return n.zrX=St[0],void(n.zrY=St[1])}n.zrX=n.zrY=0}function Tt(t){return t||window.event}function Ct(t,e,n){if(null!=(e=Tt(e)).zrX)return e;var i=e.type;if(i&&0<=i.indexOf("touch")){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&Mt(t,r,e,n)}else Mt(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&bt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function kt(){this._track=[]}var Dt=wt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function At(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}kt.prototype={constructor:kt,recognize:function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},a=0,o=i.length;ai.getWidth()||n<0||n>i.getHeight()}Nt.prototype={constructor:Nt,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(D(Bt,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,n=t.zrY,i=zt(this,e,n),r=this._hovered,a=r.target;a&&!a.__zr&&(a=(r=this.findHover(r.x,r.y)).target);var o=this._hovered=i?{x:e,y:n}:this.findHover(e,n),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(o,"mousemove",t),s&&s!==a&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,n=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&(n||this.trigger("globalout",{type:"globalout",event:t}))},resize:function(t){this._hovered={}},dispatch:function(t,e){var n=this[t];n&&n.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,a=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Ot}}(e,t,n);i&&(i[r]&&(a.cancelBubble=i[r].call(i,a)),i.trigger(e,a),i=i.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,n){for(var i=this.storage.getDisplayList(),r={x:t,y:e},a=i.length-1;0<=a;a--){var o;if(i[a]!==n&&!i[a].ignore&&(o=Rt(i[a],t,e))&&(r.topTarget||(r.topTarget=i[a]),o!==Pt)){r.target=i[a];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new kt);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r,this.dispatchToElement({target:i.target},r,i.event)}}},D(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(o){Nt.prototype[o]=function(t){var e,n,i=t.zrX,r=t.zrY,a=zt(this,i,r);if("mouseup"===o&&a||(n=(e=this.findHover(i,r)).target),"mousedown"===o)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===o)this._upEl=n;else if("click"===o){if(this._downEl!==this._upEl||!this._downPoint||4=this._maxSize&&0>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),me(t,e),e):void fe(e,0,0,0,1):7===r.length?0<=(i=parseInt(r.substr(1),16))&&i<=16777215?(fe(e,(16711680&i)>>16,(65280&i)>>8,255&i,1),me(t,e),e):void fe(e,0,0,0,1):void 0;var a=r.indexOf("("),o=r.indexOf(")");if(-1!==a&&o+1===r.length){var s=r.substr(0,a),l=r.substr(a+1,o-(a+1)).split(","),h=1;switch(s){case"rgba":if(4!==l.length)return void fe(e,0,0,0,1);h=ce(l.pop());case"rgb":return 3!==l.length?void fe(e,0,0,0,1):(fe(e,ue(l[0]),ue(l[1]),ue(l[2]),h),me(t,e),e);case"hsla":return 4!==l.length?void fe(e,0,0,0,1):(l[3]=ce(l[3]),_e(l,e),me(t,e),e);case"hsl":return 3!==l.length?void fe(e,0,0,0,1):(_e(l,e),me(t,e),e);default:return}}fe(e,0,0,0,1)}}function _e(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=ce(t[1]),r=ce(t[2]),a=r<=.5?r*(i+1):r+i-r*i,o=2*r-a;return fe(e=e||[],le(255*de(o,a,n+1/3)),le(255*de(o,a,n)),le(255*de(o,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function xe(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}var we=Array.prototype.slice;function be(t,e){return t[e]}function Se(t,e,n){t[e]=n}function Me(t,e,n){return(e-t)*n+t}function Ie(t,e,n){return.5e);n++);n=Math.min(n-1,h-2)}D=e;var i=g[(k=n)+1]-g[n];if(0!=i)if(S=(e-g[n])/i,l)if(I=v[n],M=v[0===n?n:n-1],T=v[h-2=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new $e(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},$e.create=function(t){return new $e(t.x,t.y,t.width,t.height)};var Ke=function(t){for(var e in t=t||{},He.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Ke.prototype={constructor:Ke,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n>>1])<0?l=a:s=1+a;var h=i-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0>>1);0>>1);a(t,e[n+u])<0?l=u:o=u+1}return l}function an(p,g){var o,s,v=Je,l=0,m=[];function e(t){var e=o[t],n=s[t],i=o[t+1],r=s[t+1];s[t]=n+r,t===l-3&&(o[t+1]=o[t+2],s[t+1]=s[t+2]),l--;var a=rn(p[i],p,e,n,0,g);e+=a,0!==(n-=a)&&0!==(r=nn(p[e+n-1],p,i,r,r-1,g))&&(n<=r?function(t,e,n,i){var r=0;for(r=0;rs[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1>=1;return t+e}(r);do{if((a=tn(t,n,i,e))=e.maxIterations){t+=e.ellipsis;break}var s=0===o?Xn(t,r,e.ascCharWidth,e.cnCharWidth):0f)return{lines:[],width:0,height:0};D.textWidth=Bn(D.text,w);var S=_.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))D.percentWidth=S,h.push(D),S=0;else{if(M){S=D.textWidth;var I=_.textBackgroundColor,T=I&&I.image;T&&Dn(T=Tn(T))&&(S=Math.max(S,T.width*b/T.height))}var C=x?x[1]+x[3]:0;S+=C;var k=null!=d?d-m:null;null!=k&&ki[0]){for(o=0;ot);o++);a=n[i[o]]}if(i.splice(o+1,0,t),!(n[t]=e).virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else Fe("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var n,i,r=this._zlevelList;for(i=0;i=a.length&&a.push({option:t})}}),a}function sr(t){var e=t.name;return!(!e||!e.indexOf(er))}function lr(t){return Ji(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function hr(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?L(t.dataIndex)?A(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?L(t.name)?A(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function ur(){var e="__\0ec_inner_"+cr+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var cr=0;function dr(s,l,h){if(C(l)){var t={};t[l+"Index"]=0,l=t}var e=h&&h.defaultMainType;!e||fr(l,e+"Index")||fr(l,e+"Id")||fr(l,e+"Name")||(l[e+"Index"]=0);var u={};return Qi(l,function(t,e){t=l[e];if("dataIndex"!==e&&"dataIndexInside"!==e){var n=e.match(/^(\w+)(Index|Id|Name)$/)||[],i=n[1],r=(n[2]||"").toLowerCase();if(!(!i||!r||null==t||"index"===r&&"none"===t||h&&h.includeMainTypes&&g(h.includeMainTypes,i)<0)){var a={mainType:i};"index"===r&&"all"===t||(a[r]=t);var o=s.queryComponents(a);u[i+"Models"]=o,u[i+"Model"]=o[0]}}else u[e]=t}),u}function fr(t,e){return t&&t.hasOwnProperty(e)}function pr(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}var gr=".",vr="___EC__COMPONENT__CONTAINER___";function mr(t){var e={main:"",sub:""};return t&&(t=t.split(gr),e.main=t[0]||"",e.sub=t[1]||""),e}function yr(t){(t.$constructor=t).extend=function(t){function e(){t.$constructor?t.$constructor.apply(this,arguments):n.apply(this,arguments)}var n=this;return S(e.prototype,t),e.extend=this.extend,e.superCall=wr,e.superApply=br,y(e,this),e.superClass=n,e}}var _r=0;function xr(t){var e=["__\0is_clz",_r++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function wr(t,e){var n=W(arguments,2);return this.superClass.prototype[e].apply(t,n)}function br(t,e,n){return this.superClass.prototype[e].apply(t,n)}function Sr(n,t){t=t||{};var r={};if(n.registerClass=function(t,e){if(e)if(function(t){G(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=mr(e)).sub){if(e.sub!==vr){(function(t){var e=r[t.main];e&&e[vr]||((e=r[t.main]={})[vr]=!0);return e})(e)[e.sub]=t}}else r[e.main]=t;return t},n.getClass=function(t,e,n){var i=r[t];if(i&&i[vr]&&(i=e?i[e]:null),n&&!i)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return i},n.getClassesByMainType=function(t){t=mr(t);var n=[],e=r[t.main];return e&&e[vr]?D(e,function(t,e){e!==vr&&n.push(t)}):n.push(e),n},n.hasClass=function(t){return t=mr(t),!!r[t.main]},n.getAllClassMainTypes=function(){var n=[];return D(r,function(t,e){n.push(e)}),n},n.hasSubTypes=function(t){t=mr(t);var e=r[t.main];return e&&e[vr]},n.parseClassType=mr,t.registerWhenExtend){var i=n.extend;i&&(n.extend=function(t){var e=i.call(this,t);return n.registerClass(e,t.type)})}return n}function Mr(s){for(var t=0;tthis._ux||ya(e-this._yi)>this._uy||this._len<5;return this.addData(la.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,i,r,a){return this.addData(la.C,t,e,n,i,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,r,a):this._ctx.bezierCurveTo(t,e,n,i,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,n,i){return this.addData(la.Q,t,e,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},arc:function(t,e,n,i,r,a){return this.addData(la.A,t,e,n,n,i,r-i,0,a?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,a),this._xi=ga(r)*n+t,this._yi=va(r)*n+e,this},arcTo:function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(la.R,t,e,n,i),this},closePath:function(){this.addData(la.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,n=0;ne.length&&(this._expandData(),e=this.data);for(var n=0;nl||ya(o-r)>h||c===u-1)&&(t.lineTo(a,o),i=a,r=o);break;case la.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case la.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case la.A:var f=s[c++],p=s[c++],g=s[c++],v=s[c++],m=s[c++],y=s[c++],_=s[c++],x=s[c++],w=v=Pa[i=0]+t&&o<=Pa[1]+t?u:0}if(a){l=i;i=Ia(r),r=Ia(l)}else i=Ia(i),r=Ia(r);rMath.PI/2&&p<1.5*Math.PI&&(u=-u),c+=u)}}return c}function Ra(t,e,n,i,r){for(var a=0,o=0,s=0,l=0,h=0,u=0;uMath.abs(a[1])?0=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*a+n[0]}function Xs(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?function(t){return t.replace(/^\s+|\s+$/g,"")}(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function Us(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Ys(t){var e=t.toString(),n=e.indexOf("e");if(0"'])/g,nl={"&":"&","<":"<",">":">",'"':""","'":"'"};function il(t){return null==t?"":(t+"").replace(el,function(t,e){return nl[e]})}function rl(t,e){return"{"+t+(null==e?"":e)+"}"}var al=["a","b","c","d","e","f","g"];function ol(t,e){var n=(t=C(t)?{color:t,extraCssText:e}:t||{}).color,i=t.type,r=(e=t.extraCssText,t.renderMode||"html"),a=t.markerId||"X";return n?"html"===r?"subItem"===i?'':'':{renderMode:r,content:"{marker"+a+"|} ",style:{color:n}}:""}function sl(t,e){return"0000".substr(0,e-(t+="").length)+t}function ll(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=$s(e),r=n?"UTC":"",a=i["get"+r+"FullYear"](),o=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),h=i["get"+r+"Minutes"](),u=i["get"+r+"Seconds"](),c=i["get"+r+"Milliseconds"]();return t=t.replace("MM",sl(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",sl(s,2)).replace("d",s).replace("hh",sl(l,2)).replace("h",l).replace("mm",sl(h,2)).replace("m",h).replace("ss",sl(u,2)).replace("s",u).replace("SSS",sl(c,3))}var hl=Wn,ul=D,cl=["left","right","top","bottom","width","height"],dl=[["width","left","right"],["height","top","bottom"]];function fl(u,c,d,f,p){var g=0,v=0;null==f&&(f=1/0),null==p&&(p=1/0);var m=0;c.eachChild(function(t,e){var n,i,r=t.position,a=t.getBoundingRect(),o=c.childAt(e+1),s=o&&o.getBoundingRect();if("horizontal"===u){var l=a.width+(s?-s.x+a.x:0);m=f<(n=g+l)||t.newline?(g=0,n=l,v+=m+d,a.height):Math.max(m,a.height)}else{var h=a.height+(s?-s.y+a.y:0);m=p<(i=v+h)||t.newline?(g+=m+d,v=0,i=h,a.width):Math.max(m,a.width)}t.newline||(r[0]=g,r[1]=v,"horizontal"===u?g=n+d:v=i+d)})}I(fl,"vertical"),I(fl,"horizontal");function pl(t,e,n){n=tl(n||0);var i=e.width,r=e.height,a=Xs(t.left,i),o=Xs(t.top,r),s=Xs(t.right,i),l=Xs(t.bottom,r),h=Xs(t.width,i),u=Xs(t.height,r),c=n[2]+n[0],d=n[1]+n[3],f=t.aspect;switch(isNaN(h)&&(h=i-s-d-a),isNaN(u)&&(u=r-l-c-o),null!=f&&(isNaN(h)&&isNaN(u)&&(i/re)return t[i];return t[n-1]}(s,n):o;if((l=l||o)&&l.length){var h=l[r];return t&&(a[t]=h),i.colorIdx=(r+1)%l.length,h}}},Cl="original",kl="arrayRows",Dl="objectRows",Al="keyedColumns",Ll="unknown",Pl="typedArray",Ol="column",El="row";function Nl(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Al?{}:[]),this.sourceFormat=t.sourceFormat||Ll,this.seriesLayoutBy=t.seriesLayoutBy||Ol,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&Z(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}Nl.seriesDataToSource=function(t){return new Nl({data:t,sourceFormat:N(t)?Pl:Cl,fromDataset:!1})},xr(Nl);var Bl={Must:1,Might:2,Not:3},Rl=ur();function zl(t){var e=t.option,n=e.data,i=N(n)?Pl:Cl,r=!1,a=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=Gl(t);if(l){var h=l.option;n=h.source,i=Rl(l).sourceFormat,r=!0,a=a||h.seriesLayoutBy,null==o&&(o=h.sourceHeader),s=s||h.dimensions}var u=function(t,e,n,i,r){if(!t)return{dimensionsDefine:Fl(r)};var a,o;if(e===kl)"auto"===i||null==i?Vl(function(t){null!=t&&"-"!==t&&(C(t)?null==o&&(o=1):o=0)},n,t,10):o=i?1:0,r||1!==o||(r=[],Vl(function(t,e){r[e]=null!=t?t:""},n,t)),a=r?r.length:n===El?t.length:t[0]?t[0].length:null;else if(e===Dl)r=r||function(t){var e,n=0;for(;n":"\n",f="richText"===c,p={},g=0;function n(t){return{renderMode:c,content:il(Js(t)),style:p}}var v=this.getData(),a=v.mapDimension("defaultedTooltip",!0),i=a.length,o=this.getRawValue(r),s=L(o),m=v.getItemVisual(r,"color");O(m)&&m.colorStops&&(m=(m.colorStops[0]||{}).color),m=m||"transparent";var l=(1":"",i=n+h.join(n||", ");return{renderMode:c,content:i,style:p}}(o):n(i?Oh(v,r,a[0]):s?o[0]:o)).content,h=d.seriesIndex+"at"+g,y=ol({color:m,type:"item",renderMode:c,markerId:h});p[h]=m,++g;var _=v.getName(r),x=this.name;sr(this)||(x=""),x=x?il(x)+(u?": ":e):"";var w="string"==typeof y?y:y.content;return{html:u?w+x+l:x+w+(_?il(_)+": "+l:l),markers:p}},isAnimationEnabled:function(){if(m.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel,r=Tl.getColorFromPalette.call(this,t,e,n);return r=r||i.getColorFromPalette(t,e,n)},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function Qh(t){var e=t.name;sr(t)||(t.name=function(t){var n=t.getRawData(),e=n.mapDimension("seriesName",!0),i=[];return D(e,function(t){var e=n.getDimensionInfo(t);e.displayName&&i.push(e.displayName)}),i.join(" ")}(t)||e)}function Jh(t){return t.model.getRawData().count()}function tu(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),eu}function eu(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function nu(e,n){D(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,I(iu,n))})}function iu(t){var e=ru(t);e&&e.setOutputEnd(this.count())}function ru(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}_(Kh,Bh),_(Kh,Tl);var au=function(){this.group=new Ke,this.uid=Ws("viewComponent")};au.prototype={constructor:au,init:function(t,e){},render:function(t,e,n,i){},dispose:function(){},filterForExposedEvent:null};var ou=au.prototype;ou.updateView=ou.updateLayout=ou.updateVisual=function(t,e,n,i){},yr(au),Sr(au,{registerWhenExtend:!0});function su(){var s=ur();return function(t){var e=s(t),n=t.pipelineContext,i=e.large,r=e.progressiveRender,a=e.large=n&&n.large,o=e.progressiveRender=n&&n.progressiveRender;return!!(i^a||r^o)&&"reset"}}var lu=ur(),hu=su();function uu(){this.group=new Ke,this.uid=Ws("viewChart"),this.renderTask=Rh({plan:pu,reset:gu}),this.renderTask.context={view:this}}var cu=uu.prototype={type:"chart",init:function(t,e){},render:function(t,e,n,i){},highlight:function(t,e,n,i){fu(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){fu(t.getData(),i,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function du(t,e,n){if(t&&(t.trigger(e,n),t.isGroup&&!fs(t)))for(var i=0,r=t.childCount();ic?n+=p(g("data.partialData"),{displayCnt:c}):n+=g("data.allData");for(var o=[],s=0;sn.blockIndex?n.step:null,a=i&&i.modDataCount;return{step:r,modBy:null!=a?Math.ceil(a/r):null,modDataCount:a}}},Su.getPipeline=function(t){return this._pipelineMap.get(t)},Su.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,a=t.get("large")&&i>=t.get("largeThreshold"),o="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:o,large:a}},Su.restorePipelines=function(t){var i=this,r=i._pipelineMap=Z();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;r.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),Nu(i,t,t.dataTask)})},Su.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.ecInstance.getModel(),r=this.api;D(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,[]);t.reset&&function(i,r,t,a,o){var s=t.seriesTaskMap||(t.seriesTaskMap=Z()),e=r.seriesType,n=r.getTargetSeries;r.createOnAllSeries?a.eachRawSeries(l):e?a.eachRawSeriesByType(e,l):n&&n(a,o).each(l);function l(t){var e=t.uid,n=s.get(e)||s.set(e,Rh({plan:Au,reset:Lu,count:Eu}));n.context={model:t,ecModel:a,api:o,useClearVisual:r.isVisual&&!r.isLayout,plan:r.plan,reset:r.reset,scheduler:i},Nu(i,t,n)}var h=i._pipelineMap;s.each(function(t,e){h.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,i,r),t.overallReset&&function(i,t,e,n,r){var a=e.overallTask=e.overallTask||Rh({reset:Tu});a.context={ecModel:n,api:r,overallReset:t.overallReset,scheduler:i};var o=a.agentStubMap=a.agentStubMap||Z(),s=t.seriesType,l=t.getTargetSeries,h=!0,u=t.modifyOutputEnd;s?n.eachRawSeriesByType(s,c):l?l(n,r).each(c):(h=!1,D(n.getSeries(),c));function c(t){var e=t.uid,n=o.get(e);n||(n=o.set(e,Rh({reset:Cu,onDirty:Du})),a.dirty()),n.context={model:t,overallProgress:h,modifyOutputEnd:u},n.agent=a,n.__block=h,Nu(i,t,n)}var d=i._pipelineMap;o.each(function(t,e){d.get(e)||(t.dispose(),a.dirty(),o.removeKey(e))})}(this,t,e,i,r)},this)},Su.prepareView=function(t,e,n,i){var r=t.renderTask,a=r.context;a.model=e,a.ecModel=n,a.api=i,r.__block=!t.incrementalPrepareRender,Nu(this,e,r)},Su.performDataProcessorTasks=function(t,e){Mu(this,this._dataProcessorHandlers,t,e,{block:!0})},Su.performVisualTasks=function(t,e,n){Mu(this,this._visualHandlers,t,e,n)},Su.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},Su.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var Iu=Su.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function Tu(t){t.overallReset(t.ecModel,t.api,t.payload)}function Cu(t,e){return t.overallProgress&&ku}function ku(){this.agent.dirty(),this.getDownstream().dirty()}function Du(){this.agent&&this.agent.dirty()}function Au(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Lu(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=nr(t.reset(t.model,t.ecModel,t.api,t.payload));return 1'+t.dom+""}),p.painter.getSvgRoot().innerHTML=g,r.connectedBackgroundColor&&p.painter.setBackgroundColor(r.connectedBackgroundColor),p.refreshImmediately(),p.painter.toDataURL()}return r.connectedBackgroundColor&&p.add(new wo({shape:{x:0,y:0,width:t,height:e},style:{fill:r.connectedBackgroundColor}})),uc(f,function(t){var e=new xi({style:{x:t.left*n-h,y:t.top*n-u,image:t.dom}});p.add(e)}),p.refreshImmediately(),i.toDataURL("image/"+(r&&r.type||"png"))}return this.getDataURL(r)}},wc.convertToPixel=I(bc,"convertToPixel"),wc.convertFromPixel=I(bc,"convertFromPixel"),wc.containPixel=function(t,r){var a;if(!this._disposed)return D(t=dr(this._model,t),function(t,i){0<=i.indexOf("Models")&&D(t,function(t){var e=t.coordinateSystem;if(e&&e.containPoint)a|=!!e.containPoint(r);else if("seriesModels"===i){var n=this._chartsMap[t.__viewId];n&&n.containPoint&&(a|=n.containPoint(r,t))}},this)},this),!!a},wc.getVisual=function(t,e){var n=(t=dr(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),i=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;return null!=i?n.getItemVisual(i,e):n.getVisual(e)},wc.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},wc.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var Sc={prepareAndUpdate:function(t){Mc(this),Sc.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,r=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),r.create(e,n),a.performDataProcessorTasks(e,t),Tc(this,e),r.update(e,n),Lc(e),a.performVisualTasks(e,t),Pc(this,e,n,t);var o=e.get("backgroundColor")||"transparent";if(m.canvasSupported)i.setBackgroundColor(o);else{var s=ye(o);o=xe(s,"rgb"),0===s[3]&&(o="transparent")}Ec(e,n)}},updateTransform:function(r){var a=this._model,o=this,s=this._api;if(a){var l=[];a.eachComponent(function(t,e){var n=o.getViewOfComponentModel(e);if(n&&n.__alive)if(n.updateTransform){var i=n.updateTransform(e,a,s,r);i&&i.update&&l.push(n)}else l.push(n)});var i=Z();a.eachSeries(function(t){var e=o._chartsMap[t.__viewId];if(e.updateTransform){var n=e.updateTransform(t,a,s,r);n&&n.update&&i.set(t.uid,1)}else i.set(t.uid,1)}),Lc(a),this._scheduler.performVisualTasks(a,r,{setDirty:!0,dirtyMap:i}),Oc(o,a,s,r,i),Ec(a,this._api)}},updateView:function(t){var e=this._model;e&&(uu.markUpdateMethod(t,"updateView"),Lc(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),Pc(this,this._model,this._api,t),Ec(e,this._api))},updateVisual:function(t){Sc.update.call(this,t)},updateLayout:function(t){Sc.update.call(this,t)}};function Mc(t){var e=t._model,n=t._scheduler;n.restorePipelines(e),n.prepareStageTasks(),Ac(t,"component",e,n),Ac(t,"chart",e,n),n.plan()}function Ic(e,n,i,r,t){var a=e._model;if(r){var o={};o[r+"Id"]=i[r+"Id"],o[r+"Index"]=i[r+"Index"],o[r+"Name"]=i[r+"Name"];var s={mainType:r,query:o};t&&(s.subType=t);var l=i.excludeSeriesId;null!=l&&(l=Z(nr(l))),a&&a.eachComponent(s,function(t){l&&null!=l.get(t.id)||h(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])},e)}else uc(e._componentsViews.concat(e._chartsViews),h);function h(t){t&&t.__alive&&t[n]&&t[n](t.__model,a,e._api,i)}}function Tc(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,n[t.__viewId])})}function Cc(e,t){var n=e.type,i=e.escapeConnect,r=zc[n],a=r.actionInfo,o=(a.update||"update").split(":"),s=o.pop();o=null!=o[0]&&fc(o[0]),this[gc]=!0;var l=[e],h=!1;e.batch&&(h=!0,l=A(e.batch,function(t){return(t=k(S({},t),e)).batch=null,t}));var u,c=[],d="highlight"===n||"downplay"===n;uc(l,function(t){(u=(u=r.action(t,this._model,this._api))||S({},t)).type=a.event||u.type,c.push(u),d?Ic(this,s,t,"series"):o&&Ic(this,s,t,o.main,o.sub)},this),"none"===s||d||o||(this[vc]?(Mc(this),Sc.update.call(this,e),this[vc]=!1):Sc[s].call(this,e)),u=h?{type:a.event||n,escapeConnect:i,batch:c}:c[0],this[gc]=!1,t||this._messageCenter.trigger(u.type,u)}function kc(t){for(var e=this._pendingActions;e.length;){var n=e.shift();Cc.call(this,n,t)}}function Dc(t){t||this.trigger("updated")}function Ac(t,e,r,a){for(var o="component"===e,s=o?t._componentsViews:t._chartsViews,l=o?t._componentsMap:t._chartsMap,h=t._zr,u=t._api,n=0;nt.get("hoverLayerThreshold")&&!m.node&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var e=n._chartsMap[t.__viewId];e.__alive&&e.group.traverse(function(t){t.useHoverLayer=!0})}})}(i,t),xu(i._zr.dom,t)}function Ec(e,n){uc(Hc,function(t){t(e,n)})}wc.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[gc]=!0,n&&Mc(this),Sc.update.call(this),this[gc]=!1,kc.call(this,i),Dc.call(this,i)}}},wc.showLoading=function(t,e){if(!this._disposed&&(dc(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Uc[t])){var n=Uc[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},wc.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},wc.makeActionFromEvent=function(t){var e=S({},t);return e.type=Fc[t.type],e},wc.dispatchAction=function(t,e){this._disposed||(dc(e)||(e={silent:!!e}),zc[t.type]&&this._model&&(this[gc]?this._pendingActions.push(t):(Cc.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&m.browser.weChat&&this._throttledZrFlush(),kc.call(this,e.silent),Dc.call(this,e.silent))))},wc.appendData=function(t){if(!this._disposed){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},wc.on=yc("on",!1),wc.off=yc("off",!1),wc.one=yc("one",!1);var Nc=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Bc(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))})}function Rc(){this.eventInfo}wc._initEvents=function(){uc(Nc,function(h){function t(t){var e,n=this.getModel(),i=t.target;if("globalout"===h)e={};else if(i&&null!=i.dataIndex){var r=i.dataModel||n.getSeriesByIndex(i.seriesIndex);e=r&&r.getDataParams(i.dataIndex,i.dataType,i)||{}}else i&&i.eventData&&(e=S({},i.eventData));if(e){var a=e.componentType,o=e.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",o=e.seriesIndex);var s=a&&null!=o&&n.getComponent(a,o),l=s&&this["series"===s.mainType?"_chartsMap":"_componentsMap"][s.__viewId];e.event=t,e.type=h,this._ecEventProcessor.eventInfo={targetEl:i,packedEvent:e,model:s,view:l},this.trigger(h,e)}}t.zrEventfulCallAtLast=!0,this._zr.on(h,t,this)},this),uc(Fc,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},wc.isDisposed=function(){return this._disposed},wc.clear=function(){this._disposed||this.setOption({series:[]},!0)},wc.dispose=function(){if(!this._disposed){this._disposed=!0,pr(this.getDom(),$c,"");var e=this._api,n=this._model;uc(this._componentsViews,function(t){t.dispose(n,e)}),uc(this._chartsViews,function(t){t.dispose(n,e)}),this._zr.dispose(),delete Yc[this.id]}},_(xc,ft),Rc.prototype={constructor:Rc,normalizeQuery:function(t){var s={},l={},h={};if(C(t)){var e=fc(t);s.mainType=e.main||null,s.subType=e.sub||null}else{var u=["Index","Name","Id"],c={name:1,dataIndex:1,dataType:1};D(t,function(t,e){for(var n=!1,i=0;i_[1]&&(_[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},Ad(this)},kd._initDataFromProvider=function(t,e){if(!(e<=t)){for(var n,i=this._chunkSize,r=this._rawData,a=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,h=this._nameList,u=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;pM[1]&&(M[1]=S)}if(!r.pure){var I=h[m];if(v&&null==I)if(null!=v.name)h[m]=I=v.name;else if(null!=n){var T=o[n],C=a[T][y];if(C){I=C[_];var k=l[T].ordinalMeta;k&&k.categories.length&&(I=k.categories[I])}}var D=null==v?null:v.id;null==D&&null!=I&&(d[I]=d[I]||0,0=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return a;r=a-1}}return-1},kd.indicesOfNearest=function(t,e,n){var i=[];if(!this._storage[t])return i;null==n&&(n=1/0);for(var r=1/0,a=-1,o=0,s=0,l=this.count();st[I][1])&&(M=!1)}M&&(a[o++]=this.getRawIndex(v))}return ow[1]&&(w[1]=x)}}}return r},kd.downSample=function(t,e,n,i){for(var r=Bd(this,[t]),a=r._storage,o=[],s=Math.floor(1/e),l=a[t],h=this.count(),u=this._chunkSize,c=r._rawExtent[t],d=new(Sd(this))(h),f=0,p=0;pc[1]&&(c[1]=_),d[f++]=x}return r._count=f,r._indices=d,r.getRawIndex=Od,r},kd.getItemModel=function(t){var e=this.hostModel;return new Rs(this.getRawDataItem(t),e,e&&e.ecModel)},kd.diff=function(e){var n=this;return new dd(e?e.getIndices():[],this.getIndices(),function(t){return Ed(e,t)},function(t){return Ed(n,t)})},kd.getVisual=function(t){var e=this._visual;return e&&e[t]},kd.setVisual=function(t,e){if(md(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},kd.setLayout=function(t,e){if(md(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},kd.getLayout=function(t){return this._layout[t]},kd.getItemLayout=function(t){return this._itemLayouts[t]},kd.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?S(this._itemLayouts[t]||{},e):e},kd.clearItemLayouts=function(){this._itemLayouts.length=0},kd.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],r=i&&i[e];return null!=r||n?r:this.getVisual(e)},kd.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=i,md(e))for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a],r[a]=!0);else i[e]=n,r[e]=!0},kd.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function Fd(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function Vd(t,e,n){Nl.isInstance(e)||(e=Nl.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var i=(n.dimsDef||[]).slice(),r=Z(),a=Z(),l=[],o=function(t,e,n,i){var r=Math.max(t.dimensionsDetectCount||1,e.length,n.length,i||0);return D(e,function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))}),r}(e,t,i,n.dimCount),s=0;si[0]&&(i[0]=a[0]),a[1]>i[1]&&(i[1]=a[1])}return{min:e?n:i,max:e?i:n}}var Pf=Wa.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:oo(Wa.prototype.brush),buildPath:function(t,e){var n=e.points,i=0,r=n.length,a=Lf(n,e.smoothConstraint);if(e.connectNulls){for(;0i)return!1;return!0}(a,e))){var o=e.mapDimension(a.dim),s={};return D(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(o,t))}}}}function Wf(t,e,n){if("cartesian2d"!==t.type)return Nf(t,e,n);var i=t.getBaseAxis().isHorizontal(),r=Ef(t,e,n);if(!n.get("clip",!0)){var a=r.shape,o=Math.max(a.width,a.height);i?(a.y-=o,a.height+=2*o):(a.x-=o,a.width+=2*o)}return r}uu.extend({type:"line",init:function(){var t=new Ke,e=new gf;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,n){var i=t.coordinateSystem,r=this.group,a=t.getData(),o=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=a.mapArray(a.getItemLayout),h="polar"===i.type,u=this._coordSys,c=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=t.get("animation"),v=!s.isEmpty(),m=s.get("origin"),y=function(t,e,n){if(!n.valueDim)return[];for(var i=[],r=0,a=e.count();ru[c-1].coord&&(u.reverse(),d.reverse());var f=u[0].coord-10,p=u[c-1].coord+10,g=p-f;if(g<.001)return"transparent";D(u,function(t){t.offset=(t.coord-f)/g}),u.push({offset:c?u[c-1].offset:.5,color:d[1]||"transparent"}),u.unshift({offset:c?u[0].offset:.5,color:d[0]||"transparent"});var v=new Ao(0,0,0,0,u,!0);return v[i]=f,v[i+"2"]=p,v}}}(a,i)||a.getVisual("color");d.useStyle(k(o.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var I=t.get("smooth");if(I=zf(t.get("smooth")),d.setShape({smooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),f){var T=a.getCalculationInfo("stackedOnSeries"),C=0;f.useStyle(k(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),T&&(C=zf(T.get("smooth"))),f.setShape({smooth:I,stackedOnSmooth:C,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=i,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=m},dispose:function(){},highlight:function(t,e,n,i){var r=t.getData(),a=hr(r,i);if(!(a instanceof Array)&&null!=a&&0<=a){var o=r.getItemGraphicEl(a);if(!o){var s=r.getItemLayout(a);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(o=new af(r,a)).position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,r.setItemGraphicEl(a,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else uu.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var r=t.getData(),a=hr(r,i);if(null!=a&&0<=a){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else uu.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Pf({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Of({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n},_updateAnimation:function(t,e,n,i,r,a){var o=this._polyline,s=this._polygon,l=t.hostModel,h=function(t,e,n,i,r,a,o,s){for(var l=function(t,e){var n=[];return e.diff(t).add(function(t){n.push({cmd:"+",idx:t})}).update(function(t,e){n.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){n.push({cmd:"-",idx:t})}).execute(),n}(t,e),h=[],u=[],c=[],d=[],f=[],p=[],g=[],v=xf(r,e,o),m=xf(a,t,s),y=0;ye&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n=e[0]&&t<=e[1]},Xf.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Xf.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Xf.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},Xf.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Xf.prototype.getExtent=function(){return this._extent.slice()},Xf.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},Xf.prototype.isBlank=function(){return this._isBlank},Xf.prototype.setBlank=function(t){this._isBlank=t},Xf.prototype.getLabel=null,yr(Xf),Sr(Xf,{registerWhenExtend:!0}),Uf.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&A(n,jf);return new Uf({categories:i,needCollect:!i,deduplication:!1!==e.dedplication})};var Yf=Uf.prototype;function qf(t){return t._map||(t._map=Z(t.categories))}function jf(t){return O(t)&&null!=t.value?t.value:t+""}Yf.getOrdinal=function(t){return qf(this).get(t)},Yf.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=qf(this);return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e};var Zf=Xf.prototype,$f=Xf.extend({type:"ordinal",init:function(t,e){t&&!L(t)||(t=new Uf({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),Zf.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return Zf.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Zf.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:$,niceExtent:$});$f.create=function(){return new $f};var Kf=Us;function Qf(t){return Ys(t)+2}function Jf(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function tp(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),Jf(t,0,e),Jf(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var ep=Us,np=Xf.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),np.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Qf(t)},getTicks:function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,a=[];if(!e)return a;n[0]s&&(t?a.push(ep(s+e,r)):a.push(n[1])),a},getMinorTicks:function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&u>>1;t[r][1]s[1];d(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift());i&&d(s[0],e[0].coord)&&e.unshift({coord:s[0]});d(s[1],a.coord)&&(i?a.coord=s[1]:e.pop());i&&d(a.coord,s[1])&&e.push({coord:s[1]});function d(t,e){return t=Us(t),e=Us(e),c?ee[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},y(Kp,jp);var Qp={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},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)"]}}},Jp={};Jp.categoryAxis=f({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Qp),Jp.valueAxis=f({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},Qp),Jp.timeAxis=k({scale:!0,min:"dataMin",max:"dataMax"},Jp.valueAxis),Jp.logAxis=k({scale:!0,logBase:10},Jp.valueAxis);function tg(a,t,o,e){D(eg,function(r){t.extend({type:a+"Axis."+r,mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?vl(t):{};f(t,e.getTheme().get(r+"Axis")),f(t,this.getDefaultOption()),t.type=o(a,t),n&&gl(t,i,n)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=Uf.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:function(t,e){for(var n=t[0],i=1,r=t.length;ih[1]?-1:1,c=["start"===a?h[0]-u*l:"end"===a?h[1]+u*l:(h[0]+h[1])/2,bg(a)?t.labelOffset+o*l:0],d=e.get("nameRotate");null!=d&&(d=d*gg/180),bg(a)?i=yg(t.rotation,null!=d?d:t.rotation,o):(i=function(t,e,n,i){var r,a,o=qs(n-t.rotation),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;r=js(o-gg/2)?(a=l?"bottom":"top","center"):js(o-1.5*gg)?(a=l?"top":"bottom","center"):(a="middle",o<1.5*gg&&gg/2l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),ou&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/r}(i,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},_defaultLabelLine:function(t){ir(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});function iv(t,e,n,i){var r=e.getData(),a=this.dataIndex,o=r.getName(a),s=e.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:t,name:o,seriesId:e.id}),r.each(function(t){rv(r.getItemGraphicEl(t),r.getItemLayout(t),e.isSelected(r.getName(t)),s,n)})}function rv(t,e,n,i,r){var a=(e.startAngle+e.endAngle)/2,o=n?i:0,s=[Math.cos(a)*o,Math.sin(a)*o];r?t.animate().when(200,{position:s}).start("bounceOut"):t.attr("position",s)}function av(t,e){Ke.call(this);var n=new ho({z2:2}),i=new go,r=new ao;this.add(n),this.add(i),this.add(r),this.updateData(t,e,!0)}_(nv,tv);var ov=av.prototype;ov.updateData=function(t,e,n){var i=this.childAt(0),r=this.childAt(1),a=this.childAt(2),o=t.hostModel,s=t.getItemModel(e),l=t.getItemLayout(e),h=S({},l);h.label=null;var u=o.getShallow("animationTypeUpdate");n?(i.setShape(h),"scale"===o.getShallow("animationType")?(i.shape.r=l.r0,Is(i,{shape:{r:l.r}},o,e)):(i.shape.endAngle=l.startAngle,Ms(i,{shape:{endAngle:l.endAngle}},o,e))):"expansion"===u?i.setShape(h):Ms(i,{shape:h},o,e);var c=t.getItemVisual(e,"color");i.useStyle(k({lineJoin:"bevel",fill:c},s.getModel("itemStyle").getItemStyle())),i.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var d=s.getShallow("cursor");d&&i.attr("cursor",d),rv(this,t.getItemLayout(e),o.isSelected(t.getName(e)),o.get("selectedOffset"),o.get("animation"));var f=!n&&"transition"===u;this._updateLabel(t,e,f),this.highDownOnUpdate=o.get("silent")?null:function(t,e){var n=o.isAnimationEnabled()&&s.get("hoverAnimation");"emphasis"===e?(r.ignore=r.hoverIgnore,a.ignore=a.hoverIgnore,n&&(i.stopAnimation(!0),i.animateTo({shape:{r:l.r+o.get("hoverOffset")}},300,"elasticOut"))):(r.ignore=r.normalIgnore,a.ignore=a.normalIgnore,n&&(i.stopAnimation(!0),i.animateTo({shape:{r:l.r}},300,"elasticOut")))},cs(this)},ov._updateLabel=function(t,e,n){var i=this.childAt(1),r=this.childAt(2),a=t.hostModel,o=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"color");if(!s||isNaN(s.x)||isNaN(s.y))r.ignore=r.normalIgnore=r.hoverIgnore=i.ignore=i.normalIgnore=i.hoverIgnore=!0;else{var h={points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]},u={x:s.x,y:s.y};n?(Ms(i,{shape:h},a,e),Ms(r,{style:u},a,e)):(i.attr({shape:h}),r.attr({style:u})),r.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var c=o.getModel("label"),d=o.getModel("emphasis.label"),f=o.getModel("labelLine"),p=o.getModel("emphasis.labelLine");l=t.getItemVisual(e,"color");gs(r.style,r.hoverStyle={},c,d,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:s.text,autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),r.ignore=r.normalIgnore=!c.get("show"),r.hoverIgnore=!d.get("show"),i.ignore=i.normalIgnore=!f.get("show"),i.hoverIgnore=!p.get("show"),i.setStyle({stroke:l,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(f.getModel("lineStyle").getLineStyle()),i.hoverStyle=p.getModel("lineStyle").getLineStyle();var g=f.get("smooth");g&&!0===g&&(g=.4),i.setShape({smooth:g})}},y(av,Ke);uu.extend({type:"pie",init:function(){var t=new Ke;this._sectorGroup=t},render:function(t,e,n,i){if(!i||i.from!==this.uid){var r=t.getData(),a=this._data,o=this.group,s=e.get("animation"),l=!a,h=t.get("animationType"),u=t.get("animationTypeUpdate"),c=I(iv,this.uid,t,s,n),d=t.get("selectedMode");if(r.diff(a).add(function(t){var e=new av(r,t);l&&"scale"!==h&&e.eachChild(function(t){t.stopAnimation(!0)}),d&&e.on("click",c),r.setItemGraphicEl(t,e),o.add(e)}).update(function(t,e){var n=a.getItemGraphicEl(e);l||"transition"===u||n.eachChild(function(t){t.stopAnimation(!0)}),n.updateData(r,t),n.off("click"),d&&n.on("click",c),o.add(n),r.setItemGraphicEl(t,n)}).remove(function(t){var e=a.getItemGraphicEl(t);o.remove(e)}).execute(),s&&0=n.r0}}});var sv=Math.PI/180;function lv(r,t,e,n,i,a,o,s,l,h){function u(t,e,n){for(var i=t;il+o);i++)if(r[i].y+=n,tr[i].y+r[i].height)return void c(i,n/2);c(e-1,n/2)}function c(t,e){for(var n=t;0<=n&&!(r[n].y-er[n-1].y+r[n-1].height));n--);}function d(t,e,n,i,r,a){for(var o=e?Number.MAX_VALUE:0,s=0,l=t.length;s=e?m.push(r[y]):v.push(r[y]);d(v,!1,t,e,n,i),d(m,!0,t,e,n,i)}function hv(t){return"center"===t.position}function uv(A,L,P,t,O,e){var E,N,B=A.getData(),R=[],z=!1,F=(A.get("minShowLabelAngle")||0)*sv;B.each(function(t){var e=B.getItemLayout(t),n=B.getItemModel(t),i=n.getModel("label"),r=i.get("position")||n.get("emphasis.label.position"),a=i.get("distanceToLabelLine"),o=i.get("alignTo"),s=Xs(i.get("margin"),P),l=i.get("bleedMargin"),h=i.getFont(),u=n.getModel("labelLine"),c=u.get("length");c=Xs(c,P);var d=u.get("length2");if(d=Xs(d,P),!(e.angle