--- In [email protected], leds usop <[EMAIL PROTECTED]> wrote:
>
> a code post will help :) if you dont mind
> 

Ok, did my best to shorten things up.  The line in question is:

     dict["vami"] = tester.format(vami);

Changing this back to simply dict["vami"] = vami gets the chart back.

Thanks again,
Marc


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute" creationComplete="initApp()">
        <mx:Script>
                <![CDATA[
                        import mx.collections.ArrayCollection;
                        import mx.controls.*;
                        import mx.rpc.events.*;
                        
                        [Bindable]
                        public var monthlyData:ArrayCollection;
                        
                        private function initApp():void {
                                srv.send();
                                monthlyData = new ArrayCollection();
                        }       

                private function resultHandler(event:ResultEvent):void {
                        var vami:Number = 1000.0;
                        var temp:Array = event.result.list.month.source;
                        for (var i:Number = 0; i < temp.length; i++) {
                                        vami *= (1.0 + Number(temp[i].roi));
                                        
                                        var dict:Array = new Array();
                                        dict["vami"] = tester.format(vami);
                                        dict["name"] = temp[i].name;
                                        monthlyData.addItem(dict);
                        }
                }
                ]]>
        </mx:Script>
        
        <mx:HTTPService id="srv" url="http://192.168.1.6/pl/pnl2xml.pl";
useProxy="false" result="resultHandler(event)"/>
        <mx:CurrencyFormatter id="tester" precision="2"/>

        <mx:LineChart dataProvider="{monthlyData}">
                <mx:horizontalAxis>
                        <mx:CategoryAxis categoryField="name"/>                 
                </mx:horizontalAxis>
                <mx:series>
                        <mx:LineSeries displayName="VAMI" yField="vami"/>
                </mx:series>
        </mx:LineChart>
</mx:Application>



> --- marc_rossi <[EMAIL PROTECTED]> wrote:
> 
> > Hi all -
> > 
> > I'm trying to use a LineSeries with stock prices. 
> > When I format the
> > yField with the CurrencyFormatter the chart no
> > longer works.  It looks
> > as though I need to create my own itemRenderer but
> > have been
> > unsuccessful thus far in my attempts.  Is this the
> > correct route?  If
> > so, are there any examples available online?
> > 
> > TIA,
> > Marc  
> > 
> > 
> 
> 
> 
>  
>
____________________________________________________________________________________
> It's here! Your new message!  
> Get new email alerts with the free Yahoo! Toolbar.
> http://tools.search.yahoo.com/toolbar/features/mail/
>


Reply via email to