private function onResult(event:ResultEvent):void{ myData.removeAll();
if((event.result.catalog != null)&& (event.result.catalog.product != null)) --> *catalog is a root node and product is a sub node * { myData = event.result.catalog.product as ArrayCollection; if(myData.length > 1) { myData.refresh(); addToMyData(myData); event.result.catalog.produt = null; } else { Alert.show("one Data"); } } else Alert.show("No Data is Available"); } *my dataprovider node Structure as follows * ** *my input are from date and to date* ** *my node will come date,timeField,price* ** *if i give 01-09-09 and 02-09-09 means* ** *it gives all data from 9.45 to 15.45 for 01-09-09 and 02-09-09 * <catalog> <product dateField="*2009-09-01*"> * * <timeField>*09:57:09*</timeField> * * <price>*1566.95*</price> * * <change>*-0.65*</change> * * </product> *-* <http://localhost:8080/charts/pages/intraDays.jsp#> <product dateField ="*2009-09-01*"> * * <timeField>*10:00:09*</timeField> * * <price>*1555.0*</price> * * <change>*-1.4*</change> * * </product> up to <product dateField="*2009-09-02*"> * * <timeField>15*:45:00*</timeField> * * <price>*1566.95*</price> * * <change>*-0.65*</change> * * </product> *-* <http://localhost:8080/charts/pages/intraDays.jsp#> <product dateField ="*2009-09-02*"> * * <timeField>*10:00:09*</timeField> * * <price>*1555.0*</price> * * <change>*-1.4*</change> * * </product> up to *-* <http://localhost:8080/charts/pages/intraDays.jsp#> <productdateField ="*2009-09-02*"> * * <timeField>15*:45:00*</timeField> * * <price>*1555.5*</price> * * <change>*-1.37*</change> * * </product> </catalog> private function addToMyData(tempData:ArrayCollection):void{ var temp:ArrayCollection = new ArrayCollection() temp = tempData; var prevDate:String = temp[0].dateField; * getAxisData();------------------------* *this will be called according to no.of different dates* chartData.removeAll(); for(var i:int = 0;i<temp.length;i++) { if(prevDate != temp[i].dateField) getAxisData(); var objData:Object = new Object(); var timeFrame:String = new String(); timeFrame = temp[i].timeField.toString(); if(timeFrame.substr(0,1) == "0"){ timeFrame = timeFrame.substr(1,4); } else{ timeFrame = timeFrame.substr(0,5); } objData.timeFrame = timeFrame; objData.price = temp[i].price; chartData.addItem(objData); prevDate = temp[i].dateField; } chartData.refresh(); lineChart.dataProvider = chartData; } private function getAxisData():void{ -->*This will plot catagory axis data 9.55,9.56 ... 11,11.01 .. 12.01,12,02 ... 14 .... 15.45 * var axisTimeData:String; var str:String = new String; var hour:int = 9; for(var i:int=1,j:int=55; i<=351; j++,i++){ var obj:Object = new Object(); if(j<10) str=hour+":"+"0"+j; else if(j%60 == 0) { str=++hour+":"+"00"; j =0; } else str=hour+":"+j.toString(); obj.timeFrame = str; axisData.addItem(obj); } } i need ur urgent reply Thanks&Regards, Gerald A On Wed, Sep 2, 2009 at 1:59 PM, Dinesh Kumar <dhineshbhara...@gmail.com>wrote: > > Hi Gerald, > Can you please send your dataprovider structure with sample > data..specifying x axis data and y-axis data...i did similar kind of app > ...let me help u... > > On Wed, Sep 2, 2009 at 12:53 PM, Gerald Anto Fernando < > flex.gerald.a...@gmail.com> wrote: > >> like see this link >> http://in.finance.yahoo.com/q/bc?s=^BSESN&t=5d&l=on&z=m&q=l&c= >> or paste this in browser >> >> >> On Wed, Sep 2, 2009 at 12:48 PM, Gerald Anto Fernando < >> flex.gerald.a...@gmail.com> wrote: >> >>> no imean line chart with multible line series >>> but line series should not be in vertical It should be horizontal one >>> then next for every line series one x Axis but all x Aixs is same >>> for all line series only one y Axis is it possible? >>> if so give me an idea. >>> Thanks&Regards, >>> Gerald A >>> >>> >>> On Wed, Sep 2, 2009 at 11:24 AM, Dinesh Kumar <dhineshbhara...@gmail.com >>> > wrote: >>> >>>> You mean, for example a barchart with one baritem in yaxis and >>>> different values in x-axis. >>>> >>>> >>>> >>>> >>>> On Mon, Aug 31, 2009 at 7:42 PM, Gerald Anto < >>>> flex.gerald.a...@gmail.com> wrote: >>>> >>>>> >>>>> Shall we have a chart only one y-Axis and multiple x Axis. >>>>> for eg, >>>>> >>>>> 1 ,2,3 ... 20 these are my x axis data . i want more than one these >>>>> type of x -Axis(for eg 4 x-axis). >>>>> but y axis is only one. >>>>> for the 4 x axis, i want to plot diffrent data >>>>> >>>>> Thanks&Regards, >>>>> Gerald A >>>>> >>>>> >>>> >>>> >>>> >>> >>> >>> -- >>> Thanks & Regards, >>> A Gerald >>> >>> >> >> >> -- >> Thanks & Regards, >> A Gerald >> >> >> >> > > > > -- Thanks & Regards, A Gerald --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---