PaulE Report post Posted March 6, 2008 Hi, I've just started using Fusion Charts but I'm having a bit of a problem. I'm trying to use it to print some data from a Lotus Domino server using a java agent to generate the XML. My agent generates the following code. <graph caption='Database Usage For Phone Book' xAxisName='Month' yAxisName='Usage'> <set label='February' value='878' /> <set label='March' value='279' /> </graph> Is there something wrong with this? While I realise you don't have much domino experience I also get *really* weird results when trying to generate the XML with a lotusscript agent. In that case strings passed into the XML from variables seem to corrupt when read in by the flash file. The following line of lotus script: Print {<chart caption='Database Usage For } + sDatabase + {' xAxisName='Month' yAxisName='Usage'>} produces XML that IE and FireFox are happy with but rather than getting the name of my database in FusionCharts I get a number ( generally 31 but sometimes 30 or 32 ) embedded in the middle of the string. I am just at a loss to explain this. Hope someone can help .... Share this post Link to post Share on other sites
PaulE Report post Posted March 6, 2008 I've found out what the problem is and itis got nothing to do with the XML. Here is the code I used in domino to open the chart swf file and pass it it's XML URL. var myChart = new FusionCharts("Column2D.swf", "myChartId", "900", "300", "0", "0");myChart.setDataURL ("JavaOutputXML?openagent&database=<Computed Value>"); myChart.render("chartdiv1"); Whats happening is the is NOT the URL that the Fusion Chart swf file is calling. It called /AnalyseUsage.nsf/JavaOutputXML?openagent&FCTime=34 My &Database= field is missing from the URL and has been replaced by a new field that must have comde from the SWF file. This has got to be a bug! What does my code that generates the XML care about this field. I think I can actually get around this by using %26 on the URL string rather than "&" and then chopping out the field I want. However this is definatly a problem. Share this post Link to post Share on other sites
Arindam Report post Posted March 6, 2008 hi, I went through your problem. When ever you use dataURL in FusionChart please first you need to encode URL. Here you are using Java Script then escape function will encode your URL. See code below var myChart = new FusionCharts("Column2D.swf", "myChartId", "900", "300", "0", "0"); // encoded url var dataUrl = escape("JavaOutputXML?openagent&database=<Computed Value>"); myChart.setDataURL(dataUrl); myChart.render("chartdiv1"); also you can do url encode for you next url var dataUrl=escape("/AnalyseUsage.nsf/JavaOutputXML?openagent&FCTime=34"); Share this post Link to post Share on other sites