amcharts.rb 3.11.1.14 → 3.11.2.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzJhOWYxOGUzNTFjNDIyZTA0MGVkYzU3MGFkNTA3MGY5MDNhNzc0MQ==
4
+ ODQ3OTBiYTZmNjE0ZDVmMzk1NTdkNzg5ODZmMzQ4MTMzZGUxNjUyYg==
5
5
  data.tar.gz: !binary |-
6
- OTZjM2Y0OTgyY2RjZDVlOWExNGRlZmJlNDZjNjQ5OWNiMzEwNjAxZQ==
6
+ N2ViZWRmZGY0ZTNiNjE4MzczNzBjNTdhMzI1MjM2OGY3MTc1OTZjMw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZmZiZmY0NDdiOGU2MGZlNTM3MDQ5NWZiNjEzY2NjN2MyMDAwZDI0N2ZlMDAy
10
- NTczYWRmNWNhM2YyNjcwYWY5ZmQxN2Y0ZGIyYmQ5NzRlODc2ZDk1Mjc1MjIw
11
- MWU2MGQ3NjFjNzhhOGI2NjkyNjhlYWU4ZGJiYmUxN2QxNzgwYjc=
9
+ OGY2YWUzMjI0ZDA4N2ZiZWZkY2U4ZDYxNmM0ODEzY2YzZDBiODgxODRmMzIw
10
+ YjkyMzI0Yjk4Mjk5ZjlhNWJiZTYxYjc5MzQyY2ZkZjdkM2Q3N2Y5M2MyNmE4
11
+ OTRkMTE1YmE5OGU1ZjA1ZTJiYTAxYjIzMjRlOTFkZmU0OTFiY2U=
12
12
  data.tar.gz: !binary |-
13
- ZTM0M2VmYTI5MTIzY2NhZTJhYzZiNWIxMmY4YWRkMzgyMWVjYTA1NzM5Mjc3
14
- MTA0YWJiNjk1MDlmOThjN2RkNDI3ZWU1ZDM2MzUzZmIyNmVkMDZhY2E3ZGEy
15
- NzJkNmUyMWIxYWQ5OTNhODcwZTA2Y2YxYmM1ZjM3OTgzOGFhMzU=
13
+ OWQyOWU2MGNmZjc0NzJmNzNhN2MyMDgxZTgyMDRkOTNhMGEyNDRlZTUwMmIz
14
+ YjNjMjk0ZWI0NDRhY2UwMTFjZmRmZDJiNTRlMjQyMjM1MjUzMTQ0YWY4MTdi
15
+ OTBlMzM2ZTdiOWRhYWMyOTY1ZGU5MDdlZDUyYWQ3MWYyMWQwOGU=
@@ -1,3 +1,3 @@
1
1
  module AmCharts
2
- VERSION = "3.11.1.14"
2
+ VERSION = "3.11.2.14"
3
3
  end
@@ -5,14 +5,14 @@ AmCharts.isModern=!0;AmCharts.getIEVersion=function(){var a=0;if("Microsoft Inte
5
5
  AmCharts.applyLang=function(a,b){var c=AmCharts.translations;b.dayNames=AmCharts.dayNames;b.shortDayNames=AmCharts.shortDayNames;b.monthNames=AmCharts.monthNames;b.shortMonthNames=AmCharts.shortMonthNames;c&&(c=c[a])&&(AmCharts.lang=c,c.monthNames&&(b.dayNames=c.dayNames,b.shortDayNames=c.shortDayNames,b.monthNames=c.monthNames,b.shortMonthNames=c.shortMonthNames))};AmCharts.IEversion=AmCharts.getIEVersion();9>AmCharts.IEversion&&0<AmCharts.IEversion&&(AmCharts.isModern=!1,AmCharts.isIE=!0);
6
6
  AmCharts.dx=0;AmCharts.dy=0;if(document.addEventListener||window.opera)AmCharts.isNN=!0,AmCharts.isIE=!1,AmCharts.dx=.5,AmCharts.dy=.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;b<a.length;b++){var c=a[b];c&&c.div&&c.handleResize()}};AmCharts.handleMouseUp=function(a){for(var b=AmCharts.charts,c=0;c<b.length;c++){var d=b[c];d&&d.handleReleaseOutside(a)}};
7
7
  AmCharts.handleMouseMove=function(a){for(var b=AmCharts.charts,c=0;c<b.length;c++){var d=b[c];d&&d.handleMouseMove(a)}};AmCharts.resetMouseOver=function(){for(var a=AmCharts.charts,b=0;b<a.length;b++){var c=a[b];c&&(c.mouseIsOver=!1)}};AmCharts.ready=function(a){AmCharts.onReadyArray.push(a)};AmCharts.handleLoad=function(){AmCharts.isReady=!0;for(var a=AmCharts.onReadyArray,b=0;b<a.length;b++){var c=a[b];isNaN(AmCharts.processDelay)?c():setTimeout(c,AmCharts.processDelay*b)}};
8
- AmCharts.addInitHandler=function(a,b){AmCharts.initHandlers.push({method:a,types:b})};AmCharts.callInitHandler=function(a){var b=AmCharts.initHandlers;if(AmCharts.initHandlers)for(var c=0;c<b.length;c++){var d=b[c];d.types&&-1!=d.types.indexOf(a.type)&&d.method(a)}};AmCharts.getUniqueId=function(){AmCharts.uid++;return"AmChartsEl-"+AmCharts.uid};
8
+ AmCharts.addInitHandler=function(a,b){AmCharts.initHandlers.push({method:a,types:b})};AmCharts.callInitHandler=function(a){var b=AmCharts.initHandlers;if(AmCharts.initHandlers)for(var c=0;c<b.length;c++){var d=b[c];d.types?-1!=d.types.indexOf(a.type)&&d.method(a):d.method(a)}};AmCharts.getUniqueId=function(){AmCharts.uid++;return"AmChartsEl-"+AmCharts.uid};
9
9
  AmCharts.isNN&&(document.addEventListener("mousemove",AmCharts.handleMouseMove,!0),window.addEventListener("resize",AmCharts.handleResize,!0),document.addEventListener("mouseup",AmCharts.handleMouseUp,!0),window.addEventListener("load",AmCharts.handleLoad,!0));AmCharts.isIE&&(document.attachEvent("onmousemove",AmCharts.handleMouseMove),window.attachEvent("onresize",AmCharts.handleResize),document.attachEvent("onmouseup",AmCharts.handleMouseUp),window.attachEvent("onload",AmCharts.handleLoad));
10
10
  AmCharts.clear=function(){var a=AmCharts.charts;if(a)for(var b=0;b<a.length;b++)a[b].clear();AmCharts.charts=null;AmCharts.isNN&&(document.removeEventListener("mousemove",AmCharts.handleMouseMove,!0),window.removeEventListener("resize",AmCharts.handleResize,!0),document.removeEventListener("mouseup",AmCharts.handleMouseUp,!0),window.removeEventListener("load",AmCharts.handleLoad,!0));AmCharts.isIE&&(document.detachEvent("onmousemove",AmCharts.handleMouseMove),window.detachEvent("onresize",AmCharts.handleResize),
11
11
  document.detachEvent("onmouseup",AmCharts.handleMouseUp),window.detachEvent("onload",AmCharts.handleLoad))};
12
12
  AmCharts.makeChart=function(a,b,c){var d=b.type,e=b.theme;AmCharts.isString(e)&&(e=AmCharts.themes[e],b.theme=e);var f;switch(d){case "serial":f=new AmCharts.AmSerialChart(e);break;case "xy":f=new AmCharts.AmXYChart(e);break;case "pie":f=new AmCharts.AmPieChart(e);break;case "radar":f=new AmCharts.AmRadarChart(e);break;case "gauge":f=new AmCharts.AmAngularGauge(e);break;case "funnel":f=new AmCharts.AmFunnelChart(e);break;case "map":f=new AmCharts.AmMap(e);break;case "stock":f=new AmCharts.AmStockChart(e)}AmCharts.extend(f,
13
13
  b);AmCharts.isReady?isNaN(c)?f.write(a):setTimeout(function(){AmCharts.realWrite(f,a)},c):AmCharts.ready(function(){isNaN(c)?f.write(a):setTimeout(function(){AmCharts.realWrite(f,a)},c)});return f};AmCharts.realWrite=function(a,b){a.write(b)};AmCharts.toBoolean=function(a,b){if(void 0===a)return b;switch(String(a).toLowerCase()){case "true":case "yes":case "1":return!0;case "false":case "no":case "0":case null:return!1;default:return Boolean(a)}};AmCharts.removeFromArray=function(a,b){var c;for(c=a.length-1;0<=c;c--)a[c]==b&&a.splice(c,1)};AmCharts.getDecimals=function(a){var b=0;isNaN(a)||(a=String(a),-1!=a.indexOf("e-")?b=Number(a.split("-")[1]):-1!=a.indexOf(".")&&(b=a.split(".")[1].length));return b};
14
- AmCharts.wrappedText=function(a,b,c,d,e,f,g,h,k){var l=AmCharts.text(a,b,c,d,e,f,g),m="\n";AmCharts.isModern||(m="<br>");if(10<k)return l;if(l){var n=l.getBBox();if(n.width>h){l.remove();for(var l=[],p=0;-1<(index=b.indexOf(" ",p));)l.push(index),p=index+1;for(var q=Math.round(b.length/2),r=1E3,s,p=0;p<l.length;p++){var w=Math.abs(l[p]-q);w<r&&(s=l[p],r=w)}if(isNaN(s)){h=Math.ceil(n.width/h);if(0==k)for(p=1;p<h;p++)s=Math.round(b.length/h*p),b=b.substr(0,s)+m+b.substr(s);return AmCharts.text(a,b,
15
- c,d,e,f,g)}b=b.substr(0,s)+m+b.substr(s+1);return AmCharts.wrappedText(a,b,c,d,e,f,g,h,k+1)}return l}};AmCharts.getStyle=function(a,b){var c="";document.defaultView&&document.defaultView.getComputedStyle?c=document.defaultView.getComputedStyle(a,"").getPropertyValue(b):a.currentStyle&&(b=b.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),c=a.currentStyle[b]);return c};AmCharts.removePx=function(a){if(void 0!=a)return Number(a.substring(0,a.length-2))};
14
+ AmCharts.wrappedText=function(a,b,c,d,e,f,g,h,k){var l=AmCharts.text(a,b,c,d,e,f,g),m="\n";AmCharts.isModern||(m="<br>");if(10<k)return l;if(l){var n=l.getBBox();if(n.width>h){n=Math.ceil(n.width/h);l.remove();for(var l=[],p=0;-1<(index=b.indexOf(" ",p));)l.push(index),p=index+1;Math.round(b.length/2);for(var q,p=0;p<l.length;p+=Math.ceil(l.length/n))q=l[p],b=b.substr(0,q)+m+b.substr(q+1);if(isNaN(q)){if(0==k)for(p=1;p<n;p++)q=Math.round(b.length/n*p),b=b.substr(0,q)+m+b.substr(q);return AmCharts.text(a,
15
+ b,c,d,e,f,g)}return AmCharts.wrappedText(a,b,c,d,e,f,g,h,k+1)}return l}};AmCharts.getStyle=function(a,b){var c="";document.defaultView&&document.defaultView.getComputedStyle?c=document.defaultView.getComputedStyle(a,"").getPropertyValue(b):a.currentStyle&&(b=b.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),c=a.currentStyle[b]);return c};AmCharts.removePx=function(a){if(void 0!=a)return Number(a.substring(0,a.length-2))};
16
16
  AmCharts.getURL=function(a,b){if(a)if("_self"!=b&&b)if("_top"==b&&window.top)window.top.location.href=a;else if("_parent"==b&&window.parent)window.parent.location.href=a;else if("_blank"==b)window.open(a);else{var c=document.getElementsByName(b)[0];c?c.src=a:(c=AmCharts.windows[b])?c.opener&&!c.opener.closed?c.location.href=a:AmCharts.windows[b]=window.open(a):AmCharts.windows[b]=window.open(a)}else window.location.href=a};AmCharts.ifArray=function(a){return a&&0<a.length?!0:!1};
17
17
  AmCharts.callMethod=function(a,b){var c;for(c=0;c<b.length;c++){var d=b[c];if(d){if(d[a])d[a]();var e=d.length;if(0<e){var f;for(f=0;f<e;f++){var g=d[f];if(g&&g[a])g[a]()}}}}};AmCharts.toNumber=function(a){return"number"==typeof a?a:Number(String(a).replace(/[^0-9\-.]+/g,""))};
18
18
  AmCharts.toColor=function(a){if(""!==a&&void 0!==a)if(-1!=a.indexOf(",")){a=a.split(",");var b;for(b=0;b<a.length;b++){var c=a[b].substring(a[b].length-6,a[b].length);a[b]="#"+c}}else a=a.substring(a.length-6,a.length),a="#"+a;return a};AmCharts.toCoordinate=function(a,b,c){var d;void 0!==a&&(a=String(a),c&&c<b&&(b=c),d=Number(a),-1!=a.indexOf("!")&&(d=b-Number(a.substr(1))),-1!=a.indexOf("%")&&(d=b*Number(a.substr(0,a.length-1))/100));return d};
