Have a look at
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/
wwhelp.htm?context=LiveDocs_Book_Parts&file=charts_intro_108_06.html
On Mar 21, 2007, at 5:19 AM, vijay95052 wrote:
Hello,
I have xml data that contains server names. I want to construct a
chart
such that there is one line for each server name. The data is as shown
below:
<document>
<row>
<SnapDate>07:30</SnapDate>
<Servername>Server1</Servername>
<CPUUtil>30</CPUUtil>
<NumConns>450</NumConns>
</row>
<row>
<SnapDate>07:30</SnapDate>
<Servername>Server2</Servername>
<CPUUtil>50</CPUUtil>
<NumConns>300</NumConns>
<KBps>1200</KBps>
</row>
.....
</document>
I cannot hardcode the server names into my mxml since they are not
known until runtime.
My chart needs to have a lineseries for each server, with time on X
axis and CPUUtil on Y axis.
Is there a straightforward way to achieve this?
I could probably do this in the creationcomplete actionscript code to
parse the xml, detect the changes in servername, build the
dataprovider
arrays and create new lineseries objects for each series
Is that the recommended approach? I was hoping to find something
simpler since this would be a common requirement imo.