Sign in to follow this  
noman zafar

Gantt Charts In Asp.net

Recommended Posts

Hi there

 

i want to use gantt chart in asp.net but getting inalid xml data erro.

 

 

The XmlData is sample copied by fusion charts help.

 

i suspect , something wrong is with this line, please advise

 

 

 

 

FusionCharts.RenderChartHTML("FusionCharts/FCF_Gantt.swf", "", strXML, "M2M", "800", "300", False)

 

i am using below function to render the chart

 

 

Function CreateJobChart(ByVal charttype As Integer) As String

 

 

Dim strXML As String

 

strXML =

 

" <chart dateFormat='dd/mm/yyyy' showTaskNames='1' ganttWidthPercent='70' gridBorderAlpha='100' canvasBorderColor='333333' canvasBorderThickness='0' hoverCapBgColor='FFFFFF' hoverCapBorderColor='333333' extendcategoryBg='0' ganttLineColor='99cc00' ganttLineAlpha='20' baseFontColor='333333' gridBorderColor='99cc00'>"

 

strXML = strXML &

 

"<categories bgColor='333333' fontColor='99cc00' isBold='1' fontSize='14' >"

 

strXML = strXML &

 

" <category start='1/9/2004' end='31/12/2004' name='2004' />"

 

strXML = strXML &

 

" <category start='1/1/2005' end='31/7/2005' name='2005' /> "

 

strXML = strXML &

 

"</categories>"

 

strXML = strXML &

 

" <categories bgColor='99cc00' bgAlpha='40' fontColor='333333' align='center' fontSize='10' isBold='1'>"

 

strXML = strXML &

 

" <category start='1/9/2004' end='30/9/2004' name='Sep' />"

 

strXML = strXML &

 

" <category start='1/10/2004' end='31/10/2004' name='Oct' />"

 

strXML = strXML &

 

" <category start='1/11/2004' end='30/11/2004' name='Nov' />"

 

strXML = strXML &

 

" <category start='1/12/2004' end='31/12/2004' name='Dec' />"

 

strXML = strXML &

 

" <category start='1/1/2005' end='31/1/2005' name='Jan' />"

 

strXML = strXML &

 

" <category start='1/2/2005' end='28/2/2005' name='Feb' />"

 

strXML = strXML &

 

" <category start='1/3/2005' end='31/3/2005' name='March' />"

 

strXML = strXML &

 

" <category start='1/4/2005' end='30/4/2005' name='Apr' />"

 

strXML = strXML &

 

" <category start='1/5/2005' end='31/5/2005' name='May' />"

 

strXML = strXML &

 

" <category start='1/6/2005' end='30/6/2005' name='June' />"

 

strXML = strXML &

 

" <category start='1/7/2005' end='31/7/2005' name='July' />"

 

strXML = strXML &

 

" </categories>"

 

strXML = strXML &

 

" <processes positionInGrid='right' align='center' headerText='Leader' fontColor='333333' fontSize='11' isBold='1' isAnimated='1' bgColor='99cc00' headerbgColor='333333' headerFontColor='99cc00' headerFontSize='16' bgAlpha='40'>"

 

strXML = strXML &

 

" <process Name='Ashok' id='1' />"

 

strXML = strXML &

 

" <process Name='Pallav' id='2' />"

 

strXML = strXML &

 

" <process Name='Akhil' id='3' />"

 

strXML = strXML &

 

" <process Name='Sanket' id='4' />"

 

strXML = strXML &

 

" <process Name='Srishti' id='5' />"

 

strXML = strXML &

 

" <process Name='Kisor' id='6' />"

 

strXML = strXML &

 

"</processes>"

 

strXML = strXML &

 

" <dataTable fontColor='333333' fontSize='11' isBold='1' headerFontColor='000000' headerFontSize='11' >"

 

strXML = strXML &

 

" <dataColumn headerbgColor='333333' width='150' headerfontSize='16' headerAlign='left' headerfontcolor='99cc00' bgColor='99cc00' headerText=' Team' align='left' bgAlpha='65'>"

 

strXML = strXML &

 

" <text label=' MANAGEMENT' /> "

 

strXML = strXML &

 

" <text label=' PRODUCT MANAGER' />"

 

strXML = strXML &

 

" <text label=' CORE DEVELOPMENT' />"

 

strXML = strXML &

 

" <text label=' Q & A / DOC.' />"

 

strXML = strXML &

 

" <text label=' WEB TEAM' />"

 

strXML = strXML &

 

" <text label=' MANAGEMENT' />"

 

strXML = strXML &

 

" </dataColumn>"

 

strXML = strXML &

 

" </dataTable>"

 

strXML = strXML &

 

" <tasks>"

 

strXML = strXML &

 

" <task name='Survey' hoverText='Market Survey' processId='1' start='7/9/2004' end='10/10/2004' id='Srvy' color='99cc00' alpha='60' topPadding='19' />"

 

strXML = strXML &

 

" <task name='Concept' hoverText= 'Develop Concept for Product' processId='1' start='25/10/2004' end='9/11/2004' id='Cpt1' color='99cc00' alpha='60' />"

 

strXML = strXML &

 