@@ -42,44 +42,44 @@ this.gridCountR=Math.max(a,1)):this.gridCountR=this.gridCount;this.axisWidth=thi
42
42
  m-3,n&&(b+=7),c="left"==p?k+2:"right"==p?-2:k/2,l=-90}this.marginsChanged?(a.translate(b,c),this.tx=b,this.ty=c):a.translate(this.tx,this.ty);this.marginsChanged=!1;0!==l&&a.rotate(l)}},pushAxisItem:function(a,b){var c=this,d=a.graphics();0<d.length()&&(b?c.labelsSet.push(d):c.set.push(d));if(d=a.getLabel())this.labelsSet.push(d),d.click(function(b){c.handleMouse(b,a,"clickItem")}).mouseover(function(b){c.handleMouse(b,a,"rollOverItem")}).mouseout(function(b){c.handleMouse(b,a,"rollOutItem")})},handleMouse:function(a,
43
43
  b,c){this.fire(c,{type:c,value:b.value,serialDataItem:b.serialDataItem,axis:this,target:b.label,chart:this.chart,event:a})},addGuide:function(a){for(var b=this.guides,c=!1,d=0;d<b.length;d++)b[d]==a&&(c=!0);c||b.push(a)},removeGuide:function(a){var b=this.guides,c;for(c=0;c<b.length;c++)b[c]==a&&b.splice(c,1)},handleGuideOver:function(a){clearTimeout(this.chart.hoverInt);var b=a.graphics.getBBox(),c=b.x+b.width/2,b=b.y+b.height/2,d=a.fillColor;void 0===d&&(d=a.lineColor);this.chart.showBalloon(a.balloonText,
44
44
  d,!0,c,b)},handleGuideOut:function(a){this.chart.hideBalloon()},addEventListeners:function(a,b){var c=this;a.mouseover(function(){c.handleGuideOver(b)});a.mouseout(function(){c.handleGuideOut(b)})},getBBox:function(){var a=this.labelsSet.getBBox();AmCharts.VML||(a={x:a.x+this.x,y:a.y+this.y,width:a.width,height:a.height});return a},destroy:function(){AmCharts.remove(this.set);AmCharts.remove(this.labelsSet);var a=this.axisLine;a&&AmCharts.remove(a.set);AmCharts.remove(this.grid0)}});AmCharts.ValueAxis=AmCharts.Class({inherits:AmCharts.AxisBase,construct:function(a){this.cname="ValueAxis";this.createEvents("axisChanged","logarithmicAxisFailed","axisSelfZoomed","axisZoomed");AmCharts.ValueAxis.base.construct.call(this,a);this.dataChanged=!0;this.stackType="none";this.position="left";this.unitPosition="right";this.recalculateToPercents=this.includeHidden=this.includeGuidesInMinMax=this.integersOnly=!1;this.durationUnits={DD:"d. ",hh:":",mm:":",ss:""};this.scrollbar=!1;this.baseValue=
45
- 0;this.radarCategoriesEnabled=!0;this.gridType="polygons";this.useScientificNotation=!1;this.axisTitleOffset=10;this.minMaxMultiplier=1;this.logGridLimit=2;AmCharts.applyTheme(this,a,this.cname)},updateData:function(){0>=this.gridCountR&&(this.gridCountR=1);this.totals=[];this.data=this.chart.chartData;var a=this.chart;"xy"!=a.type&&(this.stackGraphs("smoothedLine"),this.stackGraphs("line"),this.stackGraphs("column"),this.stackGraphs("step"));this.recalculateToPercents&&this.recalculate();this.synchronizationMultiplier&&
46
- 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-
47
- 1)||0>=this.minimum))this.fire("logarithmicAxisFailed",{type:"logarithmicAxisFailed",chart:a});else{this.grid0=null;var c,d,e=a.dx,f=a.dy,g=!1,h=this.logarithmic;if(isNaN(this.min)||isNaN(this.max)||!this.foundGraphs||Infinity==this.min||-Infinity==this.max)g=!0;else{var k=this.labelFrequency,l=this.showFirstLabel,m=this.showLastLabel,n=1,p=0,q=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,
48
- r>this.logGridLimit&&(q=Math.ceil(Math.log(this.max)*Math.LOG10E)+1,p=Math.round(Math.log(this.minReal)*Math.LOG10E),q>this.gridCountR&&(n=Math.ceil(q/this.gridCountR)))):this.stepWidth=this.axisWidth/(this.max-this.min);var s=0;1>this.step&&-1<this.step&&(s=AmCharts.getDecimals(this.step));this.integersOnly&&(s=0);s>this.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);
49
- d={};d.precision=s;d.decimalSeparator=a.nf.decimalSeparator;d.thousandsSeparator=a.nf.thousandsSeparator;this.numberFormatter=d;var v,t=this.guides;c=t.length;if(0<c){var u=this.fillAlpha;for(d=this.fillAlpha=0;d<c;d++){var x=t[d],E=NaN,A=x.above;isNaN(x.toValue)||(E=this.getCoordinate(x.toValue),v=new this.axisItemRenderer(this,E,"",!0,NaN,NaN,x),this.pushAxisItem(v,A));var z=NaN;isNaN(x.value)||(z=this.getCoordinate(x.value),v=new this.axisItemRenderer(this,z,x.label,!0,NaN,(E-z)/2,x),this.pushAxisItem(v,
50
- A));isNaN(E-z)||(v=new this.guideFillRenderer(this,z,E,x),this.pushAxisItem(v,A),v=v.graphics(),x.graphics=v,x.balloonText&&this.addEventListeners(v,x))}this.fillAlpha=u}this.exponential=!1;for(d=p;d<q;d+=n)t=AmCharts.roundTo(this.step*d+this.min,s),-1!=String(t).indexOf("e")&&(this.exponential=!0,String(t).split("e"));this.duration&&(this.maxInterval=AmCharts.getMaxInterval(this.max,this.duration));var s=this.step,H,t=this.minorGridAlpha;this.minorGridEnabled&&(H=this.getMinorGridStep(s,this.stepWidth*
51
- s));for(d=p;d<q;d+=n)if(p=s*d+this.min,h&&this.max-this.min>5*this.min&&(p-=this.min),p=AmCharts.roundTo(p,this.maxDecCount+1),!this.integersOnly||Math.round(p)==p)if(isNaN(w)||Number(AmCharts.toFixed(p,w))==p){!0===h&&(0===p&&(p=this.minReal),r>this.logGridLimit&&(p=Math.pow(10,d)));v=this.formatValue(p,!1,d);Math.round(d/k)!=d/k&&(v=void 0);if(0===d&&!l||d==q-1&&!m)v=" ";c=this.getCoordinate(p);v=new this.axisItemRenderer(this,c,v,void 0,void 0,void 0,void 0,this.boldLabels);this.pushAxisItem(v);
52
- if(p==this.baseValue&&"radar"!=a.type){var F,G,x=this.viW,A=this.viH;v=this.viX;u=this.viY;"H"==this.orientation?0<=c&&c<=x+1&&(F=[c,c,c+e],G=[A,0,f]):0<=c&&c<=A+1&&(F=[0,x,x+e],G=[c,c,c+f]);F&&(c=AmCharts.fitToBounds(2*this.gridAlpha,0,1),c=AmCharts.line(a.container,F,G,this.gridColor,c,1,this.dashLength),c.translate(v,u),this.grid0=c,a.axesSet.push(c),c.toBack())}if(!isNaN(H)&&0<t&&d<q-1){v=this.gridAlpha;this.gridAlpha=this.minorGridAlpha;for(c=1;c<s/H;c++)u=this.getCoordinate(p+H*c),u=new this.axisItemRenderer(this,
53
- u,"",!1,0,0,!1,!1,0,!0),this.pushAxisItem(u);this.gridAlpha=v}}e=this.baseValue;this.min>this.baseValue&&this.max>this.baseValue&&(e=this.min);this.min<this.baseValue&&this.max<this.baseValue&&(e=this.max);h&&e<this.minReal&&(e=this.minReal);this.baseCoord=this.getCoordinate(e);e={type:"axisChanged",target:this,chart:a};e.min=h?this.minReal:this.min;e.max=this.max;this.fire("axisChanged",e);this.axisCreated=!0}h=this.axisLine.set;e=this.labelsSet;this.positionTitle();"radar"!=a.type?(a=this.viX,f=
54
- this.viY,b.translate(a,f),e.translate(a,f)):h.toFront();!this.visible||g?(b.hide(),h.hide(),e.hide()):(b.show(),h.show(),e.show());this.axisY=this.y-this.viY;this.axisX=this.x-this.viX}},formatValue:function(a,b,c){var d=this.exponential,e=this.logarithmic,f=this.numberFormatter,g=this.chart;!0===this.logarithmic&&(d=-1!=String(a).indexOf("e")?!0:!1);this.useScientificNotation&&(d=!0);this.usePrefixes&&(d=!1);d?(valueText=-1==String(a).indexOf("e")?a.toExponential(15):String(a),c=valueText.split("e"),
55
- b=Number(c[0]),c=Number(c[1]),b=AmCharts.roundTo(b,14),10==b&&(b=1,c+=1),valueText=b+"e"+c,0===a&&(valueText="0"),1==a&&(valueText="1")):(e&&(d=String(a).split("."),d[1]?(f.precision=d[1].length,0>c&&(f.precision=Math.abs(c))):f.precision=-1),valueText=this.usePrefixes?AmCharts.addPrefix(a,g.prefixesOfBigNumbers,g.prefixesOfSmallNumbers,f,!b):AmCharts.formatNumber(a,f,f.precision));this.duration&&(valueText=AmCharts.formatDuration(a,this.duration,"",this.durationUnits,this.maxInterval,f));this.recalculateToPercents?
56
- valueText+="%":(f=this.unit)&&(valueText="left"==this.unitPosition?f+valueText:valueText+f);this.labelFunction&&(valueText=this.labelFunction(a,valueText,this).toString());return valueText},getMinorGridStep:function(a,b){var c=[5,4,2];60>b&&c.shift();for(var d=Math.floor(Math.log(Math.abs(a))*Math.LOG10E),e=0;e<c.length;e++){var f=a/c[e],g=Math.floor(Math.log(Math.abs(f))*Math.LOG10E);if(!(0<Math.abs(d-g)))if(1>a){if(g=Math.pow(10,-g)*f,g==Math.round(g))return f}else if(f==Math.round(f))return f}},
57
- 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=[],e=[],f=[],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;n<h.length;n++)m=h[n],m.hidden||(l=m.type,m.chart==this.chart&&m.valueAxis==this&&a==l&&m.stackable&&(k&&(m.stackGraph=k),k=m));for(k=this.start;k<=this.end;k++){var r=0;for(n=0;n<h.length;n++)if(m=
58
- h[n],m.hidden)m.newStack&&(e[k]=NaN,d[k]=NaN);else if(l=m.type,m.chart==this.chart&&m.valueAxis==this&&a==l&&m.stackable)if(l=this.data[k].axes[this.id].graphs[m.id],g=l.values.value,isNaN(g))m.newStack&&(e[k]=NaN,d[k]=NaN);else{var s=AmCharts.getDecimals(g);r<s&&(r=s);isNaN(f[k])?f[k]=Math.abs(g):f[k]+=Math.abs(g);f[k]=AmCharts.roundTo(f[k],r);s=m.fillToGraph;q&&s&&(s=this.data[k].axes[this.id].graphs[s.id])&&(l.values.open=s.values.value);"regular"==b&&(q&&(isNaN(c[k])?(c[k]=g,l.values.close=g,
59
- l.values.open=this.baseValue):(isNaN(g)?l.values.close=c[k]:l.values.close=g+c[k],l.values.open=c[k],c[k]=l.values.close)),"column"==a&&(m.newStack&&(e[k]=NaN,d[k]=NaN),l.values.close=g,0>g?(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(e[k])?l.values.open=p:(l.values.close+=e[k],l.values.open=e[k]),e[k]=l.values.close)))}}for(k=this.start;k<=this.end;k++)for(n=0;n<h.length;n++)(m=h[n],m.hidden)?m.newStack&&(e[k]=
60
- NaN,d[k]=NaN):(l=m.type,m.chart==this.chart&&m.valueAxis==this&&a==l&&m.stackable&&(l=this.data[k].axes[this.id].graphs[m.id],g=l.values.value,isNaN(g)||(c=g/f[k]*100,l.values.percents=c,l.values.total=f[k],m.newStack&&(e[k]=NaN,d[k]=NaN),"100%"==b&&(isNaN(d[k])&&(d[k]=0),isNaN(e[k])&&(e[k]=0),0>c?(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+e[k],-100,100),l.values.open=e[k],e[k]=l.values.close)))))},recalculate:function(){var a=
61
- this.chart,b=a.graphs,c;for(c=0;c<b.length;c++){var d=b[c];if(d.valueAxis==this){var e="value";if("candlestick"==d.type||"ohlc"==d.type)e="open";var f,g,h=this.end+2,h=AmCharts.fitToBounds(this.end+1,0,this.data.length-1),k=this.start;0<k&&k--;var l;g=this.start;d.compareFromStart&&(g=0);if(!isNaN(a.startTime)&&(l=a.categoryAxis)){minDuration=l.minDuration();var m=new Date(a.startTime+minDuration/2),n=AmCharts.resetDateToMin(new Date(a.startTime),l.minPeriod).getTime();AmCharts.resetDateToMin(new Date(m),
62
- l.minPeriod).getTime()>n&&g++}if(l=a.recalculateFromDate)a.dataDateFormat&&(l=AmCharts.stringToDate(l,a.dataDateFormat)),g=a.getClosestIndex(a.chartData,"time",l.getTime(),!0,0,a.chartData.length),h=a.chartData.length-1;for(l=g;l<=h&&(g=this.data[l].axes[this.id].graphs[d.id],f=g.values[e],isNaN(f));l++);this.recBaseValue=f;for(e=k;e<=h;e++){g=this.data[e].axes[this.id].graphs[d.id];g.percents={};var k=g.values,p;for(p in k)g.percents[p]="percents"!=p?k[p]/f*100-100:k[p]}}}},getMinMax:function(){var a=
63
- !1,b=this.chart,c=b.graphs,d;for(d=0;d<c.length;d++){var e=c[d].type;("line"==e||"step"==e||"smoothedLine"==e)&&this.expandMinMax&&(a=!0)}a&&(0<this.start&&this.start--,this.end<this.data.length-1&&this.end++);"serial"==b.type&&(!0!==b.categoryAxis.parseDates||a||this.end<this.data.length-1&&this.end++);a=this.minMaxMultiplier;this.min=this.getMin(this.start,this.end);this.max=this.getMax();a=(this.max-this.min)*(a-1);this.min-=a;this.max+=a;a=this.guides.length;if(this.includeGuidesInMinMax&&0<a)for(b=
64
- 0;b<a;b++)c=this.guides[b],c.toValue<this.min&&(this.min=c.toValue),c.value<this.min&&(this.min=c.value),c.toValue>this.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=
65
- 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<this.max&&0>=b&&(this.max=0);"100%"==this.stackType&&(this.min=0>this.min?-100:0,this.max=
66
- 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.gridCountR/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&&(d=10);5>=d&&2<d&&(d=5);this.step=Math.ceil(this.step/(c*d))*c*d;1>c?(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=
67
- 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<this.max&&0>=b&&(this.max=0);1<this.minReal&&1<this.max-this.minReal&&(this.minReal=Math.floor(this.minReal));c=Math.pow(10,Math.floor(Math.log(Math.abs(this.minReal))*Math.LOG10E));0===this.min&&(this.minReal=c);0===this.min&&1<this.minReal&&(this.minReal=1);0<this.min&&0<this.minReal-this.step&&(this.minReal=this.min+this.step<this.minReal?this.min+this.step:this.min);
68
- c=Math.log(b)*Math.LOG10E-Math.log(a)*Math.LOG10E;this.logarithmic&&(2<c?(this.minReal=this.min=Math.pow(10,Math.floor(Math.log(Math.abs(a))*Math.LOG10E)),this.max=Math.pow(10,Math.ceil(Math.log(Math.abs(b))*Math.LOG10E))):(b=Math.pow(10,Math.floor(Math.log(Math.abs(this.min))*Math.LOG10E))/10,a=Math.pow(10,Math.floor(Math.log(Math.abs(a))*Math.LOG10E))/10,b<a&&(this.minReal=this.min=10*a)))},fixStepE:function(a){a=a.toExponential(0).split("e");var b=Number(a[1]);9==Number(a[0])&&b++;return this.generateNumber(1,
69
- b)},generateNumber:function(a,b){var c="",d;d=0>b?Math.abs(b)-1:Math.abs(b);var e;for(e=0;e<d;e++)c+="0";return 0>b?Number("0."+c+String(a)):Number(String(a)+c)},getMin:function(a,b){var c,d;for(d=a;d<=b;d++){var e=this.data[d].axes[this.id].graphs,f;for(f in e)if(e.hasOwnProperty(f)){var g=this.chart.getGraphById(f);if(g.includeInMinMax&&(!g.hidden||this.includeHidden)){isNaN(c)&&(c=Infinity);this.foundGraphs=!0;g=e[f].values;this.recalculateToPercents&&(g=e[f].percents);var h;if(this.minMaxField)h=
70
- g[this.minMaxField],h<c&&(c=h);else for(var k in g)g.hasOwnProperty(k)&&"percents"!=k&&"total"!=k&&(h=g[k],h<c&&(c=h))}}}return c},getMax:function(){var a,b;for(b=this.start;b<=this.end;b++){var c=this.data[b].axes[this.id].graphs,d;for(d in c)if(c.hasOwnProperty(d)){var e=this.chart.getGraphById(d);if(e.includeInMinMax&&(!e.hidden||this.includeHidden)){isNaN(a)&&(a=-Infinity);this.foundGraphs=!0;e=c[d].values;this.recalculateToPercents&&(e=c[d].percents);var f;if(this.minMaxField)f=e[this.minMaxField],
71
- f>a&&(a=f);else for(var g in e)e.hasOwnProperty(g)&&"percents"!=g&&"total"!=g&&(f=e[g],f>a&&(a=f))}}}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(b<a){var c=b;b=a;a=c}a<this.min&&(a=this.min);b>this.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"==
72
- 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,e=this.rotate,f=this.min,g=this.minReal;return!0===this.logarithmic?Math.pow(10,(e?!0===d?(b-a)/c:a/c:!0===d?a/c:(b-a)/c)+Math.log(g)*Math.LOG10E):!0===d?e?f-(a-b)/c:a/c+f:e?a/c+f:f-(a-b)/c},getCoordinate:function(a){if(isNaN(a))return NaN;
73
- var b=this.rotate,c=this.reversed,d=this.axisWidth,e=this.stepWidth,f=this.min,g=this.minReal;!0===this.logarithmic?(a=Math.log(a)*Math.LOG10E-Math.log(g)*Math.LOG10E,b=b?!0===c?d-e*a:e*a:!0===c?e*a:d-e*a):b=!0===c?b?d-e*(a-f):e*(a-f):b?e*(a-f):d-e*(a-f);b=this.rotate?b+(this.x-this.viX):b+(this.y-this.viY);1E7<Math.abs(b)&&(b=1E7*(b/Math.abs(b)));return Math.round(b)},synchronizeWithAxis:function(a){this.synchronizeWith=a;this.listenTo(this.synchronizeWith,"axisChanged",this.handleSynchronization)},
74
- 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,e=a.axisAlpha,f=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,e,c),this.axisWidth=a.width,"bottom"==a.position?(a=c/2+f+m+l-1,c=k):(a=-c/2-f+l+h,c=g+k)):(this.axisWidth=a.height,"right"==a.position?(d=AmCharts.line(p,[0,0,-g],[0,m,m-h],d,e,c),a=l+h,c=c/2+f+g+n+k-1):(d=AmCharts.line(p,[0,0],[0,m],d,e,c),a=l,c=-c/2-f+k));d.translate(c,
75
- a);b.axesSet.push(d);this.set=d}});AmCharts.RecItem=AmCharts.Class({construct:function(a,b,c,d,e,f,g,h,k,l,m){b=Math.round(b);this.value=c;void 0==c&&(c="");k||(k=0);void 0==d&&(d=!0);var n=a.chart.fontFamily,p=a.fontSize;void 0==p&&(p=a.chart.fontSize);var q=a.color;void 0==q&&(q=a.chart.color);void 0!==m&&(q=m);var r=a.chart.container,s=r.set();this.set=s;var w=a.axisThickness,v=a.axisColor,t=a.axisAlpha,u=a.tickLength,x=a.gridAlpha,E=a.gridThickness,A=a.gridColor,z=a.dashLength,H=a.fillColor,F=a.fillAlpha,G=a.labelsEnabled;m=a.labelRotation;
76
- var V=a.counter,N=a.inside,ia=a.labelOffset,da=a.dx,ba=a.dy,Sa=a.orientation,na=a.position,ta=a.previousCoord,L=a.viH,Y=a.viW,$=a.offset,oa,W;g?(G=!0,isNaN(g.tickLength)||(u=g.tickLength),void 0!=g.lineColor&&(A=g.lineColor),void 0!=g.color&&(q=g.color),isNaN(g.lineAlpha)||(x=g.lineAlpha),isNaN(g.dashLength)||(z=g.dashLength),isNaN(g.lineThickness)||(E=g.lineThickness),!0===g.inside&&(N=!0),isNaN(g.labelRotation)||(m=g.labelRotation),isNaN(g.fontSize)||(p=g.fontSize),g.position&&(na=g.position),void 0!==
77
- g.boldLabel&&(h=g.boldLabel),isNaN(g.labelOffset)||(ia=g.labelOffset)):""===c&&(u=0);W="start";e&&(W="middle");var Z=m*Math.PI/180,pa,I=0,D=0,aa=0,S=pa=0,Ta=0;"V"==Sa&&(m=0);var T;G&&(T=a.autoWrap&&0===m?AmCharts.wrappedText(r,c,q,n,p,W,h,e,0):AmCharts.text(r,c,q,n,p,W,h),W=T.getBBox(),S=W.width,Ta=W.height);if("H"==Sa){if(0<=b&&b<=Y+1&&(0<u&&0<t&&b+k<=Y+1&&(oa=AmCharts.line(r,[b+k,b+k],[0,u],v,t,E),s.push(oa)),0<x&&(W=AmCharts.line(r,[b,b+da,b+da],[L,L+ba,ba],A,x,E,z),s.push(W))),D=0,I=b,g&&90==
78
- m&&N&&(I-=p),!1===d?(W="start",D="bottom"==na?N?D+u:D-u:N?D-u:D+u,I+=3,e&&(I+=e/2-3,W="middle"),0<m&&(W="middle")):W="middle",1==V&&0<F&&!g&&!l&&ta<Y&&(d=AmCharts.fitToBounds(b,0,Y),ta=AmCharts.fitToBounds(ta,0,Y),pa=d-ta,0<pa&&(fill=AmCharts.rect(r,pa,a.height,H,F),fill.translate(d-pa+da,ba),s.push(fill))),"bottom"==na?(D+=L+p/2+$,N?(0<m?(D=L-S/2*Math.sin(Z)-u-3,I+=S/2*Math.cos(Z)-4+2):0>m?(D=L+S*Math.sin(Z)-u-3+2,I+=-S*Math.cos(Z)-Ta*Math.sin(Z)-4):D-=u+p+3+3,D-=ia):(0<m?(D=L+S/2*Math.sin(Z)+u+
79
- 3,I-=S/2*Math.cos(Z)):0>m?(D=L+u+3-S/2*Math.sin(Z)+2,I+=S/2*Math.cos(Z)):D+=u+w+3+3,D+=ia)):(D+=ba+p/2-$,I+=da,N?(0<m?(D=S/2*Math.sin(Z)+u+3,I-=S/2*Math.cos(Z)):D+=u+3,D+=ia):(0<m?(D=-(S/2)*Math.sin(Z)-u-6,I+=S/2*Math.cos(Z)):D-=u+p+3+w+3,D-=ia)),"bottom"==na?pa=(N?L-u-1:L+w-1)+$:(aa=da,pa=(N?ba:ba-u-w+1)-$),f&&(I+=f),f=I,0<m&&(f+=S/2*Math.cos(Z)),T&&(p=0,N&&(p=S/2*Math.cos(Z)),f+p>Y+2||0>f))T.remove(),T=null}else{0<=b&&b<=L+1&&(0<u&&0<t&&b+k<=L+1&&(oa=AmCharts.line(r,[0,u],[b+k,b+k],v,t,E),s.push(oa)),
80
- 0<x&&(W=AmCharts.line(r,[0,da,Y+da],[b,b+ba,b+ba],A,x,E,z),s.push(W)));W="end";if(!0===N&&"left"==na||!1===N&&"right"==na)W="start";D=b-p/2;1==V&&0<F&&!g&&!l&&(d=AmCharts.fitToBounds(b,0,L),ta=AmCharts.fitToBounds(ta,0,L),Z=d-ta,fill=AmCharts.polygon(r,[0,a.width,a.width,0],[0,0,Z,Z],H,F),fill.translate(da,d-Z+ba),s.push(fill));D+=p/2;"right"==na?(I+=da+Y+$,D+=ba,N?(f||(D-=p/2+3),I=I-(u+4)-ia):(I+=u+4+w,D-=2,I+=ia)):N?(I+=u+4-$,f||(D-=p/2+3),g&&(I+=da,D+=ba),I+=ia):(I+=-u-w-4-2-$,D-=2,I-=ia);oa&&
81
- ("right"==na?(aa+=da+$+Y,pa+=ba,aa=N?aa-w:aa+w):(aa-=$,N||(aa-=u+w)));f&&(D+=f);N=-3;"right"==na&&(N+=ba);T&&(D>L+1||D<N)&&(T.remove(),T=null)}oa&&oa.translate(aa,pa);!1===a.visible&&(oa&&oa.remove(),T&&(T.remove(),T=null));T&&(T.attr({"text-anchor":W}),T.translate(I,D),0!==m&&T.rotate(-m,a.chart.backgroundColor),a.allLabels.push(T)," "!=c&&(this.label=T));l||(a.counter=0===V?1:0,a.previousCoord=b);0===this.set.node.childNodes.length&&this.set.remove()},graphics:function(){return this.set},getLabel:function(){return this.label}});AmCharts.RecFill=AmCharts.Class({construct:function(a,b,c,d){var e=a.dx,f=a.dy,g=a.orientation,h=0;if(c<b){var k=b;b=c;c=k}var l=d.fillAlpha;isNaN(l)&&(l=0);k=a.chart.container;d=d.fillColor;"V"==g?(b=AmCharts.fitToBounds(b,0,a.viH),c=AmCharts.fitToBounds(c,0,a.viH)):(b=AmCharts.fitToBounds(b,0,a.viW),c=AmCharts.fitToBounds(c,0,a.viW));c-=b;isNaN(c)&&(c=4,h=2,l=0);0>c&&"object"==typeof d&&(d=d.join(",").split(",").reverse());"V"==g?(a=AmCharts.rect(k,a.width,c,d,l),a.translate(e,b-h+f)):(a=AmCharts.rect(k,
82
- c,a.height,d,l),a.translate(b-h+e,f));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.11.1";AmCharts.addChart(this);this.createEvents("dataUpdated","init","rendered","drawn","failed");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.precision=-1;this.percentPrecision=
45
+ 0;this.radarCategoriesEnabled=!0;this.gridType="polygons";this.useScientificNotation=!1;this.axisTitleOffset=10;this.minMaxMultiplier=1;this.logGridLimit=2;this.treatZeroAs=0;AmCharts.applyTheme(this,a,this.cname)},updateData:function(){0>=this.gridCountR&&(this.gridCountR=1);this.totals=[];this.data=this.chart.chartData;var a=this.chart;"xy"!=a.type&&(this.stackGraphs("smoothedLine"),this.stackGraphs("line"),this.stackGraphs("column"),this.stackGraphs("step"));this.recalculateToPercents&&this.recalculate();
46
+ 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){var c=
47
+ this.treatZeroAs,d=this.getMin(0,this.data.length-1);0<c&&0==d&&(this.minReal=d=c);if(0>=d||0>=this.minimum){this.fire("logarithmicAxisFailed",{type:"logarithmicAxisFailed",chart:a});return}}this.grid0=null;var e,f,g=a.dx,h=a.dy,c=!1,d=this.logarithmic;if(isNaN(this.min)||isNaN(this.max)||!this.foundGraphs||Infinity==this.min||-Infinity==this.max)c=!0;else{var k=this.labelFrequency,l=this.showFirstLabel,m=this.showLastLabel,n=1,p=0,q=Math.round((this.max-this.min)/this.step)+1,r;!0===d?(r=Math.log(this.max)*
48
+ Math.LOG10E-Math.log(this.minReal)*Math.LOG10E,this.stepWidth=this.axisWidth/r,r>this.logGridLimit&&(q=Math.ceil(Math.log(this.max)*Math.LOG10E)+1,p=Math.round(Math.log(this.minReal)*Math.LOG10E),q>this.gridCountR&&(n=Math.ceil(q/this.gridCountR)))):this.stepWidth=this.axisWidth/(this.max-this.min);var s=0;1>this.step&&-1<this.step&&(s=AmCharts.getDecimals(this.step));this.integersOnly&&(s=0);s>this.maxDecCount&&(s=this.maxDecCount);var w=this.precision;isNaN(w)||(s=w);this.max=AmCharts.roundTo(this.max,
49
+ this.maxDecCount);this.min=AmCharts.roundTo(this.min,this.maxDecCount);f={};f.precision=s;f.decimalSeparator=a.nf.decimalSeparator;f.thousandsSeparator=a.nf.thousandsSeparator;this.numberFormatter=f;var v,t=this.guides;e=t.length;if(0<e){var u=this.fillAlpha;for(f=this.fillAlpha=0;f<e;f++){var x=t[f],F=NaN,B=x.above;isNaN(x.toValue)||(F=this.getCoordinate(x.toValue),v=new this.axisItemRenderer(this,F,"",!0,NaN,NaN,x),this.pushAxisItem(v,B));var z=NaN;isNaN(x.value)||(z=this.getCoordinate(x.value),
50
+ v=new this.axisItemRenderer(this,z,x.label,!0,NaN,(F-z)/2,x),this.pushAxisItem(v,B));isNaN(F-z)||(v=new this.guideFillRenderer(this,z,F,x),this.pushAxisItem(v,B),v=v.graphics(),x.graphics=v,x.balloonText&&this.addEventListeners(v,x))}this.fillAlpha=u}this.exponential=!1;for(f=p;f<q;f+=n)t=AmCharts.roundTo(this.step*f+this.min,s),-1!=String(t).indexOf("e")&&(this.exponential=!0,String(t).split("e"));this.duration&&(this.maxInterval=AmCharts.getMaxInterval(this.max,this.duration));var s=this.step,I,
51
+ t=this.minorGridAlpha;this.minorGridEnabled&&(I=this.getMinorGridStep(s,this.stepWidth*s));for(f=p;f<q;f+=n)if(p=s*f+this.min,d&&this.max-this.min>5*this.min&&(p-=this.min),p=AmCharts.roundTo(p,this.maxDecCount+1),!this.integersOnly||Math.round(p)==p)if(isNaN(w)||Number(AmCharts.toFixed(p,w))==p){!0===d&&(0===p&&(p=this.minReal),r>this.logGridLimit&&(p=Math.pow(10,f)));v=this.formatValue(p,!1,f);Math.round(f/k)!=f/k&&(v=void 0);if(0===f&&!l||f==q-1&&!m)v=" ";e=this.getCoordinate(p);v=new this.axisItemRenderer(this,
52
+ e,v,void 0,void 0,void 0,void 0,this.boldLabels);this.pushAxisItem(v);if(p==this.baseValue&&"radar"!=a.type){var E,H,x=this.viW,B=this.viH;v=this.viX;u=this.viY;"H"==this.orientation?0<=e&&e<=x+1&&(E=[e,e,e+g],H=[B,0,h]):0<=e&&e<=B+1&&(E=[0,x,x+g],H=[e,e,e+h]);E&&(e=AmCharts.fitToBounds(2*this.gridAlpha,0,1),e=AmCharts.line(a.container,E,H,this.gridColor,e,1,this.dashLength),e.translate(v,u),this.grid0=e,a.axesSet.push(e),e.toBack())}if(!isNaN(I)&&0<t&&f<q-1){v=this.gridAlpha;this.gridAlpha=this.minorGridAlpha;
53
+ for(e=1;e<s/I;e++)u=this.getCoordinate(p+I*e),u=new this.axisItemRenderer(this,u,"",!1,0,0,!1,!1,0,!0),this.pushAxisItem(u);this.gridAlpha=v}}r=this.baseValue;this.min>this.baseValue&&this.max>this.baseValue&&(r=this.min);this.min<this.baseValue&&this.max<this.baseValue&&(r=this.max);d&&r<this.minReal&&(r=this.minReal);this.baseCoord=this.getCoordinate(r);r={type:"axisChanged",target:this,chart:a};r.min=d?this.minReal:this.min;r.max=this.max;this.fire("axisChanged",r);this.axisCreated=!0}d=this.axisLine.set;
54
+ r=this.labelsSet;this.positionTitle();"radar"!=a.type?(a=this.viX,I=this.viY,b.translate(a,I),r.translate(a,I)):d.toFront();!this.visible||c?(b.hide(),d.hide(),r.hide()):(b.show(),d.show(),r.show());this.axisY=this.y-this.viY;this.axisX=this.x-this.viX},formatValue:function(a,b,c){var d=this.exponential,e=this.logarithmic,f=this.numberFormatter,g=this.chart;!0===this.logarithmic&&(d=-1!=String(a).indexOf("e")?!0:!1);this.useScientificNotation&&(d=!0);this.usePrefixes&&(d=!1);d?(valueText=-1==String(a).indexOf("e")?
55
+ a.toExponential(15):String(a),c=valueText.split("e"),b=Number(c[0]),c=Number(c[1]),b=AmCharts.roundTo(b,14),10==b&&(b=1,c+=1),valueText=b+"e"+c,0===a&&(valueText="0"),1==a&&(valueText="1")):(e&&(d=String(a).split("."),d[1]?(f.precision=d[1].length,0>c&&(f.precision=Math.abs(c))):f.precision=-1),valueText=this.usePrefixes?AmCharts.addPrefix(a,g.prefixesOfBigNumbers,g.prefixesOfSmallNumbers,f,!b):AmCharts.formatNumber(a,f,f.precision));this.duration&&(valueText=AmCharts.formatDuration(a,this.duration,
56
+ "",this.durationUnits,this.maxInterval,f));this.recalculateToPercents?valueText+="%":(f=this.unit)&&(valueText="left"==this.unitPosition?f+valueText:valueText+f);this.labelFunction&&(valueText=this.labelFunction(a,valueText,this).toString());return valueText},getMinorGridStep:function(a,b){var c=[5,4,2];60>b&&c.shift();for(var d=Math.floor(Math.log(Math.abs(a))*Math.LOG10E),e=0;e<c.length;e++){var f=a/c[e],g=Math.floor(Math.log(Math.abs(f))*Math.LOG10E);if(!(0<Math.abs(d-g)))if(1>a){if(g=Math.pow(10,
57
+ -g)*f,g==Math.round(g))return f}else if(f==Math.round(f))return f}},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=[],e=[],f=[],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;n<h.length;n++)m=h[n],m.hidden||(l=m.type,m.chart==this.chart&&m.valueAxis==this&&a==l&&m.stackable&&(k&&(m.stackGraph=k),k=m));
58
+ for(k=this.start;k<=this.end;k++){var r=0;for(n=0;n<h.length;n++)if(m=h[n],m.hidden)m.newStack&&(e[k]=NaN,d[k]=NaN);else if(l=m.type,m.chart==this.chart&&m.valueAxis==this&&a==l&&m.stackable)if(l=this.data[k].axes[this.id].graphs[m.id],g=l.values.value,isNaN(g))m.newStack&&(e[k]=NaN,d[k]=NaN);else{var s=AmCharts.getDecimals(g);r<s&&(r=s);isNaN(f[k])?f[k]=Math.abs(g):f[k]+=Math.abs(g);f[k]=AmCharts.roundTo(f[k],r);s=m.fillToGraph;q&&s&&(s=this.data[k].axes[this.id].graphs[s.id])&&(l.values.open=s.values.value);
59
+ "regular"==b&&(q&&(isNaN(c[k])?(c[k]=g,l.values.close=g,l.values.open=this.baseValue):(isNaN(g)?l.values.close=c[k]:l.values.close=g+c[k],l.values.open=c[k],c[k]=l.values.close)),"column"==a&&(m.newStack&&(e[k]=NaN,d[k]=NaN),l.values.close=g,0>g?(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(e[k])?l.values.open=p:(l.values.close+=e[k],l.values.open=e[k]),e[k]=l.values.close)))}}for(k=this.start;k<=this.end;k++)for(n=
60
+ 0;n<h.length;n++)(m=h[n],m.hidden)?m.newStack&&(e[k]=NaN,d[k]=NaN):(l=m.type,m.chart==this.chart&&m.valueAxis==this&&a==l&&m.stackable&&(l=this.data[k].axes[this.id].graphs[m.id],g=l.values.value,isNaN(g)||(c=g/f[k]*100,l.values.percents=c,l.values.total=f[k],m.newStack&&(e[k]=NaN,d[k]=NaN),"100%"==b&&(isNaN(d[k])&&(d[k]=0),isNaN(e[k])&&(e[k]=0),0>c?(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+e[k],-100,100),l.values.open=
61
+ e[k],e[k]=l.values.close)))))},recalculate:function(){var a=this.chart,b=a.graphs,c;for(c=0;c<b.length;c++){var d=b[c];if(d.valueAxis==this){var e="value";if("candlestick"==d.type||"ohlc"==d.type)e="open";var f,g,h=this.end+2,h=AmCharts.fitToBounds(this.end+1,0,this.data.length-1),k=this.start;0<k&&k--;var l;g=this.start;d.compareFromStart&&(g=0);if(!isNaN(a.startTime)&&(l=a.categoryAxis)){minDuration=l.minDuration();var m=new Date(a.startTime+minDuration/2),n=AmCharts.resetDateToMin(new Date(a.startTime),
62
+ l.minPeriod).getTime();AmCharts.resetDateToMin(new Date(m),l.minPeriod).getTime()>n&&g++}if(l=a.recalculateFromDate)a.dataDateFormat&&(l=AmCharts.stringToDate(l,a.dataDateFormat)),g=a.getClosestIndex(a.chartData,"time",l.getTime(),!0,0,a.chartData.length),h=a.chartData.length-1;for(l=g;l<=h&&(g=this.data[l].axes[this.id].graphs[d.id],f=g.values[e],isNaN(f));l++);this.recBaseValue=f;for(e=k;e<=h;e++){g=this.data[e].axes[this.id].graphs[d.id];g.percents={};var k=g.values,p;for(p in k)g.percents[p]=
63
+ "percents"!=p?k[p]/f*100-100:k[p]}}}},getMinMax:function(){var a=!1,b=this.chart,c=b.graphs,d;for(d=0;d<c.length;d++){var e=c[d].type;("line"==e||"step"==e||"smoothedLine"==e)&&this.expandMinMax&&(a=!0)}a&&(0<this.start&&this.start--,this.end<this.data.length-1&&this.end++);"serial"==b.type&&(!0!==b.categoryAxis.parseDates||a||this.end<this.data.length-1&&this.end++);a=this.minMaxMultiplier;this.min=this.getMin(this.start,this.end);this.max=this.getMax();a=(this.max-this.min)*(a-1);this.min-=a;this.max+=
64
+ a;a=this.guides.length;if(this.includeGuidesInMinMax&&0<a)for(b=0;b<a;b++)c=this.guides[b],c.toValue<this.min&&(this.min=c.toValue),c.value<this.min&&(this.min=c.value),c.toValue>this.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=
65
+ 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<this.max&&0>=b&&
66
+ (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.gridCountR/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&&(d=10);5>=d&&2<d&&(d=5);this.step=Math.ceil(this.step/(c*d))*c*d;1>c?(this.maxDecCount=Math.abs(Math.log(Math.abs(c))*Math.LOG10E),this.maxDecCount=Math.round(this.maxDecCount),
67
+ 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<this.max&&0>=b&&(this.max=0);1<this.minReal&&1<this.max-this.minReal&&(this.minReal=Math.floor(this.minReal));c=Math.pow(10,Math.floor(Math.log(Math.abs(this.minReal))*Math.LOG10E));0===this.min&&(this.minReal=c);0===this.min&&1<this.minReal&&(this.minReal=1);0<this.min&&0<this.minReal-this.step&&
68
+ (this.minReal=this.min+this.step<this.minReal?this.min+this.step:this.min);c=Math.log(b)*Math.LOG10E-Math.log(a)*Math.LOG10E;this.logarithmic&&(2<c?(this.minReal=this.min=Math.pow(10,Math.floor(Math.log(Math.abs(a))*Math.LOG10E)),this.max=Math.pow(10,Math.ceil(Math.log(Math.abs(b))*Math.LOG10E))):(b=Math.pow(10,Math.floor(Math.log(Math.abs(this.min))*Math.LOG10E))/10,a=Math.pow(10,Math.floor(Math.log(Math.abs(a))*Math.LOG10E))/10,b<a&&(this.minReal=this.min=10*a)))},fixStepE:function(a){a=a.toExponential(0).split("e");
69
+ var b=Number(a[1]);9==Number(a[0])&&b++;return this.generateNumber(1,b)},generateNumber:function(a,b){var c="",d;d=0>b?Math.abs(b)-1:Math.abs(b);var e;for(e=0;e<d;e++)c+="0";return 0>b?Number("0."+c+String(a)):Number(String(a)+c)},getMin:function(a,b){var c,d;for(d=a;d<=b;d++){var e=this.data[d].axes[this.id].graphs,f;for(f in e)if(e.hasOwnProperty(f)){var g=this.chart.getGraphById(f);if(g.includeInMinMax&&(!g.hidden||this.includeHidden)){isNaN(c)&&(c=Infinity);this.foundGraphs=!0;g=e[f].values;this.recalculateToPercents&&
70
+ (g=e[f].percents);var h;if(this.minMaxField)h=g[this.minMaxField],h<c&&(c=h);else for(var k in g)g.hasOwnProperty(k)&&"percents"!=k&&"total"!=k&&(h=g[k],h<c&&(c=h))}}}return c},getMax:function(){var a,b;for(b=this.start;b<=this.end;b++){var c=this.data[b].axes[this.id].graphs,d;for(d in c)if(c.hasOwnProperty(d)){var e=this.chart.getGraphById(d);if(e.includeInMinMax&&(!e.hidden||this.includeHidden)){isNaN(a)&&(a=-Infinity);this.foundGraphs=!0;e=c[d].values;this.recalculateToPercents&&(e=c[d].percents);
71
+ var f;if(this.minMaxField)f=e[this.minMaxField],f>a&&(a=f);else for(var g in e)e.hasOwnProperty(g)&&"percents"!=g&&"total"!=g&&(f=e[g],f>a&&(a=f))}}}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(b<a){var c=b;b=a;a=c}a<this.min&&(a=this.min);b>this.max&&(b=this.max);c={type:"axisSelfZoomed"};c.chart=this.chart;c.valueAxis=this;c.multiplier=this.axisWidth/Math.abs(this.getCoordinate(b)-
72
+ 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,e=this.rotate,f=this.min,g=this.minReal;return!0===this.logarithmic?Math.pow(10,(e?!0===d?(b-a)/c:a/c:!0===d?a/c:(b-a)/c)+Math.log(g)*Math.LOG10E):!0===d?e?f-(a-b)/c:a/c+f:e?a/c+f:f-(a-b)/c},getCoordinate:function(a){if(isNaN(a))return NaN;
73
+ var b=this.rotate,c=this.reversed,d=this.axisWidth,e=this.stepWidth,f=this.min,g=this.minReal;!0===this.logarithmic?(0==a&&(a=this.treatZeroAs),a=Math.log(a)*Math.LOG10E-Math.log(g)*Math.LOG10E,b=b?!0===c?d-e*a:e*a:!0===c?e*a:d-e*a):b=!0===c?b?d-e*(a-f):e*(a-f):b?e*(a-f):d-e*(a-f);b=this.rotate?b+(this.x-this.viX):b+(this.y-this.viY);1E7<Math.abs(b)&&(b=1E7*(b/Math.abs(b)));return Math.round(b)},synchronizeWithAxis:function(a){this.synchronizeWith=a;this.listenTo(this.synchronizeWith,"axisChanged",
74
+ 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,e=a.axisAlpha,f=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,e,c),this.axisWidth=a.width,"bottom"==a.position?(a=c/2+f+m+l-1,c=k):(a=-c/2-f+l+h,c=g+k)):(this.axisWidth=a.height,"right"==a.position?(d=AmCharts.line(p,[0,0,-g],[0,m,m-h],d,e,c),a=l+h,c=c/2+f+g+n+k-1):(d=AmCharts.line(p,[0,0],[0,m],d,e,c),a=l,c=-c/2-f+k));d.translate(c,
75
+ a);b.axesSet.push(d);this.set=d}});AmCharts.RecItem=AmCharts.Class({construct:function(a,b,c,d,e,f,g,h,k,l,m){b=Math.round(b);this.value=c;void 0==c&&(c="");k||(k=0);void 0==d&&(d=!0);var n=a.chart.fontFamily,p=a.fontSize;void 0==p&&(p=a.chart.fontSize);var q=a.color;void 0==q&&(q=a.chart.color);void 0!==m&&(q=m);var r=a.chart.container,s=r.set();this.set=s;var w=a.axisThickness,v=a.axisColor,t=a.axisAlpha,u=a.tickLength,x=a.gridAlpha,F=a.gridThickness,B=a.gridColor,z=a.dashLength,I=a.fillColor,E=a.fillAlpha,H=a.labelsEnabled;m=a.labelRotation;
76
+ var V=a.counter,T=a.inside,fa=a.labelOffset,aa=a.dx,ga=a.dy,Na=a.orientation,ma=a.position,ba=a.previousCoord,Q=a.viH,X=a.viW,na=a.offset,$,W;g?(H=!0,isNaN(g.tickLength)||(u=g.tickLength),void 0!=g.lineColor&&(B=g.lineColor),void 0!=g.color&&(q=g.color),isNaN(g.lineAlpha)||(x=g.lineAlpha),isNaN(g.dashLength)||(z=g.dashLength),isNaN(g.lineThickness)||(F=g.lineThickness),!0===g.inside&&(T=!0),isNaN(g.labelRotation)||(m=g.labelRotation),isNaN(g.fontSize)||(p=g.fontSize),g.position&&(ma=g.position),void 0!==
77
+ g.boldLabel&&(h=g.boldLabel),isNaN(g.labelOffset)||(fa=g.labelOffset)):""===c&&(u=0);W="start";e&&(W="middle");var Y=m*Math.PI/180,ja,G=0,A=0,ka=0,S=ja=0,y=0;"V"==Na&&(m=0);var Z;H&&(Z=a.autoWrap&&0===m?AmCharts.wrappedText(r,c,q,n,p,W,h,e,0):AmCharts.text(r,c,q,n,p,W,h),W=Z.getBBox(),S=W.width,y=W.height);if("H"==Na){if(0<=b&&b<=X+1&&(0<u&&0<t&&b+k<=X+1&&($=AmCharts.line(r,[b+k,b+k],[0,u],v,t,F),s.push($)),0<x&&(W=AmCharts.line(r,[b,b+aa,b+aa],[Q,Q+ga,ga],B,x,F,z),s.push(W))),A=0,G=b,g&&90==m&&T&&
78
+ (G-=p),!1===d?(W="start",A="bottom"==ma?T?A+u:A-u:T?A-u:A+u,G+=3,e&&(G+=e/2-3,W="middle"),0<m&&(W="middle")):W="middle",1==V&&0<E&&!g&&!l&&ba<X&&(d=AmCharts.fitToBounds(b,0,X),ba=AmCharts.fitToBounds(ba,0,X),ja=d-ba,0<ja&&(fill=AmCharts.rect(r,ja,a.height,I,E),fill.translate(d-ja+aa,ga),s.push(fill))),"bottom"==ma?(A+=Q+p/2+na,T?(0<m?(A=Q-S/2*Math.sin(Y)-u-3,G+=S/2*Math.cos(Y)-4+2):0>m?(A=Q+S*Math.sin(Y)-u-3+2,G+=-S*Math.cos(Y)-y*Math.sin(Y)-4):A-=u+p+3+3,A-=fa):(0<m?(A=Q+S/2*Math.sin(Y)+u+3,G-=S/
79
+ 2*Math.cos(Y)):0>m?(A=Q+u+3-S/2*Math.sin(Y)+2,G+=S/2*Math.cos(Y)):A+=u+w+3+3,A+=fa)):(A+=ga+p/2-na,G+=aa,T?(0<m?(A=S/2*Math.sin(Y)+u+3,G-=S/2*Math.cos(Y)):A+=u+3,A+=fa):(0<m?(A=-(S/2)*Math.sin(Y)-u-6,G+=S/2*Math.cos(Y)):A-=u+p+3+w+3,A-=fa)),"bottom"==ma?ja=(T?Q-u-1:Q+w-1)+na:(ka=aa,ja=(T?ga:ga-u-w+1)-na),f&&(G+=f),f=G,0<m&&(f+=S/2*Math.cos(Y)),Z&&(p=0,T&&(p=S/2*Math.cos(Y)),f+p>X+2||0>f))Z.remove(),Z=null}else{0<=b&&b<=Q+1&&(0<u&&0<t&&b+k<=Q+1&&($=AmCharts.line(r,[0,u],[b+k,b+k],v,t,F),s.push($)),
80
+ 0<x&&(W=AmCharts.line(r,[0,aa,X+aa],[b,b+ga,b+ga],B,x,F,z),s.push(W)));W="end";if(!0===T&&"left"==ma||!1===T&&"right"==ma)W="start";A=b-p/2;1==V&&0<E&&!g&&!l&&(d=AmCharts.fitToBounds(b,0,Q),ba=AmCharts.fitToBounds(ba,0,Q),Y=d-ba,fill=AmCharts.polygon(r,[0,a.width,a.width,0],[0,0,Y,Y],I,E),fill.translate(aa,d-Y+ga),s.push(fill));A+=p/2;"right"==ma?(G+=aa+X+na,A+=ga,T?(f||(A-=p/2+3),G=G-(u+4)-fa):(G+=u+4+w,A-=2,G+=fa)):T?(G+=u+4-na,f||(A-=p/2+3),g&&(G+=aa,A+=ga),G+=fa):(G+=-u-w-4-2-na,A-=2,G-=fa);$&&
81
+ ("right"==ma?(ka+=aa+na+X,ja+=ga,ka=T?ka-w:ka+w):(ka-=na,T||(ka-=u+w)));f&&(A+=f);T=-3;"right"==ma&&(T+=ga);Z&&(A>Q+1||A<T)&&(Z.remove(),Z=null)}$&&$.translate(ka,ja);!1===a.visible&&($&&$.remove(),Z&&(Z.remove(),Z=null));Z&&(Z.attr({"text-anchor":W}),Z.translate(G,A),0!==m&&Z.rotate(-m,a.chart.backgroundColor),a.allLabels.push(Z)," "!=c&&(this.label=Z));l||(a.counter=0===V?1:0,a.previousCoord=b);0===this.set.node.childNodes.length&&this.set.remove()},graphics:function(){return this.set},getLabel:function(){return this.label}});AmCharts.RecFill=AmCharts.Class({construct:function(a,b,c,d){var e=a.dx,f=a.dy,g=a.orientation,h=0;if(c<b){var k=b;b=c;c=k}var l=d.fillAlpha;isNaN(l)&&(l=0);k=a.chart.container;d=d.fillColor;"V"==g?(b=AmCharts.fitToBounds(b,0,a.viH),c=AmCharts.fitToBounds(c,0,a.viH)):(b=AmCharts.fitToBounds(b,0,a.viW),c=AmCharts.fitToBounds(c,0,a.viW));c-=b;isNaN(c)&&(c=4,h=2,l=0);0>c&&"object"==typeof d&&(d=d.join(",").split(",").reverse());"V"==g?(a=AmCharts.rect(k,a.width,c,d,l),a.translate(e,b-h+f)):(a=AmCharts.rect(k,
82
+ c,a.height,d,l),a.translate(b-h+e,f));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.11.2";AmCharts.addChart(this);this.createEvents("dataUpdated","init","rendered","drawn","failed");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.precision=-1;this.percentPrecision=
83
83
  2;this.decimalSeparator=".";this.thousandsSeparator=",";this.labels=[];this.allLabels=[];this.titles=[];this.marginRight=this.marginLeft=this.autoMarginOffset=0;this.timeOuts=[];this.creditsPosition="top-left";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=
84
84
  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:.001,prefix:"m"}];this.panEventsEnabled=
85
85
  !0;AmCharts.bezierX=3;AmCharts.bezierY=6;this.product="amcharts";this.animations=[];this.balloon=new AmCharts.AmBalloon(this.theme);this.balloon.chart=this;AmCharts.applyTheme(this,a,"AmChart")},drawChart:function(){this.drawBackground();this.redrawLabels();this.drawTitles();this.brr()},drawBackground:function(){AmCharts.remove(this.background);var a=this.container,b=this.backgroundColor,c=this.backgroundAlpha,d=this.set;AmCharts.isModern||0!==c||(c=.001);var e=this.updateWidth();this.realWidth=e;
@@ -87,12 +87,12 @@ var f=this.updateHeight();this.realHeight=f;this.background=b=AmCharts.polygon(a
87
87
  d.text,e,this.fontFamily,f);e.translate(g+(this.realWidth-this.marginRight-g)/2,b);e.node.style.pointerEvents="none";g=!0;void 0!==d.bold&&(g=d.bold);g&&e.attr({"font-weight":"bold"});e.attr({opacity:d.alpha});b+=f+6;this.freeLabelsSet.push(e)}}},write:function(a){if(a="object"!=typeof a?document.getElementById(a):a){a.innerHTML="";this.div=a;a.style.overflow="hidden";a.style.textAlign="left";var b=this.chartDiv,c=this.legendDiv,d=this.legend,e=c.style,f=b.style;this.measure();var g,h=document.createElement("div");
88
88
  g=h.style;g.position="relative";this.containerDiv=h;a.appendChild(h);var k=this.exportConfig;k&&AmCharts.AmExport&&!this.AmExport&&(this.AmExport=new AmCharts.AmExport(this,k));this.amExport&&AmCharts.AmExport&&(this.AmExport=AmCharts.extend(this.amExport,new AmCharts.AmExport(this),!0));this.AmExport&&this.AmExport.init&&this.AmExport.init();if(d)switch(d=this.addLegend(d,d.divId),d.position){case "bottom":h.appendChild(b);h.appendChild(c);break;case "top":h.appendChild(c);h.appendChild(b);break;
89
89
  case "absolute":g.width=a.style.width;g.height=a.style.height;e.position="absolute";f.position="absolute";void 0!==d.left&&(e.left=d.left+"px");void 0!==d.right&&(e.right=d.right+"px");void 0!==d.top&&(e.top=d.top+"px");void 0!==d.bottom&&(e.bottom=d.bottom+"px");d.marginLeft=0;d.marginRight=0;h.appendChild(b);h.appendChild(c);break;case "right":g.width=a.style.width;g.height=a.style.height;e.position="relative";f.position="absolute";h.appendChild(b);h.appendChild(c);break;case "left":g.width=a.style.width;
90
- g.height=a.style.height;e.position="absolute";f.position="relative";h.appendChild(b);h.appendChild(c);break;case "outside":h.appendChild(b)}else h.appendChild(b);this.listenersAdded||(this.addListeners(),this.listenersAdded=!0);this.initChart()}},createLabelsSet:function(){AmCharts.remove(this.labelsSet);this.labelsSet=this.container.set();this.freeLabelsSet.push(this.labelsSet)},initChart:function(){AmCharts.callInitHandler(this);AmCharts.applyLang(this.language,this);var a=this.numberFormatter;
91
- a&&(isNaN(a.precision)||(this.precision=a.precision),void 0!==a.thousandsSeparator&&(this.thousandsSeparator=a.thousandsSeparator),void 0!==a.decimalSeparator&&(this.decimalSeparator=a.decimalSeparator));(a=this.percentFormatter)&&!isNaN(a.precision)&&(this.percentPrecision=a.precision);this.nf={precision:this.precision,thousandsSeparator:this.thousandsSeparator,decimalSeparator:this.decimalSeparator};this.pf={precision:this.percentPrecision,thousandsSeparator:this.thousandsSeparator,decimalSeparator:this.decimalSeparator};
92
- this.divIsFixed=AmCharts.findIfFixed(this.chartDiv);this.previousHeight=this.divRealHeight;this.previousWidth=this.divRealWidth;this.destroy();this.startInterval();a=0;document.attachEvent&&!window.opera&&(a=1);this.dmouseX=this.dmouseY=0;var b=document.getElementsByTagName("html")[0];b&&window.getComputedStyle&&(b=window.getComputedStyle(b,null))&&(this.dmouseY=AmCharts.removePx(b.getPropertyValue("margin-top")),this.dmouseX=AmCharts.removePx(b.getPropertyValue("margin-left")));this.mouseMode=a;
93
- (a=this.container)?(a.container.innerHTML="",this.chartDiv.appendChild(a.container),a.setSize(this.realWidth,this.realHeight)):a=new AmCharts.AmDraw(this.chartDiv,this.realWidth,this.realHeight,this);AmCharts.VML||AmCharts.SVG?(a.handDrawn=this.handDrawn,a.handDrawScatter=this.handDrawScatter,a.handDrawThickness=this.handDrawThickness,this.container=a,this.set&&this.set.remove(),this.set=a.set(),this.gridSet&&this.gridSet.remove(),this.gridSet=a.set(),this.cursorLineSet&&this.cursorLineSet.remove(),
94
- this.cursorLineSet=a.set(),this.graphsBehindSet&&this.graphsBehindSet.remove(),this.graphsBehindSet=a.set(),this.bulletBehindSet&&this.bulletBehindSet.remove(),this.bulletBehindSet=a.set(),this.columnSet&&this.columnSet.remove(),this.columnSet=a.set(),this.graphsSet&&this.graphsSet.remove(),this.graphsSet=a.set(),this.trendLinesSet&&this.trendLinesSet.remove(),this.trendLinesSet=a.set(),this.axesLabelsSet&&this.axesLabelsSet.remove(),this.axesLabelsSet=a.set(),this.axesSet&&this.axesSet.remove(),
95
- this.axesSet=a.set(),this.cursorSet&&this.cursorSet.remove(),this.cursorSet=a.set(),this.scrollbarsSet&&this.scrollbarsSet.remove(),this.scrollbarsSet=a.set(),this.bulletSet&&this.bulletSet.remove(),this.bulletSet=a.set(),this.freeLabelsSet&&this.freeLabelsSet.remove(),this.freeLabelsSet=a.set(),this.balloonsSet&&this.balloonsSet.remove(),this.balloonsSet=a.set(),this.zoomButtonSet&&this.zoomButtonSet.remove(),this.zoomButtonSet=a.set(),this.linkSet&&this.linkSet.remove(),this.linkSet=a.set(),this.renderFix()):
90
+ g.height=a.style.height;e.position="absolute";f.position="relative";h.appendChild(b);h.appendChild(c);break;case "outside":h.appendChild(b)}else h.appendChild(b);this.listenersAdded||(this.addListeners(),this.listenersAdded=!0);this.initChart()}},createLabelsSet:function(){AmCharts.remove(this.labelsSet);this.labelsSet=this.container.set();this.freeLabelsSet.push(this.labelsSet)},initChart:function(){this.initHC||(AmCharts.callInitHandler(this),this.initHC=!0);AmCharts.applyLang(this.language,this);
91
+ var a=this.numberFormatter;a&&(isNaN(a.precision)||(this.precision=a.precision),void 0!==a.thousandsSeparator&&(this.thousandsSeparator=a.thousandsSeparator),void 0!==a.decimalSeparator&&(this.decimalSeparator=a.decimalSeparator));(a=this.percentFormatter)&&!isNaN(a.precision)&&(this.percentPrecision=a.precision);this.nf={precision:this.precision,thousandsSeparator:this.thousandsSeparator,decimalSeparator:this.decimalSeparator};this.pf={precision:this.percentPrecision,thousandsSeparator:this.thousandsSeparator,
92
+ decimalSeparator:this.decimalSeparator};this.divIsFixed=AmCharts.findIfFixed(this.chartDiv);this.previousHeight=this.divRealHeight;this.previousWidth=this.divRealWidth;this.destroy();this.startInterval();a=0;document.attachEvent&&!window.opera&&(a=1);this.dmouseX=this.dmouseY=0;var b=document.getElementsByTagName("html")[0];b&&window.getComputedStyle&&(b=window.getComputedStyle(b,null))&&(this.dmouseY=AmCharts.removePx(b.getPropertyValue("margin-top")),this.dmouseX=AmCharts.removePx(b.getPropertyValue("margin-left")));
93
+ this.mouseMode=a;(a=this.container)?(a.container.innerHTML="",this.chartDiv.appendChild(a.container),a.setSize(this.realWidth,this.realHeight)):a=new AmCharts.AmDraw(this.chartDiv,this.realWidth,this.realHeight,this);AmCharts.VML||AmCharts.SVG?(a.handDrawn=this.handDrawn,a.handDrawScatter=this.handDrawScatter,a.handDrawThickness=this.handDrawThickness,this.container=a,this.set&&this.set.remove(),this.set=a.set(),this.gridSet&&this.gridSet.remove(),this.gridSet=a.set(),this.cursorLineSet&&this.cursorLineSet.remove(),
94
+ this.cursorLineSet=a.set(),this.graphsBehindSet&&this.graphsBehindSet.remove(),this.graphsBehindSet=a.set(),this.bulletBehindSet&&this.bulletBehindSet.remove(),this.bulletBehindSet=a.set(),this.columnSet&&this.columnSet.remove(),this.columnSet=a.set(),this.graphsSet&&this.graphsSet.remove(),this.graphsSet=a.set(),this.trendLinesSet&&this.trendLinesSet.remove(),this.trendLinesSet=a.set(),this.axesSet&&this.axesSet.remove(),this.axesSet=a.set(),this.cursorSet&&this.cursorSet.remove(),this.cursorSet=
95
+ a.set(),this.scrollbarsSet&&this.scrollbarsSet.remove(),this.scrollbarsSet=a.set(),this.bulletSet&&this.bulletSet.remove(),this.bulletSet=a.set(),this.freeLabelsSet&&this.freeLabelsSet.remove(),this.axesLabelsSet&&this.axesLabelsSet.remove(),this.axesLabelsSet=a.set(),this.freeLabelsSet=a.set(),this.balloonsSet&&this.balloonsSet.remove(),this.balloonsSet=a.set(),this.zoomButtonSet&&this.zoomButtonSet.remove(),this.zoomButtonSet=a.set(),this.linkSet&&this.linkSet.remove(),this.linkSet=a.set(),this.renderFix()):
96
96
  this.fire("failed",{type:"failed",chart:this})},measure:function(){var a=this.div;if(a){var b=this.chartDiv,c=a.offsetWidth,d=a.offsetHeight,e=this.container;a.clientHeight&&(c=a.clientWidth,d=a.clientHeight);var f=AmCharts.removePx(AmCharts.getStyle(a,"padding-left")),g=AmCharts.removePx(AmCharts.getStyle(a,"padding-right")),h=AmCharts.removePx(AmCharts.getStyle(a,"padding-top")),k=AmCharts.removePx(AmCharts.getStyle(a,"padding-bottom"));isNaN(f)||(c-=f);isNaN(g)||(c-=g);isNaN(h)||(d-=h);isNaN(k)||
97
97
  (d-=k);f=a.style;a=f.width;f=f.height;-1!=a.indexOf("px")&&(c=AmCharts.removePx(a));-1!=f.indexOf("px")&&(d=AmCharts.removePx(f));a=AmCharts.toCoordinate(this.width,c);f=AmCharts.toCoordinate(this.height,d);this.balloon=AmCharts.processObject(this.balloon,AmCharts.AmBalloon,this.theme);this.balloon.chart=this;(a!=this.previousWidth||f!=this.previousHeight)&&0<a&&0<f&&(b.style.width=a+"px",b.style.height=f+"px",e&&e.setSize(a,f));this.balloon.setBounds(2,2,a-2,f);this.realWidth=a;this.realHeight=f;
98
98
  this.divRealWidth=c;this.divRealHeight=d}},destroy:function(){this.chartDiv.innerHTML="";this.clearTimeOuts();this.interval&&clearInterval(this.interval);this.interval=NaN},clearTimeOuts:function(){var a=this.timeOuts;if(a){var b;for(b=0;b<a.length;b++)clearTimeout(a[b])}this.timeOuts=[]},clear:function(a){AmCharts.callMethod("clear",[this.chartScrollbar,this.scrollbarV,this.scrollbarH,this.chartCursor]);this.chartCursor=this.scrollbarH=this.scrollbarV=this.chartScrollbar=null;this.clearTimeOuts();
@@ -117,59 +117,60 @@ this;clearInterval(a.interval);a.interval=setInterval(function(){a.updateAnimati
117
117
  if("serial"==this.type||"xy"==this.type)b=this.marginLeftReal,c=this.marginTopReal,d=b+this.plotAreaWidth,e=c+this.plotAreaHeight;var f="http://www.amcharts.com/javascript-charts/",g="JavaScript charts",h="JS chart by amCharts";"ammap"==this.product&&(f="http://www.ammap.com/javascript-maps/",g="Interactive JavaScript maps",h="JS map by amCharts");var k=document.createElement("a"),h=document.createTextNode(h);k.setAttribute("href",f);k.setAttribute("title",g);k.appendChild(h);this.chartDiv.appendChild(k);
118
118
  this.amLink=k;f=k.style;f.position="absolute";f.textDecoration="none";f.color=this.color;f.fontFamily=this.fontFamily;f.fontSize=this.fontSize+"px";f.opacity=.7;f.display="block";var g=k.offsetWidth,k=k.offsetHeight,h=5+b,l=c+5;"bottom-left"==a&&(h=5+b,l=e-k-3);"bottom-right"==a&&(h=d-g-5,l=e-k-3);"top-right"==a&&(h=d-g-5,l=c+5);f.left=h+"px";f.top=l+"px"}}});AmCharts.Slice=AmCharts.Class({construct:function(){}});AmCharts.SerialDataItem=AmCharts.Class({construct:function(){}});
