|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 2/27/2008 10:18:17 AM
Posts: 1,
Visits: 1
|
|
Hi,
Thanks for a great software.
I had an annoying 'invalid XML' error for a few hours when trying to
script graphs that worked perfectly from static files.
The solution was to only use single quotes for all attributes within
the xml and always using double quotes to handle the string in the javascript.
The other way around does not work.
Best regards
Patrik Carlsson
|
|
|
|
|
Supreme Being
      
Group: Moderators
Last Login: 10/5/2008 9:41:33 AM
Posts: 809,
Visits: 1,285
|
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 3/6/2008 8:54:07 PM
Posts: 1,
Visits: 4
|
|
| I had similar frustrations with scripted charts - no issues w/ quotes, but having similar invalid XML data messages. I have a workaround for it, but I'm posting to see if it's a bug or something else. I'm establishing my xml data as a js variable, and passing the variable name to the setDataXML method. Kept getting "Invalid XML Data" in the chart, so I added an updateChartXML call after the render, using the same variable data, and now I get a chart to display. Here's an excerpt of the HTML being generated: <div id="chartloc1">--- Chart Goes Here ---</div><br> <script type=text/javascript> var chart1 = new FusionCharts("/fusioncharts/charts/FCF_Pie3D.swf", "Chart1Id", "600", "250", "0","1"); var chartdata1="<graph caption='Distribution by Account' bgColor='F1F1F1' showNames='1' numberPrefix='$' pieSliceDepth='15' pieYScale='40' pieFillAlpha='100' decimalPrecision='0'><set name='ACCOUNT 1' value='12000' color='0000CC'/><set name='ACCOUNT 2' value='3900' color='FF3333'/><set name='ACCOUNT 3' value='36' color='6666CC'/><set name='ACCOUNT 4' value='-35' color='CC0066'/></graph>"; chart1.setDataXML(chartdata1); chart1.render("chartloc1"); updateChartXML("Chart1ID",chartdata1); </script> It's an extra step, but it works. Is there something else that I'm missing? Also echoing the great product statement - addresses a wide variety of potential needs for me.
|
|
|
|
|
Supreme Being
      
Group: Moderators
Last Login: 10/5/2008 9:41:33 AM
Posts: 809,
Visits: 1,285
|
|
| hi, Your code without 'updateChartXML("Chart1ID",chartdata1);' works fine in our labs and the chart renders well.
Regards,
Sudipto Choudhury FusionCharts Team
|
|
|
|