babuu Report post Posted August 3, 2012 Hi all, I am working on pure javascript fusion charts for all browsers. FF and IE Working fine but Chrome not working I am getting this error in chrome. XMLHttpRequest cannot load file:///C:/wamp/www/export/charts/Data.xml. Origin null is not allowed by Access-Control-Allow-Origin. Could any help.... Share this post Link to post Share on other sites
Guest Sumedh Report post Posted August 3, 2012 Hi, Please send us the information on following points: > What FusionCharts version are you using? > Send us the sample code to replicate the issue at our end. > What chart type used? Send us the chart XML also. Share this post Link to post Share on other sites
babuu Report post Posted August 3, 2012 Thanks for reply , 1. Version fusioncharts/3.2.3-sr3.5347 2. <script type="text/javascript"> FusionCharts.setCurrentRenderer('JavaScript'); var myChart = new FusionCharts( "charts/Column2D.swf", "myChartId", "300", "300", "0", "1" ); myChart.setXMLUrl("charts/Data.xml"); myChart.render("chartContainer"); --> </script> 3. (chart XML) <chart caption='Monthly Revenue' xAxisName='Month' yAxisName='Revenue' numberPrefix=' showValues='0' exportAtClient="0" html5ExportHandler="http://localhost/export/charts/index.php" exportEnabled='1' exportAction='save' exportShowMenuItem='1'> <set label='Jan' value='420000' /> <set label='Feb' value='910000' /> <set label='Mar' value='720000' /> <set label='Apr' value='550000' /> <set label='May' value='810000' /> <set label='Jun' value='510000' /> <set label='Jul' value='680000' /> </chart> Please check above details as per asked. Thanks Babu Hi, Please send us the information on following points: > What FusionCharts version are you using? > Send us the sample code to replicate the issue at our end. > What chart type used? Send us the chart XML also. Share this post Link to post Share on other sites
babuu Report post Posted August 3, 2012 Sorry forgot chart type, Column2D.swf Thanks for reply , 1. Version fusioncharts/3.2.3-sr3.5347 2. <script type="text/javascript"> FusionCharts.setCurrentRenderer('JavaScript'); var myChart = new FusionCharts( "charts/Column2D.swf", "myChartId", "300", "300", "0", "1" ); myChart.setXMLUrl("charts/Data.xml"); myChart.render("chartContainer"); --> </script> 3. (chart XML) <chart caption='Monthly Revenue' xAxisName='Month' yAxisName='Revenue' numberPrefix=' showValues='0' exportAtClient="0" html5ExportHandler="http://localhost/export/charts/index.php" exportEnabled='1' exportAction='save' exportShowMenuItem='1'> <set label='Jan' value='420000' /> <set label='Feb' value='910000' /> <set label='Mar' value='720000' /> <set label='Apr' value='550000' /> <set label='May' value='810000' /> <set label='Jun' value='510000' /> <set label='Jul' value='680000' /> </chart> Please check above details as per asked. Thanks Babu Share this post Link to post Share on other sites
Swarnam Report post Posted August 4, 2012 Hey Babu, Thank you for all inputs. Many browsers restrict JavaScript from accessing local file system owing to security reasons. The JavaScript charts, when running locally, will not be able to access data provided using setXMLUrl function. If you run the files from a server, it will run absolutely fine, though. When running locally, however, if you use setXMLData function , it works fine. Hope this helps. Share this post Link to post Share on other sites
babuu Report post Posted August 6, 2012 Thank you for response. Hey Babu, Thank you for all inputs. Many browsers restrict JavaScript from accessing local file system owing to security reasons. The JavaScript charts, when running locally, will not be able to access data provided using setXMLUrl function. If you run the files from a server, it will run absolutely fine, though. When running locally, however, if you use setXMLData function , it works fine. Hope this helps. Share this post Link to post Share on other sites