As this is my first post here I'd like start off by congratulating David and the others who have contributed to making JFreeChart such a great tool.
The problem I have to report is I've just upgraded an application from 0.71 to the latest 0.91 release and the charts that are being displayed now look blurred.
The application is using a ChartPanel to display vertical bar charts. The panel is in a resizeable window so can be maximised to full screen. The ChartPanel is resizing with the Window.
What appears to be happening is the chart image looks like it is being scaled up in size. This makes it look blocky. The anti-aliasing that has been introduced helps to smooth the text but the text is also looking blurred. The outlines of the bars look very blurred.
To try and resolve this I've turned off anti-aliasing using setAntiAlias(false). This improves the bars but leaves the text looking really blocky.
The scaling and anti-aliasing look to be of value when the window size is made smaller, however the scaling up in size that is occuring has the complete opposite effect.
I think this problem could be solved by preventing the chart from being scaled above it's rendered size. Is there any way to do this?
Can anyone suggest any other ways I could get these charts looking as sharp as they did with 0.71?
thanks
/PhillipB
Problem with scaling and blur.
Re: Problem with scaling and blur.
Looks like I've found the answer to my own problem.
The maximumDrawWidth and maximumDrawHeight of ChartPanel appear to control if scaling will be used. By bumping these values up I've avoided the scaling which has improved the look of things no end.
/PhillipB
The maximumDrawWidth and maximumDrawHeight of ChartPanel appear to control if scaling will be used. By bumping these values up I've avoided the scaling which has improved the look of things no end.
/PhillipB
Re: Problem with scaling and blur.
Hi Philip,
I've just committed changes to CVS to add get/set methods for these attributes. I like the new behaviour (except that it seems a little slower - I don't have hard stats on that though), but if no one else does then I'll set the default values in ChartPanel to something higher.
Regards,
DG.
I've just committed changes to CVS to add get/set methods for these attributes. I like the new behaviour (except that it seems a little slower - I don't have hard stats on that though), but if no one else does then I'll set the default values in ChartPanel to something higher.
Regards,
DG.
Re: Problem with scaling and blur.
I might be missing something here but it seems like you could acheive essentially the same thing, i.e., preventing a ChartPanel from being sized beyond its rendered size, with something like:
chartPanel.setMaximumSize(chartPanel.getPreferredSize());
Ashwin
chartPanel.setMaximumSize(chartPanel.getPreferredSize());
Ashwin
Re: Problem with scaling and blur.
I don't mind how big the panel gets...I just wanted to have the *option* of scaling a smaller chart into the bigger space, because on full screen charts sometimes the title font and the lines look a little small/thin. With scaling this isn't such a problem. But you can set the max width and height to large values and just leave JFreeChart to do it's own layout as it did in previous versions.
Regards,
DG
Regards,
DG