119
119
  AmCharts.GraphDataItem=AmCharts.Class({construct:function(){}});AmCharts.Guide=AmCharts.Class({construct:function(a){this.cname="Guide";AmCharts.applyTheme(this,a,this.cname)}});AmCharts.AmGraph=AmCharts.Class({construct:function(a){this.cname="AmGraph";this.createEvents("rollOverGraphItem","rollOutGraphItem","clickGraphItem","doubleClickGraphItem","rightClickGraphItem","clickGraph","rollOverGraph","rollOutGraph");this.type="line";this.stackable=!0;this.columnCount=1;this.columnIndex=0;this.centerCustomBullets=this.showBalloon=!0;this.maxBulletSize=50;this.minBulletSize=4;this.balloonText="[[value]]";this.hidden=this.scrollbar=this.animationPlayed=!1;this.pointPosition="middle";
120
- this.depthCount=1;this.includeInMinMax=!0;this.negativeBase=0;this.visibleInLegend=!0;this.showAllValueLabels=!1;this.showBulletsAt=this.showBalloonAt="close";this.lineThickness=1;this.dashLength=0;this.connect=!0;this.lineAlpha=1;this.bullet="none";this.bulletBorderThickness=2;this.bulletBorderAlpha=0;this.bulletAlpha=1;this.bulletSize=8;this.hideBulletsCount=this.bulletOffset=0;this.labelPosition="top";this.cornerRadiusTop=0;this.cursorBulletAlpha=1;this.gradientOrientation="vertical";this.dy=this.dx=
121
- 0;this.periodValue="";this.clustered=!0;this.periodSpan=1;this.y=this.x=0;this.switchable=!0;this.tcc=this.minDistance=1;AmCharts.applyTheme(this,a,this.cname)},draw:function(){var a=this.chart;isNaN(this.precision)||(this.numberFormatter?this.numberFormatter.precision=this.precision:this.numberFormatter={precision:this.precision,decimalSeparator:a.decimalSeparator,thousandsSeparator:a.thousandsSeparator});var b=a.container;this.container=b;this.destroy();var c=b.set(),d=b.set();this.behindColumns?
122
- (a.graphsBehindSet.push(c),a.bulletBehindSet.push(d)):(a.graphsSet.push(c),a.bulletSet.push(d));var e=this.bulletAxis;AmCharts.isString(e)&&(this.bulletAxis=a.getValueAxisById(e));this.bulletSet=d;this.scrollbar||(e=a.marginLeftReal,a=a.marginTopReal,c.translate(e,a),d.translate(e,a));b=b.set();AmCharts.remove(this.columnsSet);c.push(b);this.set=c;this.columnsSet=b;this.columnsArray=[];this.ownColumns=[];this.allBullets=[];this.animationArray=[];AmCharts.ifArray(this.data)&&(c=!1,"xy"==this.chart.type?
123
- this.xAxis.axisCreated&&this.yAxis.axisCreated&&(c=!0):this.valueAxis.axisCreated&&(c=!0),!this.hidden&&c&&this.createGraph())},createGraph:function(){var a=this,b=a.chart;"inside"==a.labelPosition&&"column"!=a.type&&(a.labelPosition="bottom");a.startAlpha=b.startAlpha;a.seqAn=b.sequencedAnimation;a.baseCoord=a.valueAxis.baseCoord;void 0===a.fillAlphas&&(a.fillAlphas=0);a.bulletColorR=a.bulletColor;void 0===a.bulletColorR&&(a.bulletColorR=a.lineColorR,a.bulletColorNegative=a.negativeLineColor);void 0===
124
- a.bulletAlpha&&(a.bulletAlpha=a.lineAlpha);clearTimeout(a.playedTO);if(!isNaN(a.valueAxis.min)&&!isNaN(a.valueAxis.max)){switch(b.type){case "serial":a.categoryAxis&&(a.createSerialGraph(),"candlestick"==a.type&&1>a.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=
125
- !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 e;for(e=this.start;e<=this.end;e++){var f=this.data[e].axes[c.id].graphs[this.id],g=f.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(f,g,l,e))||(h=0),k=this.labelText)&&(f=this.createLabel(f,g,l,k),this.allBullets.push(f),this.positionLabel(g,l,f,this.labelPosition,h))}this.drawLineGraph(a,b);this.launchAnimation()},
126
- createRadarGraph:function(){var a=this.valueAxis.stackType,b=[],c=[],d,e,f;for(f=this.start;f<=this.end;f++){var g=this.data[f].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)*f;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,f))||(l=0);var m=this.labelText;
127
- 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(e)&&(e=k)}}b.push(d);c.push(e);this.drawLineGraph(b,c);this.launchAnimation()},positionLabel:function(a,b,c,d,e){var f=c.getBBox();switch(d){case "left":a-=(f.width+e)/2+2;break;case "top":b-=(e+f.height)/2+1;break;case "right":a+=(f.width+e)/2+2;break;case "bottom":b+=(e+f.height)/2+1}c.translate(a,b)},getGradRotation:function(){var a=270;"horizontal"==this.gradientOrientation&&
128
- (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,e=this.chart.container,f=this.valueAxis,g=this.type,h=this.columnWidthReal,k=this.showBulletsAt;isNaN(this.columnWidth)||(h=this.columnWidth);isNaN(h)&&(h=.8);var l=this.useNegativeColorIfDown,m=this.width,n=this.height,p=this.y,q=this.rotate,r=this.columnCount,s=AmCharts.toCoordinate(this.cornerRadiusTop,
129
- h/2),w=this.connect,v=[],t=[],u,x,E,A,z=this.chart.graphs.length,H,F=this.dx/this.tcc,G=this.dy/this.tcc,V=f.stackType,N=this.labelPosition,ia=this.start,da=this.end,ba=this.scrollbar,Sa=this.categoryAxis,na=this.baseCoord,ta=this.negativeBase,L=this.columnIndex,Y=this.lineThickness,$=this.lineAlpha,oa=this.lineColorR,W=this.dashLength,Z=this.set,pa,I=N,D=this.getGradRotation(),aa=this.chart.columnSpacing,S=Sa.cellWidth,Ta=(S*h-r)/r;aa>Ta&&(aa=Ta);var T,y,bb,kb=n+1,lb=m+1,cb=0,mb=0,nb,ob,db,eb,pb=
130
- this.fillColorsR,Da=this.negativeFillColors,wa=this.negativeLineColor,Ua=this.fillAlphas,Va=this.negativeFillAlphas;"object"==typeof Ua&&(Ua=Ua[0]);"object"==typeof Va&&(Va=Va[0]);var fb=f.getCoordinate(f.min);f.logarithmic&&(fb=f.getCoordinate(f.minReal));this.minCoord=fb;this.resetBullet&&(this.bullet="none");if(!(ba||"line"!=g&&"smoothedLine"!=g&&"step"!=g||(1==d.length&&"step"!=g&&"none"==this.bullet&&(this.bullet="round",this.resetBullet=!0),!Da&&void 0==wa||l))){var Na=ta;Na>f.max&&(Na=f.max);
131
- Na<f.min&&(Na=f.min);f.logarithmic&&(Na=f.minReal);var Aa=f.getCoordinate(Na),Hb=f.getCoordinate(f.max);q?(kb=n,lb=Math.abs(Hb-Aa),nb=n,ob=Math.abs(fb-Aa),eb=mb=0,f.reversed?(cb=0,db=Aa):(cb=Aa,db=0)):(lb=m,kb=Math.abs(Hb-Aa),ob=m,nb=Math.abs(fb-Aa),db=cb=0,f.reversed?(eb=p,mb=Aa):eb=Aa+1)}var Ba=Math.round;this.pmx=Ba(cb);this.pmy=Ba(mb);this.pmh=Ba(kb);this.pmw=Ba(lb);this.nmx=Ba(db);this.nmy=Ba(eb);this.nmh=Ba(nb);this.nmw=Ba(ob);AmCharts.isModern||(this.nmy=this.nmx=0,this.nmh=this.height);this.clustered||
132
- (r=1);h="column"==g?(S*h-aa*(r-1))/r:S*h;1>h&&(h=1);var J;if("line"==g||"step"==g||"smoothedLine"==g){if(0<ia){for(J=ia-1;-1<J;J--)if(T=d[J],y=T.axes[f.id].graphs[b],bb=y.values.value,!isNaN(bb)){ia=J;break}if(this.lineColorField)for(J=ia;-1<J;J--)if(T=d[J],y=T.axes[f.id].graphs[b],y.lineColor){this.bulletColorSwitched=this.lineColorSwitched=y.lineColor;break}if(this.fillColorsField)for(J=ia;-1<J;J--)if(T=d[J],y=T.axes[f.id].graphs[b],y.fillColors){this.fillColorsSwitched=y.fillColors;break}if(this.dashLengthField)for(J=
133
- ia;-1<J;J--)if(T=d[J],y=T.axes[f.id].graphs[b],!isNaN(y.dashLength)){this.dashLengthSwitched=y.dashLength;break}}if(da<d.length-1)for(J=da+1;J<d.length;J++)if(T=d[J],y=T.axes[f.id].graphs[b],bb=y.values.value,!isNaN(bb)){da=J;break}}da<d.length-1&&da++;var O=[],P=[],Ea=!1;if("line"==g||"step"==g||"smoothedLine"==g)if(this.stackable&&"regular"==V||"100%"==V||this.fillToGraph)Ea=!0;var Ib=this.noStepRisers,gb=-1E3,hb=-1E3,ib=this.minDistance,Fa=!0,Wa=!1;for(J=ia;J<=da;J++){T=d[J];y=T.axes[f.id].graphs[b];
134
- y.index=J;var Xa,Ga=NaN;if(l&&void 0==this.openField)for(var qb=J+1;qb<d.length&&(!d[qb]||!(Xa=d[J+1].axes[f.id].graphs[b])||!Xa.values||(Ga=Xa.values.value,isNaN(Ga)));qb++);var X,Q,R,ea,la=NaN,C=NaN,B=NaN,M=NaN,K=NaN,Ha=NaN,xa=NaN,Ia=NaN,ya=NaN,ca=NaN,ja=NaN,fa=NaN,ga=NaN,U=NaN,rb=NaN,sb=NaN,ka=NaN,ra=void 0,Ca=pb,Oa=Ua,ua=oa,qa,sa,tb=this.proCandlesticks,Ya=this.pattern;void 0!=y.pattern&&(Ya=y.pattern);void 0!=y.color&&(Ca=y.color);y.fillColors&&(Ca=y.fillColors);isNaN(y.alpha)||(Oa=y.alpha);
135
- isNaN(y.dashLength)||(W=y.dashLength);var va=y.values;f.recalculateToPercents&&(va=y.percents);if(va){U=this.stackable&&"none"!=V&&"3d"!=V?va.close:va.value;if("candlestick"==g||"ohlc"==g)U=va.close,sb=va.low,xa=f.getCoordinate(sb),rb=va.high,ya=f.getCoordinate(rb);ka=va.open;B=f.getCoordinate(U);isNaN(ka)||(K=f.getCoordinate(ka),l&&(Ga=ka,ka=K=NaN));l&&(void 0==this.openField?Xa&&(Xa.isNegative=Ga<U?!0:!1,isNaN(Ga)&&(y.isNegative=!Fa)):y.isNegative=Ga>U?!0:!1);if(!ba)switch(this.showBalloonAt){case "close":y.y=
136
- B;break;case "open":y.y=K;break;case "high":y.y=ya;break;case "low":y.y=xa}var la=T.x[Sa.id],Pa=this.periodSpan-1,ma=Math.floor(S/2)+Math.floor(Pa*S/2),za=ma,Jb=0;"left"==this.stepDirection&&(Jb=(2*S+Pa*S)/2,la-=Jb);"start"==this.pointPosition&&(la-=S/2+Math.floor(Pa*S/2),ma=0,za=Math.floor(S)+Math.floor(Pa*S));"end"==this.pointPosition&&(la+=S/2+Math.floor(Pa*S/2),ma=Math.floor(S)+Math.floor(Pa*S),za=0);if(Ib){var ub=this.columnWidth;isNaN(ub)||(ma*=ub,za*=ub)}ba||(y.x=la);-1E5>la&&(la=-1E5);la>
137
- m+1E5&&(la=m+1E5);q?(C=B,M=K,K=B=la,isNaN(ka)&&!this.fillToGraph&&(M=na),Ha=xa,Ia=ya):(M=C=la,isNaN(ka)&&!this.fillToGraph&&(K=na));if(!tb&&U<ka||tb&&U<pa)y.isNegative=!0,Da&&(Ca=Da),Va&&(Oa=Va),void 0!=wa&&(ua=wa);Wa=!1;isNaN(U)||(l?U>Ga?(Fa&&(Wa=!0),Fa=!1):(Fa||(Wa=!0),Fa=!0):y.isNegative=U<ta?!0:!1,pa=U);switch(g){case "line":if(isNaN(U))w||(this.drawLineGraph(v,t,O,P),v=[],t=[],O=[],P=[]);else{if(Math.abs(C-gb)>=ib||Math.abs(B-hb)>=ib)v.push(C),t.push(B),gb=C,hb=B;ca=C;ja=B;fa=C;ga=B;!Ea||isNaN(K)||
138
- isNaN(M)||(O.push(M),P.push(K));if(Wa||void 0!=y.lineColor||void 0!=y.fillColors||!isNaN(y.dashLength))this.drawLineGraph(v,t,O,P),v=[C],t=[B],O=[],P=[],!Ea||isNaN(K)||isNaN(M)||(O.push(M),P.push(K)),l?Fa?(this.lineColorSwitched=oa,this.fillColorsSwitched=pb):(this.lineColorSwitched=wa,this.fillColorsSwitched=Da):(this.lineColorSwitched=y.lineColor,this.fillColorsSwitched=y.fillColors),this.dashLengthSwitched=y.dashLength;y.gap&&(this.drawLineGraph(v,t,O,P),v=[],t=[],O=[],P=[])}break;case "smoothedLine":if(isNaN(U))w||
139
- (this.drawSmoothedGraph(v,t,O,P),v=[],t=[],O=[],P=[]);else{if(Math.abs(C-gb)>=ib||Math.abs(B-hb)>=ib)v.push(C),t.push(B),gb=C,hb=B;ca=C;ja=B;fa=C;ga=B;!Ea||isNaN(K)||isNaN(M)||(O.push(M),P.push(K));void 0==y.lineColor&&void 0==y.fillColors&&isNaN(y.dashLength)||(this.drawSmoothedGraph(v,t,O,P),v=[C],t=[B],O=[],P=[],!Ea||isNaN(K)||isNaN(M)||(O.push(M),P.push(K)),this.lineColorSwitched=y.lineColor,this.fillColorsSwitched=y.fillColors,this.dashLengthSwitched=y.dashLength);y.gap&&(this.drawSmoothedGraph(v,
140
- t,O,P),v=[],t=[],O=[],P=[])}break;case "step":if(!isNaN(U)){if(void 0==y.lineColor&&void 0==y.fillColors&&isNaN(y.dashLength)||(this.drawLineGraph(v,t,O,P),v=[],t=[],O=[],P=[],this.lineColorSwitched=y.lineColor,this.fillColorsSwitched=y.fillColors,this.dashLengthSwitched=y.dashLength),q?(isNaN(u)||(v.push(u),t.push(B-ma)),t.push(B-ma),v.push(C),t.push(B+za),v.push(C),!Ea||isNaN(K)||isNaN(M)||(O.push(E),P.push(K-ma),O.push(M),P.push(K-ma),O.push(M),P.push(K+za))):(isNaN(x)||(t.push(x),v.push(u),t.push(x),
141
- v.push(C-ma)),v.push(C-ma),t.push(B),v.push(C+za),t.push(B),!Ea||isNaN(K)||isNaN(M)||(O.push(M-ma),P.push(A),O.push(M-ma),P.push(K),O.push(M+za),P.push(K))),u=C,x=B,E=M,A=K,ca=C,ja=B,fa=C,ga=B,Wa&&(this.drawLineGraph(v,t,O,P),v=[],t=[],O=[],P=[],l&&(Fa?(this.lineColorSwitched=oa,this.fillColorsSwitched=pb):(this.lineColorSwitched=wa,this.fillColorsSwitched=Da))),Ib||y.gap)u=x=NaN,this.drawLineGraph(v,t,O,P),v=[],t=[],O=[],P=[]}else if(!w){if(1>=this.periodSpan||1<this.periodSpan&&C-u>ma+za)u=x=NaN;
142
- this.drawLineGraph(v,t,O,P);v=[];t=[];O=[];P=[]}break;case "column":qa=ua;void 0!=y.lineColor&&(qa=y.lineColor);var Kb=this.topRadius;if(!isNaN(U)){l||(y.isNegative=U<ta?!0:!1);y.isNegative&&(Da&&(Ca=Da),void 0!=wa&&(qa=wa));var Lb=f.min,Mb=f.max;if(!(U<Lb&&ka<Lb||U>Mb&&ka>Mb))if(q){"3d"==V?(Q=B-(r/2-this.depthCount+1)*(h+aa)+aa/2+G*L,X=M+F*L):(Q=Math.floor(B-(r/2-L)*(h+aa)+aa/2),X=M);R=h;ca=C;ja=Q+h/2;fa=C;ga=Q+h/2;Q+R>n+L*G&&(R=n-Q+L*G);Q<L*G&&(R+=Q,Q=L*G);ea=C-M;var Yb=X;X=AmCharts.fitToBounds(X,
143
- 0,m);ea+=Yb-X;ea=AmCharts.fitToBounds(ea,-X,m-X+F*L);Q<n&&0<R&&(ra=new AmCharts.Cuboid(e,ea,R,F-a.d3x,G-a.d3y,Ca,Oa,Y,qa,$,D,s,q,W,Ya,Kb),"bottom"!=N&&"inside"!=N&&"middle"!=N&&(N=f.reversed?"left":"right",0>U&&(N=f.reversed?"right":"left")),"regular"==V||"100%"==V)&&(ca+=this.dx)}else{"3d"==V?(X=C-(r/2-this.depthCount+1)*(h+aa)+aa/2+F*L,Q=K+G*L):(X=C-(r/2-L)*(h+aa)+aa/2,Q=K);R=h;ca=X+h/2;ja=B;fa=X+h/2;ga=B;X+R>m+L*F&&(R=m-X+L*F);X<L*F&&(R+=X-L*F,X=L*F);ea=B-K;var Zb=Q;Q=AmCharts.fitToBounds(Q,this.dy,
144
- n);ea+=Zb-Q;ea=AmCharts.fitToBounds(ea,-Q+G*L,n-Q);if(X<m+L*F&&0<R)if(this.showOnAxis&&(Q-=G/2),ra=new AmCharts.Cuboid(e,R,ea,F-a.d3x,G-a.d3y,Ca,Oa,Y,qa,this.lineAlpha,D,s,q,W,Ya,Kb),0>U&&"middle"!=N&&"inside"!=N)N="bottom";else if(N=I,"regular"==V||"100%"==V)ja+=this.dy}if(ra&&(sa=ra.set,y.columnGraphics=sa,sa.translate(X,Q),this.columnsSet.push(sa),(y.url||this.showHandOnHover)&&sa.setAttr("cursor","pointer"),!ba)){"none"==V&&(H=q?(this.end+1-J)*z-c:z*J+c);"3d"==V&&(q?(H=(this.end+1-J)*z-c-1E3*
145
- this.depthCount,ca+=F*this.columnIndex,fa+=F*this.columnIndex,y.y+=F*this.columnIndex):(H=(z-c)*(J+1)+1E3*this.depthCount,ca+=3,ja+=G*this.columnIndex+7,ga+=G*this.columnIndex,y.y+=G*this.columnIndex));if("regular"==V||"100%"==V)"inside"!=N&&(N="middle"),H=q?0<va.value?(this.end+1-J)*z+c:(this.end+1-J)*z-c:0<va.value?z*J+c:z*J-c;this.columnsArray.push({column:ra,depth:H});y.x=q?Q+R/2:X+R/2;this.ownColumns.push(ra);this.animateColumns(ra,J,C,M,B,K);this.addListeners(sa,y)}}break;case "candlestick":if(!isNaN(ka)&&
146
- !isNaN(U)){var jb,vb;qa=ua;void 0!=y.lineColor&&(qa=y.lineColor);if(q){if(Q=B-h/2,X=M,R=h,Q+R>n&&(R=n-Q),0>Q&&(R+=Q,Q=0),Q<n&&0<R){var wb,xb;U>ka?(wb=[C,Ia],xb=[M,Ha]):(wb=[M,Ia],xb=[C,Ha]);!isNaN(Ia)&&!isNaN(Ha)&&B<n&&0<B&&(jb=AmCharts.line(e,wb,[B,B],qa,$,Y),vb=AmCharts.line(e,xb,[B,B],qa,$,Y));ea=C-M;ra=new AmCharts.Cuboid(e,ea,R,F,G,Ca,Ua,Y,qa,$,D,s,q,W,Ya)}}else if(X=C-h/2,Q=K+Y/2,R=h,X+R>m&&(R=m-X),0>X&&(R+=X,X=0),ea=B-K,X<m&&0<R){tb&&U>=ka&&(Oa=0);var ra=new AmCharts.Cuboid(e,R,ea,F,G,Ca,Oa,
147
- Y,qa,$,D,s,q,W,Ya),yb,zb;U>ka?(yb=[B,ya],zb=[K,xa]):(yb=[K,ya],zb=[B,xa]);!isNaN(ya)&&!isNaN(xa)&&C<m&&0<C&&(jb=AmCharts.line(e,[C,C],yb,qa,$,Y),vb=AmCharts.line(e,[C,C],zb,qa,$,Y))}ra&&(sa=ra.set,y.columnGraphics=sa,Z.push(sa),sa.translate(X,Q-Y/2),(y.url||this.showHandOnHover)&&sa.setAttr("cursor","pointer"),jb&&(Z.push(jb),Z.push(vb)),ca=C,ja=B,q?(ga=B,fa=C,"open"==k&&(fa=M),"high"==k&&(fa=Ia),"low"==k&&(fa=Ha)):(ga=B,"open"==k&&(ga=K),"high"==k&&(ga=ya),"low"==k&&(ga=xa),fa=C),ba||(y.x=q?Q+R/
148
- 2:X+R/2,this.animateColumns(ra,J,C,M,B,K),this.addListeners(sa,y)))}break;case "ohlc":if(!(isNaN(ka)||isNaN(rb)||isNaN(sb)||isNaN(U))){U<ka&&(y.isNegative=!0,void 0!=wa&&(ua=wa));var Ab,Bb,Cb;if(q){var Db=B-h/2,Db=AmCharts.fitToBounds(Db,0,n),Nb=AmCharts.fitToBounds(B,0,n),Eb=B+h/2,Eb=AmCharts.fitToBounds(Eb,0,n);Bb=AmCharts.line(e,[M,M],[Db,Nb],ua,$,Y,W);0<B&&B<n&&(Ab=AmCharts.line(e,[Ha,Ia],[B,B],ua,$,Y,W));Cb=AmCharts.line(e,[C,C],[Nb,Eb],ua,$,Y,W);ga=B;fa=C;"open"==k&&(fa=M);"high"==k&&(fa=Ia);
149
- "low"==k&&(fa=Ha)}else{var Fb=C-h/2,Fb=AmCharts.fitToBounds(Fb,0,m),Ob=AmCharts.fitToBounds(C,0,m),Gb=C+h/2,Gb=AmCharts.fitToBounds(Gb,0,m);Bb=AmCharts.line(e,[Fb,Ob],[K,K],ua,$,Y,W);0<C&&C<m&&(Ab=AmCharts.line(e,[C,C],[xa,ya],ua,$,Y,W));Cb=AmCharts.line(e,[Ob,Gb],[B,B],ua,$,Y,W);ga=B;"open"==k&&(ga=K);"high"==k&&(ga=ya);"low"==k&&(ga=xa);fa=C}Z.push(Bb);Z.push(Ab);Z.push(Cb);ca=C;ja=B}}if(!ba&&!isNaN(U)){var Pb=this.hideBulletsCount;if(this.end-this.start<=Pb||0===Pb){var Ja=this.createBullet(y,
150
- fa,ga,J);Ja||(Ja=0);var Qb=this.labelText;if(Qb){var ha=this.createLabel(y,0,0,Qb),Ka=0,La=0,Rb=ha.getBBox(),Qa=Rb.width,Ma=Rb.height;switch(N){case "left":Ka=-(Qa/2+Ja/2+3);break;case "top":La=-(Ma/2+Ja/2+3);break;case "right":Ka=Ja/2+2+Qa/2;break;case "bottom":q&&"column"==g?(ca=na,0>U||0<U&&f.reversed?(Ka=-6,ha.attr({"text-anchor":"end"})):(Ka=6,ha.attr({"text-anchor":"start"}))):(La=Ja/2+Ma/2,ha.x=-(Qa/2+2));break;case "middle":"column"==g&&(q?(La=-(Ma/2)+this.fontSize/2,Ka=-(C-M)/2-F,Math.abs(C-
151
- M)<Qa&&!this.showAllValueLabels&&(ha.remove(),ha=null)):(La=-(B-K)/2-G,Math.abs(B-K)<Ma&&!this.showAllValueLabels&&(ha.remove(),ha=null)));break;case "inside":q?(La=-(Ma/2)+this.fontSize/2,Ka=0>ea?Qa/2+6:-Qa/2-6):La=0>ea?Ma:-Ma}if(ha){if(isNaN(ja)||isNaN(ca))ha.remove(),ha=null;else if(ca+=Ka,ja+=La,ha.translate(ca,ja),q){if(0>ja||ja>n)ha.remove(),ha=null}else{var Sb=0;"3d"==V&&(Sb=F*L);if(0>ca||ca>m+Sb)ha.remove(),ha=null}ha&&this.allBullets.push(ha)}}if("regular"==V||"100%"==V){var Tb=f.totalText;
152
- if(Tb){var Ra=this.createLabel(y,0,0,Tb,f.totalTextColor);this.allBullets.push(Ra);var Ub=Ra.getBBox(),Vb=Ub.width,Wb=Ub.height,Za,$a,Xb=f.totals[J];Xb&&Xb.remove();var ab=0;"column"!=g&&(ab=Ja);q?($a=B,Za=0>U?C-Vb/2-2-ab:C+Vb/2+3+ab):(Za=C,$a=0>U?B+Wb/2+ab:B-Wb/2-3-ab);Ra.translate(Za,$a);f.totals[J]=Ra;q?(0>$a||$a>n)&&Ra.remove():(0>Za||Za>m)&&Ra.remove()}}}}}}if("line"==g||"step"==g||"smoothedLine"==g)"smoothedLine"==g?this.drawSmoothedGraph(v,t,O,P):this.drawLineGraph(v,t,O,P),ba||this.launchAnimation();
153
- this.bulletsHidden&&this.hideBullets()},animateColumns:function(a,b,c,d,e,f){var g=this;c=g.chart.startDuration;0<c&&!g.animationPlayed&&(g.seqAn?(a.set.hide(),g.animationArray.push(a),a=setTimeout(function(){g.animate.call(g)},c/(g.end-g.start+1)*(b-g.start)*1E3),g.timeOuts.push(a)):g.animate(a))},createLabel:function(a,b,c,d,e){var f=this.chart,g=a.labelColor;g||(g=this.color);g||(g=f.color);e&&(g=e);e=this.fontSize;void 0===e&&(this.fontSize=e=f.fontSize);var h=this.labelFunction;d=f.formatString(d,
154
- a);d=AmCharts.cleanFromEmpty(d);h&&(d=h(a,d));a=AmCharts.text(this.container,d,g,f.fontFamily,e);a.node.style.pointerEvents="none";a.translate(b,c);this.bulletSet.push(a);return a},positiveClip:function(a){a.clipRect(this.pmx,this.pmy,this.pmw,this.pmh)},negativeClip:function(a){a.clipRect(this.nmx,this.nmy,this.nmw,this.nmh)},drawLineGraph:function(a,b,c,d){var e=this;if(1<a.length){var f=e.set,g=e.chart,h=e.container,k=h.set(),l=h.set();f.push(l);f.push(k);var m=e.lineAlpha,n=e.lineThickness,f=
155
- e.fillAlphas,p=e.lineColorR,q=e.negativeLineAlpha;isNaN(q)&&(q=m);var r=e.lineColorSwitched;r&&(p=r);var r=e.fillColorsR,s=e.fillColorsSwitched;s&&(r=s);var w=e.dashLength;(s=e.dashLengthSwitched)&&(w=s);var s=e.negativeLineColor,v=e.negativeFillColors,t=e.negativeFillAlphas,u=e.baseCoord;0!==e.negativeBase&&(u=e.valueAxis.getCoordinate(e.negativeBase));m=AmCharts.line(h,a,b,p,m,n,w,!1,!0);k.push(m);k.click(function(a){e.handleGraphEvent(a,"clickGraph")}).mouseover(function(a){e.handleGraphEvent(a,
156
- "rollOverGraph")}).mouseout(function(a){e.handleGraphEvent(a,"rollOutGraph")});void 0===s||e.useNegativeColorIfDown||(n=AmCharts.line(h,a,b,s,q,n,w,!1,!0),l.push(n));if(0<f||0<t)if(n=a.join(";").split(";"),q=b.join(";").split(";"),m=g.type,"serial"==m?0<c.length?(c.reverse(),d.reverse(),n=a.concat(c),q=b.concat(d)):e.rotate?(q.push(q[q.length-1]),n.push(u),q.push(q[0]),n.push(u),q.push(q[0]),n.push(n[0])):(n.push(n[n.length-1]),q.push(u),n.push(n[0]),q.push(u),n.push(a[0]),q.push(q[0])):"xy"==m&&
157
- (b=e.fillToAxis)&&(AmCharts.isString(b)&&(b=g.getValueAxisById(b)),"H"==b.orientation?(u="top"==b.position?0:b.viH,n.push(n[n.length-1]),q.push(u),n.push(n[0]),q.push(u),n.push(a[0]),q.push(q[0])):(u="left"==b.position?0:b.viW,q.push(q[q.length-1]),n.push(u),q.push(q[0]),n.push(u),q.push(q[0]),n.push(n[0]))),a=e.gradientRotation,0<f&&(g=AmCharts.polygon(h,n,q,r,f,1,"#000",0,a),g.pattern(e.pattern),k.push(g)),v||void 0!==s)isNaN(t)&&(t=f),v||(v=s),h=AmCharts.polygon(h,n,q,v,t,1,"#000",0,a),h.pattern(e.pattern),
158
- l.push(h),l.click(function(a){e.handleGraphEvent(a,"clickGraph")}).mouseover(function(a){e.handleGraphEvent(a,"rollOverGraph")}).mouseout(function(a){e.handleGraphEvent(a,"rollOutGraph")});e.applyMask(l,k)}},applyMask:function(a,b){var c=a.length();"serial"!=this.chart.type||this.scrollbar||(this.positiveClip(b),0<c&&this.negativeClip(a))},drawSmoothedGraph:function(a,b,c,d){if(1<a.length){var e=this.set,f=this.container,g=f.set(),h=f.set();e.push(h);e.push(g);var k=this.lineAlpha,l=this.lineThickness,
159
- e=this.dashLength,m=this.fillAlphas,n=this.lineColorR,p=this.fillColorsR,q=this.negativeLineColor,r=this.negativeFillColors,s=this.negativeFillAlphas,w=this.baseCoord,v=this.lineColorSwitched;v&&(n=v);(v=this.fillColorsSwitched)&&(p=v);v=this.negativeLineAlpha;isNaN(v)&&(v=k);k=new AmCharts.Bezier(f,a,b,n,k,l,p,0,e);g.push(k.path);void 0!==q&&(l=new AmCharts.Bezier(f,a,b,q,v,l,p,0,e),h.push(l.path));0<m&&(k=a.join(";").split(";"),n=b.join(";").split(";"),l="",0<c.length?(c.push("M"),d.push("M"),c.reverse(),
160
- d.reverse(),k=a.concat(c),n=b.concat(d)):(this.rotate?(l+=" L"+w+","+b[b.length-1],l+=" L"+w+","+b[0]):(l+=" L"+a[a.length-1]+","+w,l+=" L"+a[0]+","+w),l+=" L"+a[0]+","+b[0]),c=new AmCharts.Bezier(f,k,n,NaN,0,0,p,m,e,l),c.path.pattern(this.pattern),g.push(c.path),r||void 0!==q)&&(s||(s=m),r||(r=q),a=new AmCharts.Bezier(f,a,b,NaN,0,0,r,s,e,l),a.path.pattern(this.pattern),h.push(a.path));this.applyMask(h,g)}},launchAnimation:function(){var a=this,b=a.chart.startDuration;if(0<b&&!a.animationPlayed){var c=
161
- a.set,d=a.bulletSet;AmCharts.VML||(c.attr({opacity:a.startAlpha}),d.attr({opacity:a.startAlpha}));c.hide();d.hide();a.seqAn?(b=setTimeout(function(){a.animateGraphs.call(a)},a.index*b*1E3),a.timeOuts.push(b)):a.animateGraphs()}},animateGraphs:function(){var a=this.chart,b=this.set,c=this.bulletSet,d=this.x,e=this.y;b.show();c.show();var f=a.startDuration,a=a.startEffect;b&&(this.rotate?(b.translate(-1E3,e),c.translate(-1E3,e)):(b.translate(d,-1E3),c.translate(d,-1E3)),b.animate({opacity:1,translate:d+
162
- ","+e},f,a),c.animate({opacity:1,translate:d+","+e},f,a))},animate:function(a){var b=this.chart,c=this.animationArray;!a&&0<c.length&&(a=c[0],c.shift());c=AmCharts[AmCharts.getEffect(b.startEffect)];b=b.startDuration;a&&(this.rotate?a.animateWidth(b,c):a.animateHeight(b,c),a.set.show())},legendKeyColor:function(){var a=this.legendColor,b=this.lineAlpha;void 0===a&&(a=this.lineColorR,0===b&&(b=this.fillColorsR)&&(a="object"==typeof b?b[0]:b));return a},legendKeyAlpha:function(){var a=this.legendAlpha;
163
- void 0===a&&(a=this.lineAlpha,this.fillAlphas>a&&(a=this.fillAlphas),0===a&&(a=this.bulletAlpha),0===a&&(a=1));return a},createBullet:function(a,b,c,d){if(!isNaN(b)&&!isNaN(c)){d=this.container;var e=this.bulletOffset,f=this.bulletSize;isNaN(a.bulletSize)||(f=a.bulletSize);var g=a.values.value,h=this.maxValue,k=this.minValue,l=this.maxBulletSize,m=this.minBulletSize;isNaN(h)||(isNaN(g)||(f=(g-k)/(h-k)*(l-m)+m),k==h&&(f=l));h=f;this.bulletAxis&&(f=a.values.error,isNaN(f)||(g=f),f=this.bulletAxis.stepWidth*
164
- g);f<this.minBulletSize&&(f=this.minBulletSize);this.rotate?b=a.isNegative?b-e:b+e:c=a.isNegative?c+e:c-e;var n,m=this.bulletColorR;a.lineColor&&(this.bulletColorSwitched=a.lineColor);this.bulletColorSwitched&&(m=this.bulletColorSwitched);a.isNegative&&void 0!==this.bulletColorNegative&&(m=this.bulletColorNegative);void 0!==a.color&&(m=a.color);var p;"xy"==this.chart.type&&this.valueField&&(p=this.pattern,a.pattern&&(p=a.pattern));e=this.bullet;a.bullet&&(e=a.bullet);var g=this.bulletBorderThickness,
165
- k=this.bulletBorderColorR,l=this.bulletBorderAlpha,q=this.bulletAlpha;k||(k=m);this.useLineColorForBulletBorder&&(k=this.lineColorR);var r=a.alpha;isNaN(r)||(q=r);if("none"!=this.bullet||a.bullet)n=AmCharts.bullet(d,e,f,m,q,g,k,l,h,0,p);if(this.customBullet||a.customBullet)p=this.customBullet,a.customBullet&&(p=a.customBullet),p&&(n&&n.remove(),"function"==typeof p?(n=new p,n.chart=this.chart,a.bulletConfig&&(n.availableSpace=c,n.graph=this,n.graphDataItem=a,n.bulletY=c,a.bulletConfig.minCoord=this.minCoord-
166
- c,n.bulletConfig=a.bulletConfig),n.write(d),n=n.set):(this.chart.path&&(p=this.chart.path+p),n=d.set(),d=d.image(p,0,0,f,f),n.push(d),this.centerCustomBullets&&d.translate(-f/2,-f/2)));n&&((a.url||this.showHandOnHover)&&n.setAttr("cursor","pointer"),"serial"==this.chart.type&&(0>b-0||b-0>this.width||c<-f/2||c-0>this.height)&&(n.remove(),n=null),n&&(this.bulletSet.push(n),n.translate(b,c),this.addListeners(n,a),this.allBullets.push(n)),a.bx=b,a.by=c);a.bulletGraphics=n;return f}},showBullets:function(){var a=
167
- this.allBullets,b;this.bulletsHidden=!1;for(b=0;b<a.length;b++)a[b].show()},hideBullets:function(){var a=this.allBullets,b;this.bulletsHidden=!0;for(b=0;b<a.length;b++)a[b].hide()},addListeners:function(a,b){var c=this;a.mouseover(function(a){c.handleRollOver(b,a)}).mouseout(function(a){c.handleRollOut(b,a)}).touchend(function(a){c.handleRollOver(b,a);c.chart.panEventsEnabled&&c.handleClick(b,a)}).touchstart(function(a){c.handleRollOver(b,a)}).click(function(a){c.handleClick(b,a)}).dblclick(function(a){c.handleDoubleClick(b,
168
- a)}).contextmenu(function(a){c.handleRightClick(b,a)})},handleRollOver:function(a,b){if(a){var c=this.chart,d={type:"rollOverGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire("rollOverGraphItem",d);c.fire("rollOverGraphItem",d);clearTimeout(c.hoverInt);d=this.showBalloon;c.chartCursor&&"serial"==c.type&&(d=!1,!c.chartCursor.valueBalloonsEnabled&&this.showBalloon&&(d=!0));if(d){var d=c.formatString(this.balloonText,a,!0),e=this.balloonFunction;e&&(d=e(a,a.graph));
169
- d=AmCharts.cleanFromEmpty(d);e=c.getBalloonColor(this,a);c.balloon.showBullet=!1;c.balloon.pointerOrientation="V";var f=a.x,g=a.y;c.rotate&&(f=a.y,g=a.x);c.showBalloon(d,e,!0,f+c.marginLeftReal,g+c.marginTopReal)}}this.handleGraphEvent(b,"rollOverGraph")},handleRollOut:function(a,b){this.chart.hideBalloon();if(a){var c={type:"rollOutGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire("rollOutGraphItem",c);this.chart.fire("rollOutGraphItem",c)}this.handleGraphEvent(b,
170
- "rollOutGraph")},handleClick:function(a,b){if(a){var c={type:"clickGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire("clickGraphItem",c);this.chart.fire("clickGraphItem",c);AmCharts.getURL(a.url,this.urlTarget)}this.handleGraphEvent(b,"clickGraph")},handleGraphEvent:function(a,b){var c={type:b,graph:this,target:this,chart:this.chart,event:a};this.fire(b,c);this.chart.fire(b,c)},handleRightClick:function(a,b){if(a){var c={type:"rightClickGraphItem",item:a,index:a.index,
171
- graph:this,target:this,chart:this.chart,event:b};this.fire("rightClickGraphItem",c);this.chart.fire("rightClickGraphItem",c)}},handleDoubleClick:function(a,b){if(a){var c={type:"doubleClickGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire("doubleClickGraphItem",c);this.chart.fire("doubleClickGraphItem",c)}},zoom:function(a,b){this.start=a;this.end=b;this.draw()},changeOpacity:function(a){var b=this.set;b&&b.setAttr("opacity",a);if(b=this.ownColumns){var c;
172
- for(c=0;c<b.length;c++){var d=b[c].set;d&&d.setAttr("opacity",a)}}(b=this.bulletSet)&&b.setAttr("opacity",a)},destroy:function(){AmCharts.remove(this.set);AmCharts.remove(this.bulletSet);var a=this.timeOuts;if(a){var b;for(b=0;b<a.length;b++)clearTimeout(a[b])}this.timeOuts=[]}});AmCharts.ChartCursor=AmCharts.Class({construct:function(a){this.cname="ChartCursor";this.createEvents("changed","zoomed","onHideCursor","draw","selected","moved");this.enabled=!0;this.cursorAlpha=1;this.selectionAlpha=.2;this.cursorColor="#CC0000";this.categoryBalloonAlpha=1;this.color="#FFFFFF";this.type="cursor";this.zoomed=!1;this.zoomable=!0;this.pan=!1;this.categoryBalloonDateFormat="MMM DD, YYYY";this.categoryBalloonEnabled=this.valueBalloonsEnabled=!0;this.rolledOver=!1;this.cursorPosition=
120
+ this.depthCount=1;this.includeInMinMax=!0;this.negativeBase=0;this.visibleInLegend=!0;this.showAllValueLabels=!1;this.showBulletsAt=this.showBalloonAt="close";this.lineThickness=1;this.dashLength=0;this.connect=!0;this.lineAlpha=1;this.bullet="none";this.bulletBorderThickness=2;this.bulletBorderAlpha=0;this.bulletAlpha=1;this.bulletSize=8;this.cornerRadiusTop=this.hideBulletsCount=this.bulletOffset=0;this.cursorBulletAlpha=1;this.gradientOrientation="vertical";this.dy=this.dx=0;this.periodValue="";
121
+ this.clustered=!0;this.periodSpan=1;this.y=this.x=0;this.switchable=!0;this.tcc=this.minDistance=1;this.labelRotation=0;this.labelAnchor="auto";this.labelOffset=3;AmCharts.applyTheme(this,a,this.cname)},draw:function(){var a=this.chart,b=this.chart.type;isNaN(this.precision)||(this.numberFormatter?this.numberFormatter.precision=this.precision:this.numberFormatter={precision:this.precision,decimalSeparator:a.decimalSeparator,thousandsSeparator:a.thousandsSeparator});var c=a.container;this.container=
122
+ c;this.destroy();var d=c.set(),e=c.set();this.behindColumns?(a.graphsBehindSet.push(d),a.bulletBehindSet.push(e)):(a.graphsSet.push(d),a.bulletSet.push(e));var f=this.bulletAxis;AmCharts.isString(f)&&(this.bulletAxis=a.getValueAxisById(f));this.bulletSet=e;if(!this.scrollbar){var f=a.marginLeftReal,g=a.marginTopReal;d.translate(f,g);e.translate(f,g)}c=c.set();AmCharts.remove(this.columnsSet);d.push(c);this.set=d;this.columnsSet=c;this.columnsArray=[];this.ownColumns=[];this.allBullets=[];this.animationArray=
123
+ [];d=this.labelPosition;d||(c=this.valueAxis.stackType,d="top","column"==this.type&&(a.rotate&&(d="right"),"100%"==c||"regular"==c)&&(d="middle"),this.labelPosition=d);AmCharts.ifArray(this.data)&&(a=!1,"xy"==b?this.xAxis.axisCreated&&this.yAxis.axisCreated&&(a=!0):this.valueAxis.axisCreated&&(a=!0),!this.hidden&&a&&this.createGraph())},createGraph:function(){var a=this,b=a.chart;a.startAlpha=b.startAlpha;a.seqAn=b.sequencedAnimation;a.baseCoord=a.valueAxis.baseCoord;void 0===a.fillAlphas&&(a.fillAlphas=
124
+ 0);a.bulletColorR=a.bulletColor;void 0===a.bulletColorR&&(a.bulletColorR=a.lineColorR,a.bulletColorNegative=a.negativeLineColor);void 0===a.bulletAlpha&&(a.bulletAlpha=a.lineAlpha);clearTimeout(a.playedTO);if(!isNaN(a.valueAxis.min)&&!isNaN(a.valueAxis.max)){switch(b.type){case "serial":a.categoryAxis&&(a.createSerialGraph(),"candlestick"==a.type&&1>a.valueAxis.minMaxMultiplier&&a.positiveClip(a.set));break;case "radar":a.createRadarGraph();break;case "xy":a.createXYGraph(),a.positiveClip(a.set)}a.playedTO=
125
+ 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 e;for(e=this.start;e<=this.end;e++){var f=this.data[e].axes[c.id].graphs[this.id],g=f.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(f,g,l,e),k=this.labelText)&&(f=this.createLabel(f,
126
+ g,l,k),this.positionLabel(g,l,f,h),this.allBullets.push(f))}this.drawLineGraph(a,b);this.launchAnimation()},createRadarGraph:function(){var a=this.valueAxis.stackType,b=[],c=[],d,e,f;for(f=this.start;f<=this.end;f++){var g=this.data[f].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)*f;h=k*Math.sin(l/180*Math.PI);
127
+ k*=Math.cos(l/180*Math.PI);b.push(h);c.push(k);var l=this.createBullet(g,h,k,f),m=this.labelText;m&&(g=this.createLabel(g,h,k,m),this.positionLabel(h,k,g,l),this.allBullets.push(g));isNaN(d)&&(d=h);isNaN(e)&&(e=k)}}b.push(d);c.push(e);this.drawLineGraph(b,c);this.launchAnimation()},positionLabel:function(a,b,c,d,e,f){fontSize=this.fontSize;lA="middle";lR=0;lC=!1;lP=this.labelPosition;lBB=c.getBBox();cBB=null;graphDataItem=d.graphDataItem;isRotated=this.chart.rotate;isNegative=graphDataItem.isNegative;
128
+ void 0===fontSize&&(fontSize=this.chart.fontSize);b-=lBB.height/4/2;switch(lP){case "top":lP=isRotated?"top":isNegative?"bottom":"top";break;case "right":lP=isRotated?isNegative?"left":"right":"right";break;case "bottom":lP=isRotated?"bottom":isNegative?"top":"bottom";break;case "left":lP=isRotated?isNegative?"right":"left":"left"}e=graphDataItem.columnGraphics;var g=f=0;e&&(f=e.x,g=e.y);switch(lP){case "top":b-=d.size/2+lBB.height/2+this.labelOffset;break;case "right":lA="start";a+=d.size/2+this.labelOffset;
129
+ break;case "bottom":b+=d.size/2+lBB.height/2+this.labelOffset;break;case "left":lA="end";a-=d.size/2+this.labelOffset;break;case "inside":"column"==this.type&&(lC=!0,isRotated?isNegative?(lA="end",a=f-3-this.labelOffset):(lA="start",a=f+3+this.labelOffset):b=isNegative?g+7+this.labelOffset:g-10-this.labelOffset);break;case "middle":"column"==this.type&&(lC=!0,isRotated?a-=(a-f)/2+this.labelOffset-3:b-=(b-g)/2+this.labelOffset-3)}"auto"!=this.labelAnchor&&(lA=this.labelAnchor);c.attr({"text-anchor":lA});
130
+ this.labelRotation&&c.rotate(this.labelRotation);c.translate(a,b);lBB=c.getBBox();e&&lC&&(lBB.height>graphDataItem.columnHeight||lBB.width>graphDataItem.columnWidth)&&(c.remove(),c=!1);if(c&&"serial"==this.chart.type)if(isRotated){if(0>b||b>this.height)c.remove(),c=!1}else if(0>a||a>this.width)c.remove(),c=!1;return c},getGradRotation:function(){var a=270;"horizontal"==this.gradientOrientation&&(a=0);return this.gradientRotation=a},createSerialGraph:function(){this.dashLengthSwitched=this.fillColorsSwitched=
131
+ this.lineColorSwitched=void 0;var a=this.chart,b=this.id,c=this.index,d=this.data,e=this.chart.container,f=this.valueAxis,g=this.type,h=this.columnWidthReal,k=this.showBulletsAt;isNaN(this.columnWidth)||(h=this.columnWidth);isNaN(h)&&(h=.8);var l=this.useNegativeColorIfDown,m=this.width,n=this.height,p=this.y,q=this.rotate,r=this.columnCount,s=AmCharts.toCoordinate(this.cornerRadiusTop,h/2),w=this.connect,v=[],t=[],u,x,F,B,z=this.chart.graphs.length,I,E=this.dx/this.tcc,H=this.dy/this.tcc,V=f.stackType,
132
+ T=this.start,fa=this.end,aa=this.scrollbar,ga=this.categoryAxis,Na=this.baseCoord,ma=this.negativeBase,ba=this.columnIndex,Q=this.lineThickness,X=this.lineAlpha,na=this.lineColorR,$=this.dashLength,W=this.set,Y,ja=this.getGradRotation(),G=this.chart.columnSpacing,A=ga.cellWidth,ka=(A*h-r)/r;G>ka&&(G=ka);var S,y,Z,eb=n+1,fb=m+1,Wa=0,gb=0,hb,ib,Xa,Ya,jb=this.fillColorsR,Da=this.negativeFillColors,wa=this.negativeLineColor,Oa=this.fillAlphas,Pa=this.negativeFillAlphas;"object"==typeof Oa&&(Oa=Oa[0]);
133
+ "object"==typeof Pa&&(Pa=Pa[0]);var Za=f.getCoordinate(f.min);f.logarithmic&&(Za=f.getCoordinate(f.minReal));this.minCoord=Za;this.resetBullet&&(this.bullet="none");if(!(aa||"line"!=g&&"smoothedLine"!=g&&"step"!=g||(1==d.length&&"step"!=g&&"none"==this.bullet&&(this.bullet="round",this.resetBullet=!0),!Da&&void 0==wa||l))){var Ja=ma;Ja>f.max&&(Ja=f.max);Ja<f.min&&(Ja=f.min);f.logarithmic&&(Ja=f.minReal);var Aa=f.getCoordinate(Ja),Cb=f.getCoordinate(f.max);q?(eb=n,fb=Math.abs(Cb-Aa),hb=n,ib=Math.abs(Za-
134
+ Aa),Ya=gb=0,f.reversed?(Wa=0,Xa=Aa):(Wa=Aa,Xa=0)):(fb=m,eb=Math.abs(Cb-Aa),ib=m,hb=Math.abs(Za-Aa),Xa=Wa=0,f.reversed?(Ya=p,gb=Aa):Ya=Aa+1)}var Ba=Math.round;this.pmx=Ba(Wa);this.pmy=Ba(gb);this.pmh=Ba(eb);this.pmw=Ba(fb);this.nmx=Ba(Xa);this.nmy=Ba(Ya);this.nmh=Ba(hb);this.nmw=Ba(ib);AmCharts.isModern||(this.nmy=this.nmx=0,this.nmh=this.height);this.clustered||(r=1);h="column"==g?(A*h-G*(r-1))/r:A*h;1>h&&(h=1);var J;if("line"==g||"step"==g||"smoothedLine"==g){if(0<T){for(J=T-1;-1<J;J--)if(S=d[J],
135
+ y=S.axes[f.id].graphs[b],Z=y.values.value,!isNaN(Z)){T=J;break}if(this.lineColorField)for(J=T;-1<J;J--)if(S=d[J],y=S.axes[f.id].graphs[b],y.lineColor){this.bulletColorSwitched=this.lineColorSwitched=y.lineColor;break}if(this.fillColorsField)for(J=T;-1<J;J--)if(S=d[J],y=S.axes[f.id].graphs[b],y.fillColors){this.fillColorsSwitched=y.fillColors;break}if(this.dashLengthField)for(J=T;-1<J;J--)if(S=d[J],y=S.axes[f.id].graphs[b],!isNaN(y.dashLength)){this.dashLengthSwitched=y.dashLength;break}}if(fa<d.length-
136
+ 1)for(J=fa+1;J<d.length;J++)if(S=d[J],y=S.axes[f.id].graphs[b],Z=y.values.value,!isNaN(Z)){fa=J;break}}fa<d.length-1&&fa++;var N=[],O=[],Ea=!1;if("line"==g||"step"==g||"smoothedLine"==g)if(this.stackable&&"regular"==V||"100%"==V||this.fillToGraph)Ea=!0;var Db=this.noStepRisers,$a=-1E3,ab=-1E3,bb=this.minDistance,Fa=!0,Qa=!1;for(J=T;J<=fa;J++){S=d[J];y=S.axes[f.id].graphs[b];y.index=J;var Ra,Ga=NaN;if(l&&void 0==this.openField)for(var kb=J+1;kb<d.length&&(!d[kb]||!(Ra=d[J+1].axes[f.id].graphs[b])||
137
+ !Ra.values||(Ga=Ra.values.value,isNaN(Ga)));kb++);var R,P,L,ca,ha=NaN,D=NaN,C=NaN,M=NaN,K=NaN,Ha=NaN,xa=NaN,Ia=NaN,ya=NaN,sa=NaN,ta=NaN,da=NaN,ea=NaN,U=NaN,lb=NaN,mb=NaN,ia=NaN,qa=void 0,Ca=jb,Ka=Oa,ua=na,oa,ra,nb=this.proCandlesticks,Sa=this.pattern;void 0!=y.pattern&&(Sa=y.pattern);void 0!=y.color&&(Ca=y.color);y.fillColors&&(Ca=y.fillColors);isNaN(y.alpha)||(Ka=y.alpha);isNaN(y.dashLength)||($=y.dashLength);var va=y.values;f.recalculateToPercents&&(va=y.percents);if(va){U=this.stackable&&"none"!=
138
+ V&&"3d"!=V?va.close:va.value;if("candlestick"==g||"ohlc"==g)U=va.close,mb=va.low,xa=f.getCoordinate(mb),lb=va.high,ya=f.getCoordinate(lb);ia=va.open;C=f.getCoordinate(U);isNaN(ia)||(K=f.getCoordinate(ia),l&&(Ga=ia,ia=K=NaN));l&&(void 0==this.openField?Ra&&(Ra.isNegative=Ga<U?!0:!1,isNaN(Ga)&&(y.isNegative=!Fa)):y.isNegative=Ga>U?!0:!1);if(!aa)switch(this.showBalloonAt){case "close":y.y=C;break;case "open":y.y=K;break;case "high":y.y=ya;break;case "low":y.y=xa}var ha=S.x[ga.id],La=this.periodSpan-
139
+ 1,la=Math.floor(A/2)+Math.floor(La*A/2),za=la,cb=0;"left"==this.stepDirection&&(cb=(2*A+La*A)/2,ha-=cb);"center"==this.stepDirection&&(cb=A/2,ha-=cb);"start"==this.pointPosition&&(ha-=A/2+Math.floor(La*A/2),la=0,za=Math.floor(A)+Math.floor(La*A));"end"==this.pointPosition&&(ha+=A/2+Math.floor(La*A/2),la=Math.floor(A)+Math.floor(La*A),za=0);if(Db){var ob=this.columnWidth;isNaN(ob)||(la*=ob,za*=ob)}aa||(y.x=ha);-1E5>ha&&(ha=-1E5);ha>m+1E5&&(ha=m+1E5);q?(D=C,M=K,K=C=ha,isNaN(ia)&&!this.fillToGraph&&
140
+ (M=Na),Ha=xa,Ia=ya):(M=D=ha,isNaN(ia)&&!this.fillToGraph&&(K=Na));if(!nb&&U<ia||nb&&U<Y)y.isNegative=!0,Da&&(Ca=Da),Pa&&(Ka=Pa),void 0!=wa&&(ua=wa);Qa=!1;isNaN(U)||(l?U>Ga?(Fa&&(Qa=!0),Fa=!1):(Fa||(Qa=!0),Fa=!0):y.isNegative=U<ma?!0:!1,Y=U);switch(g){case "line":if(isNaN(U))w||(this.drawLineGraph(v,t,N,O),v=[],t=[],N=[],O=[]);else{if(Math.abs(D-$a)>=bb||Math.abs(C-ab)>=bb)v.push(D),t.push(C),$a=D,ab=C;sa=D;ta=C;da=D;ea=C;!Ea||isNaN(K)||isNaN(M)||(N.push(M),O.push(K));if(Qa||void 0!=y.lineColor||void 0!=
141
+ y.fillColors||!isNaN(y.dashLength))this.drawLineGraph(v,t,N,O),v=[D],t=[C],N=[],O=[],!Ea||isNaN(K)||isNaN(M)||(N.push(M),O.push(K)),l?Fa?(this.lineColorSwitched=na,this.fillColorsSwitched=jb):(this.lineColorSwitched=wa,this.fillColorsSwitched=Da):(this.lineColorSwitched=y.lineColor,this.fillColorsSwitched=y.fillColors),this.dashLengthSwitched=y.dashLength;y.gap&&(this.drawLineGraph(v,t,N,O),v=[],t=[],N=[],O=[])}break;case "smoothedLine":if(isNaN(U))w||(this.drawSmoothedGraph(v,t,N,O),v=[],t=[],N=
142
+ [],O=[]);else{if(Math.abs(D-$a)>=bb||Math.abs(C-ab)>=bb)v.push(D),t.push(C),$a=D,ab=C;sa=D;ta=C;da=D;ea=C;!Ea||isNaN(K)||isNaN(M)||(N.push(M),O.push(K));void 0==y.lineColor&&void 0==y.fillColors&&isNaN(y.dashLength)||(this.drawSmoothedGraph(v,t,N,O),v=[D],t=[C],N=[],O=[],!Ea||isNaN(K)||isNaN(M)||(N.push(M),O.push(K)),this.lineColorSwitched=y.lineColor,this.fillColorsSwitched=y.fillColors,this.dashLengthSwitched=y.dashLength);y.gap&&(this.drawSmoothedGraph(v,t,N,O),v=[],t=[],N=[],O=[])}break;case "step":if(!isNaN(U)){if(void 0==
143
+ y.lineColor&&void 0==y.fillColors&&isNaN(y.dashLength)||(this.drawLineGraph(v,t,N,O),v=[],t=[],N=[],O=[],this.lineColorSwitched=y.lineColor,this.fillColorsSwitched=y.fillColors,this.dashLengthSwitched=y.dashLength),q?(isNaN(u)||(v.push(u),t.push(C-la)),t.push(C-la),v.push(D),t.push(C+za),v.push(D),!Ea||isNaN(K)||isNaN(M)||(N.push(F),O.push(K-la),N.push(M),O.push(K-la),N.push(M),O.push(K+za))):(isNaN(x)||(t.push(x),v.push(u),t.push(x),v.push(D-la)),v.push(D-la),t.push(C),v.push(D+za),t.push(C),!Ea||
144
+ isNaN(K)||isNaN(M)||(N.push(M-la),O.push(B),N.push(M-la),O.push(K),N.push(M+za),O.push(K))),u=D,x=C,F=M,B=K,sa=D,ta=C,da=D,ea=C,Qa&&(this.drawLineGraph(v,t,N,O),v=[],t=[],N=[],O=[],l&&(Fa?(this.lineColorSwitched=na,this.fillColorsSwitched=jb):(this.lineColorSwitched=wa,this.fillColorsSwitched=Da))),Db||y.gap)u=x=NaN,this.drawLineGraph(v,t,N,O),v=[],t=[],N=[],O=[]}else if(!w){if(1>=this.periodSpan||1<this.periodSpan&&D-u>la+za)u=x=NaN;this.drawLineGraph(v,t,N,O);v=[];t=[];N=[];O=[]}break;case "column":oa=
145
+ ua;void 0!=y.lineColor&&(oa=y.lineColor);var Eb=this.topRadius;if(!isNaN(U)){l||(y.isNegative=U<ma?!0:!1);y.isNegative&&(Da&&(Ca=Da),void 0!=wa&&(oa=wa));var Fb=f.min,Gb=f.max;if(!(U<Fb&&ia<Fb||U>Gb&&ia>Gb)){var pa;if(q){"3d"==V?(P=C-(r/2-this.depthCount+1)*(h+G)+G/2+H*ba,R=M+E*ba,pa=ba):(P=Math.floor(C-(r/2-ba)*(h+G)+G/2),R=M,pa=0);L=h;sa=D;ta=P+h/2;isNaN(M)||M>D&&!y.isNegative&&(sa=M);da=D;ea=P+h/2;P+L>n+pa*H&&(L=n-P+pa*H);P<pa*H&&(L+=P,P=pa*H);ca=D-M;var Qb=R;R=AmCharts.fitToBounds(R,0,m);ca+=
146
+ Qb-R;ca=AmCharts.fitToBounds(ca,-R,m-R+E*ba);P<n&&0<L&&(qa=new AmCharts.Cuboid(e,ca,L,E-a.d3x,H-a.d3y,Ca,Ka,Q,oa,X,ja,s,q,$,Sa,Eb),y.columnWidth=Math.abs(ca),y.columnHeight=Math.abs(L))}else{"3d"==V?(R=D-(r/2-this.depthCount+1)*(h+G)+G/2+E*ba,P=K+H*ba,pa=ba):(R=D-(r/2-ba)*(h+G)+G/2,P=K,pa=0);L=h;sa=R+h/2;ta=C;isNaN(K)||K<C&&!y.isNegative&&(ta=K);da=R+h/2;ea=C;R+L>m+pa*E&&(L=m-R+pa*E);R<pa*E&&(L+=R-pa*E,R=pa*E);ca=C-K;var Rb=P;P=AmCharts.fitToBounds(P,this.dy,n);ca+=Rb-P;ca=AmCharts.fitToBounds(ca,
147
+ -P+H*ba,n-P);R<m+ba*E&&0<L&&(this.showOnAxis&&(P-=H/2),qa=new AmCharts.Cuboid(e,L,ca,E-a.d3x,H-a.d3y,Ca,Ka,Q,oa,this.lineAlpha,ja,s,q,$,Sa,Eb),y.columnHeight=Math.abs(ca),y.columnWidth=Math.abs(L))}}if(qa&&(ra=qa.set,y.columnGraphics=ra,ra.translate(R,P),this.columnsSet.push(ra),(y.url||this.showHandOnHover)&&ra.setAttr("cursor","pointer"),!aa)){"none"==V&&(I=q?(this.end+1-J)*z-c:z*J+c);"3d"==V&&(q?(I=(this.end+1-J)*z-c-1E3*this.depthCount,sa+=E*this.columnIndex,da+=E*this.columnIndex,y.y+=E*this.columnIndex):
148
+ (I=(z-c)*(J+1)+1E3*this.depthCount,ta+=H*this.columnIndex,ea+=H*this.columnIndex,y.y+=H*this.columnIndex));if("regular"==V||"100%"==V)I=q?0<va.value?(this.end+1-J)*z+c:(this.end+1-J)*z-c:0<va.value?z*J+c:z*J-c;this.columnsArray.push({column:qa,depth:I});y.x=q?P+L/2:R+L/2;this.ownColumns.push(qa);this.animateColumns(qa,J,D,M,C,K);this.addListeners(ra,y)}}break;case "candlestick":if(!isNaN(ia)&&!isNaN(U)){var db,pb;oa=ua;void 0!=y.lineColor&&(oa=y.lineColor);if(q){if(P=C-h/2,R=M,L=h,P+L>n&&(L=n-P),
149
+ 0>P&&(L+=P,P=0),P<n&&0<L){var qb,rb;U>ia?(qb=[D,Ia],rb=[M,Ha]):(qb=[M,Ia],rb=[D,Ha]);!isNaN(Ia)&&!isNaN(Ha)&&C<n&&0<C&&(db=AmCharts.line(e,qb,[C,C],oa,X,Q),pb=AmCharts.line(e,rb,[C,C],oa,X,Q));ca=D-M;qa=new AmCharts.Cuboid(e,ca,L,E,H,Ca,Oa,Q,oa,X,ja,s,q,$,Sa)}}else if(R=D-h/2,P=K+Q/2,L=h,R+L>m&&(L=m-R),0>R&&(L+=R,R=0),ca=C-K,R<m&&0<L){nb&&U>=ia&&(Ka=0);var qa=new AmCharts.Cuboid(e,L,ca,E,H,Ca,Ka,Q,oa,X,ja,s,q,$,Sa),sb,tb;U>ia?(sb=[C,ya],tb=[K,xa]):(sb=[K,ya],tb=[C,xa]);!isNaN(ya)&&!isNaN(xa)&&D<m&&
150
+ 0<D&&(db=AmCharts.line(e,[D,D],sb,oa,X,Q),pb=AmCharts.line(e,[D,D],tb,oa,X,Q))}qa&&(ra=qa.set,y.columnGraphics=ra,W.push(ra),ra.translate(R,P-Q/2),(y.url||this.showHandOnHover)&&ra.setAttr("cursor","pointer"),db&&(W.push(db),W.push(pb)),sa=D,ta=C,q?(ea=C,da=D,"open"==k&&(da=M),"high"==k&&(da=Ia),"low"==k&&(da=Ha)):(ea=C,"open"==k&&(ea=K),"high"==k&&(ea=ya),"low"==k&&(ea=xa),da=D),aa||(y.x=q?P+L/2:R+L/2,this.animateColumns(qa,J,D,M,C,K),this.addListeners(ra,y)))}break;case "ohlc":if(!(isNaN(ia)||isNaN(lb)||
151
+ isNaN(mb)||isNaN(U))){U<ia&&(y.isNegative=!0,void 0!=wa&&(ua=wa));var ub,vb,wb;if(q){var xb=C-h/2,xb=AmCharts.fitToBounds(xb,0,n),Hb=AmCharts.fitToBounds(C,0,n),yb=C+h/2,yb=AmCharts.fitToBounds(yb,0,n);vb=AmCharts.line(e,[M,M],[xb,Hb],ua,X,Q,$);0<C&&C<n&&(ub=AmCharts.line(e,[Ha,Ia],[C,C],ua,X,Q,$));wb=AmCharts.line(e,[D,D],[Hb,yb],ua,X,Q,$);ea=C;da=D;"open"==k&&(da=M);"high"==k&&(da=Ia);"low"==k&&(da=Ha)}else{var zb=D-h/2,zb=AmCharts.fitToBounds(zb,0,m),Ib=AmCharts.fitToBounds(D,0,m),Ab=D+h/2,Ab=
152
+ AmCharts.fitToBounds(Ab,0,m);vb=AmCharts.line(e,[zb,Ib],[K,K],ua,X,Q,$);0<D&&D<m&&(ub=AmCharts.line(e,[D,D],[xa,ya],ua,X,Q,$));wb=AmCharts.line(e,[Ib,Ab],[C,C],ua,X,Q,$);ea=C;"open"==k&&(ea=K);"high"==k&&(ea=ya);"low"==k&&(ea=xa);da=D}W.push(vb);W.push(ub);W.push(wb);sa=D;ta=C}}if(!aa&&!isNaN(U)){var Jb=this.hideBulletsCount;if(this.end-this.start<=Jb||0===Jb){var Sb=this.createBullet(y,da,ea,J),Kb=this.labelText;if(Kb){var Bb=this.createLabel(y,da,ea,Kb);(Bb=this.positionLabel(sa,ta,Bb,Sb,L,ca))&&
153
+ this.allBullets.push(Bb)}if("regular"==V||"100%"==V){var Lb=f.totalText;if(Lb){var Ma=this.createLabel(y,0,0,Lb,f.totalTextColor);this.allBullets.push(Ma);var Mb=Ma.getBBox(),Nb=Mb.width,Ob=Mb.height,Ta,Ua,Pb=f.totals[J];Pb&&Pb.remove();var Va=0;"column"!=g&&(Va=bulletSize);q?(Ua=C,Ta=0>U?D-Nb/2-2-Va:D+Nb/2+3+Va):(Ta=D,Ua=0>U?C+Ob/2+Va:C-Ob/2-3-Va);Ma.translate(Ta,Ua);f.totals[J]=Ma;q?(0>Ua||Ua>n)&&Ma.remove():(0>Ta||Ta>m)&&Ma.remove()}}}}}}if("line"==g||"step"==g||"smoothedLine"==g)"smoothedLine"==
154
+ g?this.drawSmoothedGraph(v,t,N,O):this.drawLineGraph(v,t,N,O),aa||this.launchAnimation();this.bulletsHidden&&this.hideBullets()},animateColumns:function(a,b,c,d,e,f){var g=this;c=g.chart.startDuration;0<c&&!g.animationPlayed&&(g.seqAn?(a.set.hide(),g.animationArray.push(a),a=setTimeout(function(){g.animate.call(g)},c/(g.end-g.start+1)*(b-g.start)*1E3),g.timeOuts.push(a)):g.animate(a))},createLabel:function(a,b,c,d,e){var f=this.chart,g=a.labelColor;g||(g=this.color);g||(g=f.color);e&&(g=e);e=this.fontSize;
155
+ void 0===e&&(this.fontSize=e=f.fontSize);var h=this.labelFunction;d=f.formatString(d,a);d=AmCharts.cleanFromEmpty(d);h&&(d=h(a,d));a=AmCharts.text(this.container,d,g,f.fontFamily,e);a.node.style.pointerEvents="none";a.translate(b,c);this.bulletSet.push(a);return a},positiveClip:function(a){a.clipRect(this.pmx,this.pmy,this.pmw,this.pmh)},negativeClip:function(a){a.clipRect(this.nmx,this.nmy,this.nmw,this.nmh)},drawLineGraph:function(a,b,c,d){var e=this;if(1<a.length){var f=e.set,g=e.chart,h=e.container,
156
+ k=h.set(),l=h.set();f.push(l);f.push(k);var m=e.lineAlpha,n=e.lineThickness,f=e.fillAlphas,p=e.lineColorR,q=e.negativeLineAlpha;isNaN(q)&&(q=m);var r=e.lineColorSwitched;r&&(p=r);var r=e.fillColorsR,s=e.fillColorsSwitched;s&&(r=s);var w=e.dashLength;(s=e.dashLengthSwitched)&&(w=s);var s=e.negativeLineColor,v=e.negativeFillColors,t=e.negativeFillAlphas,u=e.baseCoord;0!==e.negativeBase&&(u=e.valueAxis.getCoordinate(e.negativeBase));m=AmCharts.line(h,a,b,p,m,n,w,!1,!0);k.push(m);k.click(function(a){e.handleGraphEvent(a,
157
+ "clickGraph")}).mouseover(function(a){e.handleGraphEvent(a,"rollOverGraph")}).mouseout(function(a){e.handleGraphEvent(a,"rollOutGraph")});void 0===s||e.useNegativeColorIfDown||(n=AmCharts.line(h,a,b,s,q,n,w,!1,!0),l.push(n));if(0<f||0<t)if(n=a.join(";").split(";"),q=b.join(";").split(";"),m=g.type,"serial"==m?0<c.length?(c.reverse(),d.reverse(),n=a.concat(c),q=b.concat(d)):e.rotate?(q.push(q[q.length-1]),n.push(u),q.push(q[0]),n.push(u),q.push(q[0]),n.push(n[0])):(n.push(n[n.length-1]),q.push(u),
158
+ n.push(n[0]),q.push(u),n.push(a[0]),q.push(q[0])):"xy"==m&&(b=e.fillToAxis)&&(AmCharts.isString(b)&&(b=g.getValueAxisById(b)),"H"==b.orientation?(u="top"==b.position?0:b.viH,n.push(n[n.length-1]),q.push(u),n.push(n[0]),q.push(u),n.push(a[0]),q.push(q[0])):(u="left"==b.position?0:b.viW,q.push(q[q.length-1]),n.push(u),q.push(q[0]),n.push(u),q.push(q[0]),n.push(n[0]))),a=e.gradientRotation,0<f&&(g=AmCharts.polygon(h,n,q,r,f,1,"#000",0,a),g.pattern(e.pattern),k.push(g)),v||void 0!==s)isNaN(t)&&(t=f),
159
+ v||(v=s),h=AmCharts.polygon(h,n,q,v,t,1,"#000",0,a),h.pattern(e.pattern),l.push(h),l.click(function(a){e.handleGraphEvent(a,"clickGraph")}).mouseover(function(a){e.handleGraphEvent(a,"rollOverGraph")}).mouseout(function(a){e.handleGraphEvent(a,"rollOutGraph")});e.applyMask(l,k)}},applyMask:function(a,b){var c=a.length();"serial"!=this.chart.type||this.scrollbar||(this.positiveClip(b),0<c&&this.negativeClip(a))},drawSmoothedGraph:function(a,b,c,d){if(1<a.length){var e=this.set,f=this.container,g=f.set(),
160
+ h=f.set();e.push(h);e.push(g);var k=this.lineAlpha,l=this.lineThickness,e=this.dashLength,m=this.fillAlphas,n=this.lineColorR,p=this.fillColorsR,q=this.negativeLineColor,r=this.negativeFillColors,s=this.negativeFillAlphas,w=this.baseCoord,v=this.lineColorSwitched;v&&(n=v);(v=this.fillColorsSwitched)&&(p=v);v=this.negativeLineAlpha;isNaN(v)&&(v=k);k=new AmCharts.Bezier(f,a,b,n,k,l,p,0,e);g.push(k.path);void 0!==q&&(l=new AmCharts.Bezier(f,a,b,q,v,l,p,0,e),h.push(l.path));0<m&&(k=a.join(";").split(";"),
161
+ n=b.join(";").split(";"),l="",0<c.length?(c.push("M"),d.push("M"),c.reverse(),d.reverse(),k=a.concat(c),n=b.concat(d)):(this.rotate?(l+=" L"+w+","+b[b.length-1],l+=" L"+w+","+b[0]):(l+=" L"+a[a.length-1]+","+w,l+=" L"+a[0]+","+w),l+=" L"+a[0]+","+b[0]),c=new AmCharts.Bezier(f,k,n,NaN,0,0,p,m,e,l),c.path.pattern(this.pattern),g.push(c.path),r||void 0!==q)&&(s||(s=m),r||(r=q),a=new AmCharts.Bezier(f,a,b,NaN,0,0,r,s,e,l),a.path.pattern(this.pattern),h.push(a.path));this.applyMask(h,g)}},launchAnimation:function(){var a=
162
+ this,b=a.chart.startDuration;if(0<b&&!a.animationPlayed){var c=a.set,d=a.bulletSet;AmCharts.VML||(c.attr({opacity:a.startAlpha}),d.attr({opacity:a.startAlpha}));c.hide();d.hide();a.seqAn?(b=setTimeout(function(){a.animateGraphs.call(a)},a.index*b*1E3),a.timeOuts.push(b)):a.animateGraphs()}},animateGraphs:function(){var a=this.chart,b=this.set,c=this.bulletSet,d=this.x,e=this.y;b.show();c.show();var f=a.startDuration,a=a.startEffect;b&&(this.rotate?(b.translate(-1E3,e),c.translate(-1E3,e)):(b.translate(d,
163
+ -1E3),c.translate(d,-1E3)),b.animate({opacity:1,translate:d+","+e},f,a),c.animate({opacity:1,translate:d+","+e},f,a))},animate:function(a){var b=this.chart,c=this.animationArray;!a&&0<c.length&&(a=c[0],c.shift());c=AmCharts[AmCharts.getEffect(b.startEffect)];b=b.startDuration;a&&(this.rotate?a.animateWidth(b,c):a.animateHeight(b,c),a.set.show())},legendKeyColor:function(){var a=this.legendColor,b=this.lineAlpha;void 0===a&&(a=this.lineColorR,0===b&&(b=this.fillColorsR)&&(a="object"==typeof b?b[0]:
164
+ b));return a},legendKeyAlpha:function(){var a=this.legendAlpha;void 0===a&&(a=this.lineAlpha,this.fillAlphas>a&&(a=this.fillAlphas),0===a&&(a=this.bulletAlpha),0===a&&(a=1));return a},createBullet:function(a,b,c,d){if(!isNaN(b)&&!isNaN(c)){d=this.container;var e=this.bulletOffset,f=this.bulletSize;isNaN(a.bulletSize)||(f=a.bulletSize);var g=a.values.value,h=this.maxValue,k=this.minValue,l=this.maxBulletSize,m=this.minBulletSize;isNaN(h)||(isNaN(g)||(f=(g-k)/(h-k)*(l-m)+m),k==h&&(f=l));h=f;this.bulletAxis&&
165
+ (f=a.values.error,isNaN(f)||(g=f),f=this.bulletAxis.stepWidth*g);f<this.minBulletSize&&(f=this.minBulletSize);this.rotate?b=a.isNegative?b-e:b+e:c=a.isNegative?c+e:c-e;var n,m=this.bulletColorR;a.lineColor&&(this.bulletColorSwitched=a.lineColor);this.bulletColorSwitched&&(m=this.bulletColorSwitched);a.isNegative&&void 0!==this.bulletColorNegative&&(m=this.bulletColorNegative);void 0!==a.color&&(m=a.color);var p;"xy"==this.chart.type&&this.valueField&&(p=this.pattern,a.pattern&&(p=a.pattern));e=this.bullet;
166
+ a.bullet&&(e=a.bullet);var g=this.bulletBorderThickness,k=this.bulletBorderColorR,l=this.bulletBorderAlpha,q=this.bulletAlpha;k||(k=m);this.useLineColorForBulletBorder&&(k=this.lineColorR);var r=a.alpha;isNaN(r)||(q=r);if("none"!=this.bullet||a.bullet)n=AmCharts.bullet(d,e,f,m,q,g,k,l,h,0,p);if(this.customBullet||a.customBullet)p=this.customBullet,a.customBullet&&(p=a.customBullet),p&&(n&&n.remove(),"function"==typeof p?(n=new p,n.chart=this.chart,a.bulletConfig&&(n.availableSpace=c,n.graph=this,
167
+ n.graphDataItem=a,n.bulletY=c,a.bulletConfig.minCoord=this.minCoord-c,n.bulletConfig=a.bulletConfig),n.write(d),n=n.set):(this.chart.path&&(p=this.chart.path+p),n=d.set(),d=d.image(p,0,0,f,f),n.push(d),this.centerCustomBullets&&d.translate(-f/2,-f/2)));n&&((a.url||this.showHandOnHover)&&n.setAttr("cursor","pointer"),"serial"==this.chart.type&&(0>b-0||b-0>this.width||c<-f/2||c-0>this.height)&&(n.remove(),n=null),n&&(this.bulletSet.push(n),n.translate(b,c),this.addListeners(n,a),this.allBullets.push(n)),
168
+ a.bx=b,a.by=c);n?(n.size=f||0,a.bulletGraphics=n):n={size:0};n.graphDataItem=a;return n}},showBullets:function(){var a=this.allBullets,b;this.bulletsHidden=!1;for(b=0;b<a.length;b++)a[b].show()},hideBullets:function(){var a=this.allBullets,b;this.bulletsHidden=!0;for(b=0;b<a.length;b++)a[b].hide()},addListeners:function(a,b){var c=this;a.mouseover(function(a){c.handleRollOver(b,a)}).mouseout(function(a){c.handleRollOut(b,a)}).touchend(function(a){c.handleRollOver(b,a);c.chart.panEventsEnabled&&c.handleClick(b,
169
+ a)}).touchstart(function(a){c.handleRollOver(b,a)}).click(function(a){c.handleClick(b,a)}).dblclick(function(a){c.handleDoubleClick(b,a)}).contextmenu(function(a){c.handleRightClick(b,a)})},handleRollOver:function(a,b){if(a){var c=this.chart,d={type:"rollOverGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire("rollOverGraphItem",d);c.fire("rollOverGraphItem",d);clearTimeout(c.hoverInt);d=this.showBalloon;c.chartCursor&&"serial"==c.type&&(d=!1,!c.chartCursor.valueBalloonsEnabled&&
170
+ this.showBalloon&&(d=!0));if(d){var d=c.formatString(this.balloonText,a,!0),e=this.balloonFunction;e&&(d=e(a,a.graph));d=AmCharts.cleanFromEmpty(d);e=c.getBalloonColor(this,a);c.balloon.showBullet=!1;c.balloon.pointerOrientation="V";var f=a.x,g=a.y;c.rotate&&(f=a.y,g=a.x);c.showBalloon(d,e,!0,f+c.marginLeftReal,g+c.marginTopReal)}}this.handleGraphEvent(b,"rollOverGraph")},handleRollOut:function(a,b){this.chart.hideBalloon();if(a){var c={type:"rollOutGraphItem",item:a,index:a.index,graph:this,target:this,
171
+ chart:this.chart,event:b};this.fire("rollOutGraphItem",c);this.chart.fire("rollOutGraphItem",c)}this.handleGraphEvent(b,"rollOutGraph")},handleClick:function(a,b){if(a){var c={type:"clickGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire("clickGraphItem",c);this.chart.fire("clickGraphItem",c);AmCharts.getURL(a.url,this.urlTarget)}this.handleGraphEvent(b,"clickGraph")},handleGraphEvent:function(a,b){var c={type:b,graph:this,target:this,chart:this.chart,event:a};
172
+ this.fire(b,c);this.chart.fire(b,c)},handleRightClick:function(a,b){if(a){var c={type:"rightClickGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire("rightClickGraphItem",c);this.chart.fire("rightClickGraphItem",c)}},handleDoubleClick:function(a,b){if(a){var c={type:"doubleClickGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire("doubleClickGraphItem",c);this.chart.fire("doubleClickGraphItem",c)}},zoom:function(a,b){this.start=
173
+ a;this.end=b;this.draw()},changeOpacity:function(a){var b=this.set;b&&b.setAttr("opacity",a);if(b=this.ownColumns){var c;for(c=0;c<b.length;c++){var d=b[c].set;d&&d.setAttr("opacity",a)}}(b=this.bulletSet)&&b.setAttr("opacity",a)},destroy:function(){AmCharts.remove(this.set);AmCharts.remove(this.bulletSet);var a=this.timeOuts;if(a){var b;for(b=0;b<a.length;b++)clearTimeout(a[b])}this.timeOuts=[]}});AmCharts.ChartCursor=AmCharts.Class({construct:function(a){this.cname="ChartCursor";this.createEvents("changed","zoomed","onHideCursor","draw","selected","moved");this.enabled=!0;this.cursorAlpha=1;this.selectionAlpha=.2;this.cursorColor="#CC0000";this.categoryBalloonAlpha=1;this.color="#FFFFFF";this.type="cursor";this.zoomed=!1;this.zoomable=!0;this.pan=!1;this.categoryBalloonDateFormat="MMM DD, YYYY";this.categoryBalloonEnabled=this.valueBalloonsEnabled=!0;this.rolledOver=!1;this.cursorPosition=
173
174
  "middle";this.bulletsEnabled=this.skipZoomDispatch=!1;this.bulletSize=8;this.selectWithoutZooming=this.oneBalloonOnly=!1;this.graphBulletSize=1.7;this.animationDuration=.3;this.zooming=!1;this.adjustment=0;this.avoidBalloonOverlapping=!0;AmCharts.applyTheme(this,a,this.cname)},draw:function(){var a=this;a.destroy();var b=a.chart,c=b.container;a.rotate=b.rotate;a.container=c;c=c.set();c.translate(a.x,a.y);a.set=c;b.cursorSet.push(c);c=new AmCharts.AmBalloon;c.chart=b;a.categoryBalloon=c;AmCharts.copyProperties(b.balloon,
174
175
  c);c.cornerRadius=0;c.shadowAlpha=0;c.borderThickness=1;c.borderAlpha=1;c.showBullet=!1;var d=a.categoryBalloonColor;void 0===d&&(d=a.cursorColor);c.fillColor=d;c.fillAlpha=a.categoryBalloonAlpha;c.borderColor=d;c.color=a.color;d=a.valueLineAxis;AmCharts.isString(d)&&(d=b.getValueAxisById(d));d||(d=b.valueAxes[0]);a.valueLineAxis=d;a.valueLineBalloonEnabled&&(d=new AmCharts.AmBalloon,a.vaBalloon=d,AmCharts.copyProperties(c,d),d.animationDuration=0,a.rotate||(d.pointerOrientation="H"));a.rotate&&(c.pointerOrientation=
175
176
  "H");a.extraWidth=0;a.prevX=[];a.prevY=[];a.prevTX=[];a.prevTY=[];if(a.valueBalloonsEnabled)for(c=0;c<b.graphs.length;c++)d=new AmCharts.AmBalloon,d.chart=b,AmCharts.copyProperties(b.balloon,d),b.graphs[c].valueBalloon=d;"cursor"==a.type?a.createCursor():a.createCrosshair();a.interval=setInterval(function(){a.detectMovement.call(a)},40)},updateData:function(){var a=this.chart;this.data=a.chartData;this.firstTime=a.firstTime;this.lastTime=a.lastTime},createCursor:function(){var a=this.chart,b=this.cursorAlpha,
@@ -187,15 +188,15 @@ AmCharts.remove(this.set)},clear:function(){clearInterval(this.interval)},destro
187
188
  a&&(a=!0);this.hideObj(this.set);this.hideObj(this.categoryBalloon);this.hideObj(this.line);this.hideObj(this.vLine);this.hideObj(this.hLine);this.hideObj(this.vaBalloon);this.hideObj(this.allBullets);this.destroyValueBalloons();this.selectWithoutZooming||AmCharts.remove(this.selection);this.previousIndex=NaN;a&&this.fire("onHideCursor",{type:"onHideCursor",chart:this.chart,target:this});this.drawing||this.chart.setMouseCursor("auto");this.normalizeBulletSize()},setPosition:function(a,b,c){void 0===
188
189
  b&&(b=!0);if("cursor"==this.type){if(this.tempPosition=NaN,AmCharts.ifArray(this.data))isNaN(a)&&(a=this.getMousePosition()),(a!=this.previousMousePosition||!0===this.zoomed||this.oneBalloonOnly)&&!isNaN(a)&&("mouse"==this.cursorPosition&&(this.tempPosition=a),isNaN(c)&&(c=this.chart.categoryAxis.xToIndex(a)),c!=this.previousIndex||this.zoomed||"mouse"==this.cursorPosition||this.oneBalloonOnly)&&(this.updateCursor(c,b),this.zoomed=!1),this.previousMousePosition=a}else this.updateCrosshair()},normalizeBulletSize:function(){var a=
189
190
  this.resizedBullets;if(a)for(var b=0;b<a.length;b++){var c=a[b],d=c.bulletGraphics;d&&(d.translate(c.bx,c.by,1),c=c.graph,isNaN(this.graphBulletAlpha)||(d.setAttr("fill-opacity",c.bulletAlpha),d.setAttr("stroke-opacity",c.bulletBorderAlpha)))}},updateCursor:function(a,b){var c=this.chart,d=this.fullWidth,e=c.mouseX-this.x,f=c.mouseY-this.y;this.drawingNow&&(AmCharts.remove(this.drawingLine),this.drawingLine=AmCharts.line(this.container,[this.x+this.drawStartX,this.x+e],[this.y+this.drawStartY,this.y+
190
- f],this.cursorColor,1,1));if(this.enabled){void 0===b&&(b=!0);this.index=a+=this.adjustment;var g=c.categoryAxis,h=c.dx,k=c.dy,l=this.x+1,m=this.y+1,n=this.width,p=this.height,q=this.data[a];this.fireMoved();if(q){var r=q.x[g.id],s=c.rotate,w=this.stepWidth,v=this.categoryBalloon,t=this.firstTime,u=this.lastTime,x=this.cursorPosition,E=this.zooming,A=this.panning,z=c.graphs;if(c.mouseIsOver||E||A||this.forceShow)if(this.forceShow=!1,A){var h=this.panClickPos,c=this.panClickEndTime,E=this.panClickStartTime,
191
- H=this.panClickEnd,l=this.panClickStart,e=(s?h-f:h-e)/w;if(!g.parseDates||g.equalSpacing)e=Math.round(e);0!==e&&(h={type:"zoomed",target:this},h.chart=this.chart,g.parseDates&&!g.equalSpacing?(c+e>u&&(e=u-c),E+e<t&&(e=t-E),h.start=Math.round(E+e),h.end=Math.round(c+e),this.fire(h.type,h)):H+e>=this.data.length||0>l+e||(h.start=l+e,h.end=H+e,this.fire(h.type,h)))}else{"start"==x?r-=g.cellWidth/2:"mouse"==x&&(c.mouseIsOver?r=s?f-2:e-2:isNaN(this.tempPosition)||(r=this.tempPosition-2));if(s){if(0>r)if(E)r=
192
- 0;else{this.hideCursor();return}if(r>p+1)if(E)r=p+1;else{this.hideCursor();return}}else{if(0>r)if(E)r=0;else{this.hideCursor();return}if(r>n)if(E)r=n;else{this.hideCursor();return}}if(0<this.cursorAlpha){var F=this.line;s?(t=0,u=r+k,d&&(u-=g.cellWidth/2)):(t=r,u=0,d&&(t-=g.cellWidth/2));w=this.animationDuration;0<w&&!this.zooming?isNaN(this.previousX)?F.translate(t,u):(F.translate(this.previousX,this.previousY),F.animate({translate:t+","+u},w,"easeOutSine")):F.translate(t,u);this.previousX=t;this.previousY=
193
- u;F.show()}this.linePos=s?r+k:r;E&&(d&&F.hide(),s?this.updateSelectionSize(NaN,r):this.updateSelectionSize(r,NaN));w=!0;E&&(w=!1);this.categoryBalloonEnabled&&w?(this.setBalloonPosition(v,g,r,s),(t=this.categoryBalloonFunction)?v.showBalloon(t(q.category)):g.parseDates?(g=AmCharts.formatDate(q.category,this.categoryBalloonDateFormat,c),-1!=g.indexOf("fff")&&(g=AmCharts.formatMilliseconds(g,q.category)),v.showBalloon(g)):v.showBalloon(AmCharts.fixNewLines(q.category))):v.hide();z&&this.bulletsEnabled&&
194
- this.showBullets();if(this.oneBalloonOnly){r=Infinity;for(g=0;g<z.length;g++)t=z[g],t.showBalloon&&!t.hidden&&t.balloonText&&(u=q.axes[t.valueAxis.id].graphs[t.id],v=u.y,isNaN(v)||(s?Math.abs(e-v)<r&&(r=Math.abs(e-v),H=t):Math.abs(f-v)<r&&(r=Math.abs(f-v),H=t)));this.mostCloseGraph&&(H=this.mostCloseGraph)}if(a!=this.previousIndex||H!=this.previousMostCloseGraph)if(this.normalizeBulletSize(),this.destroyValueBalloons(),this.resizedBullets=[],z&&this.valueBalloonsEnabled&&w&&c.balloon.enabled){this.valueBalloons=
195
- w=[];for(g=0;g<z.length;g++)if(t=z[g],v=NaN,(!this.oneBalloonOnly||t==H)&&t.showBalloon&&!t.hidden&&t.balloonText&&("step"==t.type&&"left"==t.stepDirection&&(q=this.data[a+1]),q)){if(u=q.axes[t.valueAxis.id].graphs[t.id])v=u.y;if(this.showNextAvailable&&isNaN(v)&&a+1<this.data.length)for(r=a+1;r<this.data.length;r++)if(d=this.data[r])if(u=d.axes[t.valueAxis.id].graphs[t.id],v=u.y,!isNaN(v))break;if(!isNaN(v)){d=u.x;k=!0;if(s){if(r=v,0>d||d>p)k=!1}else if(r=d,d=v,0>r||r>n+h+1)k=!1;k&&(k=this.graphBulletSize,
196
- F=this.graphBulletAlpha,1==k&&isNaN(F)||!AmCharts.isModern||!(x=u.bulletGraphics)||(x.getBBox(),x.translate(u.bx,u.by,k),this.resizedBullets.push(u),isNaN(F)||(x.setAttr("fill-opacity",F),x.setAttr("stroke-opacity",F))),k=t.valueBalloon,F=c.getBalloonColor(t,u),k.setBounds(l,m,l+n,m+p),k.pointerOrientation="H",x=this.balloonPointerOrientation,"vertical"==x&&(k.pointerOrientation="V"),"horizontal"==x&&(k.pointerOrientation="H"),k.changeColor(F),void 0!==t.balloonAlpha&&(k.fillAlpha=t.balloonAlpha),
197
- void 0!==t.balloonTextColor&&(k.color=t.balloonTextColor),k.setPosition(r+l,d+m),r=c.formatString(t.balloonText,u,!0),(d=t.balloonFunction)&&(r=d(u,t).toString()),""!==r&&(s?k.showBalloon(r):(k.text=r,k.show=!0),w.push({yy:v,balloon:k})),!s&&k.set&&(k.set.hide(),t=k.textDiv)&&(t.style.visibility="hidden"))}}this.avoidBalloonOverlapping&&this.arrangeBalloons()}b?(h={type:"changed"},h.index=a,h.chart=this.chart,h.zooming=E,h.mostCloseGraph=H,h.position=s?f:e,h.target=this,c.fire("changed",h),this.fire("changed",
198
- h),this.skipZoomDispatch=!1):(this.skipZoomDispatch=!0,c.updateLegendValues(a));this.previousIndex=a;this.previousMostCloseGraph=H}}}else this.hideCursor()},setBalloonPosition:function(a,b,c,d){var e=b.position,f=b.inside;b=b.axisThickness;var g=this.chart,h=g.dx,g=g.dy,k=this.x,l=this.y,m=this.width,n=this.height;d?(f&&("right"==e?a.setBounds(k,l+g,k+m+h,l+c+g):a.setBounds(k,l+g,k+m+h,l+c)),"right"==e?f?a.setPosition(k+m+h,l+c+g):a.setPosition(k+m+h+b,l+c+g):f?a.setPosition(k,l+c):a.setPosition(k-
191
+ f],this.cursorColor,1,1));if(this.enabled){void 0===b&&(b=!0);this.index=a+=this.adjustment;var g=c.categoryAxis,h=c.dx,k=c.dy,l=this.x+1,m=this.y+1,n=this.width,p=this.height,q=this.data[a];this.fireMoved();if(q){var r=q.x[g.id],s=c.rotate,w=this.stepWidth,v=this.categoryBalloon,t=this.firstTime,u=this.lastTime,x=this.cursorPosition,F=this.zooming,B=this.panning,z=c.graphs;if(c.mouseIsOver||F||B||this.forceShow)if(this.forceShow=!1,B){var h=this.panClickPos,c=this.panClickEndTime,F=this.panClickStartTime,
192
+ I=this.panClickEnd,l=this.panClickStart,e=(s?h-f:h-e)/w;if(!g.parseDates||g.equalSpacing)e=Math.round(e);0!==e&&(h={type:"zoomed",target:this},h.chart=this.chart,g.parseDates&&!g.equalSpacing?(c+e>u&&(e=u-c),F+e<t&&(e=t-F),h.start=Math.round(F+e),h.end=Math.round(c+e),this.fire(h.type,h)):I+e>=this.data.length||0>l+e||(h.start=l+e,h.end=I+e,this.fire(h.type,h)))}else{"start"==x?r-=g.cellWidth/2:"mouse"==x&&(c.mouseIsOver?r=s?f-2:e-2:isNaN(this.tempPosition)||(r=this.tempPosition-2));if(s){if(0>r)if(F)r=
193
+ 0;else{this.hideCursor();return}if(r>p+1)if(F)r=p+1;else{this.hideCursor();return}}else{if(0>r)if(F)r=0;else{this.hideCursor();return}if(r>n)if(F)r=n;else{this.hideCursor();return}}if(0<this.cursorAlpha){var E=this.line;s?(t=0,u=r+k,d&&(u-=g.cellWidth/2)):(t=r,u=0,d&&(t-=g.cellWidth/2));w=this.animationDuration;0<w&&!this.zooming?isNaN(this.previousX)?E.translate(t,u):(E.translate(this.previousX,this.previousY),E.animate({translate:t+","+u},w,"easeOutSine")):E.translate(t,u);this.previousX=t;this.previousY=
194
+ u;E.show()}this.linePos=s?r+k:r;F&&(d&&E.hide(),s?this.updateSelectionSize(NaN,r):this.updateSelectionSize(r,NaN));w=!0;F&&(w=!1);this.categoryBalloonEnabled&&w?(this.setBalloonPosition(v,g,r,s),(t=this.categoryBalloonFunction)?v.showBalloon(t(q.category)):g.parseDates?(g=AmCharts.formatDate(q.category,this.categoryBalloonDateFormat,c),-1!=g.indexOf("fff")&&(g=AmCharts.formatMilliseconds(g,q.category)),v.showBalloon(g)):v.showBalloon(AmCharts.fixNewLines(q.category))):v.hide();z&&this.bulletsEnabled&&
195
+ this.showBullets();if(this.oneBalloonOnly){r=Infinity;for(g=0;g<z.length;g++)t=z[g],t.showBalloon&&!t.hidden&&t.balloonText&&(u=q.axes[t.valueAxis.id].graphs[t.id],v=u.y,isNaN(v)||(s?Math.abs(e-v)<r&&(r=Math.abs(e-v),I=t):Math.abs(f-v)<r&&(r=Math.abs(f-v),I=t)));this.mostCloseGraph&&(I=this.mostCloseGraph)}if(a!=this.previousIndex||I!=this.previousMostCloseGraph)if(this.normalizeBulletSize(),this.destroyValueBalloons(),this.resizedBullets=[],z&&this.valueBalloonsEnabled&&w&&c.balloon.enabled){this.valueBalloons=
196
+ w=[];for(g=0;g<z.length;g++)if(t=z[g],v=NaN,(!this.oneBalloonOnly||t==I)&&t.showBalloon&&!t.hidden&&t.balloonText&&("step"==t.type&&"left"==t.stepDirection&&(q=this.data[a+1]),q)){if(u=q.axes[t.valueAxis.id].graphs[t.id])v=u.y;if(this.showNextAvailable&&isNaN(v)&&a+1<this.data.length)for(r=a+1;r<this.data.length;r++)if(d=this.data[r])if(u=d.axes[t.valueAxis.id].graphs[t.id],v=u.y,!isNaN(v))break;if(!isNaN(v)){d=u.x;k=!0;if(s){if(r=v,0>d||d>p)k=!1}else if(r=d,d=v,0>r||r>n+h+1)k=!1;k&&(k=this.graphBulletSize,
197
+ E=this.graphBulletAlpha,1==k&&isNaN(E)||!AmCharts.isModern||!(x=u.bulletGraphics)||(x.getBBox(),x.translate(u.bx,u.by,k),this.resizedBullets.push(u),isNaN(E)||(x.setAttr("fill-opacity",E),x.setAttr("stroke-opacity",E))),k=t.valueBalloon,E=c.getBalloonColor(t,u),k.setBounds(l,m,l+n,m+p),k.pointerOrientation="H",x=this.balloonPointerOrientation,"vertical"==x&&(k.pointerOrientation="V"),"horizontal"==x&&(k.pointerOrientation="H"),k.changeColor(E),void 0!==t.balloonAlpha&&(k.fillAlpha=t.balloonAlpha),
198
+ void 0!==t.balloonTextColor&&(k.color=t.balloonTextColor),k.setPosition(r+l,d+m),r=c.formatString(t.balloonText,u,!0),(d=t.balloonFunction)&&(r=d(u,t).toString()),""!==r&&(s?k.showBalloon(r):(k.text=r,k.show=!0),w.push({yy:v,balloon:k})),!s&&k.set&&(k.set.hide(),t=k.textDiv)&&(t.style.visibility="hidden"))}}this.avoidBalloonOverlapping&&this.arrangeBalloons()}b?(h={type:"changed"},h.index=a,h.chart=this.chart,h.zooming=F,h.mostCloseGraph=I,h.position=s?f:e,h.target=this,c.fire("changed",h),this.fire("changed",
199
+ h),this.skipZoomDispatch=!1):(this.skipZoomDispatch=!0,c.updateLegendValues(a));this.previousIndex=a;this.previousMostCloseGraph=I}}}else this.hideCursor()},setBalloonPosition:function(a,b,c,d){var e=b.position,f=b.inside;b=b.axisThickness;var g=this.chart,h=g.dx,g=g.dy,k=this.x,l=this.y,m=this.width,n=this.height;d?(f&&("right"==e?a.setBounds(k,l+g,k+m+h,l+c+g):a.setBounds(k,l+g,k+m+h,l+c)),"right"==e?f?a.setPosition(k+m+h,l+c+g):a.setPosition(k+m+h+b,l+c+g):f?a.setPosition(k,l+c):a.setPosition(k-
199
200
  b,l+c)):"top"==e?f?a.setPosition(k+c+h,l+g):a.setPosition(k+c+h,l+g-b+1):f?a.setPosition(k+c,l+n):a.setPosition(k+c,l+n+b-1)},setBalloonBounds:function(a,b,c){var d=b.position,e=b.inside,f=b.axisThickness,g=b.tickLength,h=this.chart,k=h.dx,h=h.dy,l=this.x,m=this.y,n=this.width,p=this.height;c?(e&&(a.pointerWidth=0),"right"==d?e?a.setBounds(l,m+h,l+n+k,m+p+h):a.setBounds(l+n+k+f,m+h,l+n+1E3,m+p+h):e?a.setBounds(l,m,n+l,p+m):a.setBounds(-1E3,-1E3,l-g-f,m+p+15)):(a.maxWidth=n,b.parseDates&&(g=0,a.pointerWidth=
200
201
  0),"top"==d?e?a.setBounds(l+k,m+h,n+k+l,p+m):a.setBounds(l+k,-1E3,n+k+l,m+h-g-f):e?a.setBounds(l,m,n+l,p+m-g):a.setBounds(l,m+p+g+f-1,l+n,m+p+g+f))},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};
201
202
  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,e=a.mouseY-this.y;if(this.drawingNow){this.drawingNow=!1;AmCharts.remove(this.drawingLine);c=this.drawStartX;var f=this.drawStartY;if(2<Math.abs(c-d)||2<Math.abs(f-e))c={type:"draw",target:this,chart:a,initialX:c,initialY:f,finalX:d,finalY:e},this.fire(c.type,c)}if(this.enabled&&0<b.length){if(this.pan)this.rolledOver=
@@ -233,12 +234,12 @@ f.endDate=new Date(b),this.fire(f.type,f)}else if(h.startOnAxis||(b+=k/2),c-=thi
233
234
  zoomScrollbar:function(){var a,b;a=this.chart;var c=a.chartData,d=this.categoryAxis;d.parseDates&&!d.equalSpacing?(c=d.stepWidth,d=a.firstTime,a=c*(this.startTime-d),b=c*(this.endTime-d)):(a=c[this.start].x[d.id],b=c[this.end].x[d.id],c=d.stepWidth,d.startOnAxis||(d=c/2,a-=d,b+=d));this.stepWidth=c;this.updateScrollbarSize(a,b)},maskGraphs:function(a,b,c,d){var e=this.selectedGraph;e&&e.set.clipRect(a,b,c,d)},handleDragStart:function(){AmCharts.ChartScrollbar.base.handleDragStart.call(this);this.difference=
234
235
  this.end-this.start;this.timeDifference=this.endTime-this.startTime;0>this.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.cname="AmBalloon";this.enabled=!0;this.fillColor="#FFFFFF";this.fillAlpha=.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=.4;this.shadowColor="#000000";this.fadeOutDuration=
235
236
  this.animationDuration=.3;this.fixedPosition=!1;this.offsetY=6;this.offsetX=1;this.textAlign="center";AmCharts.isModern||(this.offsetY*=1.5);AmCharts.applyTheme(this,a,this.cname)},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,e=c.container,f=this.set;AmCharts.remove(f);this.removeDiv();f=e.set();f.node.style.pointerEvents=
236
- "none";this.set=f;c.balloonsSet.push(f);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 r=this.horizontalPadding,s=this.verticalPadding,w=this.pointerWidth,v=this.pointerOrientation,t=this.cornerRadius,u=c.fontFamily,x=this.fontSize;void 0==x&&(x=c.fontSize);var m=document.createElement("div"),E=m.style;E.pointerEvents="none";E.position="absolute";var A=this.minWidth,z="";isNaN(A)||
237
- (z="min-width:"+(A-2*r)+"px; ");m.innerHTML='<div style="text-align:'+this.textAlign+"; "+z+"max-width:"+this.maxWidth+"px; font-size:"+x+"px; color:"+this.color+"; font-family:"+u+'">'+this.text+"</div>";c.chartDiv.appendChild(m);this.textDiv=m;x=m.offsetWidth;u=m.offsetHeight;m.clientHeight&&(x=m.clientWidth,u=m.clientHeight);u+=2*s;z=x+2*r;!isNaN(A)&&z<A&&(z=A);window.opera&&(u+=2);var H=!1,x=this.offsetY;c.handDrawn&&(x+=c.handDrawScatter+2);"H"!=v?(A=a-z/2,b<h+u+10&&"down"!=v?(H=!0,d&&(b+=x),
238
- x=b+w,this.deltaSignY=-1):(d&&(b-=x),x=b-u-w,this.deltaSignY=1)):(2*w>u&&(w=u/2),x=b-u/2,a<g+(k-g)/2?(A=a+w,this.deltaSignX=-1):(A=a-z-w,this.deltaSignX=1));x+u>=l&&(x=l-u);x<h&&(x=h);A<g&&(A=g);A+z>k&&(A=k-z);var h=x+s,l=A+r,s=this.shadowAlpha,F=this.shadowColor,r=this.borderThickness,G=this.bulletSize,V;0<t||0===w?(0<s&&(a=AmCharts.rect(e,z,u,n,0,r+1,F,s,this.cornerRadius),AmCharts.isModern?a.translate(1,1):a.translate(4,4),f.push(a)),n=AmCharts.rect(e,z,u,n,this.fillAlpha,r,p,this.borderAlpha,
239
- this.cornerRadius),this.showBullet&&(V=AmCharts.circle(e,G,q,this.fillAlpha),f.push(V))):(q=[],t=[],"H"!=v?(g=a-A,g>z-w&&(g=z-w),g<w&&(g=w),q=[0,g-w,a-A,g+w,z,z,0,0],t=H?[0,0,b-x,0,0,u,u,0]:[u,u,b-x,u,u,0,0,u]):(q=b-x,q>u-w&&(q=u-w),q<w&&(q=w),t=[0,q-w,b-x,q+w,u,u,0,0],q=a<g+(k-g)/2?[0,0,A<a?0:a-A,0,0,z,z,0]:[z,z,A+z>a?z:a-A,z,z,0,0,z]),0<s&&(a=AmCharts.polygon(e,q,t,n,0,r,F,s),a.translate(1,1),f.push(a)),n=AmCharts.polygon(e,q,t,n,this.fillAlpha,r,p,this.borderAlpha));this.bg=n;f.push(n);n.toFront();
240
- e=1*this.deltaSignX;E.left=l+"px";E.top=h+"px";f.translate(A-e,x);n=n.getBBox();this.bottom=x+u+1;this.yPos=n.y+x;V&&V.translate(this.pointToX-A+e,b-x);b=this.animationDuration;0<this.animationDuration&&!d&&!isNaN(this.prevX)&&(f.translate(this.prevX,this.prevY),f.animate({translate:A-e+","+x},b,"easeOutSine"),m&&(E.left=this.prevTX+"px",E.top=this.prevTY+"px",this.xAnim=c.animate({node:m},"left",this.prevTX,l,b,"easeOutSine","px"),this.yAnim=c.animate({node:m},"top",this.prevTY,h,b,"easeOutSine",
241
- "px")));this.prevX=A-e;this.prevY=x;this.prevTX=l;this.prevTY=h}}},followMouse:function(){if(this.follow&&this.show){var a=this.chart.mouseX-this.offsetX*this.deltaSignX,b=this.chart.mouseY;this.pointToX=a;this.pointToY=b;if(a!=this.previousX||b!=this.previousY)if(this.previousX=a,this.previousY=b,0===this.cornerRadius)this.draw();else{var c=this.set;if(c){var d=c.getBBox(),a=a-d.width/2,e=b-d.height-10;a<this.l&&(a=this.l);a>this.r-d.width&&(a=this.r-d.width);e<this.t&&(e=b+10);c.translate(a,e);
237
+ "none";this.set=f;c.balloonsSet.push(f);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 r=this.horizontalPadding,s=this.verticalPadding,w=this.pointerWidth,v=this.pointerOrientation,t=this.cornerRadius,u=c.fontFamily,x=this.fontSize;void 0==x&&(x=c.fontSize);var m=document.createElement("div"),F=m.style;F.pointerEvents="none";F.position="absolute";var B=this.minWidth,z="";isNaN(B)||
238
+ (z="min-width:"+(B-2*r)+"px; ");m.innerHTML='<div style="text-align:'+this.textAlign+"; "+z+"max-width:"+this.maxWidth+"px; font-size:"+x+"px; color:"+this.color+"; font-family:"+u+'">'+this.text+"</div>";c.chartDiv.appendChild(m);this.textDiv=m;x=m.offsetWidth;u=m.offsetHeight;m.clientHeight&&(x=m.clientWidth,u=m.clientHeight);u+=2*s;z=x+2*r;!isNaN(B)&&z<B&&(z=B);window.opera&&(u+=2);var I=!1,x=this.offsetY;c.handDrawn&&(x+=c.handDrawScatter+2);"H"!=v?(B=a-z/2,b<h+u+10&&"down"!=v?(I=!0,d&&(b+=x),
239
+ x=b+w,this.deltaSignY=-1):(d&&(b-=x),x=b-u-w,this.deltaSignY=1)):(2*w>u&&(w=u/2),x=b-u/2,a<g+(k-g)/2?(B=a+w,this.deltaSignX=-1):(B=a-z-w,this.deltaSignX=1));x+u>=l&&(x=l-u);x<h&&(x=h);B<g&&(B=g);B+z>k&&(B=k-z);var h=x+s,l=B+r,s=this.shadowAlpha,E=this.shadowColor,r=this.borderThickness,H=this.bulletSize,V;0<t||0===w?(0<s&&(a=AmCharts.rect(e,z,u,n,0,r+1,E,s,this.cornerRadius),AmCharts.isModern?a.translate(1,1):a.translate(4,4),f.push(a)),n=AmCharts.rect(e,z,u,n,this.fillAlpha,r,p,this.borderAlpha,
240
+ this.cornerRadius),this.showBullet&&(V=AmCharts.circle(e,H,q,this.fillAlpha),f.push(V))):(q=[],t=[],"H"!=v?(g=a-B,g>z-w&&(g=z-w),g<w&&(g=w),q=[0,g-w,a-B,g+w,z,z,0,0],t=I?[0,0,b-x,0,0,u,u,0]:[u,u,b-x,u,u,0,0,u]):(q=b-x,q>u-w&&(q=u-w),q<w&&(q=w),t=[0,q-w,b-x,q+w,u,u,0,0],q=a<g+(k-g)/2?[0,0,B<a?0:a-B,0,0,z,z,0]:[z,z,B+z>a?z:a-B,z,z,0,0,z]),0<s&&(a=AmCharts.polygon(e,q,t,n,0,r,E,s),a.translate(1,1),f.push(a)),n=AmCharts.polygon(e,q,t,n,this.fillAlpha,r,p,this.borderAlpha));this.bg=n;f.push(n);n.toFront();
241
+ e=1*this.deltaSignX;F.left=l+"px";F.top=h+"px";f.translate(B-e,x);n=n.getBBox();this.bottom=x+u+1;this.yPos=n.y+x;V&&V.translate(this.pointToX-B+e,b-x);b=this.animationDuration;0<this.animationDuration&&!d&&!isNaN(this.prevX)&&(f.translate(this.prevX,this.prevY),f.animate({translate:B-e+","+x},b,"easeOutSine"),m&&(F.left=this.prevTX+"px",F.top=this.prevTY+"px",this.xAnim=c.animate({node:m},"left",this.prevTX,l,b,"easeOutSine","px"),this.yAnim=c.animate({node:m},"top",this.prevTY,h,b,"easeOutSine",
242
+ "px")));this.prevX=B-e;this.prevY=x;this.prevTX=l;this.prevTY=h}}},followMouse:function(){if(this.follow&&this.show){var a=this.chart.mouseX-this.offsetX*this.deltaSignX,b=this.chart.mouseY;this.pointToX=a;this.pointToY=b;if(a!=this.previousX||b!=this.previousY)if(this.previousX=a,this.previousY=b,0===this.cornerRadius)this.draw();else{var c=this.set;if(c){var d=c.getBBox(),a=a-d.width/2,e=b-d.height-10;a<this.l&&(a=this.l);a>this.r-d.width&&(a=this.r-d.width);e<this.t&&(e=b+10);c.translate(a,e);
242
243
  b=this.textDiv.style;b.left=a+this.horizontalPadding+"px";b.top=e+this.verticalPadding+"px"}}}},changeColor:function(a){this.balloonColor=a},setBounds:function(a,b,c,d){this.l=a;this.t=b;this.r=c;this.b=d;this.destroyTO&&clearTimeout(this.destroyTO)},showBalloon:function(a){this.text=a;this.show=!0;this.destroyTO&&clearTimeout(this.destroyTO);a=this.chart;this.fadeAnim1&&a.stopAnim(this.fadeAnim1);this.fadeAnim2&&a.stopAnim(this.fadeAnim2);this.draw()},hide:function(){var a=this,b=a.fadeOutDuration,
243
244
  c=a.chart;if(0<b){a.destroyTO=setTimeout(function(){a.destroy.call(a)},1E3*b);a.follow=!1;a.show=!1;var d=a.set;d&&(d.setAttr("opacity",a.fillAlpha),a.fadeAnim1=d.animate({opacity:0},b,"easeInSine"));a.textDiv&&(a.fadeAnim2=c.animate({node:a.textDiv},"opacity",1,0,b,"easeInSine",""))}else a.show=!1,a.follow=!1,a.destroy()},setPosition:function(a,b,c){this.pointToX=a;this.pointToY=b;c&&(a==this.previousX&&b==this.previousY||this.draw());this.previousX=a;this.previousY=b},followCursor:function(a){var b=
244
245
  this;(b.follow=a)?(b.pShowBullet=b.showBullet,b.showBullet=!1):void 0!==b.pShowBullet&&(b.showBullet=b.pShowBullet);clearInterval(b.interval);var c=b.chart.mouseX,d=b.chart.mouseY;!isNaN(c)&&a&&(b.pointToX=c-b.offsetX*b.deltaSignX,b.pointToY=d,b.followMouse(),b.interval=setInterval(function(){b.followMouse.call(b)},40))},removeDiv:function(){if(this.textDiv){var a=this.textDiv.parentNode;a&&a.removeChild(this.textDiv)}},destroy:function(){clearInterval(this.interval);AmCharts.remove(this.set);this.removeDiv();
@@ -246,8 +247,8 @@ this.set=null}});AmCharts.AmCoordinateChart=AmCharts.Class({inherits:AmCharts.Am
246
247
  this.balloonDateFormat="MMM DD, YYYY";this.valueAxes=[];this.graphs=[];this.guides=[];this.gridAboveGraphs=!1;AmCharts.applyTheme(this,a,"AmCoordinateChart")},initChart:function(){AmCharts.AmCoordinateChart.base.initChart.call(this);var a=this.categoryAxis;a&&(this.categoryAxis=AmCharts.processObject(a,AmCharts.CategoryAxis,this.theme));this.processValueAxes();this.createValueAxes();this.processGraphs();this.processGuides();AmCharts.VML&&(this.startAlpha=1);this.setLegendData(this.graphs);this.gridAboveGraphs&&
247
248
  this.gridSet.toFront()},createValueAxes:function(){if(0===this.valueAxes.length){var a=new AmCharts.ValueAxis;this.addValueAxis(a)}},parseData:function(){this.processValueAxes();this.processGraphs()},parseSerialData:function(){var a=this.graphs,b,c={},d=this.seriesIdField;d||(d=this.categoryField);this.chartData=[];var e=this.dataProvider;if(e){var f=!1,g,h=this.categoryAxis,k,l;h&&(f=h.parseDates,k=h.forceShowField,l=h.labelColorField,g=h.categoryFunction);var m,n,p={},q;f&&(b=AmCharts.extractPeriod(h.minPeriod),
248
249
  m=b.period,n=b.count,q=AmCharts.getPeriodDuration(m,n));var r={};this.lookupTable=r;var s,w=this.dataDateFormat,v={};for(s=0;s<e.length;s++){var t={},u=e[s];b=u[this.categoryField];t.dataContext=u;t.category=g?g(b,u,h):String(b);k&&(t.forceShow=u[k]);l&&(t.labelColor=u[l]);r[u[d]]=t;if(f&&(b=h.categoryFunction?h.categoryFunction(b,u,h):b instanceof Date?AmCharts.newDate(b,h.minPeriod):w?AmCharts.stringToDate(b,w):new Date(b),b=AmCharts.resetDateToMin(b,m,n,h.firstDayOfWeek),t.category=b,t.time=b.getTime(),
249
- isNaN(t.time)))continue;var x=this.valueAxes;t.axes={};t.x={};var E;for(E=0;E<x.length;E++){var A=x[E].id;t.axes[A]={};t.axes[A].graphs={};var z;for(z=0;z<a.length;z++){b=a[z];var H=b.id,F=b.periodValue;if(b.valueAxis.id==A){t.axes[A].graphs[H]={};var G={};G.index=s;var V=u;b.dataProvider&&(V=c);G.values=this.processValues(V,b,F);!b.connect&&v&&v[H]&&t.time-p[H]>1.1*q&&(v[H].gap=!0);this.processFields(b,G,V);G.category=t.category;G.serialDataItem=t;G.graph=b;t.axes[A].graphs[H]=G;p[H]=t.time;v[H]=
250
- G}}}this.chartData[s]=t}}for(c=0;c<a.length;c++)b=a[c],b.dataProvider&&this.parseGraphData(b)},processValues:function(a,b,c){var d={},e,f=!1;"candlestick"!=b.type&&"ohlc"!=b.type||""===c||(f=!0);e=Number(a[b.valueField+c]);isNaN(e)||(d.value=e);e=Number(a[b.errorField+c]);isNaN(e)||(d.error=e);f&&(c="Open");e=Number(a[b.openField+c]);isNaN(e)||(d.open=e);f&&(c="Close");e=Number(a[b.closeField+c]);isNaN(e)||(d.close=e);f&&(c="Low");e=Number(a[b.lowField+c]);isNaN(e)||(d.low=e);f&&(c="High");e=Number(a[b.highField+
250
+ isNaN(t.time)))continue;var x=this.valueAxes;t.axes={};t.x={};var F;for(F=0;F<x.length;F++){var B=x[F].id;t.axes[B]={};t.axes[B].graphs={};var z;for(z=0;z<a.length;z++){b=a[z];var I=b.id,E=b.periodValue;if(b.valueAxis.id==B){t.axes[B].graphs[I]={};var H={};H.index=s;var V=u;b.dataProvider&&(V=c);H.values=this.processValues(V,b,E);!b.connect&&v&&v[I]&&t.time-p[I]>1.1*q&&(v[I].gap=!0);this.processFields(b,H,V);H.category=t.category;H.serialDataItem=t;H.graph=b;t.axes[B].graphs[I]=H;p[I]=t.time;v[I]=
251
+ H}}}this.chartData[s]=t}}for(c=0;c<a.length;c++)b=a[c],b.dataProvider&&this.parseGraphData(b)},processValues:function(a,b,c){var d={},e,f=!1;"candlestick"!=b.type&&"ohlc"!=b.type||""===c||(f=!0);e=Number(a[b.valueField+c]);isNaN(e)||(d.value=e);e=Number(a[b.errorField+c]);isNaN(e)||(d.error=e);f&&(c="Open");e=Number(a[b.openField+c]);isNaN(e)||(d.open=e);f&&(c="Close");e=Number(a[b.closeField+c]);isNaN(e)||(d.close=e);f&&(c="Low");e=Number(a[b.lowField+c]);isNaN(e)||(d.low=e);f&&(c="High");e=Number(a[b.highField+
251
252
  c]);isNaN(e)||(d.high=e);return d},parseGraphData:function(a){var b=a.dataProvider,c=a.seriesIdField;c||(c=this.seriesIdField);c||(c=this.categoryField);var d;for(d=0;d<b.length;d++){var e=b[d],f=this.lookupTable[String(e[c])],g=a.valueAxis.id;f&&(g=f.axes[g].graphs[a.id],g.serialDataItem=f,g.values=this.processValues(e,a,a.periodValue),this.processFields(a,g,e))}},addValueAxis:function(a){a.chart=this;this.valueAxes.push(a);this.validateData()},removeValueAxesAndGraphs:function(){var a=this.valueAxes,
252
253
  b;for(b=a.length-1;-1<b;b--)this.removeValueAxis(a[b])},removeValueAxis:function(a){var b=this.graphs,c;for(c=b.length-1;0<=c;c--){var d=b[c];d&&d.valueAxis==a&&this.removeGraph(d)}b=this.valueAxes;for(c=b.length-1;0<=c;c--)b[c]==a&&b.splice(c,1);this.validateData()},addGraph:function(a){this.graphs.push(a);this.chooseGraphColor(a,this.graphs.length-1);this.validateData()},removeGraph:function(a){var b=this.graphs,c;for(c=b.length-1;0<=c;c--)b[c]==a&&(b.splice(c,1),a.destroy());this.validateData()},
