|
|
|
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t){var e={},i={},n=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);return n&&(i.firefox=!0,i.version=n[1]),r&&(i.ie=!0,i.version=r[1]),a&&(i.edge=!0,i.version=a[1]),o&&(i.weChat=!0),{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=11),domSupported:"undefined"!=typeof document}}function i(t,e){"createCanvas"===t&&(dg=null),ug[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,i=ng.call(t);if("[object Array]"===i){if(!R(t)){e=[];for(var r=0,a=t.length;a>r;r++)e[r]=n(t[r])}}else if(ig[i]){if(!R(t)){var o=t.constructor;if(t.constructor.from)e=o.from(t);else{e=new o(t.length);for(var r=0,a=t.length;a>r;r++)e[r]=n(t[r])}}}else if(!eg[i]&&!R(t)&&!T(t)){e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=n(t[s]))}return e}function r(t,e,i){if(!S(e)||!S(t))return i?n(e):t;for(var a in e)if(e.hasOwnProperty(a)){var o=t[a],s=e[a];!S(s)||!S(o)||_(s)||_(o)||T(s)||T(o)||M(s)||M(o)||R(s)||R(o)?!i&&a in t||(t[a]=n(e[a],!0)):r(o,s,i)}return t}function a(t,e){for(var i=t[0],n=1,a=t.length;a>n;n++)i=r(i,t[n],e);return i}function o(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 dg||(dg=cg().getContext("2d")),dg}function h(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 u(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var r in n)t.prototype[r]=n[r];t.prototype.constructor=t,t.superClass=e}function c(t,e,i){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,i)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,i){if(t&&e)if(t.forEach&&t.forEach===ag)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,r=t.length;r>n;n++)e.call(i,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function p(t,e,i){if(t&&e){if(t.map&&t.map===lg)return t.map(e,i);for(var n=[],r=0,a=t.length;a>r;r++)n.push(e.call(i,t[r],r,t));return n}}function g(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===hg)return t.reduce(e,i,n);for(var r=0,a=t.length;a>r;r++)i=e.call(n,i,t[r],r,t);return i}}function v(t,e,i){if(t&&e){if(t.filter&&t.filter===og)return t.filter(e,i);for(var n=[],r=0,a=t.length;a>r;r++)e.call(i,t[r],r,t)&&n.push(t[r]);return n}}function m(t,e,i){if(t&&e)for(var n=0,r=t.length;r>n;n++)if(e.call(i,t[n],n,t))return t[n]}function y(t,e){var i=sg.call(arguments,2);return function(){return t.apply(e,i.concat(sg.call(arguments)))}}function x(t){var e=sg.call(arguments,1);return function(){return t.apply(this,e.concat(sg.call(arguments)))}}function _(t){return"[object Array]"===ng.call(t)}function w(t){return"function"==typeof t}function b(t){return"[object String]"===ng.call(t)}function S(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function M(t){return!!eg[ng.call(t)]}function I(t){return!!ig[ng.call(t)]}function T(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function C(t){return t!==t}function A(){for(var t=0,e=arguments.length;e>t;t++)if(null!=arguments[t])return arguments[t]}function D(t,e){return null!=t?t:e}function k(t,e,i){return null!=t?t:null!=e?e:i}function P(){return Function.call.apply(sg,arguments)}function L(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function O(t,e){if(!t)throw new Error(e)}function z(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\u
|
|
|
|
|
}function yn(t){mn.call(this,t)}function xn(t){return parseInt(t,10)}function _n(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function wn(t,e,i){return Nv.copy(t.getBoundingRect()),t.transform&&Nv.applyTransform(t.transform),Fv.width=e,Fv.height=i,!Nv.intersect(Fv)}function bn(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0}function Sn(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}function Mn(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","overflow:hidden","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}function In(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function Tn(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function Cn(t){return"mousewheel"===t&&tg.browser.firefox?"DOMMouseScroll":t}function An(t,e,i){var n=t._gestureMgr;"start"===i&&n.clear();var r=n.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom);if("end"===i&&n.clear(),r){var a=r.type;e.gestureEvent=a,t.handler.dispatchToElement({target:r.target},a,r.event)}}function Dn(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function kn(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Pn(t){function e(t,e){return function(){return e._touching?void 0:t.apply(e,arguments)}}f(Yv,function(e){t._handlers[e]=y(Uv[e],t)}),f(qv,function(e){t._handlers[e]=y(Uv[e],t)}),f(Xv,function(i){t._handlers[i]=e(Uv[i],t)})}function Ln(t){function e(e,i){f(e,function(e){ge(t,Cn(e),i._handlers[e])},i)}bg.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._gestureMgr=new Gv,this._handlers={},Pn(this),tg.pointerEventsSupported?e(qv,this):(tg.touchEventsSupported&&e(Yv,this),e(Xv,this))}function On(t,e){var i=new em(Qp(),t,e);return Jv[i.id]=i,i}function zn(t){if(t)t.dispose();else{for(var e in Jv)Jv.hasOwnProperty(e)&&Jv[e].dispose();Jv={}}return this}function En(t){return Jv[t]}function Rn(t,e){Qv[t]=e}function Bn(t){delete Jv[t]}function Nn(t){return t instanceof Array?t:null==t?[]:[t]}function Fn(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,r=i.length;r>n;n++){var a=i[n];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}function Vn(t){return!rm(t)||am(t)||t instanceof Date?t:t.value}function Wn(t){return rm(t)&&!(t instanceof Array)}function Gn(t,e){e=(e||[]).slice();var i=p(t||[],function(t){return{exist:t}});return nm(e,function(t,n){if(rm(t)){for(var r=0;r<i.length;r++)if(!i[r].option&&null!=t.id&&i[r].exist.id===t.id+"")return i[r].option=t,void(e[n]=null);for(var r=0;r<i.length;r++){var a=i[r].exist;if(!(i[r].option||null!=a.id&&null!=t.id||null==t.name||Xn(t)||Xn(a)||a.name!==t.name+""))return i[r].option=t,void(e[n]=null)}}}),nm(e,function(t){if(rm(t)){for(var e=0;e<i.length;e++){var n=i[e].exist;if(!i[e].option&&!Xn(n)&&null==t.id){i[e].option=t;break}}e>=i.length&&i.push({option:t})}}),i}function Hn(t){var e=N();nm(t,function(t){var i=t.exist;i&&e.set(i.id,t)}),nm(t,function(t){var i=t.option;O(!i||null==i.id||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&e.set(i.id,t),!t.keyInfo&&(t.keyInfo={})}),nm(t,function(t,i){var n=t.exist,r=t.option,a=t.keyInfo;if(rm(r)){if(a.name=null!=r.name?r.name+"":n?n.name:om+i,n)a.id=n.id;else if(null!=r.id)a.id=r.id+"";else{var o=0;do a.id="\x00"+a.name+"\x00"+o++;while(e.get(a.id))}e.set(a.id,t)}})}function Zn(t){var e=t.name;return!(!e||!e.indexOf(om))}function Xn(t){return rm(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")}function Yn(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?_(e.dataIndex)?p(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?_(e.name)?p(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function jn(){var t="__\x00ec
|
|
|
|
|
}function yo(t,e){return t+="","0000".substr(0,e-t.length)+t}function xo(t,e,i){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="MM-dd\nyyyy");var n=ro(e),r=i?"UTC":"",a=n["get"+r+"FullYear"](),o=n["get"+r+"Month"]()+1,s=n["get"+r+"Date"](),l=n["get"+r+"Hours"](),h=n["get"+r+"Minutes"](),u=n["get"+r+"Seconds"](),c=n["get"+r+"Milliseconds"]();return t=t.replace("MM",yo(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",yo(s,2)).replace("d",s).replace("hh",yo(l,2)).replace("h",l).replace("mm",yo(h,2)).replace("m",h).replace("ss",yo(u,2)).replace("s",u).replace("SSS",yo(c,3))}function _o(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function wo(t,e,i,n,r){var a=0,o=0;null==n&&(n=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,h){var u,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(h+1),g=p&&p.getBoundingRect();if("horizontal"===t){var v=f.width+(g?-g.x+f.x:0);u=a+v,u>n||l.newline?(a=0,u=v,o+=s+i,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(g?-g.y+f.y:0);c=o+m,c>r||l.newline?(a+=s+i,o=0,c=m,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===t?a=u+i:o=c+i)})}function bo(t,e,i){i=rx(i||0);var n=e.width,r=e.height,a=Ua(t.left,n),o=Ua(t.top,r),s=Ua(t.right,n),l=Ua(t.bottom,r),h=Ua(t.width,n),u=Ua(t.height,r),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(h)&&(h=n-s-d-a),isNaN(u)&&(u=r-l-c-o),null!=f&&(isNaN(h)&&isNaN(u)&&(f>n/r?h=.8*n:u=.8*r),isNaN(h)&&(h=f*u),isNaN(u)&&(u=h/f)),isNaN(a)&&(a=n-s-h-d),isNaN(o)&&(o=r-l-u-c),t.left||t.right){case"center":a=n/2-h/2-i[3];break;case"right":a=n-h-d}switch(t.top||t.bottom){case"middle":case"center":o=r/2-u/2-i[0];break;case"bottom":o=r-u-c}a=a||0,o=o||0,isNaN(h)&&(h=n-d-a-(s||0)),isNaN(u)&&(u=r-c-o-(l||0));var p=new gi(a+i[3],o+i[0],h,u);return p.margin=i,p}function So(t,e,i){function n(i,n){var o={},l=0,h={},u=0,c=2;if(dx(i,function(e){h[e]=t[e]}),dx(i,function(t){r(e,t)&&(o[t]=h[t]=e[t]),a(o,t)&&l++,a(h,t)&&u++}),s[n])return a(e,i[1])?h[i[2]]=null:a(e,i[2])&&(h[i[1]]=null),h;if(u!==c&&l){if(l>=c)return o;for(var d=0;d<i.length;d++){var f=i[d];if(!r(o,f)&&r(t,f)){o[f]=t[f];break}}return o}return h}function r(t,e){return t.hasOwnProperty(e)}function a(t,e){return null!=t[e]&&"auto"!==t[e]}function o(t,e,i){dx(t,function(t){e[t]=i[t]})}!S(i)&&(i={});var s=i.ignoreSize;!_(s)&&(s=[s,s]);var l=n(px[0],0),h=n(px[1],1);o(px[0],t,l),o(px[1],t,h)}function Mo(t){return Io({},t)}function Io(t,e){return e&&t&&dx(fx,function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t}function To(t){var e=[];return f(yx.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=p(e,function(t){return Jn(t).main}),"dataset"!==t&&h(e,"dataset")<=0&&e.unshift("dataset"),e}function Co(t,e){for(var i=t.length,n=0;i>n;n++)if(t[n].length>e)return t[n];return t[i-1]}function Ao(t){var e=t.get("coordinateSystem"),i={coordSysName:e,coordSysDims:[],axisMap:N(),categoryAxisMap:N()},n=Mx[e];return n?(n(t,i,i.axisMap,i.categoryAxisMap),i):void 0}function Do(t){return"category"===t.get("type")}function ko(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Ax?{}:[]),this.sourceFormat=t.sourceFormat||Dx,this.seriesLayoutBy=t.seriesLayoutBy||Px,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&N(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function Po(t){var e=t.option.source,i=Dx;if(I(e))i=kx;else if(_(e)){0===e.length&&(i=Tx);for(var n=0,r=e.length;r>n;n++){var a=e[n];if(null!=a){if(_(a)){i=Tx;break}if(S(a)){i=Cx;break}}}}else if(S(e)){for(var o in e)if(e.hasOwnProperty(o)&&d(e[o])){i=Ax;break}}else if(null!=e)throw new Error("Invalid data");Ox(t).sourceFormat=i}function Lo(t){return Ox(t).source}function Oo(t){Ox(t).datasetMap=N()}function zo(t){var e=t.option,i=e.data,n=I(i)?kx:Ix,r=!1,a=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=Vo(t);if(l){var h=l.option;i=h.source,n=Ox(l).sourceFormat,r=!0,a=a||h.seriesLayoutBy,null==o&&(o=h.sourceHeader),s=s||h.dimensions}var u=Eo(i,n,a,o,s),c=e.encode;!c&&l&&(c=Fo(t,l,i,n,a,
|
|
|
|
|
}),r}function Dh(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}function kh(t,e,i){i=i||{};var n,r,a,o,s=i.byIndex,l=i.stackedCoordDimension,h=!(!t||!t.get("stack"));if(f(e,function(t,i){b(t)&&(e[i]=t={name:t}),h&&!t.isExtraCoord&&(s||n||!t.ordinalMeta||(n=t),r||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(r=t))}),!r||s||n||(s=!0),r){a="__\x00ecstackresult",o="__\x00ecstackedover",n&&(n.createInvertedIndices=!0);var u=r.coordDim,c=r.type,d=0;f(e,function(t){t.coordDim===u&&d++}),e.push({name:a,coordDim:u,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,e.push({name:o,coordDim:o,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:r&&r.name,stackedByDimension:n&&n.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:a}}function Ph(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function Lh(t,e){return Ph(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Oh(t,e,i){i=i||{},ko.isInstance(t)||(t=ko.seriesDataToSource(t));var n,r=e.get("coordinateSystem"),a=Ko.get(r),o=Ao(e);o&&(n=p(o.coordSysDims,function(t){var e={name:t},i=o.axisMap.get(t);if(i){var n=i.get("type");e.type=fh(n)}return e})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,h=Vw(t,{coordDimensions:n,generateCoord:i.generateCoord});o&&f(h,function(t,e){var i=t.coordDim,n=o.categoryAxisMap.get(i);n&&(null==s&&(s=e),t.ordinalMeta=n.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)}),l||null==s||(h[s].otherDims.itemName=0);var u=kh(e,h),c=new Bw(h,e);c.setCalculationInfo(u);var d=null!=s&&zh(t)?function(t,e,i,n){return n===s?i:this.defaultDimValueGetter(t,e,i,n)}:null;return c.hasItemOption=!1,c.initData(t,null,d),c}function zh(t){if(t.sourceFormat===Ix){var e=Eh(t.data||[]);return null!=e&&!_(Vn(e))}}function Eh(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}function Rh(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function Bh(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}function Nh(t){return t._map||(t._map=N(t.categories))}function Fh(t){return S(t)&&null!=t.value?t.value:t+""}function Vh(t,e,i,n){var r={},a=t[1]-t[0],o=r.interval=so(a/e,!0);null!=i&&i>o&&(o=r.interval=i),null!=n&&o>n&&(o=r.interval=n);var s=r.intervalPrecision=Wh(o),l=r.niceTickExtent=[Zw(Math.ceil(t[0]/o)*o,s),Zw(Math.floor(t[1]/o)*o,s)];return Hh(l,t),r}function Wh(t){return Ja(t)+2}function Gh(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Hh(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Gh(t,0,e),Gh(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function Zh(t,e,i,n){var r=[];if(!t)return r;var a=1e4;e[0]<i[0]&&r.push(e[0]);for(var o=i[0];o<=i[1]&&(r.push(o),o=Zw(o+t,n),o!==r[r.length-1]);)if(r.length>a)return[];return e[1]>(r.length?r[r.length-1]:i[1])&&r.push(e[1]),r}function Xh(t){return t.get("stack")||jw+t.seriesIndex}function Yh(t){return t.dim+t.index}function jh(t){var e=[],i=t.axis,n="axis0";if("category"===i.type){for(var r=i.getBandWidth(),a=0;a<t.count;a++)e.push(s({bandWidth:r,axisKey:n,stackId:jw+a},t));for(var o=$h(e),l=[],a=0;a<t.count;a++){var h=o[n][jw+a];h.offsetCenter=h.offset+h.width/2,l.push(h)}return l}}function qh(t,e){var i=[];return e.eachSeriesByType(t,function(t){Jh(t)&&!tu(t)&&i.push(t)}),i}function Uh(t){var e=[];return f(t,function(t){var i=t.getData(),n=t.coordinateSystem,r=n.getBaseAxis(),a=r.getExtent(),o="category"===r.type?r.getBandWidth():Math.abs(a[1]-a[0])/i.count(),s=Ua(t.get("barWidth"),o),l=Ua(t.get("barMaxWidth"),o),h=t.get("barGap"),u=t.get("barCategoryGap");e.push({bandWidth:o,barWidth:s,barMaxWidth:l,barGap:h,barCategoryGap:u,axisKey:Yh(r),stackId:Xh(t)})}),$h(e)}function $h(t){var e={};f(t,function(t){var i=t.axisKey,n=t.bandWidth,r=e[i]||{bandWidth:n,remainedWidth:n,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=r.stacks;e[i]=r;var o=t.stackId;a[o]||r.autoWidthCount++,a[o]=a[o]||{width:0,maxWidth:0
|
|
|
|
|
return a[i]=n-r,o[i]=n+r,a[1-i]=o[1-i]=e[1-i],Math.abs(this.dataToPoint(a)[i]-this.dataToPoint(o)[i])},this)}function cd(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,r=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-r)-i.dataToCoord(n+r))}function dd(t,e){return p(["Radius","Angle"],function(i,n){var r=this["get"+i+"Axis"](),a=e[n],o=t[n]/2,s="dataTo"+i,l="category"===r.type?r.getBandWidth():Math.abs(r[s](a-o)-r[s](a+o));return"Angle"===i&&(l=l*Math.PI/180),l},this)}function fd(t){var e,i=t.type;if("path"===i){var n=t.shape,r=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=Id(n);e=Qr(a,null,r,n.layout||"center"),e.__customPathData=a}else if("image"===i)e=new yn({}),e.__customImagePath=t.style.image;else if("text"===i)e=new xy({}),e.__customText=t.style.text;else{var o=Yy[i.charAt(0).toUpperCase()+i.slice(1)];e=new o}return e.__customGraphicType=i,e.name=t.name,e}function pd(t,e,i,r,a,o,s){var l={},h=i.style||{};if(i.shape&&(l.shape=n(i.shape)),i.position&&(l.position=i.position.slice()),i.scale&&(l.scale=i.scale.slice()),i.origin&&(l.origin=i.origin.slice()),i.rotation&&(l.rotation=i.rotation),"image"===t.type&&i.style){var u=l.style={};f(["x","y","width","height"],function(e){gd(e,u,h,t.style,o)})}if("text"===t.type&&i.style){var u=l.style={};f(["x","y"],function(e){gd(e,u,h,t.style,o)}),!h.hasOwnProperty("textFill")&&h.fill&&(h.textFill=h.fill),!h.hasOwnProperty("textStroke")&&h.stroke&&(h.textStroke=h.stroke)}if("group"!==t.type&&(t.useStyle(h),o)){t.style.opacity=0;var c=h.opacity;null==c&&(c=1),Oa(t,{style:{opacity:c}},r,e)}o?t.attr(l):La(t,l,r,e),i.hasOwnProperty("z2")&&t.attr("z2",i.z2||0),i.hasOwnProperty("silent")&&t.attr("silent",i.silent),i.hasOwnProperty("invisible")&&t.attr("invisible",i.invisible),i.hasOwnProperty("ignore")&&t.attr("ignore",i.ignore),i.hasOwnProperty("info")&&t.attr("info",i.info);var d=i.styleEmphasis,p=d===!1;t.__cusHasEmphStl&&null==d||!t.__cusHasEmphStl&&p||(fa(t,d),t.__cusHasEmphStl=!p),s&&_a(t,!p)}function gd(t,e,i,n,r){null==i[t]||r||(e[t]=i[t],i[t]=n[t])}function vd(t,e,i,n){function r(t){null==t&&(t=m),M&&(y=e.getItemModel(t),x=y.getModel(US),_=y.getModel($S),w=e.getItemVisual(t,"color"),M=!1)}function a(t,i){return null==i&&(i=m),e.get(e.getDimension(t||0),i)}function l(i,n){null==n&&(n=m),r(n);var a=y.getModel(jS).getItemStyle();null!=w&&(a.fill=w);var s=e.getItemVisual(n,"opacity");return null!=s&&(a.opacity=s),ba(a,x,null,{autoColor:w,isRectText:!0}),a.text=x.getShallow("show")?D(t.getFormattedLabel(n,"normal"),Uu(e,n)):null,i&&o(a,i),a}function h(i,n){null==n&&(n=m),r(n);var a=y.getModel(qS).getItemStyle();return ba(a,_,null,{isRectText:!0},!0),a.text=_.getShallow("show")?k(t.getFormattedLabel(n,"emphasis"),t.getFormattedLabel(n,"normal"),Uu(e,n)):null,i&&o(a,i),a}function u(t,i){return null==i&&(i=m),e.getItemVisual(i,t)}function c(t){if(g.getBaseAxis){var e=g.getBaseAxis();return jh(s({axis:e},t),n)}}function d(){return i.getCurrentSeriesIndices()}function f(t){return ka(t,i)}var p=t.get("renderItem"),g=t.coordinateSystem,v={};g&&(v=g.prepareCustoms?g.prepareCustoms():QS[g.type](g));var m,y,x,_,w,b=s({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:a,style:l,styleEmphasis:h,visual:u,barLayout:c,currentSeriesIndices:d,font:f},v.api||{}),S={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:v.coordSys,dataInsideLength:e.count(),encode:md(t.getData())},M=!0;return function(t,i){return m=t,M=!0,p&&p(s({dataIndexInside:t,dataIndex:e.getRawIndex(t),actionType:i?i.type:null},S),b)}}function md(t){var e={};return f(t.dimensions,function(i,n){var r=t.getDimensionInfo(i);if(!r.isExtraCoord){var a=r.coordDim,o=e[a]=e[a]||[];o[r.coordDimIndex]=n}}),e}function yd(t,e,i,n,r,a){return t=xd(t,e,i,n,r,a,!0),t&&a.setItemGraphicEl(e,t),t}function xd(t,e,i,n,r,a,o){var s=!i;i=i||{};var l=i.type,h=i.shape,u=i.style;if(t&&(s||null!=l&&l!==t.__customGraphicType||"path"===l&&Td(h)&&Id(h)!==t.__customPathData||"image
|
|
|
|
|
},this._firstPaint=!0}function $p(t){return function(){iv('In IE8.0 VML mode painter not support method "'+t+'"')}}var Kp=2311,Qp=function(){return Kp++},Jp={};Jp="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:e(navigator.userAgent);var tg=Jp,eg={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},ig={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},ng=Object.prototype.toString,rg=Array.prototype,ag=rg.forEach,og=rg.filter,sg=rg.slice,lg=rg.map,hg=rg.reduce,ug={},cg=function(){return ug.createCanvas()};ug.createCanvas=function(){return document.createElement("canvas")};var dg,fg="__ec_primitive__";B.prototype={constructor:B,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){void 0!==e&&(t=y(t,e));for(var i in this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var pg=(Object.freeze||Object)({$override:i,clone:n,merge:r,mergeAll:a,extend:o,defaults:s,createCanvas:cg,getContext:l,indexOf:h,inherits:u,mixin:c,isArrayLike:d,each:f,map:p,reduce:g,filter:v,find:m,bind:y,curry:x,isArray:_,isFunction:w,isString:b,isObject:S,isBuiltInObject:M,isTypedArray:I,isDom:T,eqNaN:C,retrieve:A,retrieve2:D,retrieve3:k,slice:P,normalizeCssArray:L,assert:O,trim:z,setAsPrimitive:E,isPrimitive:R,createHashMap:N,concatArray:F,noop:V}),gg="undefined"==typeof Float32Array?Array:Float32Array,vg=q,mg=U,yg=ee,xg=ie,_g=(Object.freeze||Object)({create:W,copy:G,clone:H,set:Z,add:X,scaleAndAdd:Y,sub:j,len:q,length:vg,lenSquare:U,lengthSquare:mg,mul:$,div:K,dot:Q,scale:J,normalize:te,distance:ee,dist:yg,distanceSquare:ie,distSquare:xg,negate:ne,lerp:re,applyTransform:ae,min:oe,max:se});le.prototype={constructor:le,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(he(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,r=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(r,a,t),this.dispatchToElement(he(e,t),"drag",t.event);var o=this.findHover(i,n,e).target,s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.dispatchToElement(he(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(he(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(he(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(he(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var wg=Array.prototype.slice,bg=function(t){this._$handlers={},this._$eventProcessor=t};bg.prototype={constructor:bg,one:function(t,e,i,n){var r=this._$handlers;if("function"==typeof e&&(n=i,i=e,e=null),!i||!t)return this;e=ue(this,e),r[t]||(r[t]=[]);for(var a=0;a<r[t].length;a++)if(r[t][a].h===i)return this;return r[t].push({h:i,one:!0,query:e,ctx:n||this}),this},on:function(t,e,i,n){var r=this._$handlers;if("function"==typeof e&&(n=i,i=e,e=null),!i||!t)return this;e=ue(this,e),r[t]||(r[t]=[]);for(var a=0;a<r[t].length;a++)if(r[t][a].h===i)return this;return r[t].push({h:i,one:!1,query:e,ctx:n||this}),this},isSilent:function(t){var e=this._$handlers;return e[t]&&e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],r=0,a=i[t].length;a>r;r++)i[t][r].h!==e&&n.push(i[t][r]);i[t]=n}i[t]&&0===i[t
|
|
|
|
|
}if(o){var u=this.domBack;n.save(),n.globalAlpha=s,n.drawImage(u,0,0,r,a),n.restore()}}};var wv="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},bv=new Gg(50),Sv={},Mv=0,Iv=5e3,Tv=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Cv="12px sans-serif",Av={};Av.measureText=function(t,e){var i=l();return i.font=e||Cv,i.measureText(t)};var Dv={left:1,right:1,center:1},kv={top:1,bottom:1,middle:1},Pv=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],Lv=new gi,Ov=function(){};Ov.prototype={constructor:Ov,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&Qi(i,!0);var n=i.text;if(null!=n&&(n+=""),vn(n,i)){t.save();var r=this.transform;i.transformText?this.setTransform(t):r&&(Lv.copy(e),Lv.applyTransform(r),e=Lv),tn(this,t,n,i,e),t.restore()}}},mn.prototype={constructor:mn,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(){},afterBrush:function(){},brush:function(){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect();return n.contain(i[0],i[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?rv.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new gv(t,this),this.dirty(!1),this}},u(mn,rv),c(mn,Ov),yn.prototype={constructor:yn,type:"image",brush:function(t,e){var i=this.style,n=i.image;i.bind(t,this,e);var r=this._image=ki(n,this._image,this,this.onload);if(r&&Li(r)){var a=i.x||0,o=i.y||0,s=i.width,l=i.height,h=r.width/r.height;if(null==s&&null!=l?s=l*h:null==l&&null!=s?l=s/h:null==s&&null==l&&(s=r.width,l=r.height),this.setTransform(t),i.sWidth&&i.sHeight){var u=i.sx||0,c=i.sy||0;t.drawImage(r,u,c,i.sWidth,i.sHeight,a,o,s,l)}else if(i.sx&&i.sy){var u=i.sx,c=i.sy,d=s-u,f=l-c;t.drawImage(r,u,c,d,f,a,o,s,l)}else t.drawImage(r,a,o,s,l);null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new gi(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},u(yn,mn);var zv=1e5,Ev=314159,Rv=.01,Bv=.001,Nv=new gi(0,0,0,0),Fv=new gi(0,0,0,0),Vv=function(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=o({},i||{}),this.dpr=i.devicePixelRatio||tv,this._singleCanvas=n,this.root=t;var r=t.style;r&&(r["-webkit-tap-highlight-color"]="transparent",r["-webkit-user-select"]=r["user-select"]=r["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a=this._zlevelList=[],s=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){var l=t.width,h=t.height;null!=i.width&&(l=i.width),null!=i.height&&(h=i.height),this.dpr=i.devicePixelRatio||1,t.width=l*this.dpr,t.height=h*this.dpr,this._width=l,this._height=h;var u=new _v(t,this,this.dpr);u.__builtin__=!0,u.initContext(),s[Ev]=u,u.zlevel=Ev,a.push(Ev),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var c=this._domRoot=Mn(this._width,this._height);t.appendChild(c)}this._hoverlayer=null,this._hoverElements=[]};Vv.prototype={constructor:Vv,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();return t?{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}:v
|
|
|
|
|
if(o&&("sector"===s&&o.startAngle===o.endAngle||"rect"===s&&(!o.width||!o.height))){for(var l=0;l<wy.length;l++)wy[l][2]=n[wy[l][0]],n[wy[l][0]]=wy[l][1];e=!0;break}}if(t.apply(this,arguments),e)for(var l=0;l<wy.length;l++)n[wy[l][0]]=wy[l][2]}:t},Sy=Fr.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:by(Fr.prototype.brush),buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,l=e.clockwise,h=Math.cos(o),u=Math.sin(o);t.moveTo(h*r+i,u*r+n),t.lineTo(h*a+i,u*a+n),t.arc(i,n,a,o,s,!l),t.lineTo(Math.cos(s)*r+i,Math.sin(s)*r+n),0!==r&&t.arc(i,n,r,s,o,l),t.closePath()}}),My=Fr.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,r,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,r,!0)}}),Iy=function(t,e){for(var i=t.length,n=[],r=0,a=1;i>a;a++)r+=ee(t[a-1],t[a]);var o=r/2;o=i>o?i:o;for(var a=0;o>a;a++){var s,l,h,u=a/(o-1)*(e?i:i-1),c=Math.floor(u),d=u-c,f=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],h=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],h=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([Yr(s[0],f[0],l[0],h[0],d,p,g),Yr(s[1],f[1],l[1],h[1],d,p,g)])}return n},Ty=function(t,e,i,n){var r,a,o,s,l=[],h=[],u=[],c=[];if(n){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;f>d;d++)oe(o,o,t[d]),se(s,s,t[d]);oe(o,o,n[0]),se(s,s,n[1])}for(var d=0,f=t.length;f>d;d++){var p=t[d];if(i)r=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){l.push(H(t[d]));continue}r=t[d-1],a=t[d+1]}j(h,a,r),J(h,h,e);var g=ee(p,r),v=ee(p,a),m=g+v;0!==m&&(g/=m,v/=m),J(u,h,-g),J(c,h,v);var y=X([],p,u),x=X([],p,c);n&&(se(y,y,o),oe(y,y,s),se(x,x,o),oe(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l},Cy=Fr.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){jr(t,e,!0)}}),Ay=Fr.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){jr(t,e,!1)}}),Dy=Fr.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width,a=e.height;e.r?Ki(t,e):t.rect(i,n,r,a),t.closePath()}}),ky=Fr.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,r=e.x2,a=e.y2,o=e.percent;0!==o&&(t.moveTo(i,n),1>o&&(r=i*(1-o)+r*o,a=n*(1-o)+a*o),t.lineTo(r,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),Py=[],Ly=Fr.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,a=e.y2,o=e.cpx1,s=e.cpy1,l=e.cpx2,h=e.cpy2,u=e.percent;0!==u&&(t.moveTo(i,n),null==l||null==h?(1>u&&(yr(i,o,r,u,Py),o=Py[1],r=Py[2],yr(n,s,a,u,Py),s=Py[1],a=Py[2]),t.quadraticCurveTo(o,s,r,a)):(1>u&&(dr(i,o,l,r,u,Py),o=Py[1],l=Py[2],r=Py[3],dr(n,s,h,a,u,Py),s=Py[1],h=Py[2],a=Py[3]),t.bezierCurveTo(o,s,l,h,r,a)))},pointAt:function(t){return qr(this.shape,t,!1)},tangentAt:function(t){var e=qr(this.shape,t,!0);return te(e,e)}}),Oy=Fr.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,r=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(a),h=Math.sin(a);t.moveTo(l*r+i,h*r+n),t.arc(i,n,r,a,o,!s)}}),zy=Fr.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1])},buildPath:function(t,e){for(var i=e.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),Fr.prototype.g
|
|
|
|
|
};var f_={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},p_="\x00__throttleOriginMethod",g_="\x00__throttleRate",v_="\x00__throttleType",m_={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),r=t.get(n)||t.getColorFromPalette(t.name,null,e.getSeriesCount());if(i.setVisual("color",r),!e.isSeriesFiltered(t)){"function"!=typeof r||r instanceof Ey||i.each(function(e){i.setItemVisual(e,"color",r(t.getDataParams(e)))});var a=function(t,e){var i=t.getItemModel(e),r=i.get(n,!0);null!=r&&t.setItemVisual(e,"color",r)};return{dataEach:i.hasItemOption?a:null}}}},y_={toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}},x_=function(t,e){function i(t,e){if("string"!=typeof t)return t;var i=t;return f(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=o.get(t);if(null==e){for(var i=t.split("."),n=y_.aria,r=0;r<i.length;++r)n=n[i[r]];return n}return e}function r(){var t=e.getModel("title").option;return t&&t.length&&(t=t[0]),t&&t.text}function a(t){return y_.series.typeNames[t]||"自定义图"}var o=e.getModel("aria");if(o.get("show")){if(o.get("description"))return void t.setAttribute("aria-label",o.get("description"));var s=0;e.eachSeries(function(){++s},this);var l,h=o.get("data.maxCount")||10,u=o.get("series.maxCount")||10,c=Math.min(s,u);if(!(1>s)){var d=r();l=d?i(n("general.withTitle"),{title:d}):n("general.withoutTitle");var p=[],g=s>1?"series.multiple.prefix":"series.single.prefix";l+=i(n(g),{seriesCount:s}),e.eachSeries(function(t,e){if(c>e){var r,o=t.get("name"),l="series."+(s>1?"multiple":"single")+".";r=n(o?l+"withName":l+"withoutName"),r=i(r,{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:a(t.subType)});var u=t.getData();window.data=u,r+=u.count()>h?i(n("data.partialData"),{displayCnt:h}):n("data.allData");for(var d=[],f=0;f<u.count();f++)if(h>f){var g=u.getName(f),v=Ss(u,f);d.push(i(n(g?"data.withName":"data.withoutName"),{name:g,value:v}))}r+=d.join(n("data.separator.middle"))+n("data.separator.end"),p.push(r)}}),l+=p.join(n("series.multiple.separator.middle"))+n("series.multiple.separator.end"),t.setAttribute("aria-label",l)}}},__=Math.PI,w_=function(t,e){e=e||{},s(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new Dy({style
|
|
|
|
|
(y>=h&&u>=y||isNaN(y))&&(S>=_&&w>=S||isNaN(S))&&(o[s++]=d),d++}c=!0}}if(!c)if(1===n)for(var m=0;r>m;m++){var M=this.getRawIndex(m),y=this._getFast(l,M);(y>=h&&u>=y||isNaN(y))&&(o[s++]=M)}else for(var m=0;r>m;m++){for(var I=!0,M=this.getRawIndex(m),p=0;n>p;p++){var T=e[p],y=this._getFast(i,M);(y<t[T][0]||y>t[T][1])&&(I=!1)}I&&(o[s++]=this.getRawIndex(m))}return r>s&&(this._indices=o),this._count=s,this._extent={},this.getRawIndex=this._indices?wh:_h,this}}},Nw.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},i),r},Nw.map=function(t,e,i,n){i=i||n||this,t=p(Sh(t),this.getDimension,this);var r=Mh(this,t);r._indices=this._indices,r.getRawIndex=r._indices?wh:_h;for(var a=r._storage,o=[],s=this._chunkSize,l=t.length,h=this.count(),u=[],c=r._rawExtent,d=0;h>d;d++){for(var f=0;l>f;f++)u[f]=this.get(t[f],d);u[l]=d;var g=e&&e.apply(i,u);if(null!=g){"object"!=typeof g&&(o[0]=g,g=o);for(var v=this.getRawIndex(d),m=Math.floor(v/s),y=v%s,x=0;x<g.length;x++){var _=t[x],w=g[x],b=c[_],S=a[_];S&&(S[m][y]=w),w<b[0]&&(b[0]=w),w>b[1]&&(b[1]=w)}}}return r},Nw.downSample=function(t,e,i,n){for(var r=Mh(this,[t]),a=r._storage,o=[],s=Math.floor(1/e),l=a[t],h=this.count(),u=this._chunkSize,c=r._rawExtent[t],d=new(gh(this))(h),f=0,p=0;h>p;p+=s){s>h-p&&(s=h-p,o.length=s);for(var g=0;s>g;g++){var v=this.getRawIndex(p+g),m=Math.floor(v/u),y=v%u;o[g]=l[m][y]}var x=i(o),_=this.getRawIndex(Math.min(p+n(o,x)||0,h-1)),w=Math.floor(_/u),b=_%u;l[w][b]=x,x<c[0]&&(c[0]=x),x>c[1]&&(c[1]=x),d[f++]=_}return r._count=f,r._indices=d,r.getRawIndex=wh,r},Nw.getItemModel=function(t){var e=this.hostModel;return new Wa(this.getRawDataItem(t),e,e&&e.ecModel)},Nw.diff=function(t){var e=this;return new uh(t?t.getIndices():[],this.getIndices(),function(e){return bh(t,e)},function(t){return bh(e,t)})},Nw.getVisual=function(t){var e=this._visual;return e&&e[t]},Nw.setVisual=function(t,e){if(Dw(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},Nw.setLayout=function(t,e){if(Dw(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},Nw.getLayout=function(t){return this._layout[t]},Nw.getItemLayout=function(t){return this._itemLayouts[t]},Nw.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?o(this._itemLayouts[t]||{},e):e},Nw.clearItemLayouts=function(){this._itemLayouts.length=0},Nw.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},Nw.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=n,Dw(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],r[a]=!0);else n[e]=i,r[e]=!0},Nw.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var Fw=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};Nw.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(Fw,e)),this._graphicEls[t]=e},Nw.getItemGraphicEl=function(t){return this._graphicEls[t]},Nw.eachItemGraphicEl=function(t,e){f(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},Nw.cloneShallow=function(t){if(!t){var e=p(this.dimensions,this.getDimensionInfo,this);t=new Bw(e,this.hostModel)}if(t._storage=this._storage,mh(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?wh:_h,t},Nw.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(P(arguments)))})},Nw.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],Nw.CHANGABLE_METHODS=["filterSelf","selectRange"];var Vw=function(t,e){return e=e||{},Ch(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encode
|
|
|
|
|
var i=new lv({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};Jb.prototype={constructor:Jb,hasBuilder:function(t){return!!tS[t]},add:function(t){tS[t].call(this)},getGroup:function(){return this.group}};var tS={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,r=[i[0],0],a=[i[1],0];n&&(ae(r,r,n),ae(a,a,n));var s=o({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new ky(ia({anid:"line",shape:{x1:r[0],y1:r[1],x2:a[0],y2:a[1]},style:s,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1})));var l=e.get("axisLine.symbol"),h=e.get("axisLine.symbolSize"),u=e.get("axisLine.symbolOffset")||0;if("number"==typeof u&&(u=[u,u]),null!=l){"string"==typeof l&&(l=[l,l]),("string"==typeof h||"number"==typeof h)&&(h=[h,h]);var c=h[0],d=h[1];f([{rotate:t.rotation+Math.PI/2,offset:u[0],r:0},{rotate:t.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((r[0]-a[0])*(r[0]-a[0])+(r[1]-a[1])*(r[1]-a[1]))}],function(e,i){if("none"!==l[i]&&null!=l[i]){var n=fu(l[i],-c/2,-d/2,c,d,s.stroke,!0),a=e.r+e.offset,o=[r[0]+a*Math.cos(t.rotation),r[1]-a*Math.sin(t.rotation)];n.attr({rotation:e.rotate,position:o,silent:!0}),this.group.add(n)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=cc(this,t,e),n=dc(this,t,e);sc(t,n,i)},axisName:function(){var t=this.opt,e=this.axisModel,i=A(t.axisName,e.get("name"));if(i){var n,r=e.get("nameLocation"),a=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,h=this.axisModel.axis.getExtent(),u=h[0]>h[1]?-1:1,c=["start"===r?h[0]-u*l:"end"===r?h[1]+u*l:(h[0]+h[1])/2,uc(r)?t.labelOffset+a*l:0],d=e.get("nameRotate");null!=d&&(d=d*Qb/180);var f;uc(r)?n=eS(t.rotation,null!=d?d:t.rotation,a):(n=ac(t,r,d||0,h),f=t.axisNameAvailableWidth,null!=f&&(f=Math.abs(f/Math.sin(n.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},v=g.ellipsis,m=A(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=v&&null!=m?hx(i,m,p,v,{minChar:2,placeholder:g.placeholder}):i,x=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:i,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new xy({anid:"name",__fullText:i,__truncatedText:y,position:c,rotation:n.rotation,silent:oc(e),z2:1,tooltip:x&&x.show?o({content:i,formatter:function(){return i},formatterParams:w},x):null});ba(b.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.textAlign,textVerticalAlign:n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=rc(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},eS=Jb.innerTextLayout=function(t,e,i){var n,r,a=io(e-t);return no(a)?(r=i>0?"top":"bottom",n="center"):no(a-Qb)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=a>0&&Qb>a?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,textVerticalAlign:r}},iS=f,nS=x,rS=nh({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&xc(t),rS.superApply(this,"render",arguments),Mc(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n){Mc(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),rS.superApply(this,"remove",arguments)},dispose:function(t,e){Ic(this,e),rS.superApply(this,"dispose",arguments)}}),aS=[];rS.registerAxisPointerClass=function(t,e){aS[t]=e},rS.getAxisPointerClass=function(t){return t&&aS[t]};var oS=["axisLine","axisTickLabel","axisName"],sS=["splitArea","splitLine"],lS=rS.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new lv,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),o=Tc(a,t),s=new Jb(t,o);f(oS,s.add,s),this._axisGroup.add(s.getGroup()),f(sS,function(e){t.get(e+".show")&&this["_"+e](t,a)},this),Ba(r,this._axisGroup,t),lS.superCall(this,"render",t,e,i,n)}},remove:function(){this._s
|
|
|
|
|
o||(o=t.get("left")||t.get("right"),"middle"===o&&(o="center"),"right"===o?m.x+=m.width:"center"===o&&(m.x+=m.width/2)),s||(s=t.get("top")||t.get("bottom"),"center"===s&&(s="middle"),"bottom"===s?m.y+=m.height:"middle"===s&&(m.y+=m.height/2),s=s||"top"),n.attr("position",[m.x,m.y]);var y={textAlign:o,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=m.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var w=new Dy({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,silent:!0});na(w),n.add(w)}}});var JS=ih({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){JS.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(t){var e=[],i=[];t.eachRawSeries(function(n){var r=n.name;i.push(r);var a;if(n.legendDataProvider){var o=n.legendDataProvider(),s=o.mapArray(o.getName);t.isSeriesFiltered(n)||(i=i.concat(s)),s.length?e=e.concat(s):a=!0}else a=!0;a&&Zn(n)&&e.push(n.name)}),this._availableNames=i;var n=this.get("data")||e,r=p(n,function(t){return("string"==typeof t||"number"==typeof t)&&(t={name:t}),new Wa(t,this,this.ecModel)},this);this._data=r},getData:function(){return this._data},select:function(t){var e=this.option.selected,i=this.get("selectedMode");if("single"===i){var n=this._data;f(n,function(t){e[t.get("name")]=!1})}e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&h(this._availableNames,t)>=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});Ul("legendToggleSelect","legendselectchanged",x(Ad,"toggleSelected")),Ul("legendSelect","legendselected",x(Ad,"select")),Ul("legendUnSelect","legendunselected",x(Ad,"unSelect"));var tM=x,eM=f,iM=lv,nM=nh({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new iM),this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,i){if(this.resetInner(),t.get("show",!0)){var n=t.get("align");n&&"auto"!==n||(n="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(n,t,e,i);var r=t.getBoxLayoutParams(),a={width:i.getWidth(),height:i.getHeight()},o=t.get("padding"),l=bo(r,a,o),h=this.layoutInner(t,n,l),u=bo(s({width:h.width,height:h.height},r),a,o);this.group.attr("position",[u.x-h.x,u.y-h.y]),this.group.add(this._backgroundEl=Dd(h,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,i,n){var r=this.getContentGroup(),a=N(),o=e.get("selectedMode"),s=[];i.eachRawSeries(function(t){!t.get("legendHoverLink")&&s.push(t.id)}),eM(e.getData(),function(l,h){var u=l.get("name");if(!this.newlineDisabled&&(""===u||"\n"===u))return void r.add(new iM({newline:!0}));var c=i.getSeriesByName(u)[0];if(!a.get(u))if(c){var d=c.getData(),f=d.getVisual("color");"function"==typeof f&&(f=f(c.getDataParams(0)));var p=d.getVisual("legendSymbol")||"roundRect",g=d.getVisual("symbol"),v=this._createItem(u,h,l,e,p,g,t,f,o);v.on("click",tM(kd,u,n)).on("mouseover",tM(Pd,c.name,null,n,s)).on("mouseout",tM(Ld,c.name,null,n,s)),a.set(u,!0)}else i.eachRawSeries(function(i){if(!a.get(u)&&i.legendDataProvider){var r=i.legendDataProvi
|
|
|
|
|
})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),Yl(function(t){t.markPoint=t.markPoint||{}}),OM.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var NM=ky.prototype,FM=Ly.prototype,VM=$r({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(Bf(e)?NM:FM).buildPath(t,e)},pointAt:function(t){return Bf(this.shape)?NM.pointAt.call(this,t):FM.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=Bf(e)?[e.x2-e.x1,e.y2-e.y1]:FM.tangentAt.call(this,t);return te(i,i)}}),WM=["fromSymbol","toSymbol"],GM=Hf.prototype;GM.beforeUpdate=Gf,GM._createLine=function(t,e,i){var n=t.hostModel,r=t.getItemLayout(e),a=Vf(r);a.shape.percent=0,Oa(a,{shape:{percent:1}},n,e),this.add(a);var o=new xy({name:"label"});this.add(o),f(WM,function(i){var n=Ff(i,t,e);this.add(n),this[Nf(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},GM.updateData=function(t,e,i){var n=t.hostModel,r=this.childOfName("line"),a=t.getItemLayout(e),o={shape:{}};Wf(o.shape,a),La(r,o,n,e),f(WM,function(i){var n=t.getItemVisual(e,i),r=Nf(i);if(this[r]!==n){this.remove(this.childOfName(i));var a=Ff(i,t,e);this.add(a)}this[r]=n},this),this._updateCommonStl(t,e,i)},GM._updateCommonStl=function(t,e,i){var n=t.hostModel,r=this.childOfName("line"),a=i&&i.lineStyle,o=i&&i.hoverLineStyle,l=i&&i.labelModel,h=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var u=t.getItemModel(e);a=u.getModel("lineStyle").getLineStyle(),o=u.getModel("emphasis.lineStyle").getLineStyle(),l=u.getModel("label"),h=u.getModel("emphasis.label")}var c=t.getItemVisual(e,"color"),d=k(t.getItemVisual(e,"opacity"),a.opacity,1);r.useStyle(s({strokeNoScale:!0,fill:"none",stroke:c,opacity:d},a)),r.hoverStyle=o,f(WM,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:d}))},this);var p,g,v=l.getShallow("show"),m=h.getShallow("show"),y=this.childOfName("label");if((v||m)&&(p=c||"#000",g=n.getFormattedLabel(e,"normal",t.dataType),null==g)){var x=n.getRawValue(e);g=null==x?t.getName(e):isFinite(x)?$a(x):x}var _=v?g:null,w=m?D(n.getFormattedLabel(e,"emphasis",t.dataType),g):null,b=y.style;(null!=_||null!=w)&&(ba(y.style,l,{text:_},{autoColor:p}),y.__textAlign=b.textAlign,y.__verticalAlign=b.textVerticalAlign,y.__position=l.get("position")||"middle"),y.hoverStyle=null!=w?{text:w,textFill:h.getTextColor(!0),fontStyle:h.getShallow("fontStyle"),fontWeight:h.getShallow("fontWeight"),fontSize:h.getShallow("fontSize"),fontFamily:h.getShallow("fontFamily")}:{text:null},y.ignore=!v&&!m,xa(this)},GM.highlight=function(){this.trigger("emphasis")},GM.downplay=function(){this.trigger("normal")},GM.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},GM.setLinePoints=function(t){var e=this.childOfName("line");Wf(e.shape,t),e.dirty()},u(Hf,lv);var HM=Zf.prototype;HM.isPersistent=function(){return!0},HM.updateData=function(t){var e=this,i=e.group,n=e._lineData;e._lineData=t,n||i.removeAll();var r=jf(t);t.diff(n).add(function(i){Xf(e,t,i,r)}).update(function(i,a){Yf(e,n,t,a,i,r)}).remove(function(t){i.remove(n.getItemGraphicEl(t))}).execute()},HM.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},HM.incrementalPrepareUpdate=function(t){this._seriesScope=jf(t),this._lineData=null,this.group.removeAll()},HM.incrementalUpdate=function(t,e){function i(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}for(var n=t.start;n<t.end;n++){var r=e.getItemLayout(n);if(Uf(r)){var a=new this._ctor(e,n,this._seriesScope);a.traverse(i),this.group.add(a),e.setItemGraphicEl(n,a)}}},HM.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},HM._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var ZM=function(t,e,i,a){var s=t.getData(),l=a.type;if(!_(a)&&("min"===l||"max"===l||"a
|
|
|
|
|
},ondragend:gI(this._onDragEnd,this),onmouseover:gI(this._showDataInfo,this,!0),onmouseout:gI(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),o=r.getBoundingRect();this._handleHeight=Ua(a.get("handleSize"),this._size[1]),this._handleWidth=o.width/o.height*this._handleHeight,r.setStyle(a.getModel("handleStyle").getItemStyle());var s=a.get("handleColor");null!=s&&(r.style.fill=s),n.add(e[t]=r);var l=a.textStyleModel;this.group.add(i[t]=new xy({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[fI(t[0],[0,100],e,!0),fI(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,r=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];cI(e,n,r,i.get("zoomLock")?"all":t,null!=a.minSpan?fI(a.minSpan,o,r,!0):null,null!=a.maxSpan?fI(a.maxSpan,o,r,!0):null);var s=this._range,l=this._range=pI([fI(n[0],r,o,!0),fI(n[1],r,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=pI(i.slice()),r=this._size;vI([0,1],function(t){var n=e.handles[t],a=this._handleHeight;n.attr({scale:[a/2,a/2],position:[i[t],r[1]/2-a/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:r[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=za(n.handles[t].parent,this.group),i=Ra(0===t?"right":"left",e),s=this._handleWidth/2+bI,l=Ea([c[t]+(0===t?-s:s),this._size[1]/2],e);r[t].setStyle({x:l[0],y:l[1],textVerticalAlign:a===_I?"middle":i,textAlign:a===_I?i:"center",text:o[t]})}var i=this.dataZoomModel,n=this._displayables,r=n.handleLabels,a=this._orient,o=["",""];if(i.get("showDetail")){var s=i.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,h=this._range,u=t?s.calculateDataWindow({start:h[0],end:h[1]}).valueWindow:s.getDataValueWindow();o=[this._formatLabel(u[0],l),this._formatLabel(u[1],l)]}}var c=pI(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),r=i.get("labelPrecision");(null==r||"auto"===r)&&(r=e.getPixelPrecision());var a=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(r,20));return w(n)?n(t,a):b(n)?n.replace("{value}",a):a},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i){this._dragging=!0;var n=this._displayables.barGroup.getLocalTransform(),r=Ea([e,i],n,!0),a=this._updateInterval(t,r[0]),o=this.dataZoomModel.get("realtime");this._updateView(!o),a&&o&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,r=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-r);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(vI(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});hI.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var II="\x00_ec_interaction_mutex";Ul({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),c(Ap,bg);var TI="\x00_ec_dataZoom_roams",CI=y,AI=uI.extend({type:"dataZoom.inside",init:functi
|
|
|
|
|
|
|
|
|
|
layui.define('echartsTheme', function(exports) {
|
|
|
|
|
echarts.registerTheme('walden', layui.echartsTheme);
|
|
|
|
|
exports('echarts', echarts);
|
|
|
|
|
});
|