Sign in to follow this  
Liva

Chart Not Rendered

Recommended Posts

Good evening!

 

Tried to make my first chart as shown in Example in Fusion Charts Beginner's guide book, but the chart is not rendered - the browser shows text "FusionCharts will load here!"

 

The code used is below:

 

<html>

<head>

<title>My First chart using FusionCharts</title>

<script type="text/javascript"

src="../FusionCharts/FusionCharts.js">

</script>

</head>

<body>

<div id="chartContainer">FusionCharts will load here!</div>

<script type="text/javascript">

<!-- var myChart =

new FusionCharts("../FusionCharts/Column3D.swf",

"myChartId", "400", "300", "0", "1" );

myChart.setXMLUrl("Data.xml");

myChart.render("chartContainer");//-->

</script>

</body>

</html>

 

The data.xml file contains code:

 

<chart caption='Harry's SuperMart' subcaption='Revenue by

Year' xAxisName='Year' yAxisName='Amount' numberPrefix='$'>

<set label='2009' value='1487500' />

<set label='2010' value='2100600' />

<set label='2011' value='2445400' />

</chart>

 

First code file and the data.xml files are on the same folder. The relative pathes to the FusionCharts.js and Column3D.swf are correct.

 

What could be wrong here?

 

Liva

Share this post


Link to post
Share on other sites

Hi Liva,

 

I am afraid, I am unable to replicate the issue.

 

We have modified the paths slightly and used your HTML and XML files to create a sample that works perfectly.

 

It seems that the path for the JavaScript file is not correct and hence it is not loading which is preventing the chart from rendering. Could you please check in the Network tab in the Browser console and see if this helps?

 

Hope this helps. :)

Column3D.zip

Share this post


Link to post
Share on other sites

Hello, Sanjukta!

 

Thank you very much for the sample :) - that allowed me to find mistake - I simply had to delete some symbols (bold underlined) and my chart was OK as well

<!-- var myChart =

new FusionCharts("../FusionCharts/Column3D.swf",

"myChartId", "400", "300", "0", "1" );

myChart.setXMLUrl("Data.xml");

myChart.render("chartContainer");//-->

(it was OK with paths - I just have a structure:

Parent folder

---FusionCharts folder

---FirstChart folder

------data.xml

------firstchart.html)

 

 

What is interesting though, that on my computer your sample is opened without blocking content (I use IE8), while the content of my sample (attached) is initially blocked and has to be allowed intentionally. I wonder why...

 

 

Liva

Copy of LearningFusionCharts.zip

Edited by Liva

Share this post


Link to post
Share on other sites

Hi Liva,

 

Apologies for the delayed response.

 

If an ActiveX control or script tries to run from a Web page and your Security settings are set high, you may receive this message(IE restrict this webpage from running Active X controls)

 

To disable this message

 

>>Open IE browser>> Click Tools/Options/Advanced tab

>>Scroll down to Security

>>Enable "Allow active content to run files on My computer*"

 

Hope this helps.

Share this post


Link to post
Share on other sites

Hi Liva,

 

What is interesting though, that on my computer your sample is opened without blocking content (I use IE8), while the content of my sample (attached) is initially blocked and has to be allowed intentionally. I wonder why...

 

I do not have IE8 to test this, but, I would guess this is possibly because, Sanjukta's example is loading the supporting files (SWF and JS) from a folders which is already inside the folder that contains the HTML file (probably more secure); whereas, your First chart example, is loading the SWF and LS from a folder outside the folder that contains the HTML file.

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