Flex 中使用 amcharts的数据问题,哪位好心人帮帮忙啊,不甚感激啊~~~
amcharts的dataprovider是一个ArrayCollection,如下的dataFilter,dataFilter里存的是一个对象类CompleteRate...
amcharts的dataprovider是一个ArrayCollection,如下的dataFilter,dataFilter里存的是一个对象类CompleteRateModel,他里面有两个属性,Category和Year,这两个属性有对应的get跟set方法,那在如下的amcharts中的CategoryField和valueField我该写什么值?
<radar:RadarChartDemo id="chart" dataProvider="{dataFilter}" categoryField="Category" startDuration="1" fontWeight="normal" textAlign="center" fontStyle="normal" width="409" height="284">
<radar:valueAxes>
<amcharts:ValueAxis axisAlpha="0.3" gridAlpha="0.05" fontWeight="bold" maxLabelLength="300" min="0" >
<!--<amcharts:guides>
<amcharts:Guide fillColor="#000000" value="0" fillAlpha="0.5" toValue="14" angle="10" />
</amcharts:guides>-->
<radar:graphs>
<amcharts:AmGraph bullet="round" bulletBorderThickness="0.5" title="Income" balloonColor="#009ACD" color="#BFBFBF" lineAlpha="0.8" lineColor="#525252" fillAlphas="0.9" valueField="CompleteRateData" />
</radar:graphs>
</radar:RadarChartDemo>
我之前的dataFilter存的是静态值,如下
private var chartData:ArrayCollection= new ArrayCollection([
{Category:"ProcessPerformance", CompleteRateData:20},
{Category:"CustomerRelationship", CompleteRateData:6},
{Category:"ProcessAdherence", CompleteRateData:19},
{Category:"KnowledgeManagement", CompleteRateData:13},
{Category:"ProjectResults", CompleteRateData:9}]);
那在amcharts中的CategoryField直接写Category,valueField直接写CompleteRateData就行了。哪位好心人帮帮忙啊~~~ 展开
<radar:RadarChartDemo id="chart" dataProvider="{dataFilter}" categoryField="Category" startDuration="1" fontWeight="normal" textAlign="center" fontStyle="normal" width="409" height="284">
<radar:valueAxes>
<amcharts:ValueAxis axisAlpha="0.3" gridAlpha="0.05" fontWeight="bold" maxLabelLength="300" min="0" >
<!--<amcharts:guides>
<amcharts:Guide fillColor="#000000" value="0" fillAlpha="0.5" toValue="14" angle="10" />
</amcharts:guides>-->
<radar:graphs>
<amcharts:AmGraph bullet="round" bulletBorderThickness="0.5" title="Income" balloonColor="#009ACD" color="#BFBFBF" lineAlpha="0.8" lineColor="#525252" fillAlphas="0.9" valueField="CompleteRateData" />
</radar:graphs>
</radar:RadarChartDemo>
我之前的dataFilter存的是静态值,如下
private var chartData:ArrayCollection= new ArrayCollection([
{Category:"ProcessPerformance", CompleteRateData:20},
{Category:"CustomerRelationship", CompleteRateData:6},
{Category:"ProcessAdherence", CompleteRateData:19},
{Category:"KnowledgeManagement", CompleteRateData:13},
{Category:"ProjectResults", CompleteRateData:9}]);
那在amcharts中的CategoryField直接写Category,valueField直接写CompleteRateData就行了。哪位好心人帮帮忙啊~~~ 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询