253
254
  processValueAxes:function(){var a=this.valueAxes,b;for(b=0;b<a.length;b++){var c=a[b],c=AmCharts.processObject(c,AmCharts.ValueAxis,this.theme);a[b]=c;c.chart=this;c.id||(c.id="valueAxisAuto"+b+"_"+(new Date).getTime());void 0===c.usePrefixes&&(c.usePrefixes=this.usePrefixes)}},processGuides:function(){var a=this.guides,b=this.categoryAxis;if(a)for(var c=0;c<a.length;c++){var d=a[c];(void 0!==d.category||void 0!==d.date)&&b&&b.addGuide(d);var e=d.valueAxis;e?(AmCharts.isString(e)&&(e=this.getValueAxisById(e)),
@@ -306,10 +307,10 @@ AmCharts.triangle=function(a,b,c,d,e,f,g,h){if(void 0===f||0===f)f=1;void 0===g&
306
307
  AmCharts.line=function(a,b,c,d,e,f,g,h,k,l,m){if(a.handDrawn&&!m)return AmCharts.handDrawnLine(a,b,c,d,e,f,g,h,k,l,m);f={fill:"none","stroke-width":f};void 0!==g&&0<g&&(f["stroke-dasharray"]=g);isNaN(e)||(f["stroke-opacity"]=e);d&&(f.stroke=d);d=Math.round;l&&(d=AmCharts.doNothing);l=AmCharts.dx;e=AmCharts.dy;g="M"+(d(b[0])+l)+","+(d(c[0])+e);for(h=1;h<b.length;h++)g+=" L"+(d(b[h])+l)+","+(d(c[h])+e);if(AmCharts.VML)return a.path(g,void 0,!0).attr(f);k&&(g+=" M0,0 L0,0");return a.path(g).attr(f)};
307
308
  AmCharts.makeHD=function(a,b,c){for(var d=[],e=[],f=1;f<a.length;f++)for(var g=Number(a[f-1]),h=Number(b[f-1]),k=Number(a[f]),l=Number(b[f]),m=Math.sqrt(Math.pow(k-g,2)+Math.pow(l-h,2)),m=Math.round(m/50)+1,k=(k-g)/m,l=(l-h)/m,n=0;n<=m;n++){var p=g+n*k+Math.random()*c,q=h+n*l+Math.random()*c;d.push(p);e.push(q)}return[d,e]};
308
309
  AmCharts.handDrawnLine=function(a,b,c,d,e,f,g,h,k,l,m){var n=a.set();for(m=1;m<b.length;m++)for(var p=[b[m-1],b[m]],q=[c[m-1],c[m]],q=AmCharts.makeHD(p,q,a.handDrawScatter),p=q[0],q=q[1],r=1;r<p.length;r++)n.push(AmCharts.line(a,[p[r-1],p[r]],[q[r-1],q[r]],d,e,f+Math.random()*a.handDrawThickness-a.handDrawThickness/2,g,h,k,l,!0));return n};AmCharts.doNothing=function(a){return a};
309
- AmCharts.wedge=function(a,b,c,d,e,f,g,h,k,l,m,n){var p=Math.round;f=p(f);g=p(g);h=p(h);var q=p(g/f*h),r=AmCharts.VML,s=359.5+f/100;359.94<s&&(s=359.94);e>=s&&(e=s);var w=1/180*Math.PI,s=b+Math.sin(d*w)*h,v=c-Math.cos(d*w)*q,t=b+Math.sin(d*w)*f,u=c-Math.cos(d*w)*g,x=b+Math.sin((d+e)*w)*f,E=c-Math.cos((d+e)*w)*g,A=b+Math.sin((d+e)*w)*h,w=c-Math.cos((d+e)*w)*q,z={fill:AmCharts.adjustLuminosity(l.fill,-.2),"stroke-opacity":0,"fill-opacity":l["fill-opacity"]},H=0;180<Math.abs(e)&&(H=1);d=a.set();var F;
310
- r&&(s=p(10*s),t=p(10*t),x=p(10*x),A=p(10*A),v=p(10*v),u=p(10*u),E=p(10*E),w=p(10*w),b=p(10*b),k=p(10*k),c=p(10*c),f*=10,g*=10,h*=10,q*=10,1>Math.abs(e)&&1>=Math.abs(x-t)&&1>=Math.abs(E-u)&&(F=!0));e="";var G;n&&(z["fill-opacity"]=0,z["stroke-opacity"]=l["stroke-opacity"]/2,z.stroke=l.stroke);0<k&&(G=" M"+s+","+(v+k)+" L"+t+","+(u+k),r?(F||(G+=" A"+(b-f)+","+(k+c-g)+","+(b+f)+","+(k+c+g)+","+t+","+(u+k)+","+x+","+(E+k)),G+=" L"+A+","+(w+k),0<h&&(F||(G+=" B"+(b-h)+","+(k+c-q)+","+(b+h)+","+(k+c+q)+
311
- ","+A+","+(k+w)+","+s+","+(k+v)))):(G+=" A"+f+","+g+",0,"+H+",1,"+x+","+(E+k)+" L"+A+","+(w+k),0<h&&(G+=" A"+h+","+q+",0,"+H+",0,"+s+","+(v+k))),G=a.path(G+" Z",void 0,void 0,"1000,1000").attr(z),d.push(G),G=a.path(" M"+s+","+v+" L"+s+","+(v+k)+" L"+t+","+(u+k)+" L"+t+","+u+" L"+s+","+v+" Z",void 0,void 0,"1000,1000").attr(z),k=a.path(" M"+x+","+E+" L"+x+","+(E+k)+" L"+A+","+(w+k)+" L"+A+","+w+" L"+x+","+E+" Z",void 0,void 0,"1000,1000").attr(z),d.push(G),d.push(k));r?(F||(e=" A"+p(b-f)+","+p(c-g)+
312
- ","+p(b+f)+","+p(c+g)+","+p(t)+","+p(u)+","+p(x)+","+p(E)),f=" M"+p(s)+","+p(v)+" L"+p(t)+","+p(u)+e+" L"+p(A)+","+p(w)):f=" M"+s+","+v+" L"+t+","+u+(" A"+f+","+g+",0,"+H+",1,"+x+","+E)+" L"+A+","+w;0<h&&(r?F||(f+=" B"+(b-h)+","+(c-q)+","+(b+h)+","+(c+q)+","+A+","+w+","+s+","+v):f+=" A"+h+","+q+",0,"+H+",0,"+s+","+v);a.handDrawn&&(b=AmCharts.line(a,[s,t],[v,u],l.stroke,l.thickness*Math.random()*a.handDrawThickness,l["stroke-opacity"]),d.push(b));a=a.path(f+" Z",void 0,void 0,"1000,1000").attr(l);
310
+ AmCharts.wedge=function(a,b,c,d,e,f,g,h,k,l,m,n){var p=Math.round;f=p(f);g=p(g);h=p(h);var q=p(g/f*h),r=AmCharts.VML,s=359.5+f/100;359.94<s&&(s=359.94);e>=s&&(e=s);var w=1/180*Math.PI,s=b+Math.sin(d*w)*h,v=c-Math.cos(d*w)*q,t=b+Math.sin(d*w)*f,u=c-Math.cos(d*w)*g,x=b+Math.sin((d+e)*w)*f,F=c-Math.cos((d+e)*w)*g,B=b+Math.sin((d+e)*w)*h,w=c-Math.cos((d+e)*w)*q,z={fill:AmCharts.adjustLuminosity(l.fill,-.2),"stroke-opacity":0,"fill-opacity":l["fill-opacity"]},I=0;180<Math.abs(e)&&(I=1);d=a.set();var E;
311
+ r&&(s=p(10*s),t=p(10*t),x=p(10*x),B=p(10*B),v=p(10*v),u=p(10*u),F=p(10*F),w=p(10*w),b=p(10*b),k=p(10*k),c=p(10*c),f*=10,g*=10,h*=10,q*=10,1>Math.abs(e)&&1>=Math.abs(x-t)&&1>=Math.abs(F-u)&&(E=!0));e="";var H;n&&(z["fill-opacity"]=0,z["stroke-opacity"]=l["stroke-opacity"]/2,z.stroke=l.stroke);0<k&&(H=" M"+s+","+(v+k)+" L"+t+","+(u+k),r?(E||(H+=" A"+(b-f)+","+(k+c-g)+","+(b+f)+","+(k+c+g)+","+t+","+(u+k)+","+x+","+(F+k)),H+=" L"+B+","+(w+k),0<h&&(E||(H+=" B"+(b-h)+","+(k+c-q)+","+(b+h)+","+(k+c+q)+
312
+ ","+B+","+(k+w)+","+s+","+(k+v)))):(H+=" A"+f+","+g+",0,"+I+",1,"+x+","+(F+k)+" L"+B+","+(w+k),0<h&&(H+=" A"+h+","+q+",0,"+I+",0,"+s+","+(v+k))),H=a.path(H+" Z",void 0,void 0,"1000,1000").attr(z),d.push(H),H=a.path(" M"+s+","+v+" L"+s+","+(v+k)+" L"+t+","+(u+k)+" L"+t+","+u+" L"+s+","+v+" Z",void 0,void 0,"1000,1000").attr(z),k=a.path(" M"+x+","+F+" L"+x+","+(F+k)+" L"+B+","+(w+k)+" L"+B+","+w+" L"+x+","+F+" Z",void 0,void 0,"1000,1000").attr(z),d.push(H),d.push(k));r?(E||(e=" A"+p(b-f)+","+p(c-g)+
313
+ ","+p(b+f)+","+p(c+g)+","+p(t)+","+p(u)+","+p(x)+","+p(F)),f=" M"+p(s)+","+p(v)+" L"+p(t)+","+p(u)+e+" L"+p(B)+","+p(w)):f=" M"+s+","+v+" L"+t+","+u+(" A"+f+","+g+",0,"+I+",1,"+x+","+F)+" L"+B+","+w;0<h&&(r?E||(f+=" B"+(b-h)+","+(c-q)+","+(b+h)+","+(c+q)+","+B+","+w+","+s+","+v):f+=" A"+h+","+q+",0,"+I+",0,"+s+","+v);a.handDrawn&&(b=AmCharts.line(a,[s,t],[v,u],l.stroke,l.thickness*Math.random()*a.handDrawThickness,l["stroke-opacity"]),d.push(b));a=a.path(f+" Z",void 0,void 0,"1000,1000").attr(l);
313
314
  if(m){b=[];for(c=0;c<m.length;c++)b.push(AmCharts.adjustLuminosity(l.fill,m[c]));0<b.length&&a.gradient("linearGradient",b)}a.pattern(n);d.push(a);return d};AmCharts.adjustLuminosity=function(a,b){a=String(a).replace(/[^0-9a-f]/gi,"");6>a.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,e;for(e=0;3>e;e++)d=parseInt(a.substr(2*e,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,e,f,g,h,k,l){"object"==typeof g&&(g=g[0]);"object"==typeof h&&(h=h[0]);f={fill:g,"fill-opacity":h,"stroke-width":f};void 0!==k&&0<k&&(f["stroke-dasharray"]=k);isNaN(e)||(f["stroke-opacity"]=e);d&&(f.stroke=d);d="M"+Math.round(b[0])+","+Math.round(c[0]);e=[];for(k=0;k<b.length;k++)e.push({x:Number(b[k]),y:Number(c[k])});1<e.length&&(b=this.interpolate(e),d+=this.drawBeziers(b));l?d+=l:AmCharts.VML||(d+="M0,0 L0,0");this.path=a.path(d).attr(f)},
314
315
  interpolate:function(a){var b=[];b.push({x:a[0].x,y:a[0].y});var c=a[1].x-a[0].x,d=a[1].y-a[0].y,e=AmCharts.bezierX,f=AmCharts.bezierY;b.push({x:a[0].x+c/e,y:a[0].y+d/f});var g;for(g=1;g<a.length-1;g++){var h=a[g-1],k=a[g],d=a[g+1];isNaN(d.x)&&(d=k);isNaN(k.x)&&(k=h);isNaN(h.x)&&(h=k);c=d.x-k.x;d=d.y-h.y;h=k.x-h.x;h>c&&(h=c);b.push({x:k.x-h/e,y:k.y-d/f});b.push({x:k.x,y:k.y});b.push({x:k.x+h/e,y:k.y+d/f})}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-
315
316
  c/e,y:a[a.length-1].y-d/f});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 e=Math.round,f=this.getPointOnSegment(a,b,.75),g=this.getPointOnSegment(d,c,.75),h=(d.x-a.x)/16,k=(d.y-a.y)/16,l=this.getPointOnSegment(a,b,.375);a=this.getPointOnSegment(f,g,.375);a.x-=h;a.y-=k;b=this.getPointOnSegment(g,f,.375);b.x+=h;b.y+=
@@ -337,22 +338,22 @@ set:function(a){var b=new AmCharts.AmDObject("group",this.D);this.D.container.ap
337
338
  b),a.setAttribute("angle",d));e&&(a.colors.value=e)},remove:function(a){a.clipPath&&this.D.remove(a.clipPath);this.D.remove(a.node)},disableSelection:function(a){void 0!==typeof a.onselectstart&&(a.onselectstart=function(){return!1});a.style.cursor="default"},pattern:function(a,b){var c=a.node,d=a.fill,e="none";b.color&&(e=b.color);c.fillColor=e;8===document.documentMode?(d.type="tile",d.src=b.url):(d.setAttribute("type","tile"),d.setAttribute("src",b.url))},update:function(){}});AmCharts.SVGRenderer=AmCharts.Class({construct:function(a){this.D=a;this.animations=[]},create:function(a,b){return document.createElementNS(AmCharts.SVG_NS,b)},attr:function(a,b){for(var c in b)b.hasOwnProperty(c)&&this.setAttr(a,c,b[c])},setAttr:function(a,b,c){void 0!==c&&a.node.setAttribute(b,c)},animate:function(a,b,c,d,e){var f=a.node;a["an_"+b]&&AmCharts.removeFromArray(this.animations,a["an_"+b]);"translate"==b?(f=(f=f.getAttribute("transform"))?String(f).substring(10,f.length-1):"0,0",f=
338
339
  f.split(", ").join(" "),f=f.split(" ").join(","),0===f&&(f="0,0")):f=Number(f.getAttribute(b));c={obj:a,frame:0,attribute:b,from:f,to:c,time:d,effect:e};this.animations.push(c);a["an_"+b]=c},update:function(){var a,b=this.animations;for(a=b.length-1;0<=a;a--){var c=b[a],d=1E3*c.time/AmCharts.updateRate,e=c.frame+1,f=c.obj,g=c.attribute,h,k,l;e<=d?(c.frame++,"translate"==g?(h=c.from.split(","),g=Number(h[0]),h=Number(h[1]),isNaN(h)&&(h=0),k=c.to.split(","),l=Number(k[0]),k=Number(k[1]),l=0===l-g?l:
339
340
  Math.round(AmCharts[c.effect](0,e,g,l-g,d)),c=0===k-h?k:Math.round(AmCharts[c.effect](0,e,h,k-h,d)),g="transform",c="translate("+l+","+c+")"):(k=Number(c.from),h=Number(c.to),l=h-k,c=AmCharts[c.effect](0,e,k,l,d),isNaN(c)&&(c=h),0===l&&this.animations.splice(a,1)),this.setAttr(f,g,c)):("translate"==g?(k=c.to.split(","),l=Number(k[0]),k=Number(k[1]),f.translate(l,k)):(h=Number(c.to),this.setAttr(f,g,h)),this.animations.splice(a,1))}},getBBox:function(a){if(a=a.node)try{return a.getBBox()}catch(b){}return{width:0,
340
- height:0,x:0,y:0}},path:function(a,b){a.node.setAttributeNS(AmCharts.SVG_XLINK,"xlink:href",b)},clipRect:function(a,b,c,d,e){var f=a.node,g=a.clipPath;g&&this.D.remove(g);var h=f.parentNode;h&&(f=document.createElementNS(AmCharts.SVG_NS,"clipPath"),g=AmCharts.getUniqueId(),f.setAttribute("id",g),this.D.rect(b,c,d,e,0,0,f),h.appendChild(f),b="#",AmCharts.baseHref&&!AmCharts.isIE&&(b=window.location.href+b),this.setAttr(a,"clip-path","url("+b+g+")"),this.clipPathC++,a.clipPath=f)},text:function(a,b,
341
- c){var d=new AmCharts.AmDObject("text",this.D);a=String(a).split("\n");var e=b["font-size"],f;for(f=0;f<a.length;f++){var g=this.create(null,"tspan");g.appendChild(document.createTextNode(a[f]));g.setAttribute("y",(e+2)*f+Math.round(e/2));g.setAttribute("x",0);d.node.appendChild(g)}d.node.setAttribute("y",Math.round(e/2));this.attr(d,b);this.D.addToContainer(d.node,c);return d},setText:function(a,b){var c=a.node;c&&(c.removeChild(c.firstChild),c.appendChild(document.createTextNode(b)))},move:function(a,
342
- b,c,d){b="translate("+b+","+c+")";d&&(b=b+" scale("+d+")");this.setAttr(a,"transform",b)},rotate:function(a,b){var c=a.node.getAttribute("transform"),d="rotate("+b+")";c&&(d=c+" "+d);this.setAttr(a,"transform",d)},set:function(a){var b=new AmCharts.AmDObject("g",this.D);this.D.container.appendChild(b.node);if(a){var c;for(c=0;c<a.length;c++)b.push(a[c])}return b},addListener:function(a,b,c){a.node["on"+b]=c},gradient:function(a,b,c,d){var e=a.node,f=a.grad;f&&this.D.remove(f);b=document.createElementNS(AmCharts.SVG_NS,
341
+ height:0,x:0,y:0}},path:function(a,b){a.node.setAttributeNS(AmCharts.SVG_XLINK,"xlink:href",b)},clipRect:function(a,b,c,d,e){var f=a.node,g=a.clipPath;g&&this.D.remove(g);var h=f.parentNode;h&&(f=document.createElementNS(AmCharts.SVG_NS,"clipPath"),g=AmCharts.getUniqueId(),f.setAttribute("id",g),this.D.rect(b,c,d,e,0,0,f),h.appendChild(f),b="#",AmCharts.baseHref&&!AmCharts.isIE&&(b=this.removeTarget(window.location.href)+b),this.setAttr(a,"clip-path","url("+b+g+")"),this.clipPathC++,a.clipPath=f)},
342
+ text:function(a,b,c){var d=new AmCharts.AmDObject("text",this.D);a=String(a).split("\n");var e=b["font-size"],f;for(f=0;f<a.length;f++){var g=this.create(null,"tspan");g.appendChild(document.createTextNode(a[f]));g.setAttribute("y",(e+2)*f+Math.round(e/2));g.setAttribute("x",0);g.style.fontSize=e+"px";d.node.appendChild(g)}d.node.setAttribute("y",Math.round(e/2));this.attr(d,b);this.D.addToContainer(d.node,c);return d},setText:function(a,b){var c=a.node;c&&(c.removeChild(c.firstChild),c.appendChild(document.createTextNode(b)))},
343
+ move:function(a,b,c,d){b="translate("+b+","+c+")";d&&(b=b+" scale("+d+")");this.setAttr(a,"transform",b)},rotate:function(a,b){var c=a.node.getAttribute("transform"),d="rotate("+b+")";c&&(d=c+" "+d);this.setAttr(a,"transform",d)},set:function(a){var b=new AmCharts.AmDObject("g",this.D);this.D.container.appendChild(b.node);if(a){var c;for(c=0;c<a.length;c++)b.push(a[c])}return b},addListener:function(a,b,c){a.node["on"+b]=c},gradient:function(a,b,c,d){var e=a.node,f=a.grad;f&&this.D.remove(f);b=document.createElementNS(AmCharts.SVG_NS,
343
344
  b);f=AmCharts.getUniqueId();b.setAttribute("id",f);if(!isNaN(d)){var g=0,h=0,k=0,l=0;90==d?k=100:270==d?l=100:180==d?g=100:0===d&&(h=100);b.setAttribute("x1",g+"%");b.setAttribute("x2",h+"%");b.setAttribute("y1",k+"%");b.setAttribute("y2",l+"%")}for(d=0;d<c.length;d++)g=document.createElementNS(AmCharts.SVG_NS,"stop"),h=100*d/(c.length-1),0===d&&(h=0),g.setAttribute("offset",h+"%"),g.setAttribute("stop-color",c[d]),b.appendChild(g);e.parentNode.appendChild(b);c="#";AmCharts.baseHref&&!AmCharts.isIE&&
344
- (c=window.location.href+c);e.setAttribute("fill","url("+c+f+")");a.grad=b},pattern:function(a,b,c){var d=a.node;isNaN(c)&&(c=1);var e=a.patternNode;e&&this.D.remove(e);var e=document.createElementNS(AmCharts.SVG_NS,"pattern"),f=AmCharts.getUniqueId(),g=b;b.url&&(g=b.url);var h=Number(b.width);isNaN(h)&&(h=4);var k=Number(b.height);isNaN(k)&&(k=4);h/=c;k/=c;c=b.x;isNaN(c)&&(c=0);var l=-Math.random()*Number(b.randomX);isNaN(l)||(c=l);l=b.y;isNaN(l)&&(l=0);var m=-Math.random()*Number(b.randomY);isNaN(m)||
345
- (l=m);e.setAttribute("id",f);e.setAttribute("width",h);e.setAttribute("height",k);e.setAttribute("patternUnits","userSpaceOnUse");e.setAttribute("xlink:href",g);b.color&&(m=document.createElementNS(AmCharts.SVG_NS,"rect"),m.setAttributeNS(null,"height",h),m.setAttributeNS(null,"width",k),m.setAttributeNS(null,"fill",b.color),e.appendChild(m));this.D.image(g,0,0,h,k,e).translate(c,l);g="#";AmCharts.baseHref&&!AmCharts.isIE&&(g=window.location.href+g);d.setAttribute("fill","url("+g+f+")");a.patternNode=
346
- e;d.parentNode.appendChild(e)},remove:function(a){a.clipPath&&this.D.remove(a.clipPath);a.grad&&this.D.remove(a.grad);a.patternNode&&this.D.remove(a.patternNode);this.D.remove(a.node)}});AmCharts.AmDSet=AmCharts.Class({construct:function(a){this.create("g")},attr:function(a){this.R.attr(this.node,a)},move:function(a,b){this.R.move(this.node,a,b)}});AmCharts.AmLegend=AmCharts.Class({construct:function(a){this.cname="AmLegend";this.createEvents("rollOverMarker","rollOverItem","rollOutMarker","rollOutItem","showItem","hideItem","clickMarker","rollOverItem","rollOutItem","clickLabel");this.position="bottom";this.borderColor=this.color="#000000";this.borderAlpha=0;this.markerLabelGap=5;this.verticalGap=10;this.align="left";this.horizontalGap=0;this.spacing=10;this.markerDisabledColor="#AAB3B3";this.markerType="square";this.markerSize=16;this.markerBorderThickness=
345
+ (c=this.removeTarget(window.location.href)+c);e.setAttribute("fill","url("+c+f+")");a.grad=b},removeTarget:function(a){urlArr=a.split("#");return urlArr[0]},pattern:function(a,b,c){var d=a.node;isNaN(c)&&(c=1);var e=a.patternNode;e&&this.D.remove(e);var e=document.createElementNS(AmCharts.SVG_NS,"pattern"),f=AmCharts.getUniqueId(),g=b;b.url&&(g=b.url);var h=Number(b.width);isNaN(h)&&(h=4);var k=Number(b.height);isNaN(k)&&(k=4);h/=c;k/=c;c=b.x;isNaN(c)&&(c=0);var l=-Math.random()*Number(b.randomX);
346
+ isNaN(l)||(c=l);l=b.y;isNaN(l)&&(l=0);var m=-Math.random()*Number(b.randomY);isNaN(m)||(l=m);e.setAttribute("id",f);e.setAttribute("width",h);e.setAttribute("height",k);e.setAttribute("patternUnits","userSpaceOnUse");e.setAttribute("xlink:href",g);b.color&&(m=document.createElementNS(AmCharts.SVG_NS,"rect"),m.setAttributeNS(null,"height",h),m.setAttributeNS(null,"width",k),m.setAttributeNS(null,"fill",b.color),e.appendChild(m));this.D.image(g,0,0,h,k,e).translate(c,l);g="#";AmCharts.baseHref&&!AmCharts.isIE&&
347
+ (g=this.removeTarget(window.location.href)+g);d.setAttribute("fill","url("+g+f+")");a.patternNode=e;d.parentNode.appendChild(e)},remove:function(a){a.clipPath&&this.D.remove(a.clipPath);a.grad&&this.D.remove(a.grad);a.patternNode&&this.D.remove(a.patternNode);this.D.remove(a.node)}});AmCharts.AmDSet=AmCharts.Class({construct:function(a){this.create("g")},attr:function(a){this.R.attr(this.node,a)},move:function(a,b){this.R.move(this.node,a,b)}});AmCharts.AmLegend=AmCharts.Class({construct:function(a){this.cname="AmLegend";this.createEvents("rollOverMarker","rollOverItem","rollOutMarker","rollOutItem","showItem","hideItem","clickMarker","rollOverItem","rollOutItem","clickLabel");this.position="bottom";this.borderColor=this.color="#000000";this.borderAlpha=0;this.markerLabelGap=5;this.verticalGap=10;this.align="left";this.horizontalGap=0;this.spacing=10;this.markerDisabledColor="#AAB3B3";this.markerType="square";this.markerSize=16;this.markerBorderThickness=
347
348
  this.markerBorderAlpha=1;this.marginBottom=this.marginTop=0;this.marginLeft=this.marginRight=20;this.autoMargins=!0;this.valueWidth=50;this.switchable=!0;this.switchType="x";this.switchColor="#FFFFFF";this.rollOverColor="#CC0000";this.reversedOrder=!1;this.labelText="[[title]]";this.valueText="[[value]]";this.useMarkerColorForLabels=!1;this.rollOverGraphAlpha=1;this.textClickEnabled=!1;this.equalWidths=!0;this.dateFormat="DD-MM-YYYY";this.backgroundColor="#FFFFFF";this.backgroundAlpha=0;this.useGraphSettings=
348
349
  !1;this.showEntries=!0;AmCharts.applyTheme(this,a,this.cname)},setData:function(a){this.legendData=a;this.invalidateSize()},invalidateSize:function(){this.destroy();this.entries=[];this.valueLabels=[];(AmCharts.ifArray(this.legendData)||AmCharts.ifArray(this.data))&&this.drawLegend()},drawLegend:function(){var a=this.chart,b=this.position,c=this.width,d=a.divRealWidth,e=a.divRealHeight,f=this.div,g=this.legendData;this.data&&(g=this.data);isNaN(this.fontSize)&&(this.fontSize=a.fontSize);if("right"==
349
350
  b||"left"==b)this.maxColumns=1,this.autoMargins&&(this.marginLeft=this.marginRight=10);else if(this.autoMargins){this.marginRight=a.marginRight;this.marginLeft=a.marginLeft;var h=a.autoMarginOffset;"bottom"==b?(this.marginBottom=h,this.marginTop=0):(this.marginTop=h,this.marginBottom=0)}var k;void 0!==c?k=AmCharts.toCoordinate(c,d):"right"!=b&&"left"!=b&&(k=a.realWidth);"outside"==b?(k=f.offsetWidth,e=f.offsetHeight,f.clientHeight&&(k=f.clientWidth,e=f.clientHeight)):(isNaN(k)||(f.style.width=k+"px"),
350
351
  f.className="amChartsLegend");this.divWidth=k;(b=this.container)?(b.container.innerHTML="",f.appendChild(b.container),b.setSize(k,e)):b=new AmCharts.AmDraw(f,k,e,a);this.container=b;this.lx=0;this.ly=8;e=this.markerSize;e>this.fontSize&&(this.ly=e/2-1);0<e&&(this.lx+=e+this.markerLabelGap);this.titleWidth=0;if(e=this.title)a=AmCharts.text(this.container,e,this.color,a.fontFamily,this.fontSize,"start",!0),a.translate(this.marginLeft,this.marginTop+this.verticalGap+this.ly+1),a=a.getBBox(),this.titleWidth=
351
352
  a.width+15,this.titleHeight=a.height+6;this.index=this.maxLabelWidth=0;if(this.showEntries){for(a=0;a<g.length;a++)this.createEntry(g[a]);for(a=this.index=0;a<g.length;a++)this.createValue(g[a])}this.arrangeEntries();this.updateValues()},arrangeEntries:function(){var a=this.position,b=this.marginLeft+this.titleWidth,c=this.marginRight,d=this.marginTop,e=this.marginBottom,f=this.horizontalGap,g=this.div,h=this.divWidth,k=this.maxColumns,l=this.verticalGap,m=this.spacing,n=h-c-b,p=0,q=0,r=this.container;
352
- this.set&&this.set.remove();var s=r.set();this.set=s;r=r.set();s.push(r);var w=this.entries,v,t;for(t=0;t<w.length;t++){v=w[t].getBBox();var u=v.width;u>p&&(p=u);v=v.height;v>q&&(q=v)}var u=q=0,x=f,E=0,A=0;for(t=0;t<w.length;t++){var z=w[t];this.reversedOrder&&(z=w[w.length-t-1]);v=z.getBBox();var H;this.equalWidths?H=f+u*(p+m+this.markerLabelGap):(H=x,x=x+v.width+f+m);v.height>A&&(A=v.height);H+v.width>n&&0<t&&0!==u&&(q++,u=0,H=f,x=H+v.width+f+m,E=E+A+l,A=0);z.translate(H,E);u++;!isNaN(k)&&u>=k&&
353
- (u=0,q++,E=E+A+l,A=0);r.push(z)}v=r.getBBox();k=v.height+2*l-1;"left"==a||"right"==a?(h=v.width+2*f,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);s.push(c);s.translate(b,d);c.toBack();b=f;if("top"==a||"bottom"==a||"absolute"==a||"outside"==a)"center"==this.align?b=f+(h-v.width)/2:"right"==this.align&&(b=f+h-v.width);r.translate(b,l+1);this.titleHeight>k&&(k=this.titleHeight);
354
- a=k+d+e+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,e=a.alpha;a.legendKeyColor&&(d=a.legendKeyColor());a.legendKeyAlpha&&(e=a.legendKeyAlpha());var f;!0===a.hidden&&(f=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,this.switchType=void 0,"line"==m||
355
- "step"==m||"smoothedLine"==m||"ohlc"==m)g=k.set(),a.hidden||(d=a.lineColorR,f=a.bulletBorderColorR),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.bulletColorR),n=AmCharts.bullet(k,a.bullet,a.bulletSize,d,a.bulletAlpha,a.bulletBorderThickness,f,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());m=a.fillColorsR;!0===a.hidden&&(m=d);if(g=this.createMarker("rectangle",
353
+ this.set&&this.set.remove();var s=r.set();this.set=s;var w=r.set();s.push(w);var v=this.entries,t,u;for(u=0;u<v.length;u++){t=v[u].getBBox();var x=t.width;x>p&&(p=x);t=t.height;t>q&&(q=t)}var x=q=0,F=f,B=0,z=0;for(u=0;u<v.length;u++){var I=v[u];this.reversedOrder&&(I=v[v.length-u-1]);t=I.getBBox();var E;this.equalWidths?E=f+x*(p+m+this.markerLabelGap):(E=F,F=F+t.width+f+m);t.height>z&&(z=t.height);E+t.width>n&&0<u&&0!==x&&(q++,x=0,E=f,F=E+t.width+f+m,B=B+z+l,z=0);I.translate(E,B);x++;!isNaN(k)&&x>=
354
+ k&&(x=0,q++,B=B+z+l,z=0);w.push(I)}t=w.getBBox();k=t.height+2*l-1;"left"==a||"right"==a?(h=t.width+2*f,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);s.push(c);s.translate(b,d);c.toBack();b=f;if("top"==a||"bottom"==a||"absolute"==a||"outside"==a)"center"==this.align?b=f+(h-t.width)/2:"right"==this.align&&(b=f+h-t.width);w.translate(b,l+1);this.titleHeight>k&&(k=this.titleHeight);
355
+ a=k+d+e+1;0>a&&(a=0);g.style.height=Math.round(a)+"px";r.setSize(this.divWidth,a)},createEntry:function(a){if(!1!==a.visibleInLegend){var b=this.chart,c=a.markerType;c||(c=this.markerType);var d=a.color,e=a.alpha;a.legendKeyColor&&(d=a.legendKeyColor());a.legendKeyAlpha&&(e=a.legendKeyAlpha());var f;!0===a.hidden&&(f=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,this.switchType=
356
+ void 0,"line"==m||"step"==m||"smoothedLine"==m||"ohlc"==m)g=k.set(),a.hidden||(d=a.lineColorR,f=a.bulletBorderColorR),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.bulletColorR),n=AmCharts.bullet(k,a.bullet,a.bulletSize,d,a.bulletAlpha,a.bulletBorderThickness,f,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());m=a.fillColorsR;!0===a.hidden&&(m=d);if(g=this.createMarker("rectangle",
356
357
  m,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,e,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&&a.switchable&&k.setAttr("cursor","pointer");(f=this.switchType)&&"none"!=f&&("x"==f?(q=this.createX(),q.translate(l/2,l/2)):q=this.createV(),q.dItem=a,!0!==a.hidden?"x"==f?q.hide():q.show():"x"!=f&&q.hide(),this.switchable||q.hide(),this.addListeners(q,
357
358
  a),a.legendSwitch=q,k.push(q));f=this.color;a.showBalloon&&this.textClickEnabled&&void 0!==this.selectedColor&&(f=this.selectedColor);this.useMarkerColorForLabels&&(f=d);!0===a.hidden&&(f=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 r;d&&(d=AmCharts.fixBrakes(d),a.legendTextReal=d,r=this.labelWidth,r=isNaN(r)?AmCharts.text(this.container,d,f,b.fontFamily,q,"start"):AmCharts.wrappedText(this.container,
358
359
  d,f,b.fontFamily,q,"start",!1,r,0),r.translate(this.lx+m,this.ly),k.push(r),b=r.getBBox().width,this.maxLabelWidth<b&&(this.maxLabelWidth=b));this.entries[this.index]=k;a.legendEntry=this.entries[this.index];a.legendLabel=r;this.index++}},addListeners:function(a,b){var c=this;a&&a.mouseover(function(a){c.rollOverMarker(b,a)}).mouseout(function(a){c.rollOutMarker(b,a)}).click(function(a){c.clickMarker(b,a)})},rollOverMarker:function(a,b){this.switchable&&this.dispatch("rollOverMarker",a,b);this.dispatch("rollOverItem",
@@ -1,10 +1,10 @@
1
- AmCharts.AmStockChart=AmCharts.Class({construct:function(a){this.type="stock";this.cname="AmStockChart";this.version="3.11.1";this.theme=a;this.createEvents("zoomed","rollOverStockEvent","rollOutStockEvent","clickStockEvent","panelRemoved","dataUpdated","init","rendered","drawn");this.colors="#FF6600 #FCD202 #B0DE09 #0D8ECF #2A0CD0 #CD0D74 #CC0000 #00CC00 #0000CC #DDDDDD #999999 #333333 #990000".split(" ");this.firstDayOfWeek=1;this.glueToTheEnd=!1;this.dataSetCounter=-1;this.zoomOutOnDataSetChange=
1
+ AmCharts.AmStockChart=AmCharts.Class({construct:function(a){this.type="stock";this.cname="AmStockChart";this.version="3.11.2";this.theme=a;this.createEvents("zoomed","rollOverStockEvent","rollOutStockEvent","clickStockEvent","panelRemoved","dataUpdated","init","rendered","drawn");this.colors="#FF6600 #FCD202 #B0DE09 #0D8ECF #2A0CD0 #CD0D74 #CC0000 #00CC00 #0000CC #DDDDDD #999999 #333333 #990000".split(" ");this.firstDayOfWeek=1;this.glueToTheEnd=!1;this.dataSetCounter=-1;this.zoomOutOnDataSetChange=
2
2
  !1;this.panels=[];this.dataSets=[];this.chartCursors=[];this.comparedDataSets=[];this.categoryAxesSettings=new AmCharts.CategoryAxesSettings(a);this.valueAxesSettings=new AmCharts.ValueAxesSettings(a);this.panelsSettings=new AmCharts.PanelsSettings(a);this.chartScrollbarSettings=new AmCharts.ChartScrollbarSettings(a);this.chartCursorSettings=new AmCharts.ChartCursorSettings(a);this.stockEventsSettings=new AmCharts.StockEventsSettings(a);this.legendSettings=new AmCharts.LegendSettings(a);this.balloon=
3
- new AmCharts.AmBalloon(a);this.previousEndDate=new Date(0);this.previousStartDate=new Date(0);this.dataSetCount=this.graphCount=0;this.chartCreated=!1;this.extendToFullPeriod=!0;AmCharts.applyTheme(this,a,this.cname)},write:function(a){var b=this.theme;AmCharts.callInitHandler(this);AmCharts.applyLang(this.language,this);var c=this.exportConfig;c&&AmCharts.AmExport&&!this.AmExport&&(this.AmExport=new AmCharts.AmExport(this,c));this.amExport&&AmCharts.AmExport&&(this.AmExport=AmCharts.extend(this.amExport,
4
- new AmCharts.AmExport(this),!0));this.AmExport&&this.AmExport.init();this.chartRendered=!1;a="object"!=typeof a?document.getElementById(a):a;this.zoomOutOnDataSetChange&&(this.endDate=this.startDate=void 0);this.categoryAxesSettings=AmCharts.processObject(this.categoryAxesSettings,AmCharts.CategoryAxesSettings,b);this.valueAxesSettings=AmCharts.processObject(this.valueAxesSettings,AmCharts.ValueAxesSettings,b);this.chartCursorSettings=AmCharts.processObject(this.chartCursorSettings,AmCharts.ChartCursorSettings,
5
- b);this.chartScrollbarSettings=AmCharts.processObject(this.chartScrollbarSettings,AmCharts.ChartScrollbarSettings,b);this.legendSettings=AmCharts.processObject(this.legendSettings,AmCharts.LegendSettings,b);this.panelsSettings=AmCharts.processObject(this.panelsSettings,AmCharts.PanelsSettings,b);this.stockEventsSettings=AmCharts.processObject(this.stockEventsSettings,AmCharts.StockEventsSettings,b);this.dataSetSelector&&(this.dataSetSelector=AmCharts.processObject(this.dataSetSelector,AmCharts.DataSetSelector,
6
- b));this.periodSelector&&(this.periodSelector=AmCharts.processObject(this.periodSelector,AmCharts.PeriodSelector,b));a.innerHTML="";this.div=a;this.measure();this.createLayout();this.updateDataSets();this.addDataSetSelector();this.addPeriodSelector();this.addPanels();this.updatePanels();this.addChartScrollbar();this.updateData();this.skipDefault||this.setDefaultPeriod()},setDefaultPeriod:function(a){var b=this.periodSelector;b&&(this.animationPlayed=!1,b.setDefaultPeriod(a))},validateSize:function(){var a,
7
- b=this.panels;this.measurePanels();for(a=0;a<b.length;a++)panel=b[a],panel.invalidateSize()},updateDataSets:function(){var a=this.mainDataSet,b=this.dataSets,c;for(c=0;c<b.length;c++){var d=b[c],d=AmCharts.processObject(d,AmCharts.DataSet);b[c]=d;d.id||(this.dataSetCount++,d.id="ds"+this.dataSetCount);void 0===d.color&&(d.color=this.colors.length-1>c?this.colors[c]:AmCharts.randomColor())}!a&&AmCharts.ifArray(b)&&(this.mainDataSet=this.dataSets[0])},updateEvents:function(a){AmCharts.ifArray(a.stockEvents)&&
3
+ new AmCharts.AmBalloon(a);this.previousEndDate=new Date(0);this.previousStartDate=new Date(0);this.dataSetCount=this.graphCount=0;this.chartCreated=!1;this.extendToFullPeriod=!0;AmCharts.applyTheme(this,a,this.cname)},write:function(a){var b=this.theme;this.initHC||(AmCharts.callInitHandler(this),this.initHC=!0);AmCharts.applyLang(this.language,this);var c=this.exportConfig;c&&AmCharts.AmExport&&!this.AmExport&&(this.AmExport=new AmCharts.AmExport(this,c));this.amExport&&AmCharts.AmExport&&(this.AmExport=
4
+ AmCharts.extend(this.amExport,new AmCharts.AmExport(this),!0));this.AmExport&&this.AmExport.init();this.chartRendered=!1;a="object"!=typeof a?document.getElementById(a):a;this.zoomOutOnDataSetChange&&(this.endDate=this.startDate=void 0);this.categoryAxesSettings=AmCharts.processObject(this.categoryAxesSettings,AmCharts.CategoryAxesSettings,b);this.valueAxesSettings=AmCharts.processObject(this.valueAxesSettings,AmCharts.ValueAxesSettings,b);this.chartCursorSettings=AmCharts.processObject(this.chartCursorSettings,
5
+ AmCharts.ChartCursorSettings,b);this.chartScrollbarSettings=AmCharts.processObject(this.chartScrollbarSettings,AmCharts.ChartScrollbarSettings,b);this.legendSettings=AmCharts.processObject(this.legendSettings,AmCharts.LegendSettings,b);this.panelsSettings=AmCharts.processObject(this.panelsSettings,AmCharts.PanelsSettings,b);this.stockEventsSettings=AmCharts.processObject(this.stockEventsSettings,AmCharts.StockEventsSettings,b);this.dataSetSelector&&(this.dataSetSelector=AmCharts.processObject(this.dataSetSelector,
6
+ AmCharts.DataSetSelector,b));this.periodSelector&&(this.periodSelector=AmCharts.processObject(this.periodSelector,AmCharts.PeriodSelector,b));a.innerHTML="";this.div=a;this.measure();this.createLayout();this.updateDataSets();this.addDataSetSelector();this.addPeriodSelector();this.addPanels();this.updatePanels();this.addChartScrollbar();this.updateData();this.skipDefault||this.setDefaultPeriod()},setDefaultPeriod:function(a){var b=this.periodSelector;b&&(this.animationPlayed=!1,b.setDefaultPeriod(a))},
7
+ validateSize:function(){var a,b=this.panels;this.measurePanels();for(a=0;a<b.length;a++)panel=b[a],panel.invalidateSize()},updateDataSets:function(){var a=this.mainDataSet,b=this.dataSets,c;for(c=0;c<b.length;c++){var d=b[c],d=AmCharts.processObject(d,AmCharts.DataSet);b[c]=d;d.id||(this.dataSetCount++,d.id="ds"+this.dataSetCount);void 0===d.color&&(d.color=this.colors.length-1>c?this.colors[c]:AmCharts.randomColor())}!a&&AmCharts.ifArray(b)&&(this.mainDataSet=this.dataSets[0])},updateEvents:function(a){AmCharts.ifArray(a.stockEvents)&&
8
8
  AmCharts.parseEvents(a,this.panels,this.stockEventsSettings,this.firstDayOfWeek,this,this.dataDateFormat)},getLastDate:function(a){var b=this.dataDateFormat;a=a instanceof Date?new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()):b?AmCharts.stringToDate(a,b):new Date(a);return new Date(AmCharts.changeDate(a,this.categoryAxesSettings.minPeriod,1,!0).getTime()-1)},getFirstDate:function(a){var b=this.dataDateFormat;a=a instanceof Date?new Date(a.getFullYear(),
9
9
  a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()):b?AmCharts.stringToDate(a,b):new Date(a);return new Date(AmCharts.resetDateToMin(a,this.categoryAxesSettings.minPeriod,1,this.firstDayOfWeek))},updateData:function(){var a=this.mainDataSet;if(a){var b=this.categoryAxesSettings;-1==AmCharts.getItemIndex(b.minPeriod,b.groupToPeriods)&&b.groupToPeriods.unshift(b.minPeriod);var c=a.dataProvider;if(AmCharts.ifArray(c)){var d=a.categoryField;this.firstDate=this.getFirstDate(c[0][d]);
10
10
  this.lastDate=this.getLastDate(c[c.length-1][d]);this.periodSelector&&this.periodSelector.setRanges(this.firstDate,this.lastDate);a.dataParsed||(AmCharts.parseStockData(a,b.minPeriod,b.groupToPeriods,this.firstDayOfWeek,this.dataDateFormat),a.dataParsed=!0);this.updateComparingData();this.updateEvents(a)}else this.lastDate=this.firstDate=void 0;this.glueToTheEnd&&this.startDate&&this.endDate&&this.lastDate&&(AmCharts.getPeriodDuration(b.minPeriod),this.startDate=new Date(this.startDate.getTime()+
@@ -86,11 +86,11 @@ c[d],e.compared&&(a={type:"dataSetUncompared",dataSet:e}),e.compared=!1;c=b.sele
86
86
  a)},getRealDiv:function(a){a||(a=window.event);a=a.currentTarget?a.currentTarget:a.srcElement;"amCBContainer"==a.parentNode.name&&(a=a.parentNode);return a},countDataSets:function(a){var b=this.dataProvider,c=0,d;for(d=0;d<b.length;d++)!0===b[d][a]&&c++;return c}});AmCharts.StackedBullet=AmCharts.Class({construct:function(){this.fontSize=11;this.stackDown=!1;this.mastHeight=8;this.shapes=[];this.backgroundColors=[];this.backgroundAlphas=[];this.borderAlphas=[];this.borderColors=[];this.colors=[];this.rollOverColors=[];this.showOnAxiss=[];this.values=[];this.showAts=[];this.textColor="#000000";this.nextY=0;this.size=16},parseConfig:function(){var a=this.bulletConfig;this.eventObjects=a.eventObjects;this.letters=a.letters;this.shapes=a.shapes;this.backgroundColors=
87
87
  a.backgroundColors;this.backgroundAlphas=a.backgroundAlphas;this.borderColors=a.borderColors;this.borderAlphas=a.borderAlphas;this.colors=a.colors;this.rollOverColors=a.rollOverColors;this.date=a.date;this.showOnAxiss=a.showOnAxis;this.axisCoordinate=a.minCoord;this.showAts=a.showAts;this.values=a.values},write:function(a){this.parseConfig();this.container=a;this.bullets=[];if(this.graph){var b=this.graph.fontSize;b&&(this.fontSize=b)}b=this.letters.length;(this.mastHeight+2*(this.fontSize/2+2))*
88
88
  b>this.availableSpace&&(this.stackDown=!0);this.set=a.set();a=0;var c;for(c=0;c<b;c++)this.shape=this.shapes[c],this.backgroundColor=this.backgroundColors[c],this.backgroundAlpha=this.backgroundAlphas[c],this.borderAlpha=this.borderAlphas[c],this.borderColor=this.borderColors[c],this.rollOverColor=this.rollOverColors[c],this.showOnAxis=this.showOnAxiss[c],this.color=this.colors[c],this.value=this.values[c],this.showAt=this.showAts[c],this.addLetter(this.letters[c],a,c),this.showOnAxis||a++},addLetter:function(a,
89
- b,c){var d=this.container;b=d.set();var e=-1,k=this.stackDown,f=this.graph.valueAxis;this.showOnAxis&&(this.stackDown=f.reversed?!0:!1);this.stackDown&&(e=1);var h=0,g=0,n=0,m,t=this.fontSize,r=this.mastHeight,v=this.shape,w=this.textColor;void 0!==this.color&&(w=this.color);void 0===a&&(a="");a=AmCharts.text(d,a,w,this.chart.fontFamily,this.fontSize);a.node.style.pointerEvents="none";d=a.getBBox();this.labelWidth=w=d.width;this.labelHeight=d.height;var l,d=0;switch(v){case "sign":l=this.drawSign(b);
90
- h=r+4+t/2;d=r+t+4;1==e&&(h-=4);break;case "flag":l=this.drawFlag(b);g=w/2+3;h=r+4+t/2;d=r+t+4;1==e&&(h-=4);break;case "pin":l=this.drawPin(b);h=6+t/2;d=t+8;break;case "triangleUp":l=this.drawTriangleUp(b);h=-t-1;d=t+4;e=-1;break;case "triangleDown":l=this.drawTriangleDown(b);h=t+1;d=t+4;e=-1;break;case "triangleLeft":l=this.drawTriangleLeft(b);g=t;d=t+4;e=-1;break;case "triangleRight":l=this.drawTriangleRight(b);g=-t;e=-1;d=t+4;break;case "arrowUp":l=this.drawArrowUp(b);a.hide();break;case "arrowDown":l=
91
- this.drawArrowDown(b);a.hide();d=t+4;break;case "text":e=-1;l=this.drawTextBackground(b,a);h=this.labelHeight+3;d=t+10;break;case "round":l=this.drawCircle(b)}this.bullets[c]=l;this.showOnAxis?(m=isNaN(this.nextAxisY)?this.axisCoordinate:this.nextY,n=h*e,this.nextAxisY=m+e*d):this.value?(m=this.value,f.recalculateToPercents&&(m=m/f.recBaseValue*100-100),m=f.getCoordinate(m)-this.bulletY,n=h*e):this.showAt?(l=this.graphDataItem.values,f.recalculateToPercents&&(l=this.graphDataItem.percents),l&&(m=
92
- f.getCoordinate(l[this.showAt])-this.bulletY,n=h*e)):(m=this.nextY,n=h*e);a.translate(g,n);b.push(a);b.translate(0,m);this.addEventListeners(b,c);this.nextY=m+e*d;this.stackDown=k},addEventListeners:function(a,b){var c=this;a.click(function(){c.handleClick(b)}).mouseover(function(){c.handleMouseOver(b)}).touchend(function(){c.handleMouseOver(b,!0)}).mouseout(function(){c.handleMouseOut(b)})},drawPin:function(a){var b=-1;this.stackDown&&(b=1);var c=this.fontSize+4;return this.drawRealPolygon(a,[0,
93
- c/2,c/2,-c/2,-c/2,0],[0,b*c/4,b*(c+c/4),b*(c+c/4),b*c/4,0])},drawSign:function(a){var b=-1;this.stackDown&&(b=1);var c=this.mastHeight*b,d=this.fontSize/2+2,e=AmCharts.line(this.container,[0,0],[0,c],this.borderColor,this.borderAlpha,1),k=AmCharts.circle(this.container,d,this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);k.translate(0,c+d*b);a.push(e);a.push(k);this.set.push(a);return k},drawFlag:function(a){var b=-1;this.stackDown&&(b=1);var c=this.fontSize+4,d=this.labelWidth+
89
+ b,c){var d=this.container;b=d.set();var e=-1,k=this.stackDown,f=this.graph.valueAxis;this.showOnAxis&&(this.stackDown=f.reversed?!0:!1);this.stackDown&&(e=1);var h=0,g=0,n=0,m,t=this.fontSize,r=this.mastHeight,v=this.shape,w=this.textColor;void 0!==this.color&&(w=this.color);void 0===a&&(a="");a=AmCharts.fixBrakes(a);a=AmCharts.text(d,a,w,this.chart.fontFamily,this.fontSize);a.node.style.pointerEvents="none";d=a.getBBox();this.labelWidth=w=d.width;this.labelHeight=d.height;var l,d=0;switch(v){case "sign":l=
90
+ this.drawSign(b);h=r+4+t/2;d=r+t+4;1==e&&(h-=4);break;case "flag":l=this.drawFlag(b);g=w/2+3;h=r+4+t/2;d=r+t+4;1==e&&(h-=4);break;case "pin":l=this.drawPin(b);h=6+t/2;d=t+8;break;case "triangleUp":l=this.drawTriangleUp(b);h=-t-1;d=t+4;e=-1;break;case "triangleDown":l=this.drawTriangleDown(b);h=t+1;d=t+4;e=-1;break;case "triangleLeft":l=this.drawTriangleLeft(b);g=t;d=t+4;e=-1;break;case "triangleRight":l=this.drawTriangleRight(b);g=-t;e=-1;d=t+4;break;case "arrowUp":l=this.drawArrowUp(b);a.hide();
91
+ break;case "arrowDown":l=this.drawArrowDown(b);a.hide();d=t+4;break;case "text":e=-1;l=this.drawTextBackground(b,a);h=this.labelHeight+3;d=t+10;break;case "round":l=this.drawCircle(b)}this.bullets[c]=l;this.showOnAxis?(m=isNaN(this.nextAxisY)?this.axisCoordinate:this.nextY,n=h*e,this.nextAxisY=m+e*d):this.value?(m=this.value,f.recalculateToPercents&&(m=m/f.recBaseValue*100-100),m=f.getCoordinate(m)-this.bulletY,n=h*e):this.showAt?(l=this.graphDataItem.values,f.recalculateToPercents&&(l=this.graphDataItem.percents),
92
+ l&&(m=f.getCoordinate(l[this.showAt])-this.bulletY,n=h*e)):(m=this.nextY,n=h*e);a.translate(g,n);b.push(a);b.translate(0,m);this.addEventListeners(b,c);this.nextY=m+e*d;this.stackDown=k},addEventListeners:function(a,b){var c=this;a.click(function(){c.handleClick(b)}).mouseover(function(){c.handleMouseOver(b)}).touchend(function(){c.handleMouseOver(b,!0)}).mouseout(function(){c.handleMouseOut(b)})},drawPin:function(a){var b=-1;this.stackDown&&(b=1);var c=this.fontSize+4;return this.drawRealPolygon(a,
93
+ [0,c/2,c/2,-c/2,-c/2,0],[0,b*c/4,b*(c+c/4),b*(c+c/4),b*c/4,0])},drawSign:function(a){var b=-1;this.stackDown&&(b=1);var c=this.mastHeight*b,d=this.fontSize/2+2,e=AmCharts.line(this.container,[0,0],[0,c],this.borderColor,this.borderAlpha,1),k=AmCharts.circle(this.container,d,this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);k.translate(0,c+d*b);a.push(e);a.push(k);this.set.push(a);return k},drawFlag:function(a){var b=-1;this.stackDown&&(b=1);var c=this.fontSize+4,d=this.labelWidth+
94
94
  6,e=this.mastHeight,b=1==b?b*e:b*e-c,e=AmCharts.line(this.container,[0,0],[0,b],this.borderColor,this.borderAlpha,1),c=AmCharts.polygon(this.container,[0,d,d,0],[0,0,c,c],this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);c.translate(0,b);a.push(e);a.push(c);this.set.push(a);return c},drawTriangleUp:function(a){var b=this.fontSize+7;return this.drawRealPolygon(a,[0,b/2,-b/2,0],[0,b,b,0])},drawArrowUp:function(a){var b=this.size,c=b/2,d=b/4;return this.drawRealPolygon(a,
95
95
  [0,c,d,d,-d,-d,-c,0],[0,c,c,b,b,c,c,0])},drawArrowDown:function(a){var b=this.size,c=b/2,d=b/4;return this.drawRealPolygon(a,[0,c,d,d,-d,-d,-c,0],[0,-c,-c,-b,-b,-c,-c,0])},drawTriangleDown:function(a){var b=this.fontSize+7;return this.drawRealPolygon(a,[0,b/2,-b/2,0],[0,-b,-b,0])},drawTriangleLeft:function(a){var b=this.fontSize+7;return this.drawRealPolygon(a,[0,b,b,0],[0,-b/2,b/2])},drawTriangleRight:function(a){var b=this.fontSize+7;return this.drawRealPolygon(a,[0,-b,-b,0],[0,-b/2,b/2,0])},drawRealPolygon:function(a,
96
96
  b,c){b=AmCharts.polygon(this.container,b,c,this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);a.push(b);this.set.push(a);return b},drawCircle:function(a){shape=AmCharts.circle(this.container,this.fontSize/2,this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);a.push(shape);this.set.push(a);return shape},drawTextBackground:function(a,b){var c=b.getBBox(),d=-c.width/2-5,e=c.width/2+5,c=-c.height-12;return this.drawRealPolygon(a,[d,-5,0,5,e,e,d,d],
@@ -1,17 +1,17 @@
1
1
  AmCharts.AmFunnelChart=AmCharts.Class({inherits:AmCharts.AmSlicedChart,construct:function(g){this.type="funnel";AmCharts.AmFunnelChart.base.construct.call(this,g);this.cname="AmFunnelChart";this.startX=this.startY=0;this.baseWidth="100%";this.neckHeight=this.neckWidth=0;this.rotate=!1;this.valueRepresents="height";this.pullDistance=30;this.labelPosition="center";this.labelText="[[title]]: [[value]]";this.balloonText="[[title]]: [[value]]\n[[description]]";AmCharts.applyTheme(this,g,this.cname)},drawChart:function(){AmCharts.AmFunnelChart.base.drawChart.call(this);
2
2
  var g=this.chartData;if(AmCharts.ifArray(g))if(0<this.realWidth&&0<this.realHeight){var d=Math.round(this.depth3D*Math.cos(this.angle*Math.PI/180)),a=Math.round(-this.depth3D*Math.sin(this.angle*Math.PI/180)),b=this.container,n=this.startDuration,e=this.rotate,u=this.updateWidth();this.realWidth=u;var f=this.updateHeight();this.realHeight=f;var l=AmCharts.toCoordinate,s=l(this.marginLeft,u),p=l(this.marginRight,u),c=l(this.marginTop,f)+this.getTitleHeight(),l=l(this.marginBottom,f);0<d&&0>a&&(this.neckHeight=
3
- this.neckWidth=0,e?l-=a/2:c-=a/2);var p=u-s-p,E=AmCharts.toCoordinate(this.baseWidth,p),C=AmCharts.toCoordinate(this.neckWidth,p),F=f-l-c,y=AmCharts.toCoordinate(this.neckHeight,F),w=c+F-y;e&&(c=f-l,w=c-F+y);this.firstSliceY=c;AmCharts.VML&&(this.startAlpha=1);for(var q=p/2+s,D=(F-y)/((E-C)/2),H=1,z=E/2,E=(F-y)*(E+C)/2+C*y,G=c,I=0,y=0;y<g.length;y++){var h=g[y],m;if(!0!==h.hidden){var A=[],t=[],k;if("height"==this.valueRepresents)k=F*h.percents/100;else{var r=-E*h.percents/100/2,B=z;m=-1/(2*D);k=
4
- Math.pow(B,2)-4*m*r;0>k&&(k=0);k=(Math.sqrt(k)-B)/(2*m);if(!e&&c>=w||e&&c<=w)k=2*-r/C;else if(!e&&c+k>w||e&&c-k<w)m=e?Math.round(k+(c-k-w)):Math.round(k-(c+k-w)),k=m/D,k=m+2*(-r-(B-k/2)*m)/C}r=z-k/D;B=!1;!e&&c+k>w||e&&c-k<w?(r=C/2,A.push(q-z,q+z,q+r,q+r,q-r,q-r),e?(m=k+(c-k-w),c<w&&(m=0),t.push(c,c,c-m,c-k,c-k,c-m,c)):(m=k-(c+k-w),c>w&&(m=0),t.push(c,c,c+m,c+k,c+k,c+m,c)),B=!0):(A.push(q-z,q+z,q+r,q-r),e?t.push(c,c,c-k,c-k):t.push(c,c,c+k,c+k));b.set();m=b.set();0<d&&0>a?(A=r/z,t=-1,e||(t=1),wedgeGraphics=
5
- (new AmCharts.Cuboid(b,2*z,t*k,d,a*H,h.color,h.alpha,this.outlineThickness,this.outlineColor,this.outlineAlpha,90,0,!1,0,h.pattern,A)).set,wedgeGraphics.translate(q-z,c-a/2*H),H*=A):wedgeGraphics=AmCharts.polygon(b,A,t,h.color,h.alpha,this.outlineThickness,this.outlineColor,this.outlineAlpha);m.push(wedgeGraphics);this.graphsSet.push(m);e||m.toBack();h.wedge=m;h.index=y;if(A=this.gradientRatio){var t=[],v;for(v=0;v<A.length;v++)t.push(AmCharts.adjustLuminosity(h.color,A[v]));0<t.length&&wedgeGraphics.gradient("linearGradient",
6
- t);h.pattern&&wedgeGraphics.pattern(h.pattern)}0<n&&(this.chartCreated||m.setAttr("opacity",this.startAlpha));this.addEventListeners(m,h);h.ty0=c-k/2;if(this.labelsEnabled&&this.labelText&&h.percents>=this.hideLabelsPercent){t=this.formatString(this.labelText,h);(A=this.labelFunction)&&(t=A(h,t));v=h.labelColor;v||(v=this.color);var A=this.labelPosition,x="left";"center"==A&&(x="middle");"left"==A&&(x="right");t=AmCharts.wrappedText(b,t,v,this.fontFamily,this.fontSize,x,!1,this.maxLabelWidth);t.node.style.pointerEvents=
7
- "none";m.push(t);v=q;e?(x=c-k/2,h.ty0=x):(x=c+k/2,h.ty0=x,x<G+I+5&&(x=G+I+5),x>f-l&&(x=f-l));"right"==A&&(v=p+10+s,h.tx0=q+(z-k/2/D),B&&(h.tx0=q+r));"left"==A&&(h.tx0=q-(z-k/2/D),B&&(h.tx0=q-r),v=s);h.label=t;h.labelX=v;h.labelY=x;h.labelHeight=t.getBBox().height;t.translate(v,x);z=t.getBBox();G=AmCharts.rect(b,z.width+5,z.height+5,"#ffffff",.005);G.translate(v+z.x,x+z.y);m.push(G);h.hitRect=G;I=t.getBBox().height;G=x}(0===h.alpha||0<n&&!this.chartCreated)&&m.hide();c=e?c-k:c+k;z=r;h.startX=AmCharts.toCoordinate(this.startX,
8
- u);h.startY=AmCharts.toCoordinate(this.startY,f);h.pullX=AmCharts.toCoordinate(this.pullDistance,u);h.pullY=0;h.balloonX=q;h.balloonY=h.ty0}}this.arrangeLabels();this.initialStart();(g=this.legend)&&g.invalidateSize()}else this.cleanChart();this.dispDUpd();this.chartCreated=!0},arrangeLabels:function(){var g=this.rotate,d;d=g?0:this.realHeight;for(var a=0,b=this.chartData,n=b.length,e,u=0;u<n;u++){e=b[n-u-1];var f=e.label,l=e.labelY,s=e.labelX,p=e.labelHeight,c=l;g?d+a+5>l&&(c=d+a+5):l+p+5>d&&(c=
9
- d-5-p);d=c;a=p;if(f){f.translate(s,c);var E=f.getBBox()}e.hitRect.translate(s+E.x,c+E.y);e.labelY=c;e.tx=s;e.ty=c;e.tx2=s}"center"!=this.labelPosition&&this.drawTicks()}});AmCharts.Cuboid=AmCharts.Class({construct:function(g,d,a,b,n,e,u,f,l,s,p,c,E,C,F,y){this.set=g.set();this.container=g;this.h=Math.round(a);this.w=Math.round(d);this.dx=b;this.dy=n;this.colors=e;this.alpha=u;this.bwidth=f;this.bcolor=l;this.balpha=s;this.dashLength=C;this.topRadius=y;this.pattern=F;(this.rotate=E)?0>d&&0===p&&(p=180):0>a&&270==p&&(p=90);this.gradientRotation=p;0===b&&0===n&&(this.cornerRadius=c);this.draw()},draw:function(){var g=this.set;g.clear();var d=this.container,a=this.w,b=
10
- this.h,n=this.dx,e=this.dy,u=this.colors,f=this.alpha,l=this.bwidth,s=this.bcolor,p=this.balpha,c=this.gradientRotation,E=this.cornerRadius,C=this.dashLength,F=this.pattern,y=this.topRadius,w=u,q=u;"object"==typeof u&&(w=u[0],q=u[u.length-1]);var D,H,z,G,I,h,m,A,t,k=f;F&&(f=0);var r,B,v,x,J=this.rotate;if(0<Math.abs(n)||0<Math.abs(e))if(isNaN(y))m=q,q=AmCharts.adjustLuminosity(w,-.2),q=AmCharts.adjustLuminosity(w,-.2),D=AmCharts.polygon(d,[0,n,a+n,a,0],[0,e,e,0,0],q,f,1,s,0,c),0<p&&(t=AmCharts.line(d,
11
- [0,n,a+n],[0,e,e],s,p,l,C)),H=AmCharts.polygon(d,[0,0,a,a,0],[0,b,b,0,0],q,f,1,s,0,c),H.translate(n,e),0<p&&(z=AmCharts.line(d,[n,n],[e,e+b],s,p,l,C)),G=AmCharts.polygon(d,[0,0,n,n,0],[0,b,b+e,e,0],q,f,1,s,0,c),I=AmCharts.polygon(d,[a,a,a+n,a+n,a],[0,b,b+e,e,0],q,f,1,s,0,c),0<p&&(h=AmCharts.line(d,[a,a+n,a+n,a],[0,e,b+e,b],s,p,l,C)),q=AmCharts.adjustLuminosity(m,.2),m=AmCharts.polygon(d,[0,n,a+n,a,0],[b,b+e,b+e,b,b],q,f,1,s,0,c),0<p&&(A=AmCharts.line(d,[0,n,a+n],[b,b+e,b+e],s,p,l,C));else{var K,L,
3
+ this.neckWidth=0,e?l-=a/2:c-=a/2);var p=u-s-p,E=AmCharts.toCoordinate(this.baseWidth,p),C=AmCharts.toCoordinate(this.neckWidth,p),F=f-l-c,y=AmCharts.toCoordinate(this.neckHeight,F),w=c+F-y;e&&(c=f-l,w=c-F+y);this.firstSliceY=c;AmCharts.VML&&(this.startAlpha=1);for(var q=p/2+s,D=(F-y)/((E-C)/2),G=1,z=E/2,E=(F-y)*(E+C)/2+C*y,H=c,I=0,y=0;y<g.length;y++){var h=g[y],m;if(!0!==h.hidden){var A=[],t=[],k;if("height"==this.valueRepresents)k=F*h.percents/100;else{var r=-E*h.percents/100/2,B=z;m=-1/(2*D);k=
4
+ Math.pow(B,2)-4*m*r;0>k&&(k=0);k=(Math.sqrt(k)-B)/(2*m);if(!e&&c>=w||e&&c<=w)k=2*-r/C;else if(!e&&c+k>w||e&&c-k<w)m=e?Math.round(k+(c-k-w)):Math.round(k-(c+k-w)),k=m/D,k=m+2*(-r-(B-k/2)*m)/C}r=z-k/D;B=!1;!e&&c+k>w||e&&c-k<w?(r=C/2,A.push(q-z,q+z,q+r,q+r,q-r,q-r),e?(m=k+(c-k-w),c<w&&(m=0),t.push(c,c,c-m,c-k,c-k,c-m,c)):(m=k-(c+k-w),c>w&&(m=0),t.push(c,c,c+m,c+k,c+k,c+m,c)),B=!0):(A.push(q-z,q+z,q+r,q-r),e?t.push(c,c,c-k,c-k):t.push(c,c,c+k,c+k));b.set();m=b.set();0<d&&0>a?(A=r/z,t=-1,e||(t=1),isNaN(G)&&
5
+ (G=0),wedgeGraphics=(new AmCharts.Cuboid(b,2*z,t*k,d,a*G,h.color,h.alpha,this.outlineThickness,this.outlineColor,this.outlineAlpha,90,0,!1,0,h.pattern,A)).set,wedgeGraphics.translate(q-z,c-a/2*G),G*=A):wedgeGraphics=AmCharts.polygon(b,A,t,h.color,h.alpha,this.outlineThickness,this.outlineColor,this.outlineAlpha);m.push(wedgeGraphics);this.graphsSet.push(m);e||m.toBack();h.wedge=m;h.index=y;if(A=this.gradientRatio){var t=[],v;for(v=0;v<A.length;v++)t.push(AmCharts.adjustLuminosity(h.color,A[v]));0<
6
+ t.length&&wedgeGraphics.gradient("linearGradient",t);h.pattern&&wedgeGraphics.pattern(h.pattern)}0<n&&(this.chartCreated||m.setAttr("opacity",this.startAlpha));this.addEventListeners(m,h);h.ty0=c-k/2;if(this.labelsEnabled&&this.labelText&&h.percents>=this.hideLabelsPercent){t=this.formatString(this.labelText,h);(A=this.labelFunction)&&(t=A(h,t));v=h.labelColor;v||(v=this.color);var A=this.labelPosition,x="left";"center"==A&&(x="middle");"left"==A&&(x="right");t=AmCharts.wrappedText(b,t,v,this.fontFamily,
7
+ this.fontSize,x,!1,this.maxLabelWidth);t.node.style.pointerEvents="none";m.push(t);v=q;e?(x=c-k/2,h.ty0=x):(x=c+k/2,h.ty0=x,x<H+I+5&&(x=H+I+5),x>f-l&&(x=f-l));"right"==A&&(v=p+10+s,h.tx0=q+(z-k/2/D),B&&(h.tx0=q+r));"left"==A&&(h.tx0=q-(z-k/2/D),B&&(h.tx0=q-r),v=s);h.label=t;h.labelX=v;h.labelY=x;h.labelHeight=t.getBBox().height;t.translate(v,x);z=t.getBBox();H=AmCharts.rect(b,z.width+5,z.height+5,"#ffffff",.005);H.translate(v+z.x,x+z.y);m.push(H);h.hitRect=H;I=t.getBBox().height;H=x}(0===h.alpha||
8
+ 0<n&&!this.chartCreated)&&m.hide();c=e?c-k:c+k;z=r;h.startX=AmCharts.toCoordinate(this.startX,u);h.startY=AmCharts.toCoordinate(this.startY,f);h.pullX=AmCharts.toCoordinate(this.pullDistance,u);h.pullY=0;h.balloonX=q;h.balloonY=h.ty0}}this.arrangeLabels();this.initialStart();(g=this.legend)&&g.invalidateSize()}else this.cleanChart();this.dispDUpd();this.chartCreated=!0},arrangeLabels:function(){var g=this.rotate,d;d=g?0:this.realHeight;for(var a=0,b=this.chartData,n=b.length,e,u=0;u<n;u++){e=b[n-
9
+ u-1];var f=e.label,l=e.labelY,s=e.labelX,p=e.labelHeight,c=l;g?d+a+5>l&&(c=d+a+5):l+p+5>d&&(c=d-5-p);d=c;a=p;if(f){f.translate(s,c);var E=f.getBBox()}e.hitRect&&e.hitRect.translate(s+E.x,c+E.y);e.labelY=c;e.tx=s;e.ty=c;e.tx2=s}"center"!=this.labelPosition&&this.drawTicks()}});AmCharts.Cuboid=AmCharts.Class({construct:function(g,d,a,b,n,e,u,f,l,s,p,c,E,C,F,y){this.set=g.set();this.container=g;this.h=Math.round(a);this.w=Math.round(d);this.dx=b;this.dy=n;this.colors=e;this.alpha=u;this.bwidth=f;this.bcolor=l;this.balpha=s;this.dashLength=C;this.topRadius=y;this.pattern=F;(this.rotate=E)?0>d&&0===p&&(p=180):0>a&&270==p&&(p=90);this.gradientRotation=p;0===b&&0===n&&(this.cornerRadius=c);this.draw()},draw:function(){var g=this.set;g.clear();var d=this.container,a=this.w,b=
10
+ this.h,n=this.dx,e=this.dy,u=this.colors,f=this.alpha,l=this.bwidth,s=this.bcolor,p=this.balpha,c=this.gradientRotation,E=this.cornerRadius,C=this.dashLength,F=this.pattern,y=this.topRadius,w=u,q=u;"object"==typeof u&&(w=u[0],q=u[u.length-1]);var D,G,z,H,I,h,m,A,t,k=f;F&&(f=0);var r,B,v,x,J=this.rotate;if(0<Math.abs(n)||0<Math.abs(e))if(isNaN(y))m=q,q=AmCharts.adjustLuminosity(w,-.2),q=AmCharts.adjustLuminosity(w,-.2),D=AmCharts.polygon(d,[0,n,a+n,a,0],[0,e,e,0,0],q,f,1,s,0,c),0<p&&(t=AmCharts.line(d,
11
+ [0,n,a+n],[0,e,e],s,p,l,C)),G=AmCharts.polygon(d,[0,0,a,a,0],[0,b,b,0,0],q,f,1,s,0,c),G.translate(n,e),0<p&&(z=AmCharts.line(d,[n,n],[e,e+b],s,p,l,C)),H=AmCharts.polygon(d,[0,0,n,n,0],[0,b,b+e,e,0],q,f,1,s,0,c),I=AmCharts.polygon(d,[a,a,a+n,a+n,a],[0,b,b+e,e,0],q,f,1,s,0,c),0<p&&(h=AmCharts.line(d,[a,a+n,a+n,a],[0,e,b+e,b],s,p,l,C)),q=AmCharts.adjustLuminosity(m,.2),m=AmCharts.polygon(d,[0,n,a+n,a,0],[b,b+e,b+e,b,b],q,f,1,s,0,c),0<p&&(A=AmCharts.line(d,[0,n,a+n],[b,b+e,b+e],s,p,l,C));else{var K,L,
12
12
  M;J?(K=b/2,q=n/2,M=b/2,L=a+n/2,B=Math.abs(b/2),r=Math.abs(n/2)):(q=a/2,K=e/2,L=a/2,M=b+e/2+1,r=Math.abs(a/2),B=Math.abs(e/2));v=r*y;x=B*y;.1<r&&.1<r&&(D=AmCharts.circle(d,r,w,f,l,s,p,!1,B),D.translate(q,K));.1<v&&.1<v&&(m=AmCharts.circle(d,v,AmCharts.adjustLuminosity(w,.5),f,l,s,p,!1,x),m.translate(L,M))}f=k;1>Math.abs(b)&&(b=0);1>Math.abs(a)&&(a=0);!isNaN(y)&&(0<Math.abs(n)||0<Math.abs(e))?(u=[w],u={fill:u,stroke:s,"stroke-width":l,"stroke-opacity":p,"fill-opacity":f},J?(f="M0,0 L"+a+","+(b/2-b/
13
13
  2*y),l=" B",0<a&&(l=" A"),AmCharts.VML?(f+=l+Math.round(a-v)+","+Math.round(b/2-x)+","+Math.round(a+v)+","+Math.round(b/2+x)+","+a+",0,"+a+","+b,f=f+(" L0,"+b)+(l+Math.round(-r)+","+Math.round(b/2-B)+","+Math.round(r)+","+Math.round(b/2+B)+",0,"+b+",0,0")):(f+="A"+v+","+x+",0,0,0,"+a+","+(b-b/2*(1-y))+"L0,"+b,f+="A"+r+","+B+",0,0,1,0,0"),r=90):(l=a/2-a/2*y,f="M0,0 L"+l+","+b,AmCharts.VML?(f="M0,0 L"+l+","+b,l=" B",0>b&&(l=" A"),f+=l+Math.round(a/2-v)+","+Math.round(b-x)+","+Math.round(a/2+v)+","+
14
14
  Math.round(b+x)+",0,"+b+","+a+","+b,f+=" L"+a+",0",f+=l+Math.round(a/2+r)+","+Math.round(B)+","+Math.round(a/2-r)+","+Math.round(-B)+","+a+",0,0,0"):(f+="A"+v+","+x+",0,0,0,"+(a-a/2*(1-y))+","+b+"L"+a+",0",f+="A"+r+","+B+",0,0,1,0,0"),r=180),d=d.path(f).attr(u),d.gradient("linearGradient",[w,AmCharts.adjustLuminosity(w,-.3),AmCharts.adjustLuminosity(w,-.3),w],r),J?d.translate(n/2,0):d.translate(0,e/2)):d=0===b?AmCharts.line(d,[0,a],[0,0],s,p,l,C):0===a?AmCharts.line(d,[0,0],[0,b],s,p,l,C):0<E?AmCharts.rect(d,
15
- a,b,u,f,l,s,p,E,c,C):AmCharts.polygon(d,[0,0,a,a,0],[0,b,b,0,0],u,f,l,s,p,c,!1,C);a=isNaN(y)?0>b?[D,t,H,z,G,I,h,m,A,d]:[m,A,H,z,G,I,D,t,h,d]:J?0<a?[D,d,m]:[m,d,D]:0>b?[D,d,m]:[m,d,D];for(b=0;b<a.length;b++)(n=a[b])&&g.push(n);F&&d.pattern(F)},width:function(g){this.w=Math.round(g);this.draw()},height:function(g){this.h=Math.round(g);this.draw()},animateHeight:function(g,d){var a=this;a.easing=d;a.totalFrames=Math.round(1E3*g/AmCharts.updateRate);a.rh=a.h;a.frame=0;a.height(1);setTimeout(function(){a.updateHeight.call(a)},
15
+ a,b,u,f,l,s,p,E,c,C):AmCharts.polygon(d,[0,0,a,a,0],[0,b,b,0,0],u,f,l,s,p,c,!1,C);a=isNaN(y)?0>b?[D,t,G,z,H,I,h,m,A,d]:[m,A,G,z,H,I,D,t,h,d]:J?0<a?[D,d,m]:[m,d,D]:0>b?[D,d,m]:[m,d,D];for(b=0;b<a.length;b++)(n=a[b])&&g.push(n);F&&d.pattern(F)},width:function(g){this.w=Math.round(g);this.draw()},height:function(g){this.h=Math.round(g);this.draw()},animateHeight:function(g,d){var a=this;a.easing=d;a.totalFrames=Math.round(1E3*g/AmCharts.updateRate);a.rh=a.h;a.frame=0;a.height(1);setTimeout(function(){a.updateHeight.call(a)},
16
16
  AmCharts.updateRate)},updateHeight:function(){var g=this;g.frame++;var d=g.totalFrames;g.frame<=d&&(d=g.easing(0,g.frame,1,g.rh-1,d),g.height(d),setTimeout(function(){g.updateHeight.call(g)},AmCharts.updateRate))},animateWidth:function(g,d){var a=this;a.easing=d;a.totalFrames=Math.round(1E3*g/AmCharts.updateRate);a.rw=a.w;a.frame=0;a.width(1);setTimeout(function(){a.updateWidth.call(a)},AmCharts.updateRate)},updateWidth:function(){var g=this;g.frame++;var d=g.totalFrames;g.frame<=d&&(d=g.easing(0,
17
17
  g.frame,1,g.rw-1,d),g.width(d),setTimeout(function(){g.updateWidth.call(g)},AmCharts.updateRate))}});
@@ -1,17 +1,17 @@
1
1
  AmCharts.AmXYChart=AmCharts.Class({inherits:AmCharts.AmRectangularChart,construct:function(a){this.type="xy";AmCharts.AmXYChart.base.construct.call(this,a);this.cname="AmXYChart";this.theme=a;this.createEvents("zoomed");this.maxZoomFactor=20;AmCharts.applyTheme(this,a,this.cname)},initChart:function(){AmCharts.AmXYChart.base.initChart.call(this);this.dataChanged&&(this.updateData(),this.dataChanged=!1,this.dispatchDataUpdated=!0);this.updateScrollbar=!0;this.drawChart();this.autoMargins&&!this.marginsUpdated&&
2
2
  (this.marginsUpdated=!0,this.measureMargins());var a=this.marginLeftReal,c=this.marginTopReal,b=this.plotAreaWidth,d=this.plotAreaHeight;this.graphsSet.clipRect(a,c,b,d);this.bulletSet.clipRect(a,c,b,d);this.trendLinesSet.clipRect(a,c,b,d)},prepareForExport:function(){var a=this.bulletSet;a.clipPath&&this.container.remove(a.clipPath)},createValueAxes:function(){var a=[],c=[];this.xAxes=a;this.yAxes=c;var b=this.valueAxes,d,e;for(e=0;e<b.length;e++){d=b[e];var f=d.position;if("top"==f||"bottom"==f)d.rotate=
3
3
  !0;d.setOrientation(d.rotate);f=d.orientation;"V"==f&&c.push(d);"H"==f&&a.push(d)}0===c.length&&(d=new AmCharts.ValueAxis(this.theme),d.rotate=!1,d.setOrientation(!1),b.push(d),c.push(d));0===a.length&&(d=new AmCharts.ValueAxis(this.theme),d.rotate=!0,d.setOrientation(!0),b.push(d),a.push(d));for(e=0;e<b.length;e++)this.processValueAxis(b[e],e);a=this.graphs;for(e=0;e<a.length;e++)this.processGraph(a[e],e)},drawChart:function(){AmCharts.AmXYChart.base.drawChart.call(this);AmCharts.ifArray(this.chartData)?
4
- (this.chartScrollbar&&this.updateScrollbars(),this.zoomChart()):this.cleanChart();if(this.hideXScrollbar){var a=this.scrollbarH;a&&(this.removeListener(a,"zoomed",this.handleHSBZoom),a.destroy());this.scrollbarH=null}if(this.hideYScrollbar){if(a=this.scrollbarV)this.removeListener(a,"zoomed",this.handleVSBZoom),a.destroy();this.scrollbarV=null}if(!this.autoMargins||this.marginsUpdated)this.dispDUpd(),this.chartCreated=!0,this.zoomScrollbars()},cleanChart:function(){AmCharts.callMethod("destroy",[this.valueAxes,
5
- this.graphs,this.scrollbarV,this.scrollbarH,this.chartCursor])},zoomChart:function(){this.toggleZoomOutButton();this.zoomObjects(this.valueAxes);this.zoomObjects(this.graphs);this.zoomTrendLines();this.dispatchAxisZoom()},toggleZoomOutButton:function(){1==this.heightMultiplier&&1==this.widthMultiplier?this.showZB(!1):this.showZB(!0)},dispatchAxisZoom:function(){var a=this.valueAxes,c;for(c=0;c<a.length;c++){var b=a[c];if(!isNaN(b.min)&&!isNaN(b.max)){var d,e;"V"==b.orientation?(d=b.coordinateToValue(-this.verticalPosition),
6
- e=b.coordinateToValue(-this.verticalPosition+this.plotAreaHeight)):(d=b.coordinateToValue(-this.horizontalPosition),e=b.coordinateToValue(-this.horizontalPosition+this.plotAreaWidth));if(!isNaN(d)&&!isNaN(e)){if(d>e){var f=e;e=d;d=f}b.dispatchZoomEvent(d,e)}}}},zoomObjects:function(a){var c=a.length,b;for(b=0;b<c;b++){var d=a[b];this.updateObjectSize(d);d.zoom(0,this.chartData.length-1)}},updateData:function(){this.parseData();var a=this.chartData,c=a.length-1,b=this.graphs,d=this.dataProvider,e=
7
- -Infinity,f=Infinity,k,g;for(k=0;k<b.length;k++)if(g=b[k],g.data=a,g.zoom(0,c),g=g.valueField){var m;for(m=0;m<d.length;m++){var h=Number(d[m][g]);h>e&&(e=h);h<f&&(f=h)}}for(k=0;k<b.length;k++)g=b[k],g.maxValue=e,g.minValue=f;if(a=this.chartCursor)a.updateData(),a.type="crosshair",a.valueBalloonsEnabled=!1},zoomOut:function(){this.verticalPosition=this.horizontalPosition=0;this.heightMultiplier=this.widthMultiplier=1;this.zoomChart();this.zoomScrollbars()},processValueAxis:function(a){a.chart=this;
8
- a.minMaxField="H"==a.orientation?"x":"y";a.minTemp=NaN;a.maxTemp=NaN;this.listenTo(a,"axisSelfZoomed",this.handleAxisSelfZoom)},processGraph:function(a){AmCharts.isString(a.xAxis)&&(a.xAxis=this.getValueAxisById(a.xAxis));AmCharts.isString(a.yAxis)&&(a.yAxis=this.getValueAxisById(a.yAxis));a.xAxis||(a.xAxis=this.xAxes[0]);a.yAxis||(a.yAxis=this.yAxes[0]);a.valueAxis=a.yAxis},parseData:function(){AmCharts.AmXYChart.base.parseData.call(this);this.chartData=[];var a=this.dataProvider,c=this.valueAxes,
9
- b=this.graphs,d;if(a)for(d=0;d<a.length;d++){var e={axes:{},x:{},y:{}},f=a[d],k;for(k=0;k<c.length;k++){var g=c[k].id;e.axes[g]={};e.axes[g].graphs={};var m;for(m=0;m<b.length;m++){var h=b[m],q=h.id;if(h.xAxis.id==g||h.yAxis.id==g){var n={};n.serialDataItem=e;n.index=d;var p={},l=Number(f[h.valueField]);isNaN(l)||(p.value=l);l=Number(f[h.xField]);isNaN(l)||(p.x=l);l=Number(f[h.yField]);isNaN(l)||(p.y=l);l=Number(f[h.errorField]);isNaN(l)||(p.error=l);n.values=p;this.processFields(h,n,f);n.serialDataItem=
10
- e;n.graph=h;e.axes[g].graphs[q]=n}}}this.chartData[d]=e}},formatString:function(a,c,b){var d=c.graph.numberFormatter;d||(d=this.nf);a=AmCharts.formatValue(a,c.values,["value","x","y"],d);-1!=a.indexOf("[[")&&(a=AmCharts.formatDataContextValue(a,c.dataContext));return a=AmCharts.AmXYChart.base.formatString.call(this,a,c,b)},addChartScrollbar:function(a){AmCharts.callMethod("destroy",[this.chartScrollbar,this.scrollbarH,this.scrollbarV]);if(a){this.chartScrollbar=a;this.scrollbarHeight=a.scrollbarHeight;
11
- var c="backgroundColor backgroundAlpha selectedBackgroundColor selectedBackgroundAlpha scrollDuration resizeEnabled hideResizeGrips scrollbarHeight updateOnReleaseOnly".split(" ");if(!this.hideYScrollbar){var b=new AmCharts.SimpleChartScrollbar(this.theme);b.skipEvent=!0;b.chart=this;this.listenTo(b,"zoomed",this.handleVSBZoom);AmCharts.copyProperties(a,b,c);b.rotate=!0;this.scrollbarV=b}this.hideXScrollbar||(b=new AmCharts.SimpleChartScrollbar(this.theme),b.skipEvent=!0,b.chart=this,this.listenTo(b,
12
- "zoomed",this.handleHSBZoom),AmCharts.copyProperties(a,b,c),b.rotate=!1,this.scrollbarH=b)}},updateTrendLines:function(){var a=this.trendLines,c;for(c=0;c<a.length;c++){var b=a[c],b=AmCharts.processObject(b,AmCharts.TrendLine,this.theme);a[c]=b;b.chart=this;var d=b.valueAxis;AmCharts.isString(d)&&(b.valueAxis=this.getValueAxisById(d));d=b.valueAxisX;AmCharts.isString(d)&&(b.valueAxisX=this.getValueAxisById(d));b.valueAxis||(b.valueAxis=this.yAxes[0]);b.valueAxisX||(b.valueAxisX=this.xAxes[0])}},updateMargins:function(){AmCharts.AmXYChart.base.updateMargins.call(this);
13
- var a=this.scrollbarV;a&&(this.getScrollbarPosition(a,!0,this.yAxes[0].position),this.adjustMargins(a,!0));if(a=this.scrollbarH)this.getScrollbarPosition(a,!1,this.xAxes[0].position),this.adjustMargins(a,!1)},updateScrollbars:function(){AmCharts.AmXYChart.base.updateScrollbars.call(this);var a=this.scrollbarV;a&&(this.updateChartScrollbar(a,!0),a.draw());if(a=this.scrollbarH)this.updateChartScrollbar(a,!1),a.draw()},zoomScrollbars:function(){var a=this.scrollbarH;a&&a.relativeZoom(this.widthMultiplier,
14
- -this.horizontalPosition/this.widthMultiplier);(a=this.scrollbarV)&&a.relativeZoom(this.heightMultiplier,-this.verticalPosition/this.heightMultiplier)},fitMultiplier:function(a){a>this.maxZoomFactor&&(a=this.maxZoomFactor);return a},handleHSBZoom:function(a){var c=this.fitMultiplier(a.multiplier);a=-a.position*c;var b=-(this.plotAreaWidth*c-this.plotAreaWidth);a<b&&(a=b);this.widthMultiplier=c;this.horizontalPosition=a;this.zoomChart()},handleVSBZoom:function(a){var c=this.fitMultiplier(a.multiplier);
15
- a=-a.position*c;var b=-(this.plotAreaHeight*c-this.plotAreaHeight);a<b&&(a=b);this.heightMultiplier=c;this.verticalPosition=a;this.zoomChart()},handleAxisSelfZoom:function(a){if("H"==a.valueAxis.orientation){var c=this.fitMultiplier(a.multiplier);a=-a.position*c;var b=-(this.plotAreaWidth*c-this.plotAreaWidth);a<b&&(a=b);this.horizontalPosition=a;this.widthMultiplier=c}else c=this.fitMultiplier(a.multiplier),a=-a.position*c,b=-(this.plotAreaHeight*c-this.plotAreaHeight),a<b&&(a=b),this.verticalPosition=
16
- a,this.heightMultiplier=c;this.zoomChart();c=this.graphs;for(a=0;a<c.length;a++)c[a].setAnimationPlayed();this.zoomScrollbars()},handleCursorZoom:function(a){var c=this.widthMultiplier*this.plotAreaWidth/a.selectionWidth,b=this.heightMultiplier*this.plotAreaHeight/a.selectionHeight,c=this.fitMultiplier(c),b=this.fitMultiplier(b);this.horizontalPosition=(this.horizontalPosition-a.selectionX)*c/this.widthMultiplier;this.verticalPosition=(this.verticalPosition-a.selectionY)*b/this.heightMultiplier;this.widthMultiplier=
4
+ (this.chartScrollbar&&this.updateScrollbars(),this.zoomObjects(this.valueAxes),this.zoomChart()):this.cleanChart();if(this.hideXScrollbar){var a=this.scrollbarH;a&&(this.removeListener(a,"zoomed",this.handleHSBZoom),a.destroy());this.scrollbarH=null}if(this.hideYScrollbar){if(a=this.scrollbarV)this.removeListener(a,"zoomed",this.handleVSBZoom),a.destroy();this.scrollbarV=null}if(!this.autoMargins||this.marginsUpdated)this.dispDUpd(),this.chartCreated=!0,this.zoomScrollbars()},cleanChart:function(){AmCharts.callMethod("destroy",
5
+ [this.valueAxes,this.graphs,this.scrollbarV,this.scrollbarH,this.chartCursor])},zoomChart:function(){this.toggleZoomOutButton();this.zoomObjects(this.valueAxes);this.zoomObjects(this.graphs);this.zoomTrendLines();this.dispatchAxisZoom()},toggleZoomOutButton:function(){1==this.heightMultiplier&&1==this.widthMultiplier?this.showZB(!1):this.showZB(!0)},dispatchAxisZoom:function(){var a=this.valueAxes,c;for(c=0;c<a.length;c++){var b=a[c];if(!isNaN(b.min)&&!isNaN(b.max)){var d,e;"V"==b.orientation?(d=
6
+ b.coordinateToValue(-this.verticalPosition),e=b.coordinateToValue(-this.verticalPosition+this.plotAreaHeight)):(d=b.coordinateToValue(-this.horizontalPosition),e=b.coordinateToValue(-this.horizontalPosition+this.plotAreaWidth));if(!isNaN(d)&&!isNaN(e)){if(d>e){var f=e;e=d;d=f}b.dispatchZoomEvent(d,e)}}}},zoomObjects:function(a){var c=a.length,b;for(b=0;b<c;b++){var d=a[b];d.minTemp=d.min;d.maxTemp=d.max;this.updateObjectSize(d);d.zoom(0,this.chartData.length-1)}d.minTemp=NaN;d.maxTemp=NaN},updateData:function(){this.parseData();
7
+ var a=this.chartData,c=a.length-1,b=this.graphs,d=this.dataProvider,e=-Infinity,f=Infinity,k,g;for(k=0;k<b.length;k++)if(g=b[k],g.data=a,g.zoom(0,c),g=g.valueField){var m;for(m=0;m<d.length;m++){var h=Number(d[m][g]);h>e&&(e=h);h<f&&(f=h)}}for(k=0;k<b.length;k++)g=b[k],g.maxValue=e,g.minValue=f;if(a=this.chartCursor)a.updateData(),a.type="crosshair",a.valueBalloonsEnabled=!1},zoomOut:function(){this.verticalPosition=this.horizontalPosition=0;this.heightMultiplier=this.widthMultiplier=1;this.zoomChart();
8
+ this.zoomScrollbars()},processValueAxis:function(a){a.chart=this;a.minMaxField="H"==a.orientation?"x":"y";a.min=NaN;a.max=NaN;this.listenTo(a,"axisSelfZoomed",this.handleAxisSelfZoom)},processGraph:function(a){AmCharts.isString(a.xAxis)&&(a.xAxis=this.getValueAxisById(a.xAxis));AmCharts.isString(a.yAxis)&&(a.yAxis=this.getValueAxisById(a.yAxis));a.xAxis||(a.xAxis=this.xAxes[0]);a.yAxis||(a.yAxis=this.yAxes[0]);a.valueAxis=a.yAxis},parseData:function(){AmCharts.AmXYChart.base.parseData.call(this);
9
+ this.chartData=[];var a=this.dataProvider,c=this.valueAxes,b=this.graphs,d;if(a)for(d=0;d<a.length;d++){var e={axes:{},x:{},y:{}},f=a[d],k;for(k=0;k<c.length;k++){var g=c[k].id;e.axes[g]={};e.axes[g].graphs={};var m;for(m=0;m<b.length;m++){var h=b[m],q=h.id;if(h.xAxis.id==g||h.yAxis.id==g){var n={};n.serialDataItem=e;n.index=d;var p={},l=Number(f[h.valueField]);isNaN(l)||(p.value=l);l=Number(f[h.xField]);isNaN(l)||(p.x=l);l=Number(f[h.yField]);isNaN(l)||(p.y=l);l=Number(f[h.errorField]);isNaN(l)||
10
+ (p.error=l);n.values=p;this.processFields(h,n,f);n.serialDataItem=e;n.graph=h;e.axes[g].graphs[q]=n}}}this.chartData[d]=e}},formatString:function(a,c,b){var d=c.graph.numberFormatter;d||(d=this.nf);a=AmCharts.formatValue(a,c.values,["value","x","y"],d);-1!=a.indexOf("[[")&&(a=AmCharts.formatDataContextValue(a,c.dataContext));return a=AmCharts.AmXYChart.base.formatString.call(this,a,c,b)},addChartScrollbar:function(a){AmCharts.callMethod("destroy",[this.chartScrollbar,this.scrollbarH,this.scrollbarV]);
11
+ if(a){this.chartScrollbar=a;this.scrollbarHeight=a.scrollbarHeight;var c="backgroundColor backgroundAlpha selectedBackgroundColor selectedBackgroundAlpha scrollDuration resizeEnabled hideResizeGrips scrollbarHeight updateOnReleaseOnly".split(" ");if(!this.hideYScrollbar){var b=new AmCharts.SimpleChartScrollbar(this.theme);b.skipEvent=!0;b.chart=this;this.listenTo(b,"zoomed",this.handleVSBZoom);AmCharts.copyProperties(a,b,c);b.rotate=!0;this.scrollbarV=b}this.hideXScrollbar||(b=new AmCharts.SimpleChartScrollbar(this.theme),
12
+ b.skipEvent=!0,b.chart=this,this.listenTo(b,"zoomed",this.handleHSBZoom),AmCharts.copyProperties(a,b,c),b.rotate=!1,this.scrollbarH=b)}},updateTrendLines:function(){var a=this.trendLines,c;for(c=0;c<a.length;c++){var b=a[c],b=AmCharts.processObject(b,AmCharts.TrendLine,this.theme);a[c]=b;b.chart=this;var d=b.valueAxis;AmCharts.isString(d)&&(b.valueAxis=this.getValueAxisById(d));d=b.valueAxisX;AmCharts.isString(d)&&(b.valueAxisX=this.getValueAxisById(d));b.valueAxis||(b.valueAxis=this.yAxes[0]);b.valueAxisX||
13
+ (b.valueAxisX=this.xAxes[0])}},updateMargins:function(){AmCharts.AmXYChart.base.updateMargins.call(this);var a=this.scrollbarV;a&&(this.getScrollbarPosition(a,!0,this.yAxes[0].position),this.adjustMargins(a,!0));if(a=this.scrollbarH)this.getScrollbarPosition(a,!1,this.xAxes[0].position),this.adjustMargins(a,!1)},updateScrollbars:function(){AmCharts.AmXYChart.base.updateScrollbars.call(this);var a=this.scrollbarV;a&&(this.updateChartScrollbar(a,!0),a.draw());if(a=this.scrollbarH)this.updateChartScrollbar(a,
14
+ !1),a.draw()},zoomScrollbars:function(){var a=this.scrollbarH;a&&a.relativeZoom(this.widthMultiplier,-this.horizontalPosition/this.widthMultiplier);(a=this.scrollbarV)&&a.relativeZoom(this.heightMultiplier,-this.verticalPosition/this.heightMultiplier)},fitMultiplier:function(a){a>this.maxZoomFactor&&(a=this.maxZoomFactor);return a},fitH:function(a,c){var b=-(this.plotAreaWidth*c-this.plotAreaWidth);a<b&&(a=b);this.horizontalPosition=a},fitV:function(a,c){var b=-(this.plotAreaHeight*c-this.plotAreaHeight);
15
+ a<b&&(a=b);this.verticalPosition=a},handleHSBZoom:function(a){var c=this.fitMultiplier(a.multiplier);this.fitH(-a.position*c,c);this.widthMultiplier=c;this.zoomChart()},handleVSBZoom:function(a){var c=this.fitMultiplier(a.multiplier);this.fitV(-a.position*c,c);this.heightMultiplier=c;this.zoomChart()},handleAxisSelfZoom:function(a){if("H"==a.valueAxis.orientation){var c=this.fitMultiplier(a.multiplier);this.fitH(-a.position*c,c);this.widthMultiplier=c}else c=this.fitMultiplier(a.multiplier),this.fitV(-a.position*
16
+ c,c),this.heightMultiplier=c;this.zoomChart();a=this.graphs;for(c=0;c<a.length;c++)a[c].setAnimationPlayed();this.zoomScrollbars()},handleCursorZoom:function(a){var c=this.widthMultiplier*this.plotAreaWidth/a.selectionWidth,b=this.heightMultiplier*this.plotAreaHeight/a.selectionHeight,c=this.fitMultiplier(c),b=this.fitMultiplier(b),d=(this.verticalPosition-a.selectionY)*b/this.heightMultiplier;this.fitH((this.horizontalPosition-a.selectionX)*c/this.widthMultiplier,c);this.fitV(d,b);this.widthMultiplier=
17
17
  c;this.heightMultiplier=b;this.zoomChart();this.zoomScrollbars()},removeChartScrollbar:function(){AmCharts.callMethod("destroy",[this.scrollbarH,this.scrollbarV]);this.scrollbarV=this.scrollbarH=null},handleReleaseOutside:function(a){AmCharts.AmXYChart.base.handleReleaseOutside.call(this,a);AmCharts.callMethod("handleReleaseOutside",[this.scrollbarH,this.scrollbarV])}});
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amcharts.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.11.1.14
4
+ version: 3.11.2.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Vandersluis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-20 00:00:00.000000000 Z
11
+ date: 2014-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  type: :runtime