|
I’m not having any luck looking for
how to do this either. Any chance you can put a getter on your myObjectX that
will do the right thing? function get myOtherObjectMyNumber() :
Number { return myOtherObject.myNumber; } Matt From: Mika Kiljunen
[mailto:[EMAIL PROTECTED] Hi, I ran into problem with charts. I have an object
that contains another object and I need to make a chart using them. Let’s
say that the object looks like this: class com.mycom.myObjectX
{
public var myString:String;
public var myOtherObject:SomeObject; // Contains a field: myNumber:Number
} I would like to do something like this with an array
(myArray ) containing myObjectX’s: <mx:ColumnChart id="bar"
marginLeft="5" height="1000" width="100%" marginRight="5"
dataProvider="{myArray }" showDataTips="true"> <mx:series>
<mx:Array>
<mx:ColumnSeries yField=" myOtherObject.myNumber" />
</mx:Array>
</mx:series>
<mx:horizontalAxis>
<mx:CategoryAxis dataProvider="{myArray}"
categoryField="myString" />
</mx:horizontalAxis>
<mx:verticalAxis>
<mx:LinearAxis interval="100" />
</mx:verticalAxis> </mx:ColumnChart> The problem is that
yField="myOtherObject.myNumber" won’t work (
yField=”myNumber” would work if myObjectX was a flat object but it
ain’t…). I just can’t figure out why I cannot reference a
object.field instead of field in yField? Has anyone figured out this one?
Thanks, Mika Yahoo! Groups Links
|

