mirror of https://github.com/status-im/consul.git
5 lines
137 KiB
JavaScript
5 lines
137 KiB
JavaScript
!function(){function t(t,e){var n;t||(t={});for(n in e)t[n]=e[n];return t}function e(){var t,e=arguments.length,n={},i=function(t,e){var n,r;"object"!=typeof t&&(t={});for(r in e)e.hasOwnProperty(r)&&(n=e[r],t[r]=n&&"object"==typeof n&&"[object Array]"!==Object.prototype.toString.call(n)&&"number"!=typeof n.nodeType?i(t[r]||{},n):e[r]);return t};for(t=0;e>t;t++)n=i(n,arguments[t]);return n}function n(t,e){return parseInt(t,e||10)}function i(t){return"string"==typeof t}function r(t){return"object"==typeof t}function o(t){return"[object Array]"===Object.prototype.toString.call(t)}function s(t){return"number"==typeof t}function a(t){return de.log(t)/de.LN10}function l(t){return de.pow(10,t)}function h(t,e){for(var n=t.length;n--;)if(t[n]===e){t.splice(n,1);break}}function u(t){return t!==X&&null!==t}function c(t,e,n){var o,s;if(i(e))u(n)?t.setAttribute(e,n):t&&t.getAttribute&&(s=t.getAttribute(e));else if(u(e)&&r(e))for(o in e)t.setAttribute(o,e[o]);return s}function d(t){return o(t)?t:[t]}function f(){var t,e,n=arguments,i=n.length;for(t=0;i>t;t++)if(e=n[t],"undefined"!=typeof e&&null!==e)return e}function p(e,n){Me&&n&&n.opacity!==X&&(n.filter="alpha(opacity="+100*n.opacity+")"),t(e.style,n)}function g(e,n,i,r,o){return e=ue.createElement(e),n&&t(e,n),o&&p(e,{padding:0,border:Fe,margin:0}),i&&p(e,i),r&&r.appendChild(e),e}function m(e,n){var i=function(){};return i.prototype=new e,t(i.prototype,n),i}function v(t,e,i,r){var o=q.lang,t=+t||0,s=-1===e?(t.toString().split(".")[1]||"").length:isNaN(e=ye(e))?2:e,e=void 0===i?o.decimalPoint:i,r=void 0===r?o.thousandsSep:r,o=0>t?"-":"",i=String(n(t=ye(t).toFixed(s))),a=i.length>3?i.length%3:0;return o+(a?i.substr(0,a)+r:"")+i.substr(a).replace(/(\d{3})(?=\d)/g,"$1"+r)+(s?e+ye(t-i).toFixed(s).slice(2):"")}function y(t,e){return Array((e||2)+1-String(t).length).join(0)+t}function x(t,e,n){var i=t[e];t[e]=function(){var t=Array.prototype.slice.call(arguments);return t.unshift(i),n.apply(this,t)}}function b(t,e){for(var n,i,r,o,s,a="{",l=!1,h=[];-1!==(a=t.indexOf(a));){if(n=t.slice(0,a),l){for(i=n.split(":"),r=i.shift().split("."),s=r.length,n=e,o=0;s>o;o++)n=n[r[o]];i.length&&(i=i.join(":"),r=/\.([0-9])/,o=q.lang,s=void 0,/f$/.test(i)?(s=(s=i.match(r))?s[1]:-1,n=v(n,s,o.decimalPoint,i.indexOf(",")>-1?o.thousandsSep:"")):n=U(i,n))}h.push(n),t=t.slice(a+1),a=(l=!l)?"}":"{"}return h.push(t),h.join("")}function w(t){return de.pow(10,pe(de.log(t)/de.LN10))}function k(t,e,n,i){var r,n=f(n,1);for(r=t/n,e||(e=[1,2,2.5,5,10],i&&i.allowDecimals===!1&&(1===n?e=[1,2,5,10]:.1>=n&&(e=[1/n]))),i=0;i<e.length&&(t=e[i],!(r<=(e[i]+(e[i+1]||e[i]))/2));i++);return t*=n}function S(t,e){var n,i=e||[[We,[1,2,5,10,20,25,50,100,200,500]],[$e,[1,2,5,10,15,30]],[Xe,[1,2,5,10,15,30]],[Ye,[1,2,3,4,6,8,12]],[Ge,[1,2]],[qe,[1,2]],[Ue,[1,2,3,4,6]],[Ve,null]],r=i[i.length-1],o=K[r[0]],s=r[1];for(n=0;n<i.length&&(r=i[n],o=K[r[0]],s=r[1],!(i[n+1]&&t<=(o*s[s.length-1]+K[i[n+1][0]])/2));n++);return o===K[Ve]&&5*o>t&&(s=[1,2,5]),i=k(t/o,s,r[0]===Ve?w(t/o):1),{unitRange:o,count:i,unitName:r[0]}}function C(e,n,i,r){var o,s=[],a={},l=q.global.useUTC,h=new Date(n),c=e.unitRange,d=e.count;if(u(n)){c>=K[$e]&&(h.setMilliseconds(0),h.setSeconds(c>=K[Xe]?0:d*pe(h.getSeconds()/d))),c>=K[Xe]&&h[oe](c>=K[Ye]?0:d*pe(h[J]()/d)),c>=K[Ye]&&h[se](c>=K[Ge]?0:d*pe(h[te]()/d)),c>=K[Ge]&&h[ae](c>=K[Ue]?1:d*pe(h[ne]()/d)),c>=K[Ue]&&(h[le](c>=K[Ve]?0:d*pe(h[ie]()/d)),o=h[re]()),c>=K[Ve]&&(o-=o%d,h[he](o)),c===K[qe]&&h[ae](h[ne]()-h[ee]()+f(r,1)),n=1,o=h[re]();for(var r=h.getTime(),p=h[ie](),g=h[ne](),m=l?0:(864e5+6e4*h.getTimezoneOffset())%864e5;i>r;)s.push(r),c===K[Ve]?r=Q(o+n*d,0):c===K[Ue]?r=Q(o,p+n*d):l||c!==K[Ge]&&c!==K[qe]?r+=c*d:r=Q(o,p,g+n*d*(c===K[Ge]?1:7)),n++;s.push(r),rn(on(s,function(t){return c<=K[Ye]&&t%K[Ge]===m}),function(t){a[t]=Ge})}return s.info=t(e,{higherRanks:a,totalRange:c*d}),s}function M(){this.symbol=this.color=0}function T(t,e){var n,i,r=t.length;for(i=0;r>i;i++)t[i].ss_i=i;for(t.sort(function(t,i){return n=e(t,i),0===n?t.ss_i-i.ss_i:n}),i=0;r>i;i++)delete t[i].ss_i}function A(t){for(var e=t.length,n=t[0];e--;)t[e]<n&&(n=t[e]);return n}function L(t){for(var e=t.length,n=t[0];e--;)t[e]>n&&(n=t[e]);return n}function P(t,e){for(var n in t)t[n]&&t[n]!==e&&t[n].destroy&&t[n].destroy(),delete t[n]}function E(t){G||(G=g(Be)),t&&G.appendChild(t),G.innerHTML=""}function _(t,e){var n="Highcharts error #"+t+": www.highcharts.com/errors/"+t;if(e)throw n;ce.console&&console.log(n)}function N(t){return parseFloat(t.toPrecision(14))}function D(t,e){V=f(t,e.animation)}function R(){var t=q.global.useUTC,e=t?"getUTC":"get",n=t?"setUTC":"set";Q=t?Date.UTC:function(t,e,n,i,r,o){return new Date(t,e,f(n,1),f(i,0),f(r,0),f(o,0)).getTime()},J=e+"Minutes",te=e+"Hours",ee=e+"Day",ne=e+"Date",ie=e+"Month",re=e+"FullYear",oe=n+"Minutes",se=n+"Hours",ae=n+"Date",le=n+"Month",he=n+"FullYear"}function z(){}function O(t,e,n,i){this.axis=t,this.pos=e,this.type=n||"",this.isNew=!0,!n&&!i&&this.addLabel()}function I(t,e){this.axis=t,e&&(this.options=e,this.id=e.id)}function H(t,e,n,i,r,o){var s=t.chart.inverted;this.axis=t,this.isNegative=n,this.options=e,this.x=i,this.total=null,this.points={},this.stack=r,this.percent="percent"===o,this.alignOptions={align:e.align||(s?n?"left":"right":"center"),verticalAlign:e.verticalAlign||(s?"middle":n?"bottom":"top"),y:f(e.y,s?4:n?14:-6),x:f(e.x,s?n?-6:6:0)},this.textAlign=e.textAlign||(s?n?"right":"left":"center")}function B(){this.init.apply(this,arguments)}function F(){this.init.apply(this,arguments)}function j(t,e){this.init(t,e)}function W(t,e){this.init(t,e)}function $(){this.init.apply(this,arguments)}var X,Y,G,q,U,V,Z,K,Q,J,te,ee,ne,ie,re,oe,se,ae,le,he,ue=document,ce=window,de=Math,fe=de.round,pe=de.floor,ge=de.ceil,me=de.max,ve=de.min,ye=de.abs,xe=de.cos,be=de.sin,we=de.PI,ke=2*we/360,Se=navigator.userAgent,Ce=ce.opera,Me=/msie/i.test(Se)&&!Ce,Te=8===ue.documentMode,Ae=/AppleWebKit/.test(Se),Le=/Firefox/.test(Se),Pe=/(Mobile|Android|Windows Phone)/.test(Se),Ee="http://www.w3.org/2000/svg",_e=!!ue.createElementNS&&!!ue.createElementNS(Ee,"svg").createSVGRect,Ne=Le&&parseInt(Se.split("Firefox/")[1],10)<4,De=!_e&&!Me&&!!ue.createElement("canvas").getContext,Re=ue.documentElement.ontouchstart!==X,ze={},Oe=0,Ie=function(){},He=[],Be="div",Fe="none",je="rgba(192,192,192,"+(_e?1e-4:.002)+")",We="millisecond",$e="second",Xe="minute",Ye="hour",Ge="day",qe="week",Ue="month",Ve="year",Ze="stroke-width",Ke={};ce.Highcharts=ce.Highcharts?_(16,!0):{},U=function(e,n,i){if(!u(n)||isNaN(n))return"Invalid date";var r,e=f(e,"%Y-%m-%d %H:%M:%S"),o=new Date(n),s=o[te](),a=o[ee](),l=o[ne](),h=o[ie](),c=o[re](),d=q.lang,p=d.weekdays,o=t({a:p[a].substr(0,3),A:p[a],d:y(l),e:l,b:d.shortMonths[h],B:d.months[h],m:y(h+1),y:c.toString().substr(2,2),Y:c,H:y(s),I:y(s%12||12),l:s%12||12,M:y(o[J]()),p:12>s?"AM":"PM",P:12>s?"am":"pm",S:y(o.getSeconds()),L:y(fe(n%1e3),3)},Highcharts.dateFormats);for(r in o)for(;-1!==e.indexOf("%"+r);)e=e.replace("%"+r,"function"==typeof o[r]?o[r](n):o[r]);return i?e.substr(0,1).toUpperCase()+e.substr(1):e},M.prototype={wrapColor:function(t){this.color>=t&&(this.color=0)},wrapSymbol:function(t){this.symbol>=t&&(this.symbol=0)}},K=function(){for(var t=0,e=arguments,n=e.length,i={};n>t;t++)i[e[t++]]=e[t];return i}(We,1,$e,1e3,Xe,6e4,Ye,36e5,Ge,864e5,qe,6048e5,Ue,26784e5,Ve,31556952e3),Z={init:function(t,e,n){var i,r,o,e=e||"",s=t.shift,a=e.indexOf("C")>-1,l=a?7:3,e=e.split(" "),n=[].concat(n),h=function(t){for(i=t.length;i--;)"M"===t[i]&&t.splice(i+1,0,t[i+1],t[i+2],t[i+1],t[i+2])};if(a&&(h(e),h(n)),t.isArea&&(r=e.splice(e.length-6,6),o=n.splice(n.length-6,6)),s<=n.length/l&&e.length===n.length)for(;s--;)n=[].concat(n).splice(0,l).concat(n);if(t.shift=0,e.length)for(t=n.length;e.length<t;)s=[].concat(e).splice(e.length-l,l),a&&(s[l-6]=s[l-2],s[l-5]=s[l-1]),e=e.concat(s);return r&&(e=e.concat(r),n=n.concat(o)),[e,n]},step:function(t,e,n,i){var r=[],o=t.length;if(1===n)r=i;else if(o===e.length&&1>n)for(;o--;)i=parseFloat(t[o]),r[o]=isNaN(i)?t[o]:n*parseFloat(e[o]-i)+i;else r=e;return r}},function(e){ce.HighchartsAdapter=ce.HighchartsAdapter||e&&{init:function(t){var n,r=e.fx,o=r.step,s=e.Tween,a=s&&s.propHooks;n=e.cssHooks.opacity,e.extend(e.easing,{easeOutQuad:function(t,e,n,i,r){return-i*(e/=r)*(e-2)+n}}),e.each(["cur","_default","width","height","opacity"],function(t,e){var n,i,l=o;"cur"===e?l=r.prototype:"_default"===e&&s&&(l=a[e],e="set"),(n=l[e])&&(l[e]=function(r){return r=t?r:this,"align"!==r.prop?(i=r.elem,i.attr?i.attr(r.prop,"cur"===e?X:r.now):n.apply(this,arguments)):void 0})}),x(n,"get",function(t,e,n){return e.attr?e.opacity||0:t.call(this,e,n)}),n=function(e){var n,i=e.elem;e.started||(n=t.init(i,i.d,i.toD),e.start=n[0],e.end=n[1],e.started=!0),i.attr("d",t.step(e.start,e.end,e.pos,i.toD))},s?a.d={set:n}:o.d=n,this.each=Array.prototype.forEach?function(t,e){return Array.prototype.forEach.call(t,e)}:function(t,e){for(var n=0,i=t.length;i>n;n++)if(e.call(t[n],t[n],n,t)===!1)return n},e.fn.highcharts=function(){var t,e,n="Chart",r=arguments;return i(r[0])&&(n=r[0],r=Array.prototype.slice.call(r,1)),t=r[0],t!==X&&(t.chart=t.chart||{},t.chart.renderTo=this[0],new Highcharts[n](t,r[1]),e=this),t===X&&(e=He[c(this[0],"data-highcharts-chart")]),e}},getScript:e.getScript,inArray:e.inArray,adapterRun:function(t,n){return e(t)[n]()},grep:e.grep,map:function(t,e){for(var n=[],i=0,r=t.length;r>i;i++)n[i]=e.call(t[i],t[i],i,t);return n},offset:function(t){return e(t).offset()},addEvent:function(t,n,i){e(t).bind(n,i)},removeEvent:function(t,n,i){var r=ue.removeEventListener?"removeEventListener":"detachEvent";ue[r]&&t&&!t[r]&&(t[r]=function(){}),e(t).unbind(n,i)},fireEvent:function(n,i,r,o){var s,a=e.Event(i),l="detached"+i;!Me&&r&&(delete r.layerX,delete r.layerY),t(a,r),n[i]&&(n[l]=n[i],n[i]=null),e.each(["preventDefault","stopPropagation"],function(t,e){var n=a[e];a[e]=function(){try{n.call(a)}catch(t){"preventDefault"===e&&(s=!0)}}}),e(n).trigger(a),n[l]&&(n[i]=n[l],n[l]=null),o&&!a.isDefaultPrevented()&&!s&&o(a)},washMouseEvent:function(t){var e=t.originalEvent||t;return e.pageX===X&&(e.pageX=t.pageX,e.pageY=t.pageY),e},animate:function(t,n,i){var r=e(t);t.style||(t.style={}),n.d&&(t.toD=n.d,n.d=1),r.stop(),n.opacity!==X&&t.attr&&(n.opacity+="px"),r.animate(n,i)},stop:function(t){e(t).stop()}}}(ce.jQuery);var Qe=ce.HighchartsAdapter,Je=Qe||{};Qe&&Qe.init.call(Qe,Z);var tn=Je.adapterRun,en=Je.getScript,nn=Je.inArray,rn=Je.each,on=Je.grep,sn=Je.offset,an=Je.map,ln=Je.addEvent,hn=Je.removeEvent,un=Je.fireEvent,cn=Je.washMouseEvent,dn=Je.animate,fn=Je.stop,Je={enabled:!0,x:0,y:15,style:{color:"#666",cursor:"default",fontSize:"11px",lineHeight:"14px"}};q={colors:"#2f7ed8,#0d233a,#8bbc21,#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:"k,M,G,T,P,E".split(","),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:!0,canvasToolsURL:"http://code.highcharts.com/3.0.6/modules/canvas-tools.js",VMLRadialGradientURL:"http://code.highcharts.com/3.0.6/gfx/vml-radial-gradient.png"},chart:{borderColor:"#4572A7",borderRadius:5,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',fontSize:"12px"},backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0",resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}}},title:{text:"Chart title",align:"center",margin:15,style:{color:"#274b6d",fontSize:"16px"}},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:e(Je,{align:"center",enabled:!1,formatter:function(){return null===this.y?"":v(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:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:_e,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:Pe?25:10,style:{color:"#333333",cursor:"default",fontSize:"12px",padding:"8px",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"9px"}}};var pn=q.plotOptions,Qe=pn.line;R();var gn=function(t){var i,r,o=[];return function(t){t&&t.stops?r=an(t.stops,function(t){return gn(t[1])}):(i=/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(t))?o=[n(i[1]),n(i[2]),n(i[3]),parseFloat(i[4],10)]:(i=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(t))?o=[n(i[1],16),n(i[2],16),n(i[3],16),1]:(i=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(t))&&(o=[n(i[1]),n(i[2]),n(i[3]),1])}(t),{get:function(n){var i;return r?(i=e(t),i.stops=[].concat(i.stops),rn(r,function(t,e){i.stops[e]=[i.stops[e][0],t.get(n)]})):i=o&&!isNaN(o[0])?"rgb"===n?"rgb("+o[0]+","+o[1]+","+o[2]+")":"a"===n?o[3]:"rgba("+o.join(",")+")":t,i},brighten:function(t){if(r)rn(r,function(e){e.brighten(t)});else if(s(t)&&0!==t){var e;for(e=0;3>e;e++)o[e]+=n(255*t),o[e]<0&&(o[e]=0),o[e]>255&&(o[e]=255)}return this},rgba:o,setOpacity:function(t){return o[3]=t,this}}};z.prototype={init:function(t,e){this.element="span"===e?g(e):ue.createElementNS(Ee,e),this.renderer=t,this.attrSetters={}},opacity:1,animate:function(t,n,i){n=f(n,V,!0),fn(this),n?(n=e(n),i&&(n.complete=i),dn(this,t,n)):(this.attr(t),i&&i())},attr:function(t,e){var r,o,s,a,l,h,d,p=this.element,g=p.nodeName.toLowerCase(),m=this.renderer,v=this.attrSetters,y=this.shadows,x=this;if(i(t)&&u(e)&&(r=t,t={},t[r]=e),i(t))r=t,"circle"===g?r={x:"cx",y:"cy"}[r]||r:"strokeWidth"===r&&(r="stroke-width"),x=c(p,r)||this[r]||0,"d"!==r&&"visibility"!==r&&"fill"!==r&&(x=parseFloat(x));else{for(r in t)if(l=!1,o=t[r],s=v[r]&&v[r].call(this,o,r),s!==!1){if(s!==X&&(o=s),"d"===r)o&&o.join&&(o=o.join(" ")),/(NaN| {2}|^$)/.test(o)&&(o="M 0 0");else if("x"===r&&"text"===g)for(s=0;s<p.childNodes.length;s++)a=p.childNodes[s],c(a,"x")===c(p,"x")&&c(a,"x",o);else if(!this.rotation||"x"!==r&&"y"!==r)if("fill"===r)o=m.color(o,p,r);else if("circle"!==g||"x"!==r&&"y"!==r)if("rect"===g&&"r"===r)c(p,{rx:o,ry:o}),l=!0;else if("translateX"===r||"translateY"===r||"rotation"===r||"verticalAlign"===r||"scaleX"===r||"scaleY"===r)l=d=!0;else if("stroke"===r)o=m.color(o,p,r);else if("dashstyle"===r){if(r="stroke-dasharray",o=o&&o.toLowerCase(),"solid"===o)o=Fe;else if(o){for(o=o.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(","),s=o.length;s--;)o[s]=n(o[s])*f(t["stroke-width"],this["stroke-width"]);o=o.join(",")}}else"width"===r?o=n(o):"align"===r?(r="text-anchor",o={left:"start",center:"middle",right:"end"}[o]):"title"===r&&(s=p.getElementsByTagName("title")[0],s||(s=ue.createElementNS(Ee,"title"),p.appendChild(s)),s.textContent=o);else r={x:"cx",y:"cy"}[r]||r;else d=!0;if("strokeWidth"===r&&(r="stroke-width"),("stroke-width"===r||"stroke"===r)&&(this[r]=o,this.stroke&&this["stroke-width"]?(c(p,"stroke",this.stroke),c(p,"stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===r&&0===o&&this.hasStroke&&(p.removeAttribute("stroke"),this.hasStroke=!1),l=!0),this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(r)&&(h||(this.symbolAttr(t),h=!0),l=!0),y&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(r))for(s=y.length;s--;)c(y[s],r,"height"===r?me(o-(y[s].cutHeight||0),0):o);("width"===r||"height"===r)&&"rect"===g&&0>o&&(o=0),this[r]=o,"text"===r?(o!==this.textStr&&delete this.bBox,this.textStr=o,this.added&&m.buildText(this)):l||c(p,r,o)}d&&this.updateTransform()}return x},addClass:function(t){var e=this.element,n=c(e,"class")||"";return-1===n.indexOf(t)&&c(e,"class",n+" "+t),this},symbolAttr:function(t){var e=this;rn("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","),function(n){e[n]=f(t[n],e[n])}),e.attr({d:e.renderer.symbols[e.symbolName](e.x,e.y,e.width,e.height,e)})},clip:function(t){return this.attr("clip-path",t?"url("+this.renderer.url+"#"+t.id+")":Fe)},crisp:function(t,e,n,i,r){var o,s,a={},l={},t=t||this.strokeWidth||this.attr&&this.attr("stroke-width")||0;s=fe(t)%2/2,l.x=pe(e||this.x||0)+s,l.y=pe(n||this.y||0)+s,l.width=pe((i||this.width||0)-2*s),l.height=pe((r||this.height||0)-2*s),l.strokeWidth=t;for(o in l)this[o]!==l[o]&&(this[o]=a[o]=l[o]);return a},css:function(e){var n,i=this.element,r=e&&e.width&&"text"===i.nodeName.toLowerCase(),o="",s=function(t,e){return"-"+e.toLowerCase()};if(e&&e.color&&(e.fill=e.color),this.styles=e=t(this.styles,e),De&&r&&delete e.width,Me&&!_e)r&&delete e.width,p(this.element,e);else{for(n in e)o+=n.replace(/([A-Z])/g,s)+":"+e[n]+";";c(i,"style",o)}return r&&this.added&&this.renderer.buildText(this),this},on:function(t,e){var n=this,i=n.element;return Re&&"click"===t?(i.ontouchstart=function(t){n.touchEventFired=Date.now(),t.preventDefault(),e.call(i,t)},i.onclick=function(t){(-1===Se.indexOf("Android")||Date.now()-(n.touchEventFired||0)>1100)&&e.call(i,t)}):i["on"+t]=e,this},setRadialReference:function(t){return this.element.radialReference=t,this},translate:function(t,e){return this.attr({translateX:t,translateY:e})},invert:function(){return this.inverted=!0,this.updateTransform(),this},htmlCss:function(e){var n=this.element;return(n=e&&"SPAN"===n.tagName&&e.width)&&(delete e.width,this.textWidth=n,this.updateTransform()),this.styles=t(this.styles,e),p(this.element,e),this},htmlGetBBox:function(){var t=this.element,e=this.bBox;return e||("text"===t.nodeName&&(t.style.position="absolute"),e=this.bBox={x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}),e},htmlUpdateTransform:function(){if(this.added){var t=this.renderer,e=this.element,i=this.translateX||0,r=this.translateY||0,o=this.x||0,s=this.y||0,a=this.textAlign||"left",l={left:0,center:.5,right:1}[a],h=a&&"left"!==a,c=this.shadows;if(p(e,{marginLeft:i,marginTop:r}),c&&rn(c,function(t){p(t,{marginLeft:i+1,marginTop:r+1})}),this.inverted&&rn(e.childNodes,function(n){t.invertChild(n,e)}),"SPAN"===e.tagName){var d,g,m,c=this.rotation;d=0;var v,y=1,x=0;m=n(this.textWidth);var b=this.xCorr||0,w=this.yCorr||0,k=[c,a,e.innerHTML,this.textWidth].join(",");k!==this.cTT&&(u(c)&&(d=c*ke,y=xe(d),x=be(d),this.setSpanRotation(c,x,y)),d=f(this.elemWidth,e.offsetWidth),g=f(this.elemHeight,e.offsetHeight),d>m&&/[ \-]/.test(e.textContent||e.innerText)&&(p(e,{width:m+"px",display:"block",whiteSpace:"normal"}),d=m),m=t.fontMetrics(e.style.fontSize).b,b=0>y&&-d,w=0>x&&-g,v=0>y*x,b+=x*m*(v?1-l:l),w-=y*m*(c?v?l:1-l:1),h&&(b-=d*l*(0>y?-1:1),c&&(w-=g*l*(0>x?-1:1)),p(e,{textAlign:a})),this.xCorr=b,this.yCorr=w),p(e,{left:o+b+"px",top:s+w+"px"}),Ae&&(g=e.offsetHeight),this.cTT=k}}else this.alignOnAdd=!0},setSpanRotation:function(t){var e={};e[Me?"-ms-transform":Ae?"-webkit-transform":Le?"MozTransform":Ce?"-o-transform":""]=e.transform="rotate("+t+"deg)",p(this.element,e)},updateTransform:function(){var t=this.translateX||0,e=this.translateY||0,n=this.scaleX,i=this.scaleY,r=this.inverted,o=this.rotation;r&&(t+=this.attr("width"),e+=this.attr("height")),t=["translate("+t+","+e+")"],r?t.push("rotate(90) scale(-1,1)"):o&&t.push("rotate("+o+" "+(this.x||0)+" "+(this.y||0)+")"),(u(n)||u(i))&&t.push("scale("+f(n,1)+" "+f(i,1)+")"),t.length&&c(this.element,"transform",t.join(" "))},toFront:function(){var t=this.element;return t.parentNode.appendChild(t),this},align:function(t,e,n){var r,o,s,a,l={};return o=this.renderer,s=o.alignedObjects,t?(this.alignOptions=t,this.alignByTranslate=e,(!n||i(n))&&(this.alignTo=r=n||"renderer",h(s,this),s.push(this),n=null)):(t=this.alignOptions,e=this.alignByTranslate,r=this.alignTo),n=f(n,o[r],o),r=t.align,o=t.verticalAlign,s=(n.x||0)+(t.x||0),a=(n.y||0)+(t.y||0),("right"===r||"center"===r)&&(s+=(n.width-(t.width||0))/{right:1,center:2}[r]),l[e?"translateX":"x"]=fe(s),("bottom"===o||"middle"===o)&&(a+=(n.height-(t.height||0))/({bottom:1,middle:2}[o]||1)),l[e?"translateY":"y"]=fe(a),this[this.placed?"animate":"attr"](l),this.placed=!0,this.alignAttr=l,this},getBBox:function(){var e,n=this.bBox,i=this.renderer,r=this.rotation;e=this.element;var o=this.styles,s=r*ke;if(!n){if(e.namespaceURI===Ee||i.forExport){try{n=e.getBBox?t({},e.getBBox()):{width:e.offsetWidth,height:e.offsetHeight}}catch(a){}(!n||n.width<0)&&(n={width:0,height:0})}else n=this.htmlGetBBox();i.isSVG&&(i=n.width,e=n.height,Me&&o&&"11px"===o.fontSize&&"22.7"===e.toPrecision(3)&&(n.height=e=14),r&&(n.width=ye(e*be(s))+ye(i*xe(s)),n.height=ye(e*xe(s))+ye(i*be(s)))),this.bBox=n}return n},show:function(){return this.attr({visibility:"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(t){var e=this;e.animate({opacity:0},{duration:t||150,complete:function(){e.hide()}})},add:function(t){var e,i=this.renderer,r=t||i,o=r.element||i.box,s=o.childNodes,a=this.element,l=c(a,"zIndex");if(t&&(this.parentGroup=t),this.parentInverted=t&&t.inverted,void 0!==this.textStr&&i.buildText(this),l&&(r.handleZ=!0,l=n(l)),r.handleZ)for(r=0;r<s.length;r++)if(t=s[r],i=c(t,"zIndex"),t!==a&&(n(i)>l||!u(l)&&u(i))){o.insertBefore(a,t),e=!0;break}return e||o.appendChild(a),this.added=!0,un(this,"add"),this},safeRemoveChild:function(t){var e=t.parentNode;e&&e.removeChild(t)},destroy:function(){var t,e,n=this,i=n.element||{},r=n.shadows,o=n.renderer.isSVG&&"SPAN"===i.nodeName&&i.parentNode;if(i.onclick=i.onmouseout=i.onmouseover=i.onmousemove=i.point=null,fn(n),n.clipPath&&(n.clipPath=n.clipPath.destroy()),n.stops){for(e=0;e<n.stops.length;e++)n.stops[e]=n.stops[e].destroy();n.stops=null}for(n.safeRemoveChild(i),r&&rn(r,function(t){n.safeRemoveChild(t)});o&&0===o.childNodes.length;)i=o.parentNode,n.safeRemoveChild(o),o=i;n.alignTo&&h(n.renderer.alignedObjects,n);for(t in n)delete n[t];return null},shadow:function(t,e,n){var i,r,o,s,a,l,h=[],u=this.element;if(t){for(s=f(t.width,3),a=(t.opacity||.15)/s,l=this.parentInverted?"(-1,-1)":"("+f(t.offsetX,1)+", "+f(t.offsetY,1)+")",i=1;s>=i;i++)r=u.cloneNode(0),o=2*s+1-2*i,c(r,{isShadow:"true",stroke:t.color||"black","stroke-opacity":a*i,"stroke-width":o,transform:"translate"+l,fill:Fe}),n&&(c(r,"height",me(c(r,"height")-o,0)),r.cutHeight=o),e?e.element.appendChild(r):u.parentNode.insertBefore(r,u),h.push(r);this.shadows=h}return this}};var mn=function(){this.init.apply(this,arguments)};mn.prototype={Element:z,init:function(t,e,n,i){var r,o,s=location;r=this.createElement("svg").attr({version:"1.1"}),o=r.element,t.appendChild(o),-1===t.innerHTML.indexOf("xmlns")&&c(o,"xmlns",Ee),this.isSVG=!0,this.box=o,this.boxWrapper=r,this.alignedObjects=[],this.url=(Le||Ae)&&ue.getElementsByTagName("base").length?s.href.replace(/#.*?$/,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"",this.createElement("desc").add().element.appendChild(ue.createTextNode("Created with Highcharts 3.0.6")),this.defs=this.createElement("defs").add(),this.forExport=i,this.gradients={},this.setSize(e,n,!1);var a;Le&&t.getBoundingClientRect&&(this.subPixelFix=e=function(){p(t,{left:0,top:0}),a=t.getBoundingClientRect(),p(t,{left:ge(a.left)-a.left+"px",top:ge(a.top)-a.top+"px"})},e(),ln(ce,"resize",e))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var t=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),P(this.gradients||{}),this.gradients=null,t&&(this.defs=t.destroy()),this.subPixelFix&&hn(ce,"resize",this.subPixelFix),this.alignedObjects=null},createElement:function(t){var e=new this.Element;return e.init(this,t),e},draw:function(){},buildText:function(t){for(var e=t.element,i=this,r=i.forExport,o=f(t.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),s=e.childNodes,a=/style="([^"]+)"/,l=/href="(http[^"]+)"/,h=c(e,"x"),u=t.styles,d=u&&u.width&&n(u.width),g=u&&u.lineHeight,m=s.length;m--;)e.removeChild(s[m]);d&&!t.added&&this.box.appendChild(e),""===o[o.length-1]&&o.pop(),rn(o,function(o,s){var f,m=0,o=o.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");f=o.split("|||"),rn(f,function(o){if(""!==o||1===f.length){var v,y={},x=ue.createElementNS(Ee,"tspan");if(a.test(o)&&(v=o.match(a)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),c(x,"style",v)),l.test(o)&&!r&&(c(x,"onclick",'location.href="'+o.match(l)[1]+'"'),p(x,{cursor:"pointer"})),o=(o.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"<").replace(/>/g,">")," "!==o&&(x.appendChild(ue.createTextNode(o)),m?y.dx=0:y.x=h,c(x,y),!m&&s&&(!_e&&r&&p(x,{display:"block"}),c(x,"dy",g||i.fontMetrics(/px$/.test(x.style.fontSize)?x.style.fontSize:u.fontSize).h,Ae&&x.offsetHeight)),e.appendChild(x),m++,d))for(var b,w,o=o.replace(/([^\^])-/g,"$1- ").split(" "),y=t._clipHeight,k=[],S=n(g||16),C=1;o.length||k.length;)delete t.bBox,b=t.getBBox(),w=b.width,b=w>d,b&&1!==o.length?(x.removeChild(x.firstChild),k.unshift(o.pop())):(o=k,k=[],o.length&&(C++,y&&C*S>y?(o=["..."],t.attr("title",t.textStr)):(x=ue.createElementNS(Ee,"tspan"),c(x,{dy:S,x:h}),v&&c(x,"style",v),e.appendChild(x),w>d&&(d=w)))),o.length&&x.appendChild(ue.createTextNode(o.join(" ").replace(/- /g,"-")))}})})},button:function(n,i,r,o,s,a,l,h){var u,c,d,f,p,g,m=this.label(n,i,r,null,null,null,null,null,"button"),v=0,n={x1:0,y1:0,x2:0,y2:1},s=e({"stroke-width":1,stroke:"#CCCCCC",fill:{linearGradient:n,stops:[[0,"#FEFEFE"],[1,"#F6F6F6"]]},r:2,padding:5,style:{color:"black"}},s);return d=s.style,delete s.style,a=e(s,{stroke:"#68A",fill:{linearGradient:n,stops:[[0,"#FFF"],[1,"#ACF"]]}},a),f=a.style,delete a.style,l=e(s,{stroke:"#68A",fill:{linearGradient:n,stops:[[0,"#9BD"],[1,"#CDF"]]}},l),p=l.style,delete l.style,h=e(s,{style:{color:"#CCC"}},h),g=h.style,delete h.style,ln(m.element,Me?"mouseover":"mouseenter",function(){3!==v&&m.attr(a).css(f)}),ln(m.element,Me?"mouseout":"mouseleave",function(){3!==v&&(u=[s,a,l][v],c=[d,f,p][v],m.attr(u).css(c))}),m.setState=function(t){(m.state=v=t)?2===t?m.attr(l).css(p):3===t&&m.attr(h).css(g):m.attr(s).css(d)},m.on("click",function(){3!==v&&o.call(m)}).attr(s).css(t({cursor:"default"},d))},crispLine:function(t,e){return t[1]===t[4]&&(t[1]=t[4]=fe(t[1])-e%2/2),t[2]===t[5]&&(t[2]=t[5]=fe(t[2])+e%2/2),t},path:function(e){var n={fill:Fe};return o(e)?n.d=e:r(e)&&t(n,e),this.createElement("path").attr(n)},circle:function(t,e,n){return t=r(t)?t:{x:t,y:e,r:n},this.createElement("circle").attr(t)},arc:function(t,e,n,i,o,s){return r(t)&&(e=t.y,n=t.r,i=t.innerR,o=t.start,s=t.end,t=t.x),t=this.symbol("arc",t||0,e||0,n||0,n||0,{innerR:i||0,start:o||0,end:s||0}),t.r=n,t},rect:function(t,e,n,i,o,s){return o=r(t)?t.r:o,o=this.createElement("rect").attr({rx:o,ry:o,fill:Fe}),o.attr(r(t)?t:o.crisp(s,t,e,me(n,0),me(i,0)))},setSize:function(t,e,n){var i=this.alignedObjects,r=i.length;for(this.width=t,this.height=e,this.boxWrapper[f(n,!0)?"animate":"attr"]({width:t,height:e});r--;)i[r].align()},g:function(t){var e=this.createElement("g");return u(t)?e.attr({"class":"highcharts-"+t}):e},image:function(e,n,i,r,o){var s={preserveAspectRatio:Fe};return arguments.length>1&&t(s,{x:n,y:i,width:r,height:o}),s=this.createElement("image").attr(s),s.element.setAttributeNS?s.element.setAttributeNS("http://www.w3.org/1999/xlink","href",e):s.element.setAttribute("hc-svg-href",e),s},symbol:function(e,n,i,r,o,s){var a,l,h,u=this.symbols[e],u=u&&u(fe(n),fe(i),r,o,s),c=/^url\((.*?)\)$/;return u?(a=this.path(u),t(a,{symbolName:e,x:n,y:i,width:r,height:o}),s&&t(a,s)):c.test(e)&&(h=function(t,e){t.element&&(t.attr({width:e[0],height:e[1]}),t.alignByTranslate||t.translate(fe((r-e[0])/2),fe((o-e[1])/2)))},l=e.match(c)[1],e=ze[l],a=this.image(l).attr({x:n,y:i}),a.isImg=!0,e?h(a,e):(a.attr({width:0,height:0}),g("img",{onload:function(){h(a,ze[l]=[this.width,this.height])},src:l}))),a},symbols:{circle:function(t,e,n,i){var r=.166*n;return["M",t+n/2,e,"C",t+n+r,e,t+n+r,e+i,t+n/2,e+i,"C",t-r,e+i,t-r,e,t+n/2,e,"Z"]},square:function(t,e,n,i){return["M",t,e,"L",t+n,e,t+n,e+i,t,e+i,"Z"]},triangle:function(t,e,n,i){return["M",t+n/2,e,"L",t+n,e+i,t,e+i,"Z"]},"triangle-down":function(t,e,n,i){return["M",t,e,"L",t+n,e,t+n/2,e+i,"Z"]},diamond:function(t,e,n,i){return["M",t+n/2,e,"L",t+n,e+i/2,t+n/2,e+i,t,e+i/2,"Z"]},arc:function(t,e,n,i,r){var o=r.start,n=r.r||n||i,s=r.end-.001,i=r.innerR,a=r.open,l=xe(o),h=be(o),u=xe(s),s=be(s),r=r.end-o<we?0:1;return["M",t+n*l,e+n*h,"A",n,n,0,r,1,t+n*u,e+n*s,a?"M":"L",t+i*u,e+i*s,"A",i,i,0,r,0,t+i*l,e+i*h,a?"":"Z"]}},clipRect:function(t,e,n,i){var r="highcharts-"+Oe++,o=this.createElement("clipPath").attr({id:r}).add(this.defs),t=this.rect(t,e,n,i,0).add(o);return t.id=r,t.clipPath=o,t},color:function(t,n,i){var r,s,a,l,h,d,f,p,g=this,m=/^rgba/,v=[];if(t&&t.linearGradient?s="linearGradient":t&&t.radialGradient&&(s="radialGradient"),s){i=t[s],a=g.gradients,h=t.stops,n=n.radialReference,o(i)&&(t[s]=i={x1:i[0],y1:i[1],x2:i[2],y2:i[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===s&&n&&!u(i.gradientUnits)&&(i=e(i,{cx:n[0]-n[2]/2+i.cx*n[2],cy:n[1]-n[2]/2+i.cy*n[2],r:i.r*n[2],gradientUnits:"userSpaceOnUse"}));for(p in i)"id"!==p&&v.push(p,i[p]);for(p in h)v.push(h[p]);return v=v.join(","),a[v]?t=a[v].id:(i.id=t="highcharts-"+Oe++,a[v]=l=g.createElement(s).attr(i).add(g.defs),l.stops=[],rn(h,function(t){m.test(t[1])?(r=gn(t[1]),d=r.get("rgb"),f=r.get("a")):(d=t[1],f=1),t=g.createElement("stop").attr({offset:t[0],"stop-color":d,"stop-opacity":f}).add(l),l.stops.push(t)})),"url("+g.url+"#"+t+")"}return m.test(t)?(r=gn(t),c(n,i+"-opacity",r.get("a")),r.get("rgb")):(n.removeAttribute(i+"-opacity"),t)},text:function(t,e,n,i){var r=q.chart.style,o=De||!_e&&this.forExport;return i&&!this.forExport?this.html(t,e,n):(e=fe(f(e,0)),n=fe(f(n,0)),t=this.createElement("text").attr({x:e,y:n,text:t}).css({fontFamily:r.fontFamily,fontSize:r.fontSize}),o&&t.css({position:"absolute"}),t.x=e,t.y=n,t)},html:function(e,n,i){var r=q.chart.style,o=this.createElement("span"),s=o.attrSetters,a=o.element,l=o.renderer;return s.text=function(t){return t!==a.innerHTML&&delete this.bBox,a.innerHTML=t,!1},s.x=s.y=s.align=function(t,e){return"align"===e&&(e="textAlign"),o[e]=t,o.htmlUpdateTransform(),!1},o.attr({text:e,x:fe(n),y:fe(i)}).css({position:"absolute",whiteSpace:"nowrap",fontFamily:r.fontFamily,fontSize:r.fontSize}),o.css=o.htmlCss,l.isSVG&&(o.add=function(e){var n,i=l.box.parentNode,r=[];if(e){if(n=e.div,!n){for(;e;)r.push(e),e=e.parentGroup;rn(r.reverse(),function(e){var r;n=e.div=e.div||g(Be,{className:c(e.element,"class")},{position:"absolute",left:(e.translateX||0)+"px",top:(e.translateY||0)+"px"},n||i),r=n.style,t(e.attrSetters,{translateX:function(t){r.left=t+"px"},translateY:function(t){r.top=t+"px"},visibility:function(t,e){r[e]=t}})})}}else n=i;return n.appendChild(a),o.added=!0,o.alignOnAdd&&o.htmlUpdateTransform(),o}),o},fontMetrics:function(t){var t=n(t||11),t=24>t?t+4:fe(1.2*t),e=fe(.8*t);
|
|
return{h:t,b:e}},label:function(n,i,r,o,s,a,l,h,c){function d(){var t,n;t=T.element.style,v=(void 0===y||void 0===x||M.styles.textAlign)&&T.getBBox(),M.width=(y||v.width||0)+2*L+P,M.height=(x||v.height||0)+2*L,k=L+C.fontMetrics(t&&t.fontSize).b,S&&(m||(t=fe(-A*L),n=h?-k:0,M.box=m=o?C.symbol(o,t,n,M.width,M.height):C.rect(t,n,M.width,M.height,0,_[Ze]),m.add(M)),m.isImg||m.attr(e({width:M.width,height:M.height},_)),_=null)}function f(){var t,e=M.styles,e=e&&e.textAlign,n=P+L*(1-A);t=h?0:k,!u(y)||"center"!==e&&"right"!==e||(n+={center:.5,right:1}[e]*(y-v.width)),(n!==T.x||t!==T.y)&&T.attr({x:n,y:t}),T.x=n,T.y=t}function p(t,e){m?m.attr(t,e):_[t]=e}function g(){T.add(M),M.attr({text:n,x:i,y:r}),m&&u(s)&&M.attr({anchorX:s,anchorY:a})}var m,v,y,x,b,w,k,S,C=this,M=C.g(c),T=C.text("",0,0,l).attr({zIndex:1}),A=0,L=3,P=0,E=0,_={},l=M.attrSetters;ln(M,"add",g),l.width=function(t){return y=t,!1},l.height=function(t){return x=t,!1},l.padding=function(t){return u(t)&&t!==L&&(L=t,f()),!1},l.paddingLeft=function(t){return u(t)&&t!==P&&(P=t,f()),!1},l.align=function(t){return A={left:0,center:.5,right:1}[t],!1},l.text=function(t,e){return T.attr(e,t),d(),f(),!1},l[Ze]=function(t,e){return S=!0,E=t%2/2,p(e,t),!1},l.stroke=l.fill=l.r=function(t,e){return"fill"===e&&(S=!0),p(e,t),!1},l.anchorX=function(t,e){return s=t,p(e,t+E-b),!1},l.anchorY=function(t,e){return a=t,p(e,t-w),!1},l.x=function(t){return M.x=t,t-=A*((y||v.width)+L),b=fe(t),M.attr("translateX",b),!1},l.y=function(t){return w=M.y=fe(t),M.attr("translateY",w),!1};var N=M.css;return t(M,{css:function(t){if(t){var n={},t=e(t);rn("fontSize,fontWeight,fontFamily,color,lineHeight,width,textDecoration,textShadow".split(","),function(e){t[e]!==X&&(n[e]=t[e],delete t[e])}),T.css(n)}return N.call(M,t)},getBBox:function(){return{width:v.width+2*L,height:v.height+2*L,x:v.x-L,y:v.y-L}},shadow:function(t){return m&&m.shadow(t),M},destroy:function(){hn(M,"add",g),hn(M.element,"mouseenter"),hn(M.element,"mouseleave"),T&&(T=T.destroy()),m&&(m=m.destroy()),z.prototype.destroy.call(M),M=C=d=f=p=g=null}})}},Y=mn;var vn;if(!_e&&!De){Highcharts.VMLElement=vn={init:function(t,e){var n=["<",e,' filled="f" stroked="f"'],i=["position: ","absolute",";"],r=e===Be;("shape"===e||r)&&i.push("left:0;top:0;width:1px;height:1px;"),i.push("visibility: ",r?"hidden":"visible"),n.push(' style="',i.join(""),'"/>'),e&&(n=r||"span"===e||"img"===e?n.join(""):t.prepVML(n),this.element=g(n)),this.renderer=t,this.attrSetters={}},add:function(t){var e=this.renderer,n=this.element,i=e.box,i=t?t.element||t:i;return t&&t.inverted&&e.invertChild(n,i),i.appendChild(n),this.added=!0,this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform(),un(this,"add"),this},updateTransform:z.prototype.htmlUpdateTransform,setSpanRotation:function(t,e,n){p(this.element,{filter:t?["progid:DXImageTransform.Microsoft.Matrix(M11=",n,", M12=",-e,", M21=",e,", M22=",n,", sizingMethod='auto expand')"].join(""):Fe})},pathToVML:function(t){for(var e,n=t.length,i=[];n--;)s(t[n])?i[n]=fe(10*t[n])-5:"Z"===t[n]?i[n]="x":(i[n]=t[n],!t.isArc||"wa"!==t[n]&&"at"!==t[n]||(e="wa"===t[n]?1:-1,i[n+5]===i[n+7]&&(i[n+7]-=e),i[n+6]===i[n+8]&&(i[n+8]-=e)));return i.join(" ")||"x"},attr:function(t,e){var n,r,o,a,l,h=this.element||{},d=h.style,f=h.nodeName,p=this.renderer,m=this.symbolName,v=this.shadows,y=this.attrSetters,x=this;if(i(t)&&u(e)&&(n=t,t={},t[n]=e),i(t))n=t,x="strokeWidth"===n||"stroke-width"===n?this.strokeweight:this[n];else for(n in t)if(r=t[n],l=!1,o=y[n]&&y[n].call(this,r,n),o!==!1&&null!==r){if(o!==X&&(r=o),m&&/^(x|y|r|start|end|width|height|innerR|anchorX|anchorY)/.test(n))a||(this.symbolAttr(t),a=!0),l=!0;else if("d"===n){if(r=r||[],this.d=r.join(" "),h.path=r=this.pathToVML(r),v)for(o=v.length;o--;)v[o].path=v[o].cutOff?this.cutOffPath(r,v[o].cutOff):r;l=!0}else if("visibility"===n){if(v)for(o=v.length;o--;)v[o].style[n]=r;"DIV"===f&&(r="hidden"===r?"-999em":0,Te||(d[n]=r?"visible":"hidden"),n="top"),d[n]=r,l=!0}else"zIndex"===n?(r&&(d[n]=r),l=!0):-1!==nn(n,["x","y","width","height"])?(this[n]=r,"x"===n||"y"===n?n={x:"left",y:"top"}[n]:r=me(0,r),this.updateClipping?(this[n]=r,this.updateClipping()):d[n]=r,l=!0):"class"===n&&"DIV"===f?h.className=r:"stroke"===n?(r=p.color(r,h,n),n="strokecolor"):"stroke-width"===n||"strokeWidth"===n?(h.stroked=r?!0:!1,n="strokeweight",this[n]=r,s(r)&&(r+="px")):"dashstyle"===n?((h.getElementsByTagName("stroke")[0]||g(p.prepVML(["<stroke/>"]),null,null,h))[n]=r||"solid",this.dashstyle=r,l=!0):"fill"===n?"SPAN"===f?d.color=r:"IMG"!==f&&(h.filled=r!==Fe?!0:!1,r=p.color(r,h,n,this),n="fillcolor"):"opacity"===n?l=!0:"shape"===f&&"rotation"===n?(this[n]=h.style[n]=r,h.style.left=-fe(be(r*ke)+1)+"px",h.style.top=fe(xe(r*ke))+"px"):"translateX"===n||"translateY"===n||"rotation"===n?(this[n]=r,this.updateTransform(),l=!0):"text"===n&&(this.bBox=null,h.innerHTML=r,l=!0);l||(Te?h[n]=r:c(h,n,r))}return x},clip:function(t){var e,n=this;return t?(e=t.members,h(e,n),e.push(n),n.destroyClip=function(){h(e,n)},t=t.getCSS(n)):(n.destroyClip&&n.destroyClip(),t={clip:Te?"inherit":"rect(auto)"}),n.css(t)},css:z.prototype.htmlCss,safeRemoveChild:function(t){t.parentNode&&E(t)},destroy:function(){return this.destroyClip&&this.destroyClip(),z.prototype.destroy.apply(this)},on:function(t,e){return this.element["on"+t]=function(){var t=ce.event;t.target=t.srcElement,e(t)},this},cutOffPath:function(t,e){var i,t=t.split(/[ ,]/);return i=t.length,(9===i||11===i)&&(t[i-4]=t[i-2]=n(t[i-2])-10*e),t.join(" ")},shadow:function(t,e,i){var r,o,s,a,l,h,u,c=[],d=this.element,p=this.renderer,m=d.style,v=d.path;if(v&&"string"!=typeof v.value&&(v="x"),l=v,t){for(h=f(t.width,3),u=(t.opacity||.15)/h,r=1;3>=r;r++)a=2*h+1-2*r,i&&(l=this.cutOffPath(v.value,a+.5)),s=['<shape isShadow="true" strokeweight="',a,'" filled="false" path="',l,'" coordsize="10 10" style="',d.style.cssText,'" />'],o=g(p.prepVML(s),null,{left:n(m.left)+f(t.offsetX,1),top:n(m.top)+f(t.offsetY,1)}),i&&(o.cutOff=a+1),s=['<stroke color="',t.color||"black",'" opacity="',u*r,'"/>'],g(p.prepVML(s),null,null,o),e?e.element.appendChild(o):d.parentNode.insertBefore(o,d),c.push(o);this.shadows=c}return this}},vn=m(z,vn);var yn={Element:vn,isIE8:Se.indexOf("MSIE 8.0")>-1,init:function(t,e,n){var i,r;this.alignedObjects=[],i=this.createElement(Be),r=i.element,r.style.position="relative",t.appendChild(i.element),this.isVML=!0,this.box=r,this.boxWrapper=i,this.setSize(e,n,!1),ue.namespaces.hcv||(ue.namespaces.add("hcv","urn:schemas-microsoft-com:vml"),(ue.styleSheets.length?ue.styleSheets[0]:ue.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(e,n,i,o){var s=this.createElement(),a=r(e);return t(s,{members:[],left:(a?e.x:e)+1,top:(a?e.y:n)+1,width:(a?e.width:i)-1,height:(a?e.height:o)-1,getCSS:function(e){var n=e.element,i=n.nodeName,e=e.inverted,r=this.top-("shape"===i?n.offsetTop:0),o=this.left,n=o+this.width,s=r+this.height,r={clip:"rect("+fe(e?o:r)+"px,"+fe(e?s:n)+"px,"+fe(e?n:s)+"px,"+fe(e?r:o)+"px)"};return!e&&Te&&"DIV"===i&&t(r,{width:n+"px",height:s+"px"}),r},updateClipping:function(){rn(s.members,function(t){t.css(s.getCSS(t))})}})},color:function(t,e,n,i){var r,o,s,a=this,l=/^rgba/,h=Fe;if(t&&t.linearGradient?s="gradient":t&&t.radialGradient&&(s="pattern"),s){var u,c,d,f,p,m,v,y,x=t.linearGradient||t.radialGradient,b="",t=t.stops,w=[],k=function(){o=['<fill colors="'+w.join(",")+'" opacity="',p,'" o:opacity2="',f,'" type="',s,'" ',b,'focus="100%" method="any" />'],g(a.prepVML(o),null,null,e)};if(d=t[0],y=t[t.length-1],d[0]>0&&t.unshift([0,d[1]]),y[0]<1&&t.push([1,y[1]]),rn(t,function(t,e){l.test(t[1])?(r=gn(t[1]),u=r.get("rgb"),c=r.get("a")):(u=t[1],c=1),w.push(100*t[0]+"% "+u),e?(p=c,m=u):(f=c,v=u)}),"fill"===n)if("gradient"===s)n=x.x1||x[0]||0,t=x.y1||x[1]||0,d=x.x2||x[2]||0,x=x.y2||x[3]||0,b='angle="'+(90-180*de.atan((x-t)/(d-n))/we)+'"',k();else{var S,h=x.r,C=2*h,M=2*h,T=x.cx,A=x.cy,L=e.radialReference,h=function(){L&&(S=i.getBBox(),T+=(L[0]-S.x)/S.width-.5,A+=(L[1]-S.y)/S.height-.5,C*=L[2]/S.width,M*=L[2]/S.height),b='src="'+q.global.VMLRadialGradientURL+'" size="'+C+","+M+'" origin="0.5,0.5" position="'+T+","+A+'" color2="'+v+'" ',k()};i.added?h():ln(i,"add",h),h=m}else h=u}else l.test(t)&&"IMG"!==e.tagName?(r=gn(t),o=["<",n,' opacity="',r.get("a"),'"/>'],g(this.prepVML(o),null,null,e),h=r.get("rgb")):(h=e.getElementsByTagName(n),h.length&&(h[0].opacity=1,h[0].type="solid"),h=t);return h},prepVML:function(t){var e=this.isIE8,t=t.join("");return e?(t=t.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),t=-1===t.indexOf('style="')?t.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):t.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):t=t.replace("<","<hcv:"),t},text:mn.prototype.html,path:function(e){var n={coordsize:"10 10"};return o(e)?n.d=e:r(e)&&t(n,e),this.createElement("shape").attr(n)},circle:function(t,e,n){var i=this.symbol("circle");return r(t)&&(n=t.r,e=t.y,t=t.x),i.isCircle=!0,i.r=n,i.attr({x:t,y:e})},g:function(t){var e;return t&&(e={className:"highcharts-"+t,"class":"highcharts-"+t}),this.createElement(Be).attr(e)},image:function(t,e,n,i,r){var o=this.createElement("img").attr({src:t});return arguments.length>1&&o.attr({x:e,y:n,width:i,height:r}),o},rect:function(t,e,n,i,o,s){var a=this.symbol("rect");return a.r=r(t)?t.r:o,a.attr(r(t)?t:a.crisp(s,t,e,me(n,0),me(i,0)))},invertChild:function(t,e){var i=e.style;p(t,{flip:"x",left:n(i.width)-1,top:n(i.height)-1,rotation:-90})},symbols:{arc:function(t,e,n,i,r){var o=r.start,s=r.end,a=r.r||n||i,n=r.innerR,i=xe(o),l=be(o),h=xe(s),u=be(s);return 0===s-o?["x"]:(o=["wa",t-a,e-a,t+a,e+a,t+a*i,e+a*l,t+a*h,e+a*u],r.open&&!n&&o.push("e","M",t,e),o.push("at",t-n,e-n,t+n,e+n,t+n*h,e+n*u,t+n*i,e+n*l,"x","e"),o.isArc=!0,o)},circle:function(t,e,n,i,r){return r&&(n=i=2*r.r),r&&r.isCircle&&(t-=n/2,e-=i/2),["wa",t,e,t+n,e+i,t+n,e+i/2,t+n,e+i/2,"e"]},rect:function(t,e,n,i,r){var o,s=t+n,a=e+i;return u(r)&&r.r?(o=ve(r.r,n,i),s=["M",t+o,e,"L",s-o,e,"wa",s-2*o,e,s,e+2*o,s-o,e,s,e+o,"L",s,a-o,"wa",s-2*o,a-2*o,s,a,s,a-o,s-o,a,"L",t+o,a,"wa",t,a-2*o,t+2*o,a,t+o,a,t,a-o,"L",t,e+o,"wa",t,e,t+2*o,e+2*o,t,e+o,t+o,e,"x","e"]):s=mn.prototype.symbols.square.apply(0,arguments),s}}};Highcharts.VMLRenderer=vn=function(){this.init.apply(this,arguments)},vn.prototype=e(mn.prototype,yn),Y=vn}var xn;De&&(Highcharts.CanVGRenderer=vn=function(){Ee="http://www.w3.org/1999/xhtml"},vn.prototype.symbols={},xn=function(){function t(){var t,n=e.length;for(t=0;n>t;t++)e[t]();e=[]}var e=[];return{push:function(n,i){0===e.length&&en(i,t),e.push(n)}}}(),Y=vn),O.prototype={addLabel:function(){var e,n=this.axis,i=n.options,r=n.chart,o=n.horiz,a=n.categories,h=n.series[0]&&n.series[0].names,c=this.pos,d=i.labels,p=n.tickPositions,o=o&&a&&!d.step&&!d.staggerLines&&!d.rotation&&r.plotWidth/p.length||!o&&(r.margin[3]||.33*r.chartWidth),g=c===p[0],m=c===p[p.length-1],h=a?f(a[c],h&&h[c],c):c,a=this.label,v=p.info;n.isDatetimeAxis&&v&&(e=i.dateTimeLabelFormats[v.higherRanks[c]||v.unitName]),this.isFirst=g,this.isLast=m,i=n.labelFormatter.call({axis:n,chart:r,isFirst:g,isLast:m,dateTimeLabelFormat:e,value:n.isLog?N(l(h)):h}),c=o&&{width:me(1,fe(o-2*(d.padding||10)))+"px"},c=t(c,d.style),u(a)?a&&a.attr({text:i}).css(c):(e={align:n.labelAlign},s(d.rotation)&&(e.rotation=d.rotation),o&&d.ellipsis&&(e._clipHeight=n.len/p.length),this.label=u(i)&&d.enabled?r.renderer.text(i,0,0,d.useHTML).attr(e).css(c).add(n.labelGroup):null)},getLabelSize:function(){var t=this.label,e=this.axis;return t?(this.labelBBox=t.getBBox())[e.horiz?"height":"width"]:0},getLabelSides:function(){var t=this.axis,e=this.labelBBox.width,t=e*{left:0,center:.5,right:1}[t.labelAlign]-t.options.labels.x;return[-t,e-t]},handleOverflow:function(t,e){var n=!0,i=this.axis,r=i.chart,o=this.isFirst,s=this.isLast,a=e.x,l=i.reversed,h=i.tickPositions;if(o||s){var u=this.getLabelSides(),c=u[0],u=u[1],r=r.plotLeft,d=r+i.len,h=(i=i.ticks[h[t+(o?1:-1)]])&&i.label.xy&&i.label.xy.x+i.getLabelSides()[o?0:1];o&&!l||s&&l?r>a+c&&(a=r-c,i&&a+u>h&&(n=!1)):a+u>d&&(a=d-u,i&&h>a+c&&(n=!1)),e.x=a}return n},getPosition:function(t,e,n,i){var r=this.axis,o=r.chart,s=i&&o.oldChartHeight||o.chartHeight;return{x:t?r.translate(e+n,null,null,i)+r.transB:r.left+r.offset+(r.opposite?(i&&o.oldChartWidth||o.chartWidth)-r.right-r.left:0),y:t?s-r.bottom+r.offset-(r.opposite?r.height:0):s-r.translate(e+n,null,null,i)-r.transB}},getLabelPosition:function(t,e,n,i,r,o,s,a){var l=this.axis,h=l.transA,c=l.reversed,d=l.staggerLines,f=l.chart.renderer.fontMetrics(r.style.fontSize).b,p=r.rotation,t=t+r.x-(o&&i?o*h*(c?-1:1):0),e=e+r.y-(o&&!i?o*h*(c?1:-1):0);return p&&2===l.side&&(e-=f-f*xe(p*ke)),!u(r.y)&&!p&&(e+=f-n.getBBox().height/2),d&&(e+=s/(a||1)%d*(l.labelOffset/d)),{x:t,y:e}},getMarkPath:function(t,e,n,i,r,o){return o.crispLine(["M",t,e,"L",t+(r?0:-n),e+(r?n:0)],i)},render:function(t,e,n){var i=this.axis,r=i.options,o=i.chart.renderer,s=i.horiz,a=this.type,l=this.label,h=this.pos,u=r.labels,c=this.gridLine,d=a?a+"Grid":"grid",p=a?a+"Tick":"tick",g=r[d+"LineWidth"],m=r[d+"LineColor"],v=r[d+"LineDashStyle"],y=r[p+"Length"],d=r[p+"Width"]||0,x=r[p+"Color"],b=r[p+"Position"],p=this.mark,w=u.step,k=!0,S=i.tickmarkOffset,C=this.getPosition(s,h,S,e),M=C.x,C=C.y,T=s&&M===i.pos+i.len||!s&&C===i.pos?-1:1,A=i.staggerLines;this.isActive=!0,g&&(h=i.getPlotLinePath(h+S,g*T,e,!0),c===X&&(c={stroke:m,"stroke-width":g},v&&(c.dashstyle=v),a||(c.zIndex=1),e&&(c.opacity=0),this.gridLine=c=g?o.path(h).attr(c).add(i.gridGroup):null),!e&&c&&h&&c[this.isNew?"attr":"animate"]({d:h,opacity:n})),d&&y&&("inside"===b&&(y=-y),i.opposite&&(y=-y),e=this.getMarkPath(M,C,y,d*T,s,o),p?p.animate({d:e,opacity:n}):this.mark=o.path(e).attr({stroke:x,"stroke-width":d,opacity:n}).add(i.axisGroup)),l&&!isNaN(M)&&(l.xy=C=this.getLabelPosition(M,C,l,s,u,S,t,w),this.isFirst&&!this.isLast&&!f(r.showFirstLabel,1)||this.isLast&&!this.isFirst&&!f(r.showLastLabel,1)?k=!1:!A&&s&&"justify"===u.overflow&&!this.handleOverflow(t,C)&&(k=!1),w&&t%w&&(k=!1),k&&!isNaN(C.y)?(C.opacity=n,l[this.isNew?"attr":"animate"](C),this.isNew=!1):l.attr("y",-9999))},destroy:function(){P(this,this.axis)}},I.prototype={render:function(){var t,n=this,i=n.axis,r=i.horiz,o=(i.pointRange||0)/2,s=n.options,l=s.label,h=n.label,c=s.width,d=s.to,p=s.from,g=u(p)&&u(d),m=s.value,v=s.dashStyle,y=n.svgElem,x=[],b=s.color,w=s.zIndex,k=s.events,S=i.chart.renderer;if(i.isLog&&(p=a(p),d=a(d),m=a(m)),c)x=i.getPlotLinePath(m,c),o={stroke:b,"stroke-width":c},v&&(o.dashstyle=v);else{if(!g)return;p=me(p,i.min-o),d=ve(d,i.max+o),x=i.getPlotBandPath(p,d,s),o={fill:b},s.borderWidth&&(o.stroke=s.borderColor,o["stroke-width"]=s.borderWidth)}if(u(w)&&(o.zIndex=w),y)x?y.animate({d:x},null,y.onGetPath):(y.hide(),y.onGetPath=function(){y.show()});else if(x&&x.length&&(n.svgElem=y=S.path(x).attr(o).add(),k))for(t in s=function(t){y.on(t,function(e){k[t].apply(n,[e])})},k)s(t);return l&&u(l.text)&&x&&x.length&&i.width>0&&i.height>0?(l=e({align:r&&g&&"center",x:r?!g&&4:10,verticalAlign:!r&&g&&"middle",y:r?g?16:10:g?6:-4,rotation:r&&!g&&90},l),h||(n.label=h=S.text(l.text,0,0,l.useHTML).attr({align:l.textAlign||l.align,rotation:l.rotation,zIndex:w}).css(l.style).add()),i=[x[1],x[4],f(x[6],x[1])],x=[x[2],x[5],f(x[7],x[2])],r=A(i),g=A(x),h.align(l,!1,{x:r,y:g,width:L(i)-r,height:L(x)-g}),h.show()):h&&h.hide(),n},destroy:function(){h(this.axis.plotLinesAndBands,this),delete this.axis,P(this)}},H.prototype={destroy:function(){P(this,this.axis)},render:function(t){var e=this.options,n=e.format,n=n?b(n,this):e.formatter.call(this);this.label?this.label.attr({text:n,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(n,0,0,e.useHTML).css(e.style).attr({align:this.textAlign,rotation:e.rotation,visibility:"hidden"}).add(t)},setOffset:function(t,e){var n=this.axis,i=n.chart,r=i.inverted,o=this.isNegative,s=n.translate(this.percent?100:this.total,0,0,0,1),n=n.translate(0),n=ye(s-n),a=i.xAxis[0].translate(this.x)+t,l=i.plotHeight,o={x:r?o?s:s-n:a,y:r?l-a-e:o?l-s-n:l-s,width:r?n:e,height:r?e:n};(r=this.label)&&(r.align(this.alignOptions,null,o),o=r.alignAttr,r.attr({visibility:this.options.crop===!1||i.isInsidePlot(o.x,o.y)?_e?"inherit":"visible":"hidden"}))}},B.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:"#C0C0C0",labels:Je,lineColor:"#C0D0E0",lineWidth:1,minPadding:.01,maxPadding:.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",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:.05,minPadding:.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return v(this.total,-1)},style:Je.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(t,e){var n=e.isX;this.horiz=t.inverted?!n:n,this.xOrY=(this.isXAxis=n)?"x":"y",this.opposite=e.opposite,this.side=this.horiz?this.opposite?0:2:this.opposite?1:3,this.setOptions(e);var i=this.options,r=i.type;this.labelFormatter=i.labels.formatter||this.defaultLabelFormatter,this.userOptions=e,this.minPixelPadding=0,this.chart=t,this.reversed=i.reversed,this.zoomEnabled=i.zoomEnabled!==!1,this.categories=i.categories||"category"===r,this.isLog="logarithmic"===r,this.isDatetimeAxis="datetime"===r,this.isLinked=u(i.linkedTo),this.tickmarkOffset=this.categories&&"between"===i.tickmarkPlacement?.5:0,this.ticks={},this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len=0,this.minRange=this.userMinRange=i.minRange||i.maxZoom,this.range=i.range,this.offset=i.offset||0,this.stacks={},this.oldStacks={},this.stackExtremes={},this.min=this.max=null;var o,i=this.options.events;-1===nn(this,t.axes)&&(t.axes.push(this),t[n?"xAxis":"yAxis"].push(this)),this.series=this.series||[],t.inverted&&n&&this.reversed===X&&(this.reversed=!0),this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(o in i)ln(this,o,i[o]);this.isLog&&(this.val2lin=a,this.lin2val=l)},setOptions:function(t){this.options=e(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],e(q[this.isXAxis?"xAxis":"yAxis"],t))},update:function(n,i){var r=this.chart,n=r.options[this.xOrY+"Axis"][this.options.index]=e(this.userOptions,n);this.destroy(!0),this._addedPlotLB=this.userMin=this.userMax=X,this.init(r,t(n,{events:X})),r.isDirtyBox=!0,f(i,!0)&&r.redraw()},remove:function(t){var e=this.chart,n=this.xOrY+"Axis";rn(this.series,function(t){t.remove(!1)}),h(e.axes,this),h(e[n],this),e.options[n].splice(this.options.index,1),rn(e[n],function(t,e){t.options.index=e}),this.destroy(),e.isDirtyBox=!0,f(t,!0)&&e.redraw()},defaultLabelFormatter:function(){var t,e=this.axis,n=this.value,i=e.categories,r=this.dateTimeLabelFormat,o=q.lang.numericSymbols,s=o&&o.length,a=e.options.labels.format,e=e.isLog?n:e.tickInterval;if(a)t=b(a,this);else if(i)t=n;else if(r)t=U(r,n);else if(s&&e>=1e3)for(;s--&&t===X;)i=Math.pow(1e3,s+1),e>=i&&null!==o[s]&&(t=v(n/i,-1)+o[s]);return t===X&&(t=n>=1e3?v(n,0):v(n,-1)),t},getSeriesExtremes:function(){var t=this,e=t.chart;t.hasVisibleSeries=!1,t.dataMin=t.dataMax=null,t.stackExtremes={},t.buildStacks(),rn(t.series,function(n){if(n.visible||!e.options.chart.ignoreHiddenSeries){var i;i=n.options.threshold;var r;t.hasVisibleSeries=!0,t.isLog&&0>=i&&(i=null),t.isXAxis?(i=n.xData,i.length&&(t.dataMin=ve(f(t.dataMin,i[0]),A(i)),t.dataMax=me(f(t.dataMax,i[0]),L(i)))):(n.getExtremes(),r=n.dataMax,n=n.dataMin,u(n)&&u(r)&&(t.dataMin=ve(f(t.dataMin,n),n),t.dataMax=me(f(t.dataMax,r),r)),u(i)&&(t.dataMin>=i?(t.dataMin=i,t.ignoreMinPadding=!0):t.dataMax<i&&(t.dataMax=i,t.ignoreMaxPadding=!0)))}})},translate:function(t,e,n,i,r,o){var a=this.len,l=1,h=0,u=i?this.oldTransA:this.transA,i=i?this.oldMin:this.min,c=this.minPixelPadding,r=(this.options.ordinal||this.isLog&&r)&&this.lin2val;return u||(u=this.transA),n&&(l*=-1,h=a),this.reversed&&(l*=-1,h-=l*a),e?(t=t*l+h,t-=c,t=t/u+i,r&&(t=this.lin2val(t))):(r&&(t=this.val2lin(t)),"between"===o&&(o=.5),t=l*(t-i)*u+h+l*c+(s(o)?u*o*this.pointRange:0)),t},toPixels:function(t,e){return this.translate(t,!1,!this.horiz,null,!0)+(e?0:this.pos)},toValue:function(t,e){return this.translate(t-(e?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(t,e,n,i){var r,o,s,a,l=this.chart,h=this.left,u=this.top,t=this.translate(t,null,null,n),c=n&&l.oldChartHeight||l.chartHeight,d=n&&l.oldChartWidth||l.chartWidth;return r=this.transB,n=o=fe(t+r),r=s=fe(c-t-r),isNaN(t)?a=!0:this.horiz?(r=u,s=c-this.bottom,(h>n||n>h+this.width)&&(a=!0)):(n=h,o=d-this.right,(u>r||r>u+this.height)&&(a=!0)),a&&!i?null:l.renderer.crispLine(["M",n,r,"L",o,s],e||0)},getPlotBandPath:function(t,e){var n=this.getPlotLinePath(e),i=this.getPlotLinePath(t);return i&&n?i.push(n[4],n[5],n[1],n[2]):i=null,i},getLinearTickPositions:function(t,e,n){for(var i,e=N(pe(e/t)*t),n=N(ge(n/t)*t),r=[];n>=e&&(r.push(e),e=N(e+t),e!==i);)i=e;return r},getLogTickPositions:function(t,e,n,i){var r=this.options,o=this.len,s=[];if(i||(this._minorAutoInterval=null),t>=.5)t=fe(t),s=this.getLinearTickPositions(t,e,n);else if(t>=.08)for(var h,u,c,d,p,o=pe(e),r=t>.3?[1,2,4]:t>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];n+1>o&&!p;o++)for(u=r.length,h=0;u>h&&!p;h++)c=a(l(o)*r[h]),c>e&&(!i||n>=d)&&s.push(d),d>n&&(p=!0),d=c;else e=l(e),n=l(n),t=r[i?"minorTickInterval":"tickInterval"],t=f("auto"===t?null:t,this._minorAutoInterval,(n-e)*(r.tickPixelInterval/(i?5:1))/((i?o/this.tickPositions.length:o)||1)),t=k(t,null,w(t)),s=an(this.getLinearTickPositions(t,e,n),a),i||(this._minorAutoInterval=t/5);return i||(this.tickInterval=t),s},getMinorTickPositions:function(){var t,e=this.options,n=this.tickPositions,i=this.minorTickInterval,r=[];if(this.isLog)for(t=n.length,e=1;t>e;e++)r=r.concat(this.getLogTickPositions(i,n[e-1],n[e],!0));else if(this.isDatetimeAxis&&"auto"===e.minorTickInterval)r=r.concat(C(S(i),this.min,this.max,e.startOfWeek)),r[0]<this.min&&r.shift();else for(n=this.min+(n[0]-this.min)%i;n<=this.max;n+=i)r.push(n);return r},adjustForMinRange:function(){var t,e,n,i,r,o,s=this.options,a=this.min,l=this.max,h=this.dataMax-this.dataMin>=this.minRange;if(this.isXAxis&&this.minRange===X&&!this.isLog&&(u(s.min)||u(s.max)?this.minRange=null:(rn(this.series,function(t){for(r=t.xData,n=o=t.xIncrement?1:r.length-1;n>0;n--)i=r[n]-r[n-1],(e===X||e>i)&&(e=i)}),this.minRange=ve(5*e,this.dataMax-this.dataMin))),l-a<this.minRange){var c=this.minRange;t=(c-l+a)/2,t=[a-t,f(s.min,a-t)],h&&(t[2]=this.dataMin),a=L(t),l=[a+c,f(s.max,a+c)],h&&(l[2]=this.dataMax),l=A(l),c>l-a&&(t[0]=l-c,t[1]=f(s.min,l-c),a=L(t))}this.min=a,this.max=l},setAxisTranslation:function(t){var e,n=this.max-this.min,r=0,o=0,s=0,a=this.linkedParent,l=this.transA;this.isXAxis&&(a?(o=a.minPointOffset,s=a.pointRangePadding):rn(this.series,function(t){var a=t.pointRange,l=t.options.pointPlacement,h=t.closestPointRange;a>n&&(a=0),r=me(r,a),o=me(o,i(l)?0:a/2),s=me(s,"on"===l?0:a),!t.noSharedTooltip&&u(h)&&(e=u(e)?ve(e,h):h)}),a=this.ordinalSlope&&e?this.ordinalSlope/e:1,this.minPointOffset=o*=a,this.pointRangePadding=s*=a,this.pointRange=ve(r,n),this.closestPointRange=e),t&&(this.oldTransA=l),this.translationSlope=this.transA=l=this.len/(n+s||1),this.transB=this.horiz?this.left:this.bottom,this.minPixelPadding=l*o},setTickPositions:function(t){var e,n=this,i=n.chart,r=n.options,o=n.isLog,s=n.isDatetimeAxis,l=n.isXAxis,h=n.isLinked,c=n.options.tickPositioner,d=r.maxPadding,p=r.minPadding,g=r.tickInterval,m=r.minTickInterval,v=r.tickPixelInterval,y=n.categories;h?(n.linkedParent=i[l?"xAxis":"yAxis"][r.linkedTo],i=n.linkedParent.getExtremes(),n.min=f(i.min,i.dataMin),n.max=f(i.max,i.dataMax),r.type!==n.linkedParent.options.type&&_(11,1)):(n.min=f(n.userMin,r.min,n.dataMin),n.max=f(n.userMax,r.max,n.dataMax)),o&&(!t&&ve(n.min,f(n.dataMin,n.min))<=0&&_(10,1),n.min=N(a(n.min)),n.max=N(a(n.max))),n.range&&(n.userMin=n.min=me(n.min,n.max-n.range),n.userMax=n.max,t)&&(n.range=null),n.beforePadding&&n.beforePadding(),n.adjustForMinRange(),!y&&!n.usePercentage&&!h&&u(n.min)&&u(n.max)&&(i=n.max-n.min)&&(u(r.min)||u(n.userMin)||!p||!(n.dataMin<0)&&n.ignoreMinPadding||(n.min-=i*p),u(r.max)||u(n.userMax)||!d||!(n.dataMax>0)&&n.ignoreMaxPadding||(n.max+=i*d)),n.min===n.max||void 0===n.min||void 0===n.max?n.tickInterval=1:h&&!g&&v===n.linkedParent.options.tickPixelInterval?n.tickInterval=n.linkedParent.tickInterval:(n.tickInterval=f(g,y?1:(n.max-n.min)*v/me(n.len,v)),!u(g)&&n.len<v&&!this.isRadial&&(e=!0,n.tickInterval/=4)),l&&!t&&rn(n.series,function(t){t.processData(n.min!==n.oldMin||n.max!==n.oldMax)}),n.setAxisTranslation(!0),n.beforeSetTickPositions&&n.beforeSetTickPositions(),n.postProcessTickInterval&&(n.tickInterval=n.postProcessTickInterval(n.tickInterval)),n.pointRange&&(n.tickInterval=me(n.pointRange,n.tickInterval)),!g&&n.tickInterval<m&&(n.tickInterval=m),s||o||g||(n.tickInterval=k(n.tickInterval,null,w(n.tickInterval),r)),n.minorTickInterval="auto"===r.minorTickInterval&&n.tickInterval?n.tickInterval/5:r.minorTickInterval,n.tickPositions=t=r.tickPositions?[].concat(r.tickPositions):c&&c.apply(n,[n.min,n.max]),t||(!n.ordinalPositions&&(n.max-n.min)/n.tickInterval>me(2*n.len,200)&&_(19,!0),t=s?(n.getNonLinearTimeTicks||C)(S(n.tickInterval,r.units),n.min,n.max,r.startOfWeek,n.ordinalPositions,n.closestPointRange,!0):o?n.getLogTickPositions(n.tickInterval,n.min,n.max):n.getLinearTickPositions(n.tickInterval,n.min,n.max),e&&t.splice(1,t.length-2),n.tickPositions=t),h||(o=t[0],s=t[t.length-1],h=n.minPointOffset||0,r.startOnTick?n.min=o:n.min-h>o&&t.shift(),r.endOnTick?n.max=s:n.max+h<s&&t.pop(),1===t.length&&(n.min-=.001,n.max+=.001))},setMaxTicks:function(){var t=this.chart,e=t.maxTicks||{},n=this.tickPositions,i=this._maxTicksKey=[this.xOrY,this.pos,this.len].join("-");!this.isLinked&&!this.isDatetimeAxis&&n&&n.length>(e[i]||0)&&this.options.alignTicks!==!1&&(e[i]=n.length),t.maxTicks=e},adjustTickAmount:function(){var t=this._maxTicksKey,e=this.tickPositions,n=this.chart.maxTicks;if(n&&n[t]&&!this.isDatetimeAxis&&!this.categories&&!this.isLinked&&this.options.alignTicks!==!1){var i=this.tickAmount,r=e.length;if(this.tickAmount=t=n[t],t>r){for(;e.length<t;)e.push(N(e[e.length-1]+this.tickInterval));this.transA*=(r-1)/(t-1),this.max=e[e.length-1]}u(i)&&t!==i&&(this.isDirty=!0)}},setScale:function(){var t,e,n,i,r=this.stacks;if(this.oldMin=this.min,this.oldMax=this.max,this.oldAxisLength=this.len,this.setAxisSize(),i=this.len!==this.oldAxisLength,rn(this.series,function(t){(t.isDirtyData||t.isDirty||t.xAxis.isDirty)&&(n=!0)}),i||n||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax){if(!this.isXAxis)for(t in r)delete r[t];this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickPositions(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=i||this.min!==this.oldMin||this.max!==this.oldMax)}else if(!this.isXAxis){this.oldStacks&&(r=this.stacks=this.oldStacks);for(t in r)for(e in r[t])r[t][e].cum=r[t][e].total}this.setMaxTicks()},setExtremes:function(e,n,i,r,o){var s=this,a=s.chart,i=f(i,!0),o=t(o,{min:e,max:n});un(s,"setExtremes",o,function(){s.userMin=e,s.userMax=n,s.eventArgs=o,s.isDirtyExtremes=!0,i&&a.redraw(r)})},zoom:function(t,e){return this.allowZoomOutside||(u(this.dataMin)&&t<=this.dataMin&&(t=X),u(this.dataMax)&&e>=this.dataMax&&(e=X)),this.displayBtn=t!==X||e!==X,this.setExtremes(t,e,!1,X,{trigger:"zoom"}),!0},setAxisSize:function(){var t,e,n=this.chart,i=this.options,r=i.offsetLeft||0,o=i.offsetRight||0,s=this.horiz;this.left=e=f(i.left,n.plotLeft+r),this.top=t=f(i.top,n.plotTop),this.width=r=f(i.width,n.plotWidth-r+o),this.height=i=f(i.height,n.plotHeight),this.bottom=n.chartHeight-i-t,this.right=n.chartWidth-r-e,this.len=me(s?r:i,0),this.pos=s?e:t},getExtremes:function(){var t=this.isLog;return{min:t?N(l(this.min)):this.min,max:t?N(l(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(t){var e=this.isLog,n=e?l(this.min):this.min,e=e?l(this.max):this.max;return n>t||null===t?t=n:t>e&&(t=e),this.translate(t,0,1,0,1)},addPlotBand:function(t){this.addPlotBandOrLine(t,"plotBands")},addPlotLine:function(t){this.addPlotBandOrLine(t,"plotLines")},addPlotBandOrLine:function(t,e){var n=new I(this,t).render(),i=this.userOptions;return n&&(e&&(i[e]=i[e]||[],i[e].push(t)),this.plotLinesAndBands.push(n)),n},autoLabelAlign:function(t){return t=(f(t,0)-90*this.side+720)%360,t>15&&165>t?"right":t>195&&345>t?"left":"center"},getOffset:function(){var t,e,n,i,r,o,s,a=this,l=a.chart,h=l.renderer,c=a.options,d=a.tickPositions,p=a.ticks,g=a.horiz,m=a.side,v=l.inverted?[1,0,3,2][m]:m,y=0,x=0,b=c.title,w=c.labels,k=0,S=l.axisOffset,C=l.clipOffset,M=[-1,1,1,-1][m],T=1,A=f(w.maxStaggerLines,5);if(a.hasData=t=a.hasVisibleSeries||u(a.min)&&u(a.max)&&!!d,a.showAxis=l=t||f(c.showEmpty,!0),a.staggerLines=a.horiz&&w.staggerLines,a.axisGroup||(a.gridGroup=h.g("grid").attr({zIndex:c.gridZIndex||1}).add(),a.axisGroup=h.g("axis").attr({zIndex:c.zIndex||2}).add(),a.labelGroup=h.g("axis-labels").attr({zIndex:w.zIndex||7}).add()),t||a.isLinked){if(a.labelAlign=f(w.align||a.autoLabelAlign(w.rotation)),rn(d,function(t){p[t]?p[t].addLabel():p[t]=new O(a,t)}),a.horiz&&!a.staggerLines&&A&&!w.rotation){for(n=a.reversed?[].concat(d).reverse():d;A>T;){for(t=[],i=!1,w=0;w<n.length;w++)r=n[w],o=(o=p[r].label&&p[r].label.getBBox())?o.width:0,s=w%T,o&&(r=a.translate(r),t[s]!==X&&r<t[s]&&(i=!0),t[s]=r+o);if(!i)break;T++}T>1&&(a.staggerLines=T)}rn(d,function(t){(0===m||2===m||{1:"left",3:"right"}[m]===a.labelAlign)&&(k=me(p[t].getLabelSize(),k))}),a.staggerLines&&(k*=a.staggerLines,a.labelOffset=k)}else for(n in p)p[n].destroy(),delete p[n];b&&b.text&&b.enabled!==!1&&(a.axisTitle||(a.axisTitle=h.text(b.text,0,0,b.useHTML).attr({zIndex:7,rotation:b.rotation||0,align:b.textAlign||{low:"left",middle:"center",high:"right"}[b.align]}).css(b.style).add(a.axisGroup),a.axisTitle.isNew=!0),l&&(y=a.axisTitle.getBBox()[g?"height":"width"],x=f(b.margin,g?5:10),e=b.offset),a.axisTitle[l?"show":"hide"]()),a.offset=M*f(c.offset,S[m]),a.axisTitleMargin=f(e,k+x+(2!==m&&k&&M*c.labels[g?"y":"x"])),S[m]=me(S[m],a.axisTitleMargin+y+M*a.offset),C[v]=me(C[v],2*pe(c.lineWidth/2))},getLinePath:function(t){var e=this.chart,n=this.opposite,i=this.offset,r=this.horiz,o=this.left+(n?this.width:0)+i,i=e.chartHeight-this.bottom-(n?this.height:0)+i;return n&&(t*=-1),e.renderer.crispLine(["M",r?this.left:o,r?i:this.top,"L",r?e.chartWidth-this.right:o,r?i:e.chartHeight-this.bottom],t)},getTitlePosition:function(){var t=this.horiz,e=this.left,i=this.top,r=this.len,o=this.options.title,s=t?e:i,a=this.opposite,l=this.offset,h=n(o.style.fontSize||12),r={low:s+(t?0:r),middle:s+r/2,high:s+(t?r:0)}[o.align],e=(t?i+this.height:e)+(t?1:-1)*(a?-1:1)*this.axisTitleMargin+(2===this.side?h:0);return{x:t?r:e+(a?this.width:0)+l+(o.x||0),y:t?e-(a?this.height:0)+l:r+(o.y||0)}},render:function(){var t,e=this,n=e.chart,i=n.renderer,r=e.options,o=e.isLog,s=e.isLinked,a=e.tickPositions,h=e.axisTitle,c=e.stacks,d=e.ticks,f=e.minorTicks,p=e.alternateBands,g=r.stackLabels,m=r.alternateGridColor,v=e.tickmarkOffset,y=r.lineWidth,x=n.hasRendered&&u(e.oldMin)&&!isNaN(e.oldMin);t=e.hasData;var b,w,k=e.showAxis;if(rn([d,f,p],function(t){for(var e in t)t[e].isActive=!1}),(t||s)&&(e.minorTickInterval&&!e.categories&&rn(e.getMinorTickPositions(),function(t){f[t]||(f[t]=new O(e,t,"minor")),x&&f[t].isNew&&f[t].render(null,!0),f[t].render(null,!1,1)}),a.length&&(rn(a.slice(1).concat([a[0]]),function(t,n){n=n===a.length-1?0:n+1,(!s||t>=e.min&&t<=e.max)&&(d[t]||(d[t]=new O(e,t)),x&&d[t].isNew&&d[t].render(n,!0),d[t].render(n,!1,1))}),v&&0===e.min&&(d[-1]||(d[-1]=new O(e,-1,null,!0)),d[-1].render(-1))),m&&rn(a,function(t,n){0===n%2&&t<e.max&&(p[t]||(p[t]=new I(e)),b=t+v,w=a[n+1]!==X?a[n+1]+v:e.max,p[t].options={from:o?l(b):b,to:o?l(w):w,color:m},p[t].render(),p[t].isActive=!0)
|
|
}),e._addedPlotLB||(rn((r.plotLines||[]).concat(r.plotBands||[]),function(t){e.addPlotBandOrLine(t)}),e._addedPlotLB=!0)),rn([d,f,p],function(t){var e,i,r=[],o=V?V.duration||500:0,s=function(){for(i=r.length;i--;)t[r[i]]&&!t[r[i]].isActive&&(t[r[i]].destroy(),delete t[r[i]])};for(e in t)t[e].isActive||(t[e].render(e,!1,0),t[e].isActive=!1,r.push(e));t!==p&&n.hasRendered&&o?o&&setTimeout(s,o):s()}),y&&(t=e.getLinePath(y),e.axisLine?e.axisLine.animate({d:t}):e.axisLine=i.path(t).attr({stroke:r.lineColor,"stroke-width":y,zIndex:7}).add(e.axisGroup),e.axisLine[k?"show":"hide"]()),h&&k&&(h[h.isNew?"attr":"animate"](e.getTitlePosition()),h.isNew=!1),g&&g.enabled){var S,C,r=e.stackTotalGroup;r||(e.stackTotalGroup=r=i.g("stack-labels").attr({visibility:"visible",zIndex:6}).add()),r.translate(n.plotLeft,n.plotTop);for(S in c)for(C in i=c[S])i[C].render(r)}e.isDirty=!1},removePlotBandOrLine:function(t){for(var e=this.plotLinesAndBands,n=this.options,i=this.userOptions,r=e.length;r--;)e[r].id===t&&e[r].destroy();rn([n.plotLines||[],i.plotLines||[],n.plotBands||[],i.plotBands||[]],function(e){for(r=e.length;r--;)e[r].id===t&&h(e,e[r])})},setTitle:function(t,e){this.update({title:t},e)},redraw:function(){var t=this.chart.pointer;t.reset&&t.reset(!0),this.render(),rn(this.plotLinesAndBands,function(t){t.render()}),rn(this.series,function(t){t.isDirty=!0})},buildStacks:function(){var t=this.series,e=t.length;if(!this.isXAxis){for(;e--;)t[e].setStackedPoints();if(this.usePercentage)for(e=0;e<t.length;e++)t[e].setPercentStacks()}},setCategories:function(t,e){this.update({categories:t},e)},destroy:function(t){var e,n=this,i=n.stacks,r=n.plotLinesAndBands;t||hn(n);for(e in i)P(i[e]),i[e]=null;for(rn([n.ticks,n.minorTicks,n.alternateBands],function(t){P(t)}),t=r.length;t--;)r[t].destroy();rn("stackTotalGroup,axisLine,axisGroup,gridGroup,labelGroup,axisTitle".split(","),function(t){n[t]&&(n[t]=n[t].destroy())})}},F.prototype={init:function(t,e){var i=e.borderWidth,r=e.style,o=n(r.padding);this.chart=t,this.options=e,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.label=t.renderer.label("",0,0,e.shape,null,null,e.useHTML,null,"tooltip").attr({padding:o,fill:e.backgroundColor,"stroke-width":i,r:e.borderRadius,zIndex:8}).css(r).css({padding:0}).add().attr({y:-999}),De||this.label.shadow(e.shadow),this.shared=e.shared},destroy:function(){rn(this.crosshairs,function(t){t&&t.destroy()}),this.label&&(this.label=this.label.destroy()),clearTimeout(this.hideTimer),clearTimeout(this.tooltipTimeout)},move:function(e,n,i,r){var o=this,s=o.now,a=o.options.animation!==!1&&!o.isHidden;t(s,{x:a?(2*s.x+e)/3:e,y:a?(s.y+n)/2:n,anchorX:a?(2*s.anchorX+i)/3:i,anchorY:a?(s.anchorY+r)/2:r}),o.label.attr(s),a&&(ye(e-s.x)>1||ye(n-s.y)>1)&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){o&&o.move(e,n,i,r)},32))},hide:function(){var t,e=this;clearTimeout(this.hideTimer),this.isHidden||(t=this.chart.hoverPoints,this.hideTimer=setTimeout(function(){e.label.fadeOut(),e.isHidden=!0},f(this.options.hideDelay,500)),t&&rn(t,function(t){t.setState()}),this.chart.hoverPoints=null)},hideCrosshairs:function(){rn(this.crosshairs,function(t){t&&t.hide()})},getAnchor:function(t,e){var n,i,r=this.chart,o=r.inverted,s=r.plotTop,a=0,l=0,t=d(t);return n=t[0].tooltipPos,this.followPointer&&e&&(e.chartX===X&&(e=r.pointer.normalize(e)),n=[e.chartX-r.plotLeft,e.chartY-s]),n||(rn(t,function(t){i=t.series.yAxis,a+=t.plotX,l+=(t.plotLow?(t.plotLow+t.plotHigh)/2:t.plotY)+(!o&&i?i.top-s:0)}),a/=t.length,l/=t.length,n=[o?r.plotWidth-l:a,this.shared&&!o&&t.length>1&&e?e.chartY-s:o?r.plotHeight-a:l]),an(n,fe)},getPosition:function(t,e,n){var i,r=this.chart,o=r.plotLeft,s=r.plotTop,a=r.plotWidth,l=r.plotHeight,h=f(this.options.distance,12),u=n.plotX,n=n.plotY,r=u+o+(r.inverted?h:-t-h),c=n-e+s+15;return 7>r&&(r=o+me(u,0)+h),r+t>o+a&&(r-=r+t-(o+a),c=n-e+s-h,i=!0),s+5>c&&(c=s+5,i&&n>=c&&c+e>=n&&(c=n+s+h)),c+e>s+l&&(c=me(s,s+l-e-h)),{x:r,y:c}},defaultFormatter:function(t){var e,n=this.points||d(this),i=n[0].series;return e=[i.tooltipHeaderFormatter(n[0])],rn(n,function(t){i=t.series,e.push(i.tooltipFormatter&&i.tooltipFormatter(t)||t.point.tooltipFormatter(i.tooltipOptions.pointFormat))}),e.push(t.options.footerFormat||""),e.join("")},refresh:function(t,e){var n,i,r,o=this.chart,s=this.label,l=this.options,h={},u=[];r=l.formatter||this.defaultFormatter;var c,h=o.hoverPoints,p=l.crosshairs,g=this.shared;if(clearTimeout(this.hideTimer),this.followPointer=d(t)[0].series.tooltipOptions.followPointer,i=this.getAnchor(t,e),n=i[0],i=i[1],!g||t.series&&t.series.noSharedTooltip?h=t.getLabelConfig():(o.hoverPoints=t,h&&rn(h,function(t){t.setState()}),rn(t,function(t){t.setState("hover"),u.push(t.getLabelConfig())}),h={x:t[0].category,y:t[0].y},h.points=u,t=t[0]),r=r.call(h,this),h=t.series,r===!1?this.hide():(this.isHidden&&(fn(s),s.attr("opacity",1).show()),s.attr({text:r}),c=l.borderColor||t.color||h.color||"#606060",s.attr({stroke:c}),this.updatePosition({plotX:n,plotY:i}),this.isHidden=!1),p)for(p=d(p),s=p.length;s--;)g=t.series,l=g[s?"yAxis":"xAxis"],p[s]&&l&&(h=s?f(t.stackY,t.y):t.x,l.isLog&&(h=a(h)),1===s&&g.modifyValue&&(h=g.modifyValue(h)),l=l.getPlotLinePath(h,1),this.crosshairs[s]?this.crosshairs[s].attr({d:l,visibility:"visible"}):(h={"stroke-width":p[s].width||1,stroke:p[s].color||"#C0C0C0",zIndex:p[s].zIndex||2},p[s].dashStyle&&(h.dashstyle=p[s].dashStyle),this.crosshairs[s]=o.renderer.path(l).attr(h).add()));un(o,"tooltipRefresh",{text:r,x:n+o.plotLeft,y:i+o.plotTop,borderColor:c})},updatePosition:function(t){var e=this.chart,n=this.label,n=(this.options.positioner||this.getPosition).call(this,n.width,n.height,t);this.move(fe(n.x),fe(n.y),t.plotX+e.plotLeft,t.plotY+e.plotTop)}},j.prototype={init:function(t,e){var n,i=e.chart,r=i.events,o=De?"":i.zoomType,i=t.inverted;this.options=e,this.chart=t,this.zoomX=n=/x/.test(o),this.zoomY=o=/y/.test(o),this.zoomHor=n&&!i||o&&i,this.zoomVert=o&&!i||n&&i,this.runChartClick=r&&!!r.click,this.pinchDown=[],this.lastValidTouch={},e.tooltip.enabled&&(t.tooltip=new F(t,e.tooltip)),this.setDOMEvents()},normalize:function(e,n){var i,r,e=e||ce.event;return e.target||(e.target=e.srcElement),e=cn(e),r=e.touches?e.touches.item(0):e,n||(this.chartPosition=n=sn(this.chart.container)),r.pageX===X?(i=me(e.x,e.clientX-n.left),r=e.y):(i=r.pageX-n.left,r=r.pageY-n.top),t(e,{chartX:fe(i),chartY:fe(r)})},getCoordinates:function(t){var e={xAxis:[],yAxis:[]};return rn(this.chart.axes,function(n){e[n.isXAxis?"xAxis":"yAxis"].push({axis:n,value:n.toValue(t[n.horiz?"chartX":"chartY"])})}),e},getIndex:function(t){var e=this.chart;return e.inverted?e.plotHeight+e.plotTop-t.chartY:t.chartX-e.plotLeft},runPointActions:function(t){var e,n,i,r=this.chart,o=r.series,s=r.tooltip,a=r.hoverPoint,l=r.hoverSeries,h=r.chartWidth,u=this.getIndex(t);if(s&&this.options.tooltip.shared&&(!l||!l.noSharedTooltip)){for(e=[],n=o.length,i=0;n>i;i++)o[i].visible&&o[i].options.enableMouseTracking!==!1&&!o[i].noSharedTooltip&&o[i].tooltipPoints.length&&(r=o[i].tooltipPoints[u])&&r.series&&(r._dist=ye(u-r.clientX),h=ve(h,r._dist),e.push(r));for(n=e.length;n--;)e[n]._dist>h&&e.splice(n,1);e.length&&e[0].clientX!==this.hoverX&&(s.refresh(e,t),this.hoverX=e[0].clientX)}l&&l.tracker?(r=l.tooltipPoints[u])&&r!==a&&r.onMouseOver(t):s&&s.followPointer&&!s.isHidden&&(t=s.getAnchor([{}],t),s.updatePosition({plotX:t[0],plotY:t[1]}))},reset:function(t){var e=this.chart,n=e.hoverSeries,i=e.hoverPoint,r=e.tooltip,e=r&&r.shared?e.hoverPoints:i;(t=t&&r&&e)&&d(e)[0].plotX===X&&(t=!1),t?r.refresh(e):(i&&i.onMouseOut(),n&&n.onMouseOut(),r&&(r.hide(),r.hideCrosshairs()),this.hoverX=null)},scaleGroups:function(t,e){var n,i=this.chart;rn(i.series,function(r){n=t||r.getPlotBox(),r.xAxis&&r.xAxis.zoomEnabled&&(r.group.attr(n),r.markerGroup&&(r.markerGroup.attr(n),r.markerGroup.clip(e?i.clipRect:null)),r.dataLabelsGroup&&r.dataLabelsGroup.attr(n))}),i.clipRect.attr(e||i.clipBox)},pinchTranslateDirection:function(t,e,n,i,r,o,s){var a,l,h,u=this.chart,c=t?"x":"y",d=t?"X":"Y",f="chart"+d,p=t?"width":"height",g=u["plot"+(t?"Left":"Top")],m=1,v=u.inverted,y=u.bounds[t?"h":"v"],x=1===e.length,b=e[0][f],w=n[0][f],k=!x&&e[1][f],S=!x&&n[1][f],n=function(){!x&&ye(b-k)>20&&(m=ye(w-S)/ye(b-k)),l=(g-w)/m+b,a=u["plot"+(t?"Width":"Height")]/m};n(),e=l,e<y.min?(e=y.min,h=!0):e+a>y.max&&(e=y.max-a,h=!0),h?(w-=.8*(w-s[c][0]),x||(S-=.8*(S-s[c][1])),n()):s[c]=[w,S],v||(o[c]=l-g,o[p]=a),o=v?1/m:m,r[p]=a,r[c]=e,i[v?t?"scaleY":"scaleX":"scale"+d]=m,i["translate"+d]=o*g+(w-o*b)},pinch:function(e){var n=this,i=n.chart,r=n.pinchDown,o=i.tooltip&&i.tooltip.options.followTouchMove,s=e.touches,a=s.length,l=n.lastValidTouch,h=n.zoomHor||n.pinchHor,u=n.zoomVert||n.pinchVert,c=h||u,d=n.selectionMarker,f={},p=1===a&&(n.inClass(e.target,"highcharts-tracker")&&i.runTrackerClick||i.runChartClick),g={};(c||o)&&!p&&e.preventDefault(),an(s,function(t){return n.normalize(t)}),"touchstart"===e.type?(rn(s,function(t,e){r[e]={chartX:t.chartX,chartY:t.chartY}}),l.x=[r[0].chartX,r[1]&&r[1].chartX],l.y=[r[0].chartY,r[1]&&r[1].chartY],rn(i.axes,function(t){if(t.zoomEnabled){var e=i.bounds[t.horiz?"h":"v"],n=t.minPixelPadding,r=t.toPixels(t.dataMin),o=t.toPixels(t.dataMax),s=ve(r,o),r=me(r,o);e.min=ve(t.pos,s-n),e.max=me(t.pos+t.len,r+n)}})):r.length&&(d||(n.selectionMarker=d=t({destroy:Ie},i.plotBox)),h&&n.pinchTranslateDirection(!0,r,s,f,d,g,l),u&&n.pinchTranslateDirection(!1,r,s,f,d,g,l),n.hasPinched=c,n.scaleGroups(f,g),!c&&o&&1===a&&this.runPointActions(n.normalize(e)))},dragStart:function(t){var e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=this.mouseDownX=t.chartX,e.mouseDownY=this.mouseDownY=t.chartY},drag:function(t){var e,n=this.chart,i=n.options.chart,r=t.chartX,o=t.chartY,s=this.zoomHor,a=this.zoomVert,l=n.plotLeft,h=n.plotTop,u=n.plotWidth,c=n.plotHeight,d=this.mouseDownX,f=this.mouseDownY;l>r?r=l:r>l+u&&(r=l+u),h>o?o=h:o>h+c&&(o=h+c),this.hasDragged=Math.sqrt(Math.pow(d-r,2)+Math.pow(f-o,2)),this.hasDragged>10&&(e=n.isInsidePlot(d-l,f-h),n.hasCartesianSeries&&(this.zoomX||this.zoomY)&&e&&!this.selectionMarker&&(this.selectionMarker=n.renderer.rect(l,h,s?1:u,a?1:c,0).attr({fill:i.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add()),this.selectionMarker&&s&&(r-=d,this.selectionMarker.attr({width:ye(r),x:(r>0?0:r)+d})),this.selectionMarker&&a&&(r=o-f,this.selectionMarker.attr({height:ye(r),y:(r>0?0:r)+f})),e&&!this.selectionMarker&&i.panning&&n.pan(t,i.panning))},drop:function(e){var n=this.chart,i=this.hasPinched;if(this.selectionMarker){var r,o={xAxis:[],yAxis:[],originalEvent:e.originalEvent||e},s=this.selectionMarker,a=s.x,l=s.y;(this.hasDragged||i)&&(rn(n.axes,function(t){if(t.zoomEnabled){var e=t.horiz,n=t.toValue(e?a:l),e=t.toValue(e?a+s.width:l+s.height);!isNaN(n)&&!isNaN(e)&&(o[t.xOrY+"Axis"].push({axis:t,min:ve(n,e),max:me(n,e)}),r=!0)}}),r&&un(n,"selection",o,function(e){n.zoom(t(e,i?{animation:!1}:null))})),this.selectionMarker=this.selectionMarker.destroy(),i&&this.scaleGroups()}n&&(p(n.container,{cursor:n._cursor}),n.cancelClick=this.hasDragged>10,n.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(t){t=this.normalize(t),t.preventDefault&&t.preventDefault(),this.dragStart(t)},onDocumentMouseUp:function(t){this.drop(t)},onDocumentMouseMove:function(t){var e=this.chart,n=this.chartPosition,i=e.hoverSeries,t=this.normalize(t,n);n&&i&&!this.inClass(t.target,"highcharts-tracker")&&!e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)&&this.reset()},onContainerMouseLeave:function(){this.reset(),this.chartPosition=null},onContainerMouseMove:function(t){var e=this.chart,t=this.normalize(t);t.returnValue=!1,"mousedown"===e.mouseIsDown&&this.drag(t),(this.inClass(t.target,"highcharts-tracker")||e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop))&&!e.openMenu&&this.runPointActions(t)},inClass:function(t,e){for(var n;t;){if(n=c(t,"class")){if(-1!==n.indexOf(e))return!0;if(-1!==n.indexOf("highcharts-container"))return!1}t=t.parentNode}},onTrackerMouseOut:function(t){var e=this.chart.hoverSeries;!e||e.options.stickyTracking||this.inClass(t.toElement||t.relatedTarget,"highcharts-tooltip")||e.onMouseOut()},onContainerClick:function(e){var n,i,r,o=this.chart,s=o.hoverPoint,a=o.plotLeft,l=o.plotTop,h=o.inverted,e=this.normalize(e);e.cancelBubble=!0,o.cancelClick||(s&&this.inClass(e.target,"highcharts-tracker")?(n=this.chartPosition,i=s.plotX,r=s.plotY,t(s,{pageX:n.left+a+(h?o.plotWidth-r:i),pageY:n.top+l+(h?o.plotHeight-i:r)}),un(s.series,"click",t(e,{point:s})),o.hoverPoint&&s.firePointEvent("click",e)):(t(e,this.getCoordinates(e)),o.isInsidePlot(e.chartX-a,e.chartY-l)&&un(o,"click",e)))},onContainerTouchStart:function(t){var e=this.chart;1===t.touches.length?(t=this.normalize(t),e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)?(this.runPointActions(t),this.pinch(t)):this.reset()):2===t.touches.length&&this.pinch(t)},onContainerTouchMove:function(t){(1===t.touches.length||2===t.touches.length)&&this.pinch(t)},onDocumentTouchEnd:function(t){this.drop(t)},setDOMEvents:function(){var t,e=this,n=e.chart.container;this._events=t=[[n,"onmousedown","onContainerMouseDown"],[n,"onmousemove","onContainerMouseMove"],[n,"onclick","onContainerClick"],[n,"mouseleave","onContainerMouseLeave"],[ue,"mousemove","onDocumentMouseMove"],[ue,"mouseup","onDocumentMouseUp"]],Re&&t.push([n,"ontouchstart","onContainerTouchStart"],[n,"ontouchmove","onContainerTouchMove"],[ue,"touchend","onDocumentTouchEnd"]),rn(t,function(t){e["_"+t[2]]=function(n){e[t[2]](n)},0===t[1].indexOf("on")?t[0][t[1]]=e["_"+t[2]]:ln(t[0],t[1],e["_"+t[2]])})},destroy:function(){var t=this;rn(t._events,function(e){0===e[1].indexOf("on")?e[0][e[1]]=null:hn(e[0],e[1],t["_"+e[2]])}),delete t._events,clearInterval(t.tooltipTimeout)}},W.prototype={init:function(t,i){var r=this,o=i.itemStyle,s=f(i.padding,8),a=i.itemMarginTop||0;this.options=i,i.enabled&&(r.baseline=n(o.fontSize)+3+a,r.itemStyle=o,r.itemHiddenStyle=e(o,i.itemHiddenStyle),r.itemMarginTop=a,r.padding=s,r.initialItemX=s,r.initialItemY=s-5,r.maxItemWidth=0,r.chart=t,r.itemHeight=0,r.lastLineHeight=0,r.render(),ln(r.chart,"endResize",function(){r.positionCheckboxes()}))},colorizeItem:function(t,e){var n,i=this.options,r=t.legendItem,o=t.legendLine,s=t.legendSymbol,a=this.itemHiddenStyle.color,i=e?i.itemStyle.color:a,l=e?t.color:a,a=t.options&&t.options.marker,h={stroke:l,fill:l};if(r&&r.css({fill:i,color:i}),o&&o.attr({stroke:l}),s){if(a&&s.isMarker)for(n in a=t.convertAttribs(a))r=a[n],r!==X&&(h[n]=r);s.attr(h)}},positionItem:function(t){var e=this.options,n=e.symbolPadding,e=!e.rtl,i=t._legendItemPos,r=i[0],i=i[1],o=t.checkbox;t.legendGroup&&t.legendGroup.translate(e?r:this.legendWidth-r-2*n-4,i),o&&(o.x=r,o.y=i)},destroyItem:function(t){var e=t.checkbox;rn(["legendItem","legendLine","legendSymbol","legendGroup"],function(e){t[e]&&(t[e]=t[e].destroy())}),e&&E(t.checkbox)},destroy:function(){var t=this.group,e=this.box;e&&(this.box=e.destroy()),t&&(this.group=t.destroy())},positionCheckboxes:function(t){var e,n=this.group.alignAttr,i=this.clipHeight||this.legendHeight;n&&(e=n.translateY,rn(this.allItems,function(r){var o,s=r.checkbox;s&&(o=e+s.y+(t||0)+3,p(s,{left:n.translateX+r.legendItemWidth+s.x-20+"px",top:o+"px",display:o>e-6&&e+i-6>o?"":Fe}))}))},renderTitle:function(){var t=this.padding,e=this.options.title,n=0;e.text&&(this.title||(this.title=this.chart.renderer.label(e.text,t-3,t-4,null,null,null,null,null,"legend-title").attr({zIndex:1}).css(e.style).add(this.group)),t=this.title.getBBox(),n=t.height,this.offsetWidth=t.width,this.contentGroup.attr({translateY:n})),this.titleHeight=n},renderItem:function(t){var n,i=this,r=i.chart,o=r.renderer,s=i.options,a="horizontal"===s.layout,l=s.symbolWidth,h=s.symbolPadding,u=i.itemStyle,c=i.itemHiddenStyle,d=i.padding,p=a?f(s.itemDistance,8):0,m=!s.rtl,v=s.width,y=s.itemMarginBottom||0,x=i.itemMarginTop,w=i.initialItemX,k=t.legendItem,S=t.series||t,C=S.options,M=C.showCheckbox,T=s.useHTML;!k&&(t.legendGroup=o.g("legend-item").attr({zIndex:1}).add(i.scrollGroup),S.drawLegendSymbol(i,t),t.legendItem=k=o.text(s.labelFormat?b(s.labelFormat,t):s.labelFormatter.call(t),m?l+h:-h,i.baseline,T).css(e(t.visible?u:c)).attr({align:m?"left":"right",zIndex:2}).add(t.legendGroup),(T?k:t.legendGroup).on("mouseover",function(){t.setState("hover"),k.css(i.options.itemHoverStyle)}).on("mouseout",function(){k.css(t.visible?u:c),t.setState()}).on("click",function(e){var n=function(){t.setVisible()},e={browserEvent:e};t.firePointEvent?t.firePointEvent("legendItemClick",e,n):un(t,"legendItemClick",e,n)}),i.colorizeItem(t,t.visible),C&&M)&&(t.checkbox=g("input",{type:"checkbox",checked:t.selected,defaultChecked:t.selected},s.itemCheckboxStyle,r.container),ln(t.checkbox,"click",function(e){un(t,"checkboxClick",{checked:e.target.checked},function(){t.select()})})),o=k.getBBox(),n=t.legendItemWidth=s.itemWidth||l+h+o.width+p+(M?20:0),s=n,i.itemHeight=l=o.height,a&&i.itemX-w+s>(v||r.chartWidth-2*d-w)&&(i.itemX=w,i.itemY+=x+i.lastLineHeight+y,i.lastLineHeight=0),i.maxItemWidth=me(i.maxItemWidth,s),i.lastItemY=x+i.itemY+y,i.lastLineHeight=me(l,i.lastLineHeight),t._legendItemPos=[i.itemX,i.itemY],a?i.itemX+=s:(i.itemY+=x+l+y,i.lastLineHeight=l),i.offsetWidth=v||me((a?i.itemX-w-p:s)+d,i.offsetWidth)},render:function(){var e,n,i,r,o=this,s=o.chart,a=s.renderer,l=o.group,h=o.box,c=o.options,d=o.padding,f=c.borderWidth,p=c.backgroundColor;o.itemX=o.initialItemX,o.itemY=o.initialItemY,o.offsetWidth=0,o.lastItemY=0,l||(o.group=l=a.g("legend").attr({zIndex:7}).add(),o.contentGroup=a.g().attr({zIndex:1}).add(l),o.scrollGroup=a.g().add(o.contentGroup)),o.renderTitle(),e=[],rn(s.series,function(t){var n=t.options;n.showInLegend&&!u(n.linkedTo)&&(e=e.concat(t.legendItems||("point"===n.legendType?t.data:t)))}),T(e,function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)}),c.reversed&&e.reverse(),o.allItems=e,o.display=n=!!e.length,rn(e,function(t){o.renderItem(t)}),i=c.width||o.offsetWidth,r=o.lastItemY+o.lastLineHeight+o.titleHeight,r=o.handleOverflow(r),(f||p)&&(i+=d,r+=d,h?i>0&&r>0&&(h[h.isNew?"attr":"animate"](h.crisp(null,null,null,i,r)),h.isNew=!1):(o.box=h=a.rect(0,0,i,r,c.borderRadius,f||0).attr({stroke:c.borderColor,"stroke-width":f||0,fill:p||Fe}).add(l).shadow(c.shadow),h.isNew=!0),h[n?"show":"hide"]()),o.legendWidth=i,o.legendHeight=r,rn(e,function(t){o.positionItem(t)}),n&&l.align(t({width:i,height:r},c),!0,"spacingBox"),s.isResizing||this.positionCheckboxes()},handleOverflow:function(t){var e=this,n=this.chart,i=n.renderer,r=this.options,o=r.y,o=n.spacingBox.height+("top"===r.verticalAlign?-o:o)-this.padding,s=r.maxHeight,a=this.clipRect,l=r.navigation,h=f(l.animation,!0),u=l.arrowSize||12,c=this.nav;return"horizontal"===r.layout&&(o/=2),s&&(o=ve(o,s)),t>o&&!r.useHTML?(this.clipHeight=n=o-20-this.titleHeight,this.pageCount=ge(t/n),this.currentPage=f(this.currentPage,1),this.fullHeight=t,a||(a=e.clipRect=i.clipRect(0,0,9999,0),e.contentGroup.clip(a)),a.attr({height:n}),c||(this.nav=c=i.g().attr({zIndex:1}).add(this.group),this.up=i.symbol("triangle",0,0,u,u).on("click",function(){e.scroll(-1,h)}).add(c),this.pager=i.text("",15,10).css(l.style).add(c),this.down=i.symbol("triangle-down",0,0,u,u).on("click",function(){e.scroll(1,h)}).add(c)),e.scroll(0),t=o):c&&(a.attr({height:n.chartHeight}),c.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t},scroll:function(t,e){var n=this.pageCount,i=this.currentPage+t,r=this.clipHeight,o=this.options.navigation,s=o.activeColor,a=o.inactiveColor,o=this.pager,l=this.padding;i>n&&(i=n),i>0&&(e!==X&&D(e,this.chart),this.nav.attr({translateX:l,translateY:r+7+this.titleHeight,visibility:"visible"}),this.up.attr({fill:1===i?a:s}).css({cursor:1===i?"default":"pointer"}),o.attr({text:i+"/"+this.pageCount}),this.down.attr({x:18+this.pager.getBBox().width,fill:i===n?a:s}).css({cursor:i===n?"default":"pointer"}),r=-ve(r*(i-1),this.fullHeight-r+l)+1,this.scrollGroup.animate({translateY:r}),o.attr({text:i+"/"+n}),this.currentPage=i,this.positionCheckboxes(r))}},/Trident.*?11\.0/.test(Se)&&x(W.prototype,"positionItem",function(t,e){var n=this;setTimeout(function(){t.call(n,e)})}),$.prototype={init:function(t,n){var i,r=t.series;t.series=null,i=e(q,t),i.series=t.series=r,r=i.chart,this.margin=this.splashArray("margin",r),this.spacing=this.splashArray("spacing",r);var o=r.events;this.bounds={h:{},v:{}},this.callback=n,this.isResizing=0,this.options=i,this.axes=[],this.series=[],this.hasCartesianSeries=r.showAxes;var s,a=this;if(a.index=He.length,He.push(a),r.reflow!==!1&&ln(a,"load",function(){a.initReflow()}),o)for(s in o)ln(a,s,o[s]);a.xAxis=[],a.yAxis=[],a.animation=De?!1:f(r.animation,!0),a.pointCount=0,a.counters=new M,a.firstRender()},initSeries:function(t){var e=this.options.chart;return(e=Ke[t.type||e.type||e.defaultSeriesType])||_(17,!0),e=new e,e.init(this,t),e},addSeries:function(t,e,n){var i,r=this;return t&&(e=f(e,!0),un(r,"addSeries",{options:t},function(){i=r.initSeries(t),r.isDirtyLegend=!0,r.linkSeries(),e&&r.redraw(n)})),i},addAxis:function(t,n,i,r){var o=n?"xAxis":"yAxis",s=this.options;new B(this,e(t,{index:this[o].length,isX:n})),s[o]=d(s[o]||{}),s[o].push(t),f(i,!0)&&this.redraw(r)},isInsidePlot:function(t,e,n){var i=n?e:t,t=n?t:e;return i>=0&&i<=this.plotWidth&&t>=0&&t<=this.plotHeight},adjustTickAmounts:function(){this.options.chart.alignTicks!==!1&&rn(this.axes,function(t){t.adjustTickAmount()}),this.maxTicks=null},redraw:function(e){var n,i,r=this.axes,o=this.series,s=this.pointer,a=this.legend,l=this.isDirtyLegend,h=this.isDirtyBox,u=o.length,c=u,d=this.renderer,f=d.isHidden(),p=[];for(D(e,this),f&&this.cloneRenderTo(),this.layOutTitles();c--;)if(e=o[c],e.options.stacking&&(n=!0,e.isDirty)){i=!0;break}if(i)for(c=u;c--;)e=o[c],e.options.stacking&&(e.isDirty=!0);rn(o,function(t){t.isDirty&&"point"===t.options.legendType&&(l=!0)}),l&&a.options.enabled&&(a.render(),this.isDirtyLegend=!1),n&&this.getStacks(),this.hasCartesianSeries&&(this.isResizing||(this.maxTicks=null,rn(r,function(t){t.setScale()})),this.adjustTickAmounts(),this.getMargins(),rn(r,function(t){t.isDirty&&(h=!0)}),rn(r,function(e){e.isDirtyExtremes&&(e.isDirtyExtremes=!1,p.push(function(){un(e,"afterSetExtremes",t(e.eventArgs,e.getExtremes())),delete e.eventArgs})),(h||n)&&e.redraw()})),h&&this.drawChartBox(),rn(o,function(t){t.isDirty&&t.visible&&(!t.isCartesian||t.xAxis)&&t.redraw()}),s&&s.reset&&s.reset(!0),d.draw(),un(this,"redraw"),f&&this.cloneRenderTo(!0),rn(p,function(t){t.call()})},showLoading:function(e){var n=this.options,i=this.loadingDiv,r=n.loading;i||(this.loadingDiv=i=g(Be,{className:"highcharts-loading"},t(r.style,{zIndex:10,display:Fe}),this.container),this.loadingSpan=g("span",null,r.labelStyle,i)),this.loadingSpan.innerHTML=e||n.lang.loading,this.loadingShown||(p(i,{opacity:0,display:"",left:this.plotLeft+"px",top:this.plotTop+"px",width:this.plotWidth+"px",height:this.plotHeight+"px"}),dn(i,{opacity:r.style.opacity},{duration:r.showDuration||0}),this.loadingShown=!0)},hideLoading:function(){var t=this.options,e=this.loadingDiv;e&&dn(e,{opacity:0},{duration:t.loading.hideDuration||100,complete:function(){p(e,{display:Fe})}}),this.loadingShown=!1},get:function(t){var e,n,i=this.axes,r=this.series;for(e=0;e<i.length;e++)if(i[e].options.id===t)return i[e];for(e=0;e<r.length;e++)if(r[e].options.id===t)return r[e];for(e=0;e<r.length;e++)for(n=r[e].points||[],i=0;i<n.length;i++)if(n[i].id===t)return n[i];return null},getAxes:function(){var t=this,e=this.options,n=e.xAxis=d(e.xAxis||{}),e=e.yAxis=d(e.yAxis||{});rn(n,function(t,e){t.index=e,t.isX=!0}),rn(e,function(t,e){t.index=e}),n=n.concat(e),rn(n,function(e){new B(t,e)}),t.adjustTickAmounts()},getSelectedPoints:function(){var t=[];return rn(this.series,function(e){t=t.concat(on(e.points||[],function(t){return t.selected}))}),t},getSelectedSeries:function(){return on(this.series,function(t){return t.selected})},getStacks:function(){var t=this;rn(t.yAxis,function(t){t.stacks&&t.hasVisibleSeries&&(t.oldStacks=t.stacks)}),rn(t.series,function(e){!e.options.stacking||e.visible!==!0&&t.options.chart.ignoreHiddenSeries!==!1||(e.stackKey=e.type+f(e.options.stack,""))})},showResetZoom:function(){var t=this,e=q.lang,n=t.options.chart.resetZoomButton,i=n.theme,r=i.states,o="chart"===n.relativeTo?null:"plotBox";this.resetZoomButton=t.renderer.button(e.resetZoom,null,null,function(){t.zoomOut()},i,r&&r.hover).attr({align:n.position.align,title:e.resetZoomTitle}).add().align(n.position,!1,o)},zoomOut:function(){var t=this;un(t,"selection",{resetSelection:!0},function(){t.zoom()})},zoom:function(t){var e,n,i=this.pointer,o=!1;!t||t.resetSelection?rn(this.axes,function(t){e=t.zoom()}):rn(t.xAxis.concat(t.yAxis),function(t){var n=t.axis,r=n.isXAxis;(i[r?"zoomX":"zoomY"]||i[r?"pinchX":"pinchY"])&&(e=n.zoom(t.min,t.max),n.displayBtn&&(o=!0))}),n=this.resetZoomButton,o&&!n?this.showResetZoom():!o&&r(n)&&(this.resetZoomButton=n.destroy()),e&&this.redraw(f(this.options.chart.animation,t&&t.animation,this.pointCount<100))},pan:function(t,e){var n,i=this,r=i.hoverPoints;r&&rn(r,function(t){t.setState()}),rn("xy"===e?[1,0]:[1],function(e){var r=t[e?"chartX":"chartY"],o=i[e?"xAxis":"yAxis"][0],s=i[e?"mouseDownX":"mouseDownY"],a=(o.pointRange||0)/2,l=o.getExtremes(),h=o.toValue(s-r,!0)+a,s=o.toValue(s+i[e?"plotWidth":"plotHeight"]-r,!0)-a;o.series.length&&h>ve(l.dataMin,l.min)&&s<me(l.dataMax,l.max)&&(o.setExtremes(h,s,!1,!1,{trigger:"pan"}),n=!0),i[e?"mouseDownX":"mouseDownY"]=r}),n&&i.redraw(!1),p(i.container,{cursor:"move"})},setTitle:function(t,n){var i,r,o=this,s=o.options;r=s.title=e(s.title,t),i=s.subtitle=e(s.subtitle,n),s=i,rn([["title",t,r],["subtitle",n,s]],function(t){var e=t[0],n=o[e],i=t[1],t=t[2];n&&i&&(o[e]=n=n.destroy()),t&&t.text&&!n&&(o[e]=o.renderer.text(t.text,0,0,t.useHTML).attr({align:t.align,"class":"highcharts-"+e,zIndex:t.zIndex||4}).css(t.style).add())}),o.layOutTitles()},layOutTitles:function(){var e=0,n=this.title,i=this.subtitle,r=this.options,o=r.title,r=r.subtitle,s=this.spacingBox.width-44;!n||(n.css({width:(o.width||s)+"px"}).align(t({y:15},o),!1,"spacingBox"),o.floating||o.verticalAlign)||(e=n.getBBox().height,e>=18&&25>=e&&(e=15)),i&&(i.css({width:(r.width||s)+"px"}).align(t({y:e+o.margin},r),!1,"spacingBox"),!r.floating&&!r.verticalAlign&&(e=ge(e+i.getBBox().height))),this.titleOffset=e},getChartSize:function(){var t=this.options.chart,e=this.renderToClone||this.renderTo;this.containerWidth=tn(e,"width"),this.containerHeight=tn(e,"height"),this.chartWidth=me(0,t.width||this.containerWidth||600),this.chartHeight=me(0,f(t.height,this.containerHeight>19?this.containerHeight:400))},cloneRenderTo:function(t){var e=this.renderToClone,n=this.container;t?e&&(this.renderTo.appendChild(n),E(e),delete this.renderToClone):(n&&n.parentNode===this.renderTo&&this.renderTo.removeChild(n),this.renderToClone=e=this.renderTo.cloneNode(0),p(e,{position:"absolute",top:"-9999px",display:"block"}),ue.body.appendChild(e),n&&e.appendChild(n))},getContainer:function(){var e,r,o,s,a=this.options.chart;this.renderTo=e=a.renderTo,s="highcharts-"+Oe++,i(e)&&(this.renderTo=e=ue.getElementById(e)),e||_(13,!0),r=n(c(e,"data-highcharts-chart")),!isNaN(r)&&He[r]&&He[r].destroy(),c(e,"data-highcharts-chart",this.index),e.innerHTML="",e.offsetWidth||this.cloneRenderTo(),this.getChartSize(),r=this.chartWidth,o=this.chartHeight,this.container=e=g(Be,{className:"highcharts-container"+(a.className?" "+a.className:""),id:s},t({position:"relative",overflow:"hidden",width:r+"px",height:o+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},a.style),this.renderToClone||e),this._cursor=e.style.cursor,this.renderer=a.forExport?new mn(e,r,o,!0):new Y(e,r,o),De&&this.renderer.create(this,e,r,o)},getMargins:function(){var t,e=this.spacing,n=this.legend,i=this.margin,r=this.options.legend,o=f(r.margin,10),s=r.x,a=r.y,l=r.align,h=r.verticalAlign,c=this.titleOffset;this.resetMargins(),t=this.axisOffset,c&&!u(i[0])&&(this.plotTop=me(this.plotTop,c+this.options.title.margin+e[0])),n.display&&!r.floating&&("right"===l?u(i[1])||(this.marginRight=me(this.marginRight,n.legendWidth-s+o+e[1])):"left"===l?u(i[3])||(this.plotLeft=me(this.plotLeft,n.legendWidth+s+o+e[3])):"top"===h?u(i[0])||(this.plotTop=me(this.plotTop,n.legendHeight+a+o+e[0])):"bottom"!==h||u(i[2])||(this.marginBottom=me(this.marginBottom,n.legendHeight-a+o+e[2]))),this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin),this.extraTopMargin&&(this.plotTop+=this.extraTopMargin),this.hasCartesianSeries&&rn(this.axes,function(t){t.getOffset()}),u(i[3])||(this.plotLeft+=t[3]),u(i[0])||(this.plotTop+=t[0]),u(i[2])||(this.marginBottom+=t[2]),u(i[1])||(this.marginRight+=t[1]),this.setChartSize()},initReflow:function(){function t(t){var o=i.width||tn(r,"width"),s=i.height||tn(r,"height"),t=t?t.target:ce;n.hasUserSize||!o||!s||t!==ce&&t!==ue||((o!==n.containerWidth||s!==n.containerHeight)&&(clearTimeout(e),n.reflowTimeout=e=setTimeout(function(){n.container&&(n.setSize(o,s,!1),n.hasUserSize=null)},100)),n.containerWidth=o,n.containerHeight=s)}var e,n=this,i=n.options.chart,r=n.renderTo;n.reflow=t,ln(ce,"resize",t),ln(n,"destroy",function(){hn(ce,"resize",t)})},setSize:function(t,e,n){var i,r,o,s=this;s.isResizing+=1,o=function(){s&&un(s,"endResize",null,function(){s.isResizing-=1})},D(n,s),s.oldChartHeight=s.chartHeight,s.oldChartWidth=s.chartWidth,u(t)&&(s.chartWidth=i=me(0,fe(t)),s.hasUserSize=!!i),u(e)&&(s.chartHeight=r=me(0,fe(e))),p(s.container,{width:i+"px",height:r+"px"}),s.setChartSize(!0),s.renderer.setSize(i,r,n),s.maxTicks=null,rn(s.axes,function(t){t.isDirty=!0,t.setScale()}),rn(s.series,function(t){t.isDirty=!0}),s.isDirtyLegend=!0,s.isDirtyBox=!0,s.getMargins(),s.redraw(n),s.oldChartHeight=null,un(s,"resize"),V===!1?o():setTimeout(o,V&&V.duration||500)},setChartSize:function(t){var e,n,i,r,o=this.inverted,s=this.renderer,a=this.chartWidth,l=this.chartHeight,h=this.options.chart,u=this.spacing,c=this.clipOffset;this.plotLeft=e=fe(this.plotLeft),this.plotTop=n=fe(this.plotTop),this.plotWidth=i=me(0,fe(a-e-this.marginRight)),this.plotHeight=r=me(0,fe(l-n-this.marginBottom)),this.plotSizeX=o?r:i,this.plotSizeY=o?i:r,this.plotBorderWidth=h.plotBorderWidth||0,this.spacingBox=s.spacingBox={x:u[3],y:u[0],width:a-u[3]-u[1],height:l-u[0]-u[2]},this.plotBox=s.plotBox={x:e,y:n,width:i,height:r},a=2*pe(this.plotBorderWidth/2),o=ge(me(a,c[3])/2),s=ge(me(a,c[0])/2),this.clipBox={x:o,y:s,width:pe(this.plotSizeX-me(a,c[1])/2-o),height:pe(this.plotSizeY-me(a,c[2])/2-s)},t||rn(this.axes,function(t){t.setAxisSize(),t.setAxisTranslation()})},resetMargins:function(){var t=this.spacing,e=this.margin;this.plotTop=f(e[0],t[0]),this.marginRight=f(e[1],t[1]),this.marginBottom=f(e[2],t[2]),this.plotLeft=f(e[3],t[3]),this.axisOffset=[0,0,0,0],this.clipOffset=[0,0,0,0]},drawChartBox:function(){var t,e=this.options.chart,n=this.renderer,i=this.chartWidth,r=this.chartHeight,o=this.chartBackground,s=this.plotBackground,a=this.plotBorder,l=this.plotBGImage,h=e.borderWidth||0,u=e.backgroundColor,c=e.plotBackgroundColor,d=e.plotBackgroundImage,f=e.plotBorderWidth||0,p=this.plotLeft,g=this.plotTop,m=this.plotWidth,v=this.plotHeight,y=this.plotBox,x=this.clipRect,b=this.clipBox;t=h+(e.shadow?8:0),(h||u)&&(o?o.animate(o.crisp(null,null,null,i-t,r-t)):(o={fill:u||Fe},h&&(o.stroke=e.borderColor,o["stroke-width"]=h),this.chartBackground=n.rect(t/2,t/2,i-t,r-t,e.borderRadius,h).attr(o).add().shadow(e.shadow))),c&&(s?s.animate(y):this.plotBackground=n.rect(p,g,m,v,0).attr({fill:c}).add().shadow(e.plotShadow)),d&&(l?l.animate(y):this.plotBGImage=n.image(d,p,g,m,v).add()),x?x.animate({width:b.width,height:b.height}):this.clipRect=n.clipRect(b),f&&(a?a.animate(a.crisp(null,p,g,m,v)):this.plotBorder=n.rect(p,g,m,v,0,-f).attr({stroke:e.plotBorderColor,"stroke-width":f,zIndex:1}).add()),this.isDirtyBox=!1},propFromSeries:function(){var t,e,n,i=this,r=i.options.chart,o=i.options.series;rn(["inverted","angular","polar"],function(s){for(t=Ke[r.type||r.defaultSeriesType],n=i[s]||r[s]||t&&t.prototype[s],e=o&&o.length;!n&&e--;)(t=Ke[o[e].type])&&t.prototype[s]&&(n=!0);i[s]=n})},linkSeries:function(){var t=this,e=t.series;rn(e,function(t){t.linkedSeries.length=0}),rn(e,function(e){var n=e.options.linkedTo;i(n)&&(n=":previous"===n?t.series[e.index-1]:t.get(n))&&(n.linkedSeries.push(e),e.linkedParent=n)})},render:function(){var e,i=this,r=i.axes,o=i.renderer,s=i.options,a=s.labels,l=s.credits;i.setTitle(),i.legend=new W(i,s.legend),i.getStacks(),rn(r,function(t){t.setScale()}),i.getMargins(),i.maxTicks=null,rn(r,function(t){t.setTickPositions(!0),t.setMaxTicks()}),i.adjustTickAmounts(),i.getMargins(),i.drawChartBox(),i.hasCartesianSeries&&rn(r,function(t){t.render()
|
|
}),i.seriesGroup||(i.seriesGroup=o.g("series-group").attr({zIndex:3}).add()),rn(i.series,function(t){t.translate(),t.setTooltipPoints(),t.render()}),a.items&&rn(a.items,function(e){var r=t(a.style,e.style),s=n(r.left)+i.plotLeft,l=n(r.top)+i.plotTop+12;delete r.left,delete r.top,o.text(e.html,s,l).attr({zIndex:2}).css(r).add()}),l.enabled&&!i.credits&&(e=l.href,i.credits=o.text(l.text,0,0).on("click",function(){e&&(location.href=e)}).attr({align:l.position.align,zIndex:8}).css(l.style).add().align(l.position)),i.hasRendered=!0},destroy:function(){var t,e=this,n=e.axes,i=e.series,r=e.container,o=r&&r.parentNode;for(un(e,"destroy"),He[e.index]=X,e.renderTo.removeAttribute("data-highcharts-chart"),hn(e),t=n.length;t--;)n[t]=n[t].destroy();for(t=i.length;t--;)i[t]=i[t].destroy();rn("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","),function(t){var n=e[t];n&&n.destroy&&(e[t]=n.destroy())}),r&&(r.innerHTML="",hn(r),o&&E(r));for(t in e)delete e[t]},isReadyToRender:function(){var t=this;return!_e&&ce==ce.top&&"complete"!==ue.readyState||De&&!ce.canvg?(De?xn.push(function(){t.firstRender()},t.options.global.canvasToolsURL):ue.attachEvent("onreadystatechange",function(){ue.detachEvent("onreadystatechange",t.firstRender),"complete"===ue.readyState&&t.firstRender()}),!1):!0},firstRender:function(){var t=this,e=t.options,n=t.callback;t.isReadyToRender()&&(t.getContainer(),un(t,"init"),t.resetMargins(),t.setChartSize(),t.propFromSeries(),t.getAxes(),rn(e.series||[],function(e){t.initSeries(e)}),t.linkSeries(),un(t,"beforeRender"),t.pointer=new j(t,e),t.render(),t.renderer.draw(),n&&n.apply(t,[t]),rn(t.callbacks,function(e){e.apply(t,[t])}),t.cloneRenderTo(!0),un(t,"load"))},splashArray:function(t,e){var n=e[t],n=r(n)?n:[n,n,n,n];return[f(e[t+"Top"],n[0]),f(e[t+"Right"],n[1]),f(e[t+"Bottom"],n[2]),f(e[t+"Left"],n[3])]}},$.prototype.callbacks=[];var bn=function(){};bn.prototype={init:function(t,e,n){return this.series=t,this.applyOptions(e,n),this.pointAttr={},t.options.colorByPoint&&(e=t.options.colors||t.chart.options.colors,this.color=this.color||e[t.colorCounter++],t.colorCounter===e.length)&&(t.colorCounter=0),t.chart.pointCount++,this},applyOptions:function(e,n){var i=this.series,r=i.pointValKey,e=bn.prototype.optionsToObject.call(this,e);return t(this,e),this.options=this.options?t(this.options,e):e,r&&(this.y=this[r]),this.x===X&&i&&(this.x=n===X?i.autoIncrement():n),this},optionsToObject:function(t){var e,n=this.series,i=n.pointArrayMap||["y"],r=i.length,s=0,a=0;if("number"==typeof t||null===t)e={y:t};else if(o(t))for(e={},t.length>r&&(n=typeof t[0],"string"===n?e.name=t[0]:"number"===n&&(e.x=t[0]),s++);r>a;)e[i[a++]]=t[s++];else"object"==typeof t&&(e=t,t.dataLabels&&(n._hasPointLabels=!0),t.marker&&(n._hasPointMarkers=!0));return e},destroy:function(){var t,e=this.series.chart,n=e.hoverPoints;e.pointCount--,n&&(this.setState(),h(n,this),!n.length)&&(e.hoverPoints=null),this===e.hoverPoint&&this.onMouseOut(),(this.graphic||this.dataLabel)&&(hn(this),this.destroyElements()),this.legendItem&&e.legend.destroyItem(this);for(t in this)this[t]=null},destroyElements:function(){for(var t,e="graphic,dataLabel,dataLabelUpper,group,connector,shadowGroup".split(","),n=6;n--;)t=e[n],this[t]&&(this[t]=this[t].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(t,e){var n=this,i=n.series,r=i.chart,t=f(t,!n.selected);n.firePointEvent(t?"select":"unselect",{accumulate:e},function(){n.selected=n.options.selected=t,i.options.data[nn(n,i.data)]=n.options,n.setState(t&&"select"),e||rn(r.getSelectedPoints(),function(t){t.selected&&t!==n&&(t.selected=t.options.selected=!1,i.options.data[nn(t,i.data)]=t.options,t.setState(""),t.firePointEvent("unselect"))})})},onMouseOver:function(t){var e=this.series,n=e.chart,i=n.tooltip,r=n.hoverPoint;r&&r!==this&&r.onMouseOut(),this.firePointEvent("mouseOver"),i&&(!i.shared||e.noSharedTooltip)&&i.refresh(this,t),this.setState("hover"),n.hoverPoint=this},onMouseOut:function(){var t=this.series.chart,e=t.hoverPoints;e&&-1!==nn(this,e)||(this.firePointEvent("mouseOut"),this.setState(),t.hoverPoint=null)},tooltipFormatter:function(t){var e=this.series,n=e.tooltipOptions,i=f(n.valueDecimals,""),r=n.valuePrefix||"",o=n.valueSuffix||"";return rn(e.pointArrayMap||["y"],function(e){e="{point."+e,(r||o)&&(t=t.replace(e+"}",r+e+"}"+o)),t=t.replace(e+"}",e+":,."+i+"f}")}),b(t,{point:this,series:this.series})},update:function(t,e,n){var i,o=this,s=o.series,a=o.graphic,l=s.data,h=s.chart,u=s.options,e=f(e,!0);o.firePointEvent("update",{options:t},function(){o.applyOptions(t),r(t)&&(s.getAttribs(),a)&&(t.marker&&t.marker.symbol?o.graphic=a.destroy():a.attr(o.pointAttr[o.state||""])),i=nn(o,l),s.xData[i]=o.x,s.yData[i]=s.toYData?s.toYData(o):o.y,s.zData[i]=o.z,u.data[i]=o.options,s.isDirty=s.isDirtyData=!0,!s.fixedBox&&s.hasCartesianSeries&&(h.isDirtyBox=!0),"point"===u.legendType&&h.legend.destroyItem(o),e&&h.redraw(n)})},remove:function(t,e){var n,i=this,r=i.series,o=r.points,s=r.chart,a=r.data;D(e,s),t=f(t,!0),i.firePointEvent("remove",null,function(){n=nn(i,a),a.length===o.length&&o.splice(n,1),a.splice(n,1),r.options.data.splice(n,1),r.xData.splice(n,1),r.yData.splice(n,1),r.zData.splice(n,1),i.destroy(),r.isDirty=!0,r.isDirtyData=!0,t&&s.redraw()})},firePointEvent:function(t,e,n){var i=this,r=this.series.options;(r.point.events[t]||i.options&&i.options.events&&i.options.events[t])&&this.importEvents(),"click"===t&&r.allowPointSelect&&(n=function(t){i.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),un(this,t,e,n)},importEvents:function(){if(!this.hasImportedEvents){var t,n=e(this.series.options.point,this.options).events;this.events=n;for(t in n)ln(this,t,n[t]);this.hasImportedEvents=!0}},setState:function(t){var n=this.plotX,i=this.plotY,r=this.series,o=r.options.states,s=pn[r.type].marker&&r.options.marker,a=s&&!s.enabled,l=s&&s.states[t],h=l&&l.enabled===!1,u=r.stateMarkerGraphic,c=this.marker||{},d=r.chart,f=this.pointAttr,t=t||"";t===this.state||this.selected&&"select"!==t||o[t]&&o[t].enabled===!1||t&&(h||a&&!l.enabled)||(this.graphic?(o=s&&this.graphic.symbolName&&f[t].r,this.graphic.attr(e(f[t],o?{x:n-o,y:i-o,width:2*o,height:2*o}:{}))):(t&&l&&(o=l.radius,c=c.symbol||r.symbol,u&&u.currentSymbol!==c&&(u=u.destroy()),u?u.attr({x:n-o,y:i-o}):(r.stateMarkerGraphic=u=d.renderer.symbol(c,n-o,i-o,2*o,2*o).attr(f[t]).add(r.markerGroup),u.currentSymbol=c)),u&&u[t&&d.isInsidePlot(n,i)?"show":"hide"]()),this.state=t)}};var wn=function(){};wn.prototype={isCartesian:!0,type:"line",pointClass:bn,sorted:!0,requireSorting:!0,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},colorCounter:0,init:function(e,n){var i,r,o=e.series;this.chart=e,this.options=n=this.setOptions(n),this.linkedSeries=[],this.bindAxes(),t(this,{name:n.name,state:"",pointAttr:{},visible:n.visible!==!1,selected:n.selected===!0}),De&&(n.animation=!1),r=n.events;for(i in r)ln(this,i,r[i]);(r&&r.click||n.point&&n.point.events&&n.point.events.click||n.allowPointSelect)&&(e.runTrackerClick=!0),this.getColor(),this.getSymbol(),this.setData(n.data,!1),this.isCartesian&&(e.hasCartesianSeries=!0),o.push(this),this._i=o.length-1,T(o,function(t,e){return f(t.options.index,t._i)-f(e.options.index,t._i)}),rn(o,function(t,e){t.index=e,t.name=t.name||"Series "+(e+1)})},bindAxes:function(){var t,e=this,n=e.options,i=e.chart;e.isCartesian&&rn(["xAxis","yAxis"],function(r){rn(i[r],function(i){t=i.options,(n[r]===t.index||n[r]!==X&&n[r]===t.id||n[r]===X&&0===t.index)&&(i.series.push(e),e[r]=i,i.isDirty=!0)}),e[r]||_(18,!0)})},autoIncrement:function(){var t=this.options,e=this.xIncrement,e=f(e,t.pointStart,0);return this.pointInterval=f(this.pointInterval,t.pointInterval,1),this.xIncrement=e+this.pointInterval,e},getSegments:function(){var t,e=-1,n=[],i=this.points,r=i.length;if(r)if(this.options.connectNulls){for(t=r;t--;)null===i[t].y&&i.splice(t,1);i.length&&(n=[i])}else rn(i,function(t,o){null===t.y?(o>e+1&&n.push(i.slice(e+1,o)),e=o):o===r-1&&n.push(i.slice(e+1,o+1))});this.segments=n},setOptions:function(t){var n=this.chart.options,i=n.plotOptions,r=i[this.type];return this.userOptions=t,t=e(r,i.series,t),this.tooltipOptions=e(n.tooltip,t.tooltip),null===r.marker&&delete t.marker,t},getColor:function(){var t,e=this.options,n=this.userOptions,i=this.chart.options.colors,r=this.chart.counters;t=e.color||pn[this.type].color,t||e.colorByPoint||(u(n._colorIndex)?e=n._colorIndex:(n._colorIndex=r.color,e=r.color++),t=i[e]),this.color=t,r.wrapColor(i.length)},getSymbol:function(){var t=this.userOptions,e=this.options.marker,n=this.chart,i=n.options.symbols,n=n.counters;this.symbol=e.symbol,this.symbol||(u(t._symbolIndex)?t=t._symbolIndex:(t._symbolIndex=n.symbol,t=n.symbol++),this.symbol=i[t]),/^url/.test(this.symbol)&&(e.radius=0),n.wrapSymbol(i.length)},drawLegendSymbol:function(t){var e,n=this.options,i=n.marker,r=t.options;e=r.symbolWidth;var o=this.chart.renderer,s=this.legendGroup,t=t.baseline-fe(.3*o.fontMetrics(r.itemStyle.fontSize).b);n.lineWidth&&(r={"stroke-width":n.lineWidth},n.dashStyle&&(r.dashstyle=n.dashStyle),this.legendLine=o.path(["M",0,t,"L",e,t]).attr(r).add(s)),i&&i.enabled&&(n=i.radius,this.legendSymbol=e=o.symbol(this.symbol,e/2-n,t-n,2*n,2*n).add(s),e.isMarker=!0)},addPoint:function(t,e,n,i){var r,o=this.options,s=this.data,a=this.graph,l=this.area,h=this.chart,u=this.xData,c=this.yData,d=this.zData,p=this.names,g=a&&a.shift||0,m=o.data;if(D(i,h),n&&rn([a,l,this.graphNeg,this.areaNeg],function(t){t&&(t.shift=g+1)}),l&&(l.isArea=!0),e=f(e,!0),i={series:this},this.pointClass.prototype.applyOptions.apply(i,[t]),a=i.x,l=u.length,this.requireSorting&&a<u[l-1])for(r=!0;l&&u[l-1]>a;)l--;u.splice(l,0,a),c.splice(l,0,this.toYData?this.toYData(i):i.y),d.splice(l,0,i.z),p&&(p[a]=i.name),m.splice(l,0,t),r&&(this.data.splice(l,0,null),this.processData()),"point"===o.legendType&&this.generatePoints(),n&&(s[0]&&s[0].remove?s[0].remove(!1):(s.shift(),u.shift(),c.shift(),d.shift(),m.shift())),this.isDirtyData=this.isDirty=!0,e&&(this.getAttribs(),h.redraw())},setData:function(t,e){var n,r=this.points,a=this.options,l=this.chart,h=null,u=this.xAxis,c=u&&u.categories&&!u.categories.length?[]:null;this.xIncrement=null,this.pointRange=u&&u.categories?1:a.pointRange,this.colorCounter=0;var d=[],p=[],g=[],m=t?t.length:[];n=f(a.turboThreshold,1e3);var v=this.pointArrayMap,v=v&&v.length,y=!!this.toYData;if(n&&m>n){for(n=0;null===h&&m>n;)h=t[n],n++;if(s(h)){for(h=f(a.pointStart,0),a=f(a.pointInterval,1),n=0;m>n;n++)d[n]=h,p[n]=t[n],h+=a;this.xIncrement=h}else if(o(h))if(v)for(n=0;m>n;n++)a=t[n],d[n]=a[0],p[n]=a.slice(1,v+1);else for(n=0;m>n;n++)a=t[n],d[n]=a[0],p[n]=a[1];else _(12)}else for(n=0;m>n;n++)t[n]!==X&&(a={series:this},this.pointClass.prototype.applyOptions.apply(a,[t[n]]),d[n]=a.x,p[n]=y?this.toYData(a):a.y,g[n]=a.z,c&&a.name)&&(c[a.x]=a.name);for(i(p[0])&&_(14,!0),this.data=[],this.options.data=t,this.xData=d,this.yData=p,this.zData=g,this.names=c,n=r&&r.length||0;n--;)r[n]&&r[n].destroy&&r[n].destroy();u&&(u.minRange=u.userMinRange),this.isDirty=this.isDirtyData=l.isDirtyBox=!0,f(e,!0)&&l.redraw(!1)},remove:function(t,e){var n=this,i=n.chart,t=f(t,!0);n.isRemoving||(n.isRemoving=!0,un(n,"remove",null,function(){n.destroy(),i.isDirtyLegend=i.isDirtyBox=!0,i.linkSeries(),t&&i.redraw(e)})),n.isRemoving=!1},processData:function(t){var e,n=this.xData,i=this.yData,r=n.length;e=0;var o,s,a=this.xAxis,l=this.options,h=l.cropThreshold,u=this.isCartesian;if(u&&!this.isDirty&&!a.isDirty&&!this.yAxis.isDirty&&!t)return!1;for(u&&this.sorted&&(!h||r>h||this.forceCrop)&&(t=a.min,a=a.max,n[r-1]<t||n[0]>a?(n=[],i=[]):(n[0]<t||n[r-1]>a)&&(e=this.cropData(this.xData,this.yData,t,a),n=e.xData,i=e.yData,e=e.start,o=!0)),a=n.length-1;a>=0;a--)r=n[a]-n[a-1],r>0&&(s===X||s>r)?s=r:0>r&&this.requireSorting&&_(15);this.cropped=o,this.cropStart=e,this.processedXData=n,this.processedYData=i,null===l.pointRange&&(this.pointRange=s||1),this.closestPointRange=s},cropData:function(t,e,n,i){var r,o=t.length,s=0,a=o,l=f(this.cropShoulder,1);for(r=0;o>r;r++)if(t[r]>=n){s=me(0,r-l);break}for(;o>r;r++)if(t[r]>i){a=r+l;break}return{xData:t.slice(s,a),yData:e.slice(s,a),start:s,end:a}},generatePoints:function(){var t,e,n,i,r=this.options.data,o=this.data,s=this.processedXData,a=this.processedYData,l=this.pointClass,h=s.length,u=this.cropStart||0,c=this.hasGroupedData,f=[];for(o||c||(o=[],o.length=r.length,o=this.data=o),i=0;h>i;i++)e=u+i,c?f[i]=(new l).init(this,[s[i]].concat(d(a[i]))):(o[e]?n=o[e]:r[e]!==X&&(o[e]=n=(new l).init(this,r[e],s[i])),f[i]=n);if(o&&(h!==(t=o.length)||c))for(i=0;t>i;i++)i===u&&!c&&(i+=h),o[i]&&(o[i].destroyElements(),o[i].plotX=X);this.data=o,this.points=f},setStackedPoints:function(){if(this.options.stacking&&(this.visible===!0||this.chart.options.chart.ignoreHiddenSeries===!1)){var t,e,n,i,r,o=this.processedXData,s=this.processedYData,a=[],l=s.length,h=this.options,u=h.threshold,c=h.stack,h=h.stacking,d=this.stackKey,f="-"+d,p=this.negStacks,g=this.yAxis,m=g.stacks,v=g.oldStacks;for(n=0;l>n;n++)i=o[n],r=s[n],e=(t=p&&u>r)?f:d,m[e]||(m[e]={}),m[e][i]||(v[e]&&v[e][i]?(m[e][i]=v[e][i],m[e][i].total=null):m[e][i]=new H(g,g.options.stackLabels,t,i,c,h)),e=m[e][i],e.points[this.index]=[e.cum||0],"percent"===h?(t=t?d:f,p&&m[t]&&m[t][i]?(t=m[t][i],e.total=t.total=me(t.total,e.total)+ye(r)||0):e.total+=ye(r)||0):e.total+=r||0,e.cum=(e.cum||0)+(r||0),e.points[this.index].push(e.cum),a[n]=e.cum;"percent"===h&&(g.usePercentage=!0),this.stackedYData=a,g.oldStacks={}}},setPercentStacks:function(){var t=this,e=t.stackKey,n=t.yAxis.stacks;rn([e,"-"+e],function(e){for(var i,r,o,s=t.xData.length;s--;)r=t.xData[s],i=(o=n[e]&&n[e][r])&&o.points[t.index],(r=i)&&(o=o.total?100/o.total:0,r[0]=N(r[0]*o),r[1]=N(r[1]*o),t.stackedYData[s]=r[1])})},getExtremes:function(){var t,e,n,i,r=this.yAxis,o=this.processedXData,s=this.stackedYData||this.processedYData,a=s.length,l=[],h=0,u=this.xAxis.getExtremes(),c=u.min,u=u.max;for(i=0;a>i;i++)if(e=o[i],n=s[i],t=null!==n&&n!==X&&(!r.isLog||n.length||n>0),e=this.getExtremesFromAll||this.cropped||(o[i+1]||e)>=c&&(o[i-1]||e)<=u,t&&e)if(t=n.length)for(;t--;)null!==n[t]&&(l[h++]=n[t]);else l[h++]=n;this.dataMin=f(void 0,A(l)),this.dataMax=f(void 0,L(l))},translate:function(){this.processedXData||this.processData(),this.generatePoints();for(var t=this.options,e=t.stacking,n=this.xAxis,i=n.categories,r=this.yAxis,o=this.points,a=o.length,l=!!this.modifyValue,h=t.pointPlacement,c="between"===h||s(h),d=t.threshold,t=0;a>t;t++){var p=o[t],g=p.x,m=p.y,v=p.low,y=r.stacks[(this.negStacks&&d>m?"-":"")+this.stackKey];r.isLog&&0>=m&&(p.y=m=null),p.plotX=n.translate(g,0,0,0,1,h,"flags"===this.type),e&&this.visible&&y&&y[g]&&(y=y[g],m=y.points[this.index],v=m[0],m=m[1],0===v&&(v=f(d,r.min)),r.isLog&&0>=v&&(v=null),p.percentage="percent"===e&&m,p.total=p.stackTotal=y.total,p.stackY=m,y.setOffset(this.pointXOffset||0,this.barW||0)),p.yBottom=u(v)?r.translate(v,0,1,0,1):null,l&&(m=this.modifyValue(m,p)),p.plotY="number"==typeof m&&1/0!==m?r.translate(m,0,1,0,1):X,p.clientX=c?n.translate(g,0,0,0,1):p.plotX,p.negative=p.y<(d||0),p.category=i&&i[p.x]!==X?i[p.x]:p.x}this.getSegments()},setTooltipPoints:function(t){var e,n,i,r,o=[],s=this.xAxis,a=s&&s.getExtremes(),l=s?s.tooltipLen||s.len:this.chart.plotSizeX,h=[];if(this.options.enableMouseTracking!==!1){for(t&&(this.tooltipPoints=null),rn(this.segments||this.points,function(t){o=o.concat(t)}),s&&s.reversed&&(o=o.reverse()),this.orderTooltipPoints&&this.orderTooltipPoints(o),t=o.length,r=0;t>r;r++)if(s=o[r],e=s.x,e>=a.min&&e<=a.max)for(i=o[r+1],e=n===X?0:n+1,n=o[r+1]?ve(me(0,pe((s.clientX+(i?i.wrappedClientX||i.clientX:l))/2)),l):l;e>=0&&n>=e;)h[e++]=s;this.tooltipPoints=h}},tooltipHeaderFormatter:function(t){var e,n=this.tooltipOptions,i=n.xDateFormat,r=n.dateTimeLabelFormats,o=this.xAxis,a=o&&"datetime"===o.options.type,n=n.headerFormat,o=o&&o.closestPointRange;if(a&&!i)if(o){for(e in K)if(K[e]>=o){i=r[e];break}}else i=r.day;return a&&i&&s(t.key)&&(n=n.replace("{point.key}","{point.key:"+i+"}")),b(n,{point:t,series:this})},onMouseOver:function(){var t=this.chart,e=t.hoverSeries;e&&e!==this&&e.onMouseOut(),this.options.events.mouseOver&&un(this,"mouseOver"),this.setState("hover"),t.hoverSeries=this},onMouseOut:function(){var t=this.options,e=this.chart,n=e.tooltip,i=e.hoverPoint;i&&i.onMouseOut(),this&&t.events.mouseOut&&un(this,"mouseOut"),n&&!t.stickyTracking&&(!n.shared||this.noSharedTooltip)&&n.hide(),this.setState(),e.hoverSeries=null},animate:function(e){var n,i=this,o=i.chart,s=o.renderer;n=i.options.animation;var a,l=o.clipBox,h=o.inverted;n&&!r(n)&&(n=pn[i.type].animation),a="_sharedClip"+n.duration+n.easing,e?(e=o[a],n=o[a+"m"],e||(o[a]=e=s.clipRect(t(l,{width:0})),o[a+"m"]=n=s.clipRect(-99,h?-o.plotLeft:-o.plotTop,99,h?o.chartWidth:o.chartHeight)),i.group.clip(e),i.markerGroup.clip(n),i.sharedClipKey=a):((e=o[a])&&(e.animate({width:o.plotSizeX},n),o[a+"m"].animate({width:o.plotSizeX+99},n)),i.animate=null,i.animationTimeout=setTimeout(function(){i.afterAnimate()},n.duration))},afterAnimate:function(){var t=this.chart,e=this.sharedClipKey,n=this.group;n&&this.options.clip!==!1&&(n.clip(t.clipRect),this.markerGroup.clip()),setTimeout(function(){e&&t[e]&&(t[e]=t[e].destroy(),t[e+"m"]=t[e+"m"].destroy())},100)},drawPoints:function(){var e,n,i,r,o,s,a,l,h,u,c=this.points,d=this.chart,p=this.options.marker,g=this.markerGroup;if(p.enabled||this._hasPointMarkers)for(r=c.length;r--;)o=c[r],n=pe(o.plotX),i=o.plotY,h=o.graphic,a=o.marker||{},e=p.enabled&&a.enabled===X||a.enabled,u=d.isInsidePlot(fe(n),i,d.inverted),e&&i!==X&&!isNaN(i)&&null!==o.y?(e=o.pointAttr[o.selected?"select":""],s=e.r,a=f(a.symbol,this.symbol),l=0===a.indexOf("url"),h?h.attr({visibility:u?_e?"inherit":"visible":"hidden"}).animate(t({x:n-s,y:i-s},h.symbolName?{width:2*s,height:2*s}:{})):u&&(s>0||l)&&(o.graphic=d.renderer.symbol(a,n-s,i-s,2*s,2*s).attr(e).add(g))):h&&(o.graphic=h.destroy())},convertAttribs:function(t,e,n,i){var r,o,s=this.pointAttrToOptions,a={},t=t||{},e=e||{},n=n||{},i=i||{};for(r in s)o=s[r],a[r]=f(t[o],e[r],n[r],i[r]);return a},getAttribs:function(){var e,n,i,r=this,o=r.options,s=pn[r.type].marker?o.marker:o,a=s.states,l=a.hover,h=r.color,c={stroke:h,fill:h},d=r.points||[],f=[],p=r.pointAttrToOptions,g=o.negativeColor,m=s.lineColor;for(o.marker?(l.radius=l.radius||s.radius+2,l.lineWidth=l.lineWidth||s.lineWidth+1):l.color=l.color||gn(l.color||h).brighten(l.brightness).get(),f[""]=r.convertAttribs(s,c),rn(["hover","select"],function(t){f[t]=r.convertAttribs(a[t],f[""])}),r.pointAttr=f,h=d.length;h--;){if(c=d[h],(s=c.options&&c.options.marker||c.options)&&s.enabled===!1&&(s.radius=0),c.negative&&g&&(c.color=c.fillColor=g),e=o.colorByPoint||c.color,c.options)for(i in p)u(s[p[i]])&&(e=!0);e?(s=s||{},n=[],a=s.states||{},e=a.hover=a.hover||{},o.marker||(e.color=gn(e.color||c.color).brighten(e.brightness||l.brightness).get()),n[""]=r.convertAttribs(t({color:c.color,fillColor:c.color,lineColor:null===m?c.color:X},s),f[""]),n.hover=r.convertAttribs(a.hover,f.hover,n[""]),n.select=r.convertAttribs(a.select,f.select,n[""])):n=f,c.pointAttr=n}},update:function(n,i){var r,o=this.chart,s=this.type,a=Ke[s].prototype,n=e(this.userOptions,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},n);this.remove(!1);for(r in a)a.hasOwnProperty(r)&&(this[r]=X);t(this,Ke[n.type||s].prototype),this.init(o,n),f(i,!0)&&o.redraw(!1)},destroy:function(){var t,e,n,i,r,o=this,s=o.chart,a=/AppleWebKit\/533/.test(Se),l=o.data||[];for(un(o,"destroy"),hn(o),rn(["xAxis","yAxis"],function(t){(r=o[t])&&(h(r.series,o),r.isDirty=r.forceRedraw=!0,r.stacks={})}),o.legendItem&&o.chart.legend.destroyItem(o),e=l.length;e--;)(n=l[e])&&n.destroy&&n.destroy();o.points=null,clearTimeout(o.animationTimeout),rn("area,graph,dataLabelsGroup,group,markerGroup,tracker,graphNeg,areaNeg,posClip,negClip".split(","),function(e){o[e]&&(t=a&&"group"===e?"hide":"destroy",o[e][t]())}),s.hoverSeries===o&&(s.hoverSeries=null),h(s.series,o);for(i in o)delete o[i]},drawDataLabels:function(){var t,n,i,r,o=this,s=o.options.dataLabels,a=o.points;(s.enabled||o._hasPointLabels)&&(o.dlProcessOptions&&o.dlProcessOptions(s),r=o.plotGroup("dataLabelsGroup","data-labels",o.visible?"visible":"hidden",s.zIndex||6),n=s,rn(a,function(a){var l,h,c,d=a.dataLabel,p=a.connector,g=!0;if(t=a.options&&a.options.dataLabels,l=f(t&&t.enabled,n.enabled),d&&!l)a.dataLabel=d.destroy();else if(l){if(s=e(n,t),l=s.rotation,h=a.getLabelConfig(),i=s.format?b(s.format,h):s.formatter.call(h,s),s.style.color=f(s.color,s.style.color,o.color,"black"),d)u(i)?(d.attr({text:i}),g=!1):(a.dataLabel=d=d.destroy(),p&&(a.connector=p.destroy()));else if(u(i)){d={fill:s.backgroundColor,stroke:s.borderColor,"stroke-width":s.borderWidth,r:s.borderRadius||0,rotation:l,padding:s.padding,zIndex:1};for(c in d)d[c]===X&&delete d[c];d=a.dataLabel=o.chart.renderer[l?"text":"label"](i,0,-999,null,null,null,s.useHTML).attr(d).css(s.style).add(r).shadow(s.shadow)}d&&o.alignDataLabel(a,d,s,null,g)}}))},alignDataLabel:function(e,n,i,r,o){var s=this.chart,a=s.inverted,l=f(e.plotX,-999),h=f(e.plotY,-999),u=n.getBBox();(e=this.visible&&s.isInsidePlot(e.plotX,e.plotY,a))&&(r=t({x:a?s.plotWidth-h:l,y:fe(a?s.plotHeight-l:h),width:0,height:0},r),t(i,{width:u.width,height:u.height}),i.rotation?(a={align:i.align,x:r.x+i.x+r.width/2,y:r.y+i.y+r.height/2},n[o?"attr":"animate"](a)):(n.align(i,null,r),a=n.alignAttr,"justify"===f(i.overflow,"justify")?this.justifyDataLabel(n,i,a,u,r,o):f(i.crop,!0)&&(e=s.isInsidePlot(a.x,a.y)&&s.isInsidePlot(a.x+u.width,a.y+u.height)))),e||n.attr({y:-999})},justifyDataLabel:function(t,e,n,i,r,o){var s,a,l=this.chart,h=e.align,u=e.verticalAlign;s=n.x,0>s&&("right"===h?e.align="left":e.x=-s,a=!0),s=n.x+i.width,s>l.plotWidth&&("left"===h?e.align="right":e.x=l.plotWidth-s,a=!0),s=n.y,0>s&&("bottom"===u?e.verticalAlign="top":e.y=-s,a=!0),s=n.y+i.height,s>l.plotHeight&&("top"===u?e.verticalAlign="bottom":e.y=l.plotHeight-s,a=!0),a&&(t.placed=!o,t.align(e,null,r))},getSegmentPath:function(t){var e=this,n=[],i=e.options.step;return rn(t,function(r,o){var s,a=r.plotX,l=r.plotY;e.getPointSpline?n.push.apply(n,e.getPointSpline(t,r,o)):(n.push(o?"L":"M"),i&&o&&(s=t[o-1],"right"===i?n.push(s.plotX,l):"center"===i?n.push((s.plotX+a)/2,s.plotY,(s.plotX+a)/2,l):n.push(a,s.plotY)),n.push(r.plotX,r.plotY))}),n},getGraphPath:function(){var t,e=this,n=[],i=[];return rn(e.segments,function(r){t=e.getSegmentPath(r),r.length>1?n=n.concat(t):i.push(r[0])}),e.singlePoints=i,e.graphPath=n},drawGraph:function(){var t=this,e=this.options,n=[["graph",e.lineColor||this.color]],i=e.lineWidth,r=e.dashStyle,o=this.getGraphPath(),s=e.negativeColor;s&&n.push(["graphNeg",s]),rn(n,function(n,s){var a=n[0],l=t[a];l?(fn(l),l.animate({d:o})):i&&o.length&&(l={stroke:n[1],"stroke-width":i,zIndex:1},r?l.dashstyle=r:l["stroke-linecap"]=l["stroke-linejoin"]="round",t[a]=t.chart.renderer.path(o).attr(l).add(t.group).shadow(!s&&e.shadow))})},clipNeg:function(){var t,e=this.options,n=this.chart,i=n.renderer,r=e.negativeColor||e.negativeFillColor,o=this.graph,s=this.area,a=this.posClip,l=this.negClip;t=n.chartWidth;var h=n.chartHeight,u=me(t,h),c=this.yAxis;r&&(o||s)&&(r=fe(c.toPixels(e.threshold||0,!0)),e={x:0,y:0,width:u,height:r},u={x:0,y:r,width:u,height:u},n.inverted&&(e.height=u.y=n.plotWidth-r,i.isVML&&(e={x:n.plotWidth-r-n.plotLeft,y:0,width:t,height:h},u={x:r+n.plotLeft-t,y:0,width:n.plotLeft+r,height:t})),c.reversed?(n=u,t=e):(n=e,t=u),a?(a.animate(n),l.animate(t)):(this.posClip=a=i.clipRect(n),this.negClip=l=i.clipRect(t),o&&this.graphNeg&&(o.clip(a),this.graphNeg.clip(l)),s&&(s.clip(a),this.areaNeg.clip(l))))},invertGroups:function(){function t(){var t={width:e.yAxis.len,height:e.xAxis.len};rn(["group","markerGroup"],function(n){e[n]&&e[n].attr(t).invert()})}var e=this,n=e.chart;e.xAxis&&(ln(n,"resize",t),ln(e,"destroy",function(){hn(n,"resize",t)}),t(),e.invertGroups=t)},plotGroup:function(t,e,n,i,r){var o=this[t],s=!o;return s&&(this[t]=o=this.chart.renderer.g(e).attr({visibility:n,zIndex:i||.1}).add(r)),o[s?"attr":"animate"](this.getPlotBox()),o},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 t,e=this.chart,n=this.options,i=n.animation&&!!this.animate&&e.renderer.isSVG,r=this.visible?"visible":"hidden",o=n.zIndex,s=this.hasRendered,a=e.seriesGroup;t=this.plotGroup("group","series",r,o,a),this.markerGroup=this.plotGroup("markerGroup","markers",r,o,a),i&&this.animate(!0),this.getAttribs(),t.inverted=this.isCartesian?e.inverted:!1,this.drawGraph&&(this.drawGraph(),this.clipNeg()),this.drawDataLabels(),this.drawPoints(),this.options.enableMouseTracking!==!1&&this.drawTracker(),e.inverted&&this.invertGroups(),n.clip!==!1&&!this.sharedClipKey&&!s&&t.clip(e.clipRect),i?this.animate():s||this.afterAnimate(),this.isDirty=this.isDirtyData=!1,this.hasRendered=!0},redraw:function(){var t=this.chart,e=this.isDirtyData,n=this.group,i=this.xAxis,r=this.yAxis;n&&(t.inverted&&n.attr({width:t.plotWidth,height:t.plotHeight}),n.animate({translateX:f(i&&i.left,t.plotLeft),translateY:f(r&&r.top,t.plotTop)})),this.translate(),this.setTooltipPoints(!0),this.render(),e&&un(this,"updatedData")},setState:function(t){var e=this.options,n=this.graph,i=this.graphNeg,r=e.states,e=e.lineWidth,t=t||"";this.state!==t&&(this.state=t,r[t]&&r[t].enabled===!1||(t&&(e=r[t].lineWidth||e+1),n&&!n.dashstyle&&(t={"stroke-width":e},n.attr(t),i&&i.attr(t))))},setVisible:function(t,e){var n,i=this,r=i.chart,o=i.legendItem,s=r.options.chart.ignoreHiddenSeries,a=i.visible;n=(i.visible=t=i.userOptions.visible=t===X?!a:t)?"show":"hide",rn(["group","dataLabelsGroup","markerGroup","tracker"],function(t){i[t]&&i[t][n]()}),r.hoverSeries===i&&i.onMouseOut(),o&&r.legend.colorizeItem(i,t),i.isDirty=!0,i.options.stacking&&rn(r.series,function(t){t.options.stacking&&t.visible&&(t.isDirty=!0)}),rn(i.linkedSeries,function(e){e.setVisible(t,!1)}),s&&(r.isDirtyBox=!0),e!==!1&&r.redraw(),un(i,n)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(t){this.selected=t=t===X?!this.selected:t,this.checkbox&&(this.checkbox.checked=t),un(this,t?"select":"unselect")},drawTracker:function(){var t,e=this,n=e.options,i=n.trackByArea,r=[].concat(i?e.areaPath:e.graphPath),o=r.length,s=e.chart,a=s.pointer,l=s.renderer,h=s.options.tooltip.snap,u=e.tracker,c=n.cursor,d=c&&{cursor:c},c=e.singlePoints,f=function(){s.hoverSeries!==e&&e.onMouseOver()};if(o&&!i)for(t=o+1;t--;)"M"===r[t]&&r.splice(t+1,0,r[t+1]-h,r[t+2],"L"),(t&&"M"===r[t]||t===o)&&r.splice(t,0,"L",r[t-2]+h,r[t-1]);for(t=0;t<c.length;t++)o=c[t],r.push("M",o.plotX-h,o.plotY,"L",o.plotX+h,o.plotY);u?u.attr({d:r}):(e.tracker=l.path(r).attr({"stroke-linejoin":"round",visibility:e.visible?"visible":"hidden",stroke:je,fill:i?je:Fe,"stroke-width":n.lineWidth+(i?0:2*h),zIndex:2}).add(e.group),rn([e.tracker,e.markerGroup],function(t){t.addClass("highcharts-tracker").on("mouseover",f).on("mouseout",function(t){a.onTrackerMouseOut(t)}).css(d),Re&&t.on("touchstart",f)}))}},Je=m(wn),Ke.line=Je,pn.area=e(Qe,{threshold:0}),Je=m(wn,{type:"area",getSegments:function(){var t,e,n,i,r,o=[],s=[],a=[],l=this.xAxis,h=this.yAxis,u=h.stacks[this.stackKey],c={},d=this.points,f=this.options.connectNulls;if(this.options.stacking&&!this.cropped){for(i=0;i<d.length;i++)c[d[i].x]=d[i];for(r in u)a.push(+r);a.sort(function(t,e){return t-e}),rn(a,function(i){(!f||c[i]&&null!==c[i].y)&&(c[i]?s.push(c[i]):(t=l.translate(i),n=u[i].percent?u[i].total?100*u[i].cum/u[i].total:0:u[i].cum,e=h.toPixels(n,!0),s.push({y:null,plotX:t,clientX:t,plotY:e,yBottom:e,onMouseOver:Ie})))}),s.length&&o.push(s)}else wn.prototype.getSegments.call(this),o=this.segments;this.segments=o},getSegmentPath:function(t){var e,n=wn.prototype.getSegmentPath.call(this,t),i=[].concat(n),r=this.options;e=n.length;var o,s=this.yAxis.getThreshold(r.threshold);if(3===e&&i.push("L",n[1],n[2]),r.stacking&&!this.closedStacks)for(e=t.length-1;e>=0;e--)o=f(t[e].yBottom,s),e<t.length-1&&r.step&&i.push(t[e+1].plotX,o),i.push(t[e].plotX,o);else this.closeSegment(i,t,s);return this.areaPath=this.areaPath.concat(i),n},closeSegment:function(t,e,n){t.push("L",e[e.length-1].plotX,n,"L",e[0].plotX,n)},drawGraph:function(){this.areaPath=[],wn.prototype.drawGraph.apply(this);var t=this,e=this.areaPath,n=this.options,i=n.negativeColor,r=n.negativeFillColor,o=[["area",this.color,n.fillColor]];(i||r)&&o.push(["areaNeg",i,r]),rn(o,function(i){var r=i[0],o=t[r];o?o.animate({d:e}):t[r]=t.chart.renderer.path(e).attr({fill:f(i[2],gn(i[1]).setOpacity(f(n.fillOpacity,.75)).get()),zIndex:0}).add(t.group)})},drawLegendSymbol:function(t,e){e.legendSymbol=this.chart.renderer.rect(0,t.baseline-11,t.options.symbolWidth,12,2).attr({zIndex:3}).add(e.legendGroup)}}),Ke.area=Je,pn.spline=e(Qe),vn=m(wn,{type:"spline",getPointSpline:function(t,e,n){var i,r,o,s,a=e.plotX,l=e.plotY,h=t[n-1],u=t[n+1];if(h&&u){t=h.plotY,o=u.plotX;var c,u=u.plotY;i=(1.5*a+h.plotX)/2.5,r=(1.5*l+t)/2.5,o=(1.5*a+o)/2.5,s=(1.5*l+u)/2.5,c=(s-r)*(o-a)/(o-i)+l-s,r+=c,s+=c,r>t&&r>l?(r=me(t,l),s=2*l-r):t>r&&l>r&&(r=ve(t,l),s=2*l-r),s>u&&s>l?(s=me(u,l),r=2*l-s):u>s&&l>s&&(s=ve(u,l),r=2*l-s),e.rightContX=o,e.rightContY=s}return n?(e=["C",h.rightContX||h.plotX,h.rightContY||h.plotY,i||a,r||l,a,l],h.rightContX=h.rightContY=null):e=["M",a,l],e}}),Ke.spline=vn,pn.areaspline=e(pn.area),yn=Je.prototype,vn=m(vn,{type:"areaspline",closedStacks:!0,getSegmentPath:yn.getSegmentPath,closeSegment:yn.closeSegment,drawGraph:yn.drawGraph,drawLegendSymbol:yn.drawLegendSymbol}),Ke.areaspline=vn,pn.column=e(Qe,{borderColor:"#FFFFFF",borderWidth:1,borderRadius:0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{brightness:.1,shadow:!1},select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}},dataLabels:{align:null,verticalAlign:null,y:null},stickyTracking:!1,threshold:0}),vn=m(wn,{type:"column",pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color",r:"borderRadius"},cropShoulder:0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){wn.prototype.init.apply(this,arguments);var t=this,e=t.chart;e.hasRendered&&rn(e.series,function(e){e.type===t.type&&(e.isDirty=!0)})},getColumnMetrics:function(){var t,e,n=this,i=n.options,r=n.xAxis,o=n.yAxis,s=r.reversed,a={},l=0;i.grouping===!1?l=1:rn(n.chart.series,function(i){var r=i.options,s=i.yAxis;i.type===n.type&&i.visible&&o.len===s.len&&o.pos===s.pos&&(r.stacking?(t=i.stackKey,a[t]===X&&(a[t]=l++),e=a[t]):r.grouping!==!1&&(e=l++),i.columnIndex=e)});var r=ve(ye(r.transA)*(r.ordinalSlope||i.pointRange||r.closestPointRange||1),r.len),h=r*i.groupPadding,c=(r-2*h)/l,d=i.pointWidth,i=u(d)?(c-d)/2:c*i.pointPadding,d=f(d,c-2*i);return n.columnMetrics={width:d,offset:i+(h+((s?l-(n.columnIndex||0):n.columnIndex)||0)*c-r/2)*(s?-1:1)}},translate:function(){var t=this.chart,e=this.options,n=e.borderWidth,i=this.yAxis,r=this.translatedThreshold=i.getThreshold(e.threshold),o=f(e.minPointLength,5),e=this.getColumnMetrics(),s=e.width,a=this.barW=ge(me(s,1+2*n)),l=this.pointXOffset=e.offset,h=-(n%2?.5:0),u=n%2?.5:1;t.renderer.isVML&&t.inverted&&(u+=1),wn.prototype.translate.apply(this),rn(this.points,function(t){var e,n=f(t.yBottom,r),c=ve(me(-999-n,t.plotY),i.len+999+n),d=t.plotX+l,p=a,g=ve(c,n),c=me(c,n)-g;ye(c)<o&&o&&(c=o,g=fe(ye(g-r)>o?n-o:r-(i.translate(t.y,0,1,0,1)<=r?o:0))),t.barX=d,t.pointWidth=s,n=ye(d)<.5,p=fe(d+p)+h,d=fe(d)+h,p-=d,e=ye(g)<.5,c=fe(g+c)+u,g=fe(g)+u,c-=g,n&&(d+=1,p-=1),e&&(g-=1,c+=1),t.shapeType="rect",t.shapeArgs={x:d,y:g,width:p,height:c}})},getSymbol:Ie,drawLegendSymbol:Je.prototype.drawLegendSymbol,drawGraph:Ie,drawPoints:function(){var t,n=this,i=n.options,r=n.chart.renderer;rn(n.points,function(o){var s=o.plotY,a=o.graphic;s===X||isNaN(s)||null===o.y?a&&(o.graphic=a.destroy()):(t=o.shapeArgs,a?(fn(a),a.animate(e(t))):o.graphic=r[o.shapeType](t).attr(o.pointAttr[o.selected?"select":""]).add(n.group).shadow(i.shadow,null,i.stacking&&!i.borderRadius))})},drawTracker:function(){var t=this,e=t.chart,n=e.pointer,i=t.options.cursor,r=i&&{cursor:i},o=function(n){var i,r=n.target;for(e.hoverSeries!==t&&t.onMouseOver();r&&!i;)i=r.point,r=r.parentNode;i!==X&&i!==e.hoverPoint&&i.onMouseOver(n)};rn(t.points,function(t){t.graphic&&(t.graphic.element.point=t),t.dataLabel&&(t.dataLabel.element.point=t)}),t._hasTracking||(rn(t.trackerGroups,function(e){t[e]&&(t[e].addClass("highcharts-tracker").on("mouseover",o).on("mouseout",function(t){n.onTrackerMouseOut(t)
|
|
}).css(r),Re)&&t[e].on("touchstart",o)}),t._hasTracking=!0)},alignDataLabel:function(t,n,i,r,o){var s=this.chart,a=s.inverted,l=t.dlBox||t.shapeArgs,h=t.below||t.plotY>f(this.translatedThreshold,s.plotSizeY),u=f(i.inside,!!this.options.stacking);l&&(r=e(l),a&&(r={x:s.plotWidth-r.y-r.height,y:s.plotHeight-r.x-r.width,width:r.height,height:r.width}),!u)&&(a?(r.x+=h?0:r.width,r.width=0):(r.y+=h?r.height:0,r.height=0)),i.align=f(i.align,!a||u?"center":h?"right":"left"),i.verticalAlign=f(i.verticalAlign,a||u?"middle":h?"top":"bottom"),wn.prototype.alignDataLabel.call(this,t,n,i,r,o)},animate:function(t){var e=this.yAxis,n=this.options,i=this.chart.inverted,r={};_e&&(t?(r.scaleY=.001,t=ve(e.pos+e.len,me(e.pos,e.toPixels(n.threshold))),i?r.translateX=t-e.len:r.translateY=t,this.group.attr(r)):(r.scaleY=1,r[i?"translateX":"translateY"]=e.pos,this.group.animate(r,this.options.animation),this.animate=null))},remove:function(){var t=this,e=t.chart;e.hasRendered&&rn(e.series,function(e){e.type===t.type&&(e.isDirty=!0)}),wn.prototype.remove.apply(t,arguments)}}),Ke.column=vn,pn.bar=e(pn.column),yn=m(vn,{type:"bar",inverted:!0}),Ke.bar=yn,pn.scatter=e(Qe,{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}),yn=m(wn,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["markerGroup"],drawTracker:vn.prototype.drawTracker,setTooltipPoints:Ie}),Ke.scatter=yn,pn.pie=e(Qe,{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:.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}}),Qe={type:"pie",isCartesian:!1,pointClass:m(bn,{init:function(){bn.prototype.init.apply(this,arguments);var e,n=this;return n.y<0&&(n.y=null),t(n,{visible:n.visible!==!1,name:f(n.name,"Slice")}),e=function(t){n.slice("select"===t.type)},ln(n,"select",e),ln(n,"unselect",e),n},setVisible:function(t){var e,n=this,i=n.series,r=i.chart;n.visible=n.options.visible=t=t===X?!n.visible:t,i.options.data[nn(n,i.data)]=n.options,e=t?"show":"hide",rn(["graphic","dataLabel","connector","shadowGroup"],function(t){n[t]&&n[t][e]()}),n.legendItem&&r.legend.colorizeItem(n,t),!i.isDirty&&i.options.ignoreHiddenPoint&&(i.isDirty=!0,r.redraw())},slice:function(t,e,n){var i=this.series;D(n,i.chart),f(e,!0),this.sliced=this.options.sliced=t=u(t)?t:!this.sliced,i.options.data[nn(this,i.data)]=this.options,t=t?this.slicedTranslation:{translateX:0,translateY:0},this.graphic.animate(t),this.shadowGroup&&this.shadowGroup.animate(t)}}),requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:Ie,animate:function(t){var e=this,n=e.points,i=e.startAngleRad;t||(rn(n,function(t){var n=t.graphic,t=t.shapeArgs;n&&(n.attr({r:e.center[3]/2,start:i,end:i}),n.animate({r:t.r,start:t.start,end:t.end},e.options.animation))}),e.animate=null)},setData:function(t,e){wn.prototype.setData.call(this,t,!1),this.processData(),this.generatePoints(),f(e,!0)&&this.chart.redraw()},generatePoints:function(){var t,e,n,i,r=0,o=this.options.ignoreHiddenPoint;for(wn.prototype.generatePoints.call(this),e=this.points,n=e.length,t=0;n>t;t++)i=e[t],r+=o&&!i.visible?0:i.y;for(this.total=r,t=0;n>t;t++)i=e[t],i.percentage=r>0?100*(i.y/r):0,i.total=r},getCenter:function(){var t,e,i=this.options,r=this.chart,o=2*(i.slicedOffset||0),s=r.plotWidth-2*o,a=r.plotHeight-2*o,r=i.center,i=[f(r[0],"50%"),f(r[1],"50%"),i.size||"100%",i.innerSize||0],l=ve(s,a);return an(i,function(i,r){return e=/%$/.test(i),t=2>r||2===r&&e,(e?[s,a,l,l][r]*n(i)/100:i)+(t?o:0)})},translate:function(t){this.generatePoints();var e,n,i,r,o,s=0,a=this.options,l=a.slicedOffset,h=l+a.borderWidth,u=a.startAngle||0,c=this.startAngleRad=we/180*(u-90),u=(this.endAngleRad=we/180*((a.endAngle||u+360)-90))-c,d=this.points,f=a.dataLabels.distance,a=a.ignoreHiddenPoint,p=d.length;for(t||(this.center=t=this.getCenter()),this.getX=function(e,n){return i=de.asin((e-t[1])/(t[2]/2+f)),t[0]+(n?-1:1)*xe(i)*(t[2]/2+f)},r=0;p>r;r++)o=d[r],e=c+s*u,(!a||o.visible)&&(s+=o.percentage/100),n=c+s*u,o.shapeType="arc",o.shapeArgs={x:t[0],y:t[1],r:t[2]/2,innerR:t[3]/2,start:fe(1e3*e)/1e3,end:fe(1e3*n)/1e3},i=(n+e)/2,i>.75*u&&(i-=2*we),o.slicedTranslation={translateX:fe(xe(i)*l),translateY:fe(be(i)*l)},e=xe(i)*t[2]/2,n=be(i)*t[2]/2,o.tooltipPos=[t[0]+.7*e,t[1]+.7*n],o.half=-we/2>i||i>we/2?1:0,o.angle=i,h=ve(h,f/2),o.labelPos=[t[0]+e+xe(i)*f,t[1]+n+be(i)*f,t[0]+e+xe(i)*h,t[1]+n+be(i)*h,t[0]+e,t[1]+n,0>f?"center":o.half?"right":"left",i]},setTooltipPoints:Ie,drawGraph:null,drawPoints:function(){var e,n,i,r,o=this,s=o.chart.renderer,a=o.options.shadow;a&&!o.shadowGroup&&(o.shadowGroup=s.g("shadow").add(o.group)),rn(o.points,function(l){n=l.graphic,r=l.shapeArgs,i=l.shadowGroup,a&&!i&&(i=l.shadowGroup=s.g("shadow").add(o.shadowGroup)),e=l.sliced?l.slicedTranslation:{translateX:0,translateY:0},i&&i.attr(e),n?n.animate(t(r,e)):l.graphic=n=s.arc(r).setRadialReference(o.center).attr(l.pointAttr[l.selected?"select":""]).attr({"stroke-linejoin":"round"}).attr(e).add(o.group).shadow(a,i),l.visible===!1&&l.setVisible(!1)})},sortByAngle:function(t,e){t.sort(function(t,n){return void 0!==t.angle&&(n.angle-t.angle)*e})},drawDataLabels:function(){var t,e,n,i,r,o,s,a,l,h,u,c,d=this,p=d.data,g=d.chart,m=d.options.dataLabels,v=f(m.connectorPadding,10),y=f(m.connectorWidth,1),x=g.plotWidth,g=g.plotHeight,b=f(m.softConnector,!0),w=m.distance,k=d.center,S=k[2]/2,C=k[1],M=w>0,T=[[],[]],A=[0,0,0,0],P=function(t,e){return e.y-t.y};if(d.visible&&(m.enabled||d._hasPointLabels)){for(wn.prototype.drawDataLabels.apply(d),rn(p,function(t){t.dataLabel&&T[t.half].push(t)}),u=0;!s&&p[u];)s=p[u]&&p[u].dataLabel&&(p[u].dataLabel.getBBox().height||21),u++;for(u=2;u--;){var E,p=[],_=[],N=T[u],D=N.length;if(d.sortByAngle(N,u-.5),w>0){for(c=C-S-w;C+S+w>=c;c+=s)p.push(c);if(r=p.length,D>r){for(t=[].concat(N),t.sort(P),c=D;c--;)t[c].rank=c;for(c=D;c--;)N[c].rank>=r&&N.splice(c,1);D=N.length}for(c=0;D>c;c++){t=N[c],o=t.labelPos,t=9999;var R,z;for(z=0;r>z;z++)R=ye(p[z]-o[1]),t>R&&(t=R,E=z);if(c>E&&null!==p[c])E=c;else for(D-c+E>r&&null!==p[c]&&(E=r-D+c);null===p[E];)E++;_.push({i:E,y:p[E]}),p[E]=null}_.sort(P)}for(c=0;D>c;c++)t=N[c],o=t.labelPos,i=t.dataLabel,h=t.visible===!1?"hidden":"visible",t=o[1],w>0?(r=_.pop(),E=r.i,l=r.y,(t>l&&null!==p[E+1]||l>t&&null!==p[E-1])&&(l=t)):l=t,a=m.justify?k[0]+(u?-1:1)*(S+w):d.getX(0===E||E===p.length-1?t:l,u),i._attr={visibility:h,align:o[6]},i._pos={x:a+m.x+({left:v,right:-v}[o[6]]||0),y:l+m.y-10},i.connX=a,i.connY=l,null===this.options.size&&(r=i.width,v>a-r?A[3]=me(fe(r-a+v),A[3]):a+r>x-v&&(A[1]=me(fe(a+r-x+v),A[1])),0>l-s/2?A[0]=me(fe(-l+s/2),A[0]):l+s/2>g&&(A[2]=me(fe(l+s/2-g),A[2])))}(0===L(A)||this.verifyDataLabelOverflow(A))&&(this.placeDataLabels(),M&&y&&rn(this.points,function(t){e=t.connector,o=t.labelPos,(i=t.dataLabel)&&i._pos?(h=i._attr.visibility,a=i.connX,l=i.connY,n=b?["M",a+("left"===o[6]?5:-5),l,"C",a,l,2*o[2]-o[4],2*o[3]-o[5],o[2],o[3],"L",o[4],o[5]]:["M",a+("left"===o[6]?5:-5),l,"L",o[2],o[3],"L",o[4],o[5]],e?(e.animate({d:n}),e.attr("visibility",h)):t.connector=e=d.chart.renderer.path(n).attr({"stroke-width":y,stroke:m.connectorColor||t.color||"#606060",visibility:h}).add(d.group)):e&&(t.connector=e.destroy())}))}},verifyDataLabelOverflow:function(t){var e,n=this.center,i=this.options,r=i.center,o=i=i.minSize||80;return null!==r[0]?o=me(n[2]-me(t[1],t[3]),i):(o=me(n[2]-t[1]-t[3],i),n[0]+=(t[3]-t[1])/2),null!==r[1]?o=me(ve(o,n[2]-me(t[0],t[2])),i):(o=me(ve(o,n[2]-t[0]-t[2]),i),n[1]+=(t[0]-t[2])/2),o<n[2]?(n[2]=o,this.translate(n),rn(this.points,function(t){t.dataLabel&&(t.dataLabel._pos=null)}),this.drawDataLabels()):e=!0,e},placeDataLabels:function(){rn(this.points,function(t){var e,t=t.dataLabel;t&&((e=t._pos)?(t.attr(t._attr),t[t.moved?"animate":"attr"](e),t.moved=!0):t&&t.attr({y:-999}))})},alignDataLabel:Ie,drawTracker:vn.prototype.drawTracker,drawLegendSymbol:Je.prototype.drawLegendSymbol,getSymbol:Ie},Qe=m(wn,Qe),Ke.pie=Qe,t(Highcharts,{Axis:B,Chart:$,Color:gn,Legend:W,Pointer:j,Point:bn,Tick:O,Tooltip:F,Renderer:Y,Series:wn,SVGElement:z,SVGRenderer:mn,arrayMin:A,arrayMax:L,charts:He,dateFormat:U,format:b,pathAnim:Z,getOptions:function(){return q},hasBidiBug:Ne,isTouchDevice:Pe,numberFormat:v,seriesTypes:Ke,setOptions:function(t){return q=e(q,t),R(),q},addEvent:ln,removeEvent:hn,createElement:g,discardElement:E,css:p,each:rn,extend:t,map:an,merge:e,pick:f,splat:d,extendClass:m,pInt:n,wrap:x,svg:_e,canvas:De,vml:!_e&&!De,product:"Highcharts",version:"3.0.6"})}(); |