Shib Report post Posted October 18, 2011 Hi, I am new to FC, I just downloaded latest trial version. While I am trying to follow an example to change chart attribute on the fly(http://www.fusioncharts.com/docs/JavaScript/JS_ChangeChartProperties.html), but it is not working for me. Here is my html code(Only thing I change here is location of js and data.xml): <html> <head> <title>Update Chart data</title> <script type="text/javascript" src="FusionCharts/FusionCharts.js"> </script> </head> <body> <center> <div id="chartContainer">FusionCharts will load here!</div> <script type="text/javascript"><!-- var myChart = new FusionCharts( "FusionCharts/Column2D.swf", "myChartId", "300", "240", "0", "1" ); myChart.setXMLUrl("Data.xml"); myChart.render("chartContainer"); function changeAttribute() { // get chart reference var chartReference = FusionCharts( "myChartId" ); // change palette, palette colors and set glass effect to chart chartReference.setChartAttribute( { "palette" : "2", paletteColors : "ACBF72", useRoundEdges : 1 } ); } // --> </script> <input type="button" onClick="changeAttribute();" value="Change Chart Theme" > </center> </body> </html> And Data.xml: <chart caption="Yearly Sales Summary" numberPrefix="$" xAxisName="Year" yAxisName="Amount"> <set label="2005" value="1735.08" /> <set label="2006" value="1335.08" /> <set label="2007" value="1582.08" /> <set label="2008" value="1555.08" /> </chart> It renders the chart on first load, but nothing happens after clicking the change button. Please let me know what I am doing wrong. Share this post Link to post Share on other sites
Shib Report post Posted October 18, 2011 What I also found if replace myChart.setXMLUrl("Data.xml") with myChart.setXMLData(MY XML)..it works. Is there something with free version? Please advice. thanks Share this post Link to post Share on other sites
Guest Angshu Report post Posted October 19, 2011 Hi, Welcome to FusionCharts Forum! You seem to be using Data URL method (provide data to chart from files or streams) to provide chart data. Many browsers restrict JavaScript from accessing local file system owing to security reasons. When running locally, however, if you provide the data as string (using the Data String method), it works fine. I am afraid, we are unable to replicate the issue, as the code is working fine from our end. Please find the screenshot attached for your reference. Share this post Link to post Share on other sites