There was a typo in my last post showing array2 as the data being bound, but in 
my code 
it was correct.  I tried binding the data to a data grid and the data shows up, 
so it must be 
just that somehow the chart cant display the points correctly...  Not sure yet.

--- In [email protected], "netdeep" <[EMAIL PROTECTED]> wrote:
>
> Yes, it was the accessor methods which were causing the errors!  Thanks 
> Shailesh.
> 
> I tried the Arraycollection but the chart refused to draw anything:
> 
>                         [Bindable]
>                       public var array1:Array;
>                       [Bindable]
>                       public var axis1:AxisObject;
>                       
>                       private function messageHandler(message:IMessage):void {
>                               var arr:Array = message.body as Array;
>                               
>                               var result:AxisObject;
>                               axis1 = arr[1] as AxisObject;
>                               array1 = axis1.data;
>                         }
> 
>                         <mx:LineSeries id="cs1" 
>                               dataProvider="{array2}"
>                               xField="point1"
>                               yField="point2">
>                       </mx:LineSeries>  
> 
> 
> Thanks!
> --- In [email protected], "Shailesh Mangal" <shailesh.mangal@> wrote:
> >
> > Dates are marshalled fine (use java.util.Date). Issue seems to be with
> > your getter method. 
> > 
> > I think your getter methods (in Axis JavaBean) are 
> >   getEndDate and getDataList. 
> > They should rather be
> >   getData and getEnd
> > 
> > -Shailesh
> > --- In [email protected], "netdeep" <deepnet@> wrote:
> > >
> > > 
> > > Thanks for the tips.  I'll try those out.  But I really do need the
> > Date objects and according 
> > > to the documentation, they should convert.
> > > 
> > > Also for some reason, even when I comment out the date and list
> > objects in the Java and 
> > > Actionscript definitions, I still get the reference error #1056.  Do
> > you know what is 
> > > causing that error?
> > > 
> > > 
> > > 
> > > --- In [email protected], "[p e r c e p t i c o n]"
> > <percepticon@> wrote:
> > > >
> > > > oh and almost forgot...when dealing with lists coming from java i
> > had more
> > > > success with ArrayCollection than array...
> > > > p
> > > > 
> > > > On Wed, Mar 5, 2008 at 7:57 AM, netdeep <deepnet@> wrote:
> > > > 
> > > > >   Does anyone know the best practice for transferring data from
> > a database
> > > > > to generate a
> > > > > flex chart?
> > > > >
> > > > > I have a Java class Axis with these variables:
> > > > >
> > > > > String ID;
> > > > > Date start;
> > > > > Date end;
> > > > > int min;
> > > > > int max;
> > > > > int incr;
> > > > > String title;
> > > > > String signal;
> > > > > String type;
> > > > > List data;
> > > > >
> > > > > And the List is an array of points defined in a class called
> > DataPoint:
> > > > >
> > > > > public Date point1;
> > > > > public long point2;
> > > > >
> > > > > I pass an array of Axis objects to the Flex app and try to
> > convert it to
> > > > > an actionscript
> > > > > object:
> > > > >
> > > > > package factory.data {
> > > > > [Bindable]
> > > > > [RemoteClass(alias="factory.data.Axis")]
> > > > > public class AxisObject {
> > > > >
> > > > > public var ID:String;
> > > > > public var start:Date;
> > > > > public var end:Date;
> > > > > public var min:int;
> > > > > public var max:int;
> > > > > public var incr:int;
> > > > > public var title:String;
> > > > > public var signal:String;
> > > > > public var type:String;
> > > > > public var data:Array;
> > > > > }
> > > > >
> > > > > and I can access the title for example, but cannot get the
> > DataPoint array
> > > > > into the chart.
> > > > > Furthermore, when I debug it gives me the following errors:
> > > > >
> > > > > ReferenceError: Error #1056: Cannot create property endDate on
> > > > > factory.data.AxisObject.
> > > > > ReferenceError: Error #1056: Cannot create property dataList on
> > > > > factory.data.AxisObject.
> > > > >
> > > > > Thanks for any help you can offer.
> > > > >
> > > > >  
> > > > >
> > > >
> > >
> >
>



Reply via email to