17 lines
1.0 MiB
JavaScript
17 lines
1.0 MiB
JavaScript
|
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.G2Plot=e():t.G2Plot=e()}(window,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=200)}([function(t,e,n){"use strict";n.r(e),n.d(e,"contains",(function(){return r})),n.d(e,"includes",(function(){return r})),n.d(e,"difference",(function(){return a})),n.d(e,"find",(function(){return x})),n.d(e,"findIndex",(function(){return _})),n.d(e,"firstValue",(function(){return O})),n.d(e,"flatten",(function(){return w})),n.d(e,"flattenDeep",(function(){return j})),n.d(e,"getRange",(function(){return A})),n.d(e,"pull",(function(){return P})),n.d(e,"pullAt",(function(){return F})),n.d(e,"reduce",(function(){return L})),n.d(e,"remove",(function(){return k})),n.d(e,"sortBy",(function(){return B})),n.d(e,"union",(function(){return R})),n.d(e,"uniq",(function(){return N})),n.d(e,"valuesOfKey",(function(){return V})),n.d(e,"head",(function(){return z})),n.d(e,"last",(function(){return G})),n.d(e,"startsWith",(function(){return Y})),n.d(e,"endsWith",(function(){return W})),n.d(e,"filter",(function(){return o})),n.d(e,"every",(function(){return X})),n.d(e,"some",(function(){return H})),n.d(e,"group",(function(){return $})),n.d(e,"groupBy",(function(){return q})),n.d(e,"groupToMap",(function(){return Z})),n.d(e,"getWrapBehavior",(function(){return K})),n.d(e,"wrapBehavior",(function(){return Q})),n.d(e,"number2color",(function(){return tt})),n.d(e,"parseRadius",(function(){return et})),n.d(e,"clamp",(function(){return nt})),n.d(e,"fixedBase",(function(){return it})),n.d(e,"isDecimal",(function(){return ot})),n.d(e,"isEven",(function(){return at})),n.d(e,"isInteger",(function(){return st})),n.d(e,"isNegative",(function(){return ct})),n.d(e,"isNumberEqual",(function(){return lt})),n.d(e,"isOdd",(function(){return ut})),n.d(e,"isPositive",(function(){return ht})),n.d(e,"max",(function(){return S})),n.d(e,"maxBy",(function(){return ft})),n.d(e,"min",(function(){return M})),n.d(e,"minBy",(function(){return pt})),n.d(e,"mod",(function(){return dt})),n.d(e,"toDegree",(function(){return yt})),n.d(e,"toInteger",(function(){return vt})),n.d(e,"toRadian",(function(){return bt})),n.d(e,"forIn",(function(){return xt})),n.d(e,"has",(function(){return _t})),n.d(e,"hasKey",(function(){return Ot})),n.d(e,"hasValue",(function(){return jt})),n.d(e,"keys",(function(){return g})),n.d(e,"isMatch",(function(){return y})),n.d(e,"values",(function(){return wt})),n.d(e,"lowerCase",(function(){return Mt})),n.d(e,"lowerFirst",(function(){return At})),n.d(e,"substitute",(function(){return Ct})),n.d(e,"upperCase",(function(){return Et})),n.d(e,"upperFirst",(function(){return It})),n.d(e,"getType",(function(){return Tt})),n.d(e,"isArguments",(function(){return Ft})),n.d(e,"isArray",(function(){return h})),n.d(e,"isArrayLike",(function(){return i})),n.d(e,"isBoolean",(function(){return Lt})),n.d(e,"isDate",(function(){return kt})),n.d(e,"isError",(function(){return Dt})),n.d(e,"isFunction",(function(){return l})),n.d(e,"isFinite",(function(){return Bt})),n.d(e,"isNil",(function(){return u})),n.d(e,"isNull",(function(){return Nt})),n.d(e,"isNumb
|
||
|
/*! *****************************************************************************
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */
|
||
|
var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.geometry=e.getMappingFunction=e.getMappingField=void 0;var i=n(1),r=n(0),o=n(2);function a(t,e){var n=t.type,o=t.xField,a=t.yField,s=t.colorField,c=t.shapeField,l=t.sizeField,u=t.styleField,h=t.rawFields,f=[];if(h=((0,r.isFunction)(h)?h(n,e):h)||[],"color"===e)f=i.__spreadArray([s||o],h,!0);else if("shape"===e)f=i.__spreadArray([c||o],h,!0);else if("size"===e)f=i.__spreadArray([l||o],h,!0);else{f=i.__spreadArray([o,a,s,c,l,u],h,!0);var p=["x","y","color","shape","size","style"].indexOf(e),d=f[p];f.splice(p,1),f.unshift(d)}var g=(0,r.uniq)(f.filter((function(t){return!!t}))),y="line"===n&&[o,a].includes(g.join("*"))?"":g.join("*");return{mappingFields:g,tileMappingField:y}}function s(t,e){if(e)return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r={};return t.forEach((function(t,e){r[t]=n[e]})),delete r[void 0],e(r)}}e.getMappingField=a,e.getMappingFunction=s,e.geometry=function(t){var e=t.chart,n=t.options,c=n.type,l=n.args,u=n.mapping,h=n.xField,f=n.yField,p=n.colorField,d=n.shapeField,g=n.sizeField,y=n.tooltipFields,v=n.label,m=n.state,b=n.customInfo;if(!u)return t;var x=u.color,_=u.shape,O=u.size,w=u.style,j=u.tooltip,S=e[c](l).position("".concat(h,"*").concat(f));if((0,r.isString)(x))p?S.color(p,x):S.color(x);else if((0,r.isFunction)(x)){var M=a(n,"color"),A=M.mappingFields,C=M.tileMappingField;S.color(C,s(A,x))}else p&&S.color(p,x);if((0,r.isString)(_))d?S.shape(d,[_]):S.shape(_);else if((0,r.isFunction)(_)){var E=a(n,"shape");A=E.mappingFields,C=E.tileMappingField;S.shape(C,s(A,_))}else d&&S.shape(d,_);if((0,r.isNumber)(O))g?S.size(g,O):S.size(O);else if((0,r.isFunction)(O)){var I=a(n,"size");A=I.mappingFields,C=I.tileMappingField;S.size(C,s(A,O))}else g&&S.size(g,O);if((0,r.isFunction)(w)){var P=a(n,"style");A=P.mappingFields,C=P.tileMappingField;S.style(C,s(A,w))}else(0,r.isObject)(w)&&S.style(w);if(!1===y?S.tooltip(!1):(0,r.isEmpty)(y)||S.tooltip(y.join("*"),s(y,j)),!1===v)S.label(!1);else if(v){var T=v.callback,F=v.fields,L=i.__rest(v,["callback","fields"]);S.label({fields:F||[f],callback:T,cfg:(0,o.transformLabel)(L)})}return m&&S.state(m),b&&S.customInfo(b),[h,f].filter((function(t){return t!==p})).forEach((function(t){e.legend(t,!1)})),i.__assign(i.__assign({},t),{ext:{geometry:S}})}},function(t,e,n){"use strict";function i(t,e){var n=[],i=t[0],r=t[1],o=t[2],a=t[3],s=t[4],c=t[5],l=t[6],u=t[7],h=t[8],f=e[0],p=e[1],d=e[2],g=e[3],y=e[4],v=e[5],m=e[6],b=e[7],x=e[8];return n[0]=f*i+p*a+d*l,n[1]=f*r+p*s+d*u,n[2]=f*o+p*c+d*h,n[3]=g*i+y*a+v*l,n[4]=g*r+y*s+v*u,n[5]=g*o+y*c+v*h,n[6]=m*i+b*a+x*l,n[7]=m*r+b*s+x*u,n[8]=m*o+b*c+x*h,n}function r(t,e){var n=[],i=e[0],r=e[1];return n[0]=t[0]*i+t[3]*r+t[6],n[1]=t[1]*i+t[4]*r+t[7],n}function o(t){var e=[],n=t[0],i=t[1],r=t[2],o=t[3],a=t[4],s=t[5],c=t[6],l=t[7],u=t[8],h=u*a-s*l,f=-u*o+s*c,p=l*o-a*c,d=n*h+i*f+r*p;return d?(d=1/d,e[0]=h*d,e[1]=(-u*i+r*l)*d,e[2]=(s*i-r*a)*d,e[3]=f*d,e[4]=(u*n-r*c)*d,e[5]=(-s*n+r*o)*d,e[6]=p*d,e[7]=(-l*n+i*c)*d,e[8]=(a*n-i*o)*d,e):null}n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return o}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return f})),n.d(e,"d",(function(){return g})),n.d(e,"e",(function(){return O})),n.d(e,"b",(function(){return I}));var i=n(0),r=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,o=/[^\s\,]+/gi;var a=function(t){var e=t||[];return Object(i.isArray)(e)?e:Object(i.isString)(e)?(e=e.match(r),Object(i.each)(e,(function(t,n){if((t=t.match(
|
||
|
//# sourceMappingURL=g2plot.min.js.map
|