save chart in a specific location

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
reach2kanchan
Posts: 32
Joined: Wed Jan 07, 2009 5:09 am

save chart in a specific location

Post by reach2kanchan » Tue Jun 23, 2009 11:11 am

Hi,
Using java how can i save the chart in a specific location.When we have created a chart using

Code: Select all

 filename = ServletUtilities.saveChartAsJPEG(chart, 150, 150,info, null);
PrintWriter pw= new PrintWriter(System.out);
ChartUtilities.writeImageMap(pw,filename, info,true);
pw.flush();
it has created chart in the temp directory but i want to save the chart in a specific directory.Is there any method to save the chart in the particular location?
Waiting for your suggestion.

Thanks.

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

Re: save chart in a specific location

Post by david.gilbert » Tue Jun 23, 2009 12:24 pm

The ChartUtilities class has methods for saving a chart to a specific file.
David Gilbert
JFreeChart Project Leader

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

Locked