WebContent/js/highcharts.js
(开头部分) 188KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
Highcharts JS v6.0.1 (2017-10-05)
(c) 2009-2016 Torstein Honsi
License: www.highcharts.com/license
*/
(function(R,N){"object"===typeof module&&module.exports?module.exports=R.document?N(R):N:R.Highcharts=N(R)})("undefined"!==typeof window?window:this,function(R){var N=function(){var a=R.document,A=R.navigator&&R.navigator.userAgent||"",B=a&&a.createElementNS&&!!a.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,G=/(edge|msie|trident)/i.test(A)&&!R.opera,F=/Firefox/.test(A),l=F&&4>parseInt(A.split("Firefox/")[1],10);return R.Highcharts?R.Highcharts.error(16,!0):{product:"Highcharts",
version:"6.0.1",deg2rad:2*Math.PI/360,doc:a,hasBidiBug:l,hasTouch:a&&void 0!==a.documentElement.ontouchstart,isMS:G,isWebKit:/AppleWebKit/.test(A),isFirefox:F,isTouchDevice:/(Mobile|Android|Windows Phone)/.test(A),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:B,win:R,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[]}}();(function(a){var A=[],B=a.charts,G=a.doc,F=a.win;a.error=function(l,f){l=a.isNumber(l)?"Highcharts error #"+
l+": www.highcharts.com/errors/"+l:l;if(f)throw Error(l);F.console&&console.log(l)};a.Fx=function(a,f,h){this.options=f;this.elem=a;this.prop=h};a.Fx.prototype={dSetter:function(){var a=this.paths[0],f=this.paths[1],h=[],m=this.now,r=a.length,v;if(1===m)h=this.toD;else if(r===f.length&&1>m)for(;r--;)v=parseFloat(a[r]),h[r]=isNaN(v)?a[r]:m*parseFloat(f[r]-v)+v;else h=f;this.elem.attr("d",h,null,!0)},update:function(){var a=this.elem,f=this.prop,h=this.now,m=this.options.step;if(this[f+"Setter"])this[f+
"Setter"]();else a.attr?a.element&&a.attr(f,h,null,!0):a.style[f]=h+this.unit;m&&m.call(a,h,this)},run:function(a,f,h){var m=this,l=function(a){return l.stopped?!1:m.step(a)},v=F.requestAnimationFrame||function(a){setTimeout(a,13)},d=function(){var a;for(a=0;a<A.length;a++)A[a]()||A.splice(a--,1);A.length&&v(d)};a===f?delete this.options.curAnim[this.prop]:(this.startTime=+new Date,this.start=a,this.end=f,this.unit=h,this.now=this.start,this.pos=0,l.elem=this.elem,l.prop=this.prop,l()&&1===A.push(l)&&
v(d))},step:function(l){var f=+new Date,h,m=this.options,r=this.elem,v=m.complete,d=m.duration,e=m.curAnim;r.attr&&!r.element?l=!1:l||f>=d+this.startTime?(this.now=this.end,this.pos=1,this.update(),h=e[this.prop]=!0,a.objectEach(e,function(a){!0!==a&&(h=!1)}),h&&v&&v.call(r),l=!1):(this.pos=m.easing((f-this.startTime)/d),this.now=this.start+(this.end-this.start)*this.pos,this.update(),l=!0);return l},initPath:function(l,f,h){function m(a){var c,b;for(p=a.length;p--;)c="M"===a[p]||"L"===a[p],b=/[a-zA-Z]/.test(a[p+
3]),c&&b&&a.splice(p+1,0,a[p+1],a[p+2],a[p+1],a[p+2])}function r(a,b){for(;a.length<w;){a[0]=b[w-a.length];var k=a.slice(0,c);[].splice.apply(a,[0,0].concat(k));C&&(k=a.slice(a.length-c),[].splice.apply(a,[a.length,0].concat(k)),p--)}a[0]="M"}function v(a,d){for(var e=(w-a.length)/c;0<e&&e--;)k=a.slice().splice(a.length/I-c,c*I),k[0]=d[w-c-e*c],b&&(k[c-6]=k[c-2],k[c-5]=k[c-1]),[].splice.apply(a,[a.length/I,0].concat(k)),C&&e--}f=f||"";var d,e=l.startX,n=l.endX,b=-1<f.indexOf("C"),c=b?7:3,w,k,p;f=
f.split(" ");h=h.slice();var C=l.isArea,I=C?2:1,y;b&&(m(f),m(h));if(e&&n){for(p=0;p<e.length;p++)if(e[p]===n[0]){d=p;break}else if(e[0]===n[n.length-e.length+p]){d=p;y=!0;break}void 0===d&&(f=[])}f.length&&a.isNumber(d)&&(w=h.length+d*I*c,y?(r(f,h),v(h,f)):(r(h,f),v(f,h)));return[f,h]}};a.Fx.prototype.fillSetter=a.Fx.prototype.strokeSetter=function(){this.elem.attr(this.prop,a.color(this.start).tweenTo(a.color(this.end),this.pos),null,!0)};a.extend=function(a,f){var l;a||(a={});for(l in f)a[l]=f[l];
return a};a.merge=function(){var l,f=arguments,h,m={},r=function(f,d){"object"!==typeof f&&(f={});a.objectEach(d,function(e,n){!a.isObject(e,!0)||a.isClass(e)||a.isDOMElement(e)?f[n]=d[n]:f[n]=r(f[n]||{},e)});return f};!0===f[0]&&(m=f[1],f=Array.prototype.slice.call(f,2));h=f.length;for(l=0;l<h;l++)m=r(m,f[l]);return m};a.pInt=function(a,f){return parseInt(a,f||10)};a.isString=function(a){return"string"===typeof a};a.isArray=function(a){a=Object.prototype.toString.call(a);return"[object Array]"===
a||"[object Array Iterator]"===a};a.isObject=function(l,f){return!!l&&"object"===typeof l&&(!f||!a.isArray(l))};a.isDOMElement=function(l){return a.isObject(l)&&"number"===typeof l.nodeType};a.isClass=function(l){var f=l&&l.constructor;return!(!a.isObject(l,!0)||a.isDOMElement(l)||!f||!f.name||"Object"===f.name)};a.isNumber=function(a){return"number"===typeof a&&!isNaN(a)};a.erase=function(a,f){for(var l=a.length;l--;)if(a[l]===f){a.splice(l,1);break}};a.defined=function(a){return void 0!==a&&null!==
a};a.attr=function(l,f,h){var m;a.isString(f)?a.defined(h)?l.setAttribute(f,h):l&&l.getAttribute&&(m=l.getAttribute(f)):a.defined(f)&&a.isObject(f)&&a.objectEach(f,function(a,f){l.setAttribute(f,a)});return m};a.splat=function(l){return a.isArray(l)?l:[l]};a.syncTimeout=function(a,f,h){if(f)return setTimeout(a,f,h);a.call(0,h)};a.pick=function(){var a=arguments,f,h,m=a.length;for(f=0;f<m;f++)if(h=a[f],void 0!==h&&null!==h)return h};a.css=function(l,f){a.isMS&&!a.svg&&f&&void 0!==f.opacity&&(f.filter=
"alpha(opacity\x3d"+100*f.opacity+")");a.extend(l.style,f)};a.createElement=function(l,f,h,m,r){l=G.createElement(l);var v=a.css;f&&a.extend(l,f);r&&v(l,{padding:0,border:"none",margin:0});h&&v(l,h);m&&m.appendChild(l);return l};a.extendClass=function(l,f){var h=function(){};h.prototype=new l;a.extend(h.prototype,f);return h};a.pad=function(a,f,h){return Array((f||2)+1-String(a).length).join(h||0)+a};a.relativeLength=function(a,f,h){return/%$/.test(a)?f*parseFloat(a)/100+(h||0):parseFloat(a)};a.wrap=
function(a,f,h){var m=a[f];a[f]=function(){var a=Array.prototype.slice.call(arguments),f=arguments,d=this;d.proceed=function(){m.apply(d,arguments.length?arguments:f)};a.unshift(m);a=h.apply(this,a);d.proceed=null;return a}};a.getTZOffset=function(l){var f=a.Date;return 6E4*(f.hcGetTimezoneOffset&&f.hcGetTimezoneOffset(l)||f.hcTimezoneOffset||0)};a.dateFormat=function(l,f,h){if(!a.defined(f)||isNaN(f))return a.defaultOptions.lang.invalidDate||"";l=a.pick(l,"%Y-%m-%d %H:%M:%S");var m=a.Date,r=new m(f-
a.getTZOffset(f)),v=r[m.hcGetHours](),d=r[m.hcGetDay](),e=r[m.hcGetDate](),n=r[m.hcGetMonth](),b=r[m.hcGetFullYear](),c=a.defaultOptions.lang,w=c.weekdays,k=c.shortWeekdays,p=a.pad,m=a.extend({a:k?k[d]:w[d].substr(0,3),A:w[d],d:p(e),e:p(e,2," "),w:d,b:c.shortMonths[n],B:c.months[n],m:p(n+1),y:b.toString().substr(2,2),Y:b,H:p(v),k:v,I:p(v%12||12),l:v%12||12,M:p(r[m.hcGetMinutes]()),p:12>v?"AM":"PM",P:12>v?"am":"pm",S:p(r.getSeconds()),L:p(Math.round(f%1E3),3)},a.dateFormats);a.objectEach(m,function(a,
b){for(;-1!==l.indexOf("%"+b);)l=l.replace("%"+b,"function"===typeof a?a(f):a)});return h?l.substr(0,1).toUpperCase()+l.substr(1):l};a.formatSingle=function(l,f){var h=/\.([0-9])/,m=a.defaultOptions.lang;/f$/.test(l)?(h=(h=l.match(h))?h[1]:-1,null!==f&&(f=a.numberFormat(f,h,m.decimalPoint,-1<l.indexOf(",")?m.thousandsSep:""))):f=a.dateFormat(l,f);return f};a.format=function(l,f){for(var h="{",m=!1,r,v,d,e,n=[],b;l;){h=l.indexOf(h);if(-1===h)break;r=l.slice(0,h);if(m){r=r.split(":");v=r.shift().split(".");
e=v.length;b=f;for(d=0;d<e;d++)b&&(b=b[v[d]]);r.length&&(b=a.formatSingle(r.join(":"),b));n.push(b)}else n.push(r);l=l.slice(h+1);h=(m=!m)?"}":"{"}n.push(l);return n.join("")};a.getMagnitude=function(a){return Math.pow(10,Math.floor(Math.log(a)/Math.LN10))};a.normalizeTickInterval=function(l,f,h,m,r){var v,d=l;h=a.pick(h,1);v=l/h;f||(f=r?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===m&&(1===h?f=a.grep(f,function(a){return 0===a%1}):.1>=h&&(f=[1/h])));for(m=0;m<f.length&&!(d=f[m],r&&d*h>=l||!r&&
v<=(f[m]+(f[m+1]||f[m]))/2);m++);return d=a.correctFloat(d*h,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=function(a,f){var h=a.length,m,l;for(l=0;l<h;l++)a[l].safeI=l;a.sort(function(a,d){m=f(a,d);return 0===m?a.safeI-d.safeI:m});for(l=0;l<h;l++)delete a[l].safeI};a.arrayMin=function(a){for(var f=a.length,h=a[0];f--;)a[f]<h&&(h=a[f]);return h};a.arrayMax=function(a){for(var f=a.length,h=a[0];f--;)a[f]>h&&(h=a[f]);return h};a.destroyObjectProperties=function(l,f){a.objectEach(l,function(a,
m){a&&a!==f&&a.destroy&&a.destroy();delete l[m]})};a.discardElement=function(l){var f=a.garbageBin;f||(f=a.createElement("div"));l&&f.appendChild(l);f.innerHTML=""};a.correctFloat=function(a,f){return parseFloat(a.toPrecision(f||14))};a.setAnimation=function(l,f){f.renderer.globalAnimation=a.pick(l,f.options.chart.animation,!0)};a.animObject=function(l){return a.isObject(l)?a.merge(l):{duration:l?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,
year:314496E5};a.numberFormat=function(l,f,h,m){l=+l||0;f=+f;var r=a.defaultOptions.lang,v=(l.toString().split(".")[1]||"").split("e")[0].length,d,e,n=l.toString().split("e");-1===f?f=Math.min(v,20):a.isNumber(f)||(f=2);e=(Math.abs(n[1]?n[0]:l)+Math.pow(10,-Math.max(f,v)-1)).toFixed(f);v=String(a.pInt(e));d=3<v.length?v.length%3:0;h=a.pick(h,r.decimalPoint);m=a.pick(m,r.thousandsSep);l=(0>l?"-":"")+(d?v.substr(0,d)+m:"");l+=v.substr(d).replace(/(\d{3})(?=\d)/g,"$1"+m);f&&(l+=h+e.slice(-f));n[1]&&
(l+="e"+n[1]);return l};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(l,f,h){if("width"===f)return Math.min(l.offsetWidth,l.scrollWidth)-a.getStyle(l,"padding-left")-a.getStyle(l,"padding-right");if("height"===f)return Math.min(l.offsetHeight,l.scrollHeight)-a.getStyle(l,"padding-top")-a.getStyle(l,"padding-bottom");F.getComputedStyle||a.error(27,!0);if(l=F.getComputedStyle(l,void 0))l=l.getPropertyValue(f),a.pick(h,"opacity"!==f)&&(l=a.pInt(l));return l};a.inArray=
function(l,f){return(a.indexOfPolyfill||Array.prototype.indexOf).call(f,l)};a.grep=function(l,f){return(a.filterPolyfill||Array.prototype.filter).call(l,f)};a.find=Array.prototype.find?function(a,f){return a.find(f)}:function(a,f){var h,m=a.length;for(h=0;h<m;h++)if(f(a[h],h))return a[h]};a.map=function(a,f){for(var h=[],m=0,r=a.length;m<r;m++)h[m]=f.call(a[m],a[m],m,a);return h};a.reduce=function(l,f,h){return(a.reducePolyfill||Array.prototype.reduce).call(l,f,h)};a.offset=function(a){var f=G.documentElement;
a=a.getBoundingClientRect();return{top:a.top+(F.pageYOffset||f.scrollTop)-(f.clientTop||0),left:a.left+(F.pageXOffset||f.scrollLeft)-(f.clientLeft||0)}};a.stop=function(a,f){for(var h=A.length;h--;)A[h].elem!==a||f&&f!==A[h].prop||(A[h].stopped=!0)};a.each=function(l,f,h){return(a.forEachPolyfill||Array.prototype.forEach).call(l,f,h)};a.objectEach=function(a,f,h){for(var m in a)a.hasOwnProperty(m)&&f.call(h,a[m],m,a)};a.addEvent=function(l,f,h){var m=l.hcEvents=l.hcEvents||{},r=l.addEventListener||
a.addEventListenerPolyfill;r&&r.call(l,f,h,!1);m[f]||(m[f]=[]);m[f].push(h);return function(){a.removeEvent(l,f,h)}};a.removeEvent=function(l,f,h){function m(d,b){var c=l.removeEventListener||a.removeEventListenerPolyfill;c&&c.call(l,d,b,!1)}function r(){var e,b;l.nodeName&&(f?(e={},e[f]=!0):e=d,a.objectEach(e,function(a,e){if(d[e])for(b=d[e].length;b--;)m(e,d[e][b])}))}var v,d=l.hcEvents,e;d&&(f?(v=d[f]||[],h?(e=a.inArray(h,v),-1<e&&(v.splice(e,1),d[f]=v),m(f,h)):(r(),d[f]=[])):(r(),l.hcEvents={}))};
a.fireEvent=function(l,f,h,m){var r;r=l.hcEvents;var v,d;h=h||{};if(G.createEvent&&(l.dispatchEvent||l.fireEvent))r=G.createEvent("Events"),r.initEvent(f,!0,!0),a.extend(r,h),l.dispatchEvent?l.dispatchEvent(r):l.fireEvent(f,r);else if(r)for(r=r[f]||[],v=r.length,h.target||a.extend(h,{preventDefault:function(){h.defaultPrevented=!0},target:l,type:f}),f=0;f<v;f++)(d=r[f])&&!1===d.call(l,h)&&h.preventDefault();m&&!h.defaultPrevented&&m(h)};a.animate=function(l,f,h){var m,r="",v,d,e;a.isObject(h)||(e=
arguments,h={duration:e[2],easing:e[3],complete:e[4]});a.isNumber(h.duration)||(h.duration=400);h.easing="function"===typeof h.easing?h.easing:Math[h.easing]||Math.easeInOutSine;h.curAnim=a.merge(f);a.objectEach(f,function(e,b){a.stop(l,b);d=new a.Fx(l,h,b);v=null;"d"===b?(d.paths=d.initPath(l,l.d,f.d),d.toD=f.d,m=0,v=1):l.attr?m=l.attr(b):(m=parseFloat(a.getStyle(l,b))||0,"opacity"!==b&&(r="px"));v||(v=e);v&&v.match&&v.match("px")&&(v=v.replace(/px/g,""));d.run(m,v,r)})};a.seriesType=function(l,
f,h,m,r){var v=a.getOptions(),d=a.seriesTypes;v.plotOptions[l]=a.merge(v.plotOptions[f],h);d[l]=a.extendClass(d[f]||function(){},m);d[l].prototype.type=l;r&&(d[l].prototype.pointClass=a.extendClass(a.Point,r));return d[l]};a.uniqueKey=function(){var a=Math.random().toString(36).substring(2,9),f=0;return function(){return"highcharts-"+a+"-"+f++}}();F.jQuery&&(F.jQuery.fn.highcharts=function(){var l=[].slice.call(arguments);if(this[0])return l[0]?(new (a[a.isString(l[0])?l.shift():"Chart"])(this[0],
l[0],l[1]),this):B[a.attr(this[0],"data-highcharts-chart")]})})(N);(function(a){var A=a.each,B=a.isNumber,G=a.map,F=a.merge,l=a.pInt;a.Color=function(f){if(!(this instanceof a.Color))return new a.Color(f);this.init(f)};a.Color.prototype={parsers:[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(a){return[l(a[1]),l(a[2]),l(a[3]),parseFloat(a[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(a){return[l(a[1]),
l(a[2]),l(a[3]),1]}}],names:{none:"rgba(255,255,255,0)",white:"#ffffff",black:"#000000"},init:function(f){var h,m,r,v;if((this.input=f=this.names[f&&f.toLowerCase?f.toLowerCase():""]||f)&&f.stops)this.stops=G(f.stops,function(d){return new a.Color(d[1])});else if(f&&f.charAt&&"#"===f.charAt()&&(h=f.length,f=parseInt(f.substr(1),16),7===h?m=[(f&16711680)>>16,(f&65280)>>8,f&255,1]:4===h&&(m=[(f&3840)>>4|(f&3840)>>8,(f&240)>>4|f&240,(f&15)<<4|f&15,1])),!m)for(r=this.parsers.length;r--&&!m;)v=this.parsers[r],
(h=v.regex.exec(f))&&(m=v.parse(h));this.rgba=m||[]},get:function(a){var f=this.input,m=this.rgba,r;this.stops?(r=F(f),r.stops=[].concat(r.stops),A(this.stops,function(f,d){r.stops[d]=[r.stops[d][0],f.get(a)]})):r=m&&B(m[0])?"rgb"===a||!a&&1===m[3]?"rgb("+m[0]+","+m[1]+","+m[2]+")":"a"===a?m[3]:"rgba("+m.join(",")+")":f;return r},brighten:function(a){var f,m=this.rgba;if(this.stops)A(this.stops,function(f){f.brighten(a)});else if(B(a)&&0!==a)for(f=0;3>f;f++)m[f]+=l(255*a),0>m[f]&&(m[f]=0),255<m[f]&&
(m[f]=255);return this},setOpacity:function(a){this.rgba[3]=a;return this},tweenTo:function(a,h){var f=this.rgba,r=a.rgba;r.length&&f&&f.length?(a=1!==r[3]||1!==f[3],h=(a?"rgba(":"rgb(")+Math.round(r[0]+(f[0]-r[0])*(1-h))+","+Math.round(r[1]+(f[1]-r[1])*(1-h))+","+Math.round(r[2]+(f[2]-r[2])*(1-h))+(a?","+(r[3]+(f[3]-r[3])*(1-h)):"")+")"):h=a.input||"none";return h}};a.color=function(f){return new a.Color(f)}})(N);(function(a){var A,B,G=a.addEvent,F=a.animate,l=a.attr,f=a.charts,h=a.color,m=a.css,
r=a.createElement,v=a.defined,d=a.deg2rad,e=a.destroyObjectProperties,n=a.doc,b=a.each,c=a.extend,w=a.erase,k=a.grep,p=a.hasTouch,C=a.inArray,I=a.isArray,y=a.isFirefox,K=a.isMS,q=a.isObject,z=a.isString,J=a.isWebKit,t=a.merge,D=a.noop,E=a.objectEach,H=a.pick,g=a.pInt,u=a.removeEvent,P=a.stop,M=a.svg,O=a.SVG_NS,L=a.symbolSizes,S=a.win;A=a.SVGElement=function(){return this};c(A.prototype,{opacity:1,SVG_NS:O,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline".split(" "),
init:function(a,g){this.element="span"===g?r(g):n.createElementNS(this.SVG_NS,g);this.renderer=a},animate:function(x,g,u){g=a.animObject(H(g,this.renderer.globalAnimation,!0));0!==g.duration?(u&&(g.complete=u),F(this,x,g)):(this.attr(x,null,u),g.step&&g.step.call(this));return this},colorGradient:function(x,g,u){var c=this.renderer,k,Q,d,e,w,p,M,n,L,f,y=[],q;x.radialGradient?Q="radialGradient":x.linearGradient&&(Q="linearGradient");Q&&(d=x[Q],w=c.gradients,M=x.stops,f=u.radialReference,I(d)&&(x[Q]=
d={x1:d[0],y1:d[1],x2:d[2],y2:d[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===Q&&f&&!v(d.gradientUnits)&&(e=d,d=t(d,c.getRadialAttr(f,e),{gradientUnits:"userSpaceOnUse"})),E(d,function(a,x){"id"!==x&&y.push(x,a)}),E(M,function(a){y.push(a)}),y=y.join(","),w[y]?f=w[y].attr("id"):(d.id=f=a.uniqueKey(),w[y]=p=c.createElement(Q).attr(d).add(c.defs),p.radAttr=e,p.stops=[],b(M,function(x){0===x[1].indexOf("rgba")?(k=a.color(x[1]),n=k.get("rgb"),L=k.get("a")):(n=x[1],L=1);x=c.createElement("stop").attr({offset:x[0],
"stop-color":n,"stop-opacity":L}).add(p);p.stops.push(x)})),q="url("+c.url+"#"+f+")",u.setAttribute(g,q),u.gradient=y,x.toString=function(){return q})},applyTextOutline:function(x){var g=this.element,u,c,k,d,t;-1!==x.indexOf("contrast")&&(x=x.replace(/contrast/g,this.renderer.getContrast(g.style.fill)));x=x.split(" ");c=x[x.length-1];if((k=x[0])&&"none"!==k&&a.svg){this.fakeTS=!0;x=[].slice.call(g.getElementsByTagName("tspan"));this.ySetter=this.xSetter;k=k.replace(/(^[\d\.]+)(.*?)$/g,function(a,
x,g){return 2*x+g});for(t=x.length;t--;)u=x[t],"highcharts-text-outline"===u.getAttribute("class")&&w(x,g.removeChild(u));d=g.firstChild;b(x,function(a,x){0===x&&(a.setAttribute("x",g.getAttribute("x")),x=g.getAttribute("y"),a.setAttribute("y",x||0),null===x&&g.setAttribute("y",0));a=a.cloneNode(1);l(a,{"class":"highcharts-text-outline",fill:c,stroke:c,"stroke-width":k,"stroke-linejoin":"round"});g.insertBefore(a,d)})}},attr:function(a,g,u,c){var x,k=this.element,b,d=this,Q,t;"string"===typeof a&&
void 0!==g&&(x=a,a={},a[x]=g);"string"===typeof a?d=(this[a+"Getter"]||this._defaultGetter).call(this,a,k):(E(a,function(x,g){Q=!1;c||P(this,g);this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)$/.test(g)&&(b||(this.symbolAttr(a),b=!0),Q=!0);!this.rotation||"x"!==g&&"y"!==g||(this.doTransform=!0);Q||(t=this[g+"Setter"]||this._defaultSetter,t.call(this,x,g,k),this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(g)&&this.updateShadows(g,x,t))},this),this.afterSetters());
u&&u();return d},afterSetters:function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},updateShadows:function(a,g,u){for(var x=this.shadows,c=x.length;c--;)u.call(x[c],"height"===a?Math.max(g-(x[c].cutHeight||0),0):"d"===a?this.d:g,a,x[c])},addClass:function(a,g){var x=this.attr("class")||"";-1===x.indexOf(a)&&(g||(a=(x+(x?" ":"")+a).replace(" "," ")),this.attr("class",a));return this},hasClass:function(a){return-1!==C(a,(this.attr("class")||"").split(" "))},removeClass:function(a){return this.attr("class",
(this.attr("class")||"").replace(a,""))},symbolAttr:function(a){var x=this;b("x y r start end width height innerR anchorX anchorY".split(" "),function(g){x[g]=H(a[g],x[g])});x.attr({d:x.renderer.symbols[x.symbolName](x.x,x.y,x.width,x.height,x)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a,g){var x=this,u={},c;g=g||a.strokeWidth||0;c=Math.round(g)%2/2;a.x=Math.floor(a.x||x.x||0)+c;a.y=Math.floor(a.y||x.y||0)+c;a.width=Math.floor((a.width||
x.width||0)-2*c);a.height=Math.floor((a.height||x.height||0)-2*c);v(a.strokeWidth)&&(a.strokeWidth=g);E(a,function(a,g){x[g]!==a&&(x[g]=u[g]=a)});return u},css:function(a){var x=this.styles,u={},k=this.element,b,d="",t,e=!x,p=["textOutline","textOverflow","width"];a&&a.color&&(a.fill=a.color);x&&E(a,function(a,g){a!==x[g]&&(u[g]=a,e=!0)});e&&(x&&(a=c(x,u)),b=this.textWidth=a&&a.width&&"auto"!==a.width&&"text"===k.nodeName.toLowerCase()&&g(a.width),this.styles=a,b&&!M&&this.renderer.forExport&&delete a.width,
K&&!M?m(this.element,a):(t=function(a,x){return"-"+x.toLowerCase()},E(a,function(a,x){-1===C(x,p)&&(d+=x.replace(/([A-Z])/g,t)+":"+a+";")}),d&&l(k,"style",d)),this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline)));return this},strokeWidth:function(){return this["stroke-width"]||0},on:function(a,g){var x=this,u=x.element;p&&"click"===a?(u.ontouchstart=function(a){x.touchEventFired=Date.now();a.preventDefault();g.call(u,a)},
u.onclick=function(a){(-1===S.navigator.userAgent.indexOf("Android")||1100<Date.now()-(x.touchEventFired||0))&&g.call(u,a)}):u["on"+a]=g;return this},setRadialReference:function(a){var x=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;x&&x.radAttr&&x.animate(this.renderer.getRadialAttr(a,x.radAttr));return this},translate:function(a,g){return this.attr({translateX:a,translateY:g})},invert:function(a){this.inverted=a;this.updateTransform();return this},updateTransform:function(){var a=
this.translateX||0,g=this.translateY||0,u=this.scaleX,c=this.scaleY,k=this.inverted,b=this.rotation,d=this.matrix,t=this.element;k&&(a+=this.width,g+=this.height);a=["translate("+a+","+g+")"];v(d)&&a.push("matrix("+d.join(",")+")");k?a.push("rotate(90) scale(-1,1)"):b&&a.push("rotate("+b+" "+H(this.rotationOriginX,t.getAttribute("x"),0)+" "+H(this.rotationOriginY,t.getAttribute("y")||0)+")");(v(u)||v(c))&&a.push("scale("+H(u,1)+" "+H(c,1)+")");a.length&&t.setAttribute("transform",a.join(" "))},toFront:function(){var a=
this.element;a.parentNode.appendChild(a);return this},align:function(a,g,u){var x,c,k,b,d={};c=this.renderer;k=c.alignedObjects;var t,e;if(a){if(this.alignOptions=a,this.alignByTranslate=g,!u||z(u))this.alignTo=x=u||"renderer",w(k,this),k.push(this),u=null}else a=this.alignOptions,g=this.alignByTranslate,x=this.alignTo;u=H(u,c[x],c);x=a.align;c=a.verticalAlign;k=(u.x||0)+(a.x||0);b=(u.y||0)+(a.y||0);"right"===x?t=1:"center"===x&&(t=2);t&&(k+=(u.width-(a.width||0))/t);d[g?"translateX":"x"]=Math.round(k);
"bottom"===c?e=1:"middle"===c&&(e=2);e&&(b+=(u.height-(a.height||0))/e);d[g?"translateY":"y"]=Math.round(b);this[this.placed?"animate":"attr"](d);this.placed=!0;this.alignAttr=d;return this},getBBox:function(a,g){var x,u=this.renderer,k,t=this.element,e=this.styles,Q,p=this.textStr,w,M=u.cache,n=u.cacheKeys,L;g=H(g,this.rotation);k=g*d;Q=e&&e.fontSize;void 0!==p&&(L=p.toString(),-1===L.indexOf("\x3c")&&(L=L.replace(/[0-9]/g,"0")),L+=["",g||0,Q,e&&e.width,e&&e.textOverflow].join());L&&!a&&(x=M[L]);
if(!x){if(t.namespaceURI===this.SVG_NS||u.forExport){try{(w=this.fakeTS&&function(a){b(t.querySelectorAll(".highcharts-text-outline"),function(x){x.style.display=a})})&&w("none"),x=t.getBBox?c({},t.getBBox()):{width:t.offsetWidth,height:t.offsetHeight},w&&w("")}catch(X){}if(!x||0>x.width)x={width:0,height:0}}else x=this.htmlGetBBox();u.isSVG&&(a=x.width,u=x.height,e&&"11px"===e.fontSize&&17===Math.round(u)&&(x.height=u=14),g&&(x.width=Math.abs(u*Math.sin(k))+Math.abs(a*Math.cos(k)),x.height=Math.abs(u*
Math.cos(k))+Math.abs(a*Math.sin(k))));if(L&&0<x.height){for(;250<n.length;)delete M[n.shift()];M[L]||n.push(L);M[L]=x}}return x},show:function(a){return this.attr({visibility:a?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var g=this;g.animate({opacity:0},{duration:a||150,complete:function(){g.attr({y:-9999})}})},add:function(a){var g=this.renderer,x=this.element,u;a&&(this.parentGroup=a);this.parentInverted=a&&a.inverted;void 0!==this.textStr&&
g.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)u=this.zIndexSetter();u||(a?a.element:g.box).appendChild(x);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var g=a.parentNode;g&&g.removeChild(a)},destroy:function(){var a=this,g=a.element||{},u=a.renderer.isSVG&&"SPAN"===g.nodeName&&a.parentGroup,c=g.ownerSVGElement;g.onclick=g.onmouseout=g.onmouseover=g.onmousemove=g.point=null;P(a);a.clipPath&&c&&(b(c.querySelectorAll("[clip-path]"),function(g){-1<g.getAttribute("clip-path").indexOf(a.clipPath.element.id+
")")&&g.removeAttribute("clip-path")}),a.clipPath=a.clipPath.destroy());if(a.stops){for(c=0;c<a.stops.length;c++)a.stops[c]=a.stops[c].destroy();a.stops=null}a.safeRemoveChild(g);for(a.destroyShadows();u&&u.div&&0===u.div.childNodes.length;)g=u.parentGroup,a.safeRemoveChild(u.div),delete u.div,u=g;a.alignTo&&w(a.renderer.alignedObjects,a);E(a,function(g,x){delete a[x]});return null},shadow:function(a,g,u){var x=[],c,k,b=this.element,d,t,e,p;if(!a)this.destroyShadows();else if(!this.shadows){t=H(a.width,
3);e=(a.opacity||.15)/t;p=this.parentInverted?"(-1,-1)":"("+H(a.offsetX,1)+", "+H(a.offsetY,1)+")";for(c=1;c<=t;c++)k=b.cloneNode(0),d=2*t+1-2*c,l(k,{isShadow:"true",stroke:a.color||"#000000","stroke-opacity":e*c,"stroke-width":d,transform:"translate"+p,fill:"none"}),u&&(l(k,"height",Math.max(l(k,"height")-d,0)),k.cutHeight=d),g?g.element.appendChild(k):b.parentNode&&b.parentNode.insertBefore(k,b),x.push(k);this.shadows=x}return this},destroyShadows:function(){b(this.shadows||[],function(a){this.safeRemoveChild(a)},
this);this.shadows=void 0},xGetter:function(a){"circle"===this.element.nodeName&&("x"===a?a="cx":"y"===a&&(a="cy"));return this._defaultGetter(a)},_defaultGetter:function(a){a=H(this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a));return a},dSetter:function(a,g,u){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");this[g]!==a&&(u.setAttribute(g,a),this[g]=a)},dashstyleSetter:function(a){var u,x=this["stroke-width"];"inherit"===x&&(x=1);if(a=
a&&a.toLowerCase()){a=a.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(u=a.length;u--;)a[u]=g(a[u])*x;a=a.join(",").replace(/NaN/g,"none");this.element.setAttribute("stroke-dasharray",a)}},alignSetter:function(a){this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[a])},opacitySetter:function(a,
g,u){this[g]=a;u.setAttribute(g,a)},titleSetter:function(a){var g=this.element.getElementsByTagName("title")[0];g||(g=n.createElementNS(this.SVG_NS,"title"),this.element.appendChild(g));g.firstChild&&g.removeChild(g.firstChild);g.appendChild(n.createTextNode(String(H(a),"").replace(/<[^>]*>/g,"")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))},fillSetter:function(a,g,u){"string"===typeof a?u.setAttribute(g,a):a&&this.colorGradient(a,
g,u)},visibilitySetter:function(a,g,u){"inherit"===a?u.removeAttribute(g):this[g]!==a&&u.setAttribute(g,a);this[g]=a},zIndexSetter:function(a,u){var c=this.renderer,k=this.parentGroup,x=(k||c).element||c.box,b,d=this.element,t,e,c=x===c.box;b=this.added;var p;v(a)&&(d.zIndex=a,a=+a,this[u]===a&&(b=!1),this[u]=a);if(b){(a=this.zIndex)&&k&&(k.handleZ=!0);u=x.childNodes;for(p=u.length-1;0<=p&&!t;p--)if(k=u[p],b=k.zIndex,e=!v(b),k!==d)if(0>a&&e&&!c&&!p)x.insertBefore(d,u[p]),t=!0;else if(g(b)<=a||e&&
(!v(a)||0<=a))x.insertBefore(d,u[p+1]||null),t=!0;t||(x.insertBefore(d,u[c?3:0]||null),t=!0)}return t},_defaultSetter:function(a,g,u){u.setAttribute(g,a)}});A.prototype.yGetter=A.prototype.xGetter;A.prototype.translateXSetter=A.prototype.translateYSetter=A.prototype.rotationSetter=A.prototype.verticalAlignSetter=A.prototype.rotationOriginXSetter=A.prototype.rotationOriginYSetter=A.prototype.scaleXSetter=A.prototype.scaleYSetter=A.prototype.matrixSetter=function(a,g){this[g]=a;this.doTransform=!0};
后面还有 324 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。