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&registerWithJS=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&registerWithJS=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.
Dataurl Bug Using Sparkline.swf And Sparkcolumn.swf
Started by programmerbyday, Dec 02 2010 05:51 PM
3 replies to this topic
#2
Posted 03 December 2010 - 05:52 PM
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.
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.
#4
Posted 07 December 2010 - 06:17 AM
Hi,
You are always welcome.
Glad that your issue is resolved.
Happy FusionCharting!
You are always welcome.
Glad that your issue is resolved.
Happy FusionCharting!
Help us improve our documentation with your precious feedback at:
http://documentation...sioncharts.com/
Thanks,
Sanjukta
Follow us @Twitter!
http://documentation...sioncharts.com/
Thanks,
Sanjukta
Follow us @Twitter!










