sami.khan

Members
  • Content count

    6
  • Joined

  • Last visited

Everything posted by sami.khan

  1. Dear All, I am using SharePoint 2007 with quest web parts for SharePoint. I hav made a Gantt chart based on the task list of the SharePoint.The chart gets displayed fine for the first four enteries in the list...But when it comes to the fifth recored, the fifth recored is skipped and the it picks the sixth one.For the sixth recored it picks the seventh one and so on...Here is the code which i have written .... <script type="text/javascript"> var StartDate; var EndDate; var Task; var found=false; var myData = new Array(); var i=0; var x=0; var myData1= new Array(); var j=0; var k=0; var l=0; var found2=false; var strXML="<chart dateFormat='dd/mm/yyyy' caption='Project Gantt' subCaption='From 1st Jan 2009 - 31st Dec 2009' palette='3'>"; strXML=strXML+ "<categories>"; strXML=strXML+ "<category start='01/01/2009' end='01/02/2009' label='Jan' />"; strXML=strXML+ "<category start='01/02/2009' end='01/03/2009' label='Feb' />"; strXML=strXML + "<category start='01/03/2009' end='01/04/2009' label='Mar' />"; strXML=strXML + "<category start='01/04/2009' end='01/05/2009' label='Apr' />"; strXML=strXML + " <category start='01/05/2009' end='01/06/2009' label='May' />"; strXML=strXML + "<category start='01/06/2009' end='01/07/2009' label='Jun' />"; strXML=strXML + " <category start='01/07/2009' end='01/08/2009' label='Jul' />"; strXML=strXML + "<category start='01/08/2009' end='01/09/2009' label='Aug' />"; strXML=strXML + "<category start='01/09/2009' end='01/10/2009' label='Sep' />"; strXML=strXML + "<category start='01/10/2009' end='01/11/2009' label='Oct' />"; strXML=strXML + "<category start='01/11/2009' end='01/12/2009' label='Nov' />"; strXML=strXML + "<category start='01/12/2009' end='31/12/2009' label='Dec' />"; strXML=strXML+ "</categories>"; StartDate="<%Start Date%>"; EndDate="<%Due Date%>"; Task= "<%Title%>"; for(x in myData) { if(myData[x][0] == StartDate && !found) { myData[x][1]=EndDate; found=true; } } if(!found) { myData[i]=new Array(); myData[i][0]=StartDate; myData[i][1]= EndDate; i++; } found=false; for(j in myData1) { if (myData[j] == Task && !found2) { myData1[j]= Task; found2=true; } } if(!found2) { myData1[k]= new Array(); myData1[k]=Task; k++; } found2=false; strXML=strXML+ "<processes fontSize='12' isBold='1' align='left' headerText='Tasks' headerAlign='left' headerFontSize='14'>"; for(j in myData1) { strXML=strXML+ "<process label='"+ myData1[j]+"' />"; } strXML=strXML+ "</processes>"; strXML=strXML+ "<tasks>"; for (l in myData) { strXML=strXML+ "<task start='"+myData[l][0]+"' end='"+myData[l][1]+"' />"; } strXML=strXML+ "</tasks>"; strXML=strXML+ "</chart>"; </script> [/Code] Could anyone of you please reply to me stating why it doesn't picks the proper recored. Thanks Sami
  2. Chart bars override each other?

    Dear all, I have a Gantt chart based on the task list in sharepoint.The problem is that some tasks have the same start and ending date...Some task are smaller while other are large tasks..The issue is that lager task appears , while it overrides the smaller ones..The small task appear in the back ground of the larger task.This image will explain you the scenrio: Could anyone of you please explain how i can show all the task against the given phase properly? Thanks Sami
  3. Hi All, Is it possible to display data series from two different SharePoint Lists using Column 2D/3D charts in Fusion. The chart is shown in the followin fig: Here the first and the last data series is being picked from different lists while the in between data series are picked from another list: Could anyone of please suggest whether it is possible or not? Thanks, Sami.
  4. Hi All, I am facing a strang type of issue....I have a SharePoint List columns of number type in which some numbers are stored..The numbers are in the sequence as shown in the following fig: Note the last column in the fig please: When i calulate the total of the last column "Num-Effectiviness of the Instructor" the chart is displayed as shown in the following fig: as you can find from the fig: the total should be 11% not this garbage value. Here is my javascript code which is being used to display this chart..I am passing strXML to SetDataXML() method . <script type="text/javascript"> var x=0; var i=0; var totalEffectiviness=0; var Avg=0.0; var AvgE=0; var ID=0; var Total=0; var TotalValue=0; var found=false; var myData=new Array(); var Effectiviness=0; var strXML="<chart caption='Overall Course Chart' xAxisName='Parameters' yAxisName='Percentage' showValues='1' numberSuffix='%' yAxisMinValue ='0' yAxisMaxValue='100'>"; Effectiviness="<%Num - Effectiveness of the instructor%>"; if(!found) { myData=new Array(); myData=Effectiviness; i++; } found=false; TotalValue=myData.length; for(x=0;x<TotalValue;x++) { Total =Total + myData[x]; } strXML=strXML+"<set label='Effectiveness' value='"+Total+"' />"; strXML=strXML+"</chart>"; </script> Would anyone of you please suggest what is wrong with Javascript code that it is not displaying the proper result? Thanks, Sami.
  5. Dear All, I have been assigned a task to change the backgroud image of the canvas or even the background of the chart to something which suits our company requirement..I looked at the document for this chart but was unable to find any place where I can set the background image of the chart to an image of our own. Could anyone of you please suggest me whether it is possible or not? If yes how I can acheive my task? Many Thanks, Sami
  6. Thanks Rahul for the reply.I have correted my code and is working fine ...Here the issue was... Code with fault: for(x in myData) { if(myData[x][0] == StartDate && !found) { myData[x][1]=EndDate; found=true; } } Correct Code: for(x in myData) { if((myData[x][0] == StartDate && myData[x][1] == EndDate) && !found) { myData[x][0]=myData[x][0]+1; myData[x][1]=myData[x][1]+1; found=true; } } Sami.