if(!AmCharts)var AmCharts={};AmCharts.themes={};AmCharts.inheriting={}; AmCharts.Class=function(a){var b=function(){arguments[0]!==AmCharts.inheriting&&(this.events={},this.construct.apply(this,arguments))};a.inherits?(b.prototype=new a.inherits(AmCharts.inheriting),b.base=a.inherits.prototype,delete a.inherits):(b.prototype.createEvents=function(){for(var a=0,b=arguments.length;aAmCharts.IEversion&&(AmCharts.isModern=!1));AmCharts.dx=0;AmCharts.dy=0;if(document.addEventListener||window.opera)AmCharts.isNN=!0,AmCharts.isIE=!1,AmCharts.dx=0.5,AmCharts.dy=0.5; document.attachEvent&&(AmCharts.isNN=!1,AmCharts.isIE=!0,AmCharts.isModern||(AmCharts.dx=0,AmCharts.dy=0));window.chrome&&(AmCharts.chrome=!0);AmCharts.handleResize=function(){for(var a=AmCharts.charts,b=0;bc&&(a=c);return a};AmCharts.isDefined=function(a){return void 0===a?!1:!0};AmCharts.stripNumbers=function(a){return a.replace(/[0-9]+/g,"")};AmCharts.roundTo=function(a,b){if(0>b)return a;var c=Math.pow(10,b);return Math.round(a*c)/c}; AmCharts.toFixed=function(a,b){var c=String(Math.round(a*Math.pow(10,b)));if(0=g[b].contains){var k=a-Math.floor(a/g[b].contains)*g[b].contains;"ss"==b&&(k=AmCharts.formatNumber(k,e),1==k.split(h)[0].length&&(k="0"+k));("mm"==b||"hh"==b)&&10>k&&(k="0"+k);c=k+""+d[b]+""+c;a=Math.floor(a/g[b].contains);b=g[b].nextInterval;return AmCharts.formatDuration(a,b,c,d,f,e)}"ss"==b&&(a=AmCharts.formatNumber(a,e),1==a.split(h)[0].length&&(a="0"+a));("mm"==b||"hh"==b)&&10>a&&(a="0"+a);c=a+""+ d[b]+""+c;if(g[f].count>g[b].count)for(a=g[b].count;aa?"-":"";a=Math.abs(a);var h=String(a),k=!1;-1!=h.indexOf("e")&&(k=!0);0<=c&&!k&&(h=AmCharts.toFixed(a,c));var l="";if(k)l=h;else{var h=h.split("."),k=String(h[0]),m;for(m=k.length;0<=m;m-=3)l=m!=k.length?0!==m?k.substring(m-3,m)+b+l:k.substring(m-3,m)+l:k.substring(m-3,m);void 0!==h[1]&&(l=l+e+h[1]);void 0!==c&&0=c.x-5&&a<=c.x+c.width+5&&b>=c.y-5&&b<=c.y+c.height+5?!0:!1};AmCharts.isPercents=function(a){if(-1!=String(a).indexOf("%"))return!0}; AmCharts.findPosX=function(a){var b=a,c=a.offsetLeft;if(a.offsetParent){for(;a=a.offsetParent;)c+=a.offsetLeft;for(;(b=b.parentNode)&&b!=document.body;)c-=b.scrollLeft||0}return c};AmCharts.findPosY=function(a){var b=a,c=a.offsetTop;if(a.offsetParent){for(;a=a.offsetParent;)c+=a.offsetTop;for(;(b=b.parentNode)&&b!=document.body;)c-=b.scrollTop||0}return c};AmCharts.findIfFixed=function(a){if(a.offsetParent)for(;a=a.offsetParent;)if("fixed"==AmCharts.getStyle(a,"position"))return!0;return!1}; AmCharts.findIfAuto=function(a){return a.style&&"auto"==AmCharts.getStyle(a,"overflow")?!0:a.parentNode?AmCharts.findIfAuto(a.parentNode):!1};AmCharts.findScrollLeft=function(a,b){a.scrollLeft&&(b+=a.scrollLeft);return a.parentNode?AmCharts.findScrollLeft(a.parentNode,b):b};AmCharts.findScrollTop=function(a,b){a.scrollTop&&(b+=a.scrollTop);return a.parentNode?AmCharts.findScrollTop(a.parentNode,b):b}; AmCharts.formatValue=function(a,b,c,d,f,e,g,h){if(b){void 0===f&&(f="");var k;for(k=0;ka&&(g="-");a=Math.abs(a);if(1=b[h].number&&(k=a/b[h].number,l=Number(d.precision),1>l&&(l=1),c=AmCharts.roundTo(k,l),l=AmCharts.formatNumber(c,{precision:-1,decimalSeparator:d.decimalSeparator,thousandsSeparator:d.thousandsSeparator}),!f||k==c)){e=g+""+l+""+b[h].prefix;break}}else for(h=0;h"==a&&(a="easeOutSine");"<"==a&&(a="easeInSine");"elastic"==a&&(a="easeOutElastic");return a}; AmCharts.getObjById=function(a,b){var c,d;for(d=0;d"));return a};AmCharts.fixBrakes=function(a){if(AmCharts.isModern){var b=RegExp("
","g");a&&(a=a.replace(b,"\n"))}else a=AmCharts.fixNewLines(a);return a}; AmCharts.deleteObject=function(a,b){if(a){if(void 0===b||null===b)b=20;if(0!==b)if("[object Array]"===Object.prototype.toString.call(a))for(var c=0;ca&&(a=3)):a=this.width/this.minGap,this.gridCount=Math.max(a,1));this.axisWidth= this.axisLine.axisWidth;this.addTitle()},setOrientation:function(a){this.orientation=a?"H":"V"},addTitle:function(){var a=this.title;if(a){var b=this.chart;this.titleLabel=AmCharts.text(b.container,a,this.titleColor,b.fontFamily,this.titleFontSize,"middle",this.titleBold)}},positionTitle:function(){var a=this.titleLabel;if(a){var b,c,d=this.labelsSet,f={};0=this.gridCount&&(this.gridCount=1);this.totals=[];this.data=this.chart.chartData;var a=this.chart;"xy"!=a.chartType&&(this.stackGraphs("smoothedLine"),this.stackGraphs("line"),this.stackGraphs("column"),this.stackGraphs("step"));this.recalculateToPercents&&this.recalculate();this.synchronizationMultiplier&& this.synchronizeWith?(AmCharts.isString(this.synchronizeWith)&&(this.synchronizeWith=a.getValueAxisById(this.synchronizeWith)),this.synchronizeWith&&(this.synchronizeWithAxis(this.synchronizeWith),this.foundGraphs=!0)):(this.foundGraphs=!1,this.getMinMax())},draw:function(){AmCharts.ValueAxis.base.draw.call(this);var a=this.chart,b=this.set;"duration"==this.type&&(this.duration="ss");!0===this.dataChanged&&(this.updateData(),this.dataChanged=!1);if(this.logarithmic&&(0>=this.getMin(0,this.data.length- 1)||0>=this.minimum))this.fire("logarithmicAxisFailed",{type:"logarithmicAxisFailed",chart:a});else{this.grid0=null;var c,d,f=a.dx,e=a.dy,g=!1,h=this.logarithmic,k=a.chartType;if(isNaN(this.min)||isNaN(this.max)||!this.foundGraphs||Infinity==this.min||-Infinity==this.max)g=!0;else{var l=this.labelFrequency,m=this.showFirstLabel,n=this.showLastLabel,p=1,q=0,t=Math.round((this.max-this.min)/this.step)+1,r;!0===h?(r=Math.log(this.max)*Math.LOG10E-Math.log(this.minReal)*Math.LOG10E,this.stepWidth=this.axisWidth/ r,2this.gridCount&&(p=Math.ceil(t/this.gridCount)))):this.stepWidth=this.axisWidth/(this.max-this.min);var s=0;1>this.step&&-1this.maxDecCount&&(s=this.maxDecCount);var w=this.precision;isNaN(w)||(s=w);this.max=AmCharts.roundTo(this.max,this.maxDecCount);this.min=AmCharts.roundTo(this.min,this.maxDecCount);var v={};v.precision= s;v.decimalSeparator=a.numberFormatter.decimalSeparator;v.thousandsSeparator=a.numberFormatter.thousandsSeparator;this.numberFormatter=v;var u,A=this.guides,F=A.length;if(0this.baseValue&&this.max>this.baseValue&&(d=this.min);this.minb&&c.shift();for(var d=Math.floor(Math.log(Math.abs(a))*Math.LOG10E),f=0;fa){if(g=Math.pow(10,-g)*e,g==Math.round(g))return e}else if(e==Math.round(e))return e}},stackGraphs:function(a){var b= this.stackType;"stacked"==b&&(b="regular");"line"==b&&(b="none");"100% stacked"==b&&(b="100%");this.stackType=b;var c=[],d=[],f=[],e=[],g,h=this.chart.graphs,k,l,m,n,p=this.baseValue,q=!1;if("line"==a||"step"==a||"smoothedLine"==a)q=!0;if(q&&("regular"==b||"100%"==b))for(n=0;ng?(l.values.close=g,isNaN(d[k])?l.values.open=p:(l.values.close+=d[k],l.values.open=d[k]),d[k]=l.values.close):(l.values.close=g,isNaN(f[k])?l.values.open=p:(l.values.close+=f[k],l.values.open=f[k]),f[k]=l.values.close)))}}for(k=this.start;k<=this.end;k++)for(n=0;nc?(l.values.close=AmCharts.fitToBounds(c+d[k],-100,100),l.values.open=d[k],d[k]=l.values.close):(l.values.close=AmCharts.fitToBounds(c+f[k],-100,100),l.values.open=f[k],f[k]=l.values.close)))))},recalculate:function(){var a=this.chart.graphs,b;for(b=0;bthis.max&&(this.max= c.toValue),c.value>this.max&&(this.max=c.value);isNaN(this.minimum)||(this.min=this.minimum);isNaN(this.maximum)||(this.max=this.maximum);this.min>this.max&&(a=this.max,this.max=this.min,this.min=a);isNaN(this.minTemp)||(this.min=this.minTemp);isNaN(this.maxTemp)||(this.max=this.maxTemp);this.minReal=this.min;this.maxReal=this.max;0===this.min&&0===this.max&&(this.max=9);this.min>this.max&&(this.min=this.max-1);a=this.min;b=this.max;c=this.max-this.min;d=0===c?Math.pow(10,Math.floor(Math.log(Math.abs(this.max))* Math.LOG10E))/10:Math.pow(10,Math.floor(Math.log(Math.abs(c))*Math.LOG10E))/10;isNaN(this.maximum)&&isNaN(this.maxTemp)&&(this.max=Math.ceil(this.max/d)*d+d);isNaN(this.minimum)&&isNaN(this.minTemp)&&(this.min=Math.floor(this.min/d)*d-d);0>this.min&&0<=a&&(this.min=0);0=b&&(this.max=0);"100%"==this.stackType&&(this.min=0>this.min?-100:0,this.max=0>this.max?0:100);c=this.max-this.min;d=Math.pow(10,Math.floor(Math.log(Math.abs(c))*Math.LOG10E))/10;this.step=Math.ceil(c/this.gridCount/d)* d;c=Math.pow(10,Math.floor(Math.log(Math.abs(this.step))*Math.LOG10E));c=this.fixStepE(c);d=Math.ceil(this.step/c);5=d&&2c?(this.maxDecCount=Math.abs(Math.log(Math.abs(c))*Math.LOG10E),this.maxDecCount=Math.round(this.maxDecCount),this.step=AmCharts.roundTo(this.step,this.maxDecCount+1)):this.maxDecCount=0;this.min=this.step*Math.floor(this.min/this.step);this.max=this.step*Math.ceil(this.max/this.step);0>this.min&&0<=a&&(this.min= 0);0=b&&(this.max=0);1b?Math.abs(b)-1:Math.abs(b);var f;for(f=0;fb?Number("0."+ c+String(a)):Number(String(a)+c)},getMin:function(a,b){var c,d;for(d=a;d<=b;d++){var f=this.data[d].axes[this.id].graphs,e;for(e in f)if(f.hasOwnProperty(e)){var g=this.chart.getGraphById(e);if(g.includeInMinMax&&(!g.hidden||this.includeHidden)){isNaN(c)&&(c=Infinity);this.foundGraphs=!0;g=f[e].values;this.recalculateToPercents&&(g=f[e].percents);var h;if(this.minMaxField)h=g[this.minMaxField],ha&&(a=e);else for(var g in f)f.hasOwnProperty(g)&&"percents"!=g&&"total"!=g&&(e=f[g],e>a&&(a=e))}}}return a},dispatchZoomEvent:function(a, b){var c={type:"axisZoomed",startValue:a,endValue:b,target:this,chart:this.chart};this.fire(c.type,c)},zoomToValues:function(a,b){if(bthis.max&&(b=this.max);c={type:"axisSelfZoomed"};c.chart=this.chart;c.valueAxis=this;c.multiplier=this.axisWidth/Math.abs(this.getCoordinate(b)-this.getCoordinate(a));c.position="V"==this.orientation?this.reversed?this.getCoordinate(a):this.getCoordinate(b):this.reversed?this.getCoordinate(b):this.getCoordinate(a);this.fire(c.type, c)},coordinateToValue:function(a){if(isNaN(a))return NaN;var b=this.axisWidth,c=this.stepWidth,d=this.reversed,f=this.rotate,e=this.min,g=this.minReal;return!0===this.logarithmic?Math.pow(10,(f?!0===d?(b-a)/c:a/c:!0===d?a/c:(b-a)/c)+Math.log(g)*Math.LOG10E):!0===d?f?e-(a-b)/c:a/c+e:f?a/c+e:e-(a-b)/c},getCoordinate:function(a){if(isNaN(a))return NaN;var b=this.rotate,c=this.reversed,d=this.axisWidth,f=this.stepWidth,e=this.min,g=this.minReal;!0===this.logarithmic?(a=Math.log(a)*Math.LOG10E-Math.log(g)* Math.LOG10E,b=b?!0===c?d-f*a:f*a:!0===c?f*a:d-f*a):b=!0===c?b?d-f*(a-e):f*(a-e):b?f*(a-e):d-f*(a-e);b=this.rotate?b+(this.x-this.viX):b+(this.y-this.viY);return Math.round(b)},synchronizeWithAxis:function(a){this.synchronizeWith=a;this.removeListener(this.synchronizeWith,"axisChanged",this.handleSynchronization);this.listenTo(this.synchronizeWith,"axisChanged",this.handleSynchronization)},handleSynchronization:function(a){var b=this.synchronizeWith;a=b.min;var c=b.max,b=b.step,d=this.synchronizationMultiplier; d&&(this.min=a*d,this.max=c*d,this.step=b*d,a=Math.pow(10,Math.floor(Math.log(Math.abs(this.step))*Math.LOG10E)),a=Math.abs(Math.log(Math.abs(a))*Math.LOG10E),this.maxDecCount=a=Math.round(a),this.draw())}});AmCharts.RecAxis=AmCharts.Class({construct:function(a){var b=a.chart,c=a.axisThickness,d=a.axisColor,f=a.axisAlpha,e=a.offset,g=a.dx,h=a.dy,k=a.viX,l=a.viY,m=a.viH,n=a.viW,p=b.container;"H"==a.orientation?(d=AmCharts.line(p,[0,n],[0,0],d,f,c),this.axisWidth=a.width,"bottom"==a.position?(a=c/2+e+m+l-1,c=k):(a=-c/2-e+l+h,c=g+k)):(this.axisWidth=a.height,"right"==a.position?(d=AmCharts.line(p,[0,0,-g],[0,m,m-h],d,f,c),a=l+h,c=c/2+e+g+n+k-1):(d=AmCharts.line(p,[0,0],[0,m],d,f,c),a=l,c=-c/2-e+k));d.translate(c, a);b.axesSet.push(d);this.set=d}});AmCharts.RecItem=AmCharts.Class({construct:function(a,b,c,d,f,e,g,h,k,l){b=Math.round(b);void 0==c&&(c="");k||(k=0);void 0==d&&(d=!0);var m=a.chart.fontFamily,n=a.fontSize;void 0==n&&(n=a.chart.fontSize);var p=a.color;void 0==p&&(p=a.chart.color);var q=a.chart.container,t=q.set();this.set=t;var r=a.axisThickness,s=a.axisColor,w=a.axisAlpha,v=a.tickLength,u=a.gridAlpha,A=a.gridThickness,F=a.gridColor,y=a.dashLength,z=a.fillColor,H=a.fillAlpha,I=a.labelsEnabled,B=a.labelRotation,W=a.counter,P=a.inside, da=a.dx,X=a.dy,Fa=a.orientation,ea=a.position,$=a.previousCoord,L=a.viH,V=a.viW,oa=a.offset,Y,Z;g?(I=!0,isNaN(g.tickLength)||(v=g.tickLength),void 0!=g.lineColor&&(F=g.lineColor),void 0!=g.color&&(p=g.color),isNaN(g.lineAlpha)||(u=g.lineAlpha),isNaN(g.dashLength)||(y=g.dashLength),isNaN(g.lineThickness)||(A=g.lineThickness),!0===g.inside&&(P=!0),isNaN(g.labelRotation)||(B=g.labelRotation),isNaN(g.fontSize)||(n=g.fontSize),g.position&&(ea=g.position)):""===c&&(v=0);Z="start";f&&(Z="middle");var aa= B*Math.PI/180,ha,G=0,C=0,ia=0,Q=ha=0;"V"==Fa&&(B=0);var x;I&&(x=AmCharts.text(q,c,p,m,n,Z,h),Q=x.getBBox().width);if("H"==Fa){if(0<=b&&b<=V+1&&(0B?(C-=v+n+3+3-Q/2*Math.sin(aa),G-=Q/2*Math.cos(aa)):C-=v+n+3+3:0B?(C=L+v+3-Q/2*Math.sin(aa)+2,G+=Q/2*Math.cos(aa)):C+=v+r+3+3):(C+=X+n/2-oa,G+=da,P?0V+2||0>X))x.remove(),x=null}else{0<=b&&b<=L+1&&(0L+1||Cc&&"object"==typeof d&&(d=d.join(",").split(",").reverse());"V"==g?(a=AmCharts.rect(k,a.width,c,d,l),a.translate(f,b-h+e)):(a=AmCharts.rect(k, c,a.height,d,l),a.translate(b-h+f,e));this.set=k.set([a])},graphics:function(){return this.set},getLabel:function(){}});AmCharts.AmChart=AmCharts.Class({construct:function(a){this.theme=a;this.version="3.3.2";AmCharts.addChart(this);this.createEvents("dataUpdated","init","rendered","drawn");this.height=this.width="100%";this.dataChanged=!0;this.chartCreated=!1;this.previousWidth=this.previousHeight=0;this.backgroundColor="#FFFFFF";this.borderAlpha=this.backgroundAlpha=0;this.color=this.borderColor="#000000";this.fontFamily="Verdana";this.fontSize=11;this.usePrefixes=!1;this.numberFormatter={precision:-1,decimalSeparator:".", thousandsSeparator:","};this.percentFormatter={precision:2,decimalSeparator:".",thousandsSeparator:","};this.labels=[];this.allLabels=[];this.titles=[];this.marginRight=this.marginLeft=this.autoMarginOffset=0;this.timeOuts=[];var b=document.createElement("div"),c=b.style;c.overflow="hidden";c.position="relative";c.textAlign="left";this.chartDiv=b;b=document.createElement("div");c=b.style;c.overflow="hidden";c.position="relative";c.textAlign="left";this.legendDiv=b;this.titleHeight=0;this.hideBalloonTime= 150;this.handDrawScatter=2;this.handDrawThickness=1;this.prefixesOfBigNumbers=[{number:1E3,prefix:"k"},{number:1E6,prefix:"M"},{number:1E9,prefix:"G"},{number:1E12,prefix:"T"},{number:1E15,prefix:"P"},{number:1E18,prefix:"E"},{number:1E21,prefix:"Z"},{number:1E24,prefix:"Y"}];this.prefixesOfSmallNumbers=[{number:1E-24,prefix:"y"},{number:1E-21,prefix:"z"},{number:1E-18,prefix:"a"},{number:1E-15,prefix:"f"},{number:1E-12,prefix:"p"},{number:1E-9,prefix:"n"},{number:1E-6,prefix:"\u03bc"},{number:0.001, prefix:"m"}];this.panEventsEnabled=!1;AmCharts.bezierX=3;AmCharts.bezierY=6;this.product="amcharts";this.animations=[];this.balloon=new AmCharts.AmBalloon(this.theme);this.balloon.chart=this;this.type=this.chartType;AmCharts.applyTheme(this,a,"AmChart")},drawChart:function(){this.drawBackground();this.redrawLabels();this.drawTitles()},drawBackground:function(){AmCharts.remove(this.background);var a=this.container,b=this.backgroundColor,c=this.backgroundAlpha,d=this.set;AmCharts.isModern||0!==c||(c= 0.001);var f=this.updateWidth();this.realWidth=f;var e=this.updateHeight();this.realHeight=e;this.background=b=AmCharts.polygon(a,[0,f-1,f-1,0],[0,0,e-1,e-1],b,c,1,this.borderColor,this.borderAlpha);d.push(b);if(b=this.backgroundImage)this.path&&(b=this.path+b),this.bgImg=a=a.image(b,0,0,f,e),d.push(a)},drawTitles:function(){var a=this.titles;if(AmCharts.ifArray(a)){var b=20,c;for(c=0;ca||isNaN(a))a=0;this.chartDiv.style.height=a+"px"}}return a},updateWidth:function(){var a=this.divRealWidth,b=this.divRealHeight,c=this.legend;if(c){var d=this.legendDiv,f=d.offsetWidth,e=d.offsetHeight,d=d.style,g=this.chartDiv.style, c=c.position;if("right"==c||"left"==c){a-=f;if(0>a||isNaN(a))a=0;g.width=a+"px";"left"==c?g.left=f+"px":d.left=a+"px";d.top=(b-e)/2+"px"}}return a},getTitleHeight:function(){var a=0,b=this.titles;if(0a.valueAxis.minMaxMultiplier&&a.positiveClip(a.set);break;case "radar":a.createRadarGraph();break;case "xy":a.createXYGraph(), a.positiveClip(a.set)}a.playedTO=setTimeout(function(){a.setAnimationPlayed.call(a)},500*a.chart.startDuration)}},setAnimationPlayed:function(){this.animationPlayed=!0},createXYGraph:function(){var a=[],b=[],c=this.xAxis,d=this.yAxis;this.pmh=d.viH+1;this.pmw=c.viW+1;this.pmy=this.pmx=0;var f;for(f=this.start;f<=this.end;f++){var e=this.data[f].axes[c.id].graphs[this.id],g=e.values,h=g.x,k=g.y,g=c.getCoordinate(h),l=d.getCoordinate(k);!isNaN(h)&&!isNaN(k)&&(a.push(g),b.push(l),(h=this.createBullet(e, g,l,f))||(h=0),k=this.labelText)&&(e=this.createLabel(e,g,l,k),this.allBullets.push(e),this.positionLabel(g,l,e,this.labelPosition,h))}this.drawLineGraph(a,b);this.launchAnimation()},createRadarGraph:function(){var a=this.valueAxis.stackType,b=[],c=[],d,f,e;for(e=this.start;e<=this.end;e++){var g=this.data[e].axes[this.valueAxis.id].graphs[this.id],h;h="none"==a||"3d"==a?g.values.value:g.values.close;if(isNaN(h))this.drawLineGraph(b,c),b=[],c=[];else{var k=this.y-(this.valueAxis.getCoordinate(h)- this.height),l=180-360/(this.end-this.start+1)*e;h=k*Math.sin(l/180*Math.PI);k*=Math.cos(l/180*Math.PI);b.push(h);c.push(k);(l=this.createBullet(g,h,k,e))||(l=0);var m=this.labelText;m&&(g=this.createLabel(g,h,k,m),this.allBullets.push(g),this.positionLabel(h,k,g,this.labelPosition,l));isNaN(d)&&(d=h);isNaN(f)&&(f=k)}}b.push(d);c.push(f);this.drawLineGraph(b,c);this.launchAnimation()},positionLabel:function(a,b,c,d,f){var e=c.getBBox();switch(d){case "left":a-=(e.width+f)/2+2;break;case "top":b-= (f+e.height)/2+1;break;case "right":a+=(e.width+f)/2+2;break;case "bottom":b+=(f+e.height)/2+1}c.translate(a,b)},getGradRotation:function(){var a=270;"horizontal"==this.gradientOrientation&&(a=0);return this.gradientRotation=a},createSerialGraph:function(){this.dashLengthSwitched=this.fillColorsSwitched=this.lineColorSwitched=void 0;var a=this.chart,b=this.id,c=this.index,d=this.data,f=this.chart.container,e=this.valueAxis,g=this.type,h=this.columnWidthReal;isNaN(this.columnWidth)||(h=this.columnWidth); isNaN(h)&&(h=0.8);var k=this.width,l=this.height,m=this.y,n=this.rotate,p=this.columnCount,q=AmCharts.toCoordinate(this.cornerRadiusTop,h/2),t=this.connect,r=[],s=[],w,v,u,A,F=this.chart.graphs.length,y,z=this.dx/this.depthCount,H=this.dy/this.depthCount,I=e.stackType,B=this.labelPosition,W=this.start,P=this.end,da=this.scrollbar,X=this.categoryAxis,Fa=this.baseCoord,ea=this.negativeBase,$=this.columnIndex,L=this.lineThickness,V=this.lineAlpha,oa=this.lineColor,Y=this.dashLength,Z=this.set,aa=B,ha= this.getGradRotation(),G=this.chart.columnSpacing,C=X.cellWidth,ia=(C*h-p)/p;G>ia&&(G=ia);var Q,x,Ta,Za=l+1,$a=k+1,Ua=0,ab=0,bb,cb,Va,Wa,Jb=this.fillColors,Ja=this.negativeFillColors,Aa=this.negativeLineColor,Ka=this.fillAlphas,La=this.negativeFillAlphas;"object"==typeof Ka&&(Ka=Ka[0]);"object"==typeof La&&(La=La[0]);var Xa=e.getCoordinate(e.min);e.logarithmic&&(Xa=e.getCoordinate(e.minReal));this.minCoord=Xa;this.resetBullet&&(this.bullet="none");if(!da&&("line"==g||"smoothedLine"==g||"step"==g)&& (1==d.length&&"step"!=g&&"none"==this.bullet&&(this.bullet="round",this.resetBullet=!0),Ja||void 0!=Aa)){var Ga=ea;Ga>e.max&&(Ga=e.max);Gah&&(h=1);var J;if("line"==g||"step"==g||"smoothedLine"==g){if(0ma&&(ma=-1E5);ma>k+1E5&&(ma=k+1E5);n?(E=D,R=O,O=D=ma,isNaN(ja)&&!this.fillToGraph&&(R=Fa),Na=Ba,Oa=Ca):(R=E=ma,isNaN(ja)&&!this.fillToGraph&&(O=Fa));Sxb&&ja>xb))if(n){"3d"==I?(N=D-0.5*(h+G)+G/2+H*$,M=R+z*$):(N=D-(p/2-$)*(h+G)+G/2,M=R);K=h;ca=E;ga=N+h/2;pa=E;qa=N+h/2;N+K>l&&(K=l-N);0>N&&(K+=N,N=0);ba=E-R;var Kb=M;M=AmCharts.fitToBounds(M,0,k);ba+=Kb-M;ba=AmCharts.fitToBounds(ba,-M,k-M+z*$);if(NS)B=e.reversed?"right":"left";else if("regular"==I||"100%"==I)ca+=this.dx}else{"3d"==I?(M=E-0.5*(h+G)+G/2+z*$,N=O+H*$):(M=E-(p/2-$)*(h+G)+G/2,N=O);K=h;ca=M+h/2;ga=D;pa=M+h/2;qa=D;M+K>k+$*z&&(K=k-M+$*z);0>M&&(K+=M,M=0);ba=D-O;var Lb=N;N=AmCharts.fitToBounds(N,this.dy,l);ba+=Lb-N;ba=AmCharts.fitToBounds(ba,-N+H*$,l-N);if(MS&&"middle"!=B&&"inside"!=B)B="bottom";else if(B=aa,"regular"==I||"100%"==I)ga+=this.dy}if(na&&(sa=na.set,sa.translate(M,N),this.columnsSet.push(sa),(x.url||this.showHandOnHover)&&sa.setAttr("cursor","pointer"),!da)){"none"==I&&(y=n?(this.end+1-J)*F-c:F*J+c);"3d"==I&&(n?(y=(F-c)*(this.end+1-J),ca+=z*this.columnIndex,pa+=z*this.columnIndex,x.y+=z*this.columnIndex):(y=(F-c)*(J+1),ca+=3,ga+=H*this.columnIndex+7,qa+=H*this.columnIndex,x.y+=H*this.columnIndex));if("regular"==I||"100%"== I)"inside"!=B&&(B="middle"),y=n?0l&&(K=l-N),0>N&&(K+=N,N=0),Nja?(jb=[E,Oa],kb=[R,Na]):(jb=[R,Oa],kb=[E,Na]);!isNaN(Oa)&&!isNaN(Na)&& Dk&&(K=k-M),0>M&&(K+=M,M=0),ba=D-O,Mja?(lb=[D,Ca],mb=[O,Ba]):(lb=[O,Ca],mb=[D,Ba]);!isNaN(Ca)&&!isNaN(Ba)&&ES?(ua=-6,fa.attr({"text-anchor":"end"})):(ua=6,fa.attr({"text-anchor":"start"}))):(va=Da/2+Ea/2,fa.x=-(Ha/2+2));break;case "middle":"column"==g&&(n?(va=-(Ea/2)+this.fontSize/2,ua=-(E-R)/2-z,0>ba&&(ua+=z),Math.abs(E-R)ba&&(va-=H),Math.abs(D-O)ba?Ha:-Ha):va=0>ba?Ea:-Ea}if(fa){if(isNaN(ga)||isNaN(ca))fa.remove(),fa=null;else if(ca+=ua,ga+=va,fa.translate(ca,ga),n){if(0>ga||ga>l)fa.remove(),fa=null}else{var Db=0;"3d"==I&&(Db=z*$);if(0>ca||ca>k+Db)fa.remove(),fa=null}fa&&this.allBullets.push(fa)}}if("regular"==I||"100%"==I){var Eb=e.totalText; if(Eb){var Ia=this.createLabel(x,0,0,Eb,e.totalTextColor);this.allBullets.push(Ia);var Fb=Ia.getBBox(),Gb=Fb.width,Hb=Fb.height,Qa,Ra,Ib=e.totals[J];Ib&&Ib.remove();var Sa=0;"column"!=g&&(Sa=Da);n?(Ra=D,Qa=0>S?E-Gb/2-2-Sa:E+Gb/2+3+Sa):(Qa=E,Ra=0>S?D+Hb/2+Sa:D-Hb/2-3-Sa);Ia.translate(Qa,Ra);e.totals[J]=Ia;n?(0>Ra||Ra>l)&&Ia.remove():(0>Qa||Qa>k)&&Ia.remove()}}}}}}if("line"==g||"step"==g||"smoothedLine"==g)"smoothedLine"==g?this.drawSmoothedGraph(r,s,T,U):this.drawLineGraph(r,s,T,U),da||this.launchAnimation(); this.bulletsHidden&&this.hideBullets()},animateColumns:function(a,b,c,d,f,e){var g=this;c=g.chart.startDuration;0b-0||b-0>this.width||c<-e/2||c-0>this.height)&&(k.remove(),k=null),k&&(this.bulletSet.push(k),k.translate(b,c),this.addListeners(k,a),this.allBullets.push(k)),a.bx=b,a.by=c);a.bulletGraphics=k;return e},showBullets:function(){var a= this.allBullets,b;this.bulletsHidden=!1;for(b=0;ba&&(a=0),a>c&&(a=c)):(a=a.mouseX-this.x,0>a&&(a=0),a>b&&(a=b));return a},updateCrosshair:function(){var a=this.chart,b=a.mouseX-this.x,c=a.mouseY-this.y,d=this.vLine,f=this.hLine,b=AmCharts.fitToBounds(b,0,this.width),c=AmCharts.fitToBounds(c,0,this.height);0a&&(f=a,g=c-a),cb&&(e=b,h=d-b),du&&(d=u-c),y+d=this.data.length||0>k+d||(g.start=k+d,g.end=B+d,this.fire(g.type,g)))}else{"start"==A&&(q-=e.cellWidth/2);"mouse"==A&&c.mouseIsOver&&(q=t?f-2:d-2);if(t){if(0>q)if(y)q=0;else{this.hideCursor();return}if(q>n+1)if(y)q=n+1;else{this.hideCursor();return}}else{if(0>q)if(y)q=0; else{this.hideCursor();return}if(q>m)if(y)q=m;else{this.hideCursor();return}}0r||r>n)s=!1}else if(q= r,r=v,0>q||q>m+g)s=!1;s&&(1!=this.graphBulletSize&&AmCharts.isModern&&(s=w.bulletGraphics)&&(s.getBBox(),s.translate(w.bx,w.by,this.graphBulletSize),this.resizedBullets.push(w)),s=e.valueBalloon,F=c.getBalloonColor(e,w),s.setBounds(k,l,k+m,l+n),s.pointerOrientation="H",s.changeColor(F),void 0!==e.balloonAlpha&&(s.fillAlpha=e.balloonAlpha),void 0!==e.balloonTextColor&&(s.color=e.balloonTextColor),s.setPosition(q+k,r+l),q=c.formatString(e.balloonText,w,e),(r=e.balloonFunction)&&(q=r(w,e)),""!==q&&(t? s.showBalloon(q):(s.text=q,s.show=!0)),!t&&s.set&&s.set.hide(),h.push({yy:v,balloon:s}))}}t||this.arrangeBalloons()}b?(g={type:"changed"},g.index=a,g.target=this,g.chart=this.chart,g.zooming=y,g.mostCloseGraph=B,g.position=t?f:d,g.target=this,c.fire("changed",g),this.fire("changed",g),this.skipZoomDispatch=!1):(this.skipZoomDispatch=!0,c.updateLegendValues(a));this.previousIndex=a;this.previousMostCloseGraph=B}}}else this.hideCursor()},enableDrawing:function(a){this.enabled=!a;this.hideCursor();this.rolledOver= !1;this.drawing=a},isZooming:function(a){a&&a!=this.zooming&&this.handleMouseDown("fake");a||a==this.zooming||this.handleMouseUp()},handleMouseOut:function(){if(this.enabled)if(this.zooming)this.setPosition();else{this.index=void 0;var a={type:"changed",index:void 0,target:this};a.chart=this.chart;this.fire("changed",a);this.hideCursor()}},handleReleaseOutside:function(){this.handleMouseUp()},handleMouseUp:function(){var a=this.chart,b=this.data,c;if(a){var d=a.mouseX-this.x,f=a.mouseY-this.y;if(this.drawingNow){this.drawingNow= !1;AmCharts.remove(this.drawingLine);c=this.drawStartX;var e=this.drawStartY;if(2Math.abs(f-this.initialMouse)&& this.fromIndex==this.index||(this.indexMath.abs(d-g)&&3>Math.abs(f-h)||(b=Math.min(g,d),e=Math.min(h,f),d=Math.abs(g-d),f=Math.abs(h-f),a.hideXScrollbar&&(b=0,d=this.width),a.hideYScrollbar&&(e=0, f=this.height),c.selectionHeight=f,c.selectionWidth=d,c.selectionY=e,c.selectionX=b,this.skipZoomDispatch||this.fire(c.type,c))}this.selectWithoutZooming||AmCharts.remove(this.selection)}this.panning=this.zooming=this.skipZoomDispatch=!1}}},showCursorAt:function(a){var b=this.chart.categoryAxis;a=b.parseDates?b.dateToCoordinate(a):b.categoryToCoordinate(a);this.previousMousePosition=NaN;this.forceShow=!0;this.setPosition(a,!1)},handleMouseDown:function(a){if(this.zoomable||this.pan||this.drawing){var b= this.rotate,c=this.chart,d=c.mouseX-this.x,f=c.mouseY-this.y;if(0document.documentMode&&(this.updateOnReleaseOnly=!0);this.dragIconWidth=18;this.dragIconHeight=25;AmCharts.applyTheme(this,a,"SimpleChartScrollbar")},draw:function(){var a= this;a.destroy();a.interval=setInterval(function(){a.updateScrollbar.call(a)},40);var b=a.chart.container,c=a.rotate,d=a.chart,f=b.set();a.set=f;d.scrollbarsSet.push(f);var e,g;c?(e=a.scrollbarHeight,g=d.plotAreaHeight):(g=a.scrollbarHeight,e=d.plotAreaWidth);a.width=e;if((a.height=g)&&e){var h=AmCharts.rect(b,e,g,a.backgroundColor,a.backgroundAlpha,1,a.backgroundColor,a.backgroundAlpha);a.bg=h;f.push(h);h=AmCharts.rect(b,e,g,"#000",0.005);f.push(h);a.invisibleBg=h;h.click(function(){a.handleBgClick()}).mouseover(function(){a.handleMouseOver()}).mouseout(function(){a.handleMouseOut()}).touchend(function(){a.handleBgClick()}); h=AmCharts.rect(b,e,g,a.selectedBackgroundColor,a.selectedBackgroundAlpha);a.selectedBG=h;f.push(h);e=AmCharts.rect(b,e,g,"#000",0.005);a.dragger=e;f.push(e);e.mousedown(function(b){a.handleDragStart(b)}).mouseup(function(){a.handleDragStop()}).mouseover(function(){a.handleDraggerOver()}).mouseout(function(){a.handleMouseOut()}).touchstart(function(b){a.handleDragStart(b)}).touchend(function(){a.handleDragStop()});e=d.pathToImages;c?(h=e+"dragIconH.gif",e=a.dragIconWidth,c=a.dragIconHeight):(h=e+ "dragIcon.gif",c=a.dragIconWidth,e=a.dragIconHeight);g=b.image(h,0,0,c,e);var h=b.image(h,0,0,c,e),k=10,l=20;d.panEventsEnabled&&(k=25,l=a.scrollbarHeight);var m=AmCharts.rect(b,k,l,"#000",0.005),n=AmCharts.rect(b,k,l,"#000",0.005);n.translate(-(k-c)/2,-(l-e)/2);m.translate(-(k-c)/2,-(l-e)/2);c=b.set([g,n]);b=b.set([h,m]);a.iconLeft=c;f.push(a.iconLeft);a.iconRight=b;f.push(b);c.mousedown(function(){a.leftDragStart()}).mouseup(function(){a.leftDragStop()}).mouseover(function(){a.iconRollOver()}).mouseout(function(){a.iconRollOut()}).touchstart(function(b){a.leftDragStart()}).touchend(function(){a.leftDragStop()}); b.mousedown(function(){a.rightDragStart()}).mouseup(function(){a.rightDragStop()}).mouseover(function(){a.iconRollOver()}).mouseout(function(){a.iconRollOut()}).touchstart(function(b){a.rightDragStart()}).touchend(function(){a.rightDragStop()});AmCharts.ifArray(d.chartData)?f.show():f.hide();a.hideDragIcons();a.clipDragger(!1)}f.translate(a.x,a.y)},updateScrollbarSize:function(a,b){var c=this.dragger,d,f,e,g;this.rotate?(d=0,f=a,e=this.width+1,g=b-a,c.setAttr("height",b-a),c.setAttr("y",f)):(d=a, f=0,e=b-a,g=this.height+1,c.setAttr("width",b-a),c.setAttr("x",d));this.clipAndUpdate(d,f,e,g)},updateScrollbar:function(){var a,b=!1,c,d,f=this.x,e=this.y,g=this.dragger,h=this.getDBox();c=h.x+f;d=h.y+e;var k=h.width,h=h.height,l=this.rotate,m=this.chart,n=this.width,p=this.height,q=m.mouseX,t=m.mouseY;a=this.initialMouse;m.mouseIsOver&&(this.dragging&&(m=this.initialCoord,l?(a=m+(t-a),0>a&&(a=0),m=p-h,a>m&&(a=m),g.setAttr("y",a)):(a=m+(q-a),0>a&&(a=0),m=n-k,a>m&&(a=m),g.setAttr("x",a))),this.resizingRight&& (l?(a=t-d,a+d>p+e&&(a=p-d+e),0>a?(this.resizingRight=!1,b=this.resizingLeft=!0):(0===a&&(a=0.1),g.setAttr("height",a))):(a=q-c,a+c>n+f&&(a=n-c+f),0>a?(this.resizingRight=!1,b=this.resizingLeft=!0):(0===a&&(a=0.1),g.setAttr("width",a)))),this.resizingLeft&&(l?(c=d,d=t,dp+e&&(d=p+e),a=!0===b?c-d:h+c-d,0>a?(this.resizingRight=!0,this.resizingLeft=!1,g.setAttr("y",c+h-e)):(0===a&&(a=0.1),g.setAttr("y",d-e),g.setAttr("height",a))):(d=q,dn+f&&(d=n+f),a=!0===b?c-d:k+c-d,0>a?(this.resizingRight= !0,this.resizingLeft=!1,g.setAttr("x",c+k-f)):(0===a&&(a=0.1),g.setAttr("x",d-f),g.setAttr("width",a)))),this.clipDragger(!0))},clipDragger:function(a){var b=this.getDBox();if(b){var c=b.x,d=b.y,f=b.width,b=b.height,e=!1;if(this.rotate){if(c=0,f=this.width+1,this.clipY!=d||this.clipH!=b)e=!0}else if(d=0,b=this.height+1,this.clipX!=c||this.clipW!=f)e=!0;e&&(this.clipAndUpdate(c,d,f,b),a&&(this.updateOnReleaseOnly||this.dispatchScrollbarEvent()))}},maskGraphs:function(){},clipAndUpdate:function(a,b, c,d){this.clipX=a;this.clipY=b;this.clipW=c;this.clipH=d;this.selectedBG.clipRect(a,b,c,d);this.updateDragIconPositions();this.maskGraphs(a,b,c,d)},dispatchScrollbarEvent:function(){if(this.skipEvent)this.skipEvent=!1;else{var a=this.chart;a.hideBalloon();var b=this.getDBox(),c=b.x,d=b.y,f=b.width,b=b.height;this.rotate?(c=d,f=this.height/b):f=this.width/f;a={type:"zoomed",position:c,chart:a,target:this,multiplier:f};this.fire(a.type,a)}},updateDragIconPositions:function(){var a=this.getDBox(),b= a.x,c=a.y,d=this.iconLeft,f=this.iconRight,e,g,h=this.scrollbarHeight;this.rotate?(e=this.dragIconWidth,g=this.dragIconHeight,d.translate((h-g)/2,c-e/2),f.translate((h-g)/2,c+a.height-e/2)):(e=this.dragIconHeight,g=this.dragIconWidth,d.translate(b-g/2,(h-e)/2),f.translate(b+-g/2+a.width,(h-e)/2))},showDragIcons:function(){this.resizeEnabled&&(this.iconLeft.show(),this.iconRight.show())},hideDragIcons:function(){this.resizingLeft||this.resizingRight||this.dragging||(this.hideResizeGrips&&(this.iconLeft.hide(), this.iconRight.hide()),this.removeCursors())},removeCursors:function(){this.chart.setMouseCursor("auto")},relativeZoom:function(a,b){this.dragger.stop();this.multiplier=a;this.position=b;this.updateScrollbarSize(b,this.rotate?b+this.height/a:b+this.width/a)},destroy:function(){this.clear();AmCharts.remove(this.set)},clear:function(){clearInterval(this.interval)},handleDragStart:function(){var a=this.chart;this.dragger.stop();this.removeCursors();this.dragging=!0;var b=this.getDBox();this.rotate?(this.initialCoord= b.y,this.initialMouse=a.mouseY):(this.initialCoord=b.x,this.initialMouse=a.mouseX)},handleDragStop:function(){this.updateOnReleaseOnly&&(this.updateScrollbar(),this.skipEvent=!1,this.dispatchScrollbarEvent());this.dragging=!1;this.mouseIsOver&&this.removeCursors();this.updateScrollbar()},handleDraggerOver:function(){this.handleMouseOver()},leftDragStart:function(){this.dragger.stop();this.resizingLeft=!0},leftDragStop:function(){this.resizingLeft=!1;this.mouseIsOver||this.removeCursors();this.updateOnRelease()}, rightDragStart:function(){this.dragger.stop();this.resizingRight=!0},rightDragStop:function(){this.resizingRight=!1;this.mouseIsOver||this.removeCursors();this.updateOnRelease()},iconRollOut:function(){this.removeCursors()},iconRollOver:function(){this.rotate?this.chart.setMouseCursor("n-resize"):this.chart.setMouseCursor("e-resize");this.handleMouseOver()},getDBox:function(){if(this.dragger)return this.dragger.getBBox()},handleBgClick:function(){if(!this.resizingRight&&!this.resizingLeft){this.zooming= !0;var a,b,c=this.scrollDuration,d=this.dragger;a=this.getDBox();var f=a.height,e=a.width;b=this.chart;var g=this.y,h=this.x,k=this.rotate;k?(a="y",b=b.mouseY-f/2-g,b=AmCharts.fitToBounds(b,0,this.height-f)):(a="x",b=b.mouseX-e/2-h,b=AmCharts.fitToBounds(b,0,this.width-e));this.updateOnReleaseOnly?(this.skipEvent=!1,d.setAttr(a,b),this.dispatchScrollbarEvent(),this.clipDragger()):(b=Math.round(b),k?d.animate({y:b},c,">"):d.animate({x:b},c,">"))}},updateOnRelease:function(){this.updateOnReleaseOnly&& (this.updateScrollbar(),this.skipEvent=!1,this.dispatchScrollbarEvent())},handleReleaseOutside:function(){if(this.set){if(this.resizingLeft||this.resizingRight||this.dragging)this.updateOnRelease(),this.removeCursors();this.mouseIsOver=this.dragging=this.resizingRight=this.resizingLeft=!1;this.hideDragIcons();this.updateScrollbar()}},handleMouseOver:function(){this.mouseIsOver=!0;this.showDragIcons()},handleMouseOut:function(){this.mouseIsOver=!1;this.hideDragIcons()}});AmCharts.ChartScrollbar=AmCharts.Class({inherits:AmCharts.SimpleChartScrollbar,construct:function(a){AmCharts.ChartScrollbar.base.construct.call(this,a);this.graphLineColor="#BBBBBB";this.graphLineAlpha=0;this.graphFillColor="#BBBBBB";this.graphFillAlpha=1;this.selectedGraphLineColor="#888888";this.selectedGraphLineAlpha=0;this.selectedGraphFillColor="#888888";this.selectedGraphFillAlpha=1;this.gridCount=0;this.gridColor="#FFFFFF";this.gridAlpha=0.7;this.skipEvent=this.autoGridCount=!1;this.color= "#FFFFFF";this.scrollbarCreated=!1;AmCharts.applyTheme(this,a,"ChartScrollbar")},init:function(){var a=this.categoryAxis,b=this.chart;a||(this.categoryAxis=a=new AmCharts.CategoryAxis);a.chart=b;a.id="scrollbar";a.dateFormats=b.categoryAxis.dateFormats;a.boldPeriodBeginning=b.categoryAxis.boldPeriodBeginning;a.axisItemRenderer=AmCharts.RecItem;a.axisRenderer=AmCharts.RecAxis;a.guideFillRenderer=AmCharts.RecFill;a.inside=!0;a.fontSize=this.fontSize;a.tickLength=0;a.axisAlpha=0;AmCharts.isString(this.graph)&& (this.graph=AmCharts.getObjById(b.graphs,this.graph));if(a=this.graph){var c=this.valueAxis;c||(this.valueAxis=c=new AmCharts.ValueAxis,c.visible=!1,c.scrollbar=!0,c.axisItemRenderer=AmCharts.RecItem,c.axisRenderer=AmCharts.RecAxis,c.guideFillRenderer=AmCharts.RecFill,c.labelsEnabled=!1,c.chart=b);b=this.unselectedGraph;b||(b=new AmCharts.AmGraph,b.scrollbar=!0,this.unselectedGraph=b,b.negativeBase=a.negativeBase,b.noStepRisers=a.noStepRisers);b=this.selectedGraph;b||(b=new AmCharts.AmGraph,b.scrollbar= !0,this.selectedGraph=b,b.negativeBase=a.negativeBase,b.noStepRisers=a.noStepRisers)}this.scrollbarCreated=!0},draw:function(){var a=this;AmCharts.ChartScrollbar.base.draw.call(a);a.scrollbarCreated||a.init();var b=a.chart,c=b.chartData,d=a.categoryAxis,f=a.rotate,e=a.x,g=a.y,h=a.width,k=a.height,l=b.categoryAxis,m=a.set;d.setOrientation(!f);d.parseDates=l.parseDates;d.rotate=f;d.equalSpacing=l.equalSpacing;d.minPeriod=l.minPeriod;d.startOnAxis=l.startOnAxis;d.viW=h;d.viH=k;d.width=h;d.height=k;d.gridCount= a.gridCount;d.gridColor=a.gridColor;d.gridAlpha=a.gridAlpha;d.color=a.color;d.tickLength=0;d.axisAlpha=0;d.autoGridCount=a.autoGridCount;d.parseDates&&!d.equalSpacing&&d.timeZoom(b.firstTime,b.lastTime);d.zoom(0,c.length-1);if(l=a.graph){var n=a.valueAxis,p=l.valueAxis;n.id=p.id;n.rotate=f;n.setOrientation(f);n.width=h;n.height=k;n.viW=h;n.viH=k;n.dataProvider=c;n.reversed=p.reversed;n.logarithmic=p.logarithmic;n.gridAlpha=0;n.axisAlpha=0;m.push(n.set);f?(n.y=g,n.x=0):(n.x=e,n.y=0);var e=Infinity, g=-Infinity,q;for(q=0;qg&&(g=s)}}Infinity!=e&&(n.minimum=e);-Infinity!=g&&(n.maximum=g+0.1*(g-e));e==g&&(n.minimum-=1,n.maximum+=1);void 0!==a.minimum&&(n.minimum=a.minimum);void 0!==a.maximum&&(n.maximum=a.maximum);n.zoom(0,c.length-1);r=a.unselectedGraph;r.id=l.id;r.rotate=f;r.chart=b;r.chartType=b.chartType;r.data=c;r.valueAxis=n;r.chart=l.chart;r.categoryAxis= a.categoryAxis;r.periodSpan=l.periodSpan;r.valueField=l.valueField;r.openField=l.openField;r.closeField=l.closeField;r.highField=l.highField;r.lowField=l.lowField;r.lineAlpha=a.graphLineAlpha;r.lineColor=a.graphLineColor;r.fillAlphas=a.graphFillAlpha;r.fillColors=a.graphFillColor;r.connect=l.connect;r.hidden=l.hidden;r.width=h;r.height=k;p=a.selectedGraph;p.id=l.id;p.rotate=f;p.chart=b;p.chartType=b.chartType;p.data=c;p.valueAxis=n;p.chart=l.chart;p.categoryAxis=d;p.periodSpan=l.periodSpan;p.valueField= l.valueField;p.openField=l.openField;p.closeField=l.closeField;p.highField=l.highField;p.lowField=l.lowField;p.lineAlpha=a.selectedGraphLineAlpha;p.lineColor=a.selectedGraphLineColor;p.fillAlphas=a.selectedGraphFillAlpha;p.fillColors=a.selectedGraphFillColor;p.connect=l.connect;p.hidden=l.hidden;p.width=h;p.height=k;b=a.graphType;b||(b=l.type);r.type=b;p.type=b;c=c.length-1;r.zoom(0,c);p.zoom(0,c);p.set.click(function(){a.handleBackgroundClick()}).mouseover(function(){a.handleMouseOver()}).mouseout(function(){a.handleMouseOut()}); r.set.click(function(){a.handleBackgroundClick()}).mouseover(function(){a.handleMouseOver()}).mouseout(function(){a.handleMouseOut()});m.push(r.set);m.push(p.set)}m.push(d.set);m.push(d.labelsSet);a.bg.toBack();a.invisibleBg.toFront();a.dragger.toFront();a.iconLeft.toFront();a.iconRight.toFront()},timeZoom:function(a,b){this.startTime=a;this.endTime=b;this.timeDifference=b-a;this.skipEvent=!0;this.zoomScrollbar()},zoom:function(a,b){this.start=a;this.end=b;this.skipEvent=!0;this.zoomScrollbar()}, dispatchScrollbarEvent:function(){if(this.skipEvent)this.skipEvent=!1;else{var a=this.chart.chartData,b,c,d=this.dragger.getBBox();b=d.x;c=d.y;var f=d.width,e=d.height,d=this.chart;this.rotate?(b=c,c=e):c=f;f={type:"zoomed",target:this};f.chart=d;var e=this.categoryAxis,g=this.stepWidth;if(e.parseDates&&!e.equalSpacing){if(a=d.firstTime,e.minDuration(),d=Math.round(b/g)+a,a=this.dragging?d+this.timeDifference:Math.round((b+c)/g)+a,d>a&&(d=a),d!=this.startTime||a!=this.endTime)this.startTime=d,this.endTime= a,f.start=d,f.end=a,f.startDate=new Date(d),f.endDate=new Date(a),this.fire(f.type,f)}else if(e.startOnAxis||(b+=g/2),c-=this.stepWidth/2,d=e.xToIndex(b),b=e.xToIndex(b+c),d!=this.start||this.end!=b)e.startOnAxis&&(this.resizingRight&&d==b&&b++,this.resizingLeft&&d==b&&(0this.timeDifference&&(this.timeDifference=0)},handleBackgroundClick:function(){AmCharts.ChartScrollbar.base.handleBackgroundClick.call(this);this.dragging||(this.difference=this.end-this.start,this.timeDifference=this.endTime-this.startTime,0>this.timeDifference&&(this.timeDifference=0))}});AmCharts.AmBalloon=AmCharts.Class({construct:function(a){this.enabled=!0;this.fillColor="#FFFFFF";this.fillAlpha=0.8;this.borderThickness=2;this.borderColor="#FFFFFF";this.borderAlpha=1;this.cornerRadius=0;this.maximumWidth=220;this.horizontalPadding=8;this.verticalPadding=4;this.pointerWidth=6;this.pointerOrientation="V";this.color="#000000";this.adjustBorderColor=!0;this.show=this.follow=this.showBullet=!1;this.bulletSize=3;this.shadowAlpha=0.4;this.shadowColor="#000000";this.fadeOutDuration=this.animationDuration= 0.3;this.fixedPosition=!1;this.offsetY=6;this.offsetX=1;AmCharts.isModern||(this.offsetY*=1.5);AmCharts.applyTheme(this,a,"AmBalloon")},draw:function(){var a=this.pointToX,b=this.pointToY;this.deltaSignX=this.deltaSignY=1;var c=this.chart;AmCharts.VML&&(this.fadeOutDuration=0);this.xAnim&&c.stopAnim(this.xAnim);this.yAnim&&c.stopAnim(this.yAnim);if(!isNaN(a)){var d=this.follow,f=c.container,e=this.set;AmCharts.remove(e);this.removeDiv();this.set=e=f.set();c.balloonsSet.push(e);if(this.show){var g= this.l,h=this.t,k=this.r,l=this.b,m=this.balloonColor,n=this.fillColor,p=this.borderColor,q=n;void 0!=m&&(this.adjustBorderColor?q=p=m:n=m);var t=this.horizontalPadding,r=this.verticalPadding,s=this.pointerWidth,w=this.pointerOrientation,v=this.cornerRadius,u=c.fontFamily,A=this.fontSize;void 0==A&&(A=c.fontSize);var m=document.createElement("div"),F=m.style;F.position="absolute";m.innerHTML='
'+ this.text+"
";c.chartDiv.appendChild(m);this.textDiv=m;A=m.offsetWidth;u=m.offsetHeight;m.clientHeight&&(A=m.clientWidth,u=m.clientHeight);var u=u+2*r,y=A+2*t;window.opera&&(u+=2);var z,H=!1;z=this.offsetY;c.handDrawn&&(z+=c.handDrawScatter+2);"H"!=w?(A=a-y/2,bu&&(s=u/2),z=b-u/2,a=l&&(z=l-u);zk&& (A=k-y);var h=z+r,l=A+t,r=this.shadowAlpha,I=this.shadowColor,t=this.borderThickness,B=this.bulletSize,W;0y-s&&(g=y-s),gu-s&&(q=u-s),qa?y:a-A,y,y,0,0,y]),0this.r-d.width&&(a=this.r-d.width);fb?this.colors[b]:AmCharts.randomColor();a.lineColor=c}if(c=this.patterns)a.pattern=c[b]},handleLegendEvent:function(a){var b=a.type;a=a.dataItem;if(!this.legend.data&&a){var c=a.hidden,d=a.showBalloon;switch(b){case "clickMarker":d?this.hideGraphsBalloon(a):this.showGraphsBalloon(a);break;case "clickLabel":d?this.hideGraphsBalloon(a):this.showGraphsBalloon(a);break;case "rollOverItem":c||this.highlightGraph(a);break;case "rollOutItem":c||this.unhighlightGraph();break;case "hideItem":this.hideGraph(a); break;case "showItem":this.showGraph(a)}}},highlightGraph:function(a){var b=this.graphs,c,d=0.2;this.legend&&(d=this.legend.rollOverGraphAlpha);if(1!=d)for(c=0;cthis.hoverAlpha&&a.wedge&&a.wedge.attr({opacity:this.hoverAlpha});var d=a.balloonX,f=a.balloonY;a.pulled&&(d+=a.pullX,f+=a.pullY);var e=this.formatString(this.balloonText,a),g=AmCharts.adjustLuminosity(a.color,-0.15);this.showBalloon(e,g,b,d,f);a={type:"rollOverSlice", dataItem:a,chart:this,event:c};this.fire(a.type,a)},rollOutSlice:function(a,b){isNaN(a)||(a=this.chartData[a]);a.wedge&&a.wedge.attr({opacity:1});this.hideBalloon();var c={type:"rollOutSlice",dataItem:a,chart:this,event:b};this.fire(c.type,c)},clickSlice:function(a,b){isNaN(a)||(a=this.chartData[a]);a.pulled?this.pullSlice(a,0):this.pullSlice(a,1);AmCharts.getURL(a.url,this.urlTarget);var c={type:"clickSlice",dataItem:a,chart:this,event:b};this.fire(c.type,c)},handleRightClick:function(a,b){isNaN(a)|| (a=this.chartData[a]);var c={type:"rightClickSlice",dataItem:a,chart:this,event:b};this.fire(c.type,c)},drawTicks:function(){var a=this.chartData,b;for(b=0;bb&&(b=f);d.remove()}return b}});AmCharts.AmRectangularChart=AmCharts.Class({inherits:AmCharts.AmCoordinateChart,construct:function(a){AmCharts.AmRectangularChart.base.construct.call(this,a);this.theme=a;this.createEvents("zoomed");this.marginRight=this.marginBottom=this.marginTop=this.marginLeft=20;this.verticalPosition=this.horizontalPosition=this.depth3D=this.angle=0;this.heightMultiplier=this.widthMultiplier=1;this.zoomOutButtonImageSize=17;this.zoomOutButtonImage="lens.png";this.zoomOutText="Show all";this.zoomOutButtonColor= "#e5e5e5";this.zoomOutButtonAlpha=0;this.zoomOutButtonRollOverAlpha=1;this.zoomOutButtonPadding=8;this.trendLines=[];this.autoMargins=!0;this.marginsUpdated=!1;this.autoMarginOffset=10;AmCharts.applyTheme(this,a,"AmRectangularChart")},initChart:function(){AmCharts.AmRectangularChart.base.initChart.call(this);this.updateDxy();var a=!0;!this.marginsUpdated&&this.autoMargins&&(this.resetMargins(),a=!1);this.processScrollbars();this.updateMargins();this.updatePlotArea();this.updateScrollbars();this.updateTrendLines(); this.updateChartCursor();this.updateValueAxes();a&&(this.scrollbarOnly||this.updateGraphs())},drawChart:function(){AmCharts.AmRectangularChart.base.drawChart.call(this);this.drawPlotArea();if(AmCharts.ifArray(this.chartData)){var a=this.chartCursor;a&&a.draw();a=this.zoomOutText;""!==a&&a&&this.drawZoomOutButton()}},resetMargins:function(){var a={},b;if("serial"==this.chartType||"gantt"==this.chartType){var c=this.valueAxes;for(b=0;bf-c&&(this.marginRight=Math.round(k-f+c));d.top&&he-c&&(this.marginBottom=Math.round(b-e+c));this.initChart()},getAxisBounds:function(a,b,c,d,f){if(!a.ignoreAxisWidth){var e=a.labelsSet,g=a.tickLength;a.inside&&(g=0);if(e)switch(e=a.getBBox(),a.position){case "top":a=e.y;d>a&&(d=a);break;case "bottom":a=e.y+e.height;fa&&(b=a)}}return{l:b,t:d,r:c,b:f}},drawZoomOutButton:function(){var a=this,b=a.container.set(); a.zoomButtonSet.push(b);var c=a.color,d=a.fontSize,f=a.zoomOutButtonImageSize,e=a.zoomOutButtonImage,g=a.zoomOutText,h=a.zoomOutButtonColor,k=a.zoomOutButtonAlpha,l=a.zoomOutButtonFontSize,m=a.zoomOutButtonPadding;isNaN(l)||(d=l);(l=a.zoomOutButtonFontColor)&&(c=l);var l=a.zoomOutButton,n;l&&(l.fontSize&&(d=l.fontSize),l.color&&(c=l.color),l.backgroundColor&&(h=l.backgroundColor),isNaN(l.backgroundAlpha)||(a.zoomOutButtonRollOverAlpha=l.backgroundAlpha));var p=l=0;void 0!==a.pathToImages&&e&&(n=a.container.image(a.pathToImages+ e,0,0,f,f),b.push(n),n=n.getBBox(),l=n.width+5);void 0!==g&&(c=AmCharts.text(a.container,g,c,a.fontFamily,d,"start"),d=c.getBBox(),p=n?n.height/2-3:d.height/2,c.translate(l,p),b.push(c));n=b.getBBox();h=AmCharts.rect(a.container,n.width+2*m+5,n.height+2*m-2,h,1,1,h,1);h.setAttr("opacity",k);h.translate(-m,-m);b.push(h);h.toBack();a.zbBG=h;n=h.getBBox();b.translate(a.marginLeftReal+a.plotAreaWidth-n.width+m,a.marginTopReal+m);b.hide();b.mouseover(function(){a.rollOverZB()}).mouseout(function(){a.rollOutZB()}).click(function(){a.clickZB()}).touchstart(function(){a.rollOverZB()}).touchend(function(){a.rollOutZB(); a.clickZB()});for(k=0;ka&&(a=1);1>b&&(b=1);this.plotAreaWidth=Math.round(a);this.plotAreaHeight=Math.round(b)},updateDxy:function(){this.dx=Math.round(this.depth3D* Math.cos(this.angle*Math.PI/180));this.dy=Math.round(-this.depth3D*Math.sin(this.angle*Math.PI/180));this.d3x=Math.round(this.columnSpacing3D*Math.cos(this.angle*Math.PI/180));this.d3y=Math.round(-this.columnSpacing3D*Math.sin(this.angle*Math.PI/180))},updateMargins:function(){var a=this.getTitleHeight();this.titleHeight=a;this.marginTopReal=this.marginTop-this.dy+a;this.marginBottomReal=this.marginBottom;this.marginLeftReal=this.marginLeft;this.marginRightReal=this.marginRight},updateValueAxes:function(){var a= this.valueAxes,b=this.marginLeftReal,c=this.marginTopReal,d=this.plotAreaHeight,f=this.plotAreaWidth,e;for(e=0;eb&&(b=Math.abs(b),q=-b);0>c&&(c=Math.abs(c),t=-c);q+=AmCharts.dx;t+=AmCharts.dy;f={fill:n,stroke:g,"fill-opacity":f,"stroke-opacity":h};void 0!==m&&0=r&&(f=r);var s=1/180*Math.PI,r=b+Math.sin(d*s)*h,w=c-Math.cos(d*s)*q,v=b+Math.sin(d*s)*e,u=c-Math.cos(d*s)*g,A=b+Math.sin((d+f)*s)*e,F=c-Math.cos((d+f)*s)*g,y=b+Math.sin((d+f)*s)*h,s=c-Math.cos((d+f)*s)*q,z={fill:AmCharts.adjustLuminosity(l.fill,-0.2),"stroke-opacity":0,"fill-opacity":l["fill-opacity"]},H=0;180Math.abs(f)&&1>=Math.abs(A-v)&&1>=Math.abs(F-u)&&(I=!0));f="";var B;0a.length&&(a=String(a[0])+String(a[0])+String(a[1])+String(a[1])+String(a[2])+String(a[2]));b=b||0;var c="#",d,f;for(f=0;3>f;f++)d=parseInt(a.substr(2*f,2),16),d=Math.round(Math.min(Math.max(0,d+d*b),255)).toString(16),c+=("00"+d).substr(d.length);return c};AmCharts.Bezier=AmCharts.Class({construct:function(a,b,c,d,f,e,g,h,k,l){"object"==typeof g&&(g=g[0]);"object"==typeof h&&(h=h[0]);e={fill:g,"fill-opacity":h,"stroke-width":e};void 0!==k&&0c&&(h=c);b.push({x:k.x-h/f,y:k.y-d/e});b.push({x:k.x,y:k.y});b.push({x:k.x+h/f,y:k.y+d/e})}d=a[a.length-1].y-a[a.length-2].y;c=a[a.length-1].x-a[a.length-2].x;b.push({x:a[a.length-1].x- c/f,y:a[a.length-1].y-d/e});b.push({x:a[a.length-1].x,y:a[a.length-1].y});return b},drawBeziers:function(a){var b="",c;for(c=0;c<(a.length-1)/3;c++)b+=this.drawBezierMidpoint(a[3*c],a[3*c+1],a[3*c+2],a[3*c+3]);return b},drawBezierMidpoint:function(a,b,c,d){var f=Math.round,e=this.getPointOnSegment(a,b,0.75),g=this.getPointOnSegment(d,c,0.75),h=(d.x-a.x)/16,k=(d.y-a.y)/16,l=this.getPointOnSegment(a,b,0.375);a=this.getPointOnSegment(e,g,0.375);a.x-=h;a.y-=k;b=this.getPointOnSegment(g,e,0.375);b.x+= h;b.y+=k;c=this.getPointOnSegment(d,c,0.375);h=this.getMiddle(l,a);e=this.getMiddle(e,g);g=this.getMiddle(b,c);l=" Q"+f(l.x)+","+f(l.y)+","+f(h.x)+","+f(h.y);l+=" Q"+f(a.x)+","+f(a.y)+","+f(e.x)+","+f(e.y);l+=" Q"+f(b.x)+","+f(b.y)+","+f(g.x)+","+f(g.y);return l+=" Q"+f(c.x)+","+f(c.y)+","+f(d.x)+","+f(d.y)},getMiddle:function(a,b){return{x:(a.x+b.x)/2,y:(a.y+b.y)/2}},getPointOnSegment:function(a,b,c){return{x:a.x+(b.x-a.x)*c,y:a.y+(b.y-a.y)*c}}});AmCharts.AmDraw=AmCharts.Class({construct:function(a,b,c,d){AmCharts.SVG_NS="http://www.w3.org/2000/svg";AmCharts.SVG_XLINK="http://www.w3.org/1999/xlink";AmCharts.hasSVG=!!document.createElementNS&&!!document.createElementNS(AmCharts.SVG_NS,"svg").createSVGRect;1>b&&(b=10);1>c&&(c=10);this.div=a;this.width=b;this.height=c;this.rBin=document.createElement("div");AmCharts.hasSVG?(AmCharts.SVG=!0,d=this.createSvgElement("svg"),d.style.position="absolute",d.style.width=b+"px",d.style.height=c+"px",AmCharts.rtl&& (d.setAttribute("direction","rtl"),d.style.left="auto",d.style.right="0px"),d.setAttribute("version","1.1"),a.appendChild(d),this.container=d,this.R=new AmCharts.SVGRenderer(this)):AmCharts.isIE&&AmCharts.VMLRenderer&&(AmCharts.VML=!0,AmCharts.vmlStyleSheet||(document.namespaces.add("amvml","urn:schemas-microsoft-com:vml"),b=document.createStyleSheet(),b.addRule(".amvml","behavior:url(#default#VML); display:inline-block; antialias:true"),AmCharts.vmlStyleSheet=b),this.container=a,this.R=new AmCharts.VMLRenderer(this, d),this.R.disableSelection(a))},createSvgElement:function(a){return document.createElementNS(AmCharts.SVG_NS,a)},circle:function(a,b,c,d){var f=new AmCharts.AmDObject("circle",this);f.attr({r:c,cx:a,cy:b});this.addToContainer(f.node,d);return f},setSize:function(a,b){0c&&(c=1);1>d&&(d=1);h.attr({x:a,y:b,width:c,height:d,rx:f,ry:f,"stroke-width":e});this.addToContainer(h.node,g);return h},image:function(a,b,c,d,f,e){var g=new AmCharts.AmDObject("image",this);g.attr({x:b,y:c,width:d,height:f});this.R.path(g,a);this.addToContainer(g.node,e);return g},addToContainer:function(a,b){b||(b=this.container);b.appendChild(a)},text:function(a,b,c){return this.R.text(a,b,c)},path:function(a,b,c,d){var f=new AmCharts.AmDObject("path",this);d|| (d="100,100");f.attr({cs:d});c?f.attr({dd:a}):f.attr({d:a});this.addToContainer(f.node,b);return f},set:function(a){return this.R.set(a)},remove:function(a){if(a){var b=this.rBin;b.appendChild(a);b.innerHTML=""}},renderFix:function(){var a=this.container,b=a.style,c;try{c=a.getScreenCTM()||a.createSVGMatrix()}catch(d){c=a.createSVGMatrix()}a=1-c.e%1;c=1-c.f%1;0.5c&&(g="dot"), 3<=c&&6>=c&&(g="dash"),6g&&(b+=g);0>h&&(c+=h)}return{x:b,y:c,width:d, height:f}},setText:function(a,b){var c=a.node;c&&(c.innerHTML=b);this.setAttr(a,"text-anchor",a.anchor)},addListener:function(a,b,c){a.node["on"+b]=c},move:function(a,b,c){var d=a.node,f=d.style;"text"==a.type&&(c-=AmCharts.removePx(f.fontSize)/2-1);"oval"==a.shapeType&&(b-=AmCharts.removePx(f.width)/2,c-=AmCharts.removePx(f.height)/2);a=a.bw;isNaN(a)||(b-=a,c-=a);isNaN(b)||isNaN(c)||(d.style.left=b+"px",d.style.top=c+"px")},svgPathToVml:function(a){var b=a.split(" ");a="";var c,d=Math.round,f;for(f= 0;fthis.fontSize&&(this.ly=b/2-1);0p&&(p=u);w=w.height;w>q&&(q=w)}var A=u=0,F=e;for(v=0;vn&&0=k&&(A=0,u++);t.push(y)}w=t.getBBox();k=w.height+2*l-1;"left"==a||"right"==a?(h=w.width+2*e,g.style.width=h+b+c+"px"):h=h-b-c-1;c=AmCharts.polygon(this.container,[0,h,h,0],[0,0,k,k],this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);r.push(c);r.translate(b,d);c.toBack(); b=e;if("top"==a||"bottom"==a||"absolute"==a||"outside"==a)"center"==this.align?b=e+(h-w.width)/2:"right"==this.align&&(b=e+h-w.width);t.translate(b,l+1);this.titleHeight>k&&(k=this.titleHeight);a=k+d+f+1;0>a&&(a=0);g.style.height=Math.round(a)+"px"},createEntry:function(a){if(!1!==a.visibleInLegend){var b=this.chart,c=a.markerType;c||(c=this.markerType);var d=a.color,f=a.alpha;a.legendKeyColor&&(d=a.legendKeyColor());a.legendKeyAlpha&&(f=a.legendKeyAlpha());var e;!0===a.hidden&&(e=d=this.markerDisabledColor); var g=a.pattern,h=a.customMarker;h||(h=this.customMarker);var k=this.container,l=this.markerSize,m=0,n=0,p=l/2;if(this.useGraphSettings)if(m=a.type,"line"==m||"step"==m||"smoothedLine"==m||"ohlc"==m)this.switchType=void 0,g=k.set(),a.hidden||(d=a.lineColor,e=a.bulletBorderColor),n=AmCharts.line(k,[0,2*l],[l/2,l/2],d,a.lineAlpha,a.lineThickness,a.dashLength),g.push(n),a.bullet&&(a.hidden||(d=a.bulletColor),n=AmCharts.bullet(k,a.bullet,a.bulletSize,d,a.bulletAlpha,a.bulletBorderThickness,e,a.bulletBorderAlpha))&& (n.translate(l+1,l/2),g.push(n)),p=0,m=l,n=l/3;else{var q;a.getGradRotation&&(q=a.getGradRotation());if(g=this.createMarker("rectangle",a.fillColors,a.fillAlphas,a.lineThickness,d,a.lineAlpha,q,g))p=l,g.translate(p,l/2);m=l}else h?(b.path&&(h=b.path+h),g=k.image(h,0,0,l,l)):(g=this.createMarker(c,d,f,void 0,void 0,void 0,void 0,g))&&g.translate(l/2,l/2);this.addListeners(g,a);k=k.set([g]);this.switchable&&k.setAttr("cursor","pointer");if(e=this.switchType)q="x"==e?this.createX():this.createV(),q.dItem= a,!0!==a.hidden?"x"==e?q.hide():q.show():"x"!=e&&q.hide(),this.switchable||q.hide(),this.addListeners(q,a),a.legendSwitch=q,k.push(q);e=this.color;a.showBalloon&&this.textClickEnabled&&void 0!==this.selectedColor&&(e=this.selectedColor);this.useMarkerColorForLabels&&(e=d);!0===a.hidden&&(e=this.markerDisabledColor);d=AmCharts.massReplace(this.labelText,{"[[title]]":a.title});q=this.fontSize;g&&l<=q&&g.translate(p,l/2+this.ly-q/2+(q+2-l)/2-n);var t;d&&(d=AmCharts.fixNewLines(d),a.legendTextReal=d, t=AmCharts.text(this.container,d,e,b.fontFamily,q,"start"),t.translate(this.lx+m,this.ly),k.push(t),b=t.getBBox().width,this.maxLabelWidthc&&(d="00"+c);10<=c&&100>c&&(d="0"+c);a=a.replace(/fff/g,d)}return a};AmCharts.extractPeriod=function(a){var b=AmCharts.stripNumbers(a),c=1;b!=a&&(c=Number(a.slice(0,a.indexOf(b))));return{period:b,count:c}}; AmCharts.resetDateToMin=function(a,b,c,d){void 0===d&&(d=1);var f,e,g,h,k,l,m;AmCharts.useUTC?(f=a.getUTCFullYear(),e=a.getUTCMonth(),g=a.getUTCDate(),h=a.getUTCHours(),k=a.getUTCMinutes(),l=a.getUTCSeconds(),m=a.getUTCMilliseconds(),a=a.getUTCDay()):(f=a.getFullYear(),e=a.getMonth(),g=a.getDate(),h=a.getHours(),k=a.getMinutes(),l=a.getSeconds(),m=a.getMilliseconds(),a=a.getDay());switch(b){case "YYYY":f=Math.floor(f/c)*c;e=0;g=1;m=l=k=h=0;break;case "MM":e=Math.floor(e/c)*c;g=1;m=l=k=h=0;break;case "WW":0=== a&&0=c[b].contains?(a=Math.round(a/c[b].contains),b=c[b].nextInterval,AmCharts.getMaxInterval(a,b)):"ss"==b?c[b].nextInterval:b};AmCharts.dayNames="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ");AmCharts.shortDayNames="Sun Mon Tue Wed Thu Fri Sat".split(" ");AmCharts.monthNames="January February March April May June July August September October November December".split(" ");AmCharts.shortMonthNames="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "); AmCharts.getWeekNumber=function(a){a=new Date(a);a.setHours(0,0,0);a.setDate(a.getDate()+4-(a.getDay()||7));var b=new Date(a.getFullYear(),0,1);return Math.ceil(((a-b)/864E5+1)/7)}; AmCharts.stringToDate=function(a,b){var c={},d=[{pattern:"YYYY",period:"year"},{pattern:"YY",period:"year"},{pattern:"MM",period:"month"},{pattern:"M",period:"month"},{pattern:"DD",period:"date"},{pattern:"D",period:"date"},{pattern:"JJ",period:"hours"},{pattern:"J",period:"hours"},{pattern:"HH",period:"hours"},{pattern:"H",period:"hours"},{pattern:"KK",period:"hours"},{pattern:"K",period:"hours"},{pattern:"LL",period:"hours"},{pattern:"L",period:"hours"},{pattern:"NN",period:"minutes"},{pattern:"N", period:"minutes"},{pattern:"SS",period:"seconds"},{pattern:"S",period:"seconds"},{pattern:"QQQ",period:"milliseconds"},{pattern:"QQ",period:"milliseconds"},{pattern:"Q",period:"milliseconds"}],f=!0,e=b.indexOf("AA");-1!=e&&(a.substr(e,2),"pm"==a.toLowerCase&&(f=!1));var e=b,g,h,k;for(k=0;kd&&(p="0"+p);var q=f;10>f&&(q="0"+f);var t="0"+e;b=b.replace(/W/g,m);m=g;24== m&&(m=0);var r=m;10>r&&(r="0"+r);b=b.replace(/JJ/g,r);b=b.replace(/J/g,m);m=g;0===m&&(m=24);r=m;10>r&&(r="0"+r);b=b.replace(/HH/g,r);b=b.replace(/H/g,m);m=g;11r&&(r="0"+r);b=b.replace(/KK/g,r);b=b.replace(/K/g,m);m=g;0===m&&(m=12);12r&&(r="0"+r);b=b.replace(/LL/g,r);b=b.replace(/L/g,m);m=h;10>m&&(m="0"+m);b=b.replace(/NN/g,m);b=b.replace(/N/g,h);h=k;10>h&&(h="0"+h);b=b.replace(/SS/g,h);b=b.replace(/S/g,k);k=l;10>k&&(k="00"+k);100>k&&(k="0"+k);h=l;10>h&&(h="00"+ h);b=b.replace(/QQQ/g,k);b=b.replace(/QQ/g,h);b=b.replace(/Q/g,l);b=12>g?b.replace(/A/g,"am"):b.replace(/A/g,"pm");b=b.replace(/YYYY/g,"@IIII@");b=b.replace(/YY/g,"@II@");b=b.replace(/MMMM/g,"@XXXX@");b=b.replace(/MMM/g,"@XXX@");b=b.replace(/MM/g,"@XX@");b=b.replace(/M/g,"@X@");b=b.replace(/DD/g,"@RR@");b=b.replace(/D/g,"@R@");b=b.replace(/EEEE/g,"@PPPP@");b=b.replace(/EEE/g,"@PPP@");b=b.replace(/EE/g,"@PP@");b=b.replace(/E/g,"@P@");b=b.replace(/@IIII@/g,c);b=b.replace(/@II@/g,n);b=b.replace(/@XXXX@/g, AmCharts.monthNames[d]);b=b.replace(/@XXX@/g,AmCharts.shortMonthNames[d]);b=b.replace(/@XX@/g,p);b=b.replace(/@X@/g,d+1);b=b.replace(/@RR@/g,q);b=b.replace(/@R@/g,f);b=b.replace(/@PPPP@/g,AmCharts.dayNames[e]);b=b.replace(/@PPP@/g,AmCharts.shortDayNames[e]);b=b.replace(/@PP@/g,t);return b=b.replace(/@P@/g,e)}; AmCharts.changeDate=function(a,b,c,d,f){var e=-1;void 0===d&&(d=!0);void 0===f&&(f=!1);!0===d&&(e=1);switch(b){case "YYYY":a.setFullYear(a.getFullYear()+c*e);d||f||a.setDate(a.getDate()+1);break;case "MM":b=a.getMonth();a.setMonth(a.getMonth()+c*e);a.getMonth()>b+c*e&&a.setDate(a.getDate()-1);d||f||a.setDate(a.getDate()+1);break;case "DD":a.setDate(a.getDate()+c*e);break;case "WW":a.setDate(a.getDate()+c*e*7);break;case "hh":a.setHours(a.getHours()+c*e);break;case "mm":a.setMinutes(a.getMinutes()+ c*e);break;case "ss":a.setSeconds(a.getSeconds()+c*e);break;case "fff":a.setMilliseconds(a.getMilliseconds()+c*e)}return a};