32 lines
452 KiB
JavaScript
32 lines
452 KiB
JavaScript
|
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.echarts=e():t.echarts=e()}(this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var a=i[n]={exports:{},id:n,loaded:!1};return t[n].call(a.exports,a,a.exports,e),a.loaded=!0,a.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(2),i(85),i(79),i(90),i(163),i(279),i(268),i(289),i(246),i(242),i(238),i(275),i(284),i(224),i(229),i(235),i(264),i(257),i(34),i(176),i(196),i(304),i(301),i(211),i(187),i(166),i(317),i(182),i(181),i(308),i(188),i(204)},function(t,e,i){function n(t){if("object"==typeof t&&null!==t){var e=t;if(t instanceof Array){e=[];for(var i=0,a=t.length;a>i;i++)e[i]=n(t[i])}else if(!A(t)&&!I(t)){e={};for(var o in t)t.hasOwnProperty(o)&&(e[o]=n(t[o]))}return e}return t}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)||w(s)||w(r)||I(s)||I(r)||A(s)||A(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 document.createElement("canvas")}function h(){return D||(D=G.createCanvas().getContext("2d")),D}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 c(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var a in n)t.prototype[a]=n[a];t.prototype.constructor=t,t.superClass=e}function d(t,e,i){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,i)}function f(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function p(t,e,i){if(t&&e)if(t.forEach&&t.forEach===O)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 g(t,e,i){if(t&&e){if(t.map&&t.map===N)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 m(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===B)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 v(t,e,i){if(t&&e){if(t.filter&&t.filter===E)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 y(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 x(t,e){var i=V.call(arguments,2);return function(){return t.apply(e,i.concat(V.call(arguments)))}}function _(t){var e=V.call(arguments,1);return function(){return t.apply(this,e.concat(V.call(arguments)))}}function w(t){return"[object Array]"===z.call(t)}function b(t){return"function"==typeof t}function M(t){return"[object String]"===z.call(t)}function S(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function A(t){return!!k[z.call(t)]||t instanceof P}function I(t){return t&&1===t.nodeType&&"string"==typeof t.nodeName}function T(t){for(var e=0,i=arguments.length;i>e;e++)if(null!=arguments[e])return arguments[e]}function C(){return Function.call.apply(V,arguments)}function L(t,e){if(!t)throw new Error(e)}var D,P=i(16),k={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1},z=Object.prototype.toString,R=Array.prototype,O=R.forEach,E=R.filter,V=R.slice,N=R.map,B=R.reduce,G={inherits:c,mixin:d,clone:n,merge:a,mergeAll:o,extend:r,defaults:s,getContext:h,createCanvas:l,indexOf:u,slice:C,find:y,isArrayLike:f,each:p,map:g,reduce:m,filter:v,bind:x,curry:_,isArray:w,isString:M,isObject:S,isFunction:b,isBuildInObject:A,isDom:I,retrieve:T,assert:L,noop:function(){}};t.exports=G},function(t,e,i){function n(t){return function(e,i,n){e=e&&e.toLowerCase(),L.prototype[t].call(this,e,i,n)}}function a(){L.call(this)}function o(t,e,i){i=i||{},"string"==typeof e&&(
|
||
|
* ECharts, a javascript interactive chart library.
|
||
|
*
|
||
|
* Copyright (c) 2015, Baidu Inc.
|
||
|
* All rights reserved.
|
||
|
*
|
||
|
* LICENSE
|
||
|
* https://github.com/ecomfe/echarts/blob/master/LICENSE.txt
|
||
|
*/
|
||
|
var m=i(112),v=i(78),y=i(28),x=i(113),_=i(10),w=i(13),b=i(54),M=i(25),S=i(3),A=i(67),I=i(1),T=i(22),C=i(15),L=i(21),D=I.each,P=["echarts","chart","component"],k=["transform","filter","statistic"];a.prototype.on=n("on"),a.prototype.off=n("off"),a.prototype.one=n("one"),I.mixin(a,L);var z=o.prototype;z.getDom=function(){return this._dom},z.getZr=function(){return this._zr},z.setOption=function(t,e,i){this._model&&!e||(this._model=new m(null,null,this._theme,new x(this._api))),this._model.setOption(t,F),R.prepareAndUpdate.call(this),!i&&this._zr.refreshImmediately()},z.setTheme=function(){console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},z.getModel=function(){return this._model},z.getOption=function(){return this._model.getOption()},z.getWidth=function(){return this._zr.getWidth()},z.getHeight=function(){return this._zr.getHeight()},z.getRenderedCanvas=function(t){if(C.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr,i=e.storage.getDisplayList();return I.each(i,function(t){t.stopAnimation(!0)}),e.painter.getRenderedCanvas(t)}},z.getDataURL=function(t){t=t||{};var e=t.excludeComponents,i=this._model,n=[],a=this;D(e,function(t){i.eachComponent({mainType:t},function(t){var e=a._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var o=this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return D(n,function(t){t.group.ignore=!1}),o},z.getConnectedDataURL=function(t){if(C.canvasSupported){var e=this.group,i=Math.min,n=Math.max,a=1/0;if(q[e]){var o=a,r=a,s=-a,l=-a,h=[],u=t&&t.pixelRatio||1;for(var c in Z){var d=Z[c];if(d.group===e){var f=d.getRenderedCanvas(I.clone(t)),p=d.getDom().getBoundingClientRect();o=i(p.left,o),r=i(p.top,r),s=n(p.right,s),l=n(p.bottom,l),h.push({dom:f,left:p.left,top:p.top})}}o*=u,r*=u,s*=u,l*=u;var g=s-o,m=l-r,v=I.createCanvas();v.width=g,v.height=m;var y=A.init(v);return D(h,function(t){var e=new S.Image({style:{x:t.left*u-o,y:t.top*u-r,image:t.dom}});y.add(e)}),y.refreshImmediately(),v.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}};var R={update:function(t){var e=this._model,i=this._api,n=this._coordSysMgr;if(e){e.restoreData(),n.create(this._model,this._api),h.call(this,e,i),u.call(this,e),n.update(e,i),c.call(this,e,t),d.call(this,e,t),f.call(this,e,t);var a=e.get("backgroundColor")||"transparent",o=this._zr.painter;if(o.isSingleCanvas&&o.isSingleCanvas())this._zr.configLayer(0,{clearColor:a});else{if(!C.canvasSupported){var r=T.parse(a);a=T.stringify(r,"rgb"),0===r[3]&&(a="transparent")}a=a,this._dom.style.backgroundColor=a}}},updateView:function(t){var e=this._model;e&&(c.call(this,e,t),d.call(this,e,t),s.call(this,"updateView",e,t))},updateVisual:function(t){var e=this._model;e&&(d.call(this,e,t),s.call(this,"updateVisual",e,t))},updateLayout:function(t){var e=this._model;e&&(c.call(this,e,t),s.call(this,"updateLayout",e,t))},highlight:function(t){r.call(this,"highlight",t)},downplay:function(t){r.call(this,"downplay",t)},prepareAndUpdate:function(t){var e=this._model;l.call(this,"component",e),l.call(this,"chart",e),R.update.call(this,t)}};z.resize=function(){this._zr.resize();var t=this._model&&this._model.resetOption("media");R[t?"prepareAndUpdate":"update"].call(this),this._loadingFX&&this._loadingFX.resize()};var O=i(111);z.showLoading=function(t,e){I.isObject(t)&&(e=t,t="default"),this.hideLoading();var i=O(this._api,e),n=this._zr;this._loadingFX=i,n.add(i)},z.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},z.makeActionFromEvent=function(t){var e=I.extend({},t);return e.type=N[t.type],e},z.dispatchAction=function(t,e){var i=V[t.type];if(i){var n=i.actionInfo,a=n.update||"update",o=[t],r=!1;t.batch&&(r=!0,o=I.map(t.batch,function(e){return e=I.defaults(I.extend({},e),t),e.batch=null,e}));for(var s,l=[],h="highlight"===t.type||"downplay"===t.type,u=0;u<o.length;u++){var c=o[u];s=i.action(c,this._model),s=s||I.extend({},c),s.type=n.event||s.type,l.push(s),h&&R[a].call(this,c)}"none"!==a&&
|
||
|
},y.getSum=function(t,e){var i=this._storage[t],n=0;if(i)for(var a=0,o=this.count();o>a;a++){var r=this.get(t,a,e);isNaN(r)||(n+=r)}return n},y.indexOf=function(t,e){var i=this._storage,n=i[t],a=this.indices;if(n)for(var o=0,r=a.length;r>o;o++){var s=a[o];if(n[s]===e)return o}return-1},y.indexOfName=function(t){for(var e=this.indices,i=this._nameList,n=0,a=e.length;a>n;n++){var o=e[n];if(i[o]===t)return n}return-1},y.indexOfNearest=function(t,e,i){var n=this._storage,a=n[t];if(a){for(var o=Number.MAX_VALUE,r=-1,s=0,l=this.count();l>s;s++){var h=e-this.get(t,s,i),u=Math.abs(h);(o>u||u===o&&h>0)&&(o=u,r=s)}return r}return-1},y.getRawIndex=function(t){var e=this.indices[t];return null==e?-1:e},y.getName=function(t){return this._nameList[this.indices[t]]||""},y.getId=function(t){return this._idList[this.indices[t]]||this.getRawIndex(t)+""},y.each=function(t,e,i,a){"function"==typeof t&&(a=i,i=e,e=t,t=[]),t=d.map(n(t),this.getDimension,this);var o=[],r=t.length,s=this.indices;a=a||this;for(var l=0;l<s.length;l++)if(0===r)e.call(a,l);else if(1===r)e.call(a,this.get(t[0],l,i),l);else{for(var h=0;r>h;h++)o[h]=this.get(t[h],l,i);o[h]=l,e.apply(a,o)}},y.filterSelf=function(t,e,i,a){"function"==typeof t&&(a=i,i=e,e=t,t=[]),t=d.map(n(t),this.getDimension,this);var o=[],r=[],s=t.length,l=this.indices;a=a||this;for(var h=0;h<l.length;h++){var u;if(1===s)u=e.call(a,this.get(t[0],h,i),h);else{for(var c=0;s>c;c++)r[c]=this.get(t[c],h,i);r[c]=h,u=e.apply(a,r)}u&&o.push(l[h])}return this.indices=o,this._extent={},this},y.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var a=[];return this.each(t,function(){a.push(e&&e.apply(this,arguments))},i,n),a},y.map=function(t,e,i,o){t=d.map(n(t),this.getDimension,this);var r=a(this,t),s=r.indices=this.indices,l=r._storage,h=[];return this.each(t,function(){var i=arguments[arguments.length-1],n=e&&e.apply(this,arguments);if(null!=n){"number"==typeof n&&(h[0]=n,n=h);for(var a=0;a<n.length;a++){var o=t[a],r=l[o],u=s[i];r&&(r[u]=n[a])}}},i,o),r},y.downSample=function(t,e,i,n){for(var o=a(this,[t]),r=this._storage,s=o._storage,l=this.indices,h=o.indices=[],u=[],c=[],d=Math.floor(1/e),f=s[t],p=this.count(),g=0;g<r[t].length;g++)s[t][g]=r[t][g];for(var g=0;p>g;g+=d){d>p-g&&(d=p-g,u.length=d);for(var m=0;d>m;m++){var v=l[g+m];u[m]=f[v],c[m]=v}var y=i(u),v=c[n(u,y)||0];f[v]=y,h.push(v)}return o},y.getItemModel=function(t){var e=this.hostModel;return t=this.indices[t],new u(this._rawData[t],e,e.ecModel)},y.diff=function(t){var e=this._idList,i=t&&t._idList;return new c(t?t.indices:[],this.indices,function(t){return i[t]||t+""},function(t){return e[t]||t+""})},y.getVisual=function(t){var e=this._visual;return e&&e[t]},y.setVisual=function(t,e){if(p(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},y.setLayout=function(t,e){if(p(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},y.getLayout=function(t){return this._layout[t]},y.getItemLayout=function(t){return this._itemLayouts[t]},y.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?d.extend(this._itemLayouts[t]||{},e):e},y.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],a=n&&n[e];return null!=a||i?a:this.getVisual(e)},y.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};if(this._itemVisuals[t]=n,p(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a]);else n[e]=i};var x=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex};y.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(x,e)),this._graphicEls[t]=e},y.getItemGraphicEl=function(t){return this._graphicEls[t]},y.eachItemGraphicEl=function(t,e){d.each(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},y.cloneShallow=function(){var t=d.map(this.dimensions,this.getDimensionInfo,this),e=new v(t,this.hostModel);return e._storage=this._storage,m(e,this,this._wrappedMethods),e.indices=this.indices.slice(),e},y.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this._wrap
|
||
|
return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(s.R,t,e,i,n),this},closePath:function(){this.addData(s.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;i<t.length;i++)e+=t[i];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length==e||!v||(this.data=new Float32Array(e));for(var i=0;e>i;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,a=0;e>a;a++)i+=t[a].len();v&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var a=0;e>a;a++)for(var o=t[a].data,r=0;r<o.length;r++)this.data[n++]=o[r];this._len=n},addData:function(t){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];this._prevCmd=t},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var i,n,a=this._dashSum,o=this._dashOffset,r=this._lineDash,s=this._ctx,l=this._xi,h=this._yi,u=t-l,c=e-h,p=m(u*u+c*c),g=l,v=h,y=r.length;for(u/=p,c/=p,0>o&&(o=a+o),o%=a,g-=o*u,v-=o*c;u>=0&&t>=g||0>u&&g>t;)n=this._dashIdx,i=r[n],g+=u*i,v+=c*i,this._dashIdx=(n+1)%y,u>0&&l>g||0>u&&g>l||s[n%2?"moveTo":"lineTo"](u>=0?d(g,t):f(g,t),c>=0?d(v,e):f(v,e));u=g-t,c=v-e,this._dashOffset=-m(u*u+c*c)},_dashedBezierTo:function(t,e,i,a,o,r){var s,l,h,u,c,d=this._dashSum,f=this._dashOffset,p=this._lineDash,g=this._ctx,v=this._xi,y=this._yi,x=n.cubicAt,_=0,w=this._dashIdx,b=p.length,M=0;for(0>f&&(f=d+f),f%=d,s=0;1>s;s+=.1)l=x(v,t,i,o,s+.1)-x(v,t,i,o,s),h=x(y,e,a,r,s+.1)-x(y,e,a,r,s),_+=m(l*l+h*h);for(;b>w&&(M+=p[w],!(M>f));w++);for(s=(M-f)/_;1>=s;)u=x(v,t,i,o,s),c=x(y,e,a,r,s),w%2?g.moveTo(u,c):g.lineTo(u,c),s+=p[w]/_,w=(w+1)%b;w%2!==0&&g.lineTo(o,r),l=o-u,h=r-c,this._dashOffset=-m(l*l+h*h)},_dashedQuadraticTo:function(t,e,i,n){var a=i,o=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,a,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,v&&(this.data=new Float32Array(t)))},getBoundingRect:function(){l[0]=l[1]=u[0]=u[1]=Number.MAX_VALUE,h[0]=h[1]=c[0]=c[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,d=0,f=0;f<t.length;){var m=t[f++];switch(1==f&&(e=t[f],i=t[f+1],n=e,d=i),m){case s.M:n=t[f++],d=t[f++],e=n,i=d,u[0]=n,u[1]=d,c[0]=n,c[1]=d;break;case s.L:o.fromLine(e,i,t[f],t[f+1],u,c),e=t[f++],i=t[f++];break;case s.C:o.fromCubic(e,i,t[f++],t[f++],t[f++],t[f++],t[f],t[f+1],u,c),e=t[f++],i=t[f++];break;case s.Q:o.fromQuadratic(e,i,t[f++],t[f++],t[f],t[f+1],u,c),e=t[f++],i=t[f++];break;case s.A:var v=t[f++],y=t[f++],x=t[f++],_=t[f++],w=t[f++],b=t[f++]+w,M=(t[f++],1-t[f++]);1==f&&(n=p(w)*x+v,d=g(w)*_+y),o.fromArc(v,y,x,_,w,b,M,u,c),e=p(b)*x+v,i=g(b)*_+y;break;case s.R:n=e=t[f++],d=i=t[f++];var S=t[f++],A=t[f++];o.fromLine(n,d,n+S,d+A,u,c);break;case s.Z:e=n,i=d}a.min(l,l,u),a.max(h,h,c)}return 0===f&&(l[0]=l[1]=h[0]=h[1]=0),new r(l[0],l[1],h[0]-l[0],h[1]-l[1])},rebuildPath:function(t){for(var e=this.data,i=0;i<this._len;){var n=e[i++];switch(n){case s.M:t.moveTo(e[i++],e[i++]);break;case s.L:t.lineTo(e[i++],e[i++]);break;case s.C:t.bezierCurveTo(e[i++],e[i++],e[i++],e[i++],e[i++],e[i++]);break;case s.Q:t.quadraticCurveTo(e[i++],e[i++],e[i++],e[i++]);break;case s.A:var a=e[i++],o=e[i++],r=e[i++],l=e[i++],h=e[i++],u=e[i++],c=e[i++],d=e[i++],f=r>l?r:l,p=r>l?1:r/l,g=r>l?l/r:1,m=Math.abs(r-l)>.001;m?(t.translate(a,o),t.rotate(c),t.scale(p,g),t.arc(0,0,f,h,h+u,1-d),t.scale(1/p,1/g),t.rotate(-c),t.translate(-a,-o)):t.arc(a,o,f,h,h+u,1-d);break;case s.R:t.rect(e[i++],e[i++],e[i++],e[i++]);break;case s.Z:
|
||
|
return i[e]}},g.getCartesian=function(t,e){var i="x"+t+"y"+e;return this._coordsMap[i]},g._initCartesian=function(t,e,i){function a(i){return function(a,h){if(n(a,t,e)){var u=a.get("position");"x"===i?("top"!==u&&"bottom"!==u&&(u="bottom"),o[u]&&(u="top"===u?"bottom":"top")):("left"!==u&&"right"!==u&&(u="left"),o[u]&&(u="left"===u?"right":"left")),o[u]=!0;var d=new c(i,l.createScaleByModel(a),[0,0],a.get("type"),u),f="category"===d.type;d.onBand=f&&a.get("boundaryGap"),d.inverse=a.get("inverse"),d.onZero=a.get("axisLine.onZero"),a.axis=d,d.model=a,d.index=h,this._axesList.push(d),r[i][h]=d,s[i]++}}}var o={left:!1,right:!1,top:!1,bottom:!1},r={x:{},y:{}},s={x:0,y:0};return e.eachComponent("xAxis",a("x"),this),e.eachComponent("yAxis",a("y"),this),s.x&&s.y?(this._axesMap=r,void d(r.x,function(t,e){d(r.y,function(i,n){var a="x"+e+"y"+n,o=new u(a);o.grid=this,this._coordsMap[a]=o,this._coordsList.push(o),o.addAxis(t),o.addAxis(i)},this)},this)):(this._axesMap={},void(this._axesList=[]))},g._updateScale=function(t,e){function i(t,e,i){d(i.coordDimToDataDim(e.dim),function(i){e.scale.unionExtent(t.getDataExtent(i,"ordinal"!==e.scale.type))})}h.each(this._axesList,function(t){t.scale.setExtent(1/0,-(1/0))}),t.eachSeries(function(a){if("cartesian2d"===a.get("coordinateSystem")){var o=a.get("xAxisIndex"),r=a.get("yAxisIndex"),s=t.getComponent("xAxis",o),l=t.getComponent("yAxis",r);if(!n(s,e,t)||!n(l,e,t))return;var h=this.getCartesian(o,r),u=a.getData(),c=h.getAxis("x"),d=h.getAxis("y");"list"===u.type&&(i(u,c,a),i(u,d,a))}},this)},o.create=function(t,e){var i=[];return t.eachComponent("grid",function(n,a){var r=new o(n,t,e);r.name="grid_"+a,r.resize(n,e),n.coordinateSystem=r,i.push(r)}),t.eachSeries(function(e){if("cartesian2d"===e.get("coordinateSystem")){var n=e.get("xAxisIndex"),a=t.getComponent("xAxis",n),o=i[a.get("gridIndex")];e.coordinateSystem=o.getCartesian(n,e.get("yAxisIndex"))}}),i},o.dimensions=u.prototype.dimensions,i(28).register("cartesian2d",o),t.exports=o},function(t,e){"use strict";function i(t){return t}function n(t,e,n,a){this._old=t,this._new=e,this._oldKeyGetter=n||i,this._newKeyGetter=a||i}function a(t,e,i){for(var n=0;n<t.length;n++){var a=i(t[n]),o=e[a];null==o?e[a]=n:(o.length||(e[a]=o=[o]),o.push(n))}}n.prototype={constructor:n,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t,e=this._old,i=this._new,n=this._oldKeyGetter,o=this._newKeyGetter,r={},s={};for(a(e,r,n),a(i,s,o),t=0;t<e.length;t++){var l=n(e[t]),h=s[l];if(null!=h){var u=h.length;u?(1===u&&(s[l]=null),h=h.unshift()):s[l]=null,this._update&&this._update(h,t)}else this._remove&&this._remove(t)}for(var l in s)if(s.hasOwnProperty(l)){var h=s[l];if(null==h)continue;if(h.length)for(var t=0,u=h.length;u>t;t++)this._add&&this._add(h[t]);else this._add&&this._add(h)}}},t.exports=n},function(t,e){t.exports=function(t,e,i){e.eachSeriesByType(t,function(t){var e=t.getData(),i=t.coordinateSystem,n=i.dimensions;e.each(n,function(t,n,a){var o;o=isNaN(t)||isNaN(n)?[NaN,NaN]:i.dataToPoint([t,n]),e.setItemLayout(a,o)},!0)})}},function(t,e,i){var n=i(26),a=i(41),o=i(20),r=function(){this.group=new n,this.uid=a.getUID("viewComponent")};r.prototype={constructor:r,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){}};var s=r.prototype;s.updateView=s.updateLayout=s.updateVisual=function(t,e,i,n){},o.enableClassExtend(r),o.enableClassManagement(r,{registerWhenExtend:!0}),t.exports=r},function(t,e,i){"use strict";var n=i(58),a=i(21),o=i(77),r=i(154),s=i(1),l=function(t){o.call(this,t),a.call(this,t),r.call(this,t),this.id=t.id||n()};l.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty()},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("po
|
||
|
* ZRender, a high performance 2d drawing library.
|
||
|
*
|
||
|
* Copyright (c) 2013, Baidu Inc.
|
||
|
* All rights reserved.
|
||
|
*
|
||
|
* LICENSE
|
||
|
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
||
|
*/
|
||
|
var a=i(58),o=i(15),r=i(127),s=i(130),l=i(131),h=!o.canvasSupported,u={canvas:i(129)},c={},d={};d.version="3.0.8",d.init=function(t,e){var i=new f(a(),t,e);return c[i.id]=i,i},d.dispose=function(t){if(t)t.dispose();else{for(var e in c)c[e].dispose();c={}}return d},d.getInstance=function(t){return c[t]},d.registerPainter=function(t,e){u[t]=e};var f=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,a=new s,c=i.renderer;if(h){if(!u.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");c="vml"}else c&&u[c]||(c="canvas");var d=new u[c](e,a,i);this.storage=a,this.painter=d,o.node||(this.handler=new r(d.getViewportRoot(),a,d)),this.animation=new l({stage:{update:function(){n._needsRefresh&&n.refreshImmediately()}}}),this.animation.start(),this._needsRefresh;var f=a.delFromMap,p=a.addToMap;a.delFromMap=function(t){var e=a.get(t);f.call(a,t),e&&e.removeSelfFromZr(n)},a.addToMap=function(t){p.call(a,t),t.addSelfToZr(n)}};f.prototype={constructor:f,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer(t,e),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},resize:function(){this.painter.resize(),this.handler&&this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},toDataURL:function(t,e,i){return this.painter.toDataURL(t,e,i)},pathToImage:function(t,e,i){var n=a();return this.painter.pathToImage(n,t,e,i)},setDefaultCursorStyle:function(t){this.handler.setDefaultCursorStyle(t)},on:function(t,e,i){this.handler&&this.handler.on(t,e,i)},off:function(t,e){this.handler&&this.handler.off(t,e)},trigger:function(t,e){this.handler&&this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler&&this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,n(this.id)}},t.exports=d},function(t,e,i){var n=i(2),a=i(1);t.exports=function(t,e){a.each(e,function(e){e.update="updateView",n.registerAction(e,function(i,n){var a={};return n.eachComponent({mainType:"series",subType:t,query:i},function(t){t[e.method]&&t[e.method](i.name);var n=t.getData();n.each(function(e){var i=n.getName(e);a[i]=t.isSelected(i)||!1})}),{name:i.name,selected:a}})})}},function(t,e,i){var n=i(1);t.exports={updateSelectedMap:function(){var t=this.option;this._dataOptMap=n.reduce(t.data,function(t,e){return t[e.name]=e,t},{})},select:function(t){var e=this._dataOptMap,i=e[t],a=this.get("selectedMode");"single"===a&&n.each(e,function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t){var e=this._dataOptMap[t];e&&(e.selected=!1)},toggleSelected:function(t){var e=this._dataOptMap[t];return null!=e?(this[e.selected?"unSelect":"select"](t),e.selected):void 0},isSelected:function(t){var e=this._dataOptMap[t];return e&&e.selected}}},function(t,e,i){function n(t){if(!t.target||!t.target.draggable){var e=t.offsetX,i=t.offsetY,n=this.rect;n&&n.contain(e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function a(t){if(this._dragging&&(d.stop(t.event),"pinch"!==t.gestureEvent)){if(f.isTaken("globalPan",this._zr))return;var e=t.offsetX,i=t.offsetY,n=e-this._x,a=i-this._y;this._x=e,this._y=i;var o=this.target;if(o){var r=o.position;r[0]+=n,r[1]+=a,o.dirty()}d.stop(t.event),this.trigger("pan",n,a)}}function o(t){this._dragging=!1}function r(t){d.stop(t.event);var e=t.wheelDelta>0?1.1:1/1.1;l.call(this,t,e,t.offsetX,t.offsetY)}function s(t){if(!f.isTaken("globalPan",this._zr)){d.stop(t.event);var e=t.pinchScale>1?1.1:1/1.1;l.call(this,t,e,t.pinchX,t.pinchY)}}function l(t,e,i,n){var a=this.rect;if(a&&a.contain(i,n)){var o=this.target,r=this.zoomLimit;if(o){var s=o.position,l=o.scale,h=this.zoom=this.zoom||1;h*=e,r
|
||
|
startAngle:90,minAngle:0,selectedOffset:10,avoidLabelOverlap:!0,label:{normal:{rotate:!1,show:!0,position:"outer"},emphasis:{}},labelLine:{normal:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}}},itemStyle:{normal:{borderColor:"rgba(0,0,0,0)",borderWidth:1},emphasis:{borderColor:"rgba(0,0,0,0)",borderWidth:1}},animationEasing:"cubicOut",data:[]}});a.mixin(l,s),t.exports=l},function(t,e,i){function n(t,e,i,n){var o=e.getData(),r=this.dataIndex,s=o.getName(r),l=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:s,seriesId:e.id}),o.each(function(t){a(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),l,i)})}function a(t,e,i,n,a){var o=(e.startAngle+e.endAngle)/2,r=Math.cos(o),s=Math.sin(o),l=i?n:0,h=[r*l,s*l];a?t.animate().when(200,{position:h}).start("bounceOut"):t.attr("position",h)}function o(t,e){function i(){o.ignore=o.hoverIgnore,r.ignore=r.hoverIgnore}function n(){o.ignore=o.normalIgnore,r.ignore=r.normalIgnore}s.Group.call(this);var a=new s.Sector({z2:2}),o=new s.Polyline,r=new s.Text;this.add(a),this.add(o),this.add(r),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function r(t,e,i,n,a){var o=n.getModel("textStyle"),r="inside"===a||"inner"===a;return{fill:o.getTextColor()||(r?"#fff":t.getItemVisual(e,"color")),textFont:o.getFont(),text:l.retrieve(t.hostModel.getFormattedLabel(e,i),t.getName(e))}}var s=i(3),l=i(1),h=o.prototype;h.updateData=function(t,e,i){function n(){r.stopAnimation(!0),r.animateTo({shape:{r:c.r+10}},300,"elasticOut")}function o(){r.stopAnimation(!0),r.animateTo({shape:{r:c.r}},300,"elasticOut")}var r=this.childAt(0),h=t.hostModel,u=t.getItemModel(e),c=t.getItemLayout(e),d=l.extend({},c);d.label=null,i?(r.setShape(d),r.shape.endAngle=c.startAngle,s.updateProps(r,{shape:{endAngle:c.endAngle}},h)):s.updateProps(r,{shape:d},h);var f=u.getModel("itemStyle"),p=t.getItemVisual(e,"color");r.setStyle(l.defaults({fill:p},f.getModel("normal").getItemStyle())),r.hoverStyle=f.getModel("emphasis").getItemStyle(),a(this,t.getItemLayout(e),u.get("selected"),h.get("selectedOffset"),h.get("animation")),r.off("mouseover").off("mouseout").off("emphasis").off("normal"),u.get("hoverAnimation")&&r.on("mouseover",n).on("mouseout",o).on("emphasis",n).on("normal",o),this._updateLabel(t,e),s.setHoverStyle(this)},h._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),a=t.hostModel,o=t.getItemModel(e),l=t.getItemLayout(e),h=l.label,u=t.getItemVisual(e,"color");s.updateProps(i,{shape:{points:h.linePoints||[[h.x,h.y],[h.x,h.y],[h.x,h.y]]}},a),s.updateProps(n,{style:{x:h.x,y:h.y}},a),n.attr({style:{textVerticalAlign:h.verticalAlign,textAlign:h.textAlign,textFont:h.font},rotation:h.rotation,origin:[h.x,h.y],z2:10});var c=o.getModel("label.normal"),d=o.getModel("label.emphasis"),f=o.getModel("labelLine.normal"),p=o.getModel("labelLine.emphasis"),g=c.get("position")||d.get("position");n.setStyle(r(t,e,"normal",c,g)),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!d.get("show"),i.ignore=i.normalIgnore=!f.get("show"),i.hoverIgnore=!p.get("show"),i.setStyle({stroke:u}),i.setStyle(f.getModel("lineStyle").getLineStyle()),n.hoverStyle=r(t,e,"emphasis",d,g),i.hoverStyle=p.getModel("lineStyle").getLineStyle();var m=f.get("smooth");m&&m===!0&&(m=.4),i.setShape({smooth:m})},l.inherits(o,s.Group);var u=i(25).extend({type:"pie",init:function(){var t=new s.Group;this._sectorGroup=t},render:function(t,e,i,a){if(!a||a.from!==this.uid){var r=t.getData(),s=this._data,h=this.group,u=e.get("animation"),c=!s,d=l.curry(n,this.uid,t,u,i),f=t.get("selectedMode");if(r.diff(s).add(function(t){var e=new o(r,t);c&&e.eachChild(function(t){t.stopAnimation(!0)}),f&&e.on("click",d),r.setItemGraphicEl(t,e),h.add(e)}).update(function(t,e){var i=s.getItemGraphicEl(e);i.updateData(r,t),i.off("click"),f&&i.on("click",d),h.add(i),r.setItemGraphicEl(t,i)}).remove(function(t){var e=s.getItemGraphicEl(t);h.remove(e)}).execute(),u&&c&&r.count()>0){var p=r.getItemLayout(0),g=Math.max(i.getWidth(),i.getHeight())/2,m=l.bind(h.removeClipPa
|
||
|
c(h,function(e){var i=t[e];i&&(r.isArray(i)||(i=[i]),c(i,function(t){o(t)}))})}},function(t,e,i){function n(t){var e=t&&t.itemStyle;e&&a.each(o,function(i){var n=e.normal,o=e.emphasis;n&&n[i]&&(t[i]=t[i]||{},t[i].normal?a.merge(t[i].normal,n[i]):t[i].normal=n[i],n[i]=null),o&&o[i]&&(t[i]=t[i]||{},t[i].emphasis?a.merge(t[i].emphasis,o[i]):t[i].emphasis=o[i],o[i]=null)})}var a=i(1),o=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];t.exports=function(t){if(t){n(t),n(t.markPoint),n(t.markLine);var e=t.data;if(e){for(var i=0;i<e.length;i++)n(e[i]);var o=t.markPoint;if(o&&o.data)for(var r=o.data,i=0;i<r.length;i++)n(r[i]);var s=t.markLine;if(s&&s.data)for(var l=s.data,i=0;i<l.length;i++)a.isArray(l[i])?(n(l[i][0]),n(l[i][1])):n(l[i])}}}},function(t,e){var i={average:function(t){for(var e=0,i=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],i++);return 0===i?NaN:e/i},sum:function(t){for(var e=0,i=0;i<t.length;i++)e+=t[i]||0;return e},max:function(t){for(var e=-(1/0),i=0;i<t.length;i++)t[i]>e&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;i<t.length;i++)t[i]<e&&(e=t[i]);return e},nearest:function(t){return t[0]}},n=function(t,e){return Math.round(t.length/2)};t.exports=function(t,e,a){e.eachSeriesByType(t,function(t){var e=t.getData(),a=t.get("sampling"),o=t.coordinateSystem;if("cartesian2d"===o.type&&a){var r=o.getBaseAxis(),s=o.getOtherAxis(r),l=r.getExtent(),h=l[1]-l[0],u=Math.round(e.count()/h);if(u>1){var c;"string"==typeof a?c=i[a]:"function"==typeof a&&(c=a),c&&(e=e.downSample(s.dim,1/u,c,n),t.setData(e))}}},this)}},function(t,e,i){var n=i(1),a=i(32),o=i(4),r=i(37),s=a.prototype,l=r.prototype,h=Math.floor,u=Math.ceil,c=Math.pow,d=10,f=Math.log,p=a.extend({type:"log",getTicks:function(){return n.map(l.getTicks.call(this),function(t){return o.round(c(d,t))})},getLabel:l.getLabel,scale:function(t){return t=s.scale.call(this,t),c(d,t)},setExtent:function(t,e){t=f(t)/f(d),e=f(e)/f(d),l.setExtent.call(this,t,e)},getExtent:function(){var t=s.getExtent.call(this);return t[0]=c(d,t[0]),t[1]=c(d,t[1]),t},unionExtent:function(t){t[0]=f(t[0])/f(d),t[1]=f(t[1])/f(d),s.unionExtent.call(this,t)},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||0>=i)){var n=c(10,h(f(i/t)/Math.LN10)),a=t/i*n;.5>=a&&(n*=10);var r=[o.round(u(e[0]/n)*n),o.round(h(e[1]/n)*n)];this._interval=n,this._niceExtent=r}},niceExtent:l.niceExtent});n.each(["contain","normalize"],function(t){p.prototype[t]=function(e){return e=f(e)/f(d),s[t].call(this,e)}}),p.create=function(){return new p},t.exports=p},function(t,e,i){var n=i(1),a=i(32),o=a.prototype,r=a.extend({type:"ordinal",init:function(t,e){this._data=t,this._extent=e||[0,t.length-1]},parse:function(t){return"string"==typeof t?n.indexOf(this._data,t):Math.round(t)},contain:function(t){return t=this.parse(t),o.contain.call(this,t)&&null!=this._data[t]},normalize:function(t){return o.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(o.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){return this._data[t]},count:function(){return this._extent[1]-this._extent[0]+1},niceTicks:n.noop,niceExtent:n.noop});r.create=function(){return new r},t.exports=r},function(t,e,i){var n=i(1),a=i(4),o=i(9),r=i(37),s=r.prototype,l=Math.ceil,h=Math.floor,u=864e5,c=function(t,e,i,n){for(;n>i;){var a=i+n>>>1;t[a][2]<e?i=a+1:n=a}return i},d=r.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return o.formatTime(e[0],i)},niceExtent:function(t,e,i){var n=this._extent;if(n[0]===n[1]&&(n[0]-=u,n[1]+=u),n[1]===-(1/0)&&n[0]===1/0){var o=new Date;n[1]=new Date(o.getFullYear(),o.getMonth(),o.getDate()),n[0]=n[1]-u}this.niceTicks(t,e,i);var r=this._interval;e||(n[0]=a.round(h(n[0]/r)*r)),i||(n[1]=a.round(l(n[1]/r)*r))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0],n=i/t,o=f.length,r=c(f,n,0,o),s=f[Math.min(r,o-1)],u=s[2];if("year"===s[0]){var d=i/u,p=a.nice(d/t,!0);u*=p}var g=[l(e[0]/u)*u,h(e[1]/u)*u];this._stepLvl=s,this._interval=u,this._niceExten
|
||
|
},function(t,e,i){var n=i(5),a=n.min,o=n.max,r=n.scale,s=n.distance,l=n.add;t.exports=function(t,e,i,h){var u,c,d,f,p=[],g=[],m=[],v=[];if(h){d=[1/0,1/0],f=[-(1/0),-(1/0)];for(var y=0,x=t.length;x>y;y++)a(d,d,t[y]),o(f,f,t[y]);a(d,d,h[0]),o(f,f,h[1])}for(var y=0,x=t.length;x>y;y++){var _=t[y];if(i)u=t[y?y-1:x-1],c=t[(y+1)%x];else{if(0===y||y===x-1){p.push(n.clone(t[y]));continue}u=t[y-1],c=t[y+1]}n.sub(g,c,u),r(g,g,e);var w=s(_,u),b=s(_,c),M=w+b;0!==M&&(w/=M,b/=M),r(m,g,-w),r(v,g,b);var S=l([],_,m),A=l([],_,v);h&&(o(S,S,d),a(S,S,f),o(A,A,d),a(A,A,f)),p.push(S),p.push(A)}return i&&p.push(p.shift()),p}},function(t,e,i){function n(t,e,i,n,a,o,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*o+s*a+e}var a=i(5);t.exports=function(t,e){for(var i=t.length,o=[],r=0,s=1;i>s;s++)r+=a.distance(t[s-1],t[s]);var l=r/2;l=i>l?i:l;for(var s=0;l>s;s++){var h,u,c,d=s/(l-1)*(e?i:i-1),f=Math.floor(d),p=d-f,g=t[f%i];e?(h=t[(f-1+i)%i],u=t[(f+1)%i],c=t[(f+2)%i]):(h=t[0===f?f:f-1],u=t[f>i-2?i-1:f+1],c=t[f>i-3?i-1:f+2]);var m=p*p,v=p*m;o.push([n(h[0],g[0],u[0],c[0],p,m,v),n(h[1],g[1],u[1],c[1],p,m,v)])}return o}},function(t,e,i){t.exports=i(6).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),h=Math.sin(o);t.moveTo(l*a+i,h*a+n),t.arc(i,n,a,o,r,!s)}})},function(t,e,i){"use strict";var n=i(18),a=n.quadraticSubdivide,o=n.cubicSubdivide,r=n.quadraticAt,s=n.cubicAt,l=[];t.exports=i(6).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,r=e.x2,s=e.y2,h=e.cpx1,u=e.cpy1,c=e.cpx2,d=e.cpy2,f=e.percent;0!==f&&(t.moveTo(i,n),null==c||null==d?(1>f&&(a(i,h,r,f,l),h=l[1],r=l[2],a(n,u,s,f,l),u=l[1],s=l[2]),t.quadraticCurveTo(h,u,r,s)):(1>f&&(o(i,h,c,r,f,l),h=l[1],c=l[2],r=l[3],o(n,u,d,s,f,l),u=l[1],d=l[2],s=l[3]),t.bezierCurveTo(h,u,c,d,r,s)))},pointAt:function(t){var e=this.shape,i=e.cpx2,n=e.cpy2;return null===i||null===n?[r(e.x1,e.cpx1,e.x2,t),r(e.y1,e.cpy1,e.y2,t)]:[s(e.x1,e.cpx1,e.cpx1,e.x2,t),s(e.y1,e.cpy1,e.cpy1,e.y2,t)]}})},function(t,e,i){"use strict";t.exports=i(6).extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e){t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}})},function(t,e,i){t.exports=i(6).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=e.x1,n=e.y1,a=e.x2,o=e.y2,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]}})},function(t,e,i){var n=i(59);t.exports=i(6).extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){n.buildPath(t,e,!0)}})},function(t,e,i){var n=i(59);t.exports=i(6).extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){n.buildPath(t,e,!1)}})},function(t,e,i){var n=i(60);t.exports=i(6).extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,a=e.y,o=e.width,r=e.height;e.r?n.buildPath(t,e):t.rect(i,a,o,r),t.closePath()}})},function(t,e,i){t.exports=i(6).extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,a,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,a,!0)}})},function(t,e,i){t.exports=i(6).extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=Math.max(e.r0||0,0),o=Math.max(e.r,0),r=e.startAngle,s=e.endAngle,l=e.clockwise,h=Math.cos(r),u=Math.sin(r);t.moveTo(h*a+i,u*a+n),t.lineTo(h*o+i,u*o+n),t.arc(i,n,o,r,s,!l),t.lineTo(Math.cos(s)*a+i,Math.sin(s)*a+n),0!==a&&t.arc(i,n,a,s,r,l),t.closePath()}})},function(t,e,i){"use strict";var n=i(56),a=i(1),o=a.isString,r=a.isFunction,s=a.isObject,l=i(45),h=function(){this.a
|
||
|
i[e]&&(delete i[e],t.count--)}),o(i)},shouldRecordRange:function(t,e){if(t&&"dataZoom"===t.type&&t.batch)for(var i=0,n=t.batch.length;n>i;i++)if(t.batch[i].dataZoomId===e)return!1;return!0},generateCoordId:function(t){return t.type+"\x00_"+t.id}};t.exports=g},function(t,e,i){i(101),i(39),i(40),i(170),i(171),i(99),i(98)},function(t,e,i){i(177),i(179),i(178);var n=i(2);n.registerProcessor("filter",i(180))},function(t,e,i){"use strict";var n=i(1),a=i(12),o=i(2).extendComponentModel({type:"legend",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateData(i);var n=this._data,a=this.option.selected;if(n[0]&&"single"===this.get("selectedMode")){var o=!1;for(var r in a)a[r]&&(this.select(r),o=!0);!o&&this.select(n[0].get("name"))}},mergeOption:function(t){o.superCall(this,"mergeOption",t),this._updateData(this.ecModel)},_updateData:function(t){var e=n.map(this.get("data")||[],function(t){return"string"==typeof t&&(t={name:t}),new a(t,this,this.ecModel)},this);this._data=e;var i=n.map(t.getSeries(),function(t){return t.name});t.eachSeries(function(t){if(t.legendDataProvider){var e=t.legendDataProvider();i=i.concat(e.mapArray(e.getName))}}),this._availableNames=i},getData:function(){return this._data},select:function(t){var e=this.option.selected,i=this.get("selectedMode");if("single"===i){var a=this._data;n.each(a,function(t){e[t.get("name")]=!1})}e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;t in e||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},isSelected:function(t){var e=this.option.selected;return!(t in e&&!e[t])&&n.indexOf(this._availableNames,t)>=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:"top",align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,textStyle:{color:"#333"},selectedMode:!0}});t.exports=o},function(t,e,i){function n(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function a(t,e,i){t.get("legendHoverLink")&&i.dispatchAction({type:"highlight",seriesName:t.name,name:e})}function o(t,e,i){t.get("legendHoverLink")&&i.dispatchAction({type:"downplay",seriesName:t.name,name:e})}var r=i(1),s=i(24),l=i(3),h=i(103),u=r.curry,c="#ccc";t.exports=i(2).extendComponentView({type:"legend",init:function(){this._symbolTypeStore={}},render:function(t,e,i){var s=this.group;if(s.removeAll(),t.get("show")){var c=t.get("selectedMode"),d=t.get("align");"auto"===d&&(d="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left");var f={};r.each(t.getData(),function(r){var h=r.get("name");if(""===h||"\n"===h)return void s.add(new l.Group({newline:!0}));var p=e.getSeriesByName(h)[0];if(!f[h])if(p){var g=p.getData(),m=g.getVisual("color");"function"==typeof m&&(m=m(p.getDataParams(0)));var v=g.getVisual("legendSymbol")||"roundRect",y=g.getVisual("symbol"),x=this._createItem(h,r,t,v,y,d,m,c);x.on("click",u(n,h,i)).on("mouseover",u(a,p,"",i)).on("mouseout",u(o,p,"",i)),f[h]=!0}else e.eachRawSeries(function(e){if(!f[h]&&e.legendDataProvider){var s=e.legendDataProvider(),l=s.indexOfName(h),p=s.getItemVisual(l,"color"),g="roundRect",m=this._createItem(h,r,t,g,null,d,p,c);m.on("click",u(n,h,i)).on("mouseover",u(a,e,h,i)).on("mouseout",u(o,e,h,i)),f[h]=!0}},this)},this),h.layout(s,t,i),h.addBackground(s,t)}},_createItem:function(t,e,i,n,a,o,r,h){var u=i.get("itemWidth"),d=i.get("itemHeight"),f=i.isSelected(t),p=new l.Group,g=e.getModel("textStyle"),m=e.get("icon");if(n=m||n,p.add(s.createSymbol(n,0,0,u,d,f?r:c)),!m&&a&&(a!==n||"none"==a)){var v=.8*d;"none"===a&&(a="circle"),p.add(s.createSymbol(a,(u-v)/2,(d-v)/2,v,v,f?r:c))}var y="left"===o?u+5:-5,x=o,_=i.get("formatter");"string"==typeof _&&_?t=_.replace("{name}",t):"function"==typeof _&&(t=_(t));var w=new l.Text({style:{text:t,x:y,y:d/2,fill:f?g.getTextColor():c,textFont:g.getFont(),textAlign:x,textVerticalAlign:"middle"}});return p.add(w),p.add(new l.Rect({shape:p.getBou
|
||
|
e.join(";")+";"}function r(t,e){var i=document.createElement("div"),n=e.getZr();this.el=i,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var a=this;i.onmouseenter=function(){a.enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},i.onmousemove=function(e){if(!a.enterable){var i=n.handler;u.normalizeEvent(t,e),i.dispatch("mousemove",e)}},i.onmouseleave=function(){a.enterable&&a._show&&a.hideLater(a._hideDelay),a._inContent=!1},s(i,t)}function s(t,e){function i(t){n(t.target)&&t.preventDefault()}function n(i){for(;i&&i!==e;){if(i===t)return!0;i=i.parentNode}}u.addEventListener(e,"touchstart",i),u.addEventListener(e,"touchmove",i),u.addEventListener(e,"touchend",i)}var l=i(1),h=i(22),u=i(33),c=i(9),d=l.each,f=c.toCamelCase,p=["","-webkit-","-moz-","-o-"],g="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";r.prototype={constructor:r,enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout),this.el.style.cssText=g+o(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),this._show=!0},setContent:function(t){var e=this.el;e.innerHTML=t,e.style.display=t?"block":"none"},moveTo:function(t,e){var i=this.el.style;i.left=t+"px",i.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this.enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(l.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show}},t.exports=r},function(t,e,i){i(2).extendComponentModel({type:"tooltip",defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove",alwaysShowContent:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:!0,animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",lineStyle:{color:"#555",width:1,type:"solid"},crossStyle:{color:"#555",width:1,type:"dashed",textStyle:{}},shadowStyle:{color:"rgba(150,150,150,0.3)"}},textStyle:{color:"#fff",fontSize:14}}})},function(t,e,i){function n(t,e){if(!t||!e)return!1;var i=g.round;return i(t[0])===i(e[0])&&i(t[1])===i(e[1])}function a(t,e,i,n){return{x1:t,y1:e,x2:i,y2:n}}function o(t,e,i,n){return{x:t,y:e,width:i,height:n}}function r(t,e,i,n,a,o){return{cx:t,cy:e,r0:i,r:n,startAngle:a,endAngle:o,clockwise:!0}}function s(t,e,i,n,a){var o=i.clientWidth,r=i.clientHeight,s=20;return t+o+s>n?t-=o+s:t+=s,e+r+s>a?e-=r+s:e+=s,[t,e]}function l(t,e,i){var n=i.clientWidth,a=i.clientHeight,o=5,r=0,s=0,l=e.width,h=e.height;switch(t){case"inside":r=e.x+l/2-n/2,s=e.y+h/2-a/2;break;case"top":r=e.x+l/2-n/2,s=e.y-a-o;break;case"bottom":r=e.x+l/2-n/2,s=e.y+h+o;break;case"left":r=e.x-n-o,s=e.y+h/2-a/2;break;case"right":r=e.x+l+o,s=e.y+h/2-a/2}return[r,s]}function h(t,e,i,n,a,o,r){var h=r.getWidth(),u=r.getHeight(),c=o&&o.getBoundingRect().clone();if(o&&c.applyTransform(o.transform),"function"==typeof t&&(t=t([e,i],a,c)),f.isArray(t))e=m(t[0],h),i=m(t[1],u);else if("string"==typeof t&&o){var d=l(t,c,n.el);e=d[0],i=d[1]}else{var d=s(e,i,n.el,h,u);e=d[0],i=d[1]}n.moveTo(e,i)}function u(t){var e=t.coordinateSystem,i=t.get("tooltip.trigger",!0);return!(!e||"cartesian2d"!==e.type&&"polar"!==e.type&&"single"!==e.type||"item"===i)}var c=i(197),d=i(3),f=i(1),p=i(9),g=i(4),m=g.parsePercent,v=i(15);i(2).extendComponentView({type:"tooltip",_axisPointers:{},init:function(t,e){if(!v.node){var i=new c(e.getDom(),e);this._tooltipContent=i,e.on("showTip",this._manuallyShowTip,this),e.on("hideTip",this._manuallyHideTip,this)}},render:function(t,e,i){if(!v.node){this.group.removeAll(),this._axisPointers={},this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastHover={};var n=this._too
|
||
|
a.add(P)}s&&s.setItemGraphicEl(i,a),l.setHoverStyle(a,m),c.add(a)}),this._updateController(t,e,i),s&&a(t,s,c,i,r),s&&o(t,s)},remove:function(){this.group.removeAll(),this._controller.dispose()},_updateController:function(t,e,i){var n=t.coordinateSystem,a=this._controller;a.zoomLimit=t.get("scaleLimit"),a.zoom=t.get("roamDetail.zoom"),a.enable(t.get("roam")||!1);var o=t.type.split(".")[0];a.off("pan").on("pan",function(e,n){i.dispatchAction({type:"geoRoam",component:o,name:t.name,dx:e,dy:n})}),a.off("zoom").on("zoom",function(e,n,a){if(i.dispatchAction({type:"geoRoam",component:o,name:t.name,zoom:e,originX:n,originY:a}),this._updateGroup){var r=this.group,s=r.scale;r.traverse(function(t){"text"===t.type&&t.attr("scale",[1/s[0],1/s[1]])})}},this),a.rect=n.getViewRect()}},t.exports=r},function(t,e,i){i(222),i(333),i(303);var n=i(2);n.extendComponentView({type:"parallel"}),n.registerPreprocessor(i(334))},function(t,e,i){function n(t,e){a.each(["inRange","outOfRange","target","controller","color"],function(i){e.hasOwnProperty(i)?t[i]=a.clone(e[i]):delete t[i]})}var a=i(1),o=i(15),r=i(2),s=i(7),l=i(347),h=i(73),u=h.mapVisual,c=h.eachVisual,d=i(4),f=a.isArray,p=a.each,g=d.asc,m=d.linearMap,v=r.extendComponentModel({type:"visualMap",dependencies:["series"],dataBound:[-(1/0),1/0],stateList:["inRange","outOfRange"],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",seriesIndex:null,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:["#bf444c","#d88273","#f6efa6"],formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this._dataExtent,this.controllerVisuals={},this.targetVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i),this.doMergeOption({},!0)},mergeOption:function(t){v.superApply(this,"mergeOption",arguments),this.doMergeOption(t,!1)},doMergeOption:function(t,e){var i=this.option;!e&&n(i,t),o.canvasSupported||(i.realtime=!1),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},formatValueText:function(t,e){function i(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(s)}var n,o,r=this.option,s=r.precision,l=this.dataBound,h=r.formatter;return a.isArray(t)&&(t=t.slice(),n=!0),o=e?t:n?[i(t[0]),i(t[1])]:i(t),a.isString(h)?h.replace("{value}",n?o[0]:o).replace("{value2}",n?o[1]:o):a.isFunction(h)?n?h(t[0],t[1]):h(t):n?t[0]===l[0]?"< "+o[1]:t[1]===l[1]?"> "+o[0]:o[0]+" - "+o[1]:o},resetTargetSeries:function(t,e){var i=this.option,n=null==i.seriesIndex;i.seriesIndex=n?[]:s.normalizeToArray(i.seriesIndex),n&&this.ecModel.eachSeries(function(t,e){var n=t.getData();"list"===n.type&&i.seriesIndex.push(e)})},resetExtent:function(){var t=this.option,e=g([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension;return null!=e?e:t.dimensions.length-1},getExtent:function(){return this._dataExtent.slice()},resetVisual:function(t){function e(e,o){p(this.stateList,function(r){var s=o[r]||(o[r]=i()),l=this.option[e][r]||{};p(l,function(i,o){if(h.isValidType(o)){var l={type:o,dataExtent:n,visual:i};t&&t.call(this,l,r),s[o]=new h(l),"controller"===e&&"opacity"===o&&(l=a.clone(l),l.type="colorAlpha",s.__hidden.__alphaForOpacity=new h(l))}},this)},this)}function i(){var t=function(){};t.prototype.__hidden=t.prototype;var e=new t;return e}var n=this.getExtent();e.call(this,"controller",this.controllerVisuals),e.call(this,"target",this.targetVisuals)},completeVisualOption:function(){function t(t){f(n.color)&&!t.inRange&&(t.inRange={color:n.color.slice().reverse()}),p(this.stateList,function(e){var i=t[e];if(a.isString(i)){var n=l.get(i,"active",d);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}function e(t,e,i){var n=t[e],a=t[i];n&&!a&&(a=t[i]={},p(n,function(t,e){var i=l.get(e,"inactive",d);h.isValidType(e)&&i&&(a[e]=i)}))}function i(t){var e=(t.inRange||{}).symbol||
|
||
|
n.registerVisualCoding("chart",a.curry(i(44),"graph","circle",null)),n.registerVisualCoding("chart",i(250)),n.registerLayout(i(256)),n.registerLayout(i(251)),n.registerLayout(i(254)),n.registerCoordinateSystem("graphView",{create:i(252)})},function(t,e,i){"use strict";var n=i(14),a=i(1),o=i(209),r=i(2).extendSeriesModel({type:"series.graph",init:function(t){r.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this._updateCategoriesData()},mergeOption:function(t){r.superApply(this,"mergeOption",arguments),this._updateCategoriesData()},getInitialData:function(t,e){var i=t.edges||t.links,n=t.data||t.nodes;if(n&&i){var a=o(n,i,this,!0),r=a.data,s=this;return r.wrapMethod("getItemModel",function(t){var e=s._categoriesModels,i=t.getShallow("category"),n=e[i];return n&&(n.parentModel=t.parentModel,t.parentModel=n),t}),r}},restoreData:function(){r.superApply(this,"restoreData",arguments),this.getGraph().restoreData()},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},_updateCategoriesData:function(){var t=a.map(this.option.categories||[],function(t){return null!=t.value?t:a.extend({value:0},t)}),e=new n(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setRoamZoom:function(t){var e=this.option.roamDetail;e&&(e.zoom=t)},setRoamPan:function(t,e){var i=this.option.roamDetail;i&&(i.x=t,i.y=e)},defaultOption:{zlevel:0,z:2,color:["#61a0a8","#d14a61","#fd9c35","#675bba","#fec42c","#dd4444","#fd9c35","#cd4870"],coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,force:{initLayout:null,repulsion:50,gravity:.1,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,draggable:!1,roam:!1,roamDetail:{x:0,y:0,zoom:1},nodeScaleRatio:.6,label:{normal:{show:!1},emphasis:{show:!0}},itemStyle:{normal:{},emphasis:{}},lineStyle:{normal:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{}}}});t.exports=r},function(t,e,i){var n=i(38),a=i(84),o=i(70),r=i(7),s=i(3);i(2).extendChartView({type:"graph",init:function(t,e){var i=new n,r=new a,s=this.group,l=new o(e.getZr(),s);s.add(i.group),s.add(r.group),this._symbolDraw=i,this._lineDraw=r,this._controller=l,this._firstRender=!0},render:function(t,e,i){var n=t.coordinateSystem;if("geo"===n.type||"view"===n.type){var a=t.getData();this._model=t;var o=this._symbolDraw,l=this._lineDraw;o.updateData(a);var h=a.graph.edgeData,u=t.option,c=r.createDataFormatModel(t,h,u.edges||u.links);c.formatTooltip=function(t){var e=this.getDataParams(t),i=a.graph.getEdgeByIndex(t),n=a.getName(i.node1.dataIndex),o=a.getName(i.node2.dataIndex),r=n+" > "+o;return e.value&&(r+=" : "+e.value),r},l.updateData(h,null,null),h.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=c})});var d=this.group,f={position:n.position,scale:n.scale};this._firstRender?d.attr(f):s.updateProps(d,f,t),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(),this._updateController(t,n,i),clearTimeout(this._layoutTimeout);var p=t.forceLayout,g=t.get("force.layoutAnimation");p&&this._startForceLayoutIteration(p,g),a.eachItemGraphicEl(function(t,e){var i=a.getItemModel(e).get("draggable");i&&p?t.on("drag",function(){p.warmUp(),!this._layouting&&this._startForceLayoutIteration(p,g),p.setFixed(e),a.setItemLayout(e,t.position)},this).on("dragend",function(){p.setUnfixed(e)},this):t.off("drag"),t.setDraggable(i)},this),this._firstRender=!1}},_startForceLayoutIteration:function(t,e){var i=this;!function n(){t.step(function(t){i.updateLayout(),(i._layouting=!t)&&(e?i._layoutTimeout=setTimeout(n,16):n())})}()},_updateController:function(t,e,i){var n=this._controller;n.rect=e.getViewRect(),n.enable(t.get("roam")),n.off("pan").off("zoom").on("pan",function(e,n){i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e,dy:n})}).on("zoom",function(e,n,a){i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e,originX:n,originY:a})}).on("zoom"
|
||
|
var a=i(3),o=i(1),r=i(24);t.exports=i(2).extendChartView({type:"radar",render:function(t,e,i){function s(t,e){var i=t.getItemVisual(e,"symbol")||"circle",a=t.getItemVisual(e,"color");if("none"!==i){var o=r.createSymbol(i,-.5,-.5,1,1,a);return o.attr({style:{strokeNoScale:!0},z2:100,scale:n(t.getItemVisual(e,"symbolSize"))}),o}}function l(e,i,n,o,r,l){n.removeAll();for(var h=0;h<i.length-1;h++){var u=s(o,r);u&&(u.__dimIdx=h,e[h]?(u.attr("position",e[h]),a[l?"initProps":"updateProps"](u,{position:i[h]},t)):u.attr("position",i[h]),n.add(u))}}function h(t){return o.map(t,function(t){return[u.cx,u.cy]})}var u=t.coordinateSystem,c=this.group,d=t.getData(),f=this._data;d.diff(f).add(function(e){var i=d.getItemLayout(e);if(i){var n=new a.Polygon,o=new a.Polyline,r={shape:{points:i}};n.shape.points=h(i),o.shape.points=h(i),a.initProps(n,r,t),a.initProps(o,r,t);var s=new a.Group,u=new a.Group;s.add(o),s.add(n),s.add(u),l(o.shape.points,i,u,d,e,!0),d.setItemGraphicEl(e,s)}}).update(function(e,i){var n=f.getItemGraphicEl(i),o=n.childAt(0),r=n.childAt(1),s=n.childAt(2),h={shape:{points:d.getItemLayout(e)}};h.shape.points&&(l(o.shape.points,h.shape.points,s,d,e,!1),a.updateProps(o,h,t),a.updateProps(r,h,t),d.setItemGraphicEl(e,n))}).remove(function(t){c.remove(f.getItemGraphicEl(t))}).execute(),d.eachItemGraphicEl(function(e,i){function n(){h.attr("ignore",v)}function r(){h.attr("ignore",m)}var s=d.getItemModel(i),l=e.childAt(0),h=e.childAt(1),u=e.childAt(2),f=d.getItemVisual(i,"color");c.add(e),l.setStyle(o.extend(s.getModel("lineStyle.normal").getLineStyle(),{stroke:f})),l.hoverStyle=s.getModel("lineStyle.emphasis").getLineStyle();var p=s.getModel("areaStyle.normal"),g=s.getModel("areaStyle.emphasis"),m=p.isEmpty()&&p.parentModel.isEmpty(),v=g.isEmpty()&&g.parentModel.isEmpty();v=v&&m,h.ignore=m,h.setStyle(o.defaults(p.getAreaStyle(),{fill:f,opacity:.7})),h.hoverStyle=g.getAreaStyle();var y=s.getModel("itemStyle.normal").getItemStyle(["color"]),x=s.getModel("itemStyle.emphasis").getItemStyle(),_=s.getModel("label.normal"),w=s.getModel("label.emphasis");u.eachChild(function(e){e.setStyle(y),e.hoverStyle=o.clone(x);var n=d.get(d.dimensions[e.__dimIdx],i);a.setText(e.style,_,f),e.setStyle({text:_.get("show")?o.retrieve(t.getFormattedLabel(i,"normal",null,e.__dimIdx),n):""}),a.setText(e.hoverStyle,w,f),e.hoverStyle.text=w.get("show")?o.retrieve(t.getFormattedLabel(i,"emphasis",null,e.__dimIdx),n):""}),e.off("mouseover").off("mouseout").off("normal").off("emphasis"),e.on("emphasis",n).on("mouseover",n).on("normal",r).on("mouseout",r),a.setHoverStyle(e)}),this._data=d},remove:function(){this.group.removeAll(),this._data=null}})},function(t,e,i){var n=i(1);t.exports=function(t){var e=t.polar;if(e){n.isArray(e)||(e=[e]);var i=[];n.each(e,function(e,a){e.indicator?(e.type&&!e.shape&&(e.shape=e.type),t.radar=t.radar||[],n.isArray(t.radar)||(t.radar=[t.radar]),t.radar.push(e)):i.push(e)}),t.polar=i}n.each(t.series,function(t){"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})}},function(t,e){t.exports=function(t,e){t.eachSeriesByType("radar",function(t){function e(t,e){n[e]=n[e]||[],n[e][o]=a.dataToPoint(t,o)}var i=t.getData(),n=[],a=t.coordinateSystem;if(a){for(var o=0;o<a.getIndicatorAxes().length;o++){var r=i.dimensions[o];i.each(r,e)}i.each(function(t){n[t][0]&&n[t].push(n[t][0].slice()),i.setItemLayout(t,n[t])})}})}},function(t,e,i){var n=i(2);i(285),i(286),n.registerLayout(i(287)),n.registerVisualCoding("chart",i(288))},function(t,e,i){"use strict";var n=i(13),a=i(209);t.exports=n.extend({type:"series.sankey",layoutInfo:null,getInitialData:function(t,e){var i=t.edges||t.links,n=t.data||t.nodes;if(n&&i){var o=a(n,i,this,!0);return o.data}},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",nodeWidth:20,nodeGap:8,layoutIterations:32,label:{normal:{show:!0,position:"right",textStyle:{color:"#000",fontSize:12}},emphasis:{show:!0}},itemStyle:{normal:{borderWidth:1,borderCo
|
||
|
type:"parallelAxis",_selectController:null,render:function(t,e,i,r){if(!n(t,e,r)&&(this.axisModel=t,this.api=i,this.group.removeAll(),t.get("show"))){var l=e.getComponent("parallel",t.get("parallelIndex")).coordinateSystem,h=t.getAreaSelectStyle(),u=h.width,c=l.getAxisLayout(t.axis.dim),d=a.extend({strokeContainThreshold:u,axisLineSilent:!(u>0)},c),f=new o(t,d);a.each(s,f.add,f);var p=f.getGroup();this.group.add(p),this._buildSelectController(p,h,t,i)}},_buildSelectController:function(t,e,i,n){var o=i.axis,s=this._selectController;s||(s=this._selectController=new r("line",n.getZr(),e),s.on("selected",a.bind(this._onSelected,this))),s.enable(t);var l=a.map(i.activeIntervals,function(t){return[o.dataToCoord(t[0],!0),o.dataToCoord(t[1],!0)]});s.update(l)},_onSelected:function(t){var e=this.axisModel,i=e.axis,n=a.map(t,function(t){return[i.coordToData(t[0],!0),i.coordToData(t[1],!0)]});this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:e.id,intervals:n})},remove:function(){this._selectController&&this._selectController.disable()},dispose:function(){this._selectController&&(this._selectController.dispose(),this._selectController=null)}});t.exports=l},function(t,e,i){"use strict";function n(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotation:e.getModel("axisLabel").get("rotate"),z2:1}}var a=i(1),o=i(3),r=i(48),s=["axisLine","axisLabel","axisTick","axisName"],l=["splitLine","splitArea"];i(2).extendComponentView({type:"radiusAxis",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=e.getComponent("polar",t.get("polarIndex")),o=i.coordinateSystem.getAngleAxis(),h=t.axis,u=i.coordinateSystem,c=h.getTicksCoords(),d=o.getExtent()[0],f=h.getExtent(),p=n(u,t,d),g=new r(t,p);a.each(s,g.add,g),this.group.add(g.getGroup()),a.each(l,function(e){t.get(e+".show")&&this["_"+e](t,u,d,f,c)},this)}},_splitLine:function(t,e,i,n,r){var s=t.getModel("splitLine"),l=s.getModel("lineStyle"),h=l.get("color"),u=0;h=h instanceof Array?h:[h];for(var c=[],d=0;d<r.length;d++){var f=u++%h.length;c[f]=c[f]||[],c[f].push(new o.Circle({shape:{cx:e.cx,cy:e.cy,r:r[d]},silent:!0}))}for(var d=0;d<c.length;d++)this.group.add(o.mergePath(c[d],{style:a.defaults({stroke:h[d%h.length],fill:null},l.getLineStyle()),silent:!0}))},_splitArea:function(t,e,i,n,r){var s=t.getModel("splitArea"),l=s.getModel("areaStyle"),h=l.get("color"),u=0;h=h instanceof Array?h:[h];for(var c=[],d=r[0],f=1;f<r.length;f++){var p=u++%h.length;c[p]=c[p]||[],c[p].push(new o.Sector({shape:{cx:e.cx,cy:e.cy,r0:d,r:r[f],startAngle:0,endAngle:2*Math.PI},silent:!0})),d=r[f]}for(var f=0;f<c.length;f++)this.group.add(o.mergePath(c[f],{style:a.defaults({fill:h[f%h.length]},l.getAreaStyle()),silent:!0}))}})},function(t,e,i){var n=i(2),a={type:"axisAreaSelect",event:"axisAreaSelected",update:"updateVisual"};n.registerAction(a,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(e){e.axis.model.setActiveIntervals(t.intervals)})})},function(t,e,i){i(221),i(302),i(205)},function(t,e,i){"use strict";var n=i(210);t.exports=i(2).extendComponentView({type:"geo",init:function(t,e){var i=new n(e,!0);this._mapDraw=i,this.group.add(i.group)},render:function(t,e,i){t.get("show")&&this._mapDraw.draw(t,e,i)}})},function(t,e,i){i(222),i(300),i(298)},function(t,e,i){"use strict";i(200),i(296),i(307),i(2).extendComponentView({type:"polar"})},function(t,e,i){i(341),i(342),i(306)},function(t,e,i){var n=i(48),a=i(1),o=i(3),r=["axisLine","axisLabel","axisTick","axisName"];t.exports=i(2).extendComponentView({type:"radar",render:function(t,e,i){var n=this.group;n.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes(),o=a.map(i,function(t){var i=new n(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return i});a.each(o,function(t){a.each(r,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){function e(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}var i=t.co
|
||
|
var n=e[i].getBoundingRect();t=t||n.clone(),t.union(n)}return this._rect=t||new r(0,0,0,0)},dataToPoints:function(t){var e=[];return t.mapArray(["lng","lat"],function(t,i){return e[0]=t,e[1]=i,this.dataToPoint(e)},this)},dataToPoint:function(t){return"string"==typeof t&&(t=this.getGeoCoord(t)),t?s.prototype.dataToPoint.call(this,t):void 0}},o.mixin(n,s),t.exports=n},function(t,e,i){"use strict";var n=i(7),a=i(10);a.extend({type:"geo",coordinateSystem:null,init:function(t){a.prototype.init.apply(this,arguments),n.defaultEmphasis(t.label,["position","show","textStyle","distance","formatter"])},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",map:"",roamDetail:{x:0,y:0,zoom:1},scaleLimit:null,label:{normal:{show:!1,textStyle:{color:"#000"}},emphasis:{show:!0,textStyle:{color:"rgb(100,0,0)"}}},itemStyle:{normal:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{color:"rgba(255,215,0,0.8)"}}},getFormattedLabel:function(t,e){var i=this.get("label."+e+".formatter"),n={name:t};return"function"==typeof i?(n.status=e,i(n)):"string"==typeof i?i.replace("{a}",n.seriesName):void 0},setRoamZoom:function(t){var e=this.option.roamDetail;e&&(e.zoom=t)},setRoamPan:function(t,e){var i=this.option.roamDetail;i&&(i.x=t,i.y=e)}})},function(t,e,i){var n=i(1),a={Russia:[100,60],"United States of America":[-99,38]};t.exports=function(t){n.each(t.regions,function(t){var e=a[t.name];if(e){var i=t.center;i[0]=e[0],i[1]=e[1]}})}},function(t,e,i){for(var n=i(220),a=[126,25],o=[[[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]]],r=0;r<o.length;r++)for(var s=0;s<o[r].length;s++)o[r][s][0]/=10.5,o[r][s][1]/=-14,o[r][s][0]+=a[0],o[r][s][1]+=a[1];t.exports=function(t){"china"===t.map&&t.regions.push(new n("南海诸岛",o,a))}},function(t,e,i){var n=i(1),a={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};t.exports=function(t){n.each(t.regions,function(t){var e=a[t.name];if(e){var i=t.center;i[0]+=e[0]/10.5,i[1]+=-e[1]/14}})}},function(t,e,i){function n(t){if(!t.UTF8Encoding)return t;for(var e=t.features,i=0;i<e.length;i++)for(var n=e[i],o=n.geometry,r=o.coordinates,s=o.encodeOffsets,l=0;l<r.length;l++){var h=r[l];if("Polygon"===o.type)r[l]=a(h,s[l]);else if("MultiPolygon"===o.type)for(var u=0;u<h.length;u++){var c=h[u];h[u]=a(c,s[l][u])}}return t.UTF8Encoding=!1,t}function a(t,e){for(var i=[],n=e[0],a=e[1],o=0;o<t.length;o+=2){var r=t.charCodeAt(o)-64,s=t.charCodeAt(o+1)-64;r=r>>1^-(1&r),s=s>>1^-(1&s),r+=n,s+=a,n=r,a=s,i.push([r/1024,s/1024])}return i}function o(t){for(var e=[],i=0;i<t.length;i++)for(var n=0;n<t[i].length;n++)e.push(t[i][n]);return e}var r=i(1),s=i(220);t.exports=function(t){return n(t),r.map(r.filter(t.features,function(t){return t.geometry&&t.properties}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates;return"MultiPolygon"===i.type&&(n=o(n)),new s(e.name,n,e.cp)})}},function(t,e,i){function n(t,e){return e.type||(e.data?"category":"value")}var a=i(10),o=i(1),r=i(30),s=i(61),l=i(4),h=a.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return r([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]]).call(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=o.clone(t);if(e)for(var i=e.length-1;i>=0;i--)l.asc(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t)return"ina
|