• Content count

  • Joined

  • Last visited

About Nightjar

  • Rank
    Forum Newbie
  1. Json V Xml

    My Bad! I've got it working from a url sending data with the double-quotes as required. It was a pain getting the TestData class to generate the string using double-quotes, so I jumped in at the deep end and it worked first time - I'm using Spring MVC and Jackson json generation from my DTO's. May I suggest a JSON TestData class in the examples? Lovely product Thanks
  2. Json V Xml

    Hi, I'm new to FC, so apologies if this is a newbie : The following (generated from my jsp page) doesn't work : <script type='text/javascript'> var chart_basicChart = new FusionCharts({"swfUrl":"/qa/resources/Charts/Column3D.swf","registerWithJS":"0","height":"300","renderAt":"basicChartDiv","width":"600","dataFormat":"json","dataSource":"{'chart':{'caption':'Monthly Sales Summary', 'subcaption':'For the year 2006', 'xaxisname':'Month', 'yaxisname':'Sales'},'data':[ { 'label':'January','value':'17400' } ]}","debugMode":"1","id":"basicChart"}).render(); </script> It generates (in the debug window): INFO: XML Data provided using dataXML method. INFO: XML Data provided using dataXML method. ERROR: Invalid XML encountered. A start-tag is not matched with an end-tag. Check the XML data that you've provided. If you've special characters in your XML (like %, &, ' or accented characters), please URL Encode them. If I use (using the same jsp page, but changing the params) : <script type='text/javascript'> var chart_basicChart = new FusionCharts({"swfUrl":"/qa/resources/Charts/Column3D.swf","registerWithJS":"0","height":"300","renderAt":"basicChartDiv","width":"600","dataFormat":"xml","dataSource":"<chart caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' showValues='0' formatNumberScale='0' showBorder='1'> <set label='Jan' value='462' /></chart>","debugMode":"1","id":"basicChart"}).render(); </script> it works fine. I copied both sets of data from the documentation, but I presume it's the json format that's wrong. Could someone point me to a json dataset I can use to get a chart up using json please - I can work it from there :-) Many Thanks