A discussion forum for JFreeChart (a 2D chart library for the Java platform).
-
jaisha
- Posts: 30
- Joined: Mon Oct 22, 2007 6:27 am
Post
by jaisha » Tue Nov 20, 2007 6:40 am
Hi,
The chart while included in an html file is blurred.
I am using
Code: Select all
ChartUtilities.saveChartAsJPEG(File file, JFreeChart chart, int width, int height)
to save the chart.
I have tried different width and height.
BarChart is clear as compared with pie chart.
But still the chart is blurred in HTML.
Thanks for any help
-
mahesh_burgu
- Posts: 25
- Joined: Mon Oct 08, 2007 7:16 am
Post
by mahesh_burgu » Tue Nov 20, 2007 8:20 am
Try this method
saveChartAsJPEG(java.io.File file, float quality, JFreeChart chart, int width, int height) ;
example :
ChartUtilities.saveChartAsJPEG(new File(filelocation), 1.0f, chart, 600, 450);
thanks
mahesh
-
jaisha
- Posts: 30
- Joined: Mon Oct 22, 2007 6:27 am
Post
by jaisha » Wed Nov 21, 2007 7:46 am
Thanks for the reply.
Now its clear as compared with earlier.
but the pieChart is streached,so looks like Oval.
I would like to get it in circle.
Thanks for any help.
-
jaylink
- Posts: 9
- Joined: Tue Oct 23, 2007 3:16 pm
- Location: Illinois, USA
Post
by jaylink » Mon Nov 26, 2007 4:55 pm
Have you tried setCircular()?
For example:
PiePlot3D plot = (PiePlot3D) chart.getPlot();
plot.setCircular(true, true);
-
mahesh_burgu
- Posts: 25
- Joined: Mon Oct 08, 2007 7:16 am
Post
by mahesh_burgu » Tue Nov 27, 2007 8:13 am
try this
PiePlot plot = (PiePlot) chart.getPlot();
plot.setCircular(true);
thanks
mahesh