Sign in to follow this  
numintec

Error Javascrpit On Ajax Reload

Recommended Posts

Hi !

First of all congratulations to the FusionCharts team becouse of the awesome work you are doing

So i've been configuring some charts in my webpage, and I finnaly get working an html5 chart. In the first load everithing works fine, all loads perfectly, but, when I refresh my page by using javascpript my aplication stops and I can see de folowing error

Uncaught TypeError: Cannot read property 'related' of undefined

FusionCharts.HC.js

Am i missing some configuration ? i show you my declaration

FusionCharts.setCurrentRenderer('javascript');var chart1 = new FusionCharts(cDIR_LIB_FCv3+"Pie2D.swf",chartName, divWidth, divHeight, "0", "1");

chart1.setXMLData(xml);

chart1.setTransparent(false);

chart1.render(capa);

Lots of thanks !

Share this post


Link to post
Share on other sites

I was Working in the error , and I found the line witch reutrns de problem

Hope that helps

 

 

, line 884 of FusionCharts.HC.js

teardown: function() { P.data(this, t.datakey).related || (P.removeData(this, t.datakey), u.remove(this, Q, t.init), u.remove(this, "draginit", t.delegate),

cheers

 

 

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Welcome to FusionCharts Forum! smile.gif

 

Could you please send us a live link to look into the issue?

 

Please confirm the browser version you are using.

 

Awaiting for your reply.

Share this post


Link to post
Share on other sites

Hi !

Thanks for answering.

 

I'm using Chrome, but i'm trying with Firefox with the same results.

I could detect the issue, and I solve it by commenting this string --> P.data(this,t.datakey).related || <-- in the file FusionCharts.HC.js.

 

However, I would like to solve the issue by understanding what's wrong. And i've seen that the problem is in the event teardown. So , when i try to change the screen, this events tryies to clean or something, and then is when i get the error.

 

 

I can't give the Url becouse its a confidential site, but i'm working hard to reproduce de issue and send it to you. If I find the problem i'll post it. I'm thinking in some incompatibility between the jquery that my app loads and what FS load.

 

Well that's all the info i get till now.

I'm sorry for the multiple posts.

 

Thanks for you time :D

Share this post


Link to post
Share on other sites

You'r wellcome rolleyes.gif

 

I've been working to get a reduced example wich I attach.

 

To force the error you have to :

 

Step 1 : load the index.php in Firefox with firebug 1.7 or higher

Step 2 : push the button to load the chart with the firebug console opened

Step 3 : pres f5 to reload the page

Step 4 : Detect the following error

 

P.data(this, t.datakey) is undefined

FusionChartsBug/Charts/FusionCharts.HC.js

Line 78

 

The problem is the jquery Version that I'm using Version 1.3. The problem is that we are not able to change te version becouse it means spending a lot of time migrating.

In case you cannot repare the bug ( in case its a bug ) i would need to know if the the soulution I've posted before ( coment a part of code in FusionCharts.HC.js ) has any repercusion, becouse i'm afraid that if FusionCharts trigger's an event when the user is leaving the page is becouse its needed for something. So i would need to know what can happen if I coment that line.

 

Thank you very much, I hope the report its clear enough.

 

Cheers,

Marlon

FusionChartsBug.zip

Edited by Marlon

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