Sign in to follow this  
Pallav

Out of memory error multiple charts

Recommended Posts

Hello,

I am currently evaluating your product and am very close to purchasing the license for it.  Very impressive so far I must say :-)  Quick question, and I do apologize if I missed this somewhere in the documentation or another post.  I am using JavaScript to create 2 charts in my page.  I am getting an "out of memory" error if I set the registerWithJS flag to "1" on BOTH charts and I getting this error ONLY if the page is refreshed, or unloaded in someway.  Initial load works fine. This is important to me because I have the need to dynamically change both charts client side. If I set the registerWithJS flag to "1" for one chart, and "0" for the other one, all is well.  Only when I set both flags to "1" do I see this problem. 

Thank you in advance,

Bobby 

 

Share this post


Link to post
Share on other sites

Bobby,

Can you make sure that:

  1. Both charts have different chart IDs?
  2. Both charts have different DIV Ids?
  3. Both charts have different variable names?
  4. You're including FusionCharts.js only once in the page.

Share this post


Link to post
Share on other sites

Hi Pallav,

Thank you for replying. 

Yes both charts have different chart IDs

Yes both charts have different DIV Ids

Yes both charts have different variable names

I am only including FusionCharts.js once in the page

I have not seen any simple examples of having multiple charts being able to interact wtih javaScript. 

Not sure what else to do/try.

thanks

Bobby 

Share this post


Link to post
Share on other sites

Hi,

Thought I would post this code...

Even with something as simple as this...

<html>

<head>

<title>Example Charting</title>

<script src="fusionCharts/fusionCharts.js"></script>

</head>

<body>

<div id="piechartdiv" align="center">Loading bar chart...</div>

<div id="piechartdiv2" align="center">Loading bar chart...</div>

</body>

<script>

var myPieChart = new FusionCharts("fusionCharts/Column3d.swf", "myPieChartId", "600", "300", "0", "1");

myPieChart.setDataXML("<chart></chart>");

myPieChart.render("piechartdiv")

var myNumbersPieChart = new FusionCharts("fusionCharts/MSColumn3d.swf", "myNumbersPieChartId", "600", "300", "0", "1");

myNumbersPieChart.setDataXML("<chart></chart>");

myNumbersPieChart.render("piechartdiv2")

</script>

</html>

... I receive the error.  Again to clarify, the page loads the first time just fine.  However, any "unload" event (refreshing window, closing window, going to a different site, etc) will fire the "out of memory at line: xx" error.  And this is only when both registerWithJs flags are set to "1".  If one is set to "1" and the other is set to "0", I will not receive this error.

thanks!

Bobby 

Share this post


Link to post
Share on other sites

Bobby,

Two more checks:

  • Can you make sure that you're using v3.0.4 of FusionCharts? To check this, just switch the debug mode to on.
  • Can you also make sure that you're using latest version of FusionCharts.js (size 11 KB)?

Share this post


Link to post
Share on other sites

Pallav,

Yes I did download FusionCharts v3.0.4 so that is current.  The fusionCharts.js file that I have is 10.3K and was last modified June 29, 2007. 

Is this correct or is their a new version of that file?

Bobby

Share this post


Link to post
Share on other sites

Is there any update to this, as I constantly receive the same error. Some workarounds such as only registering 1 chart with JS works and sometimes not at all depending how many charts you have on the page.

Also is there any method I should trigger in JS when removing a chart from the screen ? I saw fla action script does a remove() method, is there a function on the chart object ?

Thanks

Ben

Share this post


Link to post
Share on other sites

Hi,

I have been experiencing the same problem as Bobby when using two graphs on the same page, both in my own application and also using the example he supplied.  I only downloaded the trial of FusionCharts two days ago so I have the latest version of the js file.

I've found that if I install the example code on a Win2K server and attempt to refresh the page from a workstation, then I see the out of memory error.  However, if I run the same code from the C drive of the same workstation, then the error does not occur.  If I log on to the server and invoke the page from IIS Manager, then I do not see the error.  I have tested on other workstations and experienced the same problem.

In the above cases, both charts were registered with Javascript.  If only one graph is registered with Javascript, then it works correctly in all cases.

I am going to zip and send the tested code to your support email account.

Thanks,

Peter

Share this post


Link to post
Share on other sites

Any updates on this issue? I have the same problem. If I register 2 gpahs with javascript then I get the Out of memory error. However, this seems to be PC specific. I have a desktop and laptop both running Windows XP Professional SP2 and the page works fine on 1 and I get the error on the other.

Share this post


Link to post
Share on other sites

Hi,

 

 

 

I am also getting same error. I have 4 charts per page.

 

I am opening the page containing charts in new window using _blank.

 

If I open same charts in multiple say 4-5 pages then while closing the windows I am getting out of memory error.

 

 

 

All charts have been registered with JS.

 

 

 

Let me know if anybody has found fix for this issue or any work-around.

 

 

 

-Amarendra

Share this post


Link to post
Share on other sites

Thanks for reply.

 

 

 

I am using flash player 9,0,16,0

 

 

 

And on my another machine which also has same flash player I do not get the out of memory error.

 

 

 

So there may be some other reason for this error.

 

 

 

-Amarendra

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