You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
755 KiB
25 lines
755 KiB
3 years ago
|
!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&&(vS=null),gS[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,i=lS.call(t);if("[object Array]"===i){if(!R(t)){e=[];for(var a=0,o=t.length;o>a;a++)e[a]=n(t[a])}}else if(sS[i]){if(!R(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(!rS[i]&&!R(t)&&!T(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)||T(s)||T(r)||M(s)||M(r)||R(s)||R(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 vS||(vS=mS().getContext("2d")),vS}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)n.hasOwnProperty(a)&&(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===hS)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===fS)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===pS)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===cS)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=dS.call(arguments,2);return function(){return t.apply(e,i.concat(dS.call(arguments)))}}function x(t){var e=dS.call(arguments,1);return function(){return t.apply(this,e.concat(dS.call(arguments)))}}function _(t){return"[object Array]"===lS.call(t)}function w(t){return"function"==typeof t}function b(t){return"[object String]"===lS.call(t)}function S(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function M(t){return!!rS[lS.call(t)]}function I(t){return!!sS[lS.call(t)]}function T(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function A(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(dS,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 N(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace
|
||
|
l.text=i.text;var u=i.textVerticalAlign,h=o+a/2;"top"===u?h=o+i.height/2:"bottom"===u&&(h=o+a-i.height/2),!i.isLineHolder&&yn(l)&&xn(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,h-i.height/2,i.width,i.height);var c=i.textPadding;c&&(r=Tn(r,s,c),h-=i.height/2-c[2]-i.textHeight/2),bn(e,"shadowBlur",L(l.textShadowBlur,n.textShadowBlur,0)),bn(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),bn(e,"shadowOffsetX",L(l.textShadowOffsetX,n.textShadowOffsetX,0)),bn(e,"shadowOffsetY",L(l.textShadowOffsetY,n.textShadowOffsetY,0)),bn(e,"textAlign",s),bn(e,"textBaseline","middle"),bn(e,"font",i.font||WM);var d=Sn(l.textStroke||n.textStroke,p),f=Mn(l.textFill||n.textFill),p=C(l.textStrokeWidth,n.textStrokeWidth);d&&(bn(e,"lineWidth",p),bn(e,"strokeStyle",d),e.strokeText(i.text,r,h)),f&&(bn(e,"fillStyle",f),e.fillText(i.text,r,h))}function yn(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function xn(t,e,i,n,a,o,r){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=b(s);if(bn(e,"shadowBlur",i.textBoxShadowBlur||0),bn(e,"shadowColor",i.textBoxShadowColor||"transparent"),bn(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),bn(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?un(e,{x:n,y:a,width:o,height:r,r:c}):e.rect(n,a,o,r),e.closePath()}if(h)if(bn(e,"fillStyle",s),null!=i.fillOpacity){var d=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(S(s)){var f=s.image;f=Fi(f,null,t,_n,s),f&&Hi(f)&&e.drawImage(f,n,a,o,r)}if(l&&u)if(bn(e,"lineWidth",l),bn(e,"strokeStyle",u),null!=i.strokeOpacity){var d=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function _n(t,e){e.image=t}function wn(t,e,i,n){var a=i.x||0,o=i.y||0,r=i.textAlign,s=i.textVerticalAlign;if(n){var l=i.textPosition;if(l instanceof Array)a=n.x+In(l[0],n.width),o=n.y+In(l[1],n.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(UM,i,n):$i(UM,i,n);a=u.x,o=u.y,r=r||u.textAlign,s=s||u.textVerticalAlign}var h=i.textOffset;h&&(a+=h[0],o+=h[1])}return t=t||{},t.baseX=a,t.baseY=o,t.textAlign=r,t.textVerticalAlign=s,t}function bn(t,e,i){return t[e]=MM(t,e,i),t[e]}function Sn(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Mn(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function In(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function Tn(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function An(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Dn(t){t=t||{},gM.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new DM(t.style,this),this._rect=null,this.__clipPaths=null}function Cn(t){Dn.call(this,t)}function Ln(t){return parseInt(t,10)}function kn(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function Pn(t,e,i){return tI.copy(t.getBoundingRect()),t.transform&&tI.applyTransform(t.transform),eI.width=e,eI.height=i,!tI.intersect(eI)}function On(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;return!1}function Nn(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 zn(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}function Rn(t){return"mousewheel"===t&&oS.browser.firefox?"DOMMouseScroll":t}function En(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Bn(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function Vn(t){t&&(t.zrByTouch=!0)}function Gn(t,e){return be(t.dom,new Wn(t,e),!0)}function Fn
|
||
|
var f=t-a,p=e-o,g=gr(f,p,l,u)/d;if(0>g||g>1)return!1;var m=gr(f,p,h,c)/d;return 0>m||m>1?!1:!0}function gr(t,e,i,n){return t*n-i*e}function mr(t){return 1e-6>=t&&t>=-1e-6}function vr(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function yr(t,e,i){for(var n=0;n<e.length&&(!e[n]||(t=t&&"object"==typeof t?t[e[n]]:null,null!=t));n++);return null==t&&i&&(t=i.get(e)),t}function xr(t,e){var i=SA(t).getParent;return i?i.call(t,e):t.parentModel}function _r(t){return[t||"",MA++,Math.random().toFixed(5)].join("_")}function wr(t){var e={};return t.registerSubTypeDefaulter=function(t,i){t=ya(t),e[t.main]=i},t.determineSubType=function(i,n){var a=n.type;if(!a){var o=ya(i).main;t.hasSubTypes(i)&&e[o]&&(a=e[o](n))}return a},t}function br(t,e){function i(t){var i={},o=[];return f(t,function(r){var s=n(i,r),l=s.originalDeps=e(r),h=a(l,t);s.entryCount=h.length,0===s.entryCount&&o.push(r),f(h,function(t){u(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(i,t);u(e.successor,t)<0&&e.successor.push(r)})}),{graph:i,noEntryList:o}}function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function a(t,e){var i=[];return f(t,function(t){u(e,t)>=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,n,a){function o(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function r(t){h[t]=!0,o(t)}if(t.length){var s=i(e),l=s.graph,u=s.noEntryList,h={};for(f(t,function(t){h[t]=!0});u.length;){var c=u.pop(),d=l[c],p=!!h[c];p&&(n.call(a,c,d.originalDeps.slice()),delete h[c]),f(d.successor,p?r:o)}f(h,function(){throw new Error("Circle dependency may exists")})}}}function Sr(t){return t.replace(/^\s+|\s+$/g,"")}function Mr(t,e,i,n){var a=e[1]-e[0],o=i[1]-i[0];if(0===a)return 0===o?i[0]:(i[0]+i[1])/2;if(n)if(a>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/a*o+i[0]}function Ir(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?Sr(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?0/0:+t}function Tr(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Ar(t){return t.sort(function(t,e){return t-e}),t}function Dr(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Cr(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return 0>n?-n:0}var a=e.indexOf(".");return 0>a?0:e.length-1-a}function Lr(t,e){var i=Math.log,n=Math.LN10,a=Math.floor(i(t[1]-t[0])/n),o=Math.round(i(Math.abs(e[1]-e[0]))/n),r=Math.min(Math.max(-a+o,0),20);return isFinite(r)?r:20}function kr(t,e,i){if(!t[e])return 0;var n=g(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var a=Math.pow(10,i),o=p(t,function(t){return(isNaN(t)?0:t)/n*a*100}),r=100*a,s=p(o,function(t){return Math.floor(t)}),l=g(s,function(t,e){return t+e},0),u=p(o,function(t,e){return t-s[e]});r>l;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,f=u.length;f>d;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/a}function Pr(t){var e=2*Math.PI;return(t%e+e)%e}function Or(t){return t>-IA&&IA>t}function Nr(t){if(t instanceof Date)return t;if("string"==typeof t){var e=AA.exec(t);if(!e)return new Date(0/0);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return new Date(null==t?0/0:Math.round(t))}function zr(t){return Math.pow(10,Rr(t))}function Rr(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function Er(t,e){var i,n=Rr(t),a=Math.pow(10,n),o=t/a;return i=e?1.5>o?1:2.5>o?2:4>o?3:7>o?5:10:1>o?1:2>o?2:3>o?3:5>o?5:10,t=i*a,n>=-20?+t.toFixed(0>n?-n:0):t}function Br(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),a=+t[n-1],o=i-n;return o?a+o*(t[n]-a):a}function Vr(t){function e(t,i,n){return t.interval[n]<i.interval[n]||t.interval[n]===i.interval[n]&&(t.c
|
||
|
}),du(t,e,i,n),gC(t._chartsViews,function(t){t.__alive||t.remove(e,i)})}function cu(t,e,i,n,a){gC(a||t._componentsViews,function(t){var a=t.__model;t.render(a,e,i,n),mu(a,t)})}function du(t,e,i,n,a){var o,r=t._scheduler;e.eachSeries(function(e){var i=t._chartsMap[e.__viewId];i.__alive=!0;var s=i.renderTask;r.updatePayload(s,n),a&&a.get(e.uid)&&s.dirty(),o|=s.perform(r.getPerformArgs(s)),i.group.silent=!!e.get("silent"),mu(e,i),gu(e,i)}),r.unfinished|=o,pu(t,e),WD(t._zr.dom,e)}function fu(t,e){gC(ZC,function(i){i(t,e)})}function pu(t,e){var i=t._zr,n=i.storage,a=0;n.traverse(function(){a++}),a>e.get("hoverLayerThreshold")&&!oS.node&&e.eachSeries(function(e){if(!e.preventUsingHoverLayer){var i=t._chartsMap[e.__viewId];i.__alive&&i.group.traverse(function(t){t.useHoverLayer=!0})}})}function gu(t,e){var i=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",i)})})}function mu(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function vu(t){var e=t._coordSysMgr;return r(new Ls(t),{getCoordinateSystems:y(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var i=e.__ecComponentInfo;if(null!=i)return t._model.getComponent(i.mainType,i.index);e=e.parent}}})}function yu(){this.eventInfo}function xu(t){function e(t,e){for(var i=0;i<t.length;i++){var n=t[i];n[o]=e}}var i=0,n=1,a=2,o="__connectUpdateStatus";gC(FC,function(r,s){t._messageCenter.on(s,function(r){if(qC[t.group]&&t[o]!==i){if(r&&r.escapeConnect)return;var s=t.makeActionFromEvent(r),l=[];gC(jC,function(e){e!==t&&e.group===t.group&&l.push(e)}),e(l,i),gC(l,function(t){t[o]!==n&&t.dispatchAction(s)}),e(l,a)}})})}function _u(t,e,i){var n=Mu(t);if(n)return n;var a=new Ql(t,e,i);return a.id="ec_"+KC++,jC[a.id]=a,pa(t,JC,a.id),xu(a),a}function wu(t){if(_(t)){var e=t;t=null,gC(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+$C++,gC(e,function(e){e.group=t})}return qC[t]=!0,t}function bu(t){qC[t]=!1}function Su(t){"string"==typeof t?t=jC[t]:t instanceof Ql||(t=Mu(t)),t instanceof Ql&&!t.isDisposed()&&t.dispose()}function Mu(t){return jC[ga(t,JC)]}function Iu(t){return jC[t]}function Tu(t,e){UC[t]=e}function Au(t){HC.push(t)}function Du(t,e){zu(WC,t,e,bC)}function Cu(t){ZC.push(t)}function Lu(t,e,i){"function"==typeof e&&(i=e,e="");var n=vC(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,pC(RC.test(n)&&RC.test(e)),GC[n]||(GC[n]={action:i,actionInfo:t}),FC[e]=n}function ku(t,e){ks.register(t,e)}function Pu(t){var e=ks.get(t);return e?e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice():void 0}function Ou(t,e){zu(XC,t,e,TC,"layout")}function Nu(t,e){zu(XC,t,e,CC,"visual")}function zu(t,e,i,n,a){(mC(e)||vC(e))&&(i=e,e=n);var o=Il.wrapStageHandler(i,a);return o.__prio=e,o.__raw=i,t.push(o),o}function Ru(t,e){YC[t]=e}function Eu(t){return WA.extend(t)}function Bu(t){return LD.extend(t)}function Vu(t){return CD.extend(t)}function Gu(t){return vl.extend(t)}function Fu(t){i("createCanvas",t)}function Wu(t,e,i){dC.registerMap(t,e,i)}function Hu(t){var e=dC.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}}function Zu(t){return t}function Xu(t,e,i,n,a){this._old=t,this._new=e,this._oldKeyGetter=i||Zu,this._newKeyGetter=n||Zu,this.context=a}function Uu(t,e,i,n,a){for(var o=0;o<t.length;o++){var r="_ec_"+a[n](t[o],o),s=e[r];null==s?(i.push(r),e[r]=o):(s.length||(e[r]=s=[s]),s.push(o))}}function Yu(t){var e={},i=e.encode={},n=B(),a=[],o=[],r=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};f(t.dimensions,function(e){var s=t.getDimensionInfo(e),l=s.coordDim;if(l){var u=s.coordDimIndex;ju(i,l)[u]=e,s.isExtraCoord||(n.set(l,1),Ku(s.type)&&(a[0]=e),ju(r.encode,l)[u]=s.index),s.defaultTooltip&&o.push(e)}eL.each(function(t,e){var n=ju(i,e),a=s.otherDims[e];null!=a&&a!==!1&&(n[a]=s.name)})});var s=[],l={};n.each(function(t,e){var n=i[e];l[e]=n[0],s=s.concat(n)}),e.dataDimsOnCoord=s,e.en
|
||
|
var v=pd(o,l);if(null!=v){var y=r[v]||(r[v]={axesInfo:{}});y.axesInfo[p]=m,y.mapper=o[v].mapper,m.linkGroup=y}}}if(i.axisPointerEnabled){var l=_d(i.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=i;var h=i.model,c=h.getModel("tooltip",n);if(Gk(i.getAxes(),Fk(s,!1,null)),i.getTooltipAxes&&n&&c.get("show")){var d="axis"===c.get("trigger"),f="cross"===c.get("axisPointer.type"),p=i.getTooltipAxes(c.get("axisPointer.axis"));(d||f)&&Gk(p.baseAxes,Fk(s,f?"cross":!0,d)),f&&Gk(p.otherAxes,Fk(s,"cross",!1))}}})}function dd(t,e,i,a,o,r){var l=e.getModel("axisPointer"),u={};Gk(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){u[t]=n(l.get(t))}),u.snap="category"!==t.type&&!!r,"cross"===l.get("type")&&(u.type="line");var h=u.label||(u.label={});if(null==h.show&&(h.show=!1),"cross"===o){var c=l.get("label.show");if(h.show=null!=c?c:!0,!r){var d=u.lineStyle=l.get("crossStyle");d&&s(h,d.textStyle)}}return t.model.getModel("axisPointer",new vr(u,i,a))}function fd(t,e){e.eachSeries(function(e){var i=e.coordinateSystem,n=e.get("tooltip.trigger",!0),a=e.get("tooltip.show",!0);i&&"none"!==n&&n!==!1&&"item"!==n&&a!==!1&&e.get("axisPointer.show",!0)!==!1&&Gk(t.coordSysAxesInfo[_d(i.model)],function(t){var n=t.axis;i.getAxis(n.dim)===n&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())})},this)}function pd(t,e){for(var i=e.model,n=e.dim,a=0;a<t.length;a++){var o=t[a]||{};if(gd(o[n+"AxisId"],i.id)||gd(o[n+"AxisIndex"],i.componentIndex)||gd(o[n+"AxisName"],i.name))return a}}function gd(t,e){return"all"===t||_(t)&&u(t,e)>=0||t===e}function md(t){var e=vd(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,a=i.option,o=i.get("status"),r=i.get("value");null!=r&&(r=n.parse(r));var s=xd(i);null==o&&(a.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r<l[0]&&(r=l[0]),a.value=r,s&&(a.status=e.axis.scale.isBlank()?"hide":"show")}}function vd(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[_d(t)]}function yd(t){var e=vd(t);return e&&e.axisPointerModel}function xd(t){return!!t.get("handle.show")}function _d(t){return t.type+"||"+t.id}function wd(t,e,i,n,a,o){var r=Wk.getAxisPointerClass(t.axisPointerClass);if(r){var s=yd(e);s?(t._axisPointer||(t._axisPointer=new r)).render(e,s,n,o):bd(t,n)}}function bd(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}function Sd(t,e,i){i=i||{};var n=t.coordinateSystem,a=e.axis,o={},r=a.getAxesOnZeroOf()[0],s=a.position,l=r?"onZero":s,u=a.dim,h=n.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p="x"===u?[c[2]-f,c[3]+f]:[c[0]-f,c[1]+f];if(r){var g=r.toGlobalCoord(r.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}o.position=["y"===u?p[d[l]]:c[0],"x"===u?p[d[l]]:c[3]],o.rotation=Math.PI/2*("x"===u?0:1);var m={top:-1,bottom:1,left:-1,right:1};o.labelDirection=o.tickDirection=o.nameDirection=m[s],o.labelOffset=r?p[d[s]]-p[d.onZero]:0,e.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),D(i.labelInside,e.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var v=e.get("axisLabel.rotate");return o.labelRotate="top"===l?-v:v,o.z2=1,o}function Md(t,e,i,n){var a=i.axis;if(!a.scale.isBlank()){var o=i.getModel("splitArea"),r=o.getModel("areaStyle"),l=r.get("color"),u=n.coordinateSystem.getRect(),h=a.getTicksCoords({tickModel:o,clamp:!0});if(h.length){var c=l.length,d=t.__splitAreaColors,f=B(),p=0;if(d)for(var g=0;g<h.length;g++){var m=d.get(h[g].tickValue);if(null!=m){p=(m+(c-1)*g)%c;break}}var v=a.toGlobalCoord(h[0].coord),y=r.getAreaStyle();l=_(l)?l:[l];for(var g=1;g<h.length;g++){var x,w,b,S,M=a.toGlobalCoord(h[g].coord);a.isHorizontal()?(x=v,w=u.y,b=M-x,S=u.height,v=x+b):(x=u.x,w=v,b=u.width,S=M-w,v=w+S);var I=h[g-1].tickValue;null!=I&&f.set(I,p),e.add(new UT({anid:null!=I?"area_"+I:null,shape:{x:x,y:w,width:b,height:S},style:s({fill:l[p]},y),silent:!0})),p=(p+1)%c}t.__splitAreaColors=f}}}fu
|
||
|
if(DO(e,function(t,e){n[t]=e}),!_(i)){var a=[];S(i)?DO(i,function(t,e){var i=n[e];a[null!=i?i:LO]=t}):a[LO]=i,i=Kp(t,a)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}function Wp(t,e){var i=t.visual,n=[];S(i)?DO(i,function(t){n.push(t)}):null!=i&&n.push(i);var a={color:1,symbol:1};e||1!==n.length||a.hasOwnProperty(t.type)||(n[1]=n[0]),Kp(t,n)}function Hp(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:jp([0,1])}}function Zp(t){var e=this.option.visual;return e[Math.round(Mr(t,[0,1],[0,e.length-1],!0))]||{}}function Xp(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function Up(t){var e=this.option.visual;return e[this.option.loop&&t!==LO?t%e.length:t]}function Yp(){return this.option.visual[0]}function jp(t){return{linear:function(e){return Mr(e,t,this.option.visual,!0)},category:Up,piecewise:function(e,i){var n=qp.call(this,i);return null==n&&(n=Mr(e,t,this.option.visual,!0)),n},fixed:Yp}}function qp(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=kO.findPieceIndex(t,i),a=i[n];if(a&&a.visual)return a.visual[this.type]}}function Kp(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=p(e,function(t){return ti(t)})),e}function $p(t,e,i){return t?i>=e:i>e}function Jp(t,e,i,n){var a=t.getModel(),o=t.getLayout();if(o&&!o.invisible&&o.isInView){var r,s=t.getModel(zO),l=Qp(s,e,n),u=s.get("borderColor"),h=s.get("borderColorSaturation");null!=h&&(r=tg(l,t),u=eg(h,r)),t.setVisual("borderColor",u);var c=t.viewChildren;if(c&&c.length){var d=ng(t,a,o,s,l,c);f(c,function(t,e){if(t.depth>=i.length||t===i[t.depth]){var o=og(a,l,t,e,d,n);Jp(t,o,i,n)}})}else r=tg(l,t),t.setVisual("color",r)}}function Qp(t,e,i){var n=r({},e),a=i.designatedVisualItemStyle;return f(["color","colorAlpha","colorSaturation"],function(i){a[i]=e[i];var o=t.get(i);a[i]=null,null!=o&&(n[i]=o)}),n}function tg(t){var e=ig(t,"color");if(e){var i=ig(t,"colorAlpha"),n=ig(t,"colorSaturation");return n&&(e=si(e,null,null,n)),i&&(e=li(e,i)),e}}function eg(t,e){return null!=e?si(e,null,null,t):null}function ig(t,e){var i=t[e];return null!=i&&"none"!==i?i:void 0}function ng(t,e,i,n,a,o){if(o&&o.length){var r=ag(e,"color")||null!=a.color&&"none"!==a.color&&(ag(e,"colorAlpha")||ag(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=i.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:r.name,dataExtent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new kO(c);return d.__drColorMappingBy=h,d}}}function ag(t,e){var i=t.get(e);return NO(i)&&i.length?{name:e,range:i}:null}function og(t,e,i,n,a,o){var s=r({},e);if(a){var l=a.type,u="color"===l&&a.__drColorMappingBy,h="index"===u?n:"id"===u?o.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));s[l]=a.mapValueToVisual(h)}return s}function rg(t,e,i,n){var a,o;if(!t.isRemoved()){var r=t.getLayout();a=r.width,o=r.height;var s=t.getModel(),l=s.get(FO),u=s.get(WO)/2,h=mg(s),c=Math.max(l,h),d=l-u,f=c-u,s=t.getModel();t.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:h},!0),a=EO(a-2*d,0),o=EO(o-d-f,0);var p=a*o,g=sg(t,s,p,e,i,n);if(g.length){var m={x:d,y:f,width:a,height:o},v=BO(a,o),y=1/0,x=[];x.area=0;for(var _=0,w=g.length;w>_;){var b=g[_];x.push(b),x.area+=b.getLayout().area;var S=cg(x,v,e.squareRatio);y>=S?(_++,y=S):(x.area-=x.pop().getLayout().area,dg(x,v,m,u,!1),v=BO(m.width,m.height),x.length=x.area=0,y=1/0)}if(x.length&&dg(x,v,m,u,!0),!i){var M=s.get("childrenVisibleMin");null!=M&&M>p&&(i=!0)}for(var _=0,w=g.length;w>_;_++)rg(g[_],e,i,n+1)}}}function sg(t,e,i,n,a,o){var r=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=o;if(a&&!l)return t.viewChildren=[];r=m(r,function(t){return!t.isRemoved()}),ug(r,s);var u=hg(e,r,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=lg(e,i,u.sum,s,r),0===u.sum)return t.viewChildren=[];for(var h=0,c=r.length;c>h;h++){var d=r[h].getValue()/u.sum*i;r[h].setLayout({area:d})}return l&
|
||
|
if(f)"insideLeft"===l?(n=(d[0][0]+d[3][0])/2+5,a=(d[0][1]+d[3][1])/2,i="left"):"insideRight"===l?(n=(d[1][0]+d[2][0])/2-5,a=(d[1][1]+d[2][1])/2,i="right"):(n=(d[0][0]+d[1][0]+d[2][0]+d[3][0])/4,a=(d[0][1]+d[1][1]+d[2][1]+d[3][1])/4,i="center"),o=[[n,a],[n,a]];else{var p,g,m,v,y=h.get("length");"left"===l?(p=(d[3][0]+d[0][0])/2,g=(d[3][1]+d[0][1])/2,m=p-y,n=m-5,i="right"):"right"===l?(p=(d[1][0]+d[2][0])/2,g=(d[1][1]+d[2][1])/2,m=p+y,n=m+5,i="left"):"top"===l?(p=(d[3][0]+d[0][0])/2,g=(d[3][1]+d[0][1])/2,v=g-y,a=v-5,i="center"):"bottom"===l?(p=(d[1][0]+d[2][0])/2,g=(d[1][1]+d[2][1])/2,v=g+y,a=v+5,i="center"):"rightTop"===l?(p="horizontal"===u?d[3][0]:d[1][0],g="horizontal"===u?d[3][1]:d[1][1],"horizontal"===u?(v=g-y,a=v-5,i="center"):(m=p+y,n=m+5,i="top")):"rightBottom"===l?(p=d[2][0],g=d[2][1],"horizontal"===u?(v=g+y,a=v+5,i="center"):(m=p+y,n=m+5,i="bottom")):"leftTop"===l?(p=d[0][0],g="horizontal"===u?d[0][1]:d[1][1],"horizontal"===u?(v=g-y,a=v-5,i="center"):(m=p-y,n=m-5,i="right")):"leftBottom"===l?(p="horizontal"===u?d[1][0]:d[3][0],g="horizontal"===u?d[1][1]:d[2][1],"horizontal"===u?(v=g+y,a=v+5,i="center"):(m=p-y,n=m-5,i="right")):(p=(d[1][0]+d[2][0])/2,g=(d[1][1]+d[2][1])/2,"horizontal"===u?(v=g+y,a=v+5,i="center"):(m=p+y,n=m+5,i="left")),"horizontal"===u?(m=p,n=m):(v=g,a=v),o=[[p,g],[m,v]]}c.label={linePoints:o,x:n,y:a,verticalAlign:"middle",textAlign:i,inside:f}})}function Uv(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function Yv(t,e,i){var n=t.getGraphicEl(),a=Uv(t,e);null!=i&&(null==a&&(a=1),a*=i),n.downplay&&n.downplay(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",a)})}function jv(t,e){var i=Uv(t,e),n=t.getGraphicEl();n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",i)}),n.highlight&&n.highlight()}function qv(t,e,i){var n=new UT({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return or(n,{shape:{width:t.width+20}},e,i),n}function Kv(t,e){return es(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function $v(t,e,i,n,a,o,r,s,l){Qv(t,e,i,a,o,s,l),ay(t,e,o,a,n,r,s),vy(t,s)}function Jv(t){f(t,function(t){var e=gy(t.outEdges,py),i=gy(t.inEdges,py),n=t.getValue()||0,a=Math.max(e,i,n);t.setLayout({value:a},!0)})}function Qv(t,e,i,n,a,o,r){for(var s=[],l=[],u=[],h=[],c=0,d=0,f=0;f<e.length;f++)s[f]=1;for(f=0;f<t.length;f++)l[f]=t[f].inEdges.length,0===l[f]&&u.push(t[f]);for(var p=-1;u.length;){for(var g=0;g<u.length;g++){var m=u[g],v=m.hostGraph.data.getRawDataItem(m.dataIndex),y=null!=v.depth&&v.depth>=0;y&&v.depth>p&&(p=v.depth),m.setLayout({depth:y?v.depth:c},!0),"vertical"===o?m.setLayout({dy:i},!0):m.setLayout({dx:i},!0);for(var x=0;x<m.outEdges.length;x++){var _=m.outEdges[x],w=e.indexOf(_);s[w]=0;var b=_.node2,S=t.indexOf(b);0===--l[S]&&h.indexOf(b)<0&&h.push(b)}}++c,u=h,h=[]}for(f=0;f<s.length;f++)if(1===s[f])throw new Error("Sankey is a DAG, the original data has cycle!");var M=p>c-1?p:c-1;r&&"left"!==r&&ey(t,r,o,M);var d="vertical"===o?(a-i)/M:(n-i)/M;ny(t,d,o)}function ty(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function ey(t,e,i,n){if("right"===e){for(var a=[],o=t,r=0;o.length;){for(var s=0;s<o.length;s++){var l=o[s];l.setLayout({skNodeHeight:r},!0);for(var u=0;u<l.inEdges.length;u++){var h=l.inEdges[u];a.indexOf(h.node1)<0&&a.push(h.node1)}}o=a,a=[],++r}f(t,function(t){ty(t)||t.setLayout({depth:Math.max(0,n-t.getLayout().skNodeHeight)},!0)})}else"justify"===e&&iy(t,n)}function iy(t,e){f(t,function(t){ty(t)||t.outEdges.length||t.setLayout({depth:e},!0)})}function ny(t,e,i){f(t,function(t){var n=t.getLayout().depth*e;"vertical"===i?t.setLayout({y:n},!0):t.setLayout({x:n},!0)})}function ay(t,e,i,n,a,o,r){var s=oy(t,r);ry(s,e,i,n,a,r),sy(s,a,i,n,r);for(var l=1;o>0;o--)l*=.99,ly(s,l,r),sy(s,a,i,n,r),my(s,l,r),sy(s,a,i,n,r)}function oy(t,e){var i=[],n="vertical"===e?"y":"x",a=va(t,function(t){return t.getLayout()[n]});return a.keys.sort(function(t,e){return t-e}),f(a.keys,function(t){i.push(a.buckets.get(t))}),i}function ry(t,e,i,n,a,o){var r=1/0;f(t,function(t){var e=t.length,s=0;f(t,function(t){s
|
||
|
}function c_(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function d_(t,e,i,n,a){var o=e.axis,r=o.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=n.getRadiusAxis().getExtent();if("radius"===o.dim){var d=Oe();Be(d,d,s),Ee(d,d,[n.cx,n.cy]),l=sr([r,-a],d);var f=e.getModel("axisLabel").get("rotate")||0,p=zk.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,h=p.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+a,r]);var m=n.cx,v=n.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}function f_(t,e){e.update="updateView",Lu(e,function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},function(i){i[t](e.name);var a=i.coordinateSystem;f(a.regions,function(t){n[t.name]=i.isSelected(t.name)||!1})}),{selected:n,name:e.name}})}function p_(t){this._model=t}function g_(t,e,i,n){var a=i.calendarModel,o=i.seriesModel,r=a?a.coordinateSystem:o?o.coordinateSystem:null;return r===this?r[t](n):null}function m_(t,e){var i=t.cellSize;_(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=p([0,1],function(t){return ns(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});as(t,e,{type:"box",ignoreSize:n})}function v_(t,e,i){var n,a={},o="toggleSelected"===t;return i.eachComponent("legend",function(i){o&&null!=n?i[n?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?i[t]():(i[t](e.name),n=i.isSelected(e.name));var r=i.getData();f(r,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);a[e]=a.hasOwnProperty(e)?a[e]&&n:n}})}),"allSelect"===t||"inverseSelect"===t?{selected:a}:{name:e.name,selected:a}}function y_(t,e,i){var n=e.getBoxLayoutParams(),a=e.get("padding"),o={width:i.getWidth(),height:i.getHeight()},r=es(n,o,a);VA(e.get("orient"),t,e.get("itemGap"),r.width,r.height),is(t,n,o,a)}function x_(t,e){var i=CA(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var t=new UT({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return t}function __(t,e,i,n,a,o){var r;return"line"!==e&&e.indexOf("empty")<0?(r=i.getItemStyle(),t.style.stroke=n,o||(r.stroke=a)):r=i.getItemStyle(["borderWidth","borderColor"]),t.setStyle(r)}function w_(t,e,i,n){S_(t,e,i,n),i.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),b_(t,e,i,n)}function b_(t,e,i,n){var a=i.getZr().storage.getDisplayList()[0];a&&a.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function S_(t,e,i,n){var a=i.getZr().storage.getDisplayList()[0];a&&a.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}function M_(t,e,i){var n=t.getOrient(),a=[1,1];a[n.index]=0,as(e,i,{type:"box",ignoreSize:a})}function I_(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return p(qE,function(t){return t+"transition:"+i}).join(";")}function T_(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont());var a=t.get("lineHeight");null==a&&(a=Math.round(3*i/2)),i&&e.push("line-height:"+a+"px");var o=t.get("textShadowColor"),r=t.get("textShadowBlur")||0,s=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return r&&e.push("text-shadow:"+s+"px "+l+"px "+r+"px "+o),YE(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function A_(t){var e=[],i=t.get("transitionDuration"),n=t.get("backgroundColor"),a=t.getModel("textStyle"),o=t.get("padding");return i&&e.push(I_(i)),n&&(oS.canvasSupported?e.push("background-Color:"+n):(e.push("background-Color:#"+ai(n)),e.push("filter:alpha(opacity=70)"))),YE(["width","color","radius"],function(i){var n="border-"+i,a=jE(n),o=t.get(a);null!=o&&e.push(n+":"+o+("color"===i?"":"px"))}),e.push(T_(a)),null!=o&&e.push("padding:"+CA(o).join("px ")+"px"),e.join(";")+";"}function D_(t,e,i
|
||
|
e&&(e.dragging=!1),this.dispatchToElement(ue(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(ue(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var TS=Array.prototype.slice,AS=function(t){this._$handlers={},this._$eventProcessor=t};AS.prototype={constructor:AS,one:function(t,e,i,n){return ce(this,t,e,i,n,!0)},on:function(t,e,i,n){return ce(this,t,e,i,n,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],a=0,o=i[t].length;o>a;a++)i[t][a].h!==e&&n.push(i[t][a]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,a=n.length;a>3&&(n=TS.call(n,1));for(var o=e.length,r=0;o>r;){var s=e[r];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))r++;else{switch(a){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(r,1),o--):r++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,a=n.length;a>4&&(n=TS.call(n,1,n.length-1));for(var o=n[n.length-1],r=e.length,s=0;r>s;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(a){case 1:l.h.call(o);break;case 2:l.h.call(o,n[1]);break;case 3:l.h.call(o,n[1],n[2]);break;default:l.h.apply(o,n)}l.one?(e.splice(s,1),r--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this}};var DS=Math.log(2),CS="___zrEVENTSAVED",LS=[],kS="undefined"!=typeof window&&!!window.addEventListener,PS=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,OS=[],NS=kS?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},zS=function(){this._track=[]};zS.prototype={constructor:zS,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var a={points:[],touches:[],target:e,event:t},o=0,r=n.length;r>o;o++){var s=n[o],l=xe(i,s,{});a.points.push([l.zrX,l.zrY]),a.touches.push(s)}this._track.push(a)}},_recognize:function(t){for(var e in RS)if(RS.hasOwnProperty(e)){var i=RS[e](this._track,t);if(i)return i}}};var RS={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,a=(t[i-2]||{}).points||n;if(a&&a.length>1&&n&&n.length>1){var o=Te(n)/Te(a);!isFinite(o)&&(o=1),e.pinchScale=o;var r=Ae(n);return e.pinchX=r[0],e.pinchY=r[1],{type:"pinch",target:t[0].target,event:e}}}}},ES="silent";Le.prototype.dispose=function(){};var BS=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],VS=function(t,e,i,n){AS.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new Le,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,le.call(this),this.setHandlerProxy(i)};VS.prototype={constructor:VS,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(f(BS,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,i=t.zrY,n=Pe(this,e,i),a=this._hovered,o=a.target;o&&!o.__zr&&(a=this.findHover(a.x,a.y),o=a.target);var r=this._hovered=n?{x:e,y:i}:this.findHover(e,i),s=r.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(a,"mouseout",t),this.dispatchToElement(r,"mousemove",t),s&&s!==o&&this.dispatchToElement(r,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,i=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&!i&&this.trigger("globalout",{type:"globalout",event:t})},resize:function(){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCur
|
||
|
i.bind(t,this,e);var a=this._image=Fi(n,this._image,this,this.onload);if(a&&Hi(a)){var o=i.x||0,r=i.y||0,s=i.width,l=i.height,u=a.width/a.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=a.width,l=a.height),this.setTransform(t),i.sWidth&&i.sHeight){var h=i.sx||0,c=i.sy||0;t.drawImage(a,h,c,i.sWidth,i.sHeight,o,r,s,l)}else if(i.sx&&i.sy){var h=i.sx,c=i.sy,d=s-h,f=l-c;t.drawImage(a,h,c,d,f,o,r,s,l)}else t.drawImage(a,o,r,s,l);null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new Ti(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},h(Cn,Dn);var KM=1e5,$M=314159,JM=.01,QM=.001,tI=new Ti(0,0,0,0),eI=new Ti(0,0,0,0),iI=function(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=r({},i||{}),this.dpr=i.devicePixelRatio||cM,this._singleCanvas=n,this.root=t;var a=t.style;a&&(a["-webkit-tap-highlight-color"]="transparent",a["-webkit-user-select"]=a["user-select"]=a["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var o=this._zlevelList=[],s=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){var l=t.width,u=t.height;null!=i.width&&(l=i.width),null!=i.height&&(u=i.height),this.dpr=i.devicePixelRatio||1,t.width=l*this.dpr,t.height=u*this.dpr,this._width=l,this._height=u;var h=new OM(t,this,this.dpr);h.__builtin__=!0,h.initContext(),s[$M]=h,h.zlevel=$M,o.push($M),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var c=this._domRoot=zn(this._width,this._height);t.appendChild(c)}this._hoverlayer=null,this._hoverElements=[]};iI.prototype={constructor:iI,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();return t?{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}:void 0},refresh:function(t){var e=this.storage.getDisplayList(!0),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var n=0;n<i.length;n++){var a=i[n],o=this._layers[a];if(!o.__builtin__&&o.refresh){var r=0===n?this._backgroundColor:null;o.refresh(r)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return i.__from=t,t.__hoverMir=i,e&&i.setStyle(e),this._hoverElements.push(i),i}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,n=u(i,e);n>=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;e<t.length;e++){var i=t[e].__from;i&&(i.__hoverMir=null)}t.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){Ni(t,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(KM));var n={};i.ctx.save();for(var a=0;e>a;){var o=t[a],r=o.__from;r&&r.__zr?(a++,r.invisible||(o.transform=r.transform,o.invTransform=r.invTransform,o.__clipPaths=r.__clipPaths,this._doPaintEl(o,i,!0,n))):(t.splice(a,1),r.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(KM)},_paintList:function(t,e,i){if(this._redrawId===i){e=e||!1,this._updateLayerStatus(t);var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var a=this;NM(function(){a._paintList(t,e,i)})}}},_compositeManually:function(){var t=this.getLayer($M).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer(function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)})},_doPaintList:function(t,e){for(var i=[],n=0;n<this._zlevelList.length;n++){var a=this._zlevelList[n],o=this._layers[a];o.__builtin__&&o!==this._hoverlayer&&(o.__dirty||e)&&i.push(o)}for(var r=!0,s=0;s<i.length;s++){var o=i[s],l=o.ctx,u={};l.save();var h=e?o.__startIndex:o.__drawIndex,c=!e&&o.incremental&&Date.now,d=c&&Date.now(),p=o.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(o.__startIndex===o.__endIndex)o.clear(!
|
||
|
}}),HT=ao.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){fo(t,e,!1)}}),ZT=Math.round,XT={},UT=ao.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i,n,a,o;this.subPixelOptimize?(go(XT,e,this.style),i=XT.x,n=XT.y,a=XT.width,o=XT.height,XT.r=e.r,e=XT):(i=e.x,n=e.y,a=e.width,o=e.height),e.r?un(t,e):t.rect(i,n,a,o),t.closePath()}}),YT={},jT=ao.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,n,a,o;this.subPixelOptimize?(po(YT,e,this.style),i=YT.x1,n=YT.y1,a=YT.x2,o=YT.y2):(i=e.x1,n=e.y1,a=e.x2,o=e.y2);var r=e.percent;0!==r&&(t.moveTo(i,n),1>r&&(a=i*(1-r)+a*r,o=n*(1-r)+o*r),t.lineTo(a,o))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),qT=[],KT=ao.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,a=e.x2,o=e.y2,r=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(i,n),null==l||null==u?(1>h&&(Ea(i,r,a,h,qT),r=qT[1],a=qT[2],Ea(n,s,o,h,qT),s=qT[1],o=qT[2]),t.quadraticCurveTo(r,s,a,o)):(1>h&&(ka(i,r,l,a,h,qT),r=qT[1],l=qT[2],a=qT[3],ka(n,s,u,o,h,qT),s=qT[1],u=qT[2],o=qT[3]),t.bezierCurveTo(r,s,l,u,a,o)))},pointAt:function(t){return vo(this.shape,t,!1)},tangentAt:function(t){var e=vo(this.shape,t,!0);return te(e,e)}}),$T=ao.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,a=Math.max(e.r,0),o=e.startAngle,r=e.endAngle,s=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*a+i,u*a+n),t.arc(i,n,a,o,r,!s)}}),JT=ao.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1],t[i].segmentIgnoreThreshold)},buildPath:function(t,e){for(var i=e.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),ao.prototype.getBoundingRect.call(this)}}),QT=function(t){this.colorStops=t||[]};QT.prototype={constructor:QT,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var tA=function(t,e,i,n,a,o){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=o||!1,QT.call(this,a)};tA.prototype={constructor:tA},h(tA,QT);var eA=function(t,e,i,n,a){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=a||!1,QT.call(this,n)};eA.prototype={constructor:eA},h(eA,QT),yo.prototype.incremental=!0,yo.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},yo.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},yo.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},yo.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(var e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},yo.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var e=this._displayables[t];e.parent=this,e.update(),e.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var e=this._temporaryDisplayables[t];e.parent=this,e.update(),e.parent=null}},yo.prototype.brush=function(t){for(var e=this._cursor;e<this._displayables.length;e++){var i=this._displayables[e];i.beforeBrush&&i.beforeBrush(t),i.brush(t,e===thi
|
||
|
var i=t;return f(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=r.get(t);if(null==e){for(var i=t.split("."),n=FD.aria,a=0;a<i.length;++a)n=n[i[a]];return n}return e}function a(){var t=e.getModel("title").option;return t&&t.length&&(t=t[0]),t&&t.text}function o(t){return FD.series.typeNames[t]||"自定义图"}var r=e.getModel("aria");if(r.get("show")){if(r.get("description"))return void t.setAttribute("aria-label",r.get("description"));var s=0;e.eachSeries(function(){++s},this);var l,u=r.get("data.maxCount")||10,h=r.get("series.maxCount")||10,c=Math.min(s,h);if(!(1>s)){var d=a();l=d?i(n("general.withTitle"),{title:d}):n("general.withoutTitle");var p=[],g=s>1?"series.multiple.prefix":"series.single.prefix";l+=i(n(g),{seriesCount:s}),e.eachSeries(function(t,e){if(c>e){var a,r=t.get("name"),l="series."+(s>1?"multiple":"single")+".";a=n(r?l+"withName":l+"withoutName"),a=i(a,{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:o(t.subType)});var h=t.getData();window.data=h,a+=h.count()>u?i(n("data.partialData"),{displayCnt:u}):n("data.allData");for(var d=[],f=0;f<h.count();f++)if(u>f){var g=h.getName(f),m=nl(h,f);d.push(i(n(g?"data.withName":"data.withoutName"),{name:g,value:m}))}a+=d.join(n("data.separator.middle"))+n("data.separator.end"),p.push(a)}}),l+=p.join(n("series.multiple.separator.middle"))+n("series.multiple.separator.end"),t.setAttribute("aria-label",l)}}},HD=Math.PI,ZD=function(t,e){e=e||{},s(e,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var i=new xM,n=new UT({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});i.add(n);var a=e.fontSize+" sans-serif",o=new UT({style:{fill:"none",text:e.text,font:a,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});if(i.add(o),e.showSpinner){var r=new $T({shape:{startAngle:-HD/2,endAngle:-HD/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001});r.animateShape(!0).when(1e3,{endAngle:3*HD/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*HD/2}).delay(300).start("circularInOut"),i.add(r)}return i.resize=function(){var i=Xi(e.text,a),s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&i?10:0)-i)/2-(e.showSpinner?0:i/2),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),o.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},i.resize(),i},XD=Il.prototype;XD.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},XD.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,a=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex,o=a?i.step:null,r=n&&n.modDataCount,s=null!=r?Math.ceil(r/o):null;return{step:o,modBy:s,modDataCount:r}}},XD.getPipeline=function(t){return this._pipelineMap.get(t)},XD.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData(),a=n.count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&a>=i.threshold,r=t.get("large")&&a>=t.get("largeThreshold"),s="mod"===t.get("progressiveChunkMode")?a:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:s,large:r}},XD.restorePipelines=function(t){var e=this,i=e._pipelineMap=B();t.eachSeries(function(t){var n=t.getProgressive(),a=t.uid;i.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),El(e,t,t.dataTask)})},XD.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;f(this._allHandlers,function(n){var a=t.get(n.uid)||t.set(n.uid,[]);n.reset&&Al(this,n,a,e,i),n.overallReset&&Dl(this,n,a,e,i)},this)},XD.prepareView=function(t,e,i,n){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=i,o.api=n,a.__block=!t.incrementalPrepareRender,El(this,e,a)
|
||
|
(y<t[T][0]||y>t[T][1])&&(I=!1)}I&&(r[s++]=this.getRawIndex(v))}return a>s&&(this._indices=r),this._count=s,this._extent={},this.getRawIndex=this._indices?oh:ah,this}}},fL.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;var a=[];return this.each(t,function(){a.push(e&&e.apply(this,arguments))},i),a},fL.map=function(t,e,i,n){i=i||n||this,t=p(sh(t),this.getDimension,this);var a=lh(this,t);a._indices=this._indices,a.getRawIndex=a._indices?oh:ah;for(var o=a._storage,r=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=a._rawExtent,d=0;u>d;d++){for(var f=0;l>f;f++)h[f]=this.get(t[f],d);h[l]=d;var g=e&&e.apply(i,h);if(null!=g){"object"!=typeof g&&(r[0]=g,g=r);for(var m=this.getRawIndex(d),v=Math.floor(m/s),y=m%s,x=0;x<g.length;x++){var _=t[x],w=g[x],b=c[_],S=o[_];S&&(S[v][y]=w),w<b[0]&&(b[0]=w),w>b[1]&&(b[1]=w)}}}return a},fL.downSample=function(t,e,i,n){for(var a=lh(this,[t]),o=a._storage,r=[],s=Math.floor(1/e),l=o[t],u=this.count(),h=this._chunkSize,c=a._rawExtent[t],d=new(Ju(this))(u),f=0,p=0;u>p;p+=s){s>u-p&&(s=u-p,r.length=s);for(var g=0;s>g;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/h),y=m%h;r[g]=l[v][y]}var x=i(r),_=this.getRawIndex(Math.min(p+n(r,x)||0,u-1)),w=Math.floor(_/h),b=_%h;l[w][b]=x,x<c[0]&&(c[0]=x),x>c[1]&&(c[1]=x),d[f++]=_}return a._count=f,a._indices=d,a.getRawIndex=oh,a},fL.getItemModel=function(t){var e=this.hostModel;return new vr(this.getRawDataItem(t),e,e&&e.ecModel)},fL.diff=function(t){var e=this;return new Xu(t?t.getIndices():[],this.getIndices(),function(e){return rh(t,e)},function(t){return rh(e,t)})},fL.getVisual=function(t){var e=this._visual;return e&&e[t]},fL.setVisual=function(t,e){if(iL(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},fL.setLayout=function(t,e){if(iL(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},fL.getLayout=function(t){return this._layout[t]},fL.getItemLayout=function(t){return this._itemLayouts[t]},fL.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?r(this._itemLayouts[t]||{},e):e},fL.clearItemLayouts=function(){this._itemLayouts.length=0},fL.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],a=n&&n[e];return null!=a||i?a:this.getVisual(e)},fL.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},a=this.hasItemVisual;if(this._itemVisuals[t]=n,iL(e))for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o],a[o]=!0);else n[e]=i,a[e]=!0},fL.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var pL=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};fL.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(pL,e)),this._graphicEls[t]=e},fL.getItemGraphicEl=function(t){return this._graphicEls[t]},fL.eachItemGraphicEl=function(t,e){f(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},fL.cloneShallow=function(t){if(!t){var e=p(this.dimensions,this.getDimensionInfo,this);t=new dL(e,this.hostModel)}if(t._storage=this._storage,th(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?oh:ah,t},fL.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(k(arguments)))})},fL.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],fL.CHANGABLE_METHODS=["filterSelf","selectRange"];var gL=function(t,e){return e=e||{},ch(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})},mL={cartesian2d:function(t,e,i,n){var a=t.getReferringComponents("xAxis")[0],o=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",a),i.
|
||
|
g&&(t.moveTo(c*a+i,d*a+n),t.arc(c*s+i,d*s+n,r,-Math.PI+l,l,!h)),t.arc(i,n,o,l,u,!h),t.moveTo(f*o+i,p*o+n),t.arc(f*s+i,p*s+n,r,u-2*Math.PI,u-Math.PI,!h),0!==a&&(t.arc(i,n,a,u,l,h),t.moveTo(c*a+i,p*a+n)),t.closePath()}}),Ik=["itemStyle","barBorderWidth"],Tk=[0,0];r(vr.prototype,Sk),Gu({type:"bar",render:function(t,e,i){this._updateDrawMode(t);var n=t.get("coordinateSystem");return("cartesian2d"===n||"polar"===n)&&(this._isLargeDraw?this._renderLarge(t,e,i):this._renderNormal(t,e,i)),this.group},incrementalPrepareRender:function(t){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t){var e,i=this.group,n=t.getData(),a=this._data,o=t.coordinateSystem,r=o.getBaseAxis();"cartesian2d"===o.type?e=r.isHorizontal():"polar"===o.type&&(e="angle"===r.dim);var s=t.isAnimationEnabled()?t:null,l=t.get("clip",!0),u=Hc(o,n);i.removeClipPath();var h=t.get("roundCap",!0),c=t.get("showBackground",!0),d=t.getModel("backgroundStyle"),f=d.get("barBorderRadius")||0,p=[],g=this._backgroundEls||[],m=function(t){var i=kk[o.type](n,t),a=td(o,e,i);return a.useStyle(d.getBarItemStyle()),"cartesian2d"===o.type&&a.setShape("r",f),p[t]=a,a};n.diff(a).add(function(a){var r=n.getItemModel(a),d=kk[o.type](n,a,r);if(c&&m(a),n.hasValue(a)){if(l){var f=Ck[o.type](u,d);if(f)return void i.remove(p)}var p=Lk[o.type](a,d,e,s,!1,h);n.setItemGraphicEl(a,p),i.add(p),Yc(p,n,a,r,d,t,e,"polar"===o.type)}}).update(function(r,v){var y=n.getItemModel(r),x=kk[o.type](n,r,y);if(c){var _;0===g.length?_=m(v):(_=g[v],_.useStyle(d.getBarItemStyle()),"cartesian2d"===o.type&&_.setShape("r",f),p[r]=_);var w=kk[o.type](n,r),b=Qc(e,w,o);ar(_,{shape:b},s,r)}var S=a.getItemGraphicEl(v);if(!n.hasValue(r))return void i.remove(S);if(l){var M=Ck[o.type](u,x);if(M)return void i.remove(S)}S?ar(S,{shape:x},s,r):S=Lk[o.type](r,x,e,s,!0,h),n.setItemGraphicEl(r,S),i.add(S),Yc(S,n,r,y,x,t,e,"polar"===o.type)}).remove(function(t){var e=a.getItemGraphicEl(t);"cartesian2d"===o.type?e&&Zc(t,s,e):e&&Xc(t,s,e)}).execute();var v=this._backgroundGroup||(this._backgroundGroup=new xM);v.removeAll();for(var y=0;y<p.length;++y)v.add(p[y]);i.add(v),this._backgroundEls=p,this._data=n},_renderLarge:function(t){this._clear(),qc(t,this.group);var e=t.get("clip",!0)?Wc(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){this._removeBackground(),qc(e,this.group,!0)},dispose:G,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,i=this._data;t&&t.get("animation")&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(e){"sector"===e.type?Xc(e.dataIndex,t,e):Zc(e.dataIndex,t,e)})):e.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}});var Ak=Math.max,Dk=Math.min,Ck={cartesian2d:function(t,e){var i=e.width<0?-1:1,n=e.height<0?-1:1;0>i&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height);var a=Ak(e.x,t.x),o=Dk(e.x+e.width,t.x+t.width),r=Ak(e.y,t.y),s=Dk(e.y+e.height,t.y+t.height);e.x=a,e.y=r,e.width=o-a,e.height=s-r;var l=e.width<0||e.height<0;return 0>i&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height),l},polar:function(t,e){var i=e.r0<=e.r?1:-1;if(0>i){var n=e.r;e.r=e.r0,e.r0=n}var n=Dk(e.r,t.r),a=Ak(e.r0,t.r0);e.r=n,e.r0=a;var o=0>n-a;if(0>i){var n=e.r;e.r=e.r0,e.r0=n}return o}},Lk={cartesian2d:function(t,e,i,n,a){var o=new UT({shape:r({},e),z2:1});if(o.name="item",n){var s=o.shape,l=i?"height":"width",u={};s[l]=0,u[l]=e[l],vA[a?"updateProps":"initProps"](o,{shape:u},n,t)}return o},polar:function(t,e,i,n,a,o){var r=e.startAngle<e.endAngle,l=!i&&o?Mk:BT,u=new l({shape:s({clockwise:r},e),z2:1});if(u.name="item",n){var h=u.shape,c=i?"r":"endAngle",d={};h[c]=i?0:e.startAngle,d[c]=e[c],vA[a?"updateProps":"initProps"](u,{shape:d},n,t)}return u}},kk={ca
|
||
|
}if(!l){var h=o.get("itemStyle.borderColor");null!=r&&n.setItemVisual(r,"borderColor",h)}})}}},wP=Math.PI/180,bP=function(t,e,i,n,a,o){var r,s,l=t.getData(),u=[],h=!1,c=(t.get("minShowLabelAngle")||0)*wP;l.each(function(n){var o=l.getItemLayout(n),d=l.getItemModel(n),f=d.getModel("label"),p=f.get("position")||d.get("emphasis.label.position"),g=f.get("distanceToLabelLine"),m=f.get("alignTo"),v=Ir(f.get("margin"),i),y=f.get("bleedMargin"),x=f.getFont(),_=d.getModel("labelLine"),w=_.get("length");w=Ir(w,i);var b=_.get("length2");if(b=Ir(b,i),!(o.angle<c)){var S,M,I,T,A=(o.startAngle+o.endAngle)/2,D=Math.cos(A),C=Math.sin(A);r=o.cx,s=o.cy;var L=t.getFormattedLabel(n,"normal")||l.getName(n),k=Ui(L,x,T,"top"),P="inside"===p||"inner"===p;if("center"===p)S=o.cx,M=o.cy,T="center";else{var O=(P?(o.r+o.r0)/2*D:o.r*D)+r,N=(P?(o.r+o.r0)/2*C:o.r*C)+s;if(S=O+3*D,M=N+3*C,!P){var z=O+D*(w+e-o.r),R=N+C*(w+e-o.r),E=z+(0>D?-1:1)*b,B=R;S="edge"===m?0>D?a+v:a+i-v:E+(0>D?-g:g),M=B,I=[[O,N],[z,R],[E,B]]}T=P?"center":"edge"===m?D>0?"right":"left":D>0?"left":"right"}var V,G=f.get("rotate");V="number"==typeof G?G*(Math.PI/180):G?0>D?-A+Math.PI:-A:0,h=!!V,o.label={x:S,y:M,position:p,height:k.height,len:w,len2:b,linePoints:I,textAlign:T,verticalAlign:"middle",rotation:V,inside:P,labelDistance:g,labelAlignTo:m,labelMargin:v,bleedMargin:y,textRect:k,text:L,font:x},P||u.push(o.label)}}),!h&&t.get("avoidLabelOverlap")&&af(u,r,s,e,i,n,a,o)},SP=2*Math.PI,MP=Math.PI/180,IP=function(t,e,i){e.eachSeriesByType(t,function(t){var e=t.getData(),n=e.mapDimension("value"),a=rf(t,i),o=t.get("center"),r=t.get("radius");_(r)||(r=[0,r]),_(o)||(o=[o,o]);var s=Ir(a.width,i.getWidth()),l=Ir(a.height,i.getHeight()),u=Math.min(s,l),h=Ir(o[0],s)+a.x,c=Ir(o[1],l)+a.y,d=Ir(r[0],u/2),f=Ir(r[1],u/2),p=-t.get("startAngle")*MP,g=t.get("minAngle")*MP,m=0;e.each(n,function(t){!isNaN(t)&&m++});var v=e.getSum(n),y=Math.PI/(v||m)*2,x=t.get("clockwise"),w=t.get("roseType"),b=t.get("stillShowZeroSum"),S=e.getDataExtent(n);S[0]=0;var M=SP,I=0,T=p,A=x?1:-1;if(e.each(n,function(t,i){var n;if(isNaN(t))return void e.setItemLayout(i,{angle:0/0,startAngle:0/0,endAngle:0/0,clockwise:x,cx:h,cy:c,r0:d,r:w?0/0:f,viewRect:a});n="area"!==w?0===v&&b?y:t*y:SP/m,g>n?(n=g,M-=g):I+=t;var o=T+A*n;e.setItemLayout(i,{angle:n,startAngle:T,endAngle:o,clockwise:x,cx:h,cy:c,r0:d,r:w?Mr(t,S,[d,f]):f,viewRect:a}),T=o}),SP>M&&m)if(.001>=M){var D=SP/m;e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i);n.angle=D,n.startAngle=p+A*i*D,n.endAngle=p+A*(i+1)*D}})}else y=M/I,T=p,e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i),a=n.angle===g?g:t*y;n.startAngle=T,n.endAngle=T+A*a,T+=A*a}});bP(t,f,a.width,a.height,a.x,a.y)})},TP=function(t){return{seriesType:t,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(i&&i.length){var n=t.getData();n.filterSelf(function(t){for(var e=n.getName(t),a=0;a<i.length;a++)if(!i[a].isSelected(e))return!1;return!0})}}}};xP("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),Nu(_P("pie")),Ou(x(IP,"pie")),Du(TP("pie")),CD.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(){return _h(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});var AP=4,DP=xo({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(t,e){var i=e.points,n=e.size,a=this.symbolProxy,o=a.shape,r=t.getContext?t.getContext():t,s=r&&n[0]<AP;if(!s)for(var l=0;l<i.length;){var u=i[l++],h=i[l++];isNaN(u)||isNaN(h)||(!t
|
||
|
};iO.prototype={constructor:iO,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),t=t||{},b(t)&&(t={order:t});var n,a=t.order||"preorder",o=this[t.attr||"children"];"preorder"===a&&(n=e.call(i,this));for(var r=0;!n&&r<o.length;r++)o[r].eachNode(t,e,i);"postorder"===a&&e.call(i,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(t+1),n.height>e&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;n>e;e++){var a=i[e].getNodeById(t);if(a)return a}},contains:function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;n>e;e++){var a=i[e].contains(t);if(a)return a}},getAncestors:function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e=this.hostTree,i=e.data.getItemModel(this.dataIndex);return i.getModel(t)}},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},Ef.prototype={constructor:Ef,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;n>i;i++)e[i].dataIndex=-1;for(var i=0,n=t.count();n>i;i++)e[t.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},Ef.createTree=function(t,e,i){function n(t,e){var i=t.value;r=Math.max(r,_(i)?i.length:1),o.push(t);var s=new iO(t.name,a);e?Bf(s,e):a.root=s,a._nodes.push(s);var l=t.children;if(l)for(var u=0;u<l.length;u++)n(l[u],s)}var a=new Ef(e),o=[],r=1;n(t),a.root.updateDepthAndHeight(0);var s=gL(o,{coordDimensions:["value"],dimensionsCount:r}),l=new dL(s,e);return l.initData(o),i&&i(l),Cf({mainData:l,struct:a,structAttr:"tree"}),a.update(),a},CD.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){function e(t){t.wrapMethod("getItemModel",function(t,e){var i=o.getNodeByDataIndex(e);return i.children.length&&i.isExpand||(t.parentModel=a),t})}var i={name:t.name,children:t.data},n=t.leaves||{},a=new vr(n,this,this.ecModel),o=Ef.createTree(i,this,e),r=0;o.eachNode("preorder",function(t){t.depth>r&&(r=t.depth)});var s=t.expandAndCollapse,l=s&&t.initialTreeDepth>=0?t.initialTreeDepth:r;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=l}),o.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),a=n.getValue(),o=n.name;n&&n!==i;)o=n.parentNode.name+"."+o,n=n.parentNode;return Hr(o+(isNaN(a)||null==a?"":" : "+a))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},
|
||
|
Jr(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:KO,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");Lu({type:$O,update:"updateView"},function(t,e){function i(e){var i=Ap(t,[$O],e);if(i){var n=e.getViewRoot();n&&(t.direction=Cp(n,i.node)?"rollUp":"drillDown"),e.resetViewRoot(i.node)}}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var JO="sunburstHighlight";Lu({type:JO,update:"updateView"},function(t,e){function i(e){var i=Ap(t,[JO],e);i&&(t.highlight=i.node)}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var QO="sunburstUnhighlight";Lu({type:QO,update:"updateView"},function(t,e){function i(){t.unhighlight=!0}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var tN=Math.PI/180,eN=function(t,e,i){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");_(n)||(n=[0,n]),_(e)||(e=[e,e]);var a=i.getWidth(),o=i.getHeight(),r=Math.min(a,o),s=Ir(e[0],a),l=Ir(e[1],o),u=Ir(n[0],r/2),h=Ir(n[1],r/2),c=-t.get("startAngle")*tN,d=t.get("minAngle")*tN,p=t.getData().tree.root,g=t.getViewRoot(),m=g.depth,v=t.get("sort");null!=v&&Sg(g,v);var y=0;f(g.children,function(t){!isNaN(t.getValue())&&y++});var x=g.getValue(),w=Math.PI/(x||y)*2,b=g.depth>0,S=g.height-(b?-1:1),M=(h-u)/(S||1),I=t.get("clockwise"),T=t.get("stillShowZeroSum"),A=I?1:-1,D=function(t,e){if(t){var i=e;if(t!==p){var n=t.getValue(),a=0===x&&T?w:n*w;d>a&&(a=d),i=e+A*a;var o=t.depth-m-(b?-1:1),h=u+M*o,c=u+M*(o+1),g=t.getModel();null!=g.get("r0")&&(h=Ir(g.get("r0"),r/2)),null!=g.get("r")&&(c=Ir(g.get("r"),r/2)),t.setLayout({angle:a,startAngle:e,endAngle:i,clockwise:I,cx:s,cy:l,r0:h,r:c})}if(t.children&&t.children.length){var v=0;f(t.children,function(t){v+=D(t,e+v)})}return i-e}};if(b){var C=u,L=u+M,k=2*Math.PI;p.setLayout({angle:k,startAngle:c,endAngle:c+k,clockwise:I,cx:s,cy:l,r0:C,r:L})}D(g,c)})};Nu(x(_P,"sunburst")),Ou(x(eN,"sunburst")),Du(x(TP,"sunburst"));for(var iN=[126,25],nN=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],aN=0;aN<nN.length;aN++)for(var oN=0;oN<nN[aN].length;oN++)nN[aN][oN][0]/=10.5,nN[aN][oN][1]/=-14,nN[aN][oN][0]+=iN[0],nN[aN][oN][1]+=iN[1];var rN=function(t,e){"china"===t&&e.push(new lc("南海诸岛",p(nN,function(t){return{type:"polygon",exterior:t}}),iN))},sN={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]},lN=function(t,e){if("china"===t){var i=sN[e.name];if(i){var n=e.center;n[0]+=i[0]/10.5,n[1]+=-i[1]/14}}},uN={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},hN=function(t,e){if("world"===t){var i=uN[e.name];if(i){var n=e.center;n[0]=i[0],n[1]=i[1]}}},cN=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],dN=function(t,e){"china"===t&&"台湾"===e.name&&e.geometries.push({type:"polygon",exterior:cN[0]})},fN=ca(),pN={load:function(t,e,i){var n=fN(e).parsed;if(n)return n;var a,o=e.specialAreas||{},r=e.geoJSON;try{a=r?ak(r,i):[]}catch(s){throw new Error("Invalid geoJson format\n"+s
|
||
|
},dispose:function(){}});var WN="lineStyle.opacity".split("."),HN={seriesType:"lines",reset:function(t){function e(t,e){var i=t.getItemModel(e),n=om(i.getShallow("symbol",!0)),a=om(i.getShallow("symbolSize",!0)),o=i.get(WN);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=om(t.get("symbol")),n=om(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(WN)),{dataEach:a.hasItemOption?e:null}}};Ou(FN),Nu(HN);var ZN=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},XN=ZN.prototype;XN.type="graph",XN.isDirected=function(){return this._directed},XN.addNode=function(t,e){t=null==t?""+e:""+t;var i=this._nodesMap;if(!i[rm(t)]){var n=new sm(t,e);return n.hostGraph=this,this.nodes.push(n),i[rm(t)]=n,n}},XN.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},XN.getNodeById=function(t){return this._nodesMap[rm(t)]},XN.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]),sm.isInstance(t)||(t=n[rm(t)]),sm.isInstance(e)||(e=n[rm(e)]),t&&e){var o=t.id+"-"+e.id,r=new lm(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}},XN.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},XN.getEdge=function(t,e){sm.isInstance(t)&&(t=t.id),sm.isInstance(e)&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},XN.eachNode=function(t,e){for(var i=this.nodes,n=i.length,a=0;n>a;a++)i[a].dataIndex>=0&&t.call(e,i[a],a)},XN.eachEdge=function(t,e){for(var i=this.edges,n=i.length,a=0;n>a;a++)i[a].dataIndex>=0&&i[a].node1.dataIndex>=0&&i[a].node2.dataIndex>=0&&t.call(e,i[a],a)},XN.breadthFirstTraverse=function(t,e,i,n){if(sm.isInstance(e)||(e=this._nodesMap[rm(e)]),e){for(var a="out"===i?"outEdges":"in"===i?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!t.call(n,e,null))for(var r=[e];r.length;)for(var s=r.shift(),l=s[a],o=0;o<l.length;o++){var u=l[o],h=u.node1===s?u.node2:u.node1;if(!h.__visited){if(t.call(n,h,s))return;r.push(h),h.__visited=!0}}}},XN.update=function(){for(var t=this.data,e=this.edgeData,i=this.nodes,n=this.edges,a=0,o=i.length;o>a;a++)i[a].dataIndex=-1;for(var a=0,o=t.count();o>a;a++)i[t.getRawIndex(a)].dataIndex=a;e.filterSelf(function(t){var i=n[e.getRawIndex(t)];return i.node1.dataIndex>=0&&i.node2.dataIndex>=0});for(var a=0,o=n.length;o>a;a++)n[a].dataIndex=-1;for(var a=0,o=e.count();o>a;a++)n[e.getRawIndex(a)].dataIndex=a},XN.clone=function(){for(var t=new ZN(this._directed),e=this.nodes,i=this.edges,n=0;n<e.length;n++)t.addNode(e[n].id,e[n].dataIndex);for(var n=0;n<i.length;n++){var a=i[n];t.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return t},sm.prototype={constructor:sm,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,i=e.data.getItemModel(this.dataIndex);return i.getModel(t)}}},lm.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,i=e.edgeData.getItemModel(this.dataIndex);return i.getModel(t)}};var UN=function(t,e){return{getValue:function(i){var n=this[t][e];return n.get(n.getDimension(i||"value"),this.dataIndex)},setVisual:function(i,n){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){retur
|
||
|
var a=this._axisGroup;if(this._axisGroup=new xM,this.group.add(this._axisGroup),t.get("show")){var o=Lv(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 zk(t,d);f(uR,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(d,l,t,o,u,i);var g=n&&n.animation===!1?null:t;ur(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=Ti.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:Mv(u),isTargetByCursor:Tv(u,o,n),getLinearBrushOtherExtent:Iv(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(Cv(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()}}),cR=5;Bu({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},f(dR,function(t,e){i.getZr().on(e,this._handlers[e]=y(t,this))},this)),Sl(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 dR={mousedown:function(t){kv(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(kv(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>cR)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&&kv(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})}}};Au(Nz),CD.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(){var t=this.getSource();return Pv(t,this),_h(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 fR=.3,pR=(vl.extend({type:"parallel",init:function(){this._dataGroup=new xM,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,i,n){function a(t){var e=Rv(l,s,t,c,h);Bv(e,l,t,d)}function o(e,i){var a=u.getItemGraphicEl(i),o=zv(l,e,c,h);l.setItemGraphicEl(e,a);var r=n&&n.animation===!1?null:t;ar(a,{shape:{points:o}},r,e),Bv(a,l,e,d)}function r(t){var e=u.getItemGraphicEl(t);s.remove(e)}var s=this._dataGroup,l=t.getData(),u=this._data,h=t.coordinateSystem,c=h.dimensions,d=Ev(t);if(l.diff(u).add(a).update(o).remove(r).execute(),!this._initialized){this._initialized=!0;var f=Nv(h,t,function(){setTimeout(function(){s.removeClipPath()})});s.setClipPath(f)}this._data=l},incrementalPrepareRender:function(){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e){for(var i=e.getData(),n=e.coordinateSystem,a=n.dimensions,o=Ev(e),r=t.start;r<t.end;r++){var s=Rv(i,this._dataGroup,r,a,n);s.incremental=!0,Bv(s,i,r,o
|
||
|
},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(Hy(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(Hy(n)),ZR(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){var t=this._handle;if(t){var e=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},_onHandleDragEnd:function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}},Vy.prototype.constructor=Vy,_a(Vy);var YR=Vy.extend({makeElOption:function(t,e,i,n,a){var o=i.axis,r=o.grid,s=n.get("type"),l=tx(r,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=Xy(n),c=jR[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=Sd(r.model,i);Ky(e,t,d,i,n,a)},getHandleTransform:function(t,e,i){var n=Sd(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:qy(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i){var n=i.axis,a=n.grid,o=n.getGlobalExtent(!0),r=tx(a,n).getOtherAxis(n).getGlobalExtent(),s="x"===n.dim?0:1,l=t.position;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]}}}),jR={line:function(t,e,i){var n=$y([e,i[0]],[e,i[1]],ex(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),a=i[1]-i[0];return{type:"Rect",shape:Jy([e-n/2,i[0]],[n,a],ex(t))}}};Wk.registerAxisPointerClass("CartesianAxisPointer",YR),Au(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!_(e)&&(t.axisPointer.link=[e])}}),Du(OC.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=hd(t,e)}),Lu({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},GR);var qR=["x","y"],KR=["width","height"],$R=Vy.extend({makeElOption:function(t,e,i,n,a){var o=i.axis,r=o.coordinateSystem,s=nx(r,1-ix(o)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=Xy(n),c=JR[u](o,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=_y(i);Ky(e,t,d,i,n,a)},getHandleTransform:function(t,e,i){var n=_y(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:qy(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=ix(n),r=nx(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=nx(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"}}}}),JR={line:function(t,e,i){var n=$y([e,i[0]],[e,i[1]],ix(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,i){var n=t.getBandWidth(),a=i[1]-i[0];return{type:"Rect",shape:Jy([e-n/2,i[0]],[n,a],ix(t))}}};Wk.registerAxisPointerClass("SingleAxisPointer",$R),Bu({type:"single"});var QR=2,tE=CD.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(){tE.superApply(this,"init",arguments),this.legendVisualProvider=new Jd(y(this.getData,this),y(this.getRawData,this))},fixData:function(t){var e=t.length,i={},n=va(t,function(t){return i.hasOwnProperty(t[0])||(i[t[0]]=-1),t[2]}),a=[];n.buckets.each(f
|
||
|
},_renderYearText:function(t,e,i,n){var a=t.getModel("yearLabel");if(a.get("show")){var o=a.get("margin"),r=a.get("position");r||(r="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=a.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new NT({z2:30});jo(m.style,a,{text:g}),m.attr(this._yearTextPositionControl(m,c[r],i,r,o)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,a){var o="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=a,e&&(o="center"),"start"===n&&(r="bottom")):(s+=a,e&&(r="middle"),"start"===n&&(o="right")),{x:s,y:l,textAlign:o,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var a=n.get("nameMap"),o=n.get("margin"),s=n.get("position"),l=n.get("align"),u=[this._tlpoints,this._blpoints];b(a)&&(a=PE[a.toUpperCase()]||[]);var h="start"===s?0:1,c="horizontal"===e?0:1;o="start"===s?-o:o;for(var d="center"===l,f=0;f<u[h].length-1;f++){var p=u[h][f].slice(),g=this._firstDayOfMonth[f];if(d){var m=this._firstDayPoints[f];p[c]=(m[c]+u[0][f+1][c])/2}var v=n.get("formatter"),y=a[+g.m-1],x={yyyy:g.y,yy:(g.y+"").slice(2),MM:g.m,M:+g.m,nameMap:y},_=this._formatterLabel(v,x),w=new NT({z2:30});r(jo(w.style,n,{text:_}),this._monthTextPositionControl(p,d,e,s,o)),i.add(w)}}},_weekTextPositionControl:function(t,e,i,n,a){var o="center",r="middle",s=t[0],l=t[1],u="start"===i;return"horizontal"===e?(s=s+n+(u?1:-1)*a[0]/2,o=u?"right":"left"):(l=l+n+(u?1:-1)*a[1]/2,r=u?"bottom":"top"),{x:s,y:l,textAlign:o,textVerticalAlign:r}},_renderWeekText:function(t,e,i,n){var a=t.getModel("dayLabel");if(a.get("show")){var o=t.coordinateSystem,s=a.get("position"),l=a.get("nameMap"),u=a.get("margin"),h=o.getFirstDayOfWeek();b(l)&&(l=OE[l.toUpperCase()]||[]);var c=o.getNextNDay(e.end.time,7-e.lweek).time,d=[o.getCellWidth(),o.getCellHeight()];u=Ir(u,d["horizontal"===i?0:1]),"start"===s&&(c=o.getNextNDay(e.start.time,-(7+e.fweek)).time,u=-u);for(var f=0;7>f;f++){var p=o.getNextNDay(c,f),g=o.dataToRect([p.time],!1).center,m=f;m=Math.abs((f+h)%7);var v=new NT({z2:30});r(jo(v.style,a,{text:l[m]}),this._weekTextPositionControl(g,i,s,u,d)),n.add(v)}}}}),Eu({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Bu({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,a=t.getModel("textStyle"),o=t.getModel("subtextStyle"),r=t.get("textAlign"),s=C(t.get("textBaseline"),t.get("textVerticalAlign")),l=new NT({style:jo({},a,{text:t.get("text"),textFill:a.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new NT({style:jo({},o,{text:h,textFill:o.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){Jr(d,"_"+t.get("target"))}),f&&c.on("click",function(){Jr(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=es(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.ma
|
||
|
var lB=function(t,e,i,o){var s=t.getData(),l=o.type;if(!_(o)&&("min"===l||"max"===l||"average"===l||"median"===l||null!=o.xAxis||null!=o.yAxis)){var u,h;if(null!=o.yAxis||null!=o.xAxis)u=e.getAxis(null!=o.yAxis?"y":"x"),h=D(o.yAxis,o.xAxis);else{var c=H_(o,s,e,t);u=c.valueAxis;var d=xh(s,c.valueDataDim);h=Y_(s,d,l)}var f="x"===u.dim?0:1,p=1-f,g=n(o),m={};g.type=null,g.coord=[],m.coord=[],g.coord[p]=-1/0,m.coord[p]=1/0;var v=i.get("precision");v>=0&&"number"==typeof h&&(h=+h.toFixed(Math.min(v,20))),g.coord[f]=m.coord[f]=h,o=[g,m,{type:l,valueIndex:o.valueIndex,value:h}]}return o=[W_(t,o[0]),W_(t,o[1]),r({},o[2])],o[2].type=o[2].type||"",a(o[2],o[0]),a(o[2],o[1]),o};sB.extend({type:"markLine",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),a=e.__from,o=e.__to;a.each(function(e){Q_(a,e,!0,t,i),Q_(o,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[a.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function a(e,i,a){var o=e.getItemModel(i);Q_(e,i,a,t,n),e.setItemVisual(i,{symbolRotate:o.get("symbolRotate"),symbolSize:o.get("symbolSize")||g[a?0:1],symbol:o.get("symbol",!0)||p[a?0:1],color:o.get("itemStyle.color")||s.getVisual("color")})}var o=t.coordinateSystem,r=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(r)||l.set(r,new jg);this.group.add(u.group);var h=tw(o,t,e),c=h.from,d=h.to,f=h.line;e.__from=c,e.__to=d,e.setData(f);var p=e.get("symbol"),g=e.get("symbolSize");_(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),h.from.each(function(t){a(c,t,!0),a(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolRotate:c.getItemVisual(t,"symbolRotate"),fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolRotate:d.getItemVisual(t,"symbolRotate"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),u.updateData(f),h.line.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),Au(function(t){t.markLine=t.markLine||{}}),nB.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var uB=function(t,e,i,n){var a=W_(t,n[0]),r=W_(t,n[1]),s=D,l=a.coord,u=r.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),u[0]=s(u[0],1/0),u[1]=s(u[1],1/0);var h=o([{},a,r]);return h.coord=[a.coord,r.coord],h.x0=a.x,h.y0=a.y,h.x1=r.x,h.y1=r.y,h},hB=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];sB.extend({type:"markArea",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each(function(e){var a=p(hB,function(a){return aw(n,e,a,t,i)});n.setItemLayout(e,a);var o=n.getItemGraphicEl(e);o.setShape("points",a)})}},this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,o=t.id,r=t.getData(),l=this.markerGroupMap,u=l.get(o)||l.set(o,{group:new xM});this.group.add(u.group),u.__keep=!0;var h=ow(a,t,e);e.setData(h),h.each(function(e){var i=p(hB,function(i){return aw(h,e,i,t,n)}),o=!0;f(hB,function(t){if(o){var i=h.get(t[0],e),n=h.get(t[1],e);(ew(i)||a.getAxis("x").containData(i))&&(ew(n)||a.getAxis("y").containData(n))&&(o=!1)}}),h.setItemLayout(e,{points:i,allClipped:o}),h.setItemVisual(e,{color:r.getVisual("color")})}),h.diff(u.__data).add(function(t){var e=h.getItemLayout(t);if(!e.allClipped){var i=new WT({shape:{points:e.points}});h.setItemGraphicEl(t,i),u.group.add(i)}}).update(function(t,i){var n=u.__data.getItemGraphicEl(i),a=h.getItemLayout(t);a.allClipped?n&&u.group.remove(n):(n?ar(n,{shape:{points:a.points}},e,t):n=new WT({shape:{points:a.points}}),h.setItemGraphicEl(t,n),u.group.add(n))}).remove(function(t){var e=u.__data.getItemGraphicEl(t);u.group.remove(e)}).execute(),h.eachItemGraphicEl(function(t,i){var n=h.getItemModel(i),a=n.g
|
||
|
}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(OB(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});Du({getTargetSeries:function(t){var e=B();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){var a=n.getAxisProxy(t.name,i);f(a.getTargetSeriesModels(),function(t){e.set(t.uid,t)})})}),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).reset(n,e)}),t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).filterData(n,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})})}}),Lu("dataZoom",function(t,e){var i=gw(y(e.eachComponent,e,"dataZoom"),wB,function(t,e){return t.get(e.axisIndex)}),n=[];e.eachComponent({mainType:"dataZoom",query:t},function(t){n.push.apply(n,i(t).nodes)}),f(n,function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})}),AB.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var WB="\x00_ec_dataZoom_roams",HB=y,ZB=DB.extend({type:"dataZoom.inside",init:function(){this._range},render:function(t,e,i){ZB.superApply(this,"render",arguments),this._range=t.getPercentRange(),f(this.getTargetCoordInfo(),function(e,n){var a=p(e,function(t){return Tw(t.model)});f(e,function(e){var o=e.model,r={};f(["pan","zoom","scrollMove"],function(t){r[t]=HB(XB[t],this,e,n)},this),Mw(i,{coordId:Tw(o),allCoordIds:a,containsPoint:function(t,e,i){return o.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,dataZoomModel:t,getRange:r})},this)},this)},dispose:function(){Iw(this.api,this.dataZoomModel.id),ZB.superApply(this,"dispose",arguments),this._range=null}}),XB={zoom:function(t,e,i,n){var a=this._range,o=a.slice(),r=t.axisModels[0];if(r){var s=UB[e](null,[n.originX,n.originY],r,i,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/n.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return Rz(0,o,[0,100],0,h.minSpan,h.maxSpan),this._range=o,a[0]!==o[0]||a[1]!==o[1]?o:void 0}},pan:Pw(function(t,e,i,n,a,o){var r=UB[n]([o.oldX,o.oldY],[o.newX,o.newY],e,a,i);return r.signal*(t[1]-t[0])*r.pixel/r.pixelLength}),scrollMove:Pw(function(t,e,i,n,a,o){var r=UB[n]([0,0],[o.scrollDelta,o.scrollDelta],e,a,i);return r.signal*(t[1]-t[0])*o.scrollDelta})},UB={grid:function(t,e,i,n,a){var o=i.axis,r={},s=a.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=o.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=o.inverse?-1:1),r},polar:function(t,e,i,n,a){var o=i.axis,r={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=o.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=u[1]-u[0],r.pixelStart=u[0],r.signal=o.inverse?-1:1),r},singleAxis:function(t,e,i,n,a){var o=i.axis,r=a.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=o.inverse?-1:1),s}},YB=["rect","polygon","keep","clear"],jB=function(t,e){var i=t&&t.brush;if(_(i)||(i=i?[i]:[]),i.length){var n=[];f(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolb
|
||
|
}}),GV={type:"selectDataRange",event:"dataRangeSelected",update:"update"};Lu(GV,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),Au(yV);{var FV=CV.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){FV.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();WV[this._mode].call(this),this._resetSelected(t,e);var a=this.option.categories;this.resetVisual(function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=n(a)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=p(this._pieceList,function(t){var t=n(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function t(t,e,i){return t&&t[e]&&(S(t[e])?t[e].hasOwnProperty(i):t[e]===i)}var e=this.option,i={},n=kO.listVisualTypes(),a=this.isCategory();f(e.pieces,function(t){f(n,function(e){t.hasOwnProperty(e)&&(i[e]=1)})}),f(i,function(i,n){var o=0;f(this.stateList,function(i){o|=t(e,i,n)||t(e.target,i,n)},this),!o&&f(this.stateList,function(t){(e[t]||(e[t]={}))[n]=_V.get(n,"inRange"===t?"active":"inactive",a)})},this),CV.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,a=(e?i:t).selected||{};if(i.selected=a,f(n,function(t){var e=this.getSelectedMapKey(t);a.hasOwnProperty(e)||(a[e]=!0)},this),"single"===i.selectedMode){var o=!1;f(n,function(t){var e=this.getSelectedMapKey(t);a[e]&&(o?a[e]=!1:o=!0)},this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=n(t)},getValueState:function(t){var e=kO.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],a=i.getData();a.each(this.getDataDimension(a),function(e,i){var a=kO.findPieceIndex(e,this._pieceList);a===t&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&1/0===i[1]?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){function e(e,o){var r=a.getRepresentValue({interval:e});o||(o=a.getValueState(r));var s=t(r,o);e[0]===-1/0?n[0]=s:1/0===e[1]?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.isCategory()){var i=[],n=[],a=this,o=this._pieceList.slice();if(o.length){var r=o[0].interval[0];r!==-1/0&&o.unshift({interval:[-1/0,r]}),r=o[o.length-1].interval[1],1/0!==r&&o.push({interval:[r,1/0]})}else o.push({interval:[-1/0,1/0]});var s=-1/0;return f(o,function(t){var i=t.interval;i&&(i[0]>s&&e([s,i[0]],"outOfRange"),e(i.slice()),s=i[1])},this),{stops:i,outerColors:n}}}}),WV={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),a=t.splitNumber;a=Math.max(parseInt(a,10),1),t.splitNumber=a;for(var o=(n[1]-n[0])/a;+o.toFixed(i)!==o&&5>i;)i++;t.precision=i,o=+o.toFixed(i),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var r=0,s=n[0];a>r;s+=o,r++){var l=r===a-1?n[1]:s+o;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[n[1],1/0],close:[0,0]}),Vr(e),f(e,function(t,e){t.index=e,t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;f(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),yb(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;f(t.pieces,function(t,i){S(t)||(t={value:t});var n={text
|
||
|
}},eF=function(t){zG(t,this._textVmlEl),this._textVmlEl=null},iF=function(t){NG(t,this._textVmlEl)},nF=[qM,Dn,Cn,ao,NT],aF=0;aF<nF.length;aF++){var oF=nF[aF].prototype;oF.drawRectText=tF,oF.removeRectText=eF,oF.appendRectText=iF}NT.prototype.brushVML=function(t){var e=this.style;null!=e.text?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},NT.prototype.onRemove=function(t){this.removeRectText(t)},NT.prototype.onAdd=function(t){this.appendRectText(t)}}tS.prototype={constructor:tS,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();return t?{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}:void 0},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,i=0;i<t.length;i++){var n=t[i];n.invisible||n.ignore?(n.__alreadyNotVisible||n.onRemove(e),n.__alreadyNotVisible=!0):(n.__alreadyNotVisible&&n.onAdd(e),n.__alreadyNotVisible=!1,n.__dirty&&(n.beforeBrush&&n.beforeBrush(),(n.brushVML||n.brush).call(n,e),n.afterBrush&&n.afterBrush())),n.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){var t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;if(this._width!==t||this._height!==e){this._width=t,this._height=e;var i=this._vmlViewport.style;i.width=t+"px",i.height=e+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||Qb(e.width))-Qb(e.paddingLeft)-Qb(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||Qb(e.height))-Qb(e.paddingTop)-Qb(e.paddingBottom)|0}},f(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){tS.prototype[t]=eS(t)}),Qn("vml",tS),t.version=xC,t.dependencies=_C,t.PRIORITY=OC,t.init=_u,t.connect=wu,t.disConnect=bu,t.disconnect=QC,t.dispose=Su,t.getInstanceByDom=Mu,t.getInstanceById=Iu,t.registerTheme=Tu,t.registerPreprocessor=Au,t.registerProcessor=Du,t.registerPostUpdate=Cu,t.registerAction=Lu,t.registerCoordinateSystem=ku,t.getCoordinateSystemDimensions=Pu,t.registerLayout=Ou,t.registerVisual=Nu,t.registerLoading=Ru,t.extendComponentModel=Eu,t.extendComponentView=Bu,t.extendSeriesModel=Vu,t.extendChartView=Gu,t.setCanvasCreator=Fu,t.registerMap=Wu,t.getMap=Hu,t.dataTool=tL,t.zrender=vI,t.number=DA,t.format=zA,t.throttle=bl,t.helper=ik,t.matrix=FS,t.vector=IS,t.color=rM,t.parseGeoJSON=ak,t.parseGeoJson=lk,t.util=uk,t.graphic=hk,t.List=dL,t.Model=vr,t.Axis=sk,t.env=oS});
|