Out of memory error - JFreeChart limitation?
Out of memory error - JFreeChart limitation?
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.
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
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
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- Posts: 8
- Joined: Fri Sep 15, 2006 10:06 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.
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.
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
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.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.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

