Error In Chrom Console
#1
Posted 03 August 2012 - 09:53 AM
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....
#3
Posted 03 August 2012 - 12:46 PM
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/exp...arts/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.
#4
Posted 03 August 2012 - 02:16 PM
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/exp...arts/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
#5
Posted 04 August 2012 - 08:04 AM
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.
#6
Posted 06 August 2012 - 02:30 PM
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.











