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
|
- RE: [flexcoders] Charts and fields Mika Kiljunen
- RE: [flexcoders] Charts and fields Matt Chotin