Hi,
For the following i have done a loop which will create the data set for me
thats good --- it stores in an array and the array now has the data i can
see it when i debug....
When i add it to the chart i cannot see it displayed..... what am i doing
wrong in adding it to the Graph? Can you plz check the code marked in red
and guid me?
private function addline():void {
getcol.send();
var temp:XML = XML (getcol.lastResult.toString());
var tempArr : ArrayCollection = new ArrayCollection();
var x:Boolean;
for each (colNameFromQuery in temp.col) {
trace (colNameFromQuery);
for each (var objectFromXML:ObjectProxy in stats) {
x = false;
for (var attFromXML:String in objectFromXML) {
if (attFromXML == "COMMAND" && colNameFromQuery
== objectFromXML[attFromXML]) {
trace (attFromXML + ": " +
objectFromXML[attFromXML]);
tempArr.addItem({COMMAND:
objectFromXML[attFromXML], avg: objectFromXML["avg"], count:
objectFromXML["count"], recordTime: objectFromXML["recordTime"]});
x=true;
}
}
}
if ( x == true ) {
var series1:ColumnSeries;
series1 = new ColumnSeries();
series1.dataProvider = tempArr;
series1.yField = "recordTime";
series1.xField = "count";
series1.displayName = "Prod";
var currentSeries:Array = myChart1.series;
currentSeries.push(series1);
myChart1.series = currentSeries;
}
}
Regards
VJ
On Wed, Jan 28, 2009 at 4:53 PM, Vijay <[email protected]> wrote:
>
> Can anyone help plz?
>
> On Jan 27, 5:46 pm, Vijay <[email protected]> wrote:
> > Hi guys,
> >
> > I am new to Flex and i would like to plot the line graph with the
> following
> > Data XML (Plz note that i cannot change the way the XML is displayed due
> to
> > the dynamic nature of the data) with this being said.... i want a way to
> > plot multiple graphs Dynamically as i dont know how many of the line
> graphs
> > i will need...
> >
> > here is the data set....
> >
> > - <#> <row>
> > <COMMAND>DELETE</COMMAND>
> > <cost>9323776</cost>
> > <avg>8746.51</avg>
> > <count>1066</count>
> > <recordTime>2009-01-21</recordTime>
> > </row>
> > - <#> <row>
> > <COMMAND>DELETE</COMMAND>
> > <cost>4306186</cost>
> > <avg>3570.64</avg>
> > <count>1206</count>
> > <recordTime>2009-01-22</recordTime>
> > </row>
> > - <#> <row>
> > <COMMAND>GET</COMMAND>
> > <cost>943107144</cost>
> > <avg>1192.46</avg>
> > <count>790891</count>
> > <recordTime>2009-01-26</recordTime>
> > </row>
> > - <#> <row>
> > <COMMAND>HEAD</COMMAND>
> > <cost>17786262</cost>
> > <avg>1373.67</avg>
> > <count>12948</count>
> > <recordTime>2009-01-21</recordTime>
> > </row>
> >
> > The command in the above XML is dynamic and thats the basis using which i
> > need to plot diffrent graphs in one chart.
> >
> > Thanks and Regards
> > Vijay
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---