I´ve seen in some examples that it is possible to change the color of the background of the png image. It´s not concerned with the background of the graph (space between the X-axis and the Y-axis): I want to change the color of the rest of the image.
(Sorry for my English, I hope you can understand what I mean)
Background-color of the image
I think this is what you want.
Nicky
Code: Select all
public static final Color DEFAULT_COLOR_BACKGROUND =
new Color(236,233,216);
JFreeChart chart = new JFreeChart("title", "font", plot, false);
chart.setBackgroundPaint(DEFAULT_COLOR_BACKGROUND);
Thank you. I´m already using this property, but I´m using it with a plot-object instead a chart-object. I couldn´t do it with a chart-object because of an error in compilation...
Otherwise, I´m using:
plot.setBackgroundPaint(new Color(243, 249, 255));
but I can only see in black the background of my graph (between the X-axis and the Y-axis): the rest of the picture is white!!!! (the space between the axis and the border of the png image)
Otherwise, I´m using:
plot.setBackgroundPaint(new Color(243, 249, 255));
but I can only see in black the background of my graph (between the X-axis and the Y-axis): the rest of the picture is white!!!! (the space between the axis and the border of the png image)
-
- Posts: 58
- Joined: Wed Jun 02, 2004 1:37 pm