/* * 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={},i=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(e.firefox=!0,e.version=i[1]);n&&(e.ie=!0,e.version=n[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 f(t,e){"createCanvas"===t&&(y=null),a[t]=e}function b(t){if(null==t||"object"!=typeof t)return t;var e=t,i=h.call(t);if("[object Array]"===i){if(!$(t)){e=[];for(var n=0,r=t.length;n>1)%2;s.cssText=["position:absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","width:0","height:0",n[l]+":0",r[h]+":0",n[1-l]+":auto",r[1-h]+":auto",""].join("!important;"),t.appendChild(o),i.push(o)}return i}(t,o),o);if(s)return s(Lt,n,r),i.zrX=Lt[0],void(i.zrY=Lt[1])}i.zrX=i.zrY=0}function Et(t,e,i){if(null!=(e=e||window.event).zrX)return e;var n=e.type;if(n&&0<=n.indexOf("touch")){var r="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];r&&Ot(t,r,e,i)}else Ot(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&kt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function Nt(t,e,i){Dt?t.addEventListener(e,i):t.attachEvent("on"+e,i)}var Rt=Dt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Bt(t){return 2===t.which||3===t.which}function Vt(){this._track=[]}function Ft(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}Vt.prototype={constructor:Vt,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var r={points:[],touches:[],target:e,event:t},a=0,o=n.length;a=this._maxSize&&0>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),De(t,e),e):void Ie(e,0,0,0,1):7===r.length?0<=(n=parseInt(r.substr(1),16))&&n<=16777215?(Ie(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),De(t,e),e):void Ie(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 Ie(e,0,0,0,1);h=be(l.pop());case"rgb":return 3!==l.length?void Ie(e,0,0,0,1):(Ie(e,we(l[0]),we(l[1]),we(l[2]),h),De(t,e),e);case"hsla":return 4!==l.length?void Ie(e,0,0,0,1):(l[3]=be(l[3]),Pe(l,e),De(t,e),e);case"hsl":return 3!==l.length?void Ie(e,0,0,0,1):(Pe(l,e),De(t,e),e);default:return}}Ie(e,0,0,0,1)}}function Pe(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=be(t[1]),r=be(t[2]),a=r<=.5?r*(n+1):r+n-r*n,o=2*r-a;return Ie(e=e||[],_e(255*Se(o,a,i+1/3)),_e(255*Se(o,a,i)),_e(255*Se(o,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Le(t,e){var i=ke(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,255e);i++);i=Math.min(i-1,h-2)}D=e;var n=g[(T=i)+1]-g[i];if(0!=n)if(S=(e-g[i])/n,l)if(I=v[i],M=v[0===i?i:i-1],C=v[h-2=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new vi(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}}},vi.create=function(t){return new vi(t.x,t.y,t.width,t.height)};var mi=function(t){for(var e in t=t||{},li.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};mi.prototype={constructor:mi,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,i=0;i>>1])<0?l=a:s=1+a;var h=n-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[i+u])<0?l=u:o=u+1}return l}function Mi(p,g){var o,s,v=_i,l=0,m=[];function e(t){var e=o[t],i=s[t],n=o[t+1],r=s[t+1];s[t]=i+r,t===l-3&&(o[t+1]=o[t+2],s[t+1]=s[t+2]),l--;var a=Si(p[n],p,e,i,0,g);e+=a,0!==(i-=a)&&0!==(r=bi(p[e+i-1],p,n,r,r-1,g))&&(i<=r?function(t,e,i,n){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=xi(t,i,n,e))=e.maxIterations){t+=e.ellipsis;break}var s=0===o?un(t,r,e.ascCharWidth,e.cnCharWidth):0f)return{lines:[],width:0,height:0};D.textWidth=en(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,C=I&&I.image;C&&ji(C=Ui(C))&&(S=Math.max(S,C.width*b/C.height))}var A=x?x[1]+x[3]:0;S+=A;var T=null!=d?d-m:null;null!=T&&Tn[0]){for(o=0;ot);o++);a=i[n[o]]}if(n.splice(o+1,0,t),!(i[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 ai("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,r=this._zlevelList;for(n=0;n=a.length&&a.push({option:t})}}),a}function xr(t){var o=Q();cr(t,function(t,e){var i=t.exist;i&&o.set(i.id,t)}),cr(t,function(t,e){var i=t.option;X(!i||null==i.id||!o.get(i.id)||o.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&o.set(i.id,t),t.keyInfo||(t.keyInfo={})}),cr(t,function(t,e){var i=t.exist,n=t.option,r=t.keyInfo;if(dr(n)){if(r.name=null!=n.name?n.name+"":i?i.name:pr+e,i)r.id=i.id;else if(null!=n.id)r.id=n.id+"";else for(var a=0;r.id="\0"+r.name+"\0"+a++,o.get(r.id););o.set(r.id,t)}})}function wr(t){var e=t.name;return!(!e||!e.indexOf(pr))}function br(t){return dr(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Sr(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?O(t.dataIndex)?P(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?O(t.name)?P(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function Mr(){var e="__\0ec_inner_"+Ir+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var Ir=0;function Cr(s,l,h){if(E(l)){var t={};t[l+"Index"]=0,l=t}var e=h&&h.defaultMainType;!e||Ar(l,e+"Index")||Ar(l,e+"Id")||Ar(l,e+"Name")||(l[e+"Index"]=0);var u={};return cr(l,function(t,e){t=l[e];if("dataIndex"!==e&&"dataIndexInside"!==e){var i=e.match(/^(\w+)(Index|Id|Name)$/)||[],n=i[1],r=(i[2]||"").toLowerCase();if(!(!n||!r||null==t||"index"===r&&"none"===t||h&&h.includeMainTypes&&x(h.includeMainTypes,n)<0)){var a={mainType:n};"index"===r&&"all"===t||(a[r]=t);var o=s.queryComponents(a);u[n+"Models"]=o,u[n+"Model"]=o[0]}}else u[e]=t}),u}function Ar(t,e){return t&&t.hasOwnProperty(e)}function Tr(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function Dr(t){return"auto"===t?m.domSupported?"html":"richText":t||"html"}var kr=".",Pr="___EC__COMPONENT__CONTAINER___";function Lr(t){var e={main:"",sub:""};return t&&(t=t.split(kr),e.main=t[0]||"",e.sub=t[1]||""),e}function Or(t){(t.$constructor=t).extend=function(t){function e(){t.$constructor?t.$constructor.apply(this,arguments):i.apply(this,arguments)}var i=this;return k(e.prototype,t),e.extend=this.extend,e.superCall=Nr,e.superApply=Rr,w(e,this),e.superClass=i,e}}var zr=0;function Er(t){var e=["__\0is_clz",zr++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function Nr(t,e){var i=Z(arguments,2);return this.superClass.prototype[e].apply(t,i)}function Rr(t,e,i){return this.superClass.prototype[e].apply(t,i)}function Br(i,t){t=t||{};var r={};if(i.registerClass=function(t,e){if(e)if(function(t){X(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=Lr(e)).sub){if(e.sub!==Pr){(function(t){var e=r[t.main];e&&e[Pr]||((e=r[t.main]={})[Pr]=!0);return e})(e)[e.sub]=t}}else r[e.main]=t;return t},i.getClass=function(t,e,i){var n=r[t];if(n&&n[Pr]&&(n=e?n[e]:null),i&&!n)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return n},i.getClassesByMainType=function(t){t=Lr(t);var i=[],e=r[t.main];return e&&e[Pr]?D(e,function(t,e){e!==Pr&&i.push(t)}):i.push(e),i},i.hasClass=function(t){return t=Lr(t),!!r[t.main]},i.getAllClassMainTypes=function(){var i=[];return D(r,function(t,e){i.push(e)}),i},i.hasSubTypes=function(t){t=Lr(t);var e=r[t.main];return e&&e[Pr]},i.parseClassType=Lr,t.registerWhenExtend){var n=i.extend;n&&(i.extend=function(t){var e=n.call(this,t);return i.registerClass(e,t.type)})}return i}function Vr(s){for(var t=0;tthis._ux||Oa(e-this._yi)>this._uy||this._len<5;return this.addData(Sa.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,r,a){return this.addData(Sa.C,t,e,i,n,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,r,a):this._ctx.bezierCurveTo(t,e,i,n,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(Sa.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,r,a){return this.addData(Sa.A,t,e,i,i,n,r-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,r,a),this._xi=ka(r)*i+t,this._yi=Pa(r)*i+e,this},arcTo:function(t,e,i,n,r){return this._ctx&&this._ctx.arcTo(t,e,i,n,r),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(Sa.R,t,e,i,n),this},closePath:function(){this.addData(Sa.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,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,i=0;ie.length&&(this._expandData(),e=this.data);for(var i=0;il||Oa(o-r)>h||c===u-1)&&(t.lineTo(a,o),n=a,r=o);break;case Sa.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case Sa.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case Sa.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=Ya[n=0]+t&&o<=Ya[1]+t?u:0}if(a){l=n;n=Fa(r),r=Fa(l)}else n=Fa(n),r=Fa(r);rMath.PI/2&&p<1.5*Math.PI&&(u=-u),c+=u)}}return c}function Qa(t,e,i,n,r){for(var a=0,o=0,s=0,l=0,h=0,u=0;uMath.abs(a[1])?0=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/r*a+i[0]}function hl(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 ul(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function cl(t){return t.sort(function(t,e){return t-e}),t}function dl(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function fl(t){var e=t.toString(),i=e.indexOf("e");if(0u&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/r}function vl(t){var e=2*Math.PI;return(t%e+e)%e}function ml(t){return-sl"'])/g,Tl={"&":"&","<":"<",">":">",'"':""","'":"'"};function Dl(t){return null==t?"":(t+"").replace(Al,function(t,e){return Tl[e]})}function kl(t,e){return"{"+t+(null==e?"":e)+"}"}var Pl=["a","b","c","d","e","f","g"];function Ll(t,e,i){O(e)||(e=[e]);var n=e.length;if(!n)return"";for(var r=e[0].$vars||[],a=0;a':'':{renderMode:r,content:"{marker"+a+"|} ",style:{color:i}}:""}function zl(t,e){return"0000".substr(0,e-(t+="").length)+t}function El(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=_l(e),r=i?"UTC":"",a=n["get"+r+"FullYear"](),o=n["get"+r+"Month"]()+1,s=n["get"+r+"Date"](),l=n["get"+r+"Hours"](),h=n["get"+r+"Minutes"](),u=n["get"+r+"Seconds"](),c=n["get"+r+"Milliseconds"]();return t=t.replace("MM",zl(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",zl(s,2)).replace("d",s).replace("hh",zl(l,2)).replace("h",l).replace("mm",zl(h,2)).replace("m",h).replace("ss",zl(u,2)).replace("s",u).replace("SSS",zl(c,3))}function Nl(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}var Rl=sn;var Bl=(Object.freeze||Object)({addCommas:Ml,toCamelCase:Il,normalizeCssArray:Cl,encodeHTML:Dl,formatTpl:Ll,formatTplSimple:function(i,t,n){return D(t,function(t,e){i=i.replace("{"+e+"}",n?Dl(t):t)}),i},getTooltipMarker:Ol,formatTime:El,capitalFirst:Nl,truncateText:Rl,getTextBoundingRect:function(t){return nn(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,i,n,r,a,o,s){return nn(t,e,i,n,r,s,a,o)}}),Vl=D,Fl=["left","right","top","bottom","width","height"],Gl=[["width","left","right"],["height","top","bottom"]];function Hl(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 i,n,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<(i=g+l)||t.newline?(g=0,i=l,v+=m+d,a.height):Math.max(m,a.height)}else{var h=a.height+(s?-s.y+a.y:0);m=p<(n=v+h)||t.newline?(g+=m+d,v=0,n=h,a.width):Math.max(m,a.width)}t.newline||(r[0]=g,r[1]=v,"horizontal"===u?g=i+d:v=n+d)})}var Wl=Hl;A(Hl,"vertical"),A(Hl,"horizontal");function Zl(t,e,i){i=Cl(i||0);var n=e.width,r=e.height,a=hl(t.left,n),o=hl(t.top,r),s=hl(t.right,n),l=hl(t.bottom,r),h=hl(t.width,n),u=hl(t.height,r),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(h)&&(h=n-s-d-a),isNaN(u)&&(u=r-l-c-o),null!=f&&(isNaN(h)&&isNaN(u)&&(n/re)return t[n];return t[i-1]}(s,i):o;if((l=l||o)&&l.length){var h=l[r];return t&&(a[t]=h),n.colorIdx=(r+1)%l.length,h}}};function ah(t){var e=t.get("coordinateSystem"),i={coordSysName:e,coordSysDims:[],axisMap:Q(),categoryAxisMap:Q()},n=oh[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}var oh={cartesian2d:function(t,e,i,n){var r=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",r),i.set("y",a),sh(r)&&(n.set("x",r),e.firstCategoryDimIndex=0),sh(a)&&(n.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var r=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",r),sh(r)&&(n.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var r=t.getReferringComponents("polar")[0],a=r.findAxisModel("radiusAxis"),o=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",a),i.set("angle",o),sh(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),sh(o)&&(n.set("angle",o),e.firstCategoryDimIndex=1)},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,r,a,o){var s=t.ecModel,e=s.getComponent("parallel",t.get("parallelIndex")),l=r.coordSysDims=e.dimensions.slice();D(e.parallelAxisIndex,function(t,e){var i=s.getComponent("parallelAxis",t),n=l[e];a.set(n,i),sh(i)&&null==r.firstCategoryDimIndex&&(o.set(n,i),r.firstCategoryDimIndex=e)})}};function sh(t){return"category"===t.get("type")}var lh="original",hh="arrayRows",uh="objectRows",ch="keyedColumns",dh="unknown",fh="typedArray",ph="column",gh="row";function vh(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===ch?{}:[]),this.sourceFormat=t.sourceFormat||dh,this.seriesLayoutBy=t.seriesLayoutBy||ph,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&Q(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}vh.seriesDataToSource=function(t){return new vh({data:t,sourceFormat:B(t)?fh:lh,fromDataset:!1})},Er(vh);var mh=Mr();function yh(t){var e=t.option,i=e.data,n=B(i)?fh:lh,r=!1,a=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=function(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}(t);if(l){var h=l.option;i=h.source,n=mh(l).sourceFormat,r=!0,a=a||h.seriesLayoutBy,null==o&&(o=h.sourceHeader),s=s||h.dimensions}var u=function(t,e,i,n,r){if(!t)return{dimensionsDefine:_h(r)};var a,o,s,l;if(e===hh)"auto"===n||null==n?xh(function(t){null!=t&&"-"!==t&&(E(t)?null==o&&(o=1):o=0)},i,t,10):o=n?1:0,r||1!==o||(r=[],xh(function(t,e){r[e]=null!=t?t:""},i,t)),a=r?r.length:i===gh?t.length:t[0]?t[0].length:null;else if(e===uh)r||(r=function(t){var e,i=0;for(;i":"\n",f="richText"===c,p={},g=0;function i(t){return{renderMode:c,content:Dl(Ml(t)),style:p}}var v=this.getData(),a=v.mapDimension("defaultedTooltip",!0),n=a.length,o=this.getRawValue(r),s=O(o),m=v.getItemVisual(r,"color");N(m)&&m.colorStops&&(m=(m.colorStops[0]||{}).color),m=m||"transparent";var l=(1":"",n=i+h.join(i||", ");return{renderMode:c,content:n,style:p}}(o):i(n?uu(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;wr(this)||(x=""),x=x?Dl(x)+(u?": ":e):"";var w="string"==typeof y?y:y.content;return{html:u?w+x+l:x+w+(_?Dl(_)+": "+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,i){var n=this.ecModel,r=rh.getColorFromPalette.call(this,t,e,i);return r=r||n.getColorFromPalette(t,e,i)},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 Du(t){var e=t.name;wr(t)||(t.name=function(t){var i=t.getRawData(),e=i.mapDimension("seriesName",!0),n=[];return D(e,function(t){var e=i.getDimensionInfo(t);e.displayName&&n.push(e.displayName)}),n.join(" ")}(t)||e)}function ku(t){return t.model.getRawData().count()}function Pu(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Lu}function Lu(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Ou(e,i){D(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,A(zu,i))})}function zu(t){var e=Eu(t);e&&e.setOutputEnd(this.count())}function Eu(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var r=n.agentStubMap;r&&(n=r.get(t.uid))}return n}}S(Tu,fu),S(Tu,rh);var Nu=function(){this.group=new mi,this.uid=ol("viewComponent")};Nu.prototype={constructor:Nu,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};var Ru=Nu.prototype;Ru.updateView=Ru.updateLayout=Ru.updateVisual=function(t,e,i,n){},Or(Nu),Br(Nu,{registerWhenExtend:!0});function Bu(){var s=Mr();return function(t){var e=s(t),i=t.pipelineContext,n=e.large,r=e.progressiveRender,a=e.large=i.large,o=e.progressiveRender=i.progressiveRender;return!!(n^a||r^o)&&"reset"}}var Vu=Mr(),Fu=Bu();function Gu(){this.group=new mi,this.uid=ol("viewChart"),this.renderTask=pu({plan:Uu,reset:Xu}),this.renderTask.context={view:this}}var Hu=Gu.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){Zu(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Zu(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function Wu(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!Ts(t)))for(var n=0,r=t.childCount();nc?i+=p(g("data.partialData"),{displayCnt:c}):i+=g("data.allData");for(var o=[],s=0;si.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:r,modBy:null!=a?Math.ceil(a/r):null,modDataCount:a}}},ac.getPipeline=function(t){return this._pipelineMap.get(t)},ac.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),r=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largeThreshold"),o="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:r,modDataCount:o,large:a}},ac.restorePipelines=function(t){var n=this,r=n._pipelineMap=Q();t.eachSeries(function(t){var e=t.getProgressive(),i=t.uid;r.set(i,{id:i,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),mc(n,t,t.dataTask)})},ac.prepareStageTasks=function(){var i=this._stageTaskMap,n=this.ecInstance.getModel(),r=this.api;D(this._allHandlers,function(t){var e=i.get(t.uid)||i.set(t.uid,[]);t.reset&&function(n,r,t,a,o){var s=t.seriesTaskMap||(t.seriesTaskMap=Q()),e=r.seriesType,i=r.getTargetSeries;r.createOnAllSeries?a.eachRawSeries(l):e?a.eachRawSeriesByType(e,l):i&&i(a,o).each(l);function l(t){var e=t.uid,i=s.get(e)||s.set(e,pu({plan:dc,reset:fc,count:vc}));i.context={model:t,ecModel:a,api:o,useClearVisual:r.isVisual&&!r.isLayout,plan:r.plan,reset:r.reset,scheduler:n},mc(n,t,i)}var h=n._pipelineMap;s.each(function(t,e){h.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,n,r),t.overallReset&&function(n,t,e,i,r){var a=e.overallTask=e.overallTask||pu({reset:lc});a.context={ecModel:i,api:r,overallReset:t.overallReset,scheduler:n};var o=a.agentStubMap=a.agentStubMap||Q(),s=t.seriesType,l=t.getTargetSeries,h=!0,u=t.modifyOutputEnd;s?i.eachRawSeriesByType(s,c):l?l(i,r).each(c):(h=!1,D(i.getSeries(),c));function c(t){var e=t.uid,i=o.get(e);i||(i=o.set(e,pu({reset:hc,onDirty:cc})),a.dirty()),i.context={model:t,overallProgress:h,modifyOutputEnd:u},i.agent=a,i.__block=h,mc(n,t,i)}var d=n._pipelineMap;o.each(function(t,e){d.get(e)||(t.dispose(),a.dirty(),o.removeKey(e))})}(this,t,e,n,r)},this)},ac.prepareView=function(t,e,i,n){var r=t.renderTask,a=r.context;a.model=e,a.ecModel=i,a.api=n,r.__block=!t.incrementalPrepareRender,mc(this,e,r)},ac.performDataProcessorTasks=function(t,e){oc(this,this._dataProcessorHandlers,t,e,{block:!0})},ac.performVisualTasks=function(t,e,i){oc(this,this._visualHandlers,t,e,i)},ac.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},ac.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 sc=ac.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function lc(t){t.overallReset(t.ecModel,t.api,t.payload)}function hc(t,e){return t.overallProgress&&uc}function uc(){this.agent.dirty(),this.getDownstream().dirty()}function cc(){this.agent&&this.agent.dirty()}function dc(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function fc(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=gr(t.reset(t.model,t.ecModel,t.api,t.payload));return 1t.get("hoverLayerThreshold")&&!m.node&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var e=i._chartsMap[t.__viewId];e.__alive&&e.group.traverse(function(t){t.useHoverLayer=!0})}})}(n,t),ic(n._zr.dom,t)}function vd(e,i){Xc(Md,function(t){t(e,i)})}nd.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[Kc]=!0,i&&od(this),ad.update.call(this),this[Kc]=!1,ud.call(this,n),cd.call(this,n)}}},nd.showLoading=function(t,e){if(!this._disposed&&(jc(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Ad[t])){var i=Ad[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},nd.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},nd.makeActionFromEvent=function(t){var e=k({},t);return e.type=wd[t.type],e},nd.dispatchAction=function(t,e){this._disposed||(jc(e)||(e={silent:!!e}),xd[t.type]&&this._model&&(this[Kc]?this._pendingActions.push(t):(hd.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&m.browser.weChat&&this._throttledZrFlush(),ud.call(this,e.silent),cd.call(this,e.silent))))},nd.appendData=function(t){if(!this._disposed){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},nd.on=td("on",!1),nd.off=td("off",!1),nd.one=td("one",!1);var md=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function yd(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function _d(){this.eventInfo}nd._initEvents=function(){Xc(md,function(h){function t(t){var e,i=this.getModel(),n=t.target;if("globalout"===h)e={};else if(n&&null!=n.dataIndex){var r=n.dataModel||i.getSeriesByIndex(n.seriesIndex);e=r&&r.getDataParams(n.dataIndex,n.dataType,n)||{}}else n&&n.eventData&&(e=k({},n.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&&i.getComponent(a,o),l=s&&this["series"===s.mainType?"_chartsMap":"_componentsMap"][s.__viewId];e.event=t,e.type=h,this._ecEventProcessor.eventInfo={targetEl:n,packedEvent:e,model:s,view:l},this.trigger(h,e)}}t.zrEventfulCallAtLast=!0,this._zr.on(h,t,this)},this),Xc(wd,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},nd.isDisposed=function(){return this._disposed},nd.clear=function(){this._disposed||this.setOption({series:[]},!0)},nd.dispose=function(){if(!this._disposed){this._disposed=!0,Tr(this.getDom(),Ld,"");var e=this._api,i=this._model;Xc(this._componentsViews,function(t){t.dispose(i,e)}),Xc(this._chartsViews,function(t){t.dispose(i,e)}),this._zr.dispose(),delete Td[this.id]}},S(id,It),_d.prototype={constructor:_d,normalizeQuery:function(t){var s={},l={},h={};if(E(t)){var e=qc(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 i=!1,n=0;n_[1]&&(_[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},ff(this)},cf._initDataFromProvider=function(t,e){if(!(e<=t)){for(var i,n=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!=i){var C=o[i],A=a[C][y];if(A){I=A[_];var T=l[C].ordinalMeta;T&&T.categories.length&&(I=T.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,i=e[t];if(null!=i&&it))return a;r=a-1}}return-1},cf.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var r=Number.MAX_VALUE,a=-1,o=0,s=this.count();ot[I][1])&&(M=!1)}M&&(a[o++]=this.getRawIndex(v))}return ow[1]&&(w[1]=x)}}}return r},cf.downSample=function(t,e,i,n){for(var r=_f(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(of(this))(h),f=0,p=0;pc[1]&&(c[1]=_),d[f++]=x}return r._count=f,r._indices=d,r.getRawIndex=vf,r},cf.getItemModel=function(t){var e=this.hostModel;return new il(this.getRawDataItem(t),e,e&&e.ecModel)},cf.diff=function(e){var i=this;return new qd(e?e.getIndices():[],this.getIndices(),function(t){return mf(e,t)},function(t){return mf(i,t)})},cf.getVisual=function(t){var e=this._visual;return e&&e[t]},cf.setVisual=function(t,e){if(Jd(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},cf.setLayout=function(t,e){if(Jd(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},cf.getLayout=function(t){return this._layout[t]},cf.getItemLayout=function(t){return this._itemLayouts[t]},cf.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?k(this._itemLayouts[t]||{},e):e},cf.clearItemLayouts=function(){this._itemLayouts.length=0},cf.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},cf.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=n,Jd(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],r[a]=!0);else n[e]=i,r[e]=!0},cf.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function bf(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function Sf(t,e,i){vh.isInstance(e)||(e=vh.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var n=(i.dimsDef||[]).slice(),l=Q(i.encodeDef),r=Q(),a=Q(),h=[],o=function(t,e,i,n){var r=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return D(e,function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))}),r}(e,t,n,i.dimCount),s=0;s=e[0]&&t<=e[1]},kf.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},kf.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},kf.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},kf.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},kf.prototype.getExtent=function(){return this._extent.slice()},kf.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},kf.prototype.isBlank=function(){return this._isBlank},kf.prototype.setBlank=function(t){this._isBlank=t},kf.prototype.getLabel=null,Or(kf),Br(kf,{registerWhenExtend:!0}),Pf.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&P(i,zf);return new Pf({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var Lf=Pf.prototype;function Of(t){return t._map||(t._map=Q(t.categories))}function zf(t){return N(t)&&null!=t.value?t.value:t+""}Lf.getOrdinal=function(t){return Of(this).get(t)},Lf.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=Of(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var Ef=kf.prototype,Nf=kf.extend({type:"ordinal",init:function(t,e){t&&!O(t)||(t=new Pf({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),Ef.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return Ef.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Ef.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;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:J,niceExtent:J});Nf.create=function(){return new Nf};var Rf=ul;function Bf(t){return fl(t)+2}function Vf(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Ff(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),Vf(t,0,e),Vf(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var Gf=ul,Hf=kf.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),Hf.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=Bf(t)},getTicks:function(){return function(t,e,i,n){var r=[];if(!t)return r;e[0](r.length?r[r.length-1]:i[1])&&r.push(e[1]),r}(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=fl(t)||0:"auto"===i&&(i=this._intervalPrecision),Ml(t=Gf(t,i,!0))},niceTicks:function(t,e,i){t=t||5;var n=this._extent,r=n[1]-n[0];if(isFinite(r)){r<0&&(r=-r,n.reverse());var a=function(t,e,i,n){var r={},a=t[1]-t[0],o=r.interval=bl(a/e,!0);null!=i&&o>>1;t[r][1]>1^-(1&s),l=l>>1^-(1&l),r=s+=r,a=l+=a,n.push([s/i,l/i])}return n}Vp.prototype={constructor:Vp,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],r=[],a=[],o=this.geometries,s=0;ss[1];d(e[0].coord,s[0])&&(n?e[0].coord=s[0]:e.shift());n&&d(s[0],e[0].coord)&&e.unshift({coord:s[0]});d(s[1],a.coord)&&(n?a.coord=s[1]:e.pop());n&&d(a.coord,s[1])&&e.push({coord:s[1]});function d(t,e){return t=ul(t),e=ul(e),c?en[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}var Pg=io.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:bo(io.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,r=i.length,a=kg(i,e.smoothConstraint);if(e.connectNulls){for(;0n)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 Vg(t,e,i){if("cartesian2d"!==t.type)return zg(t,e,i);var n=t.getBaseAxis().isHorizontal(),r=Og(t,e,i);if(!i.get("clip",!0)){var a=r.shape,o=Math.max(a.width,a.height);n?(a.y-=o,a.height+=2*o):(a.x-=o,a.width+=2*o)}return r}Gu.extend({type:"line",init:function(){var t=new mi,e=new pg;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,r=this.group,a=t.getData(),o=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=a.mapArray(a.getItemLayout),h="polar"===n.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,i){if(!i.valueDim)return[];for(var n=[],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 Uo(0,0,0,0,u,!0);return v[n]=f,v[n+"2"]=p,v}}}(a,n)||a.getVisual("color");d.useStyle(T(o.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var I=t.get("smooth");if(I=Ng(t.get("smooth")),d.setShape({smooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),f){var C=a.getCalculationInfo("stackedOnSeries"),A=0;f.useStyle(T(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),C&&(A=Ng(C.get("smooth"))),f.setShape({smooth:I,stackedOnSmooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=n,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=m},dispose:function(){},highlight:function(t,e,i,n){var r=t.getData(),a=Sr(r,n);if(!(a instanceof Array)&&null!=a&&0<=a){var o=r.getItemGraphicEl(a);if(!o){var s=r.getItemLayout(a);if(!s)return;(o=new rg(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 Gu.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var r=t.getData(),a=Sr(r,n);if(null!=a&&0<=a){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else Gu.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Pg({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new Lg({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i},_updateAnimation:function(t,e,i,n,r,a){var o=this._polyline,s=this._polygon,l=t.hostModel,h=function(t,e,i,n,r,a,o,s){for(var l=function(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}(t,e),h=[],u=[],c=[],d=[],f=[],p=[],g=[],v=_g(r,e,o),m=_g(a,t,s),y=0;ye&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;ie[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},w(Yg,Kp);var jg={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)"]}}},qg={};qg.categoryAxis=v({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},jg),qg.valueAxis=v({boundaryGap:[0,0],splitNumber:5},jg),qg.timeAxis=T({scale:!0,min:"dataMin",max:"dataMax"},qg.valueAxis),qg.logAxis=T({scale:!0,logBase:10},qg.valueAxis);function $g(a,t,o,e){D(Kg,function(r){t.extend({type:a+"Axis."+r,mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Yl(t):{};v(t,e.getTheme().get(r+"Axis")),v(t,this.getDefaultOption()),t.type=o(a,t),i&&Xl(t,n,i)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=Pf.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:p([{},qg[r+"Axis"],e],!0)})}),Jl.registerSubTypeDefaulter(a+"Axis",A(o,a))}var Kg=["value","category","time","log"],Qg=Jl.extend({type:"cartesian2dAxis",axis:null,init:function(){Qg.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Qg.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Qg.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Jg(t,e){return e.type||(e.data?"category":"value")}v(Qg.prototype,Mp);var tv={offset:0};function ev(t,e){return t.getCoordSysModel()===e}function iv(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}$g("x",Qg,Jg,tv),$g("y",Qg,Jg,tv),Jl.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var nv=iv.prototype;function rv(t,e,i,n){i.getAxesOnZeroOf=function(){return r?[r]:[]};var r,a=t[e],o=i.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)av(a[l])&&(r=a[l]);else for(var h in a)if(a.hasOwnProperty(h)&&av(a[h])&&!n[u(a[h])]){r=a[h];break}r&&(n[u(r)]=!0)}function u(t){return t.dim+"_"+t.index}}function av(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(0h[1]?-1:1,c=["start"===a?h[0]-u*l:"end"===a?h[1]+u*l:(h[0]+h[1])/2,mv(a)?t.labelOffset+o*l:0],d=e.get("nameRotate");null!=d&&(d=d*uv/180),mv(a)?n=fv(t.rotation,null!=d?d:t.rotation,o):(n=function(t,e,i,n){var r,a,o=vl(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;r=ml(o-uv/2)?(a=l?"bottom":"top","center"):ml(o-1.5*uv)?(a=l?"top":"bottom","center"):(a="middle",o<1.5*uv&&uv/2l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o=i.r0}}});var im=Math.PI/180;function nm(r,t,e,i,n,a,o){function s(t,e,i){for(var n=t;nr[n].y+r[n].height)return void l(n,i/2);l(e-1,i/2)}function l(t,e){for(var i=t;0<=i&&(r[i].y-=e,!(0r[i-1].y+r[i-1].height));i--);}function h(t,e,i,n,r,a){for(var o=e?Number.MAX_VALUE:0,s=0,l=t.length;s=e?p.push(r[g]):f.push(r[g]);h(f,!1,t,e,i,n),h(p,!0,t,e,i,n)}function rm(t){return"center"===t.position}function am(I,C,t,e,i){var A,T,D=I.getData(),k=[],P=!1,L=(I.get("minShowLabelAngle")||0)*im;D.each(function(t){var e=D.getItemLayout(t),i=D.getItemModel(t),n=i.getModel("label"),r=n.get("position")||i.get("emphasis.label.position"),a=i.getModel("labelLine"),o=a.get("length"),s=a.get("length2");if(!(e.angleo)return!0;if(a){var s=bv(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1},makeElOption:function(t,e,i,n,r){},createPointerEl:function(t,e,i,n){var r=e.pointer;if(r){var a=zm(t).pointerEl=new qs[r.type](Em(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var r=zm(t).labelEl=new No(Em(e.label));t.add(r),Vm(r,n)}},updatePointerEl:function(t,e,i){var n=zm(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var r=zm(t).labelEl;r&&(r.setStyle(e.label.style),i(r,{shape:e.label.shape,position:e.label.position}),Vm(r,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),r=this._handle,a=i.getModel("handle"),o=i.get("status");if(!a.get("show")||!o||"hide"===o)return r&&n.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=Xs(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Rt(t.event)},onmousedown:Nm(this._onHandleDragMove,this,0,0),drift:Nm(this._onHandleDragMove,this),ondragend:Nm(this._onHandleDragEnd,this)}),n.add(r)),Gm(r,i,!1);r.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");O(s)||(s=[s,s]),r.attr("scale",[s[0]/2,s[1]/2]),Qu(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){Bm(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Fm(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(Fm(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(Fm(n)),zm(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=Rm);var Um=Rm.extend({makeElOption:function(t,e,i,n,r){var a=i.axis,o=a.grid,s=n.get("type"),l=Xm(o,a).getOtherAxis(a).getGlobalExtent(),h=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var u=function(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e}(n),c=Ym[s](a,h,l);c.style=u,t.graphicKey=c.type,t.pointer=c}!function(t,e,i,n,r,a){var o=hv.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=r.get("label.margin"),Hm(e,n,r,a,{position:Zm(n.axis,t,i),align:o.textAlign,verticalAlign:o.textVerticalAlign})}(e,t,Dv(o.model,i),i,n,r)},getHandleTransform:function(t,e,i){var n=Dv(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Zm(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var r=i.axis,a=r.grid,o=r.getGlobalExtent(!0),s=Xm(a,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,h=t.position;h[l]+=e[l],h[l]=Math.min(o[1],h[l]),h[l]=Math.max(o[0],h[l]);var u=(s[1]+s[0])/2,c=[u,u];c[l]=h[l];return{position:h,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function Xm(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var Ym={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:function(t,e,i){return{x1:t[i=i||0],y1:t[1-i],x2:e[i],y2:e[1-i]}}([e,i[0]],[e,i[1]],jm(t))}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),r=i[1]-i[0];return{type:"Rect",shape:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}([e-n/2,i[0]],[n,r],jm(t))}}};function jm(t){return"x"===t.dim?0:1}Iv.registerAxisPointerClass("CartesianAxisPointer",Um),Rd(function(t){if(t){t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={});var e=t.axisPointer.link;e&&!O(e)&&(t.axisPointer.link=[e])}}),Bd($c.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=xv(t,e)}),Vd({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n=t.currTrigger,o=[t.x,t.y],r=t,a=t.dispatchAction||C(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Cm(o)&&(o=ym({seriesIndex:r.seriesIndex,dataIndex:r.dataIndex},e).point);var l=Cm(o),h=r.axesInfo,u=s.axesInfo,c="leave"===n||Cm(o),d={},f={},p={list:[],map:{}},g={showPointer:xm(Sm,f),showTooltip:xm(Mm,p)};_m(s.coordSysMap,function(t,e){var a=l||t.containPoint(o);_m(s.coordSysAxesInfo[e],function(t,e){var i=t.axis,n=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(h,t);if(!c&&a&&(!h||n)){var r=n&&n.value;null!=r||l||(r=i.pointToData(o)),null!=r&&bm(t,r,g,!1,d)}})});var v={};return _m(u,function(r,t){var a=r.linkGroup;a&&!f[t]&&_m(a.axesInfo,function(t,e){var i=f[e];if(t!==r&&i){var n=i.value;a.mapper&&(n=r.axis.scale.parse(a.mapper(n,Im(t),Im(r)))),v[r.key]=n}})}),_m(v,function(t,e){bm(u[e],t,g,!0,d)}),function(r,t,e){var a=e.axesInfo=[];_m(t,function(t,e){var i=t.axisPointerModel.option,n=r[e];n?(t.useHandle||(i.status="show"),i.value=n.value,i.seriesDataIndices=(n.payloadBatch||[]).slice()):t.useHandle||(i.status="hide"),"show"===i.status&&a.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}(f,u,d),function(t,e,i,n){if(Cm(e)||!t.list.length)return n({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(p,o,t,a),function(t,e,i){var n=i.getZr(),r="axisPointerLastHighlights",a=wm(n)[r]||{},o=wm(n)[r]={};_m(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&_m(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t})});var s=[],l=[];D(a,function(t,e){o[e]||l.push(t)}),D(o,function(t,e){a[e]||s.push(t)}),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(u,0,i),d}}),Zd({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var qm=D,$m=Il,Km=["","-webkit-","-moz-","-o-"];function Qm(r){var a=[],t=r.get("transitionDuration"),e=r.get("backgroundColor"),i=r.getModel("textStyle"),n=r.get("padding");return t&&a.push(function(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return P(Km,function(t){return t+"transition:"+i}).join(";")}(t)),e&&(m.canvasSupported?a.push("background-Color:"+e):(a.push("background-Color:#"+Oe(e)),a.push("filter:alpha(opacity=70)"))),qm(["width","color","radius"],function(t){var e="border-"+t,i=$m(e),n=r.get(i);null!=n&&a.push(e+":"+n+("color"===t?"":"px"))}),a.push(function(i){var n=[],t=i.get("fontSize"),e=i.getTextColor();return e&&n.push("color:"+e),n.push("font:"+i.getFont()),t&&n.push("line-height:"+Math.round(3*t/2)+"px"),qm(["decoration","align"],function(t){var e=i.get(t);e&&n.push("text-"+t+":"+e)}),n.join(";")}(i)),null!=n&&a.push("padding:"+Cl(n).join("px ")+"px"),a.join(";")+";"}function Jm(i,t){if(m.wxa)return null;var e=document.createElement("div"),n=this._zr=t.getZr();this.el=e,this._x=t.getWidth()/2,this._y=t.getHeight()/2,i.appendChild(e),this._container=i,this._show=!1,this._hideTimeout;var r=this;e.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},e.onmousemove=function(t){if(t=t||window.event,!r._enterable){var e=n.handler;Et(i,t,!0),e.dispatch("mousemove",t)}},e.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function ty(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}Jm.prototype={constructor:Jm,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+Qm(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i,n=this._zr;n&&n.painter&&(i=n.painter.getViewportRootOffset())&&(t+=i.offsetLeft,e+=i.offsetTop);var r=this.el.style;r.left=t+"px",r.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(C(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(t+=parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),e+=parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:t,height:e}}},ty.prototype={constructor:ty,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,i){this.el&&this._zr.remove(this.el);for(var n={},r=t,a="{marker",o=r.indexOf(a);0<=o;){var s=r.indexOf("|}"),l=r.substr(o+a.length,s-o-a.length);-1i[r],f=[-u.x,-u.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],v=H(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[n]+=i[r]-c[r]:p[n]+=c[r]+v);g[1-n]+=u[a]/2-c[a]/2,s.attr("position",f),l.attr("position",p),h.attr("position",g);var m={x:0,y:0};if(m[r]=d?i[r]:u[r],m[a]=Math.max(u[a],c[a]),m[o]=Math.min(0,c[o]+g[1-n]),l.__rectSize=i[r],d){var y={x:0,y:0};y[r]=Math.max(i[r]-c[r]-v,0),y[a]=m[a],l.setClipPath(new No({shape:y})),l.__rectSize=y[r]}else h.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&Vs(s,{position:_.contentPosition},d&&t),this._updatePageInfoView(t,_),m},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(n,r){var a=this._controllerGroup;D(["pagePrev","pageNext"],function(t){var e=null!=r[t+"DataIndex"],i=a.childOfName(t);i&&(i.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),i.cursor=e?"pointer":"default")});var t=a.childOfName("pageText"),e=n.get("pageFormatter"),i=r.pageIndex,o=null!=i?i+1:0,s=r.pageCount;t&&e&&t.setStyle("text",E(e)?e.replace("{current}",o).replace("{total}",s):e({current:o,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,r=t.getOrient().index,a=My[r],o=Iy[r],s=this._findTargetItemIndex(e),l=i.children(),h=l[s],u=l.length,c=u?1:0,d={contentPosition:i.position.slice(),pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return d;var f=y(h);d.contentPosition[r]=-f.s;for(var p=s+1,g=f,v=f,m=null;p<=u;++p)(!(m=y(l[p]))&&v.e>g.s+n||m&&!_(m,g.s))&&(g=v.i>g.i?v:m)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),v=m;for(p=s-1,g=f,v=f,m=null;-1<=p;--p)(m=y(l[p]))&&_(v,m.s)||!(g.i=e&&t.s<=e+n}},_findTargetItemIndex:function(n){var r,a,t=this.getContentGroup();return this._showController&&t.eachChild(function(t,e){var i=t.__legendDataIndex;null==a&&null!=i&&(a=e),i===n&&(r=e)}),null!=r?r:a}});Vd("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})}),Zd({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Ud({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,r=t.getModel("textStyle"),a=t.getModel("subtextStyle"),o=t.get("textAlign"),s=H(t.get("textBaseline"),t.get("textVerticalAlign")),l=new wo({style:Ps({},r,{text:t.get("text"),textFill:r.getTextColor()},{disableBox:!0}),z2:10}),h=l.getBoundingRect(),u=t.get("subtext"),c=new wo({style:Ps({},a,{text:u,textFill:a.getTextColor(),y:h.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),u&&n.add(c);var g=n.getBoundingRect(),v=t.getBoxLayoutParams();v.width=g.width,v.height=g.height;var m=Zl(v,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));o||("middle"===(o=t.get("left")||t.get("right"))&&(o="center"),"right"===o?m.x+=m.width:"center"===o&&(m.x+=m.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?m.y+=m.height:"middle"===s&&(m.y+=m.height/2),s=s||"top"),n.attr("position",[m.x,m.y]);var y={textAlign:o,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var _=m.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var w=new No({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});n.add(w)}}});var Ay=Ml,Ty=Dl;function Dy(t){vr(t,"label",["show"])}var ky=Zd({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},isAnimationEnabled:function(){if(m.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,n,e,r){var a=this.constructor,o=this.mainType+"Model";e||n.eachSeries(function(t){var e=t.get(this.mainType,!0),i=t[o];e&&e.data?(i?i._mergeOption(e,n,!0):(r&&Dy(e),D(e.data,function(t){t instanceof Array?(Dy(t[0]),Dy(t[1])):Dy(t)}),k(i=new a(e,this,n),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),i.__hostSeries=t),t[o]=i):t[o]=null},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=O(i)?P(i,Ay).join(", "):Ay(i),r=e.getName(t),a=Ty(this.name);return null==i&&!r||(a+="
"),r&&(a+=Ty(r),null!=i&&(a+=" : ")),null!=i&&(a+=Ty(n)),a},getData:function(){return this._data},setData:function(t){this._data=t}});S(ky,fu),ky.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var Py=x;function Ly(t,e,i,n,r,a){var o=[],s=Af(e,n)?e.getCalculationInfo("stackResultDimension"):n,l=Vy(e,s,t),h=e.indicesOfNearest(s,l)[0];o[r]=e.get(i,h),o[a]=e.get(n,h);var u=dl(e.get(n,h));return 0<=(u=Math.min(u,20))&&(o[a]=+o[a].toFixed(u)),o}var Oy=A,zy={min:Oy(Ly,"min"),max:Oy(Ly,"max"),average:Oy(Ly,"average")};function Ey(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!O(e.coord)&&n){var r=n.dimensions,a=Ny(e,i,n,t);if((e=b(e)).type&&zy[e.type]&&a.baseAxis&&a.valueAxis){var o=Py(r,a.baseAxis.dim),s=Py(r,a.valueAxis.dim);e.coord=zy[e.type](i,a.baseDataDim,a.valueDataDim,o,s),e.value=e.coord[s]}else{for(var l=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)zy[l[h]]&&(l[h]=Vy(i,i.mapDimension(r[h]),l[h]));e.coord=l}}return e}function Ny(t,e,i,n){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=i.getAxis(function(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var r=0;ra&&(e[1-n]=e[n]+c.sign*a),e}function b_(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:0n[1]&&(n[1]=e[1])})}),n[1]c[1];if(o&&!s&&!l)return!0;o&&(n=!0),s&&(e=!0),l&&(i=!0)}return n&&e&&i}):I_(u,function(t){if("empty"===r)i.setData(h=h.map(t,function(t){return function(t){return t>=c[0]&&t<=c[1]}(t)?t:NaN}));else{var e={};e[t]=c,h.selectRange(e)}}),I_(u,function(t){h.setApproximateExtent(c,t)}))})}}};var T_=D,D_=__,k_=Zd({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=P_(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=P_(t);v(this.option,t,!0),v(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var i=this.option;m.canvasSupported||(i.realtime=!1),this._setDefaultThrottle(t),L_(this,t);var n=this.settledOption;T_([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(i[t[0]]=n[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var o=this._axisProxies;this.eachTargetAxis(function(t,e,i,n){var r=this.dependentModels[t.axis][e],a=r.__dzAxisProxy||(r.__dzAxisProxy=new M_(t.name,e,this,n));o[t.name+"_"+e]=a},this)},_resetTarget:function(){var i=this.option,t=this._judgeAutoMode();D_(function(t){var e=t.axisIndex;i[e]=gr(i[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,i=!1;D_(function(t){null!=e[t.axisIndex]&&(i=!0)},this);var t=e.orient;return null==t&&i?"orient":i?void 0:(null==t&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var a=!0,e=this.get("orient",!0),o=this.option,t=this.dependentModels;if(a){var i="vertical"===e?"y":"x";t[i+"Axis"].length?(o[i+"AxisIndex"]=[0],a=!1):T_(t.singleAxis,function(t){a&&t.get("orient",!0)===e&&(o.singleAxisIndex=[t.componentIndex],a=!1)})}a&&D_(function(t){if(a){var e=[],i=this.dependentModels[t.axis];if(i.length&&!e.length)for(var n=0,r=i.length;ne[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,r=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-r);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var i;if(B_(this.getTargetCoordInfo(),function(t){if(!i&&t.length){var e=t[0].model.coordinateSystem;i=e.getRect&&e.getRect()}}),!i){var t=this.api.getWidth(),e=this.api.getHeight();i={x:.2*t,y:.2*e,width:.6*t,height:.6*e}}return i}});function W_(t){return"vertical"===t?"ns-resize":"ew-resize"}Bd({getTargetSeries:function(t){var n=Q();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,i){D(i.getAxisProxy(t.name,e).getTargetSeriesModels(),function(t){n.set(t.uid,t)})})}),n},modifyOutputEnd:!0,overallReset:function(t,n){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,i){i.getAxisProxy(t.name,e).reset(i,n)}),t.eachTargetAxis(function(t,e,i){i.getAxisProxy(t.name,e).filterData(i,n)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})})}}),Vd("dataZoom",function(i,t){var n=x_(C(t.eachComponent,t,"dataZoom"),__,function(t,e){return t.get(e.axisIndex)}),r=[];t.eachComponent({mainType:"dataZoom",query:i},function(t,e){r.push.apply(r,n(t).nodes)}),D(r,function(t,e){t.setRawRange({start:i.start,end:i.end,startValue:i.startValue,endValue:i.endValue})})}),k_.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var Z_="\0_ec_interaction_mutex";function U_(t,e){return!!X_(t)[e]}function X_(t){return t[Z_]||(t[Z_]={})}function Y_(i){this.pointerChecker,this._zr=i,this._opt={};var t=C,n=t(j_,this),r=t(q_,this),a=t($_,this),o=t(K_,this),s=t(Q_,this);It.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(t,e){this.disable(),this._opt=T(b(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(i.on("mousedown",n),i.on("mousemove",r),i.on("mouseup",a)),!0!==t&&"scale"!==t&&"zoom"!==t||(i.on("mousewheel",o),i.on("pinch",s))},this.disable=function(){i.off("mousedown",n),i.off("mousemove",r),i.off("mouseup",a),i.off("mousewheel",o),i.off("pinch",s)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function j_(t){if(!(Bt(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function q_(t){if(this._dragging&&ex("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!U_(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,r=this._y,a=e-n,o=i-r;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&Rt(t.event),tx(this,"pan","moveOnMouseMove",t,{dx:a,dy:o,oldX:n,oldY:r,newX:e,newY:i})}}function $_(t){Bt(t)||(this._dragging=!1)}function K_(t){var e=ex("zoomOnMouseWheel",t,this._opt),i=ex("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,r=Math.abs(n),a=t.offsetX,o=t.offsetY;if(0!==n&&(e||i)){if(e){var s=3d.getHeight()&&(i.textPosition="top",a=!0);var o=a?-5-n.height:p+8;r+n.width/2>d.getWidth()?(i.textPosition=["100%",o],i.textAlign="right"):r-n.width/2<0&&(i.textPosition=[0,o],i.textAlign="left")}})}function t(t,e){var i,n=g[t],r=g[e],a=new il(l[n],u,u.ecModel);if(n&&!r){if(function(t){return 0===t.indexOf("my")}(n))i={model:a,onclick:a.option.onclick,featureName:n};else{var o=gx(n);if(!o)return;i=new o(a,c,d)}h[n]=i}else{if(!(i=h[r]))return;i.model=a,i.ecModel=c,i.api=d}n||!r?a.get("show")&&!i.unusable?(function(r,a,t){var o=r.getModel("iconStyle"),s=r.getModel("emphasis.iconStyle"),e=a.getIcons?a.getIcons():r.get("icon"),l=r.get("title")||{};if("string"==typeof e){var i=e,n=l;l={},(e={})[t]=i,l[t]=n}var h=r.iconPaths={};D(e,function(t,e){var i=Xs(t,{},{x:-p/2,y:-p/2,width:p,height:p});i.setStyle(o.getItemStyle()),i.hoverStyle=s.getItemStyle(),i.setStyle({text:l[e],textAlign:s.get("textAlign"),textBorderRadius:s.get("textBorderRadius"),textPadding:s.get("textPadding"),textFill:null});var n=u.getModel("tooltip");n&&n.get("show")&&i.attr("tooltip",k({content:l[e],formatter:n.get("formatter",!0)||function(){return l[e]},formatterParams:{componentType:"toolbox",name:e,title:l[e],$vars:["name","title"]},position:n.get("position",!0)||"bottom"},n.option)),Cs(i),u.get("showTitle")&&(i.__title=l[e],i.on("mouseover",function(){var t=s.getItemStyle(),e="vertical"===u.get("orient")?null==u.get("right")?"right":"left":null==u.get("bottom")?"bottom":"top";i.setStyle({textFill:s.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:s.get("textBackgroundColor"),textPosition:s.get("textPosition")||e})}).on("mouseout",function(){i.setStyle({textFill:null,textBackgroundColor:null})})),i.trigger(r.get("iconStatus."+e)||"normal"),f.add(i),i.on("click",C(a.onclick,a,c,d,e)),h[e]=i})}(a,i,n),a.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},i.render&&i.render(a,c,d,s)):i.remove&&i.remove(c,d):i.dispose&&i.dispose(c,d)}},updateView:function(t,e,i,n){D(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(e,i){D(this._features,function(t){t.remove&&t.remove(e,i)}),this.group.removeAll()},dispose:function(e,i){D(this._features,function(t){t.dispose&&t.dispose(e,i)})}});var mx=ec.toolbox.saveAsImage;function yx(t){this.model=t}yx.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:mx.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:mx.lang.slice()},yx.prototype.unusable=!m.canvasSupported,yx.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",r=i.get("type",!0)||"png",a=e.getConnectedDataURL({type:r,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||m.browser.ie||m.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var o=atob(a.split(",")[1]),s=o.length,l=new Uint8Array(s);s--;)l[s]=o.charCodeAt(s);var h=new Blob([l]);window.navigator.msSaveOrOpenBlob(h,n+"."+r)}else{var u=i.get("lang"),c='';window.open().document.write(c)}else{var d=document.createElement("a");d.download=n+"."+r,d.target="_blank",d.href=a;var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});d.dispatchEvent(f)}},px("saveAsImage",yx);var _x=ec.toolbox.magicType;function xx(t){this.model=t}xx.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:b(_x.title),option:{},seriesIndex:{}};var bx=xx.prototype;bx.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return D(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var Sx={line:function(t,e,i,n){if("bar"===t)return v({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0)},bar:function(t,e,i,n){if("line"===t)return v({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0)},stack:function(t,e,i,n){if("line"===t||"bar"===t)return v({id:e,stack:"__ec_magicType_stack__"},n.get("option.stack")||{},!0)},tiled:function(t,e,i,n){if("line"===t||"bar"===t)return v({id:e,stack:""},n.get("option.tiled")||{},!0)}},Mx=[["line","bar"],["stack","tiled"]];bx.onclick=function(h,t,u){var c=this.model,e=c.get("seriesIndex."+u);if(Sx[u]){var d={series:[]};D(Mx,function(t){0<=x(t,u)&&D(t,function(t){c.setIconStatus(t,"normal")})}),c.setIconStatus(u,"emphasis"),h.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,i=t.id,n=Sx[u](e,i,t,c);n&&(T(n,t.option),d.series.push(n));var r=t.coordinateSystem;if(r&&"cartesian2d"===r.type&&("line"===u||"bar"===u)){var a=r.getAxesByScale("ordinal")[0];if(a){var o=a.dim+"Axis",s=h.queryComponents({mainType:o,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;d[o]=d[o]||[];for(var l=0;l<=s;l++)d[o][s]=d[o][s]||{};d[o][s].boundaryGap="bar"===u}}}),t.dispatchAction({type:"changeMagicType",currentType:u,newOption:d})}},Vd({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),px("magicType",xx);var Ix=ec.toolbox.dataView,Cx=new Array(60).join("-"),Ax="\t";function Tx(t){var e=function(t){var r={},a=[],o=[];return t.eachRawSeries(function(t){var e=t.coordinateSystem;if(!e||"cartesian2d"!==e.type&&"polar"!==e.type)a.push(t);else{var i=e.getBaseAxis();if("category"===i.type){var n=i.dim+"_"+i.index;r[n]||(r[n]={categoryAxis:i,valueAxis:e.getOtherAxis(i),series:[]},o.push({axisDim:i.dim,axisIndex:i.index})),r[n].series.push(t)}else a.push(t)}}),{seriesGroupByCategoryAxis:r,other:a,meta:o}}(t);return{value:I([function(t){var u=[];return D(t,function(t,e){var i=t.categoryAxis,n=t.valueAxis.dim,r=[" "].concat(P(t.series,function(t){return t.name})),a=[i.model.getCategories()];D(t.series,function(t){a.push(t.getRawData().mapArray(n,function(t){return t}))});for(var o=[r.join(Ax)],s=0;st[1]&&t.reverse(),t}function zw(t,e){return Cr(t,e,{includeMainTypes:kw})}Lw.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=Bw[t.brushType](0,i,e);t.__rangeOffset={offset:Fw[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},Lw.matchOutputRanges=function(t,n,r){Cw(t,function(i){var t=this.findTargetInfo(i,n);t&&!0!==t&&D(t.coordSyses,function(t){var e=Bw[i.brushType](1,t,i.range);r(i,e.values,t,n)})},this)},Lw.setInputRanges=function(t,r){Cw(t,function(t){var e=this.findTargetInfo(t,r);if(t.range=t.range||[],e&&!0!==e){t.panelId=e.panelId;var i=Bw[t.brushType](0,e.coordSys,t.coordRange),n=t.__rangeOffset;t.range=n?Fw[t.brushType](i.values,n.offset,function(t,e){var i=Hw(t),n=Hw(e),r=[i[0]/n[0],i[1]/n[1]];return isNaN(r[0])&&(r[0]=1),isNaN(r[1])&&(r[1]=1),r}(i.xyMinMax,n.xyMinMax)):i.values}},this)},Lw.makePanelOpts=function(i,n){return P(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:n&&n(t),clipPath:function(i){return i=Iw(i),function(t,e){return Us(t,i)}}(e),isTargetByCursor:Mw(e,i,t.coordSysModel),getLinearBrushOtherExtent:function(r,a){return r=Iw(r),function(t){var e=null!=a?a:t,i=e?r.width:r.height,n=e?r.x:r.y;return[n,n+(i||0)]}}(e)}})},Lw.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&0<=Aw(n.coordSyses,e.coordinateSystem)},Lw.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=zw(e,t),r=0;r')}}catch(t){tb=function(t){return rb.createElement("<"+t+' xmlns="'+eb+'" class="zrvml">')}}var ob,sb=Ea.CMD,lb=Math.round,hb=Math.sqrt,ub=Math.abs,cb=Math.cos,db=Math.sin,fb=Math.max;if(!m.canvasSupported){var pb=",",gb="progid:DXImageTransform.Microsoft",vb=21600,mb=vb/2,yb=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=vb+","+vb,t.coordorigin="0,0"},_b=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},xb=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},wb=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},bb=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},Sb=En,Mb=function(t,e,i){var n=ke(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=_b(n[0],n[1],n[2]),t.opacity=i*n[3])},Ib=function(t,e,i,n){var r="fill"===e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(r||!r&&i.lineWidth)?(t[r?"filled":"stroked"]="true",i[e]instanceof Go&&wb(t,a),a=a||ab(e),r?function(t,e,i){var n,r,a=e.fill;if(null!=a)if(a instanceof Go){var o,s=0,l=[0,0],h=0,u=1,c=i.getBoundingRect(),d=c.width,f=c.height;if("linear"===a.type){o="gradient";var p=i.transform,g=[a.x*d,a.y*f],v=[a.x2*d,a.y2*f];p&&(yt(g,g,p),yt(v,v,p));var m=v[0]-g[0],y=v[1]-g[1];(s=180*Math.atan2(m,y)/Math.PI)<0&&(s+=360),s<1e-6&&(s=0)}else{o="gradientradial";g=[a.x*d,a.y*f],p=i.transform;var _=i.scale,x=d,w=f;l=[(g[0]-c.x)/x,(g[1]-c.y)/w],p&&yt(g,g,p),x/=_[0]*vb,w/=_[1]*vb;var b=fb(x,w);h=0/b,u=2*a.r/b-h}var S=a.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M=S.length,I=[],C=[],A=0;A=c&&d<=i+1){for(var n=[],r=0;r=c&&d<=r+1)return fS(u,e.components,h,l);p[t]=e}else p[t]=void 0}var s;f++}for(;f<=e;){var o=a();if(o)return o}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var r=e.length,a=i.length,o=t.newPos,s=o-n,l=0;o+1