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.我用到的是他的雷達圖所以我繼承破解了他的雷達圖,你用到那個你就破解那個。
package tool{ import com.amcharts.AmRadarChart; public class AmRadarChart extends com.amcharts.AmRadarChart { public function AmRadarChart() { super(); } public function onClick():void{ this; } override protected function createChildren():void{ super.createChildren(); if (_amchartsLink){ _amchartsLink.visible=false; /* _amchartsLink.alpha=0; _amchartsLink.width=0; _amchartsLink.height=0; */ } } }}
2.然後我在頁面應用這個破擊組件
<tool:AmRadarChartid="chart" categoryField="Name" width="100%" height="235" startDuration="1"> <tool:valueAxes> <amcharts:ValueAxis fillAlpha="0.05" fillColor="0x000000" axisAlpha="0.3" gridAlpha="0.05" fontWeight="bold" min="0"/> </tool:valueAxes> <tool:graphs> <amcharts:AmGraph title="客流量" valueField="InSum" bullet="bubble" balloonText="客流量: [[value]]"/> <amcharts:AmGraph title="交易筆數" valueField="TransactionNumber" bullet="round" markerType="square" balloonText="交易筆數: [[value]]"/> <amcharts:AmGraph title="銷售額" valueField="SalesAmount" bullet="square" balloonText="銷售額: [[value]]"/> <amcharts:AmGraph title="集客力" valueField="UnitAreaAttraction" bullet="custom" markerType="square" balloonText="集客力: [[value]]"/> <amcharts:AmGraph title="坪效" valueField="SalesPerUnitArea" bullet="triangleDown" balloonText="坪效: [[value]]"/> <amcharts:AmGraph title="提袋率" valueField="ConversionRate" bullet="triangleUp" markerType="square" balloonText="提袋率: [[value]]"/> </tool:graphs> </tool:AmRadarChart> <amcharts:AmLegend fontSize="12" markerType="triangleDown" dataProvider=" {chart}" align="left" textClickEnabled="false" width="100%" borderAlpha="1.0"/>