Hi veerachandra solige,

                 Try the below code i hope it will helpfull to u



<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute">
<mx:Script>
    <![CDATA[
        import mx.collections.ArrayCollection;

        [Bindable]
         public var exp:ArrayCollection = new ArrayCollection([
             {Month:"Jan", Profit:200},{Month:"Feb", Profit:100},
             {Month:"Mar", Profit:150}
         ]);
         public var i:int=150;
         public function addfun():void
         {
             //exp=null;
             exp=new ArrayCollection([
             {Month:"Jan", Profit:200},{Month:"Feb", Profit:100},
             {Month:"Mar", Profit:i}]);
             i+=50;
         }
    ]]>
</mx:Script>
    <mx:LineChart x="160" y="10" id="li" dataProvider="{exp}">
        <mx:horizontalAxis>
            <mx:CategoryAxis dataProvider="{exp}" categoryField="Month"/>
        </mx:horizontalAxis>
        <mx:series>
            <mx:LineSeries displayName="Profit" yField="Profit">
                 </mx:LineSeries>
            <mx:LineSeries displayName="Amount" yField="Amount"/>
        </mx:series>
    </mx:LineChart>
    <mx:Button label="Add" click="addfun()"/>
</mx:Application>




With Regards,
Sunil.T

--

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.


Reply via email to