8 lines
243 KiB
JavaScript
8 lines
243 KiB
JavaScript
|
var define,require,esl;!function(t){function e(t){p(t,N)||(W[t]=1)}function i(t,e){function i(t){0===t.indexOf(".")&&s.push(t)}var s=[];if("string"==typeof t?i(t):O(t,function(t){i(t)}),s.length>0)throw new Error("[REQUIRE_FATAL]Relative ID is not allowed in global require: "+s.join(", "));var r=G.waitSeconds;return r&&t instanceof Array&&(P&&clearTimeout(P),P=setTimeout(o,1e3*r)),Y(t,e)}function o(){function t(n,a){if(!r[n]&&!p(n,N)){r[n]=1,p(n,B)||o[n]||(o[n]=1,e.push(n));var h=R[n];h?a&&(o[n]||(o[n]=1,e.push(n)),O(h.depMs,function(e){t(e.absId,e.hard)})):s[n]||(s[n]=1,i.push(n))}}var e=[],i=[],o={},s={},r={};for(var n in W)t(n,1);if(e.length||i.length)throw new Error("[MODULE_TIMEOUT]Hang( "+(e.join(", ")||"none")+" ) Miss( "+(i.join(", ")||"none")+" )")}function s(t){O(Z,function(e){a(t,e.deps,e.factory)}),Z.length=0}function r(t,e,i){if(null==i&&(null==e?(i=t,t=null):(i=e,e=null,t instanceof Array&&(e=t,t=null))),null!=i){var o=window.opera;if(!t&&document.attachEvent&&(!o||"[object Opera]"!==o.toString())){var s=E();t=s&&s.getAttribute("data-require-id")}t?a(t,e,i):Z[0]={deps:e,factory:i}}}function n(){var t=G.config[this.id];return t&&"object"==typeof t?t:{}}function a(t,e,i){R[t]||(R[t]={id:t,depsDec:e,deps:e||["require","exports","module"],factoryDeps:[],factory:i,exports:{},config:n,state:D,require:C(t),depMs:[],depMkv:{},depRs:[]})}function h(t){var e=R[t];if(e&&!p(t,H)){var i=e.deps,o=e.factory,s=0;"function"==typeof o&&(s=Math.min(o.length,i.length),!e.depsDec&&o.toString().replace(/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,"").replace(/require\(\s*(['"'])([^'"]+)\1\s*\)/g,function(t,e,o){i.push(o)}));var r=[],n=[];O(i,function(i,o){var a,h,l=w(i),d=z(l.mod,t);d&&!F[d]?(l.res&&(h={id:i,mod:d,res:l.res},n.push(i),e.depRs.push(h)),a=e.depMkv[d],a||(a={id:l.mod,absId:d,hard:s>o},e.depMs.push(a),e.depMkv[d]=a,r.push(d))):a={absId:d},s>o&&e.factoryDeps.push(h||a)}),e.state=H,c(t),y(r),n.length&&e.require(n,function(){O(e.depRs,function(e){e.absId||(e.absId=z(e.id,t))}),l()})}}function l(){for(var t in W)h(t),d(t),u(t)}function d(t){function e(t){if(h(t),!p(t,H))return!1;if(p(t,B)||i[t])return!0;i[t]=1;var o=R[t],s=!0;return O(o.depMs,function(t){return s=e(t.absId)}),s&&O(o.depRs,function(t){return s=!!t.absId}),s&&(o.state=B),s}var i={};e(t)}function c(e){function i(){if(!o&&s.state===B){o=1;var i=1;if(O(s.factoryDeps,function(t){var e=t.absId;return F[e]?void 0:(u(e),i=p(e,N))}),i){try{var r=s.factory,n="function"==typeof r?r.apply(t,g(s.factoryDeps,{require:s.require,exports:s.exports,module:s})):r;null!=n&&(s.exports=n),s.invokeFactory=null}catch(a){if(/^\[MODULE_MISS\]"([^"]+)/.test(a.message)){var h=s.depMkv[RegExp.$1];return h&&(h.hard=1),void(o=0)}throw a}m(e)}}}var o,s=R[e];s.invokeFactory=i}function p(t,e){return R[t]&&R[t].state>=e}function u(t){var e=R[t];e&&e.invokeFactory&&e.invokeFactory()}function g(t,e){var i=[];return O(t,function(t,o){"object"==typeof t&&(t=t.absId),i[o]=e[t]||R[t].exports}),i}function f(t,e){if(p(t,N))return void e();var i=q[t];i||(i=q[t]=[]),i.push(e)}function m(t){var e=R[t];e.state=N,delete W[t];for(var i=q[t]||[],o=i.length;o--;)i[o]();i.length=0,q[t]=null}function y(e,i,o){function s(){if("function"==typeof i&&!r){var o=1;O(e,function(t){return F[t]?void 0:o=!!p(t,N)}),o&&(r=1,i.apply(t,g(e,F)))}}var r=0;O(e,function(t){F[t]||p(t,N)||(f(t,s),(t.indexOf("!")>0?v:_)(t,o))}),s()}function _(e){function i(){var t=j[e];A(t||e,o)}function o(){if(n){var i;"function"==typeof n.init&&(i=n.init.apply(t,g(a,F))),null==i&&n.exports&&(i=t,O(n.exports.split("."),function(t){return i=i[t],!!i})),r(e,a,i||{})}else s(e);l()}if(!X[e]&&!R[e]){X[e]=1;var n=G.shim[e];n instanceof Array&&(G.shim[e]=n={deps:n});var a=n&&(n.deps||[]);a?(O(a,function(t){G.shim[t]||(G.shim[t]={})}),Y(a,i)):i()}}function v(t,e){function i(e){h.exports=e||!0,m(t)}function o(o){var s=e?R[e].require:Y;o.load(a.res,s,i,n.call({id:t}))}if(!R[t]){var r=j[t];if(r)return void _(r);var a=w(t),h={id:t,state:H};R[t]=h,i.fromText=function(t,e){new Function(e)(),s(t)},o(Y(a.mod))}}function x(t,e){var i=M(t,1,e);return i.sort(I)
|
||
|
}function o(t){return"undefined"!=typeof t.zrenderDelta&&t.zrenderDelta||"undefined"!=typeof t.wheelDelta&&t.wheelDelta||"undefined"!=typeof t.detail&&-t.detail}var s=t("../mixin/Eventful"),r="function"==typeof window.addEventListener?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};return{getX:e,getY:i,getDelta:o,stop:r,Dispatcher:s}}),define("zrender",["zrender/zrender"],function(t){return t}),define("zrender/zrender",["require","./tool/util","./tool/log","./tool/guid","./Handler","./Painter","./Storage","./animation/Animation","./tool/env"],function(t){function e(t){return function(){for(var e=t.animatingElements,i=0,o=e.length;o>i;i++)t.storage.mod(e[i].id);(e.length||t._needsRefreshNextFrame)&&t.refresh()}}var i=t("./tool/util"),o=t("./tool/log"),s=t("./tool/guid"),r=t("./Handler"),n=t("./Painter"),a=t("./Storage"),h=t("./animation/Animation"),l={},d={};d.version="1.0.0",d.init=function(t){var e=new c(s(),t);return l[e.id]=e,e},d.dispose=function(t){if(t)t.dispose();else{for(var e in l)l[e].dispose();l={}}return d},d.getInstance=function(t){return l[t]},d.delInstance=function(t){return delete l[t],d};var c=function(i,o){this.id=i,this.env=t("./tool/env"),this.storage=new a,this.painter=new n(o,this.storage),this.handler=new r(o,this.storage,this.painter),this.animatingElements=[],this.animation=new h({stage:{update:e(this)}}),this.animation.start();var s=this;this.painter.refreshNextFrame=function(){s.refreshNextFrame()},this._needsRefreshNextFrame=!1};return c.prototype.getId=function(){return this.id},c.prototype.addShape=function(t){return this.storage.addRoot(t),this},c.prototype.addGroup=function(t){return this.storage.addRoot(t),this},c.prototype.delShape=function(t){return this.storage.delRoot(t),this},c.prototype.delGroup=function(t){return this.storage.delRoot(t),this},c.prototype.modShape=function(t,e){return this.storage.mod(t,e),this},c.prototype.modGroup=function(t,e){return this.storage.mod(t,e),this},c.prototype.modLayer=function(t,e){return this.painter.modLayer(t,e),this},c.prototype.addHoverShape=function(t){return this.storage.addHover(t),this},c.prototype.render=function(t){return this.painter.render(t),this._needsRefreshNextFrame=!1,this},c.prototype.refresh=function(t){return this.painter.refresh(t),this._needsRefreshNextFrame=!1,this},c.prototype.refreshNextFrame=function(){return this._needsRefreshNextFrame=!0,this},c.prototype.refreshHover=function(t){return this.painter.refreshHover(t),this},c.prototype.refreshShapes=function(t,e){return this.painter.refreshShapes(t,e),this},c.prototype.resize=function(){return this.painter.resize(),this},c.prototype.animate=function(t,e,s){if("string"==typeof t&&(t=this.storage.get(t)),t){var r;if(e){for(var n=e.split("."),a=t,h=0,l=n.length;l>h;h++)a&&(a=a[n[h]]);a&&(r=a)}else r=t;if(!r)return void o('Property "'+e+'" is not existed in element '+t.id);var d=this.animatingElements;return"undefined"==typeof t.__aniCount&&(t.__aniCount=0),0===t.__aniCount&&d.push(t),t.__aniCount++,this.animation.animate(r,{loop:s}).done(function(){if(t.__aniCount--,0===t.__aniCount){var e=i.indexOf(d,t);d.splice(e,1)}})}o("Element not existed")},c.prototype.clearAnimation=function(){this.animation.clear()},c.prototype.showLoading=function(t){return this.painter.showLoading(t),this},c.prototype.hideLoading=function(){return this.painter.hideLoading(),this},c.prototype.getWidth=function(){return this.painter.getWidth()},c.prototype.getHeight=function(){return this.painter.getHeight()},c.prototype.toDataURL=function(t,e,i){return this.painter.toDataURL(t,e,i)},c.prototype.shapeToImage=function(t,e,i){var o=s();return this.painter.shapeToImage(o,t,e,i)},c.prototype.on=function(t,e,i){return this.handler.on(t,e,i),this},c.prototype.un=function(t,e){return this.handler.un(t,e),this},c.prototype.trigger=function(t,e){return this.handler.trigger(t,e),this},c.prototype.clear=function(){return this.storage.delRoot(),this.painter.clear(),this},c.prototype.dispose=function(){this.animation.stop(),this.clear(),this.sto
|
||
|
"cross"===this.option.tooltip.axisPointer.type&&this._showAxisTrigger(-1,-1,-1)},_findPolarTrigger:function(){if(!this.component.polar)return!1;var t,e=d.getX(this._event),i=d.getY(this._event),o=this.component.polar.getNearestIndex([e,i]);return o?(t=o.valueIndex,o=o.polarIndex):o=-1,-1!=o?this._showPolarTrigger(o,t):!1},_getNearestDataIndex:function(t,e){var i=-1,o=d.getX(this._event),s=d.getY(this._event);if("x"===t){for(var r,n,a=this.component.grid.getXend(),h=e.getCoordByIndex(i);a>h&&(n=h,o>=h);)r=h,h=e.getCoordByIndex(++i);return 0>=i?i=0:n-o>=o-r?i-=1:null==e.getNameByIndex(i)&&(i-=1),i}for(var l,c,p=this.component.grid.getY(),h=e.getCoordByIndex(i);h>p&&(l=h,h>=s);)c=h,h=e.getCoordByIndex(++i);return 0>=i?i=0:s-l>=c-s?i-=1:null==e.getNameByIndex(i)&&(i-=1),i},_showAxisTrigger:function(t,e,i){if(!this._event.connectTrigger&&this.messageCenter.dispatch(a.EVENT.TOOLTIP_IN_GRID,this._event,null,this.myChart),null==this.component.xAxis||null==this.component.yAxis||null==t||null==e)return clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),void(this._hidingTicket=setTimeout(this._hide,this._hideDelay));var o,s,r,n,h=this.option.series,l=[],c=[],p="";if("axis"===this.option.tooltip.trigger){if(!this.option.tooltip.show)return;s=this.option.tooltip.formatter,r=this.option.tooltip.position}var u,g,f=-1!=t&&this.component.xAxis.getAxis(t).type===a.COMPONENT_TYPE_AXIS_CATEGORY?"xAxis":-1!=e&&this.component.yAxis.getAxis(e).type===a.COMPONENT_TYPE_AXIS_CATEGORY?"yAxis":!1;if(f){var m="xAxis"==f?t:e;o=this.component[f].getAxis(m);for(var y=0,_=h.length;_>y;y++)this._isSelected(h[y].name)&&h[y][f+"Index"]===m&&"axis"===this.deepQuery([h[y],this.option],"tooltip.trigger")&&(n=this.query(h[y],"tooltip.showContent")||n,s=this.query(h[y],"tooltip.formatter")||s,r=this.query(h[y],"tooltip.position")||r,p+=this._style(this.query(h[y],"tooltip")),null!=h[y].stack&&"xAxis"==f?(l.unshift(h[y]),c.unshift(y)):(l.push(h[y]),c.push(y)));this.messageCenter.dispatch(a.EVENT.TOOLTIP_HOVER,this._event,{seriesIndex:c,dataIndex:i},this.myChart);var v;"xAxis"==f?(u=this.subPixelOptimize(o.getCoordByIndex(i),this._axisLineWidth),g=d.getY(this._event),v=[u,this.component.grid.getY(),u,this.component.grid.getYend()]):(u=d.getX(this._event),g=this.subPixelOptimize(o.getCoordByIndex(i),this._axisLineWidth),v=[this.component.grid.getX(),g,this.component.grid.getXend(),g]),this._styleAxisPointer(l,v[0],v[1],v[2],v[3],o.getGap(),u,g)}else u=d.getX(this._event),g=d.getY(this._event),this._styleAxisPointer(h,this.component.grid.getX(),g,this.component.grid.getXend(),g,0,u,g),i>=0?this._showItemTrigger(!0):(clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),this._tDom.style.display="none");if(l.length>0){if(this._lastItemTriggerId=-1,this._lastDataIndex!=i||this._lastSeriesIndex!=c[0]){this._lastDataIndex=i,this._lastSeriesIndex=c[0];var x,b;if("function"==typeof s){for(var T=[],y=0,_=l.length;_>y;y++)x=l[y].data[i],b=this.getDataFromOption(x,"-"),T.push({seriesIndex:c[y],seriesName:l[y].name||"",series:l[y],dataIndex:i,data:x,name:o.getNameByIndex(i),value:b,0:l[y].name||"",1:o.getNameByIndex(i),2:b,3:x});this._curTicket="axis:"+i,this._tDom.innerHTML=s.call(this.myChart,T,this._curTicket,this._setContent)}else if("string"==typeof s){this._curTicket=0/0,s=s.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}");for(var y=0,_=l.length;_>y;y++)s=s.replace("{a"+y+"}",this._encodeHTML(l[y].name||"")),s=s.replace("{b"+y+"}",this._encodeHTML(o.getNameByIndex(i))),x=l[y].data[i],x=this.getDataFromOption(x,"-"),s=s.replace("{c"+y+"}",x instanceof Array?x:this.numAddCommas(x));this._tDom.innerHTML=s}else{this._curTicket=0/0,s=this._encodeHTML(o.getNameByIndex(i));for(var y=0,_=l.length;_>y;y++)s+="<br/>"+this._encodeHTML(l[y].name||"")+" : ",x=l[y].data[i],x=this.getDataFromOption(x,"-"),s+=x instanceof Array?x:this.numAddCommas(x);this._tDom.innerHTML=s}}if(n===!1||!this.option.tooltip.showContent)return;this.hasAppend||(this._tDom.style.left=this._zrWidth/2+"px",this._tDom.style.top=this._zrHeight/2+"px",this.dom.first
|
||
|
}};c.chord=c.pie,c.map=c.bar;for(var p in c)n.prototype.iconLibrary["legendicon"+p]=c[p];return l.inherits(e,i),t("../component").define("legend",e),e}),define("echarts/util/ecData",[],function(){function t(t,e,i,o,s,r,n,a){var h;return"undefined"!=typeof o&&(h=null==o.value?o:o.value),t._echartsData={_series:e,_seriesIndex:i,_data:o,_dataIndex:s,_name:r,_value:h,_special:n,_special2:a},t._echartsData}function e(t,e){var i=t._echartsData;if(!e)return i;switch(e){case"series":case"seriesIndex":case"data":case"dataIndex":case"name":case"value":case"special":case"special2":return i&&i["_"+e]}return null}function i(t,e,i){switch(t._echartsData=t._echartsData||{},e){case"series":case"seriesIndex":case"data":case"dataIndex":case"name":case"value":case"special":case"special2":t._echartsData["_"+e]=i}}function o(t,e){e._echartsData={_series:t._echartsData._series,_seriesIndex:t._echartsData._seriesIndex,_data:t._echartsData._data,_dataIndex:t._echartsData._dataIndex,_name:t._echartsData._name,_value:t._echartsData._value,_special:t._echartsData._special,_special2:t._echartsData._special2}}return{pack:t,set:i,get:e,clone:o}}),define("echarts/chart",[],function(){var t={},e={};return t.define=function(i,o){return e[i]=o,t},t.get=function(t){return e[t]},t}),define("zrender/tool/color",["require","../tool/util"],function(t){function e(t){if(t instanceof Array||-1!=t.indexOf("rgb")||-1!=t.indexOf("hs"))return t;if(!Q[t]){var e=Y.getPixelContext();e.fillStyle=t,e.rect(0,0,10,10),e.fill();var i=e.getImageData(5,5,1,1).data;Q[t]=p([i[0],i[1],i[2],i[3]],"rgba")}return Q[t]}function i(t){G=t}function o(){G=Z}function s(t,e){return t=0|t,e=e||G,e[t%e.length]}function r(t){q=t}function n(){X=q}function a(){return q}function h(t,e,i,o,s,r,n){F=F||Y.getContext();for(var a=F.createRadialGradient(t,e,i,o,s,r),h=0,l=n.length;l>h;h++)a.addColorStop(n[h][0],n[h][1]);return a.__nonRecursion=!0,a}function l(t,e,i,o,s){F=F||Y.getContext();for(var r=F.createLinearGradient(t,e,i,o),n=0,a=s.length;a>n;n++)r.addColorStop(s[n][0],s[n][1]);return r.__nonRecursion=!0,r}function d(t,e,i){t=f(t),e=f(e),t=k(t),e=k(e);for(var o=[],s=(e[0]-t[0])/i,r=(e[1]-t[1])/i,n=(e[2]-t[2])/i,a=(e[3]-t[3])/i,h=0,l=t[0],d=t[1],c=t[2],u=t[3];i>h;h++)o[h]=p([P(Math.floor(l),[0,255]),P(Math.floor(d),[0,255]),P(Math.floor(c),[0,255]),u.toFixed(4)-0],"rgba"),l+=s,d+=r,c+=n,u+=a;return l=e[0],d=e[1],c=e[2],u=e[3],o[h]=p([l,d,c,u],"rgba"),o}function c(t,e){var i=[],o=t.length;if(void 0===e&&(e=20),1===o)i=d(t[0],t[0],e);else if(o>1)for(var s=0,r=o-1;r>s;s++){var n=d(t[s],t[s+1],e);r-1>s&&n.pop(),i=i.concat(n)}return i}function p(t,e){if(e=e||"rgb",t&&(3===t.length||4===t.length)){if(t=I(t,function(t){return t>1?Math.ceil(t):t}),e.indexOf("hex")>-1)return"#"+((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1);if(e.indexOf("hs")>-1){var i=I(t.slice(1,3),function(t){return t+"%"});t[1]=i[0],t[2]=i[1]}return e.indexOf("a")>-1?(3===t.length&&t.push(1),t[3]=P(t[3],[0,1]),e+"("+t.slice(0,4).join(",")+")"):e+"("+t.slice(0,3).join(",")+")"}}function u(t){t=z(t),t.indexOf("rgba")<0&&(t=f(t));var e=[],i=0;return t.replace(/[\d.]+/g,function(t){t=3>i?0|t:+t,e[i++]=t}),e}function g(t,e){if(!R(t))return t;var i=k(t),o=i[3];return"undefined"==typeof o&&(o=1),t.indexOf("hsb")>-1?i=D(i):t.indexOf("hsl")>-1&&(i=H(i)),e.indexOf("hsb")>-1||e.indexOf("hsv")>-1?i=N(i):e.indexOf("hsl")>-1&&(i=W(i)),i[3]=o,p(i,e)}function f(t){return g(t,"rgba")}function m(t){return g(t,"rgb")}function y(t){return g(t,"hex")}function _(t){return g(t,"hsva")}function v(t){return g(t,"hsv")}function x(t){return g(t,"hsba")}function b(t){return g(t,"hsb")}function T(t){return g(t,"hsla")}function S(t){return g(t,"hsl")}function C(t){for(var e in Q)if(y(Q[e])===y(t))return e;return null}function z(t){return String(t).replace(/\s+/g,"")}function L(t){if(t=e(t),t=z(t),t=t.replace(/hsv/i,"hsb"),/^#[\da-f]{3}$/i.test(t)){t=parseInt(t.slice(1),16);var i=(3840&t)<<8,o=(240&t)<<4,s=15&t;t="#"+((1<<24)+(i<<4)+i+(o<<4)+o+(s<<4)+s).toString(16).slice(1)}return t}function w(t,e){if(!R(t))return t;var i=e>0?1:-1;"undefined"==type
|
||
|
function e(t,e){return function(i){return t.call(e,i)}}function i(t,e){return function(i,o,s){return t.call(e,i,o,s)}}function o(t){for(var i=u.length;i--;){var o=u[i];t["_"+o+"Handler"]=e(g[o],t)}}function s(t,e,i){if(this._draggingTarget&&this._draggingTarget.id==t.id||t.isSilent())return!1;var o=this._event;if(t.isCover(e,i)){t.hoverable&&this.storage.addHover(t);for(var s=t.parent;s;){if(s.clipShape&&!s.clipShape.isCover(this._mouseX,this._mouseY))return!1;s=s.parent}return this._lastHover!=t&&(this._processOutShape(o),this._processDragLeave(o),this._lastHover=t,this._processDragEnter(o)),this._processOverShape(o),this._processDragOver(o),this._hasfound=1,!0}return!1}var r=t("./config"),n=t("./tool/env"),a=t("./tool/event"),h=t("./tool/util"),l=t("./tool/vector"),d=t("./tool/matrix"),c=r.EVENT,p=t("./mixin/Eventful"),u=["resize","click","dblclick","mousewheel","mousemove","mouseout","mouseup","mousedown","touchstart","touchend","touchmove"],g={resize:function(t){t=t||window.event,this._lastHover=null,this._isMouseDown=0,this.dispatch(c.RESIZE,t)},click:function(t){t=this._zrenderEventFixed(t);var e=this._lastHover;(e&&e.clickable||!e)&&this._clickThreshold<5&&this._dispatchAgency(e,c.CLICK,t),this._mousemoveHandler(t)},dblclick:function(t){t=t||window.event,t=this._zrenderEventFixed(t);var e=this._lastHover;(e&&e.clickable||!e)&&this._clickThreshold<5&&this._dispatchAgency(e,c.DBLCLICK,t),this._mousemoveHandler(t)},mousewheel:function(t){t=this._zrenderEventFixed(t);var e=t.wheelDelta||-t.detail,i=e>0?1.1:1/1.1,o=!1,s=this._mouseX,r=this._mouseY;this.painter.eachBuildinLayer(function(e){var n=e.position;if(e.zoomable){e.__zoom=e.__zoom||1;var h=e.__zoom;h*=i,h=Math.max(Math.min(e.maxZoom,h),e.minZoom),i=h/e.__zoom,e.__zoom=h,n[0]-=(s-n[0])*(i-1),n[1]-=(r-n[1])*(i-1),e.scale[0]*=i,e.scale[1]*=i,e.dirty=!0,o=!0,a.stop(t)}}),o&&this.painter.refresh(),this._dispatchAgency(this._lastHover,c.MOUSEWHEEL,t),this._mousemoveHandler(t)},mousemove:function(t){if(!this.painter.isLoading()){t=this._zrenderEventFixed(t),this._lastX=this._mouseX,this._lastY=this._mouseY,this._mouseX=a.getX(t),this._mouseY=a.getY(t);var e=this._mouseX-this._lastX,i=this._mouseY-this._lastY;this._processDragStart(t),this._hasfound=0,this._event=t,this._iterateAndFindHover(),this._hasfound||((!this._draggingTarget||this._lastHover&&this._lastHover!=this._draggingTarget)&&(this._processOutShape(t),this._processDragLeave(t)),this._lastHover=null,this.storage.delHover(),this.painter.clearHover());var o="default";if(this._draggingTarget)this.storage.drift(this._draggingTarget.id,e,i),this._draggingTarget.modSelf(),this.storage.addHover(this._draggingTarget),this._clickThreshold++;else if(this._isMouseDown){var s=!1;this.painter.eachBuildinLayer(function(t){t.panable&&(o="move",t.position[0]+=e,t.position[1]+=i,s=!0,t.dirty=!0)}),s&&this.painter.refresh()}this._draggingTarget||this._hasfound&&this._lastHover.draggable?o="move":this._hasfound&&this._lastHover.clickable&&(o="pointer"),this.root.style.cursor=o,this._dispatchAgency(this._lastHover,c.MOUSEMOVE,t),(this._draggingTarget||this._hasfound||this.storage.hasHoverShape())&&this.painter.refreshHover()}},mouseout:function(t){t=this._zrenderEventFixed(t);var e=t.toElement||t.relatedTarget;if(e!=this.root)for(;e&&9!=e.nodeType;){if(e==this.root)return void this._mousemoveHandler(t);e=e.parentNode}t.zrenderX=this._lastX,t.zrenderY=this._lastY,this.root.style.cursor="default",this._isMouseDown=0,this._processOutShape(t),this._processDrop(t),this._processDragEnd(t),this.painter.isLoading()||this.painter.refreshHover(),this.dispatch(c.GLOBALOUT,t)},mousedown:function(t){return this._clickThreshold=0,2==this._lastDownButton?(this._lastDownButton=t.button,void(this._mouseDownTarget=null)):(this._lastMouseDownMoment=new Date,t=this._zrenderEventFixed(t),this._isMouseDown=1,this._mouseDownTarget=this._lastHover,this._dispatchAgency(this._lastHover,c.MOUSEDOWN,t),void(this._lastDownButton=t.button))},mouseup:function(t){t=this._zrenderEventFixed(t),this.root.style.cursor="default",this._isMouseDown=0,this._mouseDow
|
||
|
},invert:function(t,e){var i=e[0],o=e[2],s=e[4],r=e[1],n=e[3],a=e[5],h=i*n-r*o;return h?(h=1/h,t[0]=n*h,t[1]=-r*h,t[2]=-o*h,t[3]=i*h,t[4]=(o*a-n*s)*h,t[5]=(r*s-i*a)*h,t):null},mulVector:function(t,e,i){var o=e[0],s=e[2],r=e[4],n=e[1],a=e[3],h=e[5];return t[0]=i[0]*o+i[1]*s+r,t[1]=i[0]*n+i[1]*a+h,t}};return e}),define("zrender/loadingEffect/Base",["require","../tool/util","../shape/Text","../shape/Rectangle"],function(t){function e(t){this.setOptions(t)}var i=t("../tool/util"),o=t("../shape/Text"),s=t("../shape/Rectangle"),r="Loading...",n="normal 16px Arial";return e.prototype.createTextShape=function(t){return new o({highlightStyle:i.merge({x:this.canvasWidth/2,y:this.canvasHeight/2,text:r,textAlign:"center",textBaseline:"middle",textFont:n,color:"#333",brushType:"fill"},t,!0)})},e.prototype.createBackgroundShape=function(t){return new s({highlightStyle:{x:0,y:0,width:this.canvasWidth,height:this.canvasHeight,brushType:"fill",color:t}})},e.prototype.start=function(t){function e(e){t.storage.addHover(e)}function i(){t.refreshHover()}this.canvasWidth=t._width,this.canvasHeight=t._height,this.loadingTimer=this._start(e,i)},e.prototype._start=function(){return setInterval(function(){},1e4)},e.prototype.stop=function(){clearInterval(this.loadingTimer)},e.prototype.setOptions=function(t){this.options=t||{}},e.prototype.adjust=function(t,e){return t<=e[0]?t=e[0]:t>=e[1]&&(t=e[1]),t},e.prototype.getLocation=function(t,e,i){var o=null!=t.x?t.x:"center";switch(o){case"center":o=Math.floor((this.canvasWidth-e)/2);break;case"left":o=0;break;case"right":o=this.canvasWidth-e}var s=null!=t.y?t.y:"center";switch(s){case"center":s=Math.floor((this.canvasHeight-i)/2);break;case"top":s=0;break;case"bottom":s=this.canvasHeight-i}return{x:o,y:s,width:e,height:i}},e}),define("zrender/Layer",["require","./mixin/Transformable","./tool/util","./config"],function(t){function e(){return!1}function i(t,e,i){var o=document.createElement(e),s=i.getWidth(),r=i.getHeight();return o.style.position="absolute",o.style.left=0,o.style.top=0,o.style.width=s+"px",o.style.height=r+"px",o.width=s*n.devicePixelRatio,o.height=r*n.devicePixelRatio,o.setAttribute("data-zr-dom-id",t),o}var o=t("./mixin/Transformable"),s=t("./tool/util"),r=window.G_vmlCanvasManager,n=t("./config"),a=function(t,s){this.id=t,this.dom=i(t,"canvas",s),this.dom.onselectstart=e,this.dom.style["-webkit-user-select"]="none",this.dom.style["user-select"]="none",this.dom.style["-webkit-touch-callout"]="none",this.dom.style["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",r&&r.initElement(this.dom),this.domBack=null,this.ctxBack=null,this.painter=s,this.unusedCount=0,this.config=null,this.dirty=!0,this.elCount=0,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.zoomable=!1,this.panable=!1,this.maxZoom=1/0,this.minZoom=0,o.call(this)};return a.prototype.initContext=function(){this.ctx=this.dom.getContext("2d");var t=n.devicePixelRatio;1!=t&&this.ctx.scale(t,t)},a.prototype.createBackBuffer=function(){if(!r){this.domBack=i("back-"+this.id,"canvas",this.painter),this.ctxBack=this.domBack.getContext("2d");var t=n.devicePixelRatio;1!=t&&this.ctxBack.scale(t,t)}},a.prototype.resize=function(t,e){var i=n.devicePixelRatio;this.dom.style.width=t+"px",this.dom.style.height=e+"px",this.dom.setAttribute("width",t*i),this.dom.setAttribute("height",e*i),1!=i&&this.ctx.scale(i,i),this.domBack&&(this.domBack.setAttribute("width",t*i),this.domBack.setAttribute("height",e*i),1!=i&&this.ctxBack.scale(i,i))},a.prototype.clear=function(){var t=this.dom,e=this.ctx,i=t.width,o=t.height,s=this.clearColor&&!r,a=this.motionBlur&&!r,h=this.lastFrameAlpha,l=n.devicePixelRatio;if(a&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(t,0,0,i/l,o/l)),e.clearRect(0,0,i/l,o/l),s&&(e.save(),e.fillStyle=this.clearColor,e.fillRect(0,0,i/l,o/l),e.restore()),a){var d=this.domBack;e.save(),e.globalAlpha=h,e.drawImage(d,0,0,i/l,o/l),e.restore()}},s.merge(a.prototype,o.prototype),a}),define("zrender/shape/Text",["require","../tool/area","./Base","../tool/util"],fun
|
||
|
return g},_markLine:function(t,e){var i=this.series[t],o=this.component;p.merge(p.merge(e,p.clone(this.ecTheme.markLine||{})),p.clone(n.markLine)),e.symbol=e.symbol instanceof Array?e.symbol.length>1?e.symbol:[e.symbol[0],e.symbol[0]]:[e.symbol,e.symbol],e.symbolSize=e.symbolSize instanceof Array?e.symbolSize.length>1?e.symbolSize:[e.symbolSize[0],e.symbolSize[0]]:[e.symbolSize,e.symbolSize],e.symbolRotate=e.symbolRotate instanceof Array?e.symbolRotate.length>1?e.symbolRotate:[e.symbolRotate[0],e.symbolRotate[0]]:[e.symbolRotate,e.symbolRotate],e.name=i.name;for(var s,r,h,l,d,c,u,g,f=[],m=e.data,y=o.dataRange,_=o.legend,v=this.zr.getWidth(),x=this.zr.getHeight(),b=0,T=m.length;T>b;b++){var S=m[b];null!=S[0].x&&null!=S[0].y&&null!=S[1].x&&null!=S[1].y&&(r=_?_.getColor(i.name):this.zr.getColor(t),g=this.deepMerge(S),h=null!=g.value?g.value:"",y&&(r=isNaN(h)?r:y.getColor(h),l=[g,e],d=this.deepQuery(l,"itemStyle.normal.color")||r,c=this.deepQuery(l,"itemStyle.emphasis.color")||d,null==d&&null==c)||(S[0].tooltip=g.tooltip||e.tooltip||{trigger:"item"},S[0].name=null!=S[0].name?S[0].name:"",S[1].name=null!=S[1].name?S[1].name:"",S[0].value=h,s=this.getLineMarkShape(e,t,S,b,this.parsePercent(S[0].x,v),this.parsePercent(S[0].y,x),this.parsePercent(S[1].x,v),this.parsePercent(S[1].y,x),r),s._mark="line",u=this.deepMerge([g,e],"effect"),u.show&&(s.effect=u),i.type===n.CHART_TYPE_MAP&&(s._geo=[this.getMarkGeo(S[0]),this.getMarkGeo(S[1])]),a.pack(s,i,t,S[0],b,S[0].name+(""!==S[1].name?" > "+S[1].name:""),h),f.push(s)))}return f},getMarkCoord:function(){return[0,0]},getSymbolShape:function(t,e,s,r,n,h,l,d,c,p,u){var g=[s,t],f=this.getDataFromOption(s,"-");d=this.deepQuery(g,"symbol")||d;var m=this.deepQuery(g,"symbolSize");m="function"==typeof m?m(f):m;var y=this.deepQuery(g,"symbolRotate"),_=this.deepMerge(g,"itemStyle.normal"),v=this.deepMerge(g,"itemStyle.emphasis"),x=null!=_.borderWidth?_.borderWidth:_.lineStyle&&_.lineStyle.width;null==x&&(x=d.match("empty")?2:0);var b=null!=v.borderWidth?v.borderWidth:v.lineStyle&&v.lineStyle.width;null==b&&(b=x+2);var T=new o({style:{iconType:d.replace("empty","").toLowerCase(),x:h-m,y:l-m,width:2*m,height:2*m,brushType:"both",color:d.match("empty")?p:this.getItemStyleColor(_.color,e,r,s)||c,strokeColor:_.borderColor||this.getItemStyleColor(_.color,e,r,s)||c,lineWidth:x},highlightStyle:{color:d.match("empty")?p:this.getItemStyleColor(v.color,e,r,s),strokeColor:v.borderColor||_.borderColor||this.getItemStyleColor(_.color,e,r,s)||c,lineWidth:b},clickable:this.deepQuery(g,"clickable")});return d.match("image")&&(T.style.image=d.replace(new RegExp("^image:\\/\\/"),""),T=new i({style:T.style,highlightStyle:T.highlightStyle,clickable:this.deepQuery(g,"clickable")})),null!=y&&(T.rotation=[y*Math.PI/180,h,l]),d.match("star")&&(T.style.iconType="star",T.style.n=d.replace("empty","").replace("star","")-0||5),"none"===d&&(T.invisible=!0,T.hoverable=!1),T=this.addLabel(T,t,s,n,u),d.match("empty")&&(null==T.style.textColor&&(T.style.textColor=T.style.strokeColor),null==T.highlightStyle.textColor&&(T.highlightStyle.textColor=T.highlightStyle.strokeColor)),a.pack(T,t,e,s,r,n),T._x=h,T._y=l,T._dataIndex=r,T._seriesIndex=e,T},getLineMarkShape:function(t,e,i,o,r,n,a,h,l){var d=null!=i[0].value?i[0].value:"-",c=null!=i[1].value?i[1].value:"-",p=[this.query(i[0],"symbol")||t.symbol[0],this.query(i[1],"symbol")||t.symbol[1]],u=[this.query(i[0],"symbolSize")||t.symbolSize[0],this.query(i[1],"symbolSize")||t.symbolSize[1]];u[0]="function"==typeof u[0]?u[0](d):u[0],u[1]="function"==typeof u[1]?u[1](c):u[1];var g=[this.query(i[0],"symbolRotate")||t.symbolRotate[0],this.query(i[1],"symbolRotate")||t.symbolRotate[1]],f=[i[0],i[1],t],m=this.deepMerge(f,"itemStyle.normal");m.color=this.getItemStyleColor(m.color,e,o,i);var y=this.deepMerge(f,"itemStyle.emphasis");y.color=this.getItemStyleColor(y.color,e,o,i);var _=m.lineStyle,v=y.lineStyle,x=_.width;null==x&&(x=m.borderWidth);var b=v.width;null==b&&(b=null!=y.borderWidth?y.borderWidth:x+2);var T=new s({style:{smooth:this.deepQuery([i[0],i[1],t],"smooth")?"spline":!1,smooth
|
||
|
var g=(i.style.xStart-i.style.xEnd)*(i.style.xStart-i.style.xEnd)+(i.style.yStart-i.style.yEnd)*(i.style.yStart-i.style.yEnd),f=Math.round(Math.sqrt(Math.round(g*h.period*h.period)));if(i.style.smooth){var m=i.style.pointList||i.getPointList(i.style),y=m.length;f=Math.round(f/y);for(var _=t.animate(u.id,"style",h.loop),v=Math.ceil(y/8),x=0;y-v>x;x+=v)_.when(f*(x+1),{x:m[x][0]-a,y:m[x][1]-a});_.when(f*y,{x:m[y-1][0]-a,y:m[y-1][1]-a}),_.done(function(){i.effect.show=!1,t.delShape(u.id)}),_.start("spline")}else t.animate(u.id,"style",h.loop).when(f,{x:i._x-a,y:i._y-a}).done(function(){i.effect.show=!1,t.delShape(u.id)}).start()}var s=t("../util/ecData"),r=t("zrender/shape/Circle"),n=t("zrender/shape/Image"),a=t("../util/shape/Icon"),h=t("../util/shape/Symbol");return{point:e,largePoint:i,line:o}}),define("echarts/component/base",["require","../config","../util/ecQuery","../util/number","zrender/tool/util"],function(t){function e(t,e,i,o,s){this.ecTheme=t,this.messageCenter=e,this.zr=i,this.option=o,this.series=o.series,this.myChart=s,this.component=s.component,this.shapeList=[],this.effectList=[]}var i=t("../config"),o=t("../util/ecQuery"),s=t("../util/number"),r=t("zrender/tool/util");return e.prototype={canvasSupported:!0,_getZ:function(t){var e=this.ecTheme[this.type];return e&&null!=e[t]?e[t]:(e=i[this.type],e&&null!=e[t]?e[t]:0)},getZlevelBase:function(){return this._getZ("zlevel")},getZBase:function(){return this._getZ("z")},reformOption:function(t){return r.merge(r.merge(t||{},r.clone(this.ecTheme[this.type]||{})),r.clone(i[this.type]||{}))},reformCssArray:function(t){if(!(t instanceof Array))return[t,t,t,t];switch(t.length+""){case"4":return t;case"3":return[t[0],t[1],t[2],t[1]];case"2":return[t[0],t[1],t[0],t[1]];case"1":return[t[0],t[0],t[0],t[0]];case"0":return[0,0,0,0]}},getShapeById:function(t){for(var e=0,i=this.shapeList.length;i>e;e++)if(this.shapeList[e].id===t)return this.shapeList[e];return null},getFont:function(t){var e=this.getTextStyle(r.clone(t));return e.fontStyle+" "+e.fontWeight+" "+e.fontSize+"px "+e.fontFamily},getTextStyle:function(t){return r.merge(r.merge(t||{},this.ecTheme.textStyle),i.textStyle)},getItemStyleColor:function(t,e,i,o){return"function"==typeof t?t.call(this.myChart,{seriesIndex:e,series:this.series[e],dataIndex:i,data:o}):t},getDataFromOption:function(t,e){return null!=t?null!=t.value?t.value:t:e},subPixelOptimize:function(t,e){return t=e%2===1?Math.floor(t)+.5:Math.round(t)},resize:function(){this.refresh&&this.refresh(),this.clearEffectShape&&this.clearEffectShape(!0);var t=this;setTimeout(function(){t.animationEffect&&t.animationEffect()},200)},clear:function(){this.clearEffectShape&&this.clearEffectShape(),this.zr&&this.zr.delShape(this.shapeList),this.shapeList=[]},dispose:function(){this.onbeforDispose&&this.onbeforDispose(),this.clear(),this.shapeList=null,this.effectList=null,this.onafterDispose&&this.onafterDispose()},query:o.query,deepQuery:o.deepQuery,deepMerge:o.deepMerge,parsePercent:s.parsePercent,parseCenter:s.parseCenter,parseRadius:s.parseRadius,numAddCommas:s.addCommas},e}),define("zrender/shape/Star",["require","../tool/math","./Base","../tool/util"],function(t){var e=t("../tool/math"),i=e.sin,o=e.cos,s=Math.PI,r=t("./Base"),n=function(t){r.call(this,t)};return n.prototype={type:"star",buildPath:function(t,e){var r=e.n;if(r&&!(2>r)){var n=e.x,a=e.y,h=e.r,l=e.r0;null==l&&(l=r>4?h*o(2*s/r)/o(s/r):h/3);var d=s/r,c=-s/2,p=n+h*o(c),u=a+h*i(c);c+=d;var g=e.pointList=[];g.push([p,u]);for(var f,m=0,y=2*r-1;y>m;m++)f=m%2===0?l:h,g.push([n+f*o(c),a+f*i(c)]),c+=d;g.push([p,u]),t.moveTo(g[0][0],g[0][1]);for(var m=0;m<g.length;m++)t.lineTo(g[m][0],g[m][1]);t.closePath()}},getRect:function(t){if(t.__rect)return t.__rect;var e;return e="stroke"==t.brushType||"fill"==t.brushType?t.lineWidth||1:0,t.__rect={x:Math.round(t.x-t.r-e/2),y:Math.round(t.y-t.r-e/2),width:2*t.r+e,height:2*t.r+e},t.__rect}},t("../tool/util").inherits(n,r),n}),define("zrender/shape/Heart",["require","./Base","./util/PathProxy","../tool/util"],function(t){"use strict";var e=t("./Base"),i=t("./util/PathP
|