You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
5 lines
119 KiB
5 lines
119 KiB
11 months ago
|
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("echarts")):"function"==typeof define&&define.amd?define(["echarts"],e):"object"==typeof exports?exports["echarts-liquidfill"]=e(require("echarts")):t["echarts-liquidfill"]=e(t.echarts)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){t.exports=r(74)},function(t,e){function r(t,e){"createCanvas"===t&&(K=null),$[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,r=j.call(t);if("[object Array]"===r){if(!F(t)){e=[];for(var i=0,a=t.length;i<a;i++)e[i]=n(t[i])}}else if(H[r]){if(!F(t)){var o=t.constructor;if(t.constructor.from)e=o.from(t);else{e=new o(t.length);for(var i=0,a=t.length;i<a;i++)e[i]=n(t[i])}}}else if(!q[r]&&!F(t)&&!k(t)){e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=n(t[s]))}return e}function i(t,e,r){if(!S(e)||!S(t))return r?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)||k(s)||k(o)||T(s)||T(o)||F(s)||F(o)?!r&&a in t||(t[a]=n(e[a],!0)):i(o,s,r)}return t}function a(t,e){for(var r=t[0],n=1,a=t.length;n<a;n++)r=i(r,t[n],e);return r}function o(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function s(t,e,r){for(var n in e)e.hasOwnProperty(n)&&(r?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function l(){return K||(K=Z().getContext("2d")),K}function h(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r}return-1}function u(t,e){function r(){}var n=t.prototype;r.prototype=e.prototype,t.prototype=new r;for(var i in n)t.prototype[i]=n[i];t.prototype.constructor=t,t.superClass=e}function c(t,e,r){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,r)}function f(t){if(t)return"string"!=typeof t&&"number"==typeof t.length}function d(t,e,r){if(t&&e)if(t.forEach&&t.forEach===U)t.forEach(e,r);else if(t.length===+t.length)for(var n=0,i=t.length;n<i;n++)e.call(r,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(r,t[a],a,t)}function p(t,e,r){if(t&&e){if(t.map&&t.map===X)return t.map(e,r);for(var n=[],i=0,a=t.length;i<a;i++)n.push(e.call(r,t[i],i,t));return n}}function v(t,e,r,n){if(t&&e){if(t.reduce&&t.reduce===Q)return t.reduce(e,r,n);for(var i=0,a=t.length;i<a;i++)r=e.call(n,r,t[i],i,t);return r}}function g(t,e,r){if(t&&e){if(t.filter&&t.filter===V)return t.filter(e,r);for(var n=[],i=0,a=t.length;i<a;i++)e.call(r,t[i],i,t)&&n.push(t[i]);return n}}function y(t,e,r){if(t&&e)for(var n=0,i=t.length;n<i;n++)if(e.call(r,t[n],n,t))return t[n]}function m(t,e){var r=G.call(arguments,2);return function(){return t.apply(e,r.concat(G.call(arguments)))}}function x(t){var e=G.call(arguments,1);return function(){return t.apply(this,e.concat(G.call(arguments)))}}function _(t){return"[object Array]"===j.call(t)}function w(t){return"function"==typeof t}function b(t){return"[object String]"===j.call(t)}function S(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function T(t){return!!q[j.call(t)]}function M(t){return!!H[j.call(t)]}function k(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function P(t){return t!==t}function C(t){for(var e=0,r=arguments.length;e<r;e++)if(null!=arguments[e])return arguments[e]}function A(t,e){return null!=t?t:e}function O(t,e,r){return null!=t?t:null!=e?e:r}function I(){return Function.call.apply(G,arguments)}function D(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 R(t,e){if(!t)throw new Error(e)}function B(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function L(t){t[J]=!0}function F(t){return t[J]}function E(t){function e(t,e){r?n.set(t,e):n.set(e,t)}var r=_(t),n=this;t instanceof E?t.each(e):t&&d(t,e)}function W(t){return new E(t)}function z(t,e){for(var r=new t.constructor(t.length+e.length),n=0;n<t.l
|
||
|
t}function u(t,e,r){var n=e.x,i=e.y,a=e.height,o=e.width,s=a/2,l="left",h="top";switch(t){case"left":n-=r,i+=s,l="right",h="middle";break;case"right":n+=r+o,i+=s,h="middle";break;case"top":n+=o/2,i-=r,l="center",h="bottom";break;case"bottom":n+=o/2,i+=a+r,l="center";break;case"inside":n+=o/2,i+=s,l="center",h="middle";break;case"insideLeft":n+=r,i+=s,h="middle";break;case"insideRight":n+=o-r,i+=s,l="right",h="middle";break;case"insideTop":n+=o/2,i+=r,l="center";break;case"insideBottom":n+=o/2,i+=a-r,l="center",h="bottom";break;case"insideTopLeft":n+=r,i+=r;break;case"insideTopRight":n+=o-r,i+=r,l="right";break;case"insideBottomLeft":n+=r,i+=a-r,h="bottom";break;case"insideBottomRight":n+=o-r,i+=a-r,l="right",h="bottom"}return{x:n,y:i,textAlign:l,textVerticalAlign:h}}function c(t,e,r,n,i){if(!e)return"";var a=(t+"").split("\n");i=f(e,r,n,i);for(var o=0,s=a.length;o<s;o++)a[o]=d(a[o],i);return a.join("\n")}function f(t,e,r,n){n=M({},n),n.font=e;var r=k(r,"...");n.maxIterations=k(n.maxIterations,2);var a=n.minChar=k(n.minChar,0);n.cnCharWidth=i("国",e);var o=n.ascCharWidth=i("a",e);n.placeholder=k(n.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;l<a&&s>=o;l++)s-=o;var h=i(r);return h>s&&(r="",h=0),s=t-h,n.ellipsis=r,n.ellipsisWidth=h,n.contentWidth=s,n.containerWidth=t,n}function d(t,e){var r=e.containerWidth,n=e.font,a=e.contentWidth;if(!r)return"";var o=i(t,n);if(o<=r)return t;for(var s=0;;s++){if(o<=a||s>=e.maxIterations){t+=e.ellipsis;break}var l=0===s?p(t,a,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,l),o=i(t,n)}return""===t&&(t=e.placeholder),t}function p(t,e,r,n){for(var i=0,a=0,o=t.length;a<o&&i<e;a++){var s=t.charCodeAt(a);i+=0<=s&&s<=127?r:n}return a}function v(t){return i("国",t)}function g(t,e){return B.measureText(t,e)}function y(t,e,r,n){null!=t&&(t+="");var i=v(e),a=t?t.split("\n"):[],o=a.length*i,s=o;if(r&&(s+=r[0]+r[2]),t&&n){var l=n.outerHeight,h=n.outerWidth;if(null!=l&&s>l)t="",a=[];else if(null!=h)for(var u=f(h-(r?r[1]+r[3]:0),e,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),c=0,p=a.length;c<p;c++)a[c]=d(a[c],u)}return{lines:a,height:o,outerHeight:s,lineHeight:i}}function m(t,e){var r={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return r;for(var n,a=D.lastIndex=0;null!=(n=D.exec(t));){var o=n.index;o>a&&x(r,t.substring(a,o)),x(r,n[2],n[1]),a=D.lastIndex}a<t.length&&x(r,t.substring(a,t.length));var s=r.lines,l=0,h=0,u=[],f=e.textPadding,d=e.truncate,p=d&&d.outerWidth,g=d&&d.outerHeight;f&&(null!=p&&(p-=f[1]+f[3]),null!=g&&(g-=f[0]+f[2]));for(var y=0;y<s.length;y++){for(var m=s[y],_=0,w=0,S=0;S<m.tokens.length;S++){var T=m.tokens[S],M=T.styleName&&e.rich[T.styleName]||{},C=T.textPadding=M.textPadding,A=T.font=M.font||e.font,O=T.textHeight=k(M.textHeight,v(A));if(C&&(O+=C[0]+C[2]),T.height=O,T.lineHeight=P(M.textLineHeight,e.textLineHeight,O),T.textAlign=M&&M.textAlign||e.textAlign,T.textVerticalAlign=M&&M.textVerticalAlign||"middle",null!=g&&l+T.lineHeight>g)return{lines:[],width:0,height:0};T.textWidth=i(T.text,A);var I=M.textWidth,R=null==I||"auto"===I;if("string"==typeof I&&"%"===I.charAt(I.length-1))T.percentWidth=I,u.push(T),I=0;else{if(R){I=T.textWidth;var B=M.textBackgroundColor,L=B&&B.image;L&&(L=b.findExistImage(L),b.isImageReady(L)&&(I=Math.max(I,L.width*O/L.height)))}var F=C?C[1]+C[3]:0;I+=F;var E=null!=p?p-w:null;null!=E&&E<I&&(!R||E<F?(T.text="",T.textWidth=I=0):(T.text=c(T.text,E-F,A,d.ellipsis,{minChar:d.minChar}),T.textWidth=i(T.text,A),I=T.textWidth+F))}w+=T.width=I,M&&(_=Math.max(_,T.lineHeight))}m.width=w,m.lineHeight=_,l+=_,h=Math.max(h,w)}r.outerWidth=r.width=k(e.textWidth,h),r.outerHeight=r.height=k(e.textHeight,l),f&&(r.outerWidth+=f[1]+f[3],r.outerHeight+=f[0]+f[2]);for(var y=0;y<u.length;y++){var T=u[y],W=T.percentWidth;T.width=parseInt(W,10)/100*h}return r}function x(t,e,r){for(var n=""===e,i=e.split("\n"),a=t.lines,o=0;o<i.length;o++){var s=i[o],l={styleName:r,text:s,isLineHolder:!s&&!n};if(o)a.push({tokens:[l]});else{var h=(a[a.length-1]||(a[0]={tokens:[]})).tokens,u=h.length;1===u&&h[0].isLineHolder?h[0]=l:(s||!u||n)&&h.push(l
|
||
|
})}return t}function u(t,e){}var c=r(6),f=(c.__DEV__,r(1)),d=".",p="___EC__COMPONENT__CONTAINER___",v=0;e.parseClassType=n,e.enableClassExtend=a,e.enableClassCheck=o,e.enableClassManagement=h,e.setReadOnly=u},function(t,e,r){function n(t){return $.extend(t)}function i(t,e){return V.extendFromString(t,e)}function a(t,e,r,n){var i=V.createFromString(t,e),a=i.getBoundingRect();return r&&("center"===n&&(r=s(r,a)),l(i,r)),i}function o(t,e,r){var n=new K({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===r){var i={width:t.width,height:t.height};n.setStyle(s(e,i))}}});return n}function s(t,e){var r,n=e.width/e.height,i=t.height*n;i<=t.width?r=t.height:(i=t.width,r=i/n);var a=t.x+t.width/2,o=t.y+t.height/2;return{x:a-i/2,y:o-r/2,width:i,height:r}}function l(t,e){if(t.applyTransform){var r=t.getBoundingRect(),n=r.calculateTransform(e);t.applyTransform(n)}}function h(t){var e=t.shape,r=t.style.lineWidth;return vt(2*e.x1)===vt(2*e.x2)&&(e.x1=e.x2=c(e.x1,r,!0)),vt(2*e.y1)===vt(2*e.y2)&&(e.y1=e.y2=c(e.y1,r,!0)),t}function u(t){var e=t.shape,r=t.style.lineWidth,n=e.x,i=e.y,a=e.width,o=e.height;return e.x=c(e.x,r,!0),e.y=c(e.y,r,!0),e.width=Math.max(c(n+a,r,!1)-e.x,0===a?0:1),e.height=Math.max(c(i+o,r,!1)-e.y,0===o?0:1),t}function c(t,e,r){var n=vt(2*t);return(n+vt(e))%2===0?n/2:(n+(r?1:-1))/2}function f(t){return null!=t&&"none"!=t}function d(t){return"string"==typeof t?G.lift(t,-.1):t}function p(t){if(t.__hoverStlDirty){var e=t.style.stroke,r=t.style.fill,n=t.__hoverStl;n.fill=n.fill||(f(r)?d(r):null),n.stroke=n.stroke||(f(e)?d(e):null);var i={};for(var a in n)null!=n[a]&&(i[a]=t.style[a]);t.__normalStl=i,t.__hoverStlDirty=!1}}function v(t){if(!t.__isHover){if(p(t),t.useHoverLayer)t.__zr&&t.__zr.addHover(t,t.__hoverStl);else{var e=t.style,r=e.insideRollbackOpt;r&&R(e),e.extendFrom(t.__hoverStl),r&&(D(e,e.insideOriginalTextPosition,r),null==e.textFill&&(e.textFill=r.autoColor)),t.dirty(!1),t.z2+=1}t.__isHover=!0}}function g(t){if(t.__isHover){var e=t.__normalStl;t.useHoverLayer?t.__zr&&t.__zr.removeHover(t):(e&&t.setStyle(e),t.z2-=1),t.__isHover=!1}}function y(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&v(t)}):v(t)}function m(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&g(t)}):g(t)}function x(t,e){t.__hoverStl=t.hoverStyle||e||{},t.__hoverStlDirty=!0,t.__isHover&&p(t)}function _(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&y(this)}function w(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&m(this)}function b(){this.__isEmphasis=!0,y(this)}function S(){this.__isEmphasis=!1,m(this)}function T(t,e,r){t.__hoverSilentOnTouch=r&&r.hoverSilentOnTouch,"group"===t.type?t.traverse(function(t){"group"!==t.type&&x(t,e)}):x(t,e),t.on("mouseover",_).on("mouseout",w),t.on("emphasis",b).on("normal",S)}function M(t,e,r,n,i,a,o){i=i||mt;var s,l=i.labelFetcher,h=i.labelDataIndex,u=i.labelDimIndex,c=r.getShallow("show"),f=n.getShallow("show");(c||f)&&(l&&(s=l.getFormattedLabel(h,"normal",null,u)),null==s&&(s=U.isFunction(i.defaultText)?i.defaultText(h,i):i.defaultText));var d=c?s:null,p=f?U.retrieve2(l?l.getFormattedLabel(h,"emphasis",null,u):null,s):null;null==d&&null==p||(k(t,r,a,i),k(e,n,o,i,!0)),t.text=d,e.text=p}function k(t,e,r,n,i){return C(t,e,n,i),r&&U.extend(t,r),t.host&&t.host.dirty&&t.host.dirty(!1),t}function P(t,e,r){var n,i={isRectText:!0};r===!1?n=!0:i.autoColor=r,C(t,e,i,n),t.host&&t.host.dirty&&t.host.dirty(!1)}function C(t,e,r,n){if(r=r||mt,r.isRectText){var i=e.getShallow("position")||(n?null:"inside");"outside"===i&&(i="top"),t.textPosition=i,t.textOffset=e.getShallow("offset");var a=e.getShallow("rotate");null!=a&&(a*=Math.PI/180),t.textRotation=a,t.textDistance=U.retrieve2(e.getShallow("distance"),n?null:5)}var o,s=e.ecModel,l=s&&s.option.textStyle,h=A(e);if(h){o={};for(var u in h)if(h.hasOwnProperty(u)){var c=e.getModel(["rich",u]);O(o[u]={},c,l,r,n)}}return t.rich=o,O(t,e,l,r,n,!0),r.forceRich&&!r.textStyle&&(r.textStyle={}),t}function A(t){for(var e;t&&t!==t.ecModel;){var r=(t.option||mt).rich;if(r){e=e||{};for(var n in r)r
|
||
|
this.notClear=!0}var i=r(1),a=i.inherits,o=r(8),s=r(4);n.prototype.incremental=!0,n.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},n.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},n.prototype.addDisplayables=function(t,e){e=e||!1;for(var r=0;r<t.length;r++)this.addDisplayable(t[r],e)},n.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(var e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},n.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var e=this._displayables[t];e.parent=this,e.update(),e.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var e=this._temporaryDisplayables[t];e.parent=this,e.update(),e.parent=null}},n.prototype.brush=function(t,e){for(var r=this._cursor;r<this._displayables.length;r++){var n=this._displayables[r];n.beforeBrush&&n.beforeBrush(t),n.brush(t,r===this._cursor?null:this._displayables[r-1]),n.afterBrush&&n.afterBrush(t)}this._cursor=r;for(var r=0;r<this._temporaryDisplayables.length;r++){var n=this._temporaryDisplayables[r];n.beforeBrush&&n.beforeBrush(t),n.brush(t,0===r?null:this._temporaryDisplayables[r-1]),n.afterBrush&&n.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var l=[];n.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new s(1/0,1/0,-(1/0),-(1/0)),e=0;e<this._displayables.length;e++){var r=this._displayables[e],n=r.getBoundingRect().clone();r.needLocalTransform()&&n.applyTransform(r.getLocalTransform(l)),t.union(n)}this._rect=t}return this._rect},n.prototype.contain=function(t,e){var r=this.transformCoordToLocal(t,e),n=this.getBoundingRect();if(n.contain(r[0],r[1]))for(var i=0;i<this._displayables.length;i++){var a=this._displayables[i];if(a.contain(t,e))return!0}return!1},a(n,o);var h=n;t.exports=h},function(t,e,r){var n=r(1),i=r(20),a=function(t,e,r,n,a,o){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==r?1:r,this.y2=null==n?0:n,this.type="linear",this.global=o||!1,i.call(this,a)};a.prototype={constructor:a},n.inherits(a,i);var o=a;t.exports=o},function(t,e){var r=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};r.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var n=r;t.exports=n},function(t,e,r){var n=r(1),i=r(20),a=function(t,e,r,n,a){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==r?.5:r,this.type="radial",this.global=a||!1,i.call(this,n)};a.prototype={constructor:a},n.inherits(a,i);var o=a;t.exports=o},function(t,e,r){function n(t,e,r){var n=null==e.x?0:e.x,i=null==e.x2?1:e.x2,a=null==e.y?0:e.y,o=null==e.y2?0:e.y2;e.global||(n=n*r.width+r.x,i=i*r.width+r.x,a=a*r.height+r.y,o=o*r.height+r.y),n=isNaN(n)?0:n,i=isNaN(i)?1:i,a=isNaN(a)?0:a,o=isNaN(o)?0:o;var s=t.createLinearGradient(n,a,i,o);return s}function i(t,e,r){var n=r.width,i=r.height,a=Math.min(n,i),o=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;e.global||(o=o*n+r.x,s=s*i+r.y,l*=a);var h=t.createRadialGradient(o,s,0,o,s,l);return h}var a=r(21),o=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],s=function(t,e){this.extendFrom(t,!1),this.host=e};s.prototype={constructor:s,host:null,fill:"#000",stroke:null,opacity:1,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffs
|
||
|
//# sourceMappingURL=echarts-liquidfill.min.js.map
|