/doctor/004_doctor/doctor/node_modules/highcharts/js/highmaps.js |
@@ -0,0 +1,393 @@ |
/* |
Highmaps JS v5.0.14 (2017-07-28) |
|
(c) 2011-2016 Torstein Honsi |
|
License: www.highcharts.com/license |
*/ |
(function(H,T){"object"===typeof module&&module.exports?module.exports=H.document?T(H):T:H.Highcharts=T(H)})("undefined"!==typeof window?window:this,function(H){H=function(){var a=window,w=a.document,B=a.navigator&&a.navigator.userAgent||"",A=w&&w.createElementNS&&!!w.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,v=/(edge|msie|trident)/i.test(B)&&!window.opera,d=!A,g=/Firefox/.test(B),m=g&&4>parseInt(B.split("Firefox/")[1],10);return a.Highcharts?a.Highcharts.error(16,!0):{product:"Highmaps", |
version:"5.0.14",deg2rad:2*Math.PI/360,doc:w,hasBidiBug:m,hasTouch:w&&void 0!==w.documentElement.ontouchstart,isMS:v,isWebKit:/AppleWebKit/.test(B),isFirefox:g,isTouchDevice:/(Mobile|Android|Windows Phone)/.test(B),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:A,vml:d,win:a,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[]}}();(function(a){var w=[],B=a.charts,A=a.doc,v=a.win;a.error=function(d,g){d=a.isNumber(d)?"Highcharts error #"+ |
d+": www.highcharts.com/errors/"+d:d;if(g)throw Error(d);v.console&&console.log(d)};a.Fx=function(a,g,m){this.options=g;this.elem=a;this.prop=m};a.Fx.prototype={dSetter:function(){var a=this.paths[0],g=this.paths[1],m=[],t=this.now,p=a.length,k;if(1===t)m=this.toD;else if(p===g.length&&1>t)for(;p--;)k=parseFloat(a[p]),m[p]=isNaN(k)?a[p]:t*parseFloat(g[p]-k)+k;else m=g;this.elem.attr("d",m,null,!0)},update:function(){var a=this.elem,g=this.prop,m=this.now,t=this.options.step;if(this[g+"Setter"])this[g+ |
"Setter"]();else a.attr?a.element&&a.attr(g,m,null,!0):a.style[g]=m+this.unit;t&&t.call(a,m,this)},run:function(a,g,m){var d=this,p=function(a){return p.stopped?!1:d.step(a)},k;this.startTime=+new Date;this.start=a;this.end=g;this.unit=m;this.now=this.start;this.pos=0;p.elem=this.elem;p.prop=this.prop;p()&&1===w.push(p)&&(p.timerId=setInterval(function(){for(k=0;k<w.length;k++)w[k]()||w.splice(k--,1);w.length||clearInterval(p.timerId)},13))},step:function(d){var g=+new Date,m,t=this.options,p=this.elem, |
k=t.complete,f=t.duration,q=t.curAnim;p.attr&&!p.element?d=!1:d||g>=f+this.startTime?(this.now=this.end,this.pos=1,this.update(),m=q[this.prop]=!0,a.objectEach(q,function(a){!0!==a&&(m=!1)}),m&&k&&k.call(p),d=!1):(this.pos=t.easing((g-this.startTime)/f),this.now=this.start+(this.end-this.start)*this.pos,this.update(),d=!0);return d},initPath:function(d,g,m){function t(a){var b,e;for(n=a.length;n--;)b="M"===a[n]||"L"===a[n],e=/[a-zA-Z]/.test(a[n+3]),b&&e&&a.splice(n+1,0,a[n+1],a[n+2],a[n+1],a[n+2])} |
function p(a,e){for(;a.length<l;){a[0]=e[l-a.length];var c=a.slice(0,b);[].splice.apply(a,[0,0].concat(c));F&&(c=a.slice(a.length-b),[].splice.apply(a,[a.length,0].concat(c)),n--)}a[0]="M"}function k(a,n){for(var k=(l-a.length)/b;0<k&&k--;)e=a.slice().splice(a.length/G-b,b*G),e[0]=n[l-b-k*b],c&&(e[b-6]=e[b-2],e[b-5]=e[b-1]),[].splice.apply(a,[a.length/G,0].concat(e)),F&&k--}g=g||"";var f,q=d.startX,u=d.endX,c=-1<g.indexOf("C"),b=c?7:3,l,e,n;g=g.split(" ");m=m.slice();var F=d.isArea,G=F?2:1,E;c&&(t(g), |
t(m));if(q&&u){for(n=0;n<q.length;n++)if(q[n]===u[0]){f=n;break}else if(q[0]===u[u.length-q.length+n]){f=n;E=!0;break}void 0===f&&(g=[])}g.length&&a.isNumber(f)&&(l=m.length+f*G*b,E?(p(g,m),k(m,g)):(p(m,g),k(g,m)));return[g,m]}};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,g){var d;a||(a={});for(d in g)a[d]=g[d];return a};a.merge=function(){var d,g=arguments,m,t={},p= |
function(k,f){"object"!==typeof k&&(k={});a.objectEach(f,function(g,d){!a.isObject(g,!0)||a.isClass(g)||a.isDOMElement(g)?k[d]=f[d]:k[d]=p(k[d]||{},g)});return k};!0===g[0]&&(t=g[1],g=Array.prototype.slice.call(g,2));m=g.length;for(d=0;d<m;d++)t=p(t,g[d]);return t};a.pInt=function(a,g){return parseInt(a,g||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(d, |
g){return!!d&&"object"===typeof d&&(!g||!a.isArray(d))};a.isDOMElement=function(d){return a.isObject(d)&&"number"===typeof d.nodeType};a.isClass=function(d){var g=d&&d.constructor;return!(!a.isObject(d,!0)||a.isDOMElement(d)||!g||!g.name||"Object"===g.name)};a.isNumber=function(a){return"number"===typeof a&&!isNaN(a)};a.erase=function(a,g){for(var d=a.length;d--;)if(a[d]===g){a.splice(d,1);break}};a.defined=function(a){return void 0!==a&&null!==a};a.attr=function(d,g,m){var t;a.isString(g)?a.defined(m)? |
d.setAttribute(g,m):d&&d.getAttribute&&(t=d.getAttribute(g)):a.defined(g)&&a.isObject(g)&&a.objectEach(g,function(a,k){d.setAttribute(k,a)});return t};a.splat=function(d){return a.isArray(d)?d:[d]};a.syncTimeout=function(a,g,m){if(g)return setTimeout(a,g,m);a.call(0,m)};a.pick=function(){var a=arguments,g,m,t=a.length;for(g=0;g<t;g++)if(m=a[g],void 0!==m&&null!==m)return m};a.css=function(d,g){a.isMS&&!a.svg&&g&&void 0!==g.opacity&&(g.filter="alpha(opacity\x3d"+100*g.opacity+")");a.extend(d.style, |
g)};a.createElement=function(d,g,m,t,p){d=A.createElement(d);var k=a.css;g&&a.extend(d,g);p&&k(d,{padding:0,border:"none",margin:0});m&&k(d,m);t&&t.appendChild(d);return d};a.extendClass=function(d,g){var m=function(){};m.prototype=new d;a.extend(m.prototype,g);return m};a.pad=function(a,g,m){return Array((g||2)+1-String(a).length).join(m||0)+a};a.relativeLength=function(a,g,m){return/%$/.test(a)?g*parseFloat(a)/100+(m||0):parseFloat(a)};a.wrap=function(a,g,m){var d=a[g];a[g]=function(){var a=Array.prototype.slice.call(arguments), |
k=arguments,f=this;f.proceed=function(){d.apply(f,arguments.length?arguments:k)};a.unshift(d);a=m.apply(this,a);f.proceed=null;return a}};a.getTZOffset=function(d){var g=a.Date;return 6E4*(g.hcGetTimezoneOffset&&g.hcGetTimezoneOffset(d)||g.hcTimezoneOffset||0)};a.dateFormat=function(d,g,m){if(!a.defined(g)||isNaN(g))return a.defaultOptions.lang.invalidDate||"";d=a.pick(d,"%Y-%m-%d %H:%M:%S");var t=a.Date,p=new t(g-a.getTZOffset(g)),k=p[t.hcGetHours](),f=p[t.hcGetDay](),q=p[t.hcGetDate](),u=p[t.hcGetMonth](), |
c=p[t.hcGetFullYear](),b=a.defaultOptions.lang,l=b.weekdays,e=b.shortWeekdays,n=a.pad,t=a.extend({a:e?e[f]:l[f].substr(0,3),A:l[f],d:n(q),e:n(q,2," "),w:f,b:b.shortMonths[u],B:b.months[u],m:n(u+1),y:c.toString().substr(2,2),Y:c,H:n(k),k:k,I:n(k%12||12),l:k%12||12,M:n(p[t.hcGetMinutes]()),p:12>k?"AM":"PM",P:12>k?"am":"pm",S:n(p.getSeconds()),L:n(Math.round(g%1E3),3)},a.dateFormats);a.objectEach(t,function(a,b){for(;-1!==d.indexOf("%"+b);)d=d.replace("%"+b,"function"===typeof a?a(g):a)});return m?d.substr(0, |
1).toUpperCase()+d.substr(1):d};a.formatSingle=function(d,g){var m=/\.([0-9])/,t=a.defaultOptions.lang;/f$/.test(d)?(m=(m=d.match(m))?m[1]:-1,null!==g&&(g=a.numberFormat(g,m,t.decimalPoint,-1<d.indexOf(",")?t.thousandsSep:""))):g=a.dateFormat(d,g);return g};a.format=function(d,g){for(var m="{",t=!1,p,k,f,q,u=[],c;d;){m=d.indexOf(m);if(-1===m)break;p=d.slice(0,m);if(t){p=p.split(":");k=p.shift().split(".");q=k.length;c=g;for(f=0;f<q;f++)c=c[k[f]];p.length&&(c=a.formatSingle(p.join(":"),c));u.push(c)}else u.push(p); |
d=d.slice(m+1);m=(t=!t)?"}":"{"}u.push(d);return u.join("")};a.getMagnitude=function(a){return Math.pow(10,Math.floor(Math.log(a)/Math.LN10))};a.normalizeTickInterval=function(d,g,m,t,p){var k,f=d;m=a.pick(m,1);k=d/m;g||(g=p?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===t&&(1===m?g=a.grep(g,function(a){return 0===a%1}):.1>=m&&(g=[1/m])));for(t=0;t<g.length&&!(f=g[t],p&&f*m>=d||!p&&k<=(g[t]+(g[t+1]||g[t]))/2);t++);return f=a.correctFloat(f*m,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort= |
function(a,g){var m=a.length,d,p;for(p=0;p<m;p++)a[p].safeI=p;a.sort(function(a,f){d=g(a,f);return 0===d?a.safeI-f.safeI:d});for(p=0;p<m;p++)delete a[p].safeI};a.arrayMin=function(a){for(var g=a.length,m=a[0];g--;)a[g]<m&&(m=a[g]);return m};a.arrayMax=function(a){for(var g=a.length,m=a[0];g--;)a[g]>m&&(m=a[g]);return m};a.destroyObjectProperties=function(d,g){a.objectEach(d,function(a,t){a&&a!==g&&a.destroy&&a.destroy();delete d[t]})};a.discardElement=function(d){var g=a.garbageBin;g||(g=a.createElement("div")); |
d&&g.appendChild(d);g.innerHTML=""};a.correctFloat=function(a,g){return parseFloat(a.toPrecision(g||14))};a.setAnimation=function(d,g){g.renderer.globalAnimation=a.pick(d,g.options.chart.animation,!0)};a.animObject=function(d){return a.isObject(d)?a.merge(d):{duration:d?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(d,g,m,t){d=+d||0;g=+g;var p=a.defaultOptions.lang,k=(d.toString().split(".")[1]||"").split("e")[0].length, |
f,q,u=d.toString().split("e");-1===g?g=Math.min(k,20):a.isNumber(g)||(g=2);q=(Math.abs(u[1]?u[0]:d)+Math.pow(10,-Math.max(g,k)-1)).toFixed(g);k=String(a.pInt(q));f=3<k.length?k.length%3:0;m=a.pick(m,p.decimalPoint);t=a.pick(t,p.thousandsSep);d=(0>d?"-":"")+(f?k.substr(0,f)+t:"");d+=k.substr(f).replace(/(\d{3})(?=\d)/g,"$1"+t);g&&(d+=m+q.slice(-g));u[1]&&(d+="e"+u[1]);return d};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(d,g,m){if("width"===g)return Math.min(d.offsetWidth, |
d.scrollWidth)-a.getStyle(d,"padding-left")-a.getStyle(d,"padding-right");if("height"===g)return Math.min(d.offsetHeight,d.scrollHeight)-a.getStyle(d,"padding-top")-a.getStyle(d,"padding-bottom");if(d=v.getComputedStyle(d,void 0))d=d.getPropertyValue(g),a.pick(m,!0)&&(d=a.pInt(d));return d};a.inArray=function(a,g){return g.indexOf?g.indexOf(a):[].indexOf.call(g,a)};a.grep=function(a,g){return[].filter.call(a,g)};a.find=function(a,g){return[].find.call(a,g)};a.map=function(a,g){for(var m=[],d=0,p= |
a.length;d<p;d++)m[d]=g.call(a[d],a[d],d,a);return m};a.offset=function(a){var g=A.documentElement;a=a.getBoundingClientRect();return{top:a.top+(v.pageYOffset||g.scrollTop)-(g.clientTop||0),left:a.left+(v.pageXOffset||g.scrollLeft)-(g.clientLeft||0)}};a.stop=function(a,g){for(var m=w.length;m--;)w[m].elem!==a||g&&g!==w[m].prop||(w[m].stopped=!0)};a.each=function(a,g,m){return Array.prototype.forEach.call(a,g,m)};a.objectEach=function(a,g,m){for(var d in a)a.hasOwnProperty(d)&&g.call(m,a[d],d,a)}; |
a.addEvent=function(d,g,m){function t(a){a.target=a.srcElement||v;m.call(d,a)}var p=d.hcEvents=d.hcEvents||{};d.addEventListener?d.addEventListener(g,m,!1):d.attachEvent&&(d.hcEventsIE||(d.hcEventsIE={}),m.hcGetKey||(m.hcGetKey=a.uniqueKey()),d.hcEventsIE[m.hcGetKey]=t,d.attachEvent("on"+g,t));p[g]||(p[g]=[]);p[g].push(m);return function(){a.removeEvent(d,g,m)}};a.removeEvent=function(d,g,m){function t(a,c){d.removeEventListener?d.removeEventListener(a,c,!1):d.attachEvent&&(c=d.hcEventsIE[c.hcGetKey], |
d.detachEvent("on"+a,c))}function p(){var k,c;d.nodeName&&(g?(k={},k[g]=!0):k=f,a.objectEach(k,function(a,l){if(f[l])for(c=f[l].length;c--;)t(l,f[l][c])}))}var k,f=d.hcEvents,q;f&&(g?(k=f[g]||[],m?(q=a.inArray(m,k),-1<q&&(k.splice(q,1),f[g]=k),t(g,m)):(p(),f[g]=[])):(p(),d.hcEvents={}))};a.fireEvent=function(d,g,m,t){var p;p=d.hcEvents;var k,f;m=m||{};if(A.createEvent&&(d.dispatchEvent||d.fireEvent))p=A.createEvent("Events"),p.initEvent(g,!0,!0),a.extend(p,m),d.dispatchEvent?d.dispatchEvent(p):d.fireEvent(g, |
p);else if(p)for(p=p[g]||[],k=p.length,m.target||a.extend(m,{preventDefault:function(){m.defaultPrevented=!0},target:d,type:g}),g=0;g<k;g++)(f=p[g])&&!1===f.call(d,m)&&m.preventDefault();t&&!m.defaultPrevented&&t(m)};a.animate=function(d,g,m){var t,p="",k,f,q;a.isObject(m)||(q=arguments,m={duration:q[2],easing:q[3],complete:q[4]});a.isNumber(m.duration)||(m.duration=400);m.easing="function"===typeof m.easing?m.easing:Math[m.easing]||Math.easeInOutSine;m.curAnim=a.merge(g);a.objectEach(g,function(q, |
c){a.stop(d,c);f=new a.Fx(d,m,c);k=null;"d"===c?(f.paths=f.initPath(d,d.d,g.d),f.toD=g.d,t=0,k=1):d.attr?t=d.attr(c):(t=parseFloat(a.getStyle(d,c))||0,"opacity"!==c&&(p="px"));k||(k=q);k&&k.match&&k.match("px")&&(k=k.replace(/px/g,""));f.run(t,k,p)})};a.seriesType=function(d,g,m,t,p){var k=a.getOptions(),f=a.seriesTypes;k.plotOptions[d]=a.merge(k.plotOptions[g],m);f[d]=a.extendClass(f[g]||function(){},t);f[d].prototype.type=d;p&&(f[d].prototype.pointClass=a.extendClass(a.Point,p));return f[d]};a.uniqueKey= |
function(){var a=Math.random().toString(36).substring(2,9),g=0;return function(){return"highcharts-"+a+"-"+g++}}();v.jQuery&&(v.jQuery.fn.highcharts=function(){var d=[].slice.call(arguments);if(this[0])return d[0]?(new (a[a.isString(d[0])?d.shift():"Chart"])(this[0],d[0],d[1]),this):B[a.attr(this[0],"data-highcharts-chart")]});A&&!A.defaultView&&(a.getStyle=function(d,g){var m={width:"clientWidth",height:"clientHeight"}[g];if(d.style[g])return a.pInt(d.style[g]);"opacity"===g&&(g="filter");if(m)return d.style.zoom= |
1,Math.max(d[m]-2*a.getStyle(d,"padding"),0);d=d.currentStyle[g.replace(/\-(\w)/g,function(a,g){return g.toUpperCase()})];"filter"===g&&(d=d.replace(/alpha\(opacity=([0-9]+)\)/,function(a,g){return g/100}));return""===d?1:a.pInt(d)});Array.prototype.forEach||(a.each=function(a,g,m){for(var d=0,p=a.length;d<p;d++)if(!1===g.call(m,a[d],d,a))return d});Array.prototype.indexOf||(a.inArray=function(a,g){var m,d=0;if(g)for(m=g.length;d<m;d++)if(g[d]===a)return d;return-1});Array.prototype.filter||(a.grep= |
function(a,g){for(var m=[],d=0,p=a.length;d<p;d++)g(a[d],d)&&m.push(a[d]);return m});Array.prototype.find||(a.find=function(a,g){var m,d=a.length;for(m=0;m<d;m++)if(g(a[m],m))return a[m]})})(H);(function(a){var w=a.each,B=a.isNumber,A=a.map,v=a.merge,d=a.pInt;a.Color=function(g){if(!(this instanceof a.Color))return new a.Color(g);this.init(g)};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[d(a[1]), |
d(a[2]),d(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[d(a[1]),d(a[2]),d(a[3]),1]}}],names:{none:"rgba(255,255,255,0)",white:"#ffffff",black:"#000000"},init:function(g){var m,d,p,k;if((this.input=g=this.names[g&&g.toLowerCase?g.toLowerCase():""]||g)&&g.stops)this.stops=A(g.stops,function(k){return new a.Color(k[1])});else if(g&&"#"===g.charAt()&&(m=g.length,g=parseInt(g.substr(1),16),7===m?d=[(g&16711680)>>16,(g&65280)>> |
8,g&255,1]:4===m&&(d=[(g&3840)>>4|(g&3840)>>8,(g&240)>>4|g&240,(g&15)<<4|g&15,1])),!d)for(p=this.parsers.length;p--&&!d;)k=this.parsers[p],(m=k.regex.exec(g))&&(d=k.parse(m));this.rgba=d||[]},get:function(a){var g=this.input,d=this.rgba,p;this.stops?(p=v(g),p.stops=[].concat(p.stops),w(this.stops,function(k,f){p.stops[f]=[p.stops[f][0],k.get(a)]})):p=d&&B(d[0])?"rgb"===a||!a&&1===d[3]?"rgb("+d[0]+","+d[1]+","+d[2]+")":"a"===a?d[3]:"rgba("+d.join(",")+")":g;return p},brighten:function(a){var g,t=this.rgba; |
if(this.stops)w(this.stops,function(g){g.brighten(a)});else if(B(a)&&0!==a)for(g=0;3>g;g++)t[g]+=d(255*a),0>t[g]&&(t[g]=0),255<t[g]&&(t[g]=255);return this},setOpacity:function(a){this.rgba[3]=a;return this},tweenTo:function(a,d){var g,m;a.rgba.length?(g=this.rgba,a=a.rgba,m=1!==a[3]||1!==g[3],a=(m?"rgba(":"rgb(")+Math.round(a[0]+(g[0]-a[0])*(1-d))+","+Math.round(a[1]+(g[1]-a[1])*(1-d))+","+Math.round(a[2]+(g[2]-a[2])*(1-d))+(m?","+(a[3]+(g[3]-a[3])*(1-d)):"")+")"):a=a.input||"none";return a}};a.color= |
function(g){return new a.Color(g)}})(H);(function(a){function w(){var g=a.defaultOptions.global,d=m.moment;if(g.timezone){if(d)return function(a){return-d.tz(a,g.timezone).utcOffset()};a.error(25)}return g.useUTC&&g.getTimezoneOffset}function B(){var d=a.defaultOptions.global,p,k=d.useUTC,f=k?"getUTC":"get",q=k?"setUTC":"set";a.Date=p=d.Date||m.Date;p.hcTimezoneOffset=k&&d.timezoneOffset;p.hcGetTimezoneOffset=w();p.hcMakeTime=function(a,c,b,l,e,n){var f;k?(f=p.UTC.apply(0,arguments),f+=v(f)):f=(new p(a, |
c,g(b,1),g(l,0),g(e,0),g(n,0))).getTime();return f};A("Minutes Hours Day Date Month FullYear".split(" "),function(a){p["hcGet"+a]=f+a});A("Milliseconds Seconds Minutes Hours Date Month FullYear".split(" "),function(a){p["hcSet"+a]=q+a})}var A=a.each,v=a.getTZOffset,d=a.merge,g=a.pick,m=a.win;a.defaultOptions={symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "), |
shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{useUTC:!0},chart:{borderRadius:0,colorCount:10,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}},width:null,height:null}, |
title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{},itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{}},loading:{},tooltip:{enabled:!0, |
animation:a.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:a.isTouchDevice?25:10,headerFormat:'\x3cspan class\x3d"highcharts-header"\x3e{point.key}\x3c/span\x3e\x3cbr/\x3e',pointFormat:'\x3cspan class\x3d"highcharts-color-{point.colorIndex}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cspan class\x3d"highcharts-strong"\x3e{point.y}\x3c/span\x3e\x3cbr/\x3e'}, |
credits:{enabled:!0,href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},text:"Highcharts.com"}};a.setOptions=function(g){a.defaultOptions=d(!0,a.defaultOptions,g);B();return a.defaultOptions};a.getOptions=function(){return a.defaultOptions};a.defaultPlotOptions=a.defaultOptions.plotOptions;B()})(H);(function(a){var w,B,A=a.addEvent,v=a.animate,d=a.attr,g=a.charts,m=a.color,t=a.css,p=a.createElement,k=a.defined,f=a.deg2rad,q=a.destroyObjectProperties,u=a.doc, |
c=a.each,b=a.extend,l=a.erase,e=a.grep,n=a.hasTouch,F=a.inArray,G=a.isArray,E=a.isFirefox,I=a.isMS,x=a.isObject,L=a.isString,y=a.isWebKit,D=a.merge,C=a.noop,J=a.objectEach,h=a.pick,r=a.pInt,M=a.removeEvent,K=a.splat,N=a.stop,O=a.svg,R=a.SVG_NS,Q=a.symbolSizes,P=a.win;w=a.SVGElement=function(){return this};b(w.prototype,{opacity:1,SVG_NS:R,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline".split(" "),init:function(a, |
h){this.element="span"===h?p(h):u.createElementNS(this.SVG_NS,h);this.renderer=a},animate:function(z,b,r){b=a.animObject(h(b,this.renderer.globalAnimation,!0));0!==b.duration?(r&&(b.complete=r),v(this,z,b)):(this.attr(z,null,r),b.step&&b.step.call(this));return this},colorGradient:function(z,h,b){var r=this.renderer,e,l,n,f,g,y,d,q,K,S,m=[],C;z.radialGradient?l="radialGradient":z.linearGradient&&(l="linearGradient");l&&(n=z[l],g=r.gradients,d=z.stops,S=b.radialReference,G(n)&&(z[l]=n={x1:n[0],y1:n[1], |
x2:n[2],y2:n[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===l&&S&&!k(n.gradientUnits)&&(f=n,n=D(n,r.getRadialAttr(S,f),{gradientUnits:"userSpaceOnUse"})),J(n,function(a,z){"id"!==z&&m.push(z,a)}),J(d,function(a){m.push(a)}),m=m.join(","),g[m]?S=g[m].attr("id"):(n.id=S=a.uniqueKey(),g[m]=y=r.createElement(l).attr(n).add(r.defs),y.radAttr=f,y.stops=[],c(d,function(z){0===z[1].indexOf("rgba")?(e=a.color(z[1]),q=e.get("rgb"),K=e.get("a")):(q=z[1],K=1);z=r.createElement("stop").attr({offset:z[0], |
"stop-color":q,"stop-opacity":K}).add(y);y.stops.push(z)})),C="url("+r.url+"#"+S+")",b.setAttribute(h,C),b.gradient=m,z.toString=function(){return C})},applyTextOutline:function(z){var h=this.element,b,r,e,n,k;-1!==z.indexOf("contrast")&&(z=z.replace(/contrast/g,this.renderer.getContrast(h.style.fill)));z=z.split(" ");r=z[z.length-1];if((e=z[0])&&"none"!==e&&a.svg){this.fakeTS=!0;z=[].slice.call(h.getElementsByTagName("tspan"));this.ySetter=this.xSetter;e=e.replace(/(^[\d\.]+)(.*?)$/g,function(a, |
z,h){return 2*z+h});for(k=z.length;k--;)b=z[k],"highcharts-text-outline"===b.getAttribute("class")&&l(z,h.removeChild(b));n=h.firstChild;c(z,function(a,z){0===z&&(a.setAttribute("x",h.getAttribute("x")),z=h.getAttribute("y"),a.setAttribute("y",z||0),null===z&&h.setAttribute("y",0));a=a.cloneNode(1);d(a,{"class":"highcharts-text-outline",fill:r,stroke:r,"stroke-width":e,"stroke-linejoin":"round"});h.insertBefore(a,n)})}},attr:function(a,h,b,r){var z,e=this.element,l,c=this,n,k;"string"===typeof a&& |
void 0!==h&&(z=a,a={},a[z]=h);"string"===typeof a?c=(this[a+"Getter"]||this._defaultGetter).call(this,a,e):(J(a,function(z,h){n=!1;r||N(this,h);this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)$/.test(h)&&(l||(this.symbolAttr(a),l=!0),n=!0);!this.rotation||"x"!==h&&"y"!==h||(this.doTransform=!0);n||(k=this[h+"Setter"]||this._defaultSetter,k.call(this,z,h,e))},this),this.afterSetters());b&&b();return c},afterSetters:function(){this.doTransform&&(this.updateTransform(),this.doTransform= |
!1)},addClass:function(a,h){var z=this.attr("class")||"";-1===z.indexOf(a)&&(h||(a=(z+(z?" ":"")+a).replace(" "," ")),this.attr("class",a));return this},hasClass:function(a){return-1!==F(a,(this.attr("class")||"").split(" "))},removeClass:function(a){return this.attr("class",(this.attr("class")||"").replace(a,""))},symbolAttr:function(a){var z=this;c("x y r start end width height innerR anchorX anchorY".split(" "),function(b){z[b]=h(a[b],z[b])});z.attr({d:z.renderer.symbols[z.symbolName](z.x,z.y, |
z.width,z.height,z)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a,h){var z=this,b={},r;h=h||a.strokeWidth||0;r=Math.round(h)%2/2;a.x=Math.floor(a.x||z.x||0)+r;a.y=Math.floor(a.y||z.y||0)+r;a.width=Math.floor((a.width||z.width||0)-2*r);a.height=Math.floor((a.height||z.height||0)-2*r);k(a.strokeWidth)&&(a.strokeWidth=h);J(a,function(a,h){z[h]!==a&&(z[h]=b[h]=a)});return b},css:function(a){var h=this.styles,z={},e=this.element,l,c= |
"",n,k=!h,f=["textOutline","textOverflow","width"];a&&a.color&&(a.fill=a.color);h&&J(a,function(a,b){a!==h[b]&&(z[b]=a,k=!0)});k&&(h&&(a=b(h,z)),l=this.textWidth=a&&a.width&&"auto"!==a.width&&"text"===e.nodeName.toLowerCase()&&r(a.width),this.styles=a,l&&!O&&this.renderer.forExport&&delete a.width,I&&!O?t(this.element,a):(n=function(a,h){return"-"+h.toLowerCase()},J(a,function(a,h){-1===F(h,f)&&(c+=h.replace(/([A-Z])/g,n)+":"+a+";")}),c&&d(e,"style",c)),this.added&&("text"===this.element.nodeName&& |
this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline)));return this},getStyle:function(a){return P.getComputedStyle(this.element||this,"").getPropertyValue(a)},strokeWidth:function(){var a=this.getStyle("stroke-width"),h;a.indexOf("px")===a.length-2?a=r(a):(h=u.createElementNS(R,"rect"),d(h,{width:a,"stroke-width":0}),this.element.parentNode.appendChild(h),a=h.getBBox().width,h.parentNode.removeChild(h));return a},on:function(a,h){var z=this,b=z.element;n&&"click"=== |
a?(b.ontouchstart=function(a){z.touchEventFired=Date.now();a.preventDefault();h.call(b,a)},b.onclick=function(a){(-1===P.navigator.userAgent.indexOf("Android")||1100<Date.now()-(z.touchEventFired||0))&&h.call(b,a)}):b["on"+a]=h;return this},setRadialReference:function(a){var h=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;h&&h.radAttr&&h.animate(this.renderer.getRadialAttr(a,h.radAttr));return this},translate:function(a,h){return this.attr({translateX:a,translateY:h})}, |
invert:function(a){this.inverted=a;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,r=this.scaleX,e=this.scaleY,l=this.inverted,c=this.rotation,n=this.element;l&&(a+=this.width,b+=this.height);a=["translate("+a+","+b+")"];l?a.push("rotate(90) scale(-1,1)"):c&&a.push("rotate("+c+" "+(n.getAttribute("x")||0)+" "+(n.getAttribute("y")||0)+")");(k(r)||k(e))&&a.push("scale("+h(r,1)+" "+h(e,1)+")");a.length&&n.setAttribute("transform",a.join(" "))}, |
toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,b,r){var z,e,c,n,k={};e=this.renderer;c=e.alignedObjects;var f,y;if(a){if(this.alignOptions=a,this.alignByTranslate=b,!r||L(r))this.alignTo=z=r||"renderer",l(c,this),c.push(this),r=null}else a=this.alignOptions,b=this.alignByTranslate,z=this.alignTo;r=h(r,e[z],e);z=a.align;e=a.verticalAlign;c=(r.x||0)+(a.x||0);n=(r.y||0)+(a.y||0);"right"===z?f=1:"center"===z&&(f=2);f&&(c+=(r.width-(a.width||0))/f);k[b? |
"translateX":"x"]=Math.round(c);"bottom"===e?y=1:"middle"===e&&(y=2);y&&(n+=(r.height-(a.height||0))/y);k[b?"translateY":"y"]=Math.round(n);this[this.placed?"animate":"attr"](k);this.placed=!0;this.alignAttr=k;return this},getBBox:function(a,r){var z,e=this.renderer,l,n=this.element,k=this.styles,y,g=this.textStr,d,D=e.cache,q=e.cacheKeys,K;r=h(r,this.rotation);l=r*f;y=n&&w.prototype.getStyle.call(n,"font-size");void 0!==g&&(K=g.toString(),-1===K.indexOf("\x3c")&&(K=K.replace(/[0-9]/g,"0")),K+=["", |
r||0,y,k&&k.width,k&&k.textOverflow].join());K&&!a&&(z=D[K]);if(!z){if(n.namespaceURI===this.SVG_NS||e.forExport){try{(d=this.fakeTS&&function(a){c(n.querySelectorAll(".highcharts-text-outline"),function(h){h.style.display=a})})&&d("none"),z=n.getBBox?b({},n.getBBox()):{width:n.offsetWidth,height:n.offsetHeight},d&&d("")}catch(U){}if(!z||0>z.width)z={width:0,height:0}}else z=this.htmlGetBBox();e.isSVG&&(a=z.width,e=z.height,k&&"11px"===k.fontSize&&17===Math.round(e)&&(z.height=e=14),r&&(z.width=Math.abs(e* |
Math.sin(l))+Math.abs(a*Math.cos(l)),z.height=Math.abs(e*Math.cos(l))+Math.abs(a*Math.sin(l))));if(K&&0<z.height){for(;250<q.length;)delete D[q.shift()];D[K]||q.push(K);D[K]=z}}return z},show:function(a){return this.attr({visibility:a?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var h=this;h.animate({opacity:0},{duration:a||150,complete:function(){h.attr({y:-9999})}})},add:function(a){var h=this.renderer,b=this.element,r;a&&(this.parentGroup= |
a);this.parentInverted=a&&a.inverted;void 0!==this.textStr&&h.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)r=this.zIndexSetter();r||(a?a.element:h.box).appendChild(b);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var h=a.parentNode;h&&h.removeChild(a)},destroy:function(){var a=this,h=a.element||{},b=a.renderer.isSVG&&"SPAN"===h.nodeName&&a.parentGroup,r=h.ownerSVGElement;h.onclick=h.onmouseout=h.onmouseover=h.onmousemove=h.point=null;N(a);a.clipPath&&r&&(c(r.querySelectorAll("[clip-path]"), |
function(h){-1<h.getAttribute("clip-path").indexOf(a.clipPath.element.id+")")&&h.removeAttribute("clip-path")}),a.clipPath=a.clipPath.destroy());if(a.stops){for(r=0;r<a.stops.length;r++)a.stops[r]=a.stops[r].destroy();a.stops=null}for(a.safeRemoveChild(h);b&&b.div&&0===b.div.childNodes.length;)h=b.parentGroup,a.safeRemoveChild(b.div),delete b.div,b=h;a.alignTo&&l(a.renderer.alignedObjects,a);J(a,function(h,b){delete a[b]});return null},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,h,b){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");this[h]!==a&&(b.setAttribute(h,a),this[h]=a)},alignSetter:function(a){this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[a])},opacitySetter:function(a,h,b){this[h]=a;b.setAttribute(h, |
a)},titleSetter:function(a){var b=this.element.getElementsByTagName("title")[0];b||(b=u.createElementNS(this.SVG_NS,"title"),this.element.appendChild(b));b.firstChild&&b.removeChild(b.firstChild);b.appendChild(u.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,h,b){"string"===typeof a?b.setAttribute(h,a):a&&this.colorGradient(a,h,b)},visibilitySetter:function(a, |
h,b){"inherit"===a?b.removeAttribute(h):this[h]!==a&&b.setAttribute(h,a);this[h]=a},zIndexSetter:function(a,h){var b=this.renderer,e=this.parentGroup,c=(e||b).element||b.box,l,n=this.element,z;l=this.added;var f;k(a)&&(n.zIndex=a,a=+a,this[h]===a&&(l=!1),this[h]=a);if(l){(a=this.zIndex)&&e&&(e.handleZ=!0);h=c.childNodes;for(f=0;f<h.length&&!z;f++)e=h[f],l=e.zIndex,e!==n&&(r(l)>a||!k(a)&&k(l)||0>a&&!k(l)&&c!==b.box)&&(c.insertBefore(n,e),z=!0);z||c.appendChild(n)}return z},_defaultSetter:function(a, |
h,b){b.setAttribute(h,a)}});w.prototype.yGetter=w.prototype.xGetter;w.prototype.translateXSetter=w.prototype.translateYSetter=w.prototype.rotationSetter=w.prototype.verticalAlignSetter=w.prototype.scaleXSetter=w.prototype.scaleYSetter=function(a,h){this[h]=a;this.doTransform=!0};B=a.SVGRenderer=function(){this.init.apply(this,arguments)};b(B.prototype,{Element:w,SVG_NS:R,init:function(a,h,b,r,e,l){var c;r=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"});c=r.element;a.appendChild(c); |
-1===a.innerHTML.indexOf("xmlns")&&d(c,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=c;this.boxWrapper=r;this.alignedObjects=[];this.url=(E||y)&&u.getElementsByTagName("base").length?P.location.href.replace(/#.*?$/,"").replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(u.createTextNode("Created with Highmaps 5.0.14"));this.defs=this.createElement("defs").add();this.allowHTML=l;this.forExport=e;this.gradients={};this.cache= |
{};this.cacheKeys=[];this.imgCount=0;this.setSize(h,b,!1);var n;E&&a.getBoundingClientRect&&(h=function(){t(a,{left:0,top:0});n=a.getBoundingClientRect();t(a,{left:Math.ceil(n.left)-n.left+"px",top:Math.ceil(n.top)-n.top+"px"})},h(),this.unSubPixelFix=A(P,"resize",h))},definition:function(a){function h(a,r){var e;c(K(a),function(a){var c=b.createElement(a.tagName),l={};J(a,function(a,h){"tagName"!==h&&"children"!==h&&"textContent"!==h&&(l[h]=a)});c.attr(l);c.add(r||b.defs);a.textContent&&c.element.appendChild(u.createTextNode(a.textContent)); |
h(a.children||[],c);e=c});return e}var b=this;return h(a)},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();q(this.gradients||{});this.gradients=null;a&&(this.defs=a.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var h=new this.Element;h.init(this,a);return h},draw:C,getRadialAttr:function(a,h){return{cx:a[0]-a[2]/2+h.cx*a[2],cy:a[1]- |
a[2]/2+h.cy*a[2],r:h.r*a[2]}},getSpanWidth:function(a,h){var b=a.getBBox(!0).width;!O&&this.forExport&&(b=this.measureSpanWidth(h.firstChild.data,a.styles));return b},applyEllipsis:function(a,h,b,r){var e=a.rotation,c=b,l,n=0,z=b.length,k=function(a){h.removeChild(h.firstChild);a&&h.appendChild(u.createTextNode(a))},f;a.rotation=0;c=this.getSpanWidth(a,h);if(f=c>r){for(;n<=z;)l=Math.ceil((n+z)/2),c=b.substring(0,l)+"\u2026",k(c),c=this.getSpanWidth(a,h),n===z?n=z+1:c>r?z=l-1:n=l;0===z&&k("")}a.rotation= |
e;return f},buildText:function(a){var b=a.element,l=this,n=l.forExport,k=h(a.textStr,"").toString(),z=-1!==k.indexOf("\x3c"),f=b.childNodes,y,g,K,D,q=d(b,"x"),m=a.styles,C=a.textWidth,x=m&&m.lineHeight,M=m&&m.textOutline,p=m&&"ellipsis"===m.textOverflow,E=m&&"nowrap"===m.whiteSpace,I,F=f.length,N=C&&!a.added&&this.box,G=function(a){return x?r(x):l.fontMetrics(void 0,a.getAttribute("style")?a:b).h},m=[k,p,E,x,M,m&&m.fontSize,C].join();if(m!==a.textCache){for(a.textCache=m;F--;)b.removeChild(f[F]); |
z||M||p||C||-1!==k.indexOf(" ")?(y=/<.*class="([^"]+)".*>/,g=/<.*style="([^"]+)".*>/,K=/<.*href="([^"]+)".*>/,N&&N.appendChild(b),k=z?k.replace(/<(b|strong)>/g,'\x3cspan class\x3d"highcharts-strong"\x3e').replace(/<(i|em)>/g,'\x3cspan class\x3d"highcharts-emphasized"\x3e').replace(/<a/g,"\x3cspan").replace(/<\/(b|strong|i|em|a)>/g,"\x3c/span\x3e").split(/<br.*?>/g):[k],k=e(k,function(a){return""!==a}),c(k,function(h,r){var e,k=0;h=h.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||\x3cspan").replace(/<\/span>/g, |
"\x3c/span\x3e|||");e=h.split("|||");c(e,function(h){if(""!==h||1===e.length){var c={},z=u.createElementNS(l.SVG_NS,"tspan"),f,m;y.test(h)&&(f=h.match(y)[1],d(z,"class",f));g.test(h)&&(m=h.match(g)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),d(z,"style",m));K.test(h)&&!n&&(d(z,"onclick",'location.href\x3d"'+h.match(K)[1]+'"'),t(z,{cursor:"pointer"}));h=(h.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"\x3c").replace(/>/g,"\x3e");if(" "!==h){z.appendChild(u.createTextNode(h));k?c.dx=0:r&&null!== |
q&&(c.x=q);d(z,c);b.appendChild(z);!k&&I&&(!O&&n&&t(z,{display:"block"}),d(z,"dy",G(z)));if(C){c=h.replace(/([^\^])-/g,"$1- ").split(" ");f=1<e.length||r||1<c.length&&!E;var x=[],M,F=G(z),N=a.rotation;for(p&&(D=l.applyEllipsis(a,z,h,C));!p&&f&&(c.length||x.length);)a.rotation=0,M=l.getSpanWidth(a,z),h=M>C,void 0===D&&(D=h),h&&1!==c.length?(z.removeChild(z.firstChild),x.unshift(c.pop())):(c=x,x=[],c.length&&!E&&(z=u.createElementNS(R,"tspan"),d(z,{dy:F,x:q}),m&&d(z,"style",m),b.appendChild(z)),M>C&& |
(C=M)),c.length&&z.appendChild(u.createTextNode(c.join(" ").replace(/- /g,"-")));a.rotation=N}k++}}});I=I||b.childNodes.length}),D&&a.attr("title",a.textStr),N&&N.removeChild(b),M&&a.applyTextOutline&&a.applyTextOutline(M)):b.appendChild(u.createTextNode(k.replace(/</g,"\x3c").replace(/>/g,"\x3e")))}},getContrast:function(a){a=m(a).rgba;return 510<a[0]+a[1]+a[2]?"#000000":"#FFFFFF"},button:function(a,h,b,r,e,c,l,n,k){var z=this.label(a,h,b,k,null,null,null,null,"button"),f=0;z.attr(D({padding:8, |
r:2},e));A(z.element,I?"mouseover":"mouseenter",function(){3!==f&&z.setState(1)});A(z.element,I?"mouseout":"mouseleave",function(){3!==f&&z.setState(f)});z.setState=function(a){1!==a&&(z.state=f=a);z.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][a||0])};return z.on("click",function(a){3!==f&&r.call(z,a)})},crispLine:function(a,h){a[1]===a[4]&&(a[1]=a[4]=Math.round(a[1])-h%2/2);a[2]===a[5]&&(a[2]=a[5]=Math.round(a[2])+ |
h%2/2);return a},path:function(a){var h={};G(a)?h.d=a:x(a)&&b(h,a);return this.createElement("path").attr(h)},circle:function(a,h,b){a=x(a)?a:{x:a,y:h,r:b};h=this.createElement("circle");h.xSetter=h.ySetter=function(a,h,b){b.setAttribute("c"+h,a)};return h.attr(a)},arc:function(a,h,b,r,e,c){x(a)?(r=a,h=r.y,b=r.r,a=r.x):r={innerR:r,start:e,end:c};a=this.symbol("arc",a,h,b,b,r);a.r=b;return a},rect:function(a,h,b,r,e,c){e=x(a)?a.r:e;c=this.createElement("rect");a=x(a)?a:void 0===a?{}:{x:a,y:h,width:Math.max(b, |
0),height:Math.max(r,0)};e&&(a.r=e);c.rSetter=function(a,h,b){d(b,{rx:a,ry:a})};return c.attr(a)},setSize:function(a,b,r){var e=this.alignedObjects,c=e.length;this.width=a;this.height=b;for(this.boxWrapper.animate({width:a,height:b},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:h(r,!0)?void 0:0});c--;)e[c].align()},g:function(a){var h=this.createElement("g");return a?h.attr({"class":"highcharts-"+a}):h},image:function(a,h,r,e,c){var l={preserveAspectRatio:"none"}; |
1<arguments.length&&b(l,{x:h,y:r,width:e,height:c});l=this.createElement("image").attr(l);l.element.setAttributeNS?l.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):l.element.setAttribute("hc-svg-href",a);return l},symbol:function(a,r,e,l,n,f){var z=this,y,K=/^url\((.*?)\)$/,d=K.test(a),m=!d&&(this.symbols[a]?a:"circle"),D=m&&this.symbols[m],q=k(r)&&D&&D.call(this.symbols,Math.round(r),Math.round(e),l,n,f),C,x;D?(y=this.path(q),b(y,{symbolName:m,x:r,y:e,width:l,height:n}),f&&b(y,f)): |
d&&(C=a.match(K)[1],y=this.image(C),y.imgwidth=h(Q[C]&&Q[C].width,f&&f.width),y.imgheight=h(Q[C]&&Q[C].height,f&&f.height),x=function(){y.attr({width:y.width,height:y.height})},c(["width","height"],function(a){y[a+"Setter"]=function(a,h){var b={},r=this["img"+h],e="width"===h?"translateX":"translateY";this[h]=a;k(r)&&(this.element&&this.element.setAttribute(h,r),this.alignByTranslate||(b[e]=((this[h]||0)-r)/2,this.attr(b)))}}),k(r)&&y.attr({x:r,y:e}),y.isImg=!0,k(y.imgwidth)&&k(y.imgheight)?x():(y.attr({width:0, |
height:0}),p("img",{onload:function(){var a=g[z.chartIndex];0===this.width&&(t(this,{position:"absolute",top:"-999em"}),u.body.appendChild(this));Q[C]={width:this.width,height:this.height};y.imgwidth=this.width;y.imgheight=this.height;y.element&&x();this.parentNode&&this.parentNode.removeChild(this);z.imgCount--;if(!z.imgCount&&a&&a.onload)a.onload()},src:C}),this.imgCount++));return y},symbols:{circle:function(a,h,b,r){return this.arc(a+b/2,h+r/2,b/2,r/2,{start:0,end:2*Math.PI,open:!1})},square:function(a, |
h,b,r){return["M",a,h,"L",a+b,h,a+b,h+r,a,h+r,"Z"]},triangle:function(a,h,b,r){return["M",a+b/2,h,"L",a+b,h+r,a,h+r,"Z"]},"triangle-down":function(a,h,b,r){return["M",a,h,"L",a+b,h,a+b/2,h+r,"Z"]},diamond:function(a,h,b,r){return["M",a+b/2,h,"L",a+b,h+r/2,a+b/2,h+r,a,h+r/2,"Z"]},arc:function(a,b,r,e,c){var l=c.start,n=c.r||r,f=c.r||e||r,y=c.end-.001;r=c.innerR;e=h(c.open,.001>Math.abs(c.end-c.start-2*Math.PI));var z=Math.cos(l),g=Math.sin(l),K=Math.cos(y),y=Math.sin(y);c=.001>c.end-l-Math.PI?0:1; |
n=["M",a+n*z,b+f*g,"A",n,f,0,c,1,a+n*K,b+f*y];k(r)&&n.push(e?"M":"L",a+r*K,b+r*y,"A",r,r,0,c,0,a+r*z,b+r*g);n.push(e?"":"Z");return n},callout:function(a,h,b,r,e){var c=Math.min(e&&e.r||0,b,r),l=c+6,n=e&&e.anchorX;e=e&&e.anchorY;var k;k=["M",a+c,h,"L",a+b-c,h,"C",a+b,h,a+b,h,a+b,h+c,"L",a+b,h+r-c,"C",a+b,h+r,a+b,h+r,a+b-c,h+r,"L",a+c,h+r,"C",a,h+r,a,h+r,a,h+r-c,"L",a,h+c,"C",a,h,a,h,a+c,h];n&&n>b?e>h+l&&e<h+r-l?k.splice(13,3,"L",a+b,e-6,a+b+6,e,a+b,e+6,a+b,h+r-c):k.splice(13,3,"L",a+b,r/2,n,e,a+b, |
r/2,a+b,h+r-c):n&&0>n?e>h+l&&e<h+r-l?k.splice(33,3,"L",a,e+6,a-6,e,a,e-6,a,h+c):k.splice(33,3,"L",a,r/2,n,e,a,r/2,a,h+c):e&&e>r&&n>a+l&&n<a+b-l?k.splice(23,3,"L",n+6,h+r,n,h+r+6,n-6,h+r,a+c,h+r):e&&0>e&&n>a+l&&n<a+b-l&&k.splice(3,3,"L",n-6,h,n,h-6,n+6,h,b-c,h);return k}},clipRect:function(h,b,r,e){var c=a.uniqueKey(),l=this.createElement("clipPath").attr({id:c}).add(this.defs);h=this.rect(h,b,r,e,0).add(l);h.id=c;h.clipPath=l;h.count=0;return h},text:function(a,h,b,r){var e=!O&&this.forExport,c={}; |
if(r&&(this.allowHTML||!this.forExport))return this.html(a,h,b);c.x=Math.round(h||0);b&&(c.y=Math.round(b));if(a||0===a)c.text=a;a=this.createElement("text").attr(c);e&&a.css({position:"absolute"});r||(a.xSetter=function(a,h,b){var r=b.getElementsByTagName("tspan"),e,c=b.getAttribute(h),l;for(l=0;l<r.length;l++)e=r[l],e.getAttribute(h)===c&&e.setAttribute(h,a);b.setAttribute(h,a)});return a},fontMetrics:function(a,h){a=h&&w.prototype.getStyle.call(h,"font-size");a=/px/.test(a)?r(a):/em/.test(a)?parseFloat(a)* |
(h?this.fontMetrics(null,h.parentNode).f:16):12;h=24>a?a+3:Math.round(1.2*a);return{h:h,b:Math.round(.8*h),f:a}},rotCorr:function(a,h,b){var r=a;h&&b&&(r=Math.max(r*Math.cos(h*f),4));return{x:-a/3*Math.sin(h*f),y:r}},label:function(h,r,e,l,n,f,y,g,K){var m=this,d=m.g("button"!==K&&"label"),q=d.text=m.text("",0,0,y).attr({zIndex:1}),C,x,z=0,p=3,R=0,E,u,I,F,N,G={},t,Q=/^url\((.*?)\)$/.test(l),J=Q,L,O,P,v;K&&d.addClass("highcharts-"+K);J=!0;L=function(){return C.strokeWidth()%2/2};O=function(){var a= |
q.element.style,h={};x=(void 0===E||void 0===u||N)&&k(q.textStr)&&q.getBBox();d.width=(E||x.width||0)+2*p+R;d.height=(u||x.height||0)+2*p;t=p+m.fontMetrics(a&&a.fontSize,q).b;J&&(C||(d.box=C=m.symbols[l]||Q?m.symbol(l):m.rect(),C.addClass(("button"===K?"":"highcharts-label-box")+(K?" highcharts-"+K+"-box":"")),C.add(d),a=L(),h.x=a,h.y=(g?-t:0)+a),h.width=Math.round(d.width),h.height=Math.round(d.height),C.attr(b(h,G)),G={})};P=function(){var a=R+p,h;h=g?0:t;k(E)&&x&&("center"===N||"right"===N)&&(a+= |
{center:.5,right:1}[N]*(E-x.width));if(a!==q.x||h!==q.y)q.attr("x",a),void 0!==h&&q.attr("y",h);q.x=a;q.y=h};v=function(a,h){C?C.attr(a,h):G[a]=h};d.onAdd=function(){q.add(d);d.attr({text:h||0===h?h:"",x:r,y:e});C&&k(n)&&d.attr({anchorX:n,anchorY:f})};d.widthSetter=function(h){E=a.isNumber(h)?h:null};d.heightSetter=function(a){u=a};d["text-alignSetter"]=function(a){N=a};d.paddingSetter=function(a){k(a)&&a!==p&&(p=d.padding=a,P())};d.paddingLeftSetter=function(a){k(a)&&a!==R&&(R=a,P())};d.alignSetter= |
function(a){a={left:0,center:.5,right:1}[a];a!==z&&(z=a,x&&d.attr({x:I}))};d.textSetter=function(a){void 0!==a&&q.textSetter(a);O();P()};d["stroke-widthSetter"]=function(a,h){a&&(J=!0);this["stroke-width"]=a;v(h,a)};d.rSetter=function(a,h){v(h,a)};d.anchorXSetter=function(a,h){n=d.anchorX=a;v(h,Math.round(a)-L()-I)};d.anchorYSetter=function(a,h){f=d.anchorY=a;v(h,a-F)};d.xSetter=function(a){d.x=a;z&&(a-=z*((E||x.width)+2*p));I=Math.round(a);d.attr("translateX",I)};d.ySetter=function(a){F=d.y=Math.round(a); |
d.attr("translateY",F)};var S=d.css;return b(d,{css:function(a){if(a){var h={};a=D(a);c(d.textProps,function(b){void 0!==a[b]&&(h[b]=a[b],delete a[b])});q.css(h)}return S.call(d,a)},getBBox:function(){return{width:x.width+2*p,height:x.height+2*p,x:x.x-p,y:x.y-p}},destroy:function(){M(d.element,"mouseenter");M(d.element,"mouseleave");q&&(q=q.destroy());C&&(C=C.destroy());w.prototype.destroy.call(d);d=m=O=P=v=null}})}});a.Renderer=B})(H);(function(a){var w=a.attr,B=a.createElement,A=a.css,v=a.defined, |
d=a.each,g=a.extend,m=a.isFirefox,t=a.isMS,p=a.isWebKit,k=a.pInt,f=a.SVGRenderer,q=a.win,u=a.wrap;g(a.SVGElement.prototype,{htmlCss:function(a){var b=this.element;if(b=a&&"SPAN"===b.tagName&&a.width)delete a.width,this.textWidth=b,this.updateTransform();a&&"ellipsis"===a.textOverflow&&(a.whiteSpace="nowrap",a.overflow="hidden");this.styles=g(this.styles,a);A(this.element,a);return this},htmlGetBBox:function(){var a=this.element;"text"===a.nodeName&&(a.style.position="absolute");return{x:a.offsetLeft, |
y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,b=this.element,l=this.x||0,e=this.y||0,n=this.textAlign||"left",f={left:0,center:.5,right:1}[n],g=this.styles;A(b,{marginLeft:this.translateX||0,marginTop:this.translateY||0});this.inverted&&d(b.childNodes,function(e){a.invertChild(e,b)});if("SPAN"===b.tagName){var q=this.rotation,m=k(this.textWidth),x=g&&g.whiteSpace,u=[q,n,b.innerHTML,this.textWidth,this.textAlign].join(); |
u!==this.cTT&&(g=a.fontMetrics(b.style.fontSize).b,v(q)&&this.setSpanRotation(q,f,g),A(b,{width:"",whiteSpace:x||"nowrap"}),b.offsetWidth>m&&/[ \-]/.test(b.textContent||b.innerText)&&A(b,{width:m+"px",display:"block",whiteSpace:x||"normal"}),this.getSpanCorrection(b.offsetWidth,g,f,q,n));A(b,{left:l+(this.xCorr||0)+"px",top:e+(this.yCorr||0)+"px"});p&&(g=b.offsetHeight);this.cTT=u}}else this.alignOnAdd=!0},setSpanRotation:function(a,b,l){var e={},c=t?"-ms-transform":p?"-webkit-transform":m?"MozTransform": |
q.opera?"-o-transform":"";e[c]=e.transform="rotate("+a+"deg)";e[c+(m?"Origin":"-origin")]=e.transformOrigin=100*b+"% "+l+"px";A(this.element,e)},getSpanCorrection:function(a,b,l){this.xCorr=-a*l;this.yCorr=-b}});g(f.prototype,{html:function(a,b,l){var e=this.createElement("span"),c=e.element,k=e.renderer,f=k.isSVG,q=function(a,b){d(["opacity","visibility"],function(e){u(a,e+"Setter",function(a,e,c,l){a.call(this,e,c,l);b[c]=e})})};e.textSetter=function(a){a!==c.innerHTML&&delete this.bBox;c.innerHTML= |
this.textStr=a;e.htmlUpdateTransform()};f&&q(e,e.element.style);e.xSetter=e.ySetter=e.alignSetter=e.rotationSetter=function(a,b){"align"===b&&(b="textAlign");e[b]=a;e.htmlUpdateTransform()};e.attr({text:a,x:Math.round(b),y:Math.round(l)}).css({position:"absolute"});c.style.whiteSpace="nowrap";e.css=e.htmlCss;f&&(e.add=function(a){var b,l=k.box.parentNode,n=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)n.push(a),a=a.parentGroup;d(n.reverse(),function(a){var c,k=w(a.element,"class");k&&(k={className:k}); |
b=a.div=a.div||B("div",k,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},b||l);c=b.style;g(a,{classSetter:function(a){this.element.setAttribute("class",a);b.className=a},on:function(){n[0].div&&e.on.apply({element:n[0].div},arguments);return a},translateXSetter:function(h,b){c.left=h+"px";a[b]=h;a.doTransform=!0},translateYSetter:function(h,b){c.top=h+"px";a[b]=h;a.doTransform=!0}});q(a, |
c)})}}else b=l;b.appendChild(c);e.added=!0;e.alignOnAdd&&e.htmlUpdateTransform();return e});return e}})})(H);(function(a){var w=a.correctFloat,B=a.defined,A=a.destroyObjectProperties,v=a.isNumber,d=a.pick,g=a.deg2rad;a.Tick=function(a,d,g,k){this.axis=a;this.pos=d;this.type=g||"";this.isNewLabel=this.isNew=!0;g||k||this.addLabel()};a.Tick.prototype={addLabel:function(){var a=this.axis,g=a.options,p=a.chart,k=a.categories,f=a.names,q=this.pos,u=g.labels,c=a.tickPositions,b=q===c[0],l=q===c[c.length- |
1],f=k?d(k[q],f[q],q):q,k=this.label,c=c.info,e;a.isDatetimeAxis&&c&&(e=g.dateTimeLabelFormats[c.higherRanks[q]||c.unitName]);this.isFirst=b;this.isLast=l;g=a.labelFormatter.call({axis:a,chart:p,isFirst:b,isLast:l,dateTimeLabelFormat:e,value:a.isLog?w(a.lin2log(f)):f,pos:q});B(k)?k&&k.attr({text:g}):(this.labelLength=(this.label=k=B(g)&&u.enabled?p.renderer.text(g,0,0,u.useHTML).add(a.labelGroup):null)&&k.getBBox().width,this.rotation=0)},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz? |
"height":"width"]:0},handleOverflow:function(a){var m=this.axis,p=a.x,k=m.chart.chartWidth,f=m.chart.spacing,q=d(m.labelLeft,Math.min(m.pos,f[3])),f=d(m.labelRight,Math.max(m.pos+m.len,k-f[1])),u=this.label,c=this.rotation,b={left:0,center:.5,right:1}[m.labelAlign],l=u.getBBox().width,e=m.getSlotWidth(),n=e,F=1,G,E={};if(c)0>c&&p-b*l<q?G=Math.round(p/Math.cos(c*g)-q):0<c&&p+b*l>f&&(G=Math.round((k-p)/Math.cos(c*g)));else if(k=p+(1-b)*l,p-b*l<q?n=a.x+n*(1-b)-q:k>f&&(n=f-a.x+n*b,F=-1),n=Math.min(e, |
n),n<e&&"center"===m.labelAlign&&(a.x+=F*(e-n-b*(e-Math.min(l,n)))),l>n||m.autoRotation&&(u.styles||{}).width)G=n;G&&(E.width=G,(m.options.labels.style||{}).textOverflow||(E.textOverflow="ellipsis"),u.css(E))},getPosition:function(a,g,d,k){var f=this.axis,q=f.chart,m=k&&q.oldChartHeight||q.chartHeight;return{x:a?f.translate(g+d,null,null,k)+f.transB:f.left+f.offset+(f.opposite?(k&&q.oldChartWidth||q.chartWidth)-f.right-f.left:0),y:a?m-f.bottom+f.offset-(f.opposite?f.height:0):m-f.translate(g+d,null, |
null,k)-f.transB}},getLabelPosition:function(a,d,p,k,f,q,u,c){var b=this.axis,l=b.transA,e=b.reversed,n=b.staggerLines,m=b.tickRotCorr||{x:0,y:0},G=f.y;B(G)||(G=0===b.side?p.rotation?-8:-p.getBBox().height:2===b.side?m.y+8:Math.cos(p.rotation*g)*(m.y-p.getBBox(!1,0).height/2));a=a+f.x+m.x-(q&&k?q*l*(e?-1:1):0);d=d+G-(q&&!k?q*l*(e?1:-1):0);n&&(p=u/(c||1)%n,b.opposite&&(p=n-p-1),d+=b.labelOffset/n*p);return{x:a,y:Math.round(d)}},getMarkPath:function(a,g,d,k,f,q){return q.crispLine(["M",a,g,"L",a+(f? |
0:-d),g+(f?d:0)],k)},renderGridLine:function(a,g,d){var k=this.axis,f=this.gridLine,q={},m=this.pos,c=this.type,b=k.tickmarkOffset,l=k.chart.renderer;f||(c||(q.zIndex=1),a&&(q.opacity=0),this.gridLine=f=l.path().attr(q).addClass("highcharts-"+(c?c+"-":"")+"grid-line").add(k.gridGroup));if(!a&&f&&(a=k.getPlotLinePath(m+b,f.strokeWidth()*d,a,!0)))f[this.isNew?"attr":"animate"]({d:a,opacity:g})},renderMark:function(a,g,d){var k=this.axis,f=k.chart.renderer,q=this.type,m=k.tickSize(q?q+"Tick":"tick"), |
c=this.mark,b=!c,l=a.x;a=a.y;m&&(k.opposite&&(m[0]=-m[0]),b&&(this.mark=c=f.path().addClass("highcharts-"+(q?q+"-":"")+"tick").add(k.axisGroup)),c[b?"attr":"animate"]({d:this.getMarkPath(l,a,m[0],c.strokeWidth()*d,k.horiz,f),opacity:g}))},renderLabel:function(a,g,p,k){var f=this.axis,q=f.horiz,m=f.options,c=this.label,b=m.labels,l=b.step,e=f.tickmarkOffset,n=!0,F=a.x;a=a.y;c&&v(F)&&(c.xy=a=this.getLabelPosition(F,a,c,q,b,e,k,l),this.isFirst&&!this.isLast&&!d(m.showFirstLabel,1)||this.isLast&&!this.isFirst&& |
!d(m.showLastLabel,1)?n=!1:!q||f.isRadial||b.step||b.rotation||g||0===p||this.handleOverflow(a),l&&k%l&&(n=!1),n&&v(a.y)?(a.opacity=p,c[this.isNewLabel?"attr":"animate"](a),this.isNewLabel=!1):(c.attr("y",-9999),this.isNewLabel=!0),this.isNew=!1)},render:function(a,g,p){var k=this.axis,f=k.horiz,q=this.getPosition(f,this.pos,k.tickmarkOffset,g),m=q.x,c=q.y,k=f&&m===k.pos+k.len||!f&&c===k.pos?-1:1;p=d(p,1);this.isActive=!0;this.renderGridLine(g,p,k);this.renderMark(q,p,k);this.renderLabel(q,g,p,a)}, |
destroy:function(){A(this,this.axis)}}})(H);var T=function(a){var w=a.addEvent,B=a.animObject,A=a.arrayMax,v=a.arrayMin,d=a.correctFloat,g=a.defaultOptions,m=a.defined,t=a.deg2rad,p=a.destroyObjectProperties,k=a.each,f=a.extend,q=a.fireEvent,u=a.format,c=a.getMagnitude,b=a.grep,l=a.inArray,e=a.isArray,n=a.isNumber,F=a.isString,G=a.merge,E=a.normalizeTickInterval,I=a.objectEach,x=a.pick,L=a.removeEvent,y=a.splat,D=a.syncTimeout,C=a.Tick,J=function(){this.init.apply(this,arguments)};a.extend(J.prototype, |
{defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,labels:{enabled:!0,x:0},minPadding:.01,maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle"},type:"linear"},defaultYAxisOptions:{endOnTick:!0,tickPixelInterval:72,showLastLabel:!0, |
labels:{x:-8},maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{allowOverlap:!1,enabled:!1,formatter:function(){return a.numberFormat(this.total,-1)}}},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},init:function(a,b){var h=b.isX,r= |
this;r.chart=a;r.horiz=a.inverted&&!r.isZAxis?!h:h;r.isXAxis=h;r.coll=r.coll||(h?"xAxis":"yAxis");r.opposite=b.opposite;r.side=b.side||(r.horiz?r.opposite?0:2:r.opposite?1:3);r.setOptions(b);var e=this.options,c=e.type;r.labelFormatter=e.labels.formatter||r.defaultLabelFormatter;r.userOptions=b;r.minPixelPadding=0;r.reversed=e.reversed;r.visible=!1!==e.visible;r.zoomEnabled=!1!==e.zoomEnabled;r.hasNames="category"===c||!0===e.categories;r.categories=e.categories||r.hasNames;r.names=r.names||[];r.plotLinesAndBandsGroups= |
{};r.isLog="logarithmic"===c;r.isDatetimeAxis="datetime"===c;r.positiveValuesOnly=r.isLog&&!r.allowNegativeLog;r.isLinked=m(e.linkedTo);r.ticks={};r.labelEdge=[];r.minorTicks={};r.plotLinesAndBands=[];r.alternateBands={};r.len=0;r.minRange=r.userMinRange=e.minRange||e.maxZoom;r.range=e.range;r.offset=e.offset||0;r.stacks={};r.oldStacks={};r.stacksTouched=0;r.max=null;r.min=null;r.crosshair=x(e.crosshair,y(a.options.tooltip.crosshairs)[h?0:1],!1);b=r.options.events;-1===l(r,a.axes)&&(h?a.axes.splice(a.xAxis.length, |
0,r):a.axes.push(r),a[r.coll].push(r));r.series=r.series||[];a.inverted&&!r.isZAxis&&h&&void 0===r.reversed&&(r.reversed=!0);I(b,function(a,h){w(r,h,a)});r.lin2log=e.linearToLogConverter||r.lin2log;r.isLog&&(r.val2lin=r.log2lin,r.lin2val=r.lin2log)},setOptions:function(a){this.options=G(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],G(g[this.coll],a))}, |
defaultLabelFormatter:function(){var h=this.axis,b=this.value,e=h.categories,c=this.dateTimeLabelFormat,l=g.lang,n=l.numericSymbols,l=l.numericSymbolMagnitude||1E3,k=n&&n.length,f,d=h.options.labels.format,h=h.isLog?Math.abs(b):h.tickInterval;if(d)f=u(d,this);else if(e)f=b;else if(c)f=a.dateFormat(c,b);else if(k&&1E3<=h)for(;k--&&void 0===f;)e=Math.pow(l,k+1),h>=e&&0===10*b%e&&null!==n[k]&&0!==b&&(f=a.numberFormat(b/e,-1)+n[k]);void 0===f&&(f=1E4<=Math.abs(b)?a.numberFormat(b,-1):a.numberFormat(b, |
-1,void 0,""));return f},getSeriesExtremes:function(){var a=this,r=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();k(a.series,function(h){if(h.visible||!r.options.chart.ignoreHiddenSeries){var e=h.options,c=e.threshold,l;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=c&&(c=null);if(a.isXAxis)e=h.xData,e.length&&(h=v(e),n(h)||h instanceof Date||(e=b(e,function(a){return n(a)}),h=v(e)),a.dataMin=Math.min(x(a.dataMin,e[0]), |
h),a.dataMax=Math.max(x(a.dataMax,e[0]),A(e)));else if(h.getExtremes(),l=h.dataMax,h=h.dataMin,m(h)&&m(l)&&(a.dataMin=Math.min(x(a.dataMin,h),h),a.dataMax=Math.max(x(a.dataMax,l),l)),m(c)&&(a.threshold=c),!e.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})},translate:function(a,b,e,c,l,k){var h=this.linkedParent||this,r=1,f=0,g=c?h.oldTransA:h.transA;c=c?h.oldMin:h.min;var d=h.minPixelPadding;l=(h.isOrdinal||h.isBroken||h.isLog&&l)&&h.lin2val;g||(g=h.transA);e&&(r*=-1,f=h.len);h.reversed&& |
(r*=-1,f-=r*(h.sector||h.len));b?(a=(a*r+f-d)/g+c,l&&(a=h.lin2val(a))):(l&&(a=h.val2lin(a)),a=r*(a-c)*g+f+r*d+(n(k)?g*k:0));return a},toPixels:function(a,b){return this.translate(a,!1,!this.horiz,null,!0)+(b?0:this.pos)},toValue:function(a,b){return this.translate(a-(b?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,b,e,c,l){var h=this.chart,r=this.left,k=this.top,f,g,d=e&&h.oldChartHeight||h.chartHeight,y=e&&h.oldChartWidth||h.chartWidth,q;f=this.transB;var m=function(a,h,b){if(a< |
h||a>b)c?a=Math.min(Math.max(h,a),b):q=!0;return a};l=x(l,this.translate(a,null,null,e));a=e=Math.round(l+f);f=g=Math.round(d-l-f);n(l)?this.horiz?(f=k,g=d-this.bottom,a=e=m(a,r,r+this.width)):(a=r,e=y-this.right,f=g=m(f,k,k+this.height)):q=!0;return q&&!c?null:h.renderer.crispLine(["M",a,f,"L",e,g],b||1)},getLinearTickPositions:function(a,b,e){var h,r=d(Math.floor(b/a)*a);e=d(Math.ceil(e/a)*a);var c=[];if(this.single)return[b];for(b=r;b<=e;){c.push(b);b=d(b+a);if(b===h)break;h=b}return c},getMinorTickPositions:function(){var a= |
this,b=a.options,e=a.tickPositions,c=a.minorTickInterval,l=[],n=a.pointRangePadding||0,f=a.min-n,n=a.max+n,g=n-f;if(g&&g/c<a.len/3)if(a.isLog)k(this.paddedTicks,function(h,b,r){b&&l.push.apply(l,a.getLogTickPositions(c,r[b-1],r[b],!0))});else if(a.isDatetimeAxis&&"auto"===b.minorTickInterval)l=l.concat(a.getTimeTicks(a.normalizeTimeTickInterval(c),f,n,b.startOfWeek));else for(b=f+(e[0]-f)%c;b<=n&&b!==l[0];b+=c)l.push(b);0!==l.length&&a.trimTicks(l);return l},adjustForMinRange:function(){var a=this.options, |
b=this.min,e=this.max,c,l,n,f,g,d,y,q;this.isXAxis&&void 0===this.minRange&&!this.isLog&&(m(a.min)||m(a.max)?this.minRange=null:(k(this.series,function(a){d=a.xData;for(f=y=a.xIncrement?1:d.length-1;0<f;f--)if(g=d[f]-d[f-1],void 0===n||g<n)n=g}),this.minRange=Math.min(5*n,this.dataMax-this.dataMin)));e-b<this.minRange&&(l=this.dataMax-this.dataMin>=this.minRange,q=this.minRange,c=(q-e+b)/2,c=[b-c,x(a.min,b-c)],l&&(c[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),b=A(c),e=[b+q,x(a.max,b+q)], |
l&&(e[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),e=v(e),e-b<q&&(c[0]=e-q,c[1]=x(a.min,e-q),b=A(c)));this.min=b;this.max=e},getClosest:function(){var a;this.categories?a=1:k(this.series,function(h){var b=h.closestPointRange,r=h.visible||!h.chart.options.chart.ignoreHiddenSeries;!h.noSharedTooltip&&m(b)&&r&&(a=m(a)?Math.min(a,b):b)});return a},nameToX:function(a){var h=e(this.categories),b=h?this.categories:this.names,c=a.options.x,n;a.series.requireSorting=!1;m(c)||(c=!1===this.options.uniqueNames? |
a.series.autoIncrement():l(a.name,b));-1===c?h||(n=b.length):n=c;void 0!==n&&(this.names[n]=a.name);return n},updateNames:function(){var a=this;0<this.names.length&&(this.names.length=0,this.minRange=this.userMinRange,k(this.series||[],function(h){h.xIncrement=null;if(!h.points||h.isDirtyData)h.processData(),h.generatePoints();k(h.points,function(b,r){var e;b.options&&(e=a.nameToX(b),void 0!==e&&e!==b.x&&(b.x=e,h.xData[r]=e))})}))},setAxisTranslation:function(a){var h=this,b=h.max-h.min,e=h.axisPointRange|| |
0,c,l=0,n=0,f=h.linkedParent,g=!!h.categories,d=h.transA,y=h.isXAxis;if(y||g||e)c=h.getClosest(),f?(l=f.minPointOffset,n=f.pointRangePadding):k(h.series,function(a){var b=g?1:y?x(a.options.pointRange,c,0):h.axisPointRange||0;a=a.options.pointPlacement;e=Math.max(e,b);h.single||(l=Math.max(l,F(a)?0:b/2),n=Math.max(n,"on"===a?0:b))}),f=h.ordinalSlope&&c?h.ordinalSlope/c:1,h.minPointOffset=l*=f,h.pointRangePadding=n*=f,h.pointRange=Math.min(e,b),y&&(h.closestPointRange=c);a&&(h.oldTransA=d);h.translationSlope= |
h.transA=d=h.options.staticScale||h.len/(b+n||1);h.transB=h.horiz?h.left:h.bottom;h.minPixelPadding=d*l},minFromRange:function(){return this.max-this.range},setTickInterval:function(h){var b=this,e=b.chart,l=b.options,f=b.isLog,g=b.log2lin,y=b.isDatetimeAxis,C=b.isXAxis,D=b.isLinked,z=l.maxPadding,p=l.minPadding,u=l.tickInterval,I=l.tickPixelInterval,F=b.categories,G=b.threshold,J=b.softThreshold,L,t,v,w;y||F||D||this.getTickAmount();v=x(b.userMin,l.min);w=x(b.userMax,l.max);D?(b.linkedParent=e[b.coll][l.linkedTo], |
e=b.linkedParent.getExtremes(),b.min=x(e.min,e.dataMin),b.max=x(e.max,e.dataMax),l.type!==b.linkedParent.options.type&&a.error(11,1)):(!J&&m(G)&&(b.dataMin>=G?(L=G,p=0):b.dataMax<=G&&(t=G,z=0)),b.min=x(v,L,b.dataMin),b.max=x(w,t,b.dataMax));f&&(b.positiveValuesOnly&&!h&&0>=Math.min(b.min,x(b.dataMin,b.min))&&a.error(10,1),b.min=d(g(b.min),15),b.max=d(g(b.max),15));b.range&&m(b.max)&&(b.userMin=b.min=v=Math.max(b.dataMin,b.minFromRange()),b.userMax=w=b.max,b.range=null);q(b,"foundExtremes");b.beforePadding&& |
b.beforePadding();b.adjustForMinRange();!(F||b.axisPointRange||b.usePercentage||D)&&m(b.min)&&m(b.max)&&(g=b.max-b.min)&&(!m(v)&&p&&(b.min-=g*p),!m(w)&&z&&(b.max+=g*z));n(l.softMin)&&(b.min=Math.min(b.min,l.softMin));n(l.softMax)&&(b.max=Math.max(b.max,l.softMax));n(l.floor)&&(b.min=Math.max(b.min,l.floor));n(l.ceiling)&&(b.max=Math.min(b.max,l.ceiling));J&&m(b.dataMin)&&(G=G||0,!m(v)&&b.min<G&&b.dataMin>=G?b.min=G:!m(w)&&b.max>G&&b.dataMax<=G&&(b.max=G));b.tickInterval=b.min===b.max||void 0===b.min|| |
void 0===b.max?1:D&&!u&&I===b.linkedParent.options.tickPixelInterval?u=b.linkedParent.tickInterval:x(u,this.tickAmount?(b.max-b.min)/Math.max(this.tickAmount-1,1):void 0,F?1:(b.max-b.min)*I/Math.max(b.len,I));C&&!h&&k(b.series,function(a){a.processData(b.min!==b.oldMin||b.max!==b.oldMax)});b.setAxisTranslation(!0);b.beforeSetTickPositions&&b.beforeSetTickPositions();b.postProcessTickInterval&&(b.tickInterval=b.postProcessTickInterval(b.tickInterval));b.pointRange&&!u&&(b.tickInterval=Math.max(b.pointRange, |
b.tickInterval));h=x(l.minTickInterval,b.isDatetimeAxis&&b.closestPointRange);!u&&b.tickInterval<h&&(b.tickInterval=h);y||f||u||(b.tickInterval=E(b.tickInterval,null,c(b.tickInterval),x(l.allowDecimals,!(.5<b.tickInterval&&5>b.tickInterval&&1E3<b.max&&9999>b.max)),!!this.tickAmount));this.tickAmount||(b.tickInterval=b.unsquish());this.setTickPositions()},setTickPositions:function(){var a=this.options,b,e=a.tickPositions,c=a.tickPositioner,l=a.startOnTick,n=a.endOnTick;this.tickmarkOffset=this.categories&& |
"between"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===a.minorTickInterval&&this.tickInterval?this.tickInterval/5:a.minorTickInterval;this.single=this.min===this.max&&m(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==a.allowDecimals);this.tickPositions=b=e&&e.slice();!b&&(b=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,a.units),this.min,this.max,a.startOfWeek,this.ordinalPositions,this.closestPointRange, |
!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),b.length>this.len&&(b=[b[0],b.pop()]),this.tickPositions=b,c&&(c=c.apply(this,[this.min,this.max])))&&(this.tickPositions=b=c);this.paddedTicks=b.slice(0);this.trimTicks(b,l,n);this.isLinked||(this.single&&2>b.length&&(this.min-=.5,this.max+=.5),e||c||this.adjustTickAmount())},trimTicks:function(a,b,e){var h=a[0],c=a[a.length-1],l=this.minPointOffset||0;if(!this.isLinked){if(b&& |
-Infinity!==h)this.min=h;else for(;this.min-l>a[0];)a.shift();if(e)this.max=c;else for(;this.max+l<a[a.length-1];)a.pop();0===a.length&&m(h)&&a.push((c+h)/2)}},alignToOthers:function(){var a={},b,e=this.options;!1===this.chart.options.chart.alignTicks||!1===e.alignTicks||this.isLog||k(this.chart[this.coll],function(h){var e=h.options,e=[h.horiz?e.left:e.top,e.width,e.height,e.pane].join();h.series.length&&(a[e]?b=!0:a[e]=1)});return b},getTickAmount:function(){var a=this.options,b=a.tickAmount,e= |
a.tickPixelInterval;!m(a.tickInterval)&&this.len<e&&!this.isRadial&&!this.isLog&&a.startOnTick&&a.endOnTick&&(b=2);!b&&this.alignToOthers()&&(b=Math.ceil(this.len/e)+1);4>b&&(this.finalTickAmt=b,b=5);this.tickAmount=b},adjustTickAmount:function(){var a=this.tickInterval,b=this.tickPositions,e=this.tickAmount,c=this.finalTickAmt,l=b&&b.length;if(l<e){for(;b.length<e;)b.push(d(b[b.length-1]+a));this.transA*=(l-1)/(e-1);this.max=b[b.length-1]}else l>e&&(this.tickInterval*=2,this.setTickPositions()); |
if(m(c)){for(a=e=b.length;a--;)(3===c&&1===a%2||2>=c&&0<a&&a<e-1)&&b.splice(a,1);this.finalTickAmt=void 0}},setScale:function(){var a,b;this.oldMin=this.min;this.oldMax=this.max;this.oldAxisLength=this.len;this.setAxisSize();b=this.len!==this.oldAxisLength;k(this.series,function(b){if(b.isDirtyData||b.isDirty||b.xAxis.isDirty)a=!0});b||a||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax||this.alignToOthers()?(this.resetStacks&&this.resetStacks(),this.forceRedraw= |
!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=b||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks()},setExtremes:function(a,b,e,c,l){var h=this,n=h.chart;e=x(e,!0);k(h.series,function(a){delete a.kdTree});l=f(l,{min:a,max:b});q(h,"setExtremes",l,function(){h.userMin=a;h.userMax=b;h.eventArgs=l;e&&n.redraw(c)})},zoom:function(a,b){var h=this.dataMin,e=this.dataMax,c=this.options, |
l=Math.min(h,x(c.min,h)),c=Math.max(e,x(c.max,e));if(a!==this.min||b!==this.max)this.allowZoomOutside||(m(h)&&(a<l&&(a=l),a>c&&(a=c)),m(e)&&(b<l&&(b=l),b>c&&(b=c))),this.displayBtn=void 0!==a||void 0!==b,this.setExtremes(a,b,!1,void 0,{trigger:"zoom"});return!0},setAxisSize:function(){var b=this.chart,e=this.options,c=e.offsets||[0,0,0,0],l=this.horiz,n=this.width=Math.round(a.relativeLength(x(e.width,b.plotWidth-c[3]+c[1]),b.plotWidth)),f=this.height=Math.round(a.relativeLength(x(e.height,b.plotHeight- |
c[0]+c[2]),b.plotHeight)),k=this.top=Math.round(a.relativeLength(x(e.top,b.plotTop+c[0]),b.plotHeight,b.plotTop)),e=this.left=Math.round(a.relativeLength(x(e.left,b.plotLeft+c[3]),b.plotWidth,b.plotLeft));this.bottom=b.chartHeight-f-k;this.right=b.chartWidth-n-e;this.len=Math.max(l?n:f,0);this.pos=l?e:k},getExtremes:function(){var a=this.isLog,b=this.lin2log;return{min:a?d(b(this.min)):this.min,max:a?d(b(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}}, |
getThreshold:function(a){var b=this.isLog,h=this.lin2log,e=b?h(this.min):this.min,b=b?h(this.max):this.max;null===a?a=e:e>a?a=e:b<a&&(a=b);return this.translate(a,0,1,0,1)},autoLabelAlign:function(a){a=(x(a,0)-90*this.side+720)%360;return 15<a&&165>a?"right":195<a&&345>a?"left":"center"},tickSize:function(a){var b=this.options,h=b[a+"Length"],e=x(b[a+"Width"],"tick"===a&&this.isXAxis?1:0);if(e&&h)return"inside"===b[a+"Position"]&&(h=-h),[h,e]},labelMetrics:function(){var a=this.tickPositions&&this.tickPositions[0]|| |
0;return this.chart.renderer.fontMetrics(this.options.labels.style&&this.options.labels.style.fontSize,this.ticks[a]&&this.ticks[a].label)},unsquish:function(){var a=this.options.labels,b=this.horiz,e=this.tickInterval,c=e,l=this.len/(((this.categories?1:0)+this.max-this.min)/e),n,f=a.rotation,g=this.labelMetrics(),d,y=Number.MAX_VALUE,q,C=function(a){a/=l||1;a=1<a?Math.ceil(a):1;return a*e};b?(q=!a.staggerLines&&!a.step&&(m(f)?[f]:l<x(a.autoRotationLimit,80)&&a.autoRotation))&&k(q,function(a){var b; |
if(a===f||a&&-90<=a&&90>=a)d=C(Math.abs(g.h/Math.sin(t*a))),b=d+Math.abs(a/360),b<y&&(y=b,n=a,c=d)}):a.step||(c=C(g.h));this.autoRotation=q;this.labelRotation=x(n,f);return c},getSlotWidth:function(){var a=this.chart,b=this.horiz,e=this.options.labels,c=Math.max(this.tickPositions.length-(this.categories?0:1),1),l=a.margin[3];return b&&2>(e.step||0)&&!e.rotation&&(this.staggerLines||1)*this.len/c||!b&&(l&&l-a.spacing[3]||.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,b=a.renderer,e= |
this.tickPositions,c=this.ticks,l=this.options.labels,n=this.horiz,f=this.getSlotWidth(),g=Math.max(1,Math.round(f-2*(l.padding||5))),d={},y=this.labelMetrics(),q=l.style&&l.style.textOverflow,C,m=0,D,x;F(l.rotation)||(d.rotation=l.rotation||0);k(e,function(a){(a=c[a])&&a.labelLength>m&&(m=a.labelLength)});this.maxLabelLength=m;if(this.autoRotation)m>g&&m>y.h?d.rotation=this.labelRotation:this.labelRotation=0;else if(f&&(C={width:g+"px"},!q))for(C.textOverflow="clip",D=e.length;!n&&D--;)if(x=e[D], |
g=c[x].label)g.styles&&"ellipsis"===g.styles.textOverflow?g.css({textOverflow:"clip"}):c[x].labelLength>f&&g.css({width:f+"px"}),g.getBBox().height>this.len/e.length-(y.h-y.f)&&(g.specCss={textOverflow:"ellipsis"});d.rotation&&(C={width:(m>.5*a.chartHeight?.33*a.chartHeight:a.chartHeight)+"px"},q||(C.textOverflow="ellipsis"));if(this.labelAlign=l.align||this.autoLabelAlign(this.labelRotation))d.align=this.labelAlign;k(e,function(a){var b=(a=c[a])&&a.label;b&&(b.attr(d),C&&b.css(G(C,b.specCss)),delete b.specCss, |
a.rotation=d.rotation)});this.tickRotCorr=b.rotCorr(y.b,this.labelRotation||0,0!==this.side)},hasData:function(){return this.hasVisibleSeries||m(this.min)&&m(this.max)&&!!this.tickPositions},addTitle:function(a){var b=this.chart.renderer,h=this.horiz,e=this.opposite,c=this.options.title,l;this.axisTitle||((l=c.textAlign)||(l=(h?{low:"left",middle:"center",high:"right"}:{low:e?"right":"left",middle:"center",high:e?"left":"right"})[c.align]),this.axisTitle=b.text(c.text,0,0,c.useHTML).attr({zIndex:7, |
rotation:c.rotation||0,align:l}).addClass("highcharts-axis-title").add(this.axisGroup),this.axisTitle.isNew=!0);this.axisTitle.css({width:this.len});this.axisTitle[a?"show":"hide"](!0)},generateTick:function(a){var b=this.ticks;b[a]?b[a].addLabel():b[a]=new C(this,a)},getOffset:function(){var a=this,b=a.chart,e=b.renderer,c=a.options,l=a.tickPositions,n=a.ticks,f=a.horiz,g=a.side,d=b.inverted&&!a.isZAxis?[1,0,3,2][g]:g,y,q,C=0,D,p=0,E=c.title,u=c.labels,F=0,G=b.axisOffset,b=b.clipOffset,J=[-1,1,1, |
-1][g],L=c.className,t=a.axisParent,v=this.tickSize("tick");y=a.hasData();a.showAxis=q=y||x(c.showEmpty,!0);a.staggerLines=a.horiz&&u.staggerLines;a.axisGroup||(a.gridGroup=e.g("grid").attr({zIndex:c.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(L||"")).add(t),a.axisGroup=e.g("axis").attr({zIndex:c.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(L||"")).add(t),a.labelGroup=e.g("axis-labels").attr({zIndex:u.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+ |
"-labels "+(L||"")).add(t));y||a.isLinked?(k(l,function(b,e){a.generateTick(b,e)}),a.renderUnsquish(),!1===u.reserveSpace||0!==g&&2!==g&&{1:"left",3:"right"}[g]!==a.labelAlign&&"center"!==a.labelAlign||k(l,function(a){F=Math.max(n[a].getLabelSize(),F)}),a.staggerLines&&(F*=a.staggerLines,a.labelOffset=F*(a.opposite?-1:1))):I(n,function(a,b){a.destroy();delete n[b]});E&&E.text&&!1!==E.enabled&&(a.addTitle(q),q&&!1!==E.reserveSpace&&(a.titleOffset=C=a.axisTitle.getBBox()[f?"height":"width"],D=E.offset, |
p=m(D)?0:x(E.margin,f?5:10)));a.renderLine();a.offset=J*x(c.offset,G[g]);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};e=0===g?-a.labelMetrics().h:2===g?a.tickRotCorr.y:0;p=Math.abs(F)+p;F&&(p=p-e+J*(f?x(u.y,a.tickRotCorr.y+8*J):u.x));a.axisTitleMargin=x(D,p);G[g]=Math.max(G[g],a.axisTitleMargin+C+J*a.offset,p,y&&l.length&&v?v[0]+J*a.offset:0);l=2*Math.floor(a.axisLine.strokeWidth()/2);0<c.offset&&(l-=2*c.offset);b[d]=Math.max(b[d]||l,l)},getLinePath:function(a){var b=this.chart,e=this.opposite,h=this.offset, |
c=this.horiz,l=this.left+(e?this.width:0)+h,h=b.chartHeight-this.bottom-(e?this.height:0)+h;e&&(a*=-1);return b.renderer.crispLine(["M",c?this.left:l,c?h:this.top,"L",c?b.chartWidth-this.right:l,c?h:b.chartHeight-this.bottom],a)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup))},getTitlePosition:function(){var a=this.horiz,b=this.left,e=this.top,c=this.len,l=this.options.title,n=a?b:e,f=this.opposite,k=this.offset, |
g=l.x||0,d=l.y||0,y=this.axisTitle,q=this.chart.renderer.fontMetrics(l.style&&l.style.fontSize,y),y=Math.max(y.getBBox(null,0).height-q.h-1,0),c={low:n+(a?0:c),middle:n+c/2,high:n+(a?c:0)}[l.align],b=(a?e+this.height:b)+(a?1:-1)*(f?-1:1)*this.axisTitleMargin+[-y,y,q.f,-y][this.side];return{x:a?c+g:b+(f?this.width:0)+k+g,y:a?b+d-(f?this.height:0)+k:c+d}},renderMinorTick:function(a){var b=this.chart.hasRendered&&n(this.oldMin),e=this.minorTicks;e[a]||(e[a]=new C(this,a,"minor"));b&&e[a].isNew&&e[a].render(null, |
!0);e[a].render(null,!1,1)},renderTick:function(a,b){var e=this.isLinked,h=this.ticks,c=this.chart.hasRendered&&n(this.oldMin);if(!e||a>=this.min&&a<=this.max)h[a]||(h[a]=new C(this,a)),c&&h[a].isNew&&h[a].render(b,!0,.1),h[a].render(b)},render:function(){var b=this,e=b.chart,c=b.options,l=b.isLog,f=b.lin2log,g=b.isLinked,d=b.tickPositions,y=b.axisTitle,q=b.ticks,m=b.minorTicks,x=b.alternateBands,p=c.stackLabels,E=c.alternateGridColor,u=b.tickmarkOffset,F=b.axisLine,G=b.showAxis,J=B(e.renderer.globalAnimation), |
L,t;b.labelEdge.length=0;b.overlap=!1;k([q,m,x],function(a){I(a,function(a){a.isActive=!1})});if(b.hasData()||g)b.minorTickInterval&&!b.categories&&k(b.getMinorTickPositions(),function(a){b.renderMinorTick(a)}),d.length&&(k(d,function(a,e){b.renderTick(a,e)}),u&&(0===b.min||b.single)&&(q[-1]||(q[-1]=new C(b,-1,null,!0)),q[-1].render(-1))),E&&k(d,function(c,h){t=void 0!==d[h+1]?d[h+1]+u:b.max-u;0===h%2&&c<b.max&&t<=b.max+(e.polar?-u:u)&&(x[c]||(x[c]=new a.PlotLineOrBand(b)),L=c+u,x[c].options={from:l? |
f(L):L,to:l?f(t):t,color:E},x[c].render(),x[c].isActive=!0)}),b._addedPlotLB||(k((c.plotLines||[]).concat(c.plotBands||[]),function(a){b.addPlotBandOrLine(a)}),b._addedPlotLB=!0);k([q,m,x],function(a){var b,c=[],h=J.duration;I(a,function(a,b){a.isActive||(a.render(b,!1,0),a.isActive=!1,c.push(b))});D(function(){for(b=c.length;b--;)a[c[b]]&&!a[c[b]].isActive&&(a[c[b]].destroy(),delete a[c[b]])},a!==x&&e.hasRendered&&h?h:0)});F&&(F[F.isPlaced?"animate":"attr"]({d:this.getLinePath(F.strokeWidth())}), |
F.isPlaced=!0,F[G?"show":"hide"](!0));y&&G&&(c=b.getTitlePosition(),n(c.y)?(y[y.isNew?"attr":"animate"](c),y.isNew=!1):(y.attr("y",-9999),y.isNew=!0));p&&p.enabled&&b.renderStackTotals();b.isDirty=!1},redraw:function(){this.visible&&(this.render(),k(this.plotLinesAndBands,function(a){a.render()}));k(this.series,function(a){a.isDirty=!0})},keepProps:"extKey hcEvents names series userMax userMin".split(" "),destroy:function(a){var b=this,e=b.stacks,c=b.plotLinesAndBands,h;a||L(b);I(e,function(a,b){p(a); |
e[b]=null});k([b.ticks,b.minorTicks,b.alternateBands],function(a){p(a)});if(c)for(a=c.length;a--;)c[a].destroy();k("stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross".split(" "),function(a){b[a]&&(b[a]=b[a].destroy())});for(h in b.plotLinesAndBandsGroups)b.plotLinesAndBandsGroups[h]=b.plotLinesAndBandsGroups[h].destroy();I(b,function(a,e){-1===l(e,b.keepProps)&&delete b[e]})},drawCrosshair:function(a,b){var e,c=this.crosshair,h=x(c.snap,!0),l,n=this.cross;a||(a=this.cross&&this.cross.e); |
this.crosshair&&!1!==(m(b)||!h)?(h?m(b)&&(l=this.isXAxis?b.plotX:this.len-b.plotY):l=a&&(this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos),m(l)&&(e=this.getPlotLinePath(b&&(this.isXAxis?b.x:x(b.stackY,b.y)),null,null,null,l)||null),m(e)?(b=this.categories&&!this.isRadial,n||(this.cross=n=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(b?"category ":"thin ")+c.className).attr({zIndex:x(c.zIndex,2)}).add()),n.show().attr({d:e}),b&&!c.width&&n.attr({"stroke-width":this.transA}), |
this.cross.e=a):this.hideCrosshair()):this.hideCrosshair()},hideCrosshair:function(){this.cross&&this.cross.hide()}});return a.Axis=J}(H);(function(a){var w=a.Axis,B=a.getMagnitude,A=a.map,v=a.normalizeTickInterval,d=a.pick;w.prototype.getLogTickPositions=function(a,m,t,p){var k=this.options,f=this.len,g=this.lin2log,u=this.log2lin,c=[];p||(this._minorAutoInterval=null);if(.5<=a)a=Math.round(a),c=this.getLinearTickPositions(a,m,t);else if(.08<=a)for(var f=Math.floor(m),b,l,e,n,F,k=.3<a?[1,2,4]:.15< |
a?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];f<t+1&&!F;f++)for(l=k.length,b=0;b<l&&!F;b++)e=u(g(f)*k[b]),e>m&&(!p||n<=t)&&void 0!==n&&c.push(n),n>t&&(F=!0),n=e;else m=g(m),t=g(t),a=k[p?"minorTickInterval":"tickInterval"],a=d("auto"===a?null:a,this._minorAutoInterval,k.tickPixelInterval/(p?5:1)*(t-m)/((p?f/this.tickPositions.length:f)||1)),a=v(a,null,B(a)),c=A(this.getLinearTickPositions(a,m,t),u),p||(this._minorAutoInterval=a/5);p||(this.tickInterval=a);return c};w.prototype.log2lin=function(a){return Math.log(a)/ |
Math.LN10};w.prototype.lin2log=function(a){return Math.pow(10,a)}})(H);(function(a,w){var B=a.arrayMax,A=a.arrayMin,v=a.defined,d=a.destroyObjectProperties,g=a.each,m=a.erase,t=a.merge,p=a.pick;a.PlotLineOrBand=function(a,f){this.axis=a;f&&(this.options=f,this.id=f.id)};a.PlotLineOrBand.prototype={render:function(){var k=this,f=k.axis,g=f.horiz,d=k.options,c=d.label,b=k.label,l=d.to,e=d.from,n=d.value,m=v(e)&&v(l),G=v(n),E=k.svgElem,I=!E,x=[],L=p(d.zIndex,0),y=d.events,x={"class":"highcharts-plot-"+ |
(m?"band ":"line ")+(d.className||"")},D={},C=f.chart.renderer,J=m?"bands":"lines",h;h=f.log2lin;f.isLog&&(e=h(e),l=h(l),n=h(n));D.zIndex=L;J+="-"+L;(h=f.plotLinesAndBandsGroups[J])||(f.plotLinesAndBandsGroups[J]=h=C.g("plot-"+J).attr(D).add());I&&(k.svgElem=E=C.path().attr(x).add(h));if(G)x=f.getPlotLinePath(n,E.strokeWidth());else if(m)x=f.getPlotBandPath(e,l,d);else return;I&&x&&x.length?(E.attr({d:x}),y&&a.objectEach(y,function(a,b){E.on(b,function(a){y[b].apply(k,[a])})})):E&&(x?(E.show(),E.animate({d:x})): |
(E.hide(),b&&(k.label=b=b.destroy())));c&&v(c.text)&&x&&x.length&&0<f.width&&0<f.height&&!x.flat?(c=t({align:g&&m&&"center",x:g?!m&&4:10,verticalAlign:!g&&m&&"middle",y:g?m?16:10:m?6:-4,rotation:g&&!m&&90},c),this.renderLabel(c,x,m,L)):b&&b.hide();return k},renderLabel:function(a,f,g,d){var c=this.label,b=this.axis.chart.renderer;c||(c={align:a.textAlign||a.align,rotation:a.rotation,"class":"highcharts-plot-"+(g?"band":"line")+"-label "+(a.className||"")},c.zIndex=d,this.label=c=b.text(a.text,0,0, |
a.useHTML).attr(c).add());d=[f[1],f[4],g?f[6]:f[1]];f=[f[2],f[5],g?f[7]:f[2]];g=A(d);b=A(f);c.align(a,!1,{x:g,y:b,width:B(d)-g,height:B(f)-b});c.show()},destroy:function(){m(this.axis.plotLinesAndBands,this);delete this.axis;d(this)}};a.extend(w.prototype,{getPlotBandPath:function(a,f){var k=this.getPlotLinePath(f,null,null,!0),g=this.getPlotLinePath(a,null,null,!0),c=this.horiz,b=1;a=a<this.min&&f<this.min||a>this.max&&f>this.max;g&&k?(a&&(g.flat=g.toString()===k.toString(),b=0),g.push(c&&k[4]=== |
g[4]?k[4]+b:k[4],c||k[5]!==g[5]?k[5]:k[5]+b,c&&k[1]===g[1]?k[1]+b:k[1],c||k[2]!==g[2]?k[2]:k[2]+b)):g=null;return g},addPlotBand:function(a){return this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){return this.addPlotBandOrLine(a,"plotLines")},addPlotBandOrLine:function(k,f){var g=(new a.PlotLineOrBand(this,k)).render(),d=this.userOptions;g&&(f&&(d[f]=d[f]||[],d[f].push(k)),this.plotLinesAndBands.push(g));return g},removePlotBandOrLine:function(a){for(var f=this.plotLinesAndBands,k=this.options, |
d=this.userOptions,c=f.length;c--;)f[c].id===a&&f[c].destroy();g([k.plotLines||[],d.plotLines||[],k.plotBands||[],d.plotBands||[]],function(b){for(c=b.length;c--;)b[c].id===a&&m(b,b[c])})},removePlotBand:function(a){this.removePlotBandOrLine(a)},removePlotLine:function(a){this.removePlotBandOrLine(a)}})})(H,T);(function(a){var w=a.dateFormat,B=a.each,A=a.extend,v=a.format,d=a.isNumber,g=a.map,m=a.merge,t=a.pick,p=a.splat,k=a.syncTimeout,f=a.timeUnits;a.Tooltip=function(){this.init.apply(this,arguments)}; |
a.Tooltip.prototype={init:function(a,f){this.chart=a;this.options=f;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=f.split&&!a.inverted;this.shared=f.shared||this.split},cleanSplit:function(a){B(this.chart.series,function(f){var c=f&&f.tt;c&&(!c.isActive||a?f.tt=c.destroy():c.isActive=!1)})},applyFilter:function(){var a=this.chart;a.renderer.definition({tagName:"filter",id:"drop-shadow-"+a.index,opacity:.5,children:[{tagName:"feGaussianBlur",in:"SourceAlpha",stdDeviation:1},{tagName:"feOffset", |
dx:1,dy:1},{tagName:"feComponentTransfer",children:[{tagName:"feFuncA",type:"linear",slope:.3}]},{tagName:"feMerge",children:[{tagName:"feMergeNode"},{tagName:"feMergeNode",in:"SourceGraphic"}]}]});a.renderer.definition({tagName:"style",textContent:".highcharts-tooltip-"+a.index+"{filter:url(#drop-shadow-"+a.index+")}"})},getLabel:function(){var a=this.chart.renderer,f=this.options;this.label||(this.label=this.split?a.g("tooltip"):a.label("",0,0,f.shape||"callout",null,null,f.useHTML,null,"tooltip").attr({padding:f.padding, |
r:f.borderRadius}),this.applyFilter(),this.label.addClass("highcharts-tooltip-"+this.chart.index),this.label.attr({zIndex:8}).add());return this.label},update:function(a){this.destroy();m(!0,this.chart.options.tooltip.userOptions,a);this.init(this.chart,m(!0,this.options,a))},destroy:function(){this.label&&(this.label=this.label.destroy());this.split&&this.tt&&(this.cleanSplit(this.chart,!0),this.tt=this.tt.destroy());clearTimeout(this.hideTimer);clearTimeout(this.tooltipTimeout)},move:function(a, |
f,c,b){var l=this,e=l.now,n=!1!==l.options.animation&&!l.isHidden&&(1<Math.abs(a-e.x)||1<Math.abs(f-e.y)),g=l.followPointer||1<l.len;A(e,{x:n?(2*e.x+a)/3:a,y:n?(e.y+f)/2:f,anchorX:g?void 0:n?(2*e.anchorX+c)/3:c,anchorY:g?void 0:n?(e.anchorY+b)/2:b});l.getLabel().attr(e);n&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){l&&l.move(a,f,c,b)},32))},hide:function(a){var f=this;clearTimeout(this.hideTimer);a=t(a,this.options.hideDelay,500);this.isHidden||(this.hideTimer=k(function(){f.getLabel()[a? |
"fadeOut":"hide"]();f.isHidden=!0},a))},getAnchor:function(a,f){var c,b=this.chart,l=b.inverted,e=b.plotTop,n=b.plotLeft,k=0,d=0,m,q;a=p(a);c=a[0].tooltipPos;this.followPointer&&f&&(void 0===f.chartX&&(f=b.pointer.normalize(f)),c=[f.chartX-b.plotLeft,f.chartY-e]);c||(B(a,function(a){m=a.series.yAxis;q=a.series.xAxis;k+=a.plotX+(!l&&q?q.left-n:0);d+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!l&&m?m.top-e:0)}),k/=a.length,d/=a.length,c=[l?b.plotWidth-d:k,this.shared&&!l&&1<a.length&&f?f.chartY- |
e:l?b.plotHeight-k:d]);return g(c,Math.round)},getPosition:function(a,f,c){var b=this.chart,l=this.distance,e={},n=c.h||0,k,g=["y",b.chartHeight,f,c.plotY+b.plotTop,b.plotTop,b.plotTop+b.plotHeight],d=["x",b.chartWidth,a,c.plotX+b.plotLeft,b.plotLeft,b.plotLeft+b.plotWidth],m=!this.followPointer&&t(c.ttBelow,!b.inverted===!!c.negative),q=function(a,b,c,f,k,g){var h=c<f-l,d=f+l+c<b,y=f-l-c;f+=l;if(m&&d)e[a]=f;else if(!m&&h)e[a]=y;else if(h)e[a]=Math.min(g-c,0>y-n?y:y-n);else if(d)e[a]=Math.max(k,f+ |
n+c>b?f:f+n);else return!1},p=function(a,b,c,n){var h;n<l||n>b-l?h=!1:e[a]=n<c/2?1:n>b-c/2?b-c-2:n-c/2;return h},y=function(a){var b=g;g=d;d=b;k=a},D=function(){!1!==q.apply(0,g)?!1!==p.apply(0,d)||k||(y(!0),D()):k?e.x=e.y=0:(y(!0),D())};(b.inverted||1<this.len)&&y();D();return e},defaultFormatter:function(a){var f=this.points||p(this),c;c=[a.tooltipFooterHeaderFormatter(f[0])];c=c.concat(a.bodyFormatter(f));c.push(a.tooltipFooterHeaderFormatter(f[0],!0));return c},refresh:function(a,f){var c,b=this.options, |
l=a,e,n={},k=[];c=b.formatter||this.defaultFormatter;var n=this.shared,g;b.enabled&&(clearTimeout(this.hideTimer),this.followPointer=p(l)[0].series.tooltipOptions.followPointer,e=this.getAnchor(l,f),f=e[0],b=e[1],!n||l.series&&l.series.noSharedTooltip?n=l.getLabelConfig():(B(l,function(a){a.setState("hover");k.push(a.getLabelConfig())}),n={x:l[0].category,y:l[0].y},n.points=k,l=l[0]),this.len=k.length,n=c.call(n,this),g=l.series,this.distance=t(g.tooltipOptions.distance,16),!1===n?this.hide():(c= |
this.getLabel(),this.isHidden&&c.attr({opacity:1}).show(),this.split?this.renderSplit(n,a):(c.css({width:this.chart.spacingBox.width}),c.attr({text:n&&n.join?n.join(""):n}),c.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+t(l.colorIndex,g.colorIndex)),this.updatePosition({plotX:f,plotY:b,negative:l.negative,ttBelow:l.ttBelow,h:e[2]||0})),this.isHidden=!1))},renderSplit:function(f,k){var c=this,b=[],l=this.chart,e=l.renderer,n=!0,g=this.options,d=0,m=this.getLabel();B(f.slice(0, |
k.length+1),function(a,f){if(!1!==a){f=k[f-1]||{isHeader:!0,plotX:k[0].plotX};var q=f.series||c,y=q.tt,D="highcharts-color-"+t(f.colorIndex,(f.series||{}).colorIndex,"none");y||(q.tt=y=e.label(null,null,null,"callout").addClass("highcharts-tooltip-box "+D).attr({padding:g.padding,r:g.borderRadius}).add(m));y.isActive=!0;y.attr({text:a});a=y.getBBox();D=a.width+y.strokeWidth();f.isHeader?(d=a.height,D=Math.max(0,Math.min(f.plotX+l.plotLeft-D/2,l.chartWidth-D))):D=f.plotX+l.plotLeft-t(g.distance,16)- |
D;0>D&&(n=!1);a=(f.series&&f.series.yAxis&&f.series.yAxis.pos)+(f.plotY||0);a-=l.plotTop;b.push({target:f.isHeader?l.plotHeight+d:a,rank:f.isHeader?1:0,size:q.tt.getBBox().height+1,point:f,x:D,tt:y})}});this.cleanSplit();a.distribute(b,l.plotHeight+d);B(b,function(a){var b=a.point,e=b.series;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:n||b.isHeader?a.x:b.plotX+l.plotLeft+t(g.distance,16),y:a.pos+l.plotTop,anchorX:b.isHeader?b.plotX+l.plotLeft:b.plotX+e.xAxis.pos,anchorY:b.isHeader?a.pos+ |
l.plotTop-15:b.plotY+e.yAxis.pos})})},updatePosition:function(a){var f=this.chart,c=this.getLabel(),c=(this.options.positioner||this.getPosition).call(this,c.width,c.height,a);this.move(Math.round(c.x),Math.round(c.y||0),a.plotX+f.plotLeft,a.plotY+f.plotTop)},getDateFormat:function(a,k,c,b){var l=w("%m-%d %H:%M:%S.%L",k),e,n,g={millisecond:15,second:12,minute:9,hour:6,day:3},d="millisecond";for(n in f){if(a===f.week&&+w("%w",k)===c&&"00:00:00.000"===l.substr(6)){n="week";break}if(f[n]>a){n=d;break}if(g[n]&& |
l.substr(g[n])!=="01-01 00:00:00.000".substr(g[n]))break;"week"!==n&&(d=n)}n&&(e=b[n]);return e},getXDateFormat:function(a,f,c){f=f.dateTimeLabelFormats;var b=c&&c.closestPointRange;return(b?this.getDateFormat(b,a.x,c.options.startOfWeek,f):f.day)||f.year},tooltipFooterHeaderFormatter:function(a,f){var c=f?"footer":"header";f=a.series;var b=f.tooltipOptions,l=b.xDateFormat,e=f.xAxis,n=e&&"datetime"===e.options.type&&d(a.key),c=b[c+"Format"];n&&!l&&(l=this.getXDateFormat(a,b,e));n&&l&&(c=c.replace("{point.key}", |
"{point.key:"+l+"}"));return v(c,{point:a,series:f})},bodyFormatter:function(a){return g(a,function(a){var c=a.series.tooltipOptions;return(c.pointFormatter||a.point.tooltipFormatter).call(a.point,c.pointFormat)})}}})(H);(function(a){var w=a.addEvent,B=a.attr,A=a.charts,v=a.css,d=a.defined,g=a.each,m=a.extend,t=a.find,p=a.fireEvent,k=a.isObject,f=a.offset,q=a.pick,u=a.removeEvent,c=a.splat,b=a.Tooltip,l=a.win;a.Pointer=function(a,b){this.init(a,b)};a.Pointer.prototype={init:function(a,c){this.options= |
c;this.chart=a;this.runChartClick=c.chart.events&&!!c.chart.events.click;this.pinchDown=[];this.lastValidTouch={};b&&(a.tooltip=new b(a,c.tooltip),this.followTouchMove=q(c.tooltip.followTouchMove,!0));this.setDOMEvents()},zoomOption:function(a){var b=this.chart,e=b.options.chart,c=e.zoomType||"",b=b.inverted;/touch/.test(a.type)&&(c=q(e.pinchType,c));this.zoomX=a=/x/.test(c);this.zoomY=c=/y/.test(c);this.zoomHor=a&&!b||c&&b;this.zoomVert=c&&!b||a&&b;this.hasZoom=a||c},normalize:function(a,b){var e, |
c;a=a||l.event;a.target||(a.target=a.srcElement);c=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;b||(this.chartPosition=b=f(this.chart.container));void 0===c.pageX?(e=Math.max(a.x,a.clientX-b.left),b=a.y):(e=c.pageX-b.left,b=c.pageY-b.top);return m(a,{chartX:Math.round(e),chartY:Math.round(b)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};g(this.chart.axes,function(e){b[e.isXAxis?"xAxis":"yAxis"].push({axis:e,value:e.toValue(a[e.horiz?"chartX":"chartY"])})});return b}, |
findNearestKDPoint:function(a,b,c){var e;g(a,function(a){var l=!(a.noSharedTooltip&&b)&&0>a.options.findNearestPointBy.indexOf("y");a=a.searchPoint(c,l);if((l=k(a,!0))&&!(l=!k(e,!0)))var l=e.distX-a.distX,f=e.dist-a.dist,n=(a.series.group&&a.series.group.zIndex)-(e.series.group&&e.series.group.zIndex),l=0<(0!==l&&b?l:0!==f?f:0!==n?n:e.series.index>a.series.index?-1:1);l&&(e=a)});return e},getPointFromEvent:function(a){a=a.target;for(var b;a&&!b;)b=a.point,a=a.parentNode;return b},getChartCoordinatesFromPoint:function(a, |
b){var e=a.series,c=e.xAxis,e=e.yAxis;if(c&&e)return b?{chartX:c.len+c.pos-a.clientX,chartY:e.len+e.pos-a.plotY}:{chartX:a.clientX+c.pos,chartY:a.plotY+e.pos}},getHoverData:function(b,c,l,f,d,m){var e,n=[];f=!(!f||!b);var y=c&&!c.stickyTracking?[c]:a.grep(l,function(a){return a.visible&&!(!d&&a.directTouch)&&q(a.options.enableMouseTracking,!0)&&a.stickyTracking});c=(e=f?b:this.findNearestKDPoint(y,d,m))&&e.series;e&&(d&&!c.noSharedTooltip?(y=a.grep(l,function(a){return a.visible&&!(!d&&a.directTouch)&& |
q(a.options.enableMouseTracking,!0)&&!a.noSharedTooltip}),g(y,function(a){a=t(a.points,function(a){return a.x===e.x});k(a)&&!a.isNull&&n.push(a)})):n.push(e));return{hoverPoint:e,hoverSeries:c,hoverPoints:n}},runPointActions:function(b,c){var e=this.chart,l=e.tooltip,f=l?l.shared:!1,n=c||e.hoverPoint,k=n&&n.series||e.hoverSeries,k=this.getHoverData(n,k,e.series,!!c||k&&k.directTouch&&this.isDirectTouch,f,b),d,n=k.hoverPoint;d=k.hoverPoints;c=(k=k.hoverSeries)&&k.tooltipOptions.followPointer;f=f&& |
k&&!k.noSharedTooltip;if(n&&(n!==e.hoverPoint||l&&l.isHidden)){g(e.hoverPoints||[],function(b){-1===a.inArray(b,d)&&b.setState()});g(d||[],function(a){a.setState("hover")});if(e.hoverSeries!==k)k.onMouseOver();e.hoverPoint&&e.hoverPoint.firePointEvent("mouseOut");n.firePointEvent("mouseOver");e.hoverPoints=d;e.hoverPoint=n;l&&l.refresh(f?d:n,b)}else c&&l&&!l.isHidden&&(n=l.getAnchor([{}],b),l.updatePosition({plotX:n[0],plotY:n[1]}));this.unDocMouseMove||(this.unDocMouseMove=w(e.container.ownerDocument, |
"mousemove",function(b){var e=A[a.hoverChartIndex];if(e)e.pointer.onDocumentMouseMove(b)}));g(e.axes,function(e){var c=q(e.crosshair.snap,!0),l=c?a.find(d,function(a){return a.series[e.coll]===e}):void 0;l||!c?e.drawCrosshair(b,l):e.hideCrosshair()})},reset:function(a,b){var e=this.chart,l=e.hoverSeries,f=e.hoverPoint,n=e.hoverPoints,k=e.tooltip,d=k&&k.shared?n:f;a&&d&&g(c(d),function(b){b.series.isCartesian&&void 0===b.plotX&&(a=!1)});if(a)k&&d&&(k.refresh(d),f&&(f.setState(f.state,!0),g(e.axes, |
function(a){a.crosshair&&a.drawCrosshair(null,f)})));else{if(f)f.onMouseOut();n&&g(n,function(a){a.setState()});if(l)l.onMouseOut();k&&k.hide(b);this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());g(e.axes,function(a){a.hideCrosshair()});this.hoverX=e.hoverPoints=e.hoverPoint=null}},scaleGroups:function(a,b){var e=this.chart,c;g(e.series,function(l){c=a||l.getPlotBox();l.xAxis&&l.xAxis.zoomEnabled&&l.group&&(l.group.attr(c),l.markerGroup&&(l.markerGroup.attr(c),l.markerGroup.clip(b?e.clipRect: |
null)),l.dataLabelsGroup&&l.dataLabelsGroup.attr(c))});e.clipRect.attr(b||e.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;b.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var b=this.chart,e=b.options.chart,c=a.chartX,l=a.chartY,f=this.zoomHor,k=this.zoomVert,d=b.plotLeft,g=b.plotTop,m=b.plotWidth,C=b.plotHeight,q,h=this.selectionMarker,r=this.mouseDownX,p=this.mouseDownY,u=e.panKey&&a[e.panKey+"Key"];h&&h.touch|| |
(c<d?c=d:c>d+m&&(c=d+m),l<g?l=g:l>g+C&&(l=g+C),this.hasDragged=Math.sqrt(Math.pow(r-c,2)+Math.pow(p-l,2)),10<this.hasDragged&&(q=b.isInsidePlot(r-d,p-g),b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&q&&!u&&!h&&(this.selectionMarker=h=b.renderer.rect(d,g,f?1:m,k?1:C,0).attr({"class":"highcharts-selection-marker",zIndex:7}).add()),h&&f&&(c-=r,h.attr({width:Math.abs(c),x:(0<c?0:c)+r})),h&&k&&(c=l-p,h.attr({height:Math.abs(c),y:(0<c?0:c)+p})),q&&!h&&e.panning&&b.pan(a,e.panning)))},drop:function(a){var b= |
this,e=this.chart,c=this.hasPinched;if(this.selectionMarker){var l={originalEvent:a,xAxis:[],yAxis:[]},f=this.selectionMarker,k=f.attr?f.attr("x"):f.x,q=f.attr?f.attr("y"):f.y,y=f.attr?f.attr("width"):f.width,D=f.attr?f.attr("height"):f.height,C;if(this.hasDragged||c)g(e.axes,function(e){if(e.zoomEnabled&&d(e.min)&&(c||b[{xAxis:"zoomX",yAxis:"zoomY"}[e.coll]])){var h=e.horiz,f="touchend"===a.type?e.minPixelPadding:0,n=e.toValue((h?k:q)+f),h=e.toValue((h?k+y:q+D)-f);l[e.coll].push({axis:e,min:Math.min(n, |
h),max:Math.max(n,h)});C=!0}}),C&&p(e,"selection",l,function(a){e.zoom(m(a,c?{animation:!1}:null))});this.selectionMarker=this.selectionMarker.destroy();c&&this.scaleGroups()}e&&(v(e.container,{cursor:e._cursor}),e.cancelClick=10<this.hasDragged,e.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(a){a=this.normalize(a);this.zoomOption(a);a.preventDefault&&a.preventDefault();this.dragStart(a)},onDocumentMouseUp:function(b){A[a.hoverChartIndex]&&A[a.hoverChartIndex].pointer.drop(b)}, |
onDocumentMouseMove:function(a){var b=this.chart,e=this.chartPosition;a=this.normalize(a,e);!e||this.inClass(a.target,"highcharts-tracker")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)||this.reset()},onContainerMouseLeave:function(b){var e=A[a.hoverChartIndex];e&&(b.relatedTarget||b.toElement)&&(e.pointer.reset(),e.pointer.chartPosition=null)},onContainerMouseMove:function(b){var c=this.chart;d(a.hoverChartIndex)&&A[a.hoverChartIndex]&&A[a.hoverChartIndex].mouseIsDown||(a.hoverChartIndex= |
c.index);b=this.normalize(b);b.returnValue=!1;"mousedown"===c.mouseIsDown&&this.drag(b);!this.inClass(b.target,"highcharts-tracker")&&!c.isInsidePlot(b.chartX-c.plotLeft,b.chartY-c.plotTop)||c.openMenu||this.runPointActions(b)},inClass:function(a,b){for(var c;a;){if(c=B(a,"class")){if(-1!==c.indexOf(b))return!0;if(-1!==c.indexOf("highcharts-container"))return!1}a=a.parentNode}},onTrackerMouseOut:function(a){var b=this.chart.hoverSeries;a=a.relatedTarget||a.toElement;this.isDirectTouch=!1;if(!(!b|| |
!a||b.stickyTracking||this.inClass(a,"highcharts-tooltip")||this.inClass(a,"highcharts-series-"+b.index)&&this.inClass(a,"highcharts-tracker")))b.onMouseOut()},onContainerClick:function(a){var b=this.chart,c=b.hoverPoint,e=b.plotLeft,l=b.plotTop;a=this.normalize(a);b.cancelClick||(c&&this.inClass(a.target,"highcharts-tracker")?(p(c.series,"click",m(a,{point:c})),b.hoverPoint&&c.firePointEvent("click",a)):(m(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-e,a.chartY-l)&&p(b,"click",a)))},setDOMEvents:function(){var b= |
this,c=b.chart.container,l=c.ownerDocument;c.onmousedown=function(a){b.onContainerMouseDown(a)};c.onmousemove=function(a){b.onContainerMouseMove(a)};c.onclick=function(a){b.onContainerClick(a)};w(c,"mouseleave",b.onContainerMouseLeave);1===a.chartCount&&w(l,"mouseup",b.onDocumentMouseUp);a.hasTouch&&(c.ontouchstart=function(a){b.onContainerTouchStart(a)},c.ontouchmove=function(a){b.onContainerTouchMove(a)},1===a.chartCount&&w(l,"touchend",b.onDocumentTouchEnd))},destroy:function(){var b=this,c=this.chart.container.ownerDocument; |
b.unDocMouseMove&&b.unDocMouseMove();u(b.chart.container,"mouseleave",b.onContainerMouseLeave);a.chartCount||(u(c,"mouseup",b.onDocumentMouseUp),a.hasTouch&&u(c,"touchend",b.onDocumentTouchEnd));clearInterval(b.tooltipTimeout);a.objectEach(b,function(a,c){b[c]=null})}}})(H);(function(a){var w=a.charts,B=a.each,A=a.extend,v=a.map,d=a.noop,g=a.pick;A(a.Pointer.prototype,{pinchTranslate:function(a,d,g,k,f,q){this.zoomHor&&this.pinchTranslateDirection(!0,a,d,g,k,f,q);this.zoomVert&&this.pinchTranslateDirection(!1, |
a,d,g,k,f,q)},pinchTranslateDirection:function(a,d,g,k,f,q,u,c){var b=this.chart,l=a?"x":"y",e=a?"X":"Y",n="chart"+e,m=a?"width":"height",p=b["plot"+(a?"Left":"Top")],E,I,x=c||1,t=b.inverted,y=b.bounds[a?"h":"v"],D=1===d.length,C=d[0][n],J=g[0][n],h=!D&&d[1][n],r=!D&&g[1][n],M;g=function(){!D&&20<Math.abs(C-h)&&(x=c||Math.abs(J-r)/Math.abs(C-h));I=(p-J)/x+C;E=b["plot"+(a?"Width":"Height")]/x};g();d=I;d<y.min?(d=y.min,M=!0):d+E>y.max&&(d=y.max-E,M=!0);M?(J-=.8*(J-u[l][0]),D||(r-=.8*(r-u[l][1])),g()): |
u[l]=[J,r];t||(q[l]=I-p,q[m]=E);q=t?1/x:x;f[m]=E;f[l]=d;k[t?a?"scaleY":"scaleX":"scale"+e]=x;k["translate"+e]=q*p+(J-q*C)},pinch:function(a){var m=this,p=m.chart,k=m.pinchDown,f=a.touches,q=f.length,u=m.lastValidTouch,c=m.hasZoom,b=m.selectionMarker,l={},e=1===q&&(m.inClass(a.target,"highcharts-tracker")&&p.runTrackerClick||m.runChartClick),n={};1<q&&(m.initiated=!0);c&&m.initiated&&!e&&a.preventDefault();v(f,function(a){return m.normalize(a)});"touchstart"===a.type?(B(f,function(a,b){k[b]={chartX:a.chartX, |
chartY:a.chartY}}),u.x=[k[0].chartX,k[1]&&k[1].chartX],u.y=[k[0].chartY,k[1]&&k[1].chartY],B(p.axes,function(a){if(a.zoomEnabled){var b=p.bounds[a.horiz?"h":"v"],c=a.minPixelPadding,e=a.toPixels(g(a.options.min,a.dataMin)),l=a.toPixels(g(a.options.max,a.dataMax)),f=Math.max(e,l);b.min=Math.min(a.pos,Math.min(e,l)-c);b.max=Math.max(a.pos+a.len,f+c)}}),m.res=!0):m.followTouchMove&&1===q?this.runPointActions(m.normalize(a)):k.length&&(b||(m.selectionMarker=b=A({destroy:d,touch:!0},p.plotBox)),m.pinchTranslate(k, |
f,l,b,n,u),m.hasPinched=c,m.scaleGroups(l,n),m.res&&(m.res=!1,this.reset(!1,0)))},touch:function(d,t){var m=this.chart,k,f;if(m.index!==a.hoverChartIndex)this.onContainerMouseLeave({relatedTarget:!0});a.hoverChartIndex=m.index;1===d.touches.length?(d=this.normalize(d),(f=m.isInsidePlot(d.chartX-m.plotLeft,d.chartY-m.plotTop))&&!m.openMenu?(t&&this.runPointActions(d),"touchmove"===d.type&&(t=this.pinchDown,k=t[0]?4<=Math.sqrt(Math.pow(t[0].chartX-d.chartX,2)+Math.pow(t[0].chartY-d.chartY,2)):!1),g(k, |
!0)&&this.pinch(d)):t&&this.reset()):2===d.touches.length&&this.pinch(d)},onContainerTouchStart:function(a){this.zoomOption(a);this.touch(a,!0)},onContainerTouchMove:function(a){this.touch(a)},onDocumentTouchEnd:function(d){w[a.hoverChartIndex]&&w[a.hoverChartIndex].pointer.drop(d)}})})(H);(function(a){var w=a.addEvent,B=a.charts,A=a.css,v=a.doc,d=a.extend,g=a.noop,m=a.Pointer,t=a.removeEvent,p=a.win,k=a.wrap;if(!a.hasTouch&&(p.PointerEvent||p.MSPointerEvent)){var f={},q=!!p.PointerEvent,u=function(){var b= |
[];b.item=function(a){return this[a]};a.objectEach(f,function(a){b.push({pageX:a.pageX,pageY:a.pageY,target:a.target})});return b},c=function(b,c,e,f){"touch"!==b.pointerType&&b.pointerType!==b.MSPOINTER_TYPE_TOUCH||!B[a.hoverChartIndex]||(f(b),f=B[a.hoverChartIndex].pointer,f[c]({type:e,target:b.currentTarget,preventDefault:g,touches:u()}))};d(m.prototype,{onContainerPointerDown:function(a){c(a,"onContainerTouchStart","touchstart",function(a){f[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})}, |
onContainerPointerMove:function(a){c(a,"onContainerTouchMove","touchmove",function(a){f[a.pointerId]={pageX:a.pageX,pageY:a.pageY};f[a.pointerId].target||(f[a.pointerId].target=a.currentTarget)})},onDocumentPointerUp:function(a){c(a,"onDocumentTouchEnd","touchend",function(a){delete f[a.pointerId]})},batchMSEvents:function(a){a(this.chart.container,q?"pointerdown":"MSPointerDown",this.onContainerPointerDown);a(this.chart.container,q?"pointermove":"MSPointerMove",this.onContainerPointerMove);a(v,q? |
"pointerup":"MSPointerUp",this.onDocumentPointerUp)}});k(m.prototype,"init",function(a,c,e){a.call(this,c,e);this.hasZoom&&A(c.container,{"-ms-touch-action":"none","touch-action":"none"})});k(m.prototype,"setDOMEvents",function(a){a.apply(this);(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(w)});k(m.prototype,"destroy",function(a){this.batchMSEvents(t);a.call(this)})}})(H);(function(a){var w=a.addEvent,B=a.css,A=a.discardElement,v=a.defined,d=a.each,g=a.isFirefox,m=a.marginNames,t=a.merge, |
p=a.pick,k=a.setAnimation,f=a.stableSort,q=a.win,u=a.wrap;a.Legend=function(a,b){this.init(a,b)};a.Legend.prototype={init:function(a,b){this.chart=a;this.setOptions(b);b.enabled&&(this.render(),w(this.chart,"endResize",function(){this.legend.positionCheckboxes()}))},setOptions:function(a){var b=p(a.padding,8);this.options=a;this.itemMarginTop=a.itemMarginTop||0;this.padding=b;this.initialItemY=b-5;this.itemHeight=this.maxItemWidth=0;this.symbolWidth=p(a.symbolWidth,16);this.pages=[]},update:function(a, |
b){var c=this.chart;this.setOptions(t(!0,this.options,a));this.destroy();c.isDirtyLegend=c.isDirtyBox=!0;p(b,!0)&&c.redraw()},colorizeItem:function(a,b){a.legendGroup[b?"removeClass":"addClass"]("highcharts-legend-item-hidden")},positionItem:function(a){var b=this.options,c=b.symbolPadding,b=!b.rtl,e=a._legendItemPos,f=e[0],e=e[1],d=a.checkbox;(a=a.legendGroup)&&a.element&&a.translate(b?f:this.legendWidth-f-2*c-4,e);d&&(d.x=f,d.y=e)},destroyItem:function(a){var b=a.checkbox;d(["legendItem","legendLine", |
"legendSymbol","legendGroup"],function(b){a[b]&&(a[b]=a[b].destroy())});b&&A(a.checkbox)},destroy:function(){function a(a){this[a]&&(this[a]=this[a].destroy())}d(this.getAllItems(),function(b){d(["legendItem","legendGroup"],a,b)});d("clipRect up down pager nav box title group".split(" "),a,this);this.display=null},positionCheckboxes:function(a){var b=this.group&&this.group.alignAttr,c,e=this.clipHeight||this.legendHeight,f=this.titleHeight;b&&(c=b.translateY,d(this.allItems,function(l){var d=l.checkbox, |
k;d&&(k=c+f+d.y+(a||0)+3,B(d,{left:b.translateX+l.checkboxOffset+d.x-20+"px",top:k+"px",display:k>c-6&&k<c+e-6?"":"none"}))}))},renderTitle:function(){var a=this.options,b=this.padding,l=a.title,e=0;l.text&&(this.title||(this.title=this.chart.renderer.label(l.text,b-3,b-4,null,null,null,a.useHTML,null,"legend-title").attr({zIndex:1}).add(this.group)),a=this.title.getBBox(),e=a.height,this.offsetWidth=a.width,this.contentGroup.attr({translateY:e}));this.titleHeight=e},setText:function(c){var b=this.options; |
c.legendItem.attr({text:b.labelFormat?a.format(b.labelFormat,c):b.labelFormatter.call(c)})},renderItem:function(a){var b=this.chart,c=b.renderer,e=this.options,f="horizontal"===e.layout,d=this.symbolWidth,k=e.symbolPadding,g=this.padding,m=f?p(e.itemDistance,20):0,q=!e.rtl,u=e.width,y=e.itemMarginBottom||0,D=this.itemMarginTop,C=a.legendItem,J=!a.series,h=!J&&a.series.drawLegendSymbol?a.series:a,r=h.options,t=this.createCheckboxForItem&&r&&r.showCheckbox,r=d+k+m+(t?20:0),K=e.useHTML,v=a.options.className; |
C||(a.legendGroup=c.g("legend-item").addClass("highcharts-"+h.type+"-series highcharts-color-"+a.colorIndex+(v?" "+v:"")+(J?" highcharts-series-"+a.index:"")).attr({zIndex:1}).add(this.scrollGroup),a.legendItem=C=c.text("",q?d+k:-k,this.baseline||0,K).attr({align:q?"left":"right",zIndex:2}).add(a.legendGroup),this.baseline||(this.fontMetrics=c.fontMetrics(12,C),this.baseline=this.fontMetrics.f+3+D,C.attr("y",this.baseline)),this.symbolHeight=e.symbolHeight||this.fontMetrics.f,h.drawLegendSymbol(this, |
a),this.setItemEvents&&this.setItemEvents(a,C,K),t&&this.createCheckboxForItem(a));this.colorizeItem(a,a.visible);C.css({width:(e.itemWidth||e.width||b.spacingBox.width)-r});this.setText(a);c=C.getBBox();d=a.checkboxOffset=e.itemWidth||a.legendItemWidth||c.width+r;this.itemHeight=c=Math.round(a.legendItemHeight||c.height||this.symbolHeight);f&&this.itemX-g+d>(u||b.spacingBox.width-2*g-e.x)&&(this.itemX=g,this.itemY+=D+this.lastLineHeight+y,this.lastLineHeight=0);this.maxItemWidth=Math.max(this.maxItemWidth, |
d);this.lastItemY=D+this.itemY+y;this.lastLineHeight=Math.max(c,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];f?this.itemX+=d:(this.itemY+=D+c+y,this.lastLineHeight=c);this.offsetWidth=u||Math.max((f?this.itemX-g-(a.checkbox?0:m):d)+g,this.offsetWidth)},getAllItems:function(){var a=[];d(this.chart.series,function(b){var c=b&&b.options;b&&p(c.showInLegend,v(c.linkedTo)?!1:void 0,!0)&&(a=a.concat(b.legendItems||("point"===c.legendType?b.data:b)))});return a},adjustMargins:function(a, |
b){var c=this.chart,e=this.options,f=e.align.charAt(0)+e.verticalAlign.charAt(0)+e.layout.charAt(0);e.floating||d([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(l,d){l.test(f)&&!v(a[d])&&(c[m[d]]=Math.max(c[m[d]],c.legend[(d+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][d]*e[d%2?"x":"y"]+p(e.margin,12)+b[d]))})},render:function(){var a=this,b=a.chart,l=b.renderer,e=a.group,k,g,m,q,p=a.box,x=a.options,u=a.padding;a.itemX=u;a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY= |
0;e||(a.group=e=l.g("legend").attr({zIndex:7}).add(),a.contentGroup=l.g().attr({zIndex:1}).add(e),a.scrollGroup=l.g().add(a.contentGroup));a.renderTitle();k=a.getAllItems();f(k,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});x.reversed&&k.reverse();a.allItems=k;a.display=g=!!k.length;a.lastLineHeight=0;d(k,function(b){a.renderItem(b)});m=(x.width||a.offsetWidth)+u;q=a.lastItemY+a.lastLineHeight+a.titleHeight;q=a.handleOverflow(q);q+=u;p||(a.box=p= |
l.rect().addClass("highcharts-legend-box").attr({r:x.borderRadius}).add(e),p.isNew=!0);0<m&&0<q&&(p[p.isNew?"attr":"animate"](p.crisp({x:0,y:0,width:m,height:q},p.strokeWidth())),p.isNew=!1);p[g?"show":"hide"]();"none"===e.getStyle("display")&&(m=q=0);a.legendWidth=m;a.legendHeight=q;d(k,function(b){a.positionItem(b)});g&&e.align(t(x,{width:m,height:q}),!0,"spacingBox");b.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var b=this,c=this.chart,e=c.renderer,f=this.options,k=f.y,g= |
this.padding,c=c.spacingBox.height+("top"===f.verticalAlign?-k:k)-g,k=f.maxHeight,m,q=this.clipRect,x=f.navigation,u=p(x.animation,!0),y=x.arrowSize||12,D=this.nav,C=this.pages,J,h=this.allItems,r=function(a){"number"===typeof a?q.attr({height:a}):q&&(b.clipRect=q.destroy(),b.contentGroup.clip());b.contentGroup.div&&(b.contentGroup.div.style.clip=a?"rect("+g+"px,9999px,"+(g+a)+"px,0)":"auto")};"horizontal"!==f.layout||"middle"===f.verticalAlign||f.floating||(c/=2);k&&(c=Math.min(c,k));C.length=0; |
a>c&&!1!==x.enabled?(this.clipHeight=m=Math.max(c-20-this.titleHeight-g,0),this.currentPage=p(this.currentPage,1),this.fullHeight=a,d(h,function(a,b){var c=a._legendItemPos[1];a=Math.round(a.legendItem.getBBox().height);var e=C.length;if(!e||c-C[e-1]>m&&(J||c)!==C[e-1])C.push(J||c),e++;b===h.length-1&&c+a-C[e-1]>m&&C.push(c);c!==J&&(J=c)}),q||(q=b.clipRect=e.clipRect(0,g,9999,0),b.contentGroup.clip(q)),r(m),D||(this.nav=D=e.g().attr({zIndex:1}).add(this.group),this.up=e.symbol("triangle",0,0,y,y).on("click", |
function(){b.scroll(-1,u)}).add(D),this.pager=e.text("",15,10).addClass("highcharts-legend-navigation").add(D),this.down=e.symbol("triangle-down",0,0,y,y).on("click",function(){b.scroll(1,u)}).add(D)),b.scroll(0),a=c):D&&(r(),this.nav=D.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,b){var c=this.pages,e=c.length;a=this.currentPage+a;var f=this.clipHeight,d=this.pager,g=this.padding;a>e&&(a=e);0<a&&(void 0!==b&&k(b,this.chart),this.nav.attr({translateX:g, |
translateY:f+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({"class":1===a?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),d.attr({text:a+"/"+e}),this.down.attr({x:18+this.pager.getBBox().width,"class":a===e?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),b=-c[a-1]+this.initialItemY,this.scrollGroup.animate({translateY:b}),this.currentPage=a,this.positionCheckboxes(b))}};a.LegendSymbolMixin={drawRectangle:function(a,b){var c=a.symbolHeight, |
e=a.options.squareSymbol;b.legendSymbol=this.chart.renderer.rect(e?(a.symbolWidth-c)/2:0,a.baseline-c+1,e?c:a.symbolWidth,c,p(a.options.symbolRadius,c/2)).addClass("highcharts-point").attr({zIndex:3}).add(b.legendGroup)},drawLineMarker:function(a){var b=this.options.marker,c,e=a.symbolWidth,f=a.symbolHeight;c=f/2;var d=this.chart.renderer,k=this.legendGroup;a=a.baseline-Math.round(.3*a.fontMetrics.b);this.legendLine=d.path(["M",0,a,"L",e,a]).addClass("highcharts-graph").attr({}).add(k);b&&!1!==b.enabled&& |
(c=Math.min(p(b.radius,c),c),0===this.symbol.indexOf("url")&&(b=t(b,{width:f,height:f}),c=0),this.legendSymbol=b=d.symbol(this.symbol,e/2-c,a-c,2*c,2*c,b).addClass("highcharts-point").add(k),b.isMarker=!0)}};(/Trident\/7\.0/.test(q.navigator.userAgent)||g)&&u(a.Legend.prototype,"positionItem",function(a,b){var c=this,e=function(){b._legendItemPos&&a.call(c,b)};e();setTimeout(e)})})(H);(function(a){var w=a.addEvent,B=a.animObject,A=a.attr,v=a.doc,d=a.Axis,g=a.createElement,m=a.defaultOptions,t=a.discardElement, |
p=a.charts,k=a.defined,f=a.each,q=a.extend,u=a.find,c=a.fireEvent,b=a.getStyle,l=a.grep,e=a.isNumber,n=a.isObject,F=a.isString,G=a.Legend,E=a.marginNames,I=a.merge,x=a.objectEach,L=a.Pointer,y=a.pick,D=a.pInt,C=a.removeEvent,J=a.seriesTypes,h=a.splat,r=a.svg,M=a.syncTimeout,K=a.win,N=a.Renderer,O=a.Chart=function(){this.getArgs.apply(this,arguments)};a.chart=function(a,b,c){return new O(a,b,c)};q(O.prototype,{callbacks:[],getArgs:function(){var a=[].slice.call(arguments);if(F(a[0])||a[0].nodeName)this.renderTo= |
a.shift();this.init(a[0],a[1])},init:function(b,c){var e,h,f=b.series,l=b.plotOptions||{};b.series=null;e=I(m,b);for(h in e.plotOptions)e.plotOptions[h].tooltip=l[h]&&I(l[h].tooltip)||void 0;e.tooltip.userOptions=b.chart&&b.chart.forExport&&b.tooltip.userOptions||b.tooltip;e.series=b.series=f;this.userOptions=b;b=e.chart;h=b.events;this.margin=[];this.spacing=[];this.bounds={h:{},v:{}};this.callback=c;this.isResizing=0;this.options=e;this.axes=[];this.series=[];this.hasCartesianSeries=b.showAxes; |
var d=this;d.index=p.length;p.push(d);a.chartCount++;h&&x(h,function(a,b){w(d,b,a)});d.xAxis=[];d.yAxis=[];d.pointCount=d.colorCounter=d.symbolCounter=0;d.firstRender()},initSeries:function(b){var c=this.options.chart;(c=J[b.type||c.type||c.defaultSeriesType])||a.error(17,!0);c=new c;c.init(this,b);return c},orderSeries:function(a){var b=this.series;for(a=a||0;a<b.length;a++)b[a]&&(b[a].index=a,b[a].name=b[a].name||"Series "+(b[a].index+1))},isInsidePlot:function(a,b,c){var e=c?b:a;a=c?a:b;return 0<= |
e&&e<=this.plotWidth&&0<=a&&a<=this.plotHeight},redraw:function(b){var e=this.axes,h=this.series,l=this.pointer,d=this.legend,k=this.isDirtyLegend,g,n,y=this.hasCartesianSeries,m=this.isDirtyBox,r,C=this.renderer,D=C.isHidden(),p=[];this.setResponsive&&this.setResponsive(!1);a.setAnimation(b,this);D&&this.temporaryDisplay();this.layOutTitles();for(b=h.length;b--;)if(r=h[b],r.options.stacking&&(g=!0,r.isDirty)){n=!0;break}if(n)for(b=h.length;b--;)r=h[b],r.options.stacking&&(r.isDirty=!0);f(h,function(a){a.isDirty&& |
"point"===a.options.legendType&&(a.updateTotals&&a.updateTotals(),k=!0);a.isDirtyData&&c(a,"updatedData")});k&&d.options.enabled&&(d.render(),this.isDirtyLegend=!1);g&&this.getStacks();y&&f(e,function(a){a.updateNames();a.setScale()});this.getMargins();y&&(f(e,function(a){a.isDirty&&(m=!0)}),f(e,function(a){var b=a.min+","+a.max;a.extKey!==b&&(a.extKey=b,p.push(function(){c(a,"afterSetExtremes",q(a.eventArgs,a.getExtremes()));delete a.eventArgs}));(m||g)&&a.redraw()}));m&&this.drawChartBox();c(this, |
"predraw");f(h,function(a){(m||a.isDirty)&&a.visible&&a.redraw();a.isDirtyData=!1});l&&l.reset(!0);C.draw();c(this,"redraw");c(this,"render");D&&this.temporaryDisplay(!0);f(p,function(a){a.call()})},get:function(a){function b(b){return b.id===a||b.options&&b.options.id===a}var c,e=this.series,h;c=u(this.axes,b)||u(this.series,b);for(h=0;!c&&h<e.length;h++)c=u(e[h].points||[],b);return c},getAxes:function(){var a=this,b=this.options,c=b.xAxis=h(b.xAxis||{}),b=b.yAxis=h(b.yAxis||{});f(c,function(a, |
b){a.index=b;a.isX=!0});f(b,function(a,b){a.index=b});c=c.concat(b);f(c,function(b){new d(a,b)})},getSelectedPoints:function(){var a=[];f(this.series,function(b){a=a.concat(l(b.data||[],function(a){return a.selected}))});return a},getSelectedSeries:function(){return l(this.series,function(a){return a.selected})},setTitle:function(a,b,c){var e=this,h=e.options,l;l=h.title=I(h.title,a);h=h.subtitle=I(h.subtitle,b);f([["title",a,l],["subtitle",b,h]],function(a,b){var c=a[0],h=e[c],f=a[1];a=a[2];h&&f&& |
(e[c]=h=h.destroy());a&&a.text&&!h&&(e[c]=e.renderer.text(a.text,0,0,a.useHTML).attr({align:a.align,"class":"highcharts-"+c,zIndex:a.zIndex||4}).add(),e[c].update=function(a){e.setTitle(!b&&a,b&&a)})});e.layOutTitles(c)},layOutTitles:function(a){var b=0,c,e=this.renderer,h=this.spacingBox;f(["title","subtitle"],function(a){var c=this[a],f=this.options[a];a="title"===a?-3:f.verticalAlign?0:b+2;var l;c&&(l=e.fontMetrics(l,c).b,c.css({width:(f.width||h.width+f.widthAdjust)+"px"}).align(q({y:a+l},f), |
!1,"spacingBox"),f.floating||f.verticalAlign||(b=Math.ceil(b+c.getBBox(f.useHTML).height)))},this);c=this.titleOffset!==b;this.titleOffset=b;!this.isDirtyBox&&c&&(this.isDirtyBox=c,this.hasRendered&&y(a,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var c=this.options.chart,e=c.width,c=c.height,h=this.renderTo;k(e)||(this.containerWidth=b(h,"width"));k(c)||(this.containerHeight=b(h,"height"));this.chartWidth=Math.max(0,e||this.containerWidth||600);this.chartHeight=Math.max(0,a.relativeLength(c, |
this.chartWidth)||this.containerHeight||400)},temporaryDisplay:function(c){var e=this.renderTo;if(c)for(;e&&e.style;)e.hcOrigStyle&&(a.css(e,e.hcOrigStyle),delete e.hcOrigStyle),e.hcOrigDetached&&(v.body.removeChild(e),e.hcOrigDetached=!1),e=e.parentNode;else for(;e&&e.style;){v.body.contains(e)||(e.hcOrigDetached=!0,v.body.appendChild(e));if("none"===b(e,"display",!1)||e.hcOricDetached)e.hcOrigStyle={display:e.style.display,height:e.style.height,overflow:e.style.overflow},c={display:"block",overflow:"hidden"}, |
e!==this.renderTo&&(c.height=0),a.css(e,c),e.offsetWidth||e.style.setProperty("display","block","important");e=e.parentNode;if(e===v.body)break}},setClassName:function(a){this.container.className="highcharts-container "+(a||"")},getContainer:function(){var b,c=this.options,h=c.chart,f,l;b=this.renderTo;var d=a.uniqueKey(),k;b||(this.renderTo=b=h.renderTo);F(b)&&(this.renderTo=b=v.getElementById(b));b||a.error(13,!0);f=D(A(b,"data-highcharts-chart"));e(f)&&p[f]&&p[f].hasRendered&&p[f].destroy();A(b, |
"data-highcharts-chart",this.index);b.innerHTML="";h.skipClone||b.offsetWidth||this.temporaryDisplay();this.getChartSize();f=this.chartWidth;l=this.chartHeight;this.container=b=g("div",{id:d},void 0,b);this._cursor=b.style.cursor;this.renderer=new (a[h.renderer]||N)(b,f,l,null,h.forExport,c.exporting&&c.exporting.allowHTML);this.setClassName(h.className);for(k in c.defs)this.renderer.definition(c.defs[k]);this.renderer.chartIndex=this.index},getMargins:function(a){var b=this.spacing,c=this.margin, |
e=this.titleOffset;this.resetMargins();e&&!k(c[0])&&(this.plotTop=Math.max(this.plotTop,e+this.options.title.margin+b[0]));this.legend.display&&this.legend.adjustMargins(c,b);this.extraMargin&&(this[this.extraMargin.type]=(this[this.extraMargin.type]||0)+this.extraMargin.value);this.extraTopMargin&&(this.plotTop+=this.extraTopMargin);a||this.getAxisMargins()},getAxisMargins:function(){var a=this,b=a.axisOffset=[0,0,0,0],c=a.margin;a.hasCartesianSeries&&f(a.axes,function(a){a.visible&&a.getOffset()}); |
f(E,function(e,h){k(c[h])||(a[e]+=b[h])});a.setChartSize()},reflow:function(a){var c=this,e=c.options.chart,h=c.renderTo,f=k(e.width)&&k(e.height),l=e.width||b(h,"width"),e=e.height||b(h,"height"),h=a?a.target:K;if(!f&&!c.isPrinting&&l&&e&&(h===K||h===v)){if(l!==c.containerWidth||e!==c.containerHeight)clearTimeout(c.reflowTimeout),c.reflowTimeout=M(function(){c.container&&c.setSize(void 0,void 0,!1)},a?100:0);c.containerWidth=l;c.containerHeight=e}},initReflow:function(){var a=this,b;b=w(K,"resize", |
function(b){a.reflow(b)});w(a,"destroy",b)},setSize:function(b,e,h){var l=this,d=l.renderer;l.isResizing+=1;a.setAnimation(h,l);l.oldChartHeight=l.chartHeight;l.oldChartWidth=l.chartWidth;void 0!==b&&(l.options.chart.width=b);void 0!==e&&(l.options.chart.height=e);l.getChartSize();l.setChartSize(!0);d.setSize(l.chartWidth,l.chartHeight,h);f(l.axes,function(a){a.isDirty=!0;a.setScale()});l.isDirtyLegend=!0;l.isDirtyBox=!0;l.layOutTitles();l.getMargins();l.redraw(h);l.oldChartHeight=null;c(l,"resize"); |
M(function(){l&&c(l,"endResize",null,function(){--l.isResizing})},B(void 0).duration)},setChartSize:function(a){function b(a){a=g[a]||0;return Math.max(C||a,a)/2}var c=this.inverted,e=this.renderer,h=this.chartWidth,l=this.chartHeight,d=this.options.chart,k=this.spacing,g=this.clipOffset,n,y,m,r,C;this.plotLeft=n=Math.round(this.plotLeft);this.plotTop=y=Math.round(this.plotTop);this.plotWidth=m=Math.max(0,Math.round(h-n-this.marginRight));this.plotHeight=r=Math.max(0,Math.round(l-y-this.marginBottom)); |
this.plotSizeX=c?r:m;this.plotSizeY=c?m:r;this.plotBorderWidth=d.plotBorderWidth||0;this.spacingBox=e.spacingBox={x:k[3],y:k[0],width:h-k[3]-k[1],height:l-k[0]-k[2]};this.plotBox=e.plotBox={x:n,y:y,width:m,height:r};C=2*Math.floor(this.plotBorderWidth/2);c=Math.ceil(b(3));e=Math.ceil(b(0));this.clipBox={x:c,y:e,width:Math.floor(this.plotSizeX-b(1)-c),height:Math.max(0,Math.floor(this.plotSizeY-b(2)-e))};a||f(this.axes,function(a){a.setAxisSize();a.setAxisTranslation()})},resetMargins:function(){var a= |
this,b=a.options.chart;f(["margin","spacing"],function(c){var e=b[c],h=n(e)?e:[e,e,e,e];f(["Top","Right","Bottom","Left"],function(e,l){a[c][l]=y(b[c+e],h[l])})});f(E,function(b,c){a[b]=y(a.margin[c],a.spacing[c])});a.axisOffset=[0,0,0,0];a.clipOffset=[]},drawChartBox:function(){var a=this.options.chart,b=this.renderer,c=this.chartWidth,e=this.chartHeight,h=this.chartBackground,l=this.plotBackground,f=this.plotBorder,d,k,g=this.plotLeft,n=this.plotTop,y=this.plotWidth,m=this.plotHeight,r=this.plotBox, |
C=this.clipRect,q=this.clipBox,D="animate";h||(this.chartBackground=h=b.rect().addClass("highcharts-background").add(),D="attr");d=k=h.strokeWidth();h[D]({x:k/2,y:k/2,width:c-k-d%2,height:e-k-d%2,r:a.borderRadius});D="animate";l||(D="attr",this.plotBackground=l=b.rect().addClass("highcharts-plot-background").add());l[D](r);C?C.animate({width:q.width,height:q.height}):this.clipRect=b.clipRect(q);D="animate";f||(D="attr",this.plotBorder=f=b.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()); |
f[D](f.crisp({x:g,y:n,width:y,height:m},-f.strokeWidth()));this.isDirtyBox=!1},propFromSeries:function(){var a=this,b=a.options.chart,c,e=a.options.series,h,l;f(["inverted","angular","polar"],function(f){c=J[b.type||b.defaultSeriesType];l=b[f]||c&&c.prototype[f];for(h=e&&e.length;!l&&h--;)(c=J[e[h].type])&&c.prototype[f]&&(l=!0);a[f]=l})},linkSeries:function(){var a=this,b=a.series;f(b,function(a){a.linkedSeries.length=0});f(b,function(b){var c=b.options.linkedTo;F(c)&&(c=":previous"===c?a.series[b.index- |
1]:a.get(c))&&c.linkedParent!==b&&(c.linkedSeries.push(b),b.linkedParent=c,b.visible=y(b.options.visible,c.options.visible,b.visible))})},renderSeries:function(){f(this.series,function(a){a.translate();a.render()})},renderLabels:function(){var a=this,b=a.options.labels;b.items&&f(b.items,function(c){var e=q(b.style,c.style),h=D(e.left)+a.plotLeft,l=D(e.top)+a.plotTop+12;delete e.left;delete e.top;a.renderer.text(c.html,h,l).attr({zIndex:2}).css(e).add()})},render:function(){var a=this.axes,b=this.renderer, |
c=this.options,e,h,l;this.setTitle();this.legend=new G(this,c.legend);this.getStacks&&this.getStacks();this.getMargins(!0);this.setChartSize();c=this.plotWidth;e=this.plotHeight-=21;f(a,function(a){a.setScale()});this.getAxisMargins();h=1.1<c/this.plotWidth;l=1.05<e/this.plotHeight;if(h||l)f(a,function(a){(a.horiz&&h||!a.horiz&&l)&&a.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries&&f(a,function(a){a.visible&&a.render()});this.seriesGroup||(this.seriesGroup=b.g("series-group").attr({zIndex:3}).add()); |
this.renderSeries();this.renderLabels();this.addCredits();this.setResponsive&&this.setResponsive();this.hasRendered=!0},addCredits:function(a){var b=this;a=I(!0,this.options.credits,a);a.enabled&&!this.credits&&(this.credits=this.renderer.text(a.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){a.href&&(K.location.href=a.href)}).attr({align:a.position.align,zIndex:8}).add().align(a.position),this.credits.update=function(a){b.credits=b.credits.destroy();b.addCredits(a)})}, |
destroy:function(){var b=this,e=b.axes,h=b.series,l=b.container,d,k=l&&l.parentNode;c(b,"destroy");b.renderer.forExport?a.erase(p,b):p[b.index]=void 0;a.chartCount--;b.renderTo.removeAttribute("data-highcharts-chart");C(b);for(d=e.length;d--;)e[d]=e[d].destroy();this.scroller&&this.scroller.destroy&&this.scroller.destroy();for(d=h.length;d--;)h[d]=h[d].destroy();f("title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" "), |
function(a){var c=b[a];c&&c.destroy&&(b[a]=c.destroy())});l&&(l.innerHTML="",C(l),k&&t(l));x(b,function(a,c){delete b[c]})},isReadyToRender:function(){var a=this;return r||K!=K.top||"complete"===v.readyState?!0:(v.attachEvent("onreadystatechange",function(){v.detachEvent("onreadystatechange",a.firstRender);"complete"===v.readyState&&a.firstRender()}),!1)},firstRender:function(){var a=this,b=a.options;if(a.isReadyToRender()){a.getContainer();c(a,"init");a.resetMargins();a.setChartSize();a.propFromSeries(); |
a.getAxes();f(b.series||[],function(b){a.initSeries(b)});a.linkSeries();c(a,"beforeRender");L&&(a.pointer=new L(a,b));a.render();if(!a.renderer.imgCount&&a.onload)a.onload();a.temporaryDisplay(!0)}},onload:function(){f([this.callback].concat(this.callbacks),function(a){a&&void 0!==this.index&&a.apply(this,[this])},this);c(this,"load");c(this,"render");k(this.index)&&!1!==this.options.chart.reflow&&this.initReflow();this.onload=null}})})(H);(function(a){var w,B=a.each,A=a.extend,v=a.erase,d=a.fireEvent, |
g=a.format,m=a.isArray,t=a.isNumber,p=a.pick,k=a.removeEvent;a.Point=w=function(){};a.Point.prototype={init:function(a,d,k){var c=a.chart.options.chart.colorCount;this.series=a;this.applyOptions(d,k);a.options.colorByPoint?(d=a.colorCounter,a.colorCounter++,a.colorCounter===c&&(a.colorCounter=0)):d=a.colorIndex;this.colorIndex=p(this.colorIndex,d);a.chart.pointCount++;return this},applyOptions:function(a,d){var f=this.series,c=f.options.pointValKey||f.pointValKey;a=w.prototype.optionsToObject.call(this, |
a);A(this,a);this.options=this.options?A(this.options,a):a;a.group&&delete this.group;c&&(this.y=this[c]);this.isNull=p(this.isValid&&!this.isValid(),null===this.x||!t(this.y,!0));this.selected&&(this.state="select");"name"in this&&void 0===d&&f.xAxis&&f.xAxis.hasNames&&(this.x=f.xAxis.nameToX(this));void 0===this.x&&f&&(this.x=void 0===d?f.autoIncrement(this):d);return this},optionsToObject:function(a){var f={},d=this.series,c=d.options.keys,b=c||d.pointArrayMap||["y"],l=b.length,e=0,k=0;if(t(a)|| |
null===a)f[b[0]]=a;else if(m(a))for(!c&&a.length>l&&(d=typeof a[0],"string"===d?f.name=a[0]:"number"===d&&(f.x=a[0]),e++);k<l;)c&&void 0===a[e]||(f[b[k]]=a[e]),e++,k++;else"object"===typeof a&&(f=a,a.dataLabels&&(d._hasPointLabels=!0),a.marker&&(d._hasPointMarkers=!0));return f},getClassName:function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+ |
this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")},getZone:function(){var a=this.series,d=a.zones,a=a.zoneAxis||"y",k=0,c;for(c=d[k];this[a]>=c.value;)c=d[++k];c&&c.color&&!this.options.color&&(this.color=c.color);return c},destroy:function(){var a=this.series.chart,d=a.hoverPoints,g;a.pointCount--;d&&(this.setState(),v(d,this),d.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut(); |
if(this.graphic||this.dataLabel)k(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(g in this)this[g]=null},destroyElements:function(){for(var a=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],d,k=6;k--;)d=a[k],this[d]&&(this[d]=this[d].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total|| |
this.stackTotal}},tooltipFormatter:function(a){var f=this.series,d=f.tooltipOptions,c=p(d.valueDecimals,""),b=d.valuePrefix||"",l=d.valueSuffix||"";B(f.pointArrayMap||["y"],function(e){e="{point."+e;if(b||l)a=a.replace(e+"}",b+e+"}"+l);a=a.replace(e+"}",e+":,."+c+"f}")});return g(a,{point:this,series:this.series})},firePointEvent:function(a,k,g){var c=this,b=this.series.options;(b.point.events[a]||c.options&&c.options.events&&c.options.events[a])&&this.importEvents();"click"===a&&b.allowPointSelect&& |
(g=function(a){c.select&&c.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});d(this,a,k,g)},visible:!0}})(H);(function(a){var w=a.addEvent,B=a.animObject,A=a.arrayMax,v=a.arrayMin,d=a.correctFloat,g=a.Date,m=a.defaultOptions,t=a.defined,p=a.each,k=a.erase,f=a.extend,q=a.fireEvent,u=a.grep,c=a.isArray,b=a.isNumber,l=a.isString,e=a.merge,n=a.objectEach,F=a.pick,G=a.removeEvent,E=a.splat,I=a.SVGElement,x=a.syncTimeout,L=a.win;a.Series=a.seriesType("line",null,{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3}, |
events:{},marker:{radius:4,states:{hover:{animation:{duration:50},enabled:!0,radiusPlus:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":a.numberFormat(this.y,-1)},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1E3,findNearestPointBy:"x"},{isCartesian:!0,pointClass:a.Point,sorted:!0, |
requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(a,b){var c=this,e,h=a.series,l;c.chart=a;c.options=b=c.setOptions(b);c.linkedSeries=[];c.bindAxes();f(c,{name:b.name,state:"",visible:!1!==b.visible,selected:!0===b.selected});e=b.events;n(e,function(a,b){w(c,b,a)});if(e&&e.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;c.getColor();c.getSymbol();p(c.parallelArrays,function(a){c[a+ |
"Data"]=[]});c.setData(b.data,!1);c.isCartesian&&(a.hasCartesianSeries=!0);h.length&&(l=h[h.length-1]);c._i=F(l&&l._i,-1)+1;a.orderSeries(this.insert(h))},insert:function(a){var c=this.options.index,e;if(b(c)){for(e=a.length;e--;)if(c>=F(a[e].options.index,a[e]._i)){a.splice(e+1,0,this);break}-1===e&&a.unshift(this);e+=1}else a.push(this);return F(e,a.length-1)},bindAxes:function(){var b=this,c=b.options,e=b.chart,l;p(b.axisTypes||[],function(h){p(e[h],function(a){l=a.options;if(c[h]===l.index||void 0!== |
c[h]&&c[h]===l.id||void 0===c[h]&&0===l.index)b.insert(a.series),b[h]=a,a.isDirty=!0});b[h]||b.optionalAxis===h||a.error(18,!0)})},updateParallelArrays:function(a,c){var e=a.series,l=arguments,h=b(c)?function(b){var h="y"===b&&e.toYData?e.toYData(a):a[b];e[b+"Data"][c]=h}:function(a){Array.prototype[c].apply(e[a+"Data"],Array.prototype.slice.call(l,2))};p(e.parallelArrays,h)},autoIncrement:function(){var a=this.options,b=this.xIncrement,c,e=a.pointIntervalUnit,b=F(b,a.pointStart,0);this.pointInterval= |
c=F(this.pointInterval,a.pointInterval,1);e&&(a=new g(b),"day"===e?a=+a[g.hcSetDate](a[g.hcGetDate]()+c):"month"===e?a=+a[g.hcSetMonth](a[g.hcGetMonth]()+c):"year"===e&&(a=+a[g.hcSetFullYear](a[g.hcGetFullYear]()+c)),c=a-b);this.xIncrement=b+c;return b},setOptions:function(a){var b=this.chart,c=b.options,l=c.plotOptions,h=(b.userOptions||{}).plotOptions||{},f=l[this.type];this.userOptions=a;b=e(f,l.series,a);this.tooltipOptions=e(m.tooltip,m.plotOptions.series&&m.plotOptions.series.tooltip,m.plotOptions[this.type].tooltip, |
c.tooltip.userOptions,l.series&&l.series.tooltip,l[this.type].tooltip,a.tooltip);this.stickyTracking=F(a.stickyTracking,h[this.type]&&h[this.type].stickyTracking,h.series&&h.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:b.stickyTracking);null===f.marker&&delete b.marker;this.zoneAxis=b.zoneAxis;a=this.zones=(b.zones||[]).slice();!b.negativeColor&&!b.negativeFillColor||b.zones||a.push({value:b[this.zoneAxis+"Threshold"]||b.threshold||0,className:"highcharts-negative"}); |
a.length&&t(a[a.length-1].value)&&a.push({});return b},getCyclic:function(a,b,c){var e,h=this.chart,l=this.userOptions,f=a+"Index",d=a+"Counter",k=c?c.length:F(h.options.chart[a+"Count"],h[a+"Count"]);b||(e=F(l[f],l["_"+f]),t(e)||(h.series.length||(h[d]=0),l["_"+f]=e=h[d]%k,h[d]+=1),c&&(b=c[e]));void 0!==e&&(this[f]=e);this[a]=b},getColor:function(){this.getCyclic("color")},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:a.LegendSymbolMixin.drawLineMarker, |
setData:function(e,f,d,k){var h=this,g=h.points,n=g&&g.length||0,m,y=h.options,q=h.chart,D=null,C=h.xAxis,x=y.turboThreshold,E=this.xData,u=this.yData,I=(m=h.pointArrayMap)&&m.length;e=e||[];m=e.length;f=F(f,!0);if(!1!==k&&m&&n===m&&!h.cropped&&!h.hasGroupedData&&h.visible)p(e,function(a,b){g[b].update&&a!==y.data[b]&&g[b].update(a,!1,null,!1)});else{h.xIncrement=null;h.colorCounter=0;p(this.parallelArrays,function(a){h[a+"Data"].length=0});if(x&&m>x){for(d=0;null===D&&d<m;)D=e[d],d++;if(b(D))for(d= |
0;d<m;d++)E[d]=this.autoIncrement(),u[d]=e[d];else if(c(D))if(I)for(d=0;d<m;d++)D=e[d],E[d]=D[0],u[d]=D.slice(1,I+1);else for(d=0;d<m;d++)D=e[d],E[d]=D[0],u[d]=D[1];else a.error(12)}else for(d=0;d<m;d++)void 0!==e[d]&&(D={series:h},h.pointClass.prototype.applyOptions.apply(D,[e[d]]),h.updateParallelArrays(D,d));l(u[0])&&a.error(14,!0);h.data=[];h.options.data=h.userOptions.data=e;for(d=n;d--;)g[d]&&g[d].destroy&&g[d].destroy();C&&(C.minRange=C.userMinRange);h.isDirty=q.isDirtyBox=!0;h.isDirtyData= |
!!g;d=!1}"point"===y.legendType&&(this.processData(),this.generatePoints());f&&q.redraw(d)},processData:function(b){var c=this.xData,e=this.yData,l=c.length,h;h=0;var f,d,k=this.xAxis,g,n=this.options;g=n.cropThreshold;var m=this.getExtremesFromAll||n.getExtremesFromAll,y=this.isCartesian,n=k&&k.val2lin,q=k&&k.isLog,p,x;if(y&&!this.isDirty&&!k.isDirty&&!this.yAxis.isDirty&&!b)return!1;k&&(b=k.getExtremes(),p=b.min,x=b.max);if(y&&this.sorted&&!m&&(!g||l>g||this.forceCrop))if(c[l-1]<p||c[0]>x)c=[], |
e=[];else if(c[0]<p||c[l-1]>x)h=this.cropData(this.xData,this.yData,p,x),c=h.xData,e=h.yData,h=h.start,f=!0;for(g=c.length||1;--g;)l=q?n(c[g])-n(c[g-1]):c[g]-c[g-1],0<l&&(void 0===d||l<d)?d=l:0>l&&this.requireSorting&&a.error(15);this.cropped=f;this.cropStart=h;this.processedXData=c;this.processedYData=e;this.closestPointRange=d},cropData:function(a,b,c,e){var h=a.length,l=0,f=h,d=F(this.cropShoulder,1),k;for(k=0;k<h;k++)if(a[k]>=c){l=Math.max(0,k-d);break}for(c=k;c<h;c++)if(a[c]>e){f=c+d;break}return{xData:a.slice(l, |
f),yData:b.slice(l,f),start:l,end:f}},generatePoints:function(){var a=this.options,b=a.data,c=this.data,e,h=this.processedXData,l=this.processedYData,f=this.pointClass,d=h.length,k=this.cropStart||0,g,n=this.hasGroupedData,a=a.keys,m,q=[],p;c||n||(c=[],c.length=b.length,c=this.data=c);a&&n&&(this.options.keys=!1);for(p=0;p<d;p++)g=k+p,n?(m=(new f).init(this,[h[p]].concat(E(l[p]))),m.dataGroup=this.groupMap[p]):(m=c[g])||void 0===b[g]||(c[g]=m=(new f).init(this,b[g],h[p])),m&&(m.index=g,q[p]=m);this.options.keys= |
a;if(c&&(d!==(e=c.length)||n))for(p=0;p<e;p++)p!==k||n||(p+=d),c[p]&&(c[p].destroyElements(),c[p].plotX=void 0);this.data=c;this.points=q},getExtremes:function(a){var e=this.yAxis,l=this.processedXData,f,h=[],d=0;f=this.xAxis.getExtremes();var k=f.min,g=f.max,n,m,y,p;a=a||this.stackedYData||this.processedYData||[];f=a.length;for(p=0;p<f;p++)if(m=l[p],y=a[p],n=(b(y,!0)||c(y))&&(!e.positiveValuesOnly||y.length||0<y),m=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(l[p]||m)>= |
k&&(l[p]||m)<=g,n&&m)if(n=y.length)for(;n--;)null!==y[n]&&(h[d++]=y[n]);else h[d++]=y;this.dataMin=v(h);this.dataMax=A(h)},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,c=a.stacking,e=this.xAxis,l=e.categories,h=this.yAxis,f=this.points,k=f.length,g=!!this.modifyValue,n=a.pointPlacement,m="between"===n||b(n),p=a.threshold,q=a.startFromThreshold?p:0,x,E,u,I,L=Number.MAX_VALUE;"between"===n&&(n=.5);b(n)&&(n*=F(a.pointRange||e.pointRange));for(a= |
0;a<k;a++){var v=f[a],G=v.x,w=v.y;E=v.low;var A=c&&h.stacks[(this.negStacks&&w<(q?0:p)?"-":"")+this.stackKey],B;h.positiveValuesOnly&&null!==w&&0>=w&&(v.isNull=!0);v.plotX=x=d(Math.min(Math.max(-1E5,e.translate(G,0,0,0,1,n,"flags"===this.type)),1E5));c&&this.visible&&!v.isNull&&A&&A[G]&&(I=this.getStackIndicator(I,G,this.index),B=A[G],w=B.points[I.key],E=w[0],w=w[1],E===q&&I.key===A[G].base&&(E=F(p,h.min)),h.positiveValuesOnly&&0>=E&&(E=null),v.total=v.stackTotal=B.total,v.percentage=B.total&&v.y/ |
B.total*100,v.stackY=w,B.setOffset(this.pointXOffset||0,this.barW||0));v.yBottom=t(E)?h.translate(E,0,1,0,1):null;g&&(w=this.modifyValue(w,v));v.plotY=E="number"===typeof w&&Infinity!==w?Math.min(Math.max(-1E5,h.translate(w,0,1,0,1)),1E5):void 0;v.isInside=void 0!==E&&0<=E&&E<=h.len&&0<=x&&x<=e.len;v.clientX=m?d(e.translate(G,0,0,0,1,n)):x;v.negative=v.y<(p||0);v.category=l&&void 0!==l[v.x]?l[v.x]:v.x;v.isNull||(void 0!==u&&(L=Math.min(L,Math.abs(x-u))),u=x);v.zone=this.zones.length&&v.getZone()}this.closestPointRangePx= |
L},getValidPoints:function(a,b){var c=this.chart;return u(a||this.points||[],function(a){return b&&!c.isInsidePlot(a.plotX,a.plotY,c.inverted)?!1:!a.isNull})},setClip:function(a){var b=this.chart,c=this.options,e=b.renderer,l=b.inverted,f=this.clipBox,d=f||b.clipBox,k=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,d.height,c.xAxis,c.yAxis].join(),g=b[k],n=b[k+"m"];g||(a&&(d.width=0,b[k+"m"]=n=e.clipRect(-99,l?-b.plotLeft:-b.plotTop,99,l?b.chartWidth:b.chartHeight)),b[k]=g=e.clipRect(d), |
g.count={length:0});a&&!g.count[this.index]&&(g.count[this.index]=!0,g.count.length+=1);!1!==c.clip&&(this.group.clip(a||f?g:b.clipRect),this.markerGroup.clip(n),this.sharedClipKey=k);a||(g.count[this.index]&&(delete g.count[this.index],--g.count.length),0===g.count.length&&k&&b[k]&&(f||(b[k]=b[k].destroy()),b[k+"m"]&&(b[k+"m"]=b[k+"m"].destroy())))},animate:function(a){var b=this.chart,c=B(this.options.animation),e;a?this.setClip(c):(e=this.sharedClipKey,(a=b[e])&&a.animate({width:b.plotSizeX},c), |
b[e+"m"]&&b[e+"m"].animate({width:b.plotSizeX+99},c),this.animate=null)},afterAnimate:function(){this.setClip();q(this,"afterAnimate");this.finishedAnimating=!0},drawPoints:function(){var a=this.points,c=this.chart,e,l,h,f,d=this.options.marker,k,g,n,m,p=this[this.specialGroup]||this.markerGroup,q=F(d.enabled,this.xAxis.isRadial?!0:null,this.closestPointRangePx>=2*d.radius);if(!1!==d.enabled||this._hasPointMarkers)for(l=0;l<a.length;l++)h=a[l],e=h.plotY,f=h.graphic,k=h.marker||{},g=!!h.marker,n=q&& |
void 0===k.enabled||k.enabled,m=h.isInside,n&&b(e)&&null!==h.y?(e=F(k.symbol,this.symbol),h.hasImage=0===e.indexOf("url"),n=this.markerAttribs(h,h.selected&&"select"),f?f[m?"show":"hide"](!0).animate(n):m&&(0<n.width||h.hasImage)&&(h.graphic=f=c.renderer.symbol(e,n.x,n.y,n.width,n.height,g?k:d).add(p)),f&&f.addClass(h.getClassName(),!0)):f&&(h.graphic=f.destroy())},markerAttribs:function(a,b){var c=this.options.marker,e=a.marker||{},l=F(e.radius,c.radius);b&&(c=c.states[b],b=e.states&&e.states[b], |
l=F(b&&b.radius,c&&c.radius,l+(c&&c.radiusPlus||0)));a.hasImage&&(l=0);a={x:Math.floor(a.plotX)-l,y:a.plotY-l};l&&(a.width=a.height=2*l);return a},destroy:function(){var a=this,b=a.chart,c=/AppleWebKit\/533/.test(L.navigator.userAgent),e,l,f=a.data||[],d,g;q(a,"destroy");G(a);p(a.axisTypes||[],function(b){(g=a[b])&&g.series&&(k(g.series,a),g.isDirty=g.forceRedraw=!0)});a.legendItem&&a.chart.legend.destroyItem(a);for(l=f.length;l--;)(d=f[l])&&d.destroy&&d.destroy();a.points=null;clearTimeout(a.animationTimeout); |
n(a,function(a,b){a instanceof I&&!a.survive&&(e=c&&"group"===b?"hide":"destroy",a[e]())});b.hoverSeries===a&&(b.hoverSeries=null);k(b.series,a);b.orderSeries();n(a,function(b,c){delete a[c]})},getGraphPath:function(a,b,c){var e=this,l=e.options,f=l.step,d,k=[],g=[],n;a=a||e.points;(d=a.reversed)&&a.reverse();(f={right:1,center:2}[f]||f&&3)&&d&&(f=4-f);!l.connectNulls||b||c||(a=this.getValidPoints(a));p(a,function(h,d){var m=h.plotX,p=h.plotY,r=a[d-1];(h.leftCliff||r&&r.rightCliff)&&!c&&(n=!0);h.isNull&& |
!t(b)&&0<d?n=!l.connectNulls:h.isNull&&!b?n=!0:(0===d||n?d=["M",h.plotX,h.plotY]:e.getPointSpline?d=e.getPointSpline(a,h,d):f?(d=1===f?["L",r.plotX,p]:2===f?["L",(r.plotX+m)/2,r.plotY,"L",(r.plotX+m)/2,p]:["L",m,r.plotY],d.push("L",m,p)):d=["L",m,p],g.push(h.x),f&&g.push(h.x),k.push.apply(k,d),n=!1)});k.xMap=g;return e.graphPath=k},drawGraph:function(){var a=this,b=(this.gappedPath||this.getGraphPath).call(this),c=[["graph","highcharts-graph"]];p(this.zones,function(a,b){c.push(["zone-graph-"+b,"highcharts-graph highcharts-zone-graph-"+ |
b+" "+(a.className||"")])});p(c,function(c,e){e=c[0];var l=a[e];l?(l.endX=b.xMap,l.animate({d:b})):b.length&&(a[e]=a.chart.renderer.path(b).addClass(c[1]).attr({zIndex:1}).add(a.group));l&&(l.startX=b.xMap,l.isArea=b.isArea)})},applyZones:function(){var a=this,b=this.chart,c=b.renderer,e=this.zones,l,f,d=this.clips||[],k,g=this.graph,n=this.area,m=Math.max(b.chartWidth,b.chartHeight),q=this[(this.zoneAxis||"y")+"Axis"],x,E,u=b.inverted,I,t,L,v,G=!1;e.length&&(g||n)&&q&&void 0!==q.min&&(E=q.reversed, |
I=q.horiz,g&&g.hide(),n&&n.hide(),x=q.getExtremes(),p(e,function(e,h){l=E?I?b.plotWidth:0:I?0:q.toPixels(x.min);l=Math.min(Math.max(F(f,l),0),m);f=Math.min(Math.max(Math.round(q.toPixels(F(e.value,x.max),!0)),0),m);G&&(l=f=q.toPixels(x.max));t=Math.abs(l-f);L=Math.min(l,f);v=Math.max(l,f);q.isXAxis?(k={x:u?v:L,y:0,width:t,height:m},I||(k.x=b.plotHeight-k.x)):(k={x:0,y:u?v:L,width:m,height:t},I&&(k.y=b.plotWidth-k.y));d[h]?d[h].animate(k):(d[h]=c.clipRect(k),g&&a["zone-graph-"+h].clip(d[h]),n&&a["zone-area-"+ |
h].clip(d[h]));G=e.value>x.max}),this.clips=d)},invertGroups:function(a){function b(){p(["group","markerGroup"],function(b){c[b]&&(e.renderer.isVML&&c[b].attr({width:c.yAxis.len,height:c.xAxis.len}),c[b].width=c.yAxis.len,c[b].height=c.xAxis.len,c[b].invert(a))})}var c=this,e=c.chart,l;c.xAxis&&(l=w(e,"resize",b),w(c,"destroy",l),b(a),c.invertGroups=b)},plotGroup:function(a,b,c,e,l){var h=this[a],f=!h;f&&(this[a]=h=this.chart.renderer.g().attr({zIndex:e||.1}).add(l));h.addClass("highcharts-"+b+" highcharts-series-"+ |
this.index+" highcharts-"+this.type+"-series highcharts-color-"+this.colorIndex+" "+(this.options.className||""),!0);h.attr({visibility:c})[f?"attr":"animate"](this.getPlotBox());return h},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;a.inverted&&(b=c,c=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,c,e=a.options,l=!!a.animate&&b.renderer.isSVG&&B(e.animation).duration,f=a.visible?"inherit": |
"hidden",d=e.zIndex,k=a.hasRendered,g=b.seriesGroup,n=b.inverted;c=a.plotGroup("group","series",f,d,g);a.markerGroup=a.plotGroup("markerGroup","markers",f,d,g);l&&a.animate(!0);c.inverted=a.isCartesian?n:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());a.drawDataLabels&&a.drawDataLabels();a.visible&&a.drawPoints();a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();a.invertGroups(n);!1===e.clip||a.sharedClipKey||k||c.clip(b.clipRect);l&&a.animate();k||(a.animationTimeout=x(function(){a.afterAnimate()}, |
l));a.isDirty=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirty||this.isDirtyData,c=this.group,e=this.xAxis,l=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:F(e&&e.left,a.plotLeft),translateY:F(l&&l.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var c=this.xAxis,e=this.yAxis,l=this.chart.inverted;return this.searchKDTree({clientX:l?c.len-a.chartY+ |
c.pos:a.chartX-c.pos,plotY:l?e.len-a.chartX+e.pos:a.chartY-e.pos},b)},buildKDTree:function(){function a(c,e,l){var f,h;if(h=c&&c.length)return f=b.kdAxisArray[e%l],c.sort(function(a,b){return a[f]-b[f]}),h=Math.floor(h/2),{point:c[h],left:a(c.slice(0,h),e+1,l),right:a(c.slice(h+1),e+1,l)}}this.buildingKdTree=!0;var b=this,c=-1<b.options.findNearestPointBy.indexOf("y")?2:1;delete b.kdTree;x(function(){b.kdTree=a(b.getValidPoints(null,!b.directTouch),c,c);b.buildingKdTree=!1},b.options.kdNow?0:1)}, |
searchKDTree:function(a,b){function c(a,b,h,k){var g=b.point,n=e.kdAxisArray[h%k],m,p,q=g;p=t(a[l])&&t(g[l])?Math.pow(a[l]-g[l],2):null;m=t(a[f])&&t(g[f])?Math.pow(a[f]-g[f],2):null;m=(p||0)+(m||0);g.dist=t(m)?Math.sqrt(m):Number.MAX_VALUE;g.distX=t(p)?Math.sqrt(p):Number.MAX_VALUE;n=a[n]-g[n];m=0>n?"left":"right";p=0>n?"right":"left";b[m]&&(m=c(a,b[m],h+1,k),q=m[d]<q[d]?m:g);b[p]&&Math.sqrt(n*n)<q[d]&&(a=c(a,b[p],h+1,k),q=a[d]<q[d]?a:q);return q}var e=this,l=this.kdAxisArray[0],f=this.kdAxisArray[1], |
d=b?"distX":"dist";b=-1<e.options.findNearestPointBy.indexOf("y")?2:1;this.kdTree||this.buildingKdTree||this.buildKDTree();if(this.kdTree)return c(a,this.kdTree,b,b)}})})(H);(function(a){var w=a.addEvent,B=a.Axis,A=a.createElement,v=a.css,d=a.defined,g=a.each,m=a.erase,t=a.extend,p=a.fireEvent,k=a.inArray,f=a.isNumber,q=a.isObject,u=a.isArray,c=a.merge,b=a.objectEach,l=a.pick,e=a.Point,n=a.Series,F=a.seriesTypes,G=a.setAnimation,E=a.splat;t(a.Chart.prototype,{addSeries:function(a,b,c){var e,f=this; |
a&&(b=l(b,!0),p(f,"addSeries",{options:a},function(){e=f.initSeries(a);f.isDirtyLegend=!0;f.linkSeries();b&&f.redraw(c)}));return e},addAxis:function(a,b,e,f){var d=b?"xAxis":"yAxis",k=this.options;a=c(a,{index:this[d].length,isX:b});b=new B(this,a);k[d]=E(k[d]||{});k[d].push(a);l(e,!0)&&this.redraw(f);return b},showLoading:function(a){var b=this,c=b.options,e=b.loadingDiv,l=function(){e&&v(e,{left:b.plotLeft+"px",top:b.plotTop+"px",width:b.plotWidth+"px",height:b.plotHeight+"px"})};e||(b.loadingDiv= |
e=A("div",{className:"highcharts-loading highcharts-loading-hidden"},null,b.container),b.loadingSpan=A("span",{className:"highcharts-loading-inner"},null,e),w(b,"redraw",l));e.className="highcharts-loading";b.loadingSpan.innerHTML=a||c.lang.loading;b.loadingShown=!0;l()},hideLoading:function(){var a=this.loadingDiv;a&&(a.className="highcharts-loading highcharts-loading-hidden");this.loadingShown=!1},propsRequireDirtyBox:"backgroundColor borderColor borderWidth margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "), |
propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions tooltip".split(" "),update:function(a,e,n){var m=this,p={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle"},q=a.chart,x,h,r=[];if(q){c(!0,m.options.chart,q);"className"in q&&m.setClassName(q.className);if("inverted"in q||"polar"in q)m.propFromSeries(),x=!0;"alignTicks"in q&&(x=!0);b(q,function(a,b){-1!==k("chart."+b,m.propsRequireUpdateSeries)&&(h=!0);-1!==k(b,m.propsRequireDirtyBox)&& |
(m.isDirtyBox=!0)})}a.plotOptions&&c(!0,this.options.plotOptions,a.plotOptions);b(a,function(a,b){if(m[b]&&"function"===typeof m[b].update)m[b].update(a,!1);else if("function"===typeof m[p[b]])m[p[b]](a);"chart"!==b&&-1!==k(b,m.propsRequireUpdateSeries)&&(h=!0)});g("xAxis yAxis zAxis series colorAxis pane".split(" "),function(b){a[b]&&(g(E(a[b]),function(a,c){(c=d(a.id)&&m.get(a.id)||m[b][c])&&c.coll===b&&(c.update(a,!1),n&&(c.touched=!0));if(!c&&n)if("series"===b)m.addSeries(a,!1).touched=!0;else if("xAxis"=== |
b||"yAxis"===b)m.addAxis(a,"xAxis"===b,!1).touched=!0}),n&&g(m[b],function(a){a.touched?delete a.touched:r.push(a)}))});g(r,function(a){a.remove(!1)});x&&g(m.axes,function(a){a.update({},!1)});h&&g(m.series,function(a){a.update({},!1)});a.loading&&c(!0,m.options.loading,a.loading);x=q&&q.width;q=q&&q.height;f(x)&&x!==m.chartWidth||f(q)&&q!==m.chartHeight?m.setSize(x,q):l(e,!0)&&m.redraw()},setSubtitle:function(a){this.setTitle(void 0,a)}});t(e.prototype,{update:function(a,b,c,e){function f(){d.applyOptions(a); |
null===d.y&&h&&(d.graphic=h.destroy());q(a,!0)&&(h&&h.element&&a&&a.marker&&void 0!==a.marker.symbol&&(d.graphic=h.destroy()),a&&a.dataLabels&&d.dataLabel&&(d.dataLabel=d.dataLabel.destroy()));g=d.index;k.updateParallelArrays(d,g);m.data[g]=q(m.data[g],!0)||q(a,!0)?d.options:a;k.isDirty=k.isDirtyData=!0;!k.fixedBox&&k.hasCartesianSeries&&(n.isDirtyBox=!0);"point"===m.legendType&&(n.isDirtyLegend=!0);b&&n.redraw(c)}var d=this,k=d.series,h=d.graphic,g,n=k.chart,m=k.options;b=l(b,!0);!1===e?f():d.firePointEvent("update", |
{options:a},f)},remove:function(a,b){this.series.removePoint(k(this,this.series.data),a,b)}});t(n.prototype,{addPoint:function(a,b,c,e){var f=this.options,d=this.data,k=this.chart,h=this.xAxis,h=h&&h.hasNames&&h.names,g=f.data,n,m,p=this.xData,q,x;b=l(b,!0);n={series:this};this.pointClass.prototype.applyOptions.apply(n,[a]);x=n.x;q=p.length;if(this.requireSorting&&x<p[q-1])for(m=!0;q&&p[q-1]>x;)q--;this.updateParallelArrays(n,"splice",q,0,0);this.updateParallelArrays(n,q);h&&n.name&&(h[x]=n.name); |
g.splice(q,0,a);m&&(this.data.splice(q,0,null),this.processData());"point"===f.legendType&&this.generatePoints();c&&(d[0]&&d[0].remove?d[0].remove(!1):(d.shift(),this.updateParallelArrays(n,"shift"),g.shift()));this.isDirtyData=this.isDirty=!0;b&&k.redraw(e)},removePoint:function(a,b,c){var e=this,f=e.data,d=f[a],k=e.points,h=e.chart,g=function(){k&&k.length===f.length&&k.splice(a,1);f.splice(a,1);e.options.data.splice(a,1);e.updateParallelArrays(d||{series:e},"splice",a,1);d&&d.destroy();e.isDirty= |
!0;e.isDirtyData=!0;b&&h.redraw()};G(c,h);b=l(b,!0);d?d.firePointEvent("remove",null,g):g()},remove:function(a,b,c){function e(){f.destroy();d.isDirtyLegend=d.isDirtyBox=!0;d.linkSeries();l(a,!0)&&d.redraw(b)}var f=this,d=f.chart;!1!==c?p(f,"remove",null,e):e()},update:function(a,b){var e=this,f=e.chart,d=e.userOptions,k=e.oldType||e.type,n=a.type||d.type||f.options.chart.type,h=F[k].prototype,m,q=["group","markerGroup","dataLabelsGroup","navigatorSeries","baseSeries"],p=e.finishedAnimating&&{animation:!1}; |
if(Object.keys&&"data"===Object.keys(a).toString())return this.setData(a.data,b);if(n&&n!==k||void 0!==a.zIndex)q.length=0;g(q,function(a){q[a]=e[a];delete e[a]});a=c(d,p,{index:e.index,pointStart:e.xData[0]},{data:e.options.data},a);e.remove(!1,null,!1);for(m in h)e[m]=void 0;t(e,F[n||k].prototype);g(q,function(a){e[a]=q[a]});e.init(f,a);e.oldType=k;f.linkSeries();l(b,!0)&&f.redraw(!1)}});t(B.prototype,{update:function(a,b){var e=this.chart;a=e.options[this.coll][this.options.index]=c(this.userOptions, |
a);this.destroy(!0);this.init(e,t(a,{events:void 0}));e.isDirtyBox=!0;l(b,!0)&&e.redraw()},remove:function(a){for(var b=this.chart,c=this.coll,e=this.series,f=e.length;f--;)e[f]&&e[f].remove(!1);m(b.axes,this);m(b[c],this);u(b.options[c])?b.options[c].splice(this.options.index,1):delete b.options[c];g(b[c],function(a,b){a.options.index=b});this.destroy();b.isDirtyBox=!0;l(a,!0)&&b.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}})})(H); |
(function(a){var w=a.animObject,B=a.each,A=a.extend,v=a.isNumber,d=a.merge,g=a.pick,m=a.Series,t=a.seriesType,p=a.svg;t("column","line",{borderRadius:0,crisp:!0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1}},dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0},{cropShoulder:0,directTouch:!0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0, |
init:function(){m.prototype.init.apply(this,arguments);var a=this,f=a.chart;f.hasRendered&&B(f.series,function(f){f.type===a.type&&(f.isDirty=!0)})},getColumnMetrics:function(){var a=this,f=a.options,d=a.xAxis,m=a.yAxis,c=d.reversed,b,l={},e=0;!1===f.grouping?e=1:B(a.chart.series,function(c){var f=c.options,d=c.yAxis,k;c.type!==a.type||!c.visible&&a.chart.options.chart.ignoreHiddenSeries||m.len!==d.len||m.pos!==d.pos||(f.stacking?(b=c.stackKey,void 0===l[b]&&(l[b]=e++),k=l[b]):!1!==f.grouping&&(k= |
e++),c.columnIndex=k)});var n=Math.min(Math.abs(d.transA)*(d.ordinalSlope||f.pointRange||d.closestPointRange||d.tickInterval||1),d.len),p=n*f.groupPadding,t=(n-2*p)/(e||1),f=Math.min(f.maxPointWidth||d.len,g(f.pointWidth,t*(1-2*f.pointPadding)));a.columnMetrics={width:f,offset:(t-f)/2+(p+((a.columnIndex||0)+(c?1:0))*t-n/2)*(c?-1:1)};return a.columnMetrics},crispCol:function(a,f,d,g){var c=this.chart,b=this.borderWidth,l=-(b%2?.5:0),b=b%2?.5:1;c.inverted&&c.renderer.isVML&&(b+=1);this.options.crisp&& |
(d=Math.round(a+d)+l,a=Math.round(a)+l,d-=a);g=Math.round(f+g)+b;l=.5>=Math.abs(f)&&.5<g;f=Math.round(f)+b;g-=f;l&&g&&(--f,g+=1);return{x:a,y:f,width:d,height:g}},translate:function(){var a=this,f=a.chart,d=a.options,p=a.dense=2>a.closestPointRange*a.xAxis.transA,p=a.borderWidth=g(d.borderWidth,p?0:1),c=a.yAxis,b=a.translatedThreshold=c.getThreshold(d.threshold),l=g(d.minPointLength,5),e=a.getColumnMetrics(),n=e.width,t=a.barW=Math.max(n,1+2*p),v=a.pointXOffset=e.offset;f.inverted&&(b-=.5);d.pointPadding&& |
(t=Math.ceil(t));m.prototype.translate.apply(a);B(a.points,function(e){var d=g(e.yBottom,b),k=999+Math.abs(d),k=Math.min(Math.max(-k,e.plotY),c.len+k),m=e.plotX+v,p=t,q=Math.min(k,d),E,u=Math.max(k,d)-q;Math.abs(u)<l&&l&&(u=l,E=!c.reversed&&!e.negative||c.reversed&&e.negative,q=Math.abs(q-b)>l?d-l:b-(E?l:0));e.barX=m;e.pointWidth=n;e.tooltipPos=f.inverted?[c.len+c.pos-f.plotLeft-k,a.xAxis.len-m-p/2,u]:[m+p/2,k+c.pos-f.plotTop,u];e.shapeType="rect";e.shapeArgs=a.crispCol.apply(a,e.isNull?[m,b,p,0]: |
[m,q,p,u])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},drawPoints:function(){var a=this,f=this.chart,g=a.options,m=f.renderer,c=g.animationLimit||250,b;B(a.points,function(l){var e=l.graphic;if(v(l.plotY)&&null!==l.y){b=l.shapeArgs;if(e)e[f.pointCount<c?"animate":"attr"](d(b));else l.graphic=e=m[l.shapeType](b).add(l.group||a.group);g.borderRadius&&e.attr({r:g.borderRadius});e.addClass(l.getClassName(), |
!0)}else e&&(l.graphic=e.destroy())})},animate:function(a){var d=this,g=this.yAxis,k=d.options,c=this.chart.inverted,b={};p&&(a?(b.scaleY=.001,a=Math.min(g.pos+g.len,Math.max(g.pos,g.toPixels(k.threshold))),c?b.translateX=a-g.len:b.translateY=a,d.group.attr(b)):(b[c?"translateX":"translateY"]=g.pos,d.group.animate(b,A(w(d.options.animation),{step:function(a,b){d.group.attr({scaleY:Math.max(.001,b.pos)})}})),d.animate=null))},remove:function(){var a=this,d=a.chart;d.hasRendered&&B(d.series,function(d){d.type=== |
a.type&&(d.isDirty=!0)});m.prototype.remove.apply(a,arguments)}})})(H);(function(a){var w=a.Series;a=a.seriesType;a("scatter","line",{lineWidth:0,findNearestPointBy:"xy",marker:{enabled:!0},tooltip:{headerFormat:'\x3cspan class\x3d"highcharts-color-{point.colorIndex}"\x3e\u25cf\x3c/span\x3e \x3cspan class\x3d"highcharts-header"\x3e {series.name}\x3c/span\x3e\x3cbr/\x3e',pointFormat:"x: \x3cb\x3e{point.x}\x3c/b\x3e\x3cbr/\x3ey: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3e"}},{sorted:!1,requireSorting:!1, |
noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&w.prototype.drawGraph.call(this)}})})(H);(function(a){var w=a.addEvent,B=a.arrayMax,A=a.defined,v=a.each,d=a.extend,g=a.format,m=a.map,t=a.merge,p=a.noop,k=a.pick,f=a.relativeLength,q=a.Series,u=a.seriesTypes,c=a.stableSort;a.distribute=function(a,l){function b(a,b){return a.target-b.target}var d,f=!0,g=a,k=[],p;p=0;for(d=a.length;d--;)p+=a[d].size;if(p>l){c(a, |
function(a,b){return(b.rank||0)-(a.rank||0)});for(p=d=0;p<=l;)p+=a[d].size,d++;k=a.splice(d-1,a.length)}c(a,b);for(a=m(a,function(a){return{size:a.size,targets:[a.target]}});f;){for(d=a.length;d--;)f=a[d],p=(Math.min.apply(0,f.targets)+Math.max.apply(0,f.targets))/2,f.pos=Math.min(Math.max(0,p-f.size/2),l-f.size);d=a.length;for(f=!1;d--;)0<d&&a[d-1].pos+a[d-1].size>a[d].pos&&(a[d-1].size+=a[d].size,a[d-1].targets=a[d-1].targets.concat(a[d].targets),a[d-1].pos+a[d-1].size>l&&(a[d-1].pos=l-a[d-1].size), |
a.splice(d,1),f=!0)}d=0;v(a,function(a){var b=0;v(a.targets,function(){g[d].pos=a.pos+b;b+=g[d].size;d++})});g.push.apply(g,k);c(g,b)};q.prototype.drawDataLabels=function(){var b=this,c=b.options,e=c.dataLabels,d=b.points,f,m,p=b.hasRendered||0,q,x,u=k(e.defer,!!c.animation),y=b.chart.renderer;if(e.enabled||b._hasPointLabels)b.dlProcessOptions&&b.dlProcessOptions(e),x=b.plotGroup("dataLabelsGroup","data-labels",u&&!p?"hidden":"visible",e.zIndex||6),u&&(x.attr({opacity:+p}),p||w(b,"afterAnimate",function(){b.visible&& |
x.show(!0);x[c.animation?"animate":"attr"]({opacity:1},{duration:200})})),m=e,v(d,function(c){var d,l=c.dataLabel,h,n,p=c.connector,E=!l;f=c.dlOptions||c.options&&c.options.dataLabels;if(d=k(f&&f.enabled,m.enabled)&&null!==c.y)e=t(m,f),h=c.getLabelConfig(),q=e.format?g(e.format,h):e.formatter.call(h,e),h=e.rotation,n={r:e.borderRadius||0,rotation:h,padding:e.padding,zIndex:1},a.objectEach(n,function(a,b){void 0===a&&delete n[b]});!l||d&&A(q)?d&&A(q)&&(l?n.text=q:(l=c.dataLabel=y[h?"text":"label"](q, |
0,-9999,e.shape,null,null,e.useHTML,null,"data-label"),l.addClass("highcharts-data-label-color-"+c.colorIndex+" "+(e.className||"")+(e.useHTML?"highcharts-tracker":""))),l.attr(n),l.added||l.add(x),b.alignDataLabel(c,l,e,null,E)):(c.dataLabel=l=l.destroy(),p&&(c.connector=p.destroy()))})};q.prototype.alignDataLabel=function(a,c,e,f,g){var b=this.chart,l=b.inverted,n=k(a.plotX,-9999),m=k(a.plotY,-9999),p=c.getBBox(),q,u=e.rotation,t=e.align,v=this.visible&&(a.series.forceDL||b.isInsidePlot(n,Math.round(m), |
l)||f&&b.isInsidePlot(n,l?f.x+1:f.y+f.height-1,l)),h="justify"===k(e.overflow,"justify");if(v&&(q=b.renderer.fontMetrics(void 0,c).b,f=d({x:l?this.yAxis.len-m:n,y:Math.round(l?this.xAxis.len-n:m),width:0,height:0},f),d(e,{width:p.width,height:p.height}),u?(h=!1,n=b.renderer.rotCorr(q,u),n={x:f.x+e.x+f.width/2+n.x,y:f.y+e.y+{top:0,middle:.5,bottom:1}[e.verticalAlign]*f.height},c[g?"attr":"animate"](n).attr({align:t}),m=(u+720)%360,m=180<m&&360>m,"left"===t?n.y-=m?p.height:0:"center"===t?(n.x-=p.width/ |
2,n.y-=p.height/2):"right"===t&&(n.x-=p.width,n.y-=m?0:p.height)):(c.align(e,null,f),n=c.alignAttr),h?a.isLabelJustified=this.justifyDataLabel(c,e,n,p,f,g):k(e.crop,!0)&&(v=b.isInsidePlot(n.x,n.y)&&b.isInsidePlot(n.x+p.width,n.y+p.height)),e.shape&&!u))c[g?"attr":"animate"]({anchorX:l?b.plotWidth-a.plotY:a.plotX,anchorY:l?b.plotHeight-a.plotX:a.plotY});v||(c.attr({y:-9999}),c.placed=!1)};q.prototype.justifyDataLabel=function(a,c,e,d,f,g){var b=this.chart,l=c.align,k=c.verticalAlign,n,m,p=a.box?0: |
a.padding||0;n=e.x+p;0>n&&("right"===l?c.align="left":c.x=-n,m=!0);n=e.x+d.width-p;n>b.plotWidth&&("left"===l?c.align="right":c.x=b.plotWidth-n,m=!0);n=e.y+p;0>n&&("bottom"===k?c.verticalAlign="top":c.y=-n,m=!0);n=e.y+d.height-p;n>b.plotHeight&&("top"===k?c.verticalAlign="bottom":c.y=b.plotHeight-n,m=!0);m&&(a.placed=!g,a.align(c,null,f));return m};u.pie&&(u.pie.prototype.drawDataLabels=function(){var b=this,c=b.data,e,d=b.chart,f=b.options.dataLabels,g=k(f.connectorPadding,10),m=k(f.connectorWidth, |
1),p=d.plotWidth,x=d.plotHeight,u,t=b.center,D=t[2]/2,C=t[1],w,h,r,M,K=[[],[]],N,O,H,Q,P=[0,0,0,0];b.visible&&(f.enabled||b._hasPointLabels)&&(v(c,function(a){a.dataLabel&&a.visible&&a.dataLabel.shortened&&(a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),a.dataLabel.shortened=!1)}),q.prototype.drawDataLabels.apply(b),v(c,function(a){a.dataLabel&&a.visible&&(K[a.half].push(a),a.dataLabel._pos=null)}),v(K,function(c,l){var n,m,q=c.length,u=[],E;if(q)for(b.sortByAngle(c,l-.5), |
0<b.maxLabelDistance&&(n=Math.max(0,C-D-b.maxLabelDistance),m=Math.min(C+D+b.maxLabelDistance,d.plotHeight),v(c,function(a){0<a.labelDistance&&a.dataLabel&&(a.top=Math.max(0,C-D-a.labelDistance),a.bottom=Math.min(C+D+a.labelDistance,d.plotHeight),E=a.dataLabel.getBBox().height||21,a.positionsIndex=u.push({target:a.labelPos[1]-a.top+E/2,size:E,rank:a.y})-1)}),a.distribute(u,m+E-n)),Q=0;Q<q;Q++)e=c[Q],m=e.positionsIndex,r=e.labelPos,w=e.dataLabel,H=!1===e.visible?"hidden":"inherit",n=r[1],u&&A(u[m])? |
void 0===u[m].pos?H="hidden":(M=u[m].size,O=e.top+u[m].pos):O=n,delete e.positionIndex,N=f.justify?t[0]+(l?-1:1)*(D+e.labelDistance):b.getX(O<e.top+2||O>e.bottom-2?n:O,l,e),w._attr={visibility:H,align:r[6]},w._pos={x:N+f.x+({left:g,right:-g}[r[6]]||0),y:O+f.y-10},r.x=N,r.y=O,k(f.crop,!0)&&(h=w.getBBox().width,n=null,N-h<g?(n=Math.round(h-N+g),P[3]=Math.max(n,P[3])):N+h>p-g&&(n=Math.round(N+h-p+g),P[1]=Math.max(n,P[1])),0>O-M/2?P[0]=Math.max(Math.round(-O+M/2),P[0]):O+M/2>x&&(P[2]=Math.max(Math.round(O+ |
M/2-x),P[2])),w.sideOverflow=n)}),0===B(P)||this.verifyDataLabelOverflow(P))&&(this.placeDataLabels(),m&&v(this.points,function(a){var c;u=a.connector;if((w=a.dataLabel)&&w._pos&&a.visible&&0<a.labelDistance){H=w._attr.visibility;if(c=!u)a.connector=u=d.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+a.colorIndex).add(b.dataLabelsGroup);u[c?"attr":"animate"]({d:b.connectorPath(a.labelPos)});u.attr("visibility",H)}else u&&(a.connector=u.destroy())}))},u.pie.prototype.connectorPath= |
function(a){var b=a.x,c=a.y;return k(this.options.dataLabels.softConnector,!0)?["M",b+("left"===a[6]?5:-5),c,"C",b,c,2*a[2]-a[4],2*a[3]-a[5],a[2],a[3],"L",a[4],a[5]]:["M",b+("left"===a[6]?5:-5),c,"L",a[2],a[3],"L",a[4],a[5]]},u.pie.prototype.placeDataLabels=function(){v(this.points,function(a){var b=a.dataLabel;b&&a.visible&&((a=b._pos)?(b.sideOverflow&&(b._attr.width=b.getBBox().width-b.sideOverflow,b.css({width:b._attr.width+"px",textOverflow:"ellipsis"}),b.shortened=!0),b.attr(b._attr),b[b.moved? |
"animate":"attr"](a),b.moved=!0):b&&b.attr({y:-9999}))},this)},u.pie.prototype.alignDataLabel=p,u.pie.prototype.verifyDataLabelOverflow=function(a){var b=this.center,c=this.options,d=c.center,g=c.minSize||80,k,m=null!==c.size;m||(null!==d[0]?k=Math.max(b[2]-Math.max(a[1],a[3]),g):(k=Math.max(b[2]-a[1]-a[3],g),b[0]+=(a[3]-a[1])/2),null!==d[1]?k=Math.max(Math.min(k,b[2]-Math.max(a[0],a[2])),g):(k=Math.max(Math.min(k,b[2]-a[0]-a[2]),g),b[1]+=(a[0]-a[2])/2),k<b[2]?(b[2]=k,b[3]=Math.min(f(c.innerSize|| |
0,k),k),this.translate(b),this.drawDataLabels&&this.drawDataLabels()):m=!0);return m});u.column&&(u.column.prototype.alignDataLabel=function(a,c,e,d,f){var b=this.chart.inverted,l=a.series,g=a.dlBox||a.shapeArgs,n=k(a.below,a.plotY>k(this.translatedThreshold,l.yAxis.len)),m=k(e.inside,!!this.options.stacking);g&&(d=t(g),0>d.y&&(d.height+=d.y,d.y=0),g=d.y+d.height-l.yAxis.len,0<g&&(d.height-=g),b&&(d={x:l.yAxis.len-d.y-d.height,y:l.xAxis.len-d.x-d.width,width:d.height,height:d.width}),m||(b?(d.x+= |
n?0:d.width,d.width=0):(d.y+=n?d.height:0,d.height=0)));e.align=k(e.align,!b||m?"center":n?"right":"left");e.verticalAlign=k(e.verticalAlign,b||m?"middle":n?"top":"bottom");q.prototype.alignDataLabel.call(this,a,c,e,d,f);a.isLabelJustified&&a.contrastColor&&a.dataLabel.css({color:a.contrastColor})})})(H);(function(a){var w=a.Chart,B=a.each,A=a.objectEach,v=a.pick,d=a.addEvent;w.prototype.callbacks.push(function(a){function g(){var d=[];B(a.yAxis||[],function(a){a.options.stackLabels&&!a.options.stackLabels.allowOverlap&& |
A(a.stacks,function(a){A(a,function(a){d.push(a.label)})})});B(a.series||[],function(a){var g=a.options.dataLabels,f=a.dataLabelCollections||["dataLabel"];(g.enabled||a._hasPointLabels)&&!g.allowOverlap&&a.visible&&B(f,function(f){B(a.points,function(a){a[f]&&(a[f].labelrank=v(a.labelrank,a.shapeArgs&&a.shapeArgs.height),d.push(a[f]))})})});a.hideOverlappingLabels(d)}g();d(a,"redraw",g)});w.prototype.hideOverlappingLabels=function(a){var d=a.length,g,p,k,f,q,u,c,b,l,e=function(a,b,c,e,d,f,l,g){return!(d> |
a+c||d+l<a||f>b+e||f+g<b)};for(p=0;p<d;p++)if(g=a[p])g.oldOpacity=g.opacity,g.newOpacity=1,g.width||(k=g.getBBox(),g.width=k.width,g.height=k.height);a.sort(function(a,b){return(b.labelrank||0)-(a.labelrank||0)});for(p=0;p<d;p++)for(k=a[p],g=p+1;g<d;++g)if(f=a[g],k&&f&&k!==f&&k.placed&&f.placed&&0!==k.newOpacity&&0!==f.newOpacity&&(q=k.alignAttr,u=f.alignAttr,c=k.parentGroup,b=f.parentGroup,l=2*(k.box?0:k.padding||0),q=e(q.x+c.translateX,q.y+c.translateY,k.width-l,k.height-l,u.x+b.translateX,u.y+ |
b.translateY,f.width-l,f.height-l)))(k.labelrank<f.labelrank?k:f).newOpacity=0;B(a,function(a){var b,c;a&&(c=a.newOpacity,a.oldOpacity!==c&&a.placed&&(c?a.show(!0):b=function(){a.hide()},a.alignAttr.opacity=c,a[a.isOld?"animate":"attr"](a.alignAttr,null,b)),a.isOld=!0)})}})(H);(function(a){var w=a.addEvent,B=a.Chart,A=a.createElement,v=a.css,d=a.defaultOptions,g=a.defaultPlotOptions,m=a.each,t=a.extend,p=a.fireEvent,k=a.hasTouch,f=a.inArray,q=a.isObject,u=a.Legend,c=a.merge,b=a.pick,l=a.Point,e=a.Series, |
n=a.seriesTypes,F=a.svg,G;G=a.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart.pointer,c=function(a){var c=b.getPointFromEvent(a);void 0!==c&&(b.isDirectTouch=!0,c.onMouseOver(a))};m(a.points,function(a){a.graphic&&(a.graphic.element.point=a);a.dataLabel&&(a.dataLabel.div?a.dataLabel.div.point=a:a.dataLabel.element.point=a)});a._hasTracking||(m(a.trackerGroups,function(e){if(a[e]&&(a[e].addClass("highcharts-tracker").on("mouseover",c).on("mouseout",function(a){b.onTrackerMouseOut(a)}), |
k))a[e].on("touchstart",c)}),a._hasTracking=!0)},drawTrackerGraph:function(){var a=this,b=a.options.trackByArea,c=[].concat(b?a.areaPath:a.graphPath),e=c.length,d=a.chart,f=d.pointer,l=d.renderer,g=d.options.tooltip.snap,h=a.tracker,n,p=function(){if(d.hoverSeries!==a)a.onMouseOver()},q="rgba(192,192,192,"+(F?.0001:.002)+")";if(e&&!b)for(n=e+1;n--;)"M"===c[n]&&c.splice(n+1,0,c[n+1]-g,c[n+2],"L"),(n&&"M"===c[n]||n===e)&&c.splice(n,0,"L",c[n-2]+g,c[n-1]);h?h.attr({d:c}):a.graph&&(a.tracker=l.path(c).attr({"stroke-linejoin":"round", |
visibility:a.visible?"visible":"hidden",stroke:q,fill:b?q:"none","stroke-width":a.graph.strokeWidth()+(b?0:2*g),zIndex:2}).add(a.group),m([a.tracker,a.markerGroup],function(a){a.addClass("highcharts-tracker").on("mouseover",p).on("mouseout",function(a){f.onTrackerMouseOut(a)});if(k)a.on("touchstart",p)}))}};n.column&&(n.column.prototype.drawTracker=G.drawTrackerPoint);n.pie&&(n.pie.prototype.drawTracker=G.drawTrackerPoint);n.scatter&&(n.scatter.prototype.drawTracker=G.drawTrackerPoint);t(u.prototype, |
{setItemEvents:function(a,b,c){var e=this.chart.renderer.boxWrapper,d="highcharts-legend-"+(a.series?"point":"series")+"-active";(c?b:a.legendGroup).on("mouseover",function(){a.setState("hover");e.addClass(d)}).on("mouseout",function(){e.removeClass(d);a.setState()}).on("click",function(b){var c=function(){a.setVisible&&a.setVisible()};b={browserEvent:b};a.firePointEvent?a.firePointEvent("legendItemClick",b,c):p(a,"legendItemClick",b,c)})},createCheckboxForItem:function(a){a.checkbox=A("input",{type:"checkbox", |
checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container);w(a.checkbox,"click",function(b){p(a.series||a,"checkboxClick",{checked:b.target.checked,item:a},function(){a.select()})})}});t(B.prototype,{showResetZoom:function(){var a=this,b=d.lang,c=a.options.chart.resetZoomButton,e=c.theme,f=e.states,l="chart"===c.relativeTo?null:"plotBox";this.resetZoomButton=a.renderer.button(b.resetZoom,null,null,function(){a.zoomOut()},e,f&&f.hover).attr({align:c.position.align, |
title:b.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(c.position,!1,l)},zoomOut:function(){var a=this;p(a,"selection",{resetSelection:!0},function(){a.zoom()})},zoom:function(a){var c,e=this.pointer,d=!1,f;!a||a.resetSelection?(m(this.axes,function(a){c=a.zoom()}),e.initiated=!1):m(a.xAxis.concat(a.yAxis),function(a){var b=a.axis;e[b.isXAxis?"zoomX":"zoomY"]&&(c=b.zoom(a.min,a.max),b.displayBtn&&(d=!0))});f=this.resetZoomButton;d&&!f?this.showResetZoom():!d&&q(f)&&(this.resetZoomButton= |
f.destroy());c&&this.redraw(b(this.options.chart.animation,a&&a.animation,100>this.pointCount))},pan:function(a,b){var c=this,e=c.hoverPoints,d;e&&m(e,function(a){a.setState()});m("xy"===b?[1,0]:[1],function(b){b=c[b?"xAxis":"yAxis"][0];var e=b.horiz,f=a[e?"chartX":"chartY"],e=e?"mouseDownX":"mouseDownY",l=c[e],g=(b.pointRange||0)/2,k=b.getExtremes(),n=b.toValue(l-f,!0)+g,g=b.toValue(l+b.len-f,!0)-g,m=g<n,l=m?g:n,n=m?n:g,g=Math.min(k.dataMin,b.toValue(b.toPixels(k.min)-b.minPixelPadding)),m=Math.max(k.dataMax, |
b.toValue(b.toPixels(k.max)+b.minPixelPadding)),p;p=g-l;0<p&&(n+=p,l=g);p=n-m;0<p&&(n=m,l-=p);b.series.length&&l!==k.min&&n!==k.max&&(b.setExtremes(l,n,!1,!1,{trigger:"pan"}),d=!0);c[e]=f});d&&c.redraw(!1);v(c.container,{cursor:"move"})}});t(l.prototype,{select:function(a,c){var e=this,d=e.series,l=d.chart;a=b(a,!e.selected);e.firePointEvent(a?"select":"unselect",{accumulate:c},function(){e.selected=e.options.selected=a;d.options.data[f(e,d.data)]=e.options;e.setState(a&&"select");c||m(l.getSelectedPoints(), |
function(a){a.selected&&a!==e&&(a.selected=a.options.selected=!1,d.options.data[f(a,d.data)]=a.options,a.setState(""),a.firePointEvent("unselect"))})})},onMouseOver:function(a){var b=this.series.chart,c=b.pointer;a=a?c.normalize(a):c.getChartCoordinatesFromPoint(this,b.inverted);c.runPointActions(a,this)},onMouseOut:function(){var a=this.series.chart;this.firePointEvent("mouseOut");m(a.hoverPoints||[],function(a){a.setState()});a.hoverPoints=a.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var b= |
this,e=c(b.series.options.point,b.options).events;b.events=e;a.objectEach(e,function(a,c){w(b,c,a)});this.hasImportedEvents=!0}},setState:function(a,c){var e=Math.floor(this.plotX),d=this.plotY,f=this.series,l=f.options.states[a]||{},k=g[f.type].marker&&f.options.marker,n=k&&!1===k.enabled,h=k&&k.states&&k.states[a]||{},m=!1===h.enabled,p=f.stateMarkerGraphic,q=this.marker||{},u=f.chart,t=f.halo,v,E=k&&f.markerAttribs;a=a||"";if(!(a===this.state&&!c||this.selected&&"select"!==a||!1===l.enabled||a&& |
(m||n&&!1===h.enabled)||a&&q.states&&q.states[a]&&!1===q.states[a].enabled)){E&&(v=f.markerAttribs(this,a));if(this.graphic)this.state&&this.graphic.removeClass("highcharts-point-"+this.state),a&&this.graphic.addClass("highcharts-point-"+a),v&&this.graphic.animate(v,b(u.options.chart.animation,h.animation,k.animation)),p&&p.hide();else{if(a&&h)if(k=q.symbol||f.symbol,p&&p.currentSymbol!==k&&(p=p.destroy()),p)p[c?"animate":"attr"]({x:v.x,y:v.y});else k&&(f.stateMarkerGraphic=p=u.renderer.symbol(k, |
v.x,v.y,v.width,v.height).add(f.markerGroup),p.currentSymbol=k);p&&(p[a&&u.isInsidePlot(e,d,u.inverted)?"show":"hide"](),p.element.point=this)}(e=l.halo)&&e.size?(t||(f.halo=t=u.renderer.path().add((this.graphic||p).parentGroup)),t[c?"animate":"attr"]({d:this.haloPath(e.size)}),t.attr({"class":"highcharts-halo highcharts-color-"+b(this.colorIndex,f.colorIndex)}),t.point=this):t&&t.point&&t.point.haloPath&&t.animate({d:t.point.haloPath(0)});this.state=a}},haloPath:function(a){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)- |
a,this.plotY-a,2*a,2*a)}});t(e.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&p(this,"mouseOver");this.setState("hover");a.hoverSeries=this},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,e=b.hoverPoint;b.hoverSeries=null;if(e)e.onMouseOut();this&&a.events.mouseOut&&p(this,"mouseOut");!c||this.stickyTracking||c.shared&&!this.noSharedTooltip||c.hide();this.setState()},setState:function(a){var b=this; |
a=a||"";b.state!==a&&(m([b.group,b.markerGroup,b.dataLabelsGroup],function(c){c&&(b.state&&c.removeClass("highcharts-series-"+b.state),a&&c.addClass("highcharts-series-"+a))}),b.state=a)},setVisible:function(a,b){var c=this,e=c.chart,d=c.legendItem,f,l=e.options.chart.ignoreHiddenSeries,g=c.visible;f=(c.visible=a=c.options.visible=c.userOptions.visible=void 0===a?!g:a)?"show":"hide";m(["group","dataLabelsGroup","markerGroup","tracker","tt"],function(a){if(c[a])c[a][f]()});if(e.hoverSeries===c||(e.hoverPoint&& |
e.hoverPoint.series)===c)c.onMouseOut();d&&e.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&m(e.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});m(c.linkedSeries,function(b){b.setVisible(a,!1)});l&&(e.isDirtyBox=!0);!1!==b&&e.redraw();p(c,f)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=void 0===a?!this.selected:a;this.checkbox&&(this.checkbox.checked=a);p(this,a?"select":"unselect")},drawTracker:G.drawTrackerGraph})})(H); |
(function(a){var w=a.Chart,B=a.each,A=a.inArray,v=a.isArray,d=a.isObject,g=a.pick,m=a.splat;w.prototype.setResponsive=function(d){var g=this.options.responsive,k=[],f=this.currentResponsive;g&&g.rules&&B(g.rules,function(f){void 0===f._id&&(f._id=a.uniqueKey());this.matchResponsiveRule(f,k,d)},this);var m=a.merge.apply(0,a.map(k,function(d){return a.find(g.rules,function(a){return a._id===d}).chartOptions})),k=k.toString()||void 0;k!==(f&&f.ruleIds)&&(f&&this.update(f.undoOptions,d),k?(this.currentResponsive= |
{ruleIds:k,mergedOptions:m,undoOptions:this.currentOptions(m)},this.update(m,d)):this.currentResponsive=void 0)};w.prototype.matchResponsiveRule=function(a,d){var k=a.condition;(k.callback||function(){return this.chartWidth<=g(k.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=g(k.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=g(k.minWidth,0)&&this.chartHeight>=g(k.minHeight,0)}).call(this)&&d.push(a._id)};w.prototype.currentOptions=function(g){function p(f,g,k,c){var b;a.objectEach(f,function(a,e){if(!c&& |
-1<A(e,["series","xAxis","yAxis"]))for(f[e]=m(f[e]),k[e]=[],b=0;b<f[e].length;b++)g[e][b]&&(k[e][b]={},p(a[b],g[e][b],k[e][b],c+1));else d(a)?(k[e]=v(a)?[]:{},p(a,g[e]||{},k[e],c+1)):k[e]=g[e]||null})}var k={};p(g,this.options,k,0);return k}})(H);(function(a){var w=a.Axis,B=a.each,A=a.pick;a=a.wrap;a(w.prototype,"getSeriesExtremes",function(a){var d=this.isXAxis,g,m,t=[],p;d&&B(this.series,function(a,d){a.useMapGeometry&&(t[d]=a.xData,a.xData=[])});a.call(this);d&&(g=A(this.dataMin,Number.MAX_VALUE), |
m=A(this.dataMax,-Number.MAX_VALUE),B(this.series,function(a,d){a.useMapGeometry&&(g=Math.min(g,A(a.minX,g)),m=Math.max(m,A(a.maxX,m)),a.xData=t[d],p=!0)}),p&&(this.dataMin=g,this.dataMax=m))});a(w.prototype,"setAxisTranslation",function(a){var d=this.chart,g=d.plotWidth/d.plotHeight,d=d.xAxis[0],m;a.call(this);"yAxis"===this.coll&&void 0!==d.transA&&B(this.series,function(a){a.preserveAspectRatio&&(m=!0)});if(m&&(this.transA=d.transA=Math.min(this.transA,d.transA),a=g/((d.max-d.min)/(this.max-this.min)), |
a=1>a?this:d,g=(a.max-a.min)*a.transA,a.pixelPadding=a.len-g,a.minPixelPadding=a.pixelPadding/2,g=a.fixTo)){g=g[1]-a.toValue(g[0],!0);g*=a.transA;if(Math.abs(g)>a.minPixelPadding||a.min===a.dataMin&&a.max===a.dataMax)g=0;a.minPixelPadding-=g}});a(w.prototype,"render",function(a){a.call(this);this.fixTo=null})})(H);(function(a){var w=a.Axis,B=a.Chart,A=a.color,v,d=a.each,g=a.extend,m=a.isNumber,t=a.Legend,p=a.LegendSymbolMixin,k=a.noop,f=a.merge,q=a.pick,u=a.wrap;v=a.ColorAxis=function(){this.init.apply(this, |
arguments)};g(v.prototype,w.prototype);g(v.prototype,{defaultColorAxisOptions:{lineWidth:0,minPadding:0,maxPadding:0,gridLineWidth:1,tickPixelInterval:72,startOnTick:!0,endOnTick:!0,offset:0,marker:{animation:{duration:50},width:.01},labels:{overflow:"justify",rotation:0},minColor:"#e6ebf5",maxColor:"#003399",tickLength:5,showInLegend:!0},keepProps:["legendGroup","legendItemHeight","legendItemWidth","legendItem","legendSymbol"].concat(w.prototype.keepProps),init:function(a,b){var c="vertical"!==a.options.legend.layout, |
e;this.coll="colorAxis";e=f(this.defaultColorAxisOptions,{side:c?2:1,reversed:!c},b,{opposite:!c,showEmpty:!1,title:null});w.prototype.init.call(this,a,e);b.dataClasses&&this.initDataClasses(b);this.initStops();this.horiz=c;this.zoomEnabled=!1;this.defaultLegendLength=200},initDataClasses:function(a){var b,c=0,e=this.chart.options.chart.colorCount,g=this.options,k=a.dataClasses.length;this.dataClasses=b=[];this.legendItems=[];d(a.dataClasses,function(a,d){a=f(a);b.push(a);"category"===g.dataClassColor? |
(a.colorIndex=c,c++,c===e&&(c=0)):a.color=A(g.minColor).tweenTo(A(g.maxColor),2>k?.5:d/(k-1))})},setTickPositions:function(){if(!this.dataClasses)return w.prototype.setTickPositions.call(this)},initStops:function(){this.stops=this.options.stops||[[0,this.options.minColor],[1,this.options.maxColor]];d(this.stops,function(a){a.color=A(a[1])})},setOptions:function(a){w.prototype.setOptions.call(this,a);this.options.crosshair=this.options.marker},setAxisSize:function(){var a=this.legendSymbol,b=this.chart, |
d=b.options.legend||{},e,f;a?(this.left=d=a.attr("x"),this.top=e=a.attr("y"),this.width=f=a.attr("width"),this.height=a=a.attr("height"),this.right=b.chartWidth-d-f,this.bottom=b.chartHeight-e-a,this.len=this.horiz?f:a,this.pos=this.horiz?d:e):this.len=(this.horiz?d.symbolWidth:d.symbolHeight)||this.defaultLegendLength},normalizedValue:function(a){this.isLog&&(a=this.val2lin(a));return 1-(this.max-a)/(this.max-this.min||1)},toColor:function(a,b){var c=this.stops,e,d,f=this.dataClasses,g,k;if(f)for(k= |
f.length;k--;){if(g=f[k],e=g.from,c=g.to,(void 0===e||a>=e)&&(void 0===c||a<=c)){b&&(b.dataClass=k,b.colorIndex=g.colorIndex);break}}else{a=this.normalizedValue(a);for(k=c.length;k--&&!(a>c[k][0]););e=c[k]||c[k+1];c=c[k+1]||e;a=1-(c[0]-a)/(c[0]-e[0]||1);d=e.color.tweenTo(c.color,a)}return d},getOffset:function(){var a=this.legendGroup,b=this.chart.axisOffset[this.side];a&&(this.axisParent=a,w.prototype.getOffset.call(this),this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width),this.chart.axisOffset[this.side]= |
b)},setLegendColor:function(){var a,b=this.reversed;a=b?1:0;b=b?0:1;a=this.horiz?[a,0,b,0]:[0,b,0,a];this.legendColor={linearGradient:{x1:a[0],y1:a[1],x2:a[2],y2:a[3]},stops:this.stops}},drawLegendSymbol:function(a,b){var c=a.padding,e=a.options,d=this.horiz,f=q(e.symbolWidth,d?this.defaultLegendLength:12),g=q(e.symbolHeight,d?12:this.defaultLegendLength),k=q(e.labelPadding,d?16:30),e=q(e.itemDistance,10);this.setLegendColor();b.legendSymbol=this.chart.renderer.rect(0,a.baseline-11,f,g).attr({zIndex:1}).add(b.legendGroup); |
this.legendItemWidth=f+c+(d?e:k);this.legendItemHeight=g+c+(d?k:0)},setState:k,visible:!0,setVisible:k,getSeriesExtremes:function(){var a=this.series,b=a.length;this.dataMin=Infinity;for(this.dataMax=-Infinity;b--;)void 0!==a[b].valueMin&&(this.dataMin=Math.min(this.dataMin,a[b].valueMin),this.dataMax=Math.max(this.dataMax,a[b].valueMax))},drawCrosshair:function(a,b){var c=b&&b.plotX,e=b&&b.plotY,d,f=this.pos,g=this.len;b&&(d=this.toPixels(b[b.series.colorKey]),d<f?d=f-2:d>f+g&&(d=f+g+2),b.plotX= |
d,b.plotY=this.len-d,w.prototype.drawCrosshair.call(this,a,b),b.plotX=c,b.plotY=e,this.cross&&this.cross.addClass("highcharts-coloraxis-marker").add(this.legendGroup))},getPlotLinePath:function(a,b,d,e,f){return m(f)?this.horiz?["M",f-4,this.top-6,"L",f+4,this.top-6,f,this.top,"Z"]:["M",this.left,f,"L",this.left-6,f+6,this.left-6,f-6,"Z"]:w.prototype.getPlotLinePath.call(this,a,b,d,e)},update:function(a,b){var c=this.chart,e=c.legend;d(this.series,function(a){a.isDirtyData=!0});a.dataClasses&&e.allItems&& |
(d(e.allItems,function(a){a.isDataClass&&a.legendGroup&&a.legendGroup.destroy()}),c.isDirtyLegend=!0);c.options[this.coll]=f(this.userOptions,a);w.prototype.update.call(this,a,b);this.legendItem&&(this.setLegendColor(),e.colorizeItem(this,!0))},remove:function(){this.legendItem&&this.chart.legend.destroyItem(this);w.prototype.remove.call(this)},getDataClassLegendSymbols:function(){var c=this,b=this.chart,f=this.legendItems,e=b.options.legend,m=e.valueDecimals,q=e.valueSuffix||"",u;f.length||d(this.dataClasses, |
function(e,l){var n=!0,t=e.from,v=e.to;u="";void 0===t?u="\x3c ":void 0===v&&(u="\x3e ");void 0!==t&&(u+=a.numberFormat(t,m)+q);void 0!==t&&void 0!==v&&(u+=" - ");void 0!==v&&(u+=a.numberFormat(v,m)+q);f.push(g({chart:b,name:u,options:{},drawLegendSymbol:p.drawRectangle,visible:!0,setState:k,isDataClass:!0,setVisible:function(){n=this.visible=!n;d(c.series,function(a){d(a.points,function(a){a.dataClass===l&&a.setVisible(n)})});b.legend.colorizeItem(this,n)}},e))});return f},name:""});d(["fill","stroke"], |
function(c){a.Fx.prototype[c+"Setter"]=function(){this.elem.attr(c,A(this.start).tweenTo(A(this.end),this.pos),null,!0)}});u(B.prototype,"getAxes",function(a){var b=this.options.colorAxis;a.call(this);this.colorAxis=[];b&&new v(this,b)});u(t.prototype,"getAllItems",function(a){var b=[],c=this.chart.colorAxis[0];c&&c.options&&(c.options.showInLegend&&(c.options.dataClasses?b=b.concat(c.getDataClassLegendSymbols()):b.push(c)),d(c.series,function(a){a.options.showInLegend=!1}));return b.concat(a.call(this))}); |
u(t.prototype,"colorizeItem",function(a,b,d){a.call(this,b,d);d&&b.legendColor&&b.legendSymbol.attr({fill:b.legendColor})});u(t.prototype,"update",function(a){a.apply(this,[].slice.call(arguments,1));this.chart.colorAxis[0]&&this.chart.colorAxis[0].update({},arguments[2])})})(H);(function(a){var w=a.defined,B=a.each,A=a.noop;a.colorPointMixin={isValid:function(){return null!==this.value},setVisible:function(a){var d=this,g=a?"show":"hide";B(["graphic","dataLabel"],function(a){if(d[a])d[a][g]()})}, |
setState:function(v){a.Point.prototype.setState.call(this,v);this.graphic&&this.graphic.attr({zIndex:"hover"===v?1:0})}};a.colorSeriesMixin={pointArrayMap:["value"],axisTypes:["xAxis","yAxis","colorAxis"],optionalAxis:"colorAxis",trackerGroups:["group","markerGroup","dataLabelsGroup"],getSymbol:A,parallelArrays:["x","y","value"],colorKey:"value",translateColors:function(){var a=this,d=this.options.nullColor,g=this.colorAxis,m=this.colorKey;B(this.data,function(t){var p=t[m];if(p=t.options.color|| |
(t.isNull?d:g&&void 0!==p?g.toColor(p,t):t.color||a.color))t.color=p})},colorAttribs:function(a){var d={};w(a.color)&&(d[this.colorProp||"fill"]=a.color);return d}}})(H);(function(a){function w(a){a&&(a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)}function B(a){this.init(a)}var A=a.addEvent,v=a.Chart,d=a.doc,g=a.each,m=a.extend,t=a.merge,p=a.pick,k=a.wrap;B.prototype.init=function(a){this.chart=a;a.mapNavButtons=[]};B.prototype.update=function(d){var f= |
this.chart,g=f.options.mapNavigation,c,b=function(a){this.handler.call(f,a);w(a)},l=f.mapNavButtons;d&&(g=f.options.mapNavigation=t(f.options.mapNavigation,d));for(;l.length;)l.pop().destroy();p(g.enableButtons,g.enabled)&&!f.renderer.forExport&&a.objectEach(g.buttons,function(a,d){c=t(g.buttonOptions,a);a=f.renderer.button(c.text,0,0,b,void 0,void 0,void 0,0,"zoomIn"===d?"topbutton":"bottombutton").addClass("highcharts-map-navigation").attr({width:c.width,height:c.height,title:f.options.lang[d], |
padding:c.padding,zIndex:5}).add();a.handler=c.onclick;a.align(m(c,{width:a.width,height:2*a.height}),null,c.alignTo);A(a.element,"dblclick",w);l.push(a)});this.updateEvents(g)};B.prototype.updateEvents=function(a){var f=this.chart;p(a.enableDoubleClickZoom,a.enabled)||a.enableDoubleClickZoomTo?this.unbindDblClick=this.unbindDblClick||A(f.container,"dblclick",function(a){f.pointer.onContainerDblClick(a)}):this.unbindDblClick&&(this.unbindDblClick=this.unbindDblClick());p(a.enableMouseWheelZoom,a.enabled)? |
this.unbindMouseWheel=this.unbindMouseWheel||A(f.container,void 0===d.onmousewheel?"DOMMouseScroll":"mousewheel",function(a){f.pointer.onContainerMouseWheel(a);w(a);return!1}):this.unbindMouseWheel&&(this.unbindMouseWheel=this.unbindMouseWheel())};m(v.prototype,{fitToBox:function(a,d){g([["x","width"],["y","height"]],function(f){var c=f[0];f=f[1];a[c]+a[f]>d[c]+d[f]&&(a[f]>d[f]?(a[f]=d[f],a[c]=d[c]):a[c]=d[c]+d[f]-a[f]);a[f]>d[f]&&(a[f]=d[f]);a[c]<d[c]&&(a[c]=d[c])});return a},mapZoom:function(a, |
d,g,c,b){var f=this.xAxis[0],e=f.max-f.min,k=p(d,f.min+e/2),m=e*a,e=this.yAxis[0],q=e.max-e.min,t=p(g,e.min+q/2),q=q*a,k=this.fitToBox({x:k-m*(c?(c-f.pos)/f.len:.5),y:t-q*(b?(b-e.pos)/e.len:.5),width:m,height:q},{x:f.dataMin,y:e.dataMin,width:f.dataMax-f.dataMin,height:e.dataMax-e.dataMin}),m=k.x<=f.dataMin&&k.width>=f.dataMax-f.dataMin&&k.y<=e.dataMin&&k.height>=e.dataMax-e.dataMin;c&&(f.fixTo=[c-f.pos,d]);b&&(e.fixTo=[b-e.pos,g]);void 0===a||m?(f.setExtremes(void 0,void 0,!1),e.setExtremes(void 0, |
void 0,!1)):(f.setExtremes(k.x,k.x+k.width,!1),e.setExtremes(k.y,k.y+k.height,!1));this.redraw()}});k(v.prototype,"render",function(a){this.mapNavigation=new B(this);this.mapNavigation.update();a.call(this)})})(H);(function(a){var w=a.extend,B=a.pick,A=a.Pointer;a=a.wrap;w(A.prototype,{onContainerDblClick:function(a){var d=this.chart;a=this.normalize(a);d.options.mapNavigation.enableDoubleClickZoomTo?d.pointer.inClass(a.target,"highcharts-tracker")&&d.hoverPoint&&d.hoverPoint.zoomTo():d.isInsidePlot(a.chartX- |
d.plotLeft,a.chartY-d.plotTop)&&d.mapZoom(.5,d.xAxis[0].toValue(a.chartX),d.yAxis[0].toValue(a.chartY),a.chartX,a.chartY)},onContainerMouseWheel:function(a){var d=this.chart,g;a=this.normalize(a);g=a.detail||-(a.wheelDelta/120);d.isInsidePlot(a.chartX-d.plotLeft,a.chartY-d.plotTop)&&d.mapZoom(Math.pow(d.options.mapNavigation.mouseWheelSensitivity,g),d.xAxis[0].toValue(a.chartX),d.yAxis[0].toValue(a.chartY),a.chartX,a.chartY)}});a(A.prototype,"zoomOption",function(a){var d=this.chart.options.mapNavigation; |
B(d.enableTouchZoom,d.enabled)&&(this.chart.options.chart.pinchType="xy");a.apply(this,[].slice.call(arguments,1))});a(A.prototype,"pinchTranslate",function(a,d,g,m,t,p,k){a.call(this,d,g,m,t,p,k);"map"===this.chart.options.chart.type&&this.hasZoom&&(a=m.scaleX>m.scaleY,this.pinchTranslateDirection(!a,d,g,m,t,p,k,a?m.scaleX:m.scaleY))})})(H);(function(a){var w=a.colorPointMixin,B=a.each,A=a.extend,v=a.isNumber,d=a.map,g=a.merge,m=a.noop,t=a.pick,p=a.isArray,k=a.Point,f=a.Series,q=a.seriesType,u=a.seriesTypes, |
c=a.splat,b=void 0!==a.doc.documentElement.style.vectorEffect;q("map","scatter",{allAreas:!0,animation:!1,nullColor:"#f7f7f7",borderColor:"#cccccc",borderWidth:1,marker:null,stickyTracking:!1,joinBy:"hc-key",dataLabels:{formatter:function(){return this.point.value},inside:!0,verticalAlign:"middle",crop:!1,overflow:!1,padding:0},turboThreshold:0,tooltip:{followPointer:!0,pointFormat:"{point.name}: {point.value}\x3cbr/\x3e"},states:{normal:{animation:!0},hover:{brightness:.2,halo:null},select:{color:"#cccccc"}}}, |
g(a.colorSeriesMixin,{type:"map",getExtremesFromAll:!0,useMapGeometry:!0,forceDL:!0,searchPoint:m,directTouch:!0,preserveAspectRatio:!0,pointArrayMap:["value"],getBox:function(b){var c=Number.MAX_VALUE,d=-c,f=c,l=-c,g=c,k=c,m=this.xAxis,p=this.yAxis,q;B(b||[],function(b){if(b.path){"string"===typeof b.path&&(b.path=a.splitPath(b.path));var e=b.path||[],m=e.length,h=!1,n=-c,p=c,u=-c,x=c,y=b.properties;if(!b._foundBox){for(;m--;)v(e[m])&&(h?(n=Math.max(n,e[m]),p=Math.min(p,e[m])):(u=Math.max(u,e[m]), |
x=Math.min(x,e[m])),h=!h);b._midX=p+(n-p)*t(b.middleX,y&&y["hc-middle-x"],.5);b._midY=x+(u-x)*t(b.middleY,y&&y["hc-middle-y"],.5);b._maxX=n;b._minX=p;b._maxY=u;b._minY=x;b.labelrank=t(b.labelrank,(n-p)*(u-x));b._foundBox=!0}d=Math.max(d,b._maxX);f=Math.min(f,b._minX);l=Math.max(l,b._maxY);g=Math.min(g,b._minY);k=Math.min(b._maxX-b._minX,b._maxY-b._minY,k);q=!0}});q&&(this.minY=Math.min(g,t(this.minY,c)),this.maxY=Math.max(l,t(this.maxY,-c)),this.minX=Math.min(f,t(this.minX,c)),this.maxX=Math.max(d, |
t(this.maxX,-c)),m&&void 0===m.options.minRange&&(m.minRange=Math.min(5*k,(this.maxX-this.minX)/5,m.minRange||c)),p&&void 0===p.options.minRange&&(p.minRange=Math.min(5*k,(this.maxY-this.minY)/5,p.minRange||c)))},getExtremes:function(){f.prototype.getExtremes.call(this,this.valueData);this.chart.hasRendered&&this.isDirtyData&&this.getBox(this.options.data);this.valueMin=this.dataMin;this.valueMax=this.dataMax;this.dataMin=this.minY;this.dataMax=this.maxY},translatePath:function(a){var b=!1,c=this.xAxis, |
d=this.yAxis,f=c.min,l=c.transA,c=c.minPixelPadding,g=d.min,k=d.transA,d=d.minPixelPadding,m,p=[];if(a)for(m=a.length;m--;)v(a[m])?(p[m]=b?(a[m]-f)*l+c:(a[m]-g)*k+d,b=!b):p[m]=a[m];return p},setData:function(b,e,k,m){var l=this.options,n=this.chart.options.chart,q=n&&n.map,t=l.mapData,u=l.joinBy,y=null===u,w=l.keys||this.pointArrayMap,C=[],A={},h=this.chart.mapTransforms;!t&&q&&(t="string"===typeof q?a.maps[q]:q);y&&(u="_i");u=this.joinBy=c(u);u[1]||(u[1]=u[0]);b&&B(b,function(a,c){var e=0;if(v(a))b[c]= |
{value:a};else if(p(a)){b[c]={};!l.keys&&a.length>w.length&&"string"===typeof a[0]&&(b[c]["hc-key"]=a[0],++e);for(var d=0;d<w.length;++d,++e)w[d]&&(b[c][w[d]]=a[e])}y&&(b[c]._i=c)});this.getBox(b);(this.chart.mapTransforms=h=n&&n.mapTransforms||t&&t["hc-transform"]||h)&&a.objectEach(h,function(a){a.rotation&&(a.cosAngle=Math.cos(a.rotation),a.sinAngle=Math.sin(a.rotation))});if(t){"FeatureCollection"===t.type&&(this.mapTitle=t.title,t=a.geojson(t,this.type,this));this.mapData=t;this.mapMap={};for(h= |
0;h<t.length;h++)n=t[h],q=n.properties,n._i=h,u[0]&&q&&q[u[0]]&&(n[u[0]]=q[u[0]]),A[n[u[0]]]=n;this.mapMap=A;b&&u[1]&&B(b,function(a){A[a[u[1]]]&&C.push(A[a[u[1]]])});l.allAreas?(this.getBox(t),b=b||[],u[1]&&B(b,function(a){C.push(a[u[1]])}),C="|"+d(C,function(a){return a&&a[u[0]]}).join("|")+"|",B(t,function(a){u[0]&&-1!==C.indexOf("|"+a[u[0]]+"|")||(b.push(g(a,{value:null})),m=!1)})):this.getBox(C)}f.prototype.setData.call(this,b,e,k,m)},drawGraph:m,drawDataLabels:m,doFullTranslate:function(){return this.isDirtyData|| |
this.chart.isResizing||this.chart.renderer.isVML||!this.baseTrans},translate:function(){var a=this,b=a.xAxis,c=a.yAxis,d=a.doFullTranslate();a.generatePoints();B(a.data,function(e){e.plotX=b.toPixels(e._midX,!0);e.plotY=c.toPixels(e._midY,!0);d&&(e.shapeType="path",e.shapeArgs={d:a.translatePath(e.path)})});a.translateColors()},pointAttribs:function(a,c){a=this.colorAttribs(a);b?a["vector-effect"]="non-scaling-stroke":a["stroke-width"]="inherit";return a},drawPoints:function(){var a=this,c=a.xAxis, |
d=a.yAxis,f=a.group,g=a.chart,k=g.renderer,m,p,q,t,v=this.baseTrans,w,A,h,r,H;a.transformGroup||(a.transformGroup=k.g().attr({scaleX:1,scaleY:1}).add(f),a.transformGroup.survive=!0);a.doFullTranslate()?(a.group=a.transformGroup,u.column.prototype.drawPoints.apply(a),a.group=f,B(a.points,function(b){b.graphic&&(b.name&&b.graphic.addClass("highcharts-name-"+b.name.replace(/ /g,"-").toLowerCase()),b.properties&&b.properties["hc-key"]&&b.graphic.addClass("highcharts-key-"+b.properties["hc-key"].toLowerCase()), |
b.graphic.css(a.pointAttribs(b,b.selected&&"select")))}),this.baseTrans={originX:c.min-c.minPixelPadding/c.transA,originY:d.min-d.minPixelPadding/d.transA+(d.reversed?0:d.len/d.transA),transAX:c.transA,transAY:d.transA},this.transformGroup.animate({translateX:0,translateY:0,scaleX:1,scaleY:1})):(m=c.transA/v.transAX,p=d.transA/v.transAY,q=c.toPixels(v.originX,!0),t=d.toPixels(v.originY,!0),.99<m&&1.01>m&&.99<p&&1.01>p&&(p=m=1,q=Math.round(q),t=Math.round(t)),w=this.transformGroup,g.renderer.globalAnimation? |
(A=w.attr("translateX"),h=w.attr("translateY"),r=w.attr("scaleX"),H=w.attr("scaleY"),w.attr({animator:0}).animate({animator:1},{step:function(a,b){w.attr({translateX:A+(q-A)*b.pos,translateY:h+(t-h)*b.pos,scaleX:r+(m-r)*b.pos,scaleY:H+(p-H)*b.pos})}})):w.attr({translateX:q,translateY:t,scaleX:m,scaleY:p}));b||a.group.element.setAttribute("stroke-width",a.options[a.pointAttrToOptions&&a.pointAttrToOptions["stroke-width"]||"borderWidth"]/(m||1));this.drawMapDataLabels()},drawMapDataLabels:function(){f.prototype.drawDataLabels.call(this); |
this.dataLabelsGroup&&this.dataLabelsGroup.clip(this.chart.clipRect)},render:function(){var a=this,b=f.prototype.render;a.chart.renderer.isVML&&3E3<a.data.length?setTimeout(function(){b.call(a)}):b.call(a)},animate:function(a){var b=this.options.animation,c=this.group,d=this.xAxis,f=this.yAxis,g=d.pos,k=f.pos;this.chart.renderer.isSVG&&(!0===b&&(b={duration:1E3}),a?c.attr({translateX:g+d.len/2,translateY:k+f.len/2,scaleX:.001,scaleY:.001}):(c.animate({translateX:g,translateY:k,scaleX:1,scaleY:1}, |
b),this.animate=null))},animateDrilldown:function(a){var b=this.chart.plotBox,c=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1],d=c.bBox,f=this.chart.options.drilldown.animation;a||(a=Math.min(d.width/b.width,d.height/b.height),c.shapeArgs={scaleX:a,scaleY:a,translateX:d.x,translateY:d.y},B(this.points,function(a){a.graphic&&a.graphic.attr(c.shapeArgs).animate({scaleX:1,scaleY:1,translateX:0,translateY:0},f)}),this.animate=null)},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle, |
animateDrillupFrom:function(a){u.column.prototype.animateDrillupFrom.call(this,a)},animateDrillupTo:function(a){u.column.prototype.animateDrillupTo.call(this,a)}}),A({applyOptions:function(a,b){a=k.prototype.applyOptions.call(this,a,b);b=this.series;var c=b.joinBy;b.mapData&&((c=void 0!==a[c[1]]&&b.mapMap[a[c[1]]])?(b.xyFromShape&&(a.x=c._midX,a.y=c._midY),A(a,c)):a.value=a.value||null);return a},onMouseOver:function(a){clearTimeout(this.colorInterval);if(null!==this.value||this.series.options.nullInteraction)k.prototype.onMouseOver.call(this, |
a);else this.series.onMouseOut(a)},zoomTo:function(){var a=this.series;a.xAxis.setExtremes(this._minX,this._maxX,!1);a.yAxis.setExtremes(this._minY,this._maxY,!1);a.chart.redraw()}},w))})(H);(function(a){var w=a.seriesType;w("mapline","map",{},{type:"mapline",colorProp:"stroke",drawLegendSymbol:a.seriesTypes.line.prototype.drawLegendSymbol})})(H);(function(a){var w=a.merge,B=a.Point;a=a.seriesType;a("mappoint","scatter",{dataLabels:{enabled:!0,formatter:function(){return this.point.name},crop:!1, |
defer:!1,overflow:!1,style:{color:"#000000"}}},{type:"mappoint",forceDL:!0},{applyOptions:function(a,v){a=void 0!==a.lat&&void 0!==a.lon?w(a,this.series.chart.fromLatLonToPoint(a)):a;return B.prototype.applyOptions.call(this,a,v)}})})(H);(function(a){var w=a.arrayMax,B=a.arrayMin,A=a.Axis,v=a.each,d=a.isNumber,g=a.noop,m=a.pick,t=a.pInt,p=a.Point,k=a.seriesType,f=a.seriesTypes;k("bubble","scatter",{dataLabels:{formatter:function(){return this.point.z},inside:!0,verticalAlign:"middle"},marker:{radius:null, |
states:{hover:{radiusPlus:0}},symbol:"circle"},minSize:8,maxSize:"20%",softThreshold:!1,states:{hover:{halo:{size:5}}},tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0,zoneAxis:"z"},{pointArrayMap:["y","z"],parallelArrays:["x","y","z"],trackerGroups:["group","dataLabelsGroup"],specialGroup:"group",bubblePadding:!0,zoneAxis:"z",directTouch:!0,getRadii:function(a,d,c,b){var f,e,g,k=this.zData,m=[],p=this.options,q="width"!==p.sizeBy,t=p.zThreshold,u=d-a; |
e=0;for(f=k.length;e<f;e++)g=k[e],p.sizeByAbsoluteValue&&null!==g&&(g=Math.abs(g-t),d=Math.max(d-t,Math.abs(a-t)),a=0),null===g?g=null:g<a?g=c/2-1:(g=0<u?(g-a)/u:.5,q&&0<=g&&(g=Math.sqrt(g)),g=Math.ceil(c+g*(b-c))/2),m.push(g);this.radii=m},animate:function(a){var d=this.options.animation;a||(v(this.points,function(a){var b=a.graphic,c;b&&b.width&&(c={x:b.x,y:b.y,width:b.width,height:b.height},b.attr({x:a.plotX,y:a.plotY,width:1,height:1}),b.animate(c,d))}),this.animate=null)},translate:function(){var g, |
k=this.data,c,b,l=this.radii;f.scatter.prototype.translate.call(this);for(g=k.length;g--;)c=k[g],b=l?l[g]:0,d(b)&&b>=this.minPxSize/2?(c.marker=a.extend(c.marker,{radius:b,width:2*b,height:2*b}),c.dlBox={x:c.plotX-b,y:c.plotY-b,width:2*b,height:2*b}):c.shapeArgs=c.plotY=c.dlBox=void 0},alignDataLabel:f.column.prototype.alignDataLabel,buildKDTree:g,applyZones:g},{haloPath:function(a){return p.prototype.haloPath.call(this,0===a?0:(this.marker?this.marker.radius||0:0)+a)},ttBelow:!1});A.prototype.beforePadding= |
function(){var a=this,f=this.len,c=this.chart,b=0,g=f,e=this.isXAxis,k=e?"xData":"yData",p=this.min,A={},E=Math.min(c.plotWidth,c.plotHeight),I=Number.MAX_VALUE,x=-Number.MAX_VALUE,H=this.max-p,y=f/H,D=[];v(this.series,function(b){var d=b.options;!b.bubblePadding||!b.visible&&c.options.chart.ignoreHiddenSeries||(a.allowZoomOutside=!0,D.push(b),e&&(v(["minSize","maxSize"],function(a){var b=d[a],c=/%$/.test(b),b=t(b);A[a]=c?E*b/100:b}),b.minPxSize=A.minSize,b.maxPxSize=Math.max(A.maxSize,A.minSize), |
b=b.zData,b.length&&(I=m(d.zMin,Math.min(I,Math.max(B(b),!1===d.displayNegative?d.zThreshold:-Number.MAX_VALUE))),x=m(d.zMax,Math.max(x,w(b))))))});v(D,function(c){var f=c[k],h=f.length,l;e&&c.getRadii(I,x,c.minPxSize,c.maxPxSize);if(0<H)for(;h--;)d(f[h])&&a.dataMin<=f[h]&&f[h]<=a.dataMax&&(l=c.radii[h],b=Math.min((f[h]-p)*y-l,b),g=Math.max((f[h]-p)*y+l,g))});D.length&&0<H&&!this.isLog&&(g-=f,y*=(f+b-g)/f,v([["min","userMin",b],["max","userMax",g]],function(b){void 0===m(a.options[b[0]],a[b[1]])&& |
(a[b[0]]+=b[2]/y)}))}})(H);(function(a){var w=a.merge,B=a.Point,A=a.seriesType,v=a.seriesTypes;v.bubble&&A("mapbubble","bubble",{animationLimit:500,tooltip:{pointFormat:"{point.name}: {point.z}"}},{xyFromShape:!0,type:"mapbubble",pointArrayMap:["z"],getMapData:v.map.prototype.getMapData,getBox:v.map.prototype.getBox,setData:v.map.prototype.setData},{applyOptions:function(a,g){return a&&void 0!==a.lat&&void 0!==a.lon?B.prototype.applyOptions.call(this,w(a,this.series.chart.fromLatLonToPoint(a)),g): |
v.map.prototype.pointClass.prototype.applyOptions.call(this,a,g)},ttBelow:!1})})(H);(function(a){var w=a.colorPointMixin,B=a.each,A=a.merge,v=a.noop,d=a.pick,g=a.Series,m=a.seriesType,t=a.seriesTypes;m("heatmap","scatter",{animation:!1,borderWidth:0,dataLabels:{formatter:function(){return this.point.value},inside:!0,verticalAlign:"middle",crop:!1,overflow:!1,padding:0},marker:null,pointRange:null,tooltip:{pointFormat:"{point.x}, {point.y}: {point.value}\x3cbr/\x3e"},states:{normal:{animation:!0}, |
hover:{halo:!1,brightness:.2}}},A(a.colorSeriesMixin,{pointArrayMap:["y","value"],hasPointSpecificOptions:!0,getExtremesFromAll:!0,directTouch:!0,init:function(){var a;t.scatter.prototype.init.apply(this,arguments);a=this.options;a.pointRange=d(a.pointRange,a.colsize||1);this.yAxis.axisPointRange=a.rowsize||1},translate:function(){var a=this.options,d=this.xAxis,f=this.yAxis,g=function(a,c,b){return Math.min(Math.max(c,a),b)};this.generatePoints();B(this.points,function(k){var c=(a.colsize||1)/2, |
b=(a.rowsize||1)/2,l=g(Math.round(d.len-d.translate(k.x-c,0,1,0,1)),-d.len,2*d.len),c=g(Math.round(d.len-d.translate(k.x+c,0,1,0,1)),-d.len,2*d.len),e=g(Math.round(f.translate(k.y-b,0,1,0,1)),-f.len,2*f.len),b=g(Math.round(f.translate(k.y+b,0,1,0,1)),-f.len,2*f.len);k.plotX=k.clientX=(l+c)/2;k.plotY=(e+b)/2;k.shapeType="rect";k.shapeArgs={x:Math.min(l,c),y:Math.min(e,b),width:Math.abs(c-l),height:Math.abs(b-e)}});this.translateColors()},drawPoints:function(){t.column.prototype.drawPoints.call(this); |
B(this.points,function(a){a.graphic.css(this.colorAttribs(a))},this)},animate:v,getBox:v,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,alignDataLabel:t.column.prototype.alignDataLabel,getExtremes:function(){g.prototype.getExtremes.call(this,this.valueData);this.valueMin=this.dataMin;this.valueMax=this.dataMax;g.prototype.getExtremes.call(this)}}),w)})(H);(function(a){function w(a,d){var f,g,k,c=!1,b=a.x,l=a.y;a=0;for(f=d.length-1;a<d.length;f=a++)g=d[a][1]>l,k=d[f][1]>l,g!==k&&b<(d[f][0]-d[a][0])* |
(l-d[a][1])/(d[f][1]-d[a][1])+d[a][0]&&(c=!c);return c}var B=a.Chart,A=a.each,v=a.extend,d=a.format,g=a.merge,m=a.win,t=a.wrap;B.prototype.transformFromLatLon=function(d,g){if(void 0===m.proj4)return a.error(21),{x:0,y:null};d=m.proj4(g.crs,[d.lon,d.lat]);var f=g.cosAngle||g.rotation&&Math.cos(g.rotation),k=g.sinAngle||g.rotation&&Math.sin(g.rotation);d=g.rotation?[d[0]*f+d[1]*k,-d[0]*k+d[1]*f]:d;return{x:((d[0]-(g.xoffset||0))*(g.scale||1)+(g.xpan||0))*(g.jsonres||1)+(g.jsonmarginX||0),y:(((g.yoffset|| |
0)-d[1])*(g.scale||1)+(g.ypan||0))*(g.jsonres||1)-(g.jsonmarginY||0)}};B.prototype.transformToLatLon=function(d,g){if(void 0===m.proj4)a.error(21);else{d={x:((d.x-(g.jsonmarginX||0))/(g.jsonres||1)-(g.xpan||0))/(g.scale||1)+(g.xoffset||0),y:((-d.y-(g.jsonmarginY||0))/(g.jsonres||1)+(g.ypan||0))/(g.scale||1)+(g.yoffset||0)};var f=g.cosAngle||g.rotation&&Math.cos(g.rotation),k=g.sinAngle||g.rotation&&Math.sin(g.rotation);g=m.proj4(g.crs,"WGS84",g.rotation?{x:d.x*f+d.y*-k,y:d.x*k+d.y*f}:d);return{lat:g.y, |
lon:g.x}}};B.prototype.fromPointToLatLon=function(d){var g=this.mapTransforms,f;if(g){for(f in g)if(g.hasOwnProperty(f)&&g[f].hitZone&&w({x:d.x,y:-d.y},g[f].hitZone.coordinates[0]))return this.transformToLatLon(d,g[f]);return this.transformToLatLon(d,g["default"])}a.error(22)};B.prototype.fromLatLonToPoint=function(d){var g=this.mapTransforms,f,m;if(!g)return a.error(22),{x:0,y:null};for(f in g)if(g.hasOwnProperty(f)&&g[f].hitZone&&(m=this.transformFromLatLon(d,g[f]),w({x:m.x,y:-m.y},g[f].hitZone.coordinates[0])))return m; |
return this.transformFromLatLon(d,g["default"])};a.geojson=function(a,g,f){var k=[],m=[],c=function(a){var b,c=a.length;m.push("M");for(b=0;b<c;b++)1===b&&m.push("L"),m.push(a[b][0],-a[b][1])};g=g||"map";A(a.features,function(a){var b=a.geometry,e=b.type,b=b.coordinates;a=a.properties;var d;m=[];"map"===g||"mapbubble"===g?("Polygon"===e?(A(b,c),m.push("Z")):"MultiPolygon"===e&&(A(b,function(a){A(a,c)}),m.push("Z")),m.length&&(d={path:m})):"mapline"===g?("LineString"===e?c(b):"MultiLineString"===e&& |
A(b,c),m.length&&(d={path:m})):"mappoint"===g&&"Point"===e&&(d={x:b[0],y:-b[1]});d&&k.push(v(d,{name:a.name||a.NAME,properties:a}))});f&&a.copyrightShort&&(f.chart.mapCredits=d(f.chart.options.credits.mapText,{geojson:a}),f.chart.mapCreditsFull=d(f.chart.options.credits.mapTextFull,{geojson:a}));return k};t(B.prototype,"addCredits",function(a,d){d=g(!0,this.options.credits,d);this.mapCredits&&(d.href=null);a.call(this,d);this.credits&&this.mapCreditsFull&&this.credits.attr({title:this.mapCreditsFull})})})(H); |
(function(a){function w(a,d,g,c,b,k,e,m){return["M",a+b,d,"L",a+g-k,d,"C",a+g-k/2,d,a+g,d+k/2,a+g,d+k,"L",a+g,d+c-e,"C",a+g,d+c-e/2,a+g-e/2,d+c,a+g-e,d+c,"L",a+m,d+c,"C",a+m/2,d+c,a,d+c-m/2,a,d+c-m,"L",a,d+b,"C",a,d+b/2,a+b/2,d,a+b,d,"Z"]}var B=a.Chart,A=a.defaultOptions,v=a.each,d=a.extend,g=a.merge,m=a.pick,t=a.Renderer,p=a.SVGRenderer,k=a.VMLRenderer;d(A.lang,{zoomIn:"Zoom in",zoomOut:"Zoom out"});A.mapNavigation={buttonOptions:{alignTo:"plotBox",align:"left",verticalAlign:"top",x:0,width:18,height:18, |
padding:5},buttons:{zoomIn:{onclick:function(){this.mapZoom(.5)},text:"+",y:0},zoomOut:{onclick:function(){this.mapZoom(2)},text:"-",y:28}},mouseWheelSensitivity:1.1};a.splitPath=function(a){var d;a=a.replace(/([A-Za-z])/g," $1 ");a=a.replace(/^\s*/,"").replace(/\s*$/,"");a=a.split(/[ ,]+/);for(d=0;d<a.length;d++)/[a-zA-Z]/.test(a[d])||(a[d]=parseFloat(a[d]));return a};a.maps={};p.prototype.symbols.topbutton=function(a,d,g,c,b){return w(a-1,d-1,g,c,b.r,b.r,0,0)};p.prototype.symbols.bottombutton=function(a, |
d,g,c,b){return w(a-1,d-1,g,c,0,0,b.r,b.r)};t===k&&v(["topbutton","bottombutton"],function(a){k.prototype.symbols[a]=p.prototype.symbols[a]});a.Map=a.mapChart=function(d,k,p){var c="string"===typeof d||d.nodeName,b=arguments[c?1:0],f={endOnTick:!1,visible:!1,minPadding:0,maxPadding:0,startOnTick:!1},e,n=a.getOptions().credits;e=b.series;b.series=null;b=g({chart:{panning:"xy",type:"map"},credits:{mapText:m(n.mapText,' \u00a9 \x3ca href\x3d"{geojson.copyrightUrl}"\x3e{geojson.copyrightShort}\x3c/a\x3e'), |
mapTextFull:m(n.mapTextFull,"{geojson.copyright}")},tooltip:{followTouchMove:!1},xAxis:f,yAxis:g(f,{reversed:!0})},b,{chart:{inverted:!1,alignTicks:!1}});b.series=e;return c?new B(d,b,p):new B(b,k)}})(H);return H}); |