Change your java code to
Map pieValues1=new HashMap();
pieValues1.put("name","USD");
pieValues1.put("percent","40.00");
rows.add(pieValues1);
Map pieValues2=new HashMap();
pieValues2.put("name","GBP");
pieValues2.put("percent","30.00");
rows.add(pieValues2);
On Thu, Aug 20, 2009 at 3:07 PM, swap <[email protected]> wrote:
>
> hi all,
>
> I am new to flex and i have been trying to draw pie charts from the
> data returned from the java class .
> my java code looks like this:
>
> public List getListElements(){
> List rows = new ArrayList();
> Map pieValues=new HashMap();
> pieValues.put("USD",new Double("40.00"));
> pieValues.put("GBP",new Double("30.00"));
> pieValues.put("INR",new Double("30.00"));
>
> rows.add(pieValues);
>
> return rows;
> }
>
> I am trying to get the return value as an ArrayCollection in my mxml
> but i am not able to use it as a dataprovider in the PieChart tag
>
> private function resultHandler(event:ResultEvent):void{
> expenseArrayCol=event.result as
> ArrayCollection;
> }
>
> <mx:PieChart id="pie" dataProvider="{expenseArrayCol}"
> showDataTips="true" height="295" >
>
> Kindly suggest a way i can use the data properly.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---