Xml代碼
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:AmRadarChartidtool: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"/>
作者“AlecRichard's Blog”