Out of memory error multiple charts
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        


12»»

Out of memory error multiple charts Expand / Collapse
Author
Message
Posted 8/15/2007 1:07:49 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/23/2008 2:17:34 PM
Posts: 4, Visits: 20
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 
 

Post #1975
Posted 8/17/2007 2:12:44 AM
FusionCharts Team

FusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts Team

Group: Administrators
Last Login: 10/3/2008 2:42:18 AM
Posts: 2,117, Visits: 498
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.


Thanks,
Pallav Nadhani
FusionCharts Team
Post #1991
Posted 8/22/2007 2:51:39 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/23/2008 2:17:34 PM
Posts: 4, Visits: 20
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 

Post #2062
Posted 8/22/2007 3:53:56 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/23/2008 2:17:34 PM
Posts: 4, Visits: 20
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 

Post #2063
Posted 8/23/2007 12:18:49 AM
FusionCharts Team

FusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts Team

Group: Administrators
Last Login: 10/3/2008 2:42:18 AM
Posts: 2,117, Visits: 498
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)?


Thanks,
Pallav Nadhani
FusionCharts Team
Post #2072
Posted 8/23/2007 9:45:47 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/23/2008 2:17:34 PM
Posts: 4, Visits: 20
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

Post #2081
Posted 8/24/2007 2:31:30 AM
FusionCharts Team

FusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts Team

Group: Administrators
Last Login: 10/3/2008 2:42:18 AM
Posts: 2,117, Visits: 498
Bobby,

Apparently, everything seems right. Can you zip and send us the code at support@fusioncharts.com?

Thanks,
Pallav Nadhani
FusionCharts Team

Post #2090
Posted 1/2/2008 4:29:19 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 1/8/2008 5:39:14 AM
Posts: 1, Visits: 4
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

Post #3572