xml - How should I format an HTTPService result in Flex so that it is accessible for a pie chart? -


I think it should be simple, though everywhere I see something different to someone else. I'm doing a small charting app to track download statistics, and I want to put the data in the pie chart. I'm new to Flex, so if my code is awful I'm sorry.

  & lt; S: HTTPService id = "service" url = "admin / stats / totalstats.php" fault = "service_faultHandler (event)" result = "service_sandhandler (event)" />  

What is the best result for this purpose, and if I am specifying the returned value in the Action Script Variable, should it be an ArrayList? ArrayCollection?

A sample of XML that is HTTPService

  & lt; DownloadStats & gt; & Lt; Year calculation = "24522" year = "2008" & gt; & Lt; Calculation of the month = "20" month = "5" year = "2008" full = "May 2008" & gt; & Lt; Day calculation = "2" months = "5" day = "20" year = "2008" /> & Lt; Day calculation = "1" month = "5" day = "21" year = "2008" /> & Lt; Day calculation = "9" month = "5" day = "22" year = "2008" /> & Lt; Day calculation = "1" month = "5" day = "23" year = "2008" /> & lt; Day calculation = "1" month = "5" day = "29" year = "2008" /> & Lt; Day calculation = "1" month = "5" day = "30" year = "2008" /> & Lt; Day calculation = "5" month = "5" day = "31" year = "2008" /> & Lt; / Month & gt; ... & lt; / Year & gt; & Lt; DownloadStats & gt;  

Eric R.

EDIT: I decided it would be useful to see how I am transferring data to the chart to ensure that I am not doing anything wrong.

  & lt; Mx: PieChart id = "piechart" & gt; & Lt; Mx: PieSeries nameField = "year" field = "count" labelPosition = "callout" displayName = "total" dataProvider = "{graphData}" /> & Lt; / Mx: piechart & gt;  

Problems using multiple HTTPServices that allow backend and for unique result handlers Was resolved. Is this the best way to get irrelevant - my reporting program is so small that it will be impossible to look less in performance. HTTPService gives an object by default and you manipulate objects using dot operators to drill in XML. If you have any such problem, send me a message and I will explain it in more detail.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -