amcharts.rb 3.4.7.5 → 3.4.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,19 +1,19 @@
1
- AmCharts.GaugeAxis=AmCharts.Class({construct:function(a){this.cname="GaugeAxis";this.radius="95%";this.startAngle=-120;this.endAngle=120;this.startValue=0;this.endValue=200;this.gridCount=5;this.tickLength=10;this.minorTickLength=5;this.tickColor="#555555";this.labelFrequency=this.tickThickness=this.tickAlpha=1;this.inside=!0;this.labelOffset=10;this.showLastLabel=this.showFirstLabel=!0;this.axisThickness=1;this.axisColor="#000000";this.axisAlpha=1;this.gridInside=!0;this.topTextYOffset=0;this.topTextBold=
2
- !0;this.bottomTextYOffset=0;this.bottomTextBold=!0;this.centerY=this.centerX="0%";this.bandOutlineAlpha=this.bandOutlineThickness=0;this.bandOutlineColor="#000000";this.bandAlpha=1;AmCharts.applyTheme(this,a,"GaugeAxis")},value2angle:function(a){return this.startAngle+this.singleValueAngle*a},setTopText:function(a){if(void 0!==a){this.topText=a;var b=this.chart;if(this.axisCreated){this.topTF&&this.topTF.remove();var d=this.topTextFontSize;d||(d=b.fontSize);var c=this.topTextColor;c||(c=b.color);
3
- a=AmCharts.text(b.container,a,c,b.fontFamily,d,void 0,this.topTextBold);a.translate(this.centerXReal,this.centerYReal-this.radiusReal/2+this.topTextYOffset);this.chart.graphsSet.push(a);this.topTF=a}}},setBottomText:function(a){if(void 0!==a){this.bottomText=a;var b=this.chart;if(this.axisCreated){this.bottomTF&&this.bottomTF.remove();var d=this.bottomTextFontSize;d||(d=b.fontSize);var c=this.bottomTextColor;c||(c=b.color);a=AmCharts.text(b.container,a,c,b.fontFamily,d,void 0,this.bottomTextBold);
4
- a.translate(this.centerXReal,this.centerYReal+this.radiusReal/2+this.bottomTextYOffset);this.bottomTF=a;this.chart.graphsSet.push(a)}}},draw:function(){var a=this.chart,b=a.graphsSet,d=this.startValue,c=this.endValue,e=this.valueInterval;isNaN(e)&&(e=(c-d)/this.gridCount);var m=this.minorTickInterval;isNaN(m)&&(m=e/5);var p=this.startAngle,h=this.endAngle,f=this.tickLength,k=(c-d)/e+1,g=(h-p)/(k-1);this.singleValueAngle=c=g/e;var l=a.container,r=this.tickColor,v=this.tickAlpha,C=this.tickThickness,
5
- D=e/m,F=g/D,m=this.minorTickLength,G=this.labelFrequency,t=this.radiusReal;this.inside||(t-=15);var y=a.centerX+AmCharts.toCoordinate(this.centerX,a.realWidth),z=a.centerY+AmCharts.toCoordinate(this.centerY,a.realHeight);this.centerXReal=y;this.centerYReal=z;var H={fill:this.axisColor,"fill-opacity":this.axisAlpha,"stroke-width":0,"stroke-opacity":0},n,A;this.gridInside?A=n=t:(n=t-f,A=n+m);var s=this.axisThickness/2,h=AmCharts.wedge(l,y,z,p,h-p,n+s,n+s,n-s,0,H);b.push(h);h=AmCharts.doNothing;AmCharts.isModern||
6
- (h=Math.round);H=AmCharts.getDecimals(e);for(n=0;n<k;n++){var q=d+n*e,s=p+n*g,w=h(y+t*Math.sin(s/180*Math.PI)),B=h(z-t*Math.cos(s/180*Math.PI)),x=h(y+(t-f)*Math.sin(s/180*Math.PI)),u=h(z-(t-f)*Math.cos(s/180*Math.PI)),w=AmCharts.line(l,[w,x],[B,u],r,v,C,0,!1,!1,!0);b.push(w);w=-1;x=this.labelOffset;this.inside||(x=-x-f,w=1);var B=Math.sin(s/180*Math.PI),u=Math.cos(s/180*Math.PI),B=y+(t-f-x)*B,x=z-(t-f-x)*u,E=this.fontSize;isNaN(E)&&(E=a.fontSize);var u=Math.sin((s-90)/180*Math.PI),J=Math.cos((s-90)/
7
- 180*Math.PI);if(0<G&&n/G==Math.round(n/G)&&(this.showLastLabel||n!=k-1)&&(this.showFirstLabel||0!==n)){var q=AmCharts.formatNumber(q,a.nf,H),I=this.unit;I&&(q="left"==this.unitPosition?I+q:q+I);q=AmCharts.text(l,q,a.color,a.fontFamily,E);E=q.getBBox();q.translate(B+w*E.width/2*J,x+w*E.height/2*u);b.push(q)}if(n<k-1)for(q=1;q<D;q++)u=s+F*q,w=h(y+A*Math.sin(u/180*Math.PI)),B=h(z-A*Math.cos(u/180*Math.PI)),x=h(y+(A-m)*Math.sin(u/180*Math.PI)),u=h(z-(A-m)*Math.cos(u/180*Math.PI)),w=AmCharts.line(l,[w,
8
- x],[B,u],r,v,C,0,!1,!1,!0),b.push(w)}if(b=this.bands)for(d=0;d<b.length;d++)if(e=b[d])r=e.startValue,v=e.endValue,f=AmCharts.toCoordinate(e.radius,t),isNaN(f)&&(f=A),k=AmCharts.toCoordinate(e.innerRadius,t),isNaN(k)&&(k=f-m),g=p+c*r,v=c*(v-r),C=e.outlineColor,void 0==C&&(C=this.bandOutlineColor),D=e.outlineThickness,isNaN(D)&&(D=this.bandOutlineThickness),F=e.outlineAlpha,isNaN(F)&&(F=this.bandOutlineAlpha),r=e.alpha,isNaN(r)&&(r=this.bandAlpha),e=AmCharts.wedge(l,y,z,g,v,f,f,k,0,{fill:e.color,stroke:C,
9
- "stroke-width":D,"stroke-opacity":F}),e.setAttr("opacity",r),a.gridSet.push(e);this.axisCreated=!0;this.setTopText(this.topText);this.setBottomText(this.bottomText);a=a.graphsSet.getBBox();this.width=a.width;this.height=a.height}});AmCharts.GaugeArrow=AmCharts.Class({construct:function(a){this.cname="GaugeArrow";this.color="#000000";this.nailAlpha=this.alpha=1;this.startWidth=this.nailRadius=8;this.endWidth=0;this.borderAlpha=1;this.radius="90%";this.nailBorderAlpha=this.innerRadius=0;this.nailBorderThickness=1;this.frame=0;AmCharts.applyTheme(this,a,"GaugeArrow")},setValue:function(a){var b=this.chart;b?b.setValue(this,a):this.previousValue=this.value=a}});
10
- AmCharts.GaugeBand=AmCharts.Class({construct:function(){this.cname="GaugeBand"}});AmCharts.AmAngularGauge=AmCharts.Class({inherits:AmCharts.AmChart,construct:function(a){this.cname="AmAngularGauge";AmCharts.AmAngularGauge.base.construct.call(this,a);this.theme=a;this.type="gauge";this.minRadius=this.marginRight=this.marginBottom=this.marginTop=this.marginLeft=10;this.faceColor="#FAFAFA";this.faceAlpha=0;this.faceBorderWidth=1;this.faceBorderColor="#555555";this.faceBorderAlpha=0;this.arrows=[];this.axes=[];this.startDuration=1;this.startEffect="easeOutSine";this.adjustSize=!0;
11
- this.extraHeight=this.extraWidth=0;AmCharts.applyTheme(this,a,this.cname)},addAxis:function(a){this.axes.push(a)},formatString:function(a,b){return a=AmCharts.formatValue(a,b,["value"],this.nf,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers)},initChart:function(){AmCharts.AmAngularGauge.base.initChart.call(this);var a;0===this.axes.length&&(a=new AmCharts.GaugeAxis(this.theme),this.addAxis(a));var b;for(b=0;b<this.axes.length;b++)a=this.axes[b],a=AmCharts.processObject(a,
12
- AmCharts.GaugeAxis,this.theme),a.chart=this,this.axes[b]=a;var d=this.arrows;for(b=0;b<d.length;b++){a=d[b];a=AmCharts.processObject(a,AmCharts.GaugeArrow,this.theme);a.chart=this;d[b]=a;var c=a.axis;AmCharts.isString(c)&&(a.axis=AmCharts.getObjById(this.axes,c));a.axis||(a.axis=this.axes[0]);isNaN(a.value)&&a.setValue(a.axis.startValue);isNaN(a.previousValue)&&(a.previousValue=a.axis.startValue)}this.setLegendData(d);this.drawChart();this.totalFrames=1E3*this.startDuration/AmCharts.updateRate},drawChart:function(){AmCharts.AmAngularGauge.base.drawChart.call(this);
13
- var a=this.container,b=this.updateWidth();this.realWidth=b;var d=this.updateHeight();this.realHeight=d;var c=AmCharts.toCoordinate,e=c(this.marginLeft,b),m=c(this.marginRight,b),p=c(this.marginTop,d)+this.getTitleHeight(),h=c(this.marginBottom,d),f=c(this.radius,b,d),c=b-e-m,k=d-p-h+this.extraHeight;f||(f=Math.min(c,k)/2);f<this.minRadius&&(f=this.minRadius);this.radiusReal=f;this.centerX=(b-e-m)/2+e;this.centerY=(d-p-h)/2+p+this.extraHeight/2;isNaN(this.gaugeX)||(this.centerX=this.gaugeX);isNaN(this.gaugeY)||
14
- (this.centerY=this.gaugeY);var b=this.faceAlpha,d=this.faceBorderAlpha,g;if(0<b||0<d)g=AmCharts.circle(a,f,this.faceColor,b,this.faceBorderWidth,this.faceBorderColor,d,!1),g.translate(this.centerX,this.centerY),g.toBack(),(a=this.facePattern)&&g.pattern(a);for(b=f=a=0;b<this.axes.length;b++)d=this.axes[b],d.radiusReal=AmCharts.toCoordinate(d.radius,this.radiusReal),d.draw(),d.width>a&&(a=d.width),d.height>f&&(f=d.height);(b=this.legend)&&b.invalidateSize();if(this.adjustSize&&!this.chartCreated){g&&
15
- (g=g.getBBox(),g.width>a&&(a=g.width),g.height>f&&(f=g.height));g=0;if(k>f||c>a)g=Math.min(k-f,c-a);0<g&&(this.extraHeight=k-f,this.chartCreated=!0,this.validateNow())}this.dispDUpd();this.chartCreated=!0},validateSize:function(){this.extraHeight=this.extraWidth=0;this.chartCreated=!1;AmCharts.AmAngularGauge.base.validateSize.call(this)},addArrow:function(a){this.arrows.push(a)},removeArrow:function(a){AmCharts.removeFromArray(this.arrows,a);this.validateNow()},removeAxis:function(a){AmCharts.removeFromArray(this.axes,
16
- a);this.validateNow()},drawArrow:function(a,b){a.set&&a.set.remove();var d=this.container;a.set=d.set();if(!a.hidden){var c=a.axis,e=c.radiusReal,m=c.centerXReal,p=c.centerYReal,h=a.startWidth,f=a.endWidth,k=AmCharts.toCoordinate(a.innerRadius,c.radiusReal),g=AmCharts.toCoordinate(a.radius,c.radiusReal);c.inside||(g-=15);var l=a.nailColor;l||(l=a.color);var r=a.nailColor;r||(r=a.color);l=AmCharts.circle(d,a.nailRadius,l,a.nailAlpha,a.nailBorderThickness,l,a.nailBorderAlpha);a.set.push(l);l.translate(m,
17
- p);isNaN(g)&&(g=e-c.tickLength);var c=Math.sin(b/180*Math.PI),e=Math.cos(b/180*Math.PI),l=Math.sin((b+90)/180*Math.PI),v=Math.cos((b+90)/180*Math.PI),d=AmCharts.polygon(d,[m-h/2*l+k*c,m+g*c-f/2*l,m+g*c+f/2*l,m+h/2*l+k*c],[p+h/2*v-k*e,p-g*e+f/2*v,p-g*e-f/2*v,p-h/2*v-k*e],a.color,a.alpha,1,r,a.borderAlpha,void 0,!0);a.set.push(d);this.graphsSet.push(a.set)}},setValue:function(a,b){a.axis&&(a.axis.value2angle(b),a.frame=0,a.previousValue=a.value);a.value=b;var d=this.legend;d&&d.updateValues()},handleLegendEvent:function(a){var b=
18
- a.type;a=a.dataItem;if(!this.legend.data&&a)switch(b){case "hideItem":this.hideArrow(a);break;case "showItem":this.showArrow(a)}},hideArrow:function(a){a.set.hide();a.hidden=!0},showArrow:function(a){a.set.show();a.hidden=!1},updateAnimations:function(){AmCharts.AmAngularGauge.base.updateAnimations.call(this);for(var a=this.arrows.length,b,d=0;d<a;d++){b=this.arrows[d];var c;b.frame>=this.totalFrames?c=b.value:(b.frame++,b.clockWiseOnly&&b.value<b.previousValue&&(c=b.axis,b.previousValue-=c.endValue-
1
+ AmCharts.GaugeAxis=AmCharts.Class({construct:function(a){this.cname="GaugeAxis";this.radius="95%";this.startAngle=-120;this.endAngle=120;this.startValue=0;this.endValue=200;this.gridCount=5;this.tickLength=10;this.minorTickLength=5;this.tickColor="#555555";this.labelFrequency=this.tickThickness=this.tickAlpha=1;this.inside=!0;this.labelOffset=10;this.showLastLabel=this.showFirstLabel=!0;this.axisThickness=1;this.axisColor="#000000";this.axisAlpha=1;this.gridInside=!0;this.topTextYOffset=0;this.topTextBold=
2
+ !0;this.bottomTextYOffset=0;this.bottomTextBold=!0;this.centerY=this.centerX="0%";this.bandOutlineAlpha=this.bandOutlineThickness=0;this.bandOutlineColor="#000000";this.bandAlpha=1;AmCharts.applyTheme(this,a,"GaugeAxis")},value2angle:function(a){return this.startAngle+this.singleValueAngle*a},setTopText:function(a){if(void 0!==a){this.topText=a;var b=this.chart;if(this.axisCreated){this.topTF&&this.topTF.remove();var d=this.topTextFontSize;d||(d=b.fontSize);var c=this.topTextColor;c||(c=b.color);
3
+ a=AmCharts.text(b.container,a,c,b.fontFamily,d,void 0,this.topTextBold);a.translate(this.centerXReal,this.centerYReal-this.radiusReal/2+this.topTextYOffset);this.chart.graphsSet.push(a);this.topTF=a}}},setBottomText:function(a){if(void 0!==a){this.bottomText=a;var b=this.chart;if(this.axisCreated){this.bottomTF&&this.bottomTF.remove();var d=this.bottomTextFontSize;d||(d=b.fontSize);var c=this.bottomTextColor;c||(c=b.color);a=AmCharts.text(b.container,a,c,b.fontFamily,d,void 0,this.bottomTextBold);
4
+ a.translate(this.centerXReal,this.centerYReal+this.radiusReal/2+this.bottomTextYOffset);this.bottomTF=a;this.chart.graphsSet.push(a)}}},draw:function(){var a=this.chart,b=a.graphsSet,d=this.startValue,c=this.endValue,e=this.valueInterval;isNaN(e)&&(e=(c-d)/this.gridCount);var m=this.minorTickInterval;isNaN(m)&&(m=e/5);var p=this.startAngle,h=this.endAngle,f=this.tickLength,k=(c-d)/e+1,g=(h-p)/(k-1);this.singleValueAngle=c=g/e;var l=a.container,r=this.tickColor,v=this.tickAlpha,C=this.tickThickness,
5
+ D=e/m,F=g/D,m=this.minorTickLength,G=this.labelFrequency,t=this.radiusReal;this.inside||(t-=15);var y=a.centerX+AmCharts.toCoordinate(this.centerX,a.realWidth),z=a.centerY+AmCharts.toCoordinate(this.centerY,a.realHeight);this.centerXReal=y;this.centerYReal=z;var H={fill:this.axisColor,"fill-opacity":this.axisAlpha,"stroke-width":0,"stroke-opacity":0},n,A;this.gridInside?A=n=t:(n=t-f,A=n+m);var s=this.axisThickness/2,h=AmCharts.wedge(l,y,z,p,h-p,n+s,n+s,n-s,0,H);b.push(h);h=AmCharts.doNothing;AmCharts.isModern||
6
+ (h=Math.round);H=AmCharts.getDecimals(e);for(n=0;n<k;n++){var q=d+n*e,s=p+n*g,w=h(y+t*Math.sin(s/180*Math.PI)),B=h(z-t*Math.cos(s/180*Math.PI)),x=h(y+(t-f)*Math.sin(s/180*Math.PI)),u=h(z-(t-f)*Math.cos(s/180*Math.PI)),w=AmCharts.line(l,[w,x],[B,u],r,v,C,0,!1,!1,!0);b.push(w);w=-1;x=this.labelOffset;this.inside||(x=-x-f,w=1);var B=Math.sin(s/180*Math.PI),u=Math.cos(s/180*Math.PI),B=y+(t-f-x)*B,x=z-(t-f-x)*u,E=this.fontSize;isNaN(E)&&(E=a.fontSize);var u=Math.sin((s-90)/180*Math.PI),J=Math.cos((s-90)/
7
+ 180*Math.PI);if(0<G&&n/G==Math.round(n/G)&&(this.showLastLabel||n!=k-1)&&(this.showFirstLabel||0!==n)){var q=AmCharts.formatNumber(q,a.nf,H),I=this.unit;I&&(q="left"==this.unitPosition?I+q:q+I);q=AmCharts.text(l,q,a.color,a.fontFamily,E);E=q.getBBox();q.translate(B+w*E.width/2*J,x+w*E.height/2*u);b.push(q)}if(n<k-1)for(q=1;q<D;q++)u=s+F*q,w=h(y+A*Math.sin(u/180*Math.PI)),B=h(z-A*Math.cos(u/180*Math.PI)),x=h(y+(A-m)*Math.sin(u/180*Math.PI)),u=h(z-(A-m)*Math.cos(u/180*Math.PI)),w=AmCharts.line(l,[w,
8
+ x],[B,u],r,v,C,0,!1,!1,!0),b.push(w)}if(b=this.bands)for(d=0;d<b.length;d++)if(e=b[d])r=e.startValue,v=e.endValue,f=AmCharts.toCoordinate(e.radius,t),isNaN(f)&&(f=A),k=AmCharts.toCoordinate(e.innerRadius,t),isNaN(k)&&(k=f-m),g=p+c*(r-this.startValue),v=c*(v-r),C=e.outlineColor,void 0==C&&(C=this.bandOutlineColor),D=e.outlineThickness,isNaN(D)&&(D=this.bandOutlineThickness),F=e.outlineAlpha,isNaN(F)&&(F=this.bandOutlineAlpha),r=e.alpha,isNaN(r)&&(r=this.bandAlpha),e=AmCharts.wedge(l,y,z,g,v,f,f,k,
9
+ 0,{fill:e.color,stroke:C,"stroke-width":D,"stroke-opacity":F}),e.setAttr("opacity",r),a.gridSet.push(e);this.axisCreated=!0;this.setTopText(this.topText);this.setBottomText(this.bottomText);a=a.graphsSet.getBBox();this.width=a.width;this.height=a.height}});AmCharts.GaugeArrow=AmCharts.Class({construct:function(a){this.cname="GaugeArrow";this.color="#000000";this.nailAlpha=this.alpha=1;this.startWidth=this.nailRadius=8;this.endWidth=0;this.borderAlpha=1;this.radius="90%";this.nailBorderAlpha=this.innerRadius=0;this.nailBorderThickness=1;this.frame=0;AmCharts.applyTheme(this,a,"GaugeArrow")},setValue:function(a){var b=this.chart;b?b.setValue(this,a):this.previousValue=this.value=a}});
10
+ AmCharts.GaugeBand=AmCharts.Class({construct:function(){this.cname="GaugeBand"}});AmCharts.AmAngularGauge=AmCharts.Class({inherits:AmCharts.AmChart,construct:function(a){this.cname="AmAngularGauge";AmCharts.AmAngularGauge.base.construct.call(this,a);this.theme=a;this.type="gauge";this.minRadius=this.marginRight=this.marginBottom=this.marginTop=this.marginLeft=10;this.faceColor="#FAFAFA";this.faceAlpha=0;this.faceBorderWidth=1;this.faceBorderColor="#555555";this.faceBorderAlpha=0;this.arrows=[];this.axes=[];this.startDuration=1;this.startEffect="easeOutSine";this.adjustSize=!0;
11
+ this.extraHeight=this.extraWidth=0;AmCharts.applyTheme(this,a,this.cname)},addAxis:function(a){this.axes.push(a)},formatString:function(a,b){return a=AmCharts.formatValue(a,b,["value"],this.nf,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers)},initChart:function(){AmCharts.AmAngularGauge.base.initChart.call(this);var a;0===this.axes.length&&(a=new AmCharts.GaugeAxis(this.theme),this.addAxis(a));var b;for(b=0;b<this.axes.length;b++)a=this.axes[b],a=AmCharts.processObject(a,
12
+ AmCharts.GaugeAxis,this.theme),a.chart=this,this.axes[b]=a;var d=this.arrows;for(b=0;b<d.length;b++){a=d[b];a=AmCharts.processObject(a,AmCharts.GaugeArrow,this.theme);a.chart=this;d[b]=a;var c=a.axis;AmCharts.isString(c)&&(a.axis=AmCharts.getObjById(this.axes,c));a.axis||(a.axis=this.axes[0]);isNaN(a.value)&&a.setValue(a.axis.startValue);isNaN(a.previousValue)&&(a.previousValue=a.axis.startValue)}this.setLegendData(d);this.drawChart();this.totalFrames=1E3*this.startDuration/AmCharts.updateRate},drawChart:function(){AmCharts.AmAngularGauge.base.drawChart.call(this);
13
+ var a=this.container,b=this.updateWidth();this.realWidth=b;var d=this.updateHeight();this.realHeight=d;var c=AmCharts.toCoordinate,e=c(this.marginLeft,b),m=c(this.marginRight,b),p=c(this.marginTop,d)+this.getTitleHeight(),h=c(this.marginBottom,d),f=c(this.radius,b,d),c=b-e-m,k=d-p-h+this.extraHeight;f||(f=Math.min(c,k)/2);f<this.minRadius&&(f=this.minRadius);this.radiusReal=f;this.centerX=(b-e-m)/2+e;this.centerY=(d-p-h)/2+p+this.extraHeight/2;isNaN(this.gaugeX)||(this.centerX=this.gaugeX);isNaN(this.gaugeY)||
14
+ (this.centerY=this.gaugeY);var b=this.faceAlpha,d=this.faceBorderAlpha,g;if(0<b||0<d)g=AmCharts.circle(a,f,this.faceColor,b,this.faceBorderWidth,this.faceBorderColor,d,!1),g.translate(this.centerX,this.centerY),g.toBack(),(a=this.facePattern)&&g.pattern(a);for(b=f=a=0;b<this.axes.length;b++)d=this.axes[b],d.radiusReal=AmCharts.toCoordinate(d.radius,this.radiusReal),d.draw(),d.width>a&&(a=d.width),d.height>f&&(f=d.height);(b=this.legend)&&b.invalidateSize();if(this.adjustSize&&!this.chartCreated){g&&
15
+ (g=g.getBBox(),g.width>a&&(a=g.width),g.height>f&&(f=g.height));g=0;if(k>f||c>a)g=Math.min(k-f,c-a);0<g&&(this.extraHeight=k-f,this.chartCreated=!0,this.validateNow())}this.dispDUpd();this.chartCreated=!0},validateSize:function(){this.extraHeight=this.extraWidth=0;this.chartCreated=!1;AmCharts.AmAngularGauge.base.validateSize.call(this)},addArrow:function(a){this.arrows.push(a)},removeArrow:function(a){AmCharts.removeFromArray(this.arrows,a);this.validateNow()},removeAxis:function(a){AmCharts.removeFromArray(this.axes,
16
+ a);this.validateNow()},drawArrow:function(a,b){a.set&&a.set.remove();var d=this.container;a.set=d.set();if(!a.hidden){var c=a.axis,e=c.radiusReal,m=c.centerXReal,p=c.centerYReal,h=a.startWidth,f=a.endWidth,k=AmCharts.toCoordinate(a.innerRadius,c.radiusReal),g=AmCharts.toCoordinate(a.radius,c.radiusReal);c.inside||(g-=15);var l=a.nailColor;l||(l=a.color);var r=a.nailColor;r||(r=a.color);l=AmCharts.circle(d,a.nailRadius,l,a.nailAlpha,a.nailBorderThickness,l,a.nailBorderAlpha);a.set.push(l);l.translate(m,
17
+ p);isNaN(g)&&(g=e-c.tickLength);var c=Math.sin(b/180*Math.PI),e=Math.cos(b/180*Math.PI),l=Math.sin((b+90)/180*Math.PI),v=Math.cos((b+90)/180*Math.PI),d=AmCharts.polygon(d,[m-h/2*l+k*c,m+g*c-f/2*l,m+g*c+f/2*l,m+h/2*l+k*c],[p+h/2*v-k*e,p-g*e+f/2*v,p-g*e-f/2*v,p-h/2*v-k*e],a.color,a.alpha,1,r,a.borderAlpha,void 0,!0);a.set.push(d);this.graphsSet.push(a.set)}},setValue:function(a,b){a.axis&&(a.axis.value2angle(b),a.frame=0,a.previousValue=a.value);a.value=b;var d=this.legend;d&&d.updateValues()},handleLegendEvent:function(a){var b=
18
+ a.type;a=a.dataItem;if(!this.legend.data&&a)switch(b){case "hideItem":this.hideArrow(a);break;case "showItem":this.showArrow(a)}},hideArrow:function(a){a.set.hide();a.hidden=!0},showArrow:function(a){a.set.show();a.hidden=!1},updateAnimations:function(){AmCharts.AmAngularGauge.base.updateAnimations.call(this);for(var a=this.arrows.length,b,d=0;d<a;d++){b=this.arrows[d];var c;b.frame>=this.totalFrames?c=b.value:(b.frame++,b.clockWiseOnly&&b.value<b.previousValue&&(c=b.axis,b.previousValue-=c.endValue-
19
19
  c.startValue),c=AmCharts.getEffect(this.startEffect),c=AmCharts[c](0,b.frame,b.previousValue,b.value-b.previousValue,this.totalFrames),isNaN(c)&&(c=b.value));c=b.axis.value2angle(c);this.drawArrow(b,c)}}});
@@ -1,10 +1,10 @@
1
- AmCharts.AmPieChart=AmCharts.Class({inherits:AmCharts.AmSlicedChart,construct:function(e){this.type="pie";AmCharts.AmPieChart.base.construct.call(this,e);this.cname="AmPieChart";this.pieBrightnessStep=30;this.minRadius=10;this.depth3D=0;this.startAngle=90;this.angle=this.innerRadius=0;this.startRadius="500%";this.pullOutRadius="20%";this.labelRadius=20;this.labelText="[[title]]: [[percents]]%";this.balloonText="[[title]]: [[percents]]% ([[value]])\n[[description]]";this.previousScale=1;AmCharts.applyTheme(this,
2
- e,this.cname)},drawChart:function(){AmCharts.AmPieChart.base.drawChart.call(this);var e=this.chartData;if(AmCharts.ifArray(e)){if(0<this.realWidth&&0<this.realHeight){AmCharts.VML&&(this.startAlpha=1);var g=this.startDuration,c=this.container,b=this.updateWidth();this.realWidth=b;var h=this.updateHeight();this.realHeight=h;var d=AmCharts.toCoordinate,k=d(this.marginLeft,b),a=d(this.marginRight,b),q=d(this.marginTop,h)+this.getTitleHeight(),l=d(this.marginBottom,h),v,w,f,s=AmCharts.toNumber(this.labelRadius),
3
- r=this.measureMaxLabel();this.labelText&&this.labelsEnabled||(s=r=0);v=void 0===this.pieX?(b-k-a)/2+k:d(this.pieX,this.realWidth);w=void 0===this.pieY?(h-q-l)/2+q:d(this.pieY,h);f=d(this.radius,b,h);f||(b=0<=s?b-k-a-2*r:b-k-a,h=h-q-l,f=Math.min(b,h),h<b&&(f/=1-this.angle/90,f>b&&(f=b)),h=AmCharts.toCoordinate(this.pullOutRadius,f),f=(0<=s?f-1.8*(s+h):f-1.8*h)/2);f<this.minRadius&&(f=this.minRadius);h=d(this.pullOutRadius,f);q=AmCharts.toCoordinate(this.startRadius,f);d=d(this.innerRadius,f);d>=f&&
4
- (d=f-1);l=AmCharts.fitToBounds(this.startAngle,0,360);0<this.depth3D&&(l=270<=l?270:90);l-=90;b=f-f*this.angle/90;for(k=0;k<e.length;k++)if(a=e[k],!0!==a.hidden&&0<a.percents){var m=360*a.percents/100,r=Math.sin((l+m/2)/180*Math.PI),x=-Math.cos((l+m/2)/180*Math.PI)*(b/f),p=this.outlineColor;p||(p=a.color);var t=this.alpha;isNaN(a.alpha)||(t=a.alpha);p={fill:a.color,stroke:p,"stroke-width":this.outlineThickness,"stroke-opacity":this.outlineAlpha,"fill-opacity":t};a.url&&(p.cursor="pointer");p=AmCharts.wedge(c,
5
- v,w,l,m,f,b,d,this.depth3D,p,this.gradientRatio,a.pattern);this.addEventListeners(p,a);a.startAngle=l;e[k].wedge=p;0<g&&(this.chartCreated||p.setAttr("opacity",this.startAlpha));a.ix=r;a.iy=x;a.wedge=p;a.index=k;if(this.labelsEnabled&&this.labelText&&a.percents>=this.hideLabelsPercent){var n=l+m/2,m=s;isNaN(a.labelRadius)||(m=a.labelRadius);var t=v+r*(f+m),B=w+x*(f+m),y,u=0;if(0<=m){var z;90>=n&&0<=n?(z=0,y="start",u=8):90<=n&&180>n?(z=1,y="start",u=8):180<=n&&270>n?(z=2,y="end",u=-8):270<=n&&360>
6
- n&&(z=3,y="end",u=-8);a.labelQuarter=z}else y="middle";var n=this.formatString(this.labelText,a),A=a.labelColor;A||(A=this.color);n=AmCharts.text(c,n,A,this.fontFamily,this.fontSize,y);n.translate(t+1.5*u,B);a.tx=t+1.5*u;a.ty=B;0<=m?p.push(n):this.freeLabelsSet.push(n);a.label=n;a.tx=t;a.tx2=t+u;a.tx0=v+r*f;a.ty0=w+x*f}m=d+(f-d)/2;a.pulled&&(m+=this.pullOutRadiusReal);a.balloonX=r*m+v;a.balloonY=x*m+w;a.startX=Math.round(r*q);a.startY=Math.round(x*q);a.pullX=Math.round(r*h);a.pullY=Math.round(x*h);
7
- this.graphsSet.push(p);(0===a.alpha||0<g&&!this.chartCreated)&&p.hide();l+=360*a.percents/100}0<s&&!this.labelRadiusField&&this.arrangeLabels();this.pieXReal=v;this.pieYReal=w;this.radiusReal=f;this.innerRadiusReal=d;0<s&&this.drawTicks();this.initialStart();this.setDepths()}(e=this.legend)&&e.invalidateSize()}else this.cleanChart();this.dispDUpd();this.chartCreated=!0},setDepths:function(){var e=this.chartData,g;for(g=0;g<e.length;g++){var c=e[g],b=c.wedge,c=c.startAngle;0<=c&&180>c?b.toFront():
8
- 180<=c&&b.toBack()}},arrangeLabels:function(){var e=this.chartData,g=e.length,c,b;for(b=g-1;0<=b;b--)c=e[b],0!==c.labelQuarter||c.hidden||this.checkOverlapping(b,c,0,!0,0);for(b=0;b<g;b++)c=e[b],1!=c.labelQuarter||c.hidden||this.checkOverlapping(b,c,1,!1,0);for(b=g-1;0<=b;b--)c=e[b],2!=c.labelQuarter||c.hidden||this.checkOverlapping(b,c,2,!0,0);for(b=0;b<g;b++)c=e[b],3!=c.labelQuarter||c.hidden||this.checkOverlapping(b,c,3,!1,0)},checkOverlapping:function(e,g,c,b,h){var d,k,a=this.chartData,q=a.length,
9
- l=g.label;if(l){if(!0===b)for(k=e+1;k<q;k++)a[k].labelQuarter==c&&(d=this.checkOverlappingReal(g,a[k],c))&&(k=q);else for(k=e-1;0<=k;k--)a[k].labelQuarter==c&&(d=this.checkOverlappingReal(g,a[k],c))&&(k=0);!0===d&&100>h&&(d=g.ty+3*g.iy,g.ty=d,l.translate(g.tx2,d),this.checkOverlapping(e,g,c,b,h+1))}},checkOverlappingReal:function(e,g,c){var b=!1,h=e.label,d=g.label;e.labelQuarter!=c||e.hidden||g.hidden||!d||(h=h.getBBox(),c={},c.width=h.width,c.height=h.height,c.y=e.ty,c.x=e.tx,e=d.getBBox(),d={},
10
- d.width=e.width,d.height=e.height,d.y=g.ty,d.x=g.tx,AmCharts.hitTest(c,d)&&(b=!0));return b}});
1
+ AmCharts.AmPieChart=AmCharts.Class({inherits:AmCharts.AmSlicedChart,construct:function(e){this.type="pie";AmCharts.AmPieChart.base.construct.call(this,e);this.cname="AmPieChart";this.pieBrightnessStep=30;this.minRadius=10;this.depth3D=0;this.startAngle=90;this.angle=this.innerRadius=0;this.startRadius="500%";this.pullOutRadius="20%";this.labelRadius=20;this.labelText="[[title]]: [[percents]]%";this.balloonText="[[title]]: [[percents]]% ([[value]])\n[[description]]";this.previousScale=1;AmCharts.applyTheme(this,
2
+ e,this.cname)},drawChart:function(){AmCharts.AmPieChart.base.drawChart.call(this);var e=this.chartData;if(AmCharts.ifArray(e)){if(0<this.realWidth&&0<this.realHeight){AmCharts.VML&&(this.startAlpha=1);var g=this.startDuration,c=this.container,b=this.updateWidth();this.realWidth=b;var h=this.updateHeight();this.realHeight=h;var d=AmCharts.toCoordinate,k=d(this.marginLeft,b),a=d(this.marginRight,b),q=d(this.marginTop,h)+this.getTitleHeight(),m=d(this.marginBottom,h),v,w,f,s=AmCharts.toNumber(this.labelRadius),
3
+ r=this.measureMaxLabel();this.labelText&&this.labelsEnabled||(s=r=0);v=void 0===this.pieX?(b-k-a)/2+k:d(this.pieX,this.realWidth);w=void 0===this.pieY?(h-q-m)/2+q:d(this.pieY,h);f=d(this.radius,b,h);f||(b=0<=s?b-k-a-2*r:b-k-a,h=h-q-m,f=Math.min(b,h),h<b&&(f/=1-this.angle/90,f>b&&(f=b)),h=AmCharts.toCoordinate(this.pullOutRadius,f),f=(0<=s?f-1.8*(s+h):f-1.8*h)/2);f<this.minRadius&&(f=this.minRadius);h=d(this.pullOutRadius,f);q=AmCharts.toCoordinate(this.startRadius,f);d=d(this.innerRadius,f);d>=f&&
4
+ (d=f-1);m=AmCharts.fitToBounds(this.startAngle,0,360);0<this.depth3D&&(m=270<=m?270:90);m-=90;b=f-f*this.angle/90;for(k=0;k<e.length;k++)if(a=e[k],!0!==a.hidden&&0<a.percents){var n=360*a.percents/100,r=Math.sin((m+n/2)/180*Math.PI),x=-Math.cos((m+n/2)/180*Math.PI)*(b/f),p=this.outlineColor;p||(p=a.color);var t=this.alpha;isNaN(a.alpha)||(t=a.alpha);p={fill:a.color,stroke:p,"stroke-width":this.outlineThickness,"stroke-opacity":this.outlineAlpha,"fill-opacity":t};a.url&&(p.cursor="pointer");p=AmCharts.wedge(c,
5
+ v,w,m,n,f,b,d,this.depth3D,p,this.gradientRatio,a.pattern);this.addEventListeners(p,a);a.startAngle=m;e[k].wedge=p;0<g&&(this.chartCreated||p.setAttr("opacity",this.startAlpha));a.ix=r;a.iy=x;a.wedge=p;a.index=k;if(this.labelsEnabled&&this.labelText&&a.percents>=this.hideLabelsPercent){var l=m+n/2;360<l&&(l-=360);n=s;isNaN(a.labelRadius)||(n=a.labelRadius);var t=v+r*(f+n),B=w+x*(f+n),y,u=0;if(0<=n){var z;90>=l&&0<=l?(z=0,y="start",u=8):90<=l&&180>l?(z=1,y="start",u=8):180<=l&&270>l?(z=2,y="end",u=
6
+ -8):270<=l&&360>l&&(z=3,y="end",u=-8);a.labelQuarter=z}else y="middle";var l=this.formatString(this.labelText,a),A=a.labelColor;A||(A=this.color);l=AmCharts.text(c,l,A,this.fontFamily,this.fontSize,y);l.translate(t+1.5*u,B);a.tx=t+1.5*u;a.ty=B;0<=n?p.push(l):this.freeLabelsSet.push(l);a.label=l;a.tx=t;a.tx2=t+u;a.tx0=v+r*f;a.ty0=w+x*f}n=d+(f-d)/2;a.pulled&&(n+=this.pullOutRadiusReal);a.balloonX=r*n+v;a.balloonY=x*n+w;a.startX=Math.round(r*q);a.startY=Math.round(x*q);a.pullX=Math.round(r*h);a.pullY=
7
+ Math.round(x*h);this.graphsSet.push(p);(0===a.alpha||0<g&&!this.chartCreated)&&p.hide();m+=360*a.percents/100}0<s&&!this.labelRadiusField&&this.arrangeLabels();this.pieXReal=v;this.pieYReal=w;this.radiusReal=f;this.innerRadiusReal=d;0<s&&this.drawTicks();this.initialStart();this.setDepths()}(e=this.legend)&&e.invalidateSize()}else this.cleanChart();this.dispDUpd();this.chartCreated=!0},setDepths:function(){var e=this.chartData,g;for(g=0;g<e.length;g++){var c=e[g],b=c.wedge,c=c.startAngle;0<=c&&180>
8
+ c?b.toFront():180<=c&&b.toBack()}},arrangeLabels:function(){var e=this.chartData,g=e.length,c,b;for(b=g-1;0<=b;b--)c=e[b],0!==c.labelQuarter||c.hidden||this.checkOverlapping(b,c,0,!0,0);for(b=0;b<g;b++)c=e[b],1!=c.labelQuarter||c.hidden||this.checkOverlapping(b,c,1,!1,0);for(b=g-1;0<=b;b--)c=e[b],2!=c.labelQuarter||c.hidden||this.checkOverlapping(b,c,2,!0,0);for(b=0;b<g;b++)c=e[b],3!=c.labelQuarter||c.hidden||this.checkOverlapping(b,c,3,!1,0)},checkOverlapping:function(e,g,c,b,h){var d,k,a=this.chartData,
9
+ q=a.length,m=g.label;if(m){if(!0===b)for(k=e+1;k<q;k++)a[k].labelQuarter==c&&(d=this.checkOverlappingReal(g,a[k],c))&&(k=q);else for(k=e-1;0<=k;k--)a[k].labelQuarter==c&&(d=this.checkOverlappingReal(g,a[k],c))&&(k=0);!0===d&&100>h&&(d=g.ty+3*g.iy,g.ty=d,m.translate(g.tx2,d),this.checkOverlapping(e,g,c,b,h+1))}},checkOverlappingReal:function(e,g,c){var b=!1,h=e.label,d=g.label;e.labelQuarter!=c||e.hidden||g.hidden||!d||(h=h.getBBox(),c={},c.width=h.width,c.height=h.height,c.y=e.ty,c.x=e.tx,e=d.getBBox(),
10
+ d={},d.width=e.width,d.height=e.height,d.y=g.ty,d.x=g.tx,AmCharts.hitTest(c,d)&&(b=!0));return b}});
@@ -43,10 +43,11 @@ u=m.count,q=h);s=e;"WW"==s&&(s="DD");this.stepWidth=this.getStepWidth(b);k=Math.
43
43
  e,u,y).getTime())for(y=0,x=g,b=h;b<v;b++)m=this.data[b].time,this.checkPeriodChange(e,u,m,x)&&(y++,2<=y&&(q=b,b=v),x=m);t&&1<u&&(w=this.chooseMinorFrequency(u),AmCharts.getPeriodDuration(e,w));for(b=h;b<v;b++)if(m=this.data[b].time,this.checkPeriodChange(e,u,m,g)&&b>=q){h=this.getCoordinate(b-this.start);A=!1;this.nextPeriod[s]&&(A=this.checkPeriodChange(this.nextPeriod[s],1,m,g,s));t=!1;A&&this.markPeriodChange?(g=this.dateFormatsObject[this.nextPeriod[s]],t=!0):g=this.dateFormatsObject[s];g=AmCharts.formatDate(new Date(m),
44
44
  g);if(b==d&&!n||b==k&&!l)g=" ";B?B=!1:(r||(t=!1),h-this.previousPos>this.safeDistance*Math.cos(this.labelRotation*Math.PI/180)&&(this.labelFunction&&(g=this.labelFunction(g,new Date(m),this,e,u,p)),p=new this.axisItemRenderer(this,h,g,void 0,void 0,void 0,void 0,t),y=p.graphics(),this.pushAxisItem(p),p=y.getBBox().width,AmCharts.isModern||(p-=h),this.previousPos=h+p));p=g=m}else isNaN(w)||(this.checkPeriodChange(e,w,m,C)&&(this.gridAlpha=this.minorGridAlpha,h=this.getCoordinate(b-this.start),t=new this.axisItemRenderer(this,
45
45
  h),this.pushAxisItem(t),C=m),this.gridAlpha=a)}for(b=0;b<this.data.length;b++)if(n=this.data[b])l=this.parseDates&&!this.equalSpacing?Math.round((n.time-this.startTime)*this.stepWidth+this.cellWidth/2):this.getCoordinate(b-f),n.x[this.id]=l;n=this.guides.length;for(b=0;b<n;b++)l=this.guides[b],r=r=r=a=d=NaN,w=l.above,l.toCategory&&(r=c.getCategoryIndexByValue(l.toCategory),isNaN(r)||(d=this.getCoordinate(r-f),p=new this.axisItemRenderer(this,d,"",!0,NaN,NaN,l),this.pushAxisItem(p,w))),l.category&&
46
- (r=c.getCategoryIndexByValue(l.category),isNaN(r)||(a=this.getCoordinate(r-f),r=(d-a)/2,p=new this.axisItemRenderer(this,a,l.label,!0,NaN,r,l),this.pushAxisItem(p,w))),l.toDate&&(this.equalSpacing?(r=c.getClosestIndex(this.data,"time",l.toDate.getTime(),!1,0,this.data.length-1),isNaN(r)||(d=this.getCoordinate(r-f))):d=(l.toDate.getTime()-this.startTime)*this.stepWidth,p=new this.axisItemRenderer(this,d,"",!0,NaN,NaN,l),this.pushAxisItem(p,w)),l.date&&(this.equalSpacing?(r=c.getClosestIndex(this.data,
47
- "time",l.date.getTime(),!1,0,this.data.length-1),isNaN(r)||(a=this.getCoordinate(r-f))):a=(l.date.getTime()-this.startTime)*this.stepWidth,r=(d-a)/2,p="H"==this.orientation?new this.axisItemRenderer(this,a,l.label,!1,2*r,NaN,l):new this.axisItemRenderer(this,a,l.label,!1,NaN,r,l),this.pushAxisItem(p,w)),d=new this.guideFillRenderer(this,a,d,l),a=d.graphics(),this.pushAxisItem(d,w),l.graphics=a,a.index=b,l.balloonText&&this.addEventListeners(a,l)}this.axisCreated=!0;c=this.x;f=this.y;this.set.translate(c,
48
- f);this.labelsSet.translate(c,f);this.positionTitle();(c=this.axisLine.set)&&c.toFront();c=this.getBBox().height;2<c-this.previousHeight&&this.autoWrap&&!this.parseDates&&(this.axisCreated=this.chart.marginsUpdated=!1);this.previousHeight=c},chooseMinorFrequency:function(a){for(var b=10;0<b;b--)if(a/b==Math.round(a/b))return a/b},choosePeriod:function(a){var b=AmCharts.getPeriodDuration(this.periods[a].period,this.periods[a].count),c=Math.ceil(this.timeDifference/b),d=this.periods;return this.timeDifference<
49
- b&&0<a?d[a-1]:c<=this.gridCountR?d[a]:a+1<d.length?this.choosePeriod(a+1):d[a]},getStepWidth:function(a){var b;this.startOnAxis?(b=this.axisWidth/(a-1),1==a&&(b=this.axisWidth)):b=this.axisWidth/a;return b},getCoordinate:function(a){a*=this.stepWidth;this.startOnAxis||(a+=this.stepWidth/2);return Math.round(a)},timeZoom:function(a,b){this.startTime=a;this.endTime=b},minDuration:function(){var a=AmCharts.extractPeriod(this.minPeriod);return AmCharts.getPeriodDuration(a.period,a.count)},checkPeriodChange:function(a,
50
- b,c,d,e){c=new Date(c);var f=new Date(d),k=this.firstDayOfWeek;d=b;"DD"==a&&(b=1);c=AmCharts.resetDateToMin(c,a,b,k).getTime();b=AmCharts.resetDateToMin(f,a,b,k).getTime();return"DD"==a&&"hh"!=e&&c-b<=AmCharts.getPeriodDuration(a,d)?!1:c!=b?!0:!1},generateDFObject:function(){this.dateFormatsObject={};var a;for(a=0;a<this.dateFormats.length;a++){var b=this.dateFormats[a];this.dateFormatsObject[b.period]=b.format}},xToIndex:function(a){var b=this.data,c=this.chart,d=c.rotate,e=this.stepWidth;this.parseDates&&
51
- !this.equalSpacing?(a=this.startTime+Math.round(a/e)-this.minDuration()/2,c=c.getClosestIndex(b,"time",a,!1,this.start,this.end+1)):(this.startOnAxis||(a-=e/2),c=this.start+Math.round(a/e));var c=AmCharts.fitToBounds(c,0,b.length-1),f;b[c]&&(f=b[c].x[this.id]);d?f>this.height+1&&c--:f>this.width+1&&c--;0>f&&c++;return c=AmCharts.fitToBounds(c,0,b.length-1)},dateToCoordinate:function(a){return this.parseDates&&!this.equalSpacing?(a.getTime()-this.startTime)*this.stepWidth:this.parseDates&&this.equalSpacing?
52
- (a=this.chart.getClosestIndex(this.data,"time",a.getTime(),!1,0,this.data.length-1),this.getCoordinate(a-this.start)):NaN},categoryToCoordinate:function(a){return this.chart?(a=this.chart.getCategoryIndexByValue(a),this.getCoordinate(a-this.start)):NaN},coordinateToDate:function(a){return this.equalSpacing?(a=this.xToIndex(a),new Date(this.data[a].time)):new Date(this.startTime+a/this.stepWidth)}});
46
+ (r=c.getCategoryIndexByValue(l.category),isNaN(r)||(a=this.getCoordinate(r-f),r=(d-a)/2,p=new this.axisItemRenderer(this,a,l.label,!0,NaN,r,l),this.pushAxisItem(p,w))),l.toDate&&(l.toDate instanceof Date||(l.toDate=AmCharts.stringToDate(l.toDate,c.dataDateFormat)),this.equalSpacing?(r=c.getClosestIndex(this.data,"time",l.toDate.getTime(),!1,0,this.data.length-1),isNaN(r)||(d=this.getCoordinate(r-f))):d=(l.toDate.getTime()-this.startTime)*this.stepWidth,p=new this.axisItemRenderer(this,d,"",!0,NaN,
47
+ NaN,l),this.pushAxisItem(p,w)),l.date&&(l.date instanceof Date||(l.date=AmCharts.stringToDate(l.date,c.dataDateFormat)),this.equalSpacing?(r=c.getClosestIndex(this.data,"time",l.date.getTime(),!1,0,this.data.length-1),isNaN(r)||(a=this.getCoordinate(r-f))):a=(l.date.getTime()-this.startTime)*this.stepWidth,r=(d-a)/2,p="H"==this.orientation?new this.axisItemRenderer(this,a,l.label,!1,2*r,NaN,l):new this.axisItemRenderer(this,a,l.label,!1,NaN,r,l),this.pushAxisItem(p,w)),d=new this.guideFillRenderer(this,
48
+ a,d,l),a=d.graphics(),this.pushAxisItem(d,w),l.graphics=a,a.index=b,l.balloonText&&this.addEventListeners(a,l)}this.axisCreated=!0;c=this.x;f=this.y;this.set.translate(c,f);this.labelsSet.translate(c,f);this.positionTitle();(c=this.axisLine.set)&&c.toFront();c=this.getBBox().height;2<c-this.previousHeight&&this.autoWrap&&!this.parseDates&&(this.axisCreated=this.chart.marginsUpdated=!1);this.previousHeight=c},chooseMinorFrequency:function(a){for(var b=10;0<b;b--)if(a/b==Math.round(a/b))return a/b},
49
+ choosePeriod:function(a){var b=AmCharts.getPeriodDuration(this.periods[a].period,this.periods[a].count),c=Math.ceil(this.timeDifference/b),d=this.periods;return this.timeDifference<b&&0<a?d[a-1]:c<=this.gridCountR?d[a]:a+1<d.length?this.choosePeriod(a+1):d[a]},getStepWidth:function(a){var b;this.startOnAxis?(b=this.axisWidth/(a-1),1==a&&(b=this.axisWidth)):b=this.axisWidth/a;return b},getCoordinate:function(a){a*=this.stepWidth;this.startOnAxis||(a+=this.stepWidth/2);return Math.round(a)},timeZoom:function(a,
50
+ b){this.startTime=a;this.endTime=b},minDuration:function(){var a=AmCharts.extractPeriod(this.minPeriod);return AmCharts.getPeriodDuration(a.period,a.count)},checkPeriodChange:function(a,b,c,d,e){c=new Date(c);var f=new Date(d),k=this.firstDayOfWeek;d=b;"DD"==a&&(b=1);c=AmCharts.resetDateToMin(c,a,b,k).getTime();b=AmCharts.resetDateToMin(f,a,b,k).getTime();return"DD"==a&&"hh"!=e&&c-b<=AmCharts.getPeriodDuration(a,d)?!1:c!=b?!0:!1},generateDFObject:function(){this.dateFormatsObject={};var a;for(a=0;a<
51
+ this.dateFormats.length;a++){var b=this.dateFormats[a];this.dateFormatsObject[b.period]=b.format}},xToIndex:function(a){var b=this.data,c=this.chart,d=c.rotate,e=this.stepWidth;this.parseDates&&!this.equalSpacing?(a=this.startTime+Math.round(a/e)-this.minDuration()/2,c=c.getClosestIndex(b,"time",a,!1,this.start,this.end+1)):(this.startOnAxis||(a-=e/2),c=this.start+Math.round(a/e));var c=AmCharts.fitToBounds(c,0,b.length-1),f;b[c]&&(f=b[c].x[this.id]);d?f>this.height+1&&c--:f>this.width+1&&c--;0>f&&
52
+ c++;return c=AmCharts.fitToBounds(c,0,b.length-1)},dateToCoordinate:function(a){return this.parseDates&&!this.equalSpacing?(a.getTime()-this.startTime)*this.stepWidth:this.parseDates&&this.equalSpacing?(a=this.chart.getClosestIndex(this.data,"time",a.getTime(),!1,0,this.data.length-1),this.getCoordinate(a-this.start)):NaN},categoryToCoordinate:function(a){return this.chart?(a=this.chart.getCategoryIndexByValue(a),this.getCoordinate(a-this.start)):NaN},coordinateToDate:function(a){return this.equalSpacing?
53
+ (a=this.xToIndex(a),new Date(this.data[a].time)):new Date(this.startTime+a/this.stepWidth)}});
@@ -1,206 +1,206 @@
1
- AmCharts.themes.black = {
2
-
3
- themeName: "black",
4
-
5
- AmChart: {
6
- color: "#e7e7e7"
7
- },
8
-
9
- AmCoordinateChart: {
10
- colors: ["#de4c4f", "#d8854f", "#eea638", "#a7a737", "#86a965", "#8aabb0", "#69c8ff", "#cfd27e", "#9d9888", "#916b8a", "#724887", "#7256bc"]
11
- },
12
-
13
- AmStockChart: {
14
- colors: ["#de4c4f", "#d8854f", "#eea638", "#a7a737", "#86a965", "#8aabb0", "#69c8ff", "#cfd27e", "#9d9888", "#916b8a", "#724887", "#7256bc"]
15
- },
16
-
17
- AmSlicedChart: {
18
- outlineAlpha: 1,
19
- outlineThickness: 2,
20
- labelTickColor: "#FFFFFF",
21
- labelTickAlpha: 0.3,
22
- colors: ["#de4c4f", "#d8854f", "#eea638", "#a7a737", "#86a965", "#8aabb0", "#69c8ff", "#cfd27e", "#9d9888", "#916b8a", "#724887", "#7256bc"]
23
- },
24
-
25
- AmRectangularChart: {
26
- zoomOutButtonColor: '#FFFFFF',
27
- zoomOutButtonRollOverAlpha: 0.15,
28
- zoomOutButtonImage: "lensWhite.png"
29
- },
30
-
31
- AxisBase: {
32
- axisColor: "#FFFFFF",
33
- axisAlpha: 0.3,
34
- gridAlpha: 0.1,
35
- gridColor: "#FFFFFF",
36
- dashLength: 3
37
- },
38
-
39
- ChartScrollbar: {
40
- backgroundColor: "#000000",
41
- backgroundAlpha: 0.2,
42
- graphFillAlpha: 0.2,
43
- graphLineAlpha: 0,
44
- graphFillColor: "#FFFFFF",
45
- selectedGraphFillColor: "#FFFFFF",
46
- selectedGraphFillAlpha: 0.4,
47
- selectedGraphLineColor: "#FFFFFF",
48
- selectedBackgroundColor: "#FFFFFF",
49
- selectedBackgroundAlpha: 0.09,
50
- gridAlpha: 0.15
51
- },
52
-
53
- ChartCursor: {
54
- cursorColor: "#FFFFFF",
55
- color: "#000000",
56
- cursorAlpha: 0.5
57
- },
58
-
59
- AmLegend: {
60
- color: "#e7e7e7"
61
- },
62
-
63
- AmGraph: {
64
- lineAlpha: 0.9
65
- },
66
-
67
-
68
- GaugeArrow: {
69
- color: "#FFFFFF",
70
- alpha: 0.8,
71
- nailAlpha: 0,
72
- innerRadius: "40%",
73
- nailRadius: 15,
74
- startWidth: 15,
75
- borderAlpha: 0.8,
76
- nailBorderAlpha: 0
77
- },
78
-
79
- GaugeAxis: {
80
- tickColor: "#FFFFFF",
81
- tickAlpha: 1,
82
- tickLength: 15,
83
- minorTickLength: 8,
84
- axisThickness: 3,
85
- axisColor: '#FFFFFF',
86
- axisAlpha: 1,
87
- bandAlpha: 0.8
88
- },
89
-
90
- TrendLine: {
91
- lineColor: "#c03246",
92
- lineAlpha: 0.8
93
- },
94
-
95
- // ammap
96
- AreasSettings: {
97
- alpha: 0.8,
98
- color: "#FFFFFF",
99
- colorSolid: "#000000",
100
- unlistedAreasAlpha: 0.4,
101
- unlistedAreasColor: "#FFFFFF",
102
- outlineColor: "#000000",
103
- outlineAlpha: 0.5,
104
- outlineThickness: 0.5,
105
- rollOverColor: "#3c5bdc",
106
- rollOverOutlineColor: "#000000",
107
- selectedOutlineColor: "#000000",
108
- selectedColor: "#f15135",
109
- unlistedAreasOutlineColor: "#000000",
110
- unlistedAreasOutlineAlpha: 0.5
111
- },
112
-
113
- LinesSettings: {
114
- color: "#FFFFFF",
115
- alpha: 0.8
116
- },
117
-
118
- ImagesSettings: {
119
- alpha: 0.8,
120
- labelColor: "#FFFFFF",
121
- color: "#FFFFFF",
122
- labelRollOverColor: "#3c5bdc"
123
- },
124
-
125
- ZoomControl: {
126
- buttonRollOverColor: "#3c5bdc",
127
- buttonFillColor: "#738f58",
128
- buttonBorderColor: "#738f58",
129
- buttonFillAlpha: 0.8,
130
- gridBackgroundColor: "#FFFFFF",
131
- buttonBorderAlpha:0,
132
- buttonCornerRadius:2,
133
- gridAlpha:0.5,
134
- gridBackgroundColor:"#FFFFFF",
135
- homeIconFile:"homeIconWhite.gif",
136
- buttonIconAlpha:0.6,
137
- gridAlpha: 0.2,
138
- buttonSize:20
139
- },
140
-
141
- SmallMap: {
142
- mapColor: "#FFFFFF",
143
- rectangleColor: "#FFFFFF",
144
- backgroundColor: "#000000",
145
- backgroundAlpha: 0.7,
146
- borderThickness: 1,
147
- borderAlpha: 0.8
148
- },
149
-
150
- // the defaults below are set using CSS syntax, you can use any existing css property
151
- // if you don't use Stock chart, you can delete lines below
152
- PeriodSelector: {
153
- color: "#e7e7e7"
154
- },
155
-
156
- PeriodButton: {
157
- color: "#e7e7e7",
158
- background: "transparent",
159
- opacity: 0.7,
160
- border: "1px solid rgba(255, 255, 255, .15)",
161
- MozBorderRadius: "5px",
162
- borderRadius: "5px",
163
- margin: "1px",
164
- outline: "none",
165
- boxSizing: "border-box"
166
- },
167
-
168
- PeriodButtonSelected: {
169
- color: "#e7e7e7",
170
- backgroundColor: "rgba(255, 255, 255, 0.1)",
171
- border: "1px solid rgba(255, 255, 255, .3)",
172
- MozBorderRadius: "5px",
173
- borderRadius: "5px",
174
- margin: "1px",
175
- outline: "none",
176
- opacity: 1,
177
- boxSizing: "border-box"
178
- },
179
-
180
- PeriodInputField: {
181
- color: "#e7e7e7",
182
- background: "transparent",
183
- border: "1px solid rgba(255, 255, 255, .15)",
184
- outline: "none"
185
- },
186
-
187
- DataSetSelector: {
188
- color: "#e7e7e7",
189
- selectedBackgroundColor: "rgba(255, 255, 255, .25)",
190
- rollOverBackgroundColor: "rgba(255, 255, 255, .15)"
191
- },
192
-
193
- DataSetCompareList: {
194
- color: "#e7e7e7",
195
- lineHeight: "100%",
196
- boxSizing: "initial",
197
- webkitBoxSizing: "initial",
198
- border: "1px solid rgba(255, 255, 255, .15)"
199
- },
200
-
201
- DataSetSelect: {
202
- border: "1px solid rgba(255, 255, 255, .15)",
203
- outline: "none"
204
- }
205
-
1
+ AmCharts.themes.black = {
2
+
3
+ themeName: "black",
4
+
5
+ AmChart: {
6
+ color: "#e7e7e7", backgroundColor: "#222222"
7
+ },
8
+
9
+ AmCoordinateChart: {
10
+ colors: ["#de4c4f", "#d8854f", "#eea638", "#a7a737", "#86a965", "#8aabb0", "#69c8ff", "#cfd27e", "#9d9888", "#916b8a", "#724887", "#7256bc"]
11
+ },
12
+
13
+ AmStockChart: {
14
+ colors: ["#de4c4f", "#d8854f", "#eea638", "#a7a737", "#86a965", "#8aabb0", "#69c8ff", "#cfd27e", "#9d9888", "#916b8a", "#724887", "#7256bc"]
15
+ },
16
+
17
+ AmSlicedChart: {
18
+ outlineAlpha: 1,
19
+ outlineThickness: 2,
20
+ labelTickColor: "#FFFFFF",
21
+ labelTickAlpha: 0.3,
22
+ colors: ["#de4c4f", "#d8854f", "#eea638", "#a7a737", "#86a965", "#8aabb0", "#69c8ff", "#cfd27e", "#9d9888", "#916b8a", "#724887", "#7256bc"]
23
+ },
24
+
25
+ AmRectangularChart: {
26
+ zoomOutButtonColor: '#FFFFFF',
27
+ zoomOutButtonRollOverAlpha: 0.15,
28
+ zoomOutButtonImage: "lensWhite.png"
29
+ },
30
+
31
+ AxisBase: {
32
+ axisColor: "#FFFFFF",
33
+ axisAlpha: 0.3,
34
+ gridAlpha: 0.1,
35
+ gridColor: "#FFFFFF",
36
+ dashLength: 3
37
+ },
38
+
39
+ ChartScrollbar: {
40
+ backgroundColor: "#000000",
41
+ backgroundAlpha: 0.2,
42
+ graphFillAlpha: 0.2,
43
+ graphLineAlpha: 0,
44
+ graphFillColor: "#FFFFFF",
45
+ selectedGraphFillColor: "#FFFFFF",
46
+ selectedGraphFillAlpha: 0.4,
47
+ selectedGraphLineColor: "#FFFFFF",
48
+ selectedBackgroundColor: "#FFFFFF",
49
+ selectedBackgroundAlpha: 0.09,
50
+ gridAlpha: 0.15
51
+ },
52
+
53
+ ChartCursor: {
54
+ cursorColor: "#FFFFFF",
55
+ color: "#000000",
56
+ cursorAlpha: 0.5
57
+ },
58
+
59
+ AmLegend: {
60
+ color: "#e7e7e7"
61
+ },
62
+
63
+ AmGraph: {
64
+ lineAlpha: 0.9
65
+ },
66
+
67
+
68
+ GaugeArrow: {
69
+ color: "#FFFFFF",
70
+ alpha: 0.8,
71
+ nailAlpha: 0,
72
+ innerRadius: "40%",
73
+ nailRadius: 15,
74
+ startWidth: 15,
75
+ borderAlpha: 0.8,
76
+ nailBorderAlpha: 0
77
+ },
78
+
79
+ GaugeAxis: {
80
+ tickColor: "#FFFFFF",
81
+ tickAlpha: 1,
82
+ tickLength: 15,
83
+ minorTickLength: 8,
84
+ axisThickness: 3,
85
+ axisColor: '#FFFFFF',
86
+ axisAlpha: 1,
87
+ bandAlpha: 0.8
88
+ },
89
+
90
+ TrendLine: {
91
+ lineColor: "#c03246",
92
+ lineAlpha: 0.8
93
+ },
94
+
95
+ // ammap
96
+ AreasSettings: {
97
+ alpha: 0.8,
98
+ color: "#FFFFFF",
99
+ colorSolid: "#000000",
100
+ unlistedAreasAlpha: 0.4,
101
+ unlistedAreasColor: "#FFFFFF",
102
+ outlineColor: "#000000",
103
+ outlineAlpha: 0.5,
104
+ outlineThickness: 0.5,
105
+ rollOverColor: "#3c5bdc",
106
+ rollOverOutlineColor: "#000000",
107
+ selectedOutlineColor: "#000000",
108
+ selectedColor: "#f15135",
109
+ unlistedAreasOutlineColor: "#000000",
110
+ unlistedAreasOutlineAlpha: 0.5
111
+ },
112
+
113
+ LinesSettings: {
114
+ color: "#FFFFFF",
115
+ alpha: 0.8
116
+ },
117
+
118
+ ImagesSettings: {
119
+ alpha: 0.8,
120
+ labelColor: "#FFFFFF",
121
+ color: "#FFFFFF",
122
+ labelRollOverColor: "#3c5bdc"
123
+ },
124
+
125
+ ZoomControl: {
126
+ buttonRollOverColor: "#3c5bdc",
127
+ buttonFillColor: "#738f58",
128
+ buttonBorderColor: "#738f58",
129
+ buttonFillAlpha: 0.8,
130
+ gridBackgroundColor: "#FFFFFF",
131
+ buttonBorderAlpha:0,
132
+ buttonCornerRadius:2,
133
+ gridAlpha:0.5,
134
+ gridBackgroundColor:"#FFFFFF",
135
+ homeIconFile:"homeIconWhite.gif",
136
+ buttonIconAlpha:0.6,
137
+ gridAlpha: 0.2,
138
+ buttonSize:20
139
+ },
140
+
141
+ SmallMap: {
142
+ mapColor: "#FFFFFF",
143
+ rectangleColor: "#FFFFFF",
144
+ backgroundColor: "#000000",
145
+ backgroundAlpha: 0.7,
146
+ borderThickness: 1,
147
+ borderAlpha: 0.8
148
+ },
149
+
150
+ // the defaults below are set using CSS syntax, you can use any existing css property
151
+ // if you don't use Stock chart, you can delete lines below
152
+ PeriodSelector: {
153
+ color: "#e7e7e7"
154
+ },
155
+
156
+ PeriodButton: {
157
+ color: "#e7e7e7",
158
+ background: "transparent",
159
+ opacity: 0.7,
160
+ border: "1px solid rgba(255, 255, 255, .15)",
161
+ MozBorderRadius: "5px",
162
+ borderRadius: "5px",
163
+ margin: "1px",
164
+ outline: "none",
165
+ boxSizing: "border-box"
166
+ },
167
+
168
+ PeriodButtonSelected: {
169
+ color: "#e7e7e7",
170
+ backgroundColor: "rgba(255, 255, 255, 0.1)",
171
+ border: "1px solid rgba(255, 255, 255, .3)",
172
+ MozBorderRadius: "5px",
173
+ borderRadius: "5px",
174
+ margin: "1px",
175
+ outline: "none",
176
+ opacity: 1,
177
+ boxSizing: "border-box"
178
+ },
179
+
180
+ PeriodInputField: {
181
+ color: "#e7e7e7",
182
+ background: "transparent",
183
+ border: "1px solid rgba(255, 255, 255, .15)",
184
+ outline: "none"
185
+ },
186
+
187
+ DataSetSelector: {
188
+ color: "#e7e7e7",
189
+ selectedBackgroundColor: "rgba(255, 255, 255, .25)",
190
+ rollOverBackgroundColor: "rgba(255, 255, 255, .15)"
191
+ },
192
+
193
+ DataSetCompareList: {
194
+ color: "#e7e7e7",
195
+ lineHeight: "100%",
196
+ boxSizing: "initial",
197
+ webkitBoxSizing: "initial",
198
+ border: "1px solid rgba(255, 255, 255, .15)"
199
+ },
200
+
201
+ DataSetSelect: {
202
+ border: "1px solid rgba(255, 255, 255, .15)",
203
+ outline: "none"
204
+ }
205
+
206
206
  };