23 lines
720 KiB
JavaScript
23 lines
720 KiB
JavaScript
|
|
!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";function e(t){var e={},i={},n=t.match(/Firefox\/([\d.]+)/),a=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),r=/micromessenger/i.test(t);return n&&(i.firefox=!0,i.version=n[1]),a&&(i.ie=!0,i.version=a[1]),o&&(i.edge=!0,i.version=o[1]),r&&(i.weChat=!0),{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=11),domSupported:"undefined"!=typeof document}}function i(t,e){"createCanvas"===t&&(zb=null),Eb[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,i=Tb.call(t);if("[object Array]"===i){if(!z(t)){e=[];for(var a=0,o=t.length;o>a;a++)e[a]=n(t[a])}}else if(Ab[i]){if(!z(t)){var r=t.constructor;if(t.constructor.from)e=r.from(t);else{e=new r(t.length);for(var a=0,o=t.length;o>a;a++)e[a]=n(t[a])}}}else if(!Ib[i]&&!z(t)&&!A(t)){e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=n(t[s]))}return e}function a(t,e,i){if(!S(e)||!S(t))return i?n(e):t;for(var o in e)if(e.hasOwnProperty(o)){var r=t[o],s=e[o];!S(s)||!S(r)||_(s)||_(r)||A(s)||A(r)||M(s)||M(r)||z(s)||z(r)?!i&&o in t||(t[o]=n(e[o],!0)):a(r,s,i)}return t}function o(t,e){for(var i=t[0],n=1,o=t.length;o>n;n++)i=a(i,t[n],e);return i}function r(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function s(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function l(){return zb||(zb=Nb().getContext("2d")),zb}function u(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i}return-1}function h(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var a in n)t.prototype[a]=n[a];t.prototype.constructor=t,t.superClass=e}function c(t,e,i){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,i)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,i){if(t&&e)if(t.forEach&&t.forEach===Cb)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,a=t.length;a>n;n++)e.call(i,t[n],n,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(i,t[o],o,t)}function p(t,e,i){if(t&&e){if(t.map&&t.map===Pb)return t.map(e,i);for(var n=[],a=0,o=t.length;o>a;a++)n.push(e.call(i,t[a],a,t));return n}}function g(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===Ob)return t.reduce(e,i,n);for(var a=0,o=t.length;o>a;a++)i=e.call(n,i,t[a],a,t);return i}}function m(t,e,i){if(t&&e){if(t.filter&&t.filter===Lb)return t.filter(e,i);for(var n=[],a=0,o=t.length;o>a;a++)e.call(i,t[a],a,t)&&n.push(t[a]);return n}}function v(t,e,i){if(t&&e)for(var n=0,a=t.length;a>n;n++)if(e.call(i,t[n],n,t))return t[n]}function y(t,e){var i=kb.call(arguments,2);return function(){return t.apply(e,i.concat(kb.call(arguments)))}}function x(t){var e=kb.call(arguments,1);return function(){return t.apply(this,e.concat(kb.call(arguments)))}}function _(t){return"[object Array]"===Tb.call(t)}function w(t){return"function"==typeof t}function b(t){return"[object String]"===Tb.call(t)}function S(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function M(t){return!!Ib[Tb.call(t)]}function I(t){return!!Ab[Tb.call(t)]}function A(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function T(t){return t!==t}function D(){for(var t=0,e=arguments.length;e>t;t++)if(null!=arguments[t])return arguments[t]}function C(t,e){return null!=t?t:e}function L(t,e,i){return null!=t?t:null!=e?e:i}function k(){return Function.call.apply(kb,arguments)}function P(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function O(t,e){if(!t)throw new Error(e)}function E(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\
|
||
|
|
}function pn(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function gn(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function mn(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function vn(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function yn(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function xn(t){t=t||{},LS.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new HS(t.style,this),this._rect=null,this.__clipPaths=[]}function _n(t){xn.call(this,t)}function wn(t){return parseInt(t,10)}function bn(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function Sn(t,e,i){return fM.copy(t.getBoundingRect()),t.transform&&fM.applyTransform(t.transform),pM.width=e,pM.height=i,!fM.intersect(pM)}function Mn(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0}function In(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}function An(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","overflow:hidden","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}function Tn(t){return"mousewheel"===t&&Mb.browser.firefox?"DOMMouseScroll":t}function Dn(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function Cn(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Ln(t){function e(t,e){return function(){return e._touching?void 0:t.apply(e,arguments)}}f(xM,function(e){t._handlers[e]=y(bM[e],t)}),f(wM,function(e){t._handlers[e]=y(bM[e],t)}),f(yM,function(i){t._handlers[i]=e(bM[i],t)})}function kn(t){function e(e,i){f(e,function(e){me(t,Tn(e),i._handlers[e])},i)}Xb.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._handlers={},Ln(this),Mb.pointerEventsSupported?e(wM,this):(Mb.touchEventsSupported&&e(xM,this),e(yM,this))}function Pn(t,e){var i=new DM(bb(),t,e);return AM[i.id]=i,i}function On(t){if(t)t.dispose();else{for(var e in AM)AM.hasOwnProperty(e)&&AM[e].dispose();AM={}}return this}function En(t){return AM[t]}function Nn(t,e){IM[t]=e}function zn(t){delete AM[t]}function Rn(t){return t instanceof Array?t:null==t?[]:[t]}function Bn(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,a=i.length;a>n;n++){var o=i[n];!t.emphasis[e].hasOwnProperty(o)&&t[e].hasOwnProperty(o)&&(t.emphasis[e][o]=t[e][o])}}}function Vn(t){return!kM(t)||PM(t)||t instanceof Date?t:t.value}function Gn(t){return kM(t)&&!(t instanceof Array)}function Fn(t,e){e=(e||[]).slice();var i=p(t||[],function(t){return{exist:t}});return LM(e,function(t,n){if(kM(t)){for(var a=0;a<i.length;a++)if(!i[a].option&&null!=t.id&&i[a].exist.id===t.id+"")return i[a].option=t,void(e[n]=null);for(var a=0;a<i.length;a++){var o=i[a].exist;if(!(i[a].option||null!=o.id&&null!=t.id||null==t.name||Zn(t)||Zn(o)||o.name!==t.name+""))return i[a].option=t,void(e[n]=null)}}}),LM(e,function(t){if(kM(t)){for(var e=0;e<i.length;e++){var n=i[e].exist;if(!i[e].option&&!Zn(n)&&null==t.id){i[e].option=t;break}}e>=i.length&&i.push({option:t})}}),i}function Wn(t){var e=B();LM(t,function(t){var i=t.exist;i&&e.set(i.id,t)}),LM(t,function(t){var i=t.option;O(!i||null==i.id||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&e.set(i.id,t),!t.keyInfo&&(t.keyInfo={})}),LM(t,function(t,i){var n=t.exist,a=t.option,o=t.keyInfo;if(kM(a)){if(o.name=null!=a.name?a.name+"":n?n.name:OM+i,n)o.id=n.id;else if(null!=a.id)o.id=a.id+"";else{var r=0;do o.id="\x00"+o.name+"\x00"+r++;while(e.get(o.id))}e.set(o.id,t)}})}function Hn(t){var e=t.name;return!(!e||!e.indexOf(OM))}function Zn(t){return kM(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")}function Un(t,e){function i(t,e,i){for(var n=0,a=t.length;a>n;n++)for(var o=t[n].se
|
||
|
|
}t.sort(function(t,i){return e(t,i,0)?-1:1});for(var i=-1/0,n=1,a=0;a<t.length;){for(var o=t[a].interval,r=t[a].close,s=0;2>s;s++)o[s]<=i&&(o[s]=i,r[s]=s?1:1-n),i=o[s],n=r[s];o[0]===o[1]&&r[0]*r[1]!==1?t.splice(a,1):a++}return t}function pr(t){return t-parseFloat(t)>=0}function gr(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function mr(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}function vr(t){return null==t?"":(t+"").replace(zA,function(t,e){return RA[e]})}function yr(t,e,i){_(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],o=0;o<a.length;o++){var r=BA[o];t=t.replace(VA(r),VA(r,0))}for(var s=0;n>s;s++)for(var l=0;l<a.length;l++){var u=e[s][a[l]];t=t.replace(VA(BA[l],s),i?vr(u):u)}return t}function xr(t,e,i){return f(e,function(e,n){t=t.replace("{"+n+"}",i?vr(e):e)}),t}function _r(t,e){t=b(t)?{color:t,extraCssText:e}:t||{};var i=t.color,n=t.type,e=t.extraCssText,a=t.renderMode||"html",o=t.markerId||"X";return i?"html"===a?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+vr(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+vr(i)+";"+(e||"")+'"></span>':{renderMode:a,content:"{marker"+o+"|} ",style:{color:i}}:""}function wr(t,e){return t+="","0000".substr(0,e-t.length)+t}function br(t,e,i){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="MM-dd\nyyyy");var n=lr(e),a=i?"UTC":"",o=n["get"+a+"FullYear"](),r=n["get"+a+"Month"]()+1,s=n["get"+a+"Date"](),l=n["get"+a+"Hours"](),u=n["get"+a+"Minutes"](),h=n["get"+a+"Seconds"](),c=n["get"+a+"Milliseconds"]();return t=t.replace("MM",wr(r,2)).replace("M",r).replace("yyyy",o).replace("yy",o%100).replace("dd",wr(s,2)).replace("d",s).replace("hh",wr(l,2)).replace("h",l).replace("mm",wr(u,2)).replace("m",u).replace("ss",wr(h,2)).replace("s",h).replace("SSS",wr(c,3))}function Sr(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function Mr(t){return Ri(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)}function Ir(t,e,i,n,a,o,r,s){return Ri(t,e,i,n,a,s,o,r)}function Ar(t,e,i,n,a){var o=0,r=0;null==n&&(n=1/0),null==a&&(a=1/0);var s=0;e.eachChild(function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);h=o+m,h>n||l.newline?(o=0,h=m,r+=s+i,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);c=r+v,c>a||l.newline?(o+=s+i,r=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=o,d[1]=r,"horizontal"===t?o=h+i:r=c+i)})}function Tr(t,e,i){var n=e.width,a=e.height,o=Qo(t.x,n),r=Qo(t.y,a),s=Qo(t.x2,n),l=Qo(t.y2,a);return(isNaN(o)||isNaN(parseFloat(t.x)))&&(o=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=a),i=NA(i||0),{width:Math.max(s-o-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}function Dr(t,e,i){i=NA(i||0);var n=e.width,a=e.height,o=Qo(t.left,n),r=Qo(t.top,a),s=Qo(t.right,n),l=Qo(t.bottom,a),u=Qo(t.width,n),h=Qo(t.height,a),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-o),isNaN(h)&&(h=a-l-c-r),null!=f&&(isNaN(u)&&isNaN(h)&&(f>n/a?u=.8*n:h=.8*a),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(o)&&(o=n-s-u-d),isNaN(r)&&(r=a-l-h-c),t.left||t.right){case"center":o=n/2-u/2-i[3];break;case"right":o=n-u-d}switch(t.top||t.bottom){case"middle":case"center":r=a/2-h/2-i[0];break;case"bottom":r=a-h-c}o=o||0,r=r||0,isNaN(u)&&(u=n-d-o-(s||0)),isNaN(h)&&(h=a-c-r-(l||0));var p=new yi(o+i[3],r+i[0],u,h);return p.margin=i,p}function Cr(t,e,i,n,a){var o=!a||!a.hv||a.hv[0],r=!a||!a.hv||a.hv[1],l=a&&a.boundingMode||"all";if(o||r){var u;if("raw"===l)u="group"===t.type?new yi(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect()
|
||
|
|
t[s][r]=u}for(var c=n*i;a>c;c+=i)t[s].push(new o(Math.min(a-c,i)))}function Du(t){var e=t._invertedIndicesMap;f(e,function(i,n){var a=t._dimensionInfos[n],o=a.ordinalMeta;if(o){i=e[n]=new hC(o.categories.length);for(var r=0;r<i.length;r++)i[r]=rC;for(var r=0;r<t._count;r++)i[t.get(n,r)]=r}})}function Cu(t,e,i){var n;if(null!=e){var a=t._chunkSize,o=Math.floor(i/a),r=i%a,s=t.dimensions[e],l=t._storage[s][o];if(l){n=l[r];var u=t._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(n=u.categories[n])}}return n}function Lu(t){return t}function ku(t){return t<this._count&&t>=0?this._indices[t]:-1}function Pu(t,e){var i=t._idList[e];return null==i&&(i=Cu(t,t._idDimIdx,e)),null==i&&(i=sC+e),i}function Ou(t){return _(t)||(t=[t]),t}function Eu(t,e){var i=t.dimensions,n=new pC(p(i,t.getDimensionInfo,t),t.hostModel);Au(n,t);for(var a=n._storage={},o=t._storage,r=0;r<i.length;r++){var s=i[r];o[s]&&(u(e,s)>=0?(a[s]=Nu(o[s]),n._rawExtent[s]=zu(),n._extent[s]=null):a[s]=o[s])}return n}function Nu(t){for(var e=new Array(t.length),i=0;i<t.length;i++)e[i]=Iu(t[i]);return e}function zu(){return[1/0,-1/0]}function Ru(t,e,i){function a(t,e,i){null!=nC.get(e)?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,h.set(e,!0))}Br.isInstance(e)||(e=Br.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var o=(i.dimsDef||[]).slice(),l=B(i.encodeDef),u=B(),h=B(),c=[],d=Bu(e,t,o,i.dimCount),p=0;d>p;p++){var g=o[p]=r({},S(o[p])?o[p]:{name:o[p]}),m=g.name,v=c[p]={otherDims:{}};null!=m&&null==u.get(m)&&(v.name=v.displayName=m,u.set(m,p)),null!=g.type&&(v.type=g.type),null!=g.displayName&&(v.displayName=g.displayName)}l.each(function(t,e){if(t=Rn(t).slice(),1===t.length&&t[0]<0)return void l.set(e,!1);var i=l.set(e,[]);f(t,function(t,n){b(t)&&(t=u.get(t)),null!=t&&d>t&&(i[n]=t,a(c[t],e,n))})});var y=0;f(t,function(t){var e,t,i,o;if(b(t))e=t,t={};else{e=t.name;var r=t.ordinalMeta;t.ordinalMeta=null,t=n(t),t.ordinalMeta=r,i=t.dimsDef,o=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}var u=l.get(e);if(u!==!1){var u=Rn(u);if(!u.length)for(var h=0;h<(i&&i.length||1);h++){for(;y<c.length&&null!=c[y].coordDim;)y++;y<c.length&&u.push(y++)}f(u,function(n,r){var l=c[n];if(a(s(l,t),e,r),null==l.name&&i){var u=i[r];!S(u)&&(u={name:u}),l.name=l.displayName=u.name,l.defaultTooltip=u.defaultTooltip}o&&s(l.otherDims,o)})}});var x=i.generateCoord,_=i.generateCoordCount,w=null!=_;_=x?_||1:0;for(var M=x||"value",I=0;d>I;I++){var v=c[I]=c[I]||{},A=v.coordDim;null==A&&(v.coordDim=Vu(M,h,w),v.coordDimIndex=0,(!x||0>=_)&&(v.isExtraCoord=!0),_--),null==v.name&&(v.name=Vu(v.coordDim,u)),null==v.type&&qr(e,I,v.name)&&(v.type="ordinal")}return c}function Bu(t,e,i,n){var a=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return f(e,function(t){var e=t.dimsDef;e&&(a=Math.max(a,e.length))}),a}function Vu(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}function Gu(t,e,i){i=i||{};var n,a,o,r,s=i.byIndex,l=i.stackedCoordDimension,u=!(!t||!t.get("stack"));if(f(e,function(t,i){b(t)&&(e[i]=t={name:t}),u&&!t.isExtraCoord&&(s||n||!t.ordinalMeta||(n=t),a||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(a=t))}),!a||s||n||(s=!0),a){o="__\x00ecstackresult",r="__\x00ecstackedover",n&&(n.createInvertedIndices=!0);var h=a.coordDim,c=a.type,d=0;f(e,function(t){t.coordDim===h&&d++}),e.push({name:o,coordDim:h,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,e.push({name:r,coordDim:r,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:a&&a.name,stackedByDimension:n&&n.name,isStackedByIndex:s,stackedOverDimension:r,stackResultDimension:o}}function Fu(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function Wu(t,e){return Fu(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Hu(t,e,i){i=i||{},Br.isInstance(t)||(t=Br.seriesDataToSource(t));var n,a=e.get("coordinateSystem"),o=os.get(a),r=zr(e);r&&(n=p(r.coordSysDims,function(t){var e={name:t},i=r.axisMap.get(t);if(i){var n=i.get("type");e.type=bu(n)}return e})),n||(n=o&&(o.getDimensionsInfo?o.ge
|
||
|
|
var g=10,m=h[0].coord-g,v=h[c-1].coord+g,y=v-m;if(.001>y)return"transparent";f(h,function(t){t.offset=(t.coord-m)/y}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var x=new dA(0,0,0,0,h,!0);return x[n]=m,x[n+"2"]=v,x}}}function fd(t,e,i){var n=t.get("showAllSymbol"),a="auto"===n;if(!n||a){var o=i.getAxesByScale("ordinal")[0];if(o&&(!a||!pd(o,e))){var r=e.mapDimension(o.dim),s={};return f(o.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}function pd(t,e){var i=t.getExtent(),n=Math.abs(i[1]-i[0])/t.scale.count();isNaN(n)&&(n=0);for(var a=e.count(),o=Math.max(1,Math.round(a/5)),r=0;a>r;r+=o)if(1.5*Bc.getSymbolSize(e,r)[t.isHorizontal()?1:0]>n)return!1;return!0}function gd(t,e,i,n){var a=e.getData(),o=this.dataIndex,r=a.getName(o),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:r,seriesId:e.id}),a.each(function(t){md(a.getItemGraphicEl(t),a.getItemLayout(t),e.isSelected(a.getName(t)),s,i)})}function md(t,e,i,n,a){var o=(e.startAngle+e.endAngle)/2,r=Math.cos(o),s=Math.sin(o),l=i?n:0,u=[r*l,s*l];a?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function vd(t,e){function i(){o.ignore=o.hoverIgnore,r.ignore=r.hoverIgnore}function n(){o.ignore=o.normalIgnore,r.ignore=r.normalIgnore}ES.call(this);var a=new KI({z2:2}),o=new eA,r=new XI;this.add(a),this.add(o),this.add(r),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function yd(t,e,i,n,a,o,r){function s(e,i,n){for(var a=e;i>a;a++)if(t[a].y+=n,a>e&&i>a+1&&t[a+1].y>t[a].y+t[a].height)return void l(a,n/2);l(i-1,n/2)}function l(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function u(t,e,i,n,a,o){for(var r=o>0?e?Number.MAX_VALUE:0:e?Number.MAX_VALUE:0,s=0,l=t.length;l>s;s++){var u=Math.abs(t[s].y-n),h=t[s].len,c=t[s].len2,d=a+h>u?Math.sqrt((a+h+c)*(a+h+c)-u*u):Math.abs(t[s].x-i);e&&d>=r&&(d=r-10),!e&&r>=d&&(d=r+10),t[s].x=i+d*o,r=d}}t.sort(function(t,e){return t.y-e.y});for(var h,c=0,d=t.length,f=[],p=[],g=0;d>g;g++)h=t[g].y-c,0>h&&s(g,d,-h,a),c=t[g].y+t[g].height;0>r-c&&l(d-1,c-r);for(var g=0;d>g;g++)t[g].y>=i?p.push(t[g]):f.push(t[g]);u(f,!1,e,i,n,a),u(p,!0,e,i,n,a)}function xd(t,e,i,n,a,o){for(var r=[],s=[],l=0;l<t.length;l++)_d(t[l])||(t[l].x<e?r.push(t[l]):s.push(t[l]));yd(s,e,i,n,1,a,o),yd(r,e,i,n,-1,a,o);for(var l=0;l<t.length;l++)if(!_d(t[l])){var u=t[l].linePoints;if(u){var h=u[1][0]-u[2][0];u[2][0]=t[l].x<e?t[l].x+3:t[l].x-3,u[1][1]=u[2][1]=t[l].y,u[1][0]=u[2][0]+h}}}function _d(t){return"center"===t.position}function wd(){this.group=new ES}function bd(t){return _(t)||(t=[+t,+t]),t}function Sd(t,e){t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?e.color:null,fill:"fill"===e.brushType?e.color:null}})})}function Md(t,e){ES.call(this);var i=new Bc(t,e),n=new ES;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}function Id(t,e,i){var n=t.ends;return new Ck({shape:{points:i?Td(n,t):n},z2:100})}function Ad(t,e,i,n){var a=e.getItemModel(i),o=a.getModel(Ak),r=e.getItemVisual(i,"color"),s=e.getItemVisual(i,"borderColor")||r,l=o.getItemStyle(Dk);t.useStyle(l),t.style.strokeNoScale=!0,t.style.fill=r,t.style.stroke=s,t.__simpleBox=n;var u=a.getModel(Tk).getItemStyle();So(t,u)}function Td(t,e){return p(t,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}function Dd(t,e,i){var n=t.getData(),a=n.getLayout("largePoints"),o=new Lk({shape:{points:a},__sign:1});e.add(o);var r=new Lk({shape:{points:a},__sign:-1});e.add(r),Cd(1,o,t,n),Cd(-1,r,t,n),i&&(o.incremental=!0,r.incremental=!0)}function Cd(t,e,i,n){var a=t>0?"P":"N",o=n.getVisual("borderColor"+a)||n.getVisual("color"+a),r=i.getModel(Ak).getItemStyle(Dk);e.useStyle(r),e.style.fill=null,e.style.stroke=o}function Ld(t,e,i,n,a){var o;return o=i>n?-1:n>i?1:e>0?t.get(a,e-1)<=n?1:-1:1}function kd(t,e){var i,n=t.getBaseAxis(),a="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.a
|
||
|
|
}function qp(t,e){f(e.get("geoCoord"),function(e,i){t.addGeoCoord(i,e)})}function Kp(t,e){var i={};return f(t,function(t){t.each(t.mapDimension("value"),function(e,n){var a="ec-"+t.getName(n);i[a]=i[a]||[],isNaN(e)||i[a].push(e)})}),t[0].map(t[0].mapDimension("value"),function(n,a){for(var o="ec-"+t[0].getName(a),r=0,s=1/0,l=-1/0,u=i[o].length,h=0;u>h;h++)s=Math.min(s,i[o][h]),l=Math.max(l,i[o][h]),r+=i[o][h];var c;return c="min"===e?s:"max"===e?l:"average"===e?r/u:r,0===u?0/0:c})}function $p(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=p(e,function(t){var e=[t[0].coord,t[1].coord],i={coords:e};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),o([i,t[0],t[1]])}))}function Jp(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}function Qp(t){return"_"+t+"Type"}function tg(t,e,i){var n=e.getItemVisual(i,"color"),a=e.getItemVisual(i,t),o=e.getItemVisual(i,t+"Size");if(a&&"none"!==a){_(o)||(o=[o,o]);var r=Ih(a,-o[0]/2,-o[1]/2,o[0],o[1],n);return r.name=t,r}}function eg(t){var e=new SO({name:"line"});return ig(e.shape,t),e}function ig(t,e){var i=e[0],n=e[1],a=e[2];t.x1=i[0],t.y1=i[1],t.x2=n[0],t.y2=n[1],t.percent=1,a?(t.cpx1=a[0],t.cpy1=a[1]):(t.cpx1=0/0,t.cpy1=0/0)}function ng(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var a=1,o=this.parent;o;)o.scale&&(a/=o.scale[0]),o=o.parent;var r=t.childOfName("line");if(this.__dirty||r.__dirty){var s=r.shape.percent,l=r.pointAt(0),u=r.pointAt(s),h=Y([],u,l);if(te(h,h),e){e.attr("position",l);var c=r.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[a*s,a*s])}if(i){i.attr("position",u);var c=r.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),i.attr("scale",[a*s,a*s])}if(!n.ignore){n.attr("position",u);var d,f,p,g=5*a;if("end"===n.__position)d=[h[0]*g+u[0],h[1]*g+u[1]],f=h[0]>.8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var m=s/2,c=r.tangentAt(m),v=[c[1],-c[0]],y=r.pointAt(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]),d=[y[0]+v[0]*g,y[1]+v[1]*g],f="center",p="bottom";var x=-Math.atan2(c[1],c[0]);u[0]<l[0]&&(x=Math.PI+x),n.attr("rotation",x)}else d=[-h[0]*g+l[0],-h[1]*g+l[1]],f=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||p,textAlign:n.__textAlign||f},position:d,scale:[a,a]})}}}}function ag(t,e,i){ES.call(this),this._createLine(t,e,i)}function og(t){this._ctor=t||ag,this.group=new ES}function rg(t,e,i,n){var a=e.getItemLayout(i);if(hg(a)){var o=new t._ctor(e,i,n);e.setItemGraphicEl(i,o),t.group.add(o)}}function sg(t,e,i,n,a,o){var r=e.getItemGraphicEl(n);return hg(i.getItemLayout(a))?(r?r.updateData(i,a,o):r=new t._ctor(i,a,o),i.setItemGraphicEl(a,r),void t.group.add(r)):void t.group.remove(r)}function lg(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),hoverLineStyle:e.getModel("emphasis.lineStyle").getLineStyle(),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label")}}function ug(t){return isNaN(t[0])||isNaN(t[1])}function hg(t){return!ug(t[0])&&!ug(t[1])}function cg(t,e,i){ES.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}function dg(t,e,i){ES.call(this),this._createPolyline(t,e,i)}function fg(t,e,i){cg.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}function pg(){this.group=new ES}function gg(t){return t instanceof Array||(t=[t,t]),t}function mg(t){return"_EC_"+t}function vg(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function yg(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}function xg(t,e,i){for(var n,a=t[0],o=t[1],r=t[2],s=1/0,l=i*i,u=.1,h=.1;.9>=h;h+=.1){GO[0]=HO(a[0],o[0],r[0],h),GO[1]=HO(a[1],o[1],r[1],h);var c=UO(ZO(GO,e)-l);s>c&&(s=c,n=h)}for(var d=0;32>d;d++){var f=n+u;FO[0]=HO(a[0],o[0],r[0],n),FO[1]=HO(a[1],o[1],r[1],n),WO[0]=HO(a[0],o[0],r[0],f),WO[1]=HO(a[1],o[1],r[1],f);var c=ZO(FO,e)-l;if(UO(c)<.01)break;var
|
||
|
|
}function Qv(t){return"x"===t.dim?0:1}function ty(t){return t.isHorizontal()?0:1}function ey(t,e){var i=t.getRect();return[i[TN[e]],i[TN[e]]+i[DN[e]]]}function iy(t,e,i){var n=new aA({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Ro(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function ny(t,e,i){if(t.count())for(var n,a=e.coordinateSystem,o=e.getLayerSeries(),r=t.mapDimension("single"),s=t.mapDimension("value"),l=p(o,function(e){return p(e.indices,function(e){var i=a.dataToPoint(t.get(r,e));return i[1]=t.get(s,e),i})}),u=ay(l),h=u.y0,c=i/u.max,d=o.length,f=o[0].indices.length,g=0;f>g;++g){n=h[g]*c,t.setItemLayout(o[0].indices[g],{layerIndex:0,x:l[0][g][0],y0:n,y:l[0][g][1]*c});for(var m=1;d>m;++m)n+=l[m-1][g][1]*c,t.setItemLayout(o[m].indices[g],{layerIndex:m,x:l[m][g][0],y0:n,y:l[m][g][1]*c})}}function ay(t){for(var e,i=t.length,n=t[0].length,a=[],o=[],r=0,s={},l=0;n>l;++l){for(var u=0,e=0;i>u;++u)e+=t[u][l][1];e>r&&(r=e),a.push(e)}for(var h=0;n>h;++h)o[h]=(r-a[h])/2;r=0;for(var c=0;n>c;++c){var d=a[c]+o[c];d>r&&(r=d)}return s.y0=o,s.max=r,s}function oy(t,e,i,n){var a=t.getItemLayout(e),o=i.get("symbolRepeat"),r=i.get("symbolClip"),s=i.get("symbolPosition")||"start",l=i.get("symbolRotate"),u=(l||0)*Math.PI/180||0,h=i.get("symbolPatternSize")||2,c=i.isAnimationEnabled(),d={dataIndex:e,layout:a,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:r,symbolRepeat:o,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:u,animationModel:c?i:null,hoverAnimation:c&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};ry(i,o,a,n,d),ly(t,e,a,o,r,d.boundingLength,d.pxSign,h,n,d),uy(i,d.symbolScale,u,n,d);var f=d.symbolSize,p=i.get("symbolOffset");return _(p)&&(p=[Qo(p[0],f[0]),Qo(p[1],f[1])]),hy(i,f,a,o,r,p,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,n,d),d}function ry(t,e,i,n,a){var o,r=n.valueDim,s=t.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),h=1-+(i[r.wh]<=0);if(_(s)){var c=[sy(l,s[0])-u,sy(l,s[1])-u];c[1]<c[0]&&c.reverse(),o=c[h]}else o=null!=s?sy(l,s)-u:e?n.coordSysExtent[r.index][h]-u:i[r.wh];a.boundingLength=o,e&&(a.repeatCutLength=i[r.wh]),a.pxSign=o>0?1:0>o?-1:0}function sy(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function ly(t,e,i,n,a,o,r,s,l,u){var h=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),f=t.getItemVisual(e,"symbolSize");_(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]),f[c.index]=Qo(f[c.index],d),f[h.index]=Qo(f[h.index],n?d:Math.abs(o)),u.symbolSize=f;var p=u.symbolScale=[f[0]/s,f[1]/s];p[h.index]*=(l.isHorizontal?-1:1)*r}function uy(t,e,i,n,a){var o=t.get(zN)||0;o&&(BN.attr({scale:e.slice(),rotation:i}),BN.updateTransform(),o/=BN.getLineScale(),o*=e[n.valueDim.index]),a.valueLineWidth=o}function hy(t,e,i,n,a,o,s,l,u,h,c,d){var f=c.categoryDim,p=c.valueDim,g=d.pxSign,m=Math.max(e[p.index]+l,0),v=m;if(n){var y=Math.abs(u),x=D(t.get("symbolMargin"),"15%")+"",_=!1;x.lastIndexOf("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1)),x=Qo(x,e[p.index]);var w=Math.max(m+2*x,0),b=_?0:2*x,S=pr(n),M=S?n:Ty((y+b)/w),I=y-M*m;x=I/2/(_?M:M-1),w=m+2*x,b=_?0:2*x,S||"fixed"===n||(M=h?Ty((Math.abs(h)+b)/w):0),v=M*w-b,d.repeatTimes=M,d.symbolMargin=x}var A=g*(v/2),T=d.pathPosition=[];T[f.index]=i[f.wh]/2,T[p.index]="start"===s?A:"end"===s?u-A:u/2,o&&(T[0]+=o[0],T[1]+=o[1]);var C=d.bundlePosition=[];C[f.index]=i[f.xy],C[p.index]=i[p.xy];var L=d.barRectShape=r({},i);L[p.wh]=g*Math.max(Math.abs(i[p.wh]),Math.abs(T[p.index]+A)),L[f.wh]=i[f.wh];var k=d.clipShape={};k[f.xy]=-i[f.xy],k[f.wh]=c.ecSize[f.wh],k[p.xy]=0,k[p.wh]=i[p.wh]}function cy(t){var e=t.symbolPatternSize,i=Ih(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function dy(t,e,i,n){function a(t){var e=h.slice(),n=i.pxSign,a=t;return("start"===i.symbolRepeatDirection?n>0:0>n)&&(a=d-1-t),e[c.index]=p*(a-d/2+.5)+h[c.index],{position:e,scale:i.symbolScale.slice(),rotation:i.rotation}}function o(){My(t,function(t){
|
||
|
|
}function y_(t,e){var i=__(t);f(i,function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),b_(i)}function x_(t){return t.type+"\x00_"+t.id}function __(t){var e=t.getZr();return e[vR]||(e[vR]={})}function w_(t,e){var i=new xf(t.getZr());return f(["pan","zoom","scrollMove"],function(t){i.on(t,function(i){var n=[];f(e.dataZoomInfos,function(a){if(i.isAvailableBehavior(a.dataZoomModel.option)){var o=(a.getRange||{})[t],r=o&&o(e.controller,i);!a.dataZoomModel.get("disabled",!0)&&r&&n.push({dataZoomId:a.dataZoomId,start:r[0],end:r[1]})}}),n.length&&e.dispatchAction(n)})}),i}function b_(t){f(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function S_(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function M_(t){var e,i="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return f(t,function(t){var o=t.dataZoomModel,r=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[i+r]>n[i+e]&&(e=r),a&=o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}function I_(t){return function(e,i,n,a){var o=this._range,r=o.slice(),s=e.axisModels[0];if(s){var l=t(r,s,e,i,n,a);return mE(l,r,[0,100],"all"),this._range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0}}}function A_(t){var e={};f(t,function(t){e[t]=1}),t.length=0,f(e,function(e,i){t.push(i)})}function T_(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function D_(t,e,i){function a(){var t=function(){};t.prototype.__hidden=t.prototype;var e=new t;return e}var o={};return MR(e,function(e){var r=o[e]=a();MR(t[e],function(t,a){if(bP.isValidType(a)){var o={type:a,visual:t};i&&i(o,e),r[a]=new bP(o),"opacity"===a&&(o=n(o),o.type="colorAlpha",r.__hidden.__alphaForOpacity=new bP(o))}})}),o}function C_(t,e,i){var a;f(i,function(t){e.hasOwnProperty(t)&&T_(e[t])&&(a=!0)}),a&&f(i,function(i){e.hasOwnProperty(i)&&T_(e[i])?t[i]=n(e[i]):delete t[i]})}function L_(t,e,i,n,a,o){function r(t){return i.getItemVisual(h,t)}function s(t,e){i.setItemVisual(h,t,e)}function l(t,l){h=null==o?t:l;var c=i.getRawDataItem(h);if(!c||c.visualMap!==!1)for(var d=n.call(a,t),f=e[d],p=u[d],g=0,m=p.length;m>g;g++){var v=p[g];f[v]&&f[v].applyVisual(t,r,s)}}var u={};f(t,function(t){var i=bP.prepareVisualTypes(e[t]);u[t]=i});var h;null==o?i.each(l):i.each([o],l)}function k_(t,e,i,n){function a(t,a){function r(t){return a.getItemVisual(l,t)}function s(t,e){a.setItemVisual(l,t,e)}null!=n&&(n=a.getDimension(n));for(var l;null!=(l=t.next());){var u=a.getRawDataItem(l);if(!u||u.visualMap!==!1)for(var h=null!=n?a.get(n,l,!0):l,c=i(h),d=e[c],f=o[c],p=0,g=f.length;g>p;p++){var m=f[p];d[m]&&d[m].applyVisual(h,r,s)}}}var o={};return f(t,function(t){var i=bP.prepareVisualTypes(e[t]);o[t]=i}),{progress:a}}function P_(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var a=n.range,o=e[t];return O_(o,a)}},rect:function(n,a,o){if(n){var r=o.range,s=[n[e[t]],n[e[t]]+n[i[t]]];return s[1]<s[0]&&s.reverse(),O_(s[0],r)||O_(s[1],r)||O_(r[0],s)||O_(r[1],s)}}}}function O_(t,e){return e[0]<=t&&t<=e[1]}function E_(t,e,i,n,a){for(var o=0,r=a[a.length-1];o<a.length;o++){var s=a[o];if(N_(t,e,i,n,s[0],s[1],r[0],r[1]))return!0;r=s}}function N_(t,e,i,n,a,o,r,s){var l=R_(i-t,a-r,n-e,o-s);if(z_(l))return!1;var u=R_(a-t,a-r,o-e,o-s)/l;if(0>u||u>1)return!1;var h=R_(i-t,a-t,n-e,o-e)/l;return 0>h||h>1?!1:!0}function z_(t){return 1e-6>=t&&t>=-1e-6}function R_(t,e,i,n){return t*n-e*i}function B_(t,e,i){var n=this._targetInfoList=[],a={},o=G_(e,t);AR(PR,function(t,e){(!i||!i.include||TR(i.include,e)>=0)&&t(o,n,a)})}function V_(t){return t[0]>t[1]&&t.reverse(),t}function G_(t,e){return jn(t,e,{includeMainTypes:LR})}function F_(t,e,i,n){var a=i.getAxis(["x","y"][t]),o=V_(p([0,1],function(t){return e?a.coordToData(a.toLocalCoord(n[t])):a.toGlobalCoord(a.dataToCoord(n[t]))})),r=[];return r[t]=o,r[1-t]=[0/0,0/0],{values:o,xyMinMax:r}}function W_(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function H_(t,e){var i=Z_(t),n=Z_(e),a=[i[0]/n[0],i[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[
|
||
|
|
};SS.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var a=this._getter(this._target,n);if(null==a)continue;0!==t&&i[n].push({time:0,value:ci(a)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;e>i;i++)t[i].call(this)},start:function(t,e){var i,n=this,a=0,o=function(){a--,a||n._doneCallback()};for(var r in this._tracks)if(this._tracks.hasOwnProperty(r)){var s=pi(this,t,o,this._tracks[r],r,e);s&&(this._clipList.push(s),a++,this.animation&&this.animation.addClip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(t,e){l(t,e);for(var i=0;i<n._onframeList.length;i++)n._onframeList[i](t,e)}}return a||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,n=0;n<e.length;n++){var a=e[n];t&&a.onframe(this._target,1),i&&i.removeClip(a)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var MS=1;"undefined"!=typeof window&&(MS=Math.max(window.devicePixelRatio||1,1));var IS=0,AS=MS,TS=function(){};1===IS?TS=function(){for(var t in arguments)throw new Error(arguments[t])}:IS>1&&(TS=function(){for(var t in arguments)console.log(arguments[t])});var DS=TS,CS=function(){this.animators=[]};CS.prototype={constructor:CS,animate:function(t,e){var i,n=!1,a=this,o=this.__zr;if(t){var r=t.split("."),s=a;n="shape"===r[0];for(var l=0,h=r.length;h>l;l++)s&&(s=s[r[l]]);s&&(i=s)}else i=a;if(!i)return void DS('Property "'+t+'" is not existed in element '+a.id);var c=a.animators,d=new SS(i,e);return d.during(function(){a.dirty(n)}).done(function(){c.splice(u(c,d),1)}),c.push(d),o&&o.animation.addAnimator(d),d},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;i>n;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,a,o){gi(this,t,e,i,n,a,o)},animateFrom:function(t,e,i,n,a,o){gi(this,t,e,i,n,a,o,!0)}};var LS=function(t){oS.call(this,t),Xb.call(this,t),CS.call(this,t),this.id=t.id||bb()};LS.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(S(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},c(LS,CS),c(LS,oS),c(LS,Xb);var kS=oe,PS=Math.min,OS=Math.max;yi.prototype={constructor:yi,union:function(t){var e=PS(t.x,this.x),i=PS(t.y,this.y);this.width=OS(t.x+t.width,this.x+thi
|
||
|
|
return function(e,i,n){for(var a={},o=0;o<t.length;o++){var r=t[o][1];if(!(i&&u(i,r)>=0||n&&u(n,r)<0)){var s=e.getShallow(r);null!=s&&(a[t[o][0]]=s)}}return a}},GM=VM([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),FM={getLineStyle:function(t){var e=GM(this,t),i=this.getLineDash(e.lineWidth);return i&&(e.lineDash=i),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"===e||null==e?null:"dashed"===e?[n,n]:[i,i]}},WM=VM([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),HM={getAreaStyle:function(t,e){return WM(this,t,e)}},ZM=Math.pow,UM=Math.sqrt,XM=1e-8,YM=1e-4,jM=UM(3),qM=1/3,KM=F(),$M=F(),JM=F(),QM=Math.min,tI=Math.max,eI=Math.sin,iI=Math.cos,nI=2*Math.PI,aI=F(),oI=F(),rI=F(),sI=[],lI=[],uI={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},hI=[],cI=[],dI=[],fI=[],pI=Math.min,gI=Math.max,mI=Math.cos,vI=Math.sin,yI=Math.sqrt,xI=Math.abs,_I="undefined"!=typeof Float32Array,wI=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};wI.prototype={constructor:wI,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=xI(1/AS/t)||0,this._uy=xI(1/AS/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(uI.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=xI(t-this._xi)>this._ux||xI(e-this._yi)>this._uy||this._len<5;return this.addData(uI.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,a,o){return this.addData(uI.C,t,e,i,n,a,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,a,o):this._ctx.bezierCurveTo(t,e,i,n,a,o)),this._xi=a,this._yi=o,this},quadraticCurveTo:function(t,e,i,n){return this.addData(uI.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,a,o){return this.addData(uI.A,t,e,i,i,n,a-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,o),this._xi=mI(a)*i+t,this._yi=vI(a)*i+e,this},arcTo:function(t,e,i,n,a){return this._ctx&&this._ctx.arcTo(t,e,i,n,a),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(uI.R,t,e,i,n),this},closePath:function(){this.addData(uI.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,this._dashIdx=0;for(var e=0,i=0;i<t.length;i++)e+=t[i];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length===e||!_I||(this.data=new Float32Array(e));for(var i=0;e>i;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,a=0;e>a;a++)i+=t[a].len();_I&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var a=0;e>a;a++)for(var o=t[a].data,r=0;r<o.length;r++)this.data[n++]=o[r];this._len=n},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var i,n,a=this._dashSum,o=this._dashOffset,r=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,h=t-l,c=e-u,d=yI(h*h+c*c),f=l,p=u,g=
|
||
|
|
},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=gT(e.timelineOptions,pT),this._mediaList=gT(e.mediaList,pT),this._mediaDefault=pT(e.mediaDefault),this._currentMediaIndices=[],pT(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=pT(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),i=this._mediaList,n=this._mediaDefault,a=[],o=[];if(!i.length&&!n)return o;for(var r=0,s=i.length;s>r;r++)ls(i[r].query,t,e)&&a.push(r);return!a.length&&n&&(a=[-1]),a.length&&!hs(a,this._currentMediaIndices)&&(o=gT(a,function(t){return pT(-1===t?n.option:i[t].option)})),this._currentMediaIndices=a,o}};var yT=f,xT=S,_T=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],wT=function(t,e){yT(ys(t.series),function(t){xT(t)&&vs(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),yT(i,function(e){yT(ys(t[e]),function(t){t&&(gs(t,"axisLabel"),gs(t.axisPointer,"label"))})}),yT(ys(t.parallel),function(t){var e=t&&t.parallelAxisDefault;gs(e,"axisLabel"),gs(e&&e.axisPointer,"label")}),yT(ys(t.calendar),function(t){fs(t,"itemStyle"),gs(t,"dayLabel"),gs(t,"monthLabel"),gs(t,"yearLabel")}),yT(ys(t.radar),function(t){gs(t,"name")}),yT(ys(t.geo),function(t){xT(t)&&(ms(t),yT(ys(t.regions),function(t){ms(t)}))}),yT(ys(t.timeline),function(t){ms(t),fs(t,"label"),fs(t,"itemStyle"),fs(t,"controlStyle",!0);var e=t.data;_(e)&&f(e,function(t){S(t)&&(fs(t,"label"),fs(t,"itemStyle"))})}),yT(ys(t.toolbox),function(t){fs(t,"iconStyle"),yT(t.feature,function(t){fs(t,"iconStyle")})}),gs(xs(t.axisPointer),"label"),gs(xs(t.tooltip).axisPointer,"label")},bT=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],ST=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],MT=function(t,e){wT(t,e),t.series=Rn(t.series),f(t.series,function(t){if(S(t)){var e=t.type;if(("pie"===e||"gauge"===e)&&null!=t.clockWise&&(t.clockwise=t.clockWise),"gauge"===e){var i=_s(t,"pointer.color");null!=i&&ws(t,"itemStyle.normal.color",i)}bs(t)}}),t.dataRange&&(t.visualMap=t.dataRange),f(ST,function(e){var i=t[e];i&&(_(i)||(i=[i]),f(i,function(t){bs(t)}))})},IT=function(t){var e=B();t.eachSeries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),a=t.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;n.length&&a.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(o)}}),e.each(Ss)},AT=Ms.prototype;AT.pure=!1,AT.persistent=!0,AT.getSource=function(){return this._source};var TT={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:Ts},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],i=this._data,n=0;n<i.length;n++){var a=i[n];e.push(a?a[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:Is,getItem:As,appendData:Ts},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],i=this._source.dimensionsDefine,n=0;n<i.length;n++){var a=this._data[i[n].name];e.push(a?a[t]:null)}return e},appendData:function(t){var e=this._data;f(t,function(t,i){for(var n=e[i]||(e[i]=[]),a=0;a<(t||[]).length;a++)n.push(t[a])})}},original:{count:Is
|
||
|
|
var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[zD]=!0,i&&Cl(this),GD.update.call(this),this[zD]=!1,Ol.call(this,n),El.call(this,n)}},VD.showLoading=function(t,e){if(SD(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),qD[t]){var i=qD[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},VD.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},VD.makeActionFromEvent=function(t){var e=r({},t);return e.type=HD[t.type],e},VD.dispatchAction=function(t,e){if(SD(e)||(e={silent:!!e}),WD[t.type]&&this._model){if(this[zD])return void this._pendingActions.push(t);Pl.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&Mb.browser.weChat&&this._throttledZrFlush(),Ol.call(this,e.silent),El.call(this,e.silent)}},VD.appendData=function(t){var e=t.seriesIndex,i=this.getModel(),n=i.getSeriesByIndex(e);n.appendData(t),this._scheduler.unfinished=!0},VD.on=Il("on"),VD.off=Il("off"),VD.one=Il("one");var FD=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];VD._initEvents=function(){wD(FD,function(t){var e=function(e){var i,n=this.getModel(),a=e.target,o="globalout"===t;if(o)i={};else if(a&&null!=a.dataIndex){var s=a.dataModel||n.getSeriesByIndex(a.seriesIndex);i=s&&s.getDataParams(a.dataIndex,a.dataType,a)||{}}else a&&a.eventData&&(i=r({},a.eventData));if(i){var l=i.componentType,u=i.componentIndex;("markLine"===l||"markPoint"===l||"markArea"===l)&&(l="series",u=i.seriesIndex);var h=l&&null!=u&&n.getComponent(l,u),c=h&&this["series"===h.mainType?"_chartsMap":"_componentsMap"][h.__viewId];i.event=e,i.type=t,this._ecEventProcessor.eventInfo={targetEl:a,packedEvent:i,model:h,view:c},this.trigger(t,i)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),wD(HD,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},VD.isDisposed=function(){return this._disposed},VD.clear=function(){this.setOption({series:[]},!0)},VD.dispose=function(){if(!this._disposed){this._disposed=!0,Kn(this.getDom(),tC,"");var t=this._api,e=this._model;wD(this._componentsViews,function(i){i.dispose(e,t)}),wD(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete KD[this.id]}},c(Tl,Xb),Xl.prototype={constructor:Xl,normalizeQuery:function(t){var e={},i={},n={};if(b(t)){var a=MD(t);e.mainType=a.main||null,e.subType=a.sub||null}else{var o=["Index","Name","Id"],r={name:1,dataIndex:1,dataType:1};f(t,function(t,a){for(var s=!1,l=0;l<o.length;l++){var u=o[l],h=a.lastIndexOf(u);if(h>0&&h===a.length-u.length){var c=a.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}r.hasOwnProperty(a)&&(i[a]=t,s=!0),s||(n[a]=t)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},filter:function(t,e){function i(t,e,i,n){return null==t[i]||e[n||i]===t[i]}var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,o=n.packedEvent,r=n.model,s=n.view;if(!r||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return i(l,r,"mainType")&&i(l,r,"subType")&&i(l,r,"index","componentIndex")&&i(l,r,"name")&&i(l,r,"id")&&i(u,o,"name")&&i(u,o,"dataIndex")&&i(u,o,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,a,o))},afterTrigger:function(){this.eventInfo=null}};var WD={},HD={},ZD=[],UD=[],XD=[],YD=[],jD={},qD={},KD={},$D={},JD=new Date-0,QD=new Date-0,tC="_echarts_instance_",eC=Kl;lu(kD,XT),eu(MT),iu(CD,IT),hu("default",KT),au({type:"highlight",event:"highlight",update:"highlight"},G),au({type:"downplay",event:"downplay",update:"downplay"},G),tu("light",aD),tu("dark",lD);var iC={};xu.prototype={constructor:xu,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t,e=this._old,i=this._new,n={},a={},o=[],r=[];for(_u(e,n,o,"_oldKeyGetter",this),_u(i,a,r,"_newKeyGetter",this),t=0;t<e.length;t++){var s=o[t],l=a[s];if(null!=l){var u=l.length;u?(1===u&&(a[s]=null),l=l.unshift()):a[s]=null,this._update&&this._update(l,t)}else this._remove&&this._remove(t)}for(var t=0;t<r.length;
|
||
|
|
});var dL=function(t){this._axes={},this._dimList=[],this.name=t||""};dL.prototype={constructor:dL,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return p(this._dimList,Kh,this)},getAxesByScale:function(t){return t=t.toLowerCase(),m(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},a=0;a<i.length;a++){var o=i[a],r=this._axes[o];n[o]=r[e](t[o])}return n}},$h.prototype={constructor:$h,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),i=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,i){var n=this.getAxis("x"),a=this.getAxis("y");return i=i||[],i[0]=n.toGlobalCoord(n.dataToCoord(t[0])),i[1]=a.toGlobalCoord(a.dataToCoord(t[1])),i},clampData:function(t,e){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,a=i.getExtent(),o=n.getExtent(),r=i.parse(t[0]),s=n.parse(t[1]);return e=e||[],e[0]=Math.min(Math.max(Math.min(a[0],a[1]),r),Math.max(a[0],a[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},pointToData:function(t,e){var i=this.getAxis("x"),n=this.getAxis("y");return e=e||[],e[0]=i.coordToData(i.toLocalCoord(t[0])),e[1]=n.coordToData(n.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")}},h($h,dL);var fL=function(t,e,i,n,a){lL.call(this,t,e,i),this.type=n||"value",this.position=a||"bottom"};fL.prototype={constructor:fL,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[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},h(fL,lL);var pL={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)"]}}},gL={};gL.categoryAxis=a({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},pL),gL.valueAxis=a({boundaryGap:[0,0],splitNumber:5},pL),gL.timeAxis=s({scale:!0,min:"dataMin",max:"dataMax"},gL.valueAxis),gL.logAxis=s({scale:!0,logBase:10},gL.valueAxis);var mL=["value","category","time","log"],vL=function(t,e,i,n){f(mL,function(r){e.extend({type:t+"Axis."+r,mergeDefaultAndTheme:function(e,n){var o=this.layoutMode,s=o?Pr(e):{},l=n.getTheme();a(e,l.get(r+"Axis")),a(e,this.getDefaultOption()),e.type=i(t,e),o&&kr(e,s,o)},optionUpdated:function(){var t=this.option;"category"===t.type&&(this.__ordinalMeta=Yu.createByAxisModel(this))},getCategories:function(t){var e=this.option;return"category"===e.type?t?e.data:this.__ordinalMeta.categories:void 0},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:o([{},gL[r+"Axis"],n],!0)})}),jA.registerSubTypeDefaulter(t+"Axis",x(i,t))},yL=jA.extend({type:"cartesian2d
|
||
|
|
if(l>1){var u;"string"==typeof i?u=ok[i]:"function"==typeof i&&(u=i),u&&t.setData(e.downSample(e.mapDimension(o.dim),1/l,u,rk))}}}}};lu(nk("line","circle","line")),su(ak("line")),iu(ND.PROCESSOR.STATISTIC,sk("line"));var lk=function(t,e,i){e=_(e)&&{coordDimensions:e}||r({},e);var n=t.getSource(),a=vC(n,e),o=new pC(a,t);return o.initData(n,i),o},uk={updateSelectedMap:function(t){this._targetList=_(t)?t.slice():[],this._selectTargetMap=g(t||[],function(t,e){return t.set(e.name,e),t},B())},select:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t),n=this.get("selectedMode");"single"===n&&this._selectTargetMap.each(function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);i&&(i.selected=!1)},toggleSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return null!=i?(this[i.selected?"unSelect":"select"](t,e),i.selected):void 0},isSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return i&&i.selected}},hk=fu({type:"series.pie",init:function(t){hk.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){hk.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(){return lk(this,["value"])},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),i=[],n=0,a=t.count();a>n;n++)i.push({name:t.getName(n),value:t.get(e,n),selected:Ps(t,n,"selected")});return i},getDataParams:function(t){var e=this.getData(),i=hk.superCall(this,"getDataParams",t),n=[];return e.each(e.mapDimension("value"),function(t){n.push(t)}),i.percent=or(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){Bn(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.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,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,label:{rotate:!1,show:!0,position:"outer"},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationEasing:"cubicOut"}});c(hk,uk);var ck=vd.prototype;ck.updateData=function(t,e,i){function n(){o.stopAnimation(!0),o.animateTo({shape:{r:h.r+l.get("hoverOffset")}},300,"elasticOut")}function a(){o.stopAnimation(!0),o.animateTo({shape:{r:h.r}},300,"elasticOut")}var o=this.childAt(0),l=t.hostModel,u=t.getItemModel(e),h=t.getItemLayout(e),c=r({},h);if(c.label=null,i){o.setShape(c);var d=l.getShallow("animationType");"scale"===d?(o.shape.r=h.r0,Ro(o,{shape:{r:h.r}},l,e)):(o.shape.endAngle=h.startAngle,zo(o,{shape:{endAngle:h.endAngle}},l,e))}else zo(o,{shape:c},l,e);var f=t.getItemVisual(e,"color");o.useStyle(s({lineJoin:"bevel",fill:f},u.getModel("itemStyle").getItemStyle())),o.hoverStyle=u.getModel("emphasis.itemStyle").getItemStyle();var p=u.getShallow("cursor");p&&o.attr("cursor",p),md(this,t.getItemLayout(e),l.isSelected(null,e),l.get("selectedOffset"),l.get("animation")),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),u.get("hoverAnimation")&&l.isAnimationEnabled()&&o.on("mouseover",n).on("mouseout",a).on("emphasis",n).on("normal",a),this._updateLabel(t,e),So(this)},ck._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),a=t.hostModel,o=t.getItemModel(e),r=t.getItemLayout(e),s=r.label,l=t.getItemVisual(e,"color");zo(i,{shape:{points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]}},a,e),zo(n,{style:{x:s.x,y:s.y}},a,e),n.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var u=o.getModel("label"),h=o.getModel("emphasis.label"),c=o.getModel("labelLine"),d=o.getModel("emphasis.labelLine"),l=t.getItemVisual(e,"color");Io(n.style,n.hoverStyle={},u,h,{labelFetch
|
||
|
|
}),t.polar=i}f(t.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})};lu(fk("radar")),lu(nk("radar","circle")),su(Wk),iu(yk("radar")),eu(Hk),NT.extend({type:"series.heatmap",getInitialData:function(){return Hu(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=os.get(this.get("coordinateSystem"));return t&&t.dimensions?"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]:void 0},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});var Zk=256;zd.prototype={update:function(t,e,i,n,a,o){var r=this._getBrush(),s=this._getGradient(t,a,"inRange"),l=this._getGradient(t,a,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),d=t.length;h.width=e,h.height=i;for(var f=0;d>f;++f){var p=t[f],g=p[0],m=p[1],v=p[2],y=n(v);c.globalAlpha=y,c.drawImage(r,g-u,m-u)}if(!h.width||!h.height)return h;for(var x=c.getImageData(0,0,h.width,h.height),_=x.data,w=0,b=_.length,S=this.minOpacity,M=this.maxOpacity,I=M-S;b>w;){var y=_[w+3]/256,A=4*Math.floor(y*(Zk-1));if(y>0){var T=o(y)?s:l;y>0&&(y=y*I+S),_[w++]=T[A],_[w++]=T[A+1],_[w++]=T[A+2],_[w++]=T[A+3]*y*256}else w+=4}return c.putImageData(x,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=Nb()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,a=n[i]||(n[i]=new Uint8ClampedArray(1024)),o=[0,0,0,0],r=0,s=0;256>s;s++)e[i](s/255,!0,o),a[r++]=o[0],a[r++]=o[1],a[r++]=o[2],a[r++]=o[3];return a}},pu({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(i){i===t&&(n=e)})}),this.group.removeAll(),this._incrementalDisplayable=null;var a=t.coordinateSystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):Vd(a)&&this._renderOnGeo(a,t,n,i)},incrementalPrepareRender:function(){this.group.removeAll()},incrementalRender:function(t,e,i,n){var a=e.coordinateSystem;a&&this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,i,n,a){var o,s,l=t.coordinateSystem;if("cartesian2d"===l.type){var u=l.getAxis("x"),h=l.getAxis("y");o=u.getBandWidth(),s=h.getBandWidth()}for(var c=this.group,d=t.getData(),f="itemStyle",p="emphasis.itemStyle",g="label",m="emphasis.label",v=t.getModel(f).getItemStyle(["color"]),y=t.getModel(p).getItemStyle(),x=t.getModel(g),_=t.getModel(m),w=l.type,b="cartesian2d"===w?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],S=i;n>S;S++){var M;if("cartesian2d"===w){if(isNaN(d.get(b[2],S)))continue;var I=l.dataToPoint([d.get(b[0],S),d.get(b[1],S)]);M=new aA({shape:{x:I[0]-o/2,y:I[1]-s/2,width:o,height:s},style:{fill:d.getItemVisual(S,"color"),opacity:d.getItemVisual(S,"opacity")}})}else{if(isNaN(d.get(b[1],S)))continue;M=new aA({z2:1,shape:l.dataToRect([d.get(b[0],S)]).contentShape,style:{fill:d.getItemVisual(S,"color"),opacity:d.getItemVisual(S,"opacity")}})}var A=d.getItemModel(S);d.hasItemOption&&(v=A.getModel(f).getItemStyle(["color"]),y=A.getModel(p).getItemStyle(),x=A.getModel(g),_=A.getModel(m));var T=t.getRawValue(S),D="-";T&&null!=T[2]&&(D=T[2]),Io(v,y,x,_,{labelFetcher:t,labelDataIndex:S,defaultText:D,isRectText:!0}),M.setStyle(v),So(M,d.hasItemOption?y:r({},y)),M.incremental=a,a&&(M.useHoverLayer=!0),c.add(M),d.setItemGraphicEl(S,M)}},_renderOnGeo:function(t,e,i,n){var a=i.targetVisuals.inRange,o=i.targetVisuals.outOfRange,r=e.getData(),s=this._hmLayer||this._hmLayer||new zd;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l
|
||
|
|
})},GP.onHighlight=function(){this.updateData(!1,this.node,"highlight")},GP.onDownplay=function(){this.updateData(!1,this.node,"downplay")},GP._updateLabel=function(t,e,i){function n(t){var e=r.get(t);return null==e?o.get(t):e}var a=this.node.getModel(),o=a.getModel("label"),r="normal"===i||"emphasis"===i?o:a.getModel(i+".label"),s=a.getModel("emphasis.label"),l=D(t.getFormattedLabel(this.node.dataIndex,"normal",null,null,"label"),this.node.name);n("show")===!1&&(l="");var u=this.node.getLayout(),h=r.get("minAngle");null==h&&(h=o.get("minAngle")),h=h/180*Math.PI;var c=u.endAngle-u.startAngle;null!=h&&Math.abs(c)<h&&(l="");var d=this.childAt(1);Io(d.style,d.hoverStyle||{},o,s,{defaultText:r.getShallow("show")?l:null,autoColor:e,useInsideStyle:!0});var f,p=(u.startAngle+u.endAngle)/2,g=Math.cos(p),m=Math.sin(p),v=n("position"),y=n("distance")||0,x=n("align");"outside"===v?(f=u.r+y,x=p>Math.PI/2?"right":"left"):x&&"center"!==x?"left"===x?(f=u.r0+y,p>Math.PI/2&&(x="right")):"right"===x&&(f=u.r-y,p>Math.PI/2&&(x="left")):(f=(u.r+u.r0)/2,x="center"),d.attr("style",{text:l,textAlign:x,textVerticalAlign:n("verticalAlign")||"middle",opacity:n("opacity")});var _=f*g+u.cx,w=f*m+u.cy;d.attr("position",[_,w]);var b=n("rotate"),S=0;"radial"===b?(S=-p,S<-Math.PI/2&&(S+=Math.PI)):"tangential"===b?(S=Math.PI/2-p,S>Math.PI/2?S-=Math.PI:S<-Math.PI/2&&(S+=Math.PI)):"number"==typeof b&&(S=b*Math.PI/180),d.attr("rotation",S)},GP._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var a=this,o=function(){a.onEmphasis(n)},r=function(){a.onNormal()},s=function(){a.onDownplay()},l=function(){a.onHighlight()};i.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",r).on("emphasis",o).on("normal",r).on("downplay",s).on("highlight",l)},h(Cp,ES);var FP="sunburstRootToNode",WP=(Us.extend({type:"sunburst",init:function(){},render:function(t,e,i,n){function a(t,e){function i(t){return t.getId()}function n(i,n){var a=null==i?null:t[i],r=null==n?null:e[n];o(a,r)}(0!==t.length||0!==e.length)&&new xu(e,t,i,i).add(n).update(n).remove(x(n,null)).execute()}function o(i,n){if(f||!i||i.getValue()||(i=null),i!==h&&n!==h)if(n&&n.piece)i?(n.piece.updateData(!1,i,"normal",t,e),u.setItemGraphicEl(i.dataIndex,n.piece)):r(n);else if(i){var a=new Cp(i,t,e);d.add(a),u.setItemGraphicEl(i.dataIndex,a)}}function r(t){t&&t.piece&&(d.remove(t.piece),t.piece=null)}function s(i,n){if(n.depth>0){l.virtualPiece?l.virtualPiece.updateData(!1,i,"normal",t,e):(l.virtualPiece=new Cp(i,t,e),d.add(l.virtualPiece)),n.piece._onclickEvent&&n.piece.off("click",n.piece._onclickEvent);var a=function(){l._rootToNode(n.parentNode)};n.piece._onclickEvent=a,l.virtualPiece.on("click",a)}else l.virtualPiece&&(d.remove(l.virtualPiece),l.virtualPiece=null)}var l=this;this.seriesModel=t,this.api=i,this.ecModel=e;var u=t.getData(),h=u.tree.root,c=t.getViewRoot(),d=this.group,f=t.get("renderLabelForZeroData"),p=[];c.eachNode(function(t){p.push(t)});var g=this._oldChildren||[];if(a(p,g),s(h,c),n&&n.highlight&&n.highlight.piece){var m=t.getShallow("highlightPolicy");n.highlight.piece.onEmphasis(m)}else if(n&&n.unhighlight){var v=this.virtualPiece;!v&&h.children.length&&(v=h.children[0].piece),v&&v.onNormal()}this._initEvents(),this._oldChildren=p},dispose:function(){},_initEvents:function(){var t=this,e=function(e){var i=!1,n=t.seriesModel.getViewRoot();n.eachNode(function(n){if(!i&&n.piece&&n.piece.childAt(0)===e.target){var a=n.getModel().get("nodeClick");if("rootToNode"===a)t._rootToNode(n);else if("link"===a){var o=n.getModel(),r=o.get("link");if(r){var s=o.get("target",!0)||"_blank";window.open(r,s)}}i=!0}})};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:FP,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var i=e.getData(),n=i.getItemLayout(0);if(n){var a=t[0]-n.cx,o=t[1]-n.cy,r=Math.sqrt(a*a+o*o);return r<=n.r&&r>=n.r0}}}),"sunburstRootToNode");au({
|
||
|
|
s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);for(var c=0,d=[],h=e.start;h<e.end;h++){var f=t.getLineCoords(h,r);n&&(s[c++]=f);for(var p=0;f>p;p++)d=i.dataToPoint(r[p],!1,d),s[c++]=d[0],s[c++]=d[1]}o.setLayout("linesPoints",s)}else for(var h=e.start;h<e.end;h++){var g=o.getItemModel(h),f=t.getLineCoords(h,r),m=[];if(n)for(var v=0;f>v;v++)m.push(i.dataToPoint(r[v]));else{m[0]=i.dataToPoint(r[0]),m[1]=i.dataToPoint(r[1]);var y=g.get("lineStyle.curveness");+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}o.setItemLayout(h,m)}}var i=t.coordinateSystem,n=t.get("polyline"),a=t.pipelineContext.large;return{progress:e}}};pu({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),a=this._updateLineDraw(n,t),o=t.get("zlevel"),r=t.get("effect.trailLength"),s=i.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(o).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&r&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(r/10+.9,1),0)})),a.updateData(n),this._lastZlevel=o,this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData(),a=this._updateLineDraw(n,t);a.incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},incrementalRender:function(t,e){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData(),a=t.pipelineContext;if(!this._finished||a.large||a.progressiveRender)return{update:!0};var o=PO.reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},_updateLineDraw:function(t,e){var i=this._lineDraw,n=this._showEffect(e),a=!!e.get("polyline"),o=e.pipelineContext,r=o.large;return i&&n===this._hasEffet&&a===this._isPolyline&&r===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=r?new pg:new og(a?n?fg:dg:n?cg:ag),this._hasEffet=n,this._isPolyline=a,this._isLargeDraw=r,this.group.removeAll()),this.group.add(i.group),i},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr(),i="svg"===e.painter.getType();i||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});var OO="lineStyle.opacity".split("."),EO={seriesType:"lines",reset:function(t){function e(t,e){var i=t.getItemModel(e),n=gg(i.getShallow("symbol",!0)),a=gg(i.getShallow("symbolSize",!0)),o=i.get(OO);n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),a[0]&&t.setItemVisual(e,"fromSymbolSize",a[0]),a[1]&&t.setItemVisual(e,"toSymbolSize",a[1]),t.setItemVisual(e,"opacity",o)}var i=gg(t.get("symbol")),n=gg(t.get("symbolSize")),a=t.getData();return a.setVisual("fromSymbol",i&&i[0]),a.setVisual("toSymbol",i&&i[1]),a.setVisual("fromSymbolSize",n&&n[0]),a.setVisual("toSymbolSize",n&&n[1]),a.setVisual("opacity",t.get(OO)),{dataEach:a.hasItemOption?e:null}}};su(PO),lu(EO);var NO=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},zO=NO.prototype;zO.type="graph",zO.isDirected=function(){return this._directed},zO.addNode=function(t,e){t=t||""+e;var i=this._nodesMap;if(!i[mg(t)]){var n=new vg(t,e);return n.hostGraph=this,this.nodes.push(n),i[mg(t)]=n,n}},zO.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},zO.getNodeById=function(t){return this._nodesMap[mg(t)]},zO.addEdge=function(t,e,i){var n=this._nodesMap,a=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),vg.isInstance(t)||(t=n[mg(t)]),vg.isInstance(e)||(e=n[mg(e)]),t&&e){var o=t.id+"-"+e.id;if(!a[o]){var r=new yg(t,e,i);return r.hostGraph=this,this._directed&&(t.outEdges.push(r),e.inEdges.push(r)),t.edges.push(r),t!==e&&e.edges.push(r),this.edges.push(r),a[o]=r,r}}},zO.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},zO.getEdge=function(t,e){
|
||
|
|
},updateCommon:lm,contain:wm},polygon:{createCover:function(t,e){var i=new ES;return i.add(new eA({name:"main",style:hm(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new tA({name:"main",draggable:!0,drift:TE(gm,t,e),ondragend:TE(nm,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i){e.childAt(0).setShape({points:vm(t,e,i)})},updateCommon:lm,contain:wm}},HE=["axisLine","axisTickLabel","axisName"],ZE=du({type:"parallelAxis",init:function(t,e){ZE.superApply(this,"init",arguments),(this._brushController=new Ug(e.getZr())).on("brush",y(this._onBrush,this))},render:function(t,e,i,n){if(!Lm(t,e,n)){this.axisModel=t,this.api=i,this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new ES,this.group.add(this._axisGroup),t.get("show")){var o=Pm(t,e),s=o.coordinateSystem,l=t.getAreaSelectStyle(),u=l.width,h=t.axis.dim,c=s.getAxisLayout(h),d=r({strokeContainThreshold:u},c),p=new LL(t,d);f(HE,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(d,l,t,o,u,i);var g=n&&n.animation===!1?null:t;Fo(a,this._axisGroup,g)}}},_refreshBrushController:function(t,e,i,n,a,o){var r=i.axis.getExtent(),s=r[1]-r[0],l=Math.min(30,.1*Math.abs(s)),u=yi.create({x:r[0],y:-a/2,width:s,height:a});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:Am(u),isTargetByCursor:Dm(u,o,n),getLinearBrushOtherExtent:Tm(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(km(i))},_onBrush:function(t,e){var i=this.axisModel,n=i.axis,a=p(t,function(t){return[n.coordToData(t.range[0],!0),n.coordToData(t.range[1],!0)]});(!i.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:a})},dispose:function(){this._brushController.dispose()}}),UE=5;du({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},f(XE,function(t,e){i.getZr().on(e,this._handlers[e]=y(t,this))},this)),$s(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){f(this._handlers,function(t,i){e.getZr().off(i,t)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(r({type:"parallelAxisExpand"},t))}});var XE={mousedown:function(t){Om(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(Om(this,"click")&&e){var i=[t.offsetX,t.offsetY],n=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2);if(n>UE)return;var a=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==a.behavior&&this._dispatchExpand({axisExpandWindow:a.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&Om(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n?null:!1})}}};eu(pE),NT.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(){var t=this.getSource();return Em(t,this),Hu(t,this)},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,function(e,a){t===e&&n.push(i.getRawIndex(a))}),n},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});var YE=.3,jE=(Us.extend({type:"parallel",init:function(){this._dataGroup=new ES,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,i,n){function a(t){var e=Bm(l,s,t,c,h);Gm(e,l,t,d)}function o(e,i){var a=u.getItemGraphicEl(i),o=Rm(l,e,c,h);l.se
|
||
|
|
l[s]+=e[s],l[s]=Math.min(o[1],l[s]),l[s]=Math.max(o[0],l[s]);var u=(r[1]+r[0])/2,h=[u,u];h[s]=l[s];var c=[{verticalAlign:"middle"},{align:"center"}];return{position:l,rotation:t.rotation,cursorPoint:h,tooltipOption:c[s]}}}),AN={line:function(t,e,i,n){var a=qv([e,i[0]],[e,i[1]],Qv(t));return ro({shape:a,style:n}),{type:"Line",shape:a}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),a=i[1]-i[0];return{type:"Rect",shape:Kv([e-n/2,i[0]],[n,a],Qv(t))}}};NL.registerAxisPointerClass("CartesianAxisPointer",IN),eu(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!_(e)&&(t.axisPointer.link=[e])}}),iu(ND.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Mc(t,e)}),au({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},yN);var TN=["x","y"],DN=["width","height"],CN=Rv.extend({makeElOption:function(t,e,i,n,a){var o=i.axis,r=o.coordinateSystem,s=ey(r,1-ty(o)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=Hv(n),c=LN[u](o,l,s,h);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=yv(i);jv(e,t,d,i,n,a)},getHandleTransform:function(t,e,i){var n=yv(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Yv(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i){var n=i.axis,a=n.coordinateSystem,o=ty(n),r=ey(a,o),s=t.position;s[o]+=e[o],s[o]=Math.min(r[1],s[o]),s[o]=Math.max(r[0],s[o]);var l=ey(a,1-o),u=(l[1]+l[0])/2,h=[u,u];return h[o]=s[o],{position:s,rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}}}),LN={line:function(t,e,i,n){var a=qv([e,i[0]],[e,i[1]],ty(t));return ro({shape:a,style:n}),{type:"Line",shape:a}},shadow:function(t,e,i){var n=t.getBandWidth(),a=i[1]-i[0];return{type:"Rect",shape:Kv([e-n/2,i[0]],[n,a],ty(t))}}};NL.registerAxisPointerClass("SingleAxisPointer",CN),du({type:"single"});var kN=2,PN=NT.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(){PN.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){var e=t.length,i=Qn(t,function(t){return t[2]}),n=[];i.buckets.each(function(t,e){n.push({name:e,dataList:t})});for(var a=n.length,o=-1,r=-1,s=0;a>s;++s){var l=n[s].dataList.length;l>o&&(o=l,r=s)}for(var u=0;a>u;++u)if(u!==r)for(var h=n[u].name,c=0;o>c;++c){for(var d=n[r].dataList[c][0],f=n[u].dataList.length,p=-1,g=0;f>g;++g){var m=n[u].dataList[g][0];if(m===d){p=g;break}}-1===p&&(t[e]=[],t[e][0]=d,t[e][1]=0,t[e][2]=h,e++)}return t},getInitialData:function(t,e){for(var i=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0],n=i.get("type"),a=m(t.data,function(t){return void 0!==t[2]}),o=this.fixData(a||[]),r=[],s=this.nameMap=B(),l=0,u=0;u<o.length;++u)r.push(o[u][kN]),s.get(o[u][kN])||(s.set(o[u][kN],l),l++);var h=vC(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:bu(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),c=new pC(h,this);return c.initData(o),c},getLayerSeries:function(){for(var t=this.getData(),e=t.count(),i=[],n=0;e>n;++n)i[n]=n;var a=t.mapDimension("single"),o=Qn(i,function(e){return t.get("name",e)}),r=[];return o.buckets.each(function(e,i){e.sort(function(e,i){return t.get(a,e)-t.get(a,i)}),r.push({name:i,indices:e})}),r},getAxisTooltipData:function(t,e){_(t)||(t=t?[t]:[]);for(var i,n=this.getData(),a=this.getLayerSeries(),o=[],r=a.length,s=0;r>s;++s){for(var l=Number.MAX_VALUE,u=-1,h=a[s].indices.length,c=0;h>c;++c){var d=n.get(t[0],a[s].indices[c]),f=Math.abs(d-e);l>=f&&(i=d,l=f,u=a[s].indices[c])}o.push(u)}return{dataIndices:o,nestestValue:i}},formatTooltip:function(t){var e=this.getData(),i=e.getName(t),n=e.get(e.mapDimension("value"),t);return(isNaN(n)||null==n)&&(n="-"),vr(i+" : "+n)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",
|
||
|
|
m.width=g.width,m.height=g.height;var v=Dr(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));r||(r=t.get("left")||t.get("right"),"middle"===r&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||(s=t.get("top")||t.get("bottom"),"center"===s&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textAlign:r,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var w=new aA({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,silent:!0});so(w),n.add(w)}}});var cz=cu({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){cz.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(t){var e=[],i=[];t.eachRawSeries(function(n){var a=n.name;i.push(a);var o;if(n.legendDataProvider){var r=n.legendDataProvider(),s=r.mapArray(r.getName);t.isSeriesFiltered(n)||(i=i.concat(s)),s.length?e=e.concat(s):o=!0}else o=!0;o&&Hn(n)&&e.push(n.name)}),this._availableNames=i;var n=this.get("data")||e,a=p(n,function(t){return("string"==typeof t||"number"==typeof t)&&(t={name:t}),new Uo(t,this,this.ecModel)},this);this._data=a},getData:function(){return this._data},select:function(t){var e=this.option.selected,i=this.get("selectedMode");if("single"===i){var n=this._data;f(n,function(t){e[t.get("name")]=!1})}e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&u(this._availableNames,t)>=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});au("legendToggleSelect","legendselectchanged",x(dx,"toggleSelected")),au("legendSelect","legendselected",x(dx,"select")),au("legendUnSelect","legendunselected",x(dx,"unSelect"));var dz=x,fz=f,pz=ES,gz=du({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new pz),this._backgroundEl,this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},render:function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var a=t.get("align");a&&"auto"!==a||(a="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(a,t,e,i);var o=t.getBoxLayoutParams(),r={width:i.getWidth(),height:i.getHeight()},l=t.get("padding"),u=Dr(o,r,l),h=this.layoutInner(t,a,u,n),c=Dr(s({width:h.width,height:h.height},o),r,l);this.group.attr("position",[c.x-h.x,c.y-h.y]),this.group.add(this._backgroundEl=px(h,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,i,n){var a=this.getContentGroup(),o=B(),r=e.get("selectedMode"),s=[];i.eachRawSeries(function(t){!t.get("legendHoverLink")&&s.push(t.id)}),fz(e.getData(),function(l,u){var h=l.get("name");if(!this.newlineDisabled&&(""===h||"\n"===h))return void a.add(new pz({newline:!0}));var c=i.getSeriesByName(h)[0];if(!o.get(h))if(c){var d=c.getData(),f=d.getVisual("color");"function"==typeof f&&(f=f(c.getDataParams(0)));var p=d.getVisual("legendSymbol")||"roundRect",g=d.getVisual("symbol"),m=this._createItem(h,u,l,e,p,g,t,f,r);m.on("click",dz(gx,h,n)).on("mouseo
|
||
|
|
c(Wz,kT);var Hz=zT.extend({type:"timeline"}),Zz=function(t,e,i,n){lL.call(this,t,e,i),this.type=n||"value",this.model=null};Zz.prototype={constructor:Zz,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},h(Zz,lL);var Uz=y,Xz=f,Yz=Math.PI;Hz.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,i){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,i),a=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),r=this._axis=this._createAxis(n,t);t.formatTooltip=function(t){return vr(r.scale.getLabel(t))},Xz(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](n,a,r,t)},this),this._renderAxisLabel(n,o,r,t),this._position(n,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),a=i_(t,e);null==i||"auto"===i?i="horizontal"===n?a.y+a.height/2<e.getHeight()/2?"-":"+":a.x+a.width/2<e.getWidth()/2?"+":"-":isNaN(i)&&(i={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][i]);var o={horizontal:"center",vertical:i>=0||"+"===i?"left":"right"},r={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:Yz/2},l="vertical"===n?a.height:a.width,u=t.getModel("controlStyle"),h=u.get("show",!0),c=h?u.get("itemSize"):0,d=h?u.get("itemGap"):0,f=c+d,p=t.get("label.rotate")||0;p=p*Yz/180;var g,m,v,y,x=u.get("position",!0),_=h&&u.get("showPlayBtn",!0),w=h&&u.get("showPrevBtn",!0),b=h&&u.get("showNextBtn",!0),S=0,M=l;return"left"===x||"bottom"===x?(_&&(g=[0,0],S+=f),w&&(m=[S,0],S+=f),b&&(v=[M-c,0],M-=f)):(_&&(g=[M-c,0],M-=f),w&&(m=[0,0],S+=f),b&&(v=[M-c,0],M-=f)),y=[S,M],t.get("inverse")&&y.reverse(),{viewRect:a,mainLength:l,orient:n,rotation:s[n],labelRotation:p,labelPosOpt:i,labelAlign:t.get("label.align")||o[n],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||r[n],playPosition:g,prevBtnPosition:m,nextBtnPosition:v,axisExtent:y,controlSize:c,controlGap:d}},_position:function(t){function e(t){var e=t.position;t.origin=[h[0][0]-e[0],h[1][0]-e[1]]}function i(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function n(t,e,i,n,a){t[n]+=i[n][a]-e[n][a]}var a=this._mainGroup,o=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var s=Ie(),l=r.x,u=r.y+r.height;Ce(s,s,[-l,-u]),Le(s,s,-Yz/2),Ce(s,s,[l,u]),r=r.clone(),r.applyTransform(s)}var h=i(r),c=i(a.getBoundingRect()),d=i(o.getBoundingRect()),f=a.position,p=o.position;p[0]=f[0]=h[0][0];var g=t.labelPosOpt;if(isNaN(g)){var m="+"===g?0:1;n(f,c,h,1,m),n(p,d,h,1,1-m)}else{var m=g>=0?0:1;n(f,c,h,1,m),p[1]=f[1]+g}a.attr("position",f),o.attr("position",p),a.rotation=o.rotation=t.rotation,e(a),e(o)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),a=mh(e,n);a.getTicks=function(){return i.mapArray(["value"],function(t){return t})};var o=i.getDataExtent("value");a.setExtent(o[0],o[1]),a.niceTicks();var r=new Zz("value",a,t.axisExtent,n);return r.model=e,r},_createGroup:function(t){var e=this["_"+t]=new ES;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var a=i.getExtent();n.get("lineStyle.show")&&e.add(new rA({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:r({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var a=n.getData(),o=i.scale.getTicks();Xz(o,function(t){var o=i.dataToCoord(t),r=a.getItemModel(t),s=r.getModel("itemStyle"),l=r.getModel("emphasis.itemStyle"),u={position:[o,0],onclick:Uz(this._changeTimeline,this,t)},h=a_(r,s,e,u);So(h,l.getItemStyle()),r.get("tooltip")?(h.dataIndex=t,h.dataModel=n):h.dataIndex=h.dataModel=null},this)},_renderAxisLabel:function(t,e,i,n){var a=i.getLabelModel();if(a.get("show")){var o=n.getData(),r=i.getViewLabels();Xz(r,function(n){var a=n.tickValue,r=o.getItemModel(a),s=r.getModel("label"),l=r.getModel("em
|
||
|
|
var b=p(e.areas,function(t){return K_(s({boundingRect:FR[t.brushType](t)},t))}),S=D_(e.option,RR,function(t){t.mappingMethod="fixed"});_(m)&&f(m,function(t){v[t]=1}),t.eachSeries(function(t,e){var i=x[e]=[];"parallel"===t.subType?h(t,e,i):c(t,e,i)}),t.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};d.selected.push(i);var n=j_(t),a=x[e],o=t.getData(),r=l(e)?function(t){return y[t]?(i.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return Y_(n,a,o,t)?(i.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"};(l(e)?w:u(a))&&L_(RR,S,o,r)})}),U_(e,a,o,r,i)});{var FR={lineX:G,lineY:G,rect:function(t){return $_(t.range)},polygon:function(t){for(var e,i=t.range,n=0,a=i.length;a>n;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var o=i[n];o[0]<e[0][0]&&(e[0][0]=o[0]),o[0]>e[0][1]&&(e[0][1]=o[0]),o[1]<e[1][0]&&(e[1][0]=o[1]),o[1]>e[1][1]&&(e[1][1]=o[1])}return e&&$_(e)}},WR=["#ddd"];cu({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;!e&&C_(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:WR},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=p(t,function(t){return J_(this.option,t)},this))},setBrushOption:function(t){this.brushOption=J_(this.option,t),this.brushType=this.brushOption.brushType}})}du({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Ug(e.getZr())).on("brush",y(this._onBrush,this)).mount()},render:function(t){return this.model=t,Q_.apply(this,arguments)},updateTransform:Q_,updateView:Q_,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:n(t),$from:i})}}),au({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),au({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var HR={},ZR=YT.toolbox.brush;iw.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.
|
||
|
|
var h=u?-5-a.height:s+8;o+a.width/2>i.getWidth()?(n.textPosition=["100%",h],n.textAlign="right"):o-a.width/2<0&&(n.textPosition=[0,h],n.textAlign="left")}})}},updateView:function(t,e,i,n){f(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(t,e){f(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){f(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var xB=YT.toolbox.saveAsImage;mw.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:xB.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:xB.lang.slice()},mw.prototype.unusable=!Mb.canvasSupported;var _B=mw.prototype;_B.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",a=document.createElement("a"),o=i.get("type",!0)||"png";a.download=n+"."+o,a.target="_blank";var r=e.getConnectedDataURL({type:o,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if(a.href=r,"function"!=typeof MouseEvent||Mb.browser.ie||Mb.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(r.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,n+"."+o)}else{var c=i.get("lang"),d='<body style="margin:0;"><img src="'+r+'" style="max-width:100%;" title="'+(c&&c[0]||"")+'" /></body>',f=window.open();f.document.write(d)}else{var p=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});a.dispatchEvent(p)}},tw("saveAsImage",mw);var wB=YT.toolbox.magicType;vw.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:n(wB.title),option:{},seriesIndex:{}};var bB=vw.prototype;bB.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return f(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var SB={line:function(t,e,i,n){return"bar"===t?a({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):void 0},bar:function(t,e,i,n){return"line"===t?a({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):void 0},stack:function(t,e,i,n){return"line"===t||"bar"===t?a({id:e,stack:"__ec_magicType_stack__"},n.get("option.stack")||{},!0):void 0},tiled:function(t,e,i,n){return"line"===t||"bar"===t?a({id:e,stack:""},n.get("option.tiled")||{},!0):void 0}},MB=[["line","bar"],["stack","tiled"]];bB.onclick=function(t,e,i){var n=this.model,a=n.get("seriesIndex."+i);if(SB[i]){var o={series:[]},r=function(e){var a=e.subType,r=e.id,l=SB[i](a,r,e,n);l&&(s(l,e.option),o.series.push(l));var u=e.coordinateSystem;if(u&&"cartesian2d"===u.type&&("line"===i||"bar"===i)){var h=u.getAxesByScale("ordinal")[0];if(h){var c=h.dim,d=c+"Axis",f=t.queryComponents({mainType:d,index:e.get(name+"Index"),id:e.get(name+"Id")})[0],p=f.componentIndex;o[d]=o[d]||[];for(var g=0;p>=g;g++)o[d][p]=o[d][p]||{};o[d][p].boundaryGap="bar"===i}}};f(MB,function(t){u(t,i)>=0&&f(t,function(t){n.setIconStatus(t,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==a?null:{seriesIndex:a}},r),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:o})}},au({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndU
|