2 Replies Latest reply on Oct 22, 2008 7:20 AM by Newsgroup_User

    How to access custom object as property in yField

      Hi All,
      I have a stacked column chart. The data provider (dp) has an array of object DataObject which has array of custom objects of class ClientRev:
      public function ClientRev(name: String, rev : Number)
      {
      cName = name;
      cRev = rev;
      }

      // data provider
      public class DataObject
      {
      public var clientRev : Array;
      }

      Now I have to use cRev property of clientRev elements of DataObject (DataObjects makes data provider) in yField of ColumnSeries.

      if i write,
      yField="{clientRev[0].cRev}",

      It doesn't work. Please lemme know how can I achieve my goal.

      Thanks for help.

        • 1. Re: How to access custom object as property in yField
          Level 1
          Hi,
          Actually I found dataFunction in ColumnSeries which can be used for the same purpose.
          • 2. Re: How to access custom object as property in yField
            Level 7

            "vaibhav.chauhan" <webforumsuser@macromedia.com> wrote in message
            news:gdmhok$2eq$1@forums.macromedia.com...
            > Hi All,
            > I have a stacked column chart. The data provider (dp) has an array of
            > object
            > DataObject which has array of custom objects of class ClientRev:
            > public function ClientRev(name: String, rev : Number)
            > {
            > cName = name;
            > cRev = rev;
            > }
            >
            > // data provider
            > public class DataObject
            > {
            > public var clientRev : Array;
            > }
            >
            > Now I have to use cRev property of clientRev elements of DataObject
            > (DataObjects makes data provider) in yField of ColumnSeries.
            >
            > if i write,
            > yField="{clientRev[0].cRev}",
            >
            > It doesn't work. Please lemme know how can I achieve my goal.

            Use a dataFunction