Generate Image Without Displaying Chart First

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
cobragtk
Posts: 11
Joined: Fri Jan 23, 2009 7:07 pm

Generate Image Without Displaying Chart First

Post by cobragtk » Thu May 28, 2009 1:52 am

Hi all,
Is it possible to generate an image from a chart without first having to display the chart on screen? I am trying to do this in a Java Swing application.

Thanks in advance,
Simon

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

Re: Generate Image Without Displaying Chart First

Post by david.gilbert » Sun May 31, 2009 11:17 pm

Yes. The JFreeChart class has several createBufferedImage() methods, and you can also use the ChartUtilities.saveChartAsPNG() methods.
David Gilbert
JFreeChart Project Leader

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

Locked