Background image for the plot area

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Alexander Lobo

Background image for the plot area

Post by Alexander Lobo » Thu Jan 02, 2003 3:14 pm

hi,

Can you set a background image for the plot area in place of a default background color ? how do i do this ? i tried using plot.setBackgroundImage(), but i do not get a image on the plot background. What could be the reason ?

any help would be greatly appreciated.

Thanks,
Alexander.

Bryan Sampieri

Re: Background image for the plot area

Post by Bryan Sampieri » Mon Jan 06, 2003 11:51 pm

try JFreeChart.setBackgroundImage()

David Gilbert

Re: Background image for the plot area

Post by David Gilbert » Tue Jan 07, 2003 11:26 am

Hi Alexander,

The plot.setBackgroundImage(...) call should work. Sometimes there can be a problem if the image you add isn't fully loaded, try:

plot.setBackgroundImage(JFreeChart.INFO.getLogo());

If that doesn't display the gorilla, then something else is the problem. Which chart are you using?

Regards,

Dave Gilbert

Suprigya

Re: Background image for the plot area

Post by Suprigya » Fri Jan 24, 2003 12:47 am

I tried using

plot.setBackgroundImage(JFreeChart.INFO.getLogo()); to get the background image. But, no image is appearing. I am creating Line Chart.

Could you please suggest what could be the problem?
Thanks.

David Gilbert

Re: Background image for the plot area

Post by David Gilbert » Fri Jan 24, 2003 10:07 am

I've checked this and it is failing against 0.9.4 (not sure why) but it is working in the CVS version of JFreeChart. I'm working hard to get 0.9.5 released by the end of next week, so I won't go back through the 0.9.4 source code to figure this one out...it will be working in 0.9.5.

Regards,

Dave Gilbert

Suprigya

Re: Background image for the plot area

Post by Suprigya » Fri Jan 24, 2003 4:35 pm

thanks, I will wait for the new version

Locked