Anitha
04-12-2008, 01:16 PM
Hi all,
In my training project,I met one problem with my piechart and serviceresult.I want to populate the piechart with the webservice result.My backend contains four fields Year,Region,Sales,Profit.When I assign the fields Sales or Profit to my piechart it works successfully.But here I need to assign the Region names for my piechart widgets with the base of Profitpercentage . From the very beginning iam struggling with the piechart, hence any idea please???
My script:
[Bindable]
public var answer:ArrayCollection=new ArrayCollection;
private function onResult(event:ResultEvent):void
{
answer=(event.result.Tables["region_Breakdown"].Rows);
var ans:Array=ArrayUtil.toArray(answer);
}
<mx:PieChart x="459" y="320" id="pcdivision" dataProvider="{answer}" showDataTips="true" height="188" width="359">
<mx:series>
<mx:PieSeries field="???????" nameField="division" labelPosition="callout" showDataEffect="{interpolate}">
If someone give me some samples please, I would really appreciate it.
By,
Anitha.
In my training project,I met one problem with my piechart and serviceresult.I want to populate the piechart with the webservice result.My backend contains four fields Year,Region,Sales,Profit.When I assign the fields Sales or Profit to my piechart it works successfully.But here I need to assign the Region names for my piechart widgets with the base of Profitpercentage . From the very beginning iam struggling with the piechart, hence any idea please???
My script:
[Bindable]
public var answer:ArrayCollection=new ArrayCollection;
private function onResult(event:ResultEvent):void
{
answer=(event.result.Tables["region_Breakdown"].Rows);
var ans:Array=ArrayUtil.toArray(answer);
}
<mx:PieChart x="459" y="320" id="pcdivision" dataProvider="{answer}" showDataTips="true" height="188" width="359">
<mx:series>
<mx:PieSeries field="???????" nameField="division" labelPosition="callout" showDataEffect="{interpolate}">
If someone give me some samples please, I would really appreciate it.
By,
Anitha.