Вход Регистрация
Файл: магазин/e-proger/js/highcharts/highcharts.js
Строк: 5441
<?php
/* Highcharts JS v3.0.4 (2013-08-02) (c) 2009-2013 Torstein Hønsi License: www.highcharts.com/license */ (function(){function x(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function A(){var a,b=arguments.length,c={},d=function(a,b){var c,h;"object"!==typeof a&&(a={});for(h in b)b.hasOwnProperty(h)&&((c=b[h])&&"object"===typeof c&&"[object Array]"!==Object.prototype.toString.call(c)&&"number"!==typeof c.nodeType?a[h]=d(a[h]||{},c):a[h]=b[h]);return a};for(a=0;a<b;a++)c=d(c,arguments[a]);return c}function D(a,b){return parseInt(a,b||10)}function ga(a){return"string"===typeof a}function X(a){return"object"=== typeof a}function Ha(a){return"[object Array]"===Object.prototype.toString.call(a)}function qa(a){return"number"===typeof a}function na(a){return R.log(a)/R.LN10}function ha(a){return R.pow(10,a)}function ia(a,b){for(var c=a.length;c--;)if(a[c]===b){a.splice(c,1);break}}function v(a){return a!==y&&null!==a}function z(a,b,c){var d,e;if(ga(b))v(c)?a.setAttribute(b,c):a&&a.getAttribute&&(e=a.getAttribute(b));else if(v(b)&&X(b))for(d in b)a.setAttribute(d,b[d]);return e}function ka(a){return Ha(a)?a: [a]}function r(){var a=arguments,b,c,d=a.length;for(b=0;b<d;b++)if(c=a[b],"undefined"!==typeof c&&null!==c)return c}function M(a,b){ra&&(b&&b.opacity!==y)&&(b.filter="alpha(opacity="+100*b.opacity+")");x(a.style,b)}function W(a,b,c,d,e){a=B.createElement(a);b&&x(a,b);e&&M(a,{padding:0,border:P,margin:0});c&&M(a,c);d&&d.appendChild(a);return a}function ja(a,b){var c=function(){};c.prototype=new a;x(c.prototype,b);return c}function za(a,b,c,d){var e=G.lang;a=+a||0;var f=-1===b?(a.toString().split(".")[1]|| "").length:isNaN(b=S(b))?2:b;b=void 0===c?e.decimalPoint:c;d=void 0===d?e.thousandsSep:d;e=0>a?"-":"";c=String(D(a=S(a).toFixed(f)));var g=3<c.length?c.length%3:0;return e+(g?c.substr(0,g)+d:"")+c.substr(g).replace(/(d{3})(?=d)/g,"$1"+d)+(f?b+S(a-c).toFixed(f).slice(2):"")}function Aa(a,b){return Array((b||2)+1-String(a).length).join(0)+a}function Lb(a,b,c){var d=a[b];a[b]=function(){var a=Array.prototype.slice.call(arguments);a.unshift(d);return c.apply(this,a)}}function Ba(a,b){for(var c="{"d=!1,e,f,g,h,k,l=[];-1!==(c=a.indexOf(c));){e=a.slice(0,c);if(d){f=e.split(":");g=f.shift().split(".");k=g.length;e=b;for(h=0;h<k;h++)e=e[g[h]];f.length&&(f=f.join(":"),g=/.([0-9])/,h=G.lang,k=void 0,/f$/.test(f)?(k=(k=f.match(g))?k[1]:-1,e=za(e,k,h.decimalPoint,-1<f.indexOf(",")?h.thousandsSep:"")):e=Ya(f,e))}l.push(e);a=a.slice(c+1);c=(d=!d)?"}":"{"}l.push(a);return l.join("")}function rb(a){return R.pow(10,V(R.log(a)/R.LN10))}function sb(a,b,c,d){var e;c=r(c,1);e=a/c;b||(b=[1,2,2.5,5,10],d&&!1=== d.allowDecimals&&(1===c?b=[1,2,5,10]:0.1>=c&&(b=[1/c])));for(d=0;d<b.length&&!(a=b[d],e<=(b[d]+(b[d+1]||b[d]))/2);d++);return a*c}function Mb(a,b){var c=b||[[Nb,[1,2,5,10,20,25,50,100,200,500]],[tb,[1,2,5,10,15,30]],[Za,[1,2,5,10,15,30]],[Qa,[1,2,3,4,6,8,12]],[sa,[1,2]],[$a,[1,2]],[Ra,[1,2,3,4,6]],[ta,null]],d=c[c.length-1],e=E[d[0]],f=d[1],g;for(g=0;g<c.length&&!(d=c[g],e=E[d[0]],f=d[1],c[g+1]&&a<=(e*f[f.length-1]+E[c[g+1][0]])/2);g++);e===E[ta]&&a<5*e&&(f=[1,2,5]);e===E[ta]&&a<5*e&&(f=[1,2,5]); c=sb(a/e,f,d[0]===ta?rb(a/e):1);return{unitRange:e,count:c,unitName:d[0]}}function Ob(a,b,c,d){var e=[],f={},g=G.global.useUTC,h,k=new Date(b),l=a.unitRange,m=a.count;if(v(b)){l>=E[tb]&&(k.setMilliseconds(0),k.setSeconds(l>=E[Za]?0:m*V(k.getSeconds()/m)));if(l>=E[Za])k[Pb](l>=E[Qa]?0:m*V(k[ub]()/m));if(l>=E[Qa])k[Qb](l>=E[sa]?0:m*V(k[vb]()/m));if(l>=E[sa])k[wb](l>=E[Ra]?1:m*V(k[Sa]()/m));l>=E[Ra]&&(k[Rb](l>=E[ta]?0:m*V(k[ab]()/m)),h=k[bb]());if(l>=E[ta])k[Sb](h-h%m);if(l===E[$a])k[wb](k[Sa]()-k[xb]()+ r(d,1));b=1;h=k[bb]();d=k.getTime();for(var n=k[ab](),p=k[Sa](),s=g?0:(864E5+6E4*k.getTimezoneOffset())%864E5;d<c;)e.push(d),d=l===E[ta]?cb(h+b*m,0):l===E[Ra]?cb(h,n+b*m):g||l!==E[sa]&&l!==E[$a]?d+l*m:cb(h,n,p+b*m*(l===E[sa]?1:7)),b++;e.push(d);q(yb(e,function(a){return l<=E[Qa]&&a%E[sa]===s}),function(a){f[a]=sa})}e.info=x(a,{higherRanks:f,totalRange:l*m});return e}function Tb(){this.symbol=this.color=0}function Ub(a,b){var c=a.length,d,e;for(e=0;e<c;e++)a[e].ss_i=e;a.sort(function(a,c){d=b(a,c); return 0===d?a.ss_i-c.ss_i:d});for(e=0;e<c;e++)delete a[e].ss_i}function Ia(a){for(var b=a.length,c=a[0];b--;)a[b]<c&&(c=a[b]);return c}function ua(a){for(var b=a.length,c=a[0];b--;)a[b]>c&&(c=a[b]);return c}function Ja(a,b){for(var c in a)a[c]&&(a[c]!==b&&a[c].destroy)&&a[c].destroy(),delete a[c]}function Ta(a){db||(db=W(Ca));a&&db.appendChild(a);db.innerHTML=""}function va(a,b){if(b)throw"";N.console&&console.log("")}function la(a){return parseFloat(a.toPrecision(14))}function Ka(a,b){Da=r(a,b.animation)} function Vb(){var a=G.global.useUTC,b=a?"getUTC":"get",c=a?"setUTC":"set";cb=a?Date.UTC:function(a,b,c,g,h,k){return(new Date(a,b,r(c,1),r(g,0),r(h,0),r(k,0))).getTime()};ub=b+"Minutes";vb=b+"Hours";xb=b+"Day";Sa=b+"Date";ab=b+"Month";bb=b+"FullYear";Pb=c+"Minutes";Qb=c+"Hours";wb=c+"Date";Rb=c+"Month";Sb=c+"FullYear"}function wa(){}function La(a,b,c,d){this.axis=a;this.pos=b;this.type=c||"";this.isNew=!0;c||d||this.addLabel()}function zb(a,b){this.axis=a;b&&(this.options=b,this.id=b.id)}function Wb(ab,c,d,e,f){var g=a.chart.inverted;this.axis=a;this.isNegative=c;this.options=b;this.x=d;this.total=0;this.points={};this.stack=e;this.percent="percent"===f;this.alignOptions={align:b.align||(g?c?"left":"right":"center"),verticalAlign:b.verticalAlign||(g?"middle":c?"bottom":"top"),y:r(b.y,g?4:c?14:-6),x:r(b.x,g?c?-6:6:0)};this.textAlign=b.textAlign||(g?c?"right":"left":"center")}function eb(){this.init.apply(this,arguments)}function Ab(){this.init.apply(this,arguments)}function Bb(a,b){this.init(ab)}function Cb(a,b){this.init(a,b)}function Db(){this.init.apply(this,arguments)}var y,B=document,N=window,R=Math,w=R.round,V=R.floor,ma=R.ceil,u=R.max,O=R.min,S=R.abs,Y=R.cos,ea=R.sin,Ma=R.PI,Ua=2*Ma/360,Ea=navigator.userAgent,Xb=N.opera,ra=/msie/i.test(Ea)&&!Xb,fb=8===B.documentMode,gb=/AppleWebKit/.test(Ea),hb=/Firefox/.test(Ea),Yb=/(Mobile|Android|Windows Phone)/.test(Ea),xa="http://www.w3.org/2000/svg",$=!!B.createElementNS&&!!B.createElementNS(xa,"svg").createSVGRect,ec=hb&&4>parseInt(Ea.split("Firefox/")[1], 10),aa=!$&&!ra&&!!B.createElement("canvas").getContext,Va,ib=B.documentElement.ontouchstart!==y,Zb={},Eb=0,db,G,Ya,Da,Fb,E,ya=function(){},Fa=[],Ca="div",P="none",$b="rgba(192,192,192,"+($?1E-4:0.002)+")",Nb="millisecond",tb="second",Za="minute",Qa="hour",sa="day",$a="week",Ra="month",ta="year",ac="stroke-width",cb,ub,vb,xb,Sa,ab,bb,Pb,Qb,wb,Rb,Sb,ba={};N.Highcharts=N.Highcharts?va(16,!0):{};Ya=function(a,b,c){if(!v(b)||isNaN(b))return"Invalid date";a=r(a,"%Y-%m-%d %H:%M:%S");var d=new Date(b),ef=d[vb](),g=d[xb](),h=d[Sa](),k=d[ab](),l=d[bb](),m=G.lang,n=m.weekdays,d=x({a:n[g].substr(0,3),A:n[g],d:Aa(h),e:h,b:m.shortMonths[k],B:m.months[k],m:Aa(k+1),y:l.toString().substr(2,2),Y:l,H:Aa(f),I:Aa(f%12||12),l:f%12||12,M:Aa(d[ub]()),p:12>f?"AM":"PM",P:12>f?"am":"pm",S:Aa(d.getSeconds()),L:Aa(w(b%1E3),3)},Highcharts.dateFormats);for(e in d)for(;-1!==a.indexOf("%"+e);)a=a.replace("%"+e,"function"===typeof d[e]?d[e](b):d[e]);return c?a.substr(0,1).toUpperCase()+a.substr(1):a};Tb.prototype={wrapColor:function(a){this.color>= a&&(this.color=0)},wrapSymbol:function(a){this.symbol>=a&&(this.symbol=0)}};E=function(){for(var a=0,b=arguments,c=b.length,d={};a<c;a++)d[b[a++]]=b[a];return d}(Nb,1,tb,1E3,Za,6E4,Qa,36E5,sa,864E5,$a,6048E5,Ra,26784E5,ta,31556952E3);Fb={init:function(a,b,c){b=b||"";var d=a.shift,e=-1<b.indexOf("C"),f=e?7:3,g;b=b.split(" ");c=[].concat(c);var h,k,l=function(a){for(g=a.length;g--;)"M"===a[g]&&a.splice(g+1,0,a[g+1],a[g+2],a[g+1],a[g+2])};e&&(l(b),l(c));a.isArea&&(h=b.splice(b.length-6,6),k=c.splice(c.length6,6));if(d<=c.length/f)for(;d--;)c=[].concat(c).splice(0,f).concat(c);a.shift=0;if(b.length)for(a=c.length;b.length<a;)d=[].concat(b).splice(b.length-f,f),e&&(d[f-6]=d[f-2],d[f-5]=d[f-1]),b=b.concat(d);h&&(b=b.concat(h),c=c.concat(k));return[b,c]},step:function(a,b,c,d){var e=[],f=a.length;if(1===c)e=d;else if(f===b.length&&1>c)for(;f--;)d=parseFloat(a[f]),e[f]=isNaN(d)?a[f]:c*parseFloat(b[f]-d)+d;else e=b;return e}};(function(a){N.HighchartsAdapter=N.HighchartsAdapter||a&&{init:function(b){var ca.fx,d=c.step,e,f=a.Tween,g=f&&f.propHooks;e=a.cssHooks.opacity;a.extend(a.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}});a.each(["cur","_default","width","height","opacity"],function(a,b){var e=d,m,n;"cur"===b?e=c.prototype:"_default"===b&&f&&(e=g[b],b="set");(m=e[b])&&(e[b]=function(c){c=a?c:this;n=c.elem;return n.attr?n.attr(c.prop,"cur"===b?y:c.now):m.apply(this,arguments)})});Lb(e,"get",function(a,b,c){return b.attr?b.opacity||0:a.call(this,b,c)});e=function(a){var c=a.elemd;a.started||(d=b.init(c,c.d,c.toD),a.start=d[0],a.end=d[1],a.started=!0);c.attr("d",b.step(a.start,a.end,a.pos,c.toD))};f?g.d={set:e}:d.d=e;this.each=Array.prototype.forEach?function(a,b){return Array.prototype.forEach.call(a,b)}:function(a,b){for(var c=0,d=a.length;c<d;c++)if(!1===b.call(a[c],a[c],c,a))return c};a.fn.highcharts=function(){var a="Chart",b=arguments,c,d;ga(b[0])&&(a=b[0],b=Array.prototype.slice.call(b,1));c=b[0];c!==y&&(c.chart=c.chart||{},c.chart.renderTo=this[0],new Highcharts[a](cb[1]),d=this);c===y&&(d=Fa[z(this[0],"data-highcharts-chart")]);return d}},getScript:a.getScript,inArray:a.inArray,adapterRun:function(b,c){return a(b)[c]()},grep:a.grep,map:function(a,c){for(var d=[],e=0,f=a.length;e<f;e++)d[e]=c.call(a[e],a[e],e,a);return d},offset:function(b){return a(b).offset()},addEvent:function(b,c,d){a(b).bind(c,d)},removeEvent:function(b,c,d){var e=B.removeEventListener?"removeEventListener":"detachEvent";B[e]&&(b&&!b[e])&&(b[e]=function(){});a(b).unbind(c,d)},fireEvent:function(bc,d,e){var f=a.Event(c),g="detached"+c,h;!ra&&d&&(delete d.layerX,delete d.layerY);x(f,d);b[c]&&(b[g]=b[c],b[c]=null);a.each(["preventDefault","stopPropagation"],function(a,b){var c=f[b];f[b]=function(){try{c.call(f)}catch(a){"preventDefault"===b&&(h=!0)}}});a(b).trigger(f);b[g]&&(b[c]=b[g],b[g]=null);!e||(f.isDefaultPrevented()||h)||e(f)},washMouseEvent:function(a){var c=a.originalEvent||a;c.pageX===y&&(c.pageX=a.pageX,c.pageY=a.pageY);return c},animate:function(b,c,d){var e=a(b);b.style||(b.style= {});c.d&&(b.toD=c.d,c.d=1);e.stop();e.animate(c,d)},stop:function(b){a(b).stop()}}})(N.jQuery);var jb=N.HighchartsAdapter,ca=jb||{};jb&&jb.init.call(jb,Fb);var kb=ca.adapterRun,fc=ca.getScript,oa=ca.inArray,q=ca.each,yb=ca.grep,gc=ca.offset,Na=ca.map,L=ca.addEvent,da=ca.removeEvent,K=ca.fireEvent,bc=ca.washMouseEvent,Gb=ca.animate,Wa=ca.stop,Hb={enabled:!0,x:0,y:15,style:{color:"#666",cursor:"default",fontSize:"10px",lineHeight:"14px"}};G={colors:"#F37446 #bf8080 #92bf80 #910000 #1aadce #492970 #f28f43 #77a1e5 #c42525 #a6c96a".split(" "), 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,canvasToolsURL:"http://code.highcharts.com/3.0.4/modules/canvas-tools.js"VMLRadialGradientURL:"http://code.highcharts.com/3.0.4/gfx/vml-radial-gradient.png"},chart:{borderColor:"#4572A7",borderRadius:5,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacingTop:10,spacingRight:10,spacingBottom:15,spacingLeft:10,style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',fontSize:"11px"},backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0",resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}}},title:{text:"Chart title"align:"center",margin:5,style:{color:"#274b6d",fontSize:"10px"}},subtitle:{text:"",align:"center",style:{color:"#4d759e"}},plotOptions:{line:{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},lineWidth:2,marker:{enabled:!0,lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{enabled:!0},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:A(Hb,{align:"center",enabled:!1,formatter:function(){return null===this.y?"":za(this.y,-1)},verticalAlign:"bottom"y:0}),cropThreshold:300,pointRange:0,showInLegend:!0,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:!0}},labels:{style:{position:"absolute",color:"#3E576F"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderWidth:1,borderColor:"#909090",borderRadius:5,navigation:{activeColor:"#274b6d",inactiveColor:"#CCC"},shadow:!1,itemStyle:{cursor:"pointer",color:"#274b6d",fontSize:"12px"},itemHoverStyle:{color:"#000"},itemHiddenStyle:{color:"#CCC"}, itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},symbolWidth:16,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"1em"},style:{position:"absolute",backgroundColor:"white",opacity:0.5,textAlign:"center"}},tooltip:{enabled:!0,animation:$,backgroundColor:"rgba(255, 255, 255, .85)",borderWidth:1,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"},headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b><br/>',shadow:!0,snap:Yb?25:10,style:{color:"#333333",cursor:"default",fontSize:"12px",padding:"8px",whiteSpace:"nowrap"}}};var Z=G.plotOptions,Xa=Z.line;Vb();var pa=function(a){var b=[],c,d;(function(a){a&&a.stops?d=Na(a.stops, function(a){return pa(a[1])}):(c=/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*)/.exec(a))?b=[D(c[1]),D(c[2]),D(c[3]),parseFloat(c[4],10)]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a))?b=[D(c[1],16),D(c[2],16),D(c[3],16),1]:(c=/rgb(s*([0-9]{1,3})s*,s*([0-9]{1,3})s*,s*([0-9]{1,3})s*)/.exec(a))&&(b=[D(c[1]),D(c[2]),D(c[3]),1])})(a);return{get:function(c){var f;d?(f=A(a),f.stops=[].concat(f.stops),q(d,function(a,b){f.stops[b]=[f.stops[b][0], a.get(c)]})):f=b&&!isNaN(b[0])?"rgb"===c?"rgb("+b[0]+","+b[1]+","+b[2]+")":"a"===c?b[3]:"rgba("+b.join(",")+")":a;return f},brighten:function(a){if(d)q(d,function(b){b.brighten(a)});else if(qa(a)&&0!==a){var c;for(c=0;3>c;c++)b[c]+=D(255*a),0>b[c]&&(b[c]=0),255<b[c]&&(b[c]=255)}return this},rgba:b,setOpacity:function(a){b[3]=a;return this}}};wa.prototype={init:function(a,b){this.element="span"===b?W(b):B.createElementNS(xa,b);this.renderer=a;this.attrSetters={}},opacity:1,animate:function(a,b,c){b= r(b,Da,!0);Wa(this);b?(b=A(b),c&&(b.complete=c),Gb(this,a,b)):(this.attr(a),c&&c())},attr:function(a,b){var c,d,e,f,g=this.element,h=g.nodeName.toLowerCase(),k=this.renderer,l,m=this.attrSetters,n=this.shadows,p,s,t=this;ga(a)&&v(b)&&(c=a,a={},a[c]=b);if(ga(a))c=a,"circle"===h?c={x:"cx",y:"cy"}[c]||c:"strokeWidth"===c&&(c="stroke-width"),t=z(g,c)||this[c]||0,"d"!==c&&"visibility"!==c&&(t=parseFloat(t));else{for(c in a)if(l=!1,d=a[c],e=m[c]&&m[c].call(this,d,c),!1!==e){e!==y&&(d=e);if("d"===c)d&&d.join&& (d=d.join(" ")),/(NaN| {2}|^$)/.test(d)&&(d="M 0 0");else if("x"===c&&"text"===h)for(e=0;e<g.childNodes.length;e++)f=g.childNodes[e],z(f,"x")===z(g,"x")&&z(f,"x",d);else if(!this.rotation||"x"!==c&&"y"!==c)if("fill"===c)d=k.color(d,g,c);else if("circle"!==h||"x"!==c&&"y"!==c)if("rect"===h&&"r"===c)z(g,{rx:d,ry:d}),l=!0;else if("translateX"===c||"translateY"===c||"rotation"===c||"verticalAlign"===c||"scaleX"===c||"scaleY"===c)l=s=!0;else if("stroke"===c)d=k.color(d,g,c);else if("dashstyle"===c)if(c= "stroke-dasharray",d=d&&d.toLowerCase(),"solid"===d)d=P;else{if(d){d=d.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(e=d.length;e--;)d[e]=D(d[e])*r(a["stroke-width"],this["stroke-width"]);d=d.join(",")}}else"width"===c?d=D(d):"align"===c?(c="text-anchor",d={left:"start",center:"middle",right:"end"}[d]):"title"=== c&&(e=g.getElementsByTagName("title")[0],e||(e=B.createElementNS(xa,"title"),g.appendChild(e)),e.textContent=d);else c={x:"cx",y:"cy"}[c]||c;else s=!0;"strokeWidth"===c&&(c="stroke-width");if("stroke-width"===c||"stroke"===c)this[c]=d,this.stroke&&this["stroke-width"]?(z(g,"stroke",this.stroke),z(g,"stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===c&&(0===d&&this.hasStroke)&&(g.removeAttribute("stroke"),this.hasStroke=!1),l=!0;this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(c)&& (p||(this.symbolAttr(a),p=!0),l=!0);if(n&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(c))for(e=n.length;e--;)z(n[e],c,"height"===c?u(d-(n[e].cutHeight||0),0):d);("width"===c||"height"===c)&&("rect"===h&&0>d)&&(d=0);this[c]=d;"text"===c?(d!==this.textStr&&delete this.bBox,this.textStr=d,this.added&&k.buildText(this)):l||z(g,c,d)}s&&this.updateTransform()}return t},addClass:function(a){var b=this.element,c=z(b,"class")||"";-1===c.indexOf(a)&&z(b,"class",c+" "+a);return this},symbolAttr:function(a){var b= this;q("x y r start end width height innerR anchorX anchorY".split(" "),function(c){b[c]=r(a[c],b[c])});b.attr({d:b.renderer.symbols[b.symbolName](b.x,b.y,b.width,b.height,b)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":P)},crisp:function(a,b,c,d,e){var f,g={},h={},k;a=a||this.strokeWidth||this.attr&&this.attr("stroke-width")||0;k=w(a)%2/2;h.x=V(b||this.x||0)+k;h.y=V(c||this.y||0)+k;h.width=V((d||this.width||0)-2*k);h.height=V((e||this.height||0)-2*k);h.strokeWidth= a;for(f in h)this[f]!==h[f]&&(this[f]=g[f]=h[f]);return g},css:function(a){var b=this.element,c=a&&a.width&&"text"===b.nodeName.toLowerCase(),d,e="",f=function(a,b){return"-"+b.toLowerCase()};a&&a.color&&(a.fill=a.color);this.styles=a=x(this.styles,a);aa&&c&&delete a.width;if(ra&&!$)c&&delete a.width,M(this.element,a);else{for(d in a)e+=d.replace(/([A-Z])/g,f)+":"+a[d]+";";z(b,"style",e)}c&&this.added&&this.renderer.buildText(this);return this},on:function(a,b){var c=this.element;ib&&"click"===a&& (c.ontouchstart=function(a){a.preventDefault();b.call(c,a)});c["on"+a]=b;return this},setRadialReference:function(a){this.element.radialReference=a;return this},translate:function(a,b){return this.attr({translateX:a,translateY:b})},invert:function(){this.inverted=!0;this.updateTransform();return this},htmlCss:function(a){var b=this.element;if(b=a&&"SPAN"===b.tagName&&a.width)delete a.width,this.textWidth=b,this.updateTransform();this.styles=x(this.styles,a);M(this.element,a);return this},htmlGetBBox:function(){var a= this.element,b=this.bBox;b||("text"===a.nodeName&&(a.style.position="absolute"),b=this.bBox={x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight});return b},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,b=this.element,c=this.translateX||0,d=this.translateY||0,e=this.x||0,f=this.y||0,g=this.textAlign||"left",h={left:0,center:0.5,right:1}[g],k=g&&"left"!==g,l=this.shadows;M(b,{marginLeft:c,marginTop:d});l&&q(l,function(a){M(a,{marginLeft:c+1,marginTop:d+1})}); this.inverted&&q(b.childNodes,function(c){a.invertChild(c,b)});if("SPAN"===b.tagName){var m,n,l=this.rotation,p;m=0;var s=1,t=0,U;p=D(this.textWidth);var F=this.xCorr||0;U=this.yCorr||0;var Q=[l,g,b.innerHTML,this.textWidth].join();Q!==this.cTT&&(v(l)&&(m=l*Ua,s=Y(m),t=ea(m),this.setSpanRotation(l,t,s)),m=r(this.elemWidth,b.offsetWidth),n=r(this.elemHeight,b.offsetHeight),m>p&&/[ -]/.test(b.textContent||b.innerText)&&(M(b,{width:p+"px",display:"block",whiteSpace:"normal"}),m=p),p=a.fontMetrics(b.style.fontSize).b, U=0>s*t,F=(0>s&&-m)+t*p*(U?1-h:h),U=(0>t&&-n)-s*p*(l?U?h:1-h:1),k&&(F-=m*h*(0>s?-1:1),l&&(U-=n*h*(0>t?-1:1)),M(b,{textAlign:g})),this.xCorr=F,this.yCorr=U);M(b,{left:e+F+"px",top:f+U+"px"});gb&&(n=b.offsetHeight);this.cTT=Q}}else this.alignOnAdd=!0},setSpanRotation:function(a){var b={};b[ra?"-ms-transform":gb?"-webkit-transform":hb?"MozTransform":Xb?"-o-transform":""]=b.transform="rotate("+a+"deg)";M(this.element,b)},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,c=this.scaleX, d=this.scaleY,e=this.inverted,f=this.rotation;e&&(a+=this.attr("width"),b+=this.attr("height"));a=["translate("+a+","+b+")"];e?a.push("rotate(90) scale(-1,1)"):f&&a.push("rotate("+f+" "+(this.x||0)+" "+(this.y||0)+")");(v(c)||v(d))&&a.push("scale("+r(c,1)+" "+r(d,1)+")");a.length&&z(this.element,"transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,b,c){var d,e,f,g,h={};e=this.renderer;f=e.alignedObjects;if(a){if(this.alignOptions= a,this.alignByTranslate=b,!c||ga(c))this.alignTo=d=c||"renderer",ia(f,this),f.push(this),c=null}else a=this.alignOptions,b=this.alignByTranslate,d=this.alignTo;c=r(c,e[d],e);d=a.align;e=a.verticalAlign;f=(c.x||0)+(a.x||0);g=(c.y||0)+(a.y||0);if("right"===d||"center"===d)f+=(c.width-(a.width||0))/{right:1,center:2}[d];h[b?"translateX":"x"]=w(f);if("bottom"===e||"middle"===e)g+=(c.height-(a.height||0))/({bottom:1,middle:2}[e]||1);h[b?"translateY":"y"]=w(g);this[this.placed?"animate":"attr"](h);this.placed= !0;this.alignAttr=h;return this},getBBox:function(){var a=this.bBox,b=this.renderer,c,d=this.rotation;c=this.element;var e=this.styles,f=d*Ua;if(!a){if(c.namespaceURI===xa||b.forExport){try{a=c.getBBox?x({},c.getBBox()):{width:c.offsetWidth,height:c.offsetHeight}}catch(g){}if(!a||0>a.width)a={width:0,height:0}}else a=this.htmlGetBBox();b.isSVG&&(b=a.width,c=a.height,ra&&(e&&"11px"===e.fontSize&&"22.7"===c.toPrecision(3))&&(a.height=c=14),d&&(a.width=S(c*ea(f))+S(b*Y(f)),a.height=S(c*Y(f))+S(b*ea(f)))); this.bBox=a}return a},show:function(){return this.attr({visibility:"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var b=this;b.animate({opacity:0},{duration:a||150,complete:function(){b.hide()}})},add:function(a){var b=this.renderer,c=a||b,d=c.element||b.box,e=d.childNodes,f=this.element,g=z(f,"zIndex"),h;a&&(this.parentGroup=a);this.parentInverted=a&&a.inverted;void 0!==this.textStr&&b.buildText(this);g&&(c.handleZ=!0,g=D(g));if(c.handleZ)for(c=0;c<e.length;c++)if(a= e[c],b=z(a,"zIndex"),a!==f&&(D(b)>g||!v(g)&&v(b))){d.insertBefore(f,a);h=!0;break}h||d.appendChild(f);this.added=!0;K(this,"add");return this},safeRemoveChild:function(a){var b=a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,b=a.element||{},c=a.shadows,d=a.renderer.isSVG&&"SPAN"===b.nodeName&&b.parentNode,e,f;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=b.point=null;Wa(a);a.clipPath&&(a.clipPath=a.clipPath.destroy());if(a.stops){for(f=0;f<a.stops.length;f++)a.stops[f]=a.stops[f].destroy(); a.stops=null}a.safeRemoveChild(b);for(c&&q(c,function(b){a.safeRemoveChild(b)});d&&0===d.childNodes.length;)b=d.parentNode,a.safeRemoveChild(d),d=b;a.alignTo&&ia(a.renderer.alignedObjects,a);for(e in a)delete a[e];return null},shadow:function(a,b,c){var d=[],e,f,g=this.element,h,k,l,m;if(a){k=r(a.width,3);l=(a.opacity||0.15)/k;m=this.parentInverted?"(-1,-1)":"("+r(a.offsetX,1)+", "+r(a.offsetY,1)+")";for(e=1;e<=k;e++)f=g.cloneNode(0),h=2*k+1-2*e,z(f,{isShadow:"true",stroke:a.color||"black","stroke-opacity":l* e,"stroke-width":h,transform:"translate"+m,fill:P}),c&&(z(f,"height",u(z(f,"height")-h,0)),f.cutHeight=h),b?b.element.appendChild(f):g.parentNode.insertBefore(f,g),d.push(f);this.shadows=d}return this}};var Ga=function(){this.init.apply(this,arguments)};Ga.prototype={Element:wa,init:function(a,b,c,d){var e=location,f,g;f=this.createElement("svg").attr({version:"1.1"});g=f.element;a.appendChild(g);-1===a.innerHTML.indexOf("xmlns")&&z(g,"xmlns",xa);this.isSVG=!0;this.box=g;this.boxWrapper=f;this.alignedObjects= [];this.url=(hb||gb)&&B.getElementsByTagName("base").length?e.href.replace(/#.*?$/,"").replace(/([(')])/g,"\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(B.createTextNode("Created with Highcharts 3.0.4"));this.defs=this.createElement("defs").add();this.forExport=d;this.gradients={};this.setSize(b,c,!1);var h;hb&&a.getBoundingClientRect&&(this.subPixelFix=b=function(){M(a,{left:0,top:0});h=a.getBoundingClientRect();M(a,{left:ma(h.left)-h.left+"px",top:ma(h.top)- h.top+"px"})},b(),L(N,"resize",b))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();Ja(this.gradients||{});this.gradients=null;a&&(this.defs=a.destroy());this.subPixelFix&&da(N,"resize",this.subPixelFix);return this.alignedObjects=null},createElement:function(a){var b=new this.Element;b.init(this,a);return b},draw:function(){},buildText:function(a){for(var b=a.element,c=this,d=c.forExport,e=r(a.textStr, "").toString().replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/</(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g),f=b.childNodes,g=/style="([^"]+)"/,h=/href="(http[^"]+)"/,k=z(b,"x"),l=a.styles,m=l&&l.width&&D(l.width),n=l&&l.lineHeight,p=f.length;p--;)b.removeChild(f[p]);m&&!a.added&&this.box.appendChild(b);""===e[e.length-1]&&e.pop();q(e,function(e,f){var p,r=0;e=e.replace(/<span/g,"|||<span").replace(/</span>/g, "</span>|||");p=e.split("|||");q(p,function(e){if(""!==e||1===p.length){var s={},q=B.createElementNS(xa,"tspan"),v;g.test(e)&&(v=e.match(g)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),z(q,"style",v));h.test(e)&&!d&&(z(q,"onclick",'location.href="'+e.match(h)[1]+'"'),M(q,{cursor:"pointer"}));e=(e.replace(/<(.|n)*?>/g,"")||" ").replace(/&lt;/g,"<").replace(/&gt;/g,">");if(" "!==e&&(q.appendChild(B.createTextNode(e)),r?s.dx=0:s.x=k,z(q,s),!r&&f&&(!$&&d&&M(q,{display:"block"}),z(q,"dy",n||c.fontMetrics(/px$/.test(q.style.fontSize)? q.style.fontSize:l.fontSize).h,gb&&q.offsetHeight)),b.appendChild(q),r++,m)){e=e.replace(/([^^])-/g,"$1- ").split(" ");for(var u,w=[];e.length||w.length;)delete a.bBox,u=a.getBBox().width,(s=u>m)&&1!==e.length?(q.removeChild(q.firstChild),w.unshift(e.pop())):(e=w,w=[],e.length&&(q=B.createElementNS(xa,"tspan"),z(q,{dy:n||16,x:k}),v&&z(q,"style",v),b.appendChild(q),u>m&&(m=u))),e.length&&q.appendChild(B.createTextNode(e.join(" ").replace(/- /g,"-")))}}})})},button:function(a,b,c,d,e,f,g){var h=this.label(a, b,c,null,null,null,null,null,"button"),k=0,l,m,n,p,s;a={x1:0,y1:0,x2:0,y2:1};e=A({"stroke-width":1,stroke:"#CCCCCC",fill:{linearGradient:a,stops:[[0,"#FEFEFE"],[1,"#F6F6F6"]]},r:2,padding:5,style:{color:"black"}},e);n=e.style;delete e.style;f=A(e,{stroke:"#68A",fill:{linearGradient:a,stops:[[0,"#FFF"],[1,"#ACF"]]}},f);p=f.style;delete f.style;g=A(e,{stroke:"#68A",fill:{linearGradient:a,stops:[[0,"#9BD"],[1,"#CDF"]]}},g);s=g.style;delete g.style;L(h.element,ra?"mouseover":"mouseenter",function(){h.attr(f).css(p)}); L(h.element,ra?"mouseout":"mouseleave",function(){l=[e,f,g][k];m=[n,p,s][k];h.attr(l).css(m)});h.setState=function(a){(k=a)?2===a&&h.attr(g).css(s):h.attr(e).css(n)};return h.on("click",function(){d.call(h)}).attr(e).css(x({cursor:"default"},n))},crispLine:function(a,b){a[1]===a[4]&&(a[1]=a[4]=w(a[1])-b%2/2);a[2]===a[5]&&(a[2]=a[5]=w(a[2])+b%2/2);return a},path:function(a){var b={fill:P};Ha(a)?b.d=a:X(a)&&x(b,a);return this.createElement("path").attr(b)},circle:function(a,b,c){a=X(a)?a:{x:a,y:b,r:c}; return this.createElement("circle").attr(a)},arc:function(a,b,c,d,e,f){X(a)&&(b=a.y,c=a.r,d=a.innerR,e=a.start,f=a.end,a=a.x);a=this.symbol("arc",a||0,b||0,c||0,c||0,{innerR:d||0,start:e||0,end:f||0});a.r=c;return a},rect:function(a,b,c,d,e,f){e=X(a)?a.r:e;e=this.createElement("rect").attr({rx:e,ry:e,fill:P});return e.attr(X(a)?a:e.crisp(f,a,b,u(c,0),u(d,0)))},setSize:function(a,b,c){var d=this.alignedObjects,e=d.length;this.width=a;this.height=b;for(this.boxWrapper[r(c,!0)?"animate":"attr"]({width:a, height:b});e--;)d[e].align()},g:function(a){var b=this.createElement("g");return v(a)?b.attr({"class":"highcharts-"+a}):b},image:function(a,b,c,d,e){var f={preserveAspectRatio:P};1<arguments.length&&x(f,{x:b,y:c,width:d,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):f.element.setAttribute("hc-svg-href",a);return f},symbol:function(a,b,c,d,e,f){var g,h=this.symbols[a],h=h&&h(w(b),w(c),d,e,f),k=/^url((.*?))$/, l,m;h?(g=this.path(h),x(g,{symbolName:a,x:b,y:c,width:d,height:e}),f&&x(g,f)):k.test(a)&&(m=function(a,b){a.element&&(a.attr({width:b[0],height:b[1]}),a.alignByTranslate||a.translate(w((d-b[0])/2),w((e-b[1])/2)))},l=a.match(k)[1],a=Zb[l],g=this.image(l).attr({x:b,y:c}),g.isImg=!0,a?m(g,a):(g.attr({width:0,height:0}),W("img",{onload:function(){m(g,Zb[l]=[this.width,this.height])},src:l})));return g},symbols:{circle:function(a,b,c,d){var e=0.166*c;return["M",a+c/2,b,"C",a+c+e,b,a+c+e,b+d,a+c/2,b+d, "C",a-e,b+d,a-e,b,a+c/2,b,"Z"]},square:function(a,b,c,d){return["M",a,b,"L",a+c,b,a+c,b+d,a,b+d,"Z"]},triangle:function(a,b,c,d){return["M",a+c/2,b,"L",a+c,b+d,a,b+d,"Z"]},"triangle-down":function(a,b,c,d){return["M",a,b,"L",a+c,b,a+c/2,b+d,"Z"]},diamond:function(a,b,c,d){return["M",a+c/2,b,"L",a+c,b+d/2,a+c/2,b+d,a,b+d/2,"Z"]},arc:function(a,b,c,d,e){var f=e.start;c=e.r||c||d;var g=e.end-0.001;d=e.innerR;var h=e.open,k=Y(f),l=ea(f),m=Y(g),g=ea(g);e=e.end-f<Ma?0:1;return["M",a+c*k,b+c*l,"A",c,c,0, e,1,a+c*m,b+c*g,h?"M":"L",a+d*m,b+d*g,"A",d,d,0,e,0,a+d*k,b+d*l,h?"":"Z"]}},clipRect:function(a,b,c,d){var e="highcharts-"+Eb++,f=this.createElement("clipPath").attr({id:e}).add(this.defs);a=this.rect(a,b,c,d,0).add(f);a.id=e;a.clipPath=f;return a},color:function(a,b,c){var d=this,e,f=/^rgba/,g,h,k,l,m,n,p,s=[];a&&a.linearGradient?g="linearGradient":a&&a.radialGradient&&(g="radialGradient");if(g){c=a[g];h=d.gradients;l=a.stops;b=b.radialReference;Ha(c)&&(a[g]=c={x1:c[0],y1:c[1],x2:c[2],y2:c[3],gradientUnits:"userSpaceOnUse"}); "radialGradient"===g&&(b&&!v(c.gradientUnits))&&(c=A(c,{cx:b[0]-b[2]/2+c.cx*b[2],cy:b[1]-b[2]/2+c.cy*b[2],r:c.r*b[2],gradientUnits:"userSpaceOnUse"}));for(p in c)"id"!==p&&s.push(p,c[p]);for(p in l)s.push(l[p]);s=s.join(",");h[s]?a=h[s].id:(c.id=a="highcharts-"+Eb++,h[s]=k=d.createElement(g).attr(c).add(d.defs),k.stops=[],q(l,function(a){f.test(a[1])?(e=pa(a[1]),m=e.get("rgb"),n=e.get("a")):(m=a[1],n=1);a=d.createElement("stop").attr({offset:a[0],"stop-color":m,"stop-opacity":n}).add(k);k.stops.push(a)})); return"url("+d.url+"#"+a+")"}if(f.test(a))return e=pa(a),z(b,c+"-opacity",e.get("a")),e.get("rgb");b.removeAttribute(c+"-opacity");return a},text:function(a,b,c,d){var e=G.chart.style,f=aa||!$&&this.forExport;if(d&&!this.forExport)return this.html(a,b,c);b=w(r(b,0));c=w(r(c,0));a=this.createElement("text").attr({x:b,y:c,text:a}).css({fontFamily:e.fontFamily,fontSize:e.fontSize});f&&a.css({position:"absolute"});a.x=b;a.y=c;return a},html:function(a,b,c){var d=G.chart.style,e=this.createElement("span"), f=e.attrSetters,g=e.element,h=e.renderer;f.text=function(a){a!==g.innerHTML&&delete this.bBox;g.innerHTML=a;return!1};f.x=f.y=f.align=function(a,b){"align"===b&&(b="textAlign");e[b]=a;e.htmlUpdateTransform();return!1};e.attr({text:a,x:w(b),y:w(c)}).css({position:"absolute",whiteSpace:"nowrap",fontFamily:d.fontFamily,fontSize:d.fontSize});e.css=e.htmlCss;h.isSVG&&(e.add=function(a){var b,c=h.box.parentNode,d=[];if(a){if(b=a.div,!b){for(;a;)d.push(a),a=a.parentGroup;q(d.reverse(),function(a){var d; b=a.div=a.div||W(Ca,{className:z(a.element,"class")},{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px"},b||c);d=b.style;x(a.attrSetters,{translateX:function(a){d.left=a+"px"},translateY:function(a){d.top=a+"px"},visibility:function(a,b){d[b]=a}})})}}else b=c;b.appendChild(g);e.added=!0;e.alignOnAdd&&e.htmlUpdateTransform();return e});return e},fontMetrics:function(a){a=D(a||11);a=24>a?a+4:w(1.2*a);var b=w(0.8*a);return{h:a,b:b}},label:function(a,b,c,d,e,f,g,h,k){function l(){var a, b;a=r.element.style;Q=(void 0===Oa||void 0===I||t.styles.textAlign)&&r.getBBox();t.width=(Oa||Q.width||0)+2*fa+lb;t.height=(I||Q.height||0)+2*fa;z=fa+s.fontMetrics(a&&a.fontSize).b;D&&(F||(a=w(-u*fa),b=h?-z:0,t.box=F=d?s.symbol(d,a,b,t.width,t.height):s.rect(a,b,t.width,t.height,0,mb[ac]),F.add(t)),F.isImg||F.attr(A({width:t.width,height:t.height},mb)),mb=null)}function m(){var a=t.styles,a=a&&a.textAlign,b=lb+fa*(1-u),c;c=h?0:z;!v(Oa)||"center"!==a&&"right"!==a||(b+={center:0.5,right:1}[a]*(Oa-Q.width)); b===r.x&&c===r.y||r.attr({x:b,y:c});r.x=b;r.y=c}function n(a,b){F?F.attr(a,b):mb[a]=b}function p(){r.add(t);t.attr({text:a,x:b,y:c});F&&v(e)&&t.attr({anchorX:e,anchorY:f})}var s=this,t=s.g(k),r=s.text("",0,0,g).attr({zIndex:1}),F,Q,u=0,fa=3,lb=0,Oa,I,H,J,C=0,mb={},z;g=t.attrSetters;var D;L(t,"add",p);g.width=function(a){Oa=a;return!1};g.height=function(a){I=a;return!1};g.padding=function(a){v(a)&&a!==fa&&(fa=a,m());return!1};g.paddingLeft=function(a){v(a)&&a!==lb&&(lb=a,m());return!1};g.align=function(a){u= {left:0,center:0.5,right:1}[a];return!1};g.text=function(a,b){r.attr(b,a);l();m();return!1};g[ac]=function(a,b){D=!0;C=a%2/2;n(b,a);return!1};g.stroke=g.fill=g.r=function(a,b){"fill"===b&&(D=!0);n(b,a);return!1};g.anchorX=function(a,b){e=a;n(b,a+C-H);return!1};g.anchorY=function(a,b){f=a;n(b,a-J);return!1};g.x=function(a){t.x=a;a-=u*((Oa||Q.width)+fa);H=w(a);t.attr("translateX",H);return!1};g.y=function(a){J=t.y=w(a);t.attr("translateY",J);return!1};var B=t.css;return x(t,{css:function(a){if(a){var b= {};a=A(a);q("fontSize fontWeight fontFamily color lineHeight width textDecoration".split(" "),function(c){a[c]!==y&&(b[c]=a[c],delete a[c])});r.css(b)}return B.call(t,a)},getBBox:function(){return{width:Q.width+2*fa,height:Q.height+2*fa,x:Q.x-fa,y:Q.y-fa}},shadow:function(a){F&&F.shadow(a);return t},destroy:function(){da(t,"add",p);da(t.element,"mouseenter");da(t.element,"mouseleave");r&&(r=r.destroy());F&&(F=F.destroy());wa.prototype.destroy.call(t);t=s=l=m=n=p=null}})}};Va=Ga;var Ib,nb;if(!$&&!aa){Highcharts.VMLElement= nb={init:function(a,b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ","absolute",";"],e=b===Ca;("shape"===b||e)&&d.push("left:0;top:0;width:1px;height:1px;");d.push("visibility: ",e?"hidden":"visible");c.push(' style="',d.join(""),'"/>');b&&(c=e||"span"===b||"img"===b?c.join(""):a.prepVML(c),this.element=W(c));this.renderer=a;this.attrSetters={}},add:function(a){var b=this.renderer,c=this.element,d=b.box,d=a?a.element||a:d;a&&a.inverted&&b.invertChild(c,d);d.appendChild(c);this.added=!0; this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform();K(this,"add");return this},updateTransform:wa.prototype.htmlUpdateTransform,setSpanRotation:function(a,b,c){M(this.element,{filter:a?["progid:DXImageTransform.Microsoft.Matrix(M11=",c,", M12=",-b,", M21=",b,", M22=",c,", sizingMethod='auto expand')"].join(""):P})},attr:function(a,b){var c,d,e,f=this.element||{},g=f.style,h=f.nodeName,k=this.renderer,l=this.symbolName,m,n=this.shadows,p,s=this.attrSetters,t=this;ga(a)&&v(b)&&(c=a, a={},a[c]=b);if(ga(a))c=a,t="strokeWidth"===c||"stroke-width"===c?this.strokeweight:this[c];else for(c in a)if(d=a[c],p=!1,e=s[c]&&s[c].call(this,d,c),!1!==e&&null!==d){e!==y&&(d=e);if(l&&/^(x|y|r|start|end|width|height|innerR|anchorX|anchorY)/.test(c))m||(this.symbolAttr(a),m=!0),p=!0;else if("d"===c){d=d||[];this.d=d.join(" ");e=d.length;p=[];for(var r;e--;)qa(d[e])?p[e]=w(10*d[e])-5:"Z"===d[e]?p[e]="x":(p[e]=d[e],!d.isArc||"wa"!==d[e]&&"at"!==d[e]||(r="wa"===d[e]?1:-1,p[e+5]===p[e+7]&&(p[e+7]-= r),p[e+6]===p[e+8]&&(p[e+8]-=r)));d=p.join(" ")||"x";f.path=d;if(n)for(e=n.length;e--;)n[e].path=n[e].cutOff?this.cutOffPath(d,n[e].cutOff):d;p=!0}else if("visibility"===c){if(n)for(e=n.length;e--;)n[e].style[c]=d;"DIV"===h&&(d="hidden"===d?"-999em":0,fb||(g[c]=d?"visible":"hidden"),c="top");g[c]=d;p=!0}else"zIndex"===c?(d&&(g[c]=d),p=!0):-1!==oa(c,["x","y","width","height"])?(this[c]=d,"x"===c||"y"===c?c={x:"left",y:"top"}[c]:d=u(0,d),this.updateClipping?(this[c]=d,this.updateClipping()):g[c]=d, p=!0):"class"===c&&"DIV"===h?f.className=d:"stroke"===c?(d=k.color(d,f,c),c="strokecolor"):"stroke-width"===c||"strokeWidth"===c?(f.stroked=d?!0:!1,c="strokeweight",this[c]=d,qa(d)&&(d+="px")):"dashstyle"===c?((f.getElementsByTagName("stroke")[0]||W(k.prepVML(["<stroke/>"]),null,null,f))[c]=d||"solid",this.dashstyle=d,p=!0):"fill"===c?"SPAN"===h?g.color=d:"IMG"!==h&&(f.filled=d!==P?!0:!1,d=k.color(d,f,c,this),c="fillcolor"):"opacity"===c?p=!0:"shape"===h&&"rotation"===c?(this[c]=f.style[c]=d,f.style.left= -w(ea(d*Ua)+1)+"px",f.style.top=w(Y(d*Ua))+"px"):"translateX"===c||"translateY"===c||"rotation"===c?(this[c]=d,this.updateTransform(),p=!0):"text"===c&&(this.bBox=null,f.innerHTML=d,p=!0);p||(fb?f[c]=d:z(f,c,d))}return t},clip:function(a){var b=this,c;a?(c=a.members,ia(c,b),c.push(b),b.destroyClip=function(){ia(c,b)},a=a.getCSS(b)):(b.destroyClip&&b.destroyClip(),a={clip:fb?"inherit":"rect(auto)"});return b.css(a)},css:wa.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&&Ta(a)},destroy:function(){this.destroyClip&& this.destroyClip();return wa.prototype.destroy.apply(this)},on:function(a,b){this.element["on"+a]=function(){var a=N.event;a.target=a.srcElement;b(a)};return this},cutOffPath:function(a,b){var c;a=a.split(/[ ,]/);c=a.length;if(9===c||11===c)a[c-4]=a[c-2]=D(a[c-2])-10*b;return a.join(" ")},shadow:function(a,b,c){var d=[],e,f=this.element,g=this.renderer,h,k=f.style,l,m=f.path,n,p,s,t;m&&"string"!==typeof m.value&&(m="x");p=m;if(a){s=r(a.width,3);t=(a.opacity||0.15)/s;for(e=1;3>=e;e++)n=2*s+1-2*e,c&& (p=this.cutOffPath(m.value,n+0.5)),l=['<shape isShadow="true" strokeweight="',n,'" filled="false" path="',p,'" coordsize="10 10" style="',f.style.cssText,'" />'],h=W(g.prepVML(l),null,{left:D(k.left)+r(a.offsetX,1),top:D(k.top)+r(a.offsetY,1)}),c&&(h.cutOff=n+1),l=['<stroke color="',a.color||"black",'" opacity="',t*e,'"/>'],W(g.prepVML(l),null,null,h),b?b.element.appendChild(h):f.parentNode.insertBefore(h,f),d.push(h);this.shadows=d}return this}};nb=ja(wa,nb);var hc={Element:nb,isIE8:-1<Ea.indexOf("MSIE 8.0"), init:function(a,b,c){var d,e;this.alignedObjects=[];d=this.createElement(Ca);e=d.element;e.style.position="relative";a.appendChild(d.element);this.isVML=!0;this.box=e;this.boxWrapper=d;this.setSize(b,c,!1);B.namespaces.hcv||(B.namespaces.add("hcv","urn:schemas-microsoft-com:vml"),B.createStyleSheet().cssText="hcv\:fill, hcv\:path, hcv\:shape, hcv\:stroke{ behavior:url(#default#VML); display: inline-block; } ")},isHidden:function(){return!this.box.offsetWidth},clipRect:function(a,b,c,d){var e= this.createElement(),f=X(a);return x(e,{members:[],left:f?a.x:a,top:f?a.y:b,width:f?a.width:c,height:f?a.height:d,getCSS:function(a){var b=a.element,c=b.nodeName;a=a.inverted;var d=this.top-("shape"===c?b.offsetTop:0),e=this.left,b=e+this.width,f=d+this.height,d={clip:"rect("+w(a?e:d)+"px,"+w(a?f:b)+"px,"+w(a?b:f)+"px,"+w(a?d:e)+"px)"};!a&&(fb&&"DIV"===c)&&x(d,{width:b+"px",height:f+"px"});return d},updateClipping:function(){q(e.members,function(a){a.css(e.getCSS(a))})}})},color:function(a,b,c,d){var e= this,f,g=/^rgba/,h,k,l=P;a&&a.linearGradient?k="gradient":a&&a.radialGradient&&(k="pattern");if(k){var m,n,p=a.linearGradient||a.radialGradient,s,t,r,F,Q,u="";a=a.stops;var v,w=[],y=function(){h=['<fill colors="'+w.join(",")+'" opacity="',r,'" o:opacity2="',t,'" type="',k,'" ',u,'focus="100%" method="any" />'];W(e.prepVML(h),null,null,b)};s=a[0];v=a[a.length-1];0<s[0]&&a.unshift([0,s[1]]);1>v[0]&&a.push([1,v[1]]);q(a,function(a,b){g.test(a[1])?(f=pa(a[1]),m=f.get("rgb"),n=f.get("a")):(m=a[1],n=1); w.push(100*a[0]+"% "+m);b?(r=n,F=m):(t=n,Q=m)});if("fill"===c)if("gradient"===k)c=p.x1||p[0]||0,a=p.y1||p[1]||0,s=p.x2||p[2]||0,p=p.y2||p[3]||0,u='angle="'+(90-180*R.atan((p-a)/(s-c))/Ma)+'"',y();else{var l=p.r,x=2*l,H=2*l,J=p.cx,C=p.cy,A=b.radialReference,z,l=function(){A&&(z=d.getBBox(),J+=(A[0]-z.x)/z.width-0.5,C+=(A[1]-z.y)/z.height-0.5,x*=A[2]/z.width,H*=A[2]/z.height);u='src="'+G.global.VMLRadialGradientURL+'" size="'+x+","+H+'" origin="0.5,0.5" position="'+J+","+C+'" color2="'+Q+'" ';y()}; d.added?l():L(d,"add",l);l=F}else l=m}else g.test(a)&&"IMG"!==b.tagName?(f=pa(a),h=["<",c,' opacity="',f.get("a"),'"/>'],W(this.prepVML(h),null,null,b),l=f.get("rgb")):(l=b.getElementsByTagName(c),l.length&&(l[0].opacity=1,l[0].type="solid"),l=a);return l},prepVML:function(a){var b=this.isIE8;a=a.join("");b?(a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),a=-1===a.indexOf('style="')?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')): a=a.replace("<","<hcv:");return a},text:Ga.prototype.html,path:function(a){var b={coordsize:"10 10"};Ha(a)?b.d=a:X(a)&&x(b,a);return this.createElement("shape").attr(b)},circle:function(a,b,c){var d=this.symbol("circle");X(a)&&(c=a.r,b=a.y,a=a.x);d.isCircle=!0;return d.attr({x:a,y:b,width:2*c,height:2*c})},g:function(a){var b;a&&(b={className:"highcharts-"+a,"class":"highcharts-"+a});return this.createElement(Ca).attr(b)},image:function(a,b,c,d,e){var f=this.createElement("img").attr({src:a});1<arguments.length&& f.attr({x:b,y:c,width:d,height:e});return f},rect:function(a,b,c,d,e,f){X(a)&&(b=a.y,c=a.width,d=a.height,f=a.strokeWidth,a=a.x);var g=this.symbol("rect");g.r=e;return g.attr(g.crisp(f,a,b,u(c,0),u(d,0)))},invertChild:function(a,b){var c=b.style;M(a,{flip:"x",left:D(c.width)-1,top:D(c.height)-1,rotation:-90})},symbols:{arc:function(a,b,c,d,e){var f=e.start,g=e.end,h=e.r||c||d;c=e.innerR;d=Y(f);var k=ea(f),l=Y(g),m=ea(g);if(0===g-f)return["x"];f=["wa",a-h,b-h,a+h,b+h,a+h*d,b+h*k,a+h*l,b+h*m];e.open&& !c&&f.push("e","M",a,b);f.push("at",a-c,b-c,a+c,b+c,a+c*l,b+c*m,a+c*d,b+c*k,"x","e");f.isArc=!0;return f},circle:function(a,b,c,d,e){e&&e.isCircle&&(a-=c/2,b-=d/2);return["wa",a,b,a+c,b+d,a+c,b+d/2,a+c,b+d/2,"e"]},rect:function(a,b,c,d,e){var f=a+c,g=b+d,h;v(e)&&e.r?(h=O(e.r,c,d),f=["M",a+h,b,"L",f-h,b,"wa",f-2*h,b,f,b+2*h,f-h,b,f,b+h,"L",f,g-h,"wa",f-2*h,g-2*h,f,g,f,g-h,f-h,g,"L",a+h,g,"wa",a,g-2*h,a+2*h,g,a+h,g,a,g-h,"L",a,b+h,"wa",a,b,a+2*h,b+2*h,a,b+h,a+h,b,"x","e"]):f=Ga.prototype.symbols.square.apply(0, arguments);return f}}};Highcharts.VMLRenderer=Ib=function(){this.init.apply(this,arguments)};Ib.prototype=A(Ga.prototype,hc);Va=Ib}var Jb,cc;aa&&(Highcharts.CanVGRenderer=Jb=function(){xa="http://www.w3.org/1999/xhtml"},Jb.prototype.symbols={},cc=function(){function a(){var a=b.length,d;for(d=0;d<a;d++)b[d]();b=[]}var b=[];return{push:function(c,d){0===b.length&&fc(d,a);b.push(c)}}}(),Va=Jb);La.prototype={addLabel:function(){var a=this.axis,b=a.options,c=a.chart,d=a.horiz,e=a.categories,f=a.series[0]&& a.series[0].names,g=this.pos,h=b.labels,k=a.tickPositions,d=d&&e&&!h.step&&!h.staggerLines&&!h.rotation&&c.plotWidth/k.length||!d&&(c.optionsMarginLeft||0.33*c.chartWidth),l=g===k[0],m=g===k[k.length-1],f=e?r(e[g],f&&f[g],g):g,e=this.label,k=k.info,n;a.isDatetimeAxis&&k&&(n=b.dateTimeLabelFormats[k.higherRanks[g]||k.unitName]);this.isFirst=l;this.isLast=m;b=a.labelFormatter.call({axis:a,chart:c,isFirst:l,isLast:m,dateTimeLabelFormat:n,value:a.isLog?la(ha(f)):f});g=d&&{width:u(1,w(d-2*(h.padding|| 10)))+"px"};g=x(g,h.style);v(e)?e&&e.attr({text:b}).css(g):(d={align:a.labelAlign},qa(h.rotation)&&(d.rotation=h.rotation),this.label=v(b)&&h.enabled?c.renderer.text(b,0,0,h.useHTML).attr(d).css(g).add(a.labelGroup):null)},getLabelSize:function(){var a=this.label,b=this.axis;return a?(this.labelBBox=a.getBBox())[b.horiz?"height":"width"]:0},getLabelSides:function(){var a=this.axis,b=this.labelBBox.width,a=b*{left:0,center:0.5,right:1}[a.labelAlign]-a.options.labels.x;return[-a,b-a]},handleOverflow:function(a, b){var c=!0,d=this.axis,e=d.chart,f=this.isFirst,g=this.isLast,h=b.x,k=d.reversed,l=d.tickPositions;if(f||g){var m=this.getLabelSides(),n=m[0],m=m[1],e=e.plotLeft,p=e+d.len,l=(d=d.ticks[l[a+(f?1:-1)]])&&d.label.xy&&d.label.xy.x+d.getLabelSides()[f?0:1];f&&!k||g&&k?h+n<e&&(h=e-n,d&&h+m>l&&(c=!1)):h+m>p&&(h=p-m,d&&h+n<l&&(c=!1));b.x=h}return c},getPosition:function(a,b,c,d){var e=this.axis,f=e.chart,g=d&&f.oldChartHeight||f.chartHeight;return{x:a?e.translate(b+c,null,null,d)+e.transB:e.left+e.offset+ (e.opposite?(d&&f.oldChartWidth||f.chartWidth)-e.right-e.left:0),y:a?g-e.bottom+e.offset-(e.opposite?e.height:0):g-e.translate(b+c,null,null,d)-e.transB}},getLabelPosition:function(a,b,c,d,e,f,g,h){var k=this.axis,l=k.transA,m=k.reversed,n=k.staggerLines,p=k.chart.renderer.fontMetrics(e.style.fontSize).b,s=e.rotation;a=a+e.x-(f&&d?f*l*(m?-1:1):0);b=b+e.y-(f&&!d?f*l*(m?1:-1):0);s&&2===k.side&&(b-=p-p*Y(s*Ua));v(e.y)||s||(b+=p-c.getBBox().height/2);n&&(b+=g/(h||1)%n*(k.labelOffset/n));return{x:a,y:b}}, getMarkPath:function(a,b,c,d,e,f){return f.crispLine(["M",a,b,"L",a+(e?0:-c),b+(e?c:0)],d)},render:function(a,b,c){var d=this.axis,e=d.options,f=d.chart.renderer,g=d.horiz,h=this.type,k=this.label,l=this.pos,m=e.labels,n=this.gridLine,p=h?h+"Grid":"grid",s=h?h+"Tick":"tick",t=e[p+"LineWidth"],q=e[p+"LineColor"],F=e[p+"LineDashStyle"],u=e[s+"Length"],p=e[s+"Width"]||0,v=e[s+"Color"],w=e[s+"Position"],s=this.mark,x=m.step,z=!0,I=d.tickmarkOffset,H=this.getPosition(g,l,I,b),J=H.x,H=H.y,C=g&&J===d.pos|| !g&&H===d.pos+d.len?-1:1,A=d.staggerLines;this.isActive=!0;if(t&&(l=d.getPlotLinePath(l+I,t*C,b,!0),n===y&&(n={stroke:q,"stroke-width":t},F&&(n.dashstyle=F),h||(n.zIndex=1),b&&(n.opacity=0),this.gridLine=n=t?f.path(l).attr(n).add(d.gridGroup):null),!b&&n&&l))n[this.isNew?"attr":"animate"]({d:l,opacity:c});p&&u&&("inside"===w&&(u=-u),d.opposite&&(u=-u),b=this.getMarkPath(J,H,u,p*C,g,f),s?s.animate({d:b,opacity:c}):this.mark=f.path(b).attr({stroke:v,"stroke-width":p,opacity:c}).add(d.axisGroup));k&& !isNaN(J)&&(k.xy=H=this.getLabelPosition(J,H,k,g,m,I,a,x),this.isFirst&&!r(e.showFirstLabel,1)||this.isLast&&!r(e.showLastLabel,1)?z=!1:A||(!g||"justify"!==m.overflow||this.handleOverflow(a,H))||(z=!1),x&&a%x&&(z=!1),z&&!isNaN(H.y)?(H.opacity=c,k[this.isNew?"attr":"animate"](H),this.isNew=!1):k.attr("y",-9999))},destroy:function(){Ja(this,this.axis)}};zb.prototype={render:function(){var a=this,b=a.axis,c=b.horiz,d=(b.pointRange||0)/2,e=a.options,f=e.label,g=a.label,h=e.width,k=e.to,l=e.from,m=v(l)&& v(k),n=e.value,p=e.dashStyle,s=a.svgElem,t=[],q,F=e.color,Q=e.zIndex,w=e.events,x=b.chart.renderer;b.isLog&&(l=na(l),k=na(k),n=na(n));if(h)t=b.getPlotLinePath(n,h),d={stroke:F,"stroke-width":h},p&&(d.dashstyle=p);else if(m)l=u(l,b.min-d),k=O(k,b.max+d),t=b.getPlotBandPath(l,k,e),d={fill:F},e.borderWidth&&(d.stroke=e.borderColor,d["stroke-width"]=e.borderWidth);else return;v(Q)&&(d.zIndex=Q);if(s)t?s.animate({d:t},null,s.onGetPath):(s.hide(),s.onGetPath=function(){s.show()});else if(t&&t.length&&(a.svgElem= s=x.path(t).attr(d).add(),w))for(q in e=function(b){s.on(b,function(c){w[b].apply(a,[c])})},w)e(q);f&&v(f.text)&&t&&t.length&&0<b.width&&0<b.height?(f=A({align:c&&m&&"center",x:c?!m&&4:10,verticalAlign:!c&&m&&"middle",y:c?m?16:10:m?6:-4,rotation:c&&!m&&90},f),g||(a.label=g=x.text(f.text,0,0,f.useHTML).attr({align:f.textAlign||f.align,rotation:f.rotation,zIndex:Q}).css(f.style).add()),b=[t[1],t[4],r(t[6],t[1])],t=[t[2],t[5],r(t[7],t[2])],c=Ia(b),m=Ia(t),g.align(f,!1,{x:c,y:m,width:ua(b)-c,height:ua(t)- m}),g.show()):g&&g.hide();return a},destroy:function(){ia(this.axis.plotLinesAndBands,this);delete this.axis;Ja(this)}};Wb.prototype={destroy:function(){Ja(this,this.axis)},setTotal:function(a){this.cum=this.total=a},addValue:function(a){this.setTotal(la(this.total+a))},render:function(a){var b=this.options,c=b.format,c=c?Ba(c,this):b.formatter.call(this);this.label?this.label.attr({text:c,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(c,0,0,b.useHTML).css(b.style).attr({align:this.textAlign, rotation:b.rotation,visibility:"hidden"}).add(a)},cacheExtremes:function(a,b){this.points[a.index]=b},setOffset:function(a,b){var c=this.axis,d=c.chart,e=d.inverted,f=this.isNegative,g=c.translate(this.percent?100:this.total,0,0,0,1),c=c.translate(0),c=S(g-c),h=d.xAxis[0].translate(this.x)+a,k=d.plotHeight,f={x:e?f?g:g-c:h,y:e?k-h-b:f?k-g-c:k-g,width:e?c:b,height:e?b:c};if(e=this.label)e.align(this.alignOptions,null,f),f=e.alignAttr,e.attr({visibility:!1===this.options.crop||d.isInsidePlot(f.x,f.y)? $?"inherit":"visible":"hidden"})}};eb.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,gridLineColor:"#ebebeb",labels:Hb,lineColor:"#FCB961",lineWidth:1,minPadding:0.01,maxPadding:0.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#FCB961",tickLength:5, tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#4d759e",fontWeight:"bold"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return za(this.total,-1)},style:Hb.style}},defaultLeftAxisOptions:{labels:{x:-8, y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:8,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{x:0,y:14},title:{rotation:0}},defaultTopAxisOptions:{labels:{x:0,y:-5},title:{rotation:0}},init:function(a,b){var c=b.isX;this.horiz=a.inverted?!c:c;this.xOrY=(this.isXAxis=c)?"x":"y";this.opposite=b.opposite;this.side=this.horiz?this.opposite?0:2:this.opposite?1:3;this.setOptions(b);var d=this.options,e=d.type;this.labelFormatter=d.labels.formatter||this.defaultLabelFormatter; this.userOptions=b;this.minPixelPadding=0;this.chart=a;this.reversed=d.reversed;this.zoomEnabled=!1!==d.zoomEnabled;this.categories=d.categories||"category"===e;this.isLog="logarithmic"===e;this.isDatetimeAxis="datetime"===e;this.isLinked=v(d.linkedTo);this.tickmarkOffset=this.categories&&"between"===d.tickmarkPlacement?0.5:0;this.ticks={};this.minorTicks={};this.plotLinesAndBands=[];this.alternateBands={};this.len=0;this.minRange=this.userMinRange=d.minRange||d.maxZoom;this.range=d.range;this.offset= d.offset||0;this.stacks={};this.oldStacks={};this.stacksMax={};this._stacksTouched=0;this.min=this.max=null;var f,d=this.options.events;-1===oa(this,a.axes)&&(a.axes.push(this),a[c?"xAxis":"yAxis"].push(this));this.series=this.series||[];a.inverted&&(c&&this.reversed===y)&&(this.reversed=!0);this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(f in d)L(this,f,d[f]);this.isLog&&(this.val2lin=na,this.lin2val=ha)},setOptions:function(a){this.options=A(this.defaultOptions,this.isXAxis? {}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],A(G[this.isXAxis?"xAxis":"yAxis"],a))},update:function(a,b){var c=this.chart;a=c.options[this.xOrY+"Axis"][this.options.index]=A(this.userOptions,a);this.destroy(!0);this._addedPlotLB=!1;this.init(c,x(a,{events:y}));c.isDirtyBox=!0;r(b,!0)&&c.redraw()},remove:function(a){var b=this.chart,c=this.xOrY+"Axis";q(this.series,function(a){a.remove(!1)}); ia(b.axes,this);ia(b[c],this);b.options[c].splice(this.options.index,1);q(b[c],function(a,b){a.options.index=b});this.destroy();b.isDirtyBox=!0;r(a,!0)&&b.redraw()},defaultLabelFormatter:function(){var a=this.axis,b=this.value,c=a.categories,d=this.dateTimeLabelFormat,e=G.lang.numericSymbols,f=e&&e.length,g,h=a.options.labels.format,a=a.isLog?b:a.tickInterval;if(h)g=Ba(h,this);else if(c)g=b;else if(d)g=Ya(d,b);else if(f&&1E3<=a)for(;f--&&g===y;)c=Math.pow(1E3,f+1),a>=c&&null!==e[f]&&(g=za(b/c,-1)+ e[f]);g===y&&(g=1E3<=b?za(b,0):za(b,-1));return g},getSeriesExtremes:function(){var a=this,b=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=null;a.stacksMax={};a.buildStacks();q(a.series,function(c){if(c.visible||!b.options.chart.ignoreHiddenSeries){var d=c.options,e;e=d.threshold;a.hasVisibleSeries=!0;a.isLog&&0>=e&&(e=null);a.isXAxis?(e=c.xData,e.length&&(a.dataMin=O(r(a.dataMin,e[0]),Ia(e)),a.dataMax=u(r(a.dataMax,e[0]),ua(e)))):(d=d.stacking,a.usePercentage="percent"===d,a.usePercentage&&(a.dataMin= 0,a.dataMax=99),c.getExtremes(),d=c.dataMax,c=c.dataMin,!a.usePercentage&&(v(c)&&v(d))&&(a.dataMin=O(r(a.dataMin,c),c),a.dataMax=u(r(a.dataMax,d),d)),v(e)&&(a.dataMin>=e?(a.dataMin=e,a.ignoreMinPadding=!0):a.dataMax<e&&(a.dataMax=e,a.ignoreMaxPadding=!0)))}})},translate:function(a,b,c,d,e,f){var g=this.len,h=1,k=0,l=d?this.oldTransA:this.transA;d=d?this.oldMin:this.min;var m=this.minPixelPadding;e=(this.options.ordinal||this.isLog&&e)&&this.lin2val;l||(l=this.transA);c&&(h*=-1,k=g);this.reversed&& (h*=-1,k-=h*g);b?(a=a*h+k-m,a=a/l+d,e&&(a=this.lin2val(a))):(e&&(a=this.val2lin(a)),"between"===f&&(f=0.5),a=h*(a-d)*l+k+h*m+(qa(f)?l*f*this.pointRange: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,c,d){var e=this.chart,f=this.left,g=this.top,h,k,l;a=this.translate(a,null,null,c);var m=c&&e.oldChartHeight||e.chartHeight,n=c&&e.oldChartWidth|| e.chartWidth,p;h=this.transB;c=k=w(a+h);h=l=w(m-a-h);if(isNaN(a))p=!0;else if(this.horiz){if(h=g,l=m-this.bottom,c<f||c>f+this.width)p=!0}else if(c=f,k=n-this.right,h<g||h>g+this.height)p=!0;return p&&!d?null:e.renderer.crispLine(["M",c,h,"L",k,l],b||0)},getPlotBandPath:function(a,b){var c=this.getPlotLinePath(b),d=this.getPlotLinePath(a);d&&c?d.push(c[4],c[5],c[1],c[2]):d=null;return d},getLinearTickPositions:function(a,b,c){var d;b=la(V(b/a)*a);c=la(ma(c/a)*a);for(var e=[];b<=c;){e.push(b);b=la(b+ a);if(b===d)break;d=b}return e},getLogTickPositions:function(a,b,c,d){var e=this.options,f=this.len,g=[];d||(this._minorAutoInterval=null);if(0.5<=a)a=w(a),g=this.getLinearTickPositions(a,b,c);else if(0.08<=a)for(var f=V(b),h,k,l,m,n,e=0.3<a?[1,2,4]:0.15<a?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];f<c+1&&!n;f++)for(k=e.length,h=0;h<k&&!n;h++)l=na(ha(f)*e[h]),l>b&&(!d||m<=c)&&g.push(m),m>c&&(n=!0),m=l;else b=ha(b),c=ha(c),a=e[d?"minorTickInterval":"tickInterval"],a=r("auto"===a?null:a,this._minorAutoInterval, (c-b)*(e.tickPixelInterval/(d?5:1))/((d?f/this.tickPositions.length:f)||1)),a=sb(a,null,rb(a)),g=Na(this.getLinearTickPositions(a,b,c),na),d||(this._minorAutoInterval=a/5);d||(this.tickInterval=a);return g},getMinorTickPositions:function(){var a=this.options,b=this.tickPositions,c=this.minorTickInterval,d=[],e;if(this.isLog)for(e=b.length,a=1;a<e;a++)d=d.concat(this.getLogTickPositions(c,b[a-1],b[a],!0));else if(this.isDatetimeAxis&&"auto"===a.minorTickInterval)d=d.concat(Ob(Mb(c),this.min,this.max, a.startOfWeek)),d[0]<this.min&&d.shift();else for(b=this.min+(b[0]-this.min)%c;b<=this.max;b+=c)d.push(b);return d},adjustForMinRange:function(){var a=this.options,b=this.min,c=this.max,d,e=this.dataMax-this.dataMin>=this.minRange,f,g,h,k,l;this.isXAxis&&(this.minRange===y&&!this.isLog)&&(v(a.min)||v(a.max)?this.minRange=null:(q(this.series,function(a){k=a.xData;for(g=l=a.xIncrement?1:k.length-1;0<g;g--)if(h=k[g]-k[g-1],f===y||h<f)f=h}),this.minRange=O(5*f,this.dataMax-this.dataMin)));if(c-b<this.minRange){var m= this.minRange;d=(m-c+b)/2;d=[b-d,r(a.min,b-d)];e&&(d[2]=this.dataMin);b=ua(d);c=[b+m,r(a.max,b+m)];e&&(c[2]=this.dataMax);c=Ia(c);c-b<m&&(d[0]=c-m,d[1]=r(a.min,c-m),b=ua(d))}this.min=b;this.max=c},setAxisTranslation:function(a){var b=this.max-this.min,c=0,d,e=0,f=0,g=this.linkedParent,h=this.transA;this.isXAxis&&(g?(e=g.minPointOffset,f=g.pointRangePadding):q(this.series,function(a){var g=a.pointRange,h=a.options.pointPlacement,n=a.closestPointRange;g>b&&(g=0);c=u(c,g);e=u(e,ga(h)?0:g/2);f=u(f,"on"=== h?0:g);!a.noSharedTooltip&&v(n)&&(d=v(d)?O(d,n):n)}),g=this.ordinalSlope&&d?this.ordinalSlope/d:1,this.minPointOffset=e*=g,this.pointRangePadding=f*=g,this.pointRange=O(c,b),this.closestPointRange=d);a&&(this.oldTransA=h);this.translationSlope=this.transA=h=this.len/(b+f||1);this.transB=this.horiz?this.left:this.bottom;this.minPixelPadding=h*e},setTickPositions:function(a){var b=this,c=b.chart,d=b.options,e=b.isLog,f=b.isDatetimeAxis,g=b.isXAxis,h=b.isLinked,k=b.options.tickPositioner,l=d.maxPadding, m=d.minPadding,n=d.tickInterval,p=d.minTickInterval,s=d.tickPixelInterval,t=b.categories;h?(b.linkedParent=c[g?"xAxis":"yAxis"][d.linkedTo],c=b.linkedParent.getExtremes(),b.min=r(c.min,c.dataMin),b.max=r(c.max,c.dataMax),d.type!==b.linkedParent.options.type&&va(11,1)):(b.min=r(b.userMin,d.min,b.dataMin),b.max=r(b.userMax,d.max,b.dataMax));e&&(!a&&0>=O(b.min,r(b.dataMin,b.min))&&va(10,1),b.min=la(na(b.min)),b.max=la(na(b.max)));b.range&&(b.userMin=b.min=u(b.min,b.max-b.range),b.userMax=b.max,a&&(b.range= null));b.beforePadding&&b.beforePadding();b.adjustForMinRange();!t&&(!b.usePercentage&&!h&&v(b.min)&&v(b.max))&&(c=b.max-b.min)&&(v(d.min)||(v(b.userMin)||!m||!(0>b.dataMin)&&b.ignoreMinPadding)||(b.min-=c*m),v(d.max)||(v(b.userMax)||!l||!(0<b.dataMax)&&b.ignoreMaxPadding)||(b.max+=c*l));b.tickInterval=b.min===b.max||void 0===b.min||void 0===b.max?1:h&&!n&&s===b.linkedParent.options.tickPixelInterval?b.linkedParent.tickInterval:r(n,t?1:(b.max-b.min)*s/(b.len||1));g&&!a&&q(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&&(b.tickInterval=u(b.pointRange,b.tickInterval));!n&&b.tickInterval<p&&(b.tickInterval=p);f||e||n||(b.tickInterval=sb(b.tickInterval,null,rb(b.tickInterval),d));b.minorTickInterval="auto"===d.minorTickInterval&&b.tickInterval?b.tickInterval/5:d.minorTickInterval;b.tickPositions=a=d.tickPositions? [].concat(d.tickPositions):k&&k.apply(b,[b.min,b.max]);a||(a=f?(b.getNonLinearTimeTicks||Ob)(Mb(b.tickInterval,d.units),b.min,b.max,d.startOfWeek,b.ordinalPositions,b.closestPointRange,!0):e?b.getLogTickPositions(b.tickInterval,b.min,b.max):b.getLinearTickPositions(b.tickInterval,b.min,b.max),b.tickPositions=a);h||(e=a[0],f=a[a.length-1],h=b.minPointOffset||0,d.startOnTick?b.min=e:b.min-h>e&&a.shift(),d.endOnTick?b.max=f:b.max+h<f&&a.pop(),1===a.length&&(b.min-=0.001,b.max+=0.001))},setMaxTicks:function(){var a= this.chart,b=a.maxTicks||{},c=this.tickPositions,d=this._maxTicksKey=[this.xOrY,this.pos,this.len].join("-");!this.isLinked&&(!this.isDatetimeAxis&&c&&c.length>(b[d]||0)&&!1!==this.options.alignTicks)&&(b[d]=c.length);a.maxTicks=b},adjustTickAmount:function(){var a=this._maxTicksKey,b=this.tickPositions,c=this.chart.maxTicks;if(c&&c[a]&&!this.isDatetimeAxis&&!this.categories&&!this.isLinked&&!1!==this.options.alignTicks){var d=this.tickAmount,e=b.length;this.tickAmount=a=c[a];if(e<a){for(;b.length< a;)b.push(la(b[b.length-1]+this.tickInterval));this.transA*=(e-1)/(a-1);this.max=b[b.length-1]}v(d)&&a!==d&&(this.isDirty=!0)}},setScale:function(){var a=this.stacks,b,c,d,e;this.oldMin=this.min;this.oldMax=this.max;this.oldAxisLength=this.len;this.setAxisSize();e=this.len!==this.oldAxisLength;q(this.series,function(a){if(a.isDirtyData||a.isDirty||a.xAxis.isDirty)d=!0});if(e||d||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax){if(!this.isXAxis)for(b in a)for(c in a[b])a[b][c].total= null;this.forceRedraw=!1;this.getSeriesExtremes();this.setTickPositions();this.oldUserMin=this.userMin;this.oldUserMax=this.userMax;this.isDirty||(this.isDirty=e||this.min!==this.oldMin||this.max!==this.oldMax)}else if(!this.isXAxis)for(b in this.oldStacks&&(a=this.stacks=this.oldStacks),a)for(c in a[b])a[b][c].cum=a[b][c].total;this.setMaxTicks()},setExtremes:function(a,b,c,d,e){var f=this,g=f.chart;c=r(c,!0);e=x(e,{min:a,max:b});K(f,"setExtremes",e,function(){f.userMin=a;f.userMax=b;f.isDirtyExtremes= !0;c&&g.redraw(d)})},zoom:function(a,b){this.allowZoomOutside||(v(this.dataMin)&&a<=this.dataMin&&(a=y),v(this.dataMax)&&b>=this.dataMax&&(b=y));this.displayBtn=a!==y||b!==y;this.setExtremes(a,b,!1,y,{trigger:"zoom"});return!0},setAxisSize:function(){var a=this.chart,b=this.options,c=b.offsetLeft||0,d=b.offsetRight||0,e=this.horiz,f,g;this.left=g=r(b.left,a.plotLeft+c);this.top=f=r(b.top,a.plotTop);this.width=c=r(b.width,a.plotWidth-c+d);this.height=b=r(b.height,a.plotHeight);this.bottom=a.chartHeight- b-f;this.right=a.chartWidth-c-g;this.len=u(e?c:b,0);this.pos=e?g:f},getExtremes:function(){var a=this.isLog;return{min:a?la(ha(this.min)):this.min,max:a?la(ha(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,c=b?ha(this.min):this.min,b=b?ha(this.max):this.max;c>a||null===a?a=c:b<a&&(a=b);return this.translate(a,0,1,0,1)},addPlotBand:function(a){this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){this.addPlotBandOrLine(a, "plotLines")},addPlotBandOrLine:function(a,b){var c=(new zb(this,a)).render(),d=this.userOptions;b&&(d[b]=d[b]||[],d[b].push(a));this.plotLinesAndBands.push(c);return c},autoLabelAlign:function(a){a=(r(a,0)-90*this.side+720)%360;return 15<a&&165>a?"right":195<a&&345>a?"left":"center"},getOffset:function(){var a=this,b=a.chart,c=b.renderer,d=a.options,e=a.tickPositions,f=a.ticks,g=a.horiz,h=a.side,k=b.inverted?[1,0,3,2][h]:h,l,m=0,n,p=0,s=d.title,t=d.labels,U=0,F=b.axisOffset,Q=b.clipOffset,w=[-1, 1,1,-1][h],x,z=1,A=r(t.maxStaggerLines,5),I,H,J,C;a.hasData=l=a.hasVisibleSeries||v(a.min)&&v(a.max)&&!!e;a.showAxis=b=l||r(d.showEmpty,!0);a.staggerLines=a.horiz&&t.staggerLines;a.axisGroup||(a.gridGroup=c.g("grid").attr({zIndex:d.gridZIndex||1}).add(),a.axisGroup=c.g("axis").attr({zIndex:d.zIndex||2}).add(),a.labelGroup=c.g("axis-labels").attr({zIndex:t.zIndex||7}).add());if(l||a.isLinked){a.labelAlign=r(t.align||a.autoLabelAlign(t.rotation));q(e,function(b){f[b]?f[b].addLabel():f[b]=new La(a,b)}); if(a.horiz&&!a.staggerLines&&A&&!t.rotation){for(x=a.reversed?[].concat(e).reverse():e;z<A;){l=[];I=!1;for(t=0;t<x.length;t++)H=x[t],J=(J=f[H].label&&f[H].label.bBox)?J.width:0,C=t%z,J&&(H=a.translate(H),l[C]!==y&&H<l[C]&&(I=!0),l[C]=H+J);if(I)z++;else break}1<z&&(a.staggerLines=z)}q(e,function(b){if(0===h||2===h||{1:"left",3:"right"}[h]===a.labelAlign)U=u(f[b].getLabelSize(),U)});a.staggerLines&&(U*=a.staggerLines,a.labelOffset=U)}else for(x in f)f[x].destroy(),delete f[x];s&&(s.text&&!1!==s.enabled)&& (a.axisTitle||(a.axisTitle=c.text(s.text,0,0,s.useHTML).attr({zIndex:7,rotation:s.rotation||0,align:s.textAlign||{low:"left",middle:"center",high:"right"}[s.align]}).css(s.style).add(a.axisGroup),a.axisTitle.isNew=!0),b&&(m=a.axisTitle.getBBox()[g?"height":"width"],p=r(s.margin,g?5:10),n=s.offset),a.axisTitle[b?"show":"hide"]());a.offset=w*r(d.offset,F[h]);a.axisTitleMargin=r(n,U+p+(2!==h&&U&&w*d.labels[g?"y":"x"]));F[h]=u(F[h],a.axisTitleMargin+m+w*a.offset);Q[k]=u(Q[k],d.lineWidth)},getLinePath:function(a){var b= this.chart,c=this.opposite,d=this.offset,e=this.horiz,f=this.left+(c?this.width:0)+d;this.lineTop=d=b.chartHeight-this.bottom-(c?this.height:0)+d;c||(a*=-1);return b.renderer.crispLine(["M",e?this.left:f,e?d:this.top,"L",e?b.chartWidth-this.right:f,e?d:b.chartHeight-this.bottom],a)},getTitlePosition:function(){var a=this.horiz,b=this.left,c=this.top,d=this.len,e=this.options.title,f=a?b:c,g=this.opposite,h=this.offset,k=D(e.style.fontSize||12),d={low:f+(a?0:d),middle:f+d/2,high:f+(a?d:0)}[e.align], b=(a?c+this.height:b)+(a?1:-1)*(g?-1:1)*this.axisTitleMargin+(2===this.side?k:0);return{x:a?d:b+(g?this.width:0)+h+(e.x||0),y:a?b-(g?this.height:0)+h:d+(e.y||0)}},render:function(){var a=this,b=a.chart,c=b.renderer,d=a.options,e=a.isLog,f=a.isLinked,g=a.tickPositions,h=a.axisTitle,k=a.stacks,l=a.ticks,m=a.minorTicks,n=a.alternateBands,p=d.stackLabels,s=d.alternateGridColor,t=a.tickmarkOffset,r=d.lineWidth,F,u=b.hasRendered&&v(a.oldMin)&&!isNaN(a.oldMin);F=a.hasData;var w=a.showAxis,x,z;q([l,m,n], function(a){for(var b in a)a[b].isActive=!1});if(F||f)a.minorTickInterval&&!a.categories&&q(a.getMinorTickPositions(),function(b){m[b]||(m[b]=new La(a,b,"minor"));u&&m[b].isNew&&m[b].render(null,!0);m[b].render(null,!1,1)}),g.length&&(q(g.slice(1).concat([g[0]]),function(b,c){c=c===g.length-1?0:c+1;if(!f||b>=a.min&&b<=a.max)l[b]||(l[b]=new La(a,b)),u&&l[b].isNew&&l[b].render(c,!0),l[b].render(c,!1,1)}),t&&0===a.min&&(l[-1]||(l[-1]=new La(a,-1,null,!0)),l[-1].render(-1))),s&&q(g,function(b,c){0=== c%2&&b<a.max&&(n[b]||(n[b]=new zb(a)),x=b+t,z=g[c+1]!==y?g[c+1]+t:a.max,n[b].options={from:e?ha(x):x,to:e?ha(z):z,color:s},n[b].render(),n[b].isActive=!0)}),a._addedPlotLB||(q((d.plotLines||[]).concat(d.plotBands||[]),function(b){a.addPlotBandOrLine(b)}),a._addedPlotLB=!0);q([l,m,n],function(a){var c,d,e=[],f=Da?Da.duration||500:0,g=function(){for(d=e.length;d--;)a[e[d]]&&!a[e[d]].isActive&&(a[e[d]].destroy(),delete a[e[d]])};for(c in a)a[c].isActive||(a[c].render(c,!1,0),a[c].isActive=!1,e.push(c)); a!==n&&b.hasRendered&&f?f&&setTimeout(g,f):g()});r&&(F=a.getLinePath(r),a.axisLine?a.axisLine.animate({d:F}):a.axisLine=c.path(F).attr({stroke:d.lineColor,"stroke-width":r,zIndex:7}).add(a.axisGroup),a.axisLine[w?"show":"hide"]());h&&w&&(h[h.isNew?"attr":"animate"](a.getTitlePosition()),h.isNew=!1);if(p&&p.enabled){var A,I,d=a.stackTotalGroup;d||(a.stackTotalGroup=d=c.g("stack-labels").attr({visibility:"visible",zIndex:6}).add());d.translate(b.plotLeft,b.plotTop);for(A in k)for(I in c=k[A],c)c[I].render(d)}a.isDirty= !1},removePlotBandOrLine:function(a){for(var b=this.plotLinesAndBands,c=this.options,d=this.userOptions,e=b.length;e--;)b[e].id===a&&b[e].destroy();q([c.plotLines||[],d.plotLines||[],c.plotBands||[],d.plotBands||[]],function(b){for(e=b.length;e--;)b[e].id===a&&ia(b,b[e])})},setTitle:function(a,b){this.update({title:a},b)},redraw:function(){var a=this.chart.pointer;a.reset&&a.reset(!0);this.render();q(this.plotLinesAndBands,function(a){a.render()});q(this.series,function(a){a.isDirty=!0})},buildStacks:function(){this.isXAxis|| q(this.series,function(a){a.setStackedPoints()})},setCategories:function(a,b){this.update({categories:a},b)},destroy:function(a){var b=this,c=b.stacks,d,e=b.plotLinesAndBands;a||da(b);for(d in c)Ja(c[d]),c[d]=null;q([b.ticks,b.minorTicks,b.alternateBands],function(a){Ja(a)});for(a=e.length;a--;)e[a].destroy();q("stackTotalGroup axisLine axisGroup gridGroup labelGroup axisTitle".split(" "),function(a){b[a]&&(b[a]=b[a].destroy())})}};Ab.prototype={init:function(a,b){var c=b.borderWidth,d=b.style,e= D(d.padding);this.chart=a;this.options=b;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.label=a.renderer.label("",0,0,b.shape,null,null,b.useHTML,null,"tooltip").attr({padding:e,fill:b.backgroundColor,"stroke-width":c,r:b.borderRadius,zIndex:8}).css(d).css({padding:0}).hide().add();aa||this.label.shadow(b.shadow);this.shared=b.shared},destroy:function(){q(this.crosshairs,function(a){a&&a.destroy()});this.label&&(this.label=this.label.destroy());clearTimeout(this.hideTimer);clearTimeout(this.tooltipTimeout)}, move:function(a,b,c,d){var e=this,f=e.now,g=!1!==e.options.animation&&!e.isHidden;x(f,{x:g?(2*f.x+a)/3:a,y:g?(f.y+b)/2:b,anchorX:g?(2*f.anchorX+c)/3:c,anchorY:g?(f.anchorY+d)/2:d});e.label.attr(f);g&&(1<S(a-f.x)||1<S(b-f.y))&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){e&&e.move(a,b,c,d)},32))},hide:function(){var a=this,b;clearTimeout(this.hideTimer);this.isHidden||(b=this.chart.hoverPoints,this.hideTimer=setTimeout(function(){a.label.fadeOut();a.isHidden=!0},r(this.options.hideDelay, 500)),b&&q(b,function(a){a.setState()}),this.chart.hoverPoints=null)},hideCrosshairs:function(){q(this.crosshairs,function(a){a&&a.hide()})},getAnchor:function(a,b){var c,d=this.chart,e=d.inverted,f=d.plotTop,g=0,h=0,k;a=ka(a);c=a[0].tooltipPos;this.followPointer&&b&&(b.chartX===y&&(b=d.pointer.normalize(b)),c=[b.chartX-d.plotLeft,b.chartY-f]);c||(q(a,function(a){k=a.series.yAxis;g+=a.plotX;h+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!e&&k?k.top-f:0)}),g/=a.length,h/=a.length,c=[e?d.plotWidth- h:g,this.shared&&!e&&1<a.length&&b?b.chartY-f:e?d.plotHeight-g:h]);return Na(c,w)},getPosition:function(a,b,c){var d=this.chart,e=d.plotLeft,f=d.plotTop,g=d.plotWidth,h=d.plotHeight,k=r(this.options.distance,12),l=c.plotX;c=c.plotY;var d=l+e+(d.inverted?k:-a-k),m=c-b+f+15,n;7>d&&(d=e+u(l,0)+k);d+a>e+g&&(d-=d+a-(e+g),m=c-b+f-k,n=!0);m<f+5&&(m=f+5,n&&(c>=m&&c<=m+b)&&(m=c+f+k));m+b>f+h&&(m=u(f,f+h-b-k));return{x:d,y:m}},defaultFormatter:function(a){var b=this.points||ka(this),c=b[0].series,d;d=[c.tooltipHeaderFormatter(b[0])]; q(b,function(a){c=a.series;d.push(c.tooltipFormatter&&c.tooltipFormatter(a)||a.point.tooltipFormatter(c.tooltipOptions.pointFormat))});d.push(a.options.footerFormat||"");return d.join("")},refresh:function(a,b){var c=this.chart,d=this.label,e=this.options,f,g,h,k={},l,m=[];l=e.formatter||this.defaultFormatter;var k=c.hoverPoints,n,p=e.crosshairs;h=this.shared;clearTimeout(this.hideTimer);this.followPointer=ka(a)[0].series.tooltipOptions.followPointer;g=this.getAnchor(a,b);f=g[0];g=g[1];!h||a.series&& a.series.noSharedTooltip?k=a.getLabelConfig():(c.hoverPoints=a,k&&q(k,function(a){a.setState()}),q(a,function(a){a.setState("hover");m.push(a.getLabelConfig())}),k={x:a[0].category,y:a[0].y},k.points=m,a=a[0]);l=l.call(k,this);k=a.series;h=h||!k.isCartesian||k.tooltipOutsidePlot||c.isInsidePlot(f,g);!1!==l&&h?(this.isHidden&&(Wa(d),d.attr("opacity",1).show()),d.attr({text:l}),n=e.borderColor||a.color||k.color||"#606060",d.attr({stroke:n}),this.updatePosition({plotX:f,plotY:g}),this.isHidden=!1):this.hide(); if(p)for(p=ka(p),d=p.length;d--;)k=a.series,e=k[d?"yAxis":"xAxis"],p[d]&&e&&(h=d?r(a.stackY,a.y):a.x,e.isLog&&(h=na(h)),k.modifyValue&&(h=k.modifyValue(h)),e=e.getPlotLinePath(h,1),this.crosshairs[d]?this.crosshairs[d].attr({d:e,visibility:"visible"}):(h={"stroke-width":p[d].width||1,stroke:p[d].color||"#C0C0C0",zIndex:p[d].zIndex||2},p[d].dashStyle&&(h.dashstyle=p[d].dashStyle),this.crosshairs[d]=c.renderer.path(e).attr(h).add()));K(c,"tooltipRefresh",{text:l,x:f+c.plotLeft,y:g+c.plotTop,borderColor:n})}, updatePosition:function(a){var b=this.chart,c=this.label,c=(this.options.positioner||this.getPosition).call(this,c.width,c.height,a);this.move(w(c.x),w(c.y),a.plotX+b.plotLeft,a.plotY+b.plotTop)}};Bb.prototype={init:function(a,b){var c=aa?"":b.chart.zoomType,d=a.inverted,e;this.options=b;this.chart=a;this.zoomX=e=/x/.test(c);this.zoomY=c=/y/.test(c);this.zoomHor=e&&!d||c&&d;this.zoomVert=c&&!d||e&&d;this.pinchDown=[];this.lastValidTouch={};b.tooltip.enabled&&(a.tooltip=new Ab(a,b.tooltip));this.setDOMEvents()}, normalize:function(a){var b,c;a=a||N.event;a.target||(a.target=a.srcElement);a=bc(a);c=a.touches?a.touches.item(0):a;this.chartPosition=b=gc(this.chart.container);return x(a,{chartX:w(r(c.pageX,c.clientX)-b.left),chartY:w(r(c.pageY,c.clientY)-b.top)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};q(this.chart.axes,function(c){b[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})});return b},getIndex:function(a){var b=this.chart;return b.inverted?b.plotHeight+ b.plotTop-a.chartY:a.chartX-b.plotLeft},runPointActions:function(a){var b=this.chart,c=b.series,d=b.tooltip,e,f=b.hoverPoint,g=b.hoverSeries,h,k,l=b.chartWidth,m=this.getIndex(a);if(d&&this.options.tooltip.shared&&(!g||!g.noSharedTooltip)){e=[];h=c.length;for(k=0;k<h;k++)c[k].visible&&(!1!==c[k].options.enableMouseTracking&&!c[k].noSharedTooltip&&c[k].tooltipPoints.length)&&(b=c[k].tooltipPoints[m],b.series&&(b._dist=S(m-b.clientX),l=O(l,b._dist),e.push(b)));for(h=e.length;h--;)e[h]._dist>l&&e.splice(h, 1);e.length&&e[0].clientX!==this.hoverX&&(d.refresh(e,a),this.hoverX=e[0].clientX)}if(g&&g.tracker){if((b=g.tooltipPoints[m])&&b!==f)b.onMouseOver(a)}else d&&(d.followPointer&&!d.isHidden)&&(a=d.getAnchor([{}],a),d.updatePosition({plotX:a[0],plotY:a[1]}))},reset:function(a){var b=this.chart,c=b.hoverSeries,d=b.hoverPoint,e=b.tooltip,b=e&&e.shared?b.hoverPoints:d;(a=a&&e&&b)&&ka(b)[0].plotX===y&&(a=!1);if(a)e.refresh(b);else{if(d)d.onMouseOut();if(c)c.onMouseOut();e&&(e.hide(),e.hideCrosshairs()); this.hoverX=null}},scaleGroups:function(a,b){var c=this.chart,d;q(c.series,function(e){d=a||e.getPlotBox();e.xAxis&&e.xAxis.zoomEnabled&&(e.group.attr(d),e.markerGroup&&(e.markerGroup.attr(d),e.markerGroup.clip(b?c.clipRect:null)),e.dataLabelsGroup&&e.dataLabelsGroup.attr(d))});c.clipRect.attr(b||c.clipBox)},pinchTranslateDirection:function(a,b,c,d,e,f,g){var h=this.chart,k=a?"x":"y",l=a?"X":"Y",m="chart"+l,n=a?"width":"height",p=h["plot"+(a?"Left":"Top")],s,t,r=1,q=h.inverted,u=h.bounds[a?"h":"v"], v=1===b.length,w=b[0][m],x=c[0][m],z=!v&&b[1][m],y=!v&&c[1][m],A;c=function(){!v&&20<S(w-z)&&(r=S(x-y)/S(w-z));t=(p-x)/r+w;s=h["plot"+(a?"Width":"Height")]/r};c();b=t;b<u.min?(b=u.min,A=!0):b+s>u.max&&(b=u.max-s,A=!0);A?(x-=0.8*(x-g[k][0]),v||(y-=0.8*(y-g[k][1])),c()):g[k]=[x,y];q||(f[k]=t-p,f[n]=s);f=q?1/r:r;e[n]=s;e[k]=b;d[q?a?"scaleY":"scaleX":"scale"+l]=r;d["translate"+l]=f*p+(x-f*w)},pinch:function(a){var b=this,c=b.chart,d=b.pinchDown,e=c.tooltip&&c.tooltip.options.followTouchMove,f=a.touches, g=f.length,h=b.lastValidTouch,k=b.zoomHor||b.pinchHor,l=b.zoomVert||b.pinchVert,m=k||l,n=b.selectionMarker,p={},s={};"touchstart"===a.type&&(e||m)&&a.preventDefault();Na(f,function(a){return b.normalize(a)});"touchstart"===a.type?(q(f,function(a,b){d[b]={chartX:a.chartX,chartY:a.chartY}}),h.x=[d[0].chartX,d[1]&&d[1].chartX],h.y=[d[0].chartY,d[1]&&d[1].chartY],q(c.axes,function(a){if(a.zoomEnabled){var b=c.bounds[a.horiz?"h":"v"],d=a.minPixelPadding,e=a.toPixels(a.dataMin),f=a.toPixels(a.dataMax), g=O(e,f),e=u(e,f);b.min=O(a.pos,g-d);b.max=u(a.pos+a.len,e+d)}})):d.length&&(n||(b.selectionMarker=n=x({destroy:ya},c.plotBox)),k&&b.pinchTranslateDirection(!0,d,f,p,n,s,h),l&&b.pinchTranslateDirection(!1,d,f,p,n,s,h),b.hasPinched=m,b.scaleGroups(p,s),!m&&(e&&1===g)&&this.runPointActions(b.normalize(a)))},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;this.mouseDownY=a.chartY},drag:function(a){var b=this.chart,c=b.options.chart,d= a.chartX;a=a.chartY;var e=this.zoomHor,f=this.zoomVert,g=b.plotLeft,h=b.plotTop,k=b.plotWidth,l=b.plotHeight,m,n=this.mouseDownX,p=this.mouseDownY;d<g?d=g:d>g+k&&(d=g+k);a<h?a=h:a>h+l&&(a=h+l);this.hasDragged=Math.sqrt(Math.pow(n-d,2)+Math.pow(p-a,2));10<this.hasDragged&&(m=b.isInsidePlot(n-g,p-h),b.hasCartesianSeries&&((this.zoomX||this.zoomY)&&m)&&!this.selectionMarker&&(this.selectionMarker=b.renderer.rect(g,h,e?1:k,f?1:l,0).attr({fill:c.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add()), this.selectionMarker&&e&&(e=d-n,this.selectionMarker.attr({width:S(e),x:(0<e?0:e)+n})),this.selectionMarker&&f&&(e=a-p,this.selectionMarker.attr({height:S(e),y:(0<e?0:e)+p})),m&&(!this.selectionMarker&&c.panning)&&b.pan(d))},drop:function(a){var b=this.chart,c=this.hasPinched;if(this.selectionMarker){var d={xAxis:[],yAxis:[],originalEvent:a.originalEvent||a},e=this.selectionMarker,f=e.x,g=e.y,h;if(this.hasDragged||c)q(b.axes,function(a){if(a.zoomEnabled){var b=a.horiz,c=a.toValue(b?f:g),b=a.toValue(b? f+e.width:g+e.height);isNaN(c)||isNaN(b)||(d[a.xOrY+"Axis"].push({axis:a,min:O(c,b),max:u(c,b)}),h=!0)}}),h&&K(b,"selection",d,function(a){b.zoom(x(a,c?{animation:!1}:null))});this.selectionMarker=this.selectionMarker.destroy();c&&this.scaleGroups()}b&&(M(b.container,{cursor:b._cursor}),b.cancelClick=10<this.hasDragged,b.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(a){a=this.normalize(a);a.preventDefault&&a.preventDefault();this.dragStart(a)},onDocumentMouseUp:function(a){this.drop(a)}, onDocumentMouseMove:function(a){var b=this.chart,c=this.chartPosition,d=b.hoverSeries;a=bc(a);c&&(d&&d.isCartesian&&!b.isInsidePlot(a.pageX-c.left-b.plotLeft,a.pageY-c.top-b.plotTop))&&this.reset()},onContainerMouseLeave:function(){this.reset();this.chartPosition=null},onContainerMouseMove:function(a){var b=this.chart;a=this.normalize(a);a.returnValue=!1;"mousedown"===b.mouseIsDown&&this.drag(a);b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)&&!b.openMenu&&this.runPointActions(a)},inClass:function(a, b){for(var c;a;){if(c=z(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;if(b&&!b.options.stickyTracking&&!this.inClass(a.toElement||a.relatedTarget,"highcharts-tooltip"))b.onMouseOut()},onContainerClick:function(a){var b=this.chart,c=b.hoverPoint,d=b.plotLeft,e=b.plotTop,f=b.inverted,g,h,k;a=this.normalize(a);a.cancelBubble=!0;b.cancelClick||(c&&this.inClass(a.target,"highcharts-tracker")? (g=this.chartPosition,h=c.plotX,k=c.plotY,x(c,{pageX:g.left+d+(f?b.plotWidth-k:h),pageY:g.top+e+(f?b.plotHeight-h:k)}),K(c.series,"click",x(a,{point:c})),b.hoverPoint&&c.firePointEvent("click",a)):(x(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-d,a.chartY-e)&&K(b,"click",a)))},onContainerTouchStart:function(a){var b=this.chart;1===a.touches.length?(a=this.normalize(a),b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)?(this.runPointActions(a),this.pinch(a)):this.reset()):2===a.touches.length&& this.pinch(a)},onContainerTouchMove:function(a){1!==a.touches.length&&2!==a.touches.length||this.pinch(a)},onDocumentTouchEnd:function(a){this.drop(a)},setDOMEvents:function(){var a=this,b=a.chart.container,c;this._events=c=[[b,"onmousedown","onContainerMouseDown"],[b,"onmousemove","onContainerMouseMove"],[b,"onclick","onContainerClick"],[b,"mouseleave","onContainerMouseLeave"],[B,"mousemove","onDocumentMouseMove"],[B,"mouseup","onDocumentMouseUp"]];ib&&c.push([b,"ontouchstart","onContainerTouchStart"], [b,"ontouchmove","onContainerTouchMove"],[B,"touchend","onDocumentTouchEnd"]);q(c,function(b){a["_"+b[2]]=function(c){a[b[2]](c)};0===b[1].indexOf("on")?b[0][b[1]]=a["_"+b[2]]:L(b[0],b[1],a["_"+b[2]])})},destroy:function(){var a=this;q(a._events,function(b){0===b[1].indexOf("on")?b[0][b[1]]=null:da(b[0],b[1],a["_"+b[2]])});delete a._events;clearInterval(a.tooltipTimeout)}};Cb.prototype={init:function(a,b){var c=this,d=b.itemStyle,e=r(b.padding,8),f=b.itemMarginTop||0;this.options=b;b.enabled&&(c.baseline= D(d.fontSize)+3+f,c.itemStyle=d,c.itemHiddenStyle=A(d,b.itemHiddenStyle),c.itemMarginTop=f,c.padding=e,c.initialItemX=e,c.initialItemY=e-5,c.maxItemWidth=0,c.chart=a,c.itemHeight=0,c.lastLineHeight=0,c.render(),L(c.chart,"endResize",function(){c.positionCheckboxes()}))},colorizeItem:function(a,b){var c=this.options,d=a.legendItem,e=a.legendLine,f=a.legendSymbol,g=this.itemHiddenStyle.color,c=b?c.itemStyle.color:g,h=b?a.color:g,g=a.options&&a.options.marker,k={stroke:h,fill:h},l;d&&d.css({fill:c,color:c}); e&&e.attr({stroke:h});if(f){if(g&&f.isMarker)for(l in g=a.convertAttribs(g),g)d=g[l],d!==y&&(k[l]=d);f.attr(k)}},positionItem:function(a){var b=this.options,c=b.symbolPadding,b=!b.rtl,d=a._legendItemPos,e=d[0],d=d[1],f=a.checkbox;a.legendGroup&&a.legendGroup.translate(b?e:this.legendWidth-e-2*c-4,d);f&&(f.x=e,f.y=d)},destroyItem:function(a){var b=a.checkbox;q(["legendItem","legendLine","legendSymbol","legendGroup"],function(b){a[b]&&(a[b]=a[b].destroy())});b&&Ta(a.checkbox)},destroy:function(){var a= this.group,b=this.box;b&&(this.box=b.destroy());a&&(this.group=a.destroy())},positionCheckboxes:function(a){var b=this.group.alignAttr,c,d=this.clipHeight||this.legendHeight;b&&(c=b.translateY,q(this.allItems,function(e){var f=e.checkbox,g;f&&(g=c+f.y+(a||0)+3,M(f,{left:b.translateX+e.legendItemWidth+f.x-20+"px",top:g+"px",display:g>c-6&&g<c+d-6?"":P}))}))},renderTitle:function(){var a=this.padding,b=this.options.title,c=0;b.text&&(this.title||(this.title=this.chart.renderer.label(b.text,a-3,a-4, null,null,null,null,null,"legend-title").attr({zIndex:1}).css(b.style).add(this.group)),a=this.title.getBBox(),c=a.height,this.offsetWidth=a.width,this.contentGroup.attr({translateY:c}));this.titleHeight=c},renderItem:function(a){var b=this,c=b.chart,d=c.renderer,e=b.options,f="horizontal"===e.layout,g=e.symbolWidth,h=e.symbolPadding,k=b.itemStyle,l=b.itemHiddenStyle,m=b.padding,n=f?r(e.itemDistance,8):0,p=!e.rtl,s=e.width,t=e.itemMarginBottom||0,q=b.itemMarginTop,v=b.initialItemX,w=a.legendItem, x=a.series||a,z=x.options,y=z.showCheckbox,D=e.useHTML;w||(a.legendGroup=d.g("legend-item").attr({zIndex:1}).add(b.scrollGroup),x.drawLegendSymbol(b,a),a.legendItem=w=d.text(e.labelFormat?Ba(e.labelFormat,a):e.labelFormatter.call(a),p?g+h:-h,b.baseline,D).css(A(a.visible?k:l)).attr({align:p?"left":"right",zIndex:2}).add(a.legendGroup),(D?w:a.legendGroup).on("mouseover",function(){a.setState("hover");w.css(b.options.itemHoverStyle)}).on("mouseout",function(){w.css(a.visible?k:l);a.setState()}).on("click", function(b){var c=function(){a.setVisible()};b={browserEvent:b};a.firePointEvent?a.firePointEvent("legendItemClick",b,c):K(a,"legendItemClick",b,c)}),b.colorizeItem(a,a.visible),z&&y&&(a.checkbox=W("input",{type:"checkbox",checked:a.selected,defaultChecked:a.selected},e.itemCheckboxStyle,c.container),L(a.checkbox,"click",function(b){K(a,"checkboxClick",{checked:b.target.checked},function(){a.select()})})));d=w.getBBox();e=a.legendItemWidth=e.itemWidth||g+h+d.width+n+(y?20:0);b.itemHeight=g=d.height; f&&b.itemX-v+e>(s||c.chartWidth-2*m-v)&&(b.itemX=v,b.itemY+=q+b.lastLineHeight+t,b.lastLineHeight=0);b.maxItemWidth=u(b.maxItemWidth,e);b.lastItemY=q+b.itemY+t;b.lastLineHeight=u(g,b.lastLineHeight);a._legendItemPos=[b.itemX,b.itemY];f?b.itemX+=e:(b.itemY+=q+g+t,b.lastLineHeight=g);b.offsetWidth=s||u((f?b.itemX-v-n:e)+m,b.offsetWidth)},render:function(){var a=this,b=a.chart,c=b.renderer,d=a.group,e,f,g,h,k=a.box,l=a.options,m=a.padding,n=l.borderWidth,p=l.backgroundColor;a.itemX=a.initialItemX;a.itemY= a.initialItemY;a.offsetWidth=0;a.lastItemY=0;d||(a.group=d=c.g("legend").attr({zIndex:7}).add(),a.contentGroup=c.g().attr({zIndex:1}).add(d),a.scrollGroup=c.g().add(a.contentGroup));a.renderTitle();e=[];q(b.series,function(a){var b=a.options;b.showInLegend&&!v(b.linkedTo)&&(e=e.concat(a.legendItems||("point"===b.legendType?a.data:a)))});Ub(e,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});l.reversed&&e.reverse();a.allItems=e;a.display=f=!!e.length; q(e,function(b){a.renderItem(b)});g=l.width||a.offsetWidth;h=a.lastItemY+a.lastLineHeight+a.titleHeight;h=a.handleOverflow(h);if(n||p)g+=m,h+=m,k?0<g&&0<h&&(k[k.isNew?"attr":"animate"](k.crisp(null,null,null,g,h)),k.isNew=!1):(a.box=k=c.rect(0,0,g,h,l.borderRadius,n||0).attr({stroke:l.borderColor,"stroke-width":n||0,fill:p||P}).add(d).shadow(l.shadow),k.isNew=!0),k[f?"show":"hide"]();a.legendWidth=g;a.legendHeight=h;q(e,function(b){a.positionItem(b)});f&&d.align(x({width:g,height:h},l),!0,"spacingBox"); b.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var b=this,c=this.chart,d=c.renderer,e=this.options,f=e.y,f=c.spacingBox.height+("top"===e.verticalAlign?-f:f)-this.padding,g=e.maxHeight,h=this.clipRect,k=e.navigation,l=r(k.animation,!0),m=k.arrowSize||12,n=this.nav;"horizontal"===e.layout&&(f/=2);g&&(f=O(f,g));a>f&&!e.useHTML?(this.clipHeight=c=f-20-this.titleHeight,this.pageCount=ma(a/c),this.currentPage=r(this.currentPage,1),this.fullHeight=a,h||(h=b.clipRect=d.clipRect(0,0, 9999,0),b.contentGroup.clip(h)),h.attr({height:c}),n||(this.nav=n=d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,m,m).on("click",function(){b.scroll(-1,l)}).add(n),this.pager=d.text("",15,10).css(k.style).add(n),this.down=d.symbol("triangle-down",0,0,m,m).on("click",function(){b.scroll(1,l)}).add(n)),b.scroll(0),a=f):n&&(h.attr({height:c.chartHeight}),n.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,b){var c=this.pageCount,d=this.currentPage+ a,e=this.clipHeight,f=this.options.navigation,g=f.activeColor,h=f.inactiveColor,f=this.pager,k=this.padding;d>c&&(d=c);0<d&&(b!==y&&Ka(b,this.chart),this.nav.attr({translateX:k,translateY:e+7+this.titleHeight,visibility:"visible"}),this.up.attr({fill:1===d?h:g}).css({cursor:1===d?"default":"pointer"}),f.attr({text:d+"/"+this.pageCount}),this.down.attr({x:18+this.pager.getBBox().width,fill:d===c?h:g}).css({cursor:d===c?"default":"pointer"}),e=-O(e*(d-1),this.fullHeight-e+k)+1,this.scrollGroup.animate({translateY:e}), f.attr({text:d+"/"+c}),this.currentPage=d,this.positionCheckboxes(e))}};Db.prototype={init:function(a,b){var c,d=a.series;a.series=null;c=A(G,a);c.series=a.series=d;var d=c.chart,e=d.margin,e=X(e)?e:[e,e,e,e];this.optionsMarginTop=r(d.marginTop,e[0]);this.optionsMarginRight=r(d.marginRight,e[1]);this.optionsMarginBottom=r(d.marginBottom,e[2]);this.optionsMarginLeft=r(d.marginLeft,e[3]);e=d.events;this.bounds={h:{},v:{}};this.callback=b;this.isResizing=0;this.options=c;this.axes=[];this.series=[]; this.hasCartesianSeries=d.showAxes;var f=this,g;f.index=Fa.length;Fa.push(f);!1!==d.reflow&&L(f,"load",function(){f.initReflow()});if(e)for(g in e)L(f,g,e[g]);f.xAxis=[];f.yAxis=[];f.animation=aa?!1:r(d.animation,!0);f.pointCount=0;f.counters=new Tb;f.firstRender()},initSeries:function(a){var b=this.options.chart;(b=ba[a.type||b.type||b.defaultSeriesType])||va(17,!0);b=new b;b.init(this,a);return b},addSeries:function(a,b,c){var d,e=this;a&&(b=r(b,!0),K(e,"addSeries",{options:a},function(){d=e.initSeries(a); e.isDirtyLegend=!0;b&&e.redraw(c)}));return d},addAxis:function(a,b,c,d){var e=b?"xAxis":"yAxis",f=this.options;new eb(this,A(a,{index:this[e].length,isX:b}));f[e]=ka(f[e]||{});f[e].push(a);r(c,!0)&&this.redraw(d)},isInsidePlot:function(a,b,c){var d=c?b:a;a=c?a:b;return 0<=d&&d<=this.plotWidth&&0<=a&&a<=this.plotHeight},adjustTickAmounts:function(){!1!==this.options.chart.alignTicks&&q(this.axes,function(a){a.adjustTickAmount()});this.maxTicks=null},redraw:function(a){var b=this.axes,c=this.series, d=this.pointer,e=this.legend,f=this.isDirtyLegend,g,h,k=this.isDirtyBox,l=c.length,m=l,n=this.renderer,p=n.isHidden(),s=[];Ka(a,this);p&&this.cloneRenderTo();for(this.layOutTitles();m--;)if(a=c[m],a.options.stacking&&(g=!0,a.isDirty)){h=!0;break}if(h)for(m=l;m--;)a=c[m],a.options.stacking&&(a.isDirty=!0);q(c,function(a){a.isDirty&&"point"===a.options.legendType&&(f=!0)});f&&e.options.enabled&&(e.render(),this.isDirtyLegend=!1);g&&this.getStacks();this.hasCartesianSeries&&(this.isResizing||(this.maxTicks= null,q(b,function(a){a.setScale()})),this.adjustTickAmounts(),this.getMargins(),q(b,function(a){a.isDirtyExtremes&&(a.isDirtyExtremes=!1,s.push(function(){K(a,"afterSetExtremes",a.getExtremes())}));if(a.isDirty||k||g)a.redraw(),k=!0}));k&&this.drawChartBox();q(c,function(a){a.isDirty&&(a.visible&&(!a.isCartesian||a.xAxis))&&a.redraw()});d&&d.reset&&d.reset(!0);n.draw();K(this,"redraw");p&&this.cloneRenderTo(!0);q(s,function(a){a.call()})},showLoading:function(a){var b=this.options,c=this.loadingDiv, d=b.loading;c||(this.loadingDiv=c=W(Ca,{className:"highcharts-loading"},x(d.style,{zIndex:10,display:P}),this.container),this.loadingSpan=W("span",null,d.labelStyle,c));this.loadingSpan.innerHTML=a||b.lang.loading;this.loadingShown||(M(c,{opacity:0,display:"",left:this.plotLeft+"px",top:this.plotTop+"px",width:this.plotWidth+"px",height:this.plotHeight+"px"}),Gb(c,{opacity:d.style.opacity},{duration:d.showDuration||0}),this.loadingShown=!0)},hideLoading:function(){var a=this.options,b=this.loadingDiv; b&&Gb(b,{opacity:0},{duration:a.loading.hideDuration||100,complete:function(){M(b,{display:P})}});this.loadingShown=!1},get:function(a){var b=this.axes,c=this.series,d,e;for(d=0;d<b.length;d++)if(b[d].options.id===a)return b[d];for(d=0;d<c.length;d++)if(c[d].options.id===a)return c[d];for(d=0;d<c.length;d++)for(e=c[d].points||[],b=0;b<e.length;b++)if(e[b].id===a)return e[b];return null},getAxes:function(){var a=this,b=this.options,c=b.xAxis=ka(b.xAxis||{}),b=b.yAxis=ka(b.yAxis||{});q(c,function(a, b){a.index=b;a.isX=!0});q(b,function(a,b){a.index=b});c=c.concat(b);q(c,function(b){new eb(a,b)});a.adjustTickAmounts()},getSelectedPoints:function(){var a=[];q(this.series,function(b){a=a.concat(yb(b.points||[],function(a){return a.selected}))});return a},getSelectedSeries:function(){return yb(this.series,function(a){return a.selected})},getStacks:function(){var a=this;q(a.yAxis,function(a){a.stacks&&a.hasVisibleSeries&&(a.oldStacks=a.stacks)});q(a.series,function(b){!b.options.stacking||!0!==b.visible&& !1!==a.options.chart.ignoreHiddenSeries||(b.stackKey=b.type+r(b.options.stack,""))})},showResetZoom:function(){var a=this,b=G.lang,c=a.options.chart.resetZoomButton,d=c.theme,e=d.states,f="chart"===c.relativeTo?null:"plotBox";this.resetZoomButton=a.renderer.button(b.resetZoom,null,null,function(){a.zoomOut()},d,e&&e.hover).attr({align:c.position.align,title:b.resetZoomTitle}).add().align(c.position,!1,f)},zoomOut:function(){var a=this;K(a,"selection",{resetSelection:!0},function(){a.zoom()})},zoom:function(a){var b, c=this.pointer,d=!1,e;!a||a.resetSelection?q(this.axes,function(a){b=a.zoom()}):q(a.xAxis.concat(a.yAxis),function(a){var e=a.axis,h=e.isXAxis;if(c[h?"zoomX":"zoomY"]||c[h?"pinchX":"pinchY"])b=e.zoom(a.min,a.max),e.displayBtn&&(d=!0)});e=this.resetZoomButton;d&&!e?this.showResetZoom():!d&&X(e)&&(this.resetZoomButton=e.destroy());b&&this.redraw(r(this.options.chart.animation,a&&a.animation,100>this.pointCount))},pan:function(a){var b=this.xAxis[0],c=this.mouseDownX,d=b.pointRange/2,e=b.getExtremes(), f=b.translate(c-a,!0)+d,c=b.translate(c+this.plotWidth-a,!0)-d;(d=this.hoverPoints)&&q(d,function(a){a.setState()});b.series.length&&(f>O(e.dataMin,e.min)&&c<u(e.dataMax,e.max))&&b.setExtremes(f,c,!0,!1,{trigger:"pan"});this.mouseDownX=a;M(this.container,{cursor:"move"})},setTitle:function(a,b){var c=this,d=c.options,e;e=d.title=A(d.title,a);d=d.subtitle=A(d.subtitle,b);q([["title",a,e],["subtitle",b,d]],function(a){var b=a[0],d=c[b],e=a[1];a=a[2];d&&e&&(c[b]=d=d.destroy());a&&(a.text&&!d)&&(c[b]= c.renderer.text(a.text,0,0,a.useHTML).attr({align:a.align,"class":"highcharts-"+b,zIndex:a.zIndex||4}).css(a.style).add())});c.layOutTitles()},layOutTitles:function(){var a=0,b=this.title,c=this.subtitle,d=this.options,e=d.title,d=d.subtitle,f=this.spacingBox.width-44;b&&(b.css({width:(e.width||f)+"px"}).align(x({y:15},e),!1,"spacingBox"),e.floating||e.verticalAlign||(a=b.getBBox().height,18<=a&&25>=a&&(a=15)));c&&(c.css({width:(d.width||f)+"px"}).align(x({y:a+e.margin},d),!1,"spacingBox"),d.floating|| d.verticalAlign||(a=ma(a+c.getBBox().height)));this.titleOffset=a},getChartSize:function(){var a=this.options.chart,b=this.renderToClone||this.renderTo;this.containerWidth=kb(b,"width");this.containerHeight=kb(b,"height");this.chartWidth=u(0,a.width||this.containerWidth||600);this.chartHeight=u(0,r(a.height,19<this.containerHeight?this.containerHeight:400))},cloneRenderTo:function(a){var b=this.renderToClone,c=this.container;a?b&&(this.renderTo.appendChild(c),Ta(b),delete this.renderToClone):(c&& c.parentNode===this.renderTo&&this.renderTo.removeChild(c),this.renderToClone=b=this.renderTo.cloneNode(0),M(b,{position:"absolute",top:"-9999px",display:"block"}),B.body.appendChild(b),c&&b.appendChild(c))},getContainer:function(){var a,b=this.options.chart,c,d,e;this.renderTo=a=b.renderTo;e="highcharts-"+Eb++;ga(a)&&(this.renderTo=a=B.getElementById(a));a||va(13,!0);c=D(z(a,"data-highcharts-chart"));!isNaN(c)&&Fa[c]&&Fa[c].destroy();z(a,"data-highcharts-chart",this.index);a.innerHTML="";a.offsetWidth|| this.cloneRenderTo();this.getChartSize();c=this.chartWidth;d=this.chartHeight;this.container=a=W(Ca,{className:"highcharts-container"+(b.className?" "+b.className:""),id:e},x({position:"relative",overflow:"hidden",width:c+"px",height:d+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},b.style),this.renderToClone||a);this._cursor=a.style.cursor;this.renderer=b.forExport?new Ga(a,c,d,!0):new Va(a,c,d);aa&&this.renderer.create(this,a,c,d)},getMargins:function(){var a= this.options.chart,b=a.spacingTop,c=a.spacingRight,d=a.spacingBottom,a=a.spacingLeft,e,f=this.legend,g=this.optionsMarginTop,h=this.optionsMarginLeft,k=this.optionsMarginRight,l=this.optionsMarginBottom,m=this.options.legend,n=r(m.margin,10),p=m.x,s=m.y,t=m.align,w=m.verticalAlign,x=this.titleOffset;this.resetMargins();e=this.axisOffset;x&&!v(g)&&(this.plotTop=u(this.plotTop,x+this.options.title.margin+b));f.display&&!m.floating&&("right"===t?v(k)||(this.marginRight=u(this.marginRight,f.legendWidth- p+n+c)):"left"===t?v(h)||(this.plotLeft=u(this.plotLeft,f.legendWidth+p+n+a)):"top"===w?v(g)||(this.plotTop=u(this.plotTop,f.legendHeight+s+n+b)):"bottom"!==w||v(l)||(this.marginBottom=u(this.marginBottom,f.legendHeight-s+n+d)));this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin);this.extraTopMargin&&(this.plotTop+=this.extraTopMargin);this.hasCartesianSeries&&q(this.axes,function(a){a.getOffset()});v(h)||(this.plotLeft+=e[3]);v(g)||(this.plotTop+=e[0]);v(l)||(this.marginBottom+=e[2]); v(k)||(this.marginRight+=e[1]);this.setChartSize()},initReflow:function(){function a(a){var g=c.width||kb(d,"width"),h=c.height||kb(d,"height");a=a?a.target:N;if(!b.hasUserSize&&g&&h&&(a===N||a===B)){if(g!==b.containerWidth||h!==b.containerHeight)clearTimeout(e),b.reflowTimeout=e=setTimeout(function(){b.container&&(b.setSize(g,h,!1),b.hasUserSize=null)},100);b.containerWidth=g;b.containerHeight=h}}var b=this,c=b.options.chart,d=b.renderTo,e;L(N,"resize",a);L(b,"destroy",function(){da(N,"resize",a)})}, setSize:function(a,b,c){var d=this,e,f,g;d.isResizing+=1;g=function(){d&&K(d,"endResize",null,function(){d.isResizing-=1})};Ka(c,d);d.oldChartHeight=d.chartHeight;d.oldChartWidth=d.chartWidth;v(a)&&(d.chartWidth=e=u(0,w(a)),d.hasUserSize=!!e);v(b)&&(d.chartHeight=f=u(0,w(b)));M(d.container,{width:e+"px",height:f+"px"});d.setChartSize(!0);d.renderer.setSize(e,f,c);d.maxTicks=null;q(d.axes,function(a){a.isDirty=!0;a.setScale()});q(d.series,function(a){a.isDirty=!0});d.isDirtyLegend=!0;d.isDirtyBox= !0;d.getMargins();d.redraw(c);d.oldChartHeight=null;K(d,"resize");!1===Da?g():setTimeout(g,Da&&Da.duration||500)},setChartSize:function(a){var b=this.inverted,c=this.renderer,d=this.chartWidth,e=this.chartHeight,f=this.options.chart,g=f.spacingTop,h=f.spacingRight,k=f.spacingBottom,l=f.spacingLeft,m=this.clipOffset,n,p,s,t;this.plotLeft=n=w(this.plotLeft);this.plotTop=p=w(this.plotTop);this.plotWidth=s=u(0,w(d-n-this.marginRight));this.plotHeight=t=u(0,w(e-p-this.marginBottom));this.plotSizeX=b?t: s;this.plotSizeY=b?s:t;this.plotBorderWidth=b=f.plotBorderWidth||0;this.spacingBox=c.spacingBox={x:l,y:g,width:d-l-h,height:e-g-k};this.plotBox=c.plotBox={x:n,y:p,width:s,height:t};c=ma(u(b,m[3])/2);d=ma(u(b,m[0])/2);this.clipBox={x:c,y:d,width:V(this.plotSizeX-u(b,m[1])/2-c),height:V(this.plotSizeY-u(b,m[2])/2-d)};a||q(this.axes,function(a){a.setAxisSize();a.setAxisTranslation()})},resetMargins:function(){var a=this.options.chart,b=a.spacingRight,c=a.spacingBottom,d=a.spacingLeft;this.plotTop=r(this.optionsMarginTop, a.spacingTop);this.marginRight=r(this.optionsMarginRight,b);this.marginBottom=r(this.optionsMarginBottom,c);this.plotLeft=r(this.optionsMarginLeft,d);this.axisOffset=[0,0,0,0];this.clipOffset=[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,b=this.renderer,c=this.chartWidth,d=this.chartHeight,e=this.chartBackground,f=this.plotBackground,g=this.plotBorder,h=this.plotBGImage,k=a.borderWidth||0,l=a.backgroundColor,m=a.plotBackgroundColor,n=a.plotBackgroundImage,p=a.plotBorderWidth||0,s,t= this.plotLeft,r=this.plotTop,q=this.plotWidth,u=this.plotHeight,w=this.plotBox,v=this.clipRect,x=this.clipBox;s=k+(a.shadow?8:0);if(k||l)e?e.animate(e.crisp(null,null,null,c-s,d-s)):(e={fill:l||P},k&&(e.stroke=a.borderColor,e["stroke-width"]=k),this.chartBackground=b.rect(s/2,s/2,c-s,d-s,a.borderRadius,k).attr(e).add().shadow(a.shadow));m&&(f?f.animate(w):this.plotBackground=b.rect(t,r,q,u,0).attr({fill:m}).add().shadow(a.plotShadow));n&&(h?h.animate(w):this.plotBGImage=b.image(n,t,r,q,u).add()); v?v.animate({width:x.width,height:x.height}):this.clipRect=b.clipRect(x);p&&(g?g.animate(g.crisp(null,t,r,q,u)):this.plotBorder=b.rect(t,r,q,u,0,p).attr({stroke:a.plotBorderColor,"stroke-width":p,zIndex:1}).add());this.isDirtyBox=!1},propFromSeries:function(){var a=this,b=a.options.chart,c,d=a.options.series,e,f;q(["inverted","angular","polar"],function(g){c=ba[b.type||b.defaultSeriesType];f=a[g]||b[g]||c&&c.prototype[g];for(e=d&&d.length;!f&&e--;)(c=ba[d[e].type])&&c.prototype[g]&&(f=!0);a[g]=f})}, render:function(){var a=this,b=a.axes,c=a.renderer,d=a.options,e=d.labels;a.legend=new Cb(a,d.legend);a.getStacks();q(b,function(a){a.setScale()});a.getMargins();a.maxTicks=null;q(b,function(a){a.setTickPositions(!0);a.setMaxTicks()});a.adjustTickAmounts();a.getMargins();a.drawChartBox();a.hasCartesianSeries&&q(b,function(a){a.render()});a.seriesGroup||(a.seriesGroup=c.g("series-group").attr({zIndex:3}).add());q(a.series,function(a){a.translate();a.setTooltipPoints();a.render()});e.items&&q(e.items, function(b){var d=x(e.style,b.style),h=D(d.left)+a.plotLeft,k=D(d.top)+a.plotTop+12;delete d.left;delete d.top;c.text(b.html,h,k).attr({zIndex:2}).css(d).add()});a.hasRendered=!0},destroy:function(){var a=this,b=a.axes,c=a.series,d=a.container,e,f=d&&d.parentNode;K(a,"destroy");Fa[a.index]=y;a.renderTo.removeAttribute("data-highcharts-chart");da(a);for(e=b.length;e--;)b[e]=b[e].destroy();for(e=c.length;e--;)c[e]=c[e].destroy();q("title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer scroller rangeSelector legend resetZoomButton tooltip renderer".split(" "), function(b){var c=a[b];c&&c.destroy&&(a[b]=c.destroy())});d&&(d.innerHTML="",da(d),f&&Ta(d));for(e in a)delete a[e]},isReadyToRender:function(){var a=this;return!$&&N==N.top&&"complete"!==B.readyState||aa&&!N.canvg?(aa?cc.push(function(){a.firstRender()},a.options.global.canvasToolsURL):B.attachEvent("onreadystatechange",function(){B.detachEvent("onreadystatechange",a.firstRender);"complete"===B.readyState&&a.firstRender()}),!1):!0},firstRender:function(){var a=this,b=a.options,c=a.callback;a.isReadyToRender()&& (a.getContainer(),K(a,"init"),a.resetMargins(),a.setChartSize(),a.propFromSeries(),a.getAxes(),q(b.series||[],function(b){a.initSeries(b)}),K(a,"beforeRender"),a.pointer=new Bb(a,b),a.render(),a.renderer.draw(),c&&c.apply(a,[a]),q(a.callbacks,function(b){b.apply(a,[a])}),a.cloneRenderTo(!0),K(a,"load"))}};Db.prototype.callbacks=[];var Pa=function(){};Pa.prototype={init:function(a,b,c){this.series=a;this.applyOptions(b,c);this.pointAttr={};a.options.colorByPoint&&(b=a.options.colors||a.chart.options.colors, this.color=this.color||b[a.colorCounter++],a.colorCounter===b.length&&(a.colorCounter=0));a.chart.pointCount++;return this},applyOptions:function(a,b){var c=this.series,d=c.pointValKey;a=Pa.prototype.optionsToObject.call(this,a);x(this,a);this.options=this.options?x(this.options,a):a;d&&(this.y=this[d]);this.x===y&&c&&(this.x=b===y?c.autoIncrement():b);return this},optionsToObject:function(a){var b,c=this.series,d=c.pointArrayMap||["y"],e=d.length,f=0,g=0;if("number"===typeof a||null===a)b={y:a}; else if(Ha(a))for(b={},a.length>e&&(c=typeof a[0],"string"===c?b.name=a[0]:"number"===c&&(b.x=a[0]),f++);g<e;)b[d[g++]]=a[f++];else"object"===typeof a&&(b=a,a.dataLabels&&(c._hasPointLabels=!0),a.marker&&(c._hasPointMarkers=!0));return b},destroy:function(){var a=this.series.chart,b=a.hoverPoints,c;a.pointCount--;b&&(this.setState(),ia(b,this),b.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)da(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this); for(c in this)this[c]=null},destroyElements:function(){for(var a="graphic dataLabel dataLabelUpper group connector shadowGroup".split(" "),b,c=6;c--;)b=a[c],this[b]&&(this[b]=this[b].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},select:function(a,b){var c=this,d=c.series,e=d.chart;a=r(a,!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b}, function(){c.selected=c.options.selected=a;d.options.data[oa(c,d.data)]=c.options;c.setState(a&&"select");b||q(e.getSelectedPoints(),function(a){a.selected&&a!==c&&(a.selected=a.options.selected=!1,d.options.data[oa(a,d.data)]=a.options,a.setState(""),a.firePointEvent("unselect"))})})},onMouseOver:function(a){var b=this.series,c=b.chart,d=c.tooltip,e=c.hoverPoint;if(e&&e!==this)e.onMouseOut();this.firePointEvent("mouseOver");!d||d.shared&&!b.noSharedTooltip||d.refresh(this,a);this.setState("hover"); c.hoverPoint=this},onMouseOut:function(){var a=this.series.chart,b=a.hoverPoints;b&&-1!==oa(this,b)||(this.firePointEvent("mouseOut"),this.setState(),a.hoverPoint=null)},tooltipFormatter:function(a){var b=this.series,c=b.tooltipOptions,d=r(c.valueDecimals,""),e=c.valuePrefix||"",f=c.valueSuffix||"";q(b.pointArrayMap||["y"],function(b){b="{point."+b;if(e||f)a=a.replace(b+"}",e+b+"}"+f);a=a.replace(b+"}",b+":,."+d+"f}")});return Ba(a,{point:this,series:this.series})},update:function(a,b,c){var d=this, e=d.series,f=d.graphic,g,h=e.data,k=e.chart,l=e.options;b=r(b,!0);d.firePointEvent("update",{options:a},function(){d.applyOptions(a);X(a)&&(e.getAttribs(),f&&f.attr(d.pointAttr[e.state]));g=oa(d,h);e.xData[g]=d.x;e.yData[g]=e.toYData?e.toYData(d):d.y;e.zData[g]=d.z;l.data[g]=d.options;e.isDirty=e.isDirtyData=k.isDirtyBox=!0;"point"===l.legendType&&k.legend.destroyItem(d);b&&k.redraw(c)})},remove:function(a,b){var c=this,d=c.series,e=d.chart,f,g=d.data;Ka(b,e);a=r(a,!0);c.firePointEvent("remove",null, function(){f=oa(c,g);g.splice(f,1);d.options.data.splice(f,1);d.xData.splice(f,1);d.yData.splice(f,1);d.zData.splice(f,1);c.destroy();d.isDirty=!0;d.isDirtyData=!0;a&&e.redraw()})},firePointEvent:function(a,b,c){var d=this,e=this.series.options;(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])&&this.importEvents();"click"===a&&e.allowPointSelect&&(c=function(a){d.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});K(this,a,b,c)},importEvents:function(){if(!this.hasImportedEvents){var a= A(this.series.options.point,this.options).events,b;this.events=a;for(b in a)L(this,b,a[b]);this.hasImportedEvents=!0}},setState:function(a){var b=this.plotX,c=this.plotY,d=this.series,e=d.options.states,f=Z[d.type].marker&&d.options.marker,g=f&&!f.enabled,h=f&&f.states[a],k=h&&!1===h.enabled,l=d.stateMarkerGraphic,m=this.marker||{},n=d.chart,p=this.pointAttr;a=a||"";if(!(a===this.state||this.selected&&"select"!==a||e[a]&&!1===e[a].enabled||a&&(k||g&&!h.enabled))){if(this.graphic)e=f&&this.graphic.symbolName&& p[a].r,this.graphic.attr(A(p[a],e?{x:b-e,y:c-e,width:2*e,height:2*e}:{}));else if(a&&h&&(e=h.radius,m=m.symbol||d.symbol,l&&l.currentSymbol!==m&&(l=l.destroy()),l?l.attr({x:b-e,y:c-e}):(d.stateMarkerGraphic=l=n.renderer.symbol(m,b-e,c-e,2*e,2*e).attr(p[a]).add(d.markerGroup),l.currentSymbol=m)),l)l[a&&n.isInsidePlot(b,c)?"show":"hide"]();this.state=a}}};var T=function(){};T.prototype={isCartesian:!0,type:"line",pointClass:Pa,sorted:!0,requireSorting:!0,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth", fill:"fillColor",r:"radius"},colorCounter:0,init:function(a,b){var c,d,e=a.series;this.chart=a;this.options=b=this.setOptions(b);this.bindAxes();x(this,{name:b.name,state:"",pointAttr:{},visible:!1!==b.visible,selected:!0===b.selected});aa&&(b.animation=!1);d=b.events;for(c in d)L(this,c,d[c]);if(d&&d.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;this.getColor();this.getSymbol();this.setData(b.data,!1);this.isCartesian&&(a.hasCartesianSeries=!0);e.push(this); this._i=e.length-1;Ub(e,function(a,b){return r(a.options.index,a._i)-r(b.options.index,a._i)});q(e,function(a,b){a.index=b;a.name=a.name||"Series "+(b+1)});c=b.linkedTo;this.linkedSeries=[];ga(c)&&(c=":previous"===c?e[this.index-1]:a.get(c))&&(c.linkedSeries.push(this),this.linkedParent=c)},bindAxes:function(){var a=this,b=a.options,c=a.chart,d;a.isCartesian&&q(["xAxis","yAxis"],function(e){q(c[e],function(c){d=c.options;if(b[e]===d.index||b[e]!==y&&b[e]===d.id||b[e]===y&&0===d.index)c.series.push(a), a[e]=c,c.isDirty=!0});a[e]||va(18,!0)})},autoIncrement:function(){var a=this.options,b=this.xIncrement,b=r(b,a.pointStart,0);this.pointInterval=r(this.pointInterval,a.pointInterval,1);this.xIncrement=b+this.pointInterval;return b},getSegments:function(){var a=-1,b=[],c,d=this.points,e=d.length;if(e)if(this.options.connectNulls){for(c=e;c--;)null===d[c].y&&d.splice(c,1);d.length&&(b=[d])}else q(d,function(c,g){null===c.y?(g>a+1&&b.push(d.slice(a+1,g)),a=g):g===e-1&&b.push(d.slice(a+1,g+1))});this.segments= b},setOptions:function(a){var b=this.chart.options,c=b.plotOptions,d=c[this.type];this.userOptions=a;a=A(d,c.series,a);this.tooltipOptions=A(b.tooltip,a.tooltip);null===d.marker&&delete a.marker;return a},getColor:function(){var a=this.options,b=this.userOptions,c=this.chart.options.colors,d=this.chart.counters,e;e=a.color||Z[this.type].color;e||a.colorByPoint||(v(b._colorIndex)?a=b._colorIndex:(b._colorIndex=d.color,a=d.color++),e=c[a]);this.color=e;d.wrapColor(c.length)},getSymbol:function(){var a= this.userOptions,b=this.options.marker,c=this.chart,d=c.options.symbols,c=c.counters;this.symbol=b.symbol;this.symbol||(v(a._symbolIndex)?a=a._symbolIndex:(a._symbolIndex=c.symbol,a=c.symbol++),this.symbol=d[a]);/^url/.test(this.symbol)&&(b.radius=0);c.wrapSymbol(d.length)},drawLegendSymbol:function(a){var b=this.options,c=b.marker,d=a.options,e;e=d.symbolWidth;var f=this.chart.renderer,g=this.legendGroup;a=a.baseline-w(0.3*f.fontMetrics(d.itemStyle.fontSize).b);b.lineWidth&&(d={"stroke-width":b.lineWidth}, b.dashStyle&&(d.dashstyle=b.dashStyle),this.legendLine=f.path(["M",0,a,"L",e,a]).attr(d).add(g));c&&c.enabled&&(b=c.radius,this.legendSymbol=e=f.symbol(this.symbol,e/2-b,a-b,2*b,2*b).add(g),e.isMarker=!0)},addPoint:function(a,b,c,d){var e=this.options,f=this.data,g=this.graph,h=this.area,k=this.chart,l=this.xData,m=this.yData,n=this.zData,p=this.names,s=g&&g.shift||0,t=e.data;Ka(d,k);c&&q([g,h,this.graphNeg,this.areaNeg],function(a){a&&(a.shift=s+1)});h&&(h.isArea=!0);b=r(b,!0);d={series:this};this.pointClass.prototype.applyOptions.apply(d, [a]);l.push(d.x);m.push(this.toYData?this.toYData(d):d.y);n.push(d.z);p&&(p[d.x]=d.name);t.push(a);"point"===e.legendType&&this.generatePoints();c&&(f[0]&&f[0].remove?f[0].remove(!1):(f.shift(),l.shift(),m.shift(),n.shift(),t.shift()));this.isDirtyData=this.isDirty=!0;b&&(this.getAttribs(),k.redraw())},setData:function(a,b){var c=this.points,d=this.options,e=this.chart,f=null,g=this.xAxis,h=g&&g.categories&&!g.categories.length?[]:null,k;this.xIncrement=null;this.pointRange=g&&g.categories?1:d.pointRange; this.colorCounter=0;var l=[],m=[],n=[],p=a?a.length:[];k=r(d.turboThreshold,1E3);var s=this.pointArrayMap,s=s&&s.length,t=!!this.toYData;if(k&&p>k){for(k=0;null===f&&k<p;)f=a[k],k++;if(qa(f)){f=r(d.pointStart,0);d=r(d.pointInterval,1);for(k=0;k<p;k++)l[k]=f,m[k]=a[k],f+=d;this.xIncrement=f}else if(Ha(f))if(s)for(k=0;k<p;k++)d=a[k],l[k]=d[0],m[k]=d.slice(1,s+1);else for(k=0;k<p;k++)d=a[k],l[k]=d[0],m[k]=d[1]}else for(k=0;k<p;k++)a[k]!==y&&(d={series:this},this.pointClass.prototype.applyOptions.apply(d, [a[k]]),l[k]=d.x,m[k]=t?this.toYData(d):d.y,n[k]=d.z,h&&d.name&&(h[d.x]=d.name));ga(m[0])&&va(14,!0);this.data=[];this.options.data=a;this.xData=l;this.yData=m;this.zData=n;this.names=h;for(k=c&&c.length||0;k--;)c[k]&&c[k].destroy&&c[k].destroy();g&&(g.minRange=g.userMinRange);this.isDirty=this.isDirtyData=e.isDirtyBox=!0;r(b,!0)&&e.redraw(!1)},remove:function(a,b){var c=this,d=c.chart;a=r(a,!0);c.isRemoving||(c.isRemoving=!0,K(c,"remove",null,function(){c.destroy();d.isDirtyLegend=d.isDirtyBox=!0; a&&d.redraw(b)}));c.isRemoving=!1},processData:function(a){var b=this.xData,c=this.yData,d=b.length,e;e=0;var f,g,h=this.xAxis,k=this.options,l=k.cropThreshold,m=this.isCartesian;if(m&&!(this.isDirty||h.isDirty||this.yAxis.isDirty||a))return!1;if(m&&this.sorted&&(!l||d>l||this.forceCrop))if(a=h.min,h=h.max,b[d-1]<a||b[0]>h)b=[],c=[];else if(b[0]<a||b[d-1]>h)e=this.cropData(this.xData,this.yData,a,h),b=e.xData,c=e.yData,e=e.start,f=!0;for(h=b.length-1;0<=h;h--)d=b[h]-b[h-1],0<d&&(g===y||d<g)?g=d:0> d&&this.requireSorting&&va(15);this.cropped=f;this.cropStart=e;this.processedXData=b;this.processedYData=c;null===k.pointRange&&(this.pointRange=g||1);this.closestPointRange=g},cropData:function(a,b,c,d){var e=a.length,f=0,g=e,h;for(h=0;h<e;h++)if(a[h]>=c){f=u(0,h-1);break}for(;h<e;h++)if(a[h]>d){g=h+1;break}return{xData:a.slice(f,g),yData:b.slice(f,g),start:f,end:g}},generatePoints:function(){var a=this.options.data,b=this.data,c,d=this.processedXData,e=this.processedYData,f=this.pointClass,g=d.length, h=this.cropStart||0,k,l=this.hasGroupedData,m,n=[],p;b||l||(b=[],b.length=a.length,b=this.data=b);for(p=0;p<g;p++)k=h+p,l?n[p]=(new f).init(this,[d[p]].concat(ka(e[p]))):(b[k]?m=b[k]:a[k]!==y&&(b[k]=m=(new f).init(this,a[k],d[p])),n[p]=m);if(b&&(g!==(c=b.length)||l))for(p=0;p<c;p++)p!==h||l||(p+=g),b[p]&&(b[p].destroyElements(),b[p].plotX=y);this.data=b;this.points=n},setStackedPoints:function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var a= this.processedXData,b=this.processedYData,c=b.length,d=this.options,e=d.threshold,f=d.stack,d=d.stacking,g=this.stackKey,h="-"+g,k=this.yAxis,l=k.stacks,m=k.oldStacks,n=k.stacksMax,p,s,r,q,u,w;for(u=0;u<c;u++)s=a[u],w=b[u],q=(p=w<e)?h:g,n[q]||(n[q]=w),l[q]||(l[q]={}),l[q][s]||(m[q]&&m[q][s]?(l[q][s]=m[q][s],l[q][s].total=null):l[q][s]=new Wb(k,k.options.stackLabels,p,s,f,d)),r=l[q][s],s=r.total,r.addValue(w),r.cacheExtremes(this,[s,s+w]),r.total>n[q]&&!p?n[q]=r.total:r.total<n[q]&&p&&(n[q]=r.total); k.oldStacks={}}},getExtremes:function(){var a=this.xAxis,b=this.yAxis,c=this.stackKey,d=this.options,e=d.threshold,f=this.processedXData,g=this.processedYData,h=g.length,k=[],l=0,m=a.min,a=a.max,n,p,s;d.stacking&&(p=b.stacksMax["-"+c]||e,s=b.stacksMax[c]||e);if(!v(p)||!v(s)){for(d=0;d<h;d++)if(n=f[d],c=g[d],e=null!==c&&c!==y&&(!b.isLog||c.length||0<c),n=this.getExtremesFromAll||this.cropped||(f[d+1]||n)>=m&&(f[d-1]||n)<=a,e&&n)if(e=c.length)for(;e--;)null!==c[e]&&(k[l++]=c[e]);else k[l++]=c;p=r(p, Ia(k));s=r(s,ua(k))}this.dataMin=p;this.dataMax=s},translate:function(){this.processedXData||this.processData();this.generatePoints();for(var a=this.options,b=a.stacking,c=this.xAxis,d=c.categories,e=this.yAxis,f=this.points,g=f.length,h=!!this.modifyValue,k=a.pointPlacement,l="between"===k||qa(k),m=a.threshold,a=0;a<g;a++){var n=f[a],p=n.x,s=n.y,q=n.low,u=e.stacks[(s<m?"-":"")+this.stackKey],x;e.isLog&&0>=s&&(n.y=s=null);n.plotX=c.translate(p,0,0,0,1,k);b&&(this.visible&&u&&u[p])&&(u=u[p],x=u.total, u.cum=q=u.cum-s,s=q+s,0===u.cum&&(q=r(m,e.min)),e.isLog&&0>=q&&(q=null),"percent"===b&&(q=x?100*q/x:0,s=x?100*s/x:0),n.percentage=x?100*n.y/x:0,n.total=n.stackTotal=x,n.stackY=s,u.setOffset(this.pointXOffset||0,this.barW||0));n.yBottom=v(q)?e.translate(q,0,1,0,1):null;h&&(s=this.modifyValue(s,n));n.plotY="number"===typeof s&&Infinity!==s?w(10*e.translate(s,0,1,0,1))/10:y;n.clientX=l?c.translate(p,0,0,0,1):n.plotX;n.negative=n.y<(m||0);n.category=d&&d[n.x]!==y?d[n.x]:n.x}this.getSegments()},setTooltipPoints:function(a){var b= [],c,d,e=(c=this.xAxis)?c.tooltipLen||c.len:this.chart.plotSizeX,f,g,h,k=[];if(!1!==this.options.enableMouseTracking){a&&(this.tooltipPoints=null);q(this.segments||this.points,function(a){b=b.concat(a)});c&&c.reversed&&(b=b.reverse());this.orderTooltipPoints&&this.orderTooltipPoints(b);a=b.length;for(h=0;h<a;h++)for(f=b[h],g=b[h+1],c=b[h-1]?d+1:0,d=b[h+1]?O(u(0,V((f.clientX+(g?g.wrappedClientX||g.clientX:e))/2)),e):e;0<=c&&c<=d;)k[c++]=f;this.tooltipPoints=k}},tooltipHeaderFormatter:function(a){var b= this.tooltipOptions,c=b.xDateFormat,d=b.dateTimeLabelFormats,e=this.xAxis,f=e&&"datetime"===e.options.type,b=b.headerFormat,e=e&&e.closestPointRange,g;if(f&&!c)if(e)for(g in E){if(E[g]>=e){c=d[g];break}}else c=d.day;f&&(c&&qa(a.key))&&(b=b.replace("{point.key}","{point.key:"+c+"}"));return Ba(b,{point:a,series:this})},onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&K(this,"mouseOver");this.setState("hover");a.hoverSeries=this},onMouseOut:function(){var a= this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;if(d)d.onMouseOut();this&&a.events.mouseOut&&K(this,"mouseOut");!c||(a.stickyTracking||c.shared&&!this.noSharedTooltip)||c.hide();this.setState();b.hoverSeries=null},animate:function(a){var b=this,c=b.chart,d=c.renderer,e;e=b.options.animation;var f=c.clipBox,g=c.inverted,h;e&&!X(e)&&(e=Z[b.type].animation);h="_sharedClip"+e.duration+e.easing;if(a)a=c[h],e=c[h+"m"],a||(c[h]=a=d.clipRect(x(f,{width:0})),c[h+"m"]=e=d.clipRect(-99,g?-c.plotLeft:-c.plotTop, 99,g?c.chartWidth:c.chartHeight)),b.group.clip(a),b.markerGroup.clip(e),b.sharedClipKey=h;else{if(a=c[h])a.animate({width:c.plotSizeX},e),c[h+"m"].animate({width:c.plotSizeX+99},e);b.animate=null;b.animationTimeout=setTimeout(function(){b.afterAnimate()},e.duration)}},afterAnimate:function(){var a=this.chart,b=this.sharedClipKey,c=this.group;c&&!1!==this.options.clip&&(c.clip(a.clipRect),this.markerGroup.clip());setTimeout(function(){b&&a[b]&&(a[b]=a[b].destroy(),a[b+"m"]=a[b+"m"].destroy())},100)}, drawPoints:function(){var a,b=this.points,c=this.chart,d,e,f,g,h,k,l,m,n=this.options.marker,p,s=this.markerGroup;if(n.enabled||this._hasPointMarkers)for(f=b.length;f--;)g=b[f],d=V(g.plotX),e=g.plotY,m=g.graphic,k=g.marker||{},a=n.enabled&&k.enabled===y||k.enabled,p=c.isInsidePlot(w(d),e,c.inverted),a&&e!==y&&!isNaN(e)&&null!==g.y?(a=g.pointAttr[g.selected?"select":""],h=a.r,k=r(k.symbol,this.symbol),l=0===k.indexOf("url"),m?m.attr({visibility:p?$?"inherit":"visible":"hidden"}).animate(x({x:d-h,y:e- h},m.symbolName?{width:2*h,height:2*h}:{})):p&&(0<h||l)&&(g.graphic=c.renderer.symbol(k,d-h,e-h,2*h,2*h).attr(a).add(s))):m&&(g.graphic=m.destroy())},convertAttribs:function(a,b,c,d){var e=this.pointAttrToOptions,f,g,h={};a=a||{};b=b||{};c=c||{};d=d||{};for(f in e)g=e[f],h[f]=r(a[g],b[f],c[f],d[f]);return h},getAttribs:function(){var a=this,b=a.options,c=Z[a.type].marker?b.marker:b,d=c.states,e=d.hover,f,g=a.color,h={stroke:g,fill:g},k=a.points||[],l=[],m,n=a.pointAttrToOptions,p=b.negativeColor, s;b.marker?(e.radius=e.radius||c.radius+2,e.lineWidth=e.lineWidth||c.lineWidth+1):e.color=e.color||pa(e.color||g).brighten(e.brightness).get();l[""]=a.convertAttribs(c,h);q(["hover","select"],function(b){l[b]=a.convertAttribs(d[b],l[""])});a.pointAttr=l;for(g=k.length;g--;){h=k[g];(c=h.options&&h.options.marker||h.options)&&!1===c.enabled&&(c.radius=0);h.negative&&p&&(h.color=h.fillColor=p);f=b.colorByPoint||h.color;if(h.options)for(s in n)v(c[n[s]])&&(f=!0);f?(c=c||{},m=[],d=c.states||{},f=d.hover= d.hover||{},b.marker||(f.color=pa(f.color||h.color).brighten(f.brightness||e.brightness).get()),m[""]=a.convertAttribs(x({color:h.color},c),l[""]),m.hover=a.convertAttribs(d.hover,l.hover,m[""]),m.select=a.convertAttribs(d.select,l.select,m[""]),h.negative&&(b.marker&&p)&&(m[""].fill=m.hover.fill=m.select.fill=a.convertAttribs({fillColor:p}).fill)):m=l;h.pointAttr=m}},update:function(a,b){var c=this.chart,d=this.type;a=A(this.userOptions,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data}, a);this.remove(!1);x(this,ba[a.type||d].prototype);this.init(c,a);r(b,!0)&&c.redraw(!1)},destroy:function(){var a=this,b=a.chart,c=/AppleWebKit/533/.test(Ea),d,e,f=a.data||[],g,h,k;K(a,"destroy");da(a);q(["xAxis","yAxis"],function(b){if(k=a[b])ia(k.series,a),k.isDirty=k.forceRedraw=!0});a.legendItem&&a.chart.legend.destroyItem(a);for(e=f.length;e--;)(g=f[e])&&g.destroy&&g.destroy();a.points=null;clearTimeout(a.animationTimeout);q("area graph dataLabelsGroup group markerGroup tracker graphNeg areaNeg posClip negClip".split(" "), function(b){a[b]&&(d=c&&"group"===b?"hide":"destroy",a[b][d]())});b.hoverSeries===a&&(b.hoverSeries=null);ia(b.series,a);for(h in a)delete a[h]},drawDataLabels:function(){var a=this,b=a.options.dataLabels,c=a.points,d,e,f,g;if(b.enabled||a._hasPointLabels)a.dlProcessOptions&&a.dlProcessOptions(b),g=a.plotGroup("dataLabelsGroup","data-labels",a.visible?"visible":"hidden",b.zIndex||6),e=b,q(c,function(c){var k,l=c.dataLabel,m,n,p=c.connector,s=!0;d=c.options&&c.options.dataLabels;k=e.enabled||d&&d.enabled; if(l&&!k)c.dataLabel=l.destroy();else if(k){b=A(e,d);k=b.rotation;m=c.getLabelConfig();f=b.format?Ba(b.format,m):b.formatter.call(m,b);b.style.color=r(b.color,b.style.color,a.color,"black");if(l)v(f)?(l.attr({text:f}),s=!1):(c.dataLabel=l=l.destroy(),p&&(c.connector=p.destroy()));else if(v(f)){l={fill:b.backgroundColor,stroke:b.borderColor,"stroke-width":b.borderWidth,r:b.borderRadius||0,rotation:k,padding:b.padding,zIndex:1};for(n in l)l[n]===y&&delete l[n];l=c.dataLabel=a.chart.renderer[k?"text": "label"](f,0,-999,null,null,null,b.useHTML).attr(l).css(b.style).add(g).shadow(b.shadow)}l&&a.alignDataLabel(c,l,b,null,s)}})},alignDataLabel:function(a,b,c,d,e){var f=this.chart,g=f.inverted,h=r(a.plotX,-999),k=r(a.plotY,-999);a=b.getBBox();d=x({x:g?f.plotWidth-k:h,y:w(g?f.plotHeight-h:k),width:0,height:0},d);x(c,{width:a.width,height:a.height});c.rotation?(d={align:c.align,x:d.x+c.x+d.width/2,y:d.y+c.y+d.height/2},b[e?"attr":"animate"](d)):(b.align(c,null,d),d=b.alignAttr);b.attr({visibility:!1=== c.crop||f.isInsidePlot(d.x,d.y)&&f.isInsidePlot(d.x+a.width,d.y+a.height)?f.renderer.isSVG?"inherit":"visible":"hidden"})},getSegmentPath:function(a){var b=this,c=[],d=b.options.step;q(a,function(e,f){var g=e.plotX,h=e.plotY,k;b.getPointSpline?c.push.apply(c,b.getPointSpline(a,e,f)):(c.push(f?"L":"M"),d&&f&&(k=a[f-1],"right"===d?c.push(k.plotX,h):"center"===d?c.push((k.plotX+g)/2,k.plotY,(k.plotX+g)/2,h):c.push(g,k.plotY)),c.push(e.plotX,e.plotY))});return c},getGraphPath:function(){var a=this,b= [],c,d=[];q(a.segments,function(e){c=a.getSegmentPath(e);1<e.length?b=b.concat(c):d.push(e[0])});a.singlePoints=d;return a.graphPath=b},drawGraph:function(){var a=this,b=this.options,c=[["graph",b.lineColor||this.color]],d=b.lineWidth,e=b.dashStyle,f=this.getGraphPath(),g=b.negativeColor;g&&c.push(["graphNeg",g]);q(c,function(c,g){var l=c[0],m=a[l];m?(Wa(m),m.animate({d:f})):d&&f.length&&(m={stroke:c[1],"stroke-width":d,zIndex:1},e&&(m.dashstyle=e),a[l]=a.chart.renderer.path(f).attr(m).add(a.group).shadow(!g&& b.shadow))})},clipNeg:function(){var a=this.options,b=this.chart,c=b.renderer,d=a.negativeColor||a.negativeFillColor,e,f=this.graph,g=this.area,h=this.posClip,k=this.negClip;e=b.chartWidth;var l=b.chartHeight,m=u(e,l),n=this.yAxis;d&&(f||g)&&(d=w(n.toPixels(a.threshold||0,!0)),a={x:0,y:0,width:m,height:d},m={x:0,y:d,width:m,height:m},b.inverted&&(a.height=m.y=b.plotWidth-d,c.isVML&&(a={x:b.plotWidth-d-b.plotLeft,y:0,width:e,height:l},m={x:d+b.plotLeft-e,y:0,width:b.plotLeft+d,height:e})),n.reversed? (b=m,e=a):(b=a,e=m),h?(h.animate(b),k.animate(e)):(this.posClip=h=c.clipRect(b),this.negClip=k=c.clipRect(e),f&&this.graphNeg&&(f.clip(h),this.graphNeg.clip(k)),g&&(g.clip(h),this.areaNeg.clip(k))))},invertGroups:function(){function a(){var a={width:b.yAxis.len,height:b.xAxis.len};q(["group","markerGroup"],function(c){b[c]&&b[c].attr(a).invert()})}var b=this,c=b.chart;b.xAxis&&(L(c,"resize",a),L(b,"destroy",function(){da(c,"resize",a)}),a(),b.invertGroups=a)},plotGroup:function(a,b,c,d,e){var f=this[a], g=!f;g&&(this[a]=f=this.chart.renderer.g(b).attr({visibility:c,zIndex:d||0.1}).add(e));f[g?"attr":"animate"](this.getPlotBox());return f},getPlotBox:function(){return{translateX:this.xAxis?this.xAxis.left:this.chart.plotLeft,translateY:this.yAxis?this.yAxis.top:this.chart.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this.chart,b,c=this.options,d=c.animation&&!!this.animate&&a.renderer.isSVG,e=this.visible?"visible":"hidden",f=c.zIndex,g=this.hasRendered,h=a.seriesGroup;b=this.plotGroup("group", "series",e,f,h);this.markerGroup=this.plotGroup("markerGroup","markers",e,f,h);d&&this.animate(!0);this.getAttribs();b.inverted=this.isCartesian?a.inverted:!1;this.drawGraph&&(this.drawGraph(),this.clipNeg());this.drawDataLabels();this.drawPoints();!1!==this.options.enableMouseTracking&&this.drawTracker();a.inverted&&this.invertGroups();!1===c.clip||(this.sharedClipKey||g)||b.clip(a.clipRect);d?this.animate():g||this.afterAnimate();this.isDirty=this.isDirtyData=!1;this.hasRendered=!0},redraw:function(){var a= this.chart,b=this.isDirtyData,c=this.group,d=this.xAxis,e=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:r(d&&d.left,a.plotLeft),translateY:r(e&&e.top,a.plotTop)}));this.translate();this.setTooltipPoints(!0);this.render();b&&K(this,"updatedData")},setState:function(a){var b=this.options,c=this.graph,d=this.graphNeg,e=b.states,b=b.lineWidth;a=a||"";this.state!==a&&(this.state=a,e[a]&&!1===e[a].enabled||(a&&(b=e[a].lineWidth||b+1),c&&!c.dashstyle&&(a= {"stroke-width":b},c.attr(a),d&&d.attr(a))))},setVisible:function(a,b){var c=this,d=c.chart,e=c.legendItem,f,g=d.options.chart.ignoreHiddenSeries,h=c.visible;f=(c.visible=a=c.userOptions.visible=a===y?!h:a)?"show":"hide";q(["group","dataLabelsGroup","markerGroup","tracker"],function(a){if(c[a])c[a][f]()});if(d.hoverSeries===c)c.onMouseOut();e&&d.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&q(d.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});q(c.linkedSeries,function(b){b.setVisible(a, !1)});g&&(d.isDirtyBox=!0);!1!==b&&d.redraw();K(c,f)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=a===y?!this.selected:a;this.checkbox&&(this.checkbox.checked=a);K(this,a?"select":"unselect")},drawTracker:function(){var a=this,b=a.options,c=b.trackByArea,d=[].concat(c?a.areaPath:a.graphPath),e=d.length,f=a.chart,g=f.pointer,h=f.renderer,k=f.options.tooltip.snap,l=a.tracker,m=b.cursor,m=m&&{cursor:m},n=a.singlePoints,p,s=function(){if(f.hoverSeries!== a)a.onMouseOver()};if(e&&!c)for(p=e+1;p--;)"M"===d[p]&&d.splice(p+1,0,d[p+1]-k,d[p+2],"L"),(p&&"M"===d[p]||p===e)&&d.splice(p,0,"L",d[p-2]+k,d[p-1]);for(p=0;p<n.length;p++)e=n[p],d.push("M",e.plotX-k,e.plotY,"L",e.plotX+k,e.plotY);if(l)l.attr({d:d});else if(a.tracker=l=h.path(d).attr({"class":"highcharts-tracker","stroke-linejoin":"round",visibility:a.visible?"visible":"hidden",stroke:$b,fill:c?$b:P,"stroke-width":b.lineWidth+(c?0:2*k),zIndex:2}).addClass("highcharts-tracker").on("mouseover",s).on("mouseout", function(a){g.onTrackerMouseOut(a)}).css(m).add(a.markerGroup),ib)l.on("touchstart",s)}};var ic=ja(T);ba.line=ic;Z.area=A(Xa,{threshold:0});var ob=ja(T,{type:"area",getSegments:function(){var a=[],b=[],c=[],d=this.xAxis,e=this.yAxis,f=e.stacks[this.stackKey],g={},h,k,l=this.points,m,n,p;if(this.options.stacking&&!this.cropped){for(n=0;n<l.length;n++)g[l[n].x]=l[n];for(p in f)c.push(+p);c.sort(function(a,b){return a-b});q(c,function(a){g[a]?b.push(g[a]):(h=d.translate(a),m=f[a].percent?f[a].total? 100*f[a].cum/f[a].total:0:f[a].cum,k=e.toPixels(m,!0),b.push({y:null,plotX:h,clientX:h,plotY:k,yBottom:k,onMouseOver:ya}))});b.length&&a.push(b)}else T.prototype.getSegments.call(this),a=this.segments;this.segments=a},getSegmentPath:function(a){var b=T.prototype.getSegmentPath.call(this,a),c=[].concat(b),d,e=this.options;3===b.length&&c.push("L",b[1],b[2]);if(e.stacking&&!this.closedStacks)for(d=a.length-1;0<=d;d--)d<a.length-1&&e.step&&c.push(a[d+1].plotX,a[d].yBottom),c.push(a[d].plotX,a[d].yBottom); else this.closeSegment(c,a);this.areaPath=this.areaPath.concat(c);return b},closeSegment:function(a,b){var c=this.yAxis.getThreshold(this.options.threshold);a.push("L",b[b.length-1].plotX,c,"L",b[0].plotX,c)},drawGraph:function(){this.areaPath=[];T.prototype.drawGraph.apply(this);var a=this,b=this.areaPath,c=this.options,d=c.negativeColor,e=c.negativeFillColor,f=[["area",this.color,c.fillColor]];(d||e)&&f.push(["areaNeg",d,e]);q(f,function(d){var e=d[0],f=a[e];f?f.animate({d:b}):a[e]=a.chart.renderer.path(b).attr({fill:r(d[2], pa(d[1]).setOpacity(r(c.fillOpacity,0.75)).get()),zIndex:0}).add(a.group)})},drawLegendSymbol:function(a,b){b.legendSymbol=this.chart.renderer.rect(0,a.baseline-11,a.options.symbolWidth,12,2).attr({zIndex:3}).add(b.legendGroup)}});ba.area=ob;Z.spline=A(Xa);var dc=ja(T,{type:"spline",getPointSpline:function(a,b,c){var d=b.plotX,e=b.plotY,f=a[c-1],g=a[c+1],h,k,l,m;if(f&&g){a=f.plotY;l=g.plotX;var g=g.plotY,n;h=(1.5*d+f.plotX)/2.5;k=(1.5*e+a)/2.5;l=(1.5*d+l)/2.5;m=(1.5*e+g)/2.5;n=(m-k)*(l-d)/(l-h)+e- m;k+=n;m+=n;k>a&&k>e?(k=u(a,e),m=2*e-k):k<a&&k<e&&(k=O(a,e),m=2*e-k);m>g&&m>e?(m=u(g,e),k=2*e-m):m<g&&m<e&&(m=O(g,e),k=2*e-m);b.rightContX=l;b.rightContY=m}c?(b=["C",f.rightContX||f.plotX,f.rightContY||f.plotY,h||d,k||e,d,e],f.rightContX=f.rightContY=null):b=["M",d,e];return b}});ba.spline=dc;Z.areaspline=A(Z.area);var pb=ob.prototype,jc=ja(dc,{type:"areaspline",closedStacks:!0,getSegmentPath:pb.getSegmentPath,closeSegment:pb.closeSegment,drawGraph:pb.drawGraph,drawLegendSymbol:pb.drawLegendSymbol}); ba.areaspline=jc;Z.column=A(Xa,{borderColor:"#FFFFFF",borderWidth:1,borderRadius:0,groupPadding:0.2,marker:null,pointPadding:0.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{brightness:0.1,shadow:!1},select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}},dataLabels:{align:null,verticalAlign:null,y:null},stickyTracking:!1,threshold:0});var qb=ja(T,{type:"column",tooltipOutsidePlot:!0,pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color",r:"borderRadius"}, trackerGroups:["group","dataLabelsGroup"],init:function(){T.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasRendered&&q(b.series,function(b){b.type===a.type&&(b.isDirty=!0)})},getColumnMetrics:function(){var a=this,b=a.options,c=a.xAxis,d=a.yAxis,e=c.reversed,f,g={},h,k=0;!1===b.grouping?k=1:q(a.chart.series,function(b){var c=b.options,e=b.yAxis;b.type===a.type&&(b.visible&&d.len===e.len&&d.pos===e.pos)&&(c.stacking?(f=b.stackKey,g[f]===y&&(g[f]=k++),h=g[f]):!1!==c.grouping&&(h=k++), b.columnIndex=h)});var c=O(S(c.transA)*(c.ordinalSlope||b.pointRange||c.closestPointRange||1),c.len),l=c*b.groupPadding,m=(c-2*l)/k,n=b.pointWidth,b=v(n)?(m-n)/2:m*b.pointPadding,n=r(n,m-2*b);return a.columnMetrics={width:n,offset:b+(l+((e?k-(a.columnIndex||0):a.columnIndex)||0)*m-c/2)*(e?-1:1)}},translate:function(){var a=this.chart,b=this.options,c=b.borderWidth,d=this.yAxis,e=this.translatedThreshold=d.getThreshold(b.threshold),f=r(b.minPointLength,5),b=this.getColumnMetrics(),g=b.width,h=this.barW= ma(u(g,1+2*c)),k=this.pointXOffset=b.offset;T.prototype.translate.apply(this);q(this.points,function(b){var m=O(u(-999,b.plotY),d.len+999),n=r(b.yBottom,e),p=b.plotX+k,q=ma(O(m,n)),m=ma(u(m,n)-q);S(m)<f&&f&&(m=f,q=w(S(q-e)>f?n-f:e-(d.translate(b.y,0,1,0,1)<=e?f:0)));b.barX=p;b.pointWidth=g;b.shapeType="rect";b.shapeArgs=b=a.renderer.Element.prototype.crisp.call(0,c,p,q,h,m);c%2&&(b.y-=1,b.height+=1)})},getSymbol:ya,drawLegendSymbol:ob.prototype.drawLegendSymbol,drawGraph:ya,drawPoints:function(){var a= this,b=a.options,c=a.chart.renderer,d;q(a.points,function(e){var f=e.plotY,g=e.graphic;f===y||isNaN(f)||null===e.y?g&&(e.graphic=g.destroy()):(d=e.shapeArgs,g?(Wa(g),g.animate(A(d))):e.graphic=c[e.shapeType](d).attr(e.pointAttr[e.selected?"select":""]).add(a.group).shadow(b.shadow,null,b.stacking&&!b.borderRadius))})},drawTracker:function(){var a=this,b=a.chart,c=b.pointer,d=a.options.cursor,e=d&&{cursor:d},f=function(c){var d=c.target,e;if(b.hoverSeries!==a)a.onMouseOver();for(;d&&!e;)e=d.point, d=d.parentNode;if(e!==y&&e!==b.hoverPoint)e.onMouseOver(c)};q(a.points,function(a){a.graphic&&(a.graphic.element.point=a);a.dataLabel&&(a.dataLabel.element.point=a)});a._hasTracking?a._hasTracking=!0:q(a.trackerGroups,function(b){if(a[b]&&(a[b].addClass("highcharts-tracker").on("mouseover",f).on("mouseout",function(a){c.onTrackerMouseOut(a)}).css(e),ib))a[b].on("touchstart",f)})},alignDataLabel:function(a,b,c,d,e){var f=this.chart,g=f.inverted,h=a.dlBox||a.shapeArgs,k=a.below||a.plotY>r(this.translatedThreshold, f.plotSizeY),l=r(c.inside,!!this.options.stacking);h&&(d=A(h),g&&(d={x:f.plotWidth-d.y-d.height,y:f.plotHeight-d.x-d.width,width:d.height,height:d.width}),l||(g?(d.x+=k?0:d.width,d.width=0):(d.y+=k?d.height:0,d.height=0)));c.align=r(c.align,!g||l?"center":k?"right":"left");c.verticalAlign=r(c.verticalAlign,g||l?"middle":k?"top":"bottom");T.prototype.alignDataLabel.call(this,a,b,c,d,e)},animate:function(a){var b=this.yAxis,c=this.options,d=this.chart.inverted,e={};$&&(a?(e.scaleY=0.001,a=O(b.pos+b.len, u(b.pos,b.toPixels(c.threshold))),d?e.translateX=a-b.len:e.translateY=a,this.group.attr(e)):(e.scaleY=1,e[d?"translateX":"translateY"]=b.pos,this.group.animate(e,this.options.animation),this.animate=null))},remove:function(){var a=this,b=a.chart;b.hasRendered&&q(b.series,function(b){b.type===a.type&&(b.isDirty=!0)});T.prototype.remove.apply(a,arguments)}});ba.column=qb;Z.bar=A(Z.column);var kc=ja(qb,{type:"bar",inverted:!0});ba.bar=kc;Z.scatter=A(Xa,{lineWidth:0,tooltip:{headerFormat:'<span style="font-size: 10px; color:{series.color}">{series.name}</span><br/>', pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>",followPointer:!0},stickyTracking:!1});var lc=ja(T,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["markerGroup"],drawTracker:qb.prototype.drawTracker,setTooltipPoints:ya});ba.scatter=lc;Z.pie=A(Xa,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name}},ignoreHiddenPoint:!0,legendType:"point",marker:null, size:null,showInLegend:!1,slicedOffset:10,states:{hover:{brightness:0.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}});var Kb={type:"pie",isCartesian:!1,pointClass:ja(Pa,{init:function(){Pa.prototype.init.apply(this,arguments);var a=this,b;0>a.y&&(a.y=null);x(a,{visible:!1!==a.visible,name:r(a.name,"Slice")});b=function(b){a.slice("select"===b.type)};L(a,"select",b);L(a,"unselect",b);return a},setVisible:function(a){var b=this,c=b.series,d=c.chart,e;b.visible=b.options.visible=a=a===y? !b.visible:a;c.options.data[oa(b,c.data)]=b.options;e=a?"show":"hide";q(["graphic","dataLabel","connector","shadowGroup"],function(a){if(b[a])b[a][e]()});b.legendItem&&d.legend.colorizeItem(b,a);!c.isDirty&&c.options.ignoreHiddenPoint&&(c.isDirty=!0,d.redraw())},slice:function(a,b,c){var d=this.series;Ka(c,d.chart);r(b,!0);this.sliced=this.options.sliced=a=v(a)?a:!this.sliced;d.options.data[oa(this,d.data)]=this.options;a=a?this.slicedTranslation:{translateX:0,translateY:0};this.graphic.animate(a); this.shadowGroup&&this.shadowGroup.animate(a)}}),requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:ya,animate:function(a){var b=this,c=b.points,d=b.startAngleRad;a||(q(c,function(a){var c=a.graphic;a=a.shapeArgs;c&&(c.attr({r:b.center[3]/2,start:d,end:d}),c.animate({r:a.r,start:a.start,end:a.end},b.options.animation))}),b.animate=null)},setData:function(a,b){T.prototype.setData.call(this, a,!1);this.processData();this.generatePoints();r(b,!0)&&this.chart.redraw()},generatePoints:function(){var a,b=0,c,d,e,f=this.options.ignoreHiddenPoint;T.prototype.generatePoints.call(this);c=this.points;d=c.length;for(a=0;a<d;a++)e=c[a],b+=f&&!e.visible?0:e.y;this.total=b;for(a=0;a<d;a++)e=c[a],e.percentage=100*(e.y/b),e.total=b},getCenter:function(){var a=this.options,b=this.chart,c=2*(a.slicedOffset||0),d,e=b.plotWidth-2*c,f=b.plotHeight-2*c,b=a.center,a=[r(b[0],"50%"),r(b[1],"50%"),a.size||"100%", a.innerSize||0],g=O(e,f),h;return Na(a,function(a,b){h=/%$/.test(a);d=2>b||2===b&&h;return(h?[e,f,g,g][b]*D(a)/100:a)+(d?c:0)})},translate:function(a){this.generatePoints();var b=0,c=this.options,d=c.slicedOffset,e=d+c.borderWidth,f,g,h,k=this.startAngleRad=Ma/180*((c.startAngle||0)%360-90),l=this.points,m=2*Ma,n=c.dataLabels.distance,c=c.ignoreHiddenPoint,p,q=l.length,r;a||(this.center=a=this.getCenter());this.getX=function(b,c){h=R.asin((b-a[1])/(a[2]/2+n));return a[0]+(c?-1:1)*Y(h)*(a[2]/2+n)}; for(p=0;p<q;p++){r=l[p];f=w(1E3*(k+b*m))/1E3;if(!c||r.visible)b+=r.percentage/100;g=w(1E3*(k+b*m))/1E3;r.shapeType="arc";r.shapeArgs={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:f,end:g};h=(g+f)/2;h>0.75*m&&(h-=2*Ma);r.slicedTranslation={translateX:w(Y(h)*d),translateY:w(ea(h)*d)};f=Y(h)*a[2]/2;g=ea(h)*a[2]/2;r.tooltipPos=[a[0]+0.7*f,a[1]+0.7*g];r.half=h<m/4?0:1;r.angle=h;e=O(e,n/2);r.labelPos=[a[0]+f+Y(h)*n,a[1]+g+ea(h)*n,a[0]+f+Y(h)*e,a[1]+g+ea(h)*e,a[0]+f,a[1]+g,0>n?"center":r.half?"right":"left", h]}this.setTooltipPoints()},drawGraph:null,drawPoints:function(){var a=this,b=a.chart.renderer,c,d,e=a.options.shadow,f,g;e&&!a.shadowGroup&&(a.shadowGroup=b.g("shadow").add(a.group));q(a.points,function(h){d=h.graphic;g=h.shapeArgs;f=h.shadowGroup;e&&!f&&(f=h.shadowGroup=b.g("shadow").add(a.shadowGroup));c=h.sliced?h.slicedTranslation:{translateX:0,translateY:0};f&&f.attr(c);d?d.animate(x(g,c)):h.graphic=d=b.arc(g).setRadialReference(a.center).attr(h.pointAttr[h.selected?"select":""]).attr({"stroke-linejoin":"round"}).attr(c).add(a.group).shadow(e, f);!1===h.visible&&h.setVisible(!1)})},drawDataLabels:function(){var a=this,b=a.data,c,d=a.chart,e=a.options.dataLabels,f=r(e.connectorPadding,10),g=r(e.connectorWidth,1),h=d.plotWidth,d=d.plotHeight,k,l,m=r(e.softConnector,!0),n=e.distance,p=a.center,s=p[2]/2,t=p[1],x=0<n,v,z,y,A,D=[[],[]],B,I,H,J,C,E=[0,0,0,0],K=function(a,b){return b.y-a.y},O=function(a,b){a.sort(function(a,c){return void 0!==a.angle&&(c.angle-a.angle)*b})};if(a.visible&&(e.enabled||a._hasPointLabels)){T.prototype.drawDataLabels.apply(a); q(b,function(a){a.dataLabel&&D[a.half].push(a)});for(J=0;!A&&b[J];)A=b[J]&&b[J].dataLabel&&(b[J].dataLabel.getBBox().height||21),J++;for(J=2;J--;){var b=[],M=[],L=D[J],N=L.length,G;O(L,J-0.5);if(0<n){for(C=t-s-n;C<=t+s+n;C+=A)b.push(C);z=b.length;if(N>z){c=[].concat(L);c.sort(K);for(C=N;C--;)c[C].rank=C;for(C=N;C--;)L[C].rank>=z&&L.splice(C,1);N=L.length}for(C=0;C<N;C++){c=L[C];y=c.labelPos;c=9999;var R,P;for(P=0;P<z;P++)R=S(b[P]-y[1]),R<c&&(c=R,G=P);if(G<C&&null!==b[C])G=C;else for(z<N-C+G&&null!== b[C]&&(G=z-N+C);null===b[G];)G++;M.push({i:G,y:b[G]});b[G]=null}M.sort(K)}for(C=0;C<N;C++){c=L[C];y=c.labelPos;v=c.dataLabel;H=!1===c.visible?"hidden":"visible";c=y[1];if(0<n){if(z=M.pop(),G=z.i,I=z.y,c>I&&null!==b[G+1]||c<I&&null!==b[G-1])I=c}else I=c;B=e.justify?p[0]+(J?-1:1)*(s+n):a.getX(0===G||G===b.length-1?c:I,J);v._attr={visibility:H,align:y[6]};v._pos={x:B+e.x+({left:f,right:-f}[y[6]]||0),y:I+e.y-10};v.connX=B;v.connY=I;null===this.options.size&&(z=v.width,B-z<f?E[3]=u(w(z-B+f),E[3]):B+z> h-f&&(E[1]=u(w(B+z-h+f),E[1])),0>I-A/2?E[0]=u(w(-I+A/2),E[0]):I+A/2>d&&(E[2]=u(w(I+A/2-d),E[2])))}}if(0===ua(E)||this.verifyDataLabelOverflow(E))this.placeDataLabels(),x&&g&&q(this.points,function(b){k=b.connector;y=b.labelPos;(v=b.dataLabel)&&v._pos?(H=v._attr.visibility,B=v.connX,I=v.connY,l=m?["M",B+("left"===y[6]?5:-5),I,"C",B,I,2*y[2]-y[4],2*y[3]-y[5],y[2],y[3],"L",y[4],y[5]]:["M",B+("left"===y[6]?5:-5),I,"L",y[2],y[3],"L",y[4],y[5]],k?(k.animate({d:l}),k.attr("visibility",H)):b.connector=k= a.chart.renderer.path(l).attr({"stroke-width":g,stroke:e.connectorColor||b.color||"#606060",visibility:H}).add(a.group)):k&&(b.connector=k.destroy())})}},verifyDataLabelOverflow:function(a){var b=this.center,c=this.options,d=c.center,e=c=c.minSize||80,f;null!==d[0]?e=u(b[2]-u(a[1],a[3]),c):(e=u(b[2]-a[1]-a[3],c),b[0]+=(a[3]-a[1])/2);null!==d[1]?e=u(O(e,b[2]-u(a[0],a[2])),c):(e=u(O(e,b[2]-a[0]-a[2]),c),b[1]+=(a[0]-a[2])/2);e<b[2]?(b[2]=e,this.translate(b),q(this.points,function(a){a.dataLabel&&(a.dataLabel._pos= null)}),this.drawDataLabels()):f=!0;return f},placeDataLabels:function(){q(this.points,function(a){a=a.dataLabel;var b;a&&((b=a._pos)?(a.attr(a._attr),a[a.moved?"animate":"attr"](b),a.moved=!0):a&&a.attr({y:-999}))})},alignDataLabel:ya,drawTracker:qb.prototype.drawTracker,drawLegendSymbol:ob.prototype.drawLegendSymbol,getSymbol:ya},Kb=ja(T,Kb);ba.pie=Kb;x(Highcharts,{Axis:eb,Chart:Db,Color:pa,Legend:Cb,Pointer:Bb,Point:Pa,Tick:La,Tooltip:Ab,Renderer:Va,Series:T,SVGElement:wa,SVGRenderer:Ga,arrayMin:Ia, arrayMax:ua,charts:Fa,dateFormat:Ya,format:Ba,pathAnim:Fb,getOptions:function(){return G},hasBidiBug:ec,isTouchDevice:Yb,numberFormat:za,seriesTypes:ba,setOptions:function(a){G=A(G,a);Vb();return G},addEvent:L,removeEvent:da,createElement:W,discardElement:Ta,css:M,each:q,extend:x,map:Na,merge:A,pick:r,splat:ka,extendClass:ja,pInt:D,wrap:Lb,svg:$,canvas:aa,vml:!$&&!aa,product:"Highcharts",version:"3.0.4"})})();
?>
Онлайн: 3
Реклама