2 Replies Latest reply on Jun 3, 2008 1:30 PM by Developer504

    Using HTTPService data source for a Chart

      I'm trying to do a new App utilizing some of the charting features available in Flex. I was attempting to adapt this code example:

      http://blog.flexexamples.com/2007/10/11/creating-clustered-stacked-overlaid-and-100-bar-ch arts-in-flex-3/

      ...by changing the data source by adding an HTTPService call, and converting the result format to e4X

      <mx:HTTPService id="myService" url="{xmlPath}" resultFormat="e4x"/>

      then changing the datasource on the chart to point to this HTTPService source (I think):

      <mx:ColumnChart id="ColumnChart" dataProvider="{myService.lastResult.sector}"

      I'm using this made up XML file for testing:

      <sector="new customers">
      <company="VTC" amount="186.00" custName="Variant Technology Corporation" refnbr="000093"/>
      <company="ABC" amount="111.00" custName="Associated Building Corporation" refnbr="000094"/>
      <company="EFF" amount="122.00" custName="Electronic Frontier Fondation" refnbr="000095"/>
      <company="CNT" amount="158.00" custName="Computerised National Training" refnbr="000262"/>

      This passes debugger and compiles, but I'm getting an error:

      "Error #1090: XML parser failure: element is malformed."

      Can anyone see what I'm doing wrong?