Sign in to follow this  
malibu3

setDataXML Help

Recommended Posts

I am able to literally create a chart with a literal string for the xml data directly embedding into the object.  However, when I try to set a reference to the object and utilize the setDataXMl method i get "Error in Loading data". 

I have tried multiple different variations, it appears that setDataXML is undefined? 

 

Any help would be most appreciated.

Here is the example.  It is creating the object, but also I can not get the debug to work.  However if i change my reference to the FusionCharts.js file it does not allow me to create the object, so it appears my links are working correctly.

<td class="head_center" colspan="3">

<div id="chart1div">

</div>

<script type="text/javascript">

var chart1 = new FusionCharts("FusionCharts/Column3D.swf", "chart1Id", "400", "300", "1", "1");

chart1.setDataXML(

"<chart><set label='A' value='10' /><set label='B' value='11' /></chart>");

chart1.render(

"chart1div");

</script>

</td>

Share this post


Link to post
Share on other sites

I do not have a way to give a direct link URL.  Our network is behind a firewall.  I am working on our intranet. 

I did have the object created write out an alert windwo, and it appears that the params for setting the xml data are missing from the above referenced code.  Also, it appears we may have a bad FusionChart.js file.  I am trying to set debug mode on but it is not getting that paramater either.  Our js file has this in it's code.

It appears the code for checking on debug is not there.  Is there an updated js file i can download? 

On the setDataXML problem, is there some suggestions for me to try and isolate?

//Pass width and height to be appended as chartWidth and chartHeight

this.addVariable('chartWidth', w);

this.addVariable('chartHeight', h);

//Whether in debug mode

//Pass DOM ID to Chart

this.addVariable('DOMId', id);

//Whether to registed with JavaScript

registerWithJS = registerWithJS ? registerWithJS : 0;

this.addVariable('registerWithJS', registerWithJS);

Share this post


Link to post
Share on other sites

I still get the same result.  I also still do not get a dubug window.  It appears it may be something with the ExternalInterface API.  I am also getting an undefined when I try to do a _flash_addCallback as I have seen examples of for fixes to this issue. 

I am at a complete lost on this one................:)

Share this post


Link to post
Share on other sites
I also wanted to include the object that is being created from this code:

<div id="chart1div">

</div>

<script language= "javascript" type="text/javascript">

var chart1 = new FusionCharts("FusionCharts/Column3D.swf", "chart1Id", "400", "300", "1", "1");

chart1.setDataXML(

"<chart></chart>");

chart1.render(

"chart1div");

window.setTimeout(

"test()", 2000);

function test(){

alert(document.getElementsByTagName("object")[0].outerHTML);

document.debug.test.value = (document.getElementsByTagName(

"object")[0].outerHTML);

}

</script>

example_object.txt

Share this post


Link to post
Share on other sites

Hi,

 

I am attaching a simple working example of FusionCharts implementation through HTML file & using FusionCharts.js file, please execute the Column3D.html file & see if it works?

 

Also please let us know which language you are using, if possible please post the sample code along with your post.

 

NOTE: Run this sample in different browsers such as FF, IE, Opera, Google Chrome etc.

Edited by Guest

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this