Hi Folks, I am using the xml like data1.xml
<datas>
<data date="8/1/2007" c3845="98" c6500="100" d1234="22" e5500="1" />
<data date="8/2/2007" c3845="48" c6500="97" d1234="33" e5500="11"/>
<data date="8/3/2007" c3845="100" c6500="100" d1234="44" e5500="21" />
<data date="8/6/2007" c3845="98" c6500="98" d1234="55" e5500="31"/>
<data date="8/7/2007" c3845="50" c6500="100" d1234="66" e5500="41" />
<data date="8/8/2007" c3845="100" c6500="97" d1234="77" e5500="51"/>
<data date="8/9/2007" c3845="100" c6500="97" d1234="88" e5500="61"/>
<data date="8/10/2007" c3845="1" c6500="97" d1234="99" e5500="71" />
<data date="8/13/2007" c3845="100" c6500="97" d1234="11" e5500="81"/>
</datas>
and my MXML code is
<mx:HTTPService id="srv1" url="../assets/data1.xml" useProxy="false"
result="myData1=ArrayCollection(srv1.lastResult.datas.data)" />
<mx:LineChart id="lineChart"
showDataTips="true"
dataProvider="{myData1}"
width="400"
height="170" x="0" y="0">
<!-- background elements -->
<mx:backgroundElements>
<mx:GridLines >
<mx:horizontalFill>
<mx:SolidColor color="haloBlue" alpha="0.2" />
</mx:horizontalFill>
<mx:horizontalAlternateFill>
<mx:SolidColor color="haloSilver" alpha="0.2" />
</mx:horizontalAlternateFill>
<mx:verticalFill>
<mx:SolidColor color="haloBlue" alpha="0.2" />
</mx:verticalFill>
<mx:verticalAlternateFill>
<mx:SolidColor color="haloSilver" alpha="0.2" />
</mx:verticalAlternateFill>
</mx:GridLines>
</mx:backgroundElements>
<!-- vertical axis -->
<mx:verticalAxis>
<mx:LinearAxis baseAtZero="true"
title="Compliance Placed"
labelFunction="linearAxis_labelFunc" />
</mx:verticalAxis>
<!-- horizontal axis -->
<mx:horizontalAxis>
<mx:CategoryAxis id="ca"
categoryField="date"
title="August 2007"
labelFunction="categoryAxis_labelFunc" />
</mx:horizontalAxis>
<!-- horizontal axis renderer -->
<mx:horizontalAxisRenderer>
<mx:AxisRenderer axis="{ca}" canDropLabels="true" />
</mx:horizontalAxisRenderer>
<!-- series -->
<mx:series>
<mx:LineSeries yField="c3845" displayName="c3845" />
<mx:LineSeries yField="c6500" displayName="c6500" />
<mx:LineSeries yField="d1234" displayName="d1234" />
<mx:LineSeries yField="e5500" displayName="e5500" />
</mx:series>
</mx:LineChart>
<mx:ControlBar height="41" y="178">
<mx:Legend id="legend" dataProvider="{lineChart}"
direction="horizontal" width="398"/>
</mx:ControlBar>
The line chart is come nice. My Question is how to create the dynamic line
series, when i change the xml like
<data date="8/13/2007" c3845="100" c6500="97" d1234="11" e5500="81" *
f3300="55"*/> with out changing the mxml code.
please any one reply me
--
Thanks & Regards
Swaminathan. M