asp.net c# - invalid xml
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



asp.net c# - invalid xml Expand / Collapse
Author
Message
Posted 10/31/2007 4:49:39 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/2/2007 11:11:32 AM
Posts: 3, Visits: 8
Hello -
I'm trying to implement the angular gauge in an asp.net page with C#. I keep getting an
invalid XML but the XML looks valid. I've even taken the demo sample and tried using
that and had no luck.

We have fusioncharts as well and I'm wondering if we have to use a different .js file
or .cs for gadgets versus the charts?

Here is my xml output:
<chart lowerLimit='0' upperLimit='100' lowerLimitDisplay='' upperLimitDisplay='' gaugeStartAngle='180' gaugeEndAngle='0' palette='1' numberSuffix='%' tickValueDistance='20' showValue='1'><colorRange><color minValue='0' maxValue='75' code='FF654F'/><color minValue='75' maxValue='100' code='8BBA00'/></colorRange><dials><dial value='7.61' rearExtension='10'/></dials></chart>


here is the c# code that renders the html:


string xmlData;//Generate the chart elementxmlData = "<chart lowerLimit='0' upperLimit='100' lowerLimitDisplay='' upperLimitDisplay='' gaugeStartAngle='180' gaugeEndAngle='0' palette='1' numberSuffix='%' tickValueDistance='20' showValue='1'>";xmlData += "<colorRange>";xmlData += "<color minValue='0' maxValue='75' code='FF654F'/>";xmlData += "<color minValue='75' maxValue='100' code='8BBA00'/>";xmlData += "</colorRange>";xmlData += "<dials>";foreach ( DataRow row in dt.Rows){xmlData += "<dial value='" + row["pt"].ToString() + "' rearExtension='10'/>";}xmlData += "</dials>";xmlData += "</chart>";Response.Write(xmlData);//Create the chart - Pie 3D Chart with data from xmlDatalblChart.Text = InfoSoftGlobal.FusionCharts.RenderChartHTML("FusionCharts/AngularGauge.swf", "", xmlData,"fChart", "200", "240", false);


thanks,
Dan
Post #2917
Posted 11/1/2007 9:03:14 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: Today @ 5:38:52 AM
Posts: 884, Visits: 1,420
Hi,

Every thing seems ok .... except the numberSuffix='%'

please use %25 (URL encoded value of %) instead (numberSuffix='%25')

Hope all will wokr fine then.

Regards,

Sudipto Choudhury
FusionCharts Team

Post #2922
Posted 11/2/2007 11:11:40 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/2/2007 11:11:32 AM
Posts: 3, Visits: 8
that worked. thanks.
Post #2955
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -7:00, Time now is 6:28pm


Execution: 0.078.