Hi, All
I have a question about how to produce chart picture as a java object in memory instead of saving it in harddisk.
Would you give a short example?
Thanks a lot!
How to produce chart picture in memory instead of save it
Re: How to produce chart picture in memory instead of save it
If u look at the Jfrechart API, at the ChartUtilities class. U can use write mothods passing into the write mothod a new OutPutStream() and taking back from it the byte[]. After that u can do what u want....
i suppose
i suppose
-
- Posts: 47
- Joined: Thu Dec 11, 2008 7:59 pm
Re: How to produce chart picture in memory instead of save it
The JFreeChart object has a few methods for creating a BufferedImage of itself. Here's the simplest method:
Code: Select all
JFreeChart chart = createMyChart();
BufferedImage image = chart.createBufferedImage(int width, int height)