Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/main/amcharts/3.3/ |
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/main/amcharts/3.3/radar.min.js |
AmCharts.AmRadarChart=AmCharts.Class({inherits:AmCharts.AmCoordinateChart,construct:function(t){this.chartType="radar";AmCharts.AmRadarChart.base.construct.call(this,t);this.marginRight=this.marginBottom=this.marginTop=this.marginLeft=0;this.radius="35%";AmCharts.applyTheme(this,t,"AmRadarChart")},initChart:function(){AmCharts.AmRadarChart.base.initChart.call(this);this.dataChanged&&(this.updateData(),this.dataChanged=!1,this.dispatchDataUpdated=!0);this.drawChart()},updateData:function(){this.parseData();var t=this.graphs,a;for(a=0;a<t.length;a++)t[a].data=this.chartData},updateGraphs:function(){var t=this.graphs,a;for(a=0;a<t.length;a++){var i=t[a];i.index=a;i.width=this.realRadius;i.height=this.realRadius;i.x=this.marginLeftReal;i.y=this.marginTopReal;i.chartType=this.chartType}},parseData:function(){AmCharts.AmRadarChart.base.parseData.call(this);this.parseSerialData()},updateValueAxes:function(){var t=this.valueAxes,a;for(a=0;a<t.length;a++){var i=t[a];i.axisRenderer=AmCharts.RadAxis;i.guideFillRenderer=AmCharts.RadarFill;i.axisItemRenderer=AmCharts.RadItem;i.autoGridCount=!1;i.x=this.marginLeftReal;i.y=this.marginTopReal;i.width=this.realRadius;i.height=this.realRadius}},drawChart:function(){AmCharts.AmRadarChart.base.drawChart.call(this);var t=this.updateWidth(),a=this.updateHeight(),i=this.marginTop+this.getTitleHeight(),s=this.marginLeft,a=a-i-this.marginBottom;this.marginLeftReal=s+(t-s-this.marginRight)/2;this.marginTopReal=i+a/2;this.realRadius=AmCharts.toCoordinate(this.radius,t,a);this.updateValueAxes();this.updateGraphs();t=this.chartData;if(AmCharts.ifArray(t)){if(0<this.realWidth&&0<this.realHeight){t=t.length-1;s=this.valueAxes;for(i=0;i<s.length;i++)s[i].zoom(0,t);s=this.graphs;for(i=0;i<s.length;i++)s[i].zoom(0,t);(t=this.legend)&&t.invalidateSize()}}else this.cleanChart();this.dispDUpd();this.chartCreated=!0},formatString:function(t,a){var i=a.graph;-1!=t.indexOf("[[category]]")&&(t=t.replace(/\[\[category\]\]/g,String(a.serialDataItem.category)));i=i.numberFormatter;i||(i=this.numberFormatter);t=AmCharts.formatValue(t,a.values,["value"],i,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);-1!=t.indexOf("[[")&&(t=AmCharts.formatDataContextValue(t,a.dataContext));return t=AmCharts.AmRadarChart.base.formatString.call(this,t,a)},cleanChart:function(){AmCharts.callMethod("destroy",[this.valueAxes,this.graphs])}});AmCharts.RadAxis=AmCharts.Class({construct:function(t){var a=t.chart,i=t.axisThickness,s=t.axisColor,h=t.axisAlpha,r=t.x,e=t.y;this.set=a.container.set();a.axesSet.push(this.set);var n=t.axisTitleOffset,l=t.radarCategoriesEnabled,o=t.chart.fontFamily,d=t.fontSize;void 0===d&&(d=t.chart.fontSize);var c=t.color;void 0===c&&(c=t.chart.color);if(a){this.axisWidth=t.height;t=a.chartData;var m=t.length,u;for(u=0;u<m;u++){var p=180-360/m*u,g=r+this.axisWidth*Math.sin(p/180*Math.PI),f=e+this.axisWidth*Math.cos(p/180*Math.PI);0<h&&(g=AmCharts.line(a.container,[r,g],[e,f],s,h,i),this.set.push(g));if(l){var C="start",g=r+(this.axisWidth+n)*Math.sin(p/180*Math.PI),f=e+(this.axisWidth+n)*Math.cos(p/180*Math.PI);if(180==p||0===p)C="middle",g-=5;0>p&&(C="end",g-=10);180==p&&(f-=5);0===p&&(f+=5);p=AmCharts.text(a.container,t[u].category,c,o,d,C);p.translate(g+5,f);this.set.push(p);p.getBBox()}}}}});AmCharts.RadItem=AmCharts.Class({construct:function(t,a,i,s,h,r,e){void 0===i&&(i="");var n=t.chart.fontFamily,l=t.fontSize;void 0===l&&(l=t.chart.fontSize);var o=t.color;void 0===o&&(o=t.chart.color);var d=t.chart.container;this.set=s=d.set();var c=t.axisColor,m=t.axisAlpha,u=t.tickLength,p=t.gridAlpha,g=t.gridThickness,f=t.gridColor,C=t.dashLength,A=t.fillColor,v=t.fillAlpha,x=t.labelsEnabled;h=t.counter;var M=t.inside,y=t.gridType,R;a-=t.height;var b;r=t.x;var T=t.y;e?(x=!0,isNaN(e.tickLength)||(u=e.tickLength),void 0!=e.lineColor&&(f=e.lineColor),isNaN(e.lineAlpha)||(p=e.lineAlpha),isNaN(e.dashLength)||(C=e.dashLength),isNaN(e.lineThickness)||(g=e.lineThickness),!0===e.inside&&(M=!0)):i||(p/=3,u/=2);var I="end",N=-1;M&&(I="start",N=1);var k;x&&(k=AmCharts.text(d,i,o,n,l,I),k.translate(r+(u+3)*N,a),s.push(k),this.label=k,b=AmCharts.line(d,[r,r+u*N],[a,a],c,m,g),s.push(b));a=Math.round(t.y-a);n=[];l=[];if(0<p){if("polygons"==y){R=t.data.length;for(o=0;o<R;o++)c=180-360/R*o,n.push(a*Math.sin(c/180*Math.PI)),l.push(a*Math.cos(c/180*Math.PI));n.push(n[0]);l.push(l[0]);p=AmCharts.line(d,n,l,f,p,g,C)}else p=AmCharts.circle(d,a,"#FFFFFF",0,g,f,p);p.translate(r,T);s.push(p)}if(1==h&&0<v&&!e&&""!==i){e=t.previousCoord;if("polygons"==y){for(o=R;0<=o;o--)c=180-360/R*o,n.push(e*Math.sin(c/180*Math.PI)),l.push(e*Math.cos(c/180*Math.PI));R=AmCharts.polygon(d,n,l,A,v)}else R=AmCharts.wedge(d,0,0,0,360,a,a,e,0,{fill:A,"fill-opacity":v,stroke:"#000","stroke-opacity":0,"stroke-width":1});s.push(R);R.translate(r,T)}!1===t.visible&&(b&&b.hide(),k&&k.hide());""!==i&&(t.counter=0===h?1:0,t.previousCoord=a)},graphics:function(){return this.set},getLabel:function(){return this.label}});AmCharts.RadarFill=AmCharts.Class({construct:function(t,a,i,s){a-=t.axisWidth;i-=t.axisWidth;var h=Math.max(a,i);a=i=Math.min(a,i);i=t.chart.container;var r=s.fillAlpha,e=s.fillColor,h=Math.abs(h-t.y);a=Math.abs(a-t.y);var n=Math.max(h,a);a=Math.min(h,a);h=n;n=s.angle+90;s=s.toAngle+90;isNaN(n)&&(n=0);isNaN(s)&&(s=360);this.set=i.set();void 0===e&&(e="#000000");isNaN(r)&&(r=0);if("polygons"==t.gridType){s=[];var l=[],o=t.data.length,d;for(d=0;d<o;d++)n=180-360/o*d,s.push(h*Math.sin(n/180*Math.PI)),l.push(h*Math.cos(n/180*Math.PI));s.push(s[0]);l.push(l[0]);for(d=o;0<=d;d--)n=180-360/o*d,s.push(a*Math.sin(n/180*Math.PI)),l.push(a*Math.cos(n/180*Math.PI));this.fill=AmCharts.polygon(i,s,l,e,r)}else this.fill=AmCharts.wedge(i,0,0,n,s-n,h,h,a,0,{fill:e,"fill-opacity":r,stroke:"#000","stroke-opacity":0,"stroke-width":1});this.set.push(this.fill);this.fill.translate(t.x,t.y)},graphics:function(){return this.set},getLabel:function(){}}); //# sourceMappingURL=radar.map.js