bhoffman17 Report post Posted May 17, 2010 How would i rewrite list to update using javascript? Please help me! I am calling the chart to page using: on default.aspx Code behind page is: public string GetInfrastructureCapacityURL(){ String dataURL = Server.UrlEncode("dataURL_Infrasturcture_Capacity.aspx"); //Create the chart - Pie 3D Chart with dataURL as strDataURL return FusionCharts.RenderChart("../FusionCharts/Column3D.swf", dataURL, "", "FactorySum", "600", "300", false, false);} On the data_URL_Infrasturcture_Capacity.aspx this is the code: string connString = "Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Inf_Cap.mdf;Integrated Security=True;User Instance=True"; // OLD LINK Data Source=HECND7261TRBSQLEXPRESS;database=TestDatabase; UID=dbtest;PWD=87JamesH string strSQL = "SELECT TOP 6 Date = CONVERT(varchar(8), Date, 1), Used_Cap " + "FROM Inf_Cap_Monthly " + "ORDER BY Date Desc "; SqlConnection objConnect = new SqlConnection(connString);objConnect.Open(); SqlCommand objCommand = new SqlCommand(strSQL, objConnect); SqlDataReader myReader = objCommand.ExecuteReader(); StringBuilder xmlData = new StringBuilder(); //Generate the chart elementxmlData.AppendFormat( "<chart caption='Infrastructure Capacity Usage' subCaption='Monthly' xAxisName='Month' yAxisName='Capacity Used' showValues='0' formatNumberScale='0' showBorder='1'logoURL='../images/steelcase-logo.gif' logoPosition='TL' logoAlpha='100' logoScale='100'>"); while (myReader.Read()){ xmlData.AppendFormat( "<set label='" + myReader["Date"].ToString() + "' value='" + myReader["Used_Cap"].ToString() + "' />");} myReader.Close(); xmlData.Append( "<trendLines><line startValue='900' color='FF0033' displayvalue='Max Capacity' /></trendLines></chart>");Response.ContentType = "text/xml"; //Just write out the XML data //NOTE THAT THIS PAGE DOESN'T CONTAIN ANY HTML TAG, WHATSOEVERResponse.Write(xmlData.ToString()); objConnect.Close(); objConnect.Dispose(); What do i need to do to get that to work with a updatepanel, because when ever it updates it loses the chart and just shows, Chart. Thanks! Share this post Link to post Share on other sites
Guest Basundhara Ghosal Report post Posted May 18, 2010 Hi, Please try using "RenderChartHTML" in place of 'RenderChart' for the same. I hope this helps. Share this post Link to post Share on other sites
bhoffman17 Report post Posted May 18, 2010 Thank you so much!!! Share this post Link to post Share on other sites
Guest Basundhara Ghosal Report post Posted May 18, 2010 Hi, You are most welcome. Happy FusionCharting. Share this post Link to post Share on other sites