thoth Report post Posted August 3, 2008 (edited) I am trying to use a mixture of fusioncharts and widgets on the same page. I like to add the charts (column, bar, pie ect.) in the code-behind using data readers and strings...this is working great for the charts. But now I'm trying to use a similar method to implement some widgets, more specifically, an angular gauge. The code below appears to function just fine, but for some reason I keep getting a javascript error in I.E. (the annoying little error icon that appears on the bottom left corner of the browser). The error says "Error: Expected ')' Code: 0...Line 1 Character 49" I'm not sure what is causing the error, the gauge appears to function properly but the error is annoying. Here is the code that brings up the gauge in my code-behind... private void MedianGauge(){ string strSQL7 = "SELECT COUNT(*) AS [MEDHITS] FROM Combined_History WHERE EXACT = 589 AND EXACTSKIP <=693";DbConn oRs7 = new DbConn(strSQL7); //xmlData1 will be used to store the entire XML document generated by StringBuilder StringBuilder xmlData1 = new StringBuilder(); //Generate the chart element xmlData1.Append("<chart lowerLimit='0' upperLimit='100' lowerLimitDisplay='OVER' upperLimitDisplay='UNDER' gaugeStartAngle='180' gaugeEndAngle='0' palette='1' numberSuffix='%25' tickValueDistance='20' showValue='1'>"); xmlData1.Append("<colorRange>"); xmlData1.Append("<color minValue='0' maxValue='50' code='FF654F'/>"); xmlData1.Append("<color minValue='50' maxValue='90' code='F6BD0F'/>"); xmlData1.Append("<color minValue='90' maxValue='100' code='8BBA00'/>"); xmlData1.Append("</colorRange>"); xmlData1.Append("<dials>"); oRs7.ReadData.Read(); { xmlData1.AppendFormat("<dial value='{0}' rearExtension='10'/>", oRs7.ReadData["MEDHITS"].ToString()); } xmlData1.Append("</dials>"); xmlData1.Append("</chart>"); //outPut will store the HTML of the chart rendered as string //when an ajax call is made we use RenderChartHTML method string outPut7 = "";outPut7 = FusionCharts.RenderChartHTML("../../FusionCharts/AngularGauge.swf", "", xmlData1.ToString(), "MedianHitGauge", "330", "200", false, false); //Clear panel which will contain the chart Panel6.Controls.Clear(); //Add Litaral control to Panel which adds the chart from outPut string Panel6.Controls.Add(new LiteralControl(outPut7));Ive tried changing many things to see if I could get rid of the error. Nothing has worked and I can't pinpoint it. Is there something wrong with rendering the gauge using... FusionCharts.RenderChartHTML("../../FusionCharts/AngularGauge.swf", "", xmlData1.ToString(), "MedianHitGauge", "330", "200", false, false); If someone could point me in the right direction I would greatly appreciate it. Or, if there is a better way to render the chart from the code-behind, please show an example. Edited August 3, 2008 by Guest Share this post Link to post Share on other sites
Arindam Report post Posted August 4, 2008 Hi, Could you please try with new FusionCharts.dll. Please see the attachment. FusionCharts.zip Share this post Link to post Share on other sites
thoth Report post Posted August 4, 2008 AWESOME!...Works fine now! You have been most hopeful, Thank you very much!!! Share this post Link to post Share on other sites