当前位置: 代码迷 >> Web前端 >> AmChart破译教程和RadarChart使用(转)
  详细解决方案

AmChart破译教程和RadarChart使用(转)

热度:196   发布时间:2012-09-12 09:21:30.0
AmChart破解教程和RadarChart使用(转)
1.首先上官方网站下载插件amcharts_flex_components_1.6.1.1.zip

在amcharts_flex_components_1.6.1.1.zip\Build\amChartsFB4.swc(因为我用的是Flex4)

将amChartsFB4.swc拷贝到Flex相中lib目录下面

然后写继承类:

1.我用到的是他的雷达图所以我继承破解了他的雷达图,你用到那个你就破解那个。

view sourceprint?01 package tool  

02 {  

03  import com.amcharts.AmRadarChart;  

04     

05  public class AmRadarChart extends com.amcharts.AmRadarChart  

06  {  

07   public function AmRadarChart()  

08   {  

09    super();  

10   }  

11   public function onClick():void{  

12    this;  

13   }  

14   override protected function createChildren():void{  

15    super.createChildren();  

16    if (_amchartsLink){  

17     _amchartsLink.visible=false;  

18     /*  

19     _amchartsLink.alpha=0;  

20     _amchartsLink.width=0;  

21     _amchartsLink.height=0;  

22     */ 

23    }  

24   }  

25  }  

26 } 

2.然后我在页面应用这个破击组件

view sourceprint?01 <tool:AmRadarChartid="chart" categoryField="Name" width="100%" height="235" startDuration="1">  

02     <tool:valueAxes>  

03      <amcharts:ValueAxis fillAlpha="0.05" fillColor="0x000000" axisAlpha="0.3" gridAlpha="0.05" fontWeight="bold" min="0"/>  

04     </tool:valueAxes>  

05        

06     <tool:graphs>  

07      <amcharts:AmGraph   

08       title="客流量"  

09       valueField="InSum"  

10       bullet="bubble"  

11       balloonText="客流量: [[value]]"/>                  

12      <amcharts:AmGraph   

13       title="交易笔数"  

14       valueField="TransactionNumber"  

15       bullet="round" 

16       markerType="square"  

17       balloonText="交易笔数: [[value]]"/>     

18      <amcharts:AmGraph   

19       title="销售额"  

20       valueField="SalesAmount"  

21       bullet="square"  

22       balloonText="销售额: [[value]]"/>                  

23      <amcharts:AmGraph   

24       title="集客力"  

25       valueField="UnitAreaAttraction"  

26       bullet="custom" 

27       markerType="square"  

28       balloonText="集客力: [[value]]"/>    

29      <amcharts:AmGraph   

30       title="坪效"  

31       valueField="SalesPerUnitArea"  

32       bullet="triangleDown"  

33       balloonText="坪效: [[value]]"/>                  

34      <amcharts:AmGraph   

35       title="提袋率"  

36       valueField="ConversionRate"  

37       bullet="triangleUp" 

38       markerType="square"  

39       balloonText="提袋率: [[value]]"/>    

40     </tool:graphs>      

41        

42    </tool:AmRadarChart>  

43    <amcharts:AmLegend fontSize="12" markerType="triangleDown" dataProvider=" {chart}" align="left" textClickEnabled="false" width="100%" borderAlpha="1.0"/> 

?