ramkmr Report post Posted June 18, 2008 Hi I am trying to generate Gantt chart on the fly Attached my asp page and another html page which shows the gantt chart but I am getting invalid xml data error any ideas why I am getting? Is this because of trail version If so any work around? Thanks a lot The output I am having from the strXML is as below (from firebox browser is that double quote matter here) - - - BasicDBExample11.txt Share this post Link to post Share on other sites
Arindam Report post Posted June 19, 2008 Hi ramkmr, In the html page you are using physical path. It Share this post Link to post Share on other sites
ramkmr Report post Posted June 19, 2008 Hi Arindam, Thanks a lot I did tried that's fine the error gone but the chart not showing (If I copy the xml output and save as .xml after replacing double quotes with single qoute then the refer it works) Is that because I am using trail version and do I need to replace the double and single quotes too if so how when I view the asp page the xml generated having double quotes in it? any ideas? Thanks Share this post Link to post Share on other sites
Arindam Report post Posted June 19, 2008 Hi ramkmr, First of all tell you that trail version chart and paid version chart are same, but in trail Version Company water mark will shown. Chart xml coming from asp page, its ok. Please run html page from with in web server. Also keep Fusioncharts swf file and js file with in web server. Please see documentation http://www.fusioncharts.com/docs Share this post Link to post Share on other sites
ramkmr Report post Posted June 20, 2008 (edited) Hi Arindam, Yes I am running all this in web server only did tried relative path exact path etc the issue now is If I give myChart.setDataURL("C:/../../Gantt/MyFirstChart.xml"); Then it works fine remember the data on this file is just cut and paste of the following asp's output but if I give the actual asp which generates the xml output myChart.setDataURL("C:/../../BasicDBExample.asp"); it doesn't work here(says "invalid xml data") so really confused why the direct link to asp not working if I give myChart.setDataXML("C:/../../BasicDBExample.asp"); then getting "no data to display" error message anything I am missing here. any ideas? Edited June 20, 2008 by Guest Share this post Link to post Share on other sites
FusionCharts Support Report post Posted June 20, 2008 ramkmr (6/20/2008)Hi Arindam, Yes I am running all this in web server only did tried relative path exact path etc the issue now is If I give myChart.setDataURL("C:/../../Gantt/MyFirstChart.xml"); Then it works fine remember the data on this file is just cut and paste of the following asp's output but if I give the actual asp which generates the xml output myChart.setDataURL("C:/../../BasicDBExample.asp"); it doesn't work here(says "invalid xml data") so really confused why the direct link to asp not working if I give myChart.setDataXML("C:/../../BasicDBExample.asp"); then getting "no data to display" error message anything I am missing here. any ideas? Hi ramkmr, There seems to be some confusion regarding the path that you are using. Since you are running ASP page to generate XML file, you need to run the application from a local server (e.g. IIS). This would create virtual folder for the actual folder where you are keeping your files. Say, you are keeping the files in actual folder C:MyASPAppFusionChartsDataGenerator and you have made you folder C:MyASPApp as a virtual folder in IIS web sharing named "mysite" you would need to access/run the apps inside this folder using path :http://localhost/mysite. The sub-folders inside this folder are accessible in the same fashion : http://localhost/mysite/FusionCharts etc. Now, since you are getting errors, what you can do is set the chart's debug mode and see the debug inormation in the debug window. You also might try generating the XML using the same URL - "C:/../../BasicDBExample.asp" and send it to us so that we can see why its "invalid xml data". Please also note that if you wish to provide data using setDataXML() you need pass the XML as string to the function. e.g. myChart.setDataXML("<chart><set value='1201' label='foo'/></chart>"); To pass the XML generator URL you need to use setDataURL() function. Share this post Link to post Share on other sites
ramkmr Report post Posted June 20, 2008 Hi Sudipto you are right I got it working now I Just copied the Gantt.swf in web application root folder and referenced it's working great now Thanks a lot for your team So it has to be the all files in web folders to get it working Share this post Link to post Share on other sites
ahmadry Report post Posted November 20, 2008 Hi, I've tried the following code with no success. The message error was "Invalid XML data" var myChart = new FusionCharts("../Charts/Gantt.swf", "myChartId1", "600", "400", "0", "0"); dataXml = "<chart dateFormat='mm/dd/yyyy' caption='Project Gantt'>" + " <categories> " + " <category start='02/01/2007' end='03/01/2007' label='Feb' /> " + " <category start='03/01/2007' end='04/01/2007' label='Mar' /> " + " </categories> " + " <processes fontSize='12' isBold='1' align='right'> " + " <process label='Identify Customers' /> " + " <process label='Survey 50 Customers' /> " + " </processes> " + " <tasks> " + " <task start='02/04/2007' end='02/10/2007' /> " + " <task start='02/08/2007' end='02/19/2007' /> " + " </tasks> " + "</chart> " myChart.setDataXML(dataXml); myChart.render("chartdiv"); But, the following case is fine. var myChart = new FusionCharts("../Charts/Gantt.swf", "myChartId1", "600", "400", "0", "0"); myChart.setDataURL("data.xml"); myChart.render("chartdiv"); File data.xml contains the following XML data (identical with the previous sample) : <chart dateFormat='mm/dd/yyyy' caption='Project Gantt'> <categories> <category start='02/01/2007' end='03/01/2007' label='Feb' /> <category start='03/01/2007' end='04/01/2007' label='Mar' /> </categories> <processes fontSize='12' isBold='1' align='right'> <process label='Identify Customers' /> <process label='Survey 50 Customers' /> </processes> <tasks> <task start='02/04/2007' end='02/10/2007' /> <task start='02/08/2007' end='02/19/2007' /> </tasks> </chart> What's wrong with the first sample? thanks in advance, ahmad Share this post Link to post Share on other sites
Arindam Report post Posted November 21, 2008 Hi, Chart render fine with using your dataXML code in our lab. Share this post Link to post Share on other sites