0 Replies Latest reply on Apr 16, 2008 9:52 AM by TransoniqHacker

    Summarize data in Flex

    TransoniqHacker
      I am trying to create a chart from data I am getting from a SQL query. The SQL query is returning the data as XML and it is being converted to by using a HTTP service and then to a XMLList Collection.

      What I would like to do is take the query of all the data, then summarize/categorize it in flex nad display the results as a chart. So, for example, here is a snippet of the XML that is returned:

      <?xml version="1.0" encoding="utf-8" ?>
      <scanlog>
      <scanEntry>
      <id>72</id>
      <datDate>2008/04/16</datDate>
      <txtUser>Sue</txtUser>
      <txtType>SD-32</txtType>
      <numTime>19</numTime>
      </scanEntry>
      <scanEntry>
      <id>71</id>
      <datDate>2008/04/16</datDate>
      <txtUser>Mary-Ann</txtUser>
      <txtType>SD-18</txtType>
      <numTime>14</numTime>
      </scanEntry>
      <scanEntry>
      <id>70</id>
      <datDate>2008/04/16</datDate>
      <txtUser>Matt</txtUser>
      <txtType>SD-18</txtType>
      <numTime>18</numTime>
      </scanEntry>
      </scanlog>

      What I would like to do is show a chart with each bar representing a txtType and the value showing the the combined numTome values for the given txtType. In the example above, one bar would be for SD-18 and the value would be 32, another bar would be for SD-32 adn the value would be 19.

      Then I would like to be able to let the user choose to summarize by txtUser instead and the chart would change.

      Can this be done in flex? I am creating the XML myself in a ColdFusion page, so I can change it if necessary. I can create seperate queries for the various categories, but I would rather not do that.

      Thanks for any help!

      Matt