programmerbyday Report post Posted December 2, 2010 Hi, I am working on a dashboard that uses sparkline and sparkcolumn charts. I noticed if I use the current version of fusioncharts.js (@version 3.2.0-release) I get an "Error in loading data" error because the generated dataURL is not resolving correctly. However, if I replace the fusioncharts.js file with an old version (Version: 1.2.3 (15th September, 2008) - Added fix for % and & characters.) the chart renders fine. Here is the generated source using fusioncharts.js version 3.2 (WHICH RETURNS "Error in loading data"): <div id="chart100770div" class="chartclass"><object style="visibility: visible;" id="chartID100770" data="/Charts/SparkLine.swf" class="FusionCharts" type="application/x-shockwave-flash" height="50" lang="EN" width="200"><param value="noScale" name="scaleMode"><param value="noScale" name="scale"><param value="transparent" name="wMode"><param value="always" name="allowScriptAccess"><param value="best" name="quality"><param value="lang=EN&debugMode=0&animation=undefined&DOMId=chartID100770®isterWithJS=1&chartWidth=200&chartHeight=50&InvalidXMLText=Invalid data.&stallLoad=true&dataXML=&dataURL=" name="flashvars"></object></div> <script type="text/javascript"> var chart100770 = new FusionCharts("/Charts/SparkLine.swf", "chartID100770", "200", "50", "0", "1"); chart100770.setTransparent(true); chart100770.setDataURL("/red/dashboar.nsf/xmlpie?OpenAgent?chart=100770%26chartWidth=300%26chartHeight=800%26chartRisqueId=64D5B6A9CD4241E6852577E50016BBBA%26"); chart100770.render("chart100770div"); Here is the debug info: Info: Chart loaded and initialized. Initial Width: 200 Initial Height: 50 Scale Mode: noScale Debug Mode: Yes Application Message Language: EN Version: 3.1.1 Chart Type: Spark Column Chart Chart Objects: BACKGROUND CANVAS CAPTION SUBCAPTION PLOT PERIOD TRENDLINES TOOLTIP INFO: Chart registered with external script. DOM Id of chart is chartID100770 WARNING: Could not find dataXML or dataURL parameter. Setting dataURL to default data file Data.xml. dataURL provided: Data.xml dataURL provided: Data.xml ERROR: An error occurred while loading data. Please check your dataURL, by clicking on the "dataURL invoked" link above, to see if it's returing valid XML data. Common causes for error are: No URL Encoding provided for querystrings in dataURL. If your dataURL contains querystrings as parameters, you'll need to URL Encode the same. e.g., Data.asp?id=101&subId=242 should be Data%2Easp%3Fid%3D101%26subId%3D242 Different sub-domain of chart .swf and dataURL. Both need to be same owing to sandbox security. Network error Here is the generated source using fusioncharts.js version 1.2.3 (WHICH WORKS CORRECTLY): <div id="chart100770div" class="chartclass"><embed type="application/x-shockwave-flash" src="/Charts/SparkLine.swf" id="chartID100770" name="chartID100770" quality="high" allowscriptaccess="always" wmode="transparent" flashvars="debugMode=0&chartWidth=200&chartHeight=50&DOMId=chartID100770®isterWithJS=1&scaleMode=noScale&lang=EN&dataURL=/red/dashboar.nsf/xmlpie?OpenAgent?chart=100770%26chartWidth=300%26chartHeight=800%26chartRisqueId=64D5B6A9CD4241E6852577E50016BBBA%26" height="50" width="200"></div> <script type="text/javascript"> var chart100770 = new FusionCharts("/Charts/SparkLine.swf", "chartID100770", "200", "50", "0", "1"); chart100770.setTransparent(true); chart100770.setDataURL("/red/dashboar.nsf/xmlpie?OpenAgent?chart=100770%26chartWidth=300%26chartHeight=800%26chartRisqueId=64D5B6A9CD4241E6852577E50016BBBA%26"); chart100770.render("chart100770div"); Please don't suggest that I change the DataURL that I am passing. I need the url to contain both "?" characters (I am using Lotus/Domino v8.5.1 to generate the xml). Can you please provide/suggest a fix for this issue? I need to get this working asap using v3.2. BTW, the DataURL string that I listed above (url's with 2 "?") works fine for other fusion charts such as PIE3D.swf using fusioncharts.js (@version 3.2.0-release). The issue seems to be with the spark charts swf's. Thank You. Share this post Link to post Share on other sites
FusionCharts Support Report post Posted December 3, 2010 Hi, Could you please check out the latest release FusionCharts v3.2.1 having FusionCharts.js version as 3.2.1 too? This issue is resolved in this release. Share this post Link to post Share on other sites
programmerbyday Report post Posted December 6, 2010 Hi, Could you please check out the latest release FusionCharts v3.2.1 having FusionCharts.js version as 3.2.1 too? This issue is resolved in this release. Hi Sudipto, I dowloaded v3.2.1 and it has fixed my issue. Thanks!, Rob Share this post Link to post Share on other sites
Sanjukta Report post Posted December 7, 2010 Hi, You are always welcome. Glad that your issue is resolved. Happy FusionCharting! Share this post Link to post Share on other sites