3 Replies Latest reply on Apr 9, 2007 9:54 AM by compubrook

    Query as arrayCollection in a dataProvider

    JoeADSK
      I was wondering how query data is accessed for a chart through an arrayCollection. I put it in the dataProvider and i get an error:
      ReferenceError: Error #1069: Property exclamation not found on String and there is no default value.

      my code looks like:

      <mx:PieChart id="piechart1" dataProvider="qresult">
      <mx:series>
      <mx:PieSeries displayName="Hello" field="exclamation"/>
      </mx:series>
      </mx:PieChart>
      <mx:Legend dataProvider="{piechart1}"/>

      and:

      <mx:RemoteObject
      id="myService"
      destination="ColdFusion"
      source="HelloWorld"
      showBusyCursor="true"
      >
      <mx:method name="sayHelloQuery" result="handleQueryResult(event)" fault="Alert.show(event.fault.message)"/>

      </mx:RemoteObject>

      and lastly:

      public function handleQueryResult(event:ResultEvent):void{
      qResult=event.result as ArrayCollection;
      }


      the code is in reverse order of how it appears in my mxml.

      I think i am misunderstanding how the data is represented

      Thanks!