" <task name='Concept' showName='0' hoverText= 'Develop Concept for Product' processId='2' start='25/10/2004' end='9/11/2004' id='Cpt2' color='99cc00' alpha='60' />"

 

strXML = strXML &

 

" <task name='Design' hoverText= 'Preliminary Design' processId='2' start='12/11/2004' end='25/11/2004' id='Desn' color='99cc00' alpha='60'/>"

 

strXML = strXML &

 

" <task name='Product Development' processId='2' start='6/12/2004' end='2/3/2005' id='PD1' color='99cc00' alpha='60'/>"

 

strXML = strXML &

 

" <task name='Product Development' processId='3' start='6/12/2004' end='2/3/2005' id='PD2' color='99cc00' alpha='60' />"

 

strXML = strXML &

 

" <task name='Doc Outline' hoverText='Documentation Outline' processId='2' start='6/4/2005' end='1/5/2005' id='DocOut' color='99cc00' alpha='60'/>"

 

strXML = strXML &

 

" <task name='Alpha' hoverText='Alpha Release' processId='4' start='15/3/2005' end='2/4/2005' id='alpha' color='99cc00' alpha='60'/>"

 

strXML = strXML &

 

" <task name='Beta' hoverText='Beta Release' processId='3' start='10/5/2005' end='2/6/2005' id='Beta' color='99cc00' alpha='60'/>"

 

strXML = strXML &

 

" <task name='Doc.' hoverText='Documentation' processId='4' start='12/5/2005' end='29/5/2005' id='Doc' color='99cc00' alpha='60'/>"

 

strXML = strXML &

 

" <task name='Website Design' hoverText='Website Design' processId='5' start='18/5/2005' end='22/6/2005' id='Web' color='99cc00' alpha='60'/>"

 

strXML = strXML &

 

" <task name='Release' hoverText='Product Release' processId='6' start='5/7/2005' end='29/7/2005' id='Rls' color='99cc00' alpha='60'/>"

 

strXML = strXML &

 

" <task name='Dvlp' hoverText='Development on Beta Feedback' processId='3' start='10/6/2005' end='1/7/2005' id='Dvlp' color='99cc00' alpha='60'/> "

 

strXML = strXML &

 

" <task name='QA' hoverText='QA Testing' processId='4' start='9/4/2005' end='22/4/2005' id='QA1' color='99cc00' alpha='60'/>"

 

strXML = strXML &

 

" <task name='QA2' hoverText='QA Testing-Phase 2' processId='4' start='25/6/2005' end='5/7/2005' id='QA2' color='99cc00' alpha='60'/>"

 

strXML = strXML &

 

" </tasks>"

 

strXML = strXML &

 

" <connectors>"

 

strXML = strXML &

 

" <connector fromTaskId='Cpt1' toTaskId='Cpt2' color='99cc00' thickness='2' fromTaskConnectStart='1'/>"

 

strXML = strXML &

 

" <connector fromTaskId='PD1' toTaskId='PD2' color='99cc00' thickness='2' fromTaskConnectStart='1'/>"

 

strXML = strXML &

 

" <connector fromTaskId='PD1' toTaskId='alpha' color='99cc00' thickness='2' />"

 

strXML = strXML &

 

" <connector fromTaskId='PD2' toTaskId='alpha' color='99cc00' thickness='2' />"

 

strXML = strXML &

 

" <connector fromTaskId='DocOut' toTaskId='Doc' color='99cc00' thickness='2' />"

 

strXML = strXML &

 

" <connector fromTaskId='QA1' toTaskId='beta' color='99cc00' thickness='2' />"

 

strXML = strXML &

 

" <connector fromTaskId='Dvlp' toTaskId='QA2' color='99cc00' thickness='2' />"

 

strXML = strXML &

 

" <connector fromTaskId='QA2' toTaskId='Rls' color='99cc00' thickness='2' />"

 

strXML = strXML &

 

" </connectors>"

 

strXML = strXML &

 

" <milestones>"

 

strXML = strXML &

 

" <milestone date='29/7/2005' taskId='Rls' radius='10' color='333333' shape='Star' numSides='5' borderThickness='1'/>"

 

strXML = strXML &

 

" <milestone date='2/3/2005' taskId='PD1' radius='10' color='333333' shape='Star' numSides='5' borderThickness='1' />"

 

strXML = strXML &

 

" <milestone date='2/3/2005' taskId='PD2' radius='10' color='333333' shape='Star' numSides='5' borderThickness='1'/>"

 

strXML = strXML &

 

" </milestones> "

 

strXML = strXML &

 

"</chart>"

 

 

Return FusionCharts.RenderChartHTML("FusionCharts/FCF_Gantt.swf", "", strXML, "M2M", "800", "300", False)

 

 

End Function

 

Share this post


Link to post
Share on other sites

Hi,

 

Welcome to FusionCharts Forum! :(

 

Could you please send us the rendered HTML file as an attachment so that we might test it?

 

You can get this HTML by right-clicking on the browser page and the viewing the page source. Please send us the HTML from "<!-- START Script Block for Chart ChartId -->" to "<!-- END Script Block for Chart ChartId -->".

 

Looking forward to your reply.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this