Out of memory error - JFreeChart limitation?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
astenwick
Posts: 13
Joined: Tue Apr 13, 2004 8:03 pm
Location: Seattle

Out of memory error - JFreeChart limitation?

Post by astenwick » Tue May 18, 2004 8:19 pm

Is there a maximum number of points on a plot that JFreeChart can handle drawing? I am asking this because I am getting an out of memory error from the JVM when I try to plot a large number of points. I have a CombinedDomainXYPlot with 12 individual XYPlots. In each plot there are 2200 data points, so total that is 26,400. Is this too many? Should I just increase the memory size of my JVM? My chart is being converted to a BufferedImage and being displayed on a webpage in PNG format.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Tue May 18, 2004 9:35 pm

There is no fixed upper limit, but you will run out of memory eventually. One are that is memory hungry is the storage of tooltip and URL information for each data point - if you are not using these, make sure when you call the draw() method for the JFreeChart class that you pass in 'null' for the ChartRenderingInfo object.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

astenwick
Posts: 13
Joined: Tue Apr 13, 2004 8:03 pm
Location: Seattle

Post by astenwick » Wed May 19, 2004 12:35 am

Thanks - that worked great. I couldn't beleive how much faster it rendered!

developper
Posts: 8
Joined: Fri Sep 15, 2006 10:06 am

Post by developper » Wed Sep 27, 2006 9:16 am

Hello,

i have some memory problem and i'd like to know how to avoid tooltip to use memory.

I've extended the class JFreeChart and overriden method draw(Graphics ...) to call the super draw method with ChartRenderingInfo = null, but memory continue to growing up until OutOfMemoryException.

I've tried to find in the existing posts, all i see is that tooltips take memory. Once i knew that, i tried to avoid the mecanism but i think i'm wrong in the way to avoid tooltip.

Any help will be kind.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Thu Sep 28, 2006 11:23 am

developper wrote:I've extended the class JFreeChart and overriden method draw(Graphics ...) to call the super draw method with ChartRenderingInfo = null, but memory continue to growing up until OutOfMemoryException.
In that case, I think you need to look elsewhere for the memory usage. Perhaps you are inadvertently making many copies of your chart or dataset, or holding onto images and preventing the garbage collector from dealing with them.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked