anila

Members
  • Content count

    68
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by anila

  1. Customising Map

    Thanks for your reply. I thought its like fussioncahrting.
  2. Hi, Yes you have to use '%26' insted of '&'. Even i also faced same problem,after replacing it got worked.
  3. Hi, i am not generating xml by using any parsers,apis. I am just forming the data as xml nodes which has to pass to fussion charts. From database i was getting data like this,which has below. Year Month Series name Values 2008 7 CARDIAC 100 2008 7 DU- IT 100 2008 7 MULTIVENDOR 100 2008 8 CARDIAC 100 2008 8 DU- IT 67 2008 8 P-TECH 100 2008 9 CARDIAC 100 2008 9 DU- IT 67 2008 9 NETWORKING 0 2008 9 P-TECH 100 2008 10 CARDIAC 100 2008 10 DU- IT 100 2008 10 MULTIVENDOR 100 2008 10 NETWORKING 50 2008 10 P-TECH 100 2008 11 CARDIAC 100 2008 11 DU- IT 100 2008 11 MULTIVENDOR 100 2008 12 CARDIAC 67 2008 12 DU- IT 100 2008 12 MULTIVENDOR 50 2008 12 P-TECH 100 2009 3 CARDIAC 100 2009 3 DU- IT 100 2009 3 MULTIVENDOR 100 2009 3 NETWORKING -100 2009 3 P-TECH 100 2009 6 CARDIAC 50 2009 6 DU- IT 100 2009 6 MULTIVENDOR 100 I am trying to plot msline chart using msline.swf file in jsp. I am storing each column in one bean whch are coming from database. After tat i m using prepareList(vB_CL_Cust_NPS.getYr4_data(),nps_mn1,vB_CL_Cust_NPS.getSegment4_data(),vB_CL_Cust_NPS.getNps4_data()) whch accepts 4 columns as beans from dtabase. prepareList() cretas one list object with data whch are passed to that method. After that i am using readData(List list),whch accepts above list as parameter. public Vector readData(List list){ Vector data = new Vector(); LinkedHashMap mapOfCategory = new LinkedHashMap(); List alRegionMonthValueList = new ArrayList(); Map mapOfBar = new HashMap(); Map mapOfDataSet = new HashMap(); for (int i =0; i< list.size(); i++){ Yr2_Mn2_Region_code2_Nps2 obj = (Yr2_Mn2_Region_code2_Nps2)list.get(i); String categoryLabel = obj.getMn2() + "-" + obj.getYr2(); mapOfCategory.put(categoryLabel, new Category(categoryLabel) ); String regionKey = obj.getRegion_code2(); DataSet objDataSet = new DataSet(regionKey ); if (mapOfDataSet.containsKey(regionKey )){ //System.out.println("*Yes" ); DataSet objDataSetAlreadyAdded = (DataSet)mapOfDataSet.get(regionKey); List setListAlreadyAdded = objDataSetAlreadyAdded.getListOfSet(); setListAlreadyAdded.add(obj.getNps2()); objDataSet.setListOfSet(setListAlreadyAdded); mapOfDataSet.put(regionKey,objDataSetAlreadyAdded); }else{ List setList = new ArrayList(); setList.add (obj.getNps2() ); objDataSet.setListOfSet(setList); mapOfDataSet.put( regionKey,objDataSet); //System.out.println("*else" ); } data.add( 0, [color=red]mapOfCategory[/color]); data.add( 1, [color=red]mapOfDataSet[/color]); return data; } public String prepareCategoriesXML(LinkedHashMap mapOfCategory){ StringBuffer buffer = new StringBuffer(); buffer.append(""); Set s=mapOfCategory.keySet(); Iterator it=s.iterator(); while(it.hasNext()) { String me =""+it.next(); Category objCategory =(Category)mapOfCategory.get(me); buffer.append("<category label='"+objCategory.getLabel()+"'/>"); System.out.println("Categeroies"+objCategory.getLabel());} return buffer.toString(); } public String prepareDatasetXML(Map mapOfDataSet){ StringBuffer buffer1 = new StringBuffer(); buffer1.append(""); Set s=mapOfDataSet.keySet(); Iterator it=s.iterator(); while(it.hasNext()) { String me =""+it.next(); DataSet objCategory =(DataSet)mapOfDataSet.get(me); System.out.println("inside while b4 buffer"+mapOfDataSet.get(me)); buffer1.append("<dataset seriesName='"+objCategory.getName()+"'>"); for(int i=0;i<objCategory.getListOfSet().size();i++){ buffer1.append("><set value='"+objCategory.getListOfSet().get(i)+"'/>"); } buffer1.append("</dataset>"); } System.out.println("buffer1...."+buffer1.toString()); return buffer1.toString(); } i m calling all these methods in jsp like this List list1 = getdata.prepareList(vB_CL_Cust_NPS.getYr4_data(),nps_mn1,vB_CL_Cust_NPS.getSegment4_data(),vB_CL_Cust_NPS.getNps4_data()); Vector data1= getdata.readData(list1); String str2= getdata.prepareCategoriesXML((LinkedHashMap)data1.get(0)); String str3=getdata.prepareDatasetXML((Map)data1.get(1)); String chartXML1 = "<chart connectNullData='1' labelDisplay='Rotate' slantLabels='1' baseFont='Ge Inspira' useRoundEdges='1' legendPosition='RIGHT' clickURL='j-download-DwnNPS-4' yAxisName='NPS' legendBorderAlpha='0' shownames='1' showvalues='0' >"; String chartCatge1 ="<categories>"+str2; String chartCat1=str3; /*for(int head1=0;head1<nps1.size();head1++) { chartCatge1 = chartCatge1 + "><category label='"+nps1.get(head1)+"'/>"; }*/ chartCatge1 = chartCatge1 +"</categories>"; String strXML1=chartXML1+chartCatge1+chartCat1+"</chart>"; System.out.println ("STRING XML :"+strXML1); //Create the chart - Column 3D Chart with data contained in strXML1 String chartCode1= createChart("design/js/FusionCharts/MSLine.swf","", strXML1,"nps2", 490, 200, false,true); System.out.println ("CHART CODE :"+chartCode1); At last i am geting xml file like this. <chart connectNullData='1' labelDisplay='Rotate' slantLabels='1' baseFont='Ge Inspira' useRoundEdges='1' legendPosition='RIGHT' imageSave='1' link='javaScriptI am trying to plot msline chart using msline.swf file in jsp. but my problem is i have several months as categorie labels. in database for dataset p-tech,i have values according to month dec-2008,mar-2009,apr-2009. but it is ploating on jul-2008,aug-2008,sep-2008 respectivley. The reason is..... Just to reiterate, i am passing category labels as follows: <category label='Jul-2008'/> <category label='Aug-2008'/> <category label='Sep-2008'/> <category label='Oct-2008'/> <category label='Nov-2008'/> <category label='Dec-2008'/> <category label='Mar-2009'/> <category label='Jun-2009'/> Now, for example, when i am passing the data values for the series "P-Tech", i m passing the set values, which, i assume are to correspond to the categories of Dec, Mar and Jun, is as follows: <set value='0.0'/> <set value='100.0'/> <set value='100.0'/> Here, what is happening is that the <set> elements given as input are three in number and thereby they are corresponding to the first three categories in the category list which are that of Jul, Aug and Sep. Here, we need to pass empty <set> elements so that the values, say in the "P-Tech" series, refer/correspond to the correct category label. Foe example: <chart ....... > <categories> <category label='Jul-2008'/> <category label='Aug-2008'/> <category label='Sep-2008'/> <category label='Oct-2008'/> <category label='Nov-2008'/> <category label='Dec-2008'/> <category label='Mar-2009'/> <category label='Jun-2009'/> </categories> <dataset seriesName='P-TECH'> <set /> <set /> <set /> <set /> <set /> <set value='0.0'/> <set value='100.0'/> <set value='100.0'/> </dataset> .. .. .. <chart/> How to create empty set tags at coresponding positions. I have each column values in one bean with database order. Let me know any suggestions to do this.
  4. XML Framing For Uncontinuous data in java!

    Hi, Thanks alot for your people patience. Set values should have mapping with categeroies as well datasets.
  5. XML Framing For Uncontinuous data in java!

    Hi, I tried that also using DOM parser API to build xml. I am not getting idea to co-relate categeroies wth set values for a particular dataset. All the data i m putting into one list. using the setter,getters,i am trying to get data. like that i am framing categeroies,dataset,set values also. but here postioning is giving prblm....i mean to say for a particular dataset,does catageroiee have set value or not.
  6. XML Framing For Uncontinuous data in java!

    Hi, rites means i dont know wel db. tat is supported by some others,they r telling like we are not going to modify at proc.
  7. XML Framing For Uncontinuous data in java!

    Hi, Thanks for your reply. I did nt have rites to modify at DB. They are asking me to change at java end only.
  8. Using Grid

    Hi, I am creating chart using dataxml method(By calling createChart(String chartSWF, String strURL, String strXML, String chartId, int chartWidth, int chartHeight, boolean debugMode, boolean registerWithJS) whch is in Fusionchart.jsp). Now i want to use grid,to display labels and corresponding values. How to do this? we need to add any other thngs to use grids.
  9. XML Framing For Uncontinuous data in java!

    Hi, Any body have other ideas on this issue?????
  10. Hi, I used like this in my jsp. <chart labelDisplay='Rotate' slantLabels='1' connectNullData='1' baseFont='Ge Inspira' useRoundEdges='1' legendPosition='RIGHT' yAxisName='NPS' legendBorderAlpha='0' shownames='1' showvalues='0' clickURL='download('DwnNPS',2)'> by puting javascript function in head tag in same page. <script language="javascript"> function download(feed,ctl){ var form = document.forms[0]; form.method="POST"; form.action="ExtDXAction.do?type="+feed+"&cn="+ctl; form.submit(); } </script> it is showing invalid xml data. If i remove the single quote,its not throwing exception. but i have to pass the string to call the js function. may i know where i did the mistake. is it possible to call external js file.
  11. Hi All, Thanks alot for your guidelines. Finally i got solution for the problem. Insted of &,i used %26. Now its working. Rocking.....Thanks to all once again......
  12. Hi, Thanks for your reply. Can you people help me on this ASAP is appreciated.
  13. XML Framing For Uncontinuous data in java!

    Hi, Your post tells like compare two values for generating set values. but objCategory.getListOfSet().get©,this stmt gives integer values for example:100,65 etc.. ((Category)mapOfCategory.get(me).getLabel(),this stmt gives string whch represents regions example:CARDIAC,CU-IT,P_TECh etc.... How to compare these values? Can you please explain this? Thanks alot in advance.
  14. XML Framing For Uncontinuous data in java!

    Hi, Very very THanks for your reply. Here i am attching the sample code,as part of this i hardcoded data whch comes from db. TestXML_ani.zip
  15. Hi, I came to know one reason why it is showing INVALID XML DATA. tat is as part servlet request i used & after tat i replaced wth &. If i copy the code in IE xml is generating. For same code in FS,its throwing INVALID XML DATA. I am wondering,wats going wrong? Wat is the prblm? <chart clickURL='ExtDXAction.do?type=DWNNPS&cn=4' labelDisplay='Rotate' slantLabels='1' baseFont='Ge Inspira' useRoundEdges='1' legendPosition='RIGHT' yAxisName='NPS' legendBorderAlpha='0' shownames='1' showvalues='0'><categories><category label='Jul-2008'/><category label='Aug-2008'/><category label='Sep-2008'/><category label='Oct-2008'/><category label='Nov-2008'/><category label='Dec-2008'/><category label='Mar-2009'/><category label='Jun-2009'/></categories><dataset seriesName='P-TECH'><set value='77.0'/><set value='64.0'/><set value='38.0'/><set value='81.0'/><set value='86.0'/><set value='80.0'/><set value='95.0'/><set value='69.0'/></dataset><dataset seriesName='LUNAR'><set value='100.0'/></dataset><dataset seriesName='CARDIAC'><set value='62.0'/><set value='78.0'/><set value='54.0'/><set value='68.0'/><set value='78.0'/><set value='69.0'/><set value='73.0'/><set value='61.0'/></dataset><dataset seriesName='MULTIVENDOR'><set value='63.0'/><set value='71.0'/><set value='44.0'/><set value='66.0'/><set value='79.0'/><set value='67.0'/><set value='80.0'/><set value='77.0'/></dataset><dataset seriesName='NETWORKING'><set value='46.0'/><set value='58.0'/><set value='57.0'/><set value='51.0'/><set value='77.0'/><set value='83.0'/><set value='78.0'/><set value='51.0'/></dataset><dataset seriesName='DU- IT'><set value='78.0'/><set value='78.0'/><set value='69.0'/><set value='80.0'/><set value='77.0'/><set value='83.0'/><set value='77.0'/><set value='84.0'/></dataset></chart>
  16. Hi, here is the code String feed="DWNNPS"; int ctl=4; String strURL =encodeDataURL("ExtDXAction.do?type="+feed+"&cn="+ctl,"false",response); //clickURL='javascript:download(%26apos;DwnNPS%26apos;,4);' String chartXML1 = "<chart clickURL='"+strURL+"' labelDisplay='Rotate' slantLabels='1' baseFont='Ge Inspira' useRoundEdges='1' legendPosition='RIGHT' yAxisName='NPS' legendBorderAlpha='0' shownames='1' showvalues='0'>"; String chartCatge1 ="<categories>"+str2; String chartCat1=str3; /*for(int head1=0;head1<nps1.size();head1++) { chartCatge1 = chartCatge1 + "<category label='"+nps1.get(head1)+"'/>"; }*/ chartCatge1 = chartCatge1 +"</categories>"; String strXML1=chartXML1+chartCatge1+chartCat1+"</chart>"; System.out.println ("STRING XML :"+strXML1); //Create the chart - Column 3D Chart with data contained in strXML1 String chartCode1= createChart("design/js/FusionCharts/MSLine.swf","", strXML1,"nps2", 490, 200, false,true); // System.out.println ("CHART CODE :"+chartCode1);
  17. XML Framing For Uncontinuous data in java!

    Hi, Thanks alot for your reply. using empty set element i know. But i want how to identify where we need to create emty set element. I mean to say,as part of my post i gave the data format which is coming from db. I am facing prblm while building logic. I am not able to identify position where i have to creat empty set element. Its really very urgent,plz help me......
  18. Hi, String feed="DWNNPS"; int ctl=4; String strURL =encodeDataURL("ExtDXAction.do?type="+feed+"&cn="+ctl,"false",response); String chartXML1 = "<chart clickURL='"+strURL+"' labelDisplay='Rotate' slantLabels='1' baseFont='Ge Inspira' useRoundEdges='1' legendPosition='RIGHT' yAxisName='NPS' legendBorderAlpha='0' shownames='1' showvalues='0'>"; String chartCatge1 ="<categories>"+str2; String chartCat1=str3; I tried to use somethng like above code. I am getting invalid xml data.
  19. Hi, I am using JDOM,for getting xml structure. May i know this prototype and rootelement are identified by fussioncahrts. I am getting data like this,below <?xml version="1.0" encoding="UTF-8"?> <XMLResponse> <categories> <category label="7-2008" /> <category label="8-2008" /> <category label="9-2008" /> <category label="10-2008" /> <category label="11-2008" /> <category label="12-2008" /> <category label="3-2009" /> <category label="6-2009" /> </categories> <dataset seriesName="CENTRAL ATLANTIC"> <set value="86" /> <set value="76" /> <set value="54" /> <set value="74" /> <set value="88" /> <set value="78" /> <set value="80" /> <set value="69" /> </dataset> <dataset seriesName="CENTRAL CORRIDOR"> <set /> <set /> <set /> <set /> <set /> <set /> <set /> <set /> </dataset> <dataset seriesName="SOUTH EAST"> <set /> <set /> <set /> <set /> <set /> <set /> <set /> <set /> </dataset> <dataset seriesName="ULTRASOUND HQ"> <set /> <set /> <set /> <set /> <set /> <set /> <set /> <set /> </dataset> </XMLResponse> My question was is this structure will identified by fusionchart.....
  20. XMl Data

    Hi, StrXML="<chart baseFont='Ge Inspira' useRoundEdges='1' yAxisName='NPS' legendBorderAlpha='0'><XMLResponse><categories><category label="Jul-2008" /><category label="Aug-2008" /><category label="Sep-2008" /><category label="Oct-2008" /><category label="Nov-2008" /><category label="Dec-2008" /><category label="Mar-2009" /><category label="Jun-2009" /></categories><dataset seriesName="CENTRAL ATLANTIC"><set value="86.0" /><set value="76.0" /><set value="54.0" /><set value="74.0" /><set value="88.0" /><set value="78.0" /><set value="80.0" /><set value="69.0" /></dataset><dataset seriesName="CENTRAL CORRIDOR"><set /><set /><set /><set /><set /><set /><set /><set /></dataset><dataset seriesName="NORTH EAST"><set /><set /><set /><set /><set /><set /><set /><set /></dataset></XMLResponse></chart>"; wats wrong going in the above code? it is throwing exception in jsp as "; Expected". Let me know any solution.
  21. Hi, Can u explain me briefly. String chartXML1 = "<chart clickURL='javascript:download(%26apos;DwnNPS%26apos;,4);' labelDisplay='Rotate' slantLabels='1' baseFont='Ge Inspira' useRoundEdges='1' legendPosition='RIGHT' yAxisName='NPS' legendBorderAlpha='0' shownames='1' showvalues='0'>"; String chartCatge1 ="<categories>"+str2; String chartCat1=str3; chartCatge1 = chartCatge1 +"</categories>"; String strXML1=chartXML1+chartCatge1+chartCat1+"</chart>"; System.out.println ("STRING XML :"+strXML1); //Create the chart - Column 3D Chart with data contained in strXML1 String chartCode1= createChart("design/js/FusionCharts/MSLine.swf","", strXML1,"nps2", 490, 200, false,true); I am rendering chart like this <div id="3" ><font face="GE Inspira" size="2" onclick="download('DwnNPS',4)" style="cursor:hand"><b><%=Block4_heading%></b></font> <%=chartCode1%> </div> i have the javascript function which i was posted before.
  22. Hi, Thanks alot for your reply and sample code. function download(feed,ctl){ alert('inside download...'); var form = document.forms[0]; form.method="POST"; form.action="ExtDXAction.do?type="+feed+"&cn="+ctl; form.submit(); } From js function i am forwarding request to one servlet. May be this is the prblm? not sure If I removed hilighted code from js. then its working perfect.
  23. Hi Srividya, hey your function is working,but its working only first time click. what is the problem,usually it will work like this only...
  24. Hi Rahul, it is throwing HTTP Status 404 - /project_Testing_FS/j-download-DwnNPS,4 type Status report message /project_Testing_FS/j-download-DwnNPS,4 description The requested resource (/project_Testing_FS/j-download-DwnNPS,4) is not available. Apache Tomcat/5.5.9
  25. Hi Rahul, It is throwing javascript error:unterminated string constant. String chartXML1 = "<chart clickURL='j-download-DwnNPS,4' labelDisplay='Rotate' slantLabels='1' baseFont='Ge Inspira' useRoundEdges='1' legendPosition='RIGHT' yAxisName='NPS' legendBorderAlpha='0' shownames='1' showvalues='0'>"; Let me know wats wrong